@cloudscape-design/components 3.0.640 → 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.
Files changed (123) hide show
  1. package/app-layout/drawer/index.js +1 -1
  2. package/app-layout/drawer/index.js.map +1 -1
  3. package/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
  4. package/app-layout/drawer/resizable-drawer.js +2 -5
  5. package/app-layout/drawer/resizable-drawer.js.map +1 -1
  6. package/app-layout/drawer/styles.css.js +13 -12
  7. package/app-layout/drawer/styles.scoped.css +30 -20
  8. package/app-layout/drawer/styles.selectors.js +13 -12
  9. package/app-layout/utils/use-resize.d.ts.map +1 -1
  10. package/app-layout/utils/use-resize.js +3 -7
  11. package/app-layout/utils/use-resize.js.map +1 -1
  12. package/app-layout/visual-refresh/drawers.js +1 -1
  13. package/app-layout/visual-refresh/drawers.js.map +1 -1
  14. package/app-layout/visual-refresh/split-panel.d.ts.map +1 -1
  15. package/app-layout/visual-refresh/split-panel.js +1 -3
  16. package/app-layout/visual-refresh/split-panel.js.map +1 -1
  17. package/autosuggest/plain-list.d.ts.map +1 -1
  18. package/autosuggest/plain-list.js +1 -3
  19. package/autosuggest/plain-list.js.map +1 -1
  20. package/autosuggest/virtual-list.d.ts.map +1 -1
  21. package/autosuggest/virtual-list.js +1 -3
  22. package/autosuggest/virtual-list.js.map +1 -1
  23. package/calendar/utils/intl.d.ts.map +1 -1
  24. package/calendar/utils/intl.js +0 -3
  25. package/calendar/utils/intl.js.map +1 -1
  26. package/container/internal.d.ts.map +1 -1
  27. package/container/internal.js +3 -0
  28. package/container/internal.js.map +1 -1
  29. package/container/styles.css.js +29 -28
  30. package/container/styles.scoped.css +55 -52
  31. package/container/styles.selectors.js +29 -28
  32. package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
  33. package/date-range-picker/calendar/grids/index.js +0 -8
  34. package/date-range-picker/calendar/grids/index.js.map +1 -1
  35. package/form/interfaces.d.ts +3 -8
  36. package/form/interfaces.d.ts.map +1 -1
  37. package/form/interfaces.js.map +1 -1
  38. package/form/internal.d.ts +1 -1
  39. package/form/internal.d.ts.map +1 -1
  40. package/form/internal.js +14 -20
  41. package/form/internal.js.map +1 -1
  42. package/form/styles.css.js +8 -9
  43. package/form/styles.scoped.css +8 -8
  44. package/form/styles.selectors.js +8 -9
  45. package/header/internal.d.ts.map +1 -1
  46. package/header/internal.js +1 -3
  47. package/header/internal.js.map +1 -1
  48. package/header/styles.css.js +34 -35
  49. package/header/styles.scoped.css +50 -53
  50. package/header/styles.selectors.js +34 -35
  51. package/input/styles.css.js +13 -13
  52. package/input/styles.scoped.css +32 -35
  53. package/input/styles.selectors.js +13 -13
  54. package/internal/components/chart-plot/application-controller.js +3 -13
  55. package/internal/components/chart-plot/application-controller.js.map +1 -1
  56. package/internal/components/dropdown/index.d.ts.map +1 -1
  57. package/internal/components/dropdown/index.js +0 -2
  58. package/internal/components/dropdown/index.js.map +1 -1
  59. package/internal/components/dropdown/styles.css.js +20 -20
  60. package/internal/components/dropdown/styles.scoped.css +39 -45
  61. package/internal/components/dropdown/styles.selectors.js +20 -20
  62. package/internal/components/panel-resize-handle/icon.d.ts +5 -0
  63. package/internal/components/panel-resize-handle/icon.d.ts.map +1 -0
  64. package/internal/components/panel-resize-handle/icon.js +9 -0
  65. package/internal/components/panel-resize-handle/icon.js.map +1 -0
  66. package/internal/components/panel-resize-handle/index.d.ts +12 -0
  67. package/internal/components/panel-resize-handle/index.d.ts.map +1 -0
  68. package/internal/components/panel-resize-handle/index.js +11 -0
  69. package/internal/components/panel-resize-handle/index.js.map +1 -0
  70. package/internal/components/panel-resize-handle/styles.css.js +10 -0
  71. package/internal/components/panel-resize-handle/styles.scoped.css +153 -0
  72. package/internal/components/panel-resize-handle/styles.selectors.js +11 -0
  73. package/internal/context/single-tab-stop-navigation-context.js +2 -2
  74. package/internal/context/single-tab-stop-navigation-context.js.map +1 -1
  75. package/internal/environment.js +1 -1
  76. package/internal/environment.json +1 -1
  77. package/internal/manifest.json +1 -1
  78. package/internal/utils/content-header-utils.d.ts +0 -2
  79. package/internal/utils/content-header-utils.d.ts.map +1 -1
  80. package/internal/utils/content-header-utils.js +0 -3
  81. package/internal/utils/content-header-utils.js.map +1 -1
  82. package/internal/utils/dom.d.ts.map +1 -1
  83. package/internal/utils/dom.js +7 -27
  84. package/internal/utils/dom.js.map +1 -1
  85. package/internal/utils/global-flags.d.ts +0 -1
  86. package/internal/utils/global-flags.d.ts.map +1 -1
  87. package/internal/utils/global-flags.js.map +1 -1
  88. package/package.json +1 -1
  89. package/pie-chart/labels.d.ts.map +1 -1
  90. package/pie-chart/labels.js +1 -4
  91. package/pie-chart/labels.js.map +1 -1
  92. package/pie-chart/pie-chart.d.ts.map +1 -1
  93. package/pie-chart/pie-chart.js +0 -3
  94. package/pie-chart/pie-chart.js.map +1 -1
  95. package/pie-chart/utils.d.ts.map +1 -1
  96. package/pie-chart/utils.js +0 -4
  97. package/pie-chart/utils.js.map +1 -1
  98. package/popover/internal.js +3 -6
  99. package/popover/internal.js.map +1 -1
  100. package/popover/styles.css.js +49 -50
  101. package/popover/styles.scoped.css +66 -69
  102. package/popover/styles.selectors.js +49 -50
  103. package/segmented-control/styles.css.js +14 -14
  104. package/segmented-control/styles.scoped.css +33 -33
  105. package/segmented-control/styles.selectors.js +14 -14
  106. package/split-panel/implementation.d.ts.map +1 -1
  107. package/split-panel/implementation.js +6 -3
  108. package/split-panel/implementation.js.map +1 -1
  109. package/split-panel/styles.css.js +26 -31
  110. package/split-panel/styles.scoped.css +41 -97
  111. package/split-panel/styles.selectors.js +26 -31
  112. package/table/selection/selection-control.d.ts.map +1 -1
  113. package/table/selection/selection-control.js.map +1 -1
  114. package/table/table-role/utils.d.ts.map +1 -1
  115. package/table/table-role/utils.js +6 -1
  116. package/table/table-role/utils.js.map +1 -1
  117. package/tiles/styles.css.js +29 -29
  118. package/tiles/styles.scoped.css +82 -95
  119. package/tiles/styles.selectors.js +29 -29
  120. package/split-panel/icons/resize-handler.d.ts +0 -6
  121. package/split-panel/icons/resize-handler.d.ts.map +0 -1
  122. package/split-panel/icons/resize-handler.js +0 -8
  123. 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
- .awsui_root_14iqq_1letd_103:not(#\9) {
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
- .awsui_root_14iqq_1letd_103.awsui_fit-height_14iqq_1letd_139:not(#\9) {
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
- .awsui_root_14iqq_1letd_103.awsui_fit-height_14iqq_1letd_139.awsui_with-side-media_14iqq_1letd_144:not(#\9) {
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
- .awsui_root_14iqq_1letd_103.awsui_variant-default_14iqq_1letd_147:not(#\9), .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147:not(#\9) {
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
- .awsui_root_14iqq_1letd_103.awsui_variant-default_14iqq_1letd_147.awsui_refresh_14iqq_1letd_155:not(#\9), .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147.awsui_refresh_14iqq_1letd_155:not(#\9) {
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
- .awsui_root_14iqq_1letd_103.awsui_variant-default_14iqq_1letd_147:not(#\9):not(.awsui_refresh_14iqq_1letd_155)::before, .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147:not(#\9):not(.awsui_refresh_14iqq_1letd_155)::before {
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
- .awsui_root_14iqq_1letd_103.awsui_variant-default_14iqq_1letd_147:not(#\9):not(.awsui_refresh_14iqq_1letd_155)::after, .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147:not(#\9):not(.awsui_refresh_14iqq_1letd_155)::after {
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
- .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147:not(#\9):not(:last-child), .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147:not(#\9):not(:last-child)::before, .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147:not(#\9):not(:last-child)::after {
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
- .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147 + .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147:not(#\9), .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147 + .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147:not(#\9)::before, .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147 + .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147:not(#\9)::after {
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
- .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147 + .awsui_root_14iqq_1letd_103.awsui_variant-stacked_14iqq_1letd_147:not(#\9):not(.awsui_refresh_14iqq_1letd_155)::before {
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
- .awsui_root_14iqq_1letd_103.awsui_sticky-enabled_14iqq_1letd_205:not(#\9):not(.awsui_refresh_14iqq_1letd_155)::before {
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
- .awsui_root_14iqq_1letd_103.awsui_sticky-enabled_14iqq_1letd_205:not(#\9):not(.awsui_refresh_14iqq_1letd_155).awsui_variant-stacked_14iqq_1letd_147::before {
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-media_14iqq_1letd_144:not(#\9) {
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-media_14iqq_1letd_217:not(#\9) {
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-wrapper_14iqq_1letd_222:not(#\9) {
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-height_14iqq_1letd_227:not(#\9) {
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
- .awsui_media_14iqq_1letd_234:not(#\9) {
235
+ .awsui_media_14iqq_1w0sy_234:not(#\9) {
236
236
  overflow: hidden;
237
237
  flex-shrink: 0;
238
238
  }
239
- .awsui_media_14iqq_1letd_234 img:not(#\9),
240
- .awsui_media_14iqq_1letd_234 video:not(#\9),
241
- .awsui_media_14iqq_1letd_234 picture:not(#\9) {
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
- .awsui_media_14iqq_1letd_234 iframe:not(#\9) {
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-top_14iqq_1letd_252:not(#\9) {
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-side_14iqq_1letd_257:not(#\9) {
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
- .awsui_header_14iqq_1letd_263:not(#\9) {
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
- .awsui_header_14iqq_1letd_263.awsui_header-with-media_14iqq_1letd_268:not(#\9) {
269
+ .awsui_header_14iqq_1w0sy_263.awsui_header-with-media_14iqq_1w0sy_268:not(#\9) {
270
270
  background: none;
271
271
  }
272
- .awsui_header_14iqq_1letd_263.awsui_header-with-media_14iqq_1letd_268:not(#\9):not(:empty) {
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-disabled_14iqq_1letd_274:not(#\9) {
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-enabled_14iqq_1letd_278:not(#\9) {
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-stuck_14iqq_1letd_284:not(#\9) {
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-stuck_14iqq_1letd_284:not(#\9)::before {
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-stuck_14iqq_1letd_284:not(#\9):not(.awsui_header-variant-cards_14iqq_1letd_294) {
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-height_14iqq_1letd_297.awsui_header-stuck_14iqq_1letd_284:not(#\9) {
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
- .awsui_header_14iqq_1letd_263:not(#\9):not(:empty) {
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
- .awsui_header_14iqq_1letd_263.awsui_with-paddings_14iqq_1letd_303:not(#\9) {
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
- .awsui_header_14iqq_1letd_263.awsui_with-paddings_14iqq_1letd_303.awsui_header-variant-cards_14iqq_1letd_294:not(#\9) {
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
- .awsui_header_14iqq_1letd_263.awsui_with-hidden-content_14iqq_1letd_312:not(#\9) {
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-cards_14iqq_1letd_294:not(#\9) {
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-cards_14iqq_1letd_294.awsui_refresh_14iqq_1letd_155:not(#\9) {
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-cards_14iqq_1letd_294:not(#\9):not(.awsui_refresh_14iqq_1letd_155)::before {
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-cards_14iqq_1letd_294:not(#\9):not(.awsui_refresh_14iqq_1letd_155)::after {
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-cards_14iqq_1letd_294:not(#\9):not(.awsui_header-sticky-enabled_14iqq_1letd_278) {
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-cards_14iqq_1letd_294.awsui_header-stuck_14iqq_1letd_284:not(#\9)::after, .awsui_header-variant-cards_14iqq_1letd_294.awsui_header-stuck_14iqq_1letd_284:not(#\9)::before {
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-page_14iqq_1letd_370.awsui_header-stuck_14iqq_1letd_284:not(#\9) {
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-page_14iqq_1letd_370.awsui_header-stuck_14iqq_1letd_284:not(#\9)::before {
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-page_14iqq_1letd_370.awsui_header-stuck_14iqq_1letd_284:not(#\9)::after {
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
- .awsui_content_14iqq_1letd_222:not(#\9) {
395
+ .awsui_content_14iqq_1w0sy_222:not(#\9) {
393
396
  flex: 1;
394
397
  }
395
- .awsui_content-fit-height_14iqq_1letd_394:not(#\9) {
398
+ .awsui_content-fit-height_14iqq_1w0sy_397:not(#\9) {
396
399
  overflow: auto;
397
400
  }
398
- .awsui_content_14iqq_1letd_222.awsui_with-paddings_14iqq_1letd_303:not(#\9) {
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
- .awsui_header_14iqq_1letd_263 + .awsui_content_14iqq_1letd_222.awsui_with-paddings_14iqq_1letd_303:not(#\9) {
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
- .awsui_header_14iqq_1letd_263 + .awsui_content_14iqq_1letd_222.awsui_with-paddings_14iqq_1letd_303.awsui_content-with-media_14iqq_1letd_404:not(#\9) {
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
- .awsui_footer_14iqq_1letd_408.awsui_with-paddings_14iqq_1letd_303:not(#\9) {
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
- .awsui_footer_14iqq_1letd_408.awsui_with-divider_14iqq_1letd_412:not(#\9) {
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": "awsui_root_14iqq_1letd_103",
6
- "fit-height": "awsui_fit-height_14iqq_1letd_139",
7
- "with-side-media": "awsui_with-side-media_14iqq_1letd_144",
8
- "variant-default": "awsui_variant-default_14iqq_1letd_147",
9
- "variant-stacked": "awsui_variant-stacked_14iqq_1letd_147",
10
- "refresh": "awsui_refresh_14iqq_1letd_155",
11
- "sticky-enabled": "awsui_sticky-enabled_14iqq_1letd_205",
12
- "with-top-media": "awsui_with-top-media_14iqq_1letd_217",
13
- "content-wrapper": "awsui_content-wrapper_14iqq_1letd_222",
14
- "content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_1letd_227",
15
- "media": "awsui_media_14iqq_1letd_234",
16
- "media-top": "awsui_media-top_14iqq_1letd_252",
17
- "media-side": "awsui_media-side_14iqq_1letd_257",
18
- "header": "awsui_header_14iqq_1letd_263",
19
- "header-with-media": "awsui_header-with-media_14iqq_1letd_268",
20
- "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_1letd_274",
21
- "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_1letd_278",
22
- "header-stuck": "awsui_header-stuck_14iqq_1letd_284",
23
- "header-variant-cards": "awsui_header-variant-cards_14iqq_1letd_294",
24
- "header-dynamic-height": "awsui_header-dynamic-height_14iqq_1letd_297",
25
- "with-paddings": "awsui_with-paddings_14iqq_1letd_303",
26
- "with-hidden-content": "awsui_with-hidden-content_14iqq_1letd_312",
27
- "header-variant-full-page": "awsui_header-variant-full-page_14iqq_1letd_370",
28
- "content": "awsui_content_14iqq_1letd_222",
29
- "content-fit-height": "awsui_content-fit-height_14iqq_1letd_394",
30
- "content-with-media": "awsui_content-with-media_14iqq_1letd_404",
31
- "footer": "awsui_footer_14iqq_1letd_408",
32
- "with-divider": "awsui_with-divider_14iqq_1letd_412"
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,gBA0IX,CAAC"}
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,MA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,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,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,CAAC;AAE3D,SAAS,SAAS,CAAC,IAAU,EAAE,QAAc,EAAE,YAAqB;IAClE,IAAI,YAAY,EAAE;QAChB,OAAO,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;KACpC;IAED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E,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"]}
@@ -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. Full page variants implement the high contrast header and content behavior automatically.
32
- * * `embedded` - Use this variant when the form doesn't occupy the full page. This variant doesn't use a high contrast header.
33
- * @visualrefresh
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
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/form/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,K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CAAC;IAE1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;CACpC"}
@@ -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. Full page variants implement the high contrast header and content behavior automatically.\n * * `embedded` - Use this variant when the form doesn't occupy the full page. This variant doesn't use a high contrast header.\n * @visualrefresh\n */\n variant?: 'full-page' | 'embedded';\n}\n\nexport interface FormLayoutProps {\n children?: React.ReactNode;\n header?: React.ReactNode;\n variant: FormProps['variant'];\n}\n"]}
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"]}
@@ -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, variant, __internalRootRef, ...props }: InternalFormProps): JSX.Element;
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
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/form/internal.tsx"],"names":[],"mappings":";AASA,OAAO,EAAmB,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1D,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,OAAO,EACP,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,iBAAiB,eAqCnB"}
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, variant, __internalRootRef } = _a, props = __rest(_a, ["children", "header", "errorText", "errorIconAriaLabel", "actions", "secondaryActions", "variant", "__internalRootRef"]);
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
- React.createElement(FormLayout, { header: header && React.createElement("div", { className: clsx(styles.header, variant === 'full-page' && styles['full-page']) }, header), variant: variant },
20
- children && React.createElement("div", { className: styles.content }, children),
21
- errorText && (React.createElement(InternalBox, { margin: { top: 'l' } },
22
- React.createElement(InternalAlert, { type: "error", statusIconAriaLabel: errorIconAriaLabel },
23
- React.createElement("div", { className: styles.error }, errorText)))),
24
- (actions || secondaryActions) && (React.createElement("div", { className: styles.footer },
25
- React.createElement("div", { className: styles['actions-section'] },
26
- actions && React.createElement("div", { className: styles.actions }, actions),
27
- secondaryActions && React.createElement("div", { className: styles['secondary-actions'] }, secondaryActions)))),
28
- errorText && (React.createElement(LiveRegion, { assertive: true },
29
- errorIconAriaLabel,
30
- ", ",
31
- errorText)))));
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
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/form/internal.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,SAAS,IAAI,CACZ,oBAAC,WAAW,IAAC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE;gBAC/B,oBAAC,aAAa,IAAC,IAAI,EAAC,OAAO,EAAC,mBAAmB,EAAE,kBAAkB;oBACjE,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK,IAAG,SAAS,CAAO,CACjC,CACJ,CACf;YACA,CAAC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAChC,6BAAK,SAAS,EAAE,MAAM,CAAC,MAAM;gBAC3B,6BAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC;oBACtC,OAAO,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,OAAO,CAAO;oBAC1D,gBAAgB,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,mBAAmB,CAAC,IAAG,gBAAgB,CAAO,CACtF,CACF,CACP;YACA,SAAS,IAAI,CACZ,oBAAC,UAAU,IAAC,SAAS,EAAE,IAAI;gBACxB,kBAAkB;;gBAAI,SAAS,CACrB,CACd,CACU,CACT,CACP,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAmB;IAChE,OAAO,OAAO,KAAK,WAAW,IAAI,MAAM,CAAC,CAAC,CAAC,CACzC,oBAAC,qBAAqB,IAAC,MAAM,EAAE,MAAM,IAAG,QAAQ,CAAyB,CAC1E,CAAC,CAAC,CAAC,CACF;QACG,MAAM;QACN,QAAQ,CACR,CACJ,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 InternalContentLayout from '../content-layout/internal';\nimport styles from './styles.css.js';\nimport { FormLayoutProps, 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 variant,\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 <FormLayout\n header={\n header && <div className={clsx(styles.header, variant === 'full-page' && styles['full-page'])}>{header}</div>\n }\n variant={variant}\n >\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 </FormLayout>\n </div>\n );\n}\n\nfunction FormLayout({ children, header, variant }: FormLayoutProps) {\n return variant === 'full-page' && header ? (\n <InternalContentLayout header={header}>{children}</InternalContentLayout>\n ) : (\n <>\n {header}\n {children}\n </>\n );\n}\n"]}
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;AA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,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"]}
@@ -1,14 +1,13 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_1i0s3_19kut_99",
5
- "header": "awsui_header_1i0s3_19kut_134",
6
- "full-page": "awsui_full-page_1i0s3_19kut_134",
7
- "content": "awsui_content_1i0s3_19kut_138",
8
- "error": "awsui_error_1i0s3_19kut_142",
9
- "footer": "awsui_footer_1i0s3_19kut_146",
10
- "actions-section": "awsui_actions-section_1i0s3_19kut_150",
11
- "secondary-actions": "awsui_secondary-actions_1i0s3_19kut_159",
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