@cloudscape-design/components 3.0.72 → 3.0.73
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/app-layout/toggles/index.d.ts.map +1 -1
- package/app-layout/toggles/index.js +2 -2
- package/app-layout/toggles/index.js.map +1 -1
- package/app-layout/visual-refresh/app-bar.d.ts.map +1 -1
- package/app-layout/visual-refresh/app-bar.js +2 -2
- package/app-layout/visual-refresh/app-bar.js.map +1 -1
- package/app-layout/visual-refresh/navigation.d.ts.map +1 -1
- package/app-layout/visual-refresh/navigation.js +1 -1
- package/app-layout/visual-refresh/navigation.js.map +1 -1
- package/app-layout/visual-refresh/tools.d.ts.map +1 -1
- package/app-layout/visual-refresh/tools.js +1 -1
- package/app-layout/visual-refresh/tools.js.map +1 -1
- package/app-layout/visual-refresh/trigger-button.d.ts.map +1 -1
- package/app-layout/visual-refresh/trigger-button.js +1 -1
- package/app-layout/visual-refresh/trigger-button.js.map +1 -1
- package/breadcrumb-group/item/styles.css.js +7 -7
- package/breadcrumb-group/item/styles.scoped.css +16 -15
- package/breadcrumb-group/item/styles.selectors.js +7 -7
- package/calendar/grid/index.d.ts +2 -2
- package/calendar/grid/index.d.ts.map +1 -1
- package/calendar/grid/index.js +64 -23
- package/calendar/grid/index.js.map +1 -1
- package/calendar/internal.d.ts.map +1 -1
- package/calendar/internal.js +3 -15
- package/calendar/internal.js.map +1 -1
- package/calendar/styles.css.js +18 -20
- package/calendar/styles.scoped.css +46 -58
- package/calendar/styles.selectors.js +18 -20
- package/date-range-picker/calendar/grids/grid.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/grid.js +61 -6
- package/date-range-picker/calendar/grids/grid.js.map +1 -1
- package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/index.js +1 -0
- package/date-range-picker/calendar/grids/index.js.map +1 -1
- package/date-range-picker/calendar/grids/styles.css.js +26 -0
- package/date-range-picker/calendar/grids/{day/styles.scoped.css → styles.scoped.css} +38 -38
- package/date-range-picker/calendar/grids/styles.selectors.js +27 -0
- package/date-range-picker/index.js +2 -2
- package/date-range-picker/index.js.map +1 -1
- package/date-range-picker/styles.css.js +41 -40
- package/date-range-picker/styles.scoped.css +56 -48
- package/date-range-picker/styles.selectors.js +41 -40
- package/expandable-section/expandable-section-header.d.ts +3 -2
- package/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.js +3 -3
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/interfaces.d.ts +5 -0
- package/expandable-section/interfaces.d.ts.map +1 -1
- package/expandable-section/interfaces.js.map +1 -1
- package/expandable-section/internal.d.ts +1 -1
- package/expandable-section/internal.d.ts.map +1 -1
- package/expandable-section/internal.js +4 -3
- package/expandable-section/internal.js.map +1 -1
- package/internal/components/dropdown-status/index.d.ts +3 -1
- package/internal/components/dropdown-status/index.d.ts.map +1 -1
- package/internal/components/dropdown-status/index.js +7 -4
- package/internal/components/dropdown-status/index.js.map +1 -1
- package/internal/components/live-region/index.d.ts.map +1 -1
- package/internal/components/live-region/index.js +1 -0
- package/internal/components/live-region/index.js.map +1 -1
- package/internal/environment.js +1 -1
- package/modal/internal.d.ts.map +1 -1
- package/modal/internal.js +6 -10
- package/modal/internal.js.map +1 -1
- package/multiselect/internal.d.ts.map +1 -1
- package/multiselect/internal.js +3 -2
- package/multiselect/internal.js.map +1 -1
- package/package.json +1 -1
- package/property-filter/controller.d.ts +2 -0
- package/property-filter/controller.d.ts.map +1 -1
- package/property-filter/controller.js +37 -0
- package/property-filter/controller.js.map +1 -1
- package/property-filter/index.d.ts.map +1 -1
- package/property-filter/index.js +21 -6
- package/property-filter/index.js.map +1 -1
- package/property-filter/interfaces.d.ts +9 -2
- package/property-filter/interfaces.d.ts.map +1 -1
- package/property-filter/interfaces.js +2 -0
- package/property-filter/interfaces.js.map +1 -1
- package/property-filter/property-editor.d.ts +13 -0
- package/property-filter/property-editor.d.ts.map +1 -0
- package/property-filter/property-editor.js +18 -0
- package/property-filter/property-editor.js.map +1 -0
- package/property-filter/property-filter-autosuggest.d.ts +1 -0
- package/property-filter/property-filter-autosuggest.d.ts.map +1 -1
- package/property-filter/property-filter-autosuggest.js +17 -3
- package/property-filter/property-filter-autosuggest.js.map +1 -1
- package/property-filter/styles.css.js +32 -24
- package/property-filter/styles.scoped.css +45 -27
- package/property-filter/styles.selectors.js +32 -24
- package/property-filter/token-editor.d.ts.map +1 -1
- package/property-filter/token-editor.js +17 -4
- package/property-filter/token-editor.js.map +1 -1
- package/property-filter/token.d.ts.map +1 -1
- package/property-filter/token.js +6 -3
- package/property-filter/token.js.map +1 -1
- package/select/internal.d.ts.map +1 -1
- package/select/internal.js +3 -2
- package/select/internal.js.map +1 -1
- package/select/parts/filter.d.ts +1 -1
- package/select/utils/use-select.d.ts +15 -1
- package/select/utils/use-select.d.ts.map +1 -1
- package/select/utils/use-select.js +11 -1
- package/select/utils/use-select.js.map +1 -1
- package/split-panel/index.d.ts.map +1 -1
- package/split-panel/index.js +8 -6
- package/split-panel/index.js.map +1 -1
- package/split-panel/interfaces.d.ts +1 -0
- package/split-panel/interfaces.d.ts.map +1 -1
- package/split-panel/interfaces.js.map +1 -1
- package/split-panel/utils/use-pointer-events.d.ts +1 -1
- package/split-panel/utils/use-pointer-events.d.ts.map +1 -1
- package/split-panel/utils/use-pointer-events.js +9 -5
- package/split-panel/utils/use-pointer-events.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +8 -1
- package/table/internal.js.map +1 -1
- package/table/use-mouse-down-target.d.ts +6 -0
- package/table/use-mouse-down-target.d.ts.map +1 -0
- package/table/use-mouse-down-target.js +30 -0
- package/table/use-mouse-down-target.js.map +1 -0
- package/tabs/styles.css.js +21 -21
- package/tabs/styles.scoped.css +38 -37
- package/tabs/styles.selectors.js +21 -21
- package/test-utils/dom/date-range-picker/index.js +1 -1
- package/test-utils/dom/date-range-picker/index.js.map +1 -1
- package/test-utils/selectors/date-range-picker/index.js +1 -1
- package/test-utils/selectors/date-range-picker/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/calendar/grid/day/index.d.ts +0 -15
- package/calendar/grid/day/index.d.ts.map +0 -1
- package/calendar/grid/day/index.js +0 -47
- package/calendar/grid/day/index.js.map +0 -1
- package/date-range-picker/calendar/grids/day/index.d.ts +0 -27
- package/date-range-picker/calendar/grids/day/index.d.ts.map +0 -1
- package/date-range-picker/calendar/grids/day/index.js +0 -95
- package/date-range-picker/calendar/grids/day/index.js.map +0 -1
- package/date-range-picker/calendar/grids/day/styles.css.js +0 -26
- package/date-range-picker/calendar/grids/day/styles.selectors.js +0 -27
|
@@ -90,11 +90,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
/*
|
|
94
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
|
+
SPDX-License-Identifier: Apache-2.0
|
|
96
|
+
*/
|
|
97
|
+
.awsui_calendar_mgja0_194kz_97:not(#\9) {
|
|
98
|
+
animation: awsui_awsui-motion-fade-in-0_mgja0_194kz_1 var(--motion-duration-show-quick-tyaalm, 135ms) var(--motion-easing-show-quick-1fcgbv, ease-out);
|
|
95
99
|
animation-fill-mode: both;
|
|
96
100
|
}
|
|
97
|
-
@keyframes awsui_awsui-motion-fade-in-
|
|
101
|
+
@keyframes awsui_awsui-motion-fade-in-0_mgja0_194kz_1 {
|
|
98
102
|
from {
|
|
99
103
|
opacity: 0;
|
|
100
104
|
}
|
|
@@ -103,12 +107,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
103
107
|
}
|
|
104
108
|
}
|
|
105
109
|
@media (prefers-reduced-motion: reduce) {
|
|
106
|
-
.
|
|
110
|
+
.awsui_calendar_mgja0_194kz_97:not(#\9) {
|
|
107
111
|
animation: none;
|
|
108
112
|
transition: none;
|
|
109
113
|
}
|
|
110
114
|
}
|
|
111
|
-
.awsui-motion-disabled .
|
|
115
|
+
.awsui-motion-disabled .awsui_calendar_mgja0_194kz_97:not(#\9), .awsui-mode-entering .awsui_calendar_mgja0_194kz_97:not(#\9) {
|
|
112
116
|
animation: none;
|
|
113
117
|
transition: none;
|
|
114
118
|
}
|
|
@@ -117,7 +121,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
117
121
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
118
122
|
SPDX-License-Identifier: Apache-2.0
|
|
119
123
|
*/
|
|
120
|
-
.
|
|
124
|
+
.awsui_root_mgja0_194kz_124:not(#\9) {
|
|
121
125
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
122
126
|
border-collapse: separate;
|
|
123
127
|
border-spacing: 0;
|
|
@@ -155,28 +159,28 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
155
159
|
max-width: 32em;
|
|
156
160
|
}
|
|
157
161
|
|
|
158
|
-
.awsui_trigger-
|
|
162
|
+
.awsui_trigger-wrapper_mgja0_194kz_136:not(#\9) {
|
|
159
163
|
min-width: calc(var(--size-calendar-grid-width-lxsx0p, 238px) + 2 * var(--space-l-4vl6xu, 20px));
|
|
160
164
|
}
|
|
161
165
|
|
|
162
|
-
.awsui_trigger-
|
|
166
|
+
.awsui_trigger-flexbox_mgja0_194kz_140:not(#\9) {
|
|
163
167
|
display: flex;
|
|
164
168
|
}
|
|
165
169
|
|
|
166
|
-
.
|
|
170
|
+
.awsui_calendar_mgja0_194kz_97:not(#\9) {
|
|
167
171
|
display: block;
|
|
168
172
|
width: calc(2 * var(--size-calendar-grid-width-lxsx0p, 238px) + var(--space-xs-rsr2qu, 8px));
|
|
169
173
|
}
|
|
170
|
-
.
|
|
174
|
+
.awsui_calendar_mgja0_194kz_97.awsui_one-grid_mgja0_194kz_148:not(#\9) {
|
|
171
175
|
width: var(--size-calendar-grid-width-lxsx0p, 238px);
|
|
172
176
|
}
|
|
173
|
-
.awsui_calendar-
|
|
177
|
+
.awsui_calendar-header_mgja0_194kz_151:not(#\9) {
|
|
174
178
|
display: flex;
|
|
175
179
|
justify-content: space-between;
|
|
176
180
|
align-items: center;
|
|
177
181
|
position: relative;
|
|
178
182
|
}
|
|
179
|
-
.awsui_calendar-header-months-
|
|
183
|
+
.awsui_calendar-header-months-wrapper_mgja0_194kz_157:not(#\9) {
|
|
180
184
|
position: absolute;
|
|
181
185
|
right: 0;
|
|
182
186
|
left: 0;
|
|
@@ -188,7 +192,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
188
192
|
flex: 1;
|
|
189
193
|
pointer-events: none;
|
|
190
194
|
}
|
|
191
|
-
.awsui_calendar-header-
|
|
195
|
+
.awsui_calendar-header-month_mgja0_194kz_157:not(#\9) {
|
|
192
196
|
font-size: var(--font-body-m-size-sregvd, 14px);
|
|
193
197
|
line-height: var(--font-body-m-line-height-i7xxvv, 22px);
|
|
194
198
|
font-weight: 700;
|
|
@@ -196,17 +200,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
196
200
|
display: flex;
|
|
197
201
|
pointer-events: auto;
|
|
198
202
|
}
|
|
199
|
-
.awsui_calendar-next-month-
|
|
203
|
+
.awsui_calendar-next-month-btn_mgja0_194kz_177:not(#\9) {
|
|
200
204
|
/* used for identifying element */
|
|
201
205
|
}
|
|
202
|
-
.awsui_calendar-prev-month-
|
|
206
|
+
.awsui_calendar-prev-month-btn_mgja0_194kz_180:not(#\9) {
|
|
203
207
|
/* used for identifying element */
|
|
204
208
|
}
|
|
205
|
-
.awsui_calendar-day-
|
|
209
|
+
.awsui_calendar-day-names_mgja0_194kz_183:not(#\9) {
|
|
206
210
|
display: flex;
|
|
207
211
|
justify-content: stretch;
|
|
208
212
|
}
|
|
209
|
-
.awsui_calendar-day-
|
|
213
|
+
.awsui_calendar-day-name_mgja0_194kz_183:not(#\9) {
|
|
210
214
|
flex: 1 1 0%;
|
|
211
215
|
width: 0;
|
|
212
216
|
word-break: break-word;
|
|
@@ -217,132 +221,136 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
217
221
|
line-height: var(--font-body-s-line-height-kdsbrl, 16px);
|
|
218
222
|
letter-spacing: var(--font-body-s-letter-spacing-cy0oxj, 0.005em);
|
|
219
223
|
}
|
|
220
|
-
.awsui_calendar-
|
|
224
|
+
.awsui_calendar-week_mgja0_194kz_198:not(#\9) {
|
|
221
225
|
display: flex;
|
|
222
226
|
justify-content: stretch;
|
|
223
227
|
}
|
|
224
228
|
|
|
225
|
-
.awsui_first-
|
|
226
|
-
.awsui_second-
|
|
229
|
+
.awsui_first-grid_mgja0_194kz_203:not(#\9),
|
|
230
|
+
.awsui_second-grid_mgja0_194kz_204:not(#\9) {
|
|
227
231
|
/* used in test-utils */
|
|
228
232
|
}
|
|
229
233
|
|
|
230
|
-
.
|
|
234
|
+
.awsui_grid_mgja0_194kz_208:not(#\9) {
|
|
231
235
|
width: var(--size-calendar-grid-width-lxsx0p, 238px);
|
|
232
236
|
}
|
|
233
237
|
|
|
234
|
-
.awsui_date-and-time-
|
|
238
|
+
.awsui_date-and-time-wrapper_mgja0_194kz_212:not(#\9) {
|
|
235
239
|
width: var(--size-calendar-grid-width-lxsx0p, 238px);
|
|
236
240
|
}
|
|
237
241
|
|
|
238
|
-
.awsui_date-and-time-
|
|
242
|
+
.awsui_date-and-time-wrapper_mgja0_194kz_212:not(#\9):not(.awsui_date-only_mgja0_194kz_216) {
|
|
239
243
|
display: grid;
|
|
240
244
|
column-gap: var(--space-xs-rsr2qu, 8px);
|
|
241
245
|
grid-template-columns: 1fr 1fr;
|
|
242
246
|
}
|
|
243
247
|
|
|
244
|
-
.awsui_date-and-time-
|
|
248
|
+
.awsui_date-and-time-constrainttext_mgja0_194kz_222:not(#\9) {
|
|
245
249
|
color: var(--color-text-form-secondary-ih9x7l, #5f6b7a);
|
|
246
250
|
font-size: var(--font-body-s-size-ukw2p9, 12px);
|
|
247
251
|
line-height: var(--font-body-s-line-height-kdsbrl, 16px);
|
|
248
252
|
letter-spacing: var(--font-body-s-letter-spacing-cy0oxj, 0.005em);
|
|
249
253
|
}
|
|
250
254
|
|
|
251
|
-
.
|
|
255
|
+
.awsui_footer_mgja0_194kz_229:not(#\9) {
|
|
252
256
|
display: flex;
|
|
253
257
|
flex-wrap: wrap;
|
|
254
258
|
justify-content: flex-end;
|
|
255
259
|
border-top: 1px solid var(--color-border-dropdown-item-default-faosd8, #e9ebed);
|
|
256
260
|
padding: 0 var(--space-l-4vl6xu, 20px) var(--space-s-hv8c1d, 12px);
|
|
257
261
|
}
|
|
258
|
-
.
|
|
262
|
+
.awsui_footer_mgja0_194kz_229.awsui_has-clear-button_mgja0_194kz_236:not(#\9) {
|
|
259
263
|
justify-content: space-between;
|
|
260
264
|
}
|
|
261
|
-
.
|
|
265
|
+
.awsui_footer_mgja0_194kz_229.awsui_one-grid_mgja0_194kz_148:not(#\9) {
|
|
262
266
|
padding: 0 var(--space-xs-rsr2qu, 8px) var(--space-s-hv8c1d, 12px);
|
|
263
267
|
}
|
|
264
268
|
|
|
265
|
-
.awsui_footer-button-
|
|
269
|
+
.awsui_footer-button-wrapper_mgja0_194kz_243:not(#\9) {
|
|
266
270
|
padding-top: var(--space-s-hv8c1d, 12px);
|
|
267
271
|
}
|
|
268
272
|
|
|
269
|
-
.awsui_icon-
|
|
273
|
+
.awsui_icon-wrapper_mgja0_194kz_247:not(#\9) {
|
|
270
274
|
color: var(--color-text-interactive-default-eg5fsa, #414d5c);
|
|
271
275
|
margin-right: var(--space-xs-rsr2qu, 8px);
|
|
272
276
|
}
|
|
273
277
|
|
|
274
|
-
.
|
|
278
|
+
.awsui_label_mgja0_194kz_252:not(#\9) {
|
|
275
279
|
-webkit-user-select: text;
|
|
276
280
|
user-select: text;
|
|
277
281
|
cursor: default;
|
|
278
282
|
}
|
|
279
283
|
|
|
280
|
-
.
|
|
284
|
+
.awsui_label_mgja0_194kz_252.awsui_label-enabled_mgja0_194kz_257:not(#\9):hover > .awsui_trigger-flexbox_mgja0_194kz_140 > .awsui_icon-wrapper_mgja0_194kz_247 {
|
|
281
285
|
color: var(--color-text-interactive-hover-v3lasm, #000716);
|
|
282
286
|
}
|
|
283
287
|
|
|
284
|
-
.awsui_label-
|
|
288
|
+
.awsui_label-text_mgja0_194kz_261:not(#\9) {
|
|
285
289
|
color: var(--color-text-input-placeholder-j53j3c, #5f6b7a);
|
|
286
290
|
font-style: italic;
|
|
287
291
|
}
|
|
288
292
|
|
|
289
|
-
.
|
|
293
|
+
.awsui_label-token-nowrap_mgja0_194kz_266:not(#\9) {
|
|
294
|
+
white-space: nowrap;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.awsui_mode-switch_mgja0_194kz_270:not(#\9) {
|
|
290
298
|
/* used in test-utils */
|
|
291
299
|
}
|
|
292
300
|
|
|
293
|
-
.
|
|
301
|
+
.awsui_dropdown_mgja0_194kz_274:not(#\9) {
|
|
294
302
|
overflow: auto;
|
|
295
303
|
border-top: 1px solid var(--color-border-container-top-srcvx4, transparent);
|
|
296
304
|
border-bottom: 1px solid var(--color-border-container-top-srcvx4, transparent);
|
|
297
305
|
border-radius: var(--border-radius-dropdown-ujknaf, 8px);
|
|
298
306
|
}
|
|
299
|
-
.
|
|
307
|
+
.awsui_dropdown_mgja0_194kz_274:not(#\9):focus {
|
|
300
308
|
outline: none;
|
|
301
309
|
}
|
|
302
|
-
.
|
|
310
|
+
.awsui_dropdown_mgja0_194kz_274[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
303
311
|
outline: 2px dotted transparent;
|
|
304
312
|
outline-offset: 2px;
|
|
305
313
|
border-radius: var(--border-radius-dropdown-ujknaf, 8px);
|
|
306
314
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
307
315
|
}
|
|
308
316
|
|
|
309
|
-
.awsui_dropdown-
|
|
317
|
+
.awsui_dropdown-content_mgja0_194kz_290:not(#\9) {
|
|
310
318
|
-webkit-user-select: text;
|
|
311
319
|
user-select: text;
|
|
312
320
|
background-color: var(--color-background-container-content-i8i4a0, #ffffff);
|
|
313
321
|
width: calc(2 * var(--size-calendar-grid-width-lxsx0p, 238px) + var(--space-xs-rsr2qu, 8px) + 2 * var(--space-l-4vl6xu, 20px));
|
|
314
322
|
}
|
|
315
|
-
.awsui_dropdown-
|
|
323
|
+
.awsui_dropdown-content_mgja0_194kz_290.awsui_one-grid_mgja0_194kz_148:not(#\9) {
|
|
316
324
|
width: calc(var(--size-calendar-grid-width-lxsx0p, 238px) + 2 * var(--space-l-4vl6xu, 20px));
|
|
317
325
|
}
|
|
318
326
|
|
|
319
|
-
.awsui_start-date-
|
|
320
|
-
.awsui_start-time-
|
|
321
|
-
.awsui_end-date-
|
|
322
|
-
.awsui_end-time-
|
|
327
|
+
.awsui_start-date-input_mgja0_194kz_299:not(#\9),
|
|
328
|
+
.awsui_start-time-input_mgja0_194kz_300:not(#\9),
|
|
329
|
+
.awsui_end-date-input_mgja0_194kz_301:not(#\9),
|
|
330
|
+
.awsui_end-time-input_mgja0_194kz_302:not(#\9) {
|
|
323
331
|
/* used in test-utils */
|
|
324
332
|
}
|
|
325
333
|
|
|
326
|
-
.awsui_validation-
|
|
334
|
+
.awsui_validation-section_mgja0_194kz_306:not(#\9) {
|
|
327
335
|
/* used in test-utils */
|
|
328
336
|
}
|
|
329
337
|
|
|
330
|
-
.awsui_validation-
|
|
338
|
+
.awsui_validation-error_mgja0_194kz_310:not(#\9) {
|
|
331
339
|
/* used in test-utils */
|
|
332
340
|
}
|
|
333
341
|
|
|
334
|
-
.awsui_clear-
|
|
342
|
+
.awsui_clear-button_mgja0_194kz_314:not(#\9) {
|
|
335
343
|
/* used in test-utils */
|
|
336
344
|
}
|
|
337
345
|
|
|
338
|
-
.awsui_apply-
|
|
346
|
+
.awsui_apply-button_mgja0_194kz_318:not(#\9) {
|
|
339
347
|
/* used in test-utils */
|
|
340
348
|
}
|
|
341
349
|
|
|
342
|
-
.awsui_cancel-
|
|
350
|
+
.awsui_cancel-button_mgja0_194kz_322:not(#\9) {
|
|
343
351
|
/* used in test-utils */
|
|
344
352
|
}
|
|
345
353
|
|
|
346
|
-
.awsui_calendar-aria-
|
|
354
|
+
.awsui_calendar-aria-live_mgja0_194kz_326:not(#\9) {
|
|
347
355
|
/* used in test-utils */
|
|
348
356
|
}
|
|
@@ -2,45 +2,46 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"calendar": "
|
|
6
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
7
|
-
"root": "
|
|
8
|
-
"trigger-wrapper": "awsui_trigger-
|
|
9
|
-
"trigger-flexbox": "awsui_trigger-
|
|
10
|
-
"one-grid": "awsui_one-
|
|
11
|
-
"calendar-header": "awsui_calendar-
|
|
12
|
-
"calendar-header-months-wrapper": "awsui_calendar-header-months-
|
|
13
|
-
"calendar-header-month": "awsui_calendar-header-
|
|
14
|
-
"calendar-next-month-btn": "awsui_calendar-next-month-
|
|
15
|
-
"calendar-prev-month-btn": "awsui_calendar-prev-month-
|
|
16
|
-
"calendar-day-names": "awsui_calendar-day-
|
|
17
|
-
"calendar-day-name": "awsui_calendar-day-
|
|
18
|
-
"calendar-week": "awsui_calendar-
|
|
19
|
-
"first-grid": "awsui_first-
|
|
20
|
-
"second-grid": "awsui_second-
|
|
21
|
-
"grid": "
|
|
22
|
-
"date-and-time-wrapper": "awsui_date-and-time-
|
|
23
|
-
"date-only": "awsui_date-
|
|
24
|
-
"date-and-time-constrainttext": "awsui_date-and-time-
|
|
25
|
-
"footer": "
|
|
26
|
-
"has-clear-button": "awsui_has-clear-
|
|
27
|
-
"footer-button-wrapper": "awsui_footer-button-
|
|
28
|
-
"icon-wrapper": "awsui_icon-
|
|
29
|
-
"label": "
|
|
30
|
-
"label-enabled": "awsui_label-
|
|
31
|
-
"label-text": "awsui_label-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"dropdown
|
|
35
|
-
"
|
|
36
|
-
"start-
|
|
37
|
-
"
|
|
38
|
-
"end-
|
|
39
|
-
"
|
|
40
|
-
"validation-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
5
|
+
"calendar": "awsui_calendar_mgja0_194kz_97",
|
|
6
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_mgja0_194kz_1",
|
|
7
|
+
"root": "awsui_root_mgja0_194kz_124",
|
|
8
|
+
"trigger-wrapper": "awsui_trigger-wrapper_mgja0_194kz_136",
|
|
9
|
+
"trigger-flexbox": "awsui_trigger-flexbox_mgja0_194kz_140",
|
|
10
|
+
"one-grid": "awsui_one-grid_mgja0_194kz_148",
|
|
11
|
+
"calendar-header": "awsui_calendar-header_mgja0_194kz_151",
|
|
12
|
+
"calendar-header-months-wrapper": "awsui_calendar-header-months-wrapper_mgja0_194kz_157",
|
|
13
|
+
"calendar-header-month": "awsui_calendar-header-month_mgja0_194kz_157",
|
|
14
|
+
"calendar-next-month-btn": "awsui_calendar-next-month-btn_mgja0_194kz_177",
|
|
15
|
+
"calendar-prev-month-btn": "awsui_calendar-prev-month-btn_mgja0_194kz_180",
|
|
16
|
+
"calendar-day-names": "awsui_calendar-day-names_mgja0_194kz_183",
|
|
17
|
+
"calendar-day-name": "awsui_calendar-day-name_mgja0_194kz_183",
|
|
18
|
+
"calendar-week": "awsui_calendar-week_mgja0_194kz_198",
|
|
19
|
+
"first-grid": "awsui_first-grid_mgja0_194kz_203",
|
|
20
|
+
"second-grid": "awsui_second-grid_mgja0_194kz_204",
|
|
21
|
+
"grid": "awsui_grid_mgja0_194kz_208",
|
|
22
|
+
"date-and-time-wrapper": "awsui_date-and-time-wrapper_mgja0_194kz_212",
|
|
23
|
+
"date-only": "awsui_date-only_mgja0_194kz_216",
|
|
24
|
+
"date-and-time-constrainttext": "awsui_date-and-time-constrainttext_mgja0_194kz_222",
|
|
25
|
+
"footer": "awsui_footer_mgja0_194kz_229",
|
|
26
|
+
"has-clear-button": "awsui_has-clear-button_mgja0_194kz_236",
|
|
27
|
+
"footer-button-wrapper": "awsui_footer-button-wrapper_mgja0_194kz_243",
|
|
28
|
+
"icon-wrapper": "awsui_icon-wrapper_mgja0_194kz_247",
|
|
29
|
+
"label": "awsui_label_mgja0_194kz_252",
|
|
30
|
+
"label-enabled": "awsui_label-enabled_mgja0_194kz_257",
|
|
31
|
+
"label-text": "awsui_label-text_mgja0_194kz_261",
|
|
32
|
+
"label-token-nowrap": "awsui_label-token-nowrap_mgja0_194kz_266",
|
|
33
|
+
"mode-switch": "awsui_mode-switch_mgja0_194kz_270",
|
|
34
|
+
"dropdown": "awsui_dropdown_mgja0_194kz_274",
|
|
35
|
+
"dropdown-content": "awsui_dropdown-content_mgja0_194kz_290",
|
|
36
|
+
"start-date-input": "awsui_start-date-input_mgja0_194kz_299",
|
|
37
|
+
"start-time-input": "awsui_start-time-input_mgja0_194kz_300",
|
|
38
|
+
"end-date-input": "awsui_end-date-input_mgja0_194kz_301",
|
|
39
|
+
"end-time-input": "awsui_end-time-input_mgja0_194kz_302",
|
|
40
|
+
"validation-section": "awsui_validation-section_mgja0_194kz_306",
|
|
41
|
+
"validation-error": "awsui_validation-error_mgja0_194kz_310",
|
|
42
|
+
"clear-button": "awsui_clear-button_mgja0_194kz_314",
|
|
43
|
+
"apply-button": "awsui_apply-button_mgja0_194kz_318",
|
|
44
|
+
"cancel-button": "awsui_cancel-button_mgja0_194kz_322",
|
|
45
|
+
"calendar-aria-live": "awsui_calendar-aria-live_mgja0_194kz_326"
|
|
45
46
|
};
|
|
46
47
|
|
|
@@ -7,11 +7,12 @@ interface ExpandableSectionHeaderProps {
|
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
expanded: boolean;
|
|
9
9
|
ariaControls: string;
|
|
10
|
-
ariaLabelledBy
|
|
10
|
+
ariaLabelledBy?: string;
|
|
11
|
+
ariaLabel?: string;
|
|
11
12
|
onKeyUp: KeyboardEventHandler;
|
|
12
13
|
onKeyDown: KeyboardEventHandler;
|
|
13
14
|
onClick: MouseEventHandler;
|
|
14
15
|
}
|
|
15
|
-
export declare const ExpandableSectionHeader: ({ id, className, variant, children, expanded, ariaControls, ariaLabelledBy, onKeyUp, onKeyDown, onClick, }: ExpandableSectionHeaderProps) => JSX.Element;
|
|
16
|
+
export declare const ExpandableSectionHeader: ({ id, className, variant, children, expanded, ariaControls, ariaLabel, ariaLabelledBy, onKeyUp, onKeyDown, onClick, }: ExpandableSectionHeaderProps) => JSX.Element;
|
|
16
17
|
export {};
|
|
17
18
|
//# sourceMappingURL=expandable-section-header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandable-section-header.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAc,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMlF,UAAU,4BAA4B;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,sBAAsB,CAAC,OAAO,CAAC;IACxC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"expandable-section-header.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAc,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMlF,UAAU,4BAA4B;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,sBAAsB,CAAC,OAAO,CAAC;IACxC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,EAAE,oBAAoB,CAAC;IAChC,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,eAAO,MAAM,uBAAuB,0HAYjC,4BAA4B,gBAmD9B,CAAC"}
|
|
@@ -5,7 +5,7 @@ import InternalIcon from '../icon/internal';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import styles from './styles.css.js';
|
|
7
7
|
export var ExpandableSectionHeader = function (_a) {
|
|
8
|
-
var id = _a.id, className = _a.className, variant = _a.variant, children = _a.children, expanded = _a.expanded, ariaControls = _a.ariaControls, ariaLabelledBy = _a.ariaLabelledBy, onKeyUp = _a.onKeyUp, onKeyDown = _a.onKeyDown, onClick = _a.onClick;
|
|
8
|
+
var id = _a.id, className = _a.className, variant = _a.variant, children = _a.children, expanded = _a.expanded, ariaControls = _a.ariaControls, ariaLabel = _a.ariaLabel, ariaLabelledBy = _a.ariaLabelledBy, onKeyUp = _a.onKeyUp, onKeyDown = _a.onKeyDown, onClick = _a.onClick;
|
|
9
9
|
var focusVisible = useFocusVisible();
|
|
10
10
|
var icon = (React.createElement(InternalIcon, { size: variant === 'container' ? 'medium' : 'normal', className: clsx(styles.icon, expanded && styles.expanded), name: "caret-down-filled" }));
|
|
11
11
|
var ariaAttributes = {
|
|
@@ -15,10 +15,10 @@ export var ExpandableSectionHeader = function (_a) {
|
|
|
15
15
|
var triggerClassName = clsx(styles.trigger, styles["trigger-".concat(variant)], expanded && styles['trigger-expanded']);
|
|
16
16
|
if (variant === 'navigation') {
|
|
17
17
|
return (React.createElement("div", { id: id, className: clsx(className, triggerClassName), onClick: onClick },
|
|
18
|
-
React.createElement("button", __assign({ className: styles['icon-container'], type: "button", "aria-labelledby": ariaLabelledBy }, focusVisible, ariaAttributes), icon),
|
|
18
|
+
React.createElement("button", __assign({ className: styles['icon-container'], type: "button", "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel }, focusVisible, ariaAttributes), icon),
|
|
19
19
|
children));
|
|
20
20
|
}
|
|
21
|
-
return (React.createElement("div", __assign({ id: id, role: "button", className: clsx(className, triggerClassName, styles.focusable, expanded && styles.expanded), tabIndex: 0, onKeyUp: onKeyUp, onKeyDown: onKeyDown, onClick: onClick }, focusVisible, ariaAttributes),
|
|
21
|
+
return (React.createElement("div", __assign({ id: id, role: "button", className: clsx(className, triggerClassName, styles.focusable, expanded && styles.expanded), tabIndex: 0, onKeyUp: onKeyUp, onKeyDown: onKeyDown, onClick: onClick, "aria-label": ariaLabel }, focusVisible, ariaAttributes),
|
|
22
22
|
React.createElement("div", { className: styles['icon-container'] }, icon),
|
|
23
23
|
children));
|
|
24
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandable-section-header.js","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":";AAGA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAClF,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"expandable-section-header.js","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":";AAGA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAClF,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAgBrC,MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAC,EAYT;QAX7B,EAAE,QAAA,EACF,SAAS,eAAA,EACT,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,YAAY,kBAAA,EACZ,SAAS,eAAA,EACT,cAAc,oBAAA,EACd,OAAO,aAAA,EACP,SAAS,eAAA,EACT,OAAO,aAAA;IAEP,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,IAAM,IAAI,GAAG,CACX,oBAAC,YAAY,IACX,IAAI,EAAE,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EACnD,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,EACzD,IAAI,EAAC,mBAAmB,GACxB,CACH,CAAC;IACF,IAAM,cAAc,GAAG;QACrB,eAAe,EAAE,YAAY;QAC7B,eAAe,EAAE,QAAQ;KAC1B,CAAC;IAEF,IAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,kBAAW,OAAO,CAAE,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACpH,IAAI,OAAO,KAAK,YAAY,EAAE;QAC5B,OAAO,CACL,6BAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,EAAE,OAAO,EAAE,OAAO;YACzE,yCACE,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EACnC,IAAI,EAAC,QAAQ,qBACI,cAAc,gBACnB,SAAS,IACjB,YAAY,EACZ,cAAc,GAEjB,IAAI,CACE;YACR,QAAQ,CACL,CACP,CAAC;KACH;IAED,OAAO,CACL,sCACE,EAAE,EAAE,EAAE,EACN,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,EAC3F,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,gBACJ,SAAS,IACjB,YAAY,EACZ,cAAc;QAElB,6BAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAG,IAAI,CAAO;QACrD,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ExpandableSectionProps } from './interfaces';\nimport React, { KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';\nimport useFocusVisible from '../internal/hooks/focus-visible';\nimport InternalIcon from '../icon/internal';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\n\ninterface ExpandableSectionHeaderProps {\n id: string;\n className?: string;\n variant: ExpandableSectionProps.Variant;\n children?: ReactNode;\n expanded: boolean;\n ariaControls: string;\n ariaLabelledBy?: string;\n ariaLabel?: string;\n onKeyUp: KeyboardEventHandler;\n onKeyDown: KeyboardEventHandler;\n onClick: MouseEventHandler;\n}\n\nexport const ExpandableSectionHeader = ({\n id,\n className,\n variant,\n children,\n expanded,\n ariaControls,\n ariaLabel,\n ariaLabelledBy,\n onKeyUp,\n onKeyDown,\n onClick,\n}: ExpandableSectionHeaderProps) => {\n const focusVisible = useFocusVisible();\n\n const icon = (\n <InternalIcon\n size={variant === 'container' ? 'medium' : 'normal'}\n className={clsx(styles.icon, expanded && styles.expanded)}\n name=\"caret-down-filled\"\n />\n );\n const ariaAttributes = {\n 'aria-controls': ariaControls,\n 'aria-expanded': expanded,\n };\n\n const triggerClassName = clsx(styles.trigger, styles[`trigger-${variant}`], expanded && styles['trigger-expanded']);\n if (variant === 'navigation') {\n return (\n <div id={id} className={clsx(className, triggerClassName)} onClick={onClick}>\n <button\n className={styles['icon-container']}\n type=\"button\"\n aria-labelledby={ariaLabelledBy}\n aria-label={ariaLabel}\n {...focusVisible}\n {...ariaAttributes}\n >\n {icon}\n </button>\n {children}\n </div>\n );\n }\n\n return (\n <div\n id={id}\n role=\"button\"\n className={clsx(className, triggerClassName, styles.focusable, expanded && styles.expanded)}\n tabIndex={0}\n onKeyUp={onKeyUp}\n onKeyDown={onKeyDown}\n onClick={onClick}\n aria-label={ariaLabel}\n {...focusVisible}\n {...ariaAttributes}\n >\n <div className={styles['icon-container']}>{icon}</div>\n {children}\n </div>\n );\n};\n"]}
|
|
@@ -41,6 +41,11 @@ export interface ExpandableSectionProps extends BaseComponentProps {
|
|
|
41
41
|
* When using the container variant, use the Header component. Otherwise, use plain text.
|
|
42
42
|
*/
|
|
43
43
|
header?: React.ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Adds `aria-label` to the header element.
|
|
46
|
+
* Use to assign unique labels when there are multiple expandable sections with the same header text on one page.
|
|
47
|
+
*/
|
|
48
|
+
headerAriaLabel?: string;
|
|
44
49
|
/**
|
|
45
50
|
* Called when the state changes (that is, when the user expands or collapses the component).
|
|
46
51
|
* The event `detail` contains the current value of the `expanded` property.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,y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;;;;;;;SAOK;IACL,OAAO,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC;IAEzC;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;CAC3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/expandable-section/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace ExpandableSectionProps {\n export type Variant = 'default' | 'footer' | 'container' | 'navigation';\n export interface ChangeDetail {\n expanded: boolean;\n }\n}\n\nexport interface ExpandableSectionProps extends BaseComponentProps {\n /**\n * Determines whether the component initially displays in expanded state (that is, with content visible). The component operates in an uncontrolled\n * manner even if you provide a value for this property.\n */\n defaultExpanded?: boolean;\n\n /**\n * Determines whether the component is in the expanded state (that is, with content visible). The component operates in a controlled\n * manner if you provide a value for this property.\n */\n expanded?: boolean;\n\n /**\n * The possible variants of an expandable section are as follows:\n * * `default` - Use this variant in any context.\n * * `footer` - Use this variant in container footers.\n * * `container` - Use this variant in a detail page alongside other containers.\n * * `navigation` - Use this variant in the navigation panel with anchors and custom styled content.\n * It doesn't have any default styles.\n * */\n variant?: ExpandableSectionProps.Variant;\n\n /**\n * Determines whether the content section's default padding is removed. This default padding is only present for the `container` variant.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Primary content displayed in the expandable section element.\n */\n children?: React.ReactNode;\n\n /**\n * Heading displayed above the content text.\n *\n * When using the container variant, use the Header component. Otherwise, use plain text.\n */\n header?: React.ReactNode;\n\n /**\n * Called when the state changes (that is, when the user expands or collapses the component).\n * The event `detail` contains the current value of the `expanded` property.\n */\n onChange?: NonCancelableEventHandler<ExpandableSectionProps.ChangeDetail>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/expandable-section/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace ExpandableSectionProps {\n export type Variant = 'default' | 'footer' | 'container' | 'navigation';\n export interface ChangeDetail {\n expanded: boolean;\n }\n}\n\nexport interface ExpandableSectionProps extends BaseComponentProps {\n /**\n * Determines whether the component initially displays in expanded state (that is, with content visible). The component operates in an uncontrolled\n * manner even if you provide a value for this property.\n */\n defaultExpanded?: boolean;\n\n /**\n * Determines whether the component is in the expanded state (that is, with content visible). The component operates in a controlled\n * manner if you provide a value for this property.\n */\n expanded?: boolean;\n\n /**\n * The possible variants of an expandable section are as follows:\n * * `default` - Use this variant in any context.\n * * `footer` - Use this variant in container footers.\n * * `container` - Use this variant in a detail page alongside other containers.\n * * `navigation` - Use this variant in the navigation panel with anchors and custom styled content.\n * It doesn't have any default styles.\n * */\n variant?: ExpandableSectionProps.Variant;\n\n /**\n * Determines whether the content section's default padding is removed. This default padding is only present for the `container` variant.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Primary content displayed in the expandable section element.\n */\n children?: React.ReactNode;\n\n /**\n * Heading displayed above the content text.\n *\n * When using the container variant, use the Header component. Otherwise, use plain text.\n */\n header?: React.ReactNode;\n\n /**\n * Adds `aria-label` to the header element.\n * Use to assign unique labels when there are multiple expandable sections with the same header text on one page.\n */\n headerAriaLabel?: string;\n\n /**\n * Called when the state changes (that is, when the user expands or collapses the component).\n * The event `detail` contains the current value of the `expanded` property.\n */\n onChange?: NonCancelableEventHandler<ExpandableSectionProps.ChangeDetail>;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExpandableSectionProps } from './interfaces';
|
|
2
2
|
import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
|
|
3
3
|
declare type InternalExpandableSectionProps = ExpandableSectionProps & InternalBaseComponentProps;
|
|
4
|
-
export default function InternalExpandableSection({ expanded: controlledExpanded, defaultExpanded, onChange, variant, children, header, disableContentPaddings, __internalRootRef, ...props }: InternalExpandableSectionProps): JSX.Element;
|
|
4
|
+
export default function InternalExpandableSection({ expanded: controlledExpanded, defaultExpanded, onChange, variant, children, header, disableContentPaddings, headerAriaLabel, __internalRootRef, ...props }: InternalExpandableSectionProps): JSX.Element;
|
|
5
5
|
export {};
|
|
6
6
|
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/internal.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAKtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,aAAK,8BAA8B,GAAG,sBAAsB,GAAG,0BAA0B,CAAC;AAE1F,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,QAAQ,EAAE,kBAAkB,EAC5B,eAAe,EACf,QAAQ,EACR,OAAmB,EACnB,QAAQ,EACR,MAAM,EACN,sBAAsB,EACtB,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,8BAA8B,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/internal.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAKtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,aAAK,8BAA8B,GAAG,sBAAsB,GAAG,0BAA0B,CAAC;AAE1F,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,QAAQ,EAAE,kBAAkB,EAC5B,eAAe,EACf,QAAQ,EACR,OAAmB,EACnB,QAAQ,EACR,MAAM,EACN,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,8BAA8B,eAqFhC"}
|
|
@@ -13,7 +13,7 @@ import styles from './styles.css.js';
|
|
|
13
13
|
import { ExpandableSectionContainer } from './expandable-section-container';
|
|
14
14
|
import { ExpandableSectionHeader } from './expandable-section-header';
|
|
15
15
|
export default function InternalExpandableSection(_a) {
|
|
16
|
-
var controlledExpanded = _a.expanded, defaultExpanded = _a.defaultExpanded, onChange = _a.onChange, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, children = _a.children, header = _a.header, disableContentPaddings = _a.disableContentPaddings, __internalRootRef = _a.__internalRootRef, props = __rest(_a, ["expanded", "defaultExpanded", "onChange", "variant", "children", "header", "disableContentPaddings", "__internalRootRef"]);
|
|
16
|
+
var controlledExpanded = _a.expanded, defaultExpanded = _a.defaultExpanded, onChange = _a.onChange, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, children = _a.children, header = _a.header, disableContentPaddings = _a.disableContentPaddings, headerAriaLabel = _a.headerAriaLabel, __internalRootRef = _a.__internalRootRef, props = __rest(_a, ["expanded", "defaultExpanded", "onChange", "variant", "children", "header", "disableContentPaddings", "headerAriaLabel", "__internalRootRef"]);
|
|
17
17
|
var ref = useRef(null);
|
|
18
18
|
var controlId = useUniqueId();
|
|
19
19
|
var triggerControlId = "".concat(controlId, "-trigger");
|
|
@@ -44,13 +44,14 @@ export default function InternalExpandableSection(_a) {
|
|
|
44
44
|
}, []);
|
|
45
45
|
var triggerProps = {
|
|
46
46
|
ariaControls: controlId,
|
|
47
|
-
|
|
47
|
+
ariaLabel: headerAriaLabel,
|
|
48
|
+
ariaLabelledBy: headerAriaLabel ? undefined : triggerControlId,
|
|
48
49
|
onKeyUp: onKeyUp,
|
|
49
50
|
onKeyDown: onKeyDown,
|
|
50
51
|
onClick: onClick
|
|
51
52
|
};
|
|
52
53
|
return (React.createElement(ExpandableSectionContainer, __assign({}, baseProps, { expanded: expanded, className: clsx(baseProps.className, styles.root), variant: variant, disableContentPaddings: disableContentPaddings, header: React.createElement(ExpandableSectionHeader, __assign({ id: triggerControlId, className: clsx(styles.header, styles["header-".concat(variant)]), variant: variant, expanded: !!expanded }, triggerProps), header), __internalRootRef: __internalRootRef }),
|
|
53
54
|
React.createElement(CSSTransition, { "in": expanded, timeout: 30, classNames: { enter: styles['content-enter'] }, nodeRef: ref },
|
|
54
|
-
React.createElement("div", { id: controlId, ref: ref, className: clsx(styles.content, styles["content-".concat(variant)], expanded && styles['content-expanded']), role: "group", "aria-labelledby":
|
|
55
|
+
React.createElement("div", { id: controlId, ref: ref, className: clsx(styles.content, styles["content-".concat(variant)], expanded && styles['content-expanded']), role: "group", "aria-label": triggerProps.ariaLabel, "aria-labelledby": triggerProps.ariaLabelledBy }, children))));
|
|
55
56
|
}
|
|
56
57
|
//# sourceMappingURL=internal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/expandable-section/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,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AQ,CACL,CACQ,CACW,CAC9B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { KeyboardEvent, useCallback, useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { KeyCode } from '../internal/keycode';\nimport { fireNonCancelableEvent } from '../internal/events';\n\nimport { ExpandableSectionProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport { ExpandableSectionContainer } from './expandable-section-container';\nimport { ExpandableSectionHeader } from './expandable-section-header';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\ntype InternalExpandableSectionProps = ExpandableSectionProps & InternalBaseComponentProps;\n\nexport default function InternalExpandableSection({\n expanded: controlledExpanded,\n defaultExpanded,\n onChange,\n variant = 'default',\n children,\n header,\n disableContentPaddings,\n headerAriaLabel,\n __internalRootRef,\n ...props\n}: InternalExpandableSectionProps) {\n const ref = useRef<HTMLDivElement>(null);\n const controlId = useUniqueId();\n const triggerControlId = `${controlId}-trigger`;\n\n const baseProps = getBaseProps(props);\n const [expanded, setExpanded] = useControllable(controlledExpanded, onChange, defaultExpanded, {\n componentName: 'ExpandableSection',\n controlledProp: 'expanded',\n changeHandler: 'onChange',\n });\n\n const onExpandChange = useCallback(\n (expanded: boolean) => {\n setExpanded(expanded);\n fireNonCancelableEvent(onChange, { expanded });\n },\n [onChange, setExpanded]\n );\n\n const onClick = useCallback(() => {\n onExpandChange(!expanded);\n }, [onExpandChange, expanded]);\n\n const onKeyUp = useCallback(\n (event: KeyboardEvent<Element>) => {\n const interactionKeys = [KeyCode.enter, KeyCode.space];\n\n if (interactionKeys.indexOf(event.keyCode) !== -1) {\n onExpandChange(!expanded);\n }\n },\n [onExpandChange, expanded]\n );\n\n const onKeyDown = useCallback((event: KeyboardEvent<Element>) => {\n if (event.keyCode === KeyCode.space) {\n // Prevent the page from scrolling when toggling the component with the space bar.\n event.preventDefault();\n }\n }, []);\n\n const triggerProps = {\n ariaControls: controlId,\n ariaLabel: headerAriaLabel,\n ariaLabelledBy: headerAriaLabel ? undefined : triggerControlId,\n onKeyUp,\n onKeyDown,\n onClick,\n };\n\n return (\n <ExpandableSectionContainer\n {...baseProps}\n expanded={expanded}\n className={clsx(baseProps.className, styles.root)}\n variant={variant}\n disableContentPaddings={disableContentPaddings}\n header={\n <ExpandableSectionHeader\n id={triggerControlId}\n className={clsx(styles.header, styles[`header-${variant}`])}\n variant={variant}\n expanded={!!expanded}\n {...triggerProps}\n >\n {header}\n </ExpandableSectionHeader>\n }\n __internalRootRef={__internalRootRef}\n >\n <CSSTransition in={expanded} timeout={30} classNames={{ enter: styles['content-enter'] }} nodeRef={ref}>\n <div\n id={controlId}\n ref={ref}\n className={clsx(styles.content, styles[`content-${variant}`], expanded && styles['content-expanded'])}\n role=\"group\"\n aria-label={triggerProps.ariaLabel}\n aria-labelledby={triggerProps.ariaLabelledBy}\n >\n {children}\n </div>\n </CSSTransition>\n </ExpandableSectionContainer>\n );\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { RecoveryLinkProp } from '../../../select/utils/use-select';
|
|
2
3
|
import { NonCancelableEventHandler } from '../../events';
|
|
3
4
|
import { DropdownStatusProps } from './interfaces';
|
|
4
5
|
export { DropdownStatusProps };
|
|
@@ -13,11 +14,12 @@ export interface DropdownStatusPropsExtended extends DropdownStatusProps {
|
|
|
13
14
|
* to recover from the error.
|
|
14
15
|
*/
|
|
15
16
|
onRecoveryClick?: NonCancelableEventHandler;
|
|
17
|
+
recoveryProps?: RecoveryLinkProp;
|
|
16
18
|
}
|
|
17
19
|
declare function DropdownStatus({ children }: {
|
|
18
20
|
children: React.ReactNode;
|
|
19
21
|
}): JSX.Element;
|
|
20
|
-
declare type UseDropdownStatus = ({ statusType, empty, loadingText, finishedText, errorText, recoveryText, isEmpty, isNoMatch, noMatch, onRecoveryClick, }: DropdownStatusPropsExtended) => DropdownStatusResult;
|
|
22
|
+
declare type UseDropdownStatus = ({ statusType, empty, loadingText, finishedText, errorText, recoveryText, isEmpty, isNoMatch, noMatch, onRecoveryClick, recoveryProps, }: DropdownStatusPropsExtended) => DropdownStatusResult;
|
|
21
23
|
interface DropdownStatusResult {
|
|
22
24
|
isSticky: boolean;
|
|
23
25
|
content: React.ReactNode | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-status/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-status/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,OAAO,EACL,yBAAyB,EAI1B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,yBAAyB,CAAC;IAC5C,aAAa,CAAC,EAAE,gBAAgB,CAAC;CAClC;AAED,iBAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eAMlE;AAED,aAAK,iBAAiB,GAAG,CAAC,EACxB,UAAU,EACV,KAAK,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,OAAO,EACP,SAAS,EACT,OAAO,EACP,eAAe,EACf,aAAa,GACd,EAAE,2BAA2B,KAAK,oBAAoB,CAAC;AAExD,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IAChC,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,eAAO,MAAM,iBAAiB,EAAE,iBA0D/B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
1
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
4
|
import React, { useRef } from 'react';
|
|
4
5
|
import InternalLink from '../../../link/internal';
|
|
5
6
|
import InternalStatusIndicator from '../../../status-indicator/internal';
|
|
6
|
-
import { fireNonCancelableEvent } from '../../events';
|
|
7
|
+
import { fireNonCancelableEvent, fireCancelableEvent, getBlurEventRelatedTarget, } from '../../events';
|
|
7
8
|
import { usePrevious } from '../../hooks/use-previous';
|
|
8
9
|
import styles from './styles.css.js';
|
|
9
10
|
function DropdownStatus(_a) {
|
|
@@ -11,7 +12,7 @@ function DropdownStatus(_a) {
|
|
|
11
12
|
return (React.createElement("div", { className: styles.root, "aria-live": "polite" }, children));
|
|
12
13
|
}
|
|
13
14
|
export var useDropdownStatus = function (_a) {
|
|
14
|
-
var statusType = _a.statusType, empty = _a.empty, loadingText = _a.loadingText, finishedText = _a.finishedText, errorText = _a.errorText, recoveryText = _a.recoveryText, isEmpty = _a.isEmpty, isNoMatch = _a.isNoMatch, noMatch = _a.noMatch, onRecoveryClick = _a.onRecoveryClick;
|
|
15
|
+
var statusType = _a.statusType, empty = _a.empty, loadingText = _a.loadingText, finishedText = _a.finishedText, errorText = _a.errorText, recoveryText = _a.recoveryText, isEmpty = _a.isEmpty, isNoMatch = _a.isNoMatch, noMatch = _a.noMatch, onRecoveryClick = _a.onRecoveryClick, recoveryProps = _a.recoveryProps;
|
|
15
16
|
var linkRef = useRef(null);
|
|
16
17
|
var focusRecoveryLink = function () { var _a; return (_a = linkRef.current) === null || _a === void 0 ? void 0 : _a.focus(); };
|
|
17
18
|
var previousStatusType = usePrevious(statusType);
|
|
@@ -20,10 +21,12 @@ export var useDropdownStatus = function (_a) {
|
|
|
20
21
|
statusResult.content = React.createElement(InternalStatusIndicator, { type: 'loading' }, loadingText);
|
|
21
22
|
}
|
|
22
23
|
else if (statusType === 'error') {
|
|
23
|
-
statusResult.content = (React.createElement(
|
|
24
|
+
statusResult.content = (React.createElement("span", { ref: recoveryProps ? recoveryProps.ref : null, onBlur: function (event) {
|
|
25
|
+
return fireCancelableEvent(recoveryProps === null || recoveryProps === void 0 ? void 0 : recoveryProps.onBlur, { relatedTarget: getBlurEventRelatedTarget(event.nativeEvent) }, event);
|
|
26
|
+
} },
|
|
24
27
|
React.createElement(InternalStatusIndicator, { type: "error", __animate: previousStatusType !== 'error' }, errorText),
|
|
25
28
|
' ',
|
|
26
|
-
recoveryText && (React.createElement(InternalLink, { ref: linkRef, onFollow: function () { return fireNonCancelableEvent(onRecoveryClick); }, variant: "recovery", className: styles.recovery }, recoveryText))));
|
|
29
|
+
recoveryText && (React.createElement(InternalLink, __assign({}, recoveryProps, { ref: linkRef, onFollow: function () { return fireNonCancelableEvent(onRecoveryClick); }, variant: "recovery", className: styles.recovery }), recoveryText))));
|
|
27
30
|
}
|
|
28
31
|
else if (isEmpty && empty) {
|
|
29
32
|
statusResult.content = empty;
|