@cloudscape-design/components 3.0.86 → 3.0.88
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/checkbox/internal.d.ts +0 -1
- package/checkbox/internal.d.ts.map +1 -1
- package/checkbox/internal.js +9 -11
- package/checkbox/internal.js.map +1 -1
- package/date-picker/index.js +1 -1
- package/date-picker/index.js.map +1 -1
- package/date-picker/styles.css.js +7 -6
- package/date-picker/styles.scoped.css +14 -7
- package/date-picker/styles.selectors.js +7 -6
- package/date-range-picker/dropdown.d.ts.map +1 -1
- package/date-range-picker/dropdown.js +7 -10
- package/date-range-picker/dropdown.js.map +1 -1
- package/date-range-picker/index.js +1 -1
- package/date-range-picker/index.js.map +1 -1
- package/date-range-picker/styles.css.js +37 -36
- package/date-range-picker/styles.scoped.css +48 -44
- package/date-range-picker/styles.selectors.js +37 -36
- package/date-range-picker/utils.d.ts +18 -0
- package/date-range-picker/utils.d.ts.map +1 -0
- package/date-range-picker/utils.js +40 -0
- package/date-range-picker/utils.js.map +1 -0
- package/hotspot/index.d.ts.map +1 -1
- package/hotspot/index.js +2 -2
- package/hotspot/index.js.map +1 -1
- package/internal/components/abstract-switch/index.d.ts +2 -2
- package/internal/components/abstract-switch/index.d.ts.map +1 -1
- package/internal/components/abstract-switch/index.js +2 -9
- package/internal/components/abstract-switch/index.js.map +1 -1
- package/internal/components/abstract-switch/styles.css.js +12 -12
- package/internal/components/abstract-switch/styles.scoped.css +20 -19
- package/internal/components/abstract-switch/styles.selectors.js +12 -12
- package/internal/components/focus-lock/index.d.ts +2 -1
- package/internal/components/focus-lock/index.d.ts.map +1 -1
- package/internal/components/focus-lock/index.js +2 -2
- package/internal/components/focus-lock/index.js.map +1 -1
- package/internal/components/screenreader-only/index.js +1 -1
- package/internal/components/screenreader-only/index.js.map +1 -1
- package/internal/environment.js +1 -1
- package/package.json +1 -1
- package/property-filter/controller.d.ts +4 -7
- package/property-filter/controller.d.ts.map +1 -1
- package/property-filter/controller.js +3 -2
- package/property-filter/controller.js.map +1 -1
- package/property-filter/filter-options.d.ts +3 -0
- package/property-filter/filter-options.d.ts.map +1 -0
- package/property-filter/filter-options.js +31 -0
- package/property-filter/filter-options.js.map +1 -0
- package/property-filter/index.d.ts.map +1 -1
- package/property-filter/index.js +0 -5
- package/property-filter/index.js.map +1 -1
- package/property-filter/property-filter-autosuggest.d.ts.map +1 -1
- package/property-filter/property-filter-autosuggest.js +9 -7
- package/property-filter/property-filter-autosuggest.js.map +1 -1
- package/property-filter/styles.css.js +33 -32
- package/property-filter/styles.scoped.css +38 -34
- package/property-filter/styles.selectors.js +33 -32
- package/radio-group/radio-button.d.ts +3 -3
- package/radio-group/radio-button.d.ts.map +1 -1
- package/radio-group/radio-button.js +18 -6
- package/radio-group/radio-button.js.map +1 -1
- package/select/parts/trigger.d.ts.map +1 -1
- package/select/parts/trigger.js +8 -2
- package/select/parts/trigger.js.map +1 -1
- package/table/selection-control/index.js +1 -1
- package/table/selection-control/index.js.map +1 -1
- package/tiles/internal.d.ts.map +1 -1
- package/tiles/internal.js +2 -9
- package/tiles/internal.js.map +1 -1
- package/tiles/tile.d.ts +12 -0
- package/tiles/tile.d.ts.map +1 -0
- package/tiles/tile.js +27 -0
- package/tiles/tile.js.map +1 -0
- package/toggle/internal.d.ts.map +1 -1
- package/toggle/internal.js +7 -1
- package/toggle/internal.js.map +1 -1
- package/date-range-picker/embedded.d.ts +0 -7
- package/date-range-picker/embedded.d.ts.map +0 -1
- package/date-range-picker/embedded.js +0 -47
- package/date-range-picker/embedded.js.map +0 -1
- package/date-range-picker/use-date-range-picker.d.ts +0 -32
- package/date-range-picker/use-date-range-picker.d.ts.map +0 -1
- package/date-range-picker/use-date-range-picker.js +0 -58
- package/date-range-picker/use-date-range-picker.js.map +0 -1
|
@@ -90,11 +90,11 @@ 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
|
-
animation: awsui_awsui-motion-fade-in-
|
|
93
|
+
.awsui_calendar_mgja0_182lt_93:not(#\9) {
|
|
94
|
+
animation: awsui_awsui-motion-fade-in-0_mgja0_182lt_1 var(--motion-duration-show-quick-tyaalm, 135ms) var(--motion-easing-show-quick-1fcgbv, ease-out);
|
|
95
95
|
animation-fill-mode: both;
|
|
96
96
|
}
|
|
97
|
-
@keyframes awsui_awsui-motion-fade-in-
|
|
97
|
+
@keyframes awsui_awsui-motion-fade-in-0_mgja0_182lt_1 {
|
|
98
98
|
from {
|
|
99
99
|
opacity: 0;
|
|
100
100
|
}
|
|
@@ -103,12 +103,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
@media (prefers-reduced-motion: reduce) {
|
|
106
|
-
.
|
|
106
|
+
.awsui_calendar_mgja0_182lt_93:not(#\9) {
|
|
107
107
|
animation: none;
|
|
108
108
|
transition: none;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
.awsui-motion-disabled .
|
|
111
|
+
.awsui-motion-disabled .awsui_calendar_mgja0_182lt_93:not(#\9), .awsui-mode-entering .awsui_calendar_mgja0_182lt_93:not(#\9) {
|
|
112
112
|
animation: none;
|
|
113
113
|
transition: none;
|
|
114
114
|
}
|
|
@@ -117,7 +117,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
117
117
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
118
118
|
SPDX-License-Identifier: Apache-2.0
|
|
119
119
|
*/
|
|
120
|
-
.
|
|
120
|
+
.awsui_root_mgja0_182lt_120:not(#\9) {
|
|
121
121
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
122
122
|
border-collapse: separate;
|
|
123
123
|
border-spacing: 0;
|
|
@@ -155,28 +155,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
155
155
|
max-width: 32em;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
.
|
|
158
|
+
.awsui_focus-lock_mgja0_182lt_132:not(#\9) {
|
|
159
|
+
display: contents;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.awsui_trigger-wrapper_mgja0_182lt_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_182lt_140:not(#\9) {
|
|
163
167
|
display: flex;
|
|
164
168
|
}
|
|
165
169
|
|
|
166
|
-
.
|
|
170
|
+
.awsui_calendar_mgja0_182lt_93: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_182lt_93.awsui_one-grid_mgja0_182lt_148:not(#\9) {
|
|
171
175
|
width: var(--size-calendar-grid-width-lxsx0p, 238px);
|
|
172
176
|
}
|
|
173
|
-
.awsui_calendar-
|
|
177
|
+
.awsui_calendar-header_mgja0_182lt_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_182lt_157:not(#\9) {
|
|
180
184
|
position: absolute;
|
|
181
185
|
right: 0;
|
|
182
186
|
left: 0;
|
|
@@ -189,7 +193,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
189
193
|
flex: 1;
|
|
190
194
|
pointer-events: none;
|
|
191
195
|
}
|
|
192
|
-
.awsui_calendar-header-
|
|
196
|
+
.awsui_calendar-header-month_mgja0_182lt_157:not(#\9) {
|
|
193
197
|
font-size: var(--font-body-m-size-sregvd, 14px);
|
|
194
198
|
line-height: var(--font-body-m-line-height-i7xxvv, 22px);
|
|
195
199
|
font-weight: 700;
|
|
@@ -197,130 +201,130 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
197
201
|
display: flex;
|
|
198
202
|
pointer-events: auto;
|
|
199
203
|
}
|
|
200
|
-
.awsui_calendar-next-month-
|
|
204
|
+
.awsui_calendar-next-month-btn_mgja0_182lt_178:not(#\9) {
|
|
201
205
|
/* used for identifying element */
|
|
202
206
|
}
|
|
203
|
-
.awsui_calendar-prev-month-
|
|
207
|
+
.awsui_calendar-prev-month-btn_mgja0_182lt_181:not(#\9) {
|
|
204
208
|
/* used for identifying element */
|
|
205
209
|
}
|
|
206
210
|
|
|
207
|
-
.awsui_first-
|
|
208
|
-
.awsui_second-
|
|
211
|
+
.awsui_first-grid_mgja0_182lt_185:not(#\9),
|
|
212
|
+
.awsui_second-grid_mgja0_182lt_186:not(#\9) {
|
|
209
213
|
/* used in test-utils */
|
|
210
214
|
}
|
|
211
215
|
|
|
212
|
-
.awsui_date-and-time-
|
|
216
|
+
.awsui_date-and-time-container_mgja0_182lt_190:not(#\9) {
|
|
213
217
|
display: grid;
|
|
214
218
|
grid-template-columns: repeat(auto-fit, minmax(var(--size-calendar-grid-width-lxsx0p, 238px), 1fr));
|
|
215
219
|
gap: var(--space-xs-rsr2qu, 8px);
|
|
216
220
|
}
|
|
217
221
|
|
|
218
|
-
.awsui_date-and-time-
|
|
222
|
+
.awsui_date-and-time-wrapper_mgja0_182lt_196:not(#\9) {
|
|
219
223
|
width: var(--size-calendar-grid-width-lxsx0p, 238px);
|
|
220
224
|
display: grid;
|
|
221
225
|
gap: var(--space-xs-rsr2qu, 8px);
|
|
222
226
|
grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
|
|
223
227
|
}
|
|
224
228
|
|
|
225
|
-
.
|
|
229
|
+
.awsui_footer_mgja0_182lt_203:not(#\9) {
|
|
226
230
|
display: flex;
|
|
227
231
|
flex-wrap: wrap;
|
|
228
232
|
justify-content: flex-end;
|
|
229
233
|
border-top: 1px solid var(--color-border-dropdown-item-default-faosd8, #e9ebed);
|
|
230
234
|
padding: 0 var(--space-l-4vl6xu, 20px) var(--space-s-hv8c1d, 12px);
|
|
231
235
|
}
|
|
232
|
-
.
|
|
236
|
+
.awsui_footer_mgja0_182lt_203.awsui_has-clear-button_mgja0_182lt_210:not(#\9) {
|
|
233
237
|
justify-content: space-between;
|
|
234
238
|
}
|
|
235
|
-
.
|
|
239
|
+
.awsui_footer_mgja0_182lt_203.awsui_one-grid_mgja0_182lt_148:not(#\9) {
|
|
236
240
|
padding: 0 var(--space-xs-rsr2qu, 8px) var(--space-s-hv8c1d, 12px);
|
|
237
241
|
}
|
|
238
242
|
|
|
239
|
-
.awsui_footer-button-
|
|
243
|
+
.awsui_footer-button-wrapper_mgja0_182lt_217:not(#\9) {
|
|
240
244
|
padding-top: var(--space-s-hv8c1d, 12px);
|
|
241
245
|
}
|
|
242
246
|
|
|
243
|
-
.awsui_icon-
|
|
247
|
+
.awsui_icon-wrapper_mgja0_182lt_221:not(#\9) {
|
|
244
248
|
color: var(--color-text-interactive-default-eg5fsa, #414d5c);
|
|
245
249
|
margin-right: var(--space-xs-rsr2qu, 8px);
|
|
246
250
|
}
|
|
247
251
|
|
|
248
|
-
.
|
|
252
|
+
.awsui_label_mgja0_182lt_226:not(#\9) {
|
|
249
253
|
-webkit-user-select: text;
|
|
250
254
|
user-select: text;
|
|
251
255
|
cursor: default;
|
|
252
256
|
}
|
|
253
257
|
|
|
254
|
-
.
|
|
258
|
+
.awsui_label_mgja0_182lt_226.awsui_label-enabled_mgja0_182lt_231:not(#\9):hover > .awsui_trigger-flexbox_mgja0_182lt_140 > .awsui_icon-wrapper_mgja0_182lt_221 {
|
|
255
259
|
color: var(--color-text-interactive-hover-v3lasm, #000716);
|
|
256
260
|
}
|
|
257
261
|
|
|
258
|
-
.awsui_label-
|
|
262
|
+
.awsui_label-text_mgja0_182lt_235:not(#\9) {
|
|
259
263
|
color: var(--color-text-input-placeholder-j53j3c, #5f6b7a);
|
|
260
264
|
font-style: italic;
|
|
261
265
|
}
|
|
262
266
|
|
|
263
|
-
.awsui_label-token-
|
|
267
|
+
.awsui_label-token-nowrap_mgja0_182lt_240:not(#\9) {
|
|
264
268
|
white-space: nowrap;
|
|
265
269
|
}
|
|
266
270
|
|
|
267
|
-
.awsui_mode-
|
|
271
|
+
.awsui_mode-switch_mgja0_182lt_244:not(#\9) {
|
|
268
272
|
/* used in test-utils */
|
|
269
273
|
}
|
|
270
274
|
|
|
271
|
-
.
|
|
275
|
+
.awsui_dropdown_mgja0_182lt_248:not(#\9) {
|
|
272
276
|
overflow: auto;
|
|
273
277
|
border-top: 1px solid var(--color-border-container-top-srcvx4, transparent);
|
|
274
278
|
border-bottom: 1px solid var(--color-border-container-top-srcvx4, transparent);
|
|
275
279
|
border-radius: var(--border-radius-dropdown-ujknaf, 8px);
|
|
276
280
|
}
|
|
277
|
-
.
|
|
281
|
+
.awsui_dropdown_mgja0_182lt_248:not(#\9):focus {
|
|
278
282
|
outline: none;
|
|
279
283
|
}
|
|
280
|
-
.
|
|
284
|
+
.awsui_dropdown_mgja0_182lt_248[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
281
285
|
outline: 2px dotted transparent;
|
|
282
286
|
outline-offset: 2px;
|
|
283
287
|
border-radius: var(--border-radius-dropdown-ujknaf, 8px);
|
|
284
288
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
285
289
|
}
|
|
286
290
|
|
|
287
|
-
.awsui_dropdown-
|
|
291
|
+
.awsui_dropdown-content_mgja0_182lt_264:not(#\9) {
|
|
288
292
|
-webkit-user-select: text;
|
|
289
293
|
user-select: text;
|
|
290
294
|
background-color: var(--color-background-container-content-i8i4a0, #ffffff);
|
|
291
295
|
width: calc(2 * var(--size-calendar-grid-width-lxsx0p, 238px) + var(--space-xs-rsr2qu, 8px) + 2 * var(--space-l-4vl6xu, 20px));
|
|
292
296
|
}
|
|
293
|
-
.awsui_dropdown-
|
|
297
|
+
.awsui_dropdown-content_mgja0_182lt_264.awsui_one-grid_mgja0_182lt_148:not(#\9) {
|
|
294
298
|
width: calc(var(--size-calendar-grid-width-lxsx0p, 238px) + 2 * var(--space-l-4vl6xu, 20px));
|
|
295
299
|
}
|
|
296
300
|
|
|
297
|
-
.awsui_start-date-
|
|
298
|
-
.awsui_start-time-
|
|
299
|
-
.awsui_end-date-
|
|
300
|
-
.awsui_end-time-
|
|
301
|
+
.awsui_start-date-input_mgja0_182lt_273:not(#\9),
|
|
302
|
+
.awsui_start-time-input_mgja0_182lt_274:not(#\9),
|
|
303
|
+
.awsui_end-date-input_mgja0_182lt_275:not(#\9),
|
|
304
|
+
.awsui_end-time-input_mgja0_182lt_276:not(#\9) {
|
|
301
305
|
/* used in test-utils */
|
|
302
306
|
}
|
|
303
307
|
|
|
304
|
-
.awsui_validation-
|
|
308
|
+
.awsui_validation-section_mgja0_182lt_280:not(#\9) {
|
|
305
309
|
/* used in test-utils */
|
|
306
310
|
}
|
|
307
311
|
|
|
308
|
-
.awsui_validation-
|
|
312
|
+
.awsui_validation-error_mgja0_182lt_284:not(#\9) {
|
|
309
313
|
/* used in test-utils */
|
|
310
314
|
}
|
|
311
315
|
|
|
312
|
-
.awsui_clear-
|
|
316
|
+
.awsui_clear-button_mgja0_182lt_288:not(#\9) {
|
|
313
317
|
/* used in test-utils */
|
|
314
318
|
}
|
|
315
319
|
|
|
316
|
-
.awsui_apply-
|
|
320
|
+
.awsui_apply-button_mgja0_182lt_292:not(#\9) {
|
|
317
321
|
/* used in test-utils */
|
|
318
322
|
}
|
|
319
323
|
|
|
320
|
-
.awsui_cancel-
|
|
324
|
+
.awsui_cancel-button_mgja0_182lt_296:not(#\9) {
|
|
321
325
|
/* used in test-utils */
|
|
322
326
|
}
|
|
323
327
|
|
|
324
|
-
.awsui_calendar-aria-
|
|
328
|
+
.awsui_calendar-aria-live_mgja0_182lt_300:not(#\9) {
|
|
325
329
|
/* used in test-utils */
|
|
326
330
|
}
|
|
@@ -2,41 +2,42 @@
|
|
|
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
|
-
"
|
|
9
|
-
"trigger-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"calendar-header
|
|
13
|
-
"calendar-header-
|
|
14
|
-
"calendar-
|
|
15
|
-
"calendar-
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"date-and-time-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"label
|
|
26
|
-
"label-
|
|
27
|
-
"label-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"dropdown
|
|
31
|
-
"
|
|
32
|
-
"start-
|
|
33
|
-
"
|
|
34
|
-
"end-
|
|
35
|
-
"
|
|
36
|
-
"validation-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
5
|
+
"calendar": "awsui_calendar_mgja0_182lt_93",
|
|
6
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_mgja0_182lt_1",
|
|
7
|
+
"root": "awsui_root_mgja0_182lt_120",
|
|
8
|
+
"focus-lock": "awsui_focus-lock_mgja0_182lt_132",
|
|
9
|
+
"trigger-wrapper": "awsui_trigger-wrapper_mgja0_182lt_136",
|
|
10
|
+
"trigger-flexbox": "awsui_trigger-flexbox_mgja0_182lt_140",
|
|
11
|
+
"one-grid": "awsui_one-grid_mgja0_182lt_148",
|
|
12
|
+
"calendar-header": "awsui_calendar-header_mgja0_182lt_151",
|
|
13
|
+
"calendar-header-months-wrapper": "awsui_calendar-header-months-wrapper_mgja0_182lt_157",
|
|
14
|
+
"calendar-header-month": "awsui_calendar-header-month_mgja0_182lt_157",
|
|
15
|
+
"calendar-next-month-btn": "awsui_calendar-next-month-btn_mgja0_182lt_178",
|
|
16
|
+
"calendar-prev-month-btn": "awsui_calendar-prev-month-btn_mgja0_182lt_181",
|
|
17
|
+
"first-grid": "awsui_first-grid_mgja0_182lt_185",
|
|
18
|
+
"second-grid": "awsui_second-grid_mgja0_182lt_186",
|
|
19
|
+
"date-and-time-container": "awsui_date-and-time-container_mgja0_182lt_190",
|
|
20
|
+
"date-and-time-wrapper": "awsui_date-and-time-wrapper_mgja0_182lt_196",
|
|
21
|
+
"footer": "awsui_footer_mgja0_182lt_203",
|
|
22
|
+
"has-clear-button": "awsui_has-clear-button_mgja0_182lt_210",
|
|
23
|
+
"footer-button-wrapper": "awsui_footer-button-wrapper_mgja0_182lt_217",
|
|
24
|
+
"icon-wrapper": "awsui_icon-wrapper_mgja0_182lt_221",
|
|
25
|
+
"label": "awsui_label_mgja0_182lt_226",
|
|
26
|
+
"label-enabled": "awsui_label-enabled_mgja0_182lt_231",
|
|
27
|
+
"label-text": "awsui_label-text_mgja0_182lt_235",
|
|
28
|
+
"label-token-nowrap": "awsui_label-token-nowrap_mgja0_182lt_240",
|
|
29
|
+
"mode-switch": "awsui_mode-switch_mgja0_182lt_244",
|
|
30
|
+
"dropdown": "awsui_dropdown_mgja0_182lt_248",
|
|
31
|
+
"dropdown-content": "awsui_dropdown-content_mgja0_182lt_264",
|
|
32
|
+
"start-date-input": "awsui_start-date-input_mgja0_182lt_273",
|
|
33
|
+
"start-time-input": "awsui_start-time-input_mgja0_182lt_274",
|
|
34
|
+
"end-date-input": "awsui_end-date-input_mgja0_182lt_275",
|
|
35
|
+
"end-time-input": "awsui_end-time-input_mgja0_182lt_276",
|
|
36
|
+
"validation-section": "awsui_validation-section_mgja0_182lt_280",
|
|
37
|
+
"validation-error": "awsui_validation-error_mgja0_182lt_284",
|
|
38
|
+
"clear-button": "awsui_clear-button_mgja0_182lt_288",
|
|
39
|
+
"apply-button": "awsui_apply-button_mgja0_182lt_292",
|
|
40
|
+
"cancel-button": "awsui_cancel-button_mgja0_182lt_296",
|
|
41
|
+
"calendar-aria-live": "awsui_calendar-aria-live_mgja0_182lt_300"
|
|
41
42
|
};
|
|
42
43
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DateRangePickerProps } from './interfaces';
|
|
2
|
+
/**
|
|
3
|
+
* This function fills in a start and end time if they are missing.
|
|
4
|
+
*/
|
|
5
|
+
export declare function fillMissingTime(value: DateRangePickerProps.AbsoluteValue | null): {
|
|
6
|
+
startDate: string;
|
|
7
|
+
endDate: string;
|
|
8
|
+
type: "absolute";
|
|
9
|
+
} | null;
|
|
10
|
+
export declare function formatValue(value: null | DateRangePickerProps.Value, { timeOffset, dateOnly }: {
|
|
11
|
+
timeOffset: {
|
|
12
|
+
startDate?: number;
|
|
13
|
+
endDate?: number;
|
|
14
|
+
};
|
|
15
|
+
dateOnly: boolean;
|
|
16
|
+
}): null | DateRangePickerProps.Value;
|
|
17
|
+
export declare function getDefaultMode(value: null | DateRangePickerProps.Value, relativeOptions: readonly DateRangePickerProps.RelativeOption[], rangeSelectorMode: DateRangePickerProps.RangeSelectorMode): "absolute" | "relative";
|
|
18
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/date-range-picker/utils.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGpD;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,CAAC,aAAa,GAAG,IAAI;;;;SAW/E;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,IAAI,GAAG,oBAAoB,CAAC,KAAK,EACxC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE;IAAE,UAAU,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,GACpG,IAAI,GAAG,oBAAoB,CAAC,KAAK,CAYnC;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,IAAI,GAAG,oBAAoB,CAAC,KAAK,EACxC,eAAe,EAAE,SAAS,oBAAoB,CAAC,cAAc,EAAE,EAC/D,iBAAiB,EAAE,oBAAoB,CAAC,iBAAiB,2BAY1D"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { setTimeOffset } from './time-offset';
|
|
3
|
+
/**
|
|
4
|
+
* This function fills in a start and end time if they are missing.
|
|
5
|
+
*/
|
|
6
|
+
export function fillMissingTime(value) {
|
|
7
|
+
if (!value) {
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
var _a = value.startDate.split('T'), startDate = _a[0], startTime = _a[1];
|
|
11
|
+
var _b = value.endDate.split('T'), endDate = _b[0], endTime = _b[1];
|
|
12
|
+
return __assign(__assign({}, value), { startDate: startTime ? value.startDate : "".concat(startDate, "T00:00:00"), endDate: endTime ? value.endDate : "".concat(endDate, "T23:59:59") });
|
|
13
|
+
}
|
|
14
|
+
export function formatValue(value, _a) {
|
|
15
|
+
var timeOffset = _a.timeOffset, dateOnly = _a.dateOnly;
|
|
16
|
+
if (!value || value.type === 'relative') {
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
if (dateOnly) {
|
|
20
|
+
return {
|
|
21
|
+
type: 'absolute',
|
|
22
|
+
startDate: value.startDate.split('T')[0],
|
|
23
|
+
endDate: value.endDate.split('T')[0]
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return setTimeOffset(value, timeOffset);
|
|
27
|
+
}
|
|
28
|
+
export function getDefaultMode(value, relativeOptions, rangeSelectorMode) {
|
|
29
|
+
if (value && value.type) {
|
|
30
|
+
return value.type;
|
|
31
|
+
}
|
|
32
|
+
if (rangeSelectorMode === 'relative-only') {
|
|
33
|
+
return 'relative';
|
|
34
|
+
}
|
|
35
|
+
if (rangeSelectorMode === 'absolute-only') {
|
|
36
|
+
return 'absolute';
|
|
37
|
+
}
|
|
38
|
+
return relativeOptions.length > 0 ? 'relative' : 'absolute';
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/date-range-picker/utils.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAgD;IAC9E,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,KAAK,CAAC;KACd;IACK,IAAA,KAAyB,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,EAAlD,SAAS,QAAA,EAAE,SAAS,QAA8B,CAAC;IACpD,IAAA,KAAqB,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAA5C,OAAO,QAAA,EAAE,OAAO,QAA4B,CAAC;IACpD,6BACK,KAAK,KACR,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,UAAG,SAAS,cAAW,EAChE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,UAAG,OAAO,cAAW,IACxD;AACJ,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,KAAwC,EACxC,EAAqG;QAAnG,UAAU,gBAAA,EAAE,QAAQ,cAAA;IAEtB,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE;QACvC,OAAO,KAAK,CAAC;KACd;IACD,IAAI,QAAQ,EAAE;QACZ,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACxC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACrC,CAAC;KACH;IACD,OAAO,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,KAAwC,EACxC,eAA+D,EAC/D,iBAAyD;IAEzD,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE;QACvB,OAAO,KAAK,CAAC,IAAI,CAAC;KACnB;IACD,IAAI,iBAAiB,KAAK,eAAe,EAAE;QACzC,OAAO,UAAU,CAAC;KACnB;IACD,IAAI,iBAAiB,KAAK,eAAe,EAAE;QACzC,OAAO,UAAU,CAAC;KACnB;IACD,OAAO,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC;AAC9D,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { DateRangePickerProps } from './interfaces';\nimport { setTimeOffset } from './time-offset';\n\n/**\n * This function fills in a start and end time if they are missing.\n */\nexport function fillMissingTime(value: DateRangePickerProps.AbsoluteValue | null) {\n if (!value) {\n return value;\n }\n const [startDate, startTime] = value.startDate.split('T');\n const [endDate, endTime] = value.endDate.split('T');\n return {\n ...value,\n startDate: startTime ? value.startDate : `${startDate}T00:00:00`,\n endDate: endTime ? value.endDate : `${endDate}T23:59:59`,\n };\n}\n\nexport function formatValue(\n value: null | DateRangePickerProps.Value,\n { timeOffset, dateOnly }: { timeOffset: { startDate?: number; endDate?: number }; dateOnly: boolean }\n): null | DateRangePickerProps.Value {\n if (!value || value.type === 'relative') {\n return value;\n }\n if (dateOnly) {\n return {\n type: 'absolute',\n startDate: value.startDate.split('T')[0],\n endDate: value.endDate.split('T')[0],\n };\n }\n return setTimeOffset(value, timeOffset);\n}\n\nexport function getDefaultMode(\n value: null | DateRangePickerProps.Value,\n relativeOptions: readonly DateRangePickerProps.RelativeOption[],\n rangeSelectorMode: DateRangePickerProps.RangeSelectorMode\n) {\n if (value && value.type) {\n return value.type;\n }\n if (rangeSelectorMode === 'relative-only') {\n return 'relative';\n }\n if (rangeSelectorMode === 'absolute-only') {\n return 'absolute';\n }\n return relativeOptions.length > 0 ? 'relative' : 'absolute';\n}\n"]}
|
package/hotspot/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hotspot/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQ5C,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,IAAc,EACd,SAAiB,EACjB,GAAG,SAAS,EACb,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hotspot/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQ5C,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,IAAc,EACd,SAAiB,EACjB,GAAG,SAAS,EACb,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAqC5B"}
|
package/hotspot/index.js
CHANGED
|
@@ -22,9 +22,9 @@ export default function Hotspot(_a) {
|
|
|
22
22
|
if (children) {
|
|
23
23
|
return (React.createElement("div", __assign({}, baseProps, { className: clsx(baseProps.className, styles.root, styles.wrapper), ref: __internalRootRef }),
|
|
24
24
|
React.createElement("div", { className: styles.elementWrapper }, children),
|
|
25
|
-
React.createElement("div", { className: clsx(styles.markerWrapper, styles["placement-".concat(side)]) }, content)));
|
|
25
|
+
React.createElement("div", { className: clsx(styles.markerWrapper, styles["placement-".concat(side)]), onClick: function (e) { return e.stopPropagation(); } }, content)));
|
|
26
26
|
}
|
|
27
|
-
return (React.createElement("span", __assign({}, baseProps, { className: clsx(baseProps.className, styles.root, styles.inlineWrapper), ref: __internalRootRef }), content));
|
|
27
|
+
return (React.createElement("span", __assign({}, baseProps, { className: clsx(baseProps.className, styles.root, styles.inlineWrapper), ref: __internalRootRef, onClick: function (e) { return e.stopPropagation(); } }), content));
|
|
28
28
|
}
|
|
29
29
|
applyDisplayName(Hotspot, 'Hotspot');
|
|
30
30
|
//# sourceMappingURL=index.js.map
|
package/hotspot/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hotspot/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AAIpE,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAMjB;IALb,IAAA,QAAQ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,SAAS,EAAE,MAAM,CAAC,cAAc,IAAG,QAAQ,CAAO;YACvD,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,oBAAa,IAAI,CAAE,CAAC,CAAC,EAAE,OAAO,EAAE,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,eAAe,EAAE,EAAnB,CAAmB,IACvG,OAAO,CACJ,CACF,CACP,CAAC;KACH;IAED,OAAO,CACL,yCACM,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,EACvE,GAAG,EAAE,iBAAiB,EACtB,OAAO,EAAE,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,eAAe,EAAE,EAAnB,CAAmB,KAEhC,OAAO,CACH,CACR,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useEffect } from 'react';\n\nimport { HotspotProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { hotspotContext as hotspotContextType } from '../annotation-context/context';\nimport clsx from 'clsx';\nimport { getBaseProps } from '../internal/base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport useBaseComponent from '../internal/hooks/use-base-component';\n\nexport { HotspotProps };\n\nexport default function Hotspot({\n children,\n hotspotId,\n side = 'right',\n direction = 'top',\n ...restProps\n}: HotspotProps): JSX.Element {\n const { __internalRootRef } = useBaseComponent('Hotspot');\n const baseProps = getBaseProps(restProps);\n\n const hotspotContext = useContext(hotspotContextType);\n\n const content = hotspotContext.getContentForId(hotspotId, direction);\n\n const { unregisterHotspot, registerHotspot } = hotspotContext;\n\n useEffect(() => {\n registerHotspot(hotspotId);\n\n return () => unregisterHotspot(hotspotId);\n }, [hotspotId, unregisterHotspot, registerHotspot]);\n\n if (children) {\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root, styles.wrapper)} ref={__internalRootRef}>\n <div className={styles.elementWrapper}>{children}</div>\n <div className={clsx(styles.markerWrapper, styles[`placement-${side}`])} onClick={e => e.stopPropagation()}>\n {content}\n </div>\n </div>\n );\n }\n\n return (\n <span\n {...baseProps}\n className={clsx(baseProps.className, styles.root, styles.inlineWrapper)}\n ref={__internalRootRef}\n onClick={e => e.stopPropagation()}\n >\n {content}\n </span>\n );\n}\n\napplyDisplayName(Hotspot, 'Hotspot');\n"]}
|
|
@@ -13,7 +13,7 @@ export interface AbstractSwitchProps extends React.HTMLAttributes<HTMLElement>,
|
|
|
13
13
|
ariaLabel?: string;
|
|
14
14
|
ariaLabelledby?: string;
|
|
15
15
|
ariaDescribedby?: string;
|
|
16
|
-
|
|
16
|
+
onClick: () => void;
|
|
17
17
|
}
|
|
18
|
-
export default function AbstractSwitch({ controlId, controlClassName, outlineClassName, disabled, nativeControl, styledControl, label, description, descriptionBottomPadding, ariaLabel, ariaLabelledby, ariaDescribedby,
|
|
18
|
+
export default function AbstractSwitch({ controlId, controlClassName, outlineClassName, disabled, nativeControl, styledControl, label, description, descriptionBottomPadding, ariaLabel, ariaLabelledby, ariaDescribedby, onClick, __internalRootRef, ...rest }: AbstractSwitchProps): JSX.Element;
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/abstract-switch/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAErF,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,0BAA0B;IACxG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAA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AAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAMD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,aAAa,EACb,aAAa,EACb,KAAK,EACL,WAAW,EACX,wBAAwB,EACxB,SAAS,EACT,cAAc,EACd,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,GAAG,IAAI,EACR,EAAE,mBAAmB,eAiErB"}
|
|
@@ -11,19 +11,12 @@ function joinString(values) {
|
|
|
11
11
|
}
|
|
12
12
|
export default function AbstractSwitch(_a) {
|
|
13
13
|
var _b, _c;
|
|
14
|
-
var controlId = _a.controlId, controlClassName = _a.controlClassName, outlineClassName = _a.outlineClassName, disabled = _a.disabled, nativeControl = _a.nativeControl, styledControl = _a.styledControl, label = _a.label, description = _a.description, descriptionBottomPadding = _a.descriptionBottomPadding, ariaLabel = _a.ariaLabel, ariaLabelledby = _a.ariaLabelledby, ariaDescribedby = _a.ariaDescribedby,
|
|
14
|
+
var controlId = _a.controlId, controlClassName = _a.controlClassName, outlineClassName = _a.outlineClassName, disabled = _a.disabled, nativeControl = _a.nativeControl, styledControl = _a.styledControl, label = _a.label, description = _a.description, descriptionBottomPadding = _a.descriptionBottomPadding, ariaLabel = _a.ariaLabel, ariaLabelledby = _a.ariaLabelledby, ariaDescribedby = _a.ariaDescribedby, onClick = _a.onClick, __internalRootRef = _a.__internalRootRef, rest = __rest(_a, ["controlId", "controlClassName", "outlineClassName", "disabled", "nativeControl", "styledControl", "label", "description", "descriptionBottomPadding", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "onClick", "__internalRootRef"]);
|
|
15
15
|
var uniqueId = useUniqueId();
|
|
16
16
|
var id = controlId || uniqueId;
|
|
17
17
|
var focusVisible = useFocusVisible();
|
|
18
|
-
var wrapperId = "".concat(id, "-wrapper");
|
|
19
18
|
var labelId = "".concat(id, "-label");
|
|
20
19
|
var descriptionId = "".concat(id, "-description");
|
|
21
|
-
var WrapperElement = withoutLabel ? 'div' : 'label';
|
|
22
|
-
var wrapperAttributes = {};
|
|
23
|
-
if (!withoutLabel) {
|
|
24
|
-
wrapperAttributes.id = wrapperId;
|
|
25
|
-
wrapperAttributes.htmlFor = id;
|
|
26
|
-
}
|
|
27
20
|
var ariaLabelledByIds = [];
|
|
28
21
|
if (label) {
|
|
29
22
|
ariaLabelledByIds.push(labelId);
|
|
@@ -39,7 +32,7 @@ export default function AbstractSwitch(_a) {
|
|
|
39
32
|
ariaDescriptons.push(descriptionId);
|
|
40
33
|
}
|
|
41
34
|
return (React.createElement("div", __assign({}, rest, { className: clsx(styles.wrapper, rest.className), ref: __internalRootRef }),
|
|
42
|
-
React.createElement(
|
|
35
|
+
React.createElement("div", { className: styles['label-wrapper'], "aria-disabled": disabled ? 'true' : undefined, onClick: disabled ? undefined : onClick },
|
|
43
36
|
React.createElement("span", { className: clsx(styles.control, controlClassName) },
|
|
44
37
|
styledControl,
|
|
45
38
|
nativeControl(__assign(__assign({}, focusVisible), { id: id, disabled: disabled, className: styles['native-input'], 'aria-describedby': ariaDescriptons.length ? joinString(ariaDescriptons) : undefined, 'aria-labelledby': ariaLabelledByIds.length ? joinString(ariaLabelledByIds) : undefined, 'aria-label': ariaLabel })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/abstract-switch/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAmBxD,SAAS,UAAU,CAAC,MAA8B;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,UAAC,KAAK,IAAsB,OAAA,CAAC,CAAC,KAAK,EAAP,CAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAgBjB;;IAfpB,IAAA,SAAS,eAAA,EACT,gBAAgB,sBAAA,EAChB,gBAAgB,sBAAA,EAChB,QAAQ,cAAA,EACR,aAAa,mBAAA,EACb,aAAa,mBAAA,EACb,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,wBAAwB,8BAAA,EACxB,SAAS,eAAA,EACT,cAAc,oBAAA,EACd,eAAe,qBAAA,EACf,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/abstract-switch/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAmBxD,SAAS,UAAU,CAAC,MAA8B;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,UAAC,KAAK,IAAsB,OAAA,CAAC,CAAC,KAAK,EAAP,CAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAgBjB;;IAfpB,IAAA,SAAS,eAAA,EACT,gBAAgB,sBAAA,EAChB,gBAAgB,sBAAA,EAChB,QAAQ,cAAA,EACR,aAAa,mBAAA,EACb,aAAa,mBAAA,EACb,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,wBAAwB,8BAAA,EACxB,SAAS,eAAA,EACT,cAAc,oBAAA,EACd,eAAe,qBAAA,EACf,OAAO,aAAA,EACP,iBAAiB,uBAAA,EACd,IAAI,cAf8B,y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AAC,CAAC,CAAC,SAAS,EACpF,iBAAiB,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,EACvF,YAAY,EAAE,SAAS,IACvB;gBACF,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,gBAAgB,CAAC,GAAI,CACtD;YACP,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI,CAAC,WAAW,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC;gBACrF,KAAK,IAAI,CACR,8BAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,YAAI,GAAC,MAAM,CAAC,gBAAgB,CAAC,IAAG,QAAQ,MAAG,IACvF,KAAK,CACD,CACR;gBACA,WAAW,IAAI,CACd,8BACE,EAAE,EAAE,aAAa,EACjB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW;wBAChC,GAAC,MAAM,CAAC,sBAAsB,CAAC,IAAG,QAAQ;wBAC1C,GAAC,MAAM,CAAC,4BAA4B,CAAC,IAAG,wBAAwB;4BAChE,IAED,WAAW,CACP,CACR,CACI,CACH,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport useFocusVisible from '../../hooks/focus-visible';\nimport { useUniqueId } from '../../hooks/use-unique-id';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component/index.js';\n\nexport interface AbstractSwitchProps extends React.HTMLAttributes<HTMLElement>, InternalBaseComponentProps {\n controlId?: string;\n controlClassName: string;\n outlineClassName: string;\n disabled?: boolean;\n nativeControl: (props: React.InputHTMLAttributes<HTMLInputElement>) => React.ReactElement;\n styledControl: React.ReactElement;\n label?: React.ReactNode;\n description?: React.ReactNode;\n descriptionBottomPadding?: boolean;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n onClick: () => void;\n}\n\nfunction joinString(values: (string | undefined)[]) {\n return values.filter((value): value is string => !!value).join(' ');\n}\n\nexport default function AbstractSwitch({\n controlId,\n controlClassName,\n outlineClassName,\n disabled,\n nativeControl,\n styledControl,\n label,\n description,\n descriptionBottomPadding,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n onClick,\n __internalRootRef,\n ...rest\n}: AbstractSwitchProps) {\n const uniqueId = useUniqueId();\n const id = controlId || uniqueId;\n\n const focusVisible = useFocusVisible();\n const labelId = `${id}-label`;\n const descriptionId = `${id}-description`;\n\n const ariaLabelledByIds = [];\n if (label) {\n ariaLabelledByIds.push(labelId);\n }\n if (ariaLabelledby) {\n ariaLabelledByIds.push(ariaLabelledby);\n }\n\n const ariaDescriptons = [];\n if (ariaDescribedby) {\n ariaDescriptons.push(ariaDescribedby);\n }\n if (description) {\n ariaDescriptons.push(descriptionId);\n }\n\n return (\n <div {...rest} className={clsx(styles.wrapper, rest.className)} ref={__internalRootRef}>\n <div\n className={styles['label-wrapper']}\n aria-disabled={disabled ? 'true' : undefined}\n onClick={disabled ? undefined : onClick}\n >\n <span className={clsx(styles.control, controlClassName)}>\n {styledControl}\n {nativeControl({\n ...focusVisible,\n id,\n disabled,\n className: styles['native-input'],\n 'aria-describedby': ariaDescriptons.length ? joinString(ariaDescriptons) : undefined,\n 'aria-labelledby': ariaLabelledByIds.length ? joinString(ariaLabelledByIds) : undefined,\n 'aria-label': ariaLabel,\n })}\n <span className={clsx(styles.outline, outlineClassName)} />\n </span>\n <span className={clsx(styles.content, !label && !description && styles['empty-content'])}>\n {label && (\n <span id={labelId} className={clsx(styles.label, { [styles['label-disabled']]: disabled })}>\n {label}\n </span>\n )}\n {description && (\n <span\n id={descriptionId}\n className={clsx(styles.description, {\n [styles['description-disabled']]: disabled,\n [styles['description-bottom-padding']]: descriptionBottomPadding,\n })}\n >\n {description}\n </span>\n )}\n </span>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"content": "
|
|
5
|
-
"description": "
|
|
6
|
-
"label": "
|
|
7
|
-
"outline": "
|
|
8
|
-
"native-input": "awsui_native-
|
|
9
|
-
"wrapper": "
|
|
10
|
-
"label-wrapper": "awsui_label-
|
|
11
|
-
"empty-content": "awsui_empty-
|
|
12
|
-
"description-bottom-padding": "awsui_description-bottom-
|
|
13
|
-
"label-disabled": "awsui_label-
|
|
14
|
-
"description-disabled": "awsui_description-
|
|
15
|
-
"control": "
|
|
4
|
+
"content": "awsui_content_1wepg_3hhd4_93",
|
|
5
|
+
"description": "awsui_description_1wepg_3hhd4_94",
|
|
6
|
+
"label": "awsui_label_1wepg_3hhd4_95",
|
|
7
|
+
"outline": "awsui_outline_1wepg_3hhd4_99",
|
|
8
|
+
"native-input": "awsui_native-input_1wepg_3hhd4_103",
|
|
9
|
+
"wrapper": "awsui_wrapper_1wepg_3hhd4_110",
|
|
10
|
+
"label-wrapper": "awsui_label-wrapper_1wepg_3hhd4_117",
|
|
11
|
+
"empty-content": "awsui_empty-content_1wepg_3hhd4_129",
|
|
12
|
+
"description-bottom-padding": "awsui_description-bottom-padding_1wepg_3hhd4_139",
|
|
13
|
+
"label-disabled": "awsui_label-disabled_1wepg_3hhd4_147",
|
|
14
|
+
"description-disabled": "awsui_description-disabled_1wepg_3hhd4_148",
|
|
15
|
+
"control": "awsui_control_1wepg_3hhd4_153"
|
|
16
16
|
};
|
|
17
17
|
|