Skip to content

Commit

Permalink
Merge pull request #330 from wpmudev/new/navigation-design
Browse files Browse the repository at this point in the history
New/navigation design
  • Loading branch information
emgk authored Oct 17, 2024
2 parents 29065b6 + 8c0ace7 commit bdcf45b
Show file tree
Hide file tree
Showing 58 changed files with 3,856 additions and 136 deletions.
2 changes: 1 addition & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = {
options: {},
},
typescript: {
reactDocgen: "react-docgen-typescript-plugin",
reactDocgen: "none",
},
docs: {
autodocs: true,
Expand Down
18 changes: 18 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
background: $color-extended-alpha-grey-90;
}

@include modifier(full) {
@include modifies-element(inner) {
width: 100%;
}
}

@include modifier(has-container) {
z-index: 1;
width: $drawer-size-lg;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,19 @@
padding: $spacing-lg $spacing-xl;
}

@include element(back) {
@include modifier(md) {
@include media(min-width, md) {
display: none;
}
}
}

@include element(header-title) {
display: flex;
align-items: center;
font-weight: $font-weight-lg;
gap: $spacing-sm;
gap: $spacing-md;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
visibility: hidden;
width: $drawer-size-lg;

@include media(max-width, sm) {
width: 100%;
}
}

@include modifier(overlay) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
top: 100%;
left: 0;
display: none;
margin: $spacing-md 0 0;
margin: $spacing-lg 0 0;
padding: $spacing-md 0;
border-radius: $border-radius-md;
background: $color-extended-neutral-100;
Expand All @@ -43,6 +43,19 @@
}
}

@include modifier(arrow) {
position: absolute;
top: -#{$dropdown-position-xs};
left: $dropdown-position-md;
box-shadow: $border-width-sm $border-width-sm 0px $border-width-xs
$color-extended-neutral-80 inset;
height: $dropdown-size-height-3xs;
width: $dropdown-size-width-2xs;
height: $dropdown-size-height-2xs;
background: $color-extended-neutral-100;
transform: rotate(45deg);
}

@include modifier(sm) {
min-width: $dropdown-size-width-sm;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
@include element(popover) {
@include modifier(placement-left) {
left: auto;
right: 0;
right: -#{$dropdown-position-sm};

.sui-#{$block}__popover--arrow {
right: $dropdown-position-md;
left: auto;
}
}

@include modifier(placement-top) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
display: flex;
gap: $spacing-lg;
justify-content: space-between;
padding: $spacing-lg $spacing-2xl;
padding: $spacing-default $spacing-2xl;

.sui-dropdown__popover {
.sui-dropdown__menu-group-title {
Expand All @@ -36,6 +36,29 @@
}
}

@include element(drawer) {
.sui-drawer {
top: 118px;
border-top: $border-width-sm solid $color-extended-neutral-80;
}
}

@include element(actions) {
display: flex;
align-items: center;
gap: $spacing-lg;
padding-left: $spacing-lg;
border-left: $border-width-sm solid $color-extended-neutral-80;

.sui-dropdown {
display: flex;
}

.sui-button {
margin: 0;
}
}

@include media(max-width, md) {
padding: $spacing-xl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@
justify-content: flex-end;
gap: $spacing-md;
margin: 0;

@include media(max-width, md) {
gap: $spacing-lg;
}
}

@include element(nav-item) {
display: flex;
margin: 0;
gap: $spacing-md;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,31 @@
color: $color-extended-neutral-60;
}
}

@include element(dropdown) {
.sui-dropdown__popover {
border: $border-width-sm solid $color-extended-neutral-80;
}
@include modifier(split) {
.sui-dropdown__menu-items {
.sui-dropdown__menu-item {
&:last-child {
position: relative;
margin-top: $spacing-lg;

&:after {
content: "";
position: absolute;
top: -#{$spacing-md};
left: 0;
right: 0;
border-top: $border-width-sm solid $color-extended-neutral-80;
}
}
}
}
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@forward "./wpmudev-list";
Loading

0 comments on commit bdcf45b

Please sign in to comment.