@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
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"handle": "
|
|
5
|
-
"handle-size-normal": "awsui_handle-size-
|
|
6
|
-
"handle-size-small": "awsui_handle-size-
|
|
7
|
-
"handle-drag-indicator": "awsui_handle-drag-
|
|
8
|
-
"handle-disabled": "awsui_handle-
|
|
9
|
-
"active": "
|
|
10
|
-
"handle-resize-area": "awsui_handle-resize-
|
|
11
|
-
"handle-resize-horizontal": "awsui_handle-resize-
|
|
12
|
-
"handle-resize-vertical": "awsui_handle-resize-
|
|
13
|
-
"hide-focus": "awsui_hide-
|
|
14
|
-
"resize-icon": "awsui_resize-
|
|
15
|
-
"resize-icon-vertical": "awsui_resize-icon-
|
|
16
|
-
"resize-icon-horizontal": "awsui_resize-icon-
|
|
4
|
+
"handle": "awsui_handle_sdha6_13tiu_145",
|
|
5
|
+
"handle-size-normal": "awsui_handle-size-normal_sdha6_13tiu_153",
|
|
6
|
+
"handle-size-small": "awsui_handle-size-small_sdha6_13tiu_157",
|
|
7
|
+
"handle-drag-indicator": "awsui_handle-drag-indicator_sdha6_13tiu_160",
|
|
8
|
+
"handle-disabled": "awsui_handle-disabled_sdha6_13tiu_160",
|
|
9
|
+
"active": "awsui_active_sdha6_13tiu_163",
|
|
10
|
+
"handle-resize-area": "awsui_handle-resize-area_sdha6_13tiu_166",
|
|
11
|
+
"handle-resize-horizontal": "awsui_handle-resize-horizontal_sdha6_13tiu_173",
|
|
12
|
+
"handle-resize-vertical": "awsui_handle-resize-vertical_sdha6_13tiu_176",
|
|
13
|
+
"hide-focus": "awsui_hide-focus_sdha6_13tiu_186",
|
|
14
|
+
"resize-icon": "awsui_resize-icon_sdha6_13tiu_208",
|
|
15
|
+
"resize-icon-vertical": "awsui_resize-icon-vertical_sdha6_13tiu_214",
|
|
16
|
+
"resize-icon-horizontal": "awsui_resize-icon-horizontal_sdha6_13tiu_218",
|
|
17
|
+
"prevent-pointer": "awsui_prevent-pointer_sdha6_13tiu_222"
|
|
17
18
|
};
|
|
18
19
|
|
|
@@ -142,7 +142,7 @@
|
|
|
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_handle_sdha6_13tiu_145:not(#\9) {
|
|
146
146
|
appearance: none;
|
|
147
147
|
color: var(--color-text-interactive-default-qwoe3g, #545b64);
|
|
148
148
|
background: transparent;
|
|
@@ -150,47 +150,47 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
150
150
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
151
151
|
touch-action: none;
|
|
152
152
|
}
|
|
153
|
-
.awsui_handle-size-
|
|
153
|
+
.awsui_handle-size-normal_sdha6_13tiu_153:not(#\9) {
|
|
154
154
|
block-size: var(--line-height-body-m-bedeoh, 22px);
|
|
155
155
|
padding-inline: var(--space-scaled-xxxs-prgw5k, 2px);
|
|
156
156
|
}
|
|
157
|
-
.awsui_handle-size-
|
|
157
|
+
.awsui_handle-size-small_sdha6_13tiu_157:not(#\9) {
|
|
158
158
|
block-size: var(--line-height-body-s-otgtsr, 16px);
|
|
159
159
|
}
|
|
160
|
-
.awsui_handle-drag-
|
|
160
|
+
.awsui_handle-drag-indicator_sdha6_13tiu_160:not(#\9):not(.awsui_handle-disabled_sdha6_13tiu_160) {
|
|
161
161
|
cursor: grab;
|
|
162
162
|
}
|
|
163
|
-
.awsui_handle-drag-
|
|
163
|
+
.awsui_handle-drag-indicator_sdha6_13tiu_160:not(#\9):not(.awsui_handle-disabled_sdha6_13tiu_160).awsui_active_sdha6_13tiu_163 {
|
|
164
164
|
cursor: grabbing;
|
|
165
165
|
}
|
|
166
|
-
.awsui_handle-resize-
|
|
166
|
+
.awsui_handle-resize-area_sdha6_13tiu_166:not(#\9) {
|
|
167
167
|
cursor: nwse-resize;
|
|
168
168
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
169
169
|
}
|
|
170
|
-
.awsui_handle-resize-
|
|
170
|
+
.awsui_handle-resize-area_sdha6_13tiu_166:not(#\9):dir(rtl) {
|
|
171
171
|
cursor: nesw-resize;
|
|
172
172
|
}
|
|
173
|
-
.awsui_handle-resize-
|
|
173
|
+
.awsui_handle-resize-horizontal_sdha6_13tiu_173:not(#\9) {
|
|
174
174
|
cursor: ew-resize;
|
|
175
175
|
}
|
|
176
|
-
.awsui_handle-resize-
|
|
176
|
+
.awsui_handle-resize-vertical_sdha6_13tiu_176:not(#\9) {
|
|
177
177
|
cursor: ns-resize;
|
|
178
178
|
}
|
|
179
|
-
.
|
|
179
|
+
.awsui_handle_sdha6_13tiu_145:not(#\9):hover {
|
|
180
180
|
color: var(--color-text-interactive-hover-bu4gls, #16191f);
|
|
181
181
|
}
|
|
182
|
-
.
|
|
182
|
+
.awsui_handle_sdha6_13tiu_145:not(#\9):focus {
|
|
183
183
|
outline: none;
|
|
184
184
|
text-decoration: none;
|
|
185
185
|
}
|
|
186
|
-
body[data-awsui-focus-visible=true] .
|
|
186
|
+
body[data-awsui-focus-visible=true] .awsui_handle_sdha6_13tiu_145:not(#\9):focus:not(.awsui_hide-focus_sdha6_13tiu_186) {
|
|
187
187
|
position: relative;
|
|
188
188
|
}
|
|
189
|
-
body[data-awsui-focus-visible=true] .
|
|
189
|
+
body[data-awsui-focus-visible=true] .awsui_handle_sdha6_13tiu_145:not(#\9):focus:not(.awsui_hide-focus_sdha6_13tiu_186) {
|
|
190
190
|
outline: 2px dotted transparent;
|
|
191
191
|
outline-offset: calc(0px - 1px);
|
|
192
192
|
}
|
|
193
|
-
body[data-awsui-focus-visible=true] .
|
|
193
|
+
body[data-awsui-focus-visible=true] .awsui_handle_sdha6_13tiu_145:not(#\9):focus:not(.awsui_hide-focus_sdha6_13tiu_186)::before {
|
|
194
194
|
content: " ";
|
|
195
195
|
display: block;
|
|
196
196
|
position: absolute;
|
|
@@ -205,16 +205,20 @@ body[data-awsui-focus-visible=true] .awsui_handle_sdha6_91agl_145:not(#\9):focus
|
|
|
205
205
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-r5f6xl, #0073bb);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
.awsui_resize-
|
|
208
|
+
.awsui_resize-icon_sdha6_13tiu_208:not(#\9) {
|
|
209
209
|
stroke: var(--color-text-interactive-default-qwoe3g, #545b64);
|
|
210
210
|
}
|
|
211
|
-
.awsui_resize-
|
|
211
|
+
.awsui_resize-icon_sdha6_13tiu_208:not(#\9):hover {
|
|
212
212
|
stroke: var(--color-text-interactive-hover-bu4gls, #16191f);
|
|
213
213
|
}
|
|
214
|
-
.awsui_resize-icon-
|
|
214
|
+
.awsui_resize-icon-vertical_sdha6_13tiu_214:not(#\9) {
|
|
215
215
|
margin-block: auto;
|
|
216
216
|
margin-inline: auto;
|
|
217
217
|
}
|
|
218
|
-
.awsui_resize-icon-
|
|
218
|
+
.awsui_resize-icon-horizontal_sdha6_13tiu_218:not(#\9) {
|
|
219
219
|
transform: rotate(90deg);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.awsui_prevent-pointer_sdha6_13tiu_222:not(#\9) {
|
|
223
|
+
pointer-events: none;
|
|
220
224
|
}
|
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"handle": "
|
|
6
|
-
"handle-size-normal": "awsui_handle-size-
|
|
7
|
-
"handle-size-small": "awsui_handle-size-
|
|
8
|
-
"handle-drag-indicator": "awsui_handle-drag-
|
|
9
|
-
"handle-disabled": "awsui_handle-
|
|
10
|
-
"active": "
|
|
11
|
-
"handle-resize-area": "awsui_handle-resize-
|
|
12
|
-
"handle-resize-horizontal": "awsui_handle-resize-
|
|
13
|
-
"handle-resize-vertical": "awsui_handle-resize-
|
|
14
|
-
"hide-focus": "awsui_hide-
|
|
15
|
-
"resize-icon": "awsui_resize-
|
|
16
|
-
"resize-icon-vertical": "awsui_resize-icon-
|
|
17
|
-
"resize-icon-horizontal": "awsui_resize-icon-
|
|
5
|
+
"handle": "awsui_handle_sdha6_13tiu_145",
|
|
6
|
+
"handle-size-normal": "awsui_handle-size-normal_sdha6_13tiu_153",
|
|
7
|
+
"handle-size-small": "awsui_handle-size-small_sdha6_13tiu_157",
|
|
8
|
+
"handle-drag-indicator": "awsui_handle-drag-indicator_sdha6_13tiu_160",
|
|
9
|
+
"handle-disabled": "awsui_handle-disabled_sdha6_13tiu_160",
|
|
10
|
+
"active": "awsui_active_sdha6_13tiu_163",
|
|
11
|
+
"handle-resize-area": "awsui_handle-resize-area_sdha6_13tiu_166",
|
|
12
|
+
"handle-resize-horizontal": "awsui_handle-resize-horizontal_sdha6_13tiu_173",
|
|
13
|
+
"handle-resize-vertical": "awsui_handle-resize-vertical_sdha6_13tiu_176",
|
|
14
|
+
"hide-focus": "awsui_hide-focus_sdha6_13tiu_186",
|
|
15
|
+
"resize-icon": "awsui_resize-icon_sdha6_13tiu_208",
|
|
16
|
+
"resize-icon-vertical": "awsui_resize-icon-vertical_sdha6_13tiu_214",
|
|
17
|
+
"resize-icon-horizontal": "awsui_resize-icon-horizontal_sdha6_13tiu_218",
|
|
18
|
+
"prevent-pointer": "awsui_prevent-pointer_sdha6_13tiu_222"
|
|
18
19
|
};
|
|
19
20
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DragHandleWrapperProps } from './interfaces';
|
|
3
|
-
export default function DragHandleWrapper({ directions, tooltipText, children, onDirectionClick, triggerMode, initialShowButtons, hideButtonsOnDrag, clickDragThreshold, }: DragHandleWrapperProps): JSX.Element;
|
|
3
|
+
export default function DragHandleWrapper({ directions, tooltipText, children, onDirectionClick, triggerMode, initialShowButtons, controlledShowButtons, hideButtonsOnDrag, clickDragThreshold, }: DragHandleWrapperProps): JSX.Element;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle-wrapper/index.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAa,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAKjE,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,UAAU,EACV,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,WAAqB,EACrB,kBAA0B,EAC1B,iBAAiB,EACjB,kBAAkB,GACnB,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle-wrapper/index.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAa,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAKjE,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,UAAU,EACV,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,WAAqB,EACrB,kBAA0B,EAC1B,qBAA6B,EAC7B,iBAAiB,EACjB,kBAAkB,GACnB,EAAE,sBAAsB,eAwNxB"}
|
|
@@ -8,7 +8,7 @@ import Tooltip from '../tooltip';
|
|
|
8
8
|
import DirectionButton from './direction-button';
|
|
9
9
|
import PortalOverlay from './portal-overlay';
|
|
10
10
|
import styles from './styles.css.js';
|
|
11
|
-
export default function DragHandleWrapper({ directions, tooltipText, children, onDirectionClick, triggerMode = 'focus', initialShowButtons = false, hideButtonsOnDrag, clickDragThreshold, }) {
|
|
11
|
+
export default function DragHandleWrapper({ directions, tooltipText, children, onDirectionClick, triggerMode = 'focus', initialShowButtons = false, controlledShowButtons = false, hideButtonsOnDrag, clickDragThreshold, }) {
|
|
12
12
|
const wrapperRef = useRef(null);
|
|
13
13
|
const dragHandleRef = useRef(null);
|
|
14
14
|
const [showTooltip, setShowTooltip] = useState(false);
|
|
@@ -118,7 +118,7 @@ export default function DragHandleWrapper({ directions, tooltipText, children, o
|
|
|
118
118
|
event.key !== 'Control' &&
|
|
119
119
|
event.key !== 'Meta' &&
|
|
120
120
|
event.key !== 'Shift' &&
|
|
121
|
-
triggerMode
|
|
121
|
+
triggerMode === 'focus') {
|
|
122
122
|
// Pressing any other key will display the focus-visible ring around the
|
|
123
123
|
// drag handle if it's in focus, so we should also show the buttons now.
|
|
124
124
|
setShowButtons(true);
|
|
@@ -134,14 +134,15 @@ export default function DragHandleWrapper({ directions, tooltipText, children, o
|
|
|
134
134
|
}
|
|
135
135
|
onDirectionClick === null || onDirectionClick === void 0 ? void 0 : onDirectionClick(direction);
|
|
136
136
|
};
|
|
137
|
-
|
|
137
|
+
const _showButtons = triggerMode === 'controlled' ? controlledShowButtons : showButtons;
|
|
138
|
+
return (React.createElement("div", { className: clsx(styles['drag-handle-wrapper'], _showButtons && styles['drag-handle-wrapper-open']), ref: wrapperRef, onFocus: onWrapperFocusIn, onBlur: onWrapperFocusOut },
|
|
138
139
|
React.createElement("div", { onPointerEnter: onTooltipGroupPointerEnter, onPointerLeave: onTooltipGroupPointerLeave },
|
|
139
140
|
React.createElement("div", { className: styles['drag-handle'], ref: dragHandleRef, onPointerDown: onHandlePointerDown, onKeyDown: onDragHandleKeyDown }, children),
|
|
140
|
-
!isDisabled && !
|
|
141
|
-
React.createElement(PortalOverlay, { track: dragHandleRef, isDisabled: !
|
|
142
|
-
directions['block-start'] && (React.createElement(DirectionButton, { show: !isDisabled &&
|
|
143
|
-
directions['block-end'] && (React.createElement(DirectionButton, { show: !isDisabled &&
|
|
144
|
-
directions['inline-start'] && (React.createElement(DirectionButton, { show: !isDisabled &&
|
|
145
|
-
directions['inline-end'] && (React.createElement(DirectionButton, { show: !isDisabled &&
|
|
141
|
+
!isDisabled && !_showButtons && showTooltip && tooltipText && (React.createElement(Tooltip, { trackRef: dragHandleRef, value: tooltipText, onDismiss: () => setShowTooltip(false) }))),
|
|
142
|
+
React.createElement(PortalOverlay, { track: dragHandleRef, isDisabled: !_showButtons },
|
|
143
|
+
directions['block-start'] && (React.createElement(DirectionButton, { show: !isDisabled && _showButtons, direction: "block-start", state: directions['block-start'], onClick: () => onInternalDirectionClick('block-start') })),
|
|
144
|
+
directions['block-end'] && (React.createElement(DirectionButton, { show: !isDisabled && _showButtons, direction: "block-end", state: directions['block-end'], onClick: () => onInternalDirectionClick('block-end') })),
|
|
145
|
+
directions['inline-start'] && (React.createElement(DirectionButton, { show: !isDisabled && _showButtons, direction: "inline-start", state: directions['inline-start'], onClick: () => onInternalDirectionClick('inline-start') })),
|
|
146
|
+
directions['inline-end'] && (React.createElement(DirectionButton, { show: !isDisabled && _showButtons, direction: "inline-end", state: directions['inline-end'], onClick: () => onInternalDirectionClick('inline-end') })))));
|
|
146
147
|
}
|
|
147
148
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle-wrapper/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAEjD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,UA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C,YAAY,CAAC,EAC/B,OAAO,EAAE,GAAG,EAAE,CAAC,wBAAwB,CAAC,YAAY,CAAC,GACrD,CACH,CACa,CACZ,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { nodeContains } from '@cloudscape-design/component-toolkit/dom';\n\nimport { getFirstFocusable } from '../focus-lock/utils';\nimport Tooltip from '../tooltip';\nimport DirectionButton from './direction-button';\nimport { Direction, DragHandleWrapperProps } from './interfaces';\nimport PortalOverlay from './portal-overlay';\n\nimport styles from './styles.css.js';\n\nexport default function DragHandleWrapper({\n directions,\n tooltipText,\n children,\n onDirectionClick,\n triggerMode = 'focus',\n initialShowButtons = false,\n hideButtonsOnDrag,\n clickDragThreshold,\n}: DragHandleWrapperProps) {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const dragHandleRef = useRef<HTMLDivElement | null>(null);\n const [showTooltip, setShowTooltip] = useState(false);\n const [showButtons, setShowButtons] = useState(initialShowButtons);\n\n const isPointerDown = useRef(false);\n const initialPointerPosition = useRef<{ x: number; y: number } | undefined>();\n const didPointerDrag = useRef(false);\n\n // The tooltip (\"Drag or select to move/resize\") shouldn't show if clicking\n // on the handle wouldn't do anything.\n const isDisabled =\n !directions['block-start'] && !directions['block-end'] && !directions['inline-start'] && !directions['inline-end'];\n\n const onWrapperFocusIn: React.FocusEventHandler = event => {\n // The drag handle is focused when it's either tabbed to, or the pointer\n // is pressed on it. We exclude handling the pointer press in this handler,\n // since it could be the start of a drag event - the pointer stuff is\n // handled in the \"pointerup\" listener instead. In cases where focus is moved\n // to the button (by manually calling `.focus()`, the buttons should only appear)\n // if the action that triggered the focus move was the result of a keypress.\n if (document.body.dataset.awsuiFocusVisible && !nodeContains(wrapperRef.current, event.relatedTarget)) {\n setShowTooltip(false);\n if (triggerMode === 'focus') {\n setShowButtons(true);\n }\n }\n };\n\n const onWrapperFocusOut: React.FocusEventHandler = event => {\n // Close the directional buttons when the focus leaves the drag handle.\n // \"focusout\" is also triggered when the user leaves the current tab, but\n // since it'll be returned when they switch back anyway, we exclude that\n // case by checking for `document.hasFocus()`.\n if (document.hasFocus() && !nodeContains(wrapperRef.current, event.relatedTarget)) {\n setShowButtons(false);\n }\n };\n\n useEffect(() => {\n const controller = new AbortController();\n\n // We need to differentiate between a \"click\" and a \"drag\" action.\n // We can say a \"click\" happens when a \"pointerdown\" is followed by\n // a \"pointerup\" with no \"pointermove\" between the two.\n // However, it would be a poor usability experience if a \"click\" isn't\n // registered because, while pressing my mouse, I moved it by just one\n // pixel, making it a \"drag\" instead. So we allow the pointer to move by\n // `clickDragThreshold` pixels before setting `didPointerDrag` to true.\n document.addEventListener(\n 'pointermove',\n event => {\n if (\n isPointerDown.current &&\n initialPointerPosition.current &&\n (event.clientX > initialPointerPosition.current.x + clickDragThreshold ||\n event.clientX < initialPointerPosition.current.x - clickDragThreshold ||\n event.clientY > initialPointerPosition.current.y + clickDragThreshold ||\n event.clientY < initialPointerPosition.current.y - clickDragThreshold)\n ) {\n didPointerDrag.current = true;\n if (hideButtonsOnDrag) {\n setShowButtons(false);\n }\n }\n },\n { signal: controller.signal }\n );\n\n // Shared behavior when a \"pointerdown\" state ends. This is shared so it\n // can be called for both \"pointercancel\" and \"pointerup\" events.\n const resetPointerDownState = () => {\n isPointerDown.current = false;\n initialPointerPosition.current = undefined;\n };\n\n document.addEventListener(\n 'pointercancel',\n () => {\n resetPointerDownState();\n },\n { signal: controller.signal }\n );\n\n document.addEventListener(\n 'pointerup',\n () => {\n if (isPointerDown.current && !didPointerDrag.current) {\n // The cursor didn't move much between \"pointerdown\" and \"pointerup\".\n // Handle this as a \"click\" instead of a \"drag\".\n setShowButtons(true);\n }\n resetPointerDownState();\n },\n { signal: controller.signal }\n );\n\n return () => controller.abort();\n }, [clickDragThreshold, hideButtonsOnDrag]);\n\n const onHandlePointerDown: React.PointerEventHandler = event => {\n // Tooltip behavior: the tooltip should appear on hover, but disappear when\n // the pointer starts dragging (having the tooltip get in the way while\n // you're trying to drag upwards is annoying). Additionally, the tooltip\n // shouldn't reappear when dragging ends, but only when the pointer leaves\n // the drag handle and comes back.\n\n isPointerDown.current = true;\n didPointerDrag.current = false;\n initialPointerPosition.current = { x: event.clientX, y: event.clientY };\n setShowTooltip(false);\n };\n\n // Tooltip behavior: the tooltip should stay open when the cursor moves\n // from the drag handle into the tooltip content itself. This is why the\n // handler is set on the wrapper for both the drag handle and the tooltip.\n const onTooltipGroupPointerEnter: React.PointerEventHandler = () => {\n if (!isPointerDown.current) {\n setShowTooltip(true);\n }\n };\n const onTooltipGroupPointerLeave: React.PointerEventHandler = () => {\n setShowTooltip(false);\n };\n\n const onDragHandleKeyDown: React.KeyboardEventHandler = event => {\n // For accessibility reasons, pressing escape should always close the floating controls.\n if (event.key === 'Escape') {\n setShowButtons(false);\n } else if (triggerMode === 'keyboard-activate' && (event.key === 'Enter' || event.key === ' ')) {\n // toggle buttons when Enter or space is pressed in 'keyboard-activate' triggerMode\n setShowButtons(prevshowButtons => !prevshowButtons);\n } else if (\n event.key !== 'Alt' &&\n event.key !== 'Control' &&\n event.key !== 'Meta' &&\n event.key !== 'Shift' &&\n triggerMode !== 'keyboard-activate'\n ) {\n // Pressing any other key will display the focus-visible ring around the\n // drag handle if it's in focus, so we should also show the buttons now.\n setShowButtons(true);\n }\n };\n\n const onInternalDirectionClick = (direction: Direction) => {\n // Move focus back to the wrapper on click. This prevents focus from staying\n // on an aria-hidden control, and allows future keyboard events to be handled\n // cleanly using the drag handle's own handlers.\n if (dragHandleRef.current) {\n getFirstFocusable(dragHandleRef.current)?.focus();\n }\n onDirectionClick?.(direction);\n };\n\n return (\n <div\n className={clsx(styles['drag-handle-wrapper'], showButtons && styles['drag-handle-wrapper-open'])}\n ref={wrapperRef}\n onFocus={onWrapperFocusIn}\n onBlur={onWrapperFocusOut}\n >\n <div onPointerEnter={onTooltipGroupPointerEnter} onPointerLeave={onTooltipGroupPointerLeave}>\n <div\n className={styles['drag-handle']}\n ref={dragHandleRef}\n onPointerDown={onHandlePointerDown}\n onKeyDown={onDragHandleKeyDown}\n >\n {children}\n </div>\n\n {!isDisabled && !showButtons && showTooltip && tooltipText && (\n <Tooltip trackRef={dragHandleRef} value={tooltipText} onDismiss={() => setShowTooltip(false)} />\n )}\n </div>\n\n <PortalOverlay track={dragHandleRef} isDisabled={!showButtons}>\n {directions['block-start'] && (\n <DirectionButton\n show={!isDisabled && showButtons}\n direction=\"block-start\"\n state={directions['block-start']}\n onClick={() => onInternalDirectionClick('block-start')}\n />\n )}\n {directions['block-end'] && (\n <DirectionButton\n show={!isDisabled && showButtons}\n direction=\"block-end\"\n state={directions['block-end']}\n onClick={() => onInternalDirectionClick('block-end')}\n />\n )}\n {directions['inline-start'] && (\n <DirectionButton\n show={!isDisabled && showButtons}\n direction=\"inline-start\"\n state={directions['inline-start']}\n onClick={() => onInternalDirectionClick('inline-start')}\n />\n )}\n {directions['inline-end'] && (\n <DirectionButton\n show={!isDisabled && showButtons}\n direction=\"inline-end\"\n state={directions['inline-end']}\n onClick={() => onInternalDirectionClick('inline-end')}\n />\n )}\n </PortalOverlay>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle-wrapper/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAEjD,OAAO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AAU,CAAC,cAAc,CAAC,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,wBAAwB,CAAC,cAAc,CAAC,GACvD,CACH;YACA,UAAU,CAAC,YAAY,CAAC,IAAI,CAC3B,oBAAC,eAAe,IACd,IAAI,EAAE,CAAC,UAAU,IAAI,YAAY,EACjC,SAAS,EAAC,YAAY,EACtB,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC,EAC/B,OAAO,EAAE,GAAG,EAAE,CAAC,wBAAwB,CAAC,YAAY,CAAC,GACrD,CACH,CACa,CACZ,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { nodeContains } from '@cloudscape-design/component-toolkit/dom';\n\nimport { getFirstFocusable } from '../focus-lock/utils';\nimport Tooltip from '../tooltip';\nimport DirectionButton from './direction-button';\nimport { Direction, DragHandleWrapperProps } from './interfaces';\nimport PortalOverlay from './portal-overlay';\n\nimport styles from './styles.css.js';\n\nexport default function DragHandleWrapper({\n directions,\n tooltipText,\n children,\n onDirectionClick,\n triggerMode = 'focus',\n initialShowButtons = false,\n controlledShowButtons = false,\n hideButtonsOnDrag,\n clickDragThreshold,\n}: DragHandleWrapperProps) {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const dragHandleRef = useRef<HTMLDivElement | null>(null);\n const [showTooltip, setShowTooltip] = useState(false);\n const [showButtons, setShowButtons] = useState(initialShowButtons);\n\n const isPointerDown = useRef(false);\n const initialPointerPosition = useRef<{ x: number; y: number } | undefined>();\n const didPointerDrag = useRef(false);\n\n // The tooltip (\"Drag or select to move/resize\") shouldn't show if clicking\n // on the handle wouldn't do anything.\n const isDisabled =\n !directions['block-start'] && !directions['block-end'] && !directions['inline-start'] && !directions['inline-end'];\n\n const onWrapperFocusIn: React.FocusEventHandler = event => {\n // The drag handle is focused when it's either tabbed to, or the pointer\n // is pressed on it. We exclude handling the pointer press in this handler,\n // since it could be the start of a drag event - the pointer stuff is\n // handled in the \"pointerup\" listener instead. In cases where focus is moved\n // to the button (by manually calling `.focus()`, the buttons should only appear)\n // if the action that triggered the focus move was the result of a keypress.\n if (document.body.dataset.awsuiFocusVisible && !nodeContains(wrapperRef.current, event.relatedTarget)) {\n setShowTooltip(false);\n if (triggerMode === 'focus') {\n setShowButtons(true);\n }\n }\n };\n\n const onWrapperFocusOut: React.FocusEventHandler = event => {\n // Close the directional buttons when the focus leaves the drag handle.\n // \"focusout\" is also triggered when the user leaves the current tab, but\n // since it'll be returned when they switch back anyway, we exclude that\n // case by checking for `document.hasFocus()`.\n if (document.hasFocus() && !nodeContains(wrapperRef.current, event.relatedTarget)) {\n setShowButtons(false);\n }\n };\n\n useEffect(() => {\n const controller = new AbortController();\n\n // We need to differentiate between a \"click\" and a \"drag\" action.\n // We can say a \"click\" happens when a \"pointerdown\" is followed by\n // a \"pointerup\" with no \"pointermove\" between the two.\n // However, it would be a poor usability experience if a \"click\" isn't\n // registered because, while pressing my mouse, I moved it by just one\n // pixel, making it a \"drag\" instead. So we allow the pointer to move by\n // `clickDragThreshold` pixels before setting `didPointerDrag` to true.\n document.addEventListener(\n 'pointermove',\n event => {\n if (\n isPointerDown.current &&\n initialPointerPosition.current &&\n (event.clientX > initialPointerPosition.current.x + clickDragThreshold ||\n event.clientX < initialPointerPosition.current.x - clickDragThreshold ||\n event.clientY > initialPointerPosition.current.y + clickDragThreshold ||\n event.clientY < initialPointerPosition.current.y - clickDragThreshold)\n ) {\n didPointerDrag.current = true;\n if (hideButtonsOnDrag) {\n setShowButtons(false);\n }\n }\n },\n { signal: controller.signal }\n );\n\n // Shared behavior when a \"pointerdown\" state ends. This is shared so it\n // can be called for both \"pointercancel\" and \"pointerup\" events.\n const resetPointerDownState = () => {\n isPointerDown.current = false;\n initialPointerPosition.current = undefined;\n };\n\n document.addEventListener(\n 'pointercancel',\n () => {\n resetPointerDownState();\n },\n { signal: controller.signal }\n );\n\n document.addEventListener(\n 'pointerup',\n () => {\n if (isPointerDown.current && !didPointerDrag.current) {\n // The cursor didn't move much between \"pointerdown\" and \"pointerup\".\n // Handle this as a \"click\" instead of a \"drag\".\n setShowButtons(true);\n }\n resetPointerDownState();\n },\n { signal: controller.signal }\n );\n\n return () => controller.abort();\n }, [clickDragThreshold, hideButtonsOnDrag]);\n\n const onHandlePointerDown: React.PointerEventHandler = event => {\n // Tooltip behavior: the tooltip should appear on hover, but disappear when\n // the pointer starts dragging (having the tooltip get in the way while\n // you're trying to drag upwards is annoying). Additionally, the tooltip\n // shouldn't reappear when dragging ends, but only when the pointer leaves\n // the drag handle and comes back.\n\n isPointerDown.current = true;\n didPointerDrag.current = false;\n initialPointerPosition.current = { x: event.clientX, y: event.clientY };\n setShowTooltip(false);\n };\n\n // Tooltip behavior: the tooltip should stay open when the cursor moves\n // from the drag handle into the tooltip content itself. This is why the\n // handler is set on the wrapper for both the drag handle and the tooltip.\n const onTooltipGroupPointerEnter: React.PointerEventHandler = () => {\n if (!isPointerDown.current) {\n setShowTooltip(true);\n }\n };\n const onTooltipGroupPointerLeave: React.PointerEventHandler = () => {\n setShowTooltip(false);\n };\n\n const onDragHandleKeyDown: React.KeyboardEventHandler = event => {\n // For accessibility reasons, pressing escape should always close the floating controls.\n if (event.key === 'Escape') {\n setShowButtons(false);\n } else if (triggerMode === 'keyboard-activate' && (event.key === 'Enter' || event.key === ' ')) {\n // toggle buttons when Enter or space is pressed in 'keyboard-activate' triggerMode\n setShowButtons(prevshowButtons => !prevshowButtons);\n } else if (\n event.key !== 'Alt' &&\n event.key !== 'Control' &&\n event.key !== 'Meta' &&\n event.key !== 'Shift' &&\n triggerMode === 'focus'\n ) {\n // Pressing any other key will display the focus-visible ring around the\n // drag handle if it's in focus, so we should also show the buttons now.\n setShowButtons(true);\n }\n };\n\n const onInternalDirectionClick = (direction: Direction) => {\n // Move focus back to the wrapper on click. This prevents focus from staying\n // on an aria-hidden control, and allows future keyboard events to be handled\n // cleanly using the drag handle's own handlers.\n if (dragHandleRef.current) {\n getFirstFocusable(dragHandleRef.current)?.focus();\n }\n onDirectionClick?.(direction);\n };\n\n const _showButtons = triggerMode === 'controlled' ? controlledShowButtons : showButtons;\n\n return (\n <div\n className={clsx(styles['drag-handle-wrapper'], _showButtons && styles['drag-handle-wrapper-open'])}\n ref={wrapperRef}\n onFocus={onWrapperFocusIn}\n onBlur={onWrapperFocusOut}\n >\n <div onPointerEnter={onTooltipGroupPointerEnter} onPointerLeave={onTooltipGroupPointerLeave}>\n <div\n className={styles['drag-handle']}\n ref={dragHandleRef}\n onPointerDown={onHandlePointerDown}\n onKeyDown={onDragHandleKeyDown}\n >\n {children}\n </div>\n\n {!isDisabled && !_showButtons && showTooltip && tooltipText && (\n <Tooltip trackRef={dragHandleRef} value={tooltipText} onDismiss={() => setShowTooltip(false)} />\n )}\n </div>\n\n <PortalOverlay track={dragHandleRef} isDisabled={!_showButtons}>\n {directions['block-start'] && (\n <DirectionButton\n show={!isDisabled && _showButtons}\n direction=\"block-start\"\n state={directions['block-start']}\n onClick={() => onInternalDirectionClick('block-start')}\n />\n )}\n {directions['block-end'] && (\n <DirectionButton\n show={!isDisabled && _showButtons}\n direction=\"block-end\"\n state={directions['block-end']}\n onClick={() => onInternalDirectionClick('block-end')}\n />\n )}\n {directions['inline-start'] && (\n <DirectionButton\n show={!isDisabled && _showButtons}\n direction=\"inline-start\"\n state={directions['inline-start']}\n onClick={() => onInternalDirectionClick('inline-start')}\n />\n )}\n {directions['inline-end'] && (\n <DirectionButton\n show={!isDisabled && _showButtons}\n direction=\"inline-end\"\n state={directions['inline-end']}\n onClick={() => onInternalDirectionClick('inline-end')}\n />\n )}\n </PortalOverlay>\n </div>\n );\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type Direction = 'block-start' | 'block-end' | 'inline-start' | 'inline-end';
|
|
3
3
|
export type DirectionState = 'active' | 'disabled';
|
|
4
|
-
export type TriggerMode = 'focus' | 'keyboard-activate';
|
|
4
|
+
export type TriggerMode = 'focus' | 'keyboard-activate' | 'controlled';
|
|
5
5
|
export interface DragHandleWrapperProps {
|
|
6
6
|
directions: Partial<Record<Direction, DirectionState>>;
|
|
7
7
|
onDirectionClick?: (direction: Direction) => void;
|
|
@@ -9,6 +9,7 @@ export interface DragHandleWrapperProps {
|
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
triggerMode?: TriggerMode;
|
|
11
11
|
initialShowButtons?: boolean;
|
|
12
|
+
controlledShowButtons?: boolean;
|
|
12
13
|
hideButtonsOnDrag: boolean;
|
|
13
14
|
clickDragThreshold: number;
|
|
14
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle-wrapper/interfaces.ts"],"names":[],"mappings":";AAGA,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,cAAc,GAAG,YAAY,CAAC;AACpF,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle-wrapper/interfaces.ts"],"names":[],"mappings":";AAGA,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,cAAc,GAAG,YAAY,CAAC;AACpF,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,mBAAmB,GAAG,YAAY,CAAC;AAEvE,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IACvD,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle-wrapper/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport type Direction = 'block-start' | 'block-end' | 'inline-start' | 'inline-end';\nexport type DirectionState = 'active' | 'disabled';\nexport type TriggerMode = 'focus' | 'keyboard-activate';\n\nexport interface DragHandleWrapperProps {\n directions: Partial<Record<Direction, DirectionState>>;\n onDirectionClick?: (direction: Direction) => void;\n tooltipText?: string;\n children: React.ReactNode;\n triggerMode?: TriggerMode;\n initialShowButtons?: boolean;\n hideButtonsOnDrag: boolean;\n clickDragThreshold: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle-wrapper/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport type Direction = 'block-start' | 'block-end' | 'inline-start' | 'inline-end';\nexport type DirectionState = 'active' | 'disabled';\nexport type TriggerMode = 'focus' | 'keyboard-activate' | 'controlled';\n\nexport interface DragHandleWrapperProps {\n directions: Partial<Record<Direction, DirectionState>>;\n onDirectionClick?: (direction: Direction) => void;\n tooltipText?: string;\n children: React.ReactNode;\n triggerMode?: TriggerMode;\n initialShowButtons?: boolean;\n controlledShowButtons?: boolean;\n hideButtonsOnDrag: boolean;\n clickDragThreshold: number;\n}\n"]}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"direction-button-wrapper": "awsui_direction-button-
|
|
5
|
-
"direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-
|
|
6
|
-
"direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-
|
|
7
|
-
"direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-
|
|
8
|
-
"direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-
|
|
9
|
-
"drag-handle-entry": "awsui_drag-handle-
|
|
10
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
11
|
-
"drag-handle-exit": "awsui_drag-handle-
|
|
12
|
-
"awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-
|
|
13
|
-
"direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-
|
|
14
|
-
"direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-
|
|
15
|
-
"direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-
|
|
16
|
-
"direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-
|
|
17
|
-
"direction-button-wrapper-rtl": "awsui_direction-button-wrapper-
|
|
18
|
-
"drag-handle-wrapper": "awsui_drag-handle-
|
|
19
|
-
"portal-overlay": "awsui_portal-
|
|
20
|
-
"portal-overlay-contents": "awsui_portal-overlay-
|
|
21
|
-
"drag-handle": "awsui_drag-
|
|
22
|
-
"direction-button-wrapper-hidden": "awsui_direction-button-wrapper-
|
|
23
|
-
"direction-button": "awsui_direction-
|
|
24
|
-
"direction-button-disabled": "awsui_direction-button-
|
|
4
|
+
"direction-button-wrapper": "awsui_direction-button-wrapper_155yk_11kuq_169",
|
|
5
|
+
"direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-enter_155yk_11kuq_189",
|
|
6
|
+
"direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-entering_155yk_11kuq_189",
|
|
7
|
+
"direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-exit_155yk_11kuq_189",
|
|
8
|
+
"direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-exiting_155yk_11kuq_189",
|
|
9
|
+
"drag-handle-entry": "awsui_drag-handle-entry_155yk_11kuq_1",
|
|
10
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_155yk_11kuq_1",
|
|
11
|
+
"drag-handle-exit": "awsui_drag-handle-exit_155yk_11kuq_1",
|
|
12
|
+
"awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_155yk_11kuq_1",
|
|
13
|
+
"direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-start_155yk_11kuq_229",
|
|
14
|
+
"direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-end_155yk_11kuq_233",
|
|
15
|
+
"direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-start_155yk_11kuq_237",
|
|
16
|
+
"direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-end_155yk_11kuq_238",
|
|
17
|
+
"direction-button-wrapper-rtl": "awsui_direction-button-wrapper-rtl_155yk_11kuq_238",
|
|
18
|
+
"drag-handle-wrapper": "awsui_drag-handle-wrapper_155yk_11kuq_247",
|
|
19
|
+
"portal-overlay": "awsui_portal-overlay_155yk_11kuq_252",
|
|
20
|
+
"portal-overlay-contents": "awsui_portal-overlay-contents_155yk_11kuq_260",
|
|
21
|
+
"drag-handle": "awsui_drag-handle_155yk_11kuq_247",
|
|
22
|
+
"direction-button-wrapper-hidden": "awsui_direction-button-wrapper-hidden_155yk_11kuq_277",
|
|
23
|
+
"direction-button": "awsui_direction-button_155yk_11kuq_169",
|
|
24
|
+
"direction-button-disabled": "awsui_direction-button-disabled_155yk_11kuq_320"
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -150,27 +150,27 @@ 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
|
-
@keyframes awsui_drag-handle-
|
|
153
|
+
@keyframes awsui_drag-handle-entry_155yk_11kuq_1 {
|
|
154
154
|
from {
|
|
155
|
-
transform: translate(var(--awsui-drag-handle-animation-inline-offset-
|
|
155
|
+
transform: translate(var(--awsui-drag-handle-animation-inline-offset-mdigke), var(--awsui-drag-handle-animation-block-offset-mdigke));
|
|
156
156
|
}
|
|
157
157
|
to {
|
|
158
158
|
transform: translate(0, 0);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
@keyframes awsui_drag-handle-
|
|
161
|
+
@keyframes awsui_drag-handle-exit_155yk_11kuq_1 {
|
|
162
162
|
from {
|
|
163
163
|
transform: translate(0, 0);
|
|
164
164
|
}
|
|
165
165
|
to {
|
|
166
|
-
transform: translate(var(--awsui-drag-handle-animation-inline-offset-
|
|
166
|
+
transform: translate(var(--awsui-drag-handle-animation-inline-offset-mdigke), var(--awsui-drag-handle-animation-block-offset-mdigke));
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
.awsui_direction-button-
|
|
170
|
-
--awsui-drag-handle-animation-inline-offset-
|
|
171
|
-
--awsui-drag-handle-animation-block-offset-
|
|
169
|
+
.awsui_direction-button-wrapper_155yk_11kuq_169:not(#\9) {
|
|
170
|
+
--awsui-drag-handle-animation-inline-offset-mdigke: 0;
|
|
171
|
+
--awsui-drag-handle-animation-block-offset-mdigke: 0;
|
|
172
172
|
}
|
|
173
|
-
@keyframes awsui_awsui-motion-fade-
|
|
173
|
+
@keyframes awsui_awsui-motion-fade-in_155yk_11kuq_1 {
|
|
174
174
|
from {
|
|
175
175
|
opacity: 0.2;
|
|
176
176
|
}
|
|
@@ -178,7 +178,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
178
178
|
opacity: 1;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
@keyframes awsui_awsui-motion-fade-out-
|
|
181
|
+
@keyframes awsui_awsui-motion-fade-out-0_155yk_11kuq_1 {
|
|
182
182
|
from {
|
|
183
183
|
opacity: 1;
|
|
184
184
|
}
|
|
@@ -186,70 +186,70 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
186
186
|
opacity: 0;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
.awsui_direction-button-wrapper-motion-
|
|
189
|
+
.awsui_direction-button-wrapper-motion-enter_155yk_11kuq_189:not(#\9), .awsui_direction-button-wrapper-motion-entering_155yk_11kuq_189:not(#\9), .awsui_direction-button-wrapper-motion-exit_155yk_11kuq_189:not(#\9), .awsui_direction-button-wrapper-motion-exiting_155yk_11kuq_189:not(#\9) {
|
|
190
190
|
pointer-events: none;
|
|
191
191
|
}
|
|
192
|
-
.awsui_direction-button-wrapper-motion-
|
|
193
|
-
animation: awsui_drag-handle-
|
|
192
|
+
.awsui_direction-button-wrapper-motion-entering_155yk_11kuq_189:not(#\9) {
|
|
193
|
+
animation: awsui_drag-handle-entry_155yk_11kuq_1 var(--motion-duration-complex-hv88cf, 270ms) var(--motion-easing-responsive-dxkfpl, ease-out), awsui_awsui-motion-fade-in_155yk_11kuq_1 var(--motion-duration-complex-hv88cf, 270ms) var(--motion-easing-responsive-dxkfpl, ease-out);
|
|
194
194
|
}
|
|
195
195
|
@media (prefers-reduced-motion: reduce) {
|
|
196
|
-
.awsui_direction-button-wrapper-motion-
|
|
196
|
+
.awsui_direction-button-wrapper-motion-entering_155yk_11kuq_189:not(#\9) {
|
|
197
197
|
animation: none;
|
|
198
198
|
transition: none;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
.awsui-motion-disabled .awsui_direction-button-wrapper-motion-
|
|
201
|
+
.awsui-motion-disabled .awsui_direction-button-wrapper-motion-entering_155yk_11kuq_189:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-entering_155yk_11kuq_189:not(#\9) {
|
|
202
202
|
animation: none;
|
|
203
203
|
transition: none;
|
|
204
204
|
}
|
|
205
|
-
.awsui_direction-button-wrapper-motion-
|
|
206
|
-
animation: awsui_drag-handle-
|
|
205
|
+
.awsui_direction-button-wrapper-motion-exiting_155yk_11kuq_189:not(#\9) {
|
|
206
|
+
animation: awsui_drag-handle-exit_155yk_11kuq_1 var(--motion-duration-complex-hv88cf, 270ms) var(--motion-easing-responsive-dxkfpl, ease-out) forwards, awsui_awsui-motion-fade-out-0_155yk_11kuq_1 var(--motion-duration-complex-hv88cf, 270ms) var(--motion-easing-responsive-dxkfpl, ease-out) forwards;
|
|
207
207
|
}
|
|
208
208
|
@media (prefers-reduced-motion: reduce) {
|
|
209
|
-
.awsui_direction-button-wrapper-motion-
|
|
209
|
+
.awsui_direction-button-wrapper-motion-exiting_155yk_11kuq_189:not(#\9) {
|
|
210
210
|
animation: none;
|
|
211
211
|
transition: none;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
.awsui-motion-disabled .awsui_direction-button-wrapper-motion-
|
|
214
|
+
.awsui-motion-disabled .awsui_direction-button-wrapper-motion-exiting_155yk_11kuq_189:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-exiting_155yk_11kuq_189:not(#\9) {
|
|
215
215
|
animation: none;
|
|
216
216
|
transition: none;
|
|
217
217
|
}
|
|
218
218
|
@media (prefers-reduced-motion: reduce) {
|
|
219
|
-
.awsui_direction-button-
|
|
219
|
+
.awsui_direction-button-wrapper_155yk_11kuq_169:not(#\9) {
|
|
220
220
|
animation: none;
|
|
221
221
|
transition: none;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
.awsui-motion-disabled .awsui_direction-button-
|
|
224
|
+
.awsui-motion-disabled .awsui_direction-button-wrapper_155yk_11kuq_169:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper_155yk_11kuq_169:not(#\9) {
|
|
225
225
|
animation: none;
|
|
226
226
|
transition: none;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
.awsui_direction-button-wrapper-block-
|
|
230
|
-
--awsui-drag-handle-animation-block-offset-
|
|
229
|
+
.awsui_direction-button-wrapper-block-start_155yk_11kuq_229:not(#\9) {
|
|
230
|
+
--awsui-drag-handle-animation-block-offset-mdigke: 20px;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
.awsui_direction-button-wrapper-block-
|
|
234
|
-
--awsui-drag-handle-animation-block-offset-
|
|
233
|
+
.awsui_direction-button-wrapper-block-end_155yk_11kuq_233:not(#\9) {
|
|
234
|
+
--awsui-drag-handle-animation-block-offset-mdigke: -20px;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
.awsui_direction-button-wrapper-inline-
|
|
238
|
-
.awsui_direction-button-wrapper-inline-
|
|
239
|
-
--awsui-drag-handle-animation-inline-offset-
|
|
237
|
+
.awsui_direction-button-wrapper-inline-start_155yk_11kuq_237:not(#\9),
|
|
238
|
+
.awsui_direction-button-wrapper-inline-end_155yk_11kuq_238.awsui_direction-button-wrapper-rtl_155yk_11kuq_238:not(#\9) {
|
|
239
|
+
--awsui-drag-handle-animation-inline-offset-mdigke: 20px;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
.awsui_direction-button-wrapper-inline-
|
|
243
|
-
.awsui_direction-button-wrapper-inline-
|
|
244
|
-
--awsui-drag-handle-animation-inline-offset-
|
|
242
|
+
.awsui_direction-button-wrapper-inline-end_155yk_11kuq_238:not(#\9),
|
|
243
|
+
.awsui_direction-button-wrapper-inline-start_155yk_11kuq_237.awsui_direction-button-wrapper-rtl_155yk_11kuq_238:not(#\9) {
|
|
244
|
+
--awsui-drag-handle-animation-inline-offset-mdigke: -20px;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
.awsui_drag-handle-
|
|
247
|
+
.awsui_drag-handle-wrapper_155yk_11kuq_247:not(#\9) {
|
|
248
248
|
position: relative;
|
|
249
249
|
display: inline-block;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
.awsui_portal-
|
|
252
|
+
.awsui_portal-overlay_155yk_11kuq_252:not(#\9) {
|
|
253
253
|
position: absolute;
|
|
254
254
|
inset-block-start: 0;
|
|
255
255
|
inset-inline-start: 0;
|
|
@@ -257,16 +257,16 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
257
257
|
z-index: 7000;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
.awsui_portal-overlay-
|
|
260
|
+
.awsui_portal-overlay-contents_155yk_11kuq_260:not(#\9) {
|
|
261
261
|
pointer-events: auto;
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
.awsui_drag-
|
|
264
|
+
.awsui_drag-handle_155yk_11kuq_247:not(#\9) {
|
|
265
265
|
position: relative;
|
|
266
266
|
display: flex;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
.awsui_direction-button-
|
|
269
|
+
.awsui_direction-button-wrapper_155yk_11kuq_169:not(#\9) {
|
|
270
270
|
position: absolute;
|
|
271
271
|
block-size: var(--space-static-xl-pek4x1, 24px);
|
|
272
272
|
inline-size: var(--space-static-xl-pek4x1, 24px);
|
|
@@ -274,31 +274,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
274
274
|
padding-inline: var(--space-static-xxs-0cgyf1, 4px);
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
.awsui_direction-button-wrapper-
|
|
277
|
+
.awsui_direction-button-wrapper-hidden_155yk_11kuq_277:not(#\9) {
|
|
278
278
|
display: none;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
.awsui_direction-button-wrapper-block-
|
|
281
|
+
.awsui_direction-button-wrapper-block-start_155yk_11kuq_229:not(#\9) {
|
|
282
282
|
inset-block-start: calc(-1 * (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)));
|
|
283
283
|
inset-inline-start: calc(50% - (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)) / 2);
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
.awsui_direction-button-wrapper-block-
|
|
286
|
+
.awsui_direction-button-wrapper-block-end_155yk_11kuq_233:not(#\9) {
|
|
287
287
|
inset-block-end: calc(-1 * (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)));
|
|
288
288
|
inset-inline-start: calc(50% - (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)) / 2);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
.awsui_direction-button-wrapper-inline-
|
|
291
|
+
.awsui_direction-button-wrapper-inline-start_155yk_11kuq_237:not(#\9) {
|
|
292
292
|
inset-inline-start: calc(-1 * (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)));
|
|
293
293
|
inset-block-start: calc(50% - (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)) / 2);
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
.awsui_direction-button-wrapper-inline-
|
|
296
|
+
.awsui_direction-button-wrapper-inline-end_155yk_11kuq_238:not(#\9) {
|
|
297
297
|
inset-inline-end: calc(-1 * (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)));
|
|
298
298
|
inset-block-start: calc(50% - (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)) / 2);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
.awsui_direction-
|
|
301
|
+
.awsui_direction-button_155yk_11kuq_169:not(#\9) {
|
|
302
302
|
position: absolute;
|
|
303
303
|
border-width: 0;
|
|
304
304
|
cursor: pointer;
|
|
@@ -317,14 +317,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
317
317
|
color: var(--color-text-direction-button-default-dkices, #ffffff);
|
|
318
318
|
box-shadow: var(--shadow-dropdown-skxpuu, 0 1px 1px 0 rgba(0, 28, 36, 0.3), 1px 1px 1px 0 rgba(0, 28, 36, 0.15), -1px 1px 1px 0 rgba(0, 28, 36, 0.15));
|
|
319
319
|
}
|
|
320
|
-
.awsui_direction-
|
|
320
|
+
.awsui_direction-button_155yk_11kuq_169:not(#\9):not(.awsui_direction-button-disabled_155yk_11kuq_320):hover {
|
|
321
321
|
background-color: var(--color-background-direction-button-hover-v5bxfc, #414750);
|
|
322
322
|
}
|
|
323
|
-
.awsui_direction-
|
|
323
|
+
.awsui_direction-button_155yk_11kuq_169:not(#\9):not(.awsui_direction-button-disabled_155yk_11kuq_320):active {
|
|
324
324
|
background-color: var(--color-background-direction-button-active-wn6s2j, #2a2e33);
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
.awsui_direction-button-
|
|
327
|
+
.awsui_direction-button-disabled_155yk_11kuq_320:not(#\9) {
|
|
328
328
|
cursor: default;
|
|
329
329
|
background-color: var(--color-background-direction-button-disabled-rcznmi, #eaeded);
|
|
330
330
|
color: var(--color-text-direction-button-disabled-596cgx, #aab7b8);
|