@cloudscape-design/components-themeable 3.0.1209 → 3.0.1211
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/internal/components/dropdown/styles.scss +3 -2
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +140 -139
- package/lib/internal/template/alert/interfaces.d.ts +2 -0
- package/lib/internal/template/alert/interfaces.d.ts.map +1 -1
- package/lib/internal/template/alert/interfaces.js.map +1 -1
- package/lib/internal/template/alert/styles.css.js +27 -27
- package/lib/internal/template/alert/styles.scoped.css +50 -50
- package/lib/internal/template/alert/styles.selectors.js +27 -27
- package/lib/internal/template/annotation-context/annotation/styles.css.js +13 -13
- package/lib/internal/template/annotation-context/annotation/styles.scoped.css +21 -21
- package/lib/internal/template/annotation-context/annotation/styles.selectors.js +13 -13
- package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
- package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
- package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +258 -258
- package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +30 -30
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +87 -87
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +30 -30
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +27 -27
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +54 -54
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +27 -27
- package/lib/internal/template/attribute-editor/styles.css.js +15 -15
- package/lib/internal/template/attribute-editor/styles.scoped.css +28 -28
- package/lib/internal/template/attribute-editor/styles.selectors.js +15 -15
- package/lib/internal/template/autosuggest/interfaces.d.ts +2 -0
- package/lib/internal/template/autosuggest/interfaces.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/interfaces.js.map +1 -1
- package/lib/internal/template/badge/interfaces.d.ts +2 -0
- package/lib/internal/template/badge/interfaces.d.ts.map +1 -1
- package/lib/internal/template/badge/interfaces.js.map +1 -1
- package/lib/internal/template/breadcrumb-group/item/styles.css.js +7 -7
- package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +28 -28
- package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +7 -7
- package/lib/internal/template/button/interfaces.d.ts +2 -0
- package/lib/internal/template/button/interfaces.d.ts.map +1 -1
- package/lib/internal/template/button/interfaces.js.map +1 -1
- package/lib/internal/template/button/styles.css.js +22 -22
- package/lib/internal/template/button/styles.scoped.css +256 -256
- package/lib/internal/template/button/styles.selectors.js +22 -22
- package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js +1 -1
- package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
- package/lib/internal/template/button-dropdown/interfaces.d.ts +2 -0
- package/lib/internal/template/button-dropdown/interfaces.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/interfaces.js.map +1 -1
- package/lib/internal/template/button-dropdown/internal.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/internal.js +1 -1
- package/lib/internal/template/button-dropdown/internal.js.map +1 -1
- package/lib/internal/template/button-dropdown/item-element/index.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/item-element/index.js +2 -1
- package/lib/internal/template/button-dropdown/item-element/index.js.map +1 -1
- package/lib/internal/template/button-dropdown/item-element/styles.css.js +21 -21
- package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +37 -37
- package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +21 -21
- package/lib/internal/template/button-group/interfaces.d.ts +2 -0
- package/lib/internal/template/button-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/button-group/interfaces.js.map +1 -1
- package/lib/internal/template/checkbox/interfaces.d.ts +2 -0
- package/lib/internal/template/checkbox/interfaces.d.ts.map +1 -1
- package/lib/internal/template/checkbox/interfaces.js.map +1 -1
- package/lib/internal/template/checkbox/styles.css.js +3 -3
- package/lib/internal/template/checkbox/styles.scoped.css +11 -11
- package/lib/internal/template/checkbox/styles.selectors.js +3 -3
- package/lib/internal/template/container/interfaces.d.ts +2 -0
- package/lib/internal/template/container/interfaces.d.ts.map +1 -1
- package/lib/internal/template/container/interfaces.js.map +1 -1
- package/lib/internal/template/content-layout/styles.css.js +14 -14
- package/lib/internal/template/content-layout/styles.scoped.css +27 -27
- package/lib/internal/template/content-layout/styles.selectors.js +14 -14
- package/lib/internal/template/date-picker/index.d.ts.map +1 -1
- package/lib/internal/template/date-picker/index.js +1 -1
- package/lib/internal/template/date-picker/index.js.map +1 -1
- package/lib/internal/template/date-range-picker/index.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/index.js +1 -1
- package/lib/internal/template/date-range-picker/index.js.map +1 -1
- package/lib/internal/template/flashbar/interfaces.d.ts +2 -0
- package/lib/internal/template/flashbar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/flashbar/interfaces.js.map +1 -1
- package/lib/internal/template/flashbar/styles.css.js +50 -50
- package/lib/internal/template/flashbar/styles.scoped.css +187 -187
- package/lib/internal/template/flashbar/styles.selectors.js +50 -50
- package/lib/internal/template/help-panel/styles.css.js +6 -6
- package/lib/internal/template/help-panel/styles.scoped.css +73 -73
- package/lib/internal/template/help-panel/styles.selectors.js +6 -6
- package/lib/internal/template/input/interfaces.d.ts +2 -0
- package/lib/internal/template/input/interfaces.d.ts.map +1 -1
- package/lib/internal/template/input/interfaces.js.map +1 -1
- package/lib/internal/template/input/styles.css.js +13 -13
- package/lib/internal/template/input/styles.d.ts +9 -1
- package/lib/internal/template/input/styles.d.ts.map +1 -1
- package/lib/internal/template/input/styles.js +2 -39
- package/lib/internal/template/input/styles.js.map +1 -1
- package/lib/internal/template/input/styles.scoped.css +74 -74
- package/lib/internal/template/input/styles.selectors.js +13 -13
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.js +2 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +30 -30
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +58 -58
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
- package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.d.ts +9 -9
- package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.d.ts.map +1 -1
- package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.js +22 -23
- package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.js.map +1 -1
- package/lib/internal/template/internal/components/dropdown/dropdown-position.d.ts.map +1 -1
- package/lib/internal/template/internal/components/dropdown/dropdown-position.js +4 -1
- package/lib/internal/template/internal/components/dropdown/dropdown-position.js.map +1 -1
- package/lib/internal/template/internal/components/dropdown/index.d.ts +1 -1
- package/lib/internal/template/internal/components/dropdown/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/dropdown/index.js +52 -30
- package/lib/internal/template/internal/components/dropdown/index.js.map +1 -1
- package/lib/internal/template/internal/components/dropdown/interfaces.d.ts +20 -14
- package/lib/internal/template/internal/components/dropdown/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/dropdown/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/dropdown/styles.css.js +20 -20
- package/lib/internal/template/internal/components/dropdown/styles.scoped.css +39 -38
- package/lib/internal/template/internal/components/dropdown/styles.selectors.js +20 -20
- package/lib/internal/template/internal/components/radio-button/interfaces.d.ts +2 -0
- package/lib/internal/template/internal/components/radio-button/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/radio-button/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/radio-button/styles.css.js +7 -7
- package/lib/internal/template/internal/components/radio-button/styles.scoped.css +18 -18
- package/lib/internal/template/internal/components/radio-button/styles.selectors.js +7 -7
- package/lib/internal/template/internal/components/token-list/styles.css.js +10 -10
- package/lib/internal/template/internal/components/token-list/styles.scoped.css +25 -25
- package/lib/internal/template/internal/components/token-list/styles.selectors.js +10 -10
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts +1 -0
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.js +139 -138
- package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
- package/lib/internal/template/internal/utils/data-attributes.d.ts +2 -0
- package/lib/internal/template/internal/utils/data-attributes.d.ts.map +1 -0
- package/lib/internal/template/internal/utils/data-attributes.js +21 -0
- package/lib/internal/template/internal/utils/data-attributes.js.map +1 -0
- package/lib/internal/template/internal/utils/input-styles.d.ts +90 -0
- package/lib/internal/template/internal/utils/input-styles.d.ts.map +1 -0
- package/lib/internal/template/internal/utils/input-styles.js +54 -0
- package/lib/internal/template/internal/utils/input-styles.js.map +1 -0
- package/lib/internal/template/link/interfaces.d.ts +2 -0
- package/lib/internal/template/link/interfaces.d.ts.map +1 -1
- package/lib/internal/template/link/interfaces.js.map +1 -1
- package/lib/internal/template/link/styles.css.js +20 -20
- package/lib/internal/template/link/styles.scoped.css +103 -103
- package/lib/internal/template/link/styles.selectors.js +20 -20
- package/lib/internal/template/multiselect/internal.d.ts.map +1 -1
- package/lib/internal/template/multiselect/internal.js +2 -1
- package/lib/internal/template/multiselect/internal.js.map +1 -1
- package/lib/internal/template/progress-bar/interfaces.d.ts +2 -0
- package/lib/internal/template/progress-bar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/progress-bar/interfaces.js.map +1 -1
- package/lib/internal/template/progress-bar/styles.css.js +18 -18
- package/lib/internal/template/progress-bar/styles.scoped.css +48 -48
- package/lib/internal/template/progress-bar/styles.selectors.js +18 -18
- package/lib/internal/template/prompt-input/interfaces.d.ts +2 -0
- package/lib/internal/template/prompt-input/interfaces.d.ts.map +1 -1
- package/lib/internal/template/prompt-input/interfaces.js.map +1 -1
- package/lib/internal/template/prompt-input/styles.css.js +17 -17
- package/lib/internal/template/prompt-input/styles.scoped.css +79 -79
- package/lib/internal/template/prompt-input/styles.selectors.js +17 -17
- package/lib/internal/template/radio-group/interfaces.d.ts +2 -0
- package/lib/internal/template/radio-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/radio-group/interfaces.js.map +1 -1
- package/lib/internal/template/segmented-control/interfaces.d.ts +2 -0
- package/lib/internal/template/segmented-control/interfaces.d.ts.map +1 -1
- package/lib/internal/template/segmented-control/interfaces.js.map +1 -1
- package/lib/internal/template/segmented-control/styles.css.js +16 -16
- package/lib/internal/template/segmented-control/styles.scoped.css +46 -46
- package/lib/internal/template/segmented-control/styles.selectors.js +16 -16
- package/lib/internal/template/select/internal.d.ts.map +1 -1
- package/lib/internal/template/select/internal.js +2 -1
- package/lib/internal/template/select/internal.js.map +1 -1
- package/lib/internal/template/slider/interfaces.d.ts +2 -0
- package/lib/internal/template/slider/interfaces.d.ts.map +1 -1
- package/lib/internal/template/slider/interfaces.js.map +1 -1
- package/lib/internal/template/slider/styles.css.js +26 -26
- package/lib/internal/template/slider/styles.scoped.css +165 -165
- package/lib/internal/template/slider/styles.selectors.js +26 -26
- package/lib/internal/template/spinner/styles.css.js +13 -13
- package/lib/internal/template/spinner/styles.scoped.css +39 -39
- package/lib/internal/template/spinner/styles.selectors.js +13 -13
- package/lib/internal/template/tabs/interfaces.d.ts +2 -0
- package/lib/internal/template/tabs/interfaces.d.ts.map +1 -1
- package/lib/internal/template/tabs/interfaces.js.map +1 -1
- package/lib/internal/template/tabs/styles.css.js +30 -30
- package/lib/internal/template/tabs/styles.scoped.css +76 -76
- package/lib/internal/template/tabs/styles.selectors.js +30 -30
- package/lib/internal/template/tag-editor/styles.css.js +3 -3
- package/lib/internal/template/tag-editor/styles.scoped.css +13 -13
- package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
- package/lib/internal/template/text-content/styles.css.js +1 -1
- package/lib/internal/template/text-content/styles.scoped.css +66 -66
- package/lib/internal/template/text-content/styles.selectors.js +1 -1
- package/lib/internal/template/text-filter/interfaces.d.ts +2 -0
- package/lib/internal/template/text-filter/interfaces.d.ts.map +1 -1
- package/lib/internal/template/text-filter/interfaces.js.map +1 -1
- package/lib/internal/template/text-filter/styles.d.ts +9 -1
- package/lib/internal/template/text-filter/styles.d.ts.map +1 -1
- package/lib/internal/template/text-filter/styles.js +2 -39
- package/lib/internal/template/text-filter/styles.js.map +1 -1
- package/lib/internal/template/textarea/interfaces.d.ts +2 -0
- package/lib/internal/template/textarea/interfaces.d.ts.map +1 -1
- package/lib/internal/template/textarea/interfaces.js.map +1 -1
- package/lib/internal/template/textarea/styles.css.js +5 -5
- package/lib/internal/template/textarea/styles.d.ts +9 -1
- package/lib/internal/template/textarea/styles.d.ts.map +1 -1
- package/lib/internal/template/textarea/styles.js +2 -49
- package/lib/internal/template/textarea/styles.js.map +1 -1
- package/lib/internal/template/textarea/styles.scoped.css +45 -45
- package/lib/internal/template/textarea/styles.selectors.js +5 -5
- package/lib/internal/template/toggle/interfaces.d.ts +2 -0
- package/lib/internal/template/toggle/interfaces.d.ts.map +1 -1
- package/lib/internal/template/toggle/interfaces.js.map +1 -1
- package/lib/internal/template/toggle/styles.css.js +10 -10
- package/lib/internal/template/toggle/styles.scoped.css +23 -23
- package/lib/internal/template/toggle/styles.selectors.js +10 -10
- package/package.json +1 -1
|
@@ -158,7 +158,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
158
158
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
159
159
|
SPDX-License-Identifier: Apache-2.0
|
|
160
160
|
*/
|
|
161
|
-
.
|
|
161
|
+
.awsui_segment_8cbea_bo5ti_161:not(#\9) {
|
|
162
162
|
font-size: var(--font-size-body-m-vv54cm, 14px);
|
|
163
163
|
line-height: var(--line-height-body-m-bedeoh, 22px);
|
|
164
164
|
word-wrap: break-word;
|
|
@@ -170,8 +170,8 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
170
170
|
letter-spacing: 0.25px;
|
|
171
171
|
padding-block: var(--space-scaled-xxs-jatbiv, 4px);
|
|
172
172
|
padding-inline: calc(var(--space-button-horizontal-v8ywmo, 20px) - var(--space-static-xxs-0cgyf1, 4px));
|
|
173
|
-
background: var(--awsui-style-background-default-
|
|
174
|
-
color: var(--awsui-style-color-default-
|
|
173
|
+
background: var(--awsui-style-background-default-c5ek4l, var(--color-background-segment-default-zwi7m6, #ffffff));
|
|
174
|
+
color: var(--awsui-style-color-default-c5ek4l, var(--color-text-segment-default-a74tco, #545b64));
|
|
175
175
|
overflow: visible;
|
|
176
176
|
border-start-start-radius: var(--border-radius-button-vm1lh4, 2px);
|
|
177
177
|
border-start-end-radius: var(--border-radius-button-vm1lh4, 2px);
|
|
@@ -183,26 +183,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
183
183
|
align-items: center;
|
|
184
184
|
border-inline: none;
|
|
185
185
|
border-block: none;
|
|
186
|
-
--awsui-style-focus-ring-box-shadow-
|
|
186
|
+
--awsui-style-focus-ring-box-shadow-c5ek4l: 0 0 0 var(--awsui-style-focus-ring-border-width-c5ek4l, 2px) var(--awsui-style-focus-ring-border-color-c5ek4l, var(--color-border-item-focused-r5f6xl, #0073bb));
|
|
187
187
|
}
|
|
188
|
-
.
|
|
188
|
+
.awsui_segment_8cbea_bo5ti_161:not(#\9):not(.awsui_refresh_8cbea_bo5ti_188) {
|
|
189
189
|
block-size: calc(100% - var(--space-static-xxs-0cgyf1, 4px) - 2 * var(--border-width-field-9k1tdz, 1px));
|
|
190
190
|
}
|
|
191
|
-
.
|
|
191
|
+
.awsui_segment_8cbea_bo5ti_161:not(#\9):focus {
|
|
192
192
|
outline: none;
|
|
193
193
|
}
|
|
194
|
-
.
|
|
195
|
-
background: var(--awsui-style-background-disabled-
|
|
196
|
-
color: var(--awsui-style-color-disabled-
|
|
194
|
+
.awsui_segment_8cbea_bo5ti_161.awsui_disabled_8cbea_bo5ti_194:not(#\9) {
|
|
195
|
+
background: var(--awsui-style-background-disabled-c5ek4l, var(--color-background-segment-disabled-etp65k, #ffffff));
|
|
196
|
+
color: var(--awsui-style-color-disabled-c5ek4l, var(--color-text-interactive-disabled-xwt2jl, #aab7b8));
|
|
197
197
|
}
|
|
198
|
-
body[data-awsui-focus-visible=true] .
|
|
198
|
+
body[data-awsui-focus-visible=true] .awsui_segment_8cbea_bo5ti_161:not(#\9):focus {
|
|
199
199
|
position: relative;
|
|
200
200
|
}
|
|
201
|
-
body[data-awsui-focus-visible=true] .
|
|
201
|
+
body[data-awsui-focus-visible=true] .awsui_segment_8cbea_bo5ti_161:not(#\9):focus {
|
|
202
202
|
outline: 2px dotted transparent;
|
|
203
203
|
outline-offset: calc(var(--space-segmented-control-focus-outline-gutter-tvktqv, 3px) - 1px);
|
|
204
204
|
}
|
|
205
|
-
body[data-awsui-focus-visible=true] .
|
|
205
|
+
body[data-awsui-focus-visible=true] .awsui_segment_8cbea_bo5ti_161:not(#\9):focus::before {
|
|
206
206
|
content: " ";
|
|
207
207
|
display: block;
|
|
208
208
|
position: absolute;
|
|
@@ -210,14 +210,14 @@ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1av64_161:not(#\9):focu
|
|
|
210
210
|
inset-block-start: calc(-1 * var(--space-segmented-control-focus-outline-gutter-tvktqv, 3px));
|
|
211
211
|
inline-size: calc(100% + var(--space-segmented-control-focus-outline-gutter-tvktqv, 3px) + var(--space-segmented-control-focus-outline-gutter-tvktqv, 3px));
|
|
212
212
|
block-size: calc(100% + var(--space-segmented-control-focus-outline-gutter-tvktqv, 3px) + var(--space-segmented-control-focus-outline-gutter-tvktqv, 3px));
|
|
213
|
-
border-start-start-radius: var(--awsui-style-focus-ring-border-radius-
|
|
214
|
-
border-start-end-radius: var(--awsui-style-focus-ring-border-radius-
|
|
215
|
-
border-end-start-radius: var(--awsui-style-focus-ring-border-radius-
|
|
216
|
-
border-end-end-radius: var(--awsui-style-focus-ring-border-radius-
|
|
217
|
-
box-shadow: var(--awsui-style-focus-ring-box-shadow-
|
|
213
|
+
border-start-start-radius: var(--awsui-style-focus-ring-border-radius-c5ek4l, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
214
|
+
border-start-end-radius: var(--awsui-style-focus-ring-border-radius-c5ek4l, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
215
|
+
border-end-start-radius: var(--awsui-style-focus-ring-border-radius-c5ek4l, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
216
|
+
border-end-end-radius: var(--awsui-style-focus-ring-border-radius-c5ek4l, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
217
|
+
box-shadow: var(--awsui-style-focus-ring-box-shadow-c5ek4l);
|
|
218
218
|
z-index: 1;
|
|
219
219
|
}
|
|
220
|
-
.
|
|
220
|
+
.awsui_segment_8cbea_bo5ti_161:not(#\9):not(:last-child)::after {
|
|
221
221
|
content: "";
|
|
222
222
|
position: absolute;
|
|
223
223
|
inset-inline-end: calc(-1 * (var(--space-static-xxs-0cgyf1, 4px) + 1px));
|
|
@@ -227,53 +227,53 @@ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1av64_161:not(#\9):focu
|
|
|
227
227
|
background: var(--color-border-input-default-txli8y, #687078);
|
|
228
228
|
z-index: 1;
|
|
229
229
|
}
|
|
230
|
-
.
|
|
230
|
+
.awsui_segment_8cbea_bo5ti_161:not(#\9):not(.awsui_refresh_8cbea_bo5ti_188):not(:last-child)::after {
|
|
231
231
|
inset-inline-end: calc(-1 * var(--space-static-xxs-0cgyf1, 4px));
|
|
232
232
|
}
|
|
233
|
-
.
|
|
233
|
+
.awsui_segment_8cbea_bo5ti_161:not(#\9):nth-child(1) {
|
|
234
234
|
grid-column: 1;
|
|
235
235
|
}
|
|
236
|
-
.
|
|
236
|
+
.awsui_segment_8cbea_bo5ti_161:not(#\9):nth-child(2) {
|
|
237
237
|
grid-column: 2;
|
|
238
238
|
}
|
|
239
|
-
.
|
|
239
|
+
.awsui_segment_8cbea_bo5ti_161:not(#\9):nth-child(3) {
|
|
240
240
|
grid-column: 3;
|
|
241
241
|
}
|
|
242
|
-
.
|
|
242
|
+
.awsui_segment_8cbea_bo5ti_161:not(#\9):nth-child(4) {
|
|
243
243
|
grid-column: 4;
|
|
244
244
|
}
|
|
245
|
-
.
|
|
245
|
+
.awsui_segment_8cbea_bo5ti_161:not(#\9):nth-child(5) {
|
|
246
246
|
grid-column: 5;
|
|
247
247
|
}
|
|
248
|
-
.
|
|
248
|
+
.awsui_segment_8cbea_bo5ti_161:not(#\9):nth-child(6) {
|
|
249
249
|
grid-column: 6;
|
|
250
250
|
}
|
|
251
|
-
.
|
|
252
|
-
background: var(--awsui-style-background-active-
|
|
253
|
-
color: var(--awsui-style-color-active-
|
|
251
|
+
.awsui_segment_8cbea_bo5ti_161.awsui_selected_8cbea_bo5ti_251:not(#\9) {
|
|
252
|
+
background: var(--awsui-style-background-active-c5ek4l, var(--color-background-segment-active-pvua4h, #0073bb));
|
|
253
|
+
color: var(--awsui-style-color-active-c5ek4l, var(--color-text-segment-active-q50mlg, #ffffff));
|
|
254
254
|
}
|
|
255
|
-
.
|
|
256
|
-
background: var(--awsui-style-background-hover-
|
|
257
|
-
color: var(--awsui-style-color-hover-
|
|
255
|
+
.awsui_segment_8cbea_bo5ti_161:not(#\9):hover:not(.awsui_selected_8cbea_bo5ti_251):not(.awsui_disabled_8cbea_bo5ti_194):not(:focus) {
|
|
256
|
+
background: var(--awsui-style-background-hover-c5ek4l, var(--color-background-segment-hover-bakufl, #fafafa));
|
|
257
|
+
color: var(--awsui-style-color-hover-c5ek4l, var(--color-text-segment-hover-33xnva, #16191f));
|
|
258
258
|
cursor: pointer;
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
.
|
|
261
|
+
.awsui_icon_8cbea_bo5ti_261:not(#\9) {
|
|
262
262
|
/* used in test-utils */
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
.awsui_with-
|
|
265
|
+
.awsui_with-text_8cbea_bo5ti_265:not(#\9) {
|
|
266
266
|
position: relative;
|
|
267
267
|
inset-inline-start: calc(-1 * var(--space-xxs-jnczic, 4px));
|
|
268
268
|
margin-inline-end: var(--space-xxs-jnczic, 4px);
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
.awsui_with-no-
|
|
271
|
+
.awsui_with-no-text_8cbea_bo5ti_271:not(#\9) {
|
|
272
272
|
margin-inline: auto;
|
|
273
273
|
inset-inline: 0;
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
.
|
|
276
|
+
.awsui_root_8cbea_bo5ti_276:not(#\9) {
|
|
277
277
|
border-collapse: separate;
|
|
278
278
|
border-spacing: 0;
|
|
279
279
|
box-sizing: border-box;
|
|
@@ -305,7 +305,7 @@ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1av64_161:not(#\9):focu
|
|
|
305
305
|
-moz-osx-font-smoothing: auto;
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
.awsui_segment-
|
|
308
|
+
.awsui_segment-part_8cbea_bo5ti_308:not(#\9) {
|
|
309
309
|
display: inline-grid;
|
|
310
310
|
border-inline: solid var(--border-width-field-9k1tdz, 1px) var(--color-border-input-default-txli8y, #687078);
|
|
311
311
|
border-block: solid var(--border-width-field-9k1tdz, 1px) var(--color-border-input-default-txli8y, #687078);
|
|
@@ -320,46 +320,46 @@ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1av64_161:not(#\9):focu
|
|
|
320
320
|
padding-inline: calc(var(--space-static-xxs-0cgyf1, 4px) - var(--border-width-field-9k1tdz, 1px));
|
|
321
321
|
gap: calc(var(--space-static-xxs-0cgyf1, 4px) * 2 + 1px);
|
|
322
322
|
}
|
|
323
|
-
.awsui_segment-
|
|
323
|
+
.awsui_segment-part_8cbea_bo5ti_308:not(#\9):not(.awsui_refresh_8cbea_bo5ti_188) {
|
|
324
324
|
padding-inline: calc(var(--space-static-xxxs-zckw10, 2px) + var(--border-width-field-9k1tdz, 1px));
|
|
325
325
|
padding-block: 0;
|
|
326
326
|
gap: calc(var(--space-static-xxs-0cgyf1, 4px) * 2 - 1px);
|
|
327
327
|
}
|
|
328
328
|
@media (max-width: 688px) {
|
|
329
|
-
.awsui_segment-
|
|
329
|
+
.awsui_segment-part_8cbea_bo5ti_308:not(#\9) {
|
|
330
330
|
display: none;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
.
|
|
334
|
+
.awsui_select_8cbea_bo5ti_251:not(#\9) {
|
|
335
335
|
display: none;
|
|
336
336
|
}
|
|
337
337
|
@media (max-width: 688px) {
|
|
338
|
-
.
|
|
338
|
+
.awsui_select_8cbea_bo5ti_251:not(#\9) {
|
|
339
339
|
display: block;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
-
.awsui_segment-count-
|
|
343
|
+
.awsui_segment-count-2_8cbea_bo5ti_343:not(#\9) {
|
|
344
344
|
grid-template-columns: repeat(2, auto);
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
.awsui_segment-count-
|
|
347
|
+
.awsui_segment-count-3_8cbea_bo5ti_347:not(#\9) {
|
|
348
348
|
grid-template-columns: repeat(3, auto);
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
-
.awsui_segment-count-
|
|
351
|
+
.awsui_segment-count-4_8cbea_bo5ti_351:not(#\9) {
|
|
352
352
|
grid-template-columns: repeat(4, auto);
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
-
.awsui_segment-count-
|
|
355
|
+
.awsui_segment-count-5_8cbea_bo5ti_355:not(#\9) {
|
|
356
356
|
grid-template-columns: repeat(5, auto);
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
.awsui_segment-count-
|
|
359
|
+
.awsui_segment-count-6_8cbea_bo5ti_359:not(#\9) {
|
|
360
360
|
grid-template-columns: repeat(6, auto);
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
.awsui_disabled-reason-
|
|
363
|
+
.awsui_disabled-reason-tooltip_8cbea_bo5ti_363:not(#\9) {
|
|
364
364
|
/* used in test-utils or tests */
|
|
365
365
|
}
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"segment": "
|
|
6
|
-
"refresh": "
|
|
7
|
-
"disabled": "
|
|
8
|
-
"selected": "
|
|
9
|
-
"icon": "
|
|
10
|
-
"with-text": "awsui_with-
|
|
11
|
-
"with-no-text": "awsui_with-no-
|
|
12
|
-
"root": "
|
|
13
|
-
"segment-part": "awsui_segment-
|
|
14
|
-
"select": "
|
|
15
|
-
"segment-count-2": "awsui_segment-count-
|
|
16
|
-
"segment-count-3": "awsui_segment-count-
|
|
17
|
-
"segment-count-4": "awsui_segment-count-
|
|
18
|
-
"segment-count-5": "awsui_segment-count-
|
|
19
|
-
"segment-count-6": "awsui_segment-count-
|
|
20
|
-
"disabled-reason-tooltip": "awsui_disabled-reason-
|
|
5
|
+
"segment": "awsui_segment_8cbea_bo5ti_161",
|
|
6
|
+
"refresh": "awsui_refresh_8cbea_bo5ti_188",
|
|
7
|
+
"disabled": "awsui_disabled_8cbea_bo5ti_194",
|
|
8
|
+
"selected": "awsui_selected_8cbea_bo5ti_251",
|
|
9
|
+
"icon": "awsui_icon_8cbea_bo5ti_261",
|
|
10
|
+
"with-text": "awsui_with-text_8cbea_bo5ti_265",
|
|
11
|
+
"with-no-text": "awsui_with-no-text_8cbea_bo5ti_271",
|
|
12
|
+
"root": "awsui_root_8cbea_bo5ti_276",
|
|
13
|
+
"segment-part": "awsui_segment-part_8cbea_bo5ti_308",
|
|
14
|
+
"select": "awsui_select_8cbea_bo5ti_251",
|
|
15
|
+
"segment-count-2": "awsui_segment-count-2_8cbea_bo5ti_343",
|
|
16
|
+
"segment-count-3": "awsui_segment-count-3_8cbea_bo5ti_347",
|
|
17
|
+
"segment-count-4": "awsui_segment-count-4_8cbea_bo5ti_351",
|
|
18
|
+
"segment-count-5": "awsui_segment-count-5_8cbea_bo5ti_355",
|
|
19
|
+
"segment-count-6": "awsui_segment-count-6_8cbea_bo5ti_359",
|
|
20
|
+
"disabled-reason-tooltip": "awsui_disabled-reason-tooltip_8cbea_bo5ti_363"
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/select/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/select/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAgB3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAa3C,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,0BAA0B;IAC3G,kBAAkB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CACxC;AAED,QAAA,MAAM,cAAc,6FAkQnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -5,6 +5,7 @@ import clsx from 'clsx';
|
|
|
5
5
|
import { useMergeRefs, useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
6
6
|
import { useInternalI18n } from '../i18n/context.js';
|
|
7
7
|
import { getBaseProps } from '../internal/base-component';
|
|
8
|
+
import { getBreakpointValue } from '../internal/breakpoints';
|
|
8
9
|
import Dropdown from '../internal/components/dropdown';
|
|
9
10
|
import DropdownFooter from '../internal/components/dropdown-footer';
|
|
10
11
|
import { useDropdownStatus } from '../internal/components/dropdown-status';
|
|
@@ -122,7 +123,7 @@ const InternalSelect = React.forwardRef(({ options, filteringType = 'none', filt
|
|
|
122
123
|
const hasOptions = useRef(options.length > 0);
|
|
123
124
|
hasOptions.current = hasOptions.current || options.length > 0;
|
|
124
125
|
return (React.createElement("div", { ...baseProps, ref: mergedRef, className: clsx(styles.root, baseProps.className), onKeyDown: handleNativeSearch },
|
|
125
|
-
React.createElement(Dropdown, { ...dropdownProps, ariaLabelledby: dropdownProps.dropdownContentRole ? joinStrings(selectAriaLabelId, controlId) : undefined, ariaDescribedby: dropdownProps.dropdownContentRole ? (dropdownStatus.content ? footerId : undefined) : undefined, open: isOpen, stretchTriggerHeight: !!__inFilteringToken,
|
|
126
|
+
React.createElement(Dropdown, { ...dropdownProps, ariaLabelledby: dropdownProps.dropdownContentRole ? joinStrings(selectAriaLabelId, controlId) : undefined, ariaDescribedby: dropdownProps.dropdownContentRole ? (dropdownStatus.content ? footerId : undefined) : undefined, open: isOpen, stretchTriggerHeight: !!__inFilteringToken, minWidth: expandToViewport ? undefined : 'trigger', maxWidth: getBreakpointValue('xxs'), trigger: trigger, header: filter, onMouseDown: handleMouseDown, footer: dropdownStatus.isSticky ? (React.createElement(DropdownFooter, { content: isOpen ? dropdownStatus.content : null, id: footerId })) : null, expandToViewport: expandToViewport,
|
|
126
127
|
// Forces dropdown position recalculation when new options are loaded
|
|
127
128
|
contentKey: hasOptions.current.toString(), content: React.createElement(ListComponent, { listBottom: !dropdownStatus.isSticky ? (React.createElement(DropdownFooter, { content: isOpen ? dropdownStatus.content : null, id: footerId })) : null, renderOption: renderOption, menuProps: menuProps, getOptionProps: getOptionProps, filteredOptions: filteredOptions, filteringValue: filteringValue, ref: scrollToIndex, hasDropdownStatus: dropdownStatus.content !== null, screenReaderContent: announcement, highlightType: highlightType }) }),
|
|
128
129
|
React.createElement("div", { hidden: true, id: selectAriaLabelId }, ariaLabel || inlineLabelText)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/select/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEpG,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AACvD,OAAO,cAAc,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAE3E,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,eAAe,MAAM,oCAAoC,CAAC;AAGjE,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAExE,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,SAA8B,MAAM,oBAAoB,CAA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AAS,IAAI,eAAe,CACzB,CACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useInternalI18n } from '../i18n/context.js';\nimport { getBaseProps } from '../internal/base-component';\nimport Dropdown from '../internal/components/dropdown';\nimport DropdownFooter from '../internal/components/dropdown-footer';\nimport { useDropdownStatus } from '../internal/components/dropdown-status';\nimport { OptionGroup } from '../internal/components/option/interfaces.js';\nimport { prepareOptions } from '../internal/components/option/utils/prepare-options.js';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\nimport { joinStrings } from '../internal/utils/strings/join-strings.js';\nimport { SelectProps } from './interfaces';\nimport Filter from './parts/filter';\nimport PlainList, { SelectListProps } from './parts/plain-list';\nimport Trigger from './parts/trigger';\nimport VirtualList from './parts/virtual-list';\nimport { checkOptionValueField } from './utils/check-option-value-field';\nimport { useAnnouncement } from './utils/use-announcement';\nimport { useLoadItems } from './utils/use-load-items';\nimport { useNativeSearch } from './utils/use-native-search';\nimport { useSelect } from './utils/use-select';\n\nimport styles from './styles.css.js';\n\nexport interface InternalSelectProps extends SomeRequired<SelectProps, 'options'>, InternalBaseComponentProps {\n __inFilteringToken?: 'root' | 'nested';\n}\n\nconst InternalSelect = React.forwardRef(\n (\n {\n options,\n filteringType = 'none',\n filteringPlaceholder,\n filteringAriaLabel,\n filteringClearAriaLabel,\n filteringResultsText,\n inlineLabelText,\n ariaRequired,\n placeholder,\n disabled,\n readOnly,\n ariaLabel,\n statusType = 'finished',\n empty,\n loadingText,\n finishedText,\n errorText,\n noMatch,\n triggerVariant = 'label',\n renderHighlightedAriaLive,\n selectedOption,\n onBlur,\n onFocus,\n onLoadItems,\n onChange,\n virtualScroll,\n expandToViewport,\n autoFocus,\n __inFilteringToken,\n __internalRootRef,\n renderOption,\n ...restProps\n }: InternalSelectProps,\n externalRef: React.Ref<SelectProps.Ref>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n\n const i18n = useInternalI18n('select');\n const errorIconAriaLabel = i18n('errorIconAriaLabel', restProps.errorIconAriaLabel);\n const selectedAriaLabel = i18n('selectedAriaLabel', restProps.selectedAriaLabel);\n const recoveryText = i18n('recoveryText', restProps.recoveryText);\n\n if (restProps.recoveryText && !onLoadItems) {\n warnOnce('Select', '`onLoadItems` must be provided for `recoveryText` to be displayed.');\n }\n\n const { handleLoadMore, handleRecoveryClick, fireLoadItems } = useLoadItems({\n onLoadItems,\n options,\n statusType,\n });\n\n checkControlled('Select', 'selectedOption', selectedOption, 'onChange', onChange);\n\n checkOptionValueField('Select', 'options', options);\n\n const [filteringValue, setFilteringValue] = useState('');\n\n const { filteredOptions, parentMap, totalCount, matchesCount } = prepareOptions(\n options,\n filteringType,\n filteringValue\n );\n\n const rootRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n\n const selfControlId = useUniqueId('trigger');\n const controlId = formFieldContext.controlId ?? selfControlId;\n\n const scrollToIndex = useRef<SelectListProps.SelectListRef>(null);\n const {\n isOpen,\n highlightType,\n highlightedOption,\n highlightedIndex,\n getTriggerProps,\n getDropdownProps,\n getFilterProps,\n getMenuProps,\n getOptionProps,\n highlightOption,\n selectOption,\n announceSelected,\n focusActiveRef,\n } = useSelect({\n selectedOptions: selectedOption ? [selectedOption] : [],\n updateSelectedOption: option => fireNonCancelableEvent(onChange, { selectedOption: option }),\n options: filteredOptions,\n filteringType,\n onBlur,\n onFocus,\n externalRef,\n fireLoadItems,\n setFilteringValue,\n statusType,\n });\n\n const handleNativeSearch = useNativeSearch({\n isEnabled: filteringType === 'none' && !readOnly,\n options: filteredOptions,\n highlightOption: !isOpen ? selectOption : highlightOption,\n highlightedOption: !isOpen ? selectedOption : highlightedOption?.option,\n });\n\n const selectAriaLabelId = useUniqueId('select-arialabel-');\n const footerId = useUniqueId('footer');\n\n useEffect(() => {\n scrollToIndex.current?.(highlightedIndex);\n }, [highlightedIndex]);\n\n const filter = (\n <Filter\n clearAriaLabel={filteringClearAriaLabel}\n filteringType={filteringType}\n placeholder={filteringPlaceholder}\n ariaLabel={filteringAriaLabel}\n ariaRequired={ariaRequired}\n value={filteringValue}\n {...getFilterProps()}\n />\n );\n\n const trigger = (\n <Trigger\n renderOption={renderOption}\n ref={triggerRef}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n triggerVariant={triggerVariant}\n triggerProps={getTriggerProps(disabled, autoFocus)}\n selectedOption={selectedOption}\n isOpen={isOpen}\n inFilteringToken={__inFilteringToken}\n inlineLabelText={inlineLabelText}\n {...formFieldContext}\n controlId={controlId}\n ariaLabelledby={joinStrings(formFieldContext.ariaLabelledby, selectAriaLabelId)}\n />\n );\n\n const isEmpty = !options || options.length === 0;\n const isNoMatch = filteredOptions && filteredOptions.length === 0;\n const isFiltered =\n filteringType !== 'none' && filteringValue.length > 0 && filteredOptions && filteredOptions.length > 0;\n const filteredText = isFiltered ? filteringResultsText?.(matchesCount, totalCount) : undefined;\n\n const dropdownStatus = useDropdownStatus({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n filteringResultsText: filteredText,\n errorIconAriaLabel,\n onRecoveryClick: () => {\n handleRecoveryClick();\n focusActiveRef();\n },\n hasRecoveryCallback: !!onLoadItems,\n });\n\n const menuProps = {\n ...getMenuProps(),\n onLoadMore: handleLoadMore,\n ariaLabelledby: joinStrings(selectAriaLabelId, controlId),\n ariaDescribedby: dropdownStatus.content ? footerId : undefined,\n };\n\n const announcement = useAnnouncement({\n announceSelected,\n highlightedOption,\n getParent: option => parentMap.get(option)?.option as undefined | OptionGroup,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n });\n\n const ListComponent = virtualScroll ? VirtualList : PlainList;\n\n const handleMouseDown = (event: React.MouseEvent) => {\n const target = event.target as HTMLElement;\n\n if (target !== document.activeElement) {\n // prevent currently focused element from losing it\n event.preventDefault();\n }\n };\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n\n const dropdownProps = getDropdownProps();\n\n const hasOptions = useRef(options.length > 0);\n hasOptions.current = hasOptions.current || options.length > 0;\n\n return (\n <div\n {...baseProps}\n ref={mergedRef}\n className={clsx(styles.root, baseProps.className)}\n onKeyDown={handleNativeSearch}\n >\n <Dropdown\n {...dropdownProps}\n ariaLabelledby={dropdownProps.dropdownContentRole ? joinStrings(selectAriaLabelId, controlId) : undefined}\n ariaDescribedby={\n dropdownProps.dropdownContentRole ? (dropdownStatus.content ? footerId : undefined) : undefined\n }\n open={isOpen}\n stretchTriggerHeight={!!__inFilteringToken}\n stretchBeyondTriggerWidth={true}\n trigger={trigger}\n header={filter}\n onMouseDown={handleMouseDown}\n footer={\n dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n expandToViewport={expandToViewport}\n // Forces dropdown position recalculation when new options are loaded\n contentKey={hasOptions.current.toString()}\n content={\n <ListComponent\n listBottom={\n !dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n renderOption={renderOption}\n menuProps={menuProps}\n getOptionProps={getOptionProps}\n filteredOptions={filteredOptions}\n filteringValue={filteringValue}\n ref={scrollToIndex}\n hasDropdownStatus={dropdownStatus.content !== null}\n screenReaderContent={announcement}\n highlightType={highlightType}\n />\n }\n />\n <div hidden={true} id={selectAriaLabelId}>\n {ariaLabel || inlineLabelText}\n </div>\n </div>\n );\n }\n);\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AAC,CAAC,SAAS,EAClD,QAAQ,EAAE,kBAAkB,CAAC,KAAK,CAAC,EACnC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,eAAe,EAC5B,MAAM,EACJ,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CACxB,oBAAC,cAAc,IAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,GAAI,CAClF,CAAC,CAAC,CAAC,IAAI,EAEV,gBAAgB,EAAE,gBAAgB;YAClC,qEAAqE;YACrE,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,EACzC,OAAO,EACL,oBAAC,aAAa,IACZ,UAAU,EACR,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CACzB,oBAAC,cAAc,IAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,GAAI,CAClF,CAAC,CAAC,CAAC,IAAI,EAEV,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,GAAG,EAAE,aAAa,EAClB,iBAAiB,EAAE,cAAc,CAAC,OAAO,KAAK,IAAI,EAClD,mBAAmB,EAAE,YAAY,EACjC,aAAa,EAAE,aAAa,GAC5B,GAEJ;QACF,6BAAK,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,iBAAiB,IACrC,SAAS,IAAI,eAAe,CACzB,CACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useInternalI18n } from '../i18n/context.js';\nimport { getBaseProps } from '../internal/base-component';\nimport { getBreakpointValue } from '../internal/breakpoints';\nimport Dropdown from '../internal/components/dropdown';\nimport DropdownFooter from '../internal/components/dropdown-footer';\nimport { useDropdownStatus } from '../internal/components/dropdown-status';\nimport { OptionGroup } from '../internal/components/option/interfaces.js';\nimport { prepareOptions } from '../internal/components/option/utils/prepare-options.js';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\nimport { joinStrings } from '../internal/utils/strings/join-strings.js';\nimport { SelectProps } from './interfaces';\nimport Filter from './parts/filter';\nimport PlainList, { SelectListProps } from './parts/plain-list';\nimport Trigger from './parts/trigger';\nimport VirtualList from './parts/virtual-list';\nimport { checkOptionValueField } from './utils/check-option-value-field';\nimport { useAnnouncement } from './utils/use-announcement';\nimport { useLoadItems } from './utils/use-load-items';\nimport { useNativeSearch } from './utils/use-native-search';\nimport { useSelect } from './utils/use-select';\n\nimport styles from './styles.css.js';\n\nexport interface InternalSelectProps extends SomeRequired<SelectProps, 'options'>, InternalBaseComponentProps {\n __inFilteringToken?: 'root' | 'nested';\n}\n\nconst InternalSelect = React.forwardRef(\n (\n {\n options,\n filteringType = 'none',\n filteringPlaceholder,\n filteringAriaLabel,\n filteringClearAriaLabel,\n filteringResultsText,\n inlineLabelText,\n ariaRequired,\n placeholder,\n disabled,\n readOnly,\n ariaLabel,\n statusType = 'finished',\n empty,\n loadingText,\n finishedText,\n errorText,\n noMatch,\n triggerVariant = 'label',\n renderHighlightedAriaLive,\n selectedOption,\n onBlur,\n onFocus,\n onLoadItems,\n onChange,\n virtualScroll,\n expandToViewport,\n autoFocus,\n __inFilteringToken,\n __internalRootRef,\n renderOption,\n ...restProps\n }: InternalSelectProps,\n externalRef: React.Ref<SelectProps.Ref>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n\n const i18n = useInternalI18n('select');\n const errorIconAriaLabel = i18n('errorIconAriaLabel', restProps.errorIconAriaLabel);\n const selectedAriaLabel = i18n('selectedAriaLabel', restProps.selectedAriaLabel);\n const recoveryText = i18n('recoveryText', restProps.recoveryText);\n\n if (restProps.recoveryText && !onLoadItems) {\n warnOnce('Select', '`onLoadItems` must be provided for `recoveryText` to be displayed.');\n }\n\n const { handleLoadMore, handleRecoveryClick, fireLoadItems } = useLoadItems({\n onLoadItems,\n options,\n statusType,\n });\n\n checkControlled('Select', 'selectedOption', selectedOption, 'onChange', onChange);\n\n checkOptionValueField('Select', 'options', options);\n\n const [filteringValue, setFilteringValue] = useState('');\n\n const { filteredOptions, parentMap, totalCount, matchesCount } = prepareOptions(\n options,\n filteringType,\n filteringValue\n );\n\n const rootRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n\n const selfControlId = useUniqueId('trigger');\n const controlId = formFieldContext.controlId ?? selfControlId;\n\n const scrollToIndex = useRef<SelectListProps.SelectListRef>(null);\n const {\n isOpen,\n highlightType,\n highlightedOption,\n highlightedIndex,\n getTriggerProps,\n getDropdownProps,\n getFilterProps,\n getMenuProps,\n getOptionProps,\n highlightOption,\n selectOption,\n announceSelected,\n focusActiveRef,\n } = useSelect({\n selectedOptions: selectedOption ? [selectedOption] : [],\n updateSelectedOption: option => fireNonCancelableEvent(onChange, { selectedOption: option }),\n options: filteredOptions,\n filteringType,\n onBlur,\n onFocus,\n externalRef,\n fireLoadItems,\n setFilteringValue,\n statusType,\n });\n\n const handleNativeSearch = useNativeSearch({\n isEnabled: filteringType === 'none' && !readOnly,\n options: filteredOptions,\n highlightOption: !isOpen ? selectOption : highlightOption,\n highlightedOption: !isOpen ? selectedOption : highlightedOption?.option,\n });\n\n const selectAriaLabelId = useUniqueId('select-arialabel-');\n const footerId = useUniqueId('footer');\n\n useEffect(() => {\n scrollToIndex.current?.(highlightedIndex);\n }, [highlightedIndex]);\n\n const filter = (\n <Filter\n clearAriaLabel={filteringClearAriaLabel}\n filteringType={filteringType}\n placeholder={filteringPlaceholder}\n ariaLabel={filteringAriaLabel}\n ariaRequired={ariaRequired}\n value={filteringValue}\n {...getFilterProps()}\n />\n );\n\n const trigger = (\n <Trigger\n renderOption={renderOption}\n ref={triggerRef}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n triggerVariant={triggerVariant}\n triggerProps={getTriggerProps(disabled, autoFocus)}\n selectedOption={selectedOption}\n isOpen={isOpen}\n inFilteringToken={__inFilteringToken}\n inlineLabelText={inlineLabelText}\n {...formFieldContext}\n controlId={controlId}\n ariaLabelledby={joinStrings(formFieldContext.ariaLabelledby, selectAriaLabelId)}\n />\n );\n\n const isEmpty = !options || options.length === 0;\n const isNoMatch = filteredOptions && filteredOptions.length === 0;\n const isFiltered =\n filteringType !== 'none' && filteringValue.length > 0 && filteredOptions && filteredOptions.length > 0;\n const filteredText = isFiltered ? filteringResultsText?.(matchesCount, totalCount) : undefined;\n\n const dropdownStatus = useDropdownStatus({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n filteringResultsText: filteredText,\n errorIconAriaLabel,\n onRecoveryClick: () => {\n handleRecoveryClick();\n focusActiveRef();\n },\n hasRecoveryCallback: !!onLoadItems,\n });\n\n const menuProps = {\n ...getMenuProps(),\n onLoadMore: handleLoadMore,\n ariaLabelledby: joinStrings(selectAriaLabelId, controlId),\n ariaDescribedby: dropdownStatus.content ? footerId : undefined,\n };\n\n const announcement = useAnnouncement({\n announceSelected,\n highlightedOption,\n getParent: option => parentMap.get(option)?.option as undefined | OptionGroup,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n });\n\n const ListComponent = virtualScroll ? VirtualList : PlainList;\n\n const handleMouseDown = (event: React.MouseEvent) => {\n const target = event.target as HTMLElement;\n\n if (target !== document.activeElement) {\n // prevent currently focused element from losing it\n event.preventDefault();\n }\n };\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n\n const dropdownProps = getDropdownProps();\n\n const hasOptions = useRef(options.length > 0);\n hasOptions.current = hasOptions.current || options.length > 0;\n\n return (\n <div\n {...baseProps}\n ref={mergedRef}\n className={clsx(styles.root, baseProps.className)}\n onKeyDown={handleNativeSearch}\n >\n <Dropdown\n {...dropdownProps}\n ariaLabelledby={dropdownProps.dropdownContentRole ? joinStrings(selectAriaLabelId, controlId) : undefined}\n ariaDescribedby={\n dropdownProps.dropdownContentRole ? (dropdownStatus.content ? footerId : undefined) : undefined\n }\n open={isOpen}\n stretchTriggerHeight={!!__inFilteringToken}\n minWidth={expandToViewport ? undefined : 'trigger'}\n maxWidth={getBreakpointValue('xxs')} // AWSUI-19898\n trigger={trigger}\n header={filter}\n onMouseDown={handleMouseDown}\n footer={\n dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n expandToViewport={expandToViewport}\n // Forces dropdown position recalculation when new options are loaded\n contentKey={hasOptions.current.toString()}\n content={\n <ListComponent\n listBottom={\n !dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n renderOption={renderOption}\n menuProps={menuProps}\n getOptionProps={getOptionProps}\n filteredOptions={filteredOptions}\n filteringValue={filteringValue}\n ref={scrollToIndex}\n hasDropdownStatus={dropdownStatus.content !== null}\n screenReaderContent={announcement}\n highlightType={highlightType}\n />\n }\n />\n <div hidden={true} id={selectAriaLabelId}>\n {ariaLabel || inlineLabelText}\n </div>\n </div>\n );\n }\n);\n\nexport default InternalSelect;\n"]}
|
|
@@ -67,6 +67,8 @@ export interface SliderProps extends BaseComponentProps, FormFieldValidationCont
|
|
|
67
67
|
*/
|
|
68
68
|
readOnly?: boolean;
|
|
69
69
|
/**
|
|
70
|
+
* An object containing CSS properties to customize the slider's visual appearance.
|
|
71
|
+
* Refer to the [style](/components/slider/?tabId=style) tab for more details.
|
|
70
72
|
* @awsuiSystem core
|
|
71
73
|
*/
|
|
72
74
|
style?: SliderProps.Style;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/slider/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,WAAY,SAAQ,kBAAkB,EAAE,+BAA+B;IACtF;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAE3C;;;OAGG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAE/D;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAExC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC;IAEt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AC3B,UAAiB,YAAY;QAC3B,KAAK,EAAE,MAAM,CAAC;KACf;IACD,UAAiB,WAAW;QAC1B;;WAEG;QACH,cAAc,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;KACrF;IAED,UAAiB,KAAK;QACpB,KAAK,CAAC,EAAE;YACN,eAAe,CAAC,EAAE,MAAM,CAAC;SAC1B,CAAC;QACF,KAAK,CAAC,EAAE;YACN,eAAe,CAAC,EAAE;gBAChB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,MAAM,CAAC,EAAE,MAAM,CAAC;aACjB,CAAC;SACH,CAAC;QACF,MAAM,CAAC,EAAE;YACP,eAAe,CAAC,EAAE;gBAChB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,MAAM,CAAC,EAAE,MAAM,CAAC;aACjB,CAAC;YACF,YAAY,CAAC,EAAE,MAAM,CAAC;SACvB,CAAC;KACH;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/slider/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface SliderProps extends BaseComponentProps, FormFieldValidationControlProps {\n /**\n * Indicates the current value.\n */\n value?: number;\n\n /**\n * Indicates the minimum value.\n */\n min: number;\n\n /**\n * Indicates the maximum value.\n */\n max: number;\n\n /**\n * Formats the values. This will format both the labels and the tooltip.\n */\n valueFormatter?: (value: number) => string;\n\n /**\n * Called when the user selects a value.\n * The event `detail` contains the current `value`.\n */\n onChange?: NonCancelableEventHandler<SliderProps.ChangeDetail>;\n\n /**\n * How big the step size is.\n */\n step?: number;\n\n /**\n * Hides the colored fill line, so only the handle is visible.\n */\n hideFillLine?: boolean;\n\n /**\n * Show the tick marks along the slider line. Use with stepped sliders, except in extreme cases.\n */\n tickMarks?: boolean;\n\n /**\n * Whether or not the slider is disabled.\n */\n disabled?: boolean;\n\n /**\n * Labels shown between the minimum and maximum values.\n */\n referenceValues?: ReadonlyArray<number>;\n\n /**\n * Adds an `aria-label` to the native control.\n *\n * Use this if you don't have a visible label for this control.\n */\n ariaLabel?: string;\n\n /**\n * Adds an aria-description for slider labels.\n *\n * Use when sliders have formatted reference values.\n */\n ariaDescription?: string;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: SliderProps.I18nStrings;\n\n /**\n * Specifies if the control is read-only, which prevents the\n * user from modifying the value, but does not prevent the value from\n * being included in a form submission. A read-only control is still focusable.\n */\n readOnly?: boolean;\n\n /**\n * @awsuiSystem core\n */\n style?: SliderProps.Style;\n}\n\nexport namespace SliderProps {\n export interface ChangeDetail {\n value: number;\n }\n export interface I18nStrings {\n /**\n The aria value text displayed when the slider value is between two labeled values.\n */\n valueTextRange: (previousValue: string, value: number, nextValue: string) => string;\n }\n\n export interface Style {\n track?: {\n backgroundColor?: string;\n };\n range?: {\n backgroundColor?: {\n default?: string;\n active?: string;\n };\n };\n handle?: {\n backgroundColor?: {\n default?: string;\n hover?: string;\n active?: string;\n };\n borderRadius?: string;\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/slider/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface SliderProps extends BaseComponentProps, FormFieldValidationControlProps {\n /**\n * Indicates the current value.\n */\n value?: number;\n\n /**\n * Indicates the minimum value.\n */\n min: number;\n\n /**\n * Indicates the maximum value.\n */\n max: number;\n\n /**\n * Formats the values. This will format both the labels and the tooltip.\n */\n valueFormatter?: (value: number) => string;\n\n /**\n * Called when the user selects a value.\n * The event `detail` contains the current `value`.\n */\n onChange?: NonCancelableEventHandler<SliderProps.ChangeDetail>;\n\n /**\n * How big the step size is.\n */\n step?: number;\n\n /**\n * Hides the colored fill line, so only the handle is visible.\n */\n hideFillLine?: boolean;\n\n /**\n * Show the tick marks along the slider line. Use with stepped sliders, except in extreme cases.\n */\n tickMarks?: boolean;\n\n /**\n * Whether or not the slider is disabled.\n */\n disabled?: boolean;\n\n /**\n * Labels shown between the minimum and maximum values.\n */\n referenceValues?: ReadonlyArray<number>;\n\n /**\n * Adds an `aria-label` to the native control.\n *\n * Use this if you don't have a visible label for this control.\n */\n ariaLabel?: string;\n\n /**\n * Adds an aria-description for slider labels.\n *\n * Use when sliders have formatted reference values.\n */\n ariaDescription?: string;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: SliderProps.I18nStrings;\n\n /**\n * Specifies if the control is read-only, which prevents the\n * user from modifying the value, but does not prevent the value from\n * being included in a form submission. A read-only control is still focusable.\n */\n readOnly?: boolean;\n\n /**\n * An object containing CSS properties to customize the slider's visual appearance.\n * Refer to the [style](/components/slider/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: SliderProps.Style;\n}\n\nexport namespace SliderProps {\n export interface ChangeDetail {\n value: number;\n }\n export interface I18nStrings {\n /**\n The aria value text displayed when the slider value is between two labeled values.\n */\n valueTextRange: (previousValue: string, value: number, nextValue: string) => string;\n }\n\n export interface Style {\n track?: {\n backgroundColor?: string;\n };\n range?: {\n backgroundColor?: {\n default?: string;\n active?: string;\n };\n };\n handle?: {\n backgroundColor?: {\n default?: string;\n hover?: string;\n active?: string;\n };\n borderRadius?: string;\n };\n }\n}\n"]}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"slider": "
|
|
6
|
-
"slider-track": "awsui_slider-
|
|
7
|
-
"slider-range": "awsui_slider-
|
|
8
|
-
"disabled": "
|
|
9
|
-
"readonly": "
|
|
10
|
-
"error": "
|
|
11
|
-
"warning": "
|
|
12
|
-
"active": "
|
|
13
|
-
"error-active": "awsui_error-
|
|
14
|
-
"warning-active": "awsui_warning-
|
|
15
|
-
"labels": "
|
|
16
|
-
"labels-noref": "awsui_labels-
|
|
17
|
-
"labels-reference": "awsui_labels-
|
|
18
|
-
"labels-min": "awsui_labels-
|
|
19
|
-
"labels-max": "awsui_labels-
|
|
20
|
-
"labels-aria-description": "awsui_labels-aria-
|
|
21
|
-
"ticks": "
|
|
22
|
-
"ticks-wrapper": "awsui_ticks-
|
|
23
|
-
"tick": "
|
|
24
|
-
"middle": "
|
|
25
|
-
"filled": "
|
|
26
|
-
"tooltip-thumb": "awsui_tooltip-
|
|
27
|
-
"thumb": "
|
|
28
|
-
"min": "
|
|
29
|
-
"max": "
|
|
4
|
+
"root": "awsui_root_pcgz5_9y10w_153",
|
|
5
|
+
"slider": "awsui_slider_pcgz5_9y10w_190",
|
|
6
|
+
"slider-track": "awsui_slider-track_pcgz5_9y10w_194",
|
|
7
|
+
"slider-range": "awsui_slider-range_pcgz5_9y10w_194",
|
|
8
|
+
"disabled": "awsui_disabled_pcgz5_9y10w_209",
|
|
9
|
+
"readonly": "awsui_readonly_pcgz5_9y10w_213",
|
|
10
|
+
"error": "awsui_error_pcgz5_9y10w_222",
|
|
11
|
+
"warning": "awsui_warning_pcgz5_9y10w_225",
|
|
12
|
+
"active": "awsui_active_pcgz5_9y10w_228",
|
|
13
|
+
"error-active": "awsui_error-active_pcgz5_9y10w_231",
|
|
14
|
+
"warning-active": "awsui_warning-active_pcgz5_9y10w_234",
|
|
15
|
+
"labels": "awsui_labels_pcgz5_9y10w_245",
|
|
16
|
+
"labels-noref": "awsui_labels-noref_pcgz5_9y10w_251",
|
|
17
|
+
"labels-reference": "awsui_labels-reference_pcgz5_9y10w_254",
|
|
18
|
+
"labels-min": "awsui_labels-min_pcgz5_9y10w_261",
|
|
19
|
+
"labels-max": "awsui_labels-max_pcgz5_9y10w_267",
|
|
20
|
+
"labels-aria-description": "awsui_labels-aria-description_pcgz5_9y10w_275",
|
|
21
|
+
"ticks": "awsui_ticks_pcgz5_9y10w_293",
|
|
22
|
+
"ticks-wrapper": "awsui_ticks-wrapper_pcgz5_9y10w_299",
|
|
23
|
+
"tick": "awsui_tick_pcgz5_9y10w_293",
|
|
24
|
+
"middle": "awsui_middle_pcgz5_9y10w_314",
|
|
25
|
+
"filled": "awsui_filled_pcgz5_9y10w_317",
|
|
26
|
+
"tooltip-thumb": "awsui_tooltip-thumb_pcgz5_9y10w_345",
|
|
27
|
+
"thumb": "awsui_thumb_pcgz5_9y10w_358",
|
|
28
|
+
"min": "awsui_min_pcgz5_9y10w_394",
|
|
29
|
+
"max": "awsui_max_pcgz5_9y10w_397"
|
|
30
30
|
};
|
|
31
31
|
|