@cloudscape-design/components 3.0.262 → 3.0.264
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/THIRD-PARTY-LICENSES +31 -0
- package/autosuggest/options-controller.d.ts +1 -1
- package/autosuggest/options-controller.d.ts.map +1 -1
- package/autosuggest/options-controller.js +22 -23
- package/autosuggest/options-controller.js.map +1 -1
- package/autosuggest/options-list.d.ts.map +1 -1
- package/autosuggest/options-list.js +1 -2
- package/autosuggest/options-list.js.map +1 -1
- package/button/internal.d.ts +0 -1
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +1 -3
- package/button/internal.js.map +1 -1
- package/button/styles.css.js +18 -20
- package/button/styles.scoped.css +136 -298
- package/button/styles.selectors.js +18 -20
- package/collection-preferences/content-display/index.d.ts +9 -0
- package/collection-preferences/content-display/index.d.ts.map +1 -0
- package/collection-preferences/content-display/index.js +55 -0
- package/collection-preferences/content-display/index.js.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/defaults.d.ts +3 -0
- package/collection-preferences/content-display/keyboard-sensor/defaults.d.ts.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/defaults.js +9 -0
- package/collection-preferences/content-display/keyboard-sensor/defaults.js.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/index.d.ts +19 -0
- package/collection-preferences/content-display/keyboard-sensor/index.d.ts.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/index.js +126 -0
- package/collection-preferences/content-display/keyboard-sensor/index.js.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.d.ts +11 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.d.ts.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.js +14 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.js.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.d.ts +8 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.d.ts.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.js +17 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.js.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.d.ts +30 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.d.ts.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.js +95 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.js.map +1 -0
- package/collection-preferences/content-display/sortable-item.d.ts +9 -0
- package/collection-preferences/content-display/sortable-item.d.ts.map +1 -0
- package/collection-preferences/content-display/sortable-item.js +52 -0
- package/collection-preferences/content-display/sortable-item.js.map +1 -0
- package/collection-preferences/content-display/styles.css.js +20 -0
- package/collection-preferences/content-display/styles.scoped.css +303 -0
- package/collection-preferences/content-display/styles.selectors.js +21 -0
- package/collection-preferences/content-display/use-drag-and-drop-reorder.d.ts +14 -0
- package/collection-preferences/content-display/use-drag-and-drop-reorder.d.ts.map +1 -0
- package/collection-preferences/content-display/use-drag-and-drop-reorder.js +144 -0
- package/collection-preferences/content-display/use-drag-and-drop-reorder.js.map +1 -0
- package/collection-preferences/content-display/use-live-announcements.d.ts +12 -0
- package/collection-preferences/content-display/use-live-announcements.d.ts.map +1 -0
- package/collection-preferences/content-display/use-live-announcements.js +40 -0
- package/collection-preferences/content-display/use-live-announcements.js.map +1 -0
- package/collection-preferences/content-display/utils.d.ts +9 -0
- package/collection-preferences/content-display/utils.d.ts.map +1 -0
- package/collection-preferences/content-display/utils.js +7 -0
- package/collection-preferences/content-display/utils.js.map +1 -0
- package/collection-preferences/index.d.ts +1 -1
- package/collection-preferences/index.d.ts.map +1 -1
- package/collection-preferences/index.js +15 -9
- package/collection-preferences/index.js.map +1 -1
- package/collection-preferences/interfaces.d.ts +47 -1
- package/collection-preferences/interfaces.d.ts.map +1 -1
- package/collection-preferences/interfaces.js.map +1 -1
- package/collection-preferences/styles.css.js +36 -21
- package/collection-preferences/styles.scoped.css +326 -22
- package/collection-preferences/styles.selectors.js +36 -21
- package/collection-preferences/utils.d.ts +1 -1
- package/collection-preferences/utils.d.ts.map +1 -1
- package/collection-preferences/utils.js +20 -9
- package/collection-preferences/utils.js.map +1 -1
- package/expandable-section/expandable-section-header.js +1 -1
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/styles.css.js +24 -23
- package/expandable-section/styles.scoped.css +66 -44
- package/expandable-section/styles.selectors.js +24 -23
- package/file-upload/file-input/index.d.ts.map +1 -1
- package/file-upload/file-input/index.js +2 -1
- package/file-upload/file-input/index.js.map +1 -1
- package/file-upload/file-input/styles.css.js +4 -3
- package/file-upload/file-input/styles.scoped.css +107 -4
- package/file-upload/file-input/styles.selectors.js +4 -3
- package/internal/components/autosuggest-input/index.js +1 -1
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/components/options-list/utils/test-indexes.d.ts +1 -1
- package/internal/components/options-list/utils/test-indexes.d.ts.map +1 -1
- package/internal/components/options-list/utils/test-indexes.js.map +1 -1
- package/internal/components/token-list/styles.css.js +9 -9
- package/internal/components/token-list/styles.scoped.css +22 -21
- package/internal/components/token-list/styles.selectors.js +9 -9
- package/internal/drag-handle/index.d.ts +9 -0
- package/internal/drag-handle/index.d.ts.map +1 -0
- package/internal/drag-handle/index.js +13 -0
- package/internal/drag-handle/index.js.map +1 -0
- package/internal/drag-handle/styles.css.js +6 -0
- package/internal/drag-handle/styles.scoped.css +13 -0
- package/internal/drag-handle/styles.selectors.js +7 -0
- package/internal/environment.js +1 -1
- package/internal/handle/index.d.ts +3 -0
- package/internal/handle/index.d.ts.map +1 -0
- package/internal/handle/index.js +14 -0
- package/internal/handle/index.js.map +1 -0
- package/internal/handle/styles.css.js +7 -0
- package/internal/handle/styles.scoped.css +125 -0
- package/internal/handle/styles.selectors.js +8 -0
- package/internal/manifest.json +1 -1
- package/package.json +4 -1
- package/table/body-cell/styles.css.js +23 -23
- package/table/body-cell/styles.scoped.css +59 -59
- package/table/body-cell/styles.selectors.js +23 -23
- package/table/interfaces.d.ts +16 -3
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +7 -5
- package/table/internal.js.map +1 -1
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +3 -6
- package/table/thead.js.map +1 -1
- package/table/utils.d.ts +5 -0
- package/table/utils.d.ts.map +1 -1
- package/table/utils.js +23 -0
- package/table/utils.js.map +1 -1
- package/test-utils/dom/collection-preferences/content-display-preference.d.ts +37 -0
- package/test-utils/dom/collection-preferences/content-display-preference.js +62 -0
- package/test-utils/dom/collection-preferences/content-display-preference.js.map +1 -0
- package/test-utils/dom/collection-preferences/index.d.ts +2 -0
- package/test-utils/dom/collection-preferences/index.js +4 -0
- package/test-utils/dom/collection-preferences/index.js.map +1 -1
- package/test-utils/selectors/collection-preferences/content-display-preference.d.ts +37 -0
- package/test-utils/selectors/collection-preferences/content-display-preference.js +62 -0
- package/test-utils/selectors/collection-preferences/content-display-preference.js.map +1 -0
- package/test-utils/selectors/collection-preferences/index.d.ts +2 -0
- package/test-utils/selectors/collection-preferences/index.js +4 -0
- package/test-utils/selectors/collection-preferences/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.d.ts.map +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.js +5 -4
- package/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"content-enter": "awsui_content-
|
|
5
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
6
|
-
"trigger-expanded": "awsui_trigger-
|
|
7
|
-
"icon": "
|
|
8
|
-
"root": "
|
|
9
|
-
"expanded": "
|
|
10
|
-
"icon-container": "awsui_icon-
|
|
11
|
-
"icon-container-container": "awsui_icon-container-
|
|
12
|
-
"trigger": "
|
|
13
|
-
"trigger-default": "awsui_trigger-
|
|
14
|
-
"trigger-footer": "awsui_trigger-
|
|
15
|
-
"trigger-navigation": "awsui_trigger-
|
|
16
|
-
"trigger-container": "awsui_trigger-
|
|
17
|
-
"header": "
|
|
18
|
-
"header-wrapper": "awsui_header-
|
|
19
|
-
"header-
|
|
20
|
-
"header-container
|
|
21
|
-
"header-
|
|
22
|
-
"
|
|
23
|
-
"content
|
|
24
|
-
"content-
|
|
25
|
-
"content-
|
|
26
|
-
"
|
|
4
|
+
"content-enter": "awsui_content-enter_gwq0h_15y3s_97",
|
|
5
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_15y3s_1",
|
|
6
|
+
"trigger-expanded": "awsui_trigger-expanded_gwq0h_15y3s_119",
|
|
7
|
+
"icon": "awsui_icon_gwq0h_15y3s_133",
|
|
8
|
+
"root": "awsui_root_gwq0h_15y3s_151",
|
|
9
|
+
"expanded": "awsui_expanded_gwq0h_15y3s_171",
|
|
10
|
+
"icon-container": "awsui_icon-container_gwq0h_15y3s_175",
|
|
11
|
+
"icon-container-container": "awsui_icon-container-container_gwq0h_15y3s_180",
|
|
12
|
+
"trigger": "awsui_trigger_gwq0h_15y3s_119",
|
|
13
|
+
"trigger-default": "awsui_trigger-default_gwq0h_15y3s_193",
|
|
14
|
+
"trigger-footer": "awsui_trigger-footer_gwq0h_15y3s_196",
|
|
15
|
+
"trigger-navigation": "awsui_trigger-navigation_gwq0h_15y3s_202",
|
|
16
|
+
"trigger-container": "awsui_trigger-container_gwq0h_15y3s_216",
|
|
17
|
+
"header": "awsui_header_gwq0h_15y3s_226",
|
|
18
|
+
"header-wrapper": "awsui_header-wrapper_gwq0h_15y3s_229",
|
|
19
|
+
"header-button": "awsui_header-button_gwq0h_15y3s_236",
|
|
20
|
+
"header-container": "awsui_header-container_gwq0h_15y3s_258",
|
|
21
|
+
"header-container-button": "awsui_header-container-button_gwq0h_15y3s_273",
|
|
22
|
+
"header-navigation": "awsui_header-navigation_gwq0h_15y3s_281",
|
|
23
|
+
"content": "awsui_content_gwq0h_15y3s_97",
|
|
24
|
+
"content-default": "awsui_content-default_gwq0h_15y3s_317",
|
|
25
|
+
"content-footer": "awsui_content-footer_gwq0h_15y3s_320",
|
|
26
|
+
"content-expanded": "awsui_content-expanded_gwq0h_15y3s_323",
|
|
27
|
+
"focusable": "awsui_focusable_gwq0h_15y3s_327"
|
|
27
28
|
};
|
|
28
29
|
|
|
@@ -94,10 +94,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
94
94
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
95
|
SPDX-License-Identifier: Apache-2.0
|
|
96
96
|
*/
|
|
97
|
-
.awsui_content-
|
|
98
|
-
animation: awsui_awsui-motion-fade-
|
|
97
|
+
.awsui_content-enter_gwq0h_15y3s_97:not(#\9) {
|
|
98
|
+
animation: awsui_awsui-motion-fade-in_gwq0h_15y3s_1 var(--motion-duration-show-paced-7wspqf, 180ms) var(--motion-easing-show-paced-wj4ybn, ease-out);
|
|
99
99
|
}
|
|
100
|
-
@keyframes awsui_awsui-motion-fade-
|
|
100
|
+
@keyframes awsui_awsui-motion-fade-in_gwq0h_15y3s_1 {
|
|
101
101
|
from {
|
|
102
102
|
opacity: 0.2;
|
|
103
103
|
}
|
|
@@ -106,40 +106,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
@media (prefers-reduced-motion: reduce) {
|
|
109
|
-
.awsui_content-
|
|
109
|
+
.awsui_content-enter_gwq0h_15y3s_97:not(#\9) {
|
|
110
110
|
animation: none;
|
|
111
111
|
transition: none;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
.awsui-motion-disabled .awsui_content-
|
|
114
|
+
.awsui-motion-disabled .awsui_content-enter_gwq0h_15y3s_97:not(#\9), .awsui-mode-entering .awsui_content-enter_gwq0h_15y3s_97:not(#\9) {
|
|
115
115
|
animation: none;
|
|
116
116
|
transition: none;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.awsui_trigger-
|
|
119
|
+
.awsui_trigger-expanded_gwq0h_15y3s_119:not(#\9) {
|
|
120
120
|
transition: border-bottom-color var(--motion-duration-show-paced-7wspqf, 180ms) var(--motion-easing-show-paced-wj4ybn, ease-out);
|
|
121
121
|
}
|
|
122
122
|
@media (prefers-reduced-motion: reduce) {
|
|
123
|
-
.awsui_trigger-
|
|
123
|
+
.awsui_trigger-expanded_gwq0h_15y3s_119:not(#\9) {
|
|
124
124
|
animation: none;
|
|
125
125
|
transition: none;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
.awsui-motion-disabled .awsui_trigger-
|
|
128
|
+
.awsui-motion-disabled .awsui_trigger-expanded_gwq0h_15y3s_119:not(#\9), .awsui-mode-entering .awsui_trigger-expanded_gwq0h_15y3s_119:not(#\9) {
|
|
129
129
|
animation: none;
|
|
130
130
|
transition: none;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
.
|
|
133
|
+
.awsui_icon_gwq0h_15y3s_133:not(#\9) {
|
|
134
134
|
transition: transform var(--motion-duration-rotate-90-ux18sr, 135ms) var(--motion-easing-rotate-90-eoew89, cubic-bezier(0.165, 0.84, 0.44, 1));
|
|
135
135
|
}
|
|
136
136
|
@media (prefers-reduced-motion: reduce) {
|
|
137
|
-
.
|
|
137
|
+
.awsui_icon_gwq0h_15y3s_133:not(#\9) {
|
|
138
138
|
animation: none;
|
|
139
139
|
transition: none;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
.awsui-motion-disabled .
|
|
142
|
+
.awsui-motion-disabled .awsui_icon_gwq0h_15y3s_133:not(#\9), .awsui-mode-entering .awsui_icon_gwq0h_15y3s_133:not(#\9) {
|
|
143
143
|
animation: none;
|
|
144
144
|
transition: none;
|
|
145
145
|
}
|
|
@@ -148,7 +148,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
148
148
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
149
149
|
SPDX-License-Identifier: Apache-2.0
|
|
150
150
|
*/
|
|
151
|
-
.
|
|
151
|
+
.awsui_root_gwq0h_15y3s_151:not(#\9) {
|
|
152
152
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
153
153
|
border-collapse: separate;
|
|
154
154
|
border-spacing: 0;
|
|
@@ -191,23 +191,23 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
191
191
|
display: block;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
.
|
|
194
|
+
.awsui_icon_gwq0h_15y3s_133:not(#\9) {
|
|
195
195
|
transform: rotate(-90deg);
|
|
196
196
|
}
|
|
197
|
-
.
|
|
197
|
+
.awsui_icon_gwq0h_15y3s_133.awsui_expanded_gwq0h_15y3s_171:not(#\9) {
|
|
198
198
|
transform: rotate(0deg);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
.awsui_icon-
|
|
201
|
+
.awsui_icon-container_gwq0h_15y3s_175:not(#\9) {
|
|
202
202
|
position: relative;
|
|
203
203
|
margin-left: calc((var(--font-body-m-line-height-i7xxvv, 22px) - var(--size-icon-normal-j1z5fn, 16px)) / -2);
|
|
204
204
|
margin-right: calc(var(--space-xxs-ynfts5, 4px) + var(--border-divider-list-width-hacikr, 1px));
|
|
205
205
|
}
|
|
206
|
-
.awsui_icon-container-
|
|
206
|
+
.awsui_icon-container-container_gwq0h_15y3s_180:not(#\9) {
|
|
207
207
|
margin-right: var(--space-xs-rsr2qu, 8px);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
.
|
|
210
|
+
.awsui_trigger_gwq0h_15y3s_119:not(#\9) {
|
|
211
211
|
cursor: pointer;
|
|
212
212
|
box-sizing: border-box;
|
|
213
213
|
display: flex;
|
|
@@ -216,19 +216,19 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
216
216
|
line-height: var(--font-body-m-line-height-i7xxvv, 22px);
|
|
217
217
|
text-align: left;
|
|
218
218
|
}
|
|
219
|
-
.awsui_trigger-
|
|
219
|
+
.awsui_trigger-default_gwq0h_15y3s_193:not(#\9) {
|
|
220
220
|
padding: var(--space-scaled-xxs-95dhkm, 4px) var(--space-xxs-ynfts5, 4px);
|
|
221
221
|
}
|
|
222
|
-
.awsui_trigger-
|
|
222
|
+
.awsui_trigger-footer_gwq0h_15y3s_196:not(#\9) {
|
|
223
223
|
padding: var(--space-scaled-xxs-95dhkm, 4px) 0;
|
|
224
224
|
}
|
|
225
|
-
.awsui_trigger-
|
|
225
|
+
.awsui_trigger-default_gwq0h_15y3s_193:not(#\9), .awsui_trigger-footer_gwq0h_15y3s_196:not(#\9) {
|
|
226
226
|
border: var(--border-divider-section-width-4wm2it, 2px) solid transparent;
|
|
227
227
|
}
|
|
228
|
-
.awsui_trigger-
|
|
228
|
+
.awsui_trigger-navigation_gwq0h_15y3s_202:not(#\9) {
|
|
229
229
|
border-left: var(--border-divider-section-width-4wm2it, 2px) solid transparent;
|
|
230
230
|
}
|
|
231
|
-
.awsui_trigger-
|
|
231
|
+
.awsui_trigger-default_gwq0h_15y3s_193:not(#\9), .awsui_trigger-navigation_gwq0h_15y3s_202:not(#\9), .awsui_trigger-footer_gwq0h_15y3s_196:not(#\9) {
|
|
232
232
|
color: var(--color-text-expandable-section-default-k03p1p, #000716);
|
|
233
233
|
font-weight: var(--font-heading-s-weight-k8ys41, 800);
|
|
234
234
|
-webkit-font-smoothing: var(--font-smoothing-webkit-vu3hx4, antialiased);
|
|
@@ -236,36 +236,58 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
236
236
|
font-size: var(--font-expandable-heading-size-m2wptt, 16px);
|
|
237
237
|
letter-spacing: var(--font-heading-s-letter-spacing-4d69jc, -0.005em);
|
|
238
238
|
}
|
|
239
|
-
.awsui_trigger-
|
|
239
|
+
.awsui_trigger-default_gwq0h_15y3s_193:not(#\9):hover, .awsui_trigger-navigation_gwq0h_15y3s_202:not(#\9):hover, .awsui_trigger-footer_gwq0h_15y3s_196:not(#\9):hover {
|
|
240
240
|
color: var(--color-text-expandable-section-hover-73g3du, #0972d3);
|
|
241
241
|
}
|
|
242
|
-
.awsui_trigger-
|
|
242
|
+
.awsui_trigger-container_gwq0h_15y3s_216:not(#\9) {
|
|
243
243
|
padding: var(--space-container-header-vertical-zsjhel, 12px) var(--space-container-horizontal-tlw03i, 20px);
|
|
244
244
|
}
|
|
245
|
-
body[data-awsui-focus-visible=true] .awsui_trigger-
|
|
245
|
+
body[data-awsui-focus-visible=true] .awsui_trigger-container_gwq0h_15y3s_216:not(#\9):focus {
|
|
246
246
|
padding: calc(var(--space-scaled-s-cu1hzn, 12px) - var(--border-divider-section-width-4wm2it, 2px)) calc(var(--space-l-4vl6xu, 20px) - var(--border-divider-section-width-4wm2it, 2px));
|
|
247
247
|
}
|
|
248
|
-
.awsui_trigger-
|
|
248
|
+
.awsui_trigger-default_gwq0h_15y3s_193.awsui_trigger-expanded_gwq0h_15y3s_119:not(#\9) {
|
|
249
249
|
border-bottom-color: var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
.
|
|
252
|
+
.awsui_header_gwq0h_15y3s_226:not(#\9) {
|
|
253
253
|
display: flex;
|
|
254
254
|
}
|
|
255
|
-
.awsui_header-
|
|
255
|
+
.awsui_header-wrapper_gwq0h_15y3s_229:not(#\9) {
|
|
256
256
|
font-weight: inherit;
|
|
257
257
|
font-size: inherit;
|
|
258
258
|
letter-spacing: inherit;
|
|
259
259
|
margin: 0;
|
|
260
260
|
padding: 0;
|
|
261
261
|
}
|
|
262
|
-
.awsui_header-
|
|
262
|
+
.awsui_header-button_gwq0h_15y3s_236:not(#\9) {
|
|
263
|
+
box-sizing: border-box;
|
|
264
|
+
display: flex;
|
|
265
|
+
}
|
|
266
|
+
body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_15y3s_236:not(#\9):focus {
|
|
267
|
+
position: relative;
|
|
268
|
+
}
|
|
269
|
+
body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_15y3s_236:not(#\9):focus {
|
|
270
|
+
outline: 2px dotted transparent;
|
|
271
|
+
outline-offset: calc(0px - 1px);
|
|
272
|
+
}
|
|
273
|
+
body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_15y3s_236:not(#\9):focus::before {
|
|
274
|
+
content: " ";
|
|
275
|
+
display: block;
|
|
276
|
+
position: absolute;
|
|
277
|
+
left: calc(-1 * 0px);
|
|
278
|
+
top: calc(-1 * 0px);
|
|
279
|
+
width: calc(100% + 2 * 0px);
|
|
280
|
+
height: calc(100% + 2 * 0px);
|
|
281
|
+
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
282
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
283
|
+
}
|
|
284
|
+
.awsui_header-container_gwq0h_15y3s_258:not(#\9) {
|
|
263
285
|
width: 100%;
|
|
264
286
|
}
|
|
265
|
-
.awsui_header-
|
|
287
|
+
.awsui_header-container_gwq0h_15y3s_258 > .awsui_icon-container_gwq0h_15y3s_175:not(#\9) {
|
|
266
288
|
margin-top: var(--space-expandable-section-icon-offset-top-q2xewd, 4px);
|
|
267
289
|
}
|
|
268
|
-
|
|
290
|
+
body[data-awsui-focus-visible=true] .awsui_header-container_gwq0h_15y3s_258:not(#\9):focus-within {
|
|
269
291
|
outline: none;
|
|
270
292
|
text-decoration: none;
|
|
271
293
|
padding: calc(var(--space-scaled-s-cu1hzn, 12px) - var(--border-divider-section-width-4wm2it, 2px)) calc(var(--space-l-4vl6xu, 20px) - var(--border-divider-section-width-4wm2it, 2px));
|
|
@@ -274,15 +296,15 @@ body[data-awsui-focus-visible=true] .awsui_trigger-container_gwq0h_lduum_216:not
|
|
|
274
296
|
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
275
297
|
box-shadow: 0 0 0 var(--border-control-focus-ring-shadow-spread-srzyiu, 0px) var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
276
298
|
}
|
|
277
|
-
.awsui_header-container-
|
|
299
|
+
.awsui_header-container-button_gwq0h_15y3s_273:not(#\9) {
|
|
278
300
|
box-sizing: border-box;
|
|
279
301
|
display: flex;
|
|
280
302
|
}
|
|
281
|
-
.awsui_header-container-
|
|
303
|
+
body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_15y3s_273:not(#\9):focus {
|
|
282
304
|
outline: none;
|
|
283
305
|
text-decoration: none;
|
|
284
306
|
}
|
|
285
|
-
.awsui_header-
|
|
307
|
+
.awsui_header-navigation_gwq0h_15y3s_281 > .awsui_icon-container_gwq0h_15y3s_175:not(#\9) {
|
|
286
308
|
display: inline-flex;
|
|
287
309
|
cursor: pointer;
|
|
288
310
|
color: var(--color-text-expandable-section-navigation-icon-default-lb9rm0, #414d5c);
|
|
@@ -293,17 +315,17 @@ body[data-awsui-focus-visible=true] .awsui_trigger-container_gwq0h_lduum_216:not
|
|
|
293
315
|
text-decoration: none;
|
|
294
316
|
flex-direction: column;
|
|
295
317
|
}
|
|
296
|
-
.awsui_header-
|
|
318
|
+
.awsui_header-navigation_gwq0h_15y3s_281 > .awsui_icon-container_gwq0h_15y3s_175:not(#\9):hover {
|
|
297
319
|
color: var(--color-text-expandable-section-hover-73g3du, #0972d3);
|
|
298
320
|
}
|
|
299
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
321
|
+
body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_15y3s_281 > .awsui_icon-container_gwq0h_15y3s_175:not(#\9):focus {
|
|
300
322
|
position: relative;
|
|
301
323
|
}
|
|
302
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
324
|
+
body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_15y3s_281 > .awsui_icon-container_gwq0h_15y3s_175:not(#\9):focus {
|
|
303
325
|
outline: 2px dotted transparent;
|
|
304
326
|
outline-offset: calc(2px - 1px);
|
|
305
327
|
}
|
|
306
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
328
|
+
body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_15y3s_281 > .awsui_icon-container_gwq0h_15y3s_175:not(#\9):focus::before {
|
|
307
329
|
content: " ";
|
|
308
330
|
display: block;
|
|
309
331
|
position: absolute;
|
|
@@ -315,24 +337,24 @@ body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_lduum_259 > .
|
|
|
315
337
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
316
338
|
}
|
|
317
339
|
|
|
318
|
-
.
|
|
340
|
+
.awsui_content_gwq0h_15y3s_97:not(#\9) {
|
|
319
341
|
display: none;
|
|
320
342
|
}
|
|
321
|
-
.awsui_content-
|
|
343
|
+
.awsui_content-default_gwq0h_15y3s_317:not(#\9) {
|
|
322
344
|
padding: var(--space-scaled-xs-6859qs, 8px) 0;
|
|
323
345
|
}
|
|
324
|
-
.awsui_content-
|
|
346
|
+
.awsui_content-footer_gwq0h_15y3s_320:not(#\9) {
|
|
325
347
|
padding: var(--space-xs-rsr2qu, 8px) 0;
|
|
326
348
|
}
|
|
327
|
-
.awsui_content-
|
|
349
|
+
.awsui_content-expanded_gwq0h_15y3s_323:not(#\9) {
|
|
328
350
|
display: block;
|
|
329
351
|
}
|
|
330
352
|
|
|
331
|
-
.
|
|
353
|
+
.awsui_focusable_gwq0h_15y3s_327:not(#\9):focus {
|
|
332
354
|
outline: none;
|
|
333
355
|
text-decoration: none;
|
|
334
356
|
}
|
|
335
|
-
body[data-awsui-focus-visible=true] .
|
|
357
|
+
body[data-awsui-focus-visible=true] .awsui_focusable_gwq0h_15y3s_327:not(#\9):focus {
|
|
336
358
|
outline: 2px dotted transparent;
|
|
337
359
|
border: var(--border-field-width-idlekx, 2px) solid var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
338
360
|
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
@@ -2,28 +2,29 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"content-enter": "awsui_content-
|
|
6
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
7
|
-
"trigger-expanded": "awsui_trigger-
|
|
8
|
-
"icon": "
|
|
9
|
-
"root": "
|
|
10
|
-
"expanded": "
|
|
11
|
-
"icon-container": "awsui_icon-
|
|
12
|
-
"icon-container-container": "awsui_icon-container-
|
|
13
|
-
"trigger": "
|
|
14
|
-
"trigger-default": "awsui_trigger-
|
|
15
|
-
"trigger-footer": "awsui_trigger-
|
|
16
|
-
"trigger-navigation": "awsui_trigger-
|
|
17
|
-
"trigger-container": "awsui_trigger-
|
|
18
|
-
"header": "
|
|
19
|
-
"header-wrapper": "awsui_header-
|
|
20
|
-
"header-
|
|
21
|
-
"header-container
|
|
22
|
-
"header-
|
|
23
|
-
"
|
|
24
|
-
"content
|
|
25
|
-
"content-
|
|
26
|
-
"content-
|
|
27
|
-
"
|
|
5
|
+
"content-enter": "awsui_content-enter_gwq0h_15y3s_97",
|
|
6
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_15y3s_1",
|
|
7
|
+
"trigger-expanded": "awsui_trigger-expanded_gwq0h_15y3s_119",
|
|
8
|
+
"icon": "awsui_icon_gwq0h_15y3s_133",
|
|
9
|
+
"root": "awsui_root_gwq0h_15y3s_151",
|
|
10
|
+
"expanded": "awsui_expanded_gwq0h_15y3s_171",
|
|
11
|
+
"icon-container": "awsui_icon-container_gwq0h_15y3s_175",
|
|
12
|
+
"icon-container-container": "awsui_icon-container-container_gwq0h_15y3s_180",
|
|
13
|
+
"trigger": "awsui_trigger_gwq0h_15y3s_119",
|
|
14
|
+
"trigger-default": "awsui_trigger-default_gwq0h_15y3s_193",
|
|
15
|
+
"trigger-footer": "awsui_trigger-footer_gwq0h_15y3s_196",
|
|
16
|
+
"trigger-navigation": "awsui_trigger-navigation_gwq0h_15y3s_202",
|
|
17
|
+
"trigger-container": "awsui_trigger-container_gwq0h_15y3s_216",
|
|
18
|
+
"header": "awsui_header_gwq0h_15y3s_226",
|
|
19
|
+
"header-wrapper": "awsui_header-wrapper_gwq0h_15y3s_229",
|
|
20
|
+
"header-button": "awsui_header-button_gwq0h_15y3s_236",
|
|
21
|
+
"header-container": "awsui_header-container_gwq0h_15y3s_258",
|
|
22
|
+
"header-container-button": "awsui_header-container-button_gwq0h_15y3s_273",
|
|
23
|
+
"header-navigation": "awsui_header-navigation_gwq0h_15y3s_281",
|
|
24
|
+
"content": "awsui_content_gwq0h_15y3s_97",
|
|
25
|
+
"content-default": "awsui_content-default_gwq0h_15y3s_317",
|
|
26
|
+
"content-footer": "awsui_content-footer_gwq0h_15y3s_320",
|
|
27
|
+
"content-expanded": "awsui_content-expanded_gwq0h_15y3s_323",
|
|
28
|
+
"focusable": "awsui_focusable_gwq0h_15y3s_327"
|
|
28
29
|
};
|
|
29
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["file-upload/file-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiE,MAAM,OAAO,CAAC;AAMtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAG5F,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["file-upload/file-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiE,MAAM,OAAO,CAAC;AAMtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAG5F,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAIhD,UAAU,cAAe,SAAQ,+BAA+B;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;;AAED,wBAA2C"}
|
|
@@ -9,6 +9,7 @@ import { useUniqueId } from '../../internal/hooks/use-unique-id';
|
|
|
9
9
|
import { joinStrings } from '../../internal/utils/strings';
|
|
10
10
|
import ScreenreaderOnly from '../../internal/components/screenreader-only';
|
|
11
11
|
import useForwardFocus from '../../internal/hooks/forward-focus';
|
|
12
|
+
import clsx from 'clsx';
|
|
12
13
|
export default React.forwardRef(FileInput);
|
|
13
14
|
function FileInput(_a, ref) {
|
|
14
15
|
var _b;
|
|
@@ -49,7 +50,7 @@ function FileInput(_a, ref) {
|
|
|
49
50
|
}, [value]);
|
|
50
51
|
return (React.createElement("div", { className: styles['file-input-container'] },
|
|
51
52
|
React.createElement("input", Object.assign({ id: controlId, ref: uploadInputRef, type: "file", hidden: false, multiple: multiple, accept: accept, onChange: onUploadInputChange, onFocus: onUploadInputFocus, onBlur: onUploadInputBlur, className: styles['upload-input'] }, nativeAttributes)),
|
|
52
|
-
React.createElement(InternalButton, { iconName: "upload", formAction: "none", onClick: onUploadButtonClick, className: styles['upload-button'], __nativeAttributes: { tabIndex: -1, 'aria-hidden': true }
|
|
53
|
+
React.createElement(InternalButton, { iconName: "upload", formAction: "none", onClick: onUploadButtonClick, className: clsx(styles['upload-button'], isFocused && styles['force-focus-outline']), __nativeAttributes: { tabIndex: -1, 'aria-hidden': true } }, children),
|
|
53
54
|
React.createElement(ScreenreaderOnly, { id: uploadButtonLabelId }, children)));
|
|
54
55
|
}
|
|
55
56
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["file-upload/file-input/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtF,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,gBAAgB,MAAM,6CAA6C,CAAC;AAE3E,OAAO,eAAe,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["file-upload/file-input/index.tsx"],"names":[],"mappings":"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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { ChangeEvent, ForwardedRef, useEffect, useRef, useState } from 'react';\n\nimport InternalButton from '../../button/internal';\nimport styles from './styles.css.js';\nimport { useFormFieldContext } from '../../contexts/form-field';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport { FormFieldValidationControlProps } from '../../internal/context/form-field-context';\nimport { joinStrings } from '../../internal/utils/strings';\nimport ScreenreaderOnly from '../../internal/components/screenreader-only';\nimport { FileUploadProps } from '../interfaces';\nimport useForwardFocus from '../../internal/hooks/forward-focus';\nimport clsx from 'clsx';\n\ninterface FileInputProps extends FormFieldValidationControlProps {\n accept?: string;\n ariaRequired?: boolean;\n multiple: boolean;\n value: readonly File[];\n onChange: (files: File[]) => void;\n children: React.ReactNode;\n}\n\nexport default React.forwardRef(FileInput);\n\nfunction FileInput(\n { accept, ariaRequired, multiple, value, onChange, children, ...restProps }: FileInputProps,\n ref: ForwardedRef<FileUploadProps.Ref>\n) {\n const uploadInputRef = useRef<HTMLInputElement>(null);\n const uploadButtonLabelId = useUniqueId('upload-button-label');\n const formFieldContext = useFormFieldContext(restProps);\n const selfControlId = useUniqueId('upload-input');\n const controlId = formFieldContext.controlId ?? selfControlId;\n\n useForwardFocus(ref, uploadInputRef);\n\n const [isFocused, setIsFocused] = useState(false);\n\n const onUploadButtonClick = () => uploadInputRef.current?.click();\n\n const onUploadInputFocus = () => setIsFocused(true);\n\n const onUploadInputBlur = () => setIsFocused(false);\n\n const onUploadInputChange = ({ target }: ChangeEvent<HTMLInputElement>) => {\n onChange(target.files ? Array.from(target.files) : []);\n };\n\n const nativeAttributes: Record<string, any> = {\n 'aria-labelledby': joinStrings(formFieldContext.ariaLabelledby, uploadButtonLabelId),\n 'aria-describedby': formFieldContext.ariaDescribedby,\n };\n if (formFieldContext.invalid) {\n nativeAttributes['aria-invalid'] = true;\n }\n if (ariaRequired) {\n nativeAttributes['aria-required'] = true;\n }\n\n // Synchronizing component's value with the native file input state.\n useEffect(() => {\n // The DataTransfer is not available in jsdom.\n if (window.DataTransfer) {\n const dataTransfer = new DataTransfer();\n for (const file of value) {\n dataTransfer.items.add(file);\n }\n uploadInputRef.current!.files = dataTransfer.files;\n }\n }, [value]);\n\n return (\n <div className={styles['file-input-container']}>\n {/* This is the actual interactive and accessible file-upload element. */}\n {/* It is visually hidden to achieve the desired UX design. */}\n <input\n id={controlId}\n ref={uploadInputRef}\n type=\"file\"\n hidden={false}\n multiple={multiple}\n accept={accept}\n onChange={onUploadInputChange}\n onFocus={onUploadInputFocus}\n onBlur={onUploadInputBlur}\n className={styles['upload-input']}\n {...nativeAttributes}\n />\n\n {/* The button is decorative. It dispatches clicks to the file input and is ARIA-hidden. */}\n {/* When the input is focused the focus outline is forced on the button. */}\n <InternalButton\n iconName=\"upload\"\n formAction=\"none\"\n onClick={onUploadButtonClick}\n className={clsx(styles['upload-button'], isFocused && styles['force-focus-outline'])}\n __nativeAttributes={{ tabIndex: -1, 'aria-hidden': true }}\n >\n {children}\n </InternalButton>\n\n {/* The file input needs to be labelled with provided content. Can't use the button because it is ARIA-hidden. */}\n <ScreenreaderOnly id={uploadButtonLabelId}>{children}</ScreenreaderOnly>\n </div>\n );\n}\n"]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"upload-button": "awsui_upload-
|
|
5
|
-
"upload-input": "awsui_upload-
|
|
6
|
-
"file-input-container": "awsui_file-input-
|
|
4
|
+
"upload-button": "awsui_upload-button_4xu1k_2ymx3_93",
|
|
5
|
+
"upload-input": "awsui_upload-input_4xu1k_2ymx3_94",
|
|
6
|
+
"file-input-container": "awsui_file-input-container_4xu1k_2ymx3_98",
|
|
7
|
+
"force-focus-outline": "awsui_force-focus-outline_4xu1k_2ymx3_107"
|
|
7
8
|
};
|
|
8
9
|
|
|
@@ -6,16 +6,119 @@
|
|
|
6
6
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
7
|
SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
.
|
|
9
|
+
/*
|
|
10
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
11
|
+
SPDX-License-Identifier: Apache-2.0
|
|
12
|
+
*/
|
|
13
|
+
/*
|
|
14
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
15
|
+
SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
*/
|
|
17
|
+
/*
|
|
18
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
19
|
+
SPDX-License-Identifier: Apache-2.0
|
|
20
|
+
*/
|
|
21
|
+
/*
|
|
22
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
23
|
+
SPDX-License-Identifier: Apache-2.0
|
|
24
|
+
*/
|
|
25
|
+
/*
|
|
26
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
27
|
+
SPDX-License-Identifier: Apache-2.0
|
|
28
|
+
*/
|
|
29
|
+
/*
|
|
30
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
31
|
+
SPDX-License-Identifier: Apache-2.0
|
|
32
|
+
*/
|
|
33
|
+
/*
|
|
34
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
35
|
+
SPDX-License-Identifier: Apache-2.0
|
|
36
|
+
*/
|
|
37
|
+
/*
|
|
38
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
39
|
+
SPDX-License-Identifier: Apache-2.0
|
|
40
|
+
*/
|
|
41
|
+
/*
|
|
42
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
43
|
+
SPDX-License-Identifier: Apache-2.0
|
|
44
|
+
*/
|
|
45
|
+
/*
|
|
46
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
47
|
+
SPDX-License-Identifier: Apache-2.0
|
|
48
|
+
*/
|
|
49
|
+
/*
|
|
50
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
51
|
+
SPDX-License-Identifier: Apache-2.0
|
|
52
|
+
*/
|
|
53
|
+
/*
|
|
54
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
55
|
+
SPDX-License-Identifier: Apache-2.0
|
|
56
|
+
*/
|
|
57
|
+
/*
|
|
58
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
59
|
+
SPDX-License-Identifier: Apache-2.0
|
|
60
|
+
*/
|
|
61
|
+
/*
|
|
62
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
63
|
+
SPDX-License-Identifier: Apache-2.0
|
|
64
|
+
*/
|
|
65
|
+
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
66
|
+
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
67
|
+
/*
|
|
68
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
69
|
+
SPDX-License-Identifier: Apache-2.0
|
|
70
|
+
*/
|
|
71
|
+
/*
|
|
72
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
73
|
+
SPDX-License-Identifier: Apache-2.0
|
|
74
|
+
*/
|
|
75
|
+
/*
|
|
76
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
77
|
+
SPDX-License-Identifier: Apache-2.0
|
|
78
|
+
*/
|
|
79
|
+
/*
|
|
80
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
81
|
+
SPDX-License-Identifier: Apache-2.0
|
|
82
|
+
*/
|
|
83
|
+
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
84
|
+
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
85
|
+
/*
|
|
86
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
87
|
+
SPDX-License-Identifier: Apache-2.0
|
|
88
|
+
*/
|
|
89
|
+
/*
|
|
90
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
|
+
SPDX-License-Identifier: Apache-2.0
|
|
92
|
+
*/
|
|
93
|
+
.awsui_upload-button_4xu1k_2ymx3_93:not(#\9),
|
|
94
|
+
.awsui_upload-input_4xu1k_2ymx3_94:not(#\9) {
|
|
11
95
|
/* used in test-utils */
|
|
12
96
|
}
|
|
13
97
|
|
|
14
|
-
.awsui_file-input-
|
|
98
|
+
.awsui_file-input-container_4xu1k_2ymx3_98:not(#\9) {
|
|
15
99
|
position: relative;
|
|
16
100
|
}
|
|
17
101
|
|
|
18
|
-
.awsui_upload-
|
|
102
|
+
.awsui_upload-input_4xu1k_2ymx3_94:not(#\9) {
|
|
19
103
|
position: absolute;
|
|
20
104
|
clip: rect(0, 0, 0, 0);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
body[data-awsui-focus-visible=true] .awsui_upload-button_4xu1k_2ymx3_93.awsui_force-focus-outline_4xu1k_2ymx3_107:not(#\9) {
|
|
108
|
+
position: relative;
|
|
109
|
+
}
|
|
110
|
+
body[data-awsui-focus-visible=true] .awsui_upload-button_4xu1k_2ymx3_93.awsui_force-focus-outline_4xu1k_2ymx3_107:not(#\9) {
|
|
111
|
+
outline: 2px dotted transparent;
|
|
112
|
+
outline-offset: calc(var(--space-button-focus-outline-gutter-4vaedu, 4px) - 1px);
|
|
113
|
+
}
|
|
114
|
+
body[data-awsui-focus-visible=true] .awsui_upload-button_4xu1k_2ymx3_93.awsui_force-focus-outline_4xu1k_2ymx3_107:not(#\9)::before {
|
|
115
|
+
content: " ";
|
|
116
|
+
display: block;
|
|
117
|
+
position: absolute;
|
|
118
|
+
left: calc(-1 * var(--space-button-focus-outline-gutter-4vaedu, 4px));
|
|
119
|
+
top: calc(-1 * var(--space-button-focus-outline-gutter-4vaedu, 4px));
|
|
120
|
+
width: calc(100% + 2 * var(--space-button-focus-outline-gutter-4vaedu, 4px));
|
|
121
|
+
height: calc(100% + 2 * var(--space-button-focus-outline-gutter-4vaedu, 4px));
|
|
122
|
+
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
123
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
21
124
|
}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"upload-button": "awsui_upload-
|
|
6
|
-
"upload-input": "awsui_upload-
|
|
7
|
-
"file-input-container": "awsui_file-input-
|
|
5
|
+
"upload-button": "awsui_upload-button_4xu1k_2ymx3_93",
|
|
6
|
+
"upload-input": "awsui_upload-input_4xu1k_2ymx3_94",
|
|
7
|
+
"file-input-container": "awsui_file-input-container_4xu1k_2ymx3_98",
|
|
8
|
+
"force-focus-outline": "awsui_force-focus-outline_4xu1k_2ymx3_107"
|
|
8
9
|
};
|
|
9
10
|
|
|
@@ -149,7 +149,7 @@ const AutosuggestInput = React.forwardRef((_a, ref) => {
|
|
|
149
149
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
150
150
|
}, [open]);
|
|
151
151
|
return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(baseProps.className, styles.root), ref: __internalRootRef }),
|
|
152
|
-
React.createElement(Dropdown, { minWidth: dropdownWidth, stretchWidth: !dropdownWidth, contentKey: dropdownContentKey, onFocus: handleFocus, onBlur: handleBlur, trigger: React.createElement(InternalInput, Object.assign({ type: "visualSearch", value: value, onChange: event => handleChange(event.detail.value), __onDelayedInput: event => handleDelayedInput(event.detail.value), onKeyDown: handleKeyDown, onKeyUp: onKeyUp, disabled: disabled, disableBrowserAutocorrect: disableBrowserAutocorrect, readOnly: readOnly, ariaRequired: ariaRequired, clearAriaLabel: clearAriaLabel, ref: inputRef, autoComplete: false, __nativeAttributes: nativeAttributes }, formFieldContext)), onMouseDown: handleDropdownMouseDown, open: open, footer: dropdownFooterRef && (React.createElement("div", { ref: dropdownFooterRef, className: styles['dropdown-footer'] }, dropdownFooter)), expandToViewport: expandToViewport, loopFocus: loopFocus }, open && dropdownContent ? (React.createElement("div", { ref: dropdownContentRef, className: styles['dropdown-content'] }, dropdownContent)) : null)));
|
|
152
|
+
React.createElement(Dropdown, { minWidth: dropdownWidth, stretchWidth: !dropdownWidth, contentKey: dropdownContentKey, onFocus: handleFocus, onBlur: handleBlur, trigger: React.createElement(InternalInput, Object.assign({ type: "visualSearch", value: value, onChange: event => handleChange(event.detail.value), __onDelayedInput: event => handleDelayedInput(event.detail.value), onKeyDown: handleKeyDown, onKeyUp: onKeyUp, disabled: disabled, disableBrowserAutocorrect: disableBrowserAutocorrect, readOnly: readOnly, ariaRequired: ariaRequired, clearAriaLabel: clearAriaLabel, ref: inputRef, autoComplete: false, __nativeAttributes: nativeAttributes }, formFieldContext)), onMouseDown: handleDropdownMouseDown, open: open && !!dropdownContent, footer: dropdownFooterRef && (React.createElement("div", { ref: dropdownFooterRef, className: styles['dropdown-footer'] }, dropdownFooter)), expandToViewport: expandToViewport, loopFocus: loopFocus }, open && dropdownContent ? (React.createElement("div", { ref: dropdownContentRef, className: styles['dropdown-content'] }, dropdownContent)) : null)));
|
|
153
153
|
});
|
|
154
154
|
export default AutosuggestInput;
|
|
155
155
|
//# sourceMappingURL=index.js.map
|