@cloudscape-design/components-themeable 3.0.315 → 3.0.317

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 (75) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/column-layout/flexible-column-layout/styles.scss +27 -0
  3. package/lib/internal/scss/expandable-section/styles.scss +11 -18
  4. package/lib/internal/scss/split-panel/styles.scss +2 -0
  5. package/lib/internal/template/alert/internal.d.ts.map +1 -1
  6. package/lib/internal/template/alert/internal.js +5 -1
  7. package/lib/internal/template/alert/internal.js.map +1 -1
  8. package/lib/internal/template/breadcrumb-group/item/item.d.ts.map +1 -1
  9. package/lib/internal/template/breadcrumb-group/item/item.js +7 -5
  10. package/lib/internal/template/breadcrumb-group/item/item.js.map +1 -1
  11. package/lib/internal/template/column-layout/flexible-column-layout/index.d.ts +9 -0
  12. package/lib/internal/template/column-layout/flexible-column-layout/index.d.ts.map +1 -0
  13. package/lib/internal/template/column-layout/flexible-column-layout/index.js +33 -0
  14. package/lib/internal/template/column-layout/flexible-column-layout/index.js.map +1 -0
  15. package/lib/internal/template/column-layout/flexible-column-layout/styles.css.js +10 -0
  16. package/lib/internal/template/column-layout/flexible-column-layout/styles.scoped.css +24 -0
  17. package/lib/internal/template/column-layout/flexible-column-layout/styles.selectors.js +11 -0
  18. package/lib/internal/template/column-layout/grid-column-layout.d.ts +10 -0
  19. package/lib/internal/template/column-layout/grid-column-layout.d.ts.map +1 -0
  20. package/lib/internal/template/column-layout/grid-column-layout.js +32 -0
  21. package/lib/internal/template/column-layout/grid-column-layout.js.map +1 -0
  22. package/lib/internal/template/column-layout/index.d.ts.map +1 -1
  23. package/lib/internal/template/column-layout/index.js +2 -4
  24. package/lib/internal/template/column-layout/index.js.map +1 -1
  25. package/lib/internal/template/column-layout/interfaces.d.ts +11 -0
  26. package/lib/internal/template/column-layout/interfaces.d.ts.map +1 -1
  27. package/lib/internal/template/column-layout/interfaces.js.map +1 -1
  28. package/lib/internal/template/column-layout/internal.d.ts +2 -3
  29. package/lib/internal/template/column-layout/internal.d.ts.map +1 -1
  30. package/lib/internal/template/column-layout/internal.js +6 -27
  31. package/lib/internal/template/column-layout/internal.js.map +1 -1
  32. package/lib/internal/template/expandable-section/expandable-section-header.d.ts +4 -1
  33. package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
  34. package/lib/internal/template/expandable-section/expandable-section-header.js +19 -10
  35. package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
  36. package/lib/internal/template/expandable-section/interfaces.d.ts +11 -3
  37. package/lib/internal/template/expandable-section/interfaces.d.ts.map +1 -1
  38. package/lib/internal/template/expandable-section/interfaces.js.map +1 -1
  39. package/lib/internal/template/expandable-section/internal.d.ts +1 -1
  40. package/lib/internal/template/expandable-section/internal.d.ts.map +1 -1
  41. package/lib/internal/template/expandable-section/internal.js +2 -2
  42. package/lib/internal/template/expandable-section/internal.js.map +1 -1
  43. package/lib/internal/template/expandable-section/styles.css.js +26 -24
  44. package/lib/internal/template/expandable-section/styles.scoped.css +50 -58
  45. package/lib/internal/template/expandable-section/styles.selectors.js +26 -24
  46. package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
  47. package/lib/internal/template/flashbar/flash.js +6 -2
  48. package/lib/internal/template/flashbar/flash.js.map +1 -1
  49. package/lib/internal/template/form-field/internal.d.ts.map +1 -1
  50. package/lib/internal/template/form-field/internal.js +8 -10
  51. package/lib/internal/template/form-field/internal.js.map +1 -1
  52. package/lib/internal/template/header/internal.d.ts.map +1 -1
  53. package/lib/internal/template/header/internal.js +2 -1
  54. package/lib/internal/template/header/internal.js.map +1 -1
  55. package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  56. package/lib/internal/template/internal/analytics/components/analytics-funnel.js +3 -2
  57. package/lib/internal/template/internal/analytics/components/analytics-funnel.js.map +1 -1
  58. package/lib/internal/template/internal/analytics/hooks/use-funnel.d.ts +1 -1
  59. package/lib/internal/template/internal/analytics/hooks/use-funnel.d.ts.map +1 -1
  60. package/lib/internal/template/internal/analytics/hooks/use-funnel.js +5 -5
  61. package/lib/internal/template/internal/analytics/hooks/use-funnel.js.map +1 -1
  62. package/lib/internal/template/internal/analytics/interfaces.d.ts +2 -2
  63. package/lib/internal/template/internal/analytics/interfaces.d.ts.map +1 -1
  64. package/lib/internal/template/internal/analytics/interfaces.js.map +1 -1
  65. package/lib/internal/template/internal/analytics/selectors.d.ts +15 -1
  66. package/lib/internal/template/internal/analytics/selectors.d.ts.map +1 -1
  67. package/lib/internal/template/internal/analytics/selectors.js +19 -5
  68. package/lib/internal/template/internal/analytics/selectors.js.map +1 -1
  69. package/lib/internal/template/internal/environment.js +1 -1
  70. package/lib/internal/template/link/internal.js +4 -4
  71. package/lib/internal/template/link/internal.js.map +1 -1
  72. package/lib/internal/template/split-panel/styles.css.js +59 -59
  73. package/lib/internal/template/split-panel/styles.scoped.css +83 -81
  74. package/lib/internal/template/split-panel/styles.selectors.js +59 -59
  75. package/package.json +1 -1
@@ -94,10 +94,10 @@ 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_content-enter_gwq0h_138i7_97:not(#\9) {
98
- animation: awsui_awsui-motion-fade-in_gwq0h_138i7_1 var(--motion-duration-show-paced-et23hs, 180ms) var(--motion-easing-show-paced-ddbkug, ease-out);
97
+ .awsui_content-enter_gwq0h_13dhi_97:not(#\9) {
98
+ animation: awsui_awsui-motion-fade-in_gwq0h_13dhi_1 var(--motion-duration-show-paced-et23hs, 180ms) var(--motion-easing-show-paced-ddbkug, ease-out);
99
99
  }
100
- @keyframes awsui_awsui-motion-fade-in_gwq0h_138i7_1 {
100
+ @keyframes awsui_awsui-motion-fade-in_gwq0h_13dhi_1 {
101
101
  from {
102
102
  opacity: 0.2;
103
103
  }
@@ -106,40 +106,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
106
106
  }
107
107
  }
108
108
  @media (prefers-reduced-motion: reduce) {
109
- .awsui_content-enter_gwq0h_138i7_97:not(#\9) {
109
+ .awsui_content-enter_gwq0h_13dhi_97:not(#\9) {
110
110
  animation: none;
111
111
  transition: none;
112
112
  }
113
113
  }
114
- .awsui-motion-disabled .awsui_content-enter_gwq0h_138i7_97:not(#\9), .awsui-mode-entering .awsui_content-enter_gwq0h_138i7_97:not(#\9) {
114
+ .awsui-motion-disabled .awsui_content-enter_gwq0h_13dhi_97:not(#\9), .awsui-mode-entering .awsui_content-enter_gwq0h_13dhi_97:not(#\9) {
115
115
  animation: none;
116
116
  transition: none;
117
117
  }
118
118
 
119
- .awsui_trigger-expanded_gwq0h_138i7_119:not(#\9) {
119
+ .awsui_trigger-expanded_gwq0h_13dhi_119:not(#\9) {
120
120
  transition: border-bottom-color var(--motion-duration-show-paced-et23hs, 180ms) var(--motion-easing-show-paced-ddbkug, ease-out);
121
121
  }
122
122
  @media (prefers-reduced-motion: reduce) {
123
- .awsui_trigger-expanded_gwq0h_138i7_119:not(#\9) {
123
+ .awsui_trigger-expanded_gwq0h_13dhi_119:not(#\9) {
124
124
  animation: none;
125
125
  transition: none;
126
126
  }
127
127
  }
128
- .awsui-motion-disabled .awsui_trigger-expanded_gwq0h_138i7_119:not(#\9), .awsui-mode-entering .awsui_trigger-expanded_gwq0h_138i7_119:not(#\9) {
128
+ .awsui-motion-disabled .awsui_trigger-expanded_gwq0h_13dhi_119:not(#\9), .awsui-mode-entering .awsui_trigger-expanded_gwq0h_13dhi_119:not(#\9) {
129
129
  animation: none;
130
130
  transition: none;
131
131
  }
132
132
 
133
- .awsui_icon_gwq0h_138i7_133:not(#\9) {
133
+ .awsui_icon_gwq0h_13dhi_133:not(#\9) {
134
134
  transition: transform var(--motion-duration-rotate-90-l1syz5, 135ms) var(--motion-easing-rotate-90-8xzw2x, cubic-bezier(0.165, 0.84, 0.44, 1));
135
135
  }
136
136
  @media (prefers-reduced-motion: reduce) {
137
- .awsui_icon_gwq0h_138i7_133:not(#\9) {
137
+ .awsui_icon_gwq0h_13dhi_133:not(#\9) {
138
138
  animation: none;
139
139
  transition: none;
140
140
  }
141
141
  }
142
- .awsui-motion-disabled .awsui_icon_gwq0h_138i7_133:not(#\9), .awsui-mode-entering .awsui_icon_gwq0h_138i7_133:not(#\9) {
142
+ .awsui-motion-disabled .awsui_icon_gwq0h_13dhi_133:not(#\9), .awsui-mode-entering .awsui_icon_gwq0h_13dhi_133:not(#\9) {
143
143
  animation: none;
144
144
  transition: none;
145
145
  }
@@ -148,7 +148,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
148
148
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
149
149
  SPDX-License-Identifier: Apache-2.0
150
150
  */
151
- .awsui_root_gwq0h_138i7_151:not(#\9) {
151
+ .awsui_root_gwq0h_13dhi_151:not(#\9) {
152
152
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
153
153
  border-collapse: separate;
154
154
  border-spacing: 0;
@@ -191,24 +191,23 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
191
191
  display: block;
192
192
  }
193
193
 
194
- .awsui_icon_gwq0h_138i7_133:not(#\9) {
194
+ .awsui_icon_gwq0h_13dhi_133:not(#\9) {
195
195
  transform: rotate(-90deg);
196
196
  }
197
- .awsui_icon_gwq0h_138i7_133.awsui_expanded_gwq0h_138i7_171:not(#\9) {
197
+ .awsui_icon_gwq0h_13dhi_133.awsui_expanded_gwq0h_13dhi_171:not(#\9) {
198
198
  transform: rotate(0deg);
199
199
  }
200
200
 
201
- .awsui_icon-container_gwq0h_138i7_175:not(#\9) {
201
+ .awsui_icon-container_gwq0h_13dhi_175:not(#\9) {
202
202
  position: relative;
203
203
  margin-left: calc((var(--font-body-m-line-height-9vkzhc, 22px) - var(--size-icon-normal-sz51st, 16px)) / -2);
204
204
  margin-right: calc(var(--space-xxs-xx079q, 4px) + var(--border-divider-list-width-iu80dg, 1px));
205
205
  }
206
- .awsui_icon-container-container_gwq0h_138i7_180:not(#\9) {
206
+ .awsui_icon-container-container_gwq0h_13dhi_180:not(#\9) {
207
207
  margin-right: var(--space-xs-7veqkr, 8px);
208
208
  }
209
209
 
210
- .awsui_trigger_gwq0h_138i7_119:not(#\9) {
211
- cursor: pointer;
210
+ .awsui_wrapper_gwq0h_13dhi_184:not(#\9) {
212
211
  box-sizing: border-box;
213
212
  display: flex;
214
213
  border: none;
@@ -216,19 +215,19 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
216
215
  line-height: var(--font-body-m-line-height-9vkzhc, 22px);
217
216
  text-align: left;
218
217
  }
219
- .awsui_trigger-default_gwq0h_138i7_193:not(#\9) {
218
+ .awsui_wrapper-default_gwq0h_13dhi_192:not(#\9) {
220
219
  padding: var(--space-scaled-xxs-gmgwxk, 4px) var(--space-xxs-xx079q, 4px);
221
220
  }
222
- .awsui_trigger-footer_gwq0h_138i7_196:not(#\9) {
221
+ .awsui_wrapper-footer_gwq0h_13dhi_195:not(#\9) {
223
222
  padding: var(--space-scaled-xxs-gmgwxk, 4px) 0;
224
223
  }
225
- .awsui_trigger-default_gwq0h_138i7_193:not(#\9), .awsui_trigger-footer_gwq0h_138i7_196:not(#\9) {
224
+ .awsui_wrapper-default_gwq0h_13dhi_192:not(#\9), .awsui_wrapper-footer_gwq0h_13dhi_195:not(#\9) {
226
225
  border: var(--border-divider-section-width-p0xg84, 1px) solid transparent;
227
226
  }
228
- .awsui_trigger-navigation_gwq0h_138i7_202:not(#\9) {
227
+ .awsui_wrapper-navigation_gwq0h_13dhi_201:not(#\9) {
229
228
  border-left: var(--border-divider-section-width-p0xg84, 1px) solid transparent;
230
229
  }
231
- .awsui_trigger-default_gwq0h_138i7_193:not(#\9), .awsui_trigger-navigation_gwq0h_138i7_202:not(#\9), .awsui_trigger-footer_gwq0h_138i7_196:not(#\9) {
230
+ .awsui_wrapper-default_gwq0h_13dhi_192:not(#\9), .awsui_wrapper-navigation_gwq0h_13dhi_201:not(#\9), .awsui_wrapper-footer_gwq0h_13dhi_195:not(#\9) {
232
231
  color: var(--color-text-expandable-section-default-dhf1fv, #545b64);
233
232
  font-weight: var(--font-heading-s-weight-rxw9ij, 700);
234
233
  -webkit-font-smoothing: var(--font-smoothing-webkit-teqshp, auto);
@@ -236,41 +235,41 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
236
235
  font-size: var(--font-expandable-heading-size-x20mdp, 14px);
237
236
  letter-spacing: var(--font-heading-s-letter-spacing-jp7jyt, normal);
238
237
  }
239
- .awsui_trigger-default_gwq0h_138i7_193:not(#\9):hover, .awsui_trigger-navigation_gwq0h_138i7_202:not(#\9):hover, .awsui_trigger-footer_gwq0h_138i7_196:not(#\9):hover {
238
+ .awsui_wrapper-default_gwq0h_13dhi_192:not(#\9):hover, .awsui_wrapper-navigation_gwq0h_13dhi_201:not(#\9):hover, .awsui_wrapper-footer_gwq0h_13dhi_195:not(#\9):hover {
240
239
  color: var(--color-text-expandable-section-hover-q765vp, #16191f);
241
240
  }
242
- .awsui_trigger-container_gwq0h_138i7_216:not(#\9) {
241
+ .awsui_wrapper-container_gwq0h_13dhi_215:not(#\9) {
243
242
  padding: var(--space-container-header-vertical-ezarcz, 12px) var(--space-container-horizontal-7bp7wa, 20px);
244
243
  }
245
- body[data-awsui-focus-visible=true] .awsui_trigger-container_gwq0h_138i7_216:not(#\9):focus {
244
+ body[data-awsui-focus-visible=true] .awsui_wrapper-container_gwq0h_13dhi_215:not(#\9):focus {
246
245
  padding: calc(var(--space-scaled-s-73r995, 12px) - var(--border-divider-section-width-p0xg84, 1px)) calc(var(--space-l-z6h7qi, 20px) - var(--border-divider-section-width-p0xg84, 1px));
247
246
  }
248
- .awsui_trigger-default_gwq0h_138i7_193.awsui_trigger-expanded_gwq0h_138i7_119:not(#\9) {
247
+ .awsui_wrapper-default_gwq0h_13dhi_192.awsui_wrapper-expanded_gwq0h_13dhi_221:not(#\9) {
249
248
  border-bottom-color: var(--color-border-divider-default-uqjcpn, #eaeded);
250
249
  }
251
250
 
252
- .awsui_header_gwq0h_138i7_226:not(#\9) {
251
+ .awsui_header_gwq0h_13dhi_225:not(#\9) {
253
252
  display: flex;
254
253
  }
255
- .awsui_header-wrapper_gwq0h_138i7_229:not(#\9) {
254
+ .awsui_header-wrapper_gwq0h_13dhi_228:not(#\9) {
256
255
  font-weight: inherit;
257
256
  font-size: inherit;
258
257
  letter-spacing: inherit;
259
258
  margin: 0;
260
259
  padding: 0;
261
260
  }
262
- .awsui_header-button_gwq0h_138i7_236:not(#\9) {
261
+ .awsui_header-button_gwq0h_13dhi_235:not(#\9) {
263
262
  box-sizing: border-box;
264
263
  display: flex;
265
264
  }
266
- body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_138i7_236:not(#\9):focus {
265
+ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_13dhi_235:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_13dhi_239:not(#\9):focus {
267
266
  position: relative;
268
267
  }
269
- body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_138i7_236:not(#\9):focus {
268
+ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_13dhi_235:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_13dhi_239:not(#\9):focus {
270
269
  outline: 2px dotted transparent;
271
270
  outline-offset: calc(0px - 1px);
272
271
  }
273
- body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_138i7_236:not(#\9):focus::before {
272
+ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_13dhi_235:not(#\9):focus::before, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_13dhi_239:not(#\9):focus::before {
274
273
  content: " ";
275
274
  display: block;
276
275
  position: absolute;
@@ -281,26 +280,19 @@ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_138i7_236:not(#\9
281
280
  border-radius: var(--border-radius-control-default-focus-ring-uu8qi4, 2px);
282
281
  box-shadow: 0 0 0 2px var(--color-border-item-focused-4clyb1, #0073bb);
283
282
  }
284
- .awsui_header-container_gwq0h_138i7_258:not(#\9) {
283
+ .awsui_header_gwq0h_13dhi_225:not(#\9):not(.awsui_with-interactive-elements_gwq0h_13dhi_257) {
284
+ cursor: pointer;
285
+ }
286
+ .awsui_header-container_gwq0h_13dhi_239:not(#\9) {
285
287
  width: 100%;
286
288
  }
287
- .awsui_header-container_gwq0h_138i7_258 > .awsui_icon-container_gwq0h_138i7_175:not(#\9) {
289
+ .awsui_header-container_gwq0h_13dhi_239 > .awsui_icon-container_gwq0h_13dhi_175:not(#\9) {
288
290
  margin-top: var(--space-expandable-section-icon-offset-top-4ysrlk, 8px);
289
291
  }
290
- body[data-awsui-focus-visible=true] .awsui_header-container_gwq0h_138i7_258:not(#\9):focus-within {
291
- outline: none;
292
- text-decoration: none;
293
- padding: calc(var(--space-scaled-s-73r995, 12px) - var(--border-divider-section-width-p0xg84, 1px)) calc(var(--space-l-z6h7qi, 20px) - var(--border-divider-section-width-p0xg84, 1px));
294
- outline: 2px dotted transparent;
295
- border: var(--border-field-width-gmdyxy, 1px) solid var(--color-border-item-focused-4clyb1, #0073bb);
296
- border-radius: var(--border-radius-control-default-focus-ring-uu8qi4, 2px);
297
- box-shadow: 0 0 0 var(--border-control-focus-ring-shadow-spread-qycpr2, 1px) var(--color-border-item-focused-4clyb1, #0073bb);
298
- }
299
- body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_138i7_273:not(#\9):focus {
300
- outline: none;
301
- text-decoration: none;
292
+ .awsui_header-container_gwq0h_13dhi_239.awsui_with-interactive-elements_gwq0h_13dhi_257 .awsui_header-container-button_gwq0h_13dhi_239:not(#\9) {
293
+ cursor: pointer;
302
294
  }
303
- .awsui_header-navigation_gwq0h_138i7_277 > .awsui_icon-container_gwq0h_138i7_175:not(#\9) {
295
+ .awsui_header-navigation_gwq0h_13dhi_269 > .awsui_icon-container_gwq0h_13dhi_175:not(#\9) {
304
296
  display: inline-flex;
305
297
  cursor: pointer;
306
298
  color: var(--color-text-expandable-section-navigation-icon-default-7jwgwp, #879596);
@@ -311,17 +303,17 @@ body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_138i7_2
311
303
  text-decoration: none;
312
304
  flex-direction: column;
313
305
  }
314
- .awsui_header-navigation_gwq0h_138i7_277 > .awsui_icon-container_gwq0h_138i7_175:not(#\9):hover {
306
+ .awsui_header-navigation_gwq0h_13dhi_269 > .awsui_icon-container_gwq0h_13dhi_175:not(#\9):hover {
315
307
  color: var(--color-text-expandable-section-hover-q765vp, #16191f);
316
308
  }
317
- body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_138i7_277 > .awsui_icon-container_gwq0h_138i7_175:not(#\9):focus {
309
+ body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_13dhi_269 > .awsui_icon-container_gwq0h_13dhi_175:not(#\9):focus {
318
310
  position: relative;
319
311
  }
320
- body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_138i7_277 > .awsui_icon-container_gwq0h_138i7_175:not(#\9):focus {
312
+ body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_13dhi_269 > .awsui_icon-container_gwq0h_13dhi_175:not(#\9):focus {
321
313
  outline: 2px dotted transparent;
322
314
  outline-offset: calc(2px - 1px);
323
315
  }
324
- body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_138i7_277 > .awsui_icon-container_gwq0h_138i7_175:not(#\9):focus::before {
316
+ body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_13dhi_269 > .awsui_icon-container_gwq0h_13dhi_175:not(#\9):focus::before {
325
317
  content: " ";
326
318
  display: block;
327
319
  position: absolute;
@@ -333,24 +325,24 @@ body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_138i7_277 > .
333
325
  box-shadow: 0 0 0 2px var(--color-border-item-focused-4clyb1, #0073bb);
334
326
  }
335
327
 
336
- .awsui_content_gwq0h_138i7_97:not(#\9) {
328
+ .awsui_content_gwq0h_13dhi_97:not(#\9) {
337
329
  display: none;
338
330
  }
339
- .awsui_content-default_gwq0h_138i7_313:not(#\9) {
331
+ .awsui_content-default_gwq0h_13dhi_305:not(#\9) {
340
332
  padding: var(--space-scaled-xs-sg3tfb, 8px) 0;
341
333
  }
342
- .awsui_content-footer_gwq0h_138i7_316:not(#\9) {
334
+ .awsui_content-footer_gwq0h_13dhi_308:not(#\9) {
343
335
  padding: var(--space-xs-7veqkr, 8px) 0;
344
336
  }
345
- .awsui_content-expanded_gwq0h_138i7_319:not(#\9) {
337
+ .awsui_content-expanded_gwq0h_13dhi_311:not(#\9) {
346
338
  display: block;
347
339
  }
348
340
 
349
- .awsui_focusable_gwq0h_138i7_323:not(#\9):focus {
341
+ .awsui_focusable_gwq0h_13dhi_315:not(#\9):focus {
350
342
  outline: none;
351
343
  text-decoration: none;
352
344
  }
353
- body[data-awsui-focus-visible=true] .awsui_focusable_gwq0h_138i7_323:not(#\9):focus {
345
+ body[data-awsui-focus-visible=true] .awsui_focusable_gwq0h_13dhi_315:not(#\9):focus {
354
346
  outline: 2px dotted transparent;
355
347
  border: var(--border-field-width-gmdyxy, 1px) solid var(--color-border-item-focused-4clyb1, #0073bb);
356
348
  border-radius: var(--border-radius-control-default-focus-ring-uu8qi4, 2px);
@@ -2,29 +2,31 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "content-enter": "awsui_content-enter_gwq0h_138i7_97",
6
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_138i7_1",
7
- "trigger-expanded": "awsui_trigger-expanded_gwq0h_138i7_119",
8
- "icon": "awsui_icon_gwq0h_138i7_133",
9
- "root": "awsui_root_gwq0h_138i7_151",
10
- "expanded": "awsui_expanded_gwq0h_138i7_171",
11
- "icon-container": "awsui_icon-container_gwq0h_138i7_175",
12
- "icon-container-container": "awsui_icon-container-container_gwq0h_138i7_180",
13
- "trigger": "awsui_trigger_gwq0h_138i7_119",
14
- "trigger-default": "awsui_trigger-default_gwq0h_138i7_193",
15
- "trigger-footer": "awsui_trigger-footer_gwq0h_138i7_196",
16
- "trigger-navigation": "awsui_trigger-navigation_gwq0h_138i7_202",
17
- "trigger-container": "awsui_trigger-container_gwq0h_138i7_216",
18
- "header": "awsui_header_gwq0h_138i7_226",
19
- "header-wrapper": "awsui_header-wrapper_gwq0h_138i7_229",
20
- "header-button": "awsui_header-button_gwq0h_138i7_236",
21
- "header-container": "awsui_header-container_gwq0h_138i7_258",
22
- "header-container-button": "awsui_header-container-button_gwq0h_138i7_273",
23
- "header-navigation": "awsui_header-navigation_gwq0h_138i7_277",
24
- "content": "awsui_content_gwq0h_138i7_97",
25
- "content-default": "awsui_content-default_gwq0h_138i7_313",
26
- "content-footer": "awsui_content-footer_gwq0h_138i7_316",
27
- "content-expanded": "awsui_content-expanded_gwq0h_138i7_319",
28
- "focusable": "awsui_focusable_gwq0h_138i7_323"
5
+ "content-enter": "awsui_content-enter_gwq0h_13dhi_97",
6
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_13dhi_1",
7
+ "trigger-expanded": "awsui_trigger-expanded_gwq0h_13dhi_119",
8
+ "icon": "awsui_icon_gwq0h_13dhi_133",
9
+ "root": "awsui_root_gwq0h_13dhi_151",
10
+ "expanded": "awsui_expanded_gwq0h_13dhi_171",
11
+ "icon-container": "awsui_icon-container_gwq0h_13dhi_175",
12
+ "icon-container-container": "awsui_icon-container-container_gwq0h_13dhi_180",
13
+ "wrapper": "awsui_wrapper_gwq0h_13dhi_184",
14
+ "wrapper-default": "awsui_wrapper-default_gwq0h_13dhi_192",
15
+ "wrapper-footer": "awsui_wrapper-footer_gwq0h_13dhi_195",
16
+ "wrapper-navigation": "awsui_wrapper-navigation_gwq0h_13dhi_201",
17
+ "wrapper-container": "awsui_wrapper-container_gwq0h_13dhi_215",
18
+ "wrapper-expanded": "awsui_wrapper-expanded_gwq0h_13dhi_221",
19
+ "header": "awsui_header_gwq0h_13dhi_225",
20
+ "header-wrapper": "awsui_header-wrapper_gwq0h_13dhi_228",
21
+ "header-button": "awsui_header-button_gwq0h_13dhi_235",
22
+ "header-container-button": "awsui_header-container-button_gwq0h_13dhi_239",
23
+ "with-interactive-elements": "awsui_with-interactive-elements_gwq0h_13dhi_257",
24
+ "header-container": "awsui_header-container_gwq0h_13dhi_239",
25
+ "header-navigation": "awsui_header-navigation_gwq0h_13dhi_269",
26
+ "content": "awsui_content_gwq0h_13dhi_97",
27
+ "content-default": "awsui_content-default_gwq0h_13dhi_305",
28
+ "content-footer": "awsui_content-footer_gwq0h_13dhi_308",
29
+ "content-expanded": "awsui_content-expanded_gwq0h_13dhi_311",
30
+ "focusable": "awsui_focusable_gwq0h_13dhi_315"
29
31
  };
30
32
 
@@ -1 +1 @@
1
- {"version":3,"file":"flash.d.ts","sourceRoot":"lib/default/","sources":["flashbar/flash.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAoD1B,eAAO,MAAM,cAAc,mEACf,WAAW,GAAG,IAAI,UAAU,MAAM,UAM7C,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,aAAa,CAAC,iBAAiB;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,KAAK,mFAkGjB,CAAC"}
1
+ {"version":3,"file":"flash.d.ts","sourceRoot":"lib/default/","sources":["flashbar/flash.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAqD1B,eAAO,MAAM,cAAc,mEACf,WAAW,GAAG,IAAI,UAAU,MAAM,UAM7C,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,aAAa,CAAC,iBAAiB;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,KAAK,mFAsGjB,CAAC"}
@@ -10,6 +10,7 @@ import { throttle } from '../internal/utils/throttle';
10
10
  import LiveRegion from '../internal/components/live-region';
11
11
  import { sendDismissMetric } from './internal/analytics';
12
12
  import { FOCUS_THROTTLE_DELAY } from './utils';
13
+ import { DATA_ATTR_ANALYTICS_FLASHBAR } from '../internal/analytics/selectors';
13
14
  const ICON_TYPES = {
14
15
  success: 'status-positive',
15
16
  warning: 'status-warning',
@@ -45,17 +46,20 @@ export const Flash = React.forwardRef(({ id, header, content, dismissible, dismi
45
46
  sendDismissMetric(effectiveType);
46
47
  onDismiss && onDismiss(event);
47
48
  };
49
+ const analyticsAttributes = {
50
+ [DATA_ATTR_ANALYTICS_FLASHBAR]: effectiveType,
51
+ };
48
52
  return (
49
53
  // We're not using "polite" or "assertive" here, just turning default behavior off.
50
54
  // eslint-disable-next-line @cloudscape-design/prefer-live-region
51
- React.createElement("div", { ref: ref, role: ariaRole, "aria-live": ariaRole ? 'off' : undefined, "data-analytics-flashbar": effectiveType, "data-itemid": id, className: clsx(styles.flash, styles[`flash-type-${effectiveType}`], className, transitionState && {
55
+ React.createElement("div", Object.assign({ ref: ref, role: ariaRole, "aria-live": ariaRole ? 'off' : undefined, "data-itemid": id, className: clsx(styles.flash, styles[`flash-type-${effectiveType}`], className, transitionState && {
52
56
  [styles.enter]: transitionState === 'enter',
53
57
  [styles.entering]: transitionState === 'entering',
54
58
  [styles.entered]: transitionState === 'entered',
55
59
  [styles.exit]: transitionState === 'exit',
56
60
  [styles.exiting]: transitionState === 'exiting',
57
61
  [styles.exited]: transitionState === 'exited',
58
- }) },
62
+ }) }, analyticsAttributes),
59
63
  React.createElement("div", { className: styles['flash-body'] },
60
64
  React.createElement("div", { className: styles['flash-focus-container'], tabIndex: -1 },
61
65
  React.createElement("div", { className: clsx(styles['flash-icon'], styles['flash-text']), role: "img", "aria-label": statusIconAriaLabel }, icon),
@@ -1 +1 @@
1
- {"version":3,"file":"flash.js","sourceRoot":"lib/default/","sources":["flashbar/flash.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAG5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,gBAAgB;IACzB,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,iBAAiB;CAChB,CAAC;AAEX,SAAS,YAAY,CACnB,UAAyD,EACzD,aAA+D;IAE/D,OAAO,CACL,oBAAC,cAAc,IAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE,UAAU,EAAC,MAAM,IAC1F,UAAU,CACI,CAClB,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CACpB,YAA6D,EAC7D,SAAuD;IAEvD,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,wBAAwB,CAAC;QAC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MAAM,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,EAC3D,IAAI,EAAC,KAAK,gBACE,mBAAmB,IAE9B,IAAI,CACD;gBACN,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;oBACjE,6BAAK,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,IAAG,MAAM,CAAO;oBACtD,6BAAK,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,IAAG,OAAO,CAAO,CACpD,CACF;YACL,MAAM,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC,IAAG,MAAM,CAAO,CACtE;QACL,WAAW,IAAI,aAAa,CAAC,YAAY,EAAE,aAAa,CAAC;QACzD,QAAQ,KAAK,QAAQ,IAAI,CACxB,oBAAC,UAAU;YACR,mBAAmB;;YAAG,MAAM;;YAAG,OAAO,CAC5B,CACd,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { FlashbarProps } from './interfaces';\nimport React from 'react';\nimport InternalSpinner from '../spinner/internal';\nimport InternalIcon from '../icon/internal';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport { InternalButton } from '../button/internal';\nimport { warnOnce } from '../internal/logging';\nimport { isDevelopment } from '../internal/is-development';\nimport { throttle } from '../internal/utils/throttle';\nimport LiveRegion from '../internal/components/live-region';\nimport { ButtonProps } from '../button/interfaces';\n\nimport { sendDismissMetric } from './internal/analytics';\n\nimport { FOCUS_THROTTLE_DELAY } from './utils';\n\nconst ICON_TYPES = {\n success: 'status-positive',\n warning: 'status-warning',\n info: 'status-info',\n error: 'status-negative',\n} as const;\n\nfunction actionButton(\n buttonText: FlashbarProps.MessageDefinition['buttonText'],\n onButtonClick: FlashbarProps.MessageDefinition['onButtonClick']\n) {\n return (\n <InternalButton onClick={onButtonClick} className={styles['action-button']} formAction=\"none\">\n {buttonText}\n </InternalButton>\n );\n}\n\nfunction dismissButton(\n dismissLabel: FlashbarProps.MessageDefinition['dismissLabel'],\n onDismiss: FlashbarProps.MessageDefinition['onDismiss']\n) {\n return (\n <div className={styles['dismiss-button-wrapper']}>\n <InternalButton\n onClick={onDismiss}\n className={styles['dismiss-button']}\n variant=\"flashbar-icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissLabel}\n />\n </div>\n );\n}\n\nexport const focusFlashById = throttle(\n (element: HTMLElement | null, itemId: string) => {\n const selector = `[data-itemid=\"${CSS.escape(itemId)}\"] .${styles['flash-focus-container']}`;\n element?.querySelector<HTMLElement>(selector)?.focus();\n },\n FOCUS_THROTTLE_DELAY,\n { trailing: false }\n);\n\nexport interface FlashProps extends FlashbarProps.MessageDefinition {\n className: string;\n transitionState?: string;\n}\n\nexport const Flash = React.forwardRef(\n (\n {\n id,\n header,\n content,\n dismissible,\n dismissLabel,\n statusIconAriaLabel,\n loading,\n action,\n buttonText,\n onButtonClick,\n onDismiss,\n className,\n transitionState,\n ariaRole,\n type = 'info',\n }: FlashProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n if (isDevelopment) {\n if (buttonText && !onButtonClick) {\n warnOnce(\n 'Flashbar',\n `You provided a \\`buttonText\\` prop without an \\`onButtonClick\\` handler. This will render a non-interactive action button.`\n );\n }\n\n if (dismissible && !onDismiss) {\n warnOnce(\n 'Flashbar',\n `You have set the \\`dismissible\\` prop without an \\`onDismiss\\` handler. This will render a non-interactive dismiss button.`\n );\n }\n }\n\n const button = action || (buttonText && actionButton(buttonText, onButtonClick));\n\n const iconType = ICON_TYPES[type];\n\n const icon = loading ? <InternalSpinner /> : <InternalIcon name={iconType} />;\n\n const effectiveType = loading ? 'info' : type;\n\n const handleDismiss: ButtonProps['onClick'] = event => {\n sendDismissMetric(effectiveType);\n onDismiss && onDismiss(event);\n };\n\n return (\n // We're not using \"polite\" or \"assertive\" here, just turning default behavior off.\n // eslint-disable-next-line @cloudscape-design/prefer-live-region\n <div\n ref={ref}\n role={ariaRole}\n aria-live={ariaRole ? 'off' : undefined}\n data-analytics-flashbar={effectiveType}\n data-itemid={id}\n className={clsx(\n styles.flash,\n styles[`flash-type-${effectiveType}`],\n className,\n transitionState && {\n [styles.enter]: transitionState === 'enter',\n [styles.entering]: transitionState === 'entering',\n [styles.entered]: transitionState === 'entered',\n [styles.exit]: transitionState === 'exit',\n [styles.exiting]: transitionState === 'exiting',\n [styles.exited]: transitionState === 'exited',\n }\n )}\n >\n <div className={styles['flash-body']}>\n <div className={styles['flash-focus-container']} tabIndex={-1}>\n <div\n className={clsx(styles['flash-icon'], styles['flash-text'])}\n role=\"img\"\n aria-label={statusIconAriaLabel}\n >\n {icon}\n </div>\n <div className={clsx(styles['flash-message'], styles['flash-text'])}>\n <div className={styles['flash-header']}>{header}</div>\n <div className={styles['flash-content']}>{content}</div>\n </div>\n </div>\n {button && <div className={styles['action-button-wrapper']}>{button}</div>}\n </div>\n {dismissible && dismissButton(dismissLabel, handleDismiss)}\n {ariaRole === 'status' && (\n <LiveRegion>\n {statusIconAriaLabel} {header} {content}\n </LiveRegion>\n )}\n </div>\n );\n }\n);\n"]}
1
+ {"version":3,"file":"flash.js","sourceRoot":"lib/default/","sources":["flashbar/flash.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE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,aAAa,CAAC,YAAY,EAAE,aAAa,CAAC;QACzD,QAAQ,KAAK,QAAQ,IAAI,CACxB,oBAAC,UAAU;YACR,mBAAmB;;YAAG,MAAM;;YAAG,OAAO,CAC5B,CACd,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { FlashbarProps } from './interfaces';\nimport React from 'react';\nimport InternalSpinner from '../spinner/internal';\nimport InternalIcon from '../icon/internal';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport { InternalButton } from '../button/internal';\nimport { warnOnce } from '../internal/logging';\nimport { isDevelopment } from '../internal/is-development';\nimport { throttle } from '../internal/utils/throttle';\nimport LiveRegion from '../internal/components/live-region';\nimport { ButtonProps } from '../button/interfaces';\n\nimport { sendDismissMetric } from './internal/analytics';\n\nimport { FOCUS_THROTTLE_DELAY } from './utils';\nimport { DATA_ATTR_ANALYTICS_FLASHBAR } from '../internal/analytics/selectors';\n\nconst ICON_TYPES = {\n success: 'status-positive',\n warning: 'status-warning',\n info: 'status-info',\n error: 'status-negative',\n} as const;\n\nfunction actionButton(\n buttonText: FlashbarProps.MessageDefinition['buttonText'],\n onButtonClick: FlashbarProps.MessageDefinition['onButtonClick']\n) {\n return (\n <InternalButton onClick={onButtonClick} className={styles['action-button']} formAction=\"none\">\n {buttonText}\n </InternalButton>\n );\n}\n\nfunction dismissButton(\n dismissLabel: FlashbarProps.MessageDefinition['dismissLabel'],\n onDismiss: FlashbarProps.MessageDefinition['onDismiss']\n) {\n return (\n <div className={styles['dismiss-button-wrapper']}>\n <InternalButton\n onClick={onDismiss}\n className={styles['dismiss-button']}\n variant=\"flashbar-icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissLabel}\n />\n </div>\n );\n}\n\nexport const focusFlashById = throttle(\n (element: HTMLElement | null, itemId: string) => {\n const selector = `[data-itemid=\"${CSS.escape(itemId)}\"] .${styles['flash-focus-container']}`;\n element?.querySelector<HTMLElement>(selector)?.focus();\n },\n FOCUS_THROTTLE_DELAY,\n { trailing: false }\n);\n\nexport interface FlashProps extends FlashbarProps.MessageDefinition {\n className: string;\n transitionState?: string;\n}\n\nexport const Flash = React.forwardRef(\n (\n {\n id,\n header,\n content,\n dismissible,\n dismissLabel,\n statusIconAriaLabel,\n loading,\n action,\n buttonText,\n onButtonClick,\n onDismiss,\n className,\n transitionState,\n ariaRole,\n type = 'info',\n }: FlashProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n if (isDevelopment) {\n if (buttonText && !onButtonClick) {\n warnOnce(\n 'Flashbar',\n `You provided a \\`buttonText\\` prop without an \\`onButtonClick\\` handler. This will render a non-interactive action button.`\n );\n }\n\n if (dismissible && !onDismiss) {\n warnOnce(\n 'Flashbar',\n `You have set the \\`dismissible\\` prop without an \\`onDismiss\\` handler. This will render a non-interactive dismiss button.`\n );\n }\n }\n\n const button = action || (buttonText && actionButton(buttonText, onButtonClick));\n\n const iconType = ICON_TYPES[type];\n\n const icon = loading ? <InternalSpinner /> : <InternalIcon name={iconType} />;\n\n const effectiveType = loading ? 'info' : type;\n\n const handleDismiss: ButtonProps['onClick'] = event => {\n sendDismissMetric(effectiveType);\n onDismiss && onDismiss(event);\n };\n\n const analyticsAttributes = {\n [DATA_ATTR_ANALYTICS_FLASHBAR]: effectiveType,\n };\n\n return (\n // We're not using \"polite\" or \"assertive\" here, just turning default behavior off.\n // eslint-disable-next-line @cloudscape-design/prefer-live-region\n <div\n ref={ref}\n role={ariaRole}\n aria-live={ariaRole ? 'off' : undefined}\n data-itemid={id}\n className={clsx(\n styles.flash,\n styles[`flash-type-${effectiveType}`],\n className,\n transitionState && {\n [styles.enter]: transitionState === 'enter',\n [styles.entering]: transitionState === 'entering',\n [styles.entered]: transitionState === 'entered',\n [styles.exit]: transitionState === 'exit',\n [styles.exiting]: transitionState === 'exiting',\n [styles.exited]: transitionState === 'exited',\n }\n )}\n {...analyticsAttributes}\n >\n <div className={styles['flash-body']}>\n <div className={styles['flash-focus-container']} tabIndex={-1}>\n <div\n className={clsx(styles['flash-icon'], styles['flash-text'])}\n role=\"img\"\n aria-label={statusIconAriaLabel}\n >\n {icon}\n </div>\n <div className={clsx(styles['flash-message'], styles['flash-text'])}>\n <div className={styles['flash-header']}>{header}</div>\n <div className={styles['flash-content']}>{content}</div>\n </div>\n </div>\n {button && <div className={styles['action-button-wrapper']}>{button}</div>}\n </div>\n {dismissible && dismissButton(dismissLabel, handleDismiss)}\n {ariaRole === 'status' && (\n <LiveRegion>\n {statusIconAriaLabel} {header} {content}\n </LiveRegion>\n )}\n </div>\n );\n }\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["form-field/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAazC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAQtD,UAAU,mBAAmB;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,EAAE,mBAAmB,eAiBvF;AAED,wBAAgB,cAAc,CAAC,EAC7B,EAAE,EACF,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,eAMA;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,SAAS,EACT,OAAe,EACf,KAAK,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,SAAS,EACT,WAAW,EACX,iBAAwB,EACxB,gBAAwB,EACxB,GAAG,IAAI,EACR,EAAE,sBAAsB,eAiHxB"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["form-field/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAazC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAatD,UAAU,mBAAmB;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,EAAE,mBAAmB,eAiBvF;AAED,wBAAgB,cAAc,CAAC,EAC7B,EAAE,EACF,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,eAMA;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,SAAS,EACT,OAAe,EACf,KAAK,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,SAAS,EACT,WAAW,EACX,iBAAwB,EACxB,gBAAwB,EACxB,GAAG,IAAI,EACR,EAAE,sBAAsB,eA4GxB"}
@@ -15,7 +15,7 @@ import { joinStrings } from '../internal/utils/strings';
15
15
  import { useInternalI18n } from '../internal/i18n/context';
16
16
  import { FunnelMetrics } from '../internal/analytics';
17
17
  import { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';
18
- import { getSubStepAllSelector } from '../internal/analytics/selectors';
18
+ import { DATA_ATTR_FIELD_ERROR, DATA_ATTR_FIELD_LABEL, getFieldSlotSeletor, getSubStepAllSelector, } from '../internal/analytics/selectors';
19
19
  export function FormFieldError({ id, children, errorIconAriaLabel }) {
20
20
  const i18n = useInternalI18n('form-field');
21
21
  return (React.createElement("div", { id: id, className: styles.error },
@@ -28,6 +28,7 @@ export function ConstraintText({ id, hasError, children, }) {
28
28
  return (React.createElement("div", { id: id, className: clsx(styles.constraint, hasError && styles['constraint-has-error']) }, children));
29
29
  }
30
30
  export default function InternalFormField(_a) {
31
+ var _b, _c;
31
32
  var { controlId, stretch = false, label, info, i18nStrings, children, secondaryControl, description, constraintText, errorText, __hideLabel, __internalRootRef = null, __disableGutters = false } = _a, rest = __rest(_a, ["controlId", "stretch", "label", "info", "i18nStrings", "children", "secondaryControl", "description", "constraintText", "errorText", "__hideLabel", "__internalRootRef", "__disableGutters"]);
32
33
  const baseProps = getBaseProps(rest);
33
34
  const isRefresh = useVisualRefresh();
@@ -44,13 +45,10 @@ export default function InternalFormField(_a) {
44
45
  ariaDescribedby: joinStrings(parentAriaDescribedby, ariaDescribedBy) || undefined,
45
46
  invalid: !!errorText || !!parentInvalid,
46
47
  };
47
- const analyticsAttributes = {};
48
- if (slotIds.label) {
49
- analyticsAttributes['data-analytics-field-label-selector'] = `[id="${slotIds.label}"]`;
50
- }
51
- if (slotIds.error) {
52
- analyticsAttributes['data-analytics-field-error-selector'] = `[id="${slotIds.error}"]`;
53
- }
48
+ const analyticsAttributes = {
49
+ [DATA_ATTR_FIELD_LABEL]: (_b = slotIds.label) !== null && _b !== void 0 ? _b : getFieldSlotSeletor(slotIds.label),
50
+ [DATA_ATTR_FIELD_ERROR]: (_c = slotIds.error) !== null && _c !== void 0 ? _c : getFieldSlotSeletor(slotIds.error),
51
+ };
54
52
  useEffect(() => {
55
53
  if (funnelInteractionId && errorText) {
56
54
  FunnelMetrics.funnelSubStepError({
@@ -59,8 +57,8 @@ export default function InternalFormField(_a) {
59
57
  subStepNameSelector,
60
58
  stepNumber,
61
59
  stepNameSelector,
62
- fieldErrorSelector: `[id="${slotIds.error}"]`,
63
- fieldLabelSelector: `[id="${slotIds.label}"]`,
60
+ fieldErrorSelector: getFieldSlotSeletor(slotIds.error),
61
+ fieldLabelSelector: getFieldSlotSeletor(slotIds.label),
64
62
  subStepAllSelector: getSubStepAllSelector(),
65
63
  });
66
64
  }
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["form-field/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE3E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAQxE,MAAM,UAAU,cAAc,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAuB;IACtF,MAAM,IAAI,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;IAE3C,OAAO,CACL,6BAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK;QACl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AO,CAC3C,CAC7B,CACY,CACX;QAEL,CAAC,cAAc,IAAI,SAAS,CAAC,IAAI,CAChC,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK;YACzB,SAAS,IAAI,CACZ,oBAAC,cAAc,IAAC,EAAE,EAAE,OAAO,CAAC,KAAK,EAAE,kBAAkB,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,kBAAkB,IACnF,SAAS,CACK,CAClB;YACA,cAAc,IAAI,CACjB,oBAAC,cAAc,IAAC,EAAE,EAAE,OAAO,CAAC,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC,SAAS,IAC1D,cAAc,CACA,CAClB,CACG,CACP,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, { useEffect } from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { FormFieldContext, useFormFieldContext } from '../internal/context/form-field-context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\n\nimport InternalGrid from '../grid/internal';\nimport InternalIcon from '../icon/internal';\nimport { getAriaDescribedBy, getGridDefinition, getSlotIds } from './util';\n\nimport styles from './styles.css.js';\nimport { InternalFormFieldProps } from './interfaces';\nimport { joinStrings } from '../internal/utils/strings';\nimport { useInternalI18n } from '../internal/i18n/context';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getSubStepAllSelector } from '../internal/analytics/selectors';\n\ninterface FormFieldErrorProps {\n id?: string;\n children?: React.ReactNode;\n errorIconAriaLabel?: string;\n}\n\nexport function FormFieldError({ id, children, errorIconAriaLabel }: FormFieldErrorProps) {\n const i18n = useInternalI18n('form-field');\n\n return (\n <div id={id} className={styles.error}>\n <div className={styles['error-icon-shake-wrapper']}>\n <div\n role=\"img\"\n aria-label={i18n('i18nStrings.errorIconAriaLabel', errorIconAriaLabel)}\n className={styles['error-icon-scale-wrapper']}\n >\n <InternalIcon name=\"status-warning\" size=\"small\" />\n </div>\n </div>\n <span className={styles.error__message}>{children}</span>\n </div>\n );\n}\n\nexport function ConstraintText({\n id,\n hasError,\n children,\n}: {\n id?: string;\n hasError: boolean;\n children: React.ReactNode;\n}) {\n return (\n <div id={id} className={clsx(styles.constraint, hasError && styles['constraint-has-error'])}>\n {children}\n </div>\n );\n}\n\nexport default function InternalFormField({\n controlId,\n stretch = false,\n label,\n info,\n i18nStrings,\n children,\n secondaryControl,\n description,\n constraintText,\n errorText,\n __hideLabel,\n __internalRootRef = null,\n __disableGutters = false,\n ...rest\n}: InternalFormFieldProps) {\n const baseProps = getBaseProps(rest);\n const isRefresh = useVisualRefresh();\n\n const instanceUniqueId = useUniqueId('formField');\n const generatedControlId = controlId || instanceUniqueId;\n const formFieldId = controlId || generatedControlId;\n\n const { funnelInteractionId, stepNumber, stepNameSelector, subStepSelector, subStepNameSelector } =\n useFunnelSubStep();\n\n const slotIds = getSlotIds(formFieldId, label, description, constraintText, errorText);\n\n const ariaDescribedBy = getAriaDescribedBy(slotIds);\n\n const gridDefinition = getGridDefinition(stretch, !!secondaryControl, isRefresh);\n\n const {\n ariaLabelledby: parentAriaLabelledby,\n ariaDescribedby: parentAriaDescribedby,\n invalid: parentInvalid,\n } = useFormFieldContext({});\n\n const contextValuesWithoutControlId = {\n ariaLabelledby: joinStrings(parentAriaLabelledby, slotIds.label) || undefined,\n ariaDescribedby: joinStrings(parentAriaDescribedby, ariaDescribedBy) || undefined,\n invalid: !!errorText || !!parentInvalid,\n };\n\n const analyticsAttributes: Record<string, string> = {};\n\n if (slotIds.label) {\n analyticsAttributes['data-analytics-field-label-selector'] = `[id=\"${slotIds.label}\"]`;\n }\n\n if (slotIds.error) {\n analyticsAttributes['data-analytics-field-error-selector'] = `[id=\"${slotIds.error}\"]`;\n }\n\n useEffect(() => {\n if (funnelInteractionId && errorText) {\n FunnelMetrics.funnelSubStepError({\n funnelInteractionId,\n subStepSelector,\n subStepNameSelector,\n stepNumber,\n stepNameSelector,\n fieldErrorSelector: `[id=\"${slotIds.error}\"]`,\n fieldLabelSelector: `[id=\"${slotIds.label}\"]`,\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [funnelInteractionId, errorText]);\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.root)}\n ref={__internalRootRef}\n {...analyticsAttributes}\n >\n <div className={clsx(__hideLabel && styles['visually-hidden'])}>\n {label && (\n <label className={styles.label} id={slotIds.label} htmlFor={generatedControlId}>\n {label}\n </label>\n )}\n {!__hideLabel && info && <span className={styles.info}>{info}</span>}\n </div>\n\n {description && (\n <div className={styles.description} id={slotIds.description}>\n {description}\n </div>\n )}\n\n <div className={clsx(styles.controls, __hideLabel && styles['label-hidden'])}>\n <InternalGrid gridDefinition={gridDefinition} disableGutters={__disableGutters}>\n <FormFieldContext.Provider\n value={{\n controlId: generatedControlId,\n ...contextValuesWithoutControlId,\n }}\n >\n {children && <div className={styles.control}>{children}</div>}\n </FormFieldContext.Provider>\n\n {secondaryControl && (\n <FormFieldContext.Provider value={contextValuesWithoutControlId}>\n <div className={styles['secondary-control']}>{secondaryControl}</div>\n </FormFieldContext.Provider>\n )}\n </InternalGrid>\n </div>\n\n {(constraintText || errorText) && (\n <div className={styles.hints}>\n {errorText && (\n <FormFieldError id={slotIds.error} errorIconAriaLabel={i18nStrings?.errorIconAriaLabel}>\n {errorText}\n </FormFieldError>\n )}\n {constraintText && (\n <ConstraintText id={slotIds.constraint} hasError={!!errorText}>\n {constraintText}\n </ConstraintText>\n )}\n </div>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["form-field/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SA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AkB,IACnF,SAAS,CACK,CAClB;YACA,cAAc,IAAI,CACjB,oBAAC,cAAc,IAAC,EAAE,EAAE,OAAO,CAAC,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC,SAAS,IAC1D,cAAc,CACA,CAClB,CACG,CACP,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, { useEffect } from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { FormFieldContext, useFormFieldContext } from '../internal/context/form-field-context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\n\nimport InternalGrid from '../grid/internal';\nimport InternalIcon from '../icon/internal';\nimport { getAriaDescribedBy, getGridDefinition, getSlotIds } from './util';\n\nimport styles from './styles.css.js';\nimport { InternalFormFieldProps } from './interfaces';\nimport { joinStrings } from '../internal/utils/strings';\nimport { useInternalI18n } from '../internal/i18n/context';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport {\n DATA_ATTR_FIELD_ERROR,\n DATA_ATTR_FIELD_LABEL,\n getFieldSlotSeletor,\n getSubStepAllSelector,\n} from '../internal/analytics/selectors';\n\ninterface FormFieldErrorProps {\n id?: string;\n children?: React.ReactNode;\n errorIconAriaLabel?: string;\n}\n\nexport function FormFieldError({ id, children, errorIconAriaLabel }: FormFieldErrorProps) {\n const i18n = useInternalI18n('form-field');\n\n return (\n <div id={id} className={styles.error}>\n <div className={styles['error-icon-shake-wrapper']}>\n <div\n role=\"img\"\n aria-label={i18n('i18nStrings.errorIconAriaLabel', errorIconAriaLabel)}\n className={styles['error-icon-scale-wrapper']}\n >\n <InternalIcon name=\"status-warning\" size=\"small\" />\n </div>\n </div>\n <span className={styles.error__message}>{children}</span>\n </div>\n );\n}\n\nexport function ConstraintText({\n id,\n hasError,\n children,\n}: {\n id?: string;\n hasError: boolean;\n children: React.ReactNode;\n}) {\n return (\n <div id={id} className={clsx(styles.constraint, hasError && styles['constraint-has-error'])}>\n {children}\n </div>\n );\n}\n\nexport default function InternalFormField({\n controlId,\n stretch = false,\n label,\n info,\n i18nStrings,\n children,\n secondaryControl,\n description,\n constraintText,\n errorText,\n __hideLabel,\n __internalRootRef = null,\n __disableGutters = false,\n ...rest\n}: InternalFormFieldProps) {\n const baseProps = getBaseProps(rest);\n const isRefresh = useVisualRefresh();\n\n const instanceUniqueId = useUniqueId('formField');\n const generatedControlId = controlId || instanceUniqueId;\n const formFieldId = controlId || generatedControlId;\n\n const { funnelInteractionId, stepNumber, stepNameSelector, subStepSelector, subStepNameSelector } =\n useFunnelSubStep();\n\n const slotIds = getSlotIds(formFieldId, label, description, constraintText, errorText);\n\n const ariaDescribedBy = getAriaDescribedBy(slotIds);\n\n const gridDefinition = getGridDefinition(stretch, !!secondaryControl, isRefresh);\n\n const {\n ariaLabelledby: parentAriaLabelledby,\n ariaDescribedby: parentAriaDescribedby,\n invalid: parentInvalid,\n } = useFormFieldContext({});\n\n const contextValuesWithoutControlId = {\n ariaLabelledby: joinStrings(parentAriaLabelledby, slotIds.label) || undefined,\n ariaDescribedby: joinStrings(parentAriaDescribedby, ariaDescribedBy) || undefined,\n invalid: !!errorText || !!parentInvalid,\n };\n\n const analyticsAttributes = {\n [DATA_ATTR_FIELD_LABEL]: slotIds.label ?? getFieldSlotSeletor(slotIds.label),\n [DATA_ATTR_FIELD_ERROR]: slotIds.error ?? getFieldSlotSeletor(slotIds.error),\n };\n\n useEffect(() => {\n if (funnelInteractionId && errorText) {\n FunnelMetrics.funnelSubStepError({\n funnelInteractionId,\n subStepSelector,\n subStepNameSelector,\n stepNumber,\n stepNameSelector,\n fieldErrorSelector: getFieldSlotSeletor(slotIds.error),\n fieldLabelSelector: getFieldSlotSeletor(slotIds.label),\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [funnelInteractionId, errorText]);\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.root)}\n ref={__internalRootRef}\n {...analyticsAttributes}\n >\n <div className={clsx(__hideLabel && styles['visually-hidden'])}>\n {label && (\n <label className={styles.label} id={slotIds.label} htmlFor={generatedControlId}>\n {label}\n </label>\n )}\n {!__hideLabel && info && <span className={styles.info}>{info}</span>}\n </div>\n\n {description && (\n <div className={styles.description} id={slotIds.description}>\n {description}\n </div>\n )}\n\n <div className={clsx(styles.controls, __hideLabel && styles['label-hidden'])}>\n <InternalGrid gridDefinition={gridDefinition} disableGutters={__disableGutters}>\n <FormFieldContext.Provider\n value={{\n controlId: generatedControlId,\n ...contextValuesWithoutControlId,\n }}\n >\n {children && <div className={styles.control}>{children}</div>}\n </FormFieldContext.Provider>\n\n {secondaryControl && (\n <FormFieldContext.Provider value={contextValuesWithoutControlId}>\n <div className={styles['secondary-control']}>{secondaryControl}</div>\n </FormFieldContext.Provider>\n )}\n </InternalGrid>\n </div>\n\n {(constraintText || errorText) && (\n <div className={styles.hints}>\n {errorText && (\n <FormFieldError id={slotIds.error} errorIconAriaLabel={i18nStrings?.errorIconAriaLabel}>\n {errorText}\n </FormFieldError>\n )}\n {constraintText && (\n <ConstraintText id={slotIds.constraint} hasError={!!errorText}>\n {constraintText}\n </ConstraintText>\n )}\n </div>\n )}\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["header/internal.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,UAAU,mBAAoB,SAAQ,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,0BAA0B;IACpG,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,IAAI,EACJ,iBAAwB,EACxB,wBAAwB,EACxB,GAAG,SAAS,EACb,EAAE,mBAAmB,eAyErB"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["header/internal.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIjD,UAAU,mBAAoB,SAAQ,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,0BAA0B;IACpG,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,IAAI,EACJ,iBAAwB,EACxB,wBAAwB,EACxB,GAAG,SAAS,EACb,EAAE,mBAAmB,eA0ErB"}
@@ -8,6 +8,7 @@ import { StickyHeaderContext } from '../container/use-sticky-header';
8
8
  import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
9
9
  import styles from './styles.css.js';
10
10
  import { useMobile } from '../internal/hooks/use-mobile';
11
+ import { DATA_ATTR_FUNNEL_KEY, FUNNEL_KEY_SUBSTEP_NAME } from '../internal/analytics/selectors';
11
12
  export default function InternalHeader(_a) {
12
13
  var { variant, headingTagOverride, children, actions, counter, description, info, __internalRootRef = null, __disableActionsWrapping } = _a, restProps = __rest(_a, ["variant", "headingTagOverride", "children", "actions", "counter", "description", "info", "__internalRootRef", "__disableActionsWrapping"]);
13
14
  const isMobile = useMobile();
@@ -22,7 +23,7 @@ export default function InternalHeader(_a) {
22
23
  React.createElement("div", { className: clsx(styles.main, styles[`main-variant-${variantOverride}`], isRefresh && styles[`main-variant-${variantOverride}-refresh`]) },
23
24
  React.createElement("div", { className: clsx(styles.title, styles[`title-variant-${variantOverride}`], isRefresh && styles[`title-variant-${variantOverride}-refresh`]) },
24
25
  React.createElement(HeadingTag, { className: clsx(styles.heading, styles[`heading-variant-${variantOverride}`]) },
25
- React.createElement("span", { "data-analytics": "heading-text", className: clsx(styles['heading-text'], styles[`heading-text-variant-${variantOverride}`]) }, children),
26
+ React.createElement("span", Object.assign({}, { [DATA_ATTR_FUNNEL_KEY]: FUNNEL_KEY_SUBSTEP_NAME }, { className: clsx(styles['heading-text'], styles[`heading-text-variant-${variantOverride}`]) }), children),
26
27
  counter !== undefined && React.createElement("span", { className: styles.counter },
27
28
  " ",
28
29
  counter)),
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["header/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAMzD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAWjB;QAXiB,EACrC,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,IAAI,EACJ,iBAAiB,GAAG,IAAI,EACxB,wBAAwB,OAEJ,EADjB,SAAS,cAVyB,2IAWtC,CADa;IAEZ,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7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M,CAAC,iBAAiB,eAAe,EAAE,CAAC,EAC1C,SAAS,IAAI,MAAM,CAAC,iBAAiB,eAAe,UAAU,CAAC,CAChE;gBAED,oBAAC,UAAU,IAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,mBAAmB,eAAe,EAAE,CAAC,CAAC;oBACvF,gDACiB,cAAc,EAC7B,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,wBAAwB,eAAe,EAAE,CAAC,CAAC,IAEzF,QAAQ,CACJ;oBACN,OAAO,KAAK,SAAS,IAAI,8BAAM,SAAS,EAAE,MAAM,CAAC,OAAO;;wBAAI,OAAO,CAAQ,CACjE;gBACZ,IAAI,IAAI,8BAAM,SAAS,EAAE,MAAM,CAAC,IAAI,IAAG,IAAI,CAAQ,CAChD;YACL,WAAW,IAAI,CACd,2BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,uBAAuB,eAAe,EAAE,CAAC,EAChD,SAAS,IAAI,MAAM,CAAC,uBAAuB,eAAe,UAAU,CAAC,CACtE,IAEA,WAAW,CACV,CACL,CACG;QACL,OAAO,IAAI,CACV,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,mBAAmB,eAAe,EAAE,CAAC,EAC5C,SAAS,IAAI,MAAM,CAAC,mBAAmB,eAAe,UAAU,CAAC,CAClE,IAEA,OAAO,CACJ,CACP,CACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useContext } from 'react';\nimport { getBaseProps } from '../internal/base-component';\nimport { StickyHeaderContext } from '../container/use-sticky-header';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { HeaderProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { SomeRequired } from '../internal/types';\nimport { useMobile } from '../internal/hooks/use-mobile';\n\ninterface InternalHeaderProps extends SomeRequired<HeaderProps, 'variant'>, InternalBaseComponentProps {\n __disableActionsWrapping?: boolean;\n}\n\nexport default function InternalHeader({\n variant,\n headingTagOverride,\n children,\n actions,\n counter,\n description,\n info,\n __internalRootRef = null,\n __disableActionsWrapping,\n ...restProps\n}: InternalHeaderProps) {\n const isMobile = useMobile();\n const HeadingTag = headingTagOverride ?? (variant === 'awsui-h1-sticky' ? 'h1' : variant);\n const { isStuck } = useContext(StickyHeaderContext);\n const baseProps = getBaseProps(restProps);\n const isRefresh = useVisualRefresh();\n // If is mobile there is no need to have the dynamic variant because it's scrolled out of view\n const dynamicVariant = !isMobile && isStuck ? 'h2' : 'h1';\n const variantOverride = variant === 'awsui-h1-sticky' ? (isRefresh ? dynamicVariant : 'h2') : variant;\n return (\n <div\n {...baseProps}\n className={clsx(\n styles.root,\n baseProps.className,\n styles[`root-variant-${variantOverride}`],\n isRefresh && styles[`root-variant-${variantOverride}-refresh`],\n !actions && [styles[`root-no-actions`]],\n description && [styles[`root-has-description`]],\n __disableActionsWrapping && [styles['root-no-wrap']]\n )}\n ref={__internalRootRef}\n >\n <div\n className={clsx(\n styles.main,\n styles[`main-variant-${variantOverride}`],\n isRefresh && styles[`main-variant-${variantOverride}-refresh`]\n )}\n >\n <div\n className={clsx(\n styles.title,\n styles[`title-variant-${variantOverride}`],\n isRefresh && styles[`title-variant-${variantOverride}-refresh`]\n )}\n >\n <HeadingTag className={clsx(styles.heading, styles[`heading-variant-${variantOverride}`])}>\n <span\n data-analytics=\"heading-text\"\n className={clsx(styles['heading-text'], styles[`heading-text-variant-${variantOverride}`])}\n >\n {children}\n </span>\n {counter !== undefined && <span className={styles.counter}> {counter}</span>}\n </HeadingTag>\n {info && <span className={styles.info}>{info}</span>}\n </div>\n {description && (\n <p\n className={clsx(\n styles.description,\n styles[`description-variant-${variantOverride}`],\n isRefresh && styles[`description-variant-${variantOverride}-refresh`]\n )}\n >\n {description}\n </p>\n )}\n </div>\n {actions && (\n <div\n className={clsx(\n styles.actions,\n styles[`actions-variant-${variantOverride}`],\n isRefresh && styles[`actions-variant-${variantOverride}-refresh`]\n )}\n >\n {actions}\n </div>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["header/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAMhG,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAWjB;QAXiB,EACrC,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,IAAI,EACJ,iBAAiB,GAAG,IAAI,EACxB,wBAAwB,OAEJ,EADjB,SAAS,cAVyB,2IAWtC,CADa;IAEZ,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7B,MAAM,UAAU,GAAG,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,CAAC,OAAO,KAAK,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC1F,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IACpD,MAAM,S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,CAAC,oBAAoB,CAAC,EAAE,uBAAuB,EAAE,IACvD,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,wBAAwB,eAAe,EAAE,CAAC,CAAC,KAEzF,QAAQ,CACJ;oBACN,OAAO,KAAK,SAAS,IAAI,8BAAM,SAAS,EAAE,MAAM,CAAC,OAAO;;wBAAI,OAAO,CAAQ,CACjE;gBACZ,IAAI,IAAI,8BAAM,SAAS,EAAE,MAAM,CAAC,IAAI,IAAG,IAAI,CAAQ,CAChD;YACL,WAAW,IAAI,CACd,2BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,uBAAuB,eAAe,EAAE,CAAC,EAChD,SAAS,IAAI,MAAM,CAAC,uBAAuB,eAAe,UAAU,CAAC,CACtE,IAEA,WAAW,CACV,CACL,CACG;QACL,OAAO,IAAI,CACV,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,mBAAmB,eAAe,EAAE,CAAC,EAC5C,SAAS,IAAI,MAAM,CAAC,mBAAmB,eAAe,UAAU,CAAC,CAClE,IAEA,OAAO,CACJ,CACP,CACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useContext } from 'react';\nimport { getBaseProps } from '../internal/base-component';\nimport { StickyHeaderContext } from '../container/use-sticky-header';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { HeaderProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { SomeRequired } from '../internal/types';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { DATA_ATTR_FUNNEL_KEY, FUNNEL_KEY_SUBSTEP_NAME } from '../internal/analytics/selectors';\n\ninterface InternalHeaderProps extends SomeRequired<HeaderProps, 'variant'>, InternalBaseComponentProps {\n __disableActionsWrapping?: boolean;\n}\n\nexport default function InternalHeader({\n variant,\n headingTagOverride,\n children,\n actions,\n counter,\n description,\n info,\n __internalRootRef = null,\n __disableActionsWrapping,\n ...restProps\n}: InternalHeaderProps) {\n const isMobile = useMobile();\n const HeadingTag = headingTagOverride ?? (variant === 'awsui-h1-sticky' ? 'h1' : variant);\n const { isStuck } = useContext(StickyHeaderContext);\n const baseProps = getBaseProps(restProps);\n const isRefresh = useVisualRefresh();\n // If is mobile there is no need to have the dynamic variant because it's scrolled out of view\n const dynamicVariant = !isMobile && isStuck ? 'h2' : 'h1';\n const variantOverride = variant === 'awsui-h1-sticky' ? (isRefresh ? dynamicVariant : 'h2') : variant;\n\n return (\n <div\n {...baseProps}\n className={clsx(\n styles.root,\n baseProps.className,\n styles[`root-variant-${variantOverride}`],\n isRefresh && styles[`root-variant-${variantOverride}-refresh`],\n !actions && [styles[`root-no-actions`]],\n description && [styles[`root-has-description`]],\n __disableActionsWrapping && [styles['root-no-wrap']]\n )}\n ref={__internalRootRef}\n >\n <div\n className={clsx(\n styles.main,\n styles[`main-variant-${variantOverride}`],\n isRefresh && styles[`main-variant-${variantOverride}-refresh`]\n )}\n >\n <div\n className={clsx(\n styles.title,\n styles[`title-variant-${variantOverride}`],\n isRefresh && styles[`title-variant-${variantOverride}-refresh`]\n )}\n >\n <HeadingTag className={clsx(styles.heading, styles[`heading-variant-${variantOverride}`])}>\n <span\n {...{ [DATA_ATTR_FUNNEL_KEY]: FUNNEL_KEY_SUBSTEP_NAME }}\n className={clsx(styles['heading-text'], styles[`heading-text-variant-${variantOverride}`])}\n >\n {children}\n </span>\n {counter !== undefined && <span className={styles.counter}> {counter}</span>}\n </HeadingTag>\n {info && <span className={styles.info}>{info}</span>}\n </div>\n {description && (\n <p\n className={clsx(\n styles.description,\n styles[`description-variant-${variantOverride}`],\n isRefresh && styles[`description-variant-${variantOverride}-refresh`]\n )}\n >\n {description}\n </p>\n )}\n </div>\n {actions && (\n <div\n className={clsx(\n styles.actions,\n styles[`actions-variant-${variantOverride}`],\n isRefresh && styles[`actions-variant-${variantOverride}-refresh`]\n )}\n >\n {actions}\n </div>\n )}\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"analytics-funnel.d.ts","sourceRoot":"lib/default/","sources":["internal/analytics/components/analytics-funnel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAe3D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAI7D,eAAO,MAAM,cAAc,QAAQ,CAAC;AAEpC,KAAK,oBAAoB,GAAG;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,IAAI,CAC/D,WAAW,EACX,YAAY,GAAG,qBAAqB,GAAG,kBAAkB,CAC1D,CAAC;AAEF,eAAO,MAAM,eAAe,2BAA4B,oBAAoB,gBA0D3E,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,IAAI,CACnE,eAAe,EACf,YAAY,GAAG,kBAAkB,CAClC,CAAC;AAEF,eAAO,MAAM,mBAAmB,+CAAgD,wBAAwB,gBAkCvG,CAAC;AAEF,UAAU,2BAA2B;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,sBAAsB,iBAAkB,2BAA2B,gBAsB/E,CAAC"}
1
+ {"version":3,"file":"analytics-funnel.d.ts","sourceRoot":"lib/default/","sources":["internal/analytics/components/analytics-funnel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAe3D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAI7D,eAAO,MAAM,cAAc,QAAQ,CAAC;AAEpC,KAAK,oBAAoB,GAAG;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,IAAI,CAC/D,WAAW,EACX,YAAY,GAAG,qBAAqB,GAAG,kBAAkB,CAC1D,CAAC;AAEF,eAAO,MAAM,eAAe,2BAA4B,oBAAoB,gBA4D3E,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,IAAI,CACnE,eAAe,EACf,YAAY,GAAG,kBAAkB,CAClC,CAAC;AAEF,eAAO,MAAM,mBAAmB,+CAAgD,wBAAwB,gBAkCvG,CAAC;AAEF,UAAU,2BAA2B;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,sBAAsB,iBAAkB,2BAA2B,gBAsB/E,CAAC"}
@@ -32,13 +32,14 @@ export const AnalyticsFunnel = (_a) => {
32
32
  funnelType: props.funnelType,
33
33
  totalFunnelSteps: props.totalFunnelSteps,
34
34
  componentVersion: PACKAGE_VERSION,
35
- componentTheme: isVisualRefresh ? 'vr' : 'classic',
35
+ theme: isVisualRefresh ? 'vr' : 'classic',
36
36
  funnelVersion: FUNNEL_VERSION,
37
37
  });
38
38
  setFunnelInteractionId(funnelInteractionId);
39
39
  return () => {
40
+ FunnelMetrics.funnelComplete({ funnelInteractionId });
40
41
  if (funnelResultRef.current === true) {
41
- FunnelMetrics.funnelComplete({ funnelInteractionId });
42
+ FunnelMetrics.funnelSuccessful({ funnelInteractionId });
42
43
  }
43
44
  else {
44
45
  FunnelMetrics.funnelCancelled({ funnelInteractionId });