diff --git a/packages/components/docs/sass.md b/packages/components/docs/sass.md index 33b0ad3bab92..77941c1901dd 100644 --- a/packages/components/docs/sass.md +++ b/packages/components/docs/sass.md @@ -1496,7 +1496,15 @@ in code Source code ```scss -$carbon--aspect-ratios: ((16, 9), (2, 1), (4, 3), (1, 1), (1, 2)); +$carbon--aspect-ratios: ( + (16, 9), + (9, 16), + (2, 1), + (1, 2), + (4, 3), + (3, 4), + (1, 1) +); ``` @@ -1506,36 +1514,53 @@ $carbon--aspect-ratios: ((16, 9), (2, 1), (4, 3), (1, 1), (1, 2)); ### ❌carbon--aspect-ratio [mixin] -Output the CSS classes for generating aspect ratio classes +Generates the CSS classname utilities for the aspect ratios + +CSS Tricks article on aspect ratios and all the different ways it can be done. +https://css-tricks.com/aspect-ratio-boxes/#article-header-id-6 + +That article references an earlier article on the topic. +https://keithjgrant.com/posts/2017/03/aspect-ratios/
Source code ```scss -@mixin carbon--aspect-ratio($aspect-ratios: $carbon--aspect-ratios) { +@mixin carbon--aspect-ratio($width, $height) { .#{$prefix}--aspect-ratio { - height: 0; position: relative; } + .#{$prefix}--aspect-ratio::before { + content: ''; + width: 1px; + margin-left: -1px; + float: left; + height: 0; + } + + .#{$prefix}--aspect-ratio::after { + content: ''; + display: table; + clear: both; + } + + @each $aspect-ratio in $aspect-ratios { + $width: nth($aspect-ratio, 1); + $height: nth($aspect-ratio, 2); + + .#{$prefix}--aspect-ratio--#{$width}x#{$height}::before { + padding-top: percentage($height / $width); + } + } + + // leaving here for legacy support .#{$prefix}--aspect-ratio--object { position: absolute; top: 0; - right: 0; - bottom: 0; left: 0; width: 100%; height: 100%; - z-index: 100; - } - - @each $ratio in $aspect-ratios { - $width: nth($ratio, 1); - $height: nth($ratio, 2); - - .#{$prefix}--aspect-ratio--#{$width}x#{$height} { - padding-bottom: percentage($height / $width); - } } } ``` @@ -1544,9 +1569,10 @@ Output the CSS classes for generating aspect ratio classes - **Parameters**: -| Name | Description | Type | Default value | -| ---------------- | ----------------------------------- | ------ | ------------------------ | -| `$aspect-ratios` | A list of aspect ratios to generate | `List` | `$carbon--aspect-ratios` | +| Name | Description | Type | Default value | +| --------- | --------------------------- | -------- | ------------- | +| `$width` | width from an aspect ratio | `Number` | — | +| `$height` | height from an aspect ratio | `Number` | — | - **Group**: [@carbon/grid](#carbongrid) - **Requires**: @@ -6355,6 +6381,7 @@ $text-01: if( - [tags [mixin]](#tags-mixin) - [text-area [mixin]](#text-area-mixin) - [text-input [mixin]](#text-input-mixin) + - [tile [mixin]](#tile-mixin) - [tooltip--definition--legacy [mixin]](#tooltip--definition--legacy-mixin) ### ✅text-02 [variable] @@ -14474,7 +14501,8 @@ Data table action styles .#{$prefix}--toolbar-action ~ .#{$prefix}--btn { margin: 0; - height: $layout-04; + max-width: none; + white-space: nowrap; } .#{$prefix}--overflow-menu--data-table { @@ -14752,7 +14780,7 @@ Data table action styles .#{$prefix}--toolbar-search-container-active .#{$prefix}--search .#{$prefix}--search-input { - visibility: visible; + visibility: inherit; } .#{$prefix}--toolbar-search-container-active @@ -14797,12 +14825,14 @@ Data table action styles .#{$prefix}--table-toolbar--small .#{$prefix}--toolbar-action { height: rem(32px); width: rem(32px); - padding: $spacing-03; + padding: $spacing-03 0; } .#{$prefix}--table-toolbar--small .#{$prefix}--btn--primary { - padding-top: rem(3px); + padding-top: calc(0.375rem - 3px); + padding-bottom: calc(0.375rem - 3px); height: rem(32px); + min-height: auto; } .#{$prefix}--table-toolbar--small @@ -14814,7 +14844,6 @@ Data table action styles .#{$prefix}--toolbar-action ~ .#{$prefix}--btn { height: rem(32px); - width: rem(160px); overflow: hidden; } } @@ -15764,7 +15793,7 @@ Data table expandable styles overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; - visibility: visible; + visibility: inherit; white-space: nowrap; } ``` @@ -18556,7 +18585,7 @@ Modal styles visibility 0ms linear $duration--moderate-02; &.is-visible { - visibility: visible; + visibility: inherit; opacity: 1; background-color: $overlay-01; transition: background-color $duration--slow-02 motion(entrance, expressive), @@ -20583,7 +20612,7 @@ Progress indicator styles //OVERFLOW STYLING .#{$prefix}--progress-label-overflow:hover ~ .#{$prefix}--tooltip, .#{$prefix}--progress-label-overflow:focus ~ .#{$prefix}--tooltip { - visibility: visible; + visibility: inherit; } .#{$prefix}--progress-step .#{$prefix}--tooltip .#{$prefix}--tooltip__caret { @@ -21127,7 +21156,7 @@ Search styles outline $duration--fast-02 motion(standard, productive), border $duration--fast-02 motion(standard, productive); cursor: pointer; - visibility: visible; + visibility: inherit; opacity: 1; height: rem(40px); width: rem(40px); @@ -22387,8 +22416,6 @@ Tag styles // tags used for filtering .#{$prefix}--tag--filter { @include tag-theme($inverse-02, $inverse-01); - - cursor: pointer; padding-right: rem(2px); &:focus, @@ -22397,28 +22424,34 @@ Tag styles } } - .#{$prefix}--tag--filter > svg { + .#{$prefix}--tag__close-icon { flex-shrink: 0; width: rem(20px); height: rem(20px); margin: 0 0 0 rem(4px); padding: rem(2px); border: 0; - fill: $inverse-01; background-color: transparent; border-radius: 50%; + cursor: pointer; &:hover { background-color: $inverse-hover-ui; } } - .#{$prefix}--tag--filter:focus > svg { + .#{$prefix}--tag__close-icon svg { + fill: $inverse-01; + } + + .#{$prefix}--tag__close-icon:focus { + outline: none; box-shadow: inset 0 0 0 2px $inverse-focus-ui; border-radius: 50%; } - .#{$prefix}--tag--filter.#{$prefix}--tag--disabled svg:hover { + .#{$prefix}--tag--filter.#{$prefix}--tag--disabled + .#{$prefix}--tag__close-icon:hover { background-color: transparent; } @@ -22812,6 +22845,13 @@ Tile styles } } + .#{$prefix}--tile--clickable { + @include reset; + @include type-style('body-short-01'); + color: $text-01; + text-decoration: none; + } + .#{$prefix}--tile--selectable { padding-right: $carbon--spacing-09; } @@ -22887,7 +22927,7 @@ Tile styles } .#{$prefix}--tile-content__below-the-fold { - visibility: visible; + visibility: inherit; opacity: 1; transition: opacity $duration--fast-02 motion(standard, productive), visibility $duration--fast-02 motion(standard, productive); @@ -22930,6 +22970,7 @@ Tile styles - [carbon--spacing-05 [variable]](#carbon--spacing-05-variable) - [ui-02 [variable]](#ui-02-variable) - [hover-ui [variable]](#hover-ui-variable) + - [text-01 [variable]](#text-01-variable) - [carbon--spacing-09 [variable]](#carbon--spacing-09-variable) - [icon-02 [variable]](#icon-02-variable) - [ui-05 [variable]](#ui-05-variable) @@ -24710,7 +24751,7 @@ UI shell header overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; - visibility: visible; + visibility: inherit; white-space: nowrap; } @@ -25220,7 +25261,7 @@ properties for opacity and visibility to help with the transition animation. .#{$prefix}--side-nav--fixed &, .#{$prefix}--side-nav--expanded & { @if $visibility == true { - visibility: visible; + visibility: inherit; } @if $opacity == true { opacity: 1; @@ -25299,7 +25340,7 @@ UI shell side nav width: 0; } - .#{$prefix}--side-nav:not(.#{$prefix}--side-nav--fixed):hover, + .#{$prefix}--side-nav.bx--side-nav--rail:not(.#{$prefix}--side-nav--fixed):hover, .#{$prefix}--side-nav--expanded { width: mini-units(32); } diff --git a/packages/components/src/components/accordion/_keyframes.scss b/packages/components/src/components/accordion/_keyframes.scss index 9768bb3c9b2f..3fed18e95c90 100644 --- a/packages/components/src/components/accordion/_keyframes.scss +++ b/packages/components/src/components/accordion/_keyframes.scss @@ -1,6 +1,6 @@ @mixin content-visible { height: 100%; - visibility: visible; + visibility: inherit; opacity: 1; } diff --git a/packages/components/src/components/data-table/_data-table-action.scss b/packages/components/src/components/data-table/_data-table-action.scss index 6a30283b2575..9c875a196321 100644 --- a/packages/components/src/components/data-table/_data-table-action.scss +++ b/packages/components/src/components/data-table/_data-table-action.scss @@ -260,7 +260,8 @@ .#{$prefix}--toolbar-action ~ .#{$prefix}--btn { margin: 0; - height: $layout-04; + max-width: none; + white-space: nowrap; } .#{$prefix}--overflow-menu--data-table { @@ -538,7 +539,7 @@ .#{$prefix}--toolbar-search-container-active .#{$prefix}--search .#{$prefix}--search-input { - visibility: visible; + visibility: inherit; } .#{$prefix}--toolbar-search-container-active @@ -583,12 +584,14 @@ .#{$prefix}--table-toolbar--small .#{$prefix}--toolbar-action { height: rem(32px); width: rem(32px); - padding: $spacing-03; + padding: $spacing-03 0; } .#{$prefix}--table-toolbar--small .#{$prefix}--btn--primary { - padding-top: rem(3px); + padding-top: calc(0.375rem - 3px); + padding-bottom: calc(0.375rem - 3px); height: rem(32px); + min-height: auto; } .#{$prefix}--table-toolbar--small @@ -600,7 +603,6 @@ .#{$prefix}--toolbar-action ~ .#{$prefix}--btn { height: rem(32px); - width: rem(160px); overflow: hidden; } } diff --git a/packages/components/src/components/data-table/_data-table-inline-edit-cell.scss b/packages/components/src/components/data-table/_data-table-inline-edit-cell.scss index 0065ace2678f..533a9d06905e 100644 --- a/packages/components/src/components/data-table/_data-table-inline-edit-cell.scss +++ b/packages/components/src/components/data-table/_data-table-inline-edit-cell.scss @@ -21,7 +21,7 @@ overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; - visibility: visible; + visibility: inherit; white-space: nowrap; } diff --git a/packages/components/src/components/date-picker/_flatpickr.scss b/packages/components/src/components/date-picker/_flatpickr.scss index 1157f0c3d50c..aa99e9438f81 100644 --- a/packages/components/src/components/date-picker/_flatpickr.scss +++ b/packages/components/src/components/date-picker/_flatpickr.scss @@ -33,7 +33,7 @@ .flatpickr-calendar.open, .flatpickr-calendar.inline { opacity: 1; - visibility: visible; + visibility: inherit; overflow: visible; max-height: 640px; } diff --git a/packages/components/src/components/modal/_modal.scss b/packages/components/src/components/modal/_modal.scss index c178ee1848e5..32310f76c263 100644 --- a/packages/components/src/components/modal/_modal.scss +++ b/packages/components/src/components/modal/_modal.scss @@ -40,7 +40,7 @@ visibility 0ms linear $duration--moderate-02; &.is-visible { - visibility: visible; + visibility: inherit; opacity: 1; background-color: $overlay-01; transition: background-color $duration--slow-02 diff --git a/packages/components/src/components/progress-indicator/_progress-indicator.scss b/packages/components/src/components/progress-indicator/_progress-indicator.scss index 699107fc4a8f..9ab0967d083d 100644 --- a/packages/components/src/components/progress-indicator/_progress-indicator.scss +++ b/packages/components/src/components/progress-indicator/_progress-indicator.scss @@ -90,7 +90,7 @@ //OVERFLOW STYLING .#{$prefix}--progress-label-overflow:hover ~ .#{$prefix}--tooltip, .#{$prefix}--progress-label-overflow:focus ~ .#{$prefix}--tooltip { - visibility: visible; + visibility: inherit; } .#{$prefix}--progress-step .#{$prefix}--tooltip .#{$prefix}--tooltip__caret { diff --git a/packages/components/src/components/search/_search.scss b/packages/components/src/components/search/_search.scss index 2a95ec8d5431..35adc82664c3 100644 --- a/packages/components/src/components/search/_search.scss +++ b/packages/components/src/components/search/_search.scss @@ -160,7 +160,7 @@ outline $duration--fast-02 motion(standard, productive), border $duration--fast-02 motion(standard, productive); cursor: pointer; - visibility: visible; + visibility: inherit; opacity: 1; height: rem(40px); width: rem(40px); diff --git a/packages/components/src/components/tag/_tag.scss b/packages/components/src/components/tag/_tag.scss index 218e6928f20d..0c44bdd2aa61 100644 --- a/packages/components/src/components/tag/_tag.scss +++ b/packages/components/src/components/tag/_tag.scss @@ -98,8 +98,6 @@ // tags used for filtering .#{$prefix}--tag--filter { @include tag-theme($inverse-02, $inverse-01); - - cursor: pointer; padding-right: rem(2px); &:focus, @@ -108,28 +106,34 @@ } } - .#{$prefix}--tag--filter > svg { + .#{$prefix}--tag__close-icon { flex-shrink: 0; width: rem(20px); height: rem(20px); margin: 0 0 0 rem(4px); padding: rem(2px); border: 0; - fill: $inverse-01; background-color: transparent; border-radius: 50%; + cursor: pointer; &:hover { background-color: $inverse-hover-ui; } } - .#{$prefix}--tag--filter:focus > svg { + .#{$prefix}--tag__close-icon svg { + fill: $inverse-01; + } + + .#{$prefix}--tag__close-icon:focus { + outline: none; box-shadow: inset 0 0 0 2px $inverse-focus-ui; border-radius: 50%; } - .#{$prefix}--tag--filter.#{$prefix}--tag--disabled svg:hover { + .#{$prefix}--tag--filter.#{$prefix}--tag--disabled + .#{$prefix}--tag__close-icon:hover { background-color: transparent; } diff --git a/packages/components/src/components/tag/tag.hbs b/packages/components/src/components/tag/tag.hbs index 7b413dc22b00..75336ce92c62 100644 --- a/packages/components/src/components/tag/tag.hbs +++ b/packages/components/src/components/tag/tag.hbs @@ -15,9 +15,11 @@
{{#if filter}} - + +
{{/if}} diff --git a/packages/components/src/components/tile/_tile.scss b/packages/components/src/components/tile/_tile.scss index 116e5ddc134c..d5ab4b0ccdb9 100644 --- a/packages/components/src/components/tile/_tile.scss +++ b/packages/components/src/components/tile/_tile.scss @@ -62,6 +62,13 @@ } } + .#{$prefix}--tile--clickable { + @include reset; + @include type-style('body-short-01'); + color: $text-01; + text-decoration: none; + } + .#{$prefix}--tile--selectable { padding-right: $carbon--spacing-09; } @@ -137,7 +144,7 @@ } .#{$prefix}--tile-content__below-the-fold { - visibility: visible; + visibility: inherit; opacity: 1; transition: opacity $duration--fast-02 motion(standard, productive), visibility $duration--fast-02 motion(standard, productive); diff --git a/packages/components/src/components/ui-shell/_header.scss b/packages/components/src/components/ui-shell/_header.scss index 319d37704e52..f1974afaec06 100644 --- a/packages/components/src/components/ui-shell/_header.scss +++ b/packages/components/src/components/ui-shell/_header.scss @@ -310,7 +310,7 @@ overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; - visibility: visible; + visibility: inherit; white-space: nowrap; } diff --git a/packages/components/src/components/ui-shell/_side-nav.scss b/packages/components/src/components/ui-shell/_side-nav.scss index c3879da74ca4..eba704e2604d 100644 --- a/packages/components/src/components/ui-shell/_side-nav.scss +++ b/packages/components/src/components/ui-shell/_side-nav.scss @@ -52,7 +52,7 @@ .#{$prefix}--side-nav--fixed &, .#{$prefix}--side-nav--expanded & { @if $visibility == true { - visibility: visible; + visibility: inherit; } @if $opacity == true { opacity: 1; @@ -110,7 +110,7 @@ width: 0; } - .#{$prefix}--side-nav:not(.#{$prefix}--side-nav--fixed):hover, + .#{$prefix}--side-nav.bx--side-nav--rail:not(.#{$prefix}--side-nav--fixed):hover, .#{$prefix}--side-nav--expanded { width: mini-units(32); } diff --git a/packages/components/src/globals/grid/__tests__/__snapshots__/grid-test.js.snap b/packages/components/src/globals/grid/__tests__/__snapshots__/grid-test.js.snap index 1b9e5fa50ea5..44bd4f07c343 100644 --- a/packages/components/src/globals/grid/__tests__/__snapshots__/grid-test.js.snap +++ b/packages/components/src/globals/grid/__tests__/__snapshots__/grid-test.js.snap @@ -1062,32 +1062,46 @@ em { padding-right: 1rem; } .bx--aspect-ratio { - height: 0; position: relative; } -.bx--aspect-ratio--object { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 100; } +.bx--aspect-ratio::before { + content: ''; + width: 1px; + margin-left: -1px; + float: left; + height: 0; } + +.bx--aspect-ratio::after { + content: ''; + display: table; + clear: both; } + +.bx--aspect-ratio--16x9::before { + padding-top: 56.25%; } -.bx--aspect-ratio--16x9 { - padding-bottom: 56.25%; } +.bx--aspect-ratio--9x16::before { + padding-top: 177.77778%; } -.bx--aspect-ratio--2x1 { - padding-bottom: 50%; } +.bx--aspect-ratio--2x1::before { + padding-top: 50%; } -.bx--aspect-ratio--4x3 { - padding-bottom: 75%; } +.bx--aspect-ratio--1x2::before { + padding-top: 200%; } -.bx--aspect-ratio--1x1 { - padding-bottom: 100%; } +.bx--aspect-ratio--4x3::before { + padding-top: 75%; } -.bx--aspect-ratio--1x2 { - padding-bottom: 200%; } +.bx--aspect-ratio--3x4::before { + padding-top: 133.33333%; } + +.bx--aspect-ratio--1x1::before { + padding-top: 100%; } + +.bx--aspect-ratio--object { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; } " `; diff --git a/packages/components/src/globals/scss/_css--helpers.scss b/packages/components/src/globals/scss/_css--helpers.scss index 72a463909137..2b4cd3caa81b 100644 --- a/packages/components/src/globals/scss/_css--helpers.scss +++ b/packages/components/src/globals/scss/_css--helpers.scss @@ -24,7 +24,7 @@ overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; - visibility: visible; + visibility: inherit; white-space: nowrap; } diff --git a/packages/components/src/globals/scss/_helper-mixins.scss b/packages/components/src/globals/scss/_helper-mixins.scss index 584fef7702fe..2ae46289dd4c 100644 --- a/packages/components/src/globals/scss/_helper-mixins.scss +++ b/packages/components/src/globals/scss/_helper-mixins.scss @@ -118,7 +118,7 @@ overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; - visibility: visible; + visibility: inherit; white-space: nowrap; } diff --git a/packages/components/src/globals/scss/_keyframes.scss b/packages/components/src/globals/scss/_keyframes.scss index 0f72e4703810..4cf7b4eaa175 100644 --- a/packages/components/src/globals/scss/_keyframes.scss +++ b/packages/components/src/globals/scss/_keyframes.scss @@ -6,7 +6,7 @@ // @mixin content-visible { - visibility: visible; + visibility: inherit; opacity: 1; } diff --git a/packages/elements/docs/sass.md b/packages/elements/docs/sass.md index 11405b37c06a..9548b560eed3 100644 --- a/packages/elements/docs/sass.md +++ b/packages/elements/docs/sass.md @@ -1340,7 +1340,15 @@ in code Source code ```scss -$carbon--aspect-ratios: ((16, 9), (2, 1), (4, 3), (1, 1), (1, 2)); +$carbon--aspect-ratios: ( + (16, 9), + (9, 16), + (2, 1), + (1, 2), + (4, 3), + (3, 4), + (1, 1) +); ```
@@ -1350,36 +1358,53 @@ $carbon--aspect-ratios: ((16, 9), (2, 1), (4, 3), (1, 1), (1, 2)); ### ❌carbon--aspect-ratio [mixin] -Output the CSS classes for generating aspect ratio classes +Generates the CSS classname utilities for the aspect ratios + +CSS Tricks article on aspect ratios and all the different ways it can be done. +https://css-tricks.com/aspect-ratio-boxes/#article-header-id-6 + +That article references an earlier article on the topic. +https://keithjgrant.com/posts/2017/03/aspect-ratios/
Source code ```scss -@mixin carbon--aspect-ratio($aspect-ratios: $carbon--aspect-ratios) { +@mixin carbon--aspect-ratio($width, $height) { .#{$prefix}--aspect-ratio { - height: 0; position: relative; } + .#{$prefix}--aspect-ratio::before { + content: ''; + width: 1px; + margin-left: -1px; + float: left; + height: 0; + } + + .#{$prefix}--aspect-ratio::after { + content: ''; + display: table; + clear: both; + } + + @each $aspect-ratio in $aspect-ratios { + $width: nth($aspect-ratio, 1); + $height: nth($aspect-ratio, 2); + + .#{$prefix}--aspect-ratio--#{$width}x#{$height}::before { + padding-top: percentage($height / $width); + } + } + + // leaving here for legacy support .#{$prefix}--aspect-ratio--object { position: absolute; top: 0; - right: 0; - bottom: 0; left: 0; width: 100%; height: 100%; - z-index: 100; - } - - @each $ratio in $aspect-ratios { - $width: nth($ratio, 1); - $height: nth($ratio, 2); - - .#{$prefix}--aspect-ratio--#{$width}x#{$height} { - padding-bottom: percentage($height / $width); - } } } ``` @@ -1388,9 +1413,10 @@ Output the CSS classes for generating aspect ratio classes - **Parameters**: -| Name | Description | Type | Default value | -| ---------------- | ----------------------------------- | ------ | ------------------------ | -| `$aspect-ratios` | A list of aspect ratios to generate | `List` | `$carbon--aspect-ratios` | +| Name | Description | Type | Default value | +| --------- | --------------------------- | -------- | ------------- | +| `$width` | width from an aspect ratio | `Number` | — | +| `$height` | height from an aspect ratio | `Number` | — | - **Group**: [@carbon/grid](#carbongrid) - **Requires**: diff --git a/packages/grid/docs/sass.md b/packages/grid/docs/sass.md index e9ece5b6ab96..76c86cbc5e8f 100644 --- a/packages/grid/docs/sass.md +++ b/packages/grid/docs/sass.md @@ -374,7 +374,15 @@ in code Source code ```scss -$carbon--aspect-ratios: ((16, 9), (2, 1), (4, 3), (1, 1), (1, 2)); +$carbon--aspect-ratios: ( + (16, 9), + (9, 16), + (2, 1), + (1, 2), + (4, 3), + (3, 4), + (1, 1) +); ```
@@ -384,36 +392,53 @@ $carbon--aspect-ratios: ((16, 9), (2, 1), (4, 3), (1, 1), (1, 2)); ### ❌carbon--aspect-ratio [mixin] -Output the CSS classes for generating aspect ratio classes +Generates the CSS classname utilities for the aspect ratios + +CSS Tricks article on aspect ratios and all the different ways it can be done. +https://css-tricks.com/aspect-ratio-boxes/#article-header-id-6 + +That article references an earlier article on the topic. +https://keithjgrant.com/posts/2017/03/aspect-ratios/
Source code ```scss -@mixin carbon--aspect-ratio($aspect-ratios: $carbon--aspect-ratios) { +@mixin carbon--aspect-ratio($width, $height) { .#{$prefix}--aspect-ratio { - height: 0; position: relative; } + .#{$prefix}--aspect-ratio::before { + content: ''; + width: 1px; + margin-left: -1px; + float: left; + height: 0; + } + + .#{$prefix}--aspect-ratio::after { + content: ''; + display: table; + clear: both; + } + + @each $aspect-ratio in $aspect-ratios { + $width: nth($aspect-ratio, 1); + $height: nth($aspect-ratio, 2); + + .#{$prefix}--aspect-ratio--#{$width}x#{$height}::before { + padding-top: percentage($height / $width); + } + } + + // leaving here for legacy support .#{$prefix}--aspect-ratio--object { position: absolute; top: 0; - right: 0; - bottom: 0; left: 0; width: 100%; height: 100%; - z-index: 100; - } - - @each $ratio in $aspect-ratios { - $width: nth($ratio, 1); - $height: nth($ratio, 2); - - .#{$prefix}--aspect-ratio--#{$width}x#{$height} { - padding-bottom: percentage($height / $width); - } } } ``` @@ -422,9 +447,10 @@ Output the CSS classes for generating aspect ratio classes - **Parameters**: -| Name | Description | Type | Default value | -| ---------------- | ----------------------------------- | ------ | ------------------------ | -| `$aspect-ratios` | A list of aspect ratios to generate | `List` | `$carbon--aspect-ratios` | +| Name | Description | Type | Default value | +| --------- | --------------------------- | -------- | ------------- | +| `$width` | width from an aspect ratio | `Number` | — | +| `$height` | height from an aspect ratio | `Number` | — | - **Group**: [@carbon/grid](#carbongrid) - **Requires**: diff --git a/packages/grid/examples/preview/src/components/App.js b/packages/grid/examples/preview/src/components/App.js index 9ea5ee88dfe4..eca3c4ef6f49 100644 --- a/packages/grid/examples/preview/src/components/App.js +++ b/packages/grid/examples/preview/src/components/App.js @@ -606,40 +606,32 @@ const sections = [
-
-
- Full width image -
+
+ Full width image
1/4
-
-
- Full width image -
+
+ Full width image
1/4
-
-
- Full width image -
+
+ Full width image
1/4
-
-
- Full width image -
+
+ Full width image
1/4
@@ -655,15 +647,15 @@ const sections = [ id: 'aspect-ratio', name: 'Aspect ratio', description: - 'When designing fluid layouts, sometimes it is helpful for an asset or card to be a specific aspect ratio. We offer several classes for specifying aspect ratio for given content.', + `When designing fluid layouts, sometimes it is helpful for an asset or card to be a specific aspect ratio. We offer several classes for specifying aspect ratio for given content.`, examples: [ { - name: '16x9', + name: '2:1', content: () => (
-
+
1
@@ -672,7 +664,7 @@ const sections = [
-
+
1
@@ -681,7 +673,7 @@ const sections = [
-
+
1
@@ -690,7 +682,7 @@ const sections = [
-
+
1
@@ -703,44 +695,28 @@ const sections = [ ), }, { - name: '2x1', + name: '16:9', content: () => (
-
-
-
-
1
-
-
+
+
1
-
-
-
-
1
-
-
+
+
1
-
-
-
-
1
-
-
+
+
1
-
-
-
-
1
-
-
+
+
1
@@ -748,44 +724,28 @@ const sections = [ ), }, { - name: '4x3', + name: '4:3', content: () => (
-
-
-
-
1
-
-
+
+
1
-
-
-
-
1
-
-
+
+
1
-
-
-
-
1
-
-
+
+
1
-
-
-
-
1
-
-
+
+
1
@@ -793,43 +753,151 @@ const sections = [ ), }, { - name: '1x1', + name: '1:1', content: () => (
-
-
-
-
1
-
-
+
+
1
-
-
-
-
1
-
-
+
+
1
-
-
-
-
1
-
-
+
+
1
-
-
-
-
1
-
+
+
1
+
+
+
+
+ ), + }, + { + name: '3:4', + content: () => ( +
+
+
+
+
1
+
+
+
+
+
1
+
+
+
+
+
1
+
+
+
+
+
1
+
+
+
+
+ ), + }, + { + name: '9:16', + content: () => ( +
+
+
+
+
1
+
+
+
+
+
1
+
+
+
+
+
1
+
+
+
+
+
1
+
+
+
+
+ ), + }, + { + name: '1:2', + content: () => ( +
+
+
+
+
1
+
+
+
+
+
1
+
+
+
+
+
1
+
+
+
+
+
1
+
+
+
+
+ ), + }, + { + name: '1:1 Aspect Ratio Overflow', + content: () => ( +
+
+
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis aliquam tempus rutrum. Morbi consequat, mi quis pharetra eleifend, ipsum arcu porta arcu, malesuada egestas sapien enim ac nisi. Maecenas ipsum nibh, viverra viverra feugiat quis, convallis pulvinar nisi. Fusce eget erat in nulla vestibulum posuere id eu augue. Aliquam eget nulla volutpat, suscipit leo quis, vulputate risus. Cras orci arcu, aliquet ac eleifend placerat, interdum id augue. Morbi mollis urna sed euismod condimentum. Nulla ut mauris ex. Pellentesque id volutpat arcu. In ligula est, varius at facilisis eu, blandit ornare turpis. Nullam consequat venenatis magna sed sodales. Nam ornare nibh augue, non suscipit quam feugiat ut. Vivamus mollis libero mauris, vel venenatis justo feugiat sed. Ut consectetur nunc condimentum egestas vestibulum. Integer metus metus, elementum at magna vel, cursus commodo urna. +
+
+
+
+
+
+ 1 +
+
+
+
+
+
+ 1 +
+
+
+
+
+
+ 1
diff --git a/packages/grid/examples/preview/styles.scss b/packages/grid/examples/preview/styles.scss index 7906a7699b68..955ac0137691 100644 --- a/packages/grid/examples/preview/styles.scss +++ b/packages/grid/examples/preview/styles.scss @@ -41,13 +41,19 @@ article { .example .outside { min-height: 80px; - height: 100%; } .example .inside { background-color: #edf4ff; min-height: 80px; - height: 100%; +} + +.example [class*='--aspect-ratio--'] { + .inside, + .outside, + &.outside { + height: 100%; + } } .example [class*='col'] { diff --git a/packages/grid/scss/_mixins.scss b/packages/grid/scss/_mixins.scss index fc2d9098db3b..0b73e3b90982 100644 --- a/packages/grid/scss/_mixins.scss +++ b/packages/grid/scss/_mixins.scss @@ -209,36 +209,63 @@ /// @type List /// @access public /// @group @carbon/grid -$carbon--aspect-ratios: ((16, 9), (2, 1), (4, 3), (1, 1), (1, 2)); - -/// Output the CSS classes for generating aspect ratio classes -/// @param {List} $aspect-ratios [$carbon--aspect-ratios] - A list of aspect ratios to generate +$carbon--aspect-ratios: ( + (16, 9), + (9, 16), + (2, 1), + (1, 2), + (4, 3), + (3, 4), + (1, 1) +); + +/// Generates the CSS classname utilities for the aspect ratios +/// +/// CSS Tricks article on aspect ratios and all the different ways it can be done. +/// https://css-tricks.com/aspect-ratio-boxes/#article-header-id-6 +/// +/// That article references an earlier article on the topic. +/// https://keithjgrant.com/posts/2017/03/aspect-ratios/ +/// +/// @param {Number} $width width from an aspect ratio +/// @param {Number} $height height from an aspect ratio /// @access private /// @group @carbon/grid @mixin carbon--aspect-ratio($aspect-ratios: $carbon--aspect-ratios) { .#{$prefix}--aspect-ratio { - height: 0; position: relative; } + .#{$prefix}--aspect-ratio::before { + content: ''; + width: 1px; + margin-left: -1px; + float: left; + height: 0; + } + + .#{$prefix}--aspect-ratio::after { + content: ''; + display: table; + clear: both; + } + + @each $aspect-ratio in $aspect-ratios { + $width: nth($aspect-ratio, 1); + $height: nth($aspect-ratio, 2); + + .#{$prefix}--aspect-ratio--#{$width}x#{$height}::before { + padding-top: percentage($height / $width); + } + } + + // leaving here for legacy support .#{$prefix}--aspect-ratio--object { position: absolute; top: 0; - right: 0; - bottom: 0; left: 0; width: 100%; height: 100%; - z-index: 100; - } - - @each $ratio in $aspect-ratios { - $width: nth($ratio, 1); - $height: nth($ratio, 2); - - .#{$prefix}--aspect-ratio--#{$width}x#{$height} { - padding-bottom: percentage($height / $width); - } } } diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index 37a8d2b200cf..21b7a4fc60b6 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -1077,6 +1077,15 @@ Map { "children": Object { "type": "node", }, + "size": Object { + "args": Array [ + Array [ + "small", + "normal", + ], + ], + "type": "oneOf", + }, }, }, "TableToolbarAction": Object { @@ -1196,6 +1205,7 @@ Map { "defaultProps": Object { "filterRows": [Function], "locale": "en", + "size": "normal", "sortRow": [Function], "translateWithId": [Function], }, @@ -1259,6 +1269,17 @@ Map { "isRequired": true, "type": "arrayOf", }, + "size": Object { + "args": Array [ + Array [ + "compact", + "short", + "normal", + "tall", + ], + ], + "type": "oneOf", + }, "sortRow": Object { "type": "func", }, @@ -1641,6 +1662,15 @@ Map { "children": Object { "type": "node", }, + "size": Object { + "args": Array [ + Array [ + "small", + "normal", + ], + ], + "type": "oneOf", + }, }, }, "TableToolbarAction" => Object { @@ -3538,7 +3568,6 @@ Map { "type": "bool", }, "iconDescription": Object { - "isRequired": true, "type": "string", }, "kind": Object { @@ -3567,7 +3596,6 @@ Map { "type": "string", }, "statusIconDescription": Object { - "isRequired": true, "type": "string", }, "subtitle": Object { @@ -3604,7 +3632,6 @@ Map { "type": "bool", }, "iconDescription": Object { - "isRequired": true, "type": "string", }, "kind": Object { @@ -3633,7 +3660,6 @@ Map { "type": "string", }, "statusIconDescription": Object { - "isRequired": true, "type": "string", }, "subtitle": Object { @@ -4724,6 +4750,9 @@ Map { "filter": Object { "type": "bool", }, + "onClose": Object { + "type": "func", + }, "title": Object { "type": "string", }, diff --git a/packages/react/src/components/DataTable/DataTable.js b/packages/react/src/components/DataTable/DataTable.js index 12223ba7afd5..7bb9ecace5fc 100644 --- a/packages/react/src/components/DataTable/DataTable.js +++ b/packages/react/src/components/DataTable/DataTable.js @@ -105,6 +105,11 @@ export default class DataTable extends React.Component { */ translateWithId: PropTypes.func, + /** + * `normal` Change the row height of table + */ + size: PropTypes.oneOf(['compact', 'short', 'normal', 'tall']), + /** * Specify whether the control should be a radio button or inline checkbox */ @@ -126,6 +131,7 @@ export default class DataTable extends React.Component { sortRow: defaultSortRow, filterRows: defaultFilterRows, locale: 'en', + size: 'normal', translateWithId, }; @@ -330,6 +336,14 @@ export default class DataTable extends React.Component { }; }; + getToolbarProps = (props = {}) => { + const { size } = this.props; + return { + ...props, + size: size === 'compact' || size === 'short' ? 'small' : 'normal', + }; + }; + getBatchActionProps = (props = {}) => { const { shouldShowBatchActions } = this.state; const totalSelected = this.getSelectedRows().length; @@ -614,6 +628,7 @@ export default class DataTable extends React.Component { getExpandHeaderProps: this.getExpandHeaderProps, getRowProps: this.getRowProps, getSelectionProps: this.getSelectionProps, + getToolbarProps: this.getToolbarProps, getBatchActionProps: this.getBatchActionProps, getTableProps: this.getTableProps, getTableContainerProps: this.getTableContainerProps, diff --git a/packages/react/src/components/DataTable/TableToolbar.js b/packages/react/src/components/DataTable/TableToolbar.js index 947e5757007c..6a2d734ff6ba 100644 --- a/packages/react/src/components/DataTable/TableToolbar.js +++ b/packages/react/src/components/DataTable/TableToolbar.js @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +import cx from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; import { settings } from 'carbon-components'; @@ -12,11 +13,17 @@ import { AriaLabelPropType } from '../../prop-types/AriaPropTypes'; const { prefix } = settings; -const TableToolbar = ({ children, ...rest }) => ( -
- {children} -
-); +const TableToolbar = ({ children, size, ...rest }) => { + const className = cx({ + [`${prefix}--table-toolbar`]: true, + [`${prefix}--table-toolbar--${size}`]: size, + }); + return ( +
+ {children} +
+ ); +}; TableToolbar.propTypes = { /** @@ -24,6 +31,11 @@ TableToolbar.propTypes = { */ children: PropTypes.node, + /** + * `normal` Change the row height of table + */ + size: PropTypes.oneOf(['small', 'normal']), + /** * Required props for the accessibility label of the TableToolbar */ diff --git a/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap b/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap index 235ae31e0f48..95d252a12916 100644 --- a/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap +++ b/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap @@ -31,6 +31,7 @@ exports[`DataTable selection -- radio buttons should not have select-all checkbo "getSelectionProps": [Function], "getTableContainerProps": [Function], "getTableProps": [Function], + "getToolbarProps": [Function], "headers": Array [ Object { "header": "Field A", @@ -94,6 +95,7 @@ exports[`DataTable selection -- radio buttons should not have select-all checkbo } } rows={Array []} + size="normal" sortRow={[Function]} translateWithId={[Function]} > @@ -212,6 +214,7 @@ exports[`DataTable selection -- radio buttons should render 1`] = ` "getSelectionProps": [Function], "getTableContainerProps": [Function], "getTableProps": [Function], + "getToolbarProps": [Function], "headers": Array [ Object { "header": "Field A", @@ -436,6 +439,7 @@ exports[`DataTable selection -- radio buttons should render 1`] = ` }, ] } + size="normal" sortRow={[Function]} translateWithId={[Function]} > @@ -812,6 +816,7 @@ exports[`DataTable selection should have select-all default to un-checked if no "getSelectionProps": [Function], "getTableContainerProps": [Function], "getTableProps": [Function], + "getToolbarProps": [Function], "headers": Array [ Object { "header": "Field A", @@ -883,6 +888,7 @@ exports[`DataTable selection should have select-all default to un-checked if no } } rows={Array []} + size="normal" sortRow={[Function]} translateWithId={[Function]} > @@ -1048,6 +1054,7 @@ exports[`DataTable selection should render 1`] = ` "getSelectionProps": [Function], "getTableContainerProps": [Function], "getTableProps": [Function], + "getToolbarProps": [Function], "headers": Array [ Object { "header": "Field A", @@ -1280,6 +1287,7 @@ exports[`DataTable selection should render 1`] = ` }, ] } + size="normal" sortRow={[Function]} translateWithId={[Function]} > @@ -1653,6 +1661,7 @@ exports[`DataTable should render 1`] = ` "getSelectionProps": [Function], "getTableContainerProps": [Function], "getTableProps": [Function], + "getToolbarProps": [Function], "headers": Array [ Object { "header": "Field A", @@ -1861,6 +1870,7 @@ exports[`DataTable should render 1`] = ` @@ -1939,6 +1949,7 @@ exports[`DataTable should render 1`] = ` }, ] } + size="normal" sortRow={[Function]} translateWithId={[Function]} > @@ -2493,6 +2504,7 @@ exports[`DataTable should render 1`] = `
@@ -2936,6 +2950,7 @@ exports[`DataTable sticky header should render 1`] = ` }, ] } + size="normal" sortRow={[Function]} stickyHeader={true} translateWithId={[Function]} @@ -3492,6 +3507,7 @@ exports[`DataTable sticky header should render 1`] = `
( getHeaderProps, getRowProps, getSelectionProps, + getToolbarProps, getBatchActionProps, onInputChange, selectedRows, @@ -56,7 +57,7 @@ export default props => ( title="DataTable" description="With batch actions" {...getTableContainerProps()}> - + { headers, getHeaderProps, getSelectionProps, + getToolbarProps, getBatchActionProps, getRowProps, onInputChange, @@ -118,7 +119,7 @@ export default props => { title="DataTable" description="Use the toolbar menu to add rows and headers" {...getTableContainerProps()}> - + ( getHeaderProps, getRowProps, getTableProps, + getToolbarProps, onInputChange, getTableContainerProps, }) => ( @@ -43,7 +44,7 @@ export default props => ( title="DataTable" description="With toolbar" {...getTableContainerProps()}> - + diff --git a/packages/react/src/components/Notification/Notification.js b/packages/react/src/components/Notification/Notification.js index 4cbe5008a749..5ae619b1fee6 100644 --- a/packages/react/src/components/Notification/Notification.js +++ b/packages/react/src/components/Notification/Notification.js @@ -358,12 +358,12 @@ ToastNotification.propTypes = { /** * Provide a description for "close" icon that can be read by screen readers */ - iconDescription: PropTypes.string.isRequired, + iconDescription: PropTypes.string, /** * Provide a description for "status" icon that can be read by screen readers */ - statusIconDescription: PropTypes.string.isRequired, + statusIconDescription: PropTypes.string, /** * By default, this value is "toast". You can also provide an alternate type @@ -504,12 +504,12 @@ InlineNotification.propTypes = { /** * Provide a description for "close" icon that can be read by screen readers */ - iconDescription: PropTypes.string.isRequired, + iconDescription: PropTypes.string, /** * Provide a description for "status" icon that can be read by screen readers */ - statusIconDescription: PropTypes.string.isRequired, + statusIconDescription: PropTypes.string, /** * By default, this value is "inline". You can also provide an alternate type diff --git a/packages/react/src/components/Tag/Tag-story.js b/packages/react/src/components/Tag/Tag-story.js index 1b9ddcf8971a..7a3e2c261fb2 100644 --- a/packages/react/src/components/Tag/Tag-story.js +++ b/packages/react/src/components/Tag/Tag-story.js @@ -29,7 +29,11 @@ const props = { title: 'Clear Filter', }), filter() { - return { ...this.regular(), onClick: action('onClick') }; + return { + ...this.regular(), + onClick: action('onClick'), + onClose: action('onClose'), + }; }, }; diff --git a/packages/react/src/components/Tag/Tag.js b/packages/react/src/components/Tag/Tag.js index 2b484c81b6b8..60c54f0daf5f 100644 --- a/packages/react/src/components/Tag/Tag.js +++ b/packages/react/src/components/Tag/Tag.js @@ -10,9 +10,10 @@ import React from 'react'; import classNames from 'classnames'; import { settings } from 'carbon-components'; import { Close16 } from '@carbon/icons-react'; +import setupGetInstanceId from '../../tools/setupGetInstanceId'; const { prefix } = settings; - +const getInstanceId = setupGetInstanceId(); const TYPES = { red: 'Red', magenta: 'Magenta', @@ -29,32 +30,45 @@ const TYPES = { const Tag = ({ children, className, + id, type, filter, title, disabled, + onClose, ...other }) => { + const tagId = id || `tag-${getInstanceId()}`; const tagClass = `${prefix}--tag--${type}`; const tagClasses = classNames(`${prefix}--tag`, tagClass, className, { [`${prefix}--tag--disabled`]: disabled, [`${prefix}--tag--filter`]: filter, }); + const handleClose = event => { + event.stopPropagation(); + onClose(event); + }; return filter ? ( - + + ) : ( {children !== null && children !== undefined ? children : TYPES[type]} @@ -92,6 +106,11 @@ Tag.propTypes = { * Text to show on clear filters */ title: PropTypes.string, + + /** + * Click handler for filter tag close button. + */ + onClose: PropTypes.func, }; export const types = Object.keys(TYPES); diff --git a/packages/react/src/components/Tile/Tile.js b/packages/react/src/components/Tile/Tile.js index 23bca02b54bb..0517a0f4a6ed 100644 --- a/packages/react/src/components/Tile/Tile.js +++ b/packages/react/src/components/Tile/Tile.js @@ -147,7 +147,6 @@ export class ClickableTile extends Component { } = this.props; const classes = classNames( - `${prefix}--link`, `${prefix}--tile`, `${prefix}--tile--clickable`, { diff --git a/packages/react/src/components/UIShell/SideNav.js b/packages/react/src/components/UIShell/SideNav.js index 6c566763e50e..066f2d3ba816 100644 --- a/packages/react/src/components/UIShell/SideNav.js +++ b/packages/react/src/components/UIShell/SideNav.js @@ -99,7 +99,7 @@ const SideNav = React.forwardRef(function SideNav(props, ref) { eventHandlers.onBlur = event => handleToggle(event, false); } - if (addMouseListeners) { + if (addMouseListeners && isRail) { eventHandlers.onMouseEnter = () => handleToggle(true, true); eventHandlers.onMouseLeave = () => handleToggle(false, false); } diff --git a/packages/react/src/components/UIShell/__tests__/SideNav-test.js b/packages/react/src/components/UIShell/__tests__/SideNav-test.js index 9c92bbb94580..4799ae27c89d 100644 --- a/packages/react/src/components/UIShell/__tests__/SideNav-test.js +++ b/packages/react/src/components/UIShell/__tests__/SideNav-test.js @@ -8,6 +8,7 @@ import React from 'react'; import { mount } from 'enzyme'; import SideNav from '../SideNav'; +import SideNavLink from '../SideNavLink'; describe('SideNav', () => { let mockProps, wrapper; @@ -15,7 +16,7 @@ describe('SideNav', () => { beforeEach(() => { mockProps = { 'aria-label': 'Navigation', - children:

Navigation

, + children: Navigation, }; }); @@ -28,12 +29,18 @@ describe('SideNav', () => { expect(wrapper).toMatchSnapshot(); }); - it('by default, all event listeners are added', () => { + it('by default, focus event listeners are added', () => { wrapper = mount(); expect(wrapper.find('nav').props().onFocus).toBeDefined(); expect(wrapper.find('nav').props().onBlur).toBeDefined(); - expect(wrapper.find('nav').props().onMouseEnter).toBeDefined(); - expect(wrapper.find('nav').props().onMouseLeave).toBeDefined(); + }); + + it('by default, mouse event listeners are not added', () => { + wrapper = mount(); + expect(wrapper.find('nav').props().onFocus).toBeDefined(); + expect(wrapper.find('nav').props().onBlur).toBeDefined(); + expect(wrapper.find('nav').props().onMouseEnter).not.toBeDefined(); + expect(wrapper.find('nav').props().onMouseLeave).not.toBeDefined(); }); it('if addFocusListeners is specified as false, no focus event listeners props are added', () => { @@ -41,6 +48,15 @@ describe('SideNav', () => { wrapper.setProps({ addFocusListeners: false }); expect(wrapper.find('nav').props().onFocus).not.toBeDefined(); expect(wrapper.find('nav').props().onBlur).not.toBeDefined(); + expect(wrapper.find('nav').props().onMouseEnter).not.toBeDefined(); + expect(wrapper.find('nav').props().onMouseLeave).not.toBeDefined(); + }); + + it('if addFocusListeners is specified as false in rail SideNav, no event listeners props are added', () => { + wrapper = mount(); + wrapper.setProps({ addFocusListeners: false }); + expect(wrapper.find('nav').props().onFocus).not.toBeDefined(); + expect(wrapper.find('nav').props().onBlur).not.toBeDefined(); expect(wrapper.find('nav').props().onMouseEnter).toBeDefined(); expect(wrapper.find('nav').props().onMouseLeave).toBeDefined(); }); diff --git a/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNav-test.js.snap b/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNav-test.js.snap index 895d20bd1db4..df53d1e1b86d 100644 --- a/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNav-test.js.snap +++ b/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNav-test.js.snap @@ -19,12 +19,39 @@ exports[`SideNav should render 1`] = ` className="bx--side-nav__navigation bx--side-nav bx--side-nav--ux" onBlur={[Function]} onFocus={[Function]} - onMouseEnter={[Function]} - onMouseLeave={[Function]} > -

- Navigation -

+ + +
  • + + + + + Navigation + + + + +
  • +
    +
    `;