@cloudscape-design/components 3.0.639 → 3.0.641
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/drawer/index.js +1 -1
- package/app-layout/drawer/index.js.map +1 -1
- package/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
- package/app-layout/drawer/resizable-drawer.js +2 -5
- package/app-layout/drawer/resizable-drawer.js.map +1 -1
- package/app-layout/drawer/styles.css.js +13 -12
- package/app-layout/drawer/styles.scoped.css +30 -20
- package/app-layout/drawer/styles.selectors.js +13 -12
- package/app-layout/utils/use-resize.d.ts.map +1 -1
- package/app-layout/utils/use-resize.js +3 -7
- package/app-layout/utils/use-resize.js.map +1 -1
- package/app-layout/visual-refresh/drawers.js +3 -3
- package/app-layout/visual-refresh/drawers.js.map +1 -1
- package/app-layout/visual-refresh/split-panel.d.ts.map +1 -1
- package/app-layout/visual-refresh/split-panel.js +1 -3
- package/app-layout/visual-refresh/split-panel.js.map +1 -1
- package/app-layout/visual-refresh/tools.js +2 -2
- package/app-layout/visual-refresh/tools.js.map +1 -1
- package/autosuggest/plain-list.d.ts.map +1 -1
- package/autosuggest/plain-list.js +1 -3
- package/autosuggest/plain-list.js.map +1 -1
- package/autosuggest/virtual-list.d.ts.map +1 -1
- package/autosuggest/virtual-list.js +1 -3
- package/autosuggest/virtual-list.js.map +1 -1
- package/calendar/utils/intl.d.ts.map +1 -1
- package/calendar/utils/intl.js +0 -3
- package/calendar/utils/intl.js.map +1 -1
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +3 -0
- package/container/internal.js.map +1 -1
- package/container/styles.css.js +29 -28
- package/container/styles.scoped.css +55 -52
- package/container/styles.selectors.js +29 -28
- package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/index.js +0 -8
- package/date-range-picker/calendar/grids/index.js.map +1 -1
- package/form/interfaces.d.ts +3 -8
- package/form/interfaces.d.ts.map +1 -1
- package/form/interfaces.js.map +1 -1
- package/form/internal.d.ts +1 -1
- package/form/internal.d.ts.map +1 -1
- package/form/internal.js +14 -20
- package/form/internal.js.map +1 -1
- package/form/styles.css.js +8 -9
- package/form/styles.scoped.css +8 -8
- package/form/styles.selectors.js +8 -9
- package/header/internal.d.ts.map +1 -1
- package/header/internal.js +1 -3
- package/header/internal.js.map +1 -1
- package/header/styles.css.js +34 -35
- package/header/styles.scoped.css +50 -53
- package/header/styles.selectors.js +34 -35
- package/input/styles.css.js +13 -13
- package/input/styles.scoped.css +32 -35
- package/input/styles.selectors.js +13 -13
- package/internal/components/chart-plot/application-controller.js +3 -13
- package/internal/components/chart-plot/application-controller.js.map +1 -1
- package/internal/components/dropdown/index.d.ts.map +1 -1
- package/internal/components/dropdown/index.js +0 -2
- package/internal/components/dropdown/index.js.map +1 -1
- package/internal/components/dropdown/styles.css.js +20 -20
- package/internal/components/dropdown/styles.scoped.css +39 -45
- package/internal/components/dropdown/styles.selectors.js +20 -20
- package/internal/components/panel-resize-handle/icon.d.ts +5 -0
- package/internal/components/panel-resize-handle/icon.d.ts.map +1 -0
- package/internal/components/panel-resize-handle/icon.js +9 -0
- package/internal/components/panel-resize-handle/icon.js.map +1 -0
- package/internal/components/panel-resize-handle/index.d.ts +12 -0
- package/internal/components/panel-resize-handle/index.d.ts.map +1 -0
- package/internal/components/panel-resize-handle/index.js +11 -0
- package/internal/components/panel-resize-handle/index.js.map +1 -0
- package/internal/components/panel-resize-handle/styles.css.js +10 -0
- package/internal/components/panel-resize-handle/styles.scoped.css +153 -0
- package/internal/components/panel-resize-handle/styles.selectors.js +11 -0
- package/internal/context/single-tab-stop-navigation-context.js +2 -2
- package/internal/context/single-tab-stop-navigation-context.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/content-header-utils.d.ts +0 -2
- package/internal/utils/content-header-utils.d.ts.map +1 -1
- package/internal/utils/content-header-utils.js +0 -3
- package/internal/utils/content-header-utils.js.map +1 -1
- package/internal/utils/dom.d.ts.map +1 -1
- package/internal/utils/dom.js +7 -27
- package/internal/utils/dom.js.map +1 -1
- package/internal/utils/global-flags.d.ts +0 -1
- package/internal/utils/global-flags.d.ts.map +1 -1
- package/internal/utils/global-flags.js.map +1 -1
- package/link/interfaces.d.ts +6 -1
- package/link/interfaces.d.ts.map +1 -1
- package/link/interfaces.js.map +1 -1
- package/link/internal.d.ts.map +1 -1
- package/link/internal.js +12 -2
- package/link/internal.js.map +1 -1
- package/package.json +1 -1
- package/pie-chart/labels.d.ts.map +1 -1
- package/pie-chart/labels.js +1 -4
- package/pie-chart/labels.js.map +1 -1
- package/pie-chart/pie-chart.d.ts.map +1 -1
- package/pie-chart/pie-chart.js +0 -3
- package/pie-chart/pie-chart.js.map +1 -1
- package/pie-chart/utils.d.ts.map +1 -1
- package/pie-chart/utils.js +0 -4
- package/pie-chart/utils.js.map +1 -1
- package/popover/internal.js +3 -6
- package/popover/internal.js.map +1 -1
- package/popover/styles.css.js +49 -50
- package/popover/styles.scoped.css +66 -69
- package/popover/styles.selectors.js +49 -50
- package/segmented-control/styles.css.js +14 -14
- package/segmented-control/styles.scoped.css +33 -33
- package/segmented-control/styles.selectors.js +14 -14
- package/split-panel/bottom.d.ts.map +1 -1
- package/split-panel/bottom.js +4 -2
- package/split-panel/bottom.js.map +1 -1
- package/split-panel/icons/bottom-icon.js +1 -1
- package/split-panel/icons/bottom-icon.js.map +1 -1
- package/split-panel/icons/side-position-refresh.js +1 -1
- package/split-panel/icons/side-position-refresh.js.map +1 -1
- package/split-panel/icons/side-position.js +1 -1
- package/split-panel/icons/side-position.js.map +1 -1
- package/split-panel/icons/styles.css.js +27 -0
- package/split-panel/icons/styles.scoped.css +168 -0
- package/split-panel/icons/styles.selectors.js +28 -0
- package/split-panel/implementation.d.ts.map +1 -1
- package/split-panel/implementation.js +12 -8
- package/split-panel/implementation.js.map +1 -1
- package/split-panel/side.d.ts.map +1 -1
- package/split-panel/side.js +5 -3
- package/split-panel/side.js.map +1 -1
- package/split-panel/styles.css.js +26 -57
- package/split-panel/styles.scoped.css +41 -281
- package/split-panel/styles.selectors.js +26 -57
- package/split-panel/test-classes/styles.css.js +13 -0
- package/split-panel/test-classes/styles.scoped.css +14 -0
- package/split-panel/test-classes/styles.selectors.js +14 -0
- package/table/selection/selection-control.d.ts.map +1 -1
- package/table/selection/selection-control.js.map +1 -1
- package/table/table-role/utils.d.ts.map +1 -1
- package/table/table-role/utils.js +6 -1
- package/table/table-role/utils.js.map +1 -1
- package/test-utils/dom/app-layout/index.js +1 -1
- package/test-utils/dom/app-layout/index.js.map +1 -1
- package/test-utils/dom/split-panel/index.js +3 -3
- package/test-utils/dom/split-panel/index.js.map +1 -1
- package/test-utils/selectors/app-layout/index.js +1 -1
- package/test-utils/selectors/app-layout/index.js.map +1 -1
- package/test-utils/selectors/split-panel/index.js +3 -3
- package/test-utils/selectors/split-panel/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/tiles/styles.css.js +29 -29
- package/tiles/styles.scoped.css +82 -95
- package/tiles/styles.selectors.js +29 -29
- package/split-panel/icons/resize-handler.d.ts +0 -6
- package/split-panel/icons/resize-handler.d.ts.map +0 -1
- package/split-panel/icons/resize-handler.js +0 -8
- package/split-panel/icons/resize-handler.js.map +0 -1
|
@@ -100,7 +100,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
100
100
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
101
101
|
SPDX-License-Identifier: Apache-2.0
|
|
102
102
|
*/
|
|
103
|
-
.
|
|
103
|
+
.awsui_root_14iqq_1w0sy_103:not(#\9) {
|
|
104
104
|
border-collapse: separate;
|
|
105
105
|
border-spacing: 0;
|
|
106
106
|
box-sizing: border-box;
|
|
@@ -137,15 +137,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
137
137
|
word-wrap: break-word;
|
|
138
138
|
position: relative;
|
|
139
139
|
}
|
|
140
|
-
.
|
|
140
|
+
.awsui_root_14iqq_1w0sy_103.awsui_fit-height_14iqq_1w0sy_139:not(#\9) {
|
|
141
141
|
display: flex;
|
|
142
142
|
flex-direction: column;
|
|
143
143
|
block-size: 100%;
|
|
144
144
|
}
|
|
145
|
-
.
|
|
145
|
+
.awsui_root_14iqq_1w0sy_103.awsui_fit-height_14iqq_1w0sy_139.awsui_with-side-media_14iqq_1w0sy_144:not(#\9) {
|
|
146
146
|
flex-direction: row;
|
|
147
147
|
}
|
|
148
|
-
.
|
|
148
|
+
.awsui_root_14iqq_1w0sy_103.awsui_variant-default_14iqq_1w0sy_147:not(#\9), .awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147:not(#\9) {
|
|
149
149
|
background-color: var(--color-background-container-content-4un1ap, #ffffff);
|
|
150
150
|
border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
151
151
|
border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
@@ -153,11 +153,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
153
153
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
154
154
|
box-sizing: border-box;
|
|
155
155
|
}
|
|
156
|
-
.
|
|
156
|
+
.awsui_root_14iqq_1w0sy_103.awsui_variant-default_14iqq_1w0sy_147.awsui_refresh_14iqq_1w0sy_155:not(#\9), .awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147.awsui_refresh_14iqq_1w0sy_155:not(#\9) {
|
|
157
157
|
border-block: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
158
158
|
border-inline: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
159
159
|
}
|
|
160
|
-
.
|
|
160
|
+
.awsui_root_14iqq_1w0sy_103.awsui_variant-default_14iqq_1w0sy_147:not(#\9):not(.awsui_refresh_14iqq_1w0sy_155)::before, .awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147:not(#\9):not(.awsui_refresh_14iqq_1w0sy_155)::before {
|
|
161
161
|
content: "";
|
|
162
162
|
position: absolute;
|
|
163
163
|
inset-inline-start: 0px;
|
|
@@ -175,7 +175,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
175
175
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
176
176
|
z-index: 1;
|
|
177
177
|
}
|
|
178
|
-
.
|
|
178
|
+
.awsui_root_14iqq_1w0sy_103.awsui_variant-default_14iqq_1w0sy_147:not(#\9):not(.awsui_refresh_14iqq_1w0sy_155)::after, .awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147:not(#\9):not(.awsui_refresh_14iqq_1w0sy_155)::after {
|
|
179
179
|
content: "";
|
|
180
180
|
position: absolute;
|
|
181
181
|
inset-inline-start: 0px;
|
|
@@ -191,141 +191,141 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
191
191
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
192
192
|
box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
|
|
193
193
|
}
|
|
194
|
-
.
|
|
194
|
+
.awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147:not(#\9):not(:last-child), .awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147:not(#\9):not(:last-child)::before, .awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147:not(#\9):not(:last-child)::after {
|
|
195
195
|
border-end-end-radius: 0;
|
|
196
196
|
border-end-start-radius: 0;
|
|
197
197
|
border-block-end-width: 0;
|
|
198
198
|
}
|
|
199
|
-
.
|
|
199
|
+
.awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147 + .awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147:not(#\9), .awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147 + .awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147:not(#\9)::before, .awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147 + .awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147:not(#\9)::after {
|
|
200
200
|
border-start-start-radius: 0;
|
|
201
201
|
border-start-end-radius: 0;
|
|
202
202
|
}
|
|
203
|
-
.
|
|
203
|
+
.awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147 + .awsui_root_14iqq_1w0sy_103.awsui_variant-stacked_14iqq_1w0sy_147:not(#\9):not(.awsui_refresh_14iqq_1w0sy_155)::before {
|
|
204
204
|
border-block-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
205
205
|
}
|
|
206
|
-
.
|
|
206
|
+
.awsui_root_14iqq_1w0sy_103.awsui_sticky-enabled_14iqq_1w0sy_205:not(#\9):not(.awsui_refresh_14iqq_1w0sy_155)::before {
|
|
207
207
|
inset-block-start: calc(-1 * var(--border-container-top-width-uugwwl, 0px));
|
|
208
208
|
}
|
|
209
|
-
.
|
|
209
|
+
.awsui_root_14iqq_1w0sy_103.awsui_sticky-enabled_14iqq_1w0sy_205:not(#\9):not(.awsui_refresh_14iqq_1w0sy_155).awsui_variant-stacked_14iqq_1w0sy_147::before {
|
|
210
210
|
inset-block-start: calc(-1 * var(--border-divider-section-width-1061zr, 1px));
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
.awsui_with-side-
|
|
213
|
+
.awsui_with-side-media_14iqq_1w0sy_144:not(#\9) {
|
|
214
214
|
display: flex;
|
|
215
215
|
flex-direction: row;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
.awsui_with-top-
|
|
218
|
+
.awsui_with-top-media_14iqq_1w0sy_217:not(#\9) {
|
|
219
219
|
display: flex;
|
|
220
220
|
flex-direction: column;
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
.awsui_content-
|
|
223
|
+
.awsui_content-wrapper_14iqq_1w0sy_222:not(#\9) {
|
|
224
224
|
display: flex;
|
|
225
225
|
flex-direction: column;
|
|
226
226
|
inline-size: 100%;
|
|
227
227
|
}
|
|
228
|
-
.awsui_content-wrapper-fit-
|
|
228
|
+
.awsui_content-wrapper-fit-height_14iqq_1w0sy_227:not(#\9) {
|
|
229
229
|
block-size: 100%;
|
|
230
230
|
overflow: hidden;
|
|
231
231
|
border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
232
232
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
.
|
|
235
|
+
.awsui_media_14iqq_1w0sy_234:not(#\9) {
|
|
236
236
|
overflow: hidden;
|
|
237
237
|
flex-shrink: 0;
|
|
238
238
|
}
|
|
239
|
-
.
|
|
240
|
-
.
|
|
241
|
-
.
|
|
239
|
+
.awsui_media_14iqq_1w0sy_234 img:not(#\9),
|
|
240
|
+
.awsui_media_14iqq_1w0sy_234 video:not(#\9),
|
|
241
|
+
.awsui_media_14iqq_1w0sy_234 picture:not(#\9) {
|
|
242
242
|
inline-size: 100%;
|
|
243
243
|
block-size: 100%;
|
|
244
244
|
object-fit: cover;
|
|
245
245
|
object-position: center;
|
|
246
246
|
}
|
|
247
|
-
.
|
|
247
|
+
.awsui_media_14iqq_1w0sy_234 iframe:not(#\9) {
|
|
248
248
|
inline-size: 100%;
|
|
249
249
|
block-size: 100%;
|
|
250
250
|
border-block: 0;
|
|
251
251
|
border-inline: 0;
|
|
252
252
|
}
|
|
253
|
-
.awsui_media-
|
|
253
|
+
.awsui_media-top_14iqq_1w0sy_252:not(#\9) {
|
|
254
254
|
max-block-size: 66%;
|
|
255
255
|
border-start-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
256
256
|
border-start-end-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
257
257
|
}
|
|
258
|
-
.awsui_media-
|
|
258
|
+
.awsui_media-side_14iqq_1w0sy_257:not(#\9) {
|
|
259
259
|
max-inline-size: 66%;
|
|
260
260
|
border-start-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
261
261
|
border-end-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
.
|
|
264
|
+
.awsui_header_14iqq_1w0sy_263:not(#\9) {
|
|
265
265
|
background-color: var(--color-background-container-header-8b9fgi, #ffffff);
|
|
266
266
|
border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
267
267
|
border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
268
268
|
}
|
|
269
|
-
.
|
|
269
|
+
.awsui_header_14iqq_1w0sy_263.awsui_header-with-media_14iqq_1w0sy_268:not(#\9) {
|
|
270
270
|
background: none;
|
|
271
271
|
}
|
|
272
|
-
.
|
|
272
|
+
.awsui_header_14iqq_1w0sy_263.awsui_header-with-media_14iqq_1w0sy_268:not(#\9):not(:empty) {
|
|
273
273
|
border-block-end: none;
|
|
274
274
|
}
|
|
275
|
-
.awsui_header-sticky-
|
|
275
|
+
.awsui_header-sticky-disabled_14iqq_1w0sy_274:not(#\9) {
|
|
276
276
|
position: relative;
|
|
277
277
|
z-index: 1;
|
|
278
278
|
}
|
|
279
|
-
.awsui_header-sticky-
|
|
279
|
+
.awsui_header-sticky-enabled_14iqq_1w0sy_278:not(#\9) {
|
|
280
280
|
inset-block-start: 0;
|
|
281
281
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
282
282
|
position: sticky;
|
|
283
283
|
z-index: 800;
|
|
284
284
|
}
|
|
285
|
-
.awsui_header-
|
|
285
|
+
.awsui_header-stuck_14iqq_1w0sy_284:not(#\9) {
|
|
286
286
|
border-start-start-radius: 0;
|
|
287
287
|
border-start-end-radius: 0;
|
|
288
288
|
border-end-start-radius: 0;
|
|
289
289
|
border-end-end-radius: 0;
|
|
290
290
|
}
|
|
291
|
-
.awsui_header-
|
|
291
|
+
.awsui_header-stuck_14iqq_1w0sy_284:not(#\9)::before {
|
|
292
292
|
border-block: 0;
|
|
293
293
|
border-inline: 0;
|
|
294
294
|
}
|
|
295
|
-
.awsui_header-
|
|
295
|
+
.awsui_header-stuck_14iqq_1w0sy_284:not(#\9):not(.awsui_header-variant-cards_14iqq_1w0sy_294) {
|
|
296
296
|
box-shadow: var(--shadow-sticky-embedded-uvh5ry, 0px 2px 0px 0px #e9ebed, 0px 16px 16px -12px rgba(0, 7, 22, 0.1));
|
|
297
297
|
}
|
|
298
|
-
.awsui_header-dynamic-
|
|
298
|
+
.awsui_header-dynamic-height_14iqq_1w0sy_297.awsui_header-stuck_14iqq_1w0sy_284:not(#\9) {
|
|
299
299
|
margin-block-end: calc(var(--line-height-heading-xl-avbttk, 30px) - var(--line-height-heading-l-mmm3my, 24px));
|
|
300
300
|
}
|
|
301
|
-
.
|
|
301
|
+
.awsui_header_14iqq_1w0sy_263:not(#\9):not(:empty) {
|
|
302
302
|
border-block-end: var(--border-container-sticky-width-6asz33, 0px) solid var(--color-border-container-divider-p2uygo, transparent);
|
|
303
303
|
}
|
|
304
|
-
.
|
|
304
|
+
.awsui_header_14iqq_1w0sy_263.awsui_with-paddings_14iqq_1w0sy_303:not(#\9) {
|
|
305
305
|
padding-block-start: var(--space-container-header-top-5qav00, 12px);
|
|
306
306
|
padding-block-end: var(--space-container-header-bottom-vj01hn, 8px);
|
|
307
307
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
308
308
|
}
|
|
309
|
-
.
|
|
309
|
+
.awsui_header_14iqq_1w0sy_263.awsui_with-paddings_14iqq_1w0sy_303.awsui_header-variant-cards_14iqq_1w0sy_294:not(#\9) {
|
|
310
310
|
padding-block: var(--space-container-header-top-5qav00, 12px);
|
|
311
311
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
312
312
|
}
|
|
313
|
-
.
|
|
313
|
+
.awsui_header_14iqq_1w0sy_263.awsui_with-hidden-content_14iqq_1w0sy_312:not(#\9) {
|
|
314
314
|
border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
315
315
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
316
316
|
}
|
|
317
|
-
.awsui_header-variant-
|
|
317
|
+
.awsui_header-variant-cards_14iqq_1w0sy_294:not(#\9) {
|
|
318
318
|
border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
319
319
|
border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
320
320
|
border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
321
321
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
322
322
|
box-sizing: border-box;
|
|
323
323
|
}
|
|
324
|
-
.awsui_header-variant-
|
|
324
|
+
.awsui_header-variant-cards_14iqq_1w0sy_294.awsui_refresh_14iqq_1w0sy_155:not(#\9) {
|
|
325
325
|
border-block: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
326
326
|
border-inline: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
327
327
|
}
|
|
328
|
-
.awsui_header-variant-
|
|
328
|
+
.awsui_header-variant-cards_14iqq_1w0sy_294:not(#\9):not(.awsui_refresh_14iqq_1w0sy_155)::before {
|
|
329
329
|
content: "";
|
|
330
330
|
position: absolute;
|
|
331
331
|
inset-inline-start: 0px;
|
|
@@ -343,7 +343,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
343
343
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
344
344
|
z-index: 1;
|
|
345
345
|
}
|
|
346
|
-
.awsui_header-variant-
|
|
346
|
+
.awsui_header-variant-cards_14iqq_1w0sy_294:not(#\9):not(.awsui_refresh_14iqq_1w0sy_155)::after {
|
|
347
347
|
content: "";
|
|
348
348
|
position: absolute;
|
|
349
349
|
inset-inline-start: 0px;
|
|
@@ -359,19 +359,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
359
359
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
360
360
|
box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
|
|
361
361
|
}
|
|
362
|
-
.awsui_header-variant-
|
|
362
|
+
.awsui_header-variant-cards_14iqq_1w0sy_294:not(#\9):not(.awsui_header-sticky-enabled_14iqq_1w0sy_278) {
|
|
363
363
|
position: relative;
|
|
364
364
|
}
|
|
365
|
-
.awsui_header-variant-
|
|
365
|
+
.awsui_header-variant-cards_14iqq_1w0sy_294.awsui_header-stuck_14iqq_1w0sy_284:not(#\9)::after, .awsui_header-variant-cards_14iqq_1w0sy_294.awsui_header-stuck_14iqq_1w0sy_284:not(#\9)::before {
|
|
366
366
|
border-block: 0;
|
|
367
367
|
border-inline: 0;
|
|
368
368
|
border-start-start-radius: 0;
|
|
369
369
|
border-start-end-radius: 0;
|
|
370
370
|
}
|
|
371
|
-
.awsui_header-variant-full-
|
|
371
|
+
.awsui_header-variant-full-page_14iqq_1w0sy_370.awsui_with-toolbar_14iqq_1w0sy_370:not(#\9) {
|
|
372
|
+
padding-block-start: var(--space-scaled-s-aqzyko, 12px);
|
|
373
|
+
}
|
|
374
|
+
.awsui_header-variant-full-page_14iqq_1w0sy_370.awsui_header-stuck_14iqq_1w0sy_284:not(#\9) {
|
|
372
375
|
box-shadow: none;
|
|
373
376
|
}
|
|
374
|
-
.awsui_header-variant-full-
|
|
377
|
+
.awsui_header-variant-full-page_14iqq_1w0sy_370.awsui_header-stuck_14iqq_1w0sy_284:not(#\9)::before {
|
|
375
378
|
content: "";
|
|
376
379
|
position: absolute;
|
|
377
380
|
pointer-events: none;
|
|
@@ -381,7 +384,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
381
384
|
inset-block-start: 0;
|
|
382
385
|
border-block-end: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
383
386
|
}
|
|
384
|
-
.awsui_header-variant-full-
|
|
387
|
+
.awsui_header-variant-full-page_14iqq_1w0sy_370.awsui_header-stuck_14iqq_1w0sy_284:not(#\9)::after {
|
|
385
388
|
content: "";
|
|
386
389
|
position: absolute;
|
|
387
390
|
inset: 0;
|
|
@@ -389,27 +392,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
389
392
|
clip-path: polygon(-999% 100%, 999% 100%, 999% 999%, -999% 999%);
|
|
390
393
|
}
|
|
391
394
|
|
|
392
|
-
.
|
|
395
|
+
.awsui_content_14iqq_1w0sy_222:not(#\9) {
|
|
393
396
|
flex: 1;
|
|
394
397
|
}
|
|
395
|
-
.awsui_content-fit-
|
|
398
|
+
.awsui_content-fit-height_14iqq_1w0sy_397:not(#\9) {
|
|
396
399
|
overflow: auto;
|
|
397
400
|
}
|
|
398
|
-
.
|
|
401
|
+
.awsui_content_14iqq_1w0sy_222.awsui_with-paddings_14iqq_1w0sy_303:not(#\9) {
|
|
399
402
|
padding-block: var(--space-scaled-l-0hpmd7, 20px);
|
|
400
403
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
401
404
|
}
|
|
402
|
-
.
|
|
405
|
+
.awsui_header_14iqq_1w0sy_263 + .awsui_content_14iqq_1w0sy_222.awsui_with-paddings_14iqq_1w0sy_303:not(#\9) {
|
|
403
406
|
padding-block-start: var(--space-container-content-top-1ae0r3, 4px);
|
|
404
407
|
}
|
|
405
|
-
.
|
|
408
|
+
.awsui_header_14iqq_1w0sy_263 + .awsui_content_14iqq_1w0sy_222.awsui_with-paddings_14iqq_1w0sy_303.awsui_content-with-media_14iqq_1w0sy_407:not(#\9) {
|
|
406
409
|
padding-block-start: 0;
|
|
407
410
|
}
|
|
408
411
|
|
|
409
|
-
.
|
|
412
|
+
.awsui_footer_14iqq_1w0sy_411.awsui_with-paddings_14iqq_1w0sy_303:not(#\9) {
|
|
410
413
|
padding-block: var(--space-scaled-s-aqzyko, 12px);
|
|
411
414
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
412
415
|
}
|
|
413
|
-
.
|
|
416
|
+
.awsui_footer_14iqq_1w0sy_411.awsui_with-divider_14iqq_1w0sy_415:not(#\9) {
|
|
414
417
|
border-block-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
415
418
|
}
|
|
@@ -2,33 +2,34 @@
|
|
|
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
|
-
"fit-height": "awsui_fit-
|
|
7
|
-
"with-side-media": "awsui_with-side-
|
|
8
|
-
"variant-default": "awsui_variant-
|
|
9
|
-
"variant-stacked": "awsui_variant-
|
|
10
|
-
"refresh": "
|
|
11
|
-
"sticky-enabled": "awsui_sticky-
|
|
12
|
-
"with-top-media": "awsui_with-top-
|
|
13
|
-
"content-wrapper": "awsui_content-
|
|
14
|
-
"content-wrapper-fit-height": "awsui_content-wrapper-fit-
|
|
15
|
-
"media": "
|
|
16
|
-
"media-top": "awsui_media-
|
|
17
|
-
"media-side": "awsui_media-
|
|
18
|
-
"header": "
|
|
19
|
-
"header-with-media": "awsui_header-with-
|
|
20
|
-
"header-sticky-disabled": "awsui_header-sticky-
|
|
21
|
-
"header-sticky-enabled": "awsui_header-sticky-
|
|
22
|
-
"header-stuck": "awsui_header-
|
|
23
|
-
"header-variant-cards": "awsui_header-variant-
|
|
24
|
-
"header-dynamic-height": "awsui_header-dynamic-
|
|
25
|
-
"with-paddings": "awsui_with-
|
|
26
|
-
"with-hidden-content": "awsui_with-hidden-
|
|
27
|
-
"header-variant-full-page": "awsui_header-variant-full-
|
|
28
|
-
"
|
|
29
|
-
"content
|
|
30
|
-
"content-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
5
|
+
"root": "awsui_root_14iqq_1w0sy_103",
|
|
6
|
+
"fit-height": "awsui_fit-height_14iqq_1w0sy_139",
|
|
7
|
+
"with-side-media": "awsui_with-side-media_14iqq_1w0sy_144",
|
|
8
|
+
"variant-default": "awsui_variant-default_14iqq_1w0sy_147",
|
|
9
|
+
"variant-stacked": "awsui_variant-stacked_14iqq_1w0sy_147",
|
|
10
|
+
"refresh": "awsui_refresh_14iqq_1w0sy_155",
|
|
11
|
+
"sticky-enabled": "awsui_sticky-enabled_14iqq_1w0sy_205",
|
|
12
|
+
"with-top-media": "awsui_with-top-media_14iqq_1w0sy_217",
|
|
13
|
+
"content-wrapper": "awsui_content-wrapper_14iqq_1w0sy_222",
|
|
14
|
+
"content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_1w0sy_227",
|
|
15
|
+
"media": "awsui_media_14iqq_1w0sy_234",
|
|
16
|
+
"media-top": "awsui_media-top_14iqq_1w0sy_252",
|
|
17
|
+
"media-side": "awsui_media-side_14iqq_1w0sy_257",
|
|
18
|
+
"header": "awsui_header_14iqq_1w0sy_263",
|
|
19
|
+
"header-with-media": "awsui_header-with-media_14iqq_1w0sy_268",
|
|
20
|
+
"header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_1w0sy_274",
|
|
21
|
+
"header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_1w0sy_278",
|
|
22
|
+
"header-stuck": "awsui_header-stuck_14iqq_1w0sy_284",
|
|
23
|
+
"header-variant-cards": "awsui_header-variant-cards_14iqq_1w0sy_294",
|
|
24
|
+
"header-dynamic-height": "awsui_header-dynamic-height_14iqq_1w0sy_297",
|
|
25
|
+
"with-paddings": "awsui_with-paddings_14iqq_1w0sy_303",
|
|
26
|
+
"with-hidden-content": "awsui_with-hidden-content_14iqq_1w0sy_312",
|
|
27
|
+
"header-variant-full-page": "awsui_header-variant-full-page_14iqq_1w0sy_370",
|
|
28
|
+
"with-toolbar": "awsui_with-toolbar_14iqq_1w0sy_370",
|
|
29
|
+
"content": "awsui_content_14iqq_1w0sy_222",
|
|
30
|
+
"content-fit-height": "awsui_content-fit-height_14iqq_1w0sy_397",
|
|
31
|
+
"content-with-media": "awsui_content-with-media_14iqq_1w0sy_407",
|
|
32
|
+
"footer": "awsui_footer_14iqq_1w0sy_411",
|
|
33
|
+
"with-divider": "awsui_with-divider_14iqq_1w0sy_415"
|
|
33
34
|
};
|
|
34
35
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/date-range-picker/calendar/grids/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAqBlE,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,IAAI,CAAC;IACf,iBAAiB,EAAE,IAAI,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;IAE7B,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;IAEvE,aAAa,EAAE,oBAAoB,CAAC,qBAAqB,CAAC;IAC1D,YAAY,EAAE,OAAO,CAAC;IAEtB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAEpC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,QAAQ,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,KAAK,wMAkBf,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/date-range-picker/calendar/grids/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAqBlE,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,IAAI,CAAC;IACf,iBAAiB,EAAE,IAAI,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;IAE7B,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;IAEvE,aAAa,EAAE,oBAAoB,CAAC,qBAAqB,CAAC;IAC1D,YAAY,EAAE,OAAO,CAAC;IAEtB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAEpC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,QAAQ,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,KAAK,wMAkBf,SAAS,gBAkIX,CAAC"}
|
|
@@ -68,14 +68,6 @@ export const Grids = ({ baseDate, selectedStartDate, selectedEndDate, focusedDat
|
|
|
68
68
|
}, [focusedDate, gridHasFocus]);
|
|
69
69
|
const onGridBlur = (event) => {
|
|
70
70
|
var _a;
|
|
71
|
-
/*
|
|
72
|
-
IE11 does not support event.relatedTarget, but sets document.activeElement to the newly
|
|
73
|
-
focused element before the onBlur handler is called.
|
|
74
|
-
|
|
75
|
-
However, other browsers do not make any guarantees for the value of document.activeElement
|
|
76
|
-
during the execution of an onBlur handler. Therefore, we have to use event.relatedTarget
|
|
77
|
-
instead.
|
|
78
|
-
*/
|
|
79
71
|
const newFocusTarget = event.relatedTarget || document.activeElement;
|
|
80
72
|
const newFocusTargetIsInGrid = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.contains(newFocusTarget);
|
|
81
73
|
if (newFocusTarget && !newFocusTargetIsInGrid && gridHasFocus) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/date-range-picker/calendar/grids/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAG/E,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACtH,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,SAAS,MAAM,oCAAoC,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cAAc,EAAE,GAAG,eAAe,YAAY,GAC9C,CACH;YACD,oBAAC,IAAI,IACH,SAAS,EAAE,MAAM,CAAC,aAAa,CAAC,EAChC,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,EACtD,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAClD,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,YAAY,EAC1B,oBAAoB,EAAE,oBAAoB,EAC1C,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,GAAG,eAAe,eAAe,GACjD,CACmB,CACnB,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport { KeyCode } from '../../../internal/keycode';\nimport { isSameMonth, isAfter, isBefore, addMonths, min, max } from 'date-fns';\n\nimport { DateRangePickerProps, DayIndex } from '../../interfaces';\nimport InternalSpaceBetween from '../../../space-between/internal';\nimport { Grid } from './grid';\nimport styles from '../../styles.css.js';\n\nimport { hasValue } from '../../../internal/utils/has-value';\nimport { useDateCache } from '../../../internal/hooks/use-date-cache';\nimport { moveNextDay, movePrevDay, moveNextWeek, movePrevWeek, getBaseDay } from '../../../calendar/utils/navigation';\nimport { findDateToFocus } from '../utils';\nimport handleKey from '../../../internal/utils/handle-key';\n\nfunction isVisible(date: Date, baseDate: Date, isSingleGrid: boolean) {\n if (isSingleGrid) {\n return isSameMonth(date, baseDate);\n }\n\n const previousMonth = addMonths(baseDate, -1);\n\n return isSameMonth(date, previousMonth) || isSameMonth(date, baseDate);\n}\n\nexport interface GridProps {\n baseDate: Date;\n selectedStartDate: Date | null;\n selectedEndDate: Date | null;\n\n focusedDate: Date | null;\n onFocusedDateChange: React.Dispatch<React.SetStateAction<Date | null>>;\n\n isDateEnabled: DateRangePickerProps.IsDateEnabledFunction;\n isSingleGrid: boolean;\n\n onSelectDate: (date: Date) => void;\n onChangeMonth: (date: Date) => void;\n\n locale: string;\n startOfWeek: DayIndex;\n todayAriaLabel?: string;\n headingIdPrefix: string;\n}\n\nexport const Grids = ({\n baseDate,\n selectedStartDate,\n selectedEndDate,\n\n focusedDate,\n onFocusedDateChange,\n\n isDateEnabled,\n isSingleGrid,\n\n onSelectDate,\n onChangeMonth,\n\n locale,\n startOfWeek,\n todayAriaLabel,\n headingIdPrefix,\n}: GridProps) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const [gridHasFocus, setGridHasFocus] = useState(false);\n\n const focusedDateRef = useRef<HTMLTableCellElement>(null);\n\n const dateCache = useDateCache();\n baseDate = dateCache(baseDate);\n focusedDate = focusedDate ? dateCache(focusedDate) : null;\n\n useEffect(() => {\n if (focusedDate && !isVisible(focusedDate, baseDate, isSingleGrid)) {\n const direction = isAfter(focusedDate, baseDate) ? -1 : 1;\n\n const newMonth = !isSingleGrid && direction === -1 ? addMonths(baseDate, -1) : baseDate;\n const nearestBaseDate = getBaseDay(newMonth, isDateEnabled);\n\n const newFocusedDate = findDateToFocus(focusedDate, nearestBaseDate, isDateEnabled);\n\n onFocusedDateChange(newFocusedDate);\n }\n }, [baseDate, focusedDate, isSingleGrid, isDateEnabled, onFocusedDateChange]);\n\n const onGridKeyDownHandler = (event: React.KeyboardEvent<HTMLElement>) => {\n let updatedFocusDate;\n\n const keys = [KeyCode.up, KeyCode.down, KeyCode.left, KeyCode.right, KeyCode.space, KeyCode.enter];\n\n if (focusedDate === null || keys.indexOf(event.keyCode) === -1) {\n return;\n }\n\n event.preventDefault();\n\n handleKey(event, {\n onActivate: () => focusedDate && onSelectDate(focusedDate),\n onBlockEnd: () => focusedDate && (updatedFocusDate = moveNextWeek(focusedDate, isDateEnabled)),\n onBlockStart: () => focusedDate && (updatedFocusDate = movePrevWeek(focusedDate, isDateEnabled)),\n onInlineEnd: () => focusedDate && (updatedFocusDate = moveNextDay(focusedDate, isDateEnabled)),\n onInlineStart: () => focusedDate && (updatedFocusDate = movePrevDay(focusedDate, isDateEnabled)),\n });\n\n if (!updatedFocusDate) {\n return;\n }\n\n const updatedDateIsVisible = isVisible(updatedFocusDate, baseDate, isSingleGrid);\n\n if (!updatedDateIsVisible) {\n const newMonthIsOnLeftSide = !isSingleGrid && isBefore(updatedFocusDate, baseDate);\n\n onChangeMonth(newMonthIsOnLeftSide ? addMonths(updatedFocusDate, 1) : updatedFocusDate);\n }\n onFocusedDateChange(updatedFocusDate);\n };\n\n useEffect(() => {\n // focus current date if the focus is already inside the calendar\n if (focusedDate !== null && gridHasFocus) {\n if (focusedDateRef.current && focusedDateRef.current !== document.activeElement) {\n focusedDateRef.current.focus();\n }\n }\n }, [focusedDate, gridHasFocus]);\n\n const onGridBlur = (event: React.FocusEvent) => {\n /*\n IE11 does not support event.relatedTarget, but sets document.activeElement to the newly\n focused element before the onBlur handler is called.\n\n However, other browsers do not make any guarantees for the value of document.activeElement\n during the execution of an onBlur handler. Therefore, we have to use event.relatedTarget\n instead.\n */\n const newFocusTarget = event.relatedTarget || document.activeElement;\n const newFocusTargetIsInGrid = containerRef.current?.contains(newFocusTarget as Node);\n if (newFocusTarget && !newFocusTargetIsInGrid && gridHasFocus) {\n setGridHasFocus(false);\n }\n };\n\n const onGridFocus = () => {\n if (!gridHasFocus) {\n setGridHasFocus(true);\n }\n };\n\n const isRangeVisible = (selectedStartDate && selectedEndDate) || gridHasFocus;\n\n const rangeEnds: Date[] = [selectedStartDate ?? focusedDate, selectedEndDate ?? focusedDate].filter(hasValue);\n\n const rangeStartDate = min(rangeEnds);\n const rangeEndDate = max(rangeEnds);\n\n return (\n <div ref={containerRef} onFocus={onGridFocus} onBlur={onGridBlur}>\n <InternalSpaceBetween size=\"xs\" direction=\"horizontal\">\n {!isSingleGrid && (\n <Grid\n className={styles['first-grid']}\n baseDate={addMonths(baseDate, -1)}\n selectedEndDate={selectedEndDate}\n selectedStartDate={selectedStartDate}\n rangeStartDate={isRangeVisible ? rangeStartDate : null}\n rangeEndDate={isRangeVisible ? rangeEndDate : null}\n focusedDate={focusedDate}\n focusedDateRef={focusedDateRef}\n isDateEnabled={isDateEnabled}\n onSelectDate={onSelectDate}\n onGridKeyDownHandler={onGridKeyDownHandler}\n onFocusedDateChange={onFocusedDateChange}\n locale={locale}\n startOfWeek={startOfWeek}\n todayAriaLabel={todayAriaLabel}\n ariaLabelledby={`${headingIdPrefix}-prevmonth`}\n />\n )}\n <Grid\n className={styles['second-grid']}\n baseDate={baseDate}\n selectedEndDate={selectedEndDate}\n selectedStartDate={selectedStartDate}\n rangeStartDate={isRangeVisible ? rangeStartDate : null}\n rangeEndDate={isRangeVisible ? rangeEndDate : null}\n focusedDate={focusedDate}\n focusedDateRef={focusedDateRef}\n isDateEnabled={isDateEnabled}\n onSelectDate={onSelectDate}\n onGridKeyDownHandler={onGridKeyDownHandler}\n onFocusedDateChange={onFocusedDateChange}\n locale={locale}\n startOfWeek={startOfWeek}\n todayAriaLabel={todayAriaLabel}\n ariaLabelledby={`${headingIdPrefix}-currentmonth`}\n />\n </InternalSpaceBetween>\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/date-range-picker/calendar/grids/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,S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AAC,CAAC,CAAC,EACjC,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,EACtD,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAClD,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,YAAY,EAC1B,oBAAoB,EAAE,oBAAoB,EAC1C,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,GAAG,eAAe,YAAY,GAC9C,CACH;YACD,oBAAC,IAAI,IACH,SAAS,EAAE,MAAM,CAAC,aAAa,CAAC,EAChC,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,EACtD,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAClD,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,YAAY,EAC1B,oBAAoB,EAAE,oBAAoB,EAC1C,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,GAAG,eAAe,eAAe,GACjD,CACmB,CACnB,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport { KeyCode } from '../../../internal/keycode';\nimport { isSameMonth, isAfter, isBefore, addMonths, min, max } from 'date-fns';\n\nimport { DateRangePickerProps, DayIndex } from '../../interfaces';\nimport InternalSpaceBetween from '../../../space-between/internal';\nimport { Grid } from './grid';\nimport styles from '../../styles.css.js';\n\nimport { hasValue } from '../../../internal/utils/has-value';\nimport { useDateCache } from '../../../internal/hooks/use-date-cache';\nimport { moveNextDay, movePrevDay, moveNextWeek, movePrevWeek, getBaseDay } from '../../../calendar/utils/navigation';\nimport { findDateToFocus } from '../utils';\nimport handleKey from '../../../internal/utils/handle-key';\n\nfunction isVisible(date: Date, baseDate: Date, isSingleGrid: boolean) {\n if (isSingleGrid) {\n return isSameMonth(date, baseDate);\n }\n\n const previousMonth = addMonths(baseDate, -1);\n\n return isSameMonth(date, previousMonth) || isSameMonth(date, baseDate);\n}\n\nexport interface GridProps {\n baseDate: Date;\n selectedStartDate: Date | null;\n selectedEndDate: Date | null;\n\n focusedDate: Date | null;\n onFocusedDateChange: React.Dispatch<React.SetStateAction<Date | null>>;\n\n isDateEnabled: DateRangePickerProps.IsDateEnabledFunction;\n isSingleGrid: boolean;\n\n onSelectDate: (date: Date) => void;\n onChangeMonth: (date: Date) => void;\n\n locale: string;\n startOfWeek: DayIndex;\n todayAriaLabel?: string;\n headingIdPrefix: string;\n}\n\nexport const Grids = ({\n baseDate,\n selectedStartDate,\n selectedEndDate,\n\n focusedDate,\n onFocusedDateChange,\n\n isDateEnabled,\n isSingleGrid,\n\n onSelectDate,\n onChangeMonth,\n\n locale,\n startOfWeek,\n todayAriaLabel,\n headingIdPrefix,\n}: GridProps) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const [gridHasFocus, setGridHasFocus] = useState(false);\n\n const focusedDateRef = useRef<HTMLTableCellElement>(null);\n\n const dateCache = useDateCache();\n baseDate = dateCache(baseDate);\n focusedDate = focusedDate ? dateCache(focusedDate) : null;\n\n useEffect(() => {\n if (focusedDate && !isVisible(focusedDate, baseDate, isSingleGrid)) {\n const direction = isAfter(focusedDate, baseDate) ? -1 : 1;\n\n const newMonth = !isSingleGrid && direction === -1 ? addMonths(baseDate, -1) : baseDate;\n const nearestBaseDate = getBaseDay(newMonth, isDateEnabled);\n\n const newFocusedDate = findDateToFocus(focusedDate, nearestBaseDate, isDateEnabled);\n\n onFocusedDateChange(newFocusedDate);\n }\n }, [baseDate, focusedDate, isSingleGrid, isDateEnabled, onFocusedDateChange]);\n\n const onGridKeyDownHandler = (event: React.KeyboardEvent<HTMLElement>) => {\n let updatedFocusDate;\n\n const keys = [KeyCode.up, KeyCode.down, KeyCode.left, KeyCode.right, KeyCode.space, KeyCode.enter];\n\n if (focusedDate === null || keys.indexOf(event.keyCode) === -1) {\n return;\n }\n\n event.preventDefault();\n\n handleKey(event, {\n onActivate: () => focusedDate && onSelectDate(focusedDate),\n onBlockEnd: () => focusedDate && (updatedFocusDate = moveNextWeek(focusedDate, isDateEnabled)),\n onBlockStart: () => focusedDate && (updatedFocusDate = movePrevWeek(focusedDate, isDateEnabled)),\n onInlineEnd: () => focusedDate && (updatedFocusDate = moveNextDay(focusedDate, isDateEnabled)),\n onInlineStart: () => focusedDate && (updatedFocusDate = movePrevDay(focusedDate, isDateEnabled)),\n });\n\n if (!updatedFocusDate) {\n return;\n }\n\n const updatedDateIsVisible = isVisible(updatedFocusDate, baseDate, isSingleGrid);\n\n if (!updatedDateIsVisible) {\n const newMonthIsOnLeftSide = !isSingleGrid && isBefore(updatedFocusDate, baseDate);\n\n onChangeMonth(newMonthIsOnLeftSide ? addMonths(updatedFocusDate, 1) : updatedFocusDate);\n }\n onFocusedDateChange(updatedFocusDate);\n };\n\n useEffect(() => {\n // focus current date if the focus is already inside the calendar\n if (focusedDate !== null && gridHasFocus) {\n if (focusedDateRef.current && focusedDateRef.current !== document.activeElement) {\n focusedDateRef.current.focus();\n }\n }\n }, [focusedDate, gridHasFocus]);\n\n const onGridBlur = (event: React.FocusEvent) => {\n const newFocusTarget = event.relatedTarget || document.activeElement;\n const newFocusTargetIsInGrid = containerRef.current?.contains(newFocusTarget as Node);\n if (newFocusTarget && !newFocusTargetIsInGrid && gridHasFocus) {\n setGridHasFocus(false);\n }\n };\n\n const onGridFocus = () => {\n if (!gridHasFocus) {\n setGridHasFocus(true);\n }\n };\n\n const isRangeVisible = (selectedStartDate && selectedEndDate) || gridHasFocus;\n\n const rangeEnds: Date[] = [selectedStartDate ?? focusedDate, selectedEndDate ?? focusedDate].filter(hasValue);\n\n const rangeStartDate = min(rangeEnds);\n const rangeEndDate = max(rangeEnds);\n\n return (\n <div ref={containerRef} onFocus={onGridFocus} onBlur={onGridBlur}>\n <InternalSpaceBetween size=\"xs\" direction=\"horizontal\">\n {!isSingleGrid && (\n <Grid\n className={styles['first-grid']}\n baseDate={addMonths(baseDate, -1)}\n selectedEndDate={selectedEndDate}\n selectedStartDate={selectedStartDate}\n rangeStartDate={isRangeVisible ? rangeStartDate : null}\n rangeEndDate={isRangeVisible ? rangeEndDate : null}\n focusedDate={focusedDate}\n focusedDateRef={focusedDateRef}\n isDateEnabled={isDateEnabled}\n onSelectDate={onSelectDate}\n onGridKeyDownHandler={onGridKeyDownHandler}\n onFocusedDateChange={onFocusedDateChange}\n locale={locale}\n startOfWeek={startOfWeek}\n todayAriaLabel={todayAriaLabel}\n ariaLabelledby={`${headingIdPrefix}-prevmonth`}\n />\n )}\n <Grid\n className={styles['second-grid']}\n baseDate={baseDate}\n selectedEndDate={selectedEndDate}\n selectedStartDate={selectedStartDate}\n rangeStartDate={isRangeVisible ? rangeStartDate : null}\n rangeEndDate={isRangeVisible ? rangeEndDate : null}\n focusedDate={focusedDate}\n focusedDateRef={focusedDateRef}\n isDateEnabled={isDateEnabled}\n onSelectDate={onSelectDate}\n onGridKeyDownHandler={onGridKeyDownHandler}\n onFocusedDateChange={onFocusedDateChange}\n locale={locale}\n startOfWeek={startOfWeek}\n todayAriaLabel={todayAriaLabel}\n ariaLabelledby={`${headingIdPrefix}-currentmonth`}\n />\n </InternalSpaceBetween>\n </div>\n );\n};\n"]}
|
package/form/interfaces.d.ts
CHANGED
|
@@ -28,15 +28,10 @@ export interface FormProps extends BaseComponentProps {
|
|
|
28
28
|
secondaryActions?: React.ReactNode;
|
|
29
29
|
/**
|
|
30
30
|
* Specify a form variant with one of the following:
|
|
31
|
-
* * `full-page` - Use this variant when the form contains the entire content of the page.
|
|
32
|
-
* * `embedded` - Use this variant when the form doesn't occupy the full page.
|
|
33
|
-
* @
|
|
31
|
+
* * `full-page` - Use this variant when the form contains the entire content of the page.
|
|
32
|
+
* * `embedded` - Use this variant when the form doesn't occupy the full page.
|
|
33
|
+
* @deprecated You can safely remove this property as there is no longer any visual difference between `full-page` and `embedded` variants.
|
|
34
34
|
*/
|
|
35
35
|
variant?: 'full-page' | 'embedded';
|
|
36
36
|
}
|
|
37
|
-
export interface FormLayoutProps {
|
|
38
|
-
children?: React.ReactNode;
|
|
39
|
-
header?: React.ReactNode;
|
|
40
|
-
variant: FormProps['variant'];
|
|
41
|
-
}
|
|
42
37
|
//# sourceMappingURL=interfaces.d.ts.map
|
package/form/interfaces.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/form/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,SAAU,SAAQ,kBAAkB;IACnD;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;CACpC
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/form/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,SAAU,SAAQ,kBAAkB;IACnD;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;CACpC"}
|
package/form/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/form/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';\n\nexport interface FormProps extends BaseComponentProps {\n /**\n * Specifies the main form content.\n */\n children?: React.ReactNode;\n\n /**\n * Specifies the form title and optional description. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Specifies a form-level validation message.\n */\n errorText?: React.ReactNode;\n\n /**\n * Provides a text alternative for the error icon in the error alert.\n * @i18n\n */\n errorIconAriaLabel?: string;\n\n /**\n * Specifies actions for the form. You should wrap action buttons in a [space between component](/components/space-between) with `direction=\"horizontal\"` and `size=\"xs\"`.\n */\n actions?: React.ReactNode;\n\n /**\n * Specifies left-aligned secondary actions for the form. Use a button dropdown if multiple actions are required.\n */\n secondaryActions?: React.ReactNode;\n\n /**\n * Specify a form variant with one of the following:\n * * `full-page` - Use this variant when the form contains the entire content of the page
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/form/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';\n\nexport interface FormProps extends BaseComponentProps {\n /**\n * Specifies the main form content.\n */\n children?: React.ReactNode;\n\n /**\n * Specifies the form title and optional description. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Specifies a form-level validation message.\n */\n errorText?: React.ReactNode;\n\n /**\n * Provides a text alternative for the error icon in the error alert.\n * @i18n\n */\n errorIconAriaLabel?: string;\n\n /**\n * Specifies actions for the form. You should wrap action buttons in a [space between component](/components/space-between) with `direction=\"horizontal\"` and `size=\"xs\"`.\n */\n actions?: React.ReactNode;\n\n /**\n * Specifies left-aligned secondary actions for the form. Use a button dropdown if multiple actions are required.\n */\n secondaryActions?: React.ReactNode;\n\n /**\n * Specify a form variant with one of the following:\n * * `full-page` - Use this variant when the form contains the entire content of the page.\n * * `embedded` - Use this variant when the form doesn't occupy the full page.\n * @deprecated You can safely remove this property as there is no longer any visual difference between `full-page` and `embedded` variants.\n */\n variant?: 'full-page' | 'embedded';\n}\n"]}
|
package/form/internal.d.ts
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import { FormProps } from './interfaces';
|
|
3
3
|
import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
|
|
4
4
|
type InternalFormProps = FormProps & InternalBaseComponentProps;
|
|
5
|
-
export default function InternalForm({ children, header, errorText, errorIconAriaLabel: errorIconAriaLabelOverride, actions, secondaryActions,
|
|
5
|
+
export default function InternalForm({ children, header, errorText, errorIconAriaLabel: errorIconAriaLabelOverride, actions, secondaryActions, __internalRootRef, ...props }: InternalFormProps): JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=internal.d.ts.map
|
package/form/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/form/internal.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/form/internal.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,KAAK,iBAAiB,GAAG,SAAS,GAAG,0BAA0B,CAAC;AAEhE,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,QAAQ,EACR,MAAM,EACN,SAAS,EACT,kBAAkB,EAAE,0BAA0B,EAC9C,OAAO,EACP,gBAAgB,EAChB,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,iBAAiB,eA+BnB"}
|
package/form/internal.js
CHANGED
|
@@ -6,33 +6,27 @@ import clsx from 'clsx';
|
|
|
6
6
|
import { getBaseProps } from '../internal/base-component';
|
|
7
7
|
import InternalAlert from '../alert/internal';
|
|
8
8
|
import InternalBox from '../box/internal';
|
|
9
|
-
import InternalContentLayout from '../content-layout/internal';
|
|
10
9
|
import styles from './styles.css.js';
|
|
11
10
|
import LiveRegion from '../internal/components/live-region';
|
|
12
11
|
import { useInternalI18n } from '../i18n/context';
|
|
13
12
|
export default function InternalForm(_a) {
|
|
14
|
-
var { children, header, errorText, errorIconAriaLabel: errorIconAriaLabelOverride, actions, secondaryActions,
|
|
13
|
+
var { children, header, errorText, errorIconAriaLabel: errorIconAriaLabelOverride, actions, secondaryActions, __internalRootRef } = _a, props = __rest(_a, ["children", "header", "errorText", "errorIconAriaLabel", "actions", "secondaryActions", "__internalRootRef"]);
|
|
15
14
|
const baseProps = getBaseProps(props);
|
|
16
15
|
const i18n = useInternalI18n('form');
|
|
17
16
|
const errorIconAriaLabel = i18n('errorIconAriaLabel', errorIconAriaLabelOverride);
|
|
18
17
|
return (React.createElement("div", Object.assign({}, baseProps, { ref: __internalRootRef, className: clsx(styles.root, baseProps.className) }),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
function FormLayout({ children, header, variant }) {
|
|
34
|
-
return variant === 'full-page' && header ? (React.createElement(InternalContentLayout, { header: header }, children)) : (React.createElement(React.Fragment, null,
|
|
35
|
-
header,
|
|
36
|
-
children));
|
|
18
|
+
header && React.createElement("div", { className: styles.header }, header),
|
|
19
|
+
children && React.createElement("div", { className: styles.content }, children),
|
|
20
|
+
errorText && (React.createElement(InternalBox, { margin: { top: 'l' } },
|
|
21
|
+
React.createElement(InternalAlert, { type: "error", statusIconAriaLabel: errorIconAriaLabel },
|
|
22
|
+
React.createElement("div", { className: styles.error }, errorText)))),
|
|
23
|
+
(actions || secondaryActions) && (React.createElement("div", { className: styles.footer },
|
|
24
|
+
React.createElement("div", { className: styles['actions-section'] },
|
|
25
|
+
actions && React.createElement("div", { className: styles.actions }, actions),
|
|
26
|
+
secondaryActions && React.createElement("div", { className: styles['secondary-actions'] }, secondaryActions)))),
|
|
27
|
+
errorText && (React.createElement(LiveRegion, { assertive: true },
|
|
28
|
+
errorIconAriaLabel,
|
|
29
|
+
", ",
|
|
30
|
+
errorText))));
|
|
37
31
|
}
|
|
38
32
|
//# sourceMappingURL=internal.js.map
|
package/form/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/form/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/form/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAGrC,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIlD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EASjB;QATiB,EACnC,QAAQ,EACR,MAAM,EACN,SAAS,EACT,kBAAkB,EAAE,0BAA0B,EAC9C,OAAO,EACP,gBAAgB,EAChB,iBAAiB,OAEC,EADf,KAAK,cAR2B,6GASpC,CADS;IAER,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,kBAAkB,GAAG,IAAI,CAAC,oBAAoB,EAAE,0BAA0B,CAAC,CAAC;IAElF,OAAO,CACL,6CAAS,SAAS,IAAE,GAAG,EAAE,iBAAiB,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC;QAC1F,MAAM,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,MAAM,IAAG,MAAM,CAAO;QACvD,QAAQ,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,QAAQ,CAAO;QAC5D,SAAS,IAAI,CACZ,oBAAC,WAAW,IAAC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE;YAC/B,oBAAC,aAAa,IAAC,IAAI,EAAC,OAAO,EAAC,mBAAmB,EAAE,kBAAkB;gBACjE,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK,IAAG,SAAS,CAAO,CACjC,CACJ,CACf;QACA,CAAC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAChC,6BAAK,SAAS,EAAE,MAAM,CAAC,MAAM;YAC3B,6BAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC;gBACtC,OAAO,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,OAAO,CAAO;gBAC1D,gBAAgB,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,mBAAmB,CAAC,IAAG,gBAAgB,CAAO,CACtF,CACF,CACP;QACA,SAAS,IAAI,CACZ,oBAAC,UAAU,IAAC,SAAS,EAAE,IAAI;YACxB,kBAAkB;;YAAI,SAAS,CACrB,CACd,CACG,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 { getBaseProps } from '../internal/base-component';\nimport InternalAlert from '../alert/internal';\nimport InternalBox from '../box/internal';\nimport styles from './styles.css.js';\nimport { FormProps } from './interfaces';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport LiveRegion from '../internal/components/live-region';\nimport { useInternalI18n } from '../i18n/context';\n\ntype InternalFormProps = FormProps & InternalBaseComponentProps;\n\nexport default function InternalForm({\n children,\n header,\n errorText,\n errorIconAriaLabel: errorIconAriaLabelOverride,\n actions,\n secondaryActions,\n __internalRootRef,\n ...props\n}: InternalFormProps) {\n const baseProps = getBaseProps(props);\n const i18n = useInternalI18n('form');\n const errorIconAriaLabel = i18n('errorIconAriaLabel', errorIconAriaLabelOverride);\n\n return (\n <div {...baseProps} ref={__internalRootRef} className={clsx(styles.root, baseProps.className)}>\n {header && <div className={styles.header}>{header}</div>}\n {children && <div className={styles.content}>{children}</div>}\n {errorText && (\n <InternalBox margin={{ top: 'l' }}>\n <InternalAlert type=\"error\" statusIconAriaLabel={errorIconAriaLabel}>\n <div className={styles.error}>{errorText}</div>\n </InternalAlert>\n </InternalBox>\n )}\n {(actions || secondaryActions) && (\n <div className={styles.footer}>\n <div className={styles['actions-section']}>\n {actions && <div className={styles.actions}>{actions}</div>}\n {secondaryActions && <div className={styles['secondary-actions']}>{secondaryActions}</div>}\n </div>\n </div>\n )}\n {errorText && (\n <LiveRegion assertive={true}>\n {errorIconAriaLabel}, {errorText}\n </LiveRegion>\n )}\n </div>\n );\n}\n"]}
|
package/form/styles.css.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"header": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"actions
|
|
11
|
-
"
|
|
12
|
-
"actions": "awsui_actions_1i0s3_19kut_150"
|
|
4
|
+
"root": "awsui_root_1i0s3_v66hz_99",
|
|
5
|
+
"header": "awsui_header_1i0s3_v66hz_134",
|
|
6
|
+
"content": "awsui_content_1i0s3_v66hz_138",
|
|
7
|
+
"error": "awsui_error_1i0s3_v66hz_142",
|
|
8
|
+
"footer": "awsui_footer_1i0s3_v66hz_146",
|
|
9
|
+
"actions-section": "awsui_actions-section_1i0s3_v66hz_150",
|
|
10
|
+
"secondary-actions": "awsui_secondary-actions_1i0s3_v66hz_159",
|
|
11
|
+
"actions": "awsui_actions_1i0s3_v66hz_150"
|
|
13
12
|
};
|
|
14
13
|
|