@cloudscape-design/components 3.0.387 → 3.0.389

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 (190) hide show
  1. package/anchor-navigation/index.d.ts +5 -0
  2. package/anchor-navigation/index.d.ts.map +1 -0
  3. package/anchor-navigation/index.js +14 -0
  4. package/anchor-navigation/index.js.map +1 -0
  5. package/anchor-navigation/interfaces.d.ts +67 -0
  6. package/anchor-navigation/interfaces.d.ts.map +1 -0
  7. package/anchor-navigation/interfaces.js +4 -0
  8. package/anchor-navigation/interfaces.js.map +1 -0
  9. package/anchor-navigation/internal.d.ts +5 -0
  10. package/anchor-navigation/internal.d.ts.map +1 -0
  11. package/anchor-navigation/internal.js +48 -0
  12. package/anchor-navigation/internal.js.map +1 -0
  13. package/anchor-navigation/styles.css.js +13 -0
  14. package/anchor-navigation/styles.scoped.css +243 -0
  15. package/anchor-navigation/styles.selectors.js +14 -0
  16. package/anchor-navigation/test-classes/styles.css.js +11 -0
  17. package/anchor-navigation/test-classes/styles.scoped.css +27 -0
  18. package/anchor-navigation/test-classes/styles.selectors.js +12 -0
  19. package/anchor-navigation/use-scroll-spy.d.ts +18 -0
  20. package/anchor-navigation/use-scroll-spy.d.ts.map +1 -0
  21. package/anchor-navigation/use-scroll-spy.js +74 -0
  22. package/anchor-navigation/use-scroll-spy.js.map +1 -0
  23. package/annotation-context/annotation/styles.css.js +24 -24
  24. package/annotation-context/annotation/styles.scoped.css +30 -30
  25. package/annotation-context/annotation/styles.selectors.js +24 -24
  26. package/app-layout/notifications/styles.css.js +3 -3
  27. package/app-layout/notifications/styles.scoped.css +7 -7
  28. package/app-layout/notifications/styles.selectors.js +3 -3
  29. package/app-layout/visual-refresh/styles.css.js +75 -75
  30. package/app-layout/visual-refresh/styles.scoped.css +295 -295
  31. package/app-layout/visual-refresh/styles.selectors.js +75 -75
  32. package/button/styles.css.js +20 -20
  33. package/button/styles.scoped.css +151 -152
  34. package/button/styles.selectors.js +20 -20
  35. package/button-dropdown/item-element/styles.css.js +15 -15
  36. package/button-dropdown/item-element/styles.scoped.css +18 -19
  37. package/button-dropdown/item-element/styles.selectors.js +15 -15
  38. package/cards/index.js +2 -2
  39. package/cards/index.js.map +1 -1
  40. package/code-editor/styles.css.js +32 -32
  41. package/code-editor/styles.scoped.css +129 -131
  42. package/code-editor/styles.selectors.js +32 -32
  43. package/collection-preferences/content-display/styles.css.js +11 -11
  44. package/collection-preferences/content-display/styles.scoped.css +17 -18
  45. package/collection-preferences/content-display/styles.selectors.js +11 -11
  46. package/collection-preferences/styles.css.js +37 -37
  47. package/collection-preferences/styles.scoped.css +44 -45
  48. package/collection-preferences/styles.selectors.js +37 -37
  49. package/container/index.d.ts.map +1 -1
  50. package/container/index.js +2 -2
  51. package/container/index.js.map +1 -1
  52. package/container/internal.d.ts +5 -1
  53. package/container/internal.d.ts.map +1 -1
  54. package/container/internal.js +7 -4
  55. package/container/internal.js.map +1 -1
  56. package/content-layout/styles.css.js +7 -7
  57. package/content-layout/styles.scoped.css +13 -13
  58. package/content-layout/styles.selectors.js +7 -7
  59. package/expandable-section/expandable-section-container.d.ts +5 -3
  60. package/expandable-section/expandable-section-container.d.ts.map +1 -1
  61. package/expandable-section/expandable-section-container.js +2 -2
  62. package/expandable-section/expandable-section-container.js.map +1 -1
  63. package/expandable-section/index.d.ts.map +1 -1
  64. package/expandable-section/index.js +8 -3
  65. package/expandable-section/index.js.map +1 -1
  66. package/expandable-section/internal.d.ts +3 -3
  67. package/expandable-section/internal.d.ts.map +1 -1
  68. package/expandable-section/internal.js +2 -2
  69. package/expandable-section/internal.js.map +1 -1
  70. package/expandable-section/styles.css.js +29 -29
  71. package/expandable-section/styles.scoped.css +58 -59
  72. package/expandable-section/styles.selectors.js +29 -29
  73. package/flashbar/styles.css.js +47 -47
  74. package/flashbar/styles.scoped.css +171 -172
  75. package/flashbar/styles.selectors.js +47 -47
  76. package/form-field/styles.css.js +19 -19
  77. package/form-field/styles.scoped.css +29 -30
  78. package/form-field/styles.selectors.js +19 -19
  79. package/header/styles.css.js +32 -32
  80. package/header/styles.scoped.css +48 -49
  81. package/header/styles.selectors.js +32 -32
  82. package/index.d.ts +1 -0
  83. package/index.d.ts.map +1 -1
  84. package/index.js +1 -0
  85. package/index.js.map +1 -1
  86. package/internal/analytics/components/analytics-funnel.d.ts +3 -2
  87. package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  88. package/internal/analytics/components/analytics-funnel.js +20 -5
  89. package/internal/analytics/components/analytics-funnel.js.map +1 -1
  90. package/internal/analytics/hooks/use-funnel.d.ts.map +1 -1
  91. package/internal/analytics/hooks/use-funnel.js +2 -1
  92. package/internal/analytics/hooks/use-funnel.js.map +1 -1
  93. package/internal/components/abstract-switch/styles.css.js +13 -13
  94. package/internal/components/abstract-switch/styles.scoped.css +19 -21
  95. package/internal/components/abstract-switch/styles.selectors.js +13 -13
  96. package/internal/components/dropdown/dropdown-fit-handler.d.ts +31 -2
  97. package/internal/components/dropdown/dropdown-fit-handler.d.ts.map +1 -1
  98. package/internal/components/dropdown/dropdown-fit-handler.js +49 -7
  99. package/internal/components/dropdown/dropdown-fit-handler.js.map +1 -1
  100. package/internal/components/dropdown/index.d.ts.map +1 -1
  101. package/internal/components/dropdown/index.js +20 -2
  102. package/internal/components/dropdown/index.js.map +1 -1
  103. package/internal/components/dropdown/styles.css.js +21 -21
  104. package/internal/components/dropdown/styles.scoped.css +37 -36
  105. package/internal/components/dropdown/styles.selectors.js +21 -21
  106. package/internal/components/menu-dropdown/styles.css.js +7 -7
  107. package/internal/components/menu-dropdown/styles.scoped.css +13 -14
  108. package/internal/components/menu-dropdown/styles.selectors.js +7 -7
  109. package/internal/components/option/styles.css.js +17 -17
  110. package/internal/components/option/styles.scoped.css +29 -30
  111. package/internal/components/option/styles.selectors.js +17 -17
  112. package/internal/environment.js +1 -1
  113. package/internal/environment.json +1 -1
  114. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  115. package/internal/generated/custom-css-properties/index.js +40 -39
  116. package/internal/generated/custom-css-properties/index.js.map +1 -1
  117. package/internal/manifest.json +1 -1
  118. package/internal/utils/scrollable-containers.d.ts +6 -1
  119. package/internal/utils/scrollable-containers.d.ts.map +1 -1
  120. package/internal/utils/scrollable-containers.js +1 -1
  121. package/internal/utils/scrollable-containers.js.map +1 -1
  122. package/modal/internal.d.ts.map +1 -1
  123. package/modal/internal.js +6 -4
  124. package/modal/internal.js.map +1 -1
  125. package/package.json +2 -1
  126. package/progress-bar/styles.css.js +18 -18
  127. package/progress-bar/styles.scoped.css +32 -33
  128. package/progress-bar/styles.selectors.js +18 -18
  129. package/property-filter/styles.css.js +30 -30
  130. package/property-filter/styles.scoped.css +32 -33
  131. package/property-filter/styles.selectors.js +30 -30
  132. package/side-navigation/styles.css.js +28 -28
  133. package/side-navigation/styles.scoped.css +38 -39
  134. package/side-navigation/styles.selectors.js +28 -28
  135. package/split-panel/styles.css.js +56 -56
  136. package/split-panel/styles.scoped.css +77 -78
  137. package/split-panel/styles.selectors.js +56 -56
  138. package/status-indicator/internal.d.ts.map +1 -1
  139. package/status-indicator/internal.js +3 -1
  140. package/status-indicator/internal.js.map +1 -1
  141. package/status-indicator/styles.css.js +22 -22
  142. package/status-indicator/styles.scoped.css +36 -34
  143. package/status-indicator/styles.selectors.js +22 -22
  144. package/table/header-cell/index.d.ts +1 -4
  145. package/table/header-cell/index.d.ts.map +1 -1
  146. package/table/header-cell/index.js +2 -2
  147. package/table/header-cell/index.js.map +1 -1
  148. package/table/index.d.ts.map +1 -1
  149. package/table/index.js +8 -4
  150. package/table/index.js.map +1 -1
  151. package/table/internal.d.ts +1 -0
  152. package/table/internal.d.ts.map +1 -1
  153. package/table/internal.js +9 -10
  154. package/table/internal.js.map +1 -1
  155. package/table/resizer/index.d.ts +3 -6
  156. package/table/resizer/index.d.ts.map +1 -1
  157. package/table/resizer/index.js +59 -119
  158. package/table/resizer/index.js.map +1 -1
  159. package/table/resizer/resizer-lookup.d.ts +8 -0
  160. package/table/resizer/resizer-lookup.d.ts.map +1 -0
  161. package/table/resizer/resizer-lookup.js +39 -0
  162. package/table/resizer/resizer-lookup.js.map +1 -0
  163. package/table/sticky-columns/utils.js +2 -2
  164. package/table/sticky-columns/utils.js.map +1 -1
  165. package/table/thead.d.ts +0 -1
  166. package/table/thead.d.ts.map +1 -1
  167. package/table/thead.js +2 -2
  168. package/table/thead.js.map +1 -1
  169. package/tabs/styles.css.js +21 -21
  170. package/tabs/styles.scoped.css +39 -40
  171. package/tabs/styles.selectors.js +21 -21
  172. package/test-utils/dom/anchor-navigation/index.d.ts +16 -0
  173. package/test-utils/dom/anchor-navigation/index.js +58 -0
  174. package/test-utils/dom/anchor-navigation/index.js.map +1 -0
  175. package/test-utils/dom/index.d.ts +3 -0
  176. package/test-utils/dom/index.js +10 -2
  177. package/test-utils/dom/index.js.map +1 -1
  178. package/test-utils/selectors/anchor-navigation/index.d.ts +15 -0
  179. package/test-utils/selectors/anchor-navigation/index.js +45 -0
  180. package/test-utils/selectors/anchor-navigation/index.js.map +1 -0
  181. package/test-utils/selectors/index.d.ts +3 -0
  182. package/test-utils/selectors/index.js +10 -2
  183. package/test-utils/selectors/index.js.map +1 -1
  184. package/test-utils/tsconfig.tsbuildinfo +1 -1
  185. package/tiles/styles.css.js +29 -29
  186. package/tiles/styles.scoped.css +70 -71
  187. package/tiles/styles.selectors.js +29 -29
  188. package/wizard/styles.css.js +31 -31
  189. package/wizard/styles.scoped.css +64 -68
  190. package/wizard/styles.selectors.js +31 -31
@@ -1,22 +1,22 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "option": "awsui_option_1p2cx_bruth_97",
5
- "disabled": "awsui_disabled_1p2cx_bruth_115",
6
- "parent": "awsui_parent_1p2cx_bruth_118",
7
- "highlighted": "awsui_highlighted_1p2cx_bruth_121",
8
- "content": "awsui_content_1p2cx_bruth_125",
9
- "label-content": "awsui_label-content_1p2cx_bruth_132",
10
- "label": "awsui_label_1p2cx_bruth_132",
11
- "tag": "awsui_tag_1p2cx_bruth_139",
12
- "label-tag": "awsui_label-tag_1p2cx_bruth_140",
13
- "label-prefix": "awsui_label-prefix_1p2cx_bruth_151",
14
- "tags": "awsui_tags_1p2cx_bruth_164",
15
- "description": "awsui_description_1p2cx_bruth_165",
16
- "selected": "awsui_selected_1p2cx_bruth_176",
17
- "icon": "awsui_icon_1p2cx_bruth_190",
18
- "icon-size-big": "awsui_icon-size-big_1p2cx_bruth_197",
19
- "filtering-match-highlight": "awsui_filtering-match-highlight_1p2cx_bruth_201",
20
- "trigger-variant": "awsui_trigger-variant_1p2cx_bruth_216"
4
+ "option": "awsui_option_1p2cx_1c2xj_97",
5
+ "disabled": "awsui_disabled_1p2cx_1c2xj_115",
6
+ "parent": "awsui_parent_1p2cx_1c2xj_118",
7
+ "highlighted": "awsui_highlighted_1p2cx_1c2xj_121",
8
+ "content": "awsui_content_1p2cx_1c2xj_125",
9
+ "label-content": "awsui_label-content_1p2cx_1c2xj_132",
10
+ "label": "awsui_label_1p2cx_1c2xj_132",
11
+ "tag": "awsui_tag_1p2cx_1c2xj_139",
12
+ "label-tag": "awsui_label-tag_1p2cx_1c2xj_140",
13
+ "label-prefix": "awsui_label-prefix_1p2cx_1c2xj_150",
14
+ "tags": "awsui_tags_1p2cx_1c2xj_163",
15
+ "description": "awsui_description_1p2cx_1c2xj_164",
16
+ "selected": "awsui_selected_1p2cx_1c2xj_175",
17
+ "icon": "awsui_icon_1p2cx_1c2xj_189",
18
+ "icon-size-big": "awsui_icon-size-big_1p2cx_1c2xj_196",
19
+ "filtering-match-highlight": "awsui_filtering-match-highlight_1p2cx_1c2xj_200",
20
+ "trigger-variant": "awsui_trigger-variant_1p2cx_1c2xj_215"
21
21
  };
22
22
 
@@ -94,7 +94,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
94
94
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
95
  SPDX-License-Identifier: Apache-2.0
96
96
  */
97
- .awsui_option_1p2cx_bruth_97:not(#\9) {
97
+ .awsui_option_1p2cx_1c2xj_97:not(#\9) {
98
98
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
99
99
  border-collapse: separate;
100
100
  border-spacing: 0;
@@ -138,108 +138,107 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
138
138
  box-sizing: border-box;
139
139
  color: inherit;
140
140
  }
141
- .awsui_option_1p2cx_bruth_97:not(#\9):not(.awsui_disabled_1p2cx_bruth_115) {
141
+ .awsui_option_1p2cx_1c2xj_97:not(#\9):not(.awsui_disabled_1p2cx_1c2xj_115) {
142
142
  cursor: inherit;
143
143
  }
144
- .awsui_option_1p2cx_bruth_97.awsui_parent_1p2cx_bruth_118:not(#\9) {
144
+ .awsui_option_1p2cx_1c2xj_97.awsui_parent_1p2cx_1c2xj_118:not(#\9) {
145
145
  font-weight: bold;
146
146
  }
147
- .awsui_option_1p2cx_bruth_97.awsui_parent_1p2cx_bruth_118:not(#\9):not(.awsui_disabled_1p2cx_bruth_115):not(.awsui_highlighted_1p2cx_bruth_121) {
147
+ .awsui_option_1p2cx_1c2xj_97.awsui_parent_1p2cx_1c2xj_118:not(#\9):not(.awsui_disabled_1p2cx_1c2xj_115):not(.awsui_highlighted_1p2cx_1c2xj_121) {
148
148
  color: var(--color-text-dropdown-group-label-mej1lb, #414d5c);
149
149
  }
150
150
 
151
- .awsui_content_1p2cx_bruth_125:not(#\9) {
151
+ .awsui_content_1p2cx_1c2xj_125:not(#\9) {
152
152
  width: 100%;
153
153
  display: flex;
154
154
  flex-direction: column;
155
155
  min-width: 0;
156
156
  }
157
157
 
158
- .awsui_label-content_1p2cx_bruth_132:not(#\9) {
158
+ .awsui_label-content_1p2cx_1c2xj_132:not(#\9) {
159
159
  display: flex;
160
160
  justify-content: space-between;
161
161
  flex-wrap: wrap;
162
162
  }
163
163
 
164
- .awsui_label_1p2cx_bruth_132:not(#\9),
165
- .awsui_tag_1p2cx_bruth_139:not(#\9),
166
- .awsui_label-tag_1p2cx_bruth_140:not(#\9) {
164
+ .awsui_label_1p2cx_1c2xj_132:not(#\9),
165
+ .awsui_tag_1p2cx_1c2xj_139:not(#\9),
166
+ .awsui_label-tag_1p2cx_1c2xj_140:not(#\9) {
167
167
  min-width: 0;
168
- -ms-word-break: break-all;
169
168
  word-break: break-word;
170
169
  }
171
170
 
172
- .awsui_label_1p2cx_bruth_132:not(#\9),
173
- .awsui_tag_1p2cx_bruth_139:not(#\9) {
171
+ .awsui_label_1p2cx_1c2xj_132:not(#\9),
172
+ .awsui_tag_1p2cx_1c2xj_139:not(#\9) {
174
173
  flex-wrap: wrap;
175
174
  }
176
175
 
177
- .awsui_label-prefix_1p2cx_bruth_151:not(#\9) {
176
+ .awsui_label-prefix_1p2cx_1c2xj_150:not(#\9) {
178
177
  font-weight: 700;
179
178
  }
180
179
 
181
- .awsui_label-tag_1p2cx_bruth_140:not(#\9) {
180
+ .awsui_label-tag_1p2cx_1c2xj_140:not(#\9) {
182
181
  padding-left: var(--space-s-34lx8l, 12px);
183
182
  flex: auto;
184
183
  text-align: right;
185
184
  }
186
- .awsui_label-tag_1p2cx_bruth_140:not(#\9):empty {
185
+ .awsui_label-tag_1p2cx_1c2xj_140:not(#\9):empty {
187
186
  display: none;
188
187
  }
189
188
 
190
- .awsui_tags_1p2cx_bruth_164:not(#\9),
191
- .awsui_description_1p2cx_bruth_165:not(#\9) {
189
+ .awsui_tags_1p2cx_1c2xj_163:not(#\9),
190
+ .awsui_description_1p2cx_1c2xj_164:not(#\9) {
192
191
  font-size: var(--font-size-body-s-asqx2i, 12px);
193
192
  line-height: var(--line-height-body-s-7zv1j5, 16px);
194
193
  letter-spacing: var(--letter-spacing-body-s-z9jkwp, 0.005em);
195
194
  color: var(--color-text-dropdown-item-secondary-jho0ju, #5f6b7a);
196
195
  flex-wrap: wrap;
197
196
  }
198
- .awsui_tags_1p2cx_bruth_164.awsui_highlighted_1p2cx_bruth_121:not(#\9),
199
- .awsui_description_1p2cx_bruth_165.awsui_highlighted_1p2cx_bruth_121:not(#\9) {
197
+ .awsui_tags_1p2cx_1c2xj_163.awsui_highlighted_1p2cx_1c2xj_121:not(#\9),
198
+ .awsui_description_1p2cx_1c2xj_164.awsui_highlighted_1p2cx_1c2xj_121:not(#\9) {
200
199
  color: var(--color-text-dropdown-item-secondary-hover-zfmqjr, #5f6b7a);
201
200
  }
202
- .awsui_tags_1p2cx_bruth_164.awsui_selected_1p2cx_bruth_176:not(#\9),
203
- .awsui_description_1p2cx_bruth_165.awsui_selected_1p2cx_bruth_176:not(#\9) {
201
+ .awsui_tags_1p2cx_1c2xj_163.awsui_selected_1p2cx_1c2xj_175:not(#\9),
202
+ .awsui_description_1p2cx_1c2xj_164.awsui_selected_1p2cx_1c2xj_175:not(#\9) {
204
203
  color: var(--color-text-dropdown-item-secondary-jho0ju, #5f6b7a);
205
204
  }
206
205
 
207
- .awsui_tags_1p2cx_bruth_164:not(#\9) {
206
+ .awsui_tags_1p2cx_1c2xj_163:not(#\9) {
208
207
  display: flex;
209
208
  align-items: stretch;
210
209
  }
211
210
 
212
- .awsui_tag_1p2cx_bruth_139:not(#\9):not(:last-child) {
211
+ .awsui_tag_1p2cx_1c2xj_139:not(#\9):not(:last-child) {
213
212
  padding-right: var(--space-m-udix3p, 16px);
214
213
  }
215
214
 
216
- .awsui_icon_1p2cx_bruth_190:not(#\9) {
215
+ .awsui_icon_1p2cx_1c2xj_189:not(#\9) {
217
216
  padding-right: var(--space-xs-zb16t3, 8px);
218
217
  align-content: center;
219
218
  display: flex;
220
219
  flex-shrink: 0;
221
220
  }
222
221
 
223
- .awsui_icon-size-big_1p2cx_bruth_197:not(#\9) {
222
+ .awsui_icon-size-big_1p2cx_1c2xj_196:not(#\9) {
224
223
  padding-top: var(--space-option-icon-big-top-hybljv, 0px);
225
224
  }
226
225
 
227
- .awsui_filtering-match-highlight_1p2cx_bruth_201:not(#\9) {
226
+ .awsui_filtering-match-highlight_1p2cx_1c2xj_200:not(#\9) {
228
227
  background-color: var(--color-background-dropdown-item-filter-match-h5rjsp, #f2f8fd);
229
228
  color: var(--color-text-dropdown-item-filter-match-6moumb, #0972d3);
230
229
  font-weight: bold;
231
230
  }
232
231
 
233
- .awsui_disabled_1p2cx_bruth_115:not(#\9) {
232
+ .awsui_disabled_1p2cx_1c2xj_115:not(#\9) {
234
233
  color: var(--color-text-dropdown-item-disabled-6oq3n6, #9ba7b6);
235
234
  pointer-events: none;
236
235
  }
237
- .awsui_disabled_1p2cx_bruth_115 > .awsui_content_1p2cx_bruth_125 > .awsui_tags_1p2cx_bruth_164:not(#\9),
238
- .awsui_disabled_1p2cx_bruth_115 > .awsui_content_1p2cx_bruth_125 > .awsui_description_1p2cx_bruth_165:not(#\9) {
236
+ .awsui_disabled_1p2cx_1c2xj_115 > .awsui_content_1p2cx_1c2xj_125 > .awsui_tags_1p2cx_1c2xj_163:not(#\9),
237
+ .awsui_disabled_1p2cx_1c2xj_115 > .awsui_content_1p2cx_1c2xj_125 > .awsui_description_1p2cx_1c2xj_164:not(#\9) {
239
238
  color: currentColor;
240
239
  }
241
240
 
242
- .awsui_trigger-variant_1p2cx_bruth_216:not(#\9) {
241
+ .awsui_trigger-variant_1p2cx_1c2xj_215:not(#\9) {
243
242
  white-space: nowrap;
244
243
  overflow: hidden;
245
244
  text-overflow: ellipsis;
@@ -2,22 +2,22 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "option": "awsui_option_1p2cx_bruth_97",
6
- "disabled": "awsui_disabled_1p2cx_bruth_115",
7
- "parent": "awsui_parent_1p2cx_bruth_118",
8
- "highlighted": "awsui_highlighted_1p2cx_bruth_121",
9
- "content": "awsui_content_1p2cx_bruth_125",
10
- "label-content": "awsui_label-content_1p2cx_bruth_132",
11
- "label": "awsui_label_1p2cx_bruth_132",
12
- "tag": "awsui_tag_1p2cx_bruth_139",
13
- "label-tag": "awsui_label-tag_1p2cx_bruth_140",
14
- "label-prefix": "awsui_label-prefix_1p2cx_bruth_151",
15
- "tags": "awsui_tags_1p2cx_bruth_164",
16
- "description": "awsui_description_1p2cx_bruth_165",
17
- "selected": "awsui_selected_1p2cx_bruth_176",
18
- "icon": "awsui_icon_1p2cx_bruth_190",
19
- "icon-size-big": "awsui_icon-size-big_1p2cx_bruth_197",
20
- "filtering-match-highlight": "awsui_filtering-match-highlight_1p2cx_bruth_201",
21
- "trigger-variant": "awsui_trigger-variant_1p2cx_bruth_216"
5
+ "option": "awsui_option_1p2cx_1c2xj_97",
6
+ "disabled": "awsui_disabled_1p2cx_1c2xj_115",
7
+ "parent": "awsui_parent_1p2cx_1c2xj_118",
8
+ "highlighted": "awsui_highlighted_1p2cx_1c2xj_121",
9
+ "content": "awsui_content_1p2cx_1c2xj_125",
10
+ "label-content": "awsui_label-content_1p2cx_1c2xj_132",
11
+ "label": "awsui_label_1p2cx_1c2xj_132",
12
+ "tag": "awsui_tag_1p2cx_1c2xj_139",
13
+ "label-tag": "awsui_label-tag_1p2cx_1c2xj_140",
14
+ "label-prefix": "awsui_label-prefix_1p2cx_1c2xj_150",
15
+ "tags": "awsui_tags_1p2cx_1c2xj_163",
16
+ "description": "awsui_description_1p2cx_1c2xj_164",
17
+ "selected": "awsui_selected_1p2cx_1c2xj_175",
18
+ "icon": "awsui_icon_1p2cx_1c2xj_189",
19
+ "icon-size-big": "awsui_icon-size-big_1p2cx_1c2xj_196",
20
+ "filtering-match-highlight": "awsui_filtering-match-highlight_1p2cx_1c2xj_200",
21
+ "trigger-variant": "awsui_trigger-variant_1p2cx_1c2xj_215"
22
22
  };
23
23
 
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (11090e44)";
2
+ export var PACKAGE_VERSION = "3.0.0 (c3fe8ad7)";
3
3
  export var THEME = "open-source-visual-refresh";
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (11090e44)",
3
+ "PACKAGE_VERSION": "3.0.0 (c3fe8ad7)",
4
4
  "THEME": "default",
5
5
  "ALWAYS_VISUAL_REFRESH": false
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAwClD,CAAC;AACF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAyClD,CAAC;AACF,eAAe,sBAAsB,CAAC"}
@@ -1,43 +1,44 @@
1
1
  const customCSSPropertiesMap = {
2
- breadcrumbsGap: '--awsui-breadcrumbs-gap-zw2xxa',
3
- contentGapLeft: '--awsui-content-gap-left-zw2xxa',
4
- contentGapRight: '--awsui-content-gap-right-zw2xxa',
5
- contentHeight: '--awsui-content-height-zw2xxa',
6
- containerFirstGap: '--awsui-container-first-gap-zw2xxa',
7
- containerFirstOverlapExtension: '--awsui-container-first-overlap-extension-zw2xxa',
8
- defaultMaxContentWidth: '--awsui-default-max-content-width-zw2xxa',
9
- defaultMinContentWidth: '--awsui-default-min-content-width-zw2xxa',
10
- drawerSize: '--awsui-drawer-size-zw2xxa',
11
- footerHeight: '--awsui-footer-height-zw2xxa',
12
- headerGap: '--awsui-header-gap-zw2xxa',
13
- headerHeight: '--awsui-header-height-zw2xxa',
14
- layoutWidth: '--awsui-layout-width-zw2xxa',
15
- mainGap: '--awsui-main-gap-zw2xxa',
16
- mainOffsetLeft: '--awsui-main-offset-left-zw2xxa',
17
- mainTemplateRows: '--awsui-main-template-rows-zw2xxa',
18
- maxContentWidth: '--awsui-max-content-width-zw2xxa',
19
- minContentWidth: '--awsui-min-content-width-zw2xxa',
20
- mobileBarHeight: '--awsui-mobile-bar-height-zw2xxa',
21
- notificationsGap: '--awsui-notifications-gap-zw2xxa',
22
- notificationsHeight: '--awsui-notifications-height-zw2xxa',
23
- offsetTop: '--awsui-offset-top-zw2xxa',
24
- offsetTopWithNotifications: '--awsui-offset-top-with-notifications-zw2xxa',
25
- overlapHeight: '--awsui-overlap-height-zw2xxa',
26
- navigationWidth: '--awsui-navigation-width-zw2xxa',
27
- splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-zw2xxa',
28
- splitPanelReportedSize: '--awsui-split-panel-reported-size-zw2xxa',
29
- splitPanelHeight: '--awsui-split-panel-height-zw2xxa',
30
- splitPanelMinWidth: '--awsui-split-panel-min-width-zw2xxa',
31
- splitPanelMaxWidth: '--awsui-split-panel-max-width-zw2xxa',
32
- toolsMaxWidth: '--awsui-tools-max-width-zw2xxa',
33
- toolsWidth: '--awsui-tools-width-zw2xxa',
34
- toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-zw2xxa',
35
- contentScrollMargin: '--awsui-content-scroll-margin-zw2xxa',
36
- flashbarStackDepth: '--awsui-flashbar-stack-depth-zw2xxa',
37
- flashbarStackIndex: '--awsui-flashbar-stack-index-zw2xxa',
38
- flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-zw2xxa',
39
- stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-zw2xxa',
40
- stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-zw2xxa',
2
+ breadcrumbsGap: '--awsui-breadcrumbs-gap-y98gph',
3
+ contentGapLeft: '--awsui-content-gap-left-y98gph',
4
+ contentGapRight: '--awsui-content-gap-right-y98gph',
5
+ contentHeight: '--awsui-content-height-y98gph',
6
+ containerFirstGap: '--awsui-container-first-gap-y98gph',
7
+ containerFirstOverlapExtension: '--awsui-container-first-overlap-extension-y98gph',
8
+ defaultMaxContentWidth: '--awsui-default-max-content-width-y98gph',
9
+ defaultMinContentWidth: '--awsui-default-min-content-width-y98gph',
10
+ drawerSize: '--awsui-drawer-size-y98gph',
11
+ footerHeight: '--awsui-footer-height-y98gph',
12
+ headerGap: '--awsui-header-gap-y98gph',
13
+ headerHeight: '--awsui-header-height-y98gph',
14
+ layoutWidth: '--awsui-layout-width-y98gph',
15
+ mainGap: '--awsui-main-gap-y98gph',
16
+ mainOffsetLeft: '--awsui-main-offset-left-y98gph',
17
+ mainTemplateRows: '--awsui-main-template-rows-y98gph',
18
+ maxContentWidth: '--awsui-max-content-width-y98gph',
19
+ minContentWidth: '--awsui-min-content-width-y98gph',
20
+ mobileBarHeight: '--awsui-mobile-bar-height-y98gph',
21
+ notificationsGap: '--awsui-notifications-gap-y98gph',
22
+ notificationsHeight: '--awsui-notifications-height-y98gph',
23
+ offsetTop: '--awsui-offset-top-y98gph',
24
+ offsetTopWithNotifications: '--awsui-offset-top-with-notifications-y98gph',
25
+ overlapHeight: '--awsui-overlap-height-y98gph',
26
+ navigationWidth: '--awsui-navigation-width-y98gph',
27
+ splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-y98gph',
28
+ splitPanelReportedSize: '--awsui-split-panel-reported-size-y98gph',
29
+ splitPanelHeight: '--awsui-split-panel-height-y98gph',
30
+ splitPanelMinWidth: '--awsui-split-panel-min-width-y98gph',
31
+ splitPanelMaxWidth: '--awsui-split-panel-max-width-y98gph',
32
+ toolsMaxWidth: '--awsui-tools-max-width-y98gph',
33
+ toolsWidth: '--awsui-tools-width-y98gph',
34
+ toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-y98gph',
35
+ contentScrollMargin: '--awsui-content-scroll-margin-y98gph',
36
+ flashbarStackDepth: '--awsui-flashbar-stack-depth-y98gph',
37
+ flashbarStackIndex: '--awsui-flashbar-stack-index-y98gph',
38
+ flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-y98gph',
39
+ stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-y98gph',
40
+ stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-y98gph',
41
+ dropdownDefaultMaxWidth: '--awsui-dropdown-default-max-width-y98gph',
41
42
  };
42
43
  export default customCSSPropertiesMap;
43
44
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAA2B;IACrD,cAAc,EAAE,gCAAgC;IAChD,cAAc,EAAE,iCAAiC;IACjD,eAAe,EAAE,kCAAkC;IACnD,aAAa,EAAE,+BAA+B;IAC9C,iBAAiB,EAAE,oCAAoC;IACvD,8BAA8B,EAAE,kDAAkD;IAClF,sBAAsB,EAAE,0CAA0C;IAClE,sBAAsB,EAAE,0CAA0C;IAClE,UAAU,EAAE,4BAA4B;IACxC,YAAY,EAAE,8BAA8B;IAC5C,SAAS,EAAE,2BAA2B;IACtC,YAAY,EAAE,8BAA8B;IAC5C,WAAW,EAAE,6BAA6B;IAC1C,OAAO,EAAE,yBAAyB;IAClC,cAAc,EAAE,iCAAiC;IACjD,gBAAgB,EAAE,mCAAmC;IACrD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,gBAAgB,EAAE,kCAAkC;IACpD,mBAAmB,EAAE,qCAAqC;IAC1D,SAAS,EAAE,2BAA2B;IACtC,0BAA0B,EAAE,8CAA8C;IAC1E,aAAa,EAAE,+BAA+B;IAC9C,eAAe,EAAE,iCAAiC;IAClD,4BAA4B,EAAE,iDAAiD;IAC/E,sBAAsB,EAAE,0CAA0C;IAClE,gBAAgB,EAAE,mCAAmC;IACrD,kBAAkB,EAAE,sCAAsC;IAC1D,kBAAkB,EAAE,sCAAsC;IAC1D,aAAa,EAAE,gCAAgC;IAC/C,UAAU,EAAE,4BAA4B;IACxC,6BAA6B,EAAE,iDAAiD;IAChF,mBAAmB,EAAE,sCAAsC;IAC3D,kBAAkB,EAAE,qCAAqC;IACzD,kBAAkB,EAAE,qCAAqC;IACzD,0BAA0B,EAAE,8CAA8C;IAC1E,gCAAgC,EAAE,oDAAoD;IACtF,uCAAuC,EAAE,4DAA4D;CACtG,CAAC;AACF,eAAe,sBAAsB,CAAC","sourcesContent":["const customCSSPropertiesMap: Record<string, string> = {\n breadcrumbsGap: '--awsui-breadcrumbs-gap-zw2xxa',\n contentGapLeft: '--awsui-content-gap-left-zw2xxa',\n contentGapRight: '--awsui-content-gap-right-zw2xxa',\n contentHeight: '--awsui-content-height-zw2xxa',\n containerFirstGap: '--awsui-container-first-gap-zw2xxa',\n containerFirstOverlapExtension: '--awsui-container-first-overlap-extension-zw2xxa',\n defaultMaxContentWidth: '--awsui-default-max-content-width-zw2xxa',\n defaultMinContentWidth: '--awsui-default-min-content-width-zw2xxa',\n drawerSize: '--awsui-drawer-size-zw2xxa',\n footerHeight: '--awsui-footer-height-zw2xxa',\n headerGap: '--awsui-header-gap-zw2xxa',\n headerHeight: '--awsui-header-height-zw2xxa',\n layoutWidth: '--awsui-layout-width-zw2xxa',\n mainGap: '--awsui-main-gap-zw2xxa',\n mainOffsetLeft: '--awsui-main-offset-left-zw2xxa',\n mainTemplateRows: '--awsui-main-template-rows-zw2xxa',\n maxContentWidth: '--awsui-max-content-width-zw2xxa',\n minContentWidth: '--awsui-min-content-width-zw2xxa',\n mobileBarHeight: '--awsui-mobile-bar-height-zw2xxa',\n notificationsGap: '--awsui-notifications-gap-zw2xxa',\n notificationsHeight: '--awsui-notifications-height-zw2xxa',\n offsetTop: '--awsui-offset-top-zw2xxa',\n offsetTopWithNotifications: '--awsui-offset-top-with-notifications-zw2xxa',\n overlapHeight: '--awsui-overlap-height-zw2xxa',\n navigationWidth: '--awsui-navigation-width-zw2xxa',\n splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-zw2xxa',\n splitPanelReportedSize: '--awsui-split-panel-reported-size-zw2xxa',\n splitPanelHeight: '--awsui-split-panel-height-zw2xxa',\n splitPanelMinWidth: '--awsui-split-panel-min-width-zw2xxa',\n splitPanelMaxWidth: '--awsui-split-panel-max-width-zw2xxa',\n toolsMaxWidth: '--awsui-tools-max-width-zw2xxa',\n toolsWidth: '--awsui-tools-width-zw2xxa',\n toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-zw2xxa',\n contentScrollMargin: '--awsui-content-scroll-margin-zw2xxa',\n flashbarStackDepth: '--awsui-flashbar-stack-depth-zw2xxa',\n flashbarStackIndex: '--awsui-flashbar-stack-index-zw2xxa',\n flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-zw2xxa',\n stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-zw2xxa',\n stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-zw2xxa',\n};\nexport default customCSSPropertiesMap;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAA2B;IACrD,cAAc,EAAE,gCAAgC;IAChD,cAAc,EAAE,iCAAiC;IACjD,eAAe,EAAE,kCAAkC;IACnD,aAAa,EAAE,+BAA+B;IAC9C,iBAAiB,EAAE,oCAAoC;IACvD,8BAA8B,EAAE,kDAAkD;IAClF,sBAAsB,EAAE,0CAA0C;IAClE,sBAAsB,EAAE,0CAA0C;IAClE,UAAU,EAAE,4BAA4B;IACxC,YAAY,EAAE,8BAA8B;IAC5C,SAAS,EAAE,2BAA2B;IACtC,YAAY,EAAE,8BAA8B;IAC5C,WAAW,EAAE,6BAA6B;IAC1C,OAAO,EAAE,yBAAyB;IAClC,cAAc,EAAE,iCAAiC;IACjD,gBAAgB,EAAE,mCAAmC;IACrD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,gBAAgB,EAAE,kCAAkC;IACpD,mBAAmB,EAAE,qCAAqC;IAC1D,SAAS,EAAE,2BAA2B;IACtC,0BAA0B,EAAE,8CAA8C;IAC1E,aAAa,EAAE,+BAA+B;IAC9C,eAAe,EAAE,iCAAiC;IAClD,4BAA4B,EAAE,iDAAiD;IAC/E,sBAAsB,EAAE,0CAA0C;IAClE,gBAAgB,EAAE,mCAAmC;IACrD,kBAAkB,EAAE,sCAAsC;IAC1D,kBAAkB,EAAE,sCAAsC;IAC1D,aAAa,EAAE,gCAAgC;IAC/C,UAAU,EAAE,4BAA4B;IACxC,6BAA6B,EAAE,iDAAiD;IAChF,mBAAmB,EAAE,sCAAsC;IAC3D,kBAAkB,EAAE,qCAAqC;IACzD,kBAAkB,EAAE,qCAAqC;IACzD,0BAA0B,EAAE,8CAA8C;IAC1E,gCAAgC,EAAE,oDAAoD;IACtF,uCAAuC,EAAE,4DAA4D;IACrG,uBAAuB,EAAE,2CAA2C;CACrE,CAAC;AACF,eAAe,sBAAsB,CAAC","sourcesContent":["const customCSSPropertiesMap: Record<string, string> = {\n breadcrumbsGap: '--awsui-breadcrumbs-gap-y98gph',\n contentGapLeft: '--awsui-content-gap-left-y98gph',\n contentGapRight: '--awsui-content-gap-right-y98gph',\n contentHeight: '--awsui-content-height-y98gph',\n containerFirstGap: '--awsui-container-first-gap-y98gph',\n containerFirstOverlapExtension: '--awsui-container-first-overlap-extension-y98gph',\n defaultMaxContentWidth: '--awsui-default-max-content-width-y98gph',\n defaultMinContentWidth: '--awsui-default-min-content-width-y98gph',\n drawerSize: '--awsui-drawer-size-y98gph',\n footerHeight: '--awsui-footer-height-y98gph',\n headerGap: '--awsui-header-gap-y98gph',\n headerHeight: '--awsui-header-height-y98gph',\n layoutWidth: '--awsui-layout-width-y98gph',\n mainGap: '--awsui-main-gap-y98gph',\n mainOffsetLeft: '--awsui-main-offset-left-y98gph',\n mainTemplateRows: '--awsui-main-template-rows-y98gph',\n maxContentWidth: '--awsui-max-content-width-y98gph',\n minContentWidth: '--awsui-min-content-width-y98gph',\n mobileBarHeight: '--awsui-mobile-bar-height-y98gph',\n notificationsGap: '--awsui-notifications-gap-y98gph',\n notificationsHeight: '--awsui-notifications-height-y98gph',\n offsetTop: '--awsui-offset-top-y98gph',\n offsetTopWithNotifications: '--awsui-offset-top-with-notifications-y98gph',\n overlapHeight: '--awsui-overlap-height-y98gph',\n navigationWidth: '--awsui-navigation-width-y98gph',\n splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-y98gph',\n splitPanelReportedSize: '--awsui-split-panel-reported-size-y98gph',\n splitPanelHeight: '--awsui-split-panel-height-y98gph',\n splitPanelMinWidth: '--awsui-split-panel-min-width-y98gph',\n splitPanelMaxWidth: '--awsui-split-panel-max-width-y98gph',\n toolsMaxWidth: '--awsui-tools-max-width-y98gph',\n toolsWidth: '--awsui-tools-width-y98gph',\n toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-y98gph',\n contentScrollMargin: '--awsui-content-scroll-margin-y98gph',\n flashbarStackDepth: '--awsui-flashbar-stack-depth-y98gph',\n flashbarStackIndex: '--awsui-flashbar-stack-index-y98gph',\n flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-y98gph',\n stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-y98gph',\n stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-y98gph',\n dropdownDefaultMaxWidth: '--awsui-dropdown-default-max-width-y98gph',\n};\nexport default customCSSPropertiesMap;\n"]}
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "11090e446c62a52522d936bccb902117cfd8d245"
2
+ "commit": "c3fe8ad71dd7908b19ab2417efe027e38f55a960"
3
3
  }
@@ -5,7 +5,12 @@ export interface Dimensions {
5
5
  left: number;
6
6
  }
7
7
  export declare const getOverflowParents: (element: HTMLElement) => HTMLElement[];
8
- export declare const getOverflowParentDimensions: (element: HTMLElement, excludeClosestParent?: boolean, expandToViewport?: boolean, canExpandOutsideViewport?: boolean) => Dimensions[];
8
+ export declare const getOverflowParentDimensions: ({ element, excludeClosestParent, expandToViewport, canExpandOutsideViewport, }: {
9
+ element: HTMLElement;
10
+ excludeClosestParent: boolean;
11
+ expandToViewport: boolean;
12
+ canExpandOutsideViewport: boolean;
13
+ }) => Dimensions[];
9
14
  type ScrollIntoViewOptions = Parameters<HTMLElement['scrollIntoView']>[0];
10
15
  /**
11
16
  * Calls `scrollIntoView` on the provided element with sensible defaults. If
@@ -1 +1 @@
1
- {"version":3,"file":"scrollable-containers.d.ts","sourceRoot":"lib/default/","sources":["internal/utils/scrollable-containers.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,kBAAkB,YAAa,WAAW,KAAG,WAAW,EAQpE,CAAC;AAEF,eAAO,MAAM,2BAA2B,YAC7B,WAAW,qGAInB,UAAU,EAqCZ,CAAC;AAEF,KAAK,qBAAqB,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1E;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,GAAG,SAAS,EAChC,OAAO,GAAE,qBAA+D,QAGzE"}
1
+ {"version":3,"file":"scrollable-containers.d.ts","sourceRoot":"lib/default/","sources":["internal/utils/scrollable-containers.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,kBAAkB,YAAa,WAAW,KAAG,WAAW,EAQpE,CAAC;AAEF,eAAO,MAAM,2BAA2B;aAM7B,WAAW;0BACE,OAAO;sBACX,OAAO;8BACC,OAAO;MAC/B,UAAU,EAqCb,CAAC;AAEF,KAAK,qBAAqB,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1E;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,GAAG,SAAS,EAChC,OAAO,GAAE,qBAA+D,QAGzE"}
@@ -6,7 +6,7 @@ export const getOverflowParents = (element) => {
6
6
  }
7
7
  return parents;
8
8
  };
9
- export const getOverflowParentDimensions = (element, excludeClosestParent = false, expandToViewport = false, canExpandOutsideViewport = false) => {
9
+ export const getOverflowParentDimensions = ({ element, excludeClosestParent = false, expandToViewport = false, canExpandOutsideViewport = false, }) => {
10
10
  const parents = expandToViewport
11
11
  ? []
12
12
  : getOverflowParents(element).map(el => {
@@ -1 +1 @@
1
- {"version":3,"file":"scrollable-containers.js","sourceRoot":"lib/default/","sources":["internal/utils/scrollable-containers.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAoB,EAAiB,EAAE;IACxE,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,IAAI,IAAI,GAAuB,OAAO,CAAC;IAEvC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,KAAK,QAAQ,CAAC,IAAI,EAAE;QAC5D,gBAAgB,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACrE;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,OAAoB,EACpB,oBAAoB,GAAG,KAAK,EAC5B,gBAAgB,GAAG,KAAK,EACxB,wBAAwB,GAAG,KAAK,EAClB,EAAE;IAChB,MAAM,OAAO,GAA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AU,qBAAqB,CACnC,OAAgC,EAChC,UAAiC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;;IAExE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,wDAAG,OAAO,CAAC,CAAC;AACrC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport interface Dimensions {\n height: number;\n width: number;\n top: number;\n left: number;\n}\n\nexport const getOverflowParents = (element: HTMLElement): HTMLElement[] => {\n const parents = [];\n let node: HTMLElement | null = element;\n\n while ((node = node.parentElement) && node !== document.body) {\n getComputedStyle(node).overflow !== 'visible' && parents.push(node);\n }\n return parents;\n};\n\nexport const getOverflowParentDimensions = (\n element: HTMLElement,\n excludeClosestParent = false,\n expandToViewport = false,\n canExpandOutsideViewport = false\n): Dimensions[] => {\n const parents = expandToViewport\n ? []\n : getOverflowParents(element).map(el => {\n const { height, width, top, left } = el.getBoundingClientRect();\n return {\n // Treat the whole scrollable area as the available height\n // if we're allowed to expand past the viewport.\n height: canExpandOutsideViewport ? el.scrollHeight : height,\n width,\n top,\n left,\n };\n });\n\n if (canExpandOutsideViewport && !expandToViewport) {\n const documentDimensions = document.documentElement.getBoundingClientRect();\n parents.push({\n width: Math.max(documentDimensions.width, document.documentElement.clientWidth),\n height: Math.max(documentDimensions.height, document.documentElement.clientHeight),\n top: documentDimensions.top,\n left: documentDimensions.left,\n });\n } else {\n parents.push({\n height: window.innerHeight,\n width: window.innerWidth,\n top: 0,\n left: 0,\n });\n }\n\n if (excludeClosestParent && !expandToViewport) {\n parents.shift();\n }\n\n return parents;\n};\n\ntype ScrollIntoViewOptions = Parameters<HTMLElement['scrollIntoView']>[0];\n\n/**\n * Calls `scrollIntoView` on the provided element with sensible defaults. If\n * the element does not existed or does not support the `scrollIntoView`\n * method, it will do nothing. This wrapper is created to support environments\n * where the native function is not available like JSDom (feature request:\n * https://github.com/jsdom/jsdom/issues/1422).\n *\n * @param element to be scrolled into view\n * @param options native options for `scrollIntoView`\n */\nexport function scrollElementIntoView(\n element: HTMLElement | undefined,\n options: ScrollIntoViewOptions = { block: 'nearest', inline: 'nearest' }\n) {\n element?.scrollIntoView?.(options);\n}\n"]}
1
+ {"version":3,"file":"scrollable-containers.js","sourceRoot":"lib/default/","sources":["internal/utils/scrollable-containers.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAoB,EAAiB,EAAE;IACxE,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,IAAI,IAAI,GAAuB,OAAO,CAAC;IAEvC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,KAAK,QAAQ,CAAC,IAAI,EAAE;QAC5D,gBAAgB,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACrE;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,OAAO,EACP,oBAAoB,GAAG,KAAK,EAC5B,gBAAgB,GAAG,KAAK,EACxB,wBAAwB,GAAG,KAAK,GAMjC,EAAgB,EAAE;IACjB,MAAM,OAAO,GAAG,gBAAgB;QAC9B,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YACnC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;YAChE,OAAO;gBACL,0DAA0D;gBAC1D,gDAAgD;gBAChD,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM;gBAC3D,KAAK;gBACL,GAAG;gBACH,IAAI;aACL,CAAC;QACJ,CAAC,CAAC,CAAC;IAEP,IAAI,wBAAwB,IAAI,CAAC,gBAAgB,EAAE;QACjD,MAAM,kBAAkB,GAAG,QAAQ,CAAC,eAAe,CAAC,qBAAqB,EAAE,CAAC;QAC5E,OAAO,CAAC,IAAI,CAAC;YACX,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC;YAC/E,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC;YAClF,GAAG,EAAE,kBAAkB,CAAC,GAAG;YAC3B,IAAI,EAAE,kBAAkB,CAAC,IAAI;SAC9B,CAAC,CAAC;KACJ;SAAM;QACL,OAAO,CAAC,IAAI,CAAC;YACX,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,KAAK,EAAE,MAAM,CAAC,UAAU;YACxB,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;SACR,CAAC,CAAC;KACJ;IAED,IAAI,oBAAoB,IAAI,CAAC,gBAAgB,EAAE;QAC7C,OAAO,CAAC,KAAK,EAAE,CAAC;KACjB;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAIF;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAgC,EAChC,UAAiC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;;IAExE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,wDAAG,OAAO,CAAC,CAAC;AACrC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport interface Dimensions {\n height: number;\n width: number;\n top: number;\n left: number;\n}\n\nexport const getOverflowParents = (element: HTMLElement): HTMLElement[] => {\n const parents = [];\n let node: HTMLElement | null = element;\n\n while ((node = node.parentElement) && node !== document.body) {\n getComputedStyle(node).overflow !== 'visible' && parents.push(node);\n }\n return parents;\n};\n\nexport const getOverflowParentDimensions = ({\n element,\n excludeClosestParent = false,\n expandToViewport = false,\n canExpandOutsideViewport = false,\n}: {\n element: HTMLElement;\n excludeClosestParent: boolean;\n expandToViewport: boolean;\n canExpandOutsideViewport: boolean;\n}): Dimensions[] => {\n const parents = expandToViewport\n ? []\n : getOverflowParents(element).map(el => {\n const { height, width, top, left } = el.getBoundingClientRect();\n return {\n // Treat the whole scrollable area as the available height\n // if we're allowed to expand past the viewport.\n height: canExpandOutsideViewport ? el.scrollHeight : height,\n width,\n top,\n left,\n };\n });\n\n if (canExpandOutsideViewport && !expandToViewport) {\n const documentDimensions = document.documentElement.getBoundingClientRect();\n parents.push({\n width: Math.max(documentDimensions.width, document.documentElement.clientWidth),\n height: Math.max(documentDimensions.height, document.documentElement.clientHeight),\n top: documentDimensions.top,\n left: documentDimensions.left,\n });\n } else {\n parents.push({\n height: window.innerHeight,\n width: window.innerWidth,\n top: 0,\n left: 0,\n });\n }\n\n if (excludeClosestParent && !expandToViewport) {\n parents.shift();\n }\n\n return parents;\n};\n\ntype ScrollIntoViewOptions = Parameters<HTMLElement['scrollIntoView']>[0];\n\n/**\n * Calls `scrollIntoView` on the provided element with sensible defaults. If\n * the element does not existed or does not support the `scrollIntoView`\n * method, it will do nothing. This wrapper is created to support environments\n * where the native function is not available like JSDom (feature request:\n * https://github.com/jsdom/jsdom/issues/1422).\n *\n * @param element to be scrolled into view\n * @param options native options for `scrollIntoView`\n */\nexport function scrollElementIntoView(\n element: HTMLElement | undefined,\n options: ScrollIntoViewOptions = { block: 'nearest', inline: 'nearest' }\n) {\n element?.scrollIntoView?.(options);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["modal/internal.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAYlF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOjD,KAAK,kBAAkB,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,0BAA0B,CAAC;AAExF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,eAM/E"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["modal/internal.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAYlF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOjD,KAAK,kBAAkB,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,0BAA0B,CAAC;AAExF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,eAU/E"}
package/modal/internal.js CHANGED
@@ -23,13 +23,15 @@ import { useContainerQuery } from '@cloudscape-design/component-toolkit';
23
23
  import { ButtonContext } from '../internal/context/button-context';
24
24
  export default function InternalModal(_a) {
25
25
  var { modalRoot } = _a, rest = __rest(_a, ["modalRoot"]);
26
- return (React.createElement(Portal, { container: modalRoot },
27
- React.createElement(InnerModal, Object.assign({}, rest))));
26
+ const referrerId = useUniqueId('modal');
27
+ return (React.createElement("div", { id: referrerId },
28
+ React.createElement(Portal, { container: modalRoot },
29
+ React.createElement(InnerModal, Object.assign({}, rest, { referrerId: referrerId })))));
28
30
  }
29
31
  // Separate component to prevent the Portal from getting in the way of refs, as it needs extra cycles to render the inner components.
30
32
  // useContainerQuery needs its targeted element to exist on the first render in order to work properly.
31
33
  function InnerModal(_a) {
32
- var { size, visible, header, children, footer, disableContentPaddings, onDismiss, __internalRootRef = null } = _a, rest = __rest(_a, ["size", "visible", "header", "children", "footer", "disableContentPaddings", "onDismiss", "__internalRootRef"]);
34
+ var { size, visible, header, children, footer, disableContentPaddings, onDismiss, __internalRootRef = null, referrerId } = _a, rest = __rest(_a, ["size", "visible", "header", "children", "footer", "disableContentPaddings", "onDismiss", "__internalRootRef", "referrerId"]);
33
35
  const instanceUniqueId = useUniqueId();
34
36
  const headerId = `${rest.id || instanceUniqueId}-header`;
35
37
  const lastMouseDownElementRef = useRef(null);
@@ -86,7 +88,7 @@ function InnerModal(_a) {
86
88
  const [footerHeight, footerRef] = useContainerQuery(rect => rect.borderBoxHeight);
87
89
  return (React.createElement(ButtonContext.Provider, { value: { onClick: () => { } } },
88
90
  React.createElement(FormFieldContext.Provider, { value: {} },
89
- React.createElement("div", Object.assign({}, baseProps, { className: clsx(styles.root, { [styles.hidden]: !visible }, baseProps.className, isRefresh && styles.refresh), role: "dialog", "aria-modal": true, "aria-labelledby": headerId, onMouseDown: onOverlayMouseDown, onClick: onOverlayClick, ref: mergedRef, style: footerHeight ? { scrollPaddingBottom: footerHeight } : undefined }),
91
+ React.createElement("div", Object.assign({}, baseProps, { className: clsx(styles.root, { [styles.hidden]: !visible }, baseProps.className, isRefresh && styles.refresh), role: "dialog", "aria-modal": true, "aria-labelledby": headerId, onMouseDown: onOverlayMouseDown, onClick: onOverlayClick, ref: mergedRef, style: footerHeight ? { scrollPaddingBottom: footerHeight } : undefined, "data-awsui-referrer-id": referrerId }),
90
92
  React.createElement(FocusLock, { disabled: !visible, autoFocus: true, restoreFocus: true, className: styles['focus-lock'] },
91
93
  React.createElement("div", { className: clsx(styles.dialog, styles[size], styles[`breakpoint-${breakpoint}`], isRefresh && styles.refresh), onKeyDown: escKeyHandler },
92
94
  React.createElement("div", { className: styles.container },
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["modal/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAA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AGJ,8BAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,IAClD,MAAM,CACF,CACQ,CACb;4BACN,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,sBAAsB,EAAE,CAAC;gCACtF,QAAQ;gCACT,6BAAK,GAAG,EAAE,iBAAiB,GAAI,CAC3B;4BACL,MAAM,IAAI,CACT,6BAAK,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC,IACxF,MAAM,CACH,CACP,CACG,CACF,CACI,CACR,CACoB,CACL,CAC1B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { KeyCode } from '../internal/keycode';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { InternalButton } from '../button/internal';\nimport InternalHeader from '../header/internal';\nimport Portal from '../internal/components/portal';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { FormFieldContext } from '../internal/context/form-field-context';\n\nimport { disableBodyScrolling, enableBodyScrolling } from './body-scroll';\nimport { ModalProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { SomeRequired } from '../internal/types';\nimport FocusLock from '../internal/components/focus-lock';\nimport { useInternalI18n } from '../i18n/context';\nimport { useIntersectionObserver } from '../internal/hooks/use-intersection-observer';\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { ButtonContext } from '../internal/context/button-context';\n\ntype InternalModalProps = SomeRequired<ModalProps, 'size'> & InternalBaseComponentProps;\n\nexport default function InternalModal({ modalRoot, ...rest }: InternalModalProps) {\n return (\n <Portal container={modalRoot}>\n <InnerModal {...rest} />\n </Portal>\n );\n}\n\n// Separate component to prevent the Portal from getting in the way of refs, as it needs extra cycles to render the inner components.\n// useContainerQuery needs its targeted element to exist on the first render in order to work properly.\nfunction InnerModal({\n size,\n visible,\n header,\n children,\n footer,\n disableContentPaddings,\n onDismiss,\n __internalRootRef = null,\n ...rest\n}: InternalModalProps) {\n const instanceUniqueId = useUniqueId();\n const headerId = `${rest.id || instanceUniqueId}-header`;\n const lastMouseDownElementRef = useRef<HTMLElement | null>(null);\n const [breakpoint, breakpointsRef] = useContainerBreakpoints(['xs']);\n\n const i18n = useInternalI18n('modal');\n const closeAriaLabel = i18n('closeAriaLabel', rest.closeAriaLabel);\n\n const refObject = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs(breakpointsRef, refObject, __internalRootRef);\n\n const isRefresh = useVisualRefresh();\n\n const baseProps = getBaseProps(rest);\n\n // enable body scroll and restore focus if unmounting while visible\n useEffect(() => {\n return () => {\n enableBodyScrolling();\n };\n }, []);\n\n // enable / disable body scroll\n useEffect(() => {\n if (visible) {\n disableBodyScrolling();\n } else {\n enableBodyScrolling();\n }\n }, [visible]);\n\n // Because we hide the element with styles (and not actually detach it from DOM), we need to scroll to top\n useEffect(() => {\n if (visible && refObject.current) {\n refObject.current.scrollTop = 0;\n }\n }, [visible]);\n\n const dismiss = (reason: string) => fireNonCancelableEvent(onDismiss, { reason });\n\n const onOverlayMouseDown = (event: React.MouseEvent) => {\n lastMouseDownElementRef.current = event.target as HTMLElement;\n };\n const onOverlayClick = (event: React.MouseEvent) => {\n const overlay = refObject.current;\n const lastClicked = lastMouseDownElementRef.current;\n\n if (event.target === overlay && lastClicked === overlay) {\n dismiss('overlay');\n }\n };\n const onCloseButtonClick = () => dismiss('closeButton');\n const escKeyHandler = (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.escape) {\n dismiss('keyboard');\n }\n };\n\n // We use an empty div element at the end of the content slot as a sentinel\n // to detect when the user has scrolled to the bottom.\n const { ref: stickySentinelRef, isIntersecting: footerStuck } = useIntersectionObserver();\n\n // Add extra scroll padding to account for the height of the sticky footer,\n // to prevent it from covering focused elements.\n const [footerHeight, footerRef] = useContainerQuery(rect => rect.borderBoxHeight);\n\n return (\n <ButtonContext.Provider value={{ onClick: () => {} }}>\n <FormFieldContext.Provider value={{}}>\n <div\n {...baseProps}\n className={clsx(styles.root, { [styles.hidden]: !visible }, baseProps.className, isRefresh && styles.refresh)}\n role=\"dialog\"\n aria-modal={true}\n aria-labelledby={headerId}\n onMouseDown={onOverlayMouseDown}\n onClick={onOverlayClick}\n ref={mergedRef}\n style={footerHeight ? { scrollPaddingBottom: footerHeight } : undefined}\n >\n <FocusLock disabled={!visible} autoFocus={true} restoreFocus={true} className={styles['focus-lock']}>\n <div\n className={clsx(\n styles.dialog,\n styles[size],\n styles[`breakpoint-${breakpoint}`],\n isRefresh && styles.refresh\n )}\n onKeyDown={escKeyHandler}\n >\n <div className={styles.container}>\n <div className={styles.header}>\n <InternalHeader\n variant=\"h2\"\n __disableActionsWrapping={true}\n actions={\n <InternalButton\n ariaLabel={closeAriaLabel}\n className={styles['dismiss-control']}\n variant=\"modal-dismiss\"\n iconName=\"close\"\n formAction=\"none\"\n onClick={onCloseButtonClick}\n />\n }\n >\n <span id={headerId} className={styles['header--text']}>\n {header}\n </span>\n </InternalHeader>\n </div>\n <div className={clsx(styles.content, { [styles['no-paddings']]: disableContentPaddings })}>\n {children}\n <div ref={stickySentinelRef} />\n </div>\n {footer && (\n <div ref={footerRef} className={clsx(styles.footer, footerStuck && styles['footer--stuck'])}>\n {footer}\n </div>\n )}\n </div>\n </div>\n </FocusLock>\n </div>\n </FormFieldContext.Provider>\n </ButtonContext.Provider>\n );\n}\n"]}
1
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cAAc,IACb,OAAO,EAAC,IAAI,EACZ,wBAAwB,EAAE,IAAI,EAC9B,OAAO,EACL,oBAAC,cAAc,IACb,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,EACpC,OAAO,EAAC,eAAe,EACvB,QAAQ,EAAC,OAAO,EAChB,UAAU,EAAC,MAAM,EACjB,OAAO,EAAE,kBAAkB,GAC3B;oCAGJ,8BAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,IAClD,MAAM,CACF,CACQ,CACb;4BACN,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,sBAAsB,EAAE,CAAC;gCACtF,QAAQ;gCACT,6BAAK,GAAG,EAAE,iBAAiB,GAAI,CAC3B;4BACL,MAAM,IAAI,CACT,6BAAK,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC,IACxF,MAAM,CACH,CACP,CACG,CACF,CACI,CACR,CACoB,CACL,CAC1B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { KeyCode } from '../internal/keycode';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { InternalButton } from '../button/internal';\nimport InternalHeader from '../header/internal';\nimport Portal from '../internal/components/portal';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { FormFieldContext } from '../internal/context/form-field-context';\n\nimport { disableBodyScrolling, enableBodyScrolling } from './body-scroll';\nimport { ModalProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { SomeRequired } from '../internal/types';\nimport FocusLock from '../internal/components/focus-lock';\nimport { useInternalI18n } from '../i18n/context';\nimport { useIntersectionObserver } from '../internal/hooks/use-intersection-observer';\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { ButtonContext } from '../internal/context/button-context';\n\ntype InternalModalProps = SomeRequired<ModalProps, 'size'> & InternalBaseComponentProps;\n\nexport default function InternalModal({ modalRoot, ...rest }: InternalModalProps) {\n const referrerId = useUniqueId('modal');\n\n return (\n <div id={referrerId}>\n <Portal container={modalRoot}>\n <InnerModal {...rest} referrerId={referrerId} />\n </Portal>\n </div>\n );\n}\n\n// Separate component to prevent the Portal from getting in the way of refs, as it needs extra cycles to render the inner components.\n// useContainerQuery needs its targeted element to exist on the first render in order to work properly.\nfunction InnerModal({\n size,\n visible,\n header,\n children,\n footer,\n disableContentPaddings,\n onDismiss,\n __internalRootRef = null,\n referrerId,\n ...rest\n}: InternalModalProps & { referrerId: string }) {\n const instanceUniqueId = useUniqueId();\n const headerId = `${rest.id || instanceUniqueId}-header`;\n const lastMouseDownElementRef = useRef<HTMLElement | null>(null);\n const [breakpoint, breakpointsRef] = useContainerBreakpoints(['xs']);\n\n const i18n = useInternalI18n('modal');\n const closeAriaLabel = i18n('closeAriaLabel', rest.closeAriaLabel);\n\n const refObject = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs(breakpointsRef, refObject, __internalRootRef);\n\n const isRefresh = useVisualRefresh();\n\n const baseProps = getBaseProps(rest);\n\n // enable body scroll and restore focus if unmounting while visible\n useEffect(() => {\n return () => {\n enableBodyScrolling();\n };\n }, []);\n\n // enable / disable body scroll\n useEffect(() => {\n if (visible) {\n disableBodyScrolling();\n } else {\n enableBodyScrolling();\n }\n }, [visible]);\n\n // Because we hide the element with styles (and not actually detach it from DOM), we need to scroll to top\n useEffect(() => {\n if (visible && refObject.current) {\n refObject.current.scrollTop = 0;\n }\n }, [visible]);\n\n const dismiss = (reason: string) => fireNonCancelableEvent(onDismiss, { reason });\n\n const onOverlayMouseDown = (event: React.MouseEvent) => {\n lastMouseDownElementRef.current = event.target as HTMLElement;\n };\n const onOverlayClick = (event: React.MouseEvent) => {\n const overlay = refObject.current;\n const lastClicked = lastMouseDownElementRef.current;\n\n if (event.target === overlay && lastClicked === overlay) {\n dismiss('overlay');\n }\n };\n const onCloseButtonClick = () => dismiss('closeButton');\n const escKeyHandler = (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.escape) {\n dismiss('keyboard');\n }\n };\n\n // We use an empty div element at the end of the content slot as a sentinel\n // to detect when the user has scrolled to the bottom.\n const { ref: stickySentinelRef, isIntersecting: footerStuck } = useIntersectionObserver();\n\n // Add extra scroll padding to account for the height of the sticky footer,\n // to prevent it from covering focused elements.\n const [footerHeight, footerRef] = useContainerQuery(rect => rect.borderBoxHeight);\n\n return (\n <ButtonContext.Provider value={{ onClick: () => {} }}>\n <FormFieldContext.Provider value={{}}>\n <div\n {...baseProps}\n className={clsx(styles.root, { [styles.hidden]: !visible }, baseProps.className, isRefresh && styles.refresh)}\n role=\"dialog\"\n aria-modal={true}\n aria-labelledby={headerId}\n onMouseDown={onOverlayMouseDown}\n onClick={onOverlayClick}\n ref={mergedRef}\n style={footerHeight ? { scrollPaddingBottom: footerHeight } : undefined}\n data-awsui-referrer-id={referrerId}\n >\n <FocusLock disabled={!visible} autoFocus={true} restoreFocus={true} className={styles['focus-lock']}>\n <div\n className={clsx(\n styles.dialog,\n styles[size],\n styles[`breakpoint-${breakpoint}`],\n isRefresh && styles.refresh\n )}\n onKeyDown={escKeyHandler}\n >\n <div className={styles.container}>\n <div className={styles.header}>\n <InternalHeader\n variant=\"h2\"\n __disableActionsWrapping={true}\n actions={\n <InternalButton\n ariaLabel={closeAriaLabel}\n className={styles['dismiss-control']}\n variant=\"modal-dismiss\"\n iconName=\"close\"\n formAction=\"none\"\n onClick={onCloseButtonClick}\n />\n }\n >\n <span id={headerId} className={styles['header--text']}>\n {header}\n </span>\n </InternalHeader>\n </div>\n <div className={clsx(styles.content, { [styles['no-paddings']]: disableContentPaddings })}>\n {children}\n <div ref={stickySentinelRef} />\n </div>\n {footer && (\n <div ref={footerRef} className={clsx(styles.footer, footerStuck && styles['footer--stuck'])}>\n {footer}\n </div>\n )}\n </div>\n </div>\n </FocusLock>\n </div>\n </FormFieldContext.Provider>\n </ButtonContext.Provider>\n );\n}\n"]}
package/package.json CHANGED
@@ -10,6 +10,7 @@
10
10
  "./interfaces": "./interfaces.js",
11
11
  "./contexts/form-field": "./contexts/form-field.js",
12
12
  "./alert": "./alert/index.js",
13
+ "./anchor-navigation": "./anchor-navigation/index.js",
13
14
  "./annotation-context": "./annotation-context/index.js",
14
15
  "./app-layout": "./app-layout/index.js",
15
16
  "./area-chart": "./area-chart/index.js",
@@ -109,7 +110,7 @@
109
110
  "./internal/base-component/index.js",
110
111
  "./internal/base-component/styles.css.js"
111
112
  ],
112
- "version": "3.0.387",
113
+ "version": "3.0.389",
113
114
  "repository": {
114
115
  "type": "git",
115
116
  "url": "https://github.com/cloudscape-design/components.git"
@@ -1,23 +1,23 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "progress": "awsui_progress_11huc_1vrrs_185",
5
- "result-state": "awsui_result-state_11huc_1vrrs_199",
6
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_1vrrs_1",
7
- "root": "awsui_root_11huc_1vrrs_221",
8
- "with-result-button": "awsui_with-result-button_11huc_1vrrs_234",
9
- "result-text": "awsui_result-text_11huc_1vrrs_238",
10
- "result-container-error": "awsui_result-container-error_11huc_1vrrs_242",
11
- "result-container-success": "awsui_result-container-success_11huc_1vrrs_242",
12
- "result-button": "awsui_result-button_11huc_1vrrs_246",
13
- "word-wrap": "awsui_word-wrap_11huc_1vrrs_251",
14
- "label-flash": "awsui_label-flash_11huc_1vrrs_257",
15
- "label-key-value": "awsui_label-key-value_11huc_1vrrs_261",
16
- "flash": "awsui_flash_11huc_1vrrs_269",
17
- "progress-container": "awsui_progress-container_11huc_1vrrs_273",
18
- "percentage-container": "awsui_percentage-container_11huc_1vrrs_280",
19
- "percentage": "awsui_percentage_11huc_1vrrs_280",
20
- "complete": "awsui_complete_11huc_1vrrs_315",
21
- "progress-in-flash": "awsui_progress-in-flash_11huc_1vrrs_330"
4
+ "progress": "awsui_progress_11huc_106uy_185",
5
+ "result-state": "awsui_result-state_11huc_106uy_199",
6
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_106uy_1",
7
+ "root": "awsui_root_11huc_106uy_221",
8
+ "with-result-button": "awsui_with-result-button_11huc_106uy_234",
9
+ "result-text": "awsui_result-text_11huc_106uy_238",
10
+ "result-container-error": "awsui_result-container-error_11huc_106uy_242",
11
+ "result-container-success": "awsui_result-container-success_11huc_106uy_242",
12
+ "result-button": "awsui_result-button_11huc_106uy_246",
13
+ "word-wrap": "awsui_word-wrap_11huc_106uy_251",
14
+ "label-flash": "awsui_label-flash_11huc_106uy_256",
15
+ "label-key-value": "awsui_label-key-value_11huc_106uy_260",
16
+ "flash": "awsui_flash_11huc_106uy_268",
17
+ "progress-container": "awsui_progress-container_11huc_106uy_272",
18
+ "percentage-container": "awsui_percentage-container_11huc_106uy_279",
19
+ "percentage": "awsui_percentage_11huc_106uy_279",
20
+ "complete": "awsui_complete_11huc_106uy_314",
21
+ "progress-in-flash": "awsui_progress-in-flash_11huc_106uy_329"
22
22
  };
23
23