@cloudscape-design/components-themeable 3.0.1073 → 3.0.1075
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/alert/styles.scss +5 -5
- package/lib/internal/scss/internal/components/drag-handle/styles.scss +4 -0
- package/lib/internal/scss/internal/components/sortable-area/styles.scss +1 -3
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +80 -76
- package/lib/internal/template/alert/index.d.ts.map +1 -1
- package/lib/internal/template/alert/index.js +7 -5
- package/lib/internal/template/alert/index.js.map +1 -1
- package/lib/internal/template/alert/internal.d.ts +1 -1
- package/lib/internal/template/alert/internal.js +1 -1
- package/lib/internal/template/alert/internal.js.map +1 -1
- package/lib/internal/template/alert/style.js +3 -3
- package/lib/internal/template/alert/style.js.map +1 -1
- package/lib/internal/template/alert/styles.css.js +27 -27
- package/lib/internal/template/alert/styles.scoped.css +46 -46
- package/lib/internal/template/alert/styles.selectors.js +27 -27
- package/lib/internal/template/anchor-navigation/internal.d.ts.map +1 -1
- package/lib/internal/template/anchor-navigation/internal.js +1 -1
- package/lib/internal/template/anchor-navigation/internal.js.map +1 -1
- package/lib/internal/template/annotation-context/annotation/styles.css.js +24 -24
- package/lib/internal/template/annotation-context/annotation/styles.scoped.css +32 -32
- package/lib/internal/template/annotation-context/annotation/styles.selectors.js +24 -24
- package/lib/internal/template/app-layout/index.js.map +1 -1
- 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 +17 -17
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +39 -39
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +17 -17
- 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 +23 -23
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +46 -46
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +23 -23
- package/lib/internal/template/app-layout-toolbar/index.js.map +1 -1
- package/lib/internal/template/area-chart/internal.d.ts.map +1 -1
- package/lib/internal/template/area-chart/internal.js +1 -1
- package/lib/internal/template/area-chart/internal.js.map +1 -1
- package/lib/internal/template/attribute-editor/internal.js +1 -1
- package/lib/internal/template/attribute-editor/internal.js.map +1 -1
- 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/box/internal.d.ts.map +1 -1
- package/lib/internal/template/box/internal.js +1 -1
- package/lib/internal/template/box/internal.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/breadcrumb-group/skeleton.d.ts +1 -1
- package/lib/internal/template/button/internal.d.ts +2 -2
- package/lib/internal/template/button/internal.d.ts.map +1 -1
- package/lib/internal/template/button/internal.js +1 -1
- package/lib/internal/template/button/internal.js.map +1 -1
- package/lib/internal/template/button/styles.css.js +22 -22
- package/lib/internal/template/button/styles.scoped.css +212 -212
- package/lib/internal/template/button/styles.selectors.js +22 -22
- package/lib/internal/template/button-dropdown/item-element/styles.css.js +16 -16
- package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +27 -27
- package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +16 -16
- package/lib/internal/template/button-group/internal.js +1 -1
- package/lib/internal/template/button-group/internal.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/internal.d.ts.map +1 -1
- package/lib/internal/template/container/internal.js +1 -1
- package/lib/internal/template/container/internal.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/copy-to-clipboard/internal.d.ts.map +1 -1
- package/lib/internal/template/copy-to-clipboard/internal.js +1 -1
- package/lib/internal/template/copy-to-clipboard/internal.js.map +1 -1
- package/lib/internal/template/date-input/internal.d.ts +1 -1
- package/lib/internal/template/date-input/internal.js +1 -1
- package/lib/internal/template/date-input/internal.js.map +1 -1
- package/lib/internal/template/file-dropzone/internal.d.ts.map +1 -1
- package/lib/internal/template/file-dropzone/internal.js +1 -1
- package/lib/internal/template/file-dropzone/internal.js.map +1 -1
- package/lib/internal/template/file-input/internal.d.ts +1 -1
- package/lib/internal/template/file-input/internal.d.ts.map +1 -1
- package/lib/internal/template/file-input/internal.js +1 -1
- package/lib/internal/template/file-input/internal.js.map +1 -1
- package/lib/internal/template/file-upload/internal.d.ts +1 -1
- package/lib/internal/template/file-upload/internal.js +1 -1
- package/lib/internal/template/file-upload/internal.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/form/index.d.ts.map +1 -1
- package/lib/internal/template/form/index.js +6 -5
- package/lib/internal/template/form/index.js.map +1 -1
- package/lib/internal/template/form-field/interfaces.d.ts +1 -1
- package/lib/internal/template/form-field/interfaces.d.ts.map +1 -1
- package/lib/internal/template/form-field/interfaces.js.map +1 -1
- package/lib/internal/template/form-field/internal.d.ts.map +1 -1
- package/lib/internal/template/form-field/internal.js +6 -4
- package/lib/internal/template/form-field/internal.js.map +1 -1
- package/lib/internal/template/grid/internal.js +1 -1
- package/lib/internal/template/grid/internal.js.map +1 -1
- package/lib/internal/template/header/internal.d.ts.map +1 -1
- package/lib/internal/template/header/internal.js +1 -1
- package/lib/internal/template/header/internal.js.map +1 -1
- 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/icon/internal.js +1 -1
- package/lib/internal/template/icon/internal.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/drag-handle/button.d.ts +1 -1
- package/lib/internal/template/internal/components/drag-handle/button.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/button.js +8 -4
- package/lib/internal/template/internal/components/drag-handle/button.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/index.d.ts +1 -1
- package/lib/internal/template/internal/components/drag-handle/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/index.js +3 -3
- package/lib/internal/template/internal/components/drag-handle/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts +3 -0
- package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/styles.css.js +14 -13
- package/lib/internal/template/internal/components/drag-handle/styles.scoped.css +22 -18
- package/lib/internal/template/internal/components/drag-handle/styles.selectors.js +14 -13
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.d.ts +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.js +10 -9
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/interfaces.d.ts +2 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +21 -21
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +44 -44
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +21 -21
- package/lib/internal/template/internal/components/dropdown/styles.css.js +20 -20
- package/lib/internal/template/internal/components/dropdown/styles.scoped.css +38 -38
- package/lib/internal/template/internal/components/dropdown/styles.selectors.js +20 -20
- package/lib/internal/template/internal/components/sortable-area/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/sortable-area/index.js +20 -5
- package/lib/internal/template/internal/components/sortable-area/index.js.map +1 -1
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/index.d.ts +20 -5
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/index.js +60 -36
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/index.js.map +1 -1
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/utilities/events.d.ts +3 -1
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/utilities/events.d.ts.map +1 -1
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/utilities/events.js +2 -0
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/utilities/events.js.map +1 -1
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/utilities/scroll.d.ts +1 -1
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/utilities/scroll.d.ts.map +1 -1
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/utilities/scroll.js +4 -9
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/utilities/scroll.js.map +1 -1
- package/lib/internal/template/internal/components/sortable-area/styles.css.js +8 -8
- package/lib/internal/template/internal/components/sortable-area/styles.scoped.css +15 -19
- package/lib/internal/template/internal/components/sortable-area/styles.selectors.js +8 -8
- package/lib/internal/template/internal/components/sortable-area/use-drag-and-drop-reorder.d.ts +4 -2
- package/lib/internal/template/internal/components/sortable-area/use-drag-and-drop-reorder.d.ts.map +1 -1
- package/lib/internal/template/internal/components/sortable-area/use-drag-and-drop-reorder.js +36 -40
- package/lib/internal/template/internal/components/sortable-area/use-drag-and-drop-reorder.js.map +1 -1
- 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 +4 -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 +79 -75
- package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
- package/lib/internal/template/internal/generated/theming/index.cjs +14 -0
- package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +63 -0
- package/lib/internal/template/internal/generated/theming/index.d.ts +63 -0
- package/lib/internal/template/internal/generated/theming/index.js +14 -0
- package/lib/internal/template/internal/hooks/use-base-component/index.d.ts +5 -5
- package/lib/internal/template/internal/hooks/use-base-component/index.d.ts.map +1 -1
- package/lib/internal/template/internal/hooks/use-base-component/index.js.map +1 -1
- package/lib/internal/template/link/internal.d.ts +1 -1
- package/lib/internal/template/link/internal.d.ts.map +1 -1
- package/lib/internal/template/link/internal.js +2 -4
- package/lib/internal/template/link/internal.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/list/internal.d.ts.map +1 -1
- package/lib/internal/template/list/internal.js +1 -1
- package/lib/internal/template/list/internal.js.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/internal.d.ts.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/internal.js +1 -1
- package/lib/internal/template/mixed-line-bar-chart/internal.js.map +1 -1
- package/lib/internal/template/modal/internal.js +1 -1
- package/lib/internal/template/modal/internal.js.map +1 -1
- package/lib/internal/template/multiselect/internal.d.ts +1 -1
- package/lib/internal/template/multiselect/internal.d.ts.map +1 -1
- package/lib/internal/template/multiselect/internal.js +1 -1
- package/lib/internal/template/multiselect/internal.js.map +1 -1
- package/lib/internal/template/pagination/internal.d.ts.map +1 -1
- package/lib/internal/template/pagination/internal.js +1 -1
- package/lib/internal/template/pagination/internal.js.map +1 -1
- package/lib/internal/template/popover/internal.js +1 -1
- package/lib/internal/template/popover/internal.js.map +1 -1
- package/lib/internal/template/prompt-input/internal.js +1 -1
- package/lib/internal/template/prompt-input/internal.js.map +1 -1
- package/lib/internal/template/property-filter/interfaces.d.ts +2 -1
- package/lib/internal/template/property-filter/interfaces.d.ts.map +1 -1
- package/lib/internal/template/property-filter/interfaces.js.map +1 -1
- package/lib/internal/template/property-filter/internal.d.ts +1 -1
- package/lib/internal/template/property-filter/internal.d.ts.map +1 -1
- package/lib/internal/template/radio-group/internal.d.ts +1 -1
- package/lib/internal/template/radio-group/internal.d.ts.map +1 -1
- package/lib/internal/template/radio-group/internal.js +1 -1
- package/lib/internal/template/radio-group/internal.js.map +1 -1
- package/lib/internal/template/radio-group/styles.css.js +10 -10
- package/lib/internal/template/radio-group/styles.scoped.css +22 -22
- package/lib/internal/template/radio-group/styles.selectors.js +10 -10
- package/lib/internal/template/segmented-control/internal.d.ts.map +1 -1
- package/lib/internal/template/segmented-control/internal.js +1 -1
- package/lib/internal/template/segmented-control/internal.js.map +1 -1
- package/lib/internal/template/select/internal.js +1 -1
- package/lib/internal/template/select/internal.js.map +1 -1
- package/lib/internal/template/slider/internal.d.ts.map +1 -1
- package/lib/internal/template/slider/internal.js +1 -1
- package/lib/internal/template/slider/internal.js.map +1 -1
- package/lib/internal/template/slider/styles.css.js +26 -26
- package/lib/internal/template/slider/styles.scoped.css +86 -86
- package/lib/internal/template/slider/styles.selectors.js +26 -26
- package/lib/internal/template/space-between/internal.d.ts +1 -1
- package/lib/internal/template/space-between/internal.d.ts.map +1 -1
- 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/steps/internal.d.ts +1 -1
- package/lib/internal/template/steps/internal.d.ts.map +1 -1
- package/lib/internal/template/steps/internal.js.map +1 -1
- 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/internal.d.ts +1 -1
- package/lib/internal/template/text-filter/internal.d.ts.map +1 -1
- package/lib/internal/template/tiles/internal.d.ts +1 -1
- package/lib/internal/template/tiles/internal.d.ts.map +1 -1
- package/lib/internal/template/tiles/internal.js +1 -1
- package/lib/internal/template/tiles/internal.js.map +1 -1
- package/lib/internal/template/time-input/internal.d.ts +1 -1
- package/lib/internal/template/time-input/internal.d.ts.map +1 -1
- package/lib/internal/template/time-input/internal.js +1 -1
- package/lib/internal/template/time-input/internal.js.map +1 -1
- package/lib/internal/template/toggle/internal.js +1 -1
- package/lib/internal/template/toggle/internal.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/lib/internal/template/wizard/wizard-form.js +5 -3
- package/lib/internal/template/wizard/wizard-form.js.map +1 -1
- package/package.json +1 -1
|
@@ -150,10 +150,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
150
150
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
151
151
|
SPDX-License-Identifier: Apache-2.0
|
|
152
152
|
*/
|
|
153
|
-
.awsui_empty-
|
|
154
|
-
animation: awsui_awsui-motion-fade-
|
|
153
|
+
.awsui_empty-appear_n4qlp_o19p5_153:not(#\9) {
|
|
154
|
+
animation: awsui_awsui-motion-fade-in_n4qlp_o19p5_1 var(--motion-duration-transition-show-paced-0w35xp, 180ms) var(--motion-easing-transition-show-paced-ufdgkj, ease-out);
|
|
155
155
|
}
|
|
156
|
-
@keyframes awsui_awsui-motion-fade-
|
|
156
|
+
@keyframes awsui_awsui-motion-fade-in_n4qlp_o19p5_1 {
|
|
157
157
|
from {
|
|
158
158
|
opacity: 0.2;
|
|
159
159
|
}
|
|
@@ -162,17 +162,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
@media (prefers-reduced-motion: reduce) {
|
|
165
|
-
.awsui_empty-
|
|
165
|
+
.awsui_empty-appear_n4qlp_o19p5_153:not(#\9) {
|
|
166
166
|
animation: none;
|
|
167
167
|
transition: none;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
.awsui-motion-disabled .awsui_empty-
|
|
170
|
+
.awsui-motion-disabled .awsui_empty-appear_n4qlp_o19p5_153:not(#\9), .awsui-mode-entering .awsui_empty-appear_n4qlp_o19p5_153:not(#\9) {
|
|
171
171
|
animation: none;
|
|
172
172
|
transition: none;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
.
|
|
175
|
+
.awsui_root_n4qlp_o19p5_175:not(#\9) {
|
|
176
176
|
border-collapse: separate;
|
|
177
177
|
border-spacing: 0;
|
|
178
178
|
box-sizing: border-box;
|
|
@@ -208,31 +208,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
208
208
|
align-items: start;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
.
|
|
211
|
+
.awsui_empty_n4qlp_o19p5_153:not(#\9) {
|
|
212
212
|
font-size: var(--font-size-body-m-vv54cm, 14px);
|
|
213
213
|
line-height: var(--line-height-body-m-bedeoh, 22px);
|
|
214
214
|
color: var(--color-text-empty-vtt4l2, #687078);
|
|
215
215
|
grid-column: 1/-1;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
.
|
|
218
|
+
.awsui_row_n4qlp_o19p5_218:not(#\9) {
|
|
219
219
|
display: contents;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
.
|
|
222
|
+
.awsui_divider_n4qlp_o19p5_222:not(#\9) {
|
|
223
223
|
grid-column: 1/-1;
|
|
224
224
|
border-block-start: var(--border-divider-section-width-sznrdy, 1px) solid var(--color-border-divider-default-ipvpev, #eaeded);
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
.awsui_row-
|
|
227
|
+
.awsui_row-control_n4qlp_o19p5_227:not(#\9) {
|
|
228
228
|
/* used in test-utils */
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
.
|
|
231
|
+
.awsui_field_n4qlp_o19p5_231:not(#\9) {
|
|
232
232
|
/* used in test-utils */
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
.awsui_additional-
|
|
235
|
+
.awsui_additional-info_n4qlp_o19p5_235:not(#\9) {
|
|
236
236
|
color: var(--color-text-form-secondary-4sp9un, #687078);
|
|
237
237
|
font-size: var(--font-size-body-s-psgqn2, 12px);
|
|
238
238
|
line-height: var(--line-height-body-s-otgtsr, 16px);
|
|
@@ -242,10 +242,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
242
242
|
margin-block-start: var(--space-xxs-jnczic, 4px);
|
|
243
243
|
/* stylelint-disable-next-line selector-max-type */
|
|
244
244
|
}
|
|
245
|
-
.awsui_additional-
|
|
245
|
+
.awsui_additional-info_n4qlp_o19p5_235 > a:not(#\9) {
|
|
246
246
|
text-underline-offset: 0.3em;
|
|
247
247
|
text-decoration-thickness: 1px;
|
|
248
|
-
color: var(--awsui-style-color-default-
|
|
248
|
+
color: var(--awsui-style-color-default-mdigke, var(--color-text-link-default-x6cnv5, #0073bb));
|
|
249
249
|
font-weight: inherit;
|
|
250
250
|
letter-spacing: normal;
|
|
251
251
|
text-decoration-line: underline;
|
|
@@ -256,50 +256,50 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
256
256
|
transition-duration: var(--motion-duration-refresh-only-medium-h3wrr6, 0ms);
|
|
257
257
|
}
|
|
258
258
|
@media (prefers-reduced-motion: reduce) {
|
|
259
|
-
.awsui_additional-
|
|
259
|
+
.awsui_additional-info_n4qlp_o19p5_235 > a:not(#\9) {
|
|
260
260
|
animation: none;
|
|
261
261
|
transition: none;
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
.awsui-motion-disabled .awsui_additional-
|
|
264
|
+
.awsui-motion-disabled .awsui_additional-info_n4qlp_o19p5_235 > a:not(#\9), .awsui-mode-entering .awsui_additional-info_n4qlp_o19p5_235 > a:not(#\9) {
|
|
265
265
|
animation: none;
|
|
266
266
|
transition: none;
|
|
267
267
|
}
|
|
268
|
-
.awsui_additional-
|
|
268
|
+
.awsui_additional-info_n4qlp_o19p5_235 > a:not(#\9):hover {
|
|
269
269
|
cursor: pointer;
|
|
270
|
-
color: var(--awsui-style-color-hover-
|
|
270
|
+
color: var(--awsui-style-color-hover-mdigke, var(--color-text-link-hover-tk5gkv, #0a4a74));
|
|
271
271
|
}
|
|
272
|
-
.awsui_additional-
|
|
272
|
+
.awsui_additional-info_n4qlp_o19p5_235 > a:not(#\9):focus {
|
|
273
273
|
outline: none;
|
|
274
274
|
}
|
|
275
|
-
.awsui_additional-
|
|
276
|
-
color: var(--awsui-style-color-active-
|
|
275
|
+
.awsui_additional-info_n4qlp_o19p5_235 > a:not(#\9):active {
|
|
276
|
+
color: var(--awsui-style-color-active-mdigke, var(--color-text-link-hover-tk5gkv, #0a4a74));
|
|
277
277
|
}
|
|
278
|
-
.awsui_additional-
|
|
278
|
+
.awsui_additional-info_n4qlp_o19p5_235 > a:not(#\9):active, .awsui_additional-info_n4qlp_o19p5_235 > a:not(#\9):focus, .awsui_additional-info_n4qlp_o19p5_235 > a:not(#\9):hover {
|
|
279
279
|
text-decoration-line: underline;
|
|
280
280
|
text-decoration-color: currentColor;
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
.awsui_add-
|
|
283
|
+
.awsui_add-row_n4qlp_o19p5_281:not(#\9) {
|
|
284
284
|
grid-column: 1/-1;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
.awsui_add-
|
|
287
|
+
.awsui_add-button_n4qlp_o19p5_285:not(#\9) {
|
|
288
288
|
/* used in test-utils */
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
.awsui_remove-button-
|
|
291
|
+
.awsui_remove-button-container_n4qlp_o19p5_289:not(#\9) {
|
|
292
292
|
display: inline-block;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
.awsui_remove-button-field-
|
|
295
|
+
.awsui_remove-button-field-padding_n4qlp_o19p5_293:not(#\9) {
|
|
296
296
|
padding-block-start: calc(var(--space-xxs-jnczic, 4px) + var(--line-height-body-m-bedeoh, 22px));
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
.awsui_remove-button-own-
|
|
299
|
+
.awsui_remove-button-own-row_n4qlp_o19p5_297:not(#\9) {
|
|
300
300
|
justify-self: end;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
.awsui_remove-
|
|
303
|
+
.awsui_remove-button_n4qlp_o19p5_289:not(#\9) {
|
|
304
304
|
/* used in test-utils */
|
|
305
305
|
}
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"empty-appear": "awsui_empty-
|
|
6
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
7
|
-
"root": "
|
|
8
|
-
"empty": "
|
|
9
|
-
"row": "
|
|
10
|
-
"divider": "
|
|
11
|
-
"row-control": "awsui_row-
|
|
12
|
-
"field": "
|
|
13
|
-
"additional-info": "awsui_additional-
|
|
14
|
-
"add-row": "awsui_add-
|
|
15
|
-
"add-button": "awsui_add-
|
|
16
|
-
"remove-button-container": "awsui_remove-button-
|
|
17
|
-
"remove-button-field-padding": "awsui_remove-button-field-
|
|
18
|
-
"remove-button-own-row": "awsui_remove-button-own-
|
|
19
|
-
"remove-button": "awsui_remove-
|
|
5
|
+
"empty-appear": "awsui_empty-appear_n4qlp_o19p5_153",
|
|
6
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_n4qlp_o19p5_1",
|
|
7
|
+
"root": "awsui_root_n4qlp_o19p5_175",
|
|
8
|
+
"empty": "awsui_empty_n4qlp_o19p5_153",
|
|
9
|
+
"row": "awsui_row_n4qlp_o19p5_218",
|
|
10
|
+
"divider": "awsui_divider_n4qlp_o19p5_222",
|
|
11
|
+
"row-control": "awsui_row-control_n4qlp_o19p5_227",
|
|
12
|
+
"field": "awsui_field_n4qlp_o19p5_231",
|
|
13
|
+
"additional-info": "awsui_additional-info_n4qlp_o19p5_235",
|
|
14
|
+
"add-row": "awsui_add-row_n4qlp_o19p5_281",
|
|
15
|
+
"add-button": "awsui_add-button_n4qlp_o19p5_285",
|
|
16
|
+
"remove-button-container": "awsui_remove-button-container_n4qlp_o19p5_289",
|
|
17
|
+
"remove-button-field-padding": "awsui_remove-button-field-padding_n4qlp_o19p5_293",
|
|
18
|
+
"remove-button-own-row": "awsui_remove-button-own-row_n4qlp_o19p5_297",
|
|
19
|
+
"remove-button": "awsui_remove-button_n4qlp_o19p5_289"
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/box/internal.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAIxC,KAAK,gBAAgB,GAAG,QAAQ,GAAG,0BAA0B,CAAC;AAE9D,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,OAAe,EACf,WAAW,EACX,MAAW,EACX,OAAY,EACZ,OAAO,EACP,SAAS,EACT,KAAK,EACL,QAAQ,EACR,UAAU,EACV,KAAK,EACL,QAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/box/internal.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAIxC,KAAK,gBAAgB,GAAG,QAAQ,GAAG,0BAA0B,CAAC;AAE9D,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,OAAe,EACf,WAAW,EACX,MAAW,EACX,OAAY,EACZ,OAAO,EACP,SAAS,EACT,KAAK,EACL,QAAQ,EACR,UAAU,EACV,KAAK,EACL,QAAQ,EACR,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,gBAAgB,eA4BlB"}
|
|
@@ -6,7 +6,7 @@ import clsx from 'clsx';
|
|
|
6
6
|
import { getBaseProps } from '../internal/base-component';
|
|
7
7
|
import styles from './styles.css.js';
|
|
8
8
|
export default function InternalBox(_a) {
|
|
9
|
-
var { variant = 'div', tagOverride, margin = {}, padding = {}, display, textAlign, float, fontSize, fontWeight, color, children, __internalRootRef
|
|
9
|
+
var { variant = 'div', tagOverride, margin = {}, padding = {}, display, textAlign, float, fontSize, fontWeight, color, children, __internalRootRef } = _a, props = __rest(_a, ["variant", "tagOverride", "margin", "padding", "display", "textAlign", "float", "fontSize", "fontWeight", "color", "children", "__internalRootRef"]);
|
|
10
10
|
const baseProps = getBaseProps(props);
|
|
11
11
|
const marginsClassNamesSuffices = getClassNamesSuffixes(margin);
|
|
12
12
|
const paddingsClassNamesSuffices = getClassNamesSuffixes(padding);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/box/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAI1D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAcjB;QAdiB,EAClC,OAAO,GAAG,KAAK,EACf,WAAW,EACX,MAAM,GAAG,EAAE,EACX,OAAO,GAAG,EAAE,EACZ,OAAO,EACP,SAAS,EACT,KAAK,EACL,QAAQ,EACR,UAAU,EACV,KAAK,EACL,QAAQ,EACR,iBAAiB,
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/box/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAI1D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAcjB;QAdiB,EAClC,OAAO,GAAG,KAAK,EACf,WAAW,EACX,MAAM,GAAG,EAAE,EACX,OAAO,GAAG,EAAE,EACZ,OAAO,E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CAAC,KAA8C,EAAE,EAAE;IAC/E,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,OAAO,CAAC,KAAK,CAAC,CAAC;KAChB;IACD,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,CAAU,CAAC;IACpF,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnF,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,OAAyB,EAAE,WAAoC,EAAE,EAAE;IACjF,IAAI,WAAW,EAAE;QACf,OAAO,WAAW,CAAC;KACpB;IAED,IAAI,OAAO,KAAK,mBAAmB,EAAE;QACnC,OAAO,MAAM,CAAC;KACf;IAED,IAAI,OAAO,KAAK,iBAAiB,IAAI,OAAO,KAAK,oBAAoB,EAAE;QACrE,OAAO,KAAK,CAAC;KACd;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { BoxProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalBoxProps = BoxProps & InternalBaseComponentProps;\n\nexport default function InternalBox({\n variant = 'div',\n tagOverride,\n margin = {},\n padding = {},\n display,\n textAlign,\n float,\n fontSize,\n fontWeight,\n color,\n children,\n __internalRootRef,\n ...props\n}: InternalBoxProps) {\n const baseProps = getBaseProps(props);\n const marginsClassNamesSuffices = getClassNamesSuffixes(margin);\n const paddingsClassNamesSuffices = getClassNamesSuffixes(padding);\n // This can be any arbitrary string if passed into tagOverride.\n // We appease the compiler with an incorrect type.\n const Tag = getTag(variant, tagOverride) as 'div';\n\n const className = clsx(\n baseProps.className,\n styles.root,\n styles.box,\n styles[`${variant.replace(/^awsui-/, '')}-variant`],\n marginsClassNamesSuffices.map(suffix => styles[`m-${suffix}`]),\n paddingsClassNamesSuffices.map(suffix => styles[`p-${suffix}`]),\n styles[`d-${display}`],\n styles[`f-${float}`],\n styles[`color-${color || 'default'}`],\n styles[`font-size-${fontSize || 'default'}`],\n styles[`font-weight-${fontWeight || 'default'}`],\n styles[`t-${textAlign}`]\n );\n\n return (\n <Tag {...baseProps} className={className} ref={__internalRootRef}>\n {children}\n </Tag>\n );\n}\n\nconst getClassNamesSuffixes = (value: BoxProps.SpacingSize | BoxProps.Spacing) => {\n if (typeof value === 'string') {\n return [value];\n }\n const sides = ['top', 'right', 'bottom', 'left', 'horizontal', 'vertical'] as const;\n return sides.filter(side => !!value[side]).map(side => `${side}-${value[side]}`);\n};\n\nconst getTag = (variant: BoxProps.Variant, tagOverride: BoxProps['tagOverride']) => {\n if (tagOverride) {\n return tagOverride;\n }\n\n if (variant === 'awsui-value-large') {\n return 'span';\n }\n\n if (variant === 'awsui-key-label' || variant === 'awsui-gen-ai-label') {\n return 'div';\n }\n\n return variant;\n};\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"link": "
|
|
5
|
-
"breadcrumb": "
|
|
6
|
-
"ghost-breadcrumb": "awsui_ghost-
|
|
7
|
-
"icon": "
|
|
8
|
-
"anchor": "
|
|
9
|
-
"text": "
|
|
10
|
-
"last": "
|
|
4
|
+
"link": "awsui_link_1kosq_1vpg0_145",
|
|
5
|
+
"breadcrumb": "awsui_breadcrumb_1kosq_1vpg0_149",
|
|
6
|
+
"ghost-breadcrumb": "awsui_ghost-breadcrumb_1kosq_1vpg0_150",
|
|
7
|
+
"icon": "awsui_icon_1kosq_1vpg0_153",
|
|
8
|
+
"anchor": "awsui_anchor_1kosq_1vpg0_159",
|
|
9
|
+
"text": "awsui_text_1kosq_1vpg0_206",
|
|
10
|
+
"last": "awsui_last_1kosq_1vpg0_225"
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -142,27 +142,27 @@
|
|
|
142
142
|
*/
|
|
143
143
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
144
144
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
145
|
-
.
|
|
145
|
+
.awsui_link_1kosq_1vpg0_145:not(#\9):after {
|
|
146
146
|
display: none;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
.
|
|
150
|
-
.awsui_ghost-
|
|
149
|
+
.awsui_breadcrumb_1kosq_1vpg0_149:not(#\9),
|
|
150
|
+
.awsui_ghost-breadcrumb_1kosq_1vpg0_150:not(#\9) {
|
|
151
151
|
display: flex;
|
|
152
152
|
}
|
|
153
|
-
.
|
|
154
|
-
.awsui_ghost-
|
|
153
|
+
.awsui_breadcrumb_1kosq_1vpg0_149 > .awsui_icon_1kosq_1vpg0_153:not(#\9),
|
|
154
|
+
.awsui_ghost-breadcrumb_1kosq_1vpg0_150 > .awsui_icon_1kosq_1vpg0_153:not(#\9) {
|
|
155
155
|
margin-block: 0;
|
|
156
156
|
margin-inline: var(--space-xs-kw7k3v, 8px);
|
|
157
157
|
color: var(--color-text-breadcrumb-icon-c379ty, #687078);
|
|
158
158
|
}
|
|
159
|
-
.
|
|
160
|
-
.awsui_ghost-
|
|
159
|
+
.awsui_breadcrumb_1kosq_1vpg0_149 > .awsui_anchor_1kosq_1vpg0_159:not(#\9),
|
|
160
|
+
.awsui_ghost-breadcrumb_1kosq_1vpg0_150 > .awsui_anchor_1kosq_1vpg0_159:not(#\9) {
|
|
161
161
|
min-inline-size: 0;
|
|
162
162
|
overflow: hidden;
|
|
163
163
|
text-underline-offset: 0.25em;
|
|
164
164
|
text-decoration-thickness: 1px;
|
|
165
|
-
color: var(--awsui-style-color-default-
|
|
165
|
+
color: var(--awsui-style-color-default-mdigke, var(--color-text-link-default-x6cnv5, #0073bb));
|
|
166
166
|
font-weight: inherit;
|
|
167
167
|
letter-spacing: normal;
|
|
168
168
|
text-decoration-line: underline;
|
|
@@ -173,42 +173,42 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
173
173
|
transition-duration: var(--motion-duration-refresh-only-medium-h3wrr6, 0ms);
|
|
174
174
|
}
|
|
175
175
|
@media (prefers-reduced-motion: reduce) {
|
|
176
|
-
.
|
|
177
|
-
.awsui_ghost-
|
|
176
|
+
.awsui_breadcrumb_1kosq_1vpg0_149 > .awsui_anchor_1kosq_1vpg0_159:not(#\9),
|
|
177
|
+
.awsui_ghost-breadcrumb_1kosq_1vpg0_150 > .awsui_anchor_1kosq_1vpg0_159:not(#\9) {
|
|
178
178
|
animation: none;
|
|
179
179
|
transition: none;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
.awsui-motion-disabled .
|
|
182
|
+
.awsui-motion-disabled .awsui_breadcrumb_1kosq_1vpg0_149 > .awsui_anchor_1kosq_1vpg0_159:not(#\9), .awsui-mode-entering .awsui_breadcrumb_1kosq_1vpg0_149 > .awsui_anchor_1kosq_1vpg0_159:not(#\9), .awsui-motion-disabled .awsui_ghost-breadcrumb_1kosq_1vpg0_150 > .awsui_anchor_1kosq_1vpg0_159:not(#\9), .awsui-mode-entering .awsui_ghost-breadcrumb_1kosq_1vpg0_150 > .awsui_anchor_1kosq_1vpg0_159:not(#\9) {
|
|
183
183
|
animation: none;
|
|
184
184
|
transition: none;
|
|
185
185
|
}
|
|
186
|
-
.
|
|
187
|
-
.awsui_ghost-
|
|
186
|
+
.awsui_breadcrumb_1kosq_1vpg0_149 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):hover,
|
|
187
|
+
.awsui_ghost-breadcrumb_1kosq_1vpg0_150 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):hover {
|
|
188
188
|
cursor: pointer;
|
|
189
|
-
color: var(--awsui-style-color-hover-
|
|
189
|
+
color: var(--awsui-style-color-hover-mdigke, var(--color-text-link-hover-tk5gkv, #0a4a74));
|
|
190
190
|
}
|
|
191
|
-
.
|
|
192
|
-
.awsui_ghost-
|
|
191
|
+
.awsui_breadcrumb_1kosq_1vpg0_149 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):focus,
|
|
192
|
+
.awsui_ghost-breadcrumb_1kosq_1vpg0_150 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):focus {
|
|
193
193
|
outline: none;
|
|
194
194
|
}
|
|
195
|
-
.
|
|
196
|
-
.awsui_ghost-
|
|
197
|
-
color: var(--awsui-style-color-active-
|
|
195
|
+
.awsui_breadcrumb_1kosq_1vpg0_149 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):active,
|
|
196
|
+
.awsui_ghost-breadcrumb_1kosq_1vpg0_150 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):active {
|
|
197
|
+
color: var(--awsui-style-color-active-mdigke, var(--color-text-link-hover-tk5gkv, #0a4a74));
|
|
198
198
|
}
|
|
199
|
-
.
|
|
199
|
+
.awsui_breadcrumb_1kosq_1vpg0_149 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):active, .awsui_breadcrumb_1kosq_1vpg0_149 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):focus, .awsui_breadcrumb_1kosq_1vpg0_149 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):hover, .awsui_ghost-breadcrumb_1kosq_1vpg0_150 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):active, .awsui_ghost-breadcrumb_1kosq_1vpg0_150 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):focus, .awsui_ghost-breadcrumb_1kosq_1vpg0_150 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):hover {
|
|
200
200
|
text-decoration-line: underline;
|
|
201
201
|
text-decoration-color: currentColor;
|
|
202
202
|
}
|
|
203
|
-
.
|
|
204
|
-
.awsui_ghost-
|
|
203
|
+
.awsui_breadcrumb_1kosq_1vpg0_149 > .awsui_anchor_1kosq_1vpg0_159 > .awsui_text_1kosq_1vpg0_206:not(#\9),
|
|
204
|
+
.awsui_ghost-breadcrumb_1kosq_1vpg0_150 > .awsui_anchor_1kosq_1vpg0_159 > .awsui_text_1kosq_1vpg0_206:not(#\9) {
|
|
205
205
|
overflow: hidden;
|
|
206
206
|
text-overflow: ellipsis;
|
|
207
207
|
white-space: nowrap;
|
|
208
208
|
display: block;
|
|
209
209
|
}
|
|
210
|
-
body[data-awsui-focus-visible=true] .
|
|
211
|
-
body[data-awsui-focus-visible=true] .awsui_ghost-
|
|
210
|
+
body[data-awsui-focus-visible=true] .awsui_breadcrumb_1kosq_1vpg0_149 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):focus,
|
|
211
|
+
body[data-awsui-focus-visible=true] .awsui_ghost-breadcrumb_1kosq_1vpg0_150 > .awsui_anchor_1kosq_1vpg0_159:not(#\9):focus {
|
|
212
212
|
outline: thin dotted;
|
|
213
213
|
outline: var(--border-link-focus-ring-outline-c5423y, 5px auto Highlight);
|
|
214
214
|
outline-offset: 2px;
|
|
@@ -219,12 +219,12 @@ body[data-awsui-focus-visible=true] .awsui_ghost-breadcrumb_1kosq_1tq4i_150 > .a
|
|
|
219
219
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-9xsko1, 2px);
|
|
220
220
|
box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-woh62o, 0px) var(--color-border-item-focused-r5f6xl, #0073bb);
|
|
221
221
|
}
|
|
222
|
-
.
|
|
223
|
-
.awsui_ghost-
|
|
222
|
+
.awsui_breadcrumb_1kosq_1vpg0_149.awsui_last_1kosq_1vpg0_225 > .awsui_icon_1kosq_1vpg0_153:not(#\9),
|
|
223
|
+
.awsui_ghost-breadcrumb_1kosq_1vpg0_150.awsui_last_1kosq_1vpg0_225 > .awsui_icon_1kosq_1vpg0_153:not(#\9) {
|
|
224
224
|
display: none;
|
|
225
225
|
}
|
|
226
|
-
.
|
|
227
|
-
.awsui_ghost-
|
|
226
|
+
.awsui_breadcrumb_1kosq_1vpg0_149.awsui_last_1kosq_1vpg0_225 > .awsui_anchor_1kosq_1vpg0_159:not(#\9),
|
|
227
|
+
.awsui_ghost-breadcrumb_1kosq_1vpg0_150.awsui_last_1kosq_1vpg0_225 > .awsui_anchor_1kosq_1vpg0_159:not(#\9) {
|
|
228
228
|
color: var(--color-text-breadcrumb-current-hwvp31, #687078);
|
|
229
229
|
font-weight: 700;
|
|
230
230
|
text-decoration: none;
|
|
@@ -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
|
-
"link": "
|
|
6
|
-
"breadcrumb": "
|
|
7
|
-
"ghost-breadcrumb": "awsui_ghost-
|
|
8
|
-
"icon": "
|
|
9
|
-
"anchor": "
|
|
10
|
-
"text": "
|
|
11
|
-
"last": "
|
|
5
|
+
"link": "awsui_link_1kosq_1vpg0_145",
|
|
6
|
+
"breadcrumb": "awsui_breadcrumb_1kosq_1vpg0_149",
|
|
7
|
+
"ghost-breadcrumb": "awsui_ghost-breadcrumb_1kosq_1vpg0_150",
|
|
8
|
+
"icon": "awsui_icon_1kosq_1vpg0_153",
|
|
9
|
+
"anchor": "awsui_anchor_1kosq_1vpg0_159",
|
|
10
|
+
"text": "awsui_text_1kosq_1vpg0_206",
|
|
11
|
+
"last": "awsui_last_1kosq_1vpg0_225"
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const BreadcrumbGroupSkeleton: React.ForwardRefExoticComponent<import("./interfaces").BreadcrumbGroupProps<import("./interfaces").BreadcrumbGroupProps.Item> & import("../internal/hooks/use-base-component").InternalBaseComponentProps
|
|
2
|
+
export declare const BreadcrumbGroupSkeleton: React.ForwardRefExoticComponent<import("./interfaces").BreadcrumbGroupProps<import("./interfaces").BreadcrumbGroupProps.Item> & import("../internal/hooks/use-base-component").InternalBaseComponentProps & {
|
|
3
3
|
__injectAnalyticsComponentMetadata?: boolean | undefined;
|
|
4
4
|
} & React.RefAttributes<HTMLElement>>;
|
|
5
5
|
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -11,7 +11,7 @@ export type InternalButtonProps = Omit<ButtonProps, 'variant'> & {
|
|
|
11
11
|
__title?: string;
|
|
12
12
|
__emitPerformanceMarks?: boolean;
|
|
13
13
|
__skipNativeAttributesWarnings?: boolean;
|
|
14
|
-
} & InternalBaseComponentProps
|
|
14
|
+
} & InternalBaseComponentProps;
|
|
15
15
|
export declare const InternalButton: React.ForwardRefExoticComponent<Omit<ButtonProps, "variant"> & {
|
|
16
16
|
variant?: ButtonProps['variant'] | 'flashbar-icon' | 'breadcrumb-group' | 'menu-trigger' | 'modal-dismiss' | 'inline-icon-pointer-target';
|
|
17
17
|
badge?: boolean | undefined;
|
|
@@ -22,6 +22,6 @@ export declare const InternalButton: React.ForwardRefExoticComponent<Omit<Button
|
|
|
22
22
|
__title?: string | undefined;
|
|
23
23
|
__emitPerformanceMarks?: boolean | undefined;
|
|
24
24
|
__skipNativeAttributesWarnings?: boolean | undefined;
|
|
25
|
-
} & InternalBaseComponentProps
|
|
25
|
+
} & InternalBaseComponentProps & React.RefAttributes<ButtonProps.Ref>>;
|
|
26
26
|
export default InternalButton;
|
|
27
27
|
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAwB3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AASlF,OAAO,EAAE,WAAW,EAAE,MAAM,cA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CAAC;CAC1C,GAAG,0BAA0B,CAAC;AAE/B,eAAO,MAAM,cAAc;cAhBrB,WAAW,CAAC,SAAS,CAAC,GACtB,eAAe,GACf,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,4BAA4B;;;;;;;;;sEAsTjC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -28,7 +28,7 @@ import styles from './styles.css.js';
|
|
|
28
28
|
import testUtilStyles from './test-classes/styles.css.js';
|
|
29
29
|
export const InternalButton = React.forwardRef((_a, ref) => {
|
|
30
30
|
var _b;
|
|
31
|
-
var { children, iconName, __iconClass, onClick, onFollow, iconAlign = 'left', iconUrl, iconSvg, iconAlt, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, href, external, target: targetOverride, rel, download, formAction = 'submit', ariaLabel, ariaDescribedby, ariaExpanded, ariaControls, fullWidth, badge, i18nStrings, style, nativeButtonAttributes, nativeAnchorAttributes, __internalRootRef
|
|
31
|
+
var { children, iconName, __iconClass, onClick, onFollow, iconAlign = 'left', iconUrl, iconSvg, iconAlt, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, href, external, target: targetOverride, rel, download, formAction = 'submit', ariaLabel, ariaDescribedby, ariaExpanded, ariaControls, fullWidth, badge, i18nStrings, style, nativeButtonAttributes, nativeAnchorAttributes, __internalRootRef, __focusable = false, __injectAnalyticsComponentMetadata = false, __title, __emitPerformanceMarks = true, __skipNativeAttributesWarnings, analyticsAction = 'click' } = _a, props = __rest(_a, ["children", "iconName", "__iconClass", "onClick", "onFollow", "iconAlign", "iconUrl", "iconSvg", "iconAlt", "variant", "loading", "loadingText", "disabled", "disabledReason", "wrapText", "href", "external", "target", "rel", "download", "formAction", "ariaLabel", "ariaDescribedby", "ariaExpanded", "ariaControls", "fullWidth", "badge", "i18nStrings", "style", "nativeButtonAttributes", "nativeAnchorAttributes", "__internalRootRef", "__focusable", "__injectAnalyticsComponentMetadata", "__title", "__emitPerformanceMarks", "__skipNativeAttributesWarnings", "analyticsAction"]);
|
|
32
32
|
const [showTooltip, setShowTooltip] = useState(false);
|
|
33
33
|
checkSafeUrl('Button', href);
|
|
34
34
|
const isAnchor = Boolean(href);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/button/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;AACpG,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACpG,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,OAAO,MAAM,yCAAyC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,wDAAwD,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAE9D,OAAO,oBAAoB,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,qCAAqC,EAAE,MAAM,iDAAiD,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;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QAAQ,EAAE,QAAQ,IACd,mBAAmB,IACvB,KAAK,EAAE,2BAA2B;gBAEjC,aAAa;gBACb,oBAAoB,IAAI,qBAAqB,CACzB;YACtB,OAAO,IAAI,WAAW,IAAI,CACzB,oBAAC,kBAAkB,IAAC,OAAO,EAAC,MAAM,EAAC,MAAM,EAAE,IAAI,IAC5C,WAAW,CACO,CACtB,CACA,CACJ,CAAC;KACH;IAED,OAAO,CACL;QACE,oBAAC,oBAAoB,kBACnB,GAAG,EAAC,QAAQ,EACZ,gBAAgB,EAAE,sBAAsB,EACxC,YAAY,EAAE,8BAA8B,IACxC,WAAW,IACf,IAAI,EAAE,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EACjD,QAAQ,EAAE,QAAQ,IAAI,CAAC,WAAW,IAAI,CAAC,oBAAoB,mBAC5C,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,IAC7C,mBAAmB,IACvB,KAAK,EAAE,2BAA2B;YAEjC,aAAa;YACb,oBAAoB,IAAI,qBAAqB,CACzB;QACtB,OAAO,IAAI,WAAW,IAAI,CACzB,oBAAC,kBAAkB,IAAC,OAAO,EAAC,MAAM,EAAC,MAAM,EAAE,IAAI,IAC5C,WAAW,CACO,CACtB,CACA,CACJ,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';\nimport {\n getAnalyticsLabelAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useInternalI18n } from '../i18n/context';\nimport Icon from '../icon/internal';\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport {\n DATA_ATTR_FUNNEL_VALUE,\n getFunnelValueSelector,\n getSubStepAllSelector,\n getTextFromSelector,\n} from '../internal/analytics/selectors';\nimport Tooltip from '../internal/components/tooltip/index.js';\nimport { useButtonContext } from '../internal/context/button-context';\nimport { useSingleTabStopNavigation } from '../internal/context/single-tab-stop-navigation-context';\nimport { fireCancelableEvent, isPlainLeftClick } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport useHiddenDescription from '../internal/hooks/use-hidden-description';\nimport { useModalContextLoadingButtonComponent } from '../internal/hooks/use-modal-component-analytics';\nimport { usePerformanceMarks } from '../internal/hooks/use-performance-marks';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport WithNativeAttributes from '../internal/utils/with-native-attributes';\nimport InternalLiveRegion from '../live-region/internal';\nimport { GeneratedAnalyticsMetadataButtonFragment } from './analytics-metadata/interfaces';\nimport { ButtonIconProps, LeftIcon, RightIcon } from './icon-helper';\nimport { ButtonProps } from './interfaces';\nimport { getButtonStyles } from './style';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport type InternalButtonProps = Omit<ButtonProps, 'variant'> & {\n variant?:\n | ButtonProps['variant']\n | 'flashbar-icon'\n | 'breadcrumb-group'\n | 'menu-trigger'\n | 'modal-dismiss'\n | 'inline-icon-pointer-target';\n badge?: boolean;\n analyticsAction?: string;\n __iconClass?: string;\n __focusable?: boolean;\n __injectAnalyticsComponentMetadata?: boolean;\n __title?: string;\n __emitPerformanceMarks?: boolean;\n __skipNativeAttributesWarnings?: boolean;\n} & InternalBaseComponentProps<HTMLAnchorElement | HTMLButtonElement>;\n\nexport const InternalButton = React.forwardRef(\n (\n {\n children,\n iconName,\n __iconClass,\n onClick,\n onFollow,\n iconAlign = 'left',\n iconUrl,\n iconSvg,\n iconAlt,\n variant = 'normal',\n loading = false,\n loadingText,\n disabled = false,\n disabledReason,\n wrapText = true,\n href,\n external,\n target: targetOverride,\n rel,\n download,\n formAction = 'submit',\n ariaLabel,\n ariaDescribedby,\n ariaExpanded,\n ariaControls,\n fullWidth,\n badge,\n i18nStrings,\n style,\n nativeButtonAttributes,\n nativeAnchorAttributes,\n __internalRootRef = null,\n __focusable = false,\n __injectAnalyticsComponentMetadata = false,\n __title,\n __emitPerformanceMarks = true,\n __skipNativeAttributesWarnings,\n analyticsAction = 'click',\n ...props\n }: InternalButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n ) => {\n const [showTooltip, setShowTooltip] = useState(false);\n\n checkSafeUrl('Button', href);\n const isAnchor = Boolean(href);\n const target = targetOverride ?? (external ? '_blank' : undefined);\n const isNotInteractive = loading || disabled;\n const isDisabledWithReason =\n (variant === 'normal' || variant === 'primary' || variant === 'icon') && !!disabledReason && disabled;\n\n const hasAriaDisabled = (loading && !disabled) || (disabled && __focusable) || isDisabledWithReason;\n const shouldHaveContent =\n children &&\n ['icon', 'inline-icon', 'flashbar-icon', 'modal-dismiss', 'inline-icon-pointer-target'].indexOf(variant) === -1;\n\n if ((iconName || iconUrl || iconSvg) && iconAlign === 'right' && external) {\n warnOnce('Button', 'A right-aligned icon should not be combined with an external icon.');\n }\n\n const buttonRef = useRef<HTMLElement>(null);\n useForwardFocus(ref, buttonRef);\n\n const buttonContext = useButtonContext();\n const i18n = useInternalI18n('button');\n\n const uniqueId = useUniqueId('button');\n const { funnelInteractionId } = useFunnel();\n const { stepNumber, stepNameSelector } = useFunnelStep();\n const { subStepSelector, subStepNameSelector } = useFunnelSubStep();\n\n const performanceMarkAttributes = usePerformanceMarks(\n 'primaryButton',\n () => variant === 'primary' && __emitPerformanceMarks && !loading && !disabled,\n buttonRef,\n () => ({\n loading,\n disabled,\n text: buttonRef.current?.innerText,\n }),\n [loading, disabled]\n );\n useModalContextLoadingButtonComponent(variant === 'primary', loading);\n\n const { targetProps, descriptionEl } = useHiddenDescription(disabledReason);\n\n const handleClick = (event: React.MouseEvent) => {\n if (isNotInteractive) {\n return event.preventDefault();\n }\n\n if (isAnchor && isPlainLeftClick(event)) {\n fireCancelableEvent(onFollow, { href, target }, event);\n\n if ((iconName === 'external' || target === '_blank') && funnelInteractionId) {\n const stepName = getTextFromSelector(stepNameSelector);\n const subStepName = getTextFromSelector(subStepNameSelector);\n\n FunnelMetrics.externalLinkInteracted({\n funnelInteractionId,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n elementSelector: getFunnelValueSelector(uniqueId),\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n }\n\n const { altKey, button, ctrlKey, metaKey, shiftKey } = event;\n fireCancelableEvent(onClick, { altKey, button, ctrlKey, metaKey, shiftKey }, event);\n buttonContext.onClick({ variant });\n };\n\n const buttonClass = clsx(props.className, styles.button, styles[`variant-${variant}`], {\n [styles.disabled]: isNotInteractive,\n [styles['disabled-with-reason']]: isDisabledWithReason,\n [styles['button-no-wrap']]: !wrapText,\n [styles['button-no-text']]: !shouldHaveContent,\n [styles['full-width']]: shouldHaveContent && fullWidth,\n [styles.link]: isAnchor,\n });\n\n const explicitTabIndex = nativeButtonAttributes?.tabIndex ?? nativeAnchorAttributes?.tabIndex;\n const { tabIndex } = useSingleTabStopNavigation(buttonRef, {\n tabIndex: isAnchor && isNotInteractive && !isDisabledWithReason ? -1 : explicitTabIndex,\n });\n\n const analyticsMetadata: GeneratedAnalyticsMetadataButtonFragment = disabled\n ? {}\n : {\n action: analyticsAction,\n detail: { label: { root: 'self' } },\n };\n if (__injectAnalyticsComponentMetadata) {\n analyticsMetadata.component = {\n name: 'awsui.Button',\n label: { root: 'self' },\n properties: { variant, disabled: `${disabled}` },\n };\n }\n\n const buttonProps = {\n ...props,\n ...performanceMarkAttributes,\n tabIndex,\n // https://github.com/microsoft/TypeScript/issues/36659\n ref: useMergeRefs(buttonRef, __internalRootRef),\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedby,\n 'aria-expanded': ariaExpanded,\n 'aria-controls': ariaControls,\n // add ariaLabel as `title` as visible hint text\n title: __title ?? ariaLabel,\n className: buttonClass,\n onClick: handleClick,\n [DATA_ATTR_FUNNEL_VALUE]: uniqueId,\n ...getAnalyticsMetadataAttribute(analyticsMetadata),\n ...getAnalyticsLabelAttribute(shouldHaveContent ? `.${analyticsSelectors.label}` : ''),\n } as const;\n\n const iconProps: ButtonIconProps = {\n loading,\n iconName,\n iconAlign,\n iconUrl,\n iconSvg,\n iconAlt,\n variant,\n badge,\n iconClass: __iconClass,\n iconSize: variant === 'modal-dismiss' ? 'medium' : 'normal',\n };\n const buttonContent = (\n <>\n <LeftIcon {...iconProps} />\n {shouldHaveContent && (\n <>\n <span className={clsx(styles.content, analyticsSelectors.label)}>{children}</span>\n {external && (\n <>\n \n <Icon\n name=\"external\"\n className={testUtilStyles['external-icon']}\n ariaLabel={i18n('i18nStrings.externalIconAriaLabel', i18nStrings?.externalIconAriaLabel)}\n />\n </>\n )}\n </>\n )}\n <RightIcon {...iconProps} />\n </>\n );\n\n const { loadingButtonCount } = useFunnel();\n useEffect(() => {\n if (loading) {\n loadingButtonCount.current++;\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n loadingButtonCount.current--;\n };\n }\n }, [loading, loadingButtonCount]);\n\n const disabledReasonProps = {\n onFocus: isDisabledWithReason ? () => setShowTooltip(true) : undefined,\n onBlur: isDisabledWithReason ? () => setShowTooltip(false) : undefined,\n onMouseEnter: isDisabledWithReason ? () => setShowTooltip(true) : undefined,\n onMouseLeave: isDisabledWithReason ? () => setShowTooltip(false) : undefined,\n ...(isDisabledWithReason ? targetProps : {}),\n };\n const disabledReasonContent = (\n <>\n {descriptionEl}\n {showTooltip && (\n <Tooltip\n className={testUtilStyles['disabled-reason-tooltip']}\n trackRef={buttonRef}\n value={disabledReason!}\n onDismiss={() => setShowTooltip(false)}\n />\n )}\n </>\n );\n\n const stylePropertiesAndVariables = getButtonStyles(style);\n\n if (isAnchor) {\n const getAnchorTabIndex = () => {\n if (isNotInteractive) {\n // If disabled with a reason, make it focusable so users can access the tooltip\n // Otherwise, resolve to the default button props tabIndex.\n return disabledReason ? 0 : buttonProps.tabIndex;\n }\n return buttonProps.tabIndex;\n };\n\n return (\n <>\n <WithNativeAttributes<HTMLAnchorElement, React.AnchorHTMLAttributes<HTMLAnchorElement>>\n tag=\"a\"\n nativeAttributes={nativeAnchorAttributes}\n skipWarnings={__skipNativeAttributesWarnings}\n {...buttonProps}\n href={isNotInteractive ? undefined : href}\n role={isNotInteractive ? 'link' : undefined}\n tabIndex={getAnchorTabIndex()}\n target={target}\n // security recommendation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target\n rel={rel ?? (target === '_blank' ? 'noopener noreferrer' : undefined)}\n aria-disabled={isNotInteractive ? true : undefined}\n download={download}\n {...disabledReasonProps}\n style={stylePropertiesAndVariables}\n >\n {buttonContent}\n {isDisabledWithReason && disabledReasonContent}\n </WithNativeAttributes>\n {loading && loadingText && (\n <InternalLiveRegion tagName=\"span\" hidden={true}>\n {loadingText}\n </InternalLiveRegion>\n )}\n </>\n );\n }\n\n return (\n <>\n <WithNativeAttributes<HTMLButtonElement, React.ButtonHTMLAttributes<HTMLButtonElement>>\n tag=\"button\"\n nativeAttributes={nativeButtonAttributes}\n skipWarnings={__skipNativeAttributesWarnings}\n {...buttonProps}\n type={formAction === 'none' ? 'button' : 'submit'}\n disabled={disabled && !__focusable && !isDisabledWithReason}\n aria-disabled={hasAriaDisabled ? true : undefined}\n {...disabledReasonProps}\n style={stylePropertiesAndVariables}\n >\n {buttonContent}\n {isDisabledWithReason && disabledReasonContent}\n </WithNativeAttributes>\n {loading && loadingText && (\n <InternalLiveRegion tagName=\"span\" hidden={true}>\n {loadingText}\n </InternalLiveRegion>\n )}\n </>\n );\n }\n);\n\nexport default InternalButton;\n"]}
|
|
1
|
+
{"version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,EAAC,MAAM,EAAC,MAAM,EAAE,IAAI,IAC5C,WAAW,CACO,CACtB,CACA,CACJ,CAAC;KACH;IAED,OAAO,CACL;QACE,oBAAC,oBAAoB,kBACnB,GAAG,EAAC,QAAQ,EACZ,gBAAgB,EAAE,sBAAsB,EACxC,YAAY,EAAE,8BAA8B,IACxC,WAAW,IACf,IAAI,EAAE,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EACjD,QAAQ,EAAE,QAAQ,IAAI,CAAC,WAAW,IAAI,CAAC,oBAAoB,mBAC5C,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,IAC7C,mBAAmB,IACvB,KAAK,EAAE,2BAA2B;YAEjC,aAAa;YACb,oBAAoB,IAAI,qBAAqB,CACzB;QACtB,OAAO,IAAI,WAAW,IAAI,CACzB,oBAAC,kBAAkB,IAAC,OAAO,EAAC,MAAM,EAAC,MAAM,EAAE,IAAI,IAC5C,WAAW,CACO,CACtB,CACA,CACJ,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';\nimport {\n getAnalyticsLabelAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useInternalI18n } from '../i18n/context';\nimport Icon from '../icon/internal';\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport {\n DATA_ATTR_FUNNEL_VALUE,\n getFunnelValueSelector,\n getSubStepAllSelector,\n getTextFromSelector,\n} from '../internal/analytics/selectors';\nimport Tooltip from '../internal/components/tooltip/index.js';\nimport { useButtonContext } from '../internal/context/button-context';\nimport { useSingleTabStopNavigation } from '../internal/context/single-tab-stop-navigation-context';\nimport { fireCancelableEvent, isPlainLeftClick } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport useHiddenDescription from '../internal/hooks/use-hidden-description';\nimport { useModalContextLoadingButtonComponent } from '../internal/hooks/use-modal-component-analytics';\nimport { usePerformanceMarks } from '../internal/hooks/use-performance-marks';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport WithNativeAttributes from '../internal/utils/with-native-attributes';\nimport InternalLiveRegion from '../live-region/internal';\nimport { GeneratedAnalyticsMetadataButtonFragment } from './analytics-metadata/interfaces';\nimport { ButtonIconProps, LeftIcon, RightIcon } from './icon-helper';\nimport { ButtonProps } from './interfaces';\nimport { getButtonStyles } from './style';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport type InternalButtonProps = Omit<ButtonProps, 'variant'> & {\n variant?:\n | ButtonProps['variant']\n | 'flashbar-icon'\n | 'breadcrumb-group'\n | 'menu-trigger'\n | 'modal-dismiss'\n | 'inline-icon-pointer-target';\n badge?: boolean;\n analyticsAction?: string;\n __iconClass?: string;\n __focusable?: boolean;\n __injectAnalyticsComponentMetadata?: boolean;\n __title?: string;\n __emitPerformanceMarks?: boolean;\n __skipNativeAttributesWarnings?: boolean;\n} & InternalBaseComponentProps;\n\nexport const InternalButton = React.forwardRef(\n (\n {\n children,\n iconName,\n __iconClass,\n onClick,\n onFollow,\n iconAlign = 'left',\n iconUrl,\n iconSvg,\n iconAlt,\n variant = 'normal',\n loading = false,\n loadingText,\n disabled = false,\n disabledReason,\n wrapText = true,\n href,\n external,\n target: targetOverride,\n rel,\n download,\n formAction = 'submit',\n ariaLabel,\n ariaDescribedby,\n ariaExpanded,\n ariaControls,\n fullWidth,\n badge,\n i18nStrings,\n style,\n nativeButtonAttributes,\n nativeAnchorAttributes,\n __internalRootRef,\n __focusable = false,\n __injectAnalyticsComponentMetadata = false,\n __title,\n __emitPerformanceMarks = true,\n __skipNativeAttributesWarnings,\n analyticsAction = 'click',\n ...props\n }: InternalButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n ) => {\n const [showTooltip, setShowTooltip] = useState(false);\n\n checkSafeUrl('Button', href);\n const isAnchor = Boolean(href);\n const target = targetOverride ?? (external ? '_blank' : undefined);\n const isNotInteractive = loading || disabled;\n const isDisabledWithReason =\n (variant === 'normal' || variant === 'primary' || variant === 'icon') && !!disabledReason && disabled;\n\n const hasAriaDisabled = (loading && !disabled) || (disabled && __focusable) || isDisabledWithReason;\n const shouldHaveContent =\n children &&\n ['icon', 'inline-icon', 'flashbar-icon', 'modal-dismiss', 'inline-icon-pointer-target'].indexOf(variant) === -1;\n\n if ((iconName || iconUrl || iconSvg) && iconAlign === 'right' && external) {\n warnOnce('Button', 'A right-aligned icon should not be combined with an external icon.');\n }\n\n const buttonRef = useRef<HTMLElement>(null);\n useForwardFocus(ref, buttonRef);\n\n const buttonContext = useButtonContext();\n const i18n = useInternalI18n('button');\n\n const uniqueId = useUniqueId('button');\n const { funnelInteractionId } = useFunnel();\n const { stepNumber, stepNameSelector } = useFunnelStep();\n const { subStepSelector, subStepNameSelector } = useFunnelSubStep();\n\n const performanceMarkAttributes = usePerformanceMarks(\n 'primaryButton',\n () => variant === 'primary' && __emitPerformanceMarks && !loading && !disabled,\n buttonRef,\n () => ({\n loading,\n disabled,\n text: buttonRef.current?.innerText,\n }),\n [loading, disabled]\n );\n useModalContextLoadingButtonComponent(variant === 'primary', loading);\n\n const { targetProps, descriptionEl } = useHiddenDescription(disabledReason);\n\n const handleClick = (event: React.MouseEvent) => {\n if (isNotInteractive) {\n return event.preventDefault();\n }\n\n if (isAnchor && isPlainLeftClick(event)) {\n fireCancelableEvent(onFollow, { href, target }, event);\n\n if ((iconName === 'external' || target === '_blank') && funnelInteractionId) {\n const stepName = getTextFromSelector(stepNameSelector);\n const subStepName = getTextFromSelector(subStepNameSelector);\n\n FunnelMetrics.externalLinkInteracted({\n funnelInteractionId,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n elementSelector: getFunnelValueSelector(uniqueId),\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n }\n\n const { altKey, button, ctrlKey, metaKey, shiftKey } = event;\n fireCancelableEvent(onClick, { altKey, button, ctrlKey, metaKey, shiftKey }, event);\n buttonContext.onClick({ variant });\n };\n\n const buttonClass = clsx(props.className, styles.button, styles[`variant-${variant}`], {\n [styles.disabled]: isNotInteractive,\n [styles['disabled-with-reason']]: isDisabledWithReason,\n [styles['button-no-wrap']]: !wrapText,\n [styles['button-no-text']]: !shouldHaveContent,\n [styles['full-width']]: shouldHaveContent && fullWidth,\n [styles.link]: isAnchor,\n });\n\n const explicitTabIndex = nativeButtonAttributes?.tabIndex ?? nativeAnchorAttributes?.tabIndex;\n const { tabIndex } = useSingleTabStopNavigation(buttonRef, {\n tabIndex: isAnchor && isNotInteractive && !isDisabledWithReason ? -1 : explicitTabIndex,\n });\n\n const analyticsMetadata: GeneratedAnalyticsMetadataButtonFragment = disabled\n ? {}\n : {\n action: analyticsAction,\n detail: { label: { root: 'self' } },\n };\n if (__injectAnalyticsComponentMetadata) {\n analyticsMetadata.component = {\n name: 'awsui.Button',\n label: { root: 'self' },\n properties: { variant, disabled: `${disabled}` },\n };\n }\n\n const buttonProps = {\n ...props,\n ...performanceMarkAttributes,\n tabIndex,\n // https://github.com/microsoft/TypeScript/issues/36659\n ref: useMergeRefs(buttonRef, __internalRootRef),\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedby,\n 'aria-expanded': ariaExpanded,\n 'aria-controls': ariaControls,\n // add ariaLabel as `title` as visible hint text\n title: __title ?? ariaLabel,\n className: buttonClass,\n onClick: handleClick,\n [DATA_ATTR_FUNNEL_VALUE]: uniqueId,\n ...getAnalyticsMetadataAttribute(analyticsMetadata),\n ...getAnalyticsLabelAttribute(shouldHaveContent ? `.${analyticsSelectors.label}` : ''),\n } as const;\n\n const iconProps: ButtonIconProps = {\n loading,\n iconName,\n iconAlign,\n iconUrl,\n iconSvg,\n iconAlt,\n variant,\n badge,\n iconClass: __iconClass,\n iconSize: variant === 'modal-dismiss' ? 'medium' : 'normal',\n };\n const buttonContent = (\n <>\n <LeftIcon {...iconProps} />\n {shouldHaveContent && (\n <>\n <span className={clsx(styles.content, analyticsSelectors.label)}>{children}</span>\n {external && (\n <>\n \n <Icon\n name=\"external\"\n className={testUtilStyles['external-icon']}\n ariaLabel={i18n('i18nStrings.externalIconAriaLabel', i18nStrings?.externalIconAriaLabel)}\n />\n </>\n )}\n </>\n )}\n <RightIcon {...iconProps} />\n </>\n );\n\n const { loadingButtonCount } = useFunnel();\n useEffect(() => {\n if (loading) {\n loadingButtonCount.current++;\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n loadingButtonCount.current--;\n };\n }\n }, [loading, loadingButtonCount]);\n\n const disabledReasonProps = {\n onFocus: isDisabledWithReason ? () => setShowTooltip(true) : undefined,\n onBlur: isDisabledWithReason ? () => setShowTooltip(false) : undefined,\n onMouseEnter: isDisabledWithReason ? () => setShowTooltip(true) : undefined,\n onMouseLeave: isDisabledWithReason ? () => setShowTooltip(false) : undefined,\n ...(isDisabledWithReason ? targetProps : {}),\n };\n const disabledReasonContent = (\n <>\n {descriptionEl}\n {showTooltip && (\n <Tooltip\n className={testUtilStyles['disabled-reason-tooltip']}\n trackRef={buttonRef}\n value={disabledReason!}\n onDismiss={() => setShowTooltip(false)}\n />\n )}\n </>\n );\n\n const stylePropertiesAndVariables = getButtonStyles(style);\n\n if (isAnchor) {\n const getAnchorTabIndex = () => {\n if (isNotInteractive) {\n // If disabled with a reason, make it focusable so users can access the tooltip\n // Otherwise, resolve to the default button props tabIndex.\n return disabledReason ? 0 : buttonProps.tabIndex;\n }\n return buttonProps.tabIndex;\n };\n\n return (\n <>\n <WithNativeAttributes<HTMLAnchorElement, React.AnchorHTMLAttributes<HTMLAnchorElement>>\n tag=\"a\"\n nativeAttributes={nativeAnchorAttributes}\n skipWarnings={__skipNativeAttributesWarnings}\n {...buttonProps}\n href={isNotInteractive ? undefined : href}\n role={isNotInteractive ? 'link' : undefined}\n tabIndex={getAnchorTabIndex()}\n target={target}\n // security recommendation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target\n rel={rel ?? (target === '_blank' ? 'noopener noreferrer' : undefined)}\n aria-disabled={isNotInteractive ? true : undefined}\n download={download}\n {...disabledReasonProps}\n style={stylePropertiesAndVariables}\n >\n {buttonContent}\n {isDisabledWithReason && disabledReasonContent}\n </WithNativeAttributes>\n {loading && loadingText && (\n <InternalLiveRegion tagName=\"span\" hidden={true}>\n {loadingText}\n </InternalLiveRegion>\n )}\n </>\n );\n }\n\n return (\n <>\n <WithNativeAttributes<HTMLButtonElement, React.ButtonHTMLAttributes<HTMLButtonElement>>\n tag=\"button\"\n nativeAttributes={nativeButtonAttributes}\n skipWarnings={__skipNativeAttributesWarnings}\n {...buttonProps}\n type={formAction === 'none' ? 'button' : 'submit'}\n disabled={disabled && !__focusable && !isDisabledWithReason}\n aria-disabled={hasAriaDisabled ? true : undefined}\n {...disabledReasonProps}\n style={stylePropertiesAndVariables}\n >\n {buttonContent}\n {isDisabledWithReason && disabledReasonContent}\n </WithNativeAttributes>\n {loading && loadingText && (\n <InternalLiveRegion tagName=\"span\" hidden={true}>\n {loadingText}\n </InternalLiveRegion>\n )}\n </>\n );\n }\n);\n\nexport default InternalButton;\n"]}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"content": "
|
|
5
|
-
"button": "
|
|
6
|
-
"variant-normal": "awsui_variant-
|
|
7
|
-
"disabled": "
|
|
8
|
-
"variant-primary": "awsui_variant-
|
|
9
|
-
"variant-link": "awsui_variant-
|
|
10
|
-
"variant-icon": "awsui_variant-
|
|
11
|
-
"variant-inline-icon": "awsui_variant-inline-
|
|
12
|
-
"variant-inline-icon-pointer-target": "awsui_variant-inline-icon-pointer-
|
|
13
|
-
"variant-inline-link": "awsui_variant-inline-
|
|
14
|
-
"variant-modal-dismiss": "awsui_variant-modal-
|
|
15
|
-
"variant-flashbar-icon": "awsui_variant-flashbar-
|
|
16
|
-
"variant-breadcrumb-group": "awsui_variant-breadcrumb-
|
|
17
|
-
"variant-menu-trigger": "awsui_variant-menu-
|
|
18
|
-
"button-no-text": "awsui_button-no-
|
|
19
|
-
"button-no-wrap": "awsui_button-no-
|
|
20
|
-
"full-width": "awsui_full-
|
|
21
|
-
"icon-left": "awsui_icon-
|
|
22
|
-
"icon-right": "awsui_icon-
|
|
23
|
-
"icon": "
|
|
24
|
-
"link": "
|
|
25
|
-
"disabled-with-reason": "awsui_disabled-with-
|
|
4
|
+
"content": "awsui_content_vjswe_1arqf_153",
|
|
5
|
+
"button": "awsui_button_vjswe_1arqf_157",
|
|
6
|
+
"variant-normal": "awsui_variant-normal_vjswe_1arqf_206",
|
|
7
|
+
"disabled": "awsui_disabled_vjswe_1arqf_224",
|
|
8
|
+
"variant-primary": "awsui_variant-primary_vjswe_1arqf_231",
|
|
9
|
+
"variant-link": "awsui_variant-link_vjswe_1arqf_256",
|
|
10
|
+
"variant-icon": "awsui_variant-icon_vjswe_1arqf_281",
|
|
11
|
+
"variant-inline-icon": "awsui_variant-inline-icon_vjswe_1arqf_306",
|
|
12
|
+
"variant-inline-icon-pointer-target": "awsui_variant-inline-icon-pointer-target_vjswe_1arqf_331",
|
|
13
|
+
"variant-inline-link": "awsui_variant-inline-link_vjswe_1arqf_356",
|
|
14
|
+
"variant-modal-dismiss": "awsui_variant-modal-dismiss_vjswe_1arqf_385",
|
|
15
|
+
"variant-flashbar-icon": "awsui_variant-flashbar-icon_vjswe_1arqf_410",
|
|
16
|
+
"variant-breadcrumb-group": "awsui_variant-breadcrumb-group_vjswe_1arqf_435",
|
|
17
|
+
"variant-menu-trigger": "awsui_variant-menu-trigger_vjswe_1arqf_465",
|
|
18
|
+
"button-no-text": "awsui_button-no-text_vjswe_1arqf_557",
|
|
19
|
+
"button-no-wrap": "awsui_button-no-wrap_vjswe_1arqf_561",
|
|
20
|
+
"full-width": "awsui_full-width_vjswe_1arqf_564",
|
|
21
|
+
"icon-left": "awsui_icon-left_vjswe_1arqf_586",
|
|
22
|
+
"icon-right": "awsui_icon-right_vjswe_1arqf_591",
|
|
23
|
+
"icon": "awsui_icon_vjswe_1arqf_586",
|
|
24
|
+
"link": "awsui_link_vjswe_1arqf_610",
|
|
25
|
+
"disabled-with-reason": "awsui_disabled-with-reason_vjswe_1arqf_610"
|
|
26
26
|
};
|
|
27
27
|
|