@cloudscape-design/components 3.0.245 → 3.0.247
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/annotation-context/annotation/annotation-trigger.d.ts.map +1 -1
- package/annotation-context/annotation/annotation-trigger.js +1 -3
- package/annotation-context/annotation/annotation-trigger.js.map +1 -1
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +30 -30
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/drawer/index.d.ts +3 -21
- package/app-layout/drawer/index.d.ts.map +1 -1
- package/app-layout/drawer/index.js +25 -5
- package/app-layout/drawer/index.js.map +1 -1
- package/app-layout/drawer/interfaces.d.ts +84 -0
- package/app-layout/drawer/interfaces.d.ts.map +1 -0
- package/app-layout/drawer/interfaces.js +2 -0
- package/app-layout/drawer/interfaces.js.map +1 -0
- package/app-layout/drawer/resizable-drawer.d.ts +4 -0
- package/app-layout/drawer/resizable-drawer.d.ts.map +1 -0
- package/app-layout/drawer/resizable-drawer.js +51 -0
- package/app-layout/drawer/resizable-drawer.js.map +1 -0
- package/app-layout/drawer/styles.css.js +10 -5
- package/app-layout/drawer/styles.scoped.css +46 -10
- package/app-layout/drawer/styles.selectors.js +10 -5
- package/app-layout/index.d.ts.map +1 -1
- package/app-layout/index.js +142 -17
- package/app-layout/index.js.map +1 -1
- package/app-layout/mobile-toolbar/index.d.ts +10 -1
- package/app-layout/mobile-toolbar/index.d.ts.map +1 -1
- package/app-layout/mobile-toolbar/index.js +3 -2
- package/app-layout/mobile-toolbar/index.js.map +1 -1
- package/app-layout/mobile-toolbar/styles.css.js +5 -4
- package/app-layout/mobile-toolbar/styles.scoped.css +11 -7
- package/app-layout/mobile-toolbar/styles.selectors.js +5 -4
- package/app-layout/notifications/styles.css.js +3 -3
- package/app-layout/notifications/styles.scoped.css +7 -7
- package/app-layout/notifications/styles.selectors.js +3 -3
- package/app-layout/test-classes/styles.css.js +18 -13
- package/app-layout/test-classes/styles.scoped.css +33 -13
- package/app-layout/test-classes/styles.selectors.js +18 -13
- package/app-layout/toggles/index.d.ts.map +1 -1
- package/app-layout/toggles/index.js +2 -2
- package/app-layout/toggles/index.js.map +1 -1
- package/app-layout/toggles/interfaces.d.ts +3 -1
- package/app-layout/toggles/interfaces.d.ts.map +1 -1
- package/app-layout/toggles/interfaces.js.map +1 -1
- package/app-layout/utils/use-drawer-focus-control.d.ts +21 -0
- package/app-layout/utils/use-drawer-focus-control.d.ts.map +1 -0
- package/app-layout/utils/use-drawer-focus-control.js +65 -0
- package/app-layout/utils/use-drawer-focus-control.js.map +1 -0
- package/app-layout/visual-refresh/app-bar.d.ts.map +1 -1
- package/app-layout/visual-refresh/app-bar.js +8 -6
- package/app-layout/visual-refresh/app-bar.js.map +1 -1
- package/app-layout/visual-refresh/context.d.ts +13 -5
- package/app-layout/visual-refresh/context.d.ts.map +1 -1
- package/app-layout/visual-refresh/context.js +104 -49
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/drawers.d.ts +47 -0
- package/app-layout/visual-refresh/drawers.d.ts.map +1 -0
- package/app-layout/visual-refresh/drawers.js +127 -0
- package/app-layout/visual-refresh/drawers.js.map +1 -0
- package/app-layout/visual-refresh/header.js +2 -2
- package/app-layout/visual-refresh/header.js.map +1 -1
- package/app-layout/visual-refresh/index.d.ts.map +1 -1
- package/app-layout/visual-refresh/index.js +3 -1
- package/app-layout/visual-refresh/index.js.map +1 -1
- package/app-layout/visual-refresh/layout.d.ts.map +1 -1
- package/app-layout/visual-refresh/layout.js +5 -42
- package/app-layout/visual-refresh/layout.js.map +1 -1
- package/app-layout/visual-refresh/main.d.ts.map +1 -1
- package/app-layout/visual-refresh/main.js +2 -3
- package/app-layout/visual-refresh/main.js.map +1 -1
- package/app-layout/visual-refresh/navigation.js +2 -2
- package/app-layout/visual-refresh/navigation.js.map +1 -1
- package/app-layout/visual-refresh/notifications.d.ts.map +1 -1
- package/app-layout/visual-refresh/notifications.js +2 -2
- package/app-layout/visual-refresh/notifications.js.map +1 -1
- package/app-layout/visual-refresh/split-panel.js +2 -2
- package/app-layout/visual-refresh/split-panel.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +71 -61
- package/app-layout/visual-refresh/styles.scoped.css +437 -229
- package/app-layout/visual-refresh/styles.selectors.js +71 -61
- package/app-layout/visual-refresh/tools.d.ts.map +1 -1
- package/app-layout/visual-refresh/tools.js +7 -3
- package/app-layout/visual-refresh/tools.js.map +1 -1
- package/app-layout/visual-refresh/trigger-button.d.ts +4 -3
- package/app-layout/visual-refresh/trigger-button.d.ts.map +1 -1
- package/app-layout/visual-refresh/trigger-button.js +5 -6
- package/app-layout/visual-refresh/trigger-button.js.map +1 -1
- package/area-chart/internal.js +1 -1
- package/area-chart/internal.js.map +1 -1
- package/breadcrumb-group/item/item.d.ts.map +1 -1
- package/breadcrumb-group/item/item.js +2 -5
- package/breadcrumb-group/item/item.js.map +1 -1
- package/breadcrumb-group/item/styles.css.js +9 -9
- package/breadcrumb-group/item/styles.scoped.css +17 -17
- package/breadcrumb-group/item/styles.selectors.js +9 -9
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +2 -3
- package/button/internal.js.map +1 -1
- package/button/styles.css.js +19 -18
- package/button/styles.scoped.css +136 -136
- package/button/styles.selectors.js +19 -18
- package/calendar/grid/index.d.ts.map +1 -1
- package/calendar/grid/index.js +2 -4
- package/calendar/grid/index.js.map +1 -1
- package/calendar/styles.css.js +18 -18
- package/calendar/styles.scoped.css +38 -38
- package/calendar/styles.selectors.js +18 -18
- package/code-editor/styles.css.js +32 -32
- package/code-editor/styles.scoped.css +109 -109
- package/code-editor/styles.selectors.js +32 -32
- package/code-editor/tab-button.d.ts.map +1 -1
- package/code-editor/tab-button.js +2 -4
- package/code-editor/tab-button.js.map +1 -1
- package/date-picker/index.d.ts.map +1 -1
- package/date-picker/index.js +1 -3
- package/date-picker/index.js.map +1 -1
- package/date-picker/styles.css.js +7 -7
- package/date-picker/styles.scoped.css +9 -9
- package/date-picker/styles.selectors.js +7 -7
- package/date-range-picker/calendar/grids/grid.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/grid.js +1 -3
- package/date-range-picker/calendar/grids/grid.js.map +1 -1
- package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/index.js +1 -3
- package/date-range-picker/calendar/grids/index.js.map +1 -1
- package/date-range-picker/calendar/grids/styles.css.js +25 -25
- package/date-range-picker/calendar/grids/styles.scoped.css +42 -42
- package/date-range-picker/calendar/grids/styles.selectors.js +25 -25
- package/date-range-picker/dropdown.d.ts.map +1 -1
- package/date-range-picker/dropdown.js +1 -3
- package/date-range-picker/dropdown.js.map +1 -1
- package/date-range-picker/styles.css.js +38 -38
- package/date-range-picker/styles.scoped.css +45 -45
- package/date-range-picker/styles.selectors.js +38 -38
- package/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.js +3 -7
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/styles.css.js +23 -23
- package/expandable-section/styles.scoped.css +44 -44
- package/expandable-section/styles.selectors.js +23 -23
- package/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/collapsible-flashbar.js +1 -3
- package/flashbar/collapsible-flashbar.js.map +1 -1
- package/flashbar/flash.d.ts.map +1 -1
- package/flashbar/flash.js +1 -3
- package/flashbar/flash.js.map +1 -1
- package/flashbar/styles.css.js +45 -45
- package/flashbar/styles.scoped.css +169 -169
- package/flashbar/styles.selectors.js +45 -45
- package/internal/base-component/styles.scoped.css +24 -0
- package/internal/components/abstract-switch/index.d.ts.map +1 -1
- package/internal/components/abstract-switch/index.js +8 -4
- package/internal/components/abstract-switch/index.js.map +1 -1
- package/internal/components/abstract-switch/styles.css.js +13 -13
- package/internal/components/abstract-switch/styles.scoped.css +19 -19
- package/internal/components/abstract-switch/styles.selectors.js +13 -13
- package/internal/components/button-trigger/index.d.ts.map +1 -1
- package/internal/components/button-trigger/index.js +1 -3
- package/internal/components/button-trigger/index.js.map +1 -1
- package/internal/components/button-trigger/styles.css.js +9 -9
- package/internal/components/button-trigger/styles.scoped.css +23 -23
- package/internal/components/button-trigger/styles.selectors.js +9 -9
- package/internal/components/chart-legend/index.d.ts.map +1 -1
- package/internal/components/chart-legend/index.js +2 -4
- package/internal/components/chart-legend/index.js.map +1 -1
- package/internal/components/chart-legend/styles.css.js +6 -6
- package/internal/components/chart-legend/styles.scoped.css +15 -15
- package/internal/components/chart-legend/styles.selectors.js +6 -6
- package/internal/components/chart-plot/focus-outline.d.ts.map +1 -1
- package/internal/components/chart-plot/focus-outline.js +25 -3
- package/internal/components/chart-plot/focus-outline.js.map +1 -1
- package/internal/components/filtering-token/index.d.ts +2 -1
- package/internal/components/filtering-token/index.d.ts.map +1 -1
- package/internal/components/filtering-token/index.js +3 -5
- package/internal/components/filtering-token/index.js.map +1 -1
- package/internal/components/filtering-token/styles.css.js +7 -7
- package/internal/components/filtering-token/styles.scoped.css +13 -13
- package/internal/components/filtering-token/styles.selectors.js +7 -7
- package/internal/components/menu-dropdown/index.d.ts.map +1 -1
- package/internal/components/menu-dropdown/index.js +2 -4
- package/internal/components/menu-dropdown/index.js.map +1 -1
- package/internal/components/menu-dropdown/styles.css.js +7 -7
- package/internal/components/menu-dropdown/styles.scoped.css +13 -13
- package/internal/components/menu-dropdown/styles.selectors.js +7 -7
- package/internal/components/token-list/index.d.ts +1 -1
- package/internal/components/token-list/index.d.ts.map +1 -1
- package/internal/components/token-list/index.js +3 -3
- package/internal/components/token-list/index.js.map +1 -1
- package/internal/components/token-list/interfaces.d.ts +0 -1
- package/internal/components/token-list/interfaces.d.ts.map +1 -1
- package/internal/components/token-list/interfaces.js.map +1 -1
- package/internal/components/token-list/styles.css.js +9 -9
- package/internal/components/token-list/styles.scoped.css +20 -20
- package/internal/components/token-list/styles.selectors.js +9 -9
- package/internal/components/token-list/token-focus-controller.js +1 -1
- package/internal/components/token-list/token-focus-controller.js.map +1 -1
- package/internal/components/token-list/token-limit-toggle.d.ts.map +1 -1
- package/internal/components/token-list/token-limit-toggle.js +1 -3
- package/internal/components/token-list/token-limit-toggle.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/internal/generated/custom-css-properties/index.js +31 -30
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- package/internal/generated/styles/tokens.d.ts +2 -0
- package/internal/generated/styles/tokens.js +2 -0
- package/internal/generated/theming/index.cjs +140 -0
- package/internal/generated/theming/index.js +140 -0
- package/internal/hooks/focus-visible/index.d.ts +2 -5
- package/internal/hooks/focus-visible/index.d.ts.map +1 -1
- package/internal/hooks/focus-visible/index.js +42 -22
- package/internal/hooks/focus-visible/index.js.map +1 -1
- package/internal/hooks/use-base-component/index.d.ts.map +1 -1
- package/internal/hooks/use-base-component/index.js +2 -0
- package/internal/hooks/use-base-component/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/link/internal.d.ts.map +1 -1
- package/link/internal.js +1 -3
- package/link/internal.js.map +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +71 -71
- package/link/styles.selectors.js +20 -20
- package/mixed-line-bar-chart/internal.js +1 -1
- package/mixed-line-bar-chart/internal.js.map +1 -1
- package/package.json +1 -1
- package/pagination/internal.d.ts.map +1 -1
- package/pagination/internal.js +1 -3
- package/pagination/internal.js.map +1 -1
- package/pagination/styles.css.js +9 -9
- package/pagination/styles.scoped.css +23 -23
- package/pagination/styles.selectors.js +9 -9
- package/pie-chart/index.js +1 -1
- package/pie-chart/index.js.map +1 -1
- package/popover/internal.d.ts.map +1 -1
- package/popover/internal.js +1 -3
- package/popover/internal.js.map +1 -1
- package/popover/styles.css.js +50 -50
- package/popover/styles.scoped.css +63 -63
- package/popover/styles.selectors.js +50 -50
- package/property-filter/index.d.ts.map +1 -1
- package/property-filter/index.js +2 -2
- package/property-filter/index.js.map +1 -1
- package/property-filter/token.d.ts.map +1 -1
- package/property-filter/token.js +1 -1
- package/property-filter/token.js.map +1 -1
- package/segmented-control/segment.d.ts.map +1 -1
- package/segmented-control/segment.js +1 -3
- package/segmented-control/segment.js.map +1 -1
- package/segmented-control/styles.css.js +14 -14
- package/segmented-control/styles.scoped.css +33 -33
- package/segmented-control/styles.selectors.js +14 -14
- package/side-navigation/internal.d.ts.map +1 -1
- package/side-navigation/internal.js +2 -5
- package/side-navigation/internal.js.map +1 -1
- package/side-navigation/styles.css.js +27 -27
- package/side-navigation/styles.scoped.css +37 -37
- package/side-navigation/styles.selectors.js +27 -27
- package/space-between/internal.js +1 -1
- package/space-between/internal.js.map +1 -1
- package/space-between/styles.css.js +20 -28
- package/space-between/styles.scoped.css +37 -101
- package/space-between/styles.selectors.js +20 -28
- package/split-panel/index.d.ts.map +1 -1
- package/split-panel/index.js +1 -3
- package/split-panel/index.js.map +1 -1
- package/split-panel/styles.css.js +59 -59
- package/split-panel/styles.scoped.css +81 -81
- package/split-panel/styles.selectors.js +59 -59
- package/table/body-cell/index.d.ts.map +1 -1
- package/table/body-cell/index.js +3 -3
- package/table/body-cell/index.js.map +1 -1
- package/table/body-cell/styles.css.js +18 -18
- package/table/body-cell/styles.scoped.css +57 -55
- package/table/body-cell/styles.selectors.js +18 -18
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +11 -9
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/styles.css.js +19 -19
- package/table/header-cell/styles.scoped.css +32 -32
- package/table/header-cell/styles.selectors.js +19 -19
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +1 -3
- package/table/internal.js.map +1 -1
- package/table/resizer/styles.css.js +6 -6
- package/table/resizer/styles.scoped.css +11 -11
- package/table/resizer/styles.selectors.js +6 -6
- package/table/styles.css.js +33 -33
- package/table/styles.scoped.css +41 -41
- package/table/styles.selectors.js +33 -33
- package/tabs/index.d.ts.map +1 -1
- package/tabs/index.js +8 -3
- package/tabs/index.js.map +1 -1
- package/tabs/styles.css.js +21 -21
- package/tabs/styles.scoped.css +38 -38
- package/tabs/styles.selectors.js +21 -21
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js +9 -3
- package/tabs/tab-header-bar.js.map +1 -1
- package/tag-editor/internal.d.ts.map +1 -1
- package/tag-editor/internal.js +2 -4
- package/tag-editor/internal.js.map +1 -1
- package/tag-editor/styles.css.js +3 -3
- package/tag-editor/styles.scoped.css +10 -10
- package/tag-editor/styles.selectors.js +3 -3
- package/token-group/dismiss-button.d.ts.map +1 -1
- package/token-group/dismiss-button.js +1 -3
- package/token-group/dismiss-button.js.map +1 -1
- package/token-group/internal.js +2 -2
- package/token-group/internal.js.map +1 -1
- package/token-group/styles.css.js +5 -5
- package/token-group/styles.scoped.css +12 -12
- package/token-group/styles.selectors.js +5 -5
- package/token-group/token.d.ts +3 -5
- package/token-group/token.d.ts.map +1 -1
- package/token-group/token.js +2 -2
- package/token-group/token.js.map +1 -1
- package/top-navigation/1.0-beta/internal.d.ts.map +1 -1
- package/top-navigation/1.0-beta/internal.js +1 -3
- package/top-navigation/1.0-beta/internal.js.map +1 -1
- package/top-navigation/1.0-beta/styles.css.js +25 -25
- package/top-navigation/1.0-beta/styles.scoped.css +42 -42
- package/top-navigation/1.0-beta/styles.selectors.js +25 -25
- package/top-navigation/internal.d.ts.map +1 -1
- package/top-navigation/internal.js +1 -3
- package/top-navigation/internal.js.map +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.d.ts.map +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.js +3 -7
- package/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
- package/top-navigation/styles.css.js +47 -47
- package/top-navigation/styles.scoped.css +66 -66
- package/top-navigation/styles.selectors.js +47 -47
- package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.js +1 -3
- package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
- package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
- package/tutorial-panel/components/tutorial-list/styles.scoped.css +27 -27
- package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
- package/wizard/styles.css.js +32 -32
- package/wizard/styles.scoped.css +63 -63
- package/wizard/styles.selectors.js +32 -32
- package/wizard/wizard-form.d.ts.map +1 -1
- package/wizard/wizard-form.js +1 -3
- package/wizard/wizard-form.js.map +1 -1
|
@@ -94,12 +94,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
94
94
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
95
|
SPDX-License-Identifier: Apache-2.0
|
|
96
96
|
*/
|
|
97
|
-
.
|
|
97
|
+
.awsui_root_10m3l_ujfpz_97:not(#\9) {
|
|
98
98
|
display: flex;
|
|
99
99
|
align-content: stretch;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
.
|
|
102
|
+
.awsui_token_10m3l_ujfpz_102:not(#\9) {
|
|
103
103
|
border: var(--border-field-width-idlekx, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
104
104
|
display: flex;
|
|
105
105
|
align-items: stretch;
|
|
@@ -110,21 +110,21 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
110
110
|
box-sizing: border-box;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.awsui_show-
|
|
113
|
+
.awsui_show-operation_10m3l_ujfpz_113:not(#\9) {
|
|
114
114
|
border-left: none;
|
|
115
115
|
border-top-left-radius: 0;
|
|
116
116
|
border-bottom-left-radius: 0;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.
|
|
119
|
+
.awsui_select_10m3l_ujfpz_119:not(#\9) {
|
|
120
120
|
/* used in test-utils */
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
.awsui_token-
|
|
123
|
+
.awsui_token-content_10m3l_ujfpz_123:not(#\9) {
|
|
124
124
|
padding: var(--space-scaled-xxs-95dhkm, 4px) var(--space-field-horizontal-89h2yr, 12px);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
.awsui_dismiss-
|
|
127
|
+
.awsui_dismiss-button_10m3l_ujfpz_127:not(#\9) {
|
|
128
128
|
width: 30px;
|
|
129
129
|
margin: 0;
|
|
130
130
|
border: none;
|
|
@@ -133,14 +133,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
133
133
|
background-color: transparent;
|
|
134
134
|
border-left: var(--border-field-width-idlekx, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
body[data-awsui-focus-visible=true] .awsui_dismiss-button_10m3l_ujfpz_127:not(#\9):focus {
|
|
137
137
|
position: relative;
|
|
138
138
|
}
|
|
139
|
-
|
|
139
|
+
body[data-awsui-focus-visible=true] .awsui_dismiss-button_10m3l_ujfpz_127:not(#\9):focus {
|
|
140
140
|
outline: 2px dotted transparent;
|
|
141
141
|
outline-offset: calc(var(--space-filtering-token-dismiss-button-focus-outline-gutter-itb5fd, -5px) - 1px);
|
|
142
142
|
}
|
|
143
|
-
|
|
143
|
+
body[data-awsui-focus-visible=true] .awsui_dismiss-button_10m3l_ujfpz_127:not(#\9):focus::before {
|
|
144
144
|
content: " ";
|
|
145
145
|
display: block;
|
|
146
146
|
position: absolute;
|
|
@@ -151,22 +151,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
151
151
|
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
152
152
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
153
153
|
}
|
|
154
|
-
.awsui_dismiss-
|
|
154
|
+
.awsui_dismiss-button_10m3l_ujfpz_127:not(#\9):focus {
|
|
155
155
|
outline: none;
|
|
156
156
|
text-decoration: none;
|
|
157
157
|
}
|
|
158
|
-
.awsui_dismiss-
|
|
158
|
+
.awsui_dismiss-button_10m3l_ujfpz_127:not(#\9):hover {
|
|
159
159
|
cursor: pointer;
|
|
160
160
|
color: var(--color-text-interactive-hover-v3lasm, #000716);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
.awsui_token-
|
|
163
|
+
.awsui_token-disabled_10m3l_ujfpz_163:not(#\9) {
|
|
164
164
|
border-color: var(--color-border-control-disabled-vx8bco, #d1d5db);
|
|
165
165
|
background-color: var(--color-background-container-content-i8i4a0, #ffffff);
|
|
166
166
|
color: var(--color-text-disabled-a2nkh4, #9ba7b6);
|
|
167
167
|
pointer-events: none;
|
|
168
168
|
}
|
|
169
|
-
.awsui_token-
|
|
169
|
+
.awsui_token-disabled_10m3l_ujfpz_163 > .awsui_dismiss-button_10m3l_ujfpz_127:not(#\9) {
|
|
170
170
|
color: var(--color-text-interactive-disabled-3pbb07, #9ba7b6);
|
|
171
171
|
border-color: var(--color-border-control-disabled-vx8bco, #d1d5db);
|
|
172
172
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"token": "
|
|
7
|
-
"show-operation": "awsui_show-
|
|
8
|
-
"select": "
|
|
9
|
-
"token-content": "awsui_token-
|
|
10
|
-
"dismiss-button": "awsui_dismiss-
|
|
11
|
-
"token-disabled": "awsui_token-
|
|
5
|
+
"root": "awsui_root_10m3l_ujfpz_97",
|
|
6
|
+
"token": "awsui_token_10m3l_ujfpz_102",
|
|
7
|
+
"show-operation": "awsui_show-operation_10m3l_ujfpz_113",
|
|
8
|
+
"select": "awsui_select_10m3l_ujfpz_119",
|
|
9
|
+
"token-content": "awsui_token-content_10m3l_ujfpz_123",
|
|
10
|
+
"dismiss-button": "awsui_dismiss-button_10m3l_ujfpz_127",
|
|
11
|
+
"token-disabled": "awsui_token-disabled_10m3l_ujfpz_163"
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/menu-dropdown/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/menu-dropdown/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAQrE,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,eAAO,MAAM,aAAa,gFAqDzB,CAAC;AAEF,QAAA,MAAM,YAAY,+FAUf,iBAAiB,gBAgCnB,CAAC;AAGF,eAAe,YAAY,CAAC"}
|
|
@@ -5,18 +5,16 @@ import clsx from 'clsx';
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { getBaseProps } from '../../base-component';
|
|
7
7
|
import { applyDisplayName } from '../../utils/apply-display-name';
|
|
8
|
-
import useFocusVisible from '../../hooks/focus-visible';
|
|
9
8
|
import InternalButtonDropdown from '../../../button-dropdown/internal';
|
|
10
9
|
import InternalIcon from '../../../icon/internal';
|
|
11
10
|
import buttonDropdownStyles from '../../../button-dropdown/styles.css.js';
|
|
12
11
|
import styles from './styles.css.js';
|
|
13
12
|
export const ButtonTrigger = React.forwardRef(({ iconName, iconUrl, iconAlt, iconSvg, badge, ariaLabel, offsetRight, disabled, expanded, children, onClick, }, ref) => {
|
|
14
|
-
const focusVisible = useFocusVisible();
|
|
15
13
|
const hasIcon = iconName || iconUrl || iconSvg;
|
|
16
|
-
return (React.createElement("button",
|
|
14
|
+
return (React.createElement("button", { ref: ref, type: "button", className: clsx(styles.button, styles[`offset-right-${offsetRight}`], { [styles.expanded]: expanded }), "aria-label": ariaLabel, "aria-expanded": !!expanded, "aria-haspopup": true, disabled: disabled, onClick: event => {
|
|
17
15
|
event.preventDefault();
|
|
18
16
|
onClick && onClick();
|
|
19
|
-
} }
|
|
17
|
+
} },
|
|
20
18
|
hasIcon && (React.createElement(InternalIcon, { className: styles.icon, name: iconName, url: iconUrl, alt: iconAlt, svg: iconSvg, badge: badge })),
|
|
21
19
|
children && React.createElement("span", { className: styles.text }, children),
|
|
22
20
|
children && (React.createElement(InternalIcon, { name: "caret-down-filled", className: expanded ? buttonDropdownStyles['rotate-up'] : buttonDropdownStyles['rotate-down'] }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/menu-dropdown/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/menu-dropdown/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,sBAAsB,MAAM,mCAAmC,CAAC;AACvE,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,oBAAoB,MAAM,wCAAwC,CAAC;AAC1E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAC3C,CACE,EACE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P,OAAO,EACP,KAAK,EACL,SAAS,EACT,WAAW,EACX,QAAQ,OAEU,EADf,KAAK,cATY,8FAUrB,CADS;IAER,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IAEtC,MAAM,eAAe,GAAG,CAAC,YAAwB,EAAE,GAAmB,EAAE,UAAmB,EAAE,UAAmB,EAAE,EAAE;QAClH,OAAO,CACL,oBAAC,aAAa,IACZ,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,UAAU,EACpB,QAAQ,EAAE,UAAU,EACpB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,YAAY,IAEpB,QAAQ,CACK,CACjB,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,sBAAsB,oBACjB,SAAS,EACT,KAAK,IACT,OAAO,EAAC,YAAY,EACpB,oBAAoB,EAAE,eAAe,EACrC,YAAY,EAAE,IAAI,IAClB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;AAC/C,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\n\nimport { MenuDropdownProps, ButtonTriggerProps } from './interfaces';\nimport { getBaseProps } from '../../base-component';\nimport { applyDisplayName } from '../../utils/apply-display-name';\nimport InternalButtonDropdown from '../../../button-dropdown/internal';\nimport InternalIcon from '../../../icon/internal';\nimport buttonDropdownStyles from '../../../button-dropdown/styles.css.js';\nimport styles from './styles.css.js';\n\nexport { MenuDropdownProps };\n\nexport const ButtonTrigger = React.forwardRef(\n (\n {\n iconName,\n iconUrl,\n iconAlt,\n iconSvg,\n badge,\n ariaLabel,\n offsetRight,\n disabled,\n expanded,\n children,\n onClick,\n }: ButtonTriggerProps,\n ref: React.Ref<any>\n ) => {\n const hasIcon = iconName || iconUrl || iconSvg;\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={clsx(styles.button, styles[`offset-right-${offsetRight}`], { [styles.expanded]: expanded })}\n aria-label={ariaLabel}\n aria-expanded={!!expanded}\n aria-haspopup={true}\n disabled={disabled}\n onClick={event => {\n event.preventDefault();\n onClick && onClick();\n }}\n >\n {hasIcon && (\n <InternalIcon\n className={styles.icon}\n name={iconName}\n url={iconUrl}\n alt={iconAlt}\n svg={iconSvg}\n badge={badge}\n />\n )}\n {children && <span className={styles.text}>{children}</span>}\n {children && (\n <InternalIcon\n name=\"caret-down-filled\"\n className={expanded ? buttonDropdownStyles['rotate-up'] : buttonDropdownStyles['rotate-down']}\n />\n )}\n </button>\n );\n }\n);\n\nconst MenuDropdown = ({\n iconName,\n iconUrl,\n iconAlt,\n iconSvg,\n badge,\n ariaLabel,\n offsetRight,\n children,\n ...props\n}: MenuDropdownProps) => {\n const baseProps = getBaseProps(props);\n\n const dropdownTrigger = (clickHandler: () => void, ref: React.Ref<any>, isDisabled: boolean, isExpanded: boolean) => {\n return (\n <ButtonTrigger\n ref={ref}\n disabled={isDisabled}\n expanded={isExpanded}\n iconName={iconName}\n iconUrl={iconUrl}\n iconAlt={iconAlt}\n iconSvg={iconSvg}\n badge={badge}\n ariaLabel={ariaLabel}\n offsetRight={offsetRight}\n onClick={clickHandler}\n >\n {children}\n </ButtonTrigger>\n );\n };\n\n return (\n <InternalButtonDropdown\n {...baseProps}\n {...props}\n variant=\"navigation\"\n customTriggerBuilder={dropdownTrigger}\n preferCenter={true}\n />\n );\n};\n\napplyDisplayName(MenuDropdown, 'MenuDropdown');\nexport default MenuDropdown;\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"button": "
|
|
5
|
-
"expanded": "
|
|
6
|
-
"offset-right-none": "awsui_offset-right-
|
|
7
|
-
"offset-right-l": "awsui_offset-right-
|
|
8
|
-
"offset-right-xxl": "awsui_offset-right-
|
|
9
|
-
"text": "
|
|
10
|
-
"icon": "
|
|
4
|
+
"button": "awsui_button_m5h9f_1yya9_93",
|
|
5
|
+
"expanded": "awsui_expanded_m5h9f_1yya9_127",
|
|
6
|
+
"offset-right-none": "awsui_offset-right-none_m5h9f_1yya9_138",
|
|
7
|
+
"offset-right-l": "awsui_offset-right-l_m5h9f_1yya9_141",
|
|
8
|
+
"offset-right-xxl": "awsui_offset-right-xxl_m5h9f_1yya9_144",
|
|
9
|
+
"text": "awsui_text_m5h9f_1yya9_166",
|
|
10
|
+
"icon": "awsui_icon_m5h9f_1yya9_170"
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -90,7 +90,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.
|
|
93
|
+
.awsui_button_m5h9f_1yya9_93:not(#\9) {
|
|
94
94
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
95
95
|
border-collapse: separate;
|
|
96
96
|
border-spacing: 0;
|
|
@@ -146,38 +146,38 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
146
146
|
background: transparent;
|
|
147
147
|
color: var(--color-text-interactive-default-eg5fsa, #414d5c);
|
|
148
148
|
}
|
|
149
|
-
.
|
|
149
|
+
.awsui_button_m5h9f_1yya9_93:not(#\9):hover {
|
|
150
150
|
color: var(--color-text-interactive-hover-v3lasm, #000716);
|
|
151
151
|
text-decoration: none;
|
|
152
152
|
}
|
|
153
|
-
.
|
|
153
|
+
.awsui_button_m5h9f_1yya9_93:not(#\9):active, .awsui_button_m5h9f_1yya9_93.awsui_expanded_m5h9f_1yya9_127:not(#\9) {
|
|
154
154
|
background: transparent;
|
|
155
155
|
color: var(--color-text-interactive-active-vol84d, #000716);
|
|
156
156
|
}
|
|
157
|
-
.
|
|
157
|
+
.awsui_button_m5h9f_1yya9_93.awsui_expanded_m5h9f_1yya9_127:not(#\9) {
|
|
158
158
|
color: var(--color-text-accent-s1eqko, #0972d3);
|
|
159
159
|
}
|
|
160
|
-
.
|
|
160
|
+
.awsui_button_m5h9f_1yya9_93:not(#\9):focus {
|
|
161
161
|
outline: none;
|
|
162
162
|
text-decoration: none;
|
|
163
163
|
}
|
|
164
|
-
.
|
|
164
|
+
.awsui_button_m5h9f_1yya9_93.awsui_offset-right-none_m5h9f_1yya9_138:not(#\9) {
|
|
165
165
|
margin-right: 0;
|
|
166
166
|
}
|
|
167
|
-
.
|
|
167
|
+
.awsui_button_m5h9f_1yya9_93.awsui_offset-right-l_m5h9f_1yya9_141:not(#\9) {
|
|
168
168
|
margin-right: var(--space-s-hv8c1d, 12px);
|
|
169
169
|
}
|
|
170
|
-
.
|
|
170
|
+
.awsui_button_m5h9f_1yya9_93.awsui_offset-right-xxl_m5h9f_1yya9_144:not(#\9) {
|
|
171
171
|
margin-right: var(--space-xl-a39hup, 24px);
|
|
172
172
|
}
|
|
173
|
-
|
|
173
|
+
body[data-awsui-focus-visible=true] .awsui_button_m5h9f_1yya9_93:not(#\9):focus {
|
|
174
174
|
position: relative;
|
|
175
175
|
}
|
|
176
|
-
|
|
176
|
+
body[data-awsui-focus-visible=true] .awsui_button_m5h9f_1yya9_93:not(#\9):focus {
|
|
177
177
|
outline: 2px dotted transparent;
|
|
178
178
|
outline-offset: calc(-1px - 1px);
|
|
179
179
|
}
|
|
180
|
-
|
|
180
|
+
body[data-awsui-focus-visible=true] .awsui_button_m5h9f_1yya9_93:not(#\9):focus::before {
|
|
181
181
|
content: " ";
|
|
182
182
|
display: block;
|
|
183
183
|
position: absolute;
|
|
@@ -189,10 +189,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
189
189
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
.
|
|
192
|
+
.awsui_text_m5h9f_1yya9_166:not(#\9) {
|
|
193
193
|
margin-right: var(--space-xs-rsr2qu, 8px);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
.
|
|
196
|
+
.awsui_icon_m5h9f_1yya9_170 + .awsui_text_m5h9f_1yya9_166:not(#\9) {
|
|
197
197
|
margin-left: var(--space-xs-rsr2qu, 8px);
|
|
198
198
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"button": "
|
|
6
|
-
"expanded": "
|
|
7
|
-
"offset-right-none": "awsui_offset-right-
|
|
8
|
-
"offset-right-l": "awsui_offset-right-
|
|
9
|
-
"offset-right-xxl": "awsui_offset-right-
|
|
10
|
-
"text": "
|
|
11
|
-
"icon": "
|
|
5
|
+
"button": "awsui_button_m5h9f_1yya9_93",
|
|
6
|
+
"expanded": "awsui_expanded_m5h9f_1yya9_127",
|
|
7
|
+
"offset-right-none": "awsui_offset-right-none_m5h9f_1yya9_138",
|
|
8
|
+
"offset-right-l": "awsui_offset-right-l_m5h9f_1yya9_141",
|
|
9
|
+
"offset-right-xxl": "awsui_offset-right-xxl_m5h9f_1yya9_144",
|
|
10
|
+
"text": "awsui_text_m5h9f_1yya9_166",
|
|
11
|
+
"icon": "awsui_icon_m5h9f_1yya9_170"
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TokenListProps } from './interfaces';
|
|
3
|
-
export default function TokenList<Item>({ items, alignment, renderItem,
|
|
3
|
+
export default function TokenList<Item>({ items, alignment, renderItem, limit, after, i18nStrings, removedItemIndex, }: TokenListProps<Item>): JSX.Element;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/token-list/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAK9C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,IAAI,EAAE,EACtC,KAAK,EACL,SAAS,EACT,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/token-list/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAK9C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,IAAI,EAAE,EACtC,KAAK,EACL,SAAS,EACT,UAAU,EACV,KAAK,EACL,KAAK,EACL,WAAW,EACX,gBAAgB,GACjB,EAAE,cAAc,CAAC,IAAI,CAAC,eAmEtB"}
|
|
@@ -6,7 +6,7 @@ import styles from './styles.css.js';
|
|
|
6
6
|
import { useUniqueId } from '../../hooks/use-unique-id';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { useTokenFocusController } from './token-focus-controller';
|
|
9
|
-
export default function TokenList({ items, alignment, renderItem,
|
|
9
|
+
export default function TokenList({ items, alignment, renderItem, limit, after, i18nStrings, removedItemIndex, }) {
|
|
10
10
|
const tokenListRef = useTokenFocusController({ removedItemIndex });
|
|
11
11
|
const controlId = useUniqueId();
|
|
12
12
|
const [expanded, setExpanded] = useState(false);
|
|
@@ -18,13 +18,13 @@ export default function TokenList({ items, alignment, renderItem, itemAttributes
|
|
|
18
18
|
React.createElement(TokenLimitToggle, { controlId: hasVisibleItems ? controlId : undefined, allHidden: limit === 0, expanded: expanded, numberOfHiddenOptions: items.length - visibleItems.length, i18nStrings: i18nStrings, onClick: () => setExpanded(!expanded) }))) : null;
|
|
19
19
|
if (alignment === 'inline') {
|
|
20
20
|
return (React.createElement("div", { ref: tokenListRef, className: clsx(styles.root, styles.horizontal) },
|
|
21
|
-
hasItems && (React.createElement("ul", { id: controlId, className: styles.list }, visibleItems.map((item, itemIndex) => (React.createElement("li",
|
|
21
|
+
hasItems && (React.createElement("ul", { id: controlId, className: styles.list }, visibleItems.map((item, itemIndex) => (React.createElement("li", { key: itemIndex, className: styles['list-item'], "aria-setsize": items.length, "aria-posinset": itemIndex + 1 }, renderItem(item, itemIndex)))))),
|
|
22
22
|
toggle,
|
|
23
23
|
after && React.createElement("div", { className: styles.separator }),
|
|
24
24
|
after));
|
|
25
25
|
}
|
|
26
26
|
return (React.createElement("div", { ref: tokenListRef, className: clsx(styles.root, styles.vertical) },
|
|
27
|
-
hasVisibleItems && (React.createElement("ul", { id: controlId, className: clsx(styles.list, styles[alignment]) }, visibleItems.map((item, itemIndex) => (React.createElement("li",
|
|
27
|
+
hasVisibleItems && (React.createElement("ul", { id: controlId, className: clsx(styles.list, styles[alignment]) }, visibleItems.map((item, itemIndex) => (React.createElement("li", { key: itemIndex, className: styles['list-item'], "aria-setsize": items.length, "aria-posinset": itemIndex + 1 }, renderItem(item, itemIndex)))))),
|
|
28
28
|
toggle,
|
|
29
29
|
after));
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/token-list/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,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CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,IAC/D,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,CACrC,4BACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,kBAChB,KAAK,CAAC,MAAM,mBACX,SAAS,GAAG,CAAC,IAE3B,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,CACzB,CACN,CAAC,CACC,CACN;QACA,MAAM;QACN,KAAK,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useState } from 'react';\n\nimport TokenLimitToggle from './token-limit-toggle';\nimport styles from './styles.css.js';\nimport { TokenListProps } from './interfaces';\nimport { useUniqueId } from '../../hooks/use-unique-id';\nimport clsx from 'clsx';\nimport { useTokenFocusController } from './token-focus-controller';\n\nexport default function TokenList<Item>({\n items,\n alignment,\n renderItem,\n limit,\n after,\n i18nStrings,\n removedItemIndex,\n}: TokenListProps<Item>) {\n const tokenListRef = useTokenFocusController({ removedItemIndex });\n const controlId = useUniqueId();\n\n const [expanded, setExpanded] = useState(false);\n const hasItems = items.length > 0;\n const hasHiddenItems = hasItems && limit !== undefined && items.length > limit;\n const visibleItems = hasHiddenItems && !expanded ? items.slice(0, limit) : items;\n const hasVisibleItems = visibleItems.length > 0;\n\n const toggle = hasHiddenItems ? (\n <div className={styles[`toggle-container-${alignment}`]}>\n <TokenLimitToggle\n controlId={hasVisibleItems ? controlId : undefined}\n allHidden={limit === 0}\n expanded={expanded}\n numberOfHiddenOptions={items.length - visibleItems.length}\n i18nStrings={i18nStrings}\n onClick={() => setExpanded(!expanded)}\n />\n </div>\n ) : null;\n\n if (alignment === 'inline') {\n return (\n <div ref={tokenListRef} className={clsx(styles.root, styles.horizontal)}>\n {hasItems && (\n <ul id={controlId} className={styles.list}>\n {visibleItems.map((item, itemIndex) => (\n <li\n key={itemIndex}\n className={styles['list-item']}\n aria-setsize={items.length}\n aria-posinset={itemIndex + 1}\n >\n {renderItem(item, itemIndex)}\n </li>\n ))}\n </ul>\n )}\n {toggle}\n {after && <div className={styles.separator} />}\n {after}\n </div>\n );\n }\n\n return (\n <div ref={tokenListRef} className={clsx(styles.root, styles.vertical)}>\n {hasVisibleItems && (\n <ul id={controlId} className={clsx(styles.list, styles[alignment])}>\n {visibleItems.map((item, itemIndex) => (\n <li\n key={itemIndex}\n className={styles['list-item']}\n aria-setsize={items.length}\n aria-posinset={itemIndex + 1}\n >\n {renderItem(item, itemIndex)}\n </li>\n ))}\n </ul>\n )}\n {toggle}\n {after}\n </div>\n );\n}\n"]}
|
|
@@ -5,7 +5,6 @@ export interface TokenListProps<Item> {
|
|
|
5
5
|
limit?: number;
|
|
6
6
|
after?: React.ReactNode;
|
|
7
7
|
renderItem: (item: Item, itemIndex: number) => React.ReactNode;
|
|
8
|
-
itemAttributes?: (item: Item, itemIndex: number) => React.HTMLAttributes<HTMLLIElement>;
|
|
9
8
|
i18nStrings?: I18nStrings;
|
|
10
9
|
removedItemIndex?: null | number;
|
|
11
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["internal/components/token-list/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,cAAc,CAAC,IAAI;IAClC,SAAS,EAAE,UAAU,GAAG,YAAY,GAAG,QAAQ,CAAC;IAChD,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/D,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["internal/components/token-list/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,cAAc,CAAC,IAAI;IAClC,SAAS,EAAE,UAAU,GAAG,YAAY,GAAG,QAAQ,CAAC;IAChD,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/D,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,WAAW;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["internal/components/token-list/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\n\nexport interface TokenListProps<Item> {\n alignment: 'vertical' | 'horizontal' | 'inline';\n items: readonly Item[];\n limit?: number;\n after?: React.ReactNode;\n renderItem: (item: Item, itemIndex: number) => React.ReactNode;\n
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["internal/components/token-list/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\n\nexport interface TokenListProps<Item> {\n alignment: 'vertical' | 'horizontal' | 'inline';\n items: readonly Item[];\n limit?: number;\n after?: React.ReactNode;\n renderItem: (item: Item, itemIndex: number) => React.ReactNode;\n i18nStrings?: I18nStrings;\n removedItemIndex?: null | number;\n}\n\nexport interface I18nStrings {\n limitShowFewer?: string;\n limitShowMore?: string;\n}\n"]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"horizontal": "
|
|
6
|
-
"vertical": "
|
|
7
|
-
"list": "
|
|
8
|
-
"list-item": "awsui_list-
|
|
9
|
-
"toggle-container-inline": "awsui_toggle-container-
|
|
10
|
-
"toggle": "
|
|
11
|
-
"description": "
|
|
12
|
-
"separator": "
|
|
4
|
+
"root": "awsui_root_gfwv3_sgio_93",
|
|
5
|
+
"horizontal": "awsui_horizontal_gfwv3_sgio_98",
|
|
6
|
+
"vertical": "awsui_vertical_gfwv3_sgio_102",
|
|
7
|
+
"list": "awsui_list_gfwv3_sgio_106",
|
|
8
|
+
"list-item": "awsui_list-item_gfwv3_sgio_124",
|
|
9
|
+
"toggle-container-inline": "awsui_toggle-container-inline_gfwv3_sgio_128",
|
|
10
|
+
"toggle": "awsui_toggle_gfwv3_sgio_128",
|
|
11
|
+
"description": "awsui_description_gfwv3_sgio_196",
|
|
12
|
+
"separator": "awsui_separator_gfwv3_sgio_200"
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -90,48 +90,48 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.
|
|
93
|
+
.awsui_root_gfwv3_sgio_93:not(#\9) {
|
|
94
94
|
display: flex;
|
|
95
95
|
flex-wrap: wrap;
|
|
96
96
|
gap: var(--space-scaled-xs-6859qs, 8px);
|
|
97
97
|
}
|
|
98
|
-
.
|
|
98
|
+
.awsui_root_gfwv3_sgio_93.awsui_horizontal_gfwv3_sgio_98:not(#\9) {
|
|
99
99
|
gap: var(--space-xs-rsr2qu, 8px);
|
|
100
100
|
flex-direction: row;
|
|
101
101
|
}
|
|
102
|
-
.
|
|
102
|
+
.awsui_root_gfwv3_sgio_93.awsui_vertical_gfwv3_sgio_102:not(#\9) {
|
|
103
103
|
flex-direction: column;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
.
|
|
106
|
+
.awsui_list_gfwv3_sgio_106:not(#\9) {
|
|
107
107
|
display: contents;
|
|
108
108
|
list-style: none;
|
|
109
109
|
padding: 0;
|
|
110
110
|
margin: 0;
|
|
111
111
|
}
|
|
112
|
-
.
|
|
112
|
+
.awsui_list_gfwv3_sgio_106.awsui_horizontal_gfwv3_sgio_98:not(#\9), .awsui_list_gfwv3_sgio_106.awsui_vertical_gfwv3_sgio_102:not(#\9) {
|
|
113
113
|
display: flex;
|
|
114
114
|
flex-wrap: wrap;
|
|
115
115
|
gap: var(--space-xs-rsr2qu, 8px);
|
|
116
116
|
}
|
|
117
|
-
.
|
|
117
|
+
.awsui_list_gfwv3_sgio_106.awsui_horizontal_gfwv3_sgio_98:not(#\9) {
|
|
118
118
|
flex-direction: row;
|
|
119
119
|
}
|
|
120
|
-
.
|
|
120
|
+
.awsui_list_gfwv3_sgio_106.awsui_vertical_gfwv3_sgio_102:not(#\9) {
|
|
121
121
|
flex-direction: column;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
.awsui_list-
|
|
124
|
+
.awsui_list-item_gfwv3_sgio_124:not(#\9) {
|
|
125
125
|
/* used in test-utils */
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
.awsui_toggle-container-
|
|
128
|
+
.awsui_toggle-container-inline_gfwv3_sgio_128:not(#\9) {
|
|
129
129
|
padding-left: var(--space-xs-rsr2qu, 8px);
|
|
130
130
|
display: flex;
|
|
131
131
|
align-items: center;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
.
|
|
134
|
+
.awsui_toggle_gfwv3_sgio_128:not(#\9) {
|
|
135
135
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
136
136
|
border-collapse: separate;
|
|
137
137
|
border-spacing: 0;
|
|
@@ -186,46 +186,46 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
186
186
|
margin-left: -1px;
|
|
187
187
|
}
|
|
188
188
|
@media (prefers-reduced-motion: reduce) {
|
|
189
|
-
.
|
|
189
|
+
.awsui_toggle_gfwv3_sgio_128:not(#\9) {
|
|
190
190
|
animation: none;
|
|
191
191
|
transition: none;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
.awsui-motion-disabled .
|
|
194
|
+
.awsui-motion-disabled .awsui_toggle_gfwv3_sgio_128:not(#\9), .awsui-mode-entering .awsui_toggle_gfwv3_sgio_128:not(#\9) {
|
|
195
195
|
animation: none;
|
|
196
196
|
transition: none;
|
|
197
197
|
}
|
|
198
|
-
.
|
|
198
|
+
.awsui_toggle_gfwv3_sgio_128:not(#\9):hover {
|
|
199
199
|
cursor: pointer;
|
|
200
200
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
201
201
|
}
|
|
202
|
-
.
|
|
202
|
+
.awsui_toggle_gfwv3_sgio_128:not(#\9):focus {
|
|
203
203
|
outline: none;
|
|
204
204
|
}
|
|
205
|
-
.
|
|
205
|
+
.awsui_toggle_gfwv3_sgio_128:not(#\9):active {
|
|
206
206
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
207
207
|
}
|
|
208
|
-
.
|
|
208
|
+
.awsui_toggle_gfwv3_sgio_128:not(#\9):active, .awsui_toggle_gfwv3_sgio_128:not(#\9):focus, .awsui_toggle_gfwv3_sgio_128:not(#\9):hover {
|
|
209
209
|
text-decoration: underline;
|
|
210
210
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
211
211
|
text-decoration-color: currentColor;
|
|
212
212
|
}
|
|
213
|
-
.
|
|
213
|
+
.awsui_toggle_gfwv3_sgio_128:not(#\9):active, .awsui_toggle_gfwv3_sgio_128:not(#\9):focus, .awsui_toggle_gfwv3_sgio_128:not(#\9):hover {
|
|
214
214
|
text-decoration: none;
|
|
215
215
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
216
216
|
text-decoration-color: transparent;
|
|
217
217
|
}
|
|
218
|
-
|
|
218
|
+
body[data-awsui-focus-visible=true] .awsui_toggle_gfwv3_sgio_128:not(#\9):focus {
|
|
219
219
|
outline: 2px dotted transparent;
|
|
220
220
|
border: var(--border-field-width-idlekx, 2px) solid var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
221
221
|
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
222
222
|
box-shadow: 0 0 0 var(--border-control-focus-ring-shadow-spread-srzyiu, 0px) var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
223
223
|
}
|
|
224
|
-
.
|
|
224
|
+
.awsui_toggle_gfwv3_sgio_128 > .awsui_description_gfwv3_sgio_196:not(#\9) {
|
|
225
225
|
margin-left: var(--space-xxs-ynfts5, 4px);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
.
|
|
228
|
+
.awsui_separator_gfwv3_sgio_200:not(#\9) {
|
|
229
229
|
margin: 0px var(--space-scaled-m-pv0fmt, 16px);
|
|
230
230
|
width: var(--border-divider-section-width-4wm2it, 2px);
|
|
231
231
|
background-color: var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"horizontal": "
|
|
7
|
-
"vertical": "
|
|
8
|
-
"list": "
|
|
9
|
-
"list-item": "awsui_list-
|
|
10
|
-
"toggle-container-inline": "awsui_toggle-container-
|
|
11
|
-
"toggle": "
|
|
12
|
-
"description": "
|
|
13
|
-
"separator": "
|
|
5
|
+
"root": "awsui_root_gfwv3_sgio_93",
|
|
6
|
+
"horizontal": "awsui_horizontal_gfwv3_sgio_98",
|
|
7
|
+
"vertical": "awsui_vertical_gfwv3_sgio_102",
|
|
8
|
+
"list": "awsui_list_gfwv3_sgio_106",
|
|
9
|
+
"list-item": "awsui_list-item_gfwv3_sgio_124",
|
|
10
|
+
"toggle-container-inline": "awsui_toggle-container-inline_gfwv3_sgio_128",
|
|
11
|
+
"toggle": "awsui_toggle_gfwv3_sgio_128",
|
|
12
|
+
"description": "awsui_description_gfwv3_sgio_196",
|
|
13
|
+
"separator": "awsui_separator_gfwv3_sgio_200"
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -16,7 +16,7 @@ export function useTokenFocusController({ removedItemIndex }) {
|
|
|
16
16
|
const toggleButton = tokenListRef.current.querySelector(toggleButtonSelector);
|
|
17
17
|
const activeItemIndices = [];
|
|
18
18
|
for (let i = 0; i < tokenElements.length; i++) {
|
|
19
|
-
if (tokenElements[i].
|
|
19
|
+
if (!tokenElements[i].querySelector('[aria-disabled="true"]')) {
|
|
20
20
|
activeItemIndices.push(i);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-focus-controller.js","sourceRoot":"lib/default/","sources":["internal/components/token-list/token-focus-controller.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,aAAa,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;AAChD,MAAM,oBAAoB,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;AAEjD,MAAM,UAAU,uBAAuB,CAAC,EAAE,gBAAgB,EAAwC;IAChG,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,SAAS,CAAC,GAAG,EAAE;;QACb,IAAI,gBAAgB,KAAK,SAAS,IAAI,gBAAgB,KAAK,IAAI,IAAI,YAAY,CAAC,OAAO,KAAK,IAAI,EAAE;YAChG,OAAO;SACR;QAED,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAC3E,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;QAE9E,MAAM,iBAAiB,GAAa,EAAE,CAAC;QACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC7C,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"token-focus-controller.js","sourceRoot":"lib/default/","sources":["internal/components/token-list/token-focus-controller.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,aAAa,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;AAChD,MAAM,oBAAoB,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;AAEjD,MAAM,UAAU,uBAAuB,CAAC,EAAE,gBAAgB,EAAwC;IAChG,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,SAAS,CAAC,GAAG,EAAE;;QACb,IAAI,gBAAgB,KAAK,SAAS,IAAI,gBAAgB,KAAK,IAAI,IAAI,YAAY,CAAC,OAAO,KAAK,IAAI,EAAE;YA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K,EAAE,CAAC;SACzC;aAAM,IAAI,YAAY,YAAY,WAAW,EAAE;YAC9C,YAAY,CAAC,KAAK,EAAE,CAAC;SACtB;IACH,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { useEffect, useRef } from 'react';\nimport { getFirstFocusable } from '../focus-lock/utils.js';\nimport styles from './styles.css.js';\n\nconst tokenSelector = `.${styles['list-item']}`;\nconst toggleButtonSelector = `.${styles.toggle}`;\n\nexport function useTokenFocusController({ removedItemIndex }: { removedItemIndex?: null | number }) {\n const tokenListRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (removedItemIndex === undefined || removedItemIndex === null || tokenListRef.current === null) {\n return;\n }\n\n const tokenElements = tokenListRef.current.querySelectorAll(tokenSelector);\n const toggleButton = tokenListRef.current.querySelector(toggleButtonSelector);\n\n const activeItemIndices: number[] = [];\n for (let i = 0; i < tokenElements.length; i++) {\n if (!tokenElements[i].querySelector('[aria-disabled=\"true\"]')) {\n activeItemIndices.push(i);\n }\n }\n\n let closestPrevIndex = Number.NEGATIVE_INFINITY;\n let closestNextIndex = Number.POSITIVE_INFINITY;\n\n for (const activeIndex of activeItemIndices) {\n if (activeIndex < removedItemIndex) {\n closestPrevIndex =\n removedItemIndex - activeIndex < removedItemIndex - closestPrevIndex ? activeIndex : closestPrevIndex;\n } else {\n closestNextIndex =\n activeIndex - removedItemIndex < closestNextIndex - removedItemIndex ? activeIndex : closestNextIndex;\n }\n }\n\n const nextElement = tokenElements[closestNextIndex];\n const prevElement = tokenElements[closestPrevIndex];\n\n if (nextElement instanceof HTMLElement) {\n getFirstFocusable(nextElement)?.focus();\n } else if (prevElement instanceof HTMLElement) {\n getFirstFocusable(prevElement)?.focus();\n } else if (toggleButton instanceof HTMLElement) {\n toggleButton.focus();\n }\n }, [removedItemIndex]);\n\n return tokenListRef;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-limit-toggle.d.ts","sourceRoot":"lib/default/","sources":["internal/components/token-list/token-limit-toggle.tsx"],"names":[],"mappings":";AAKA,OAAO,EAA0B,yBAAyB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"token-limit-toggle.d.ts","sourceRoot":"lib/default/","sources":["internal/components/token-list/token-limit-toggle.tsx"],"names":[],"mappings":";AAKA,OAAO,EAA0B,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,UAAU,qBAAqB;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAC1C,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,SAAS,EACT,SAAS,EACT,QAAQ,EACR,qBAAqB,EACrB,OAAO,EACP,WAAgB,GACjB,EAAE,qBAAqB,eAsBvB"}
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
import React, { useCallback } from 'react';
|
|
4
4
|
import InternalIcon from '../../../icon/internal';
|
|
5
5
|
import { fireNonCancelableEvent } from '../../events';
|
|
6
|
-
import useFocusVisible from '../../hooks/focus-visible';
|
|
7
6
|
import styles from './styles.css.js';
|
|
8
7
|
export default function TokenLimitToggle({ controlId, allHidden, expanded, numberOfHiddenOptions, onClick, i18nStrings = {}, }) {
|
|
9
|
-
const focusVisible = useFocusVisible();
|
|
10
8
|
const numberOfHiddenOptionLabel = allHidden ? numberOfHiddenOptions : `+${numberOfHiddenOptions}`;
|
|
11
9
|
const description = expanded
|
|
12
10
|
? i18nStrings.limitShowFewer
|
|
@@ -14,7 +12,7 @@ export default function TokenLimitToggle({ controlId, allHidden, expanded, numbe
|
|
|
14
12
|
const handleClick = useCallback(() => {
|
|
15
13
|
fireNonCancelableEvent(onClick, null);
|
|
16
14
|
}, [onClick]);
|
|
17
|
-
return (React.createElement("button",
|
|
15
|
+
return (React.createElement("button", { type: "button", className: styles.toggle, onClick: handleClick, "aria-controls": controlId, "aria-expanded": expanded },
|
|
18
16
|
React.createElement(InternalIcon, { name: expanded ? 'treeview-collapse' : 'treeview-expand' }),
|
|
19
17
|
React.createElement("span", { className: styles.description }, description)));
|
|
20
18
|
}
|