@cloudscape-design/components 3.0.333 → 3.0.335

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 (345) hide show
  1. package/alert/styles.css.js +19 -19
  2. package/alert/styles.scoped.css +33 -33
  3. package/alert/styles.selectors.js +19 -19
  4. package/annotation-context/annotation/styles.css.js +24 -24
  5. package/annotation-context/annotation/styles.scoped.css +30 -30
  6. package/annotation-context/annotation/styles.selectors.js +24 -24
  7. package/app-layout/index.js +3 -3
  8. package/app-layout/index.js.map +1 -1
  9. package/app-layout/visual-refresh/context.d.ts.map +1 -1
  10. package/app-layout/visual-refresh/context.js +3 -3
  11. package/app-layout/visual-refresh/context.js.map +1 -1
  12. package/app-layout/visual-refresh/styles.css.js +69 -69
  13. package/app-layout/visual-refresh/styles.scoped.css +168 -168
  14. package/app-layout/visual-refresh/styles.selectors.js +69 -69
  15. package/attribute-editor/styles.css.js +14 -14
  16. package/attribute-editor/styles.scoped.css +27 -27
  17. package/attribute-editor/styles.selectors.js +14 -14
  18. package/autosuggest/virtual-list.d.ts.map +1 -1
  19. package/autosuggest/virtual-list.js +2 -2
  20. package/autosuggest/virtual-list.js.map +1 -1
  21. package/badge/styles.css.js +5 -5
  22. package/badge/styles.scoped.css +7 -7
  23. package/badge/styles.selectors.js +5 -5
  24. package/box/styles.css.js +189 -189
  25. package/box/styles.scoped.css +238 -238
  26. package/box/styles.selectors.js +189 -189
  27. package/breadcrumb-group/styles.css.js +7 -7
  28. package/breadcrumb-group/styles.scoped.css +14 -14
  29. package/breadcrumb-group/styles.selectors.js +7 -7
  30. package/button/internal.d.ts.map +1 -1
  31. package/button/internal.js +12 -1
  32. package/button/internal.js.map +1 -1
  33. package/button/styles.css.js +20 -20
  34. package/button/styles.scoped.css +154 -154
  35. package/button/styles.selectors.js +20 -20
  36. package/button-dropdown/index.d.ts.map +1 -1
  37. package/button-dropdown/index.js +2 -2
  38. package/button-dropdown/index.js.map +1 -1
  39. package/button-dropdown/interfaces.d.ts +31 -0
  40. package/button-dropdown/interfaces.d.ts.map +1 -1
  41. package/button-dropdown/interfaces.js.map +1 -1
  42. package/button-dropdown/internal.d.ts.map +1 -1
  43. package/button-dropdown/internal.js +64 -8
  44. package/button-dropdown/internal.js.map +1 -1
  45. package/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
  46. package/button-dropdown/mobile-expandable-group/styles.scoped.css +6 -6
  47. package/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
  48. package/button-dropdown/styles.css.js +14 -8
  49. package/button-dropdown/styles.scoped.css +44 -14
  50. package/button-dropdown/styles.selectors.js +14 -8
  51. package/button-dropdown/utils/use-button-dropdown.d.ts +1 -0
  52. package/button-dropdown/utils/use-button-dropdown.d.ts.map +1 -1
  53. package/button-dropdown/utils/use-button-dropdown.js +1 -0
  54. package/button-dropdown/utils/use-button-dropdown.js.map +1 -1
  55. package/calendar/styles.css.js +18 -18
  56. package/calendar/styles.scoped.css +40 -40
  57. package/calendar/styles.selectors.js +18 -18
  58. package/cards/index.js +5 -4
  59. package/cards/index.js.map +1 -1
  60. package/cards/styles.css.js +38 -38
  61. package/cards/styles.scoped.css +55 -55
  62. package/cards/styles.selectors.js +38 -38
  63. package/checkbox/styles.css.js +3 -3
  64. package/checkbox/styles.scoped.css +7 -7
  65. package/checkbox/styles.selectors.js +3 -3
  66. package/code-editor/index.js +2 -2
  67. package/code-editor/index.js.map +1 -1
  68. package/code-editor/status-bar.d.ts.map +1 -1
  69. package/code-editor/status-bar.js +3 -3
  70. package/code-editor/status-bar.js.map +1 -1
  71. package/code-editor/styles.css.js +32 -32
  72. package/code-editor/styles.scoped.css +129 -129
  73. package/code-editor/styles.selectors.js +32 -32
  74. package/collection-preferences/content-display/styles.css.js +11 -11
  75. package/collection-preferences/content-display/styles.scoped.css +19 -19
  76. package/collection-preferences/content-display/styles.selectors.js +11 -11
  77. package/collection-preferences/styles.css.js +37 -37
  78. package/collection-preferences/styles.scoped.css +47 -47
  79. package/collection-preferences/styles.selectors.js +37 -37
  80. package/column-layout/flexible-column-layout/index.d.ts.map +1 -1
  81. package/column-layout/flexible-column-layout/index.js +2 -2
  82. package/column-layout/flexible-column-layout/index.js.map +1 -1
  83. package/column-layout/styles.css.js +13 -13
  84. package/column-layout/styles.scoped.css +44 -44
  85. package/column-layout/styles.selectors.js +13 -13
  86. package/container/styles.css.js +28 -28
  87. package/container/styles.scoped.css +52 -52
  88. package/container/styles.selectors.js +28 -28
  89. package/date-picker/styles.css.js +7 -7
  90. package/date-picker/styles.scoped.css +10 -10
  91. package/date-picker/styles.selectors.js +7 -7
  92. package/date-range-picker/styles.css.js +38 -38
  93. package/date-range-picker/styles.scoped.css +48 -48
  94. package/date-range-picker/styles.selectors.js +38 -38
  95. package/expandable-section/styles.css.js +29 -29
  96. package/expandable-section/styles.scoped.css +65 -65
  97. package/expandable-section/styles.selectors.js +29 -29
  98. package/flashbar/styles.css.js +46 -46
  99. package/flashbar/styles.scoped.css +160 -160
  100. package/flashbar/styles.selectors.js +46 -46
  101. package/form/internal.d.ts.map +1 -1
  102. package/form/internal.js +7 -2
  103. package/form/internal.js.map +1 -1
  104. package/form/styles.css.js +9 -9
  105. package/form/styles.scoped.css +9 -9
  106. package/form/styles.selectors.js +9 -9
  107. package/form-field/internal.d.ts.map +1 -1
  108. package/form-field/internal.js +8 -3
  109. package/form-field/internal.js.map +1 -1
  110. package/form-field/styles.css.js +19 -19
  111. package/form-field/styles.scoped.css +31 -31
  112. package/form-field/styles.selectors.js +19 -19
  113. package/grid/styles.css.js +53 -53
  114. package/grid/styles.scoped.css +55 -55
  115. package/grid/styles.selectors.js +53 -53
  116. package/header/styles.css.js +44 -44
  117. package/header/styles.scoped.css +50 -50
  118. package/header/styles.selectors.js +44 -44
  119. package/help-panel/styles.css.js +4 -4
  120. package/help-panel/styles.scoped.css +70 -69
  121. package/help-panel/styles.selectors.js +4 -4
  122. package/icon/styles.css.js +21 -21
  123. package/icon/styles.scoped.css +50 -50
  124. package/icon/styles.selectors.js +21 -21
  125. package/input/styles.css.js +12 -12
  126. package/input/styles.scoped.css +35 -35
  127. package/input/styles.selectors.js +12 -12
  128. package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  129. package/internal/analytics/components/analytics-funnel.js +58 -11
  130. package/internal/analytics/components/analytics-funnel.js.map +1 -1
  131. package/internal/analytics/context/analytics-context.d.ts +5 -1
  132. package/internal/analytics/context/analytics-context.d.ts.map +1 -1
  133. package/internal/analytics/context/analytics-context.js +3 -0
  134. package/internal/analytics/context/analytics-context.js.map +1 -1
  135. package/internal/analytics/hooks/use-funnel.d.ts +3 -0
  136. package/internal/analytics/hooks/use-funnel.d.ts.map +1 -1
  137. package/internal/analytics/hooks/use-funnel.js +7 -2
  138. package/internal/analytics/hooks/use-funnel.js.map +1 -1
  139. package/internal/base-component/styles.scoped.css +8 -7
  140. package/internal/components/button-trigger/styles.css.js +9 -9
  141. package/internal/components/button-trigger/styles.scoped.css +26 -26
  142. package/internal/components/button-trigger/styles.selectors.js +9 -9
  143. package/internal/components/cartesian-chart/labels-measure.d.ts.map +1 -1
  144. package/internal/components/cartesian-chart/labels-measure.js +2 -2
  145. package/internal/components/cartesian-chart/labels-measure.js.map +1 -1
  146. package/internal/components/chart-filter/styles.css.js +3 -3
  147. package/internal/components/chart-filter/styles.scoped.css +4 -4
  148. package/internal/components/chart-filter/styles.selectors.js +3 -3
  149. package/internal/components/chart-legend/styles.css.js +6 -6
  150. package/internal/components/chart-legend/styles.scoped.css +16 -16
  151. package/internal/components/chart-legend/styles.selectors.js +6 -6
  152. package/internal/components/chart-popover/styles.css.js +3 -3
  153. package/internal/components/chart-popover/styles.scoped.css +4 -4
  154. package/internal/components/chart-popover/styles.selectors.js +3 -3
  155. package/internal/components/chart-series-details/styles.css.js +5 -5
  156. package/internal/components/chart-series-details/styles.scoped.css +10 -10
  157. package/internal/components/chart-series-details/styles.selectors.js +5 -5
  158. package/internal/components/chart-series-marker/styles.css.js +5 -5
  159. package/internal/components/chart-series-marker/styles.scoped.css +8 -8
  160. package/internal/components/chart-series-marker/styles.selectors.js +5 -5
  161. package/internal/components/chart-wrapper/styles.css.js +6 -6
  162. package/internal/components/chart-wrapper/styles.scoped.css +9 -9
  163. package/internal/components/chart-wrapper/styles.selectors.js +6 -6
  164. package/internal/components/dropdown/styles.css.js +20 -20
  165. package/internal/components/dropdown/styles.scoped.css +36 -36
  166. package/internal/components/dropdown/styles.selectors.js +20 -20
  167. package/internal/components/dropdown-footer/styles.css.js +3 -3
  168. package/internal/components/dropdown-footer/styles.scoped.css +4 -4
  169. package/internal/components/dropdown-footer/styles.selectors.js +3 -3
  170. package/internal/components/dropdown-status/index.d.ts.map +1 -1
  171. package/internal/components/dropdown-status/index.js +1 -1
  172. package/internal/components/dropdown-status/index.js.map +1 -1
  173. package/internal/components/dropdown-status/styles.css.js +2 -2
  174. package/internal/components/dropdown-status/styles.scoped.css +3 -3
  175. package/internal/components/dropdown-status/styles.selectors.js +2 -2
  176. package/internal/components/menu-dropdown/styles.css.js +7 -7
  177. package/internal/components/menu-dropdown/styles.scoped.css +14 -14
  178. package/internal/components/menu-dropdown/styles.selectors.js +7 -7
  179. package/internal/components/option/styles.css.js +17 -17
  180. package/internal/components/option/styles.scoped.css +31 -31
  181. package/internal/components/option/styles.selectors.js +17 -17
  182. package/internal/components/options-list/styles.css.js +2 -2
  183. package/internal/components/options-list/styles.scoped.css +3 -3
  184. package/internal/components/options-list/styles.selectors.js +2 -2
  185. package/internal/components/selectable-item/styles.css.js +16 -16
  186. package/internal/components/selectable-item/styles.scoped.css +29 -29
  187. package/internal/components/selectable-item/styles.selectors.js +16 -16
  188. package/internal/components/token-list/styles.css.js +9 -9
  189. package/internal/components/token-list/styles.scoped.css +21 -21
  190. package/internal/components/token-list/styles.selectors.js +9 -9
  191. package/internal/environment.js +1 -1
  192. package/internal/generated/theming/index.cjs +24 -13
  193. package/internal/generated/theming/index.js +24 -13
  194. package/internal/hooks/container-queries/index.d.ts +0 -2
  195. package/internal/hooks/container-queries/index.d.ts.map +1 -1
  196. package/internal/hooks/container-queries/index.js +2 -1
  197. package/internal/hooks/container-queries/index.js.map +1 -1
  198. package/internal/hooks/container-queries/use-container-breakpoints.d.ts.map +1 -1
  199. package/internal/hooks/container-queries/use-container-breakpoints.js +2 -2
  200. package/internal/hooks/container-queries/use-container-breakpoints.js.map +1 -1
  201. package/internal/hooks/container-queries/use-resize-observer.d.ts +1 -1
  202. package/internal/hooks/container-queries/use-resize-observer.d.ts.map +1 -1
  203. package/internal/hooks/container-queries/use-resize-observer.js +0 -2
  204. package/internal/hooks/container-queries/use-resize-observer.js.map +1 -1
  205. package/internal/hooks/use-dynamic-overlap/index.js +2 -2
  206. package/internal/hooks/use-dynamic-overlap/index.js.map +1 -1
  207. package/internal/manifest.json +1 -1
  208. package/internal/utils/use-container-width.d.ts.map +1 -1
  209. package/internal/utils/use-container-width.js +5 -3
  210. package/internal/utils/use-container-width.js.map +1 -1
  211. package/link/styles.css.js +20 -20
  212. package/link/styles.scoped.css +73 -73
  213. package/link/styles.selectors.js +20 -20
  214. package/modal/internal.d.ts.map +1 -1
  215. package/modal/internal.js +2 -1
  216. package/modal/internal.js.map +1 -1
  217. package/modal/styles.css.js +23 -23
  218. package/modal/styles.scoped.css +40 -40
  219. package/modal/styles.selectors.js +23 -23
  220. package/multiselect/styles.css.js +1 -1
  221. package/multiselect/styles.scoped.css +2 -2
  222. package/multiselect/styles.selectors.js +1 -1
  223. package/package.json +1 -1
  224. package/pagination/styles.css.js +9 -9
  225. package/pagination/styles.scoped.css +24 -24
  226. package/pagination/styles.selectors.js +9 -9
  227. package/pie-chart/styles.css.js +23 -23
  228. package/pie-chart/styles.scoped.css +42 -42
  229. package/pie-chart/styles.selectors.js +23 -23
  230. package/popover/styles.css.js +50 -50
  231. package/popover/styles.scoped.css +66 -66
  232. package/popover/styles.selectors.js +50 -50
  233. package/progress-bar/styles.css.js +18 -18
  234. package/progress-bar/styles.scoped.css +35 -35
  235. package/progress-bar/styles.selectors.js +18 -18
  236. package/property-filter/index.d.ts.map +1 -1
  237. package/property-filter/index.js +2 -3
  238. package/property-filter/index.js.map +1 -1
  239. package/property-filter/styles.css.js +29 -29
  240. package/property-filter/styles.scoped.css +32 -32
  241. package/property-filter/styles.selectors.js +29 -29
  242. package/property-filter/token-editor.d.ts.map +1 -1
  243. package/property-filter/token-editor.js +2 -2
  244. package/property-filter/token-editor.js.map +1 -1
  245. package/radio-group/styles.css.js +9 -9
  246. package/radio-group/styles.scoped.css +17 -17
  247. package/radio-group/styles.selectors.js +9 -9
  248. package/s3-resource-selector/s3-in-context/styles.css.js +7 -7
  249. package/s3-resource-selector/s3-in-context/styles.scoped.css +9 -9
  250. package/s3-resource-selector/s3-in-context/styles.selectors.js +7 -7
  251. package/segmented-control/styles.css.js +14 -14
  252. package/segmented-control/styles.scoped.css +35 -35
  253. package/segmented-control/styles.selectors.js +14 -14
  254. package/select/parts/virtual-list.js +2 -2
  255. package/select/parts/virtual-list.js.map +1 -1
  256. package/select/styles.css.js +1 -1
  257. package/select/styles.scoped.css +2 -2
  258. package/select/styles.selectors.js +1 -1
  259. package/side-navigation/styles.css.js +27 -27
  260. package/side-navigation/styles.scoped.css +39 -39
  261. package/side-navigation/styles.selectors.js +27 -27
  262. package/spinner/styles.css.js +13 -13
  263. package/spinner/styles.scoped.css +20 -20
  264. package/spinner/styles.selectors.js +13 -13
  265. package/split-panel/styles.css.js +56 -56
  266. package/split-panel/styles.scoped.css +78 -78
  267. package/split-panel/styles.selectors.js +56 -56
  268. package/status-indicator/internal.d.ts +6 -3
  269. package/status-indicator/internal.d.ts.map +1 -1
  270. package/status-indicator/internal.js +2 -2
  271. package/status-indicator/internal.js.map +1 -1
  272. package/status-indicator/styles.css.js +22 -20
  273. package/status-indicator/styles.scoped.css +33 -28
  274. package/status-indicator/styles.selectors.js +22 -20
  275. package/table/internal.d.ts.map +1 -1
  276. package/table/internal.js +6 -4
  277. package/table/internal.js.map +1 -1
  278. package/table/sticky-scrollbar/styles.css.js +4 -4
  279. package/table/sticky-scrollbar/styles.scoped.css +4 -5
  280. package/table/sticky-scrollbar/styles.selectors.js +4 -4
  281. package/table/styles.css.js +34 -34
  282. package/table/styles.scoped.css +43 -43
  283. package/table/styles.selectors.js +34 -34
  284. package/tabs/styles.css.js +21 -21
  285. package/tabs/styles.scoped.css +39 -39
  286. package/tabs/styles.selectors.js +21 -21
  287. package/tabs/tab-header-bar.js +2 -2
  288. package/tabs/tab-header-bar.js.map +1 -1
  289. package/test-utils/dom/button-dropdown/index.d.ts +2 -0
  290. package/test-utils/dom/button-dropdown/index.js +6 -1
  291. package/test-utils/dom/button-dropdown/index.js.map +1 -1
  292. package/test-utils/selectors/button-dropdown/index.d.ts +2 -0
  293. package/test-utils/selectors/button-dropdown/index.js +6 -1
  294. package/test-utils/selectors/button-dropdown/index.js.map +1 -1
  295. package/test-utils/tsconfig.tsbuildinfo +1 -1
  296. package/text-content/styles.css.js +1 -1
  297. package/text-content/styles.scoped.css +64 -64
  298. package/text-content/styles.selectors.js +1 -1
  299. package/text-filter/styles.css.js +3 -3
  300. package/text-filter/styles.scoped.css +4 -4
  301. package/text-filter/styles.selectors.js +3 -3
  302. package/textarea/styles.css.js +4 -4
  303. package/textarea/styles.scoped.css +14 -14
  304. package/textarea/styles.selectors.js +4 -4
  305. package/tiles/styles.css.js +28 -28
  306. package/tiles/styles.scoped.css +70 -70
  307. package/tiles/styles.selectors.js +28 -28
  308. package/toggle/styles.css.js +8 -8
  309. package/toggle/styles.scoped.css +15 -15
  310. package/toggle/styles.selectors.js +8 -8
  311. package/token-group/styles.css.js +7 -7
  312. package/token-group/styles.scoped.css +17 -17
  313. package/token-group/styles.selectors.js +7 -7
  314. package/top-navigation/1.0-beta/styles.css.js +25 -25
  315. package/top-navigation/1.0-beta/styles.scoped.css +43 -43
  316. package/top-navigation/1.0-beta/styles.selectors.js +25 -25
  317. package/top-navigation/1.0-beta/use-top-navigation.d.ts.map +1 -1
  318. package/top-navigation/1.0-beta/use-top-navigation.js +2 -1
  319. package/top-navigation/1.0-beta/use-top-navigation.js.map +1 -1
  320. package/top-navigation/styles.css.js +47 -47
  321. package/top-navigation/styles.scoped.css +70 -70
  322. package/top-navigation/styles.selectors.js +47 -47
  323. package/top-navigation/use-top-navigation.d.ts.map +1 -1
  324. package/top-navigation/use-top-navigation.js +2 -1
  325. package/top-navigation/use-top-navigation.js.map +1 -1
  326. package/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
  327. package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +23 -23
  328. package/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
  329. package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
  330. package/tutorial-panel/components/tutorial-list/styles.scoped.css +30 -30
  331. package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
  332. package/tutorial-panel/styles.css.js +1 -1
  333. package/tutorial-panel/styles.scoped.css +2 -2
  334. package/tutorial-panel/styles.selectors.js +1 -1
  335. package/wizard/styles.css.js +31 -31
  336. package/wizard/styles.scoped.css +63 -63
  337. package/wizard/styles.selectors.js +31 -31
  338. package/internal/hooks/container-queries/interfaces.d.ts +0 -10
  339. package/internal/hooks/container-queries/interfaces.d.ts.map +0 -1
  340. package/internal/hooks/container-queries/interfaces.js +0 -4
  341. package/internal/hooks/container-queries/interfaces.js.map +0 -1
  342. package/internal/hooks/container-queries/use-container-query.d.ts +0 -22
  343. package/internal/hooks/container-queries/use-container-query.d.ts.map +0 -1
  344. package/internal/hooks/container-queries/use-container-query.js +0 -32
  345. package/internal/hooks/container-queries/use-container-query.js.map +0 -1
@@ -2,51 +2,51 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "flash-with-motion": "awsui_flash-with-motion_1q84n_trp7z_93",
6
- "enter": "awsui_enter_1q84n_trp7z_93",
7
- "flash-body": "awsui_flash-body_1q84n_trp7z_107",
8
- "flash-message": "awsui_flash-message_1q84n_trp7z_107",
9
- "flash-header": "awsui_flash-header_1q84n_trp7z_107",
10
- "flash-content": "awsui_flash-content_1q84n_trp7z_108",
11
- "action-button-wrapper": "awsui_action-button-wrapper_1q84n_trp7z_109",
12
- "dismiss-button-wrapper": "awsui_dismiss-button-wrapper_1q84n_trp7z_110",
13
- "flash-icon": "awsui_flash-icon_1q84n_trp7z_133",
14
- "entering": "awsui_entering_1q84n_trp7z_146",
15
- "entered": "awsui_entered_1q84n_trp7z_167",
16
- "exiting": "awsui_exiting_1q84n_trp7z_272",
17
- "stack": "awsui_stack_1q84n_trp7z_294",
18
- "animation-running": "awsui_animation-running_1q84n_trp7z_294",
19
- "item": "awsui_item_1q84n_trp7z_294",
20
- "flash-list-item": "awsui_flash-list-item_1q84n_trp7z_295",
21
- "notification-bar": "awsui_notification-bar_1q84n_trp7z_296",
22
- "collapsed": "awsui_collapsed_1q84n_trp7z_316",
23
- "animation-ready": "awsui_animation-ready_1q84n_trp7z_316",
24
- "expanded-only": "awsui_expanded-only_1q84n_trp7z_316",
25
- "expanded": "awsui_expanded_1q84n_trp7z_316",
26
- "flash": "awsui_flash_1q84n_trp7z_93",
27
- "collapsible": "awsui_collapsible_1q84n_trp7z_380",
28
- "short-list": "awsui_short-list_1q84n_trp7z_386",
29
- "visual-refresh": "awsui_visual-refresh_1q84n_trp7z_386",
30
- "status": "awsui_status_1q84n_trp7z_603",
31
- "header": "awsui_header_1q84n_trp7z_603",
32
- "item-count": "awsui_item-count_1q84n_trp7z_604",
33
- "button": "awsui_button_1q84n_trp7z_605",
34
- "type-count": "awsui_type-count_1q84n_trp7z_640",
35
- "count-number": "awsui_count-number_1q84n_trp7z_640",
36
- "icon": "awsui_icon_1q84n_trp7z_674",
37
- "floating": "awsui_floating_1q84n_trp7z_712",
38
- "flashbar": "awsui_flashbar_1q84n_trp7z_720",
39
- "flash-refresh": "awsui_flash-refresh_1q84n_trp7z_766",
40
- "flash-list": "awsui_flash-list_1q84n_trp7z_295",
41
- "flash-focus-container": "awsui_flash-focus-container_1q84n_trp7z_785",
42
- "flash-text": "awsui_flash-text_1q84n_trp7z_812",
43
- "dismiss-button": "awsui_dismiss-button_1q84n_trp7z_110",
44
- "breakpoint-default": "awsui_breakpoint-default_1q84n_trp7z_853",
45
- "action-button": "awsui_action-button_1q84n_trp7z_109",
46
- "flash-type-success": "awsui_flash-type-success_1q84n_trp7z_866",
47
- "flash-type-error": "awsui_flash-type-error_1q84n_trp7z_870",
48
- "flash-type-info": "awsui_flash-type-info_1q84n_trp7z_874",
49
- "flash-type-in-progress": "awsui_flash-type-in-progress_1q84n_trp7z_875",
50
- "flash-type-warning": "awsui_flash-type-warning_1q84n_trp7z_876"
5
+ "flash-with-motion": "awsui_flash-with-motion_1q84n_nhxx4_93",
6
+ "enter": "awsui_enter_1q84n_nhxx4_93",
7
+ "flash-body": "awsui_flash-body_1q84n_nhxx4_107",
8
+ "flash-message": "awsui_flash-message_1q84n_nhxx4_107",
9
+ "flash-header": "awsui_flash-header_1q84n_nhxx4_107",
10
+ "flash-content": "awsui_flash-content_1q84n_nhxx4_108",
11
+ "action-button-wrapper": "awsui_action-button-wrapper_1q84n_nhxx4_109",
12
+ "dismiss-button-wrapper": "awsui_dismiss-button-wrapper_1q84n_nhxx4_110",
13
+ "flash-icon": "awsui_flash-icon_1q84n_nhxx4_133",
14
+ "entering": "awsui_entering_1q84n_nhxx4_146",
15
+ "entered": "awsui_entered_1q84n_nhxx4_167",
16
+ "exiting": "awsui_exiting_1q84n_nhxx4_272",
17
+ "stack": "awsui_stack_1q84n_nhxx4_294",
18
+ "animation-running": "awsui_animation-running_1q84n_nhxx4_294",
19
+ "item": "awsui_item_1q84n_nhxx4_294",
20
+ "flash-list-item": "awsui_flash-list-item_1q84n_nhxx4_295",
21
+ "notification-bar": "awsui_notification-bar_1q84n_nhxx4_296",
22
+ "collapsed": "awsui_collapsed_1q84n_nhxx4_316",
23
+ "animation-ready": "awsui_animation-ready_1q84n_nhxx4_316",
24
+ "expanded-only": "awsui_expanded-only_1q84n_nhxx4_316",
25
+ "expanded": "awsui_expanded_1q84n_nhxx4_316",
26
+ "flash": "awsui_flash_1q84n_nhxx4_93",
27
+ "collapsible": "awsui_collapsible_1q84n_nhxx4_380",
28
+ "short-list": "awsui_short-list_1q84n_nhxx4_386",
29
+ "visual-refresh": "awsui_visual-refresh_1q84n_nhxx4_386",
30
+ "status": "awsui_status_1q84n_nhxx4_603",
31
+ "header": "awsui_header_1q84n_nhxx4_603",
32
+ "item-count": "awsui_item-count_1q84n_nhxx4_604",
33
+ "button": "awsui_button_1q84n_nhxx4_605",
34
+ "type-count": "awsui_type-count_1q84n_nhxx4_640",
35
+ "count-number": "awsui_count-number_1q84n_nhxx4_640",
36
+ "icon": "awsui_icon_1q84n_nhxx4_674",
37
+ "floating": "awsui_floating_1q84n_nhxx4_712",
38
+ "flashbar": "awsui_flashbar_1q84n_nhxx4_720",
39
+ "flash-refresh": "awsui_flash-refresh_1q84n_nhxx4_766",
40
+ "flash-list": "awsui_flash-list_1q84n_nhxx4_295",
41
+ "flash-focus-container": "awsui_flash-focus-container_1q84n_nhxx4_785",
42
+ "flash-text": "awsui_flash-text_1q84n_nhxx4_812",
43
+ "dismiss-button": "awsui_dismiss-button_1q84n_nhxx4_110",
44
+ "breakpoint-default": "awsui_breakpoint-default_1q84n_nhxx4_853",
45
+ "action-button": "awsui_action-button_1q84n_nhxx4_109",
46
+ "flash-type-success": "awsui_flash-type-success_1q84n_nhxx4_866",
47
+ "flash-type-error": "awsui_flash-type-error_1q84n_nhxx4_870",
48
+ "flash-type-info": "awsui_flash-type-info_1q84n_nhxx4_874",
49
+ "flash-type-in-progress": "awsui_flash-type-in-progress_1q84n_nhxx4_875",
50
+ "flash-type-warning": "awsui_flash-type-warning_1q84n_nhxx4_876"
51
51
  };
52
52
 
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["form/internal.tsx"],"names":[],"mappings":";AASA,OAAO,EAAmB,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAOlF,KAAK,iBAAiB,GAAG,SAAS,GAAG,0BAA0B,CAAC;AAEhE,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,QAAQ,EACR,MAAM,EACN,SAAS,EACT,kBAAkB,EAAE,0BAA0B,EAC9C,OAAO,EACP,gBAAgB,EAChB,OAAO,EACP,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,iBAAiB,eA6CnB"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["form/internal.tsx"],"names":[],"mappings":";AASA,OAAO,EAAmB,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAOlF,KAAK,iBAAiB,GAAG,SAAS,GAAG,0BAA0B,CAAC;AAEhE,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,QAAQ,EACR,MAAM,EACN,SAAS,EACT,kBAAkB,EAAE,0BAA0B,EAC9C,OAAO,EACP,gBAAgB,EAChB,OAAO,EACP,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,iBAAiB,eAkDnB"}
package/form/internal.js CHANGED
@@ -17,12 +17,17 @@ export default function InternalForm(_a) {
17
17
  const baseProps = getBaseProps(props);
18
18
  const i18n = useInternalI18n('form');
19
19
  const errorIconAriaLabel = i18n('errorIconAriaLabel', errorIconAriaLabelOverride);
20
- const { funnelInteractionId, submissionAttempt } = useFunnel();
20
+ const { funnelInteractionId, submissionAttempt, errorCount } = useFunnel();
21
21
  useEffect(() => {
22
22
  if (funnelInteractionId && errorText) {
23
+ errorCount.current++;
23
24
  FunnelMetrics.funnelError({ funnelInteractionId });
25
+ return () => {
26
+ // eslint-disable-next-line react-hooks/exhaustive-deps
27
+ errorCount.current--;
28
+ };
24
29
  }
25
- }, [funnelInteractionId, errorText, submissionAttempt]);
30
+ }, [funnelInteractionId, errorText, submissionAttempt, errorCount]);
26
31
  return (React.createElement("div", Object.assign({}, baseProps, { ref: __internalRootRef, className: clsx(styles.root, baseProps.className) }),
27
32
  React.createElement(FormLayout, { header: header && React.createElement("div", { className: clsx(styles.header, variant === 'full-page' && styles['full-page']) }, header), variant: variant },
28
33
  children && React.createElement("div", { className: styles.content }, children),
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["form/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAGrC,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAItD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAUjB;QAViB,EACnC,QAAQ,EACR,MAAM,EACN,SAAS,EACT,kBAAkB,EAAE,0BAA0B,EAC9C,OAAO,EACP,gBAAgB,EAChB,OAAO,EACP,iBAAiB,OAEC,EADf,KAAK,cAT2B,wHAUpC,CADS;IAER,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,kBAAkB,GAAG,IAAI,CAAC,oBAAoB,EAAE,0BA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CAAC,IAAG,gBAAgB,CAAO,CACtF,CACF,CACP;YACA,SAAS,IAAI,CACZ,oBAAC,UAAU,IAAC,SAAS,EAAE,IAAI;gBACxB,kBAAkB;;gBAAI,SAAS,CACrB,CACd,CACU,CACT,CACP,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAmB;IAChE,OAAO,OAAO,KAAK,WAAW,IAAI,MAAM,CAAC,CAAC,CAAC,CACzC,oBAAC,qBAAqB,IAAC,MAAM,EAAE,MAAM,IAAG,QAAQ,CAAyB,CAC1E,CAAC,CAAC,CAAC,CACF;QACG,MAAM;QACN,QAAQ,CACR,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect } from 'react';\nimport clsx from 'clsx';\nimport { getBaseProps } from '../internal/base-component';\nimport InternalAlert from '../alert/internal';\nimport InternalBox from '../box/internal';\nimport InternalContentLayout from '../content-layout/internal';\nimport styles from './styles.css.js';\nimport { FormLayoutProps, FormProps } from './interfaces';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport LiveRegion from '../internal/components/live-region';\nimport { useInternalI18n } from '../internal/i18n/context';\n\nimport { useFunnel } from '../internal/analytics/hooks/use-funnel';\nimport { FunnelMetrics } from '../internal/analytics';\n\ntype InternalFormProps = FormProps & InternalBaseComponentProps;\n\nexport default function InternalForm({\n children,\n header,\n errorText,\n errorIconAriaLabel: errorIconAriaLabelOverride,\n actions,\n secondaryActions,\n variant,\n __internalRootRef,\n ...props\n}: InternalFormProps) {\n const baseProps = getBaseProps(props);\n const i18n = useInternalI18n('form');\n const errorIconAriaLabel = i18n('errorIconAriaLabel', errorIconAriaLabelOverride);\n\n const { funnelInteractionId, submissionAttempt } = useFunnel();\n\n useEffect(() => {\n if (funnelInteractionId && errorText) {\n FunnelMetrics.funnelError({ funnelInteractionId });\n }\n }, [funnelInteractionId, errorText, submissionAttempt]);\n\n return (\n <div {...baseProps} ref={__internalRootRef} className={clsx(styles.root, baseProps.className)}>\n <FormLayout\n header={\n header && <div className={clsx(styles.header, variant === 'full-page' && styles['full-page'])}>{header}</div>\n }\n variant={variant}\n >\n {children && <div className={styles.content}>{children}</div>}\n {errorText && (\n <InternalBox margin={{ top: 'l' }}>\n <InternalAlert type=\"error\" statusIconAriaLabel={errorIconAriaLabel}>\n <div className={styles.error}>{errorText}</div>\n </InternalAlert>\n </InternalBox>\n )}\n {(actions || secondaryActions) && (\n <div className={styles.footer}>\n <div className={styles['actions-section']}>\n {actions && <div className={styles.actions}>{actions}</div>}\n {secondaryActions && <div className={styles['secondary-actions']}>{secondaryActions}</div>}\n </div>\n </div>\n )}\n {errorText && (\n <LiveRegion assertive={true}>\n {errorIconAriaLabel}, {errorText}\n </LiveRegion>\n )}\n </FormLayout>\n </div>\n );\n}\n\nfunction FormLayout({ children, header, variant }: FormLayoutProps) {\n return variant === 'full-page' && header ? (\n <InternalContentLayout header={header}>{children}</InternalContentLayout>\n ) : (\n <>\n {header}\n {children}\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["form/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAGrC,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,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,EAAE,OAAO;YAEf,QAAQ,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,QAAQ,CAAO;YAC5D,SAAS,IAAI,CACZ,oBAAC,WAAW,IAAC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE;gBAC/B,oBAAC,aAAa,IAAC,IAAI,EAAC,OAAO,EAAC,mBAAmB,EAAE,kBAAkB;oBACjE,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK,IAAG,SAAS,CAAO,CACjC,CACJ,CACf;YACA,CAAC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAChC,6BAAK,SAAS,EAAE,MAAM,CAAC,MAAM;gBAC3B,6BAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC;oBACtC,OAAO,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,OAAO,CAAO;oBAC1D,gBAAgB,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,mBAAmB,CAAC,IAAG,gBAAgB,CAAO,CACtF,CACF,CACP;YACA,SAAS,IAAI,CACZ,oBAAC,UAAU,IAAC,SAAS,EAAE,IAAI;gBACxB,kBAAkB;;gBAAI,SAAS,CACrB,CACd,CACU,CACT,CACP,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAmB;IAChE,OAAO,OAAO,KAAK,WAAW,IAAI,MAAM,CAAC,CAAC,CAAC,CACzC,oBAAC,qBAAqB,IAAC,MAAM,EAAE,MAAM,IAAG,QAAQ,CAAyB,CAC1E,CAAC,CAAC,CAAC,CACF;QACG,MAAM;QACN,QAAQ,CACR,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect } from 'react';\nimport clsx from 'clsx';\nimport { getBaseProps } from '../internal/base-component';\nimport InternalAlert from '../alert/internal';\nimport InternalBox from '../box/internal';\nimport InternalContentLayout from '../content-layout/internal';\nimport styles from './styles.css.js';\nimport { FormLayoutProps, FormProps } from './interfaces';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport LiveRegion from '../internal/components/live-region';\nimport { useInternalI18n } from '../internal/i18n/context';\n\nimport { useFunnel } from '../internal/analytics/hooks/use-funnel';\nimport { FunnelMetrics } from '../internal/analytics';\n\ntype InternalFormProps = FormProps & InternalBaseComponentProps;\n\nexport default function InternalForm({\n children,\n header,\n errorText,\n errorIconAriaLabel: errorIconAriaLabelOverride,\n actions,\n secondaryActions,\n variant,\n __internalRootRef,\n ...props\n}: InternalFormProps) {\n const baseProps = getBaseProps(props);\n const i18n = useInternalI18n('form');\n const errorIconAriaLabel = i18n('errorIconAriaLabel', errorIconAriaLabelOverride);\n\n const { funnelInteractionId, submissionAttempt, errorCount } = useFunnel();\n\n useEffect(() => {\n if (funnelInteractionId && errorText) {\n errorCount.current++;\n FunnelMetrics.funnelError({ funnelInteractionId });\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n errorCount.current--;\n };\n }\n }, [funnelInteractionId, errorText, submissionAttempt, errorCount]);\n\n return (\n <div {...baseProps} ref={__internalRootRef} className={clsx(styles.root, baseProps.className)}>\n <FormLayout\n header={\n header && <div className={clsx(styles.header, variant === 'full-page' && styles['full-page'])}>{header}</div>\n }\n variant={variant}\n >\n {children && <div className={styles.content}>{children}</div>}\n {errorText && (\n <InternalBox margin={{ top: 'l' }}>\n <InternalAlert type=\"error\" statusIconAriaLabel={errorIconAriaLabel}>\n <div className={styles.error}>{errorText}</div>\n </InternalAlert>\n </InternalBox>\n )}\n {(actions || secondaryActions) && (\n <div className={styles.footer}>\n <div className={styles['actions-section']}>\n {actions && <div className={styles.actions}>{actions}</div>}\n {secondaryActions && <div className={styles['secondary-actions']}>{secondaryActions}</div>}\n </div>\n </div>\n )}\n {errorText && (\n <LiveRegion assertive={true}>\n {errorIconAriaLabel}, {errorText}\n </LiveRegion>\n )}\n </FormLayout>\n </div>\n );\n}\n\nfunction FormLayout({ children, header, variant }: FormLayoutProps) {\n return variant === 'full-page' && header ? (\n <InternalContentLayout header={header}>{children}</InternalContentLayout>\n ) : (\n <>\n {header}\n {children}\n </>\n );\n}\n"]}
@@ -1,14 +1,14 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_1i0s3_ijcj5_93",
5
- "header": "awsui_header_1i0s3_ijcj5_106",
6
- "full-page": "awsui_full-page_1i0s3_ijcj5_106",
7
- "content": "awsui_content_1i0s3_ijcj5_110",
8
- "error": "awsui_error_1i0s3_ijcj5_114",
9
- "footer": "awsui_footer_1i0s3_ijcj5_118",
10
- "actions-section": "awsui_actions-section_1i0s3_ijcj5_122",
11
- "secondary-actions": "awsui_secondary-actions_1i0s3_ijcj5_131",
12
- "actions": "awsui_actions_1i0s3_ijcj5_122"
4
+ "root": "awsui_root_1i0s3_1jhbi_93",
5
+ "header": "awsui_header_1i0s3_1jhbi_106",
6
+ "full-page": "awsui_full-page_1i0s3_1jhbi_106",
7
+ "content": "awsui_content_1i0s3_1jhbi_110",
8
+ "error": "awsui_error_1i0s3_1jhbi_114",
9
+ "footer": "awsui_footer_1i0s3_1jhbi_118",
10
+ "actions-section": "awsui_actions-section_1i0s3_1jhbi_122",
11
+ "secondary-actions": "awsui_secondary-actions_1i0s3_1jhbi_131",
12
+ "actions": "awsui_actions_1i0s3_1jhbi_122"
13
13
  };
14
14
 
@@ -90,7 +90,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
90
90
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
91
  SPDX-License-Identifier: Apache-2.0
92
92
  */
93
- .awsui_root_1i0s3_ijcj5_93:not(#\9) {
93
+ .awsui_root_1i0s3_1jhbi_93:not(#\9) {
94
94
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
95
95
  border-collapse: separate;
96
96
  border-spacing: 0;
@@ -121,7 +121,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
121
121
  word-spacing: normal;
122
122
  box-sizing: border-box;
123
123
  font-size: var(--font-body-m-size-7dign1, 14px);
124
- line-height: var(--font-body-m-line-height-rfgrp9, 22px);
124
+ line-height: var(--font-body-m-line-height-ghizru, 20px);
125
125
  color: var(--color-text-body-default-su7kuo, #000716);
126
126
  font-weight: 400;
127
127
  font-family: var(--font-family-base-wn913o, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
@@ -129,23 +129,23 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
129
129
  -moz-osx-font-smoothing: auto;
130
130
  }
131
131
 
132
- .awsui_header_1i0s3_ijcj5_106:not(#\9):not(.awsui_full-page_1i0s3_ijcj5_106) {
132
+ .awsui_header_1i0s3_1jhbi_106:not(#\9):not(.awsui_full-page_1i0s3_1jhbi_106) {
133
133
  margin-bottom: var(--space-scaled-m-gxhdpl, 16px);
134
134
  }
135
135
 
136
- .awsui_content_1i0s3_ijcj5_110:not(#\9) {
136
+ .awsui_content_1i0s3_1jhbi_110:not(#\9) {
137
137
  /* used in test-utils */
138
138
  }
139
139
 
140
- .awsui_error_1i0s3_ijcj5_114:not(#\9) {
140
+ .awsui_error_1i0s3_1jhbi_114:not(#\9) {
141
141
  /* used in test-utils */
142
142
  }
143
143
 
144
- .awsui_footer_1i0s3_ijcj5_118:not(#\9) {
144
+ .awsui_footer_1i0s3_1jhbi_118:not(#\9) {
145
145
  margin-top: var(--space-scaled-l-2rs0gk, 20px);
146
146
  }
147
147
 
148
- .awsui_actions-section_1i0s3_ijcj5_122:not(#\9) {
148
+ .awsui_actions-section_1i0s3_1jhbi_122:not(#\9) {
149
149
  display: flex;
150
150
  flex-direction: row-reverse;
151
151
  justify-content: space-between;
@@ -154,13 +154,13 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
154
154
  margin-bottom: calc(-1 * var(--space-scaled-m-gxhdpl, 16px));
155
155
  }
156
156
 
157
- .awsui_secondary-actions_1i0s3_ijcj5_131:not(#\9) {
157
+ .awsui_secondary-actions_1i0s3_1jhbi_131:not(#\9) {
158
158
  min-width: 1px;
159
159
  margin-left: var(--space-scaled-m-gxhdpl, 16px);
160
160
  margin-bottom: var(--space-scaled-m-gxhdpl, 16px);
161
161
  }
162
162
 
163
- .awsui_actions_1i0s3_ijcj5_122:not(#\9) {
163
+ .awsui_actions_1i0s3_1jhbi_122:not(#\9) {
164
164
  min-width: 1px;
165
165
  margin-left: var(--space-scaled-m-gxhdpl, 16px);
166
166
  margin-bottom: var(--space-scaled-m-gxhdpl, 16px);
@@ -2,14 +2,14 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_1i0s3_ijcj5_93",
6
- "header": "awsui_header_1i0s3_ijcj5_106",
7
- "full-page": "awsui_full-page_1i0s3_ijcj5_106",
8
- "content": "awsui_content_1i0s3_ijcj5_110",
9
- "error": "awsui_error_1i0s3_ijcj5_114",
10
- "footer": "awsui_footer_1i0s3_ijcj5_118",
11
- "actions-section": "awsui_actions-section_1i0s3_ijcj5_122",
12
- "secondary-actions": "awsui_secondary-actions_1i0s3_ijcj5_131",
13
- "actions": "awsui_actions_1i0s3_ijcj5_122"
5
+ "root": "awsui_root_1i0s3_1jhbi_93",
6
+ "header": "awsui_header_1i0s3_1jhbi_106",
7
+ "full-page": "awsui_full-page_1i0s3_1jhbi_106",
8
+ "content": "awsui_content_1i0s3_1jhbi_110",
9
+ "error": "awsui_error_1i0s3_1jhbi_114",
10
+ "footer": "awsui_footer_1i0s3_1jhbi_118",
11
+ "actions-section": "awsui_actions-section_1i0s3_1jhbi_122",
12
+ "secondary-actions": "awsui_secondary-actions_1i0s3_1jhbi_131",
13
+ "actions": "awsui_actions_1i0s3_1jhbi_122"
14
14
  };
15
15
 
@@ -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;AAetD,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,eAoHxB"}
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;AAetD,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,eA2HxB"}
@@ -35,7 +35,7 @@ export default function InternalFormField(_a) {
35
35
  const instanceUniqueId = useUniqueId('formField');
36
36
  const generatedControlId = controlId || instanceUniqueId;
37
37
  const formFieldId = controlId || generatedControlId;
38
- const { funnelInteractionId, submissionAttempt } = useFunnel();
38
+ const { funnelInteractionId, submissionAttempt, funnelState, errorCount } = useFunnel();
39
39
  const { stepNumber, stepNameSelector, subStepSelector, subStepNameSelector } = useFunnelSubStep();
40
40
  const slotIds = getSlotIds(formFieldId, label, description, constraintText, errorText);
41
41
  const ariaDescribedBy = getAriaDescribedBy(slotIds);
@@ -51,9 +51,10 @@ export default function InternalFormField(_a) {
51
51
  [DATA_ATTR_FIELD_ERROR]: slotIds.error ? getFieldSlotSeletor(slotIds.error) : undefined,
52
52
  };
53
53
  useEffect(() => {
54
- if (funnelInteractionId && errorText) {
54
+ if (funnelInteractionId && errorText && funnelState.current !== 'complete') {
55
55
  const stepName = getNameFromSelector(stepNameSelector);
56
56
  const subStepName = getNameFromSelector(subStepNameSelector);
57
+ errorCount.current++;
57
58
  FunnelMetrics.funnelSubStepError({
58
59
  funnelInteractionId,
59
60
  subStepSelector,
@@ -66,9 +67,13 @@ export default function InternalFormField(_a) {
66
67
  fieldLabelSelector: getFieldSlotSeletor(slotIds.label),
67
68
  subStepAllSelector: getSubStepAllSelector(),
68
69
  });
70
+ return () => {
71
+ // eslint-disable-next-line react-hooks/exhaustive-deps
72
+ errorCount.current--;
73
+ };
69
74
  }
70
75
  // eslint-disable-next-line react-hooks/exhaustive-deps
71
- }, [funnelInteractionId, errorText, submissionAttempt]);
76
+ }, [funnelInteractionId, errorText, submissionAttempt, errorCount]);
72
77
  return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(baseProps.className, styles.root), ref: __internalRootRef }, analyticsAttributes),
73
78
  React.createElement("div", { className: clsx(__hideLabel && styles['visually-hidden']) },
74
79
  label && (React.createElement("label", { className: styles.label, id: slotIds.label, htmlFor: generatedControlId }, label)),
@@ -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;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CA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esContent":["// 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';\nimport { InfoLinkLabelContext } from '../internal/context/info-link-label-context';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport {\n DATA_ATTR_FIELD_ERROR,\n DATA_ATTR_FIELD_LABEL,\n getFieldSlotSeletor,\n getNameFromSelector,\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, submissionAttempt } = useFunnel();\n\n const { stepNumber, stepNameSelector, subStepSelector, subStepNameSelector } = 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) : undefined,\n [DATA_ATTR_FIELD_ERROR]: slotIds.error ? getFieldSlotSeletor(slotIds.error) : undefined,\n };\n\n useEffect(() => {\n if (funnelInteractionId && errorText) {\n const stepName = getNameFromSelector(stepNameSelector);\n const subStepName = getNameFromSelector(subStepNameSelector);\n\n FunnelMetrics.funnelSubStepError({\n funnelInteractionId,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n stepNumber,\n stepName,\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, submissionAttempt]);\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 <InfoLinkLabelContext.Provider value={slotIds.label}>\n {!__hideLabel && info && <span className={styles.info}>{info}</span>}\n </InfoLinkLabelContext.Provider>\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,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,wCAA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AAS,EAAE,MAAM,CAAC,OAAO,IAAG,QAAQ,CAAO,CACnC;gBAE3B,gBAAgB,IAAI,CACnB,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,6BAA6B;oBAC7D,6BAAK,SAAS,EAAE,MAAM,CAAC,mBAAmB,CAAC,IAAG,gBAAgB,CAAO,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';\nimport { InfoLinkLabelContext } from '../internal/context/info-link-label-context';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport {\n DATA_ATTR_FIELD_ERROR,\n DATA_ATTR_FIELD_LABEL,\n getFieldSlotSeletor,\n getNameFromSelector,\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, submissionAttempt, funnelState, errorCount } = useFunnel();\n\n const { stepNumber, stepNameSelector, subStepSelector, subStepNameSelector } = 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) : undefined,\n [DATA_ATTR_FIELD_ERROR]: slotIds.error ? getFieldSlotSeletor(slotIds.error) : undefined,\n };\n\n useEffect(() => {\n if (funnelInteractionId && errorText && funnelState.current !== 'complete') {\n const stepName = getNameFromSelector(stepNameSelector);\n const subStepName = getNameFromSelector(subStepNameSelector);\n\n errorCount.current++;\n\n FunnelMetrics.funnelSubStepError({\n funnelInteractionId,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n stepNumber,\n stepName,\n stepNameSelector,\n fieldErrorSelector: getFieldSlotSeletor(slotIds.error),\n fieldLabelSelector: getFieldSlotSeletor(slotIds.label),\n subStepAllSelector: getSubStepAllSelector(),\n });\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n errorCount.current--;\n };\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [funnelInteractionId, errorText, submissionAttempt, errorCount]);\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 <InfoLinkLabelContext.Provider value={slotIds.label}>\n {!__hideLabel && info && <span className={styles.info}>{info}</span>}\n </InfoLinkLabelContext.Provider>\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,24 +1,24 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "error-icon-shake-wrapper": "awsui_error-icon-shake-wrapper_14mhv_a78yj_97",
5
- "awsui-motion-shake-horizontally": "awsui_awsui-motion-shake-horizontally_14mhv_a78yj_1",
6
- "error-icon-scale-wrapper": "awsui_error-icon-scale-wrapper_14mhv_a78yj_124",
7
- "awsui-motion-scale-popup": "awsui_awsui-motion-scale-popup_14mhv_a78yj_1",
8
- "error": "awsui_error_14mhv_a78yj_97",
9
- "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_14mhv_a78yj_1",
10
- "root": "awsui_root_14mhv_a78yj_168",
11
- "label": "awsui_label_14mhv_a78yj_182",
12
- "info": "awsui_info_14mhv_a78yj_195",
13
- "description": "awsui_description_14mhv_a78yj_200",
14
- "constraint": "awsui_constraint_14mhv_a78yj_201",
15
- "hints": "awsui_hints_14mhv_a78yj_208",
16
- "constraint-has-error": "awsui_constraint-has-error_14mhv_a78yj_209",
17
- "secondary-control": "awsui_secondary-control_14mhv_a78yj_213",
18
- "controls": "awsui_controls_14mhv_a78yj_217",
19
- "label-hidden": "awsui_label-hidden_14mhv_a78yj_217",
20
- "control": "awsui_control_14mhv_a78yj_217",
21
- "error__message": "awsui_error__message_14mhv_a78yj_236",
22
- "visually-hidden": "awsui_visually-hidden_14mhv_a78yj_240"
4
+ "error-icon-shake-wrapper": "awsui_error-icon-shake-wrapper_14mhv_1gxuk_97",
5
+ "awsui-motion-shake-horizontally": "awsui_awsui-motion-shake-horizontally_14mhv_1gxuk_1",
6
+ "error-icon-scale-wrapper": "awsui_error-icon-scale-wrapper_14mhv_1gxuk_124",
7
+ "awsui-motion-scale-popup": "awsui_awsui-motion-scale-popup_14mhv_1gxuk_1",
8
+ "error": "awsui_error_14mhv_1gxuk_97",
9
+ "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_14mhv_1gxuk_1",
10
+ "root": "awsui_root_14mhv_1gxuk_168",
11
+ "label": "awsui_label_14mhv_1gxuk_182",
12
+ "info": "awsui_info_14mhv_1gxuk_195",
13
+ "description": "awsui_description_14mhv_1gxuk_200",
14
+ "constraint": "awsui_constraint_14mhv_1gxuk_201",
15
+ "hints": "awsui_hints_14mhv_1gxuk_208",
16
+ "constraint-has-error": "awsui_constraint-has-error_14mhv_1gxuk_209",
17
+ "secondary-control": "awsui_secondary-control_14mhv_1gxuk_213",
18
+ "controls": "awsui_controls_14mhv_1gxuk_217",
19
+ "label-hidden": "awsui_label-hidden_14mhv_1gxuk_217",
20
+ "control": "awsui_control_14mhv_1gxuk_217",
21
+ "error__message": "awsui_error__message_14mhv_1gxuk_236",
22
+ "visually-hidden": "awsui_visually-hidden_14mhv_1gxuk_240"
23
23
  };
24
24
 
@@ -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_error-icon-shake-wrapper_14mhv_a78yj_97:not(#\9) {
98
- animation: awsui_awsui-motion-shake-horizontally_14mhv_a78yj_1 var(--motion-duration-refresh-only-medium-wkp575, 165ms);
97
+ .awsui_error-icon-shake-wrapper_14mhv_1gxuk_97:not(#\9) {
98
+ animation: awsui_awsui-motion-shake-horizontally_14mhv_1gxuk_1 var(--motion-duration-refresh-only-medium-wkp575, 165ms);
99
99
  }
100
- @keyframes awsui_awsui-motion-shake-horizontally_14mhv_a78yj_1 {
100
+ @keyframes awsui_awsui-motion-shake-horizontally_14mhv_1gxuk_1 {
101
101
  0% {
102
102
  transform: translateX(-5px);
103
103
  animation-timing-function: linear;
@@ -111,20 +111,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
111
111
  }
112
112
  }
113
113
  @media (prefers-reduced-motion: reduce) {
114
- .awsui_error-icon-shake-wrapper_14mhv_a78yj_97:not(#\9) {
114
+ .awsui_error-icon-shake-wrapper_14mhv_1gxuk_97:not(#\9) {
115
115
  animation: none;
116
116
  transition: none;
117
117
  }
118
118
  }
119
- .awsui-motion-disabled .awsui_error-icon-shake-wrapper_14mhv_a78yj_97:not(#\9), .awsui-mode-entering .awsui_error-icon-shake-wrapper_14mhv_a78yj_97:not(#\9) {
119
+ .awsui-motion-disabled .awsui_error-icon-shake-wrapper_14mhv_1gxuk_97:not(#\9), .awsui-mode-entering .awsui_error-icon-shake-wrapper_14mhv_1gxuk_97:not(#\9) {
120
120
  animation: none;
121
121
  transition: none;
122
122
  }
123
123
 
124
- .awsui_error-icon-scale-wrapper_14mhv_a78yj_124:not(#\9) {
125
- animation: awsui_awsui-motion-scale-popup_14mhv_a78yj_1 var(--motion-duration-refresh-only-medium-wkp575, 165ms) var(--motion-easing-refresh-only-a-6ywz7k, cubic-bezier(0, 0, 0, 1));
124
+ .awsui_error-icon-scale-wrapper_14mhv_1gxuk_124:not(#\9) {
125
+ animation: awsui_awsui-motion-scale-popup_14mhv_1gxuk_1 var(--motion-duration-refresh-only-medium-wkp575, 165ms) var(--motion-easing-refresh-only-a-6ywz7k, cubic-bezier(0, 0, 0, 1));
126
126
  }
127
- @keyframes awsui_awsui-motion-scale-popup_14mhv_a78yj_1 {
127
+ @keyframes awsui_awsui-motion-scale-popup_14mhv_1gxuk_1 {
128
128
  0% {
129
129
  transform: scale(0.95);
130
130
  }
@@ -133,20 +133,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
133
133
  }
134
134
  }
135
135
  @media (prefers-reduced-motion: reduce) {
136
- .awsui_error-icon-scale-wrapper_14mhv_a78yj_124:not(#\9) {
136
+ .awsui_error-icon-scale-wrapper_14mhv_1gxuk_124:not(#\9) {
137
137
  animation: none;
138
138
  transition: none;
139
139
  }
140
140
  }
141
- .awsui-motion-disabled .awsui_error-icon-scale-wrapper_14mhv_a78yj_124:not(#\9), .awsui-mode-entering .awsui_error-icon-scale-wrapper_14mhv_a78yj_124:not(#\9) {
141
+ .awsui-motion-disabled .awsui_error-icon-scale-wrapper_14mhv_1gxuk_124:not(#\9), .awsui-mode-entering .awsui_error-icon-scale-wrapper_14mhv_1gxuk_124:not(#\9) {
142
142
  animation: none;
143
143
  transition: none;
144
144
  }
145
145
 
146
- .awsui_error_14mhv_a78yj_97:not(#\9) {
147
- animation: awsui_awsui-motion-fade-in-0_14mhv_a78yj_1 var(--motion-duration-refresh-only-medium-wkp575, 165ms) var(--motion-easing-refresh-only-a-6ywz7k, cubic-bezier(0, 0, 0, 1));
146
+ .awsui_error_14mhv_1gxuk_97:not(#\9) {
147
+ animation: awsui_awsui-motion-fade-in-0_14mhv_1gxuk_1 var(--motion-duration-refresh-only-medium-wkp575, 165ms) var(--motion-easing-refresh-only-a-6ywz7k, cubic-bezier(0, 0, 0, 1));
148
148
  }
149
- @keyframes awsui_awsui-motion-fade-in-0_14mhv_a78yj_1 {
149
+ @keyframes awsui_awsui-motion-fade-in-0_14mhv_1gxuk_1 {
150
150
  from {
151
151
  opacity: 0;
152
152
  }
@@ -155,17 +155,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
155
155
  }
156
156
  }
157
157
  @media (prefers-reduced-motion: reduce) {
158
- .awsui_error_14mhv_a78yj_97:not(#\9) {
158
+ .awsui_error_14mhv_1gxuk_97:not(#\9) {
159
159
  animation: none;
160
160
  transition: none;
161
161
  }
162
162
  }
163
- .awsui-motion-disabled .awsui_error_14mhv_a78yj_97:not(#\9), .awsui-mode-entering .awsui_error_14mhv_a78yj_97:not(#\9) {
163
+ .awsui-motion-disabled .awsui_error_14mhv_1gxuk_97:not(#\9), .awsui-mode-entering .awsui_error_14mhv_1gxuk_97:not(#\9) {
164
164
  animation: none;
165
165
  transition: none;
166
166
  }
167
167
 
168
- .awsui_root_14mhv_a78yj_168:not(#\9) {
168
+ .awsui_root_14mhv_1gxuk_168:not(#\9) {
169
169
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
170
170
  border-collapse: separate;
171
171
  border-spacing: 0;
@@ -196,7 +196,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
196
196
  word-spacing: normal;
197
197
  box-sizing: border-box;
198
198
  font-size: var(--font-body-m-size-7dign1, 14px);
199
- line-height: var(--font-body-m-line-height-rfgrp9, 22px);
199
+ line-height: var(--font-body-m-line-height-ghizru, 20px);
200
200
  color: var(--color-text-body-default-su7kuo, #000716);
201
201
  font-weight: 400;
202
202
  font-family: var(--font-family-base-wn913o, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
@@ -205,52 +205,52 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
205
205
  box-sizing: border-box;
206
206
  }
207
207
 
208
- .awsui_label_14mhv_a78yj_182:not(#\9) {
208
+ .awsui_label_14mhv_1gxuk_182:not(#\9) {
209
209
  box-sizing: border-box;
210
210
  color: var(--color-text-form-label-9b04y0, #000716);
211
211
  display: inline;
212
212
  font-size: var(--font-body-m-size-7dign1, 14px);
213
- line-height: var(--font-body-m-line-height-rfgrp9, 22px);
213
+ line-height: var(--font-body-m-line-height-ghizru, 20px);
214
214
  font-weight: var(--font-display-label-weight-io22e5, 700);
215
215
  margin-right: var(--space-xs-edba2s, 8px);
216
216
  }
217
- .awsui_label_14mhv_a78yj_182:not(#\9):only-child {
217
+ .awsui_label_14mhv_1gxuk_182:not(#\9):only-child {
218
218
  margin: 0;
219
219
  }
220
220
 
221
- .awsui_info_14mhv_a78yj_195:not(#\9) {
221
+ .awsui_info_14mhv_1gxuk_195:not(#\9) {
222
222
  padding-left: var(--space-xs-edba2s, 8px);
223
223
  border-left: var(--border-divider-section-width-orq175, 2px) solid var(--color-border-divider-default-9o8zql, #e9ebed);
224
224
  }
225
225
 
226
- .awsui_description_14mhv_a78yj_200:not(#\9),
227
- .awsui_constraint_14mhv_a78yj_201:not(#\9) {
226
+ .awsui_description_14mhv_1gxuk_200:not(#\9),
227
+ .awsui_constraint_14mhv_1gxuk_201:not(#\9) {
228
228
  color: var(--color-text-form-secondary-88dttc, #5f6b7a);
229
229
  font-size: var(--font-body-s-size-6jmxer, 12px);
230
230
  line-height: var(--font-body-s-line-height-ga8tt7, 16px);
231
231
  letter-spacing: var(--font-body-s-letter-spacing-v8bwhi, 0.005em);
232
232
  }
233
233
 
234
- .awsui_hints_14mhv_a78yj_208:not(#\9),
235
- .awsui_constraint-has-error_14mhv_a78yj_209:not(#\9) {
234
+ .awsui_hints_14mhv_1gxuk_208:not(#\9),
235
+ .awsui_constraint-has-error_14mhv_1gxuk_209:not(#\9) {
236
236
  padding-top: var(--space-xxs-ja5cp8, 4px);
237
237
  }
238
238
 
239
- .awsui_secondary-control_14mhv_a78yj_213:not(#\9) {
239
+ .awsui_secondary-control_14mhv_1gxuk_213:not(#\9) {
240
240
  /* used in test-utils */
241
241
  }
242
242
 
243
- .awsui_controls_14mhv_a78yj_217:not(#\9):not(.awsui_label-hidden_14mhv_a78yj_217) {
243
+ .awsui_controls_14mhv_1gxuk_217:not(#\9):not(.awsui_label-hidden_14mhv_1gxuk_217) {
244
244
  padding-top: var(--space-xxs-ja5cp8, 4px);
245
245
  }
246
246
 
247
- .awsui_control_14mhv_a78yj_217:not(#\9) {
247
+ .awsui_control_14mhv_1gxuk_217:not(#\9) {
248
248
  min-width: 0;
249
249
  -ms-word-break: break-all;
250
250
  word-break: break-word;
251
251
  }
252
252
 
253
- .awsui_error_14mhv_a78yj_97:not(#\9) {
253
+ .awsui_error_14mhv_1gxuk_97:not(#\9) {
254
254
  color: var(--color-text-status-error-p6dh5n, #d91515);
255
255
  font-size: var(--font-body-s-size-6jmxer, 12px);
256
256
  line-height: var(--font-body-s-line-height-ga8tt7, 16px);
@@ -259,11 +259,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
259
259
  align-items: flex-start;
260
260
  }
261
261
 
262
- .awsui_error__message_14mhv_a78yj_236:not(#\9) {
262
+ .awsui_error__message_14mhv_1gxuk_236:not(#\9) {
263
263
  margin-left: var(--space-xxs-ja5cp8, 4px);
264
264
  }
265
265
 
266
- .awsui_visually-hidden_14mhv_a78yj_240:not(#\9) {
266
+ .awsui_visually-hidden_14mhv_1gxuk_240:not(#\9) {
267
267
  position: absolute !important;
268
268
  top: -9999px !important;
269
269
  left: -9999px !important;