@cloudscape-design/components 3.0.670 → 3.0.672
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/visual-refresh-toolbar/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/index.js +9 -2
- package/app-layout/visual-refresh-toolbar/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/interfaces.d.ts +2 -0
- package/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.js +5 -2
- package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/breadcrumb-group/index.d.ts.map +1 -1
- package/breadcrumb-group/index.js +5 -0
- package/breadcrumb-group/index.js.map +1 -1
- package/checkbox/base-checkbox.d.ts +7 -0
- package/checkbox/base-checkbox.d.ts.map +1 -1
- package/checkbox/base-checkbox.js.map +1 -1
- package/checkbox/internal.d.ts.map +1 -1
- package/checkbox/internal.js +3 -3
- package/checkbox/internal.js.map +1 -1
- package/date-picker/interfaces.d.ts +1 -1
- package/date-picker/interfaces.js.map +1 -1
- package/date-range-picker/index.d.ts.map +1 -1
- package/date-range-picker/index.js +1 -3
- package/date-range-picker/index.js.map +1 -1
- package/input/interfaces.d.ts +1 -1
- package/input/interfaces.js.map +1 -1
- package/internal/base-component/styles.scoped.css +5 -0
- package/internal/components/abstract-switch/index.d.ts +2 -1
- package/internal/components/abstract-switch/index.d.ts.map +1 -1
- package/internal/components/abstract-switch/index.js +2 -2
- package/internal/components/abstract-switch/index.js.map +1 -1
- package/internal/components/button-trigger/index.d.ts.map +1 -1
- package/internal/components/button-trigger/index.js +5 -2
- package/internal/components/button-trigger/index.js.map +1 -1
- package/internal/components/button-trigger/styles.css.js +11 -11
- package/internal/components/button-trigger/styles.scoped.css +26 -26
- package/internal/components/button-trigger/styles.selectors.js +11 -11
- package/internal/components/checkbox-icon/index.d.ts +2 -1
- package/internal/components/checkbox-icon/index.d.ts.map +1 -1
- package/internal/components/checkbox-icon/index.js +6 -2
- package/internal/components/checkbox-icon/index.js.map +1 -1
- package/internal/components/checkbox-icon/styles.css.js +9 -7
- package/internal/components/checkbox-icon/styles.scoped.css +11 -8
- package/internal/components/checkbox-icon/styles.selectors.js +9 -7
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/styles/tokens.d.ts +1 -0
- package/internal/generated/styles/tokens.js +1 -0
- package/internal/generated/theming/index.cjs +33 -0
- package/internal/generated/theming/index.cjs.d.ts +8 -0
- package/internal/generated/theming/index.d.ts +8 -0
- package/internal/generated/theming/index.js +33 -0
- package/internal/manifest.json +1 -1
- package/internal/plugins/api.d.ts +4 -0
- package/internal/plugins/api.d.ts.map +1 -1
- package/internal/plugins/api.js +3 -0
- package/internal/plugins/api.js.map +1 -1
- package/internal/plugins/controllers/breadcrumbs.d.ts +31 -0
- package/internal/plugins/controllers/breadcrumbs.d.ts.map +1 -0
- package/internal/plugins/controllers/breadcrumbs.js +70 -0
- package/internal/plugins/controllers/breadcrumbs.js.map +1 -0
- package/internal/plugins/helpers/use-global-breadcrumbs.d.ts +4 -0
- package/internal/plugins/helpers/use-global-breadcrumbs.d.ts.map +1 -0
- package/internal/plugins/helpers/use-global-breadcrumbs.js +42 -0
- package/internal/plugins/helpers/use-global-breadcrumbs.js.map +1 -0
- package/multiselect/internal.d.ts.map +1 -1
- package/multiselect/internal.js +3 -3
- package/multiselect/internal.js.map +1 -1
- package/package.json +1 -1
- package/radio-group/interfaces.d.ts +6 -0
- package/radio-group/interfaces.d.ts.map +1 -1
- package/radio-group/interfaces.js.map +1 -1
- package/radio-group/internal.d.ts.map +1 -1
- package/radio-group/internal.js +3 -3
- package/radio-group/internal.js.map +1 -1
- package/radio-group/radio-button.d.ts +1 -0
- package/radio-group/radio-button.d.ts.map +1 -1
- package/radio-group/radio-button.js +7 -3
- package/radio-group/radio-button.js.map +1 -1
- package/radio-group/styles.css.js +10 -9
- package/radio-group/styles.scoped.css +19 -15
- package/radio-group/styles.selectors.js +10 -9
- package/select/interfaces.d.ts +5 -0
- package/select/interfaces.d.ts.map +1 -1
- package/select/interfaces.js.map +1 -1
- package/select/internal.d.ts.map +1 -1
- package/select/internal.js +2 -2
- package/select/internal.js.map +1 -1
- package/select/parts/trigger.d.ts +1 -0
- package/select/parts/trigger.d.ts.map +1 -1
- package/select/parts/trigger.js +2 -2
- package/select/parts/trigger.js.map +1 -1
- package/slider/interfaces.d.ts +6 -0
- package/slider/interfaces.d.ts.map +1 -1
- package/slider/interfaces.js.map +1 -1
- package/slider/internal.d.ts +1 -1
- package/slider/internal.d.ts.map +1 -1
- package/slider/internal.js +15 -6
- package/slider/internal.js.map +1 -1
- package/slider/styles.css.js +27 -25
- package/slider/styles.scoped.css +129 -62
- package/slider/styles.selectors.js +27 -25
- package/slider/tick-marks.d.ts +1 -0
- package/slider/tick-marks.d.ts.map +1 -1
- package/slider/tick-marks.js +2 -1
- package/slider/tick-marks.js.map +1 -1
- package/slider/utils.d.ts +1 -0
- package/slider/utils.d.ts.map +1 -1
- package/slider/utils.js +1 -0
- package/slider/utils.js.map +1 -1
- package/tiles/interfaces.d.ts +6 -0
- package/tiles/interfaces.d.ts.map +1 -1
- package/tiles/interfaces.js.map +1 -1
- package/tiles/internal.d.ts.map +1 -1
- package/tiles/internal.js +3 -3
- package/tiles/internal.js.map +1 -1
- package/tiles/styles.css.js +30 -29
- package/tiles/styles.scoped.css +75 -70
- package/tiles/styles.selectors.js +30 -29
- package/tiles/tile.d.ts +1 -0
- package/tiles/tile.d.ts.map +1 -1
- package/tiles/tile.js +4 -4
- package/tiles/tile.js.map +1 -1
- package/toggle/internal.d.ts.map +1 -1
- package/toggle/internal.js +4 -2
- package/toggle/internal.js.map +1 -1
- package/toggle/styles.css.js +10 -8
- package/toggle/styles.scoped.css +23 -14
- package/toggle/styles.selectors.js +10 -8
- package/token-group/dismiss-button.d.ts +1 -0
- package/token-group/dismiss-button.d.ts.map +1 -1
- package/token-group/dismiss-button.js +7 -2
- package/token-group/dismiss-button.js.map +1 -1
- package/token-group/interfaces.d.ts +5 -0
- package/token-group/interfaces.d.ts.map +1 -1
- package/token-group/interfaces.js.map +1 -1
- package/token-group/internal.d.ts +1 -1
- package/token-group/internal.d.ts.map +1 -1
- package/token-group/internal.js +2 -2
- package/token-group/internal.js.map +1 -1
- package/token-group/styles.css.js +10 -9
- package/token-group/styles.scoped.css +33 -19
- package/token-group/styles.selectors.js +10 -9
- package/token-group/token.d.ts +2 -1
- package/token-group/token.d.ts.map +1 -1
- package/token-group/token.js +3 -3
- package/token-group/token.js.map +1 -1
- package/top-navigation/1.0-beta/interfaces.d.ts +1 -1
- package/top-navigation/1.0-beta/interfaces.js.map +1 -1
- package/top-navigation/interfaces.d.ts +1 -1
- package/top-navigation/interfaces.js.map +1 -1
package/slider/styles.scoped.css
CHANGED
|
@@ -98,7 +98,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
98
98
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
99
99
|
SPDX-License-Identifier: Apache-2.0
|
|
100
100
|
*/
|
|
101
|
-
.
|
|
101
|
+
.awsui_root_pcgz5_7y2du_101:not(#\9) {
|
|
102
102
|
border-collapse: separate;
|
|
103
103
|
border-spacing: 0;
|
|
104
104
|
box-sizing: border-box;
|
|
@@ -139,11 +139,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
139
139
|
margin-inline: calc(var(--space-m-udix3p, 16px) / 2);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
.
|
|
142
|
+
.awsui_slider_pcgz5_7y2du_141:not(#\9) {
|
|
143
143
|
display: flex;
|
|
144
144
|
align-items: center;
|
|
145
145
|
}
|
|
146
|
-
.awsui_slider-
|
|
146
|
+
.awsui_slider-track_pcgz5_7y2du_145:not(#\9), .awsui_slider-range_pcgz5_7y2du_145:not(#\9) {
|
|
147
147
|
position: absolute;
|
|
148
148
|
border-start-start-radius: 3px;
|
|
149
149
|
border-start-end-radius: 3px;
|
|
@@ -152,63 +152,75 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
152
152
|
margin-block-start: var(--space-xs-zb16t3, 8px);
|
|
153
153
|
margin-inline: calc(var(--space-m-udix3p, 16px) / -2);
|
|
154
154
|
}
|
|
155
|
-
.awsui_slider-
|
|
155
|
+
.awsui_slider-track_pcgz5_7y2du_145.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_slider-track_pcgz5_7y2du_145.awsui_disabled_pcgz5_7y2du_154, .awsui_slider-range_pcgz5_7y2du_145.awsui_disabled_pcgz5_7y2du_154), .awsui_slider-range_pcgz5_7y2du_145.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_slider-track_pcgz5_7y2du_145.awsui_disabled_pcgz5_7y2du_154, .awsui_slider-range_pcgz5_7y2du_145.awsui_disabled_pcgz5_7y2du_154) {
|
|
156
|
+
margin-inline: calc(var(--space-s-34lx8l, 12px) / -2);
|
|
157
|
+
}
|
|
158
|
+
.awsui_slider-track_pcgz5_7y2du_145:not(#\9) {
|
|
156
159
|
background-color: var(--color-background-slider-track-3m68rn, #7d8998);
|
|
157
160
|
inline-size: calc(100% + var(--space-m-udix3p, 16px));
|
|
158
161
|
block-size: 2px;
|
|
159
162
|
cursor: pointer;
|
|
160
163
|
}
|
|
161
|
-
.awsui_slider-
|
|
164
|
+
.awsui_slider-track_pcgz5_7y2du_145.awsui_disabled_pcgz5_7y2du_154:not(#\9) {
|
|
165
|
+
cursor: default;
|
|
166
|
+
background-color: var(--color-background-control-disabled-pwkvgd, #d1d5db);
|
|
167
|
+
}
|
|
168
|
+
.awsui_slider-track_pcgz5_7y2du_145.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_slider-track_pcgz5_7y2du_145.awsui_disabled_pcgz5_7y2du_154) {
|
|
162
169
|
cursor: default;
|
|
163
170
|
background-color: var(--color-background-control-disabled-pwkvgd, #d1d5db);
|
|
171
|
+
inline-size: calc(100% + var(--space-s-34lx8l, 12px));
|
|
164
172
|
}
|
|
165
|
-
.awsui_slider-
|
|
173
|
+
.awsui_slider-range_pcgz5_7y2du_145:not(#\9) {
|
|
166
174
|
background-color: var(--color-background-slider-handle-default-atrlod, #0972d3);
|
|
167
175
|
block-size: 4px;
|
|
168
176
|
inline-size: calc(var(--awsui-slider-range-inline-size-9rhwr5) + var(--space-m-udix3p, 16px));
|
|
169
177
|
}
|
|
170
|
-
.awsui_slider-
|
|
178
|
+
.awsui_slider-range_pcgz5_7y2du_145.awsui_error_pcgz5_7y2du_177:not(#\9) {
|
|
171
179
|
background-color: var(--color-text-status-error-wdvepn, #d91515);
|
|
172
180
|
}
|
|
173
|
-
.awsui_slider-
|
|
181
|
+
.awsui_slider-range_pcgz5_7y2du_145.awsui_warning_pcgz5_7y2du_180:not(#\9) {
|
|
174
182
|
background-color: var(--color-text-status-warning-yik8vi, #8d6605);
|
|
175
183
|
}
|
|
176
|
-
.awsui_slider-
|
|
184
|
+
.awsui_slider-range_pcgz5_7y2du_145.awsui_active_pcgz5_7y2du_183:not(#\9) {
|
|
177
185
|
background-color: var(--color-background-slider-handle-active-ccegzg, #065299);
|
|
178
186
|
}
|
|
179
|
-
.awsui_slider-
|
|
187
|
+
.awsui_slider-range_pcgz5_7y2du_145.awsui_error-active_pcgz5_7y2du_186:not(#\9) {
|
|
180
188
|
background-color: var(--color-background-slider-error-pressed-g7oqnt, #7c2718);
|
|
181
189
|
}
|
|
182
|
-
.awsui_slider-
|
|
190
|
+
.awsui_slider-range_pcgz5_7y2du_145.awsui_warning-active_pcgz5_7y2du_189:not(#\9) {
|
|
183
191
|
background-color: var(--color-background-slider-warning-pressed-9xuhwf, #8d6605);
|
|
184
192
|
}
|
|
185
|
-
.awsui_slider-
|
|
193
|
+
.awsui_slider-range_pcgz5_7y2du_145.awsui_disabled_pcgz5_7y2du_154:not(#\9) {
|
|
186
194
|
background-color: var(--color-background-control-disabled-pwkvgd, #d1d5db);
|
|
187
195
|
}
|
|
196
|
+
.awsui_slider-range_pcgz5_7y2du_145.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_slider-range_pcgz5_7y2du_145.awsui_disabled_pcgz5_7y2du_154) {
|
|
197
|
+
inline-size: calc(var(--awsui-slider-range-inline-size-9rhwr5) + var(--space-s-34lx8l, 12px));
|
|
198
|
+
background-color: var(--color-foreground-control-read-only-ibiswj, #5f6b7a);
|
|
199
|
+
}
|
|
188
200
|
|
|
189
|
-
.
|
|
201
|
+
.awsui_labels_pcgz5_7y2du_200:not(#\9) {
|
|
190
202
|
display: grid;
|
|
191
203
|
grid-template-columns: 3fr repeat(calc((var(--awsui-slider-label-count-9rhwr5) - 2) / 2 + (var(--awsui-slider-label-count-9rhwr5) - 2) / 2 - 1), 2fr) 3fr;
|
|
192
204
|
grid-auto-rows: 100%;
|
|
193
205
|
padding-block-start: var(--space-m-udix3p, 16px);
|
|
194
206
|
}
|
|
195
|
-
.awsui_labels-
|
|
207
|
+
.awsui_labels-noref_pcgz5_7y2du_206:not(#\9) {
|
|
196
208
|
grid-template-columns: 1fr 1fr;
|
|
197
209
|
}
|
|
198
|
-
.awsui_labels-
|
|
210
|
+
.awsui_labels-reference_pcgz5_7y2du_209:not(#\9) {
|
|
199
211
|
grid-column-start: var(--awsui-slider-reference-column-9rhwr5);
|
|
200
212
|
grid-column-end: var(--awsui-slider-next-reference-column-9rhwr5);
|
|
201
213
|
grid-row: 1;
|
|
202
214
|
justify-self: center;
|
|
203
215
|
text-align: center;
|
|
204
216
|
}
|
|
205
|
-
.awsui_labels-
|
|
217
|
+
.awsui_labels-min_pcgz5_7y2du_216:not(#\9) {
|
|
206
218
|
grid-column: 1;
|
|
207
219
|
grid-row: 1;
|
|
208
220
|
grid-column-end: var(--awsui-slider-min-end-9rhwr5);
|
|
209
221
|
margin-inline-start: calc(var(--space-m-udix3p, 16px) / -2);
|
|
210
222
|
}
|
|
211
|
-
.awsui_labels-
|
|
223
|
+
.awsui_labels-max_pcgz5_7y2du_222:not(#\9) {
|
|
212
224
|
text-align: end;
|
|
213
225
|
justify-content: flex-end;
|
|
214
226
|
grid-row: 1;
|
|
@@ -216,37 +228,37 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
216
228
|
grid-column-start: var(--awsui-slider-max-start-9rhwr5);
|
|
217
229
|
margin-inline-end: calc(var(--space-m-udix3p, 16px) / -2);
|
|
218
230
|
}
|
|
219
|
-
.awsui_labels-aria-
|
|
231
|
+
.awsui_labels-aria-description_pcgz5_7y2du_230:not(#\9) {
|
|
220
232
|
display: none;
|
|
221
233
|
}
|
|
222
234
|
@media (max-width: 576px) {
|
|
223
|
-
.
|
|
235
|
+
.awsui_labels_pcgz5_7y2du_200:not(#\9) {
|
|
224
236
|
grid-template-columns: 1fr 1fr;
|
|
225
237
|
}
|
|
226
|
-
.awsui_labels-
|
|
238
|
+
.awsui_labels-min_pcgz5_7y2du_216:not(#\9) {
|
|
227
239
|
grid-column: 1;
|
|
228
240
|
}
|
|
229
|
-
.awsui_labels-
|
|
241
|
+
.awsui_labels-max_pcgz5_7y2du_222:not(#\9) {
|
|
230
242
|
grid-column: 2;
|
|
231
243
|
}
|
|
232
|
-
.
|
|
244
|
+
.awsui_labels_pcgz5_7y2du_200 > .awsui_labels-reference_pcgz5_7y2du_209:not(#\9) {
|
|
233
245
|
display: none;
|
|
234
246
|
}
|
|
235
247
|
}
|
|
236
248
|
|
|
237
|
-
.
|
|
249
|
+
.awsui_ticks_pcgz5_7y2du_248:not(#\9) {
|
|
238
250
|
display: grid;
|
|
239
251
|
grid-template-columns: repeat(var(--awsui-slider-tick-count-9rhwr5), 1fr);
|
|
240
252
|
inline-size: calc(100% - var(--space-m-udix3p, 16px));
|
|
241
253
|
margin-inline: calc(var(--space-m-udix3p, 16px) / 2);
|
|
242
254
|
}
|
|
243
|
-
.awsui_ticks-
|
|
255
|
+
.awsui_ticks-wrapper_pcgz5_7y2du_254:not(#\9) {
|
|
244
256
|
block-size: 0;
|
|
245
257
|
display: flex;
|
|
246
258
|
margin-inline: calc(var(--space-m-udix3p, 16px) / -2);
|
|
247
259
|
}
|
|
248
260
|
|
|
249
|
-
.
|
|
261
|
+
.awsui_tick_pcgz5_7y2du_248:not(#\9) {
|
|
250
262
|
grid-row: 1;
|
|
251
263
|
block-size: var(--space-xs-zb16t3, 8px);
|
|
252
264
|
inline-size: var(--space-xxxs-zbmxqb, 2px);
|
|
@@ -255,40 +267,51 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
255
267
|
background: var(--color-background-slider-track-3m68rn, #7d8998);
|
|
256
268
|
inset-block-start: -4px;
|
|
257
269
|
}
|
|
258
|
-
.
|
|
270
|
+
.awsui_tick_pcgz5_7y2du_248.awsui_middle_pcgz5_7y2du_269:not(#\9):first-child, .awsui_tick_pcgz5_7y2du_248.awsui_middle_pcgz5_7y2du_269:not(#\9):last-child {
|
|
259
271
|
visibility: hidden;
|
|
260
272
|
}
|
|
261
|
-
.
|
|
273
|
+
.awsui_tick_pcgz5_7y2du_248.awsui_filled_pcgz5_7y2du_272:not(#\9) {
|
|
262
274
|
background: var(--color-background-slider-handle-default-atrlod, #0972d3);
|
|
263
275
|
}
|
|
264
|
-
.
|
|
276
|
+
.awsui_tick_pcgz5_7y2du_248.awsui_filled_pcgz5_7y2du_272.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_tick-disabled_pcgz5_7y2du_275) {
|
|
277
|
+
background: var(--color-foreground-control-read-only-ibiswj, #5f6b7a);
|
|
278
|
+
}
|
|
279
|
+
.awsui_tick_pcgz5_7y2du_248.awsui_active_pcgz5_7y2du_183:not(#\9) {
|
|
265
280
|
background: var(--color-background-slider-handle-active-ccegzg, #065299);
|
|
266
281
|
}
|
|
267
|
-
.
|
|
282
|
+
.awsui_tick_pcgz5_7y2du_248.awsui_error_pcgz5_7y2du_177:not(#\9) {
|
|
268
283
|
background: var(--color-text-status-error-wdvepn, #d91515);
|
|
269
284
|
}
|
|
270
|
-
.
|
|
285
|
+
.awsui_tick_pcgz5_7y2du_248.awsui_warning_pcgz5_7y2du_180:not(#\9) {
|
|
271
286
|
background: var(--color-text-status-warning-yik8vi, #8d6605);
|
|
272
287
|
}
|
|
273
|
-
.
|
|
288
|
+
.awsui_tick_pcgz5_7y2du_248.awsui_error-active_pcgz5_7y2du_186:not(#\9) {
|
|
274
289
|
background-color: var(--color-background-slider-error-pressed-g7oqnt, #7c2718);
|
|
275
290
|
}
|
|
276
|
-
.
|
|
291
|
+
.awsui_tick_pcgz5_7y2du_248.awsui_warning-active_pcgz5_7y2du_189:not(#\9) {
|
|
277
292
|
background-color: var(--color-background-slider-warning-pressed-9xuhwf, #8d6605);
|
|
278
293
|
}
|
|
279
|
-
.
|
|
294
|
+
.awsui_tick_pcgz5_7y2du_248.awsui_disabled_pcgz5_7y2du_154:not(#\9) {
|
|
295
|
+
background: var(--color-background-control-disabled-pwkvgd, #d1d5db);
|
|
296
|
+
}
|
|
297
|
+
.awsui_tick_pcgz5_7y2du_248.awsui_readonly_pcgz5_7y2du_154:not(#\9) {
|
|
280
298
|
background: var(--color-background-control-disabled-pwkvgd, #d1d5db);
|
|
281
299
|
}
|
|
282
300
|
|
|
283
|
-
.awsui_tooltip-
|
|
301
|
+
.awsui_tooltip-thumb_pcgz5_7y2du_300:not(#\9) {
|
|
284
302
|
position: absolute;
|
|
285
303
|
inline-size: var(--space-xxl-cu2m1r, 32px);
|
|
286
304
|
block-size: var(--space-xxl-cu2m1r, 32px);
|
|
287
305
|
margin-block-start: calc(var(--space-s-34lx8l, 12px) / -1);
|
|
288
306
|
inset-inline-start: var(--awsui-slider-tooltip-position-9rhwr5);
|
|
289
307
|
}
|
|
308
|
+
.awsui_tooltip-thumb_pcgz5_7y2du_300.awsui_readonly_pcgz5_7y2du_154:not(#\9) {
|
|
309
|
+
inline-size: var(--space-xl-lmui9r, 24px);
|
|
310
|
+
block-size: var(--space-xl-lmui9r, 24px);
|
|
311
|
+
margin-block-start: calc(var(--space-xs-zb16t3, 8px) / -1);
|
|
312
|
+
}
|
|
290
313
|
|
|
291
|
-
.
|
|
314
|
+
.awsui_thumb_pcgz5_7y2du_313:not(#\9) {
|
|
292
315
|
background: transparent;
|
|
293
316
|
-webkit-appearance: none;
|
|
294
317
|
appearance: none;
|
|
@@ -301,16 +324,37 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
301
324
|
cursor: pointer;
|
|
302
325
|
touch-action: none;
|
|
303
326
|
}
|
|
304
|
-
.
|
|
327
|
+
.awsui_thumb_pcgz5_7y2du_313.awsui_disabled_pcgz5_7y2du_154:not(#\9) {
|
|
328
|
+
cursor: default;
|
|
329
|
+
}
|
|
330
|
+
.awsui_thumb_pcgz5_7y2du_313.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_thumb_pcgz5_7y2du_313.awsui_disabled_pcgz5_7y2du_154) {
|
|
305
331
|
cursor: default;
|
|
306
332
|
}
|
|
307
|
-
.
|
|
333
|
+
.awsui_thumb_pcgz5_7y2du_313.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_thumb_pcgz5_7y2du_313.awsui_disabled_pcgz5_7y2du_154):focus::-webkit-slider-thumb, .awsui_thumb_pcgz5_7y2du_313.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_thumb_pcgz5_7y2du_313.awsui_disabled_pcgz5_7y2du_154):active::-webkit-slider-thumb {
|
|
334
|
+
block-size: var(--space-s-34lx8l, 12px);
|
|
335
|
+
inline-size: var(--space-s-34lx8l, 12px);
|
|
336
|
+
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-foreground-control-read-only-ibiswj, #5f6b7a);
|
|
337
|
+
background: var(--color-foreground-control-read-only-ibiswj, #5f6b7a);
|
|
338
|
+
border-color: var(--color-background-slider-handle-active-ccegzg, #065299);
|
|
339
|
+
border-block-width: 2px;
|
|
340
|
+
border-inline-width: 2px;
|
|
341
|
+
}
|
|
342
|
+
.awsui_thumb_pcgz5_7y2du_313.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_thumb_pcgz5_7y2du_313.awsui_disabled_pcgz5_7y2du_154):focus::-moz-range-thumb, .awsui_thumb_pcgz5_7y2du_313.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_thumb_pcgz5_7y2du_313.awsui_disabled_pcgz5_7y2du_154):active::-moz-range-thumb {
|
|
343
|
+
block-size: var(--space-s-34lx8l, 12px);
|
|
344
|
+
inline-size: var(--space-s-34lx8l, 12px);
|
|
345
|
+
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-foreground-control-read-only-ibiswj, #5f6b7a);
|
|
346
|
+
background: var(--color-foreground-control-read-only-ibiswj, #5f6b7a);
|
|
347
|
+
border-color: var(--color-background-slider-handle-active-ccegzg, #065299);
|
|
348
|
+
border-block-width: 2px;
|
|
349
|
+
border-inline-width: 2px;
|
|
350
|
+
}
|
|
351
|
+
.awsui_thumb_pcgz5_7y2du_313.awsui_min_pcgz5_7y2du_349:not(#\9) {
|
|
308
352
|
margin-inline-start: calc(-1px + var(--space-m-udix3p, 16px) / -2);
|
|
309
353
|
}
|
|
310
|
-
.
|
|
354
|
+
.awsui_thumb_pcgz5_7y2du_313.awsui_max_pcgz5_7y2du_352:not(#\9) {
|
|
311
355
|
margin-inline-start: calc(1px + var(--space-m-udix3p, 16px) / -2);
|
|
312
356
|
}
|
|
313
|
-
.
|
|
357
|
+
.awsui_thumb_pcgz5_7y2du_313:not(#\9)::-webkit-slider-thumb {
|
|
314
358
|
-webkit-appearance: none;
|
|
315
359
|
appearance: none;
|
|
316
360
|
appearance: none;
|
|
@@ -329,7 +373,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
329
373
|
pointer-events: all;
|
|
330
374
|
position: relative;
|
|
331
375
|
}
|
|
332
|
-
.
|
|
376
|
+
.awsui_thumb_pcgz5_7y2du_313:not(#\9)::-moz-range-thumb {
|
|
333
377
|
appearance: none;
|
|
334
378
|
appearance: none;
|
|
335
379
|
background: var(--color-background-slider-handle-default-atrlod, #0972d3);
|
|
@@ -347,13 +391,13 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
347
391
|
pointer-events: all;
|
|
348
392
|
position: relative;
|
|
349
393
|
}
|
|
350
|
-
.
|
|
394
|
+
.awsui_thumb_pcgz5_7y2du_313:not(#\9):hover::-webkit-slider-thumb {
|
|
351
395
|
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-background-slider-handle-default-atrlod, #0972d3);
|
|
352
396
|
}
|
|
353
|
-
.
|
|
397
|
+
.awsui_thumb_pcgz5_7y2du_313:not(#\9):hover::-moz-range-thumb {
|
|
354
398
|
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-background-slider-handle-default-atrlod, #0972d3);
|
|
355
399
|
}
|
|
356
|
-
.
|
|
400
|
+
.awsui_thumb_pcgz5_7y2du_313:not(#\9):focus::-webkit-slider-thumb, .awsui_thumb_pcgz5_7y2du_313:not(#\9):active::-webkit-slider-thumb {
|
|
357
401
|
block-size: 20px;
|
|
358
402
|
inline-size: 20px;
|
|
359
403
|
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-background-slider-handle-active-ccegzg, #065299);
|
|
@@ -362,7 +406,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
362
406
|
border-block-width: 2px;
|
|
363
407
|
border-inline-width: 2px;
|
|
364
408
|
}
|
|
365
|
-
.
|
|
409
|
+
.awsui_thumb_pcgz5_7y2du_313:not(#\9):focus::-moz-range-thumb, .awsui_thumb_pcgz5_7y2du_313:not(#\9):active::-moz-range-thumb {
|
|
366
410
|
block-size: 20px;
|
|
367
411
|
inline-size: 20px;
|
|
368
412
|
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-background-slider-handle-active-ccegzg, #065299);
|
|
@@ -372,30 +416,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
372
416
|
border-inline-width: 2px;
|
|
373
417
|
}
|
|
374
418
|
|
|
375
|
-
.
|
|
419
|
+
.awsui_error_pcgz5_7y2du_177:not(#\9)::-webkit-slider-thumb {
|
|
376
420
|
background-color: var(--color-text-status-error-wdvepn, #d91515);
|
|
377
421
|
border-color: var(--color-text-status-error-wdvepn, #d91515);
|
|
378
422
|
}
|
|
379
|
-
.
|
|
423
|
+
.awsui_error_pcgz5_7y2du_177:not(#\9)::-moz-range-thumb {
|
|
380
424
|
background-color: var(--color-text-status-error-wdvepn, #d91515);
|
|
381
425
|
border-color: var(--color-text-status-error-wdvepn, #d91515);
|
|
382
426
|
}
|
|
383
|
-
.
|
|
427
|
+
.awsui_error_pcgz5_7y2du_177:not(#\9):hover::-webkit-slider-thumb {
|
|
384
428
|
background-color: var(--color-text-status-error-wdvepn, #d91515);
|
|
385
429
|
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-text-status-error-wdvepn, #d91515);
|
|
386
430
|
}
|
|
387
|
-
.
|
|
431
|
+
.awsui_error_pcgz5_7y2du_177:not(#\9):hover::-moz-range-thumb {
|
|
388
432
|
background-color: var(--color-text-status-error-wdvepn, #d91515);
|
|
389
433
|
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-text-status-error-wdvepn, #d91515);
|
|
390
434
|
}
|
|
391
|
-
.
|
|
435
|
+
.awsui_error_pcgz5_7y2du_177:not(#\9):focus::-webkit-slider-thumb, .awsui_error_pcgz5_7y2du_177:not(#\9):active::-webkit-slider-thumb {
|
|
392
436
|
background-color: var(--color-background-slider-error-pressed-g7oqnt, #7c2718);
|
|
393
437
|
border-block-width: 2px;
|
|
394
438
|
border-inline-width: 2px;
|
|
395
439
|
border-color: var(--color-background-slider-error-pressed-g7oqnt, #7c2718);
|
|
396
440
|
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-background-slider-error-pressed-g7oqnt, #7c2718);
|
|
397
441
|
}
|
|
398
|
-
.
|
|
442
|
+
.awsui_error_pcgz5_7y2du_177:not(#\9):focus::-moz-range-thumb, .awsui_error_pcgz5_7y2du_177:not(#\9):active::-moz-range-thumb {
|
|
399
443
|
background-color: var(--color-background-slider-error-pressed-g7oqnt, #7c2718);
|
|
400
444
|
border-block-width: 2px;
|
|
401
445
|
border-inline-width: 2px;
|
|
@@ -403,30 +447,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
403
447
|
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-background-slider-error-pressed-g7oqnt, #7c2718);
|
|
404
448
|
}
|
|
405
449
|
|
|
406
|
-
.
|
|
450
|
+
.awsui_warning_pcgz5_7y2du_180:not(#\9)::-webkit-slider-thumb {
|
|
407
451
|
background-color: var(--color-text-status-warning-yik8vi, #8d6605);
|
|
408
452
|
border-color: var(--color-text-status-warning-yik8vi, #8d6605);
|
|
409
453
|
}
|
|
410
|
-
.
|
|
454
|
+
.awsui_warning_pcgz5_7y2du_180:not(#\9)::-moz-range-thumb {
|
|
411
455
|
background-color: var(--color-text-status-warning-yik8vi, #8d6605);
|
|
412
456
|
border-color: var(--color-text-status-warning-yik8vi, #8d6605);
|
|
413
457
|
}
|
|
414
|
-
.
|
|
458
|
+
.awsui_warning_pcgz5_7y2du_180:not(#\9):hover::-webkit-slider-thumb {
|
|
415
459
|
background-color: var(--color-text-status-warning-yik8vi, #8d6605);
|
|
416
460
|
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-text-status-warning-yik8vi, #8d6605);
|
|
417
461
|
}
|
|
418
|
-
.
|
|
462
|
+
.awsui_warning_pcgz5_7y2du_180:not(#\9):hover::-moz-range-thumb {
|
|
419
463
|
background-color: var(--color-text-status-warning-yik8vi, #8d6605);
|
|
420
464
|
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-text-status-warning-yik8vi, #8d6605);
|
|
421
465
|
}
|
|
422
|
-
.
|
|
466
|
+
.awsui_warning_pcgz5_7y2du_180:not(#\9):focus::-webkit-slider-thumb, .awsui_warning_pcgz5_7y2du_180:not(#\9):active::-webkit-slider-thumb {
|
|
423
467
|
background-color: var(--color-background-slider-warning-pressed-9xuhwf, #8d6605);
|
|
424
468
|
border-block-width: 2px;
|
|
425
469
|
border-inline-width: 2px;
|
|
426
470
|
border-color: var(--color-background-slider-warning-pressed-9xuhwf, #8d6605);
|
|
427
471
|
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-background-slider-warning-pressed-9xuhwf, #8d6605);
|
|
428
472
|
}
|
|
429
|
-
.
|
|
473
|
+
.awsui_warning_pcgz5_7y2du_180:not(#\9):focus::-moz-range-thumb, .awsui_warning_pcgz5_7y2du_180:not(#\9):active::-moz-range-thumb {
|
|
430
474
|
background-color: var(--color-background-slider-warning-pressed-9xuhwf, #8d6605);
|
|
431
475
|
border-block-width: 2px;
|
|
432
476
|
border-inline-width: 2px;
|
|
@@ -434,19 +478,42 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
434
478
|
box-shadow: 0px 0 0 2px var(--color-background-slider-handle-ring-31445h, #ffffff), 0 0 0 4px var(--color-background-slider-warning-pressed-9xuhwf, #8d6605);
|
|
435
479
|
}
|
|
436
480
|
|
|
437
|
-
.
|
|
438
|
-
.
|
|
439
|
-
.
|
|
481
|
+
.awsui_disabled_pcgz5_7y2du_154:not(#\9)::-webkit-slider-thumb,
|
|
482
|
+
.awsui_disabled_pcgz5_7y2du_154:not(#\9):hover::-webkit-slider-thumb,
|
|
483
|
+
.awsui_disabled_pcgz5_7y2du_154:not(#\9):active::-webkit-slider-thumb {
|
|
440
484
|
background-color: var(--color-background-control-disabled-pwkvgd, #d1d5db);
|
|
441
485
|
border-color: var(--color-background-control-disabled-pwkvgd, #d1d5db);
|
|
442
486
|
box-shadow: none;
|
|
443
487
|
pointer-events: none;
|
|
444
488
|
}
|
|
445
|
-
.
|
|
446
|
-
.
|
|
447
|
-
.
|
|
489
|
+
.awsui_disabled_pcgz5_7y2du_154:not(#\9)::-moz-range-thumb,
|
|
490
|
+
.awsui_disabled_pcgz5_7y2du_154:not(#\9):hover::-moz-range-thumb,
|
|
491
|
+
.awsui_disabled_pcgz5_7y2du_154:not(#\9):active::-moz-range-thumb {
|
|
448
492
|
background-color: var(--color-background-control-disabled-pwkvgd, #d1d5db);
|
|
449
493
|
border-color: var(--color-background-control-disabled-pwkvgd, #d1d5db);
|
|
450
494
|
box-shadow: none;
|
|
451
495
|
pointer-events: none;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_disabled_pcgz5_7y2du_154)::-webkit-slider-thumb,
|
|
499
|
+
.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_disabled_pcgz5_7y2du_154):hover::-webkit-slider-thumb,
|
|
500
|
+
.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_disabled_pcgz5_7y2du_154):active::-webkit-slider-thumb {
|
|
501
|
+
block-size: var(--space-s-34lx8l, 12px);
|
|
502
|
+
inline-size: var(--space-s-34lx8l, 12px);
|
|
503
|
+
background-color: var(--color-foreground-control-read-only-ibiswj, #5f6b7a);
|
|
504
|
+
border-color: var(--color-foreground-control-read-only-ibiswj, #5f6b7a);
|
|
505
|
+
box-shadow: none;
|
|
506
|
+
pointer-events: none;
|
|
507
|
+
cursor: initial;
|
|
508
|
+
}
|
|
509
|
+
.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_disabled_pcgz5_7y2du_154)::-moz-range-thumb,
|
|
510
|
+
.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_disabled_pcgz5_7y2du_154):hover::-moz-range-thumb,
|
|
511
|
+
.awsui_readonly_pcgz5_7y2du_154:not(#\9):not(.awsui_disabled_pcgz5_7y2du_154):active::-moz-range-thumb {
|
|
512
|
+
block-size: var(--space-s-34lx8l, 12px);
|
|
513
|
+
inline-size: var(--space-s-34lx8l, 12px);
|
|
514
|
+
background-color: var(--color-foreground-control-read-only-ibiswj, #5f6b7a);
|
|
515
|
+
border-color: var(--color-foreground-control-read-only-ibiswj, #5f6b7a);
|
|
516
|
+
box-shadow: none;
|
|
517
|
+
pointer-events: none;
|
|
518
|
+
cursor: initial;
|
|
452
519
|
}
|
|
@@ -2,30 +2,32 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"slider": "
|
|
7
|
-
"slider-track": "awsui_slider-
|
|
8
|
-
"slider-range": "awsui_slider-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"labels
|
|
17
|
-
"labels-
|
|
18
|
-
"labels-
|
|
19
|
-
"labels-
|
|
20
|
-
"labels-
|
|
21
|
-
"
|
|
22
|
-
"ticks
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
5
|
+
"root": "awsui_root_pcgz5_7y2du_101",
|
|
6
|
+
"slider": "awsui_slider_pcgz5_7y2du_141",
|
|
7
|
+
"slider-track": "awsui_slider-track_pcgz5_7y2du_145",
|
|
8
|
+
"slider-range": "awsui_slider-range_pcgz5_7y2du_145",
|
|
9
|
+
"readonly": "awsui_readonly_pcgz5_7y2du_154",
|
|
10
|
+
"disabled": "awsui_disabled_pcgz5_7y2du_154",
|
|
11
|
+
"error": "awsui_error_pcgz5_7y2du_177",
|
|
12
|
+
"warning": "awsui_warning_pcgz5_7y2du_180",
|
|
13
|
+
"active": "awsui_active_pcgz5_7y2du_183",
|
|
14
|
+
"error-active": "awsui_error-active_pcgz5_7y2du_186",
|
|
15
|
+
"warning-active": "awsui_warning-active_pcgz5_7y2du_189",
|
|
16
|
+
"labels": "awsui_labels_pcgz5_7y2du_200",
|
|
17
|
+
"labels-noref": "awsui_labels-noref_pcgz5_7y2du_206",
|
|
18
|
+
"labels-reference": "awsui_labels-reference_pcgz5_7y2du_209",
|
|
19
|
+
"labels-min": "awsui_labels-min_pcgz5_7y2du_216",
|
|
20
|
+
"labels-max": "awsui_labels-max_pcgz5_7y2du_222",
|
|
21
|
+
"labels-aria-description": "awsui_labels-aria-description_pcgz5_7y2du_230",
|
|
22
|
+
"ticks": "awsui_ticks_pcgz5_7y2du_248",
|
|
23
|
+
"ticks-wrapper": "awsui_ticks-wrapper_pcgz5_7y2du_254",
|
|
24
|
+
"tick": "awsui_tick_pcgz5_7y2du_248",
|
|
25
|
+
"middle": "awsui_middle_pcgz5_7y2du_269",
|
|
26
|
+
"filled": "awsui_filled_pcgz5_7y2du_272",
|
|
27
|
+
"tick-disabled": "awsui_tick-disabled_pcgz5_7y2du_275",
|
|
28
|
+
"tooltip-thumb": "awsui_tooltip-thumb_pcgz5_7y2du_300",
|
|
29
|
+
"thumb": "awsui_thumb_pcgz5_7y2du_313",
|
|
30
|
+
"min": "awsui_min_pcgz5_7y2du_349",
|
|
31
|
+
"max": "awsui_max_pcgz5_7y2du_352"
|
|
30
32
|
};
|
|
31
33
|
|
package/slider/tick-marks.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tick-marks.d.ts","sourceRoot":"","sources":["../../../src/slider/tick-marks.tsx"],"names":[],"mappings":";AAQA,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC3D,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CAC9B;
|
|
1
|
+
{"version":3,"file":"tick-marks.d.ts","sourceRoot":"","sources":["../../../src/slider/tick-marks.tsx"],"names":[],"mappings":";AAQA,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC3D,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CAC9B;AAkCD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,gBAAgB,eAmB9D"}
|
package/slider/tick-marks.js
CHANGED
|
@@ -6,7 +6,7 @@ import customCssProps from '../internal/generated/custom-css-properties/index.js
|
|
|
6
6
|
import styles from './styles.css.js';
|
|
7
7
|
import { getStepArray } from './utils.js';
|
|
8
8
|
function TickMark(props) {
|
|
9
|
-
const { hideFillLine, value, isActive, invalid, warning, disabled, type, min, max, step } = props;
|
|
9
|
+
const { hideFillLine, value, isActive, invalid, warning, disabled, type, min, max, step, readOnly } = props;
|
|
10
10
|
const showWarning = warning && !invalid;
|
|
11
11
|
const getType = () => {
|
|
12
12
|
if (type === 'min') {
|
|
@@ -25,6 +25,7 @@ function TickMark(props) {
|
|
|
25
25
|
[styles['error-active']]: invalid && isActive && !hideFillLine && value > getType(),
|
|
26
26
|
[styles['warning-active']]: showWarning && isActive && !hideFillLine && value > getType(),
|
|
27
27
|
[styles.disabled]: disabled,
|
|
28
|
+
[styles.readonly]: readOnly,
|
|
28
29
|
[styles.middle]: type === 'step',
|
|
29
30
|
}) }));
|
|
30
31
|
}
|
package/slider/tick-marks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tick-marks.js","sourceRoot":"","sources":["../../../src/slider/tick-marks.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,cAAc,MAAM,sDAAsD,CAAC;AAClF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"tick-marks.js","sourceRoot":"","sources":["../../../src/slider/tick-marks.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,K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MAAM,CAAC,gBAAgB,CAAC,CAAC,EAAE,WAAW,IAAI,QAAQ,IAAI,CAAC,YAAY,IAAI,KAAK,GAAG,OAAO,EAAE;YACzF,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;YAC3B,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;YAC3B,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,KAAK,MAAM;SACjC,CAAC,GACF,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAuB;IAC7D,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjC,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC;QACrC,oBAAC,QAAQ,oBAAK,KAAK,IAAE,IAAI,EAAC,KAAK,IAAG;QAClC,6BACE,SAAS,EAAE,MAAM,CAAC,KAAK,EACvB,KAAK,EAAE;gBACL,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC;aACjE,IAEA,YAAY,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CACnD,oBAAC,QAAQ,oBAAK,KAAK,IAAE,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,KAAK,EAAE,IAAI,CACtE,CAAC,CACE;QACN,oBAAC,QAAQ,oBAAK,KAAK,IAAE,IAAI,EAAC,KAAK,IAAG,CAC9B,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 customCssProps from '../internal/generated/custom-css-properties/index.js';\nimport styles from './styles.css.js';\nimport { getStepArray } from './utils.js';\n\nexport interface SliderTicksProps {\n hideFillLine?: boolean;\n value: number;\n isActive: boolean;\n invalid?: boolean;\n warning?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n min: number;\n max: number;\n step: number;\n}\n\nexport interface SliderTickMarkProps extends SliderTicksProps {\n type: 'min' | 'max' | 'step';\n}\n\nfunction TickMark(props: SliderTickMarkProps) {\n const { hideFillLine, value, isActive, invalid, warning, disabled, type, min, max, step, readOnly } = props;\n\n const showWarning = warning && !invalid;\n\n const getType = () => {\n if (type === 'min') {\n return min;\n }\n if (type === 'max') {\n return max;\n }\n return step;\n };\n\n return (\n <div\n className={clsx(styles.tick, {\n [styles.filled]: !hideFillLine && value > getType(),\n [styles.active]: !hideFillLine && isActive && value > getType(),\n [styles.error]: invalid && !hideFillLine && value > getType(),\n [styles.warning]: showWarning && !hideFillLine && value > getType(),\n [styles['error-active']]: invalid && isActive && !hideFillLine && value > getType(),\n [styles['warning-active']]: showWarning && isActive && !hideFillLine && value > getType(),\n [styles.disabled]: disabled,\n [styles.readonly]: readOnly,\n [styles.middle]: type === 'step',\n })}\n />\n );\n}\n\nexport default function SliderTickMarks(props: SliderTicksProps) {\n const { min, max, step } = props;\n\n return (\n <div className={styles['ticks-wrapper']}>\n <TickMark {...props} type=\"min\" />\n <div\n className={styles.ticks}\n style={{\n [customCssProps.sliderTickCount]: Math.round((max - min) / step),\n }}\n >\n {getStepArray(step, [min, max]).map((step, index) => (\n <TickMark {...props} type=\"step\" step={step} key={`step-${index}`} />\n ))}\n </div>\n <TickMark {...props} type=\"max\" />\n </div>\n );\n}\n"]}
|
package/slider/utils.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export declare const findLowerAndHigherValues: <T extends number>(array: readonl
|
|
|
6
6
|
};
|
|
7
7
|
export declare const valuesAreValid: (referenceValues: ReadonlyArray<number>) => boolean;
|
|
8
8
|
export declare const THUMB_SIZE = 16;
|
|
9
|
+
export declare const THUMB_READONLY_SIZE = 12;
|
|
9
10
|
//# sourceMappingURL=utils.d.ts.map
|
package/slider/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/slider/utils.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,UAE1E;AAeD,eAAO,MAAM,YAAY,SAAU,MAAM,qDAiBxC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;CAYpC,CAAC;AAEF,eAAO,MAAM,cAAc,oBAAqB,cAAc,MAAM,CAAC,YAIpE,CAAC;AAEF,eAAO,MAAM,UAAU,KAAK,CAAC"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/slider/utils.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,UAE1E;AAeD,eAAO,MAAM,YAAY,SAAU,MAAM,qDAiBxC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;CAYpC,CAAC;AAEF,eAAO,MAAM,cAAc,oBAAqB,cAAc,MAAM,CAAC,YAIpE,CAAC;AAEF,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,eAAO,MAAM,mBAAmB,KAAK,CAAC"}
|
package/slider/utils.js
CHANGED
package/slider/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/slider/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,KAAiC;IACzE,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAA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AAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,KAAuB,EACvB,KAAQ,EACyC,EAAE;IACnD,IAAI,WAAW,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;IAC7B,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAEhD,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,SAAS,CAAC;IAClD,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,SAAS,CAAC;IAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,eAAsC,EAAE,EAAE;IACvE,MAAM,kBAAkB,GAAG,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAEtF,OAAO,kBAAkB,CAAC,MAAM,KAAK,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function getPercent(value: number, range: [min: number, max: number]) {\n return ((value - range[0]) / (range[1] - range[0])) * 100;\n}\n\nfunction countDecimals(value: number) {\n if (Math.floor(value) === value) {\n return 0;\n }\n\n const str = Math.abs(value).toString();\n // very small numbers, e.g. 1e-9\n if (str.indexOf('-') !== -1) {\n return parseInt(str.split('-')[1], 10) || 0;\n }\n return str.split('.')[1]?.length || 0;\n}\n\nexport const getStepArray = (step: number, [min, max]: [min: number, max: number]) => {\n const steps = [min];\n\n // JS struggles with rounding errors when using decimals, so include a multiplier\n // to make step calculations integer-based\n const multiplier = Math.pow(10, countDecimals(step));\n\n let currentStep = min;\n\n while (currentStep < max) {\n currentStep = (multiplier * currentStep + multiplier * step) / multiplier;\n if (currentStep <= max) {\n steps.push(currentStep);\n }\n }\n\n return steps;\n};\n\nexport const findLowerAndHigherValues = <T extends number>(\n array: ReadonlyArray<T>,\n value: T\n): { lower: undefined | T; higher: undefined | T } => {\n let sortedArray = [...array];\n sortedArray = sortedArray.sort((a, b) => a - b);\n\n const index = sortedArray.indexOf(value) || 0;\n const lower = sortedArray[index - 1] || undefined;\n const higher = sortedArray[index + 1] || undefined;\n\n return { lower, higher };\n};\n\nexport const valuesAreValid = (referenceValues: ReadonlyArray<number>) => {\n const valuesWithDecimals = referenceValues?.filter(value => !Number.isInteger(value));\n\n return valuesWithDecimals.length === 0;\n};\n\nexport const THUMB_SIZE = 16;\n"]}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/slider/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,KAAiC;IACzE,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AAC5D,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;;IAClC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE;QAC/B,OAAO,CAAC,CAAC;KACV;IAED,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;IACvC,gCAAgC;IAChC,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;QA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AAM,GAAG,WAAW,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,SAAS,CAAC;IAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,eAAsC,EAAE,EAAE;IACvE,MAAM,kBAAkB,GAAG,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAEtF,OAAO,kBAAkB,CAAC,MAAM,KAAK,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC;AAC7B,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function getPercent(value: number, range: [min: number, max: number]) {\n return ((value - range[0]) / (range[1] - range[0])) * 100;\n}\n\nfunction countDecimals(value: number) {\n if (Math.floor(value) === value) {\n return 0;\n }\n\n const str = Math.abs(value).toString();\n // very small numbers, e.g. 1e-9\n if (str.indexOf('-') !== -1) {\n return parseInt(str.split('-')[1], 10) || 0;\n }\n return str.split('.')[1]?.length || 0;\n}\n\nexport const getStepArray = (step: number, [min, max]: [min: number, max: number]) => {\n const steps = [min];\n\n // JS struggles with rounding errors when using decimals, so include a multiplier\n // to make step calculations integer-based\n const multiplier = Math.pow(10, countDecimals(step));\n\n let currentStep = min;\n\n while (currentStep < max) {\n currentStep = (multiplier * currentStep + multiplier * step) / multiplier;\n if (currentStep <= max) {\n steps.push(currentStep);\n }\n }\n\n return steps;\n};\n\nexport const findLowerAndHigherValues = <T extends number>(\n array: ReadonlyArray<T>,\n value: T\n): { lower: undefined | T; higher: undefined | T } => {\n let sortedArray = [...array];\n sortedArray = sortedArray.sort((a, b) => a - b);\n\n const index = sortedArray.indexOf(value) || 0;\n const lower = sortedArray[index - 1] || undefined;\n const higher = sortedArray[index + 1] || undefined;\n\n return { lower, higher };\n};\n\nexport const valuesAreValid = (referenceValues: ReadonlyArray<number>) => {\n const valuesWithDecimals = referenceValues?.filter(value => !Number.isInteger(value));\n\n return valuesWithDecimals.length === 0;\n};\n\nexport const THUMB_SIZE = 16;\nexport const THUMB_READONLY_SIZE = 12;\n"]}
|
package/tiles/interfaces.d.ts
CHANGED
|
@@ -49,6 +49,12 @@ export interface TilesProps extends BaseComponentProps, FormFieldControlProps {
|
|
|
49
49
|
* If the component controls any secondary content (for example, another form field), use this to provide an ID referring to the secondary content.
|
|
50
50
|
*/
|
|
51
51
|
ariaControls?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Specifies if the control is read-only, which prevents the
|
|
54
|
+
* user from modifying the value, but does not prevent the value from
|
|
55
|
+
* being included in a form submission. A read-only control is still focusable.
|
|
56
|
+
*/
|
|
57
|
+
readOnly?: boolean;
|
|
52
58
|
}
|
|
53
59
|
export declare namespace TilesProps {
|
|
54
60
|
type Breakpoint = _Breakpoint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/tiles/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEpE,MAAM,WAAW,UAAW,SAAQ,kBAAkB,EAAE,qBAAqB;IAC3E;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;;;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AM,CAAC;IAEtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,yBAAiB,UAAU,CAAC;IAC1B,KAAY,UAAU,GAAG,WAAW,CAAC;IACrC,UAAiB,eAAe;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;IAED,UAAiB,YAAY;QAC3B,KAAK,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;CACF"}
|
package/tiles/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/tiles/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';\nimport { FormFieldControlProps } from '../internal/context/form-field-context';\nimport { Breakpoint as _Breakpoint } from '../internal/breakpoints';\n\nexport interface TilesProps extends BaseComponentProps, FormFieldControlProps {\n /**\n * Specify a custom name for the native radio buttons. If not provided, the tiles component generates a random name.\n */\n name?: string;\n\n /**\n * Specifies the value of the selected tile.\n * If you want to clear the selection, use `null`.\n */\n value: string | null;\n\n /**\n * List of tile definitions. Each tile has the following properties:\n *\n * - `value` [string] - The value that will be associated with the tile. This is the value the tiles will get when the radio button is selected.\n * - `label` [ReactNode] - A short description for the option the tile represents.\n * - `description` [ReactNode] - (Optional) Further explanatory guidance on the tile option, shown below the `label`.\n * - `image` [ReactNode] - (Optional) Visually distinctive image for the tile option, shown below the `description`.\n * - `disabled` [boolean] - (Optional) Specifies whether the tile is disabled. Users can't select disabled tiles.\n * - `controlId` [string] - (Optional) The ID of the internal input. You can use this to relate a label element's `for` attribute to this control.\n * We recommend that you don't set this property because it's automatically set by the tiles component.\n */\n items?: ReadonlyArray<TilesProps.TilesDefinition>;\n\n /**\n * Adds `aria-label` on the group. Don't set this property if you are using this form element within a form field\n * because the form field component automatically sets the correct labels to make the component accessible.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-required` on the group.\n */\n ariaRequired?: boolean;\n\n /**\n * The number of columns for the tiles to be displayed in. Valid values are integers between 1 and 4.\n * If no value is specified, the number of columns is determined based on the number of items, with a maximum of 3.\n * It is set to 2 if 4 or 8 items are supplied in order to optimize the layout.\n */\n columns?: number;\n\n /**\n * Called when the user selects a different tile.\n */\n onChange?: NonCancelableEventHandler<TilesProps.ChangeDetail>;\n\n /**\n * Adds `aria-controls` attribute to the component.\n * If the component controls any secondary content (for example, another form field), use this to provide an ID referring to the secondary content.\n */\n ariaControls?: string;\n}\n\nexport namespace TilesProps {\n export type Breakpoint = _Breakpoint;\n export interface TilesDefinition {\n value: string;\n label: React.ReactNode;\n description?: React.ReactNode;\n image?: React.ReactNode;\n disabled?: boolean;\n controlId?: string;\n }\n\n export interface ChangeDetail {\n value: string;\n }\n\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/tiles/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';\nimport { FormFieldControlProps } from '../internal/context/form-field-context';\nimport { Breakpoint as _Breakpoint } from '../internal/breakpoints';\n\nexport interface TilesProps extends BaseComponentProps, FormFieldControlProps {\n /**\n * Specify a custom name for the native radio buttons. If not provided, the tiles component generates a random name.\n */\n name?: string;\n\n /**\n * Specifies the value of the selected tile.\n * If you want to clear the selection, use `null`.\n */\n value: string | null;\n\n /**\n * List of tile definitions. Each tile has the following properties:\n *\n * - `value` [string] - The value that will be associated with the tile. This is the value the tiles will get when the radio button is selected.\n * - `label` [ReactNode] - A short description for the option the tile represents.\n * - `description` [ReactNode] - (Optional) Further explanatory guidance on the tile option, shown below the `label`.\n * - `image` [ReactNode] - (Optional) Visually distinctive image for the tile option, shown below the `description`.\n * - `disabled` [boolean] - (Optional) Specifies whether the tile is disabled. Users can't select disabled tiles.\n * - `controlId` [string] - (Optional) The ID of the internal input. You can use this to relate a label element's `for` attribute to this control.\n * We recommend that you don't set this property because it's automatically set by the tiles component.\n */\n items?: ReadonlyArray<TilesProps.TilesDefinition>;\n\n /**\n * Adds `aria-label` on the group. Don't set this property if you are using this form element within a form field\n * because the form field component automatically sets the correct labels to make the component accessible.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-required` on the group.\n */\n ariaRequired?: boolean;\n\n /**\n * The number of columns for the tiles to be displayed in. Valid values are integers between 1 and 4.\n * If no value is specified, the number of columns is determined based on the number of items, with a maximum of 3.\n * It is set to 2 if 4 or 8 items are supplied in order to optimize the layout.\n */\n columns?: number;\n\n /**\n * Called when the user selects a different tile.\n */\n onChange?: NonCancelableEventHandler<TilesProps.ChangeDetail>;\n\n /**\n * Adds `aria-controls` attribute to the component.\n * If the component controls any secondary content (for example, another form field), use this to provide an ID referring to the secondary content.\n */\n ariaControls?: string;\n\n /**\n * Specifies if the control is read-only, which prevents the\n * user from modifying the value, but does not prevent the value from\n * being included in a form submission. A read-only control is still focusable.\n */\n readOnly?: boolean;\n}\n\nexport namespace TilesProps {\n export type Breakpoint = _Breakpoint;\n export interface TilesDefinition {\n value: string;\n label: React.ReactNode;\n description?: React.ReactNode;\n image?: React.ReactNode;\n disabled?: boolean;\n controlId?: string;\n }\n\n export interface ChangeDetail {\n value: string;\n }\n\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n }\n}\n"]}
|
package/tiles/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/tiles/internal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AASlF,QAAA,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/tiles/internal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AASlF,QAAA,MAAM,aAAa,qHA0DlB,CAAC;AAqBF,eAAe,aAAa,CAAC"}
|