@cloudscape-design/components 3.0.1129 → 3.0.1130

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 (788) hide show
  1. package/alert/actions-wrapper/index.js +3 -3
  2. package/alert/actions-wrapper/index.js.map +1 -1
  3. package/alert/internal-do-not-use-core.js +2 -4
  4. package/alert/internal-do-not-use-core.js.map +1 -1
  5. package/alert/internal.js +8 -10
  6. package/alert/internal.js.map +1 -1
  7. package/alert/style.js +12 -5
  8. package/alert/style.js.map +1 -1
  9. package/alert/styles.css.js +27 -27
  10. package/alert/styles.scoped.css +50 -50
  11. package/alert/styles.selectors.js +27 -27
  12. package/anchor-navigation/anchor-item/index.js +1 -1
  13. package/anchor-navigation/anchor-item/index.js.map +1 -1
  14. package/anchor-navigation/index.js +2 -4
  15. package/anchor-navigation/index.js.map +1 -1
  16. package/anchor-navigation/internal.js +2 -4
  17. package/anchor-navigation/internal.js.map +1 -1
  18. package/annotation-context/annotation/styles.css.js +24 -24
  19. package/annotation-context/annotation/styles.scoped.css +32 -32
  20. package/annotation-context/annotation/styles.selectors.js +24 -24
  21. package/annotation-context/index.js +3 -4
  22. package/annotation-context/index.js.map +1 -1
  23. package/app-layout/classic.js +20 -17
  24. package/app-layout/classic.js.map +1 -1
  25. package/app-layout/defaults.js +8 -3
  26. package/app-layout/defaults.js.map +1 -1
  27. package/app-layout/drawer/resizable-drawer.js +8 -10
  28. package/app-layout/drawer/resizable-drawer.js.map +1 -1
  29. package/app-layout/index.js +24 -21
  30. package/app-layout/index.js.map +1 -1
  31. package/app-layout/internal.js +3 -3
  32. package/app-layout/internal.js.map +1 -1
  33. package/app-layout/notifications/index.js +3 -5
  34. package/app-layout/notifications/index.js.map +1 -1
  35. package/app-layout/notifications/styles.css.js +3 -3
  36. package/app-layout/notifications/styles.scoped.css +7 -7
  37. package/app-layout/notifications/styles.selectors.js +3 -3
  38. package/app-layout/runtime-drawer/index.js +36 -18
  39. package/app-layout/runtime-drawer/index.js.map +1 -1
  40. package/app-layout/split-panel/provider.js +2 -4
  41. package/app-layout/split-panel/provider.js.map +1 -1
  42. package/app-layout/utils/use-app-layout-placement.js +1 -1
  43. package/app-layout/utils/use-app-layout-placement.js.map +1 -1
  44. package/app-layout/utils/use-drawers.js +9 -3
  45. package/app-layout/utils/use-drawers.js.map +1 -1
  46. package/app-layout/visual-refresh/context.js +28 -11
  47. package/app-layout/visual-refresh/context.js.map +1 -1
  48. package/app-layout/visual-refresh/drawers.js +3 -1
  49. package/app-layout/visual-refresh/drawers.js.map +1 -1
  50. package/app-layout/visual-refresh/index.js +1 -1
  51. package/app-layout/visual-refresh/index.js.map +1 -1
  52. package/app-layout/visual-refresh/layout.js +9 -1
  53. package/app-layout/visual-refresh/layout.js.map +1 -1
  54. package/app-layout/visual-refresh/main.js +4 -1
  55. package/app-layout/visual-refresh/main.js.map +1 -1
  56. package/app-layout/visual-refresh/split-panel.js +1 -1
  57. package/app-layout/visual-refresh/split-panel.js.map +1 -1
  58. package/app-layout/visual-refresh/styles.css.js +86 -86
  59. package/app-layout/visual-refresh/styles.scoped.css +258 -258
  60. package/app-layout/visual-refresh/styles.selectors.js +86 -86
  61. package/app-layout/visual-refresh/trigger-button.js +6 -3
  62. package/app-layout/visual-refresh/trigger-button.js.map +1 -1
  63. package/app-layout/visual-refresh-toolbar/compute-layout.js +5 -2
  64. package/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
  65. package/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js +8 -4
  66. package/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js.map +1 -1
  67. package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js +9 -6
  68. package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js.map +1 -1
  69. package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +7 -3
  70. package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
  71. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +8 -4
  72. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
  73. package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +30 -30
  74. package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +87 -87
  75. package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +30 -30
  76. package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
  77. package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
  78. package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
  79. package/app-layout/visual-refresh-toolbar/skeleton/index.js +10 -10
  80. package/app-layout/visual-refresh-toolbar/skeleton/index.js.map +1 -1
  81. package/app-layout/visual-refresh-toolbar/skeleton/slots.js +5 -2
  82. package/app-layout/visual-refresh-toolbar/skeleton/slots.js.map +1 -1
  83. package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +27 -27
  84. package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +54 -54
  85. package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +27 -27
  86. package/app-layout/visual-refresh-toolbar/split-panel/index.js +2 -2
  87. package/app-layout/visual-refresh-toolbar/split-panel/index.js.map +1 -1
  88. package/app-layout/visual-refresh-toolbar/state/props-merger.js +7 -2
  89. package/app-layout/visual-refresh-toolbar/state/props-merger.js.map +1 -1
  90. package/app-layout/visual-refresh-toolbar/state/use-ai-drawer.js +1 -1
  91. package/app-layout/visual-refresh-toolbar/state/use-ai-drawer.js.map +1 -1
  92. package/app-layout/visual-refresh-toolbar/state/use-app-layout.js +19 -12
  93. package/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -1
  94. package/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.js +5 -2
  95. package/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.js.map +1 -1
  96. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js +10 -6
  97. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js.map +1 -1
  98. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +4 -1
  99. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
  100. package/app-layout/visual-refresh-toolbar/toolbar/index.js +1 -1
  101. package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  102. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js +8 -8
  103. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js.map +1 -1
  104. package/app-layout-toolbar/index.js +24 -21
  105. package/app-layout-toolbar/index.js.map +1 -1
  106. package/area-chart/chart-container.js +1 -1
  107. package/area-chart/chart-container.js.map +1 -1
  108. package/area-chart/elements/chart-popover.js +1 -1
  109. package/area-chart/elements/chart-popover.js.map +1 -1
  110. package/area-chart/elements/threshold-series.js +1 -1
  111. package/area-chart/elements/threshold-series.js.map +1 -1
  112. package/area-chart/index.js +2 -4
  113. package/area-chart/index.js.map +1 -1
  114. package/area-chart/internal.js +2 -4
  115. package/area-chart/internal.js.map +1 -1
  116. package/area-chart/model/interactions-store.js +39 -9
  117. package/area-chart/model/interactions-store.js.map +1 -1
  118. package/attribute-editor/index.js +4 -6
  119. package/attribute-editor/index.js.map +1 -1
  120. package/attribute-editor/internal.js +6 -5
  121. package/attribute-editor/internal.js.map +1 -1
  122. package/attribute-editor/row.js +1 -1
  123. package/attribute-editor/row.js.map +1 -1
  124. package/attribute-editor/styles.css.js +15 -15
  125. package/attribute-editor/styles.scoped.css +28 -28
  126. package/attribute-editor/styles.selectors.js +15 -15
  127. package/autosuggest/autosuggest-option.js +3 -5
  128. package/autosuggest/autosuggest-option.js.map +1 -1
  129. package/autosuggest/internal-do-not-use-core.js +2 -4
  130. package/autosuggest/internal-do-not-use-core.js.map +1 -1
  131. package/autosuggest/internal.js +10 -5
  132. package/autosuggest/internal.js.map +1 -1
  133. package/autosuggest/options-controller.js +15 -8
  134. package/autosuggest/options-controller.js.map +1 -1
  135. package/autosuggest/plain-list.js +3 -3
  136. package/autosuggest/plain-list.js.map +1 -1
  137. package/autosuggest/virtual-list.js +2 -2
  138. package/autosuggest/virtual-list.js.map +1 -1
  139. package/badge/internal-do-not-use-core.js +2 -4
  140. package/badge/internal-do-not-use-core.js.map +1 -1
  141. package/bar-chart/index.js +2 -4
  142. package/bar-chart/index.js.map +1 -1
  143. package/box/internal-do-not-use-core.js +2 -4
  144. package/box/internal-do-not-use-core.js.map +1 -1
  145. package/box/internal.js +2 -4
  146. package/box/internal.js.map +1 -1
  147. package/breadcrumb-group/all-items-dropdown.js +3 -3
  148. package/breadcrumb-group/all-items-dropdown.js.map +1 -1
  149. package/breadcrumb-group/implementation.js +9 -8
  150. package/breadcrumb-group/implementation.js.map +1 -1
  151. package/breadcrumb-group/index.js +3 -5
  152. package/breadcrumb-group/index.js.map +1 -1
  153. package/breadcrumb-group/item/funnel.js +1 -1
  154. package/breadcrumb-group/item/funnel.js.map +1 -1
  155. package/breadcrumb-group/item/item.js +5 -7
  156. package/breadcrumb-group/item/item.js.map +1 -1
  157. package/breadcrumb-group/item/styles.css.js +7 -7
  158. package/breadcrumb-group/item/styles.scoped.css +28 -28
  159. package/breadcrumb-group/item/styles.selectors.js +7 -7
  160. package/button/icon-helper.js +3 -5
  161. package/button/icon-helper.js.map +1 -1
  162. package/button/internal-do-not-use-core.js +2 -4
  163. package/button/internal-do-not-use-core.js.map +1 -1
  164. package/button/internal.js +31 -14
  165. package/button/internal.js.map +1 -1
  166. package/button/style.js +38 -27
  167. package/button/style.js.map +1 -1
  168. package/button/styles.css.js +22 -22
  169. package/button/styles.scoped.css +256 -256
  170. package/button/styles.selectors.js +22 -22
  171. package/button-dropdown/category-elements/expandable-category-element.js +11 -11
  172. package/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  173. package/button-dropdown/category-elements/mobile-expandable-category-element.js +12 -12
  174. package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
  175. package/button-dropdown/internal-do-not-use-core.js +4 -6
  176. package/button-dropdown/internal-do-not-use-core.js.map +1 -1
  177. package/button-dropdown/internal.js +36 -25
  178. package/button-dropdown/internal.js.map +1 -1
  179. package/button-dropdown/item-element/index.js +25 -17
  180. package/button-dropdown/item-element/index.js.map +1 -1
  181. package/button-dropdown/item-element/styles.css.js +16 -16
  182. package/button-dropdown/item-element/styles.scoped.css +27 -27
  183. package/button-dropdown/item-element/styles.selectors.js +16 -16
  184. package/button-dropdown/tooltip.js +1 -1
  185. package/button-dropdown/tooltip.js.map +1 -1
  186. package/button-dropdown/utils/use-button-dropdown.js +1 -2
  187. package/button-dropdown/utils/use-button-dropdown.js.map +1 -1
  188. package/button-group/internal-do-not-use-core.js +2 -4
  189. package/button-group/internal-do-not-use-core.js.map +1 -1
  190. package/button-group/internal.js +2 -4
  191. package/button-group/internal.js.map +1 -1
  192. package/button-group/item-element.js +4 -4
  193. package/button-group/item-element.js.map +1 -1
  194. package/button-group/menu-dropdown-item.js +1 -1
  195. package/button-group/menu-dropdown-item.js.map +1 -1
  196. package/button-group/style.js +34 -20
  197. package/button-group/style.js.map +1 -1
  198. package/calendar/grid/index.js +2 -3
  199. package/calendar/grid/index.js.map +1 -1
  200. package/calendar/index.js +2 -4
  201. package/calendar/index.js.map +1 -1
  202. package/calendar/internal.js +2 -4
  203. package/calendar/internal.js.map +1 -1
  204. package/cards/index.js +17 -19
  205. package/cards/index.js.map +1 -1
  206. package/checkbox/internal-do-not-use-core.js +2 -4
  207. package/checkbox/internal-do-not-use-core.js.map +1 -1
  208. package/checkbox/internal.js +4 -6
  209. package/checkbox/internal.js.map +1 -1
  210. package/checkbox/styles.css.js +3 -3
  211. package/checkbox/styles.scoped.css +11 -11
  212. package/checkbox/styles.selectors.js +3 -3
  213. package/code-editor/index.js +2 -3
  214. package/code-editor/index.js.map +1 -1
  215. package/code-editor/use-editor.js +4 -1
  216. package/code-editor/use-editor.js.map +1 -1
  217. package/code-editor/util.js +4 -1
  218. package/code-editor/util.js.map +1 -1
  219. package/collection-preferences/content-display/index.js +1 -1
  220. package/collection-preferences/content-display/index.js.map +1 -1
  221. package/collection-preferences/content-display/utils.js +1 -1
  222. package/collection-preferences/content-display/utils.js.map +1 -1
  223. package/collection-preferences/index.js +20 -13
  224. package/collection-preferences/index.js.map +1 -1
  225. package/collection-preferences/utils.js +9 -9
  226. package/collection-preferences/utils.js.map +1 -1
  227. package/collection-preferences/visible-content.js +8 -8
  228. package/collection-preferences/visible-content.js.map +1 -1
  229. package/column-layout/index.js +2 -4
  230. package/column-layout/index.js.map +1 -1
  231. package/column-layout/internal.js +2 -4
  232. package/column-layout/internal.js.map +1 -1
  233. package/container/internal-do-not-use-core.js +2 -4
  234. package/container/internal-do-not-use-core.js.map +1 -1
  235. package/container/internal.js +11 -9
  236. package/container/internal.js.map +1 -1
  237. package/container/style.js +11 -2
  238. package/container/style.js.map +1 -1
  239. package/content-layout/index.js +1 -1
  240. package/content-layout/index.js.map +1 -1
  241. package/content-layout/internal.js +3 -5
  242. package/content-layout/internal.js.map +1 -1
  243. package/content-layout/styles.css.js +14 -14
  244. package/content-layout/styles.scoped.css +27 -27
  245. package/content-layout/styles.selectors.js +14 -14
  246. package/copy-to-clipboard/index.js +2 -4
  247. package/copy-to-clipboard/index.js.map +1 -1
  248. package/copy-to-clipboard/internal.js +2 -4
  249. package/copy-to-clipboard/internal.js.map +1 -1
  250. package/date-input/internal-do-not-use-core.js +1 -1
  251. package/date-input/internal-do-not-use-core.js.map +1 -1
  252. package/date-input/internal.js +6 -8
  253. package/date-input/internal.js.map +1 -1
  254. package/date-picker/index.js +9 -6
  255. package/date-picker/index.js.map +1 -1
  256. package/date-range-picker/calendar/grids/grid-cell.js +3 -4
  257. package/date-range-picker/calendar/grids/grid-cell.js.map +1 -1
  258. package/date-range-picker/calendar/grids/grid.js +8 -8
  259. package/date-range-picker/calendar/grids/grid.js.map +1 -1
  260. package/date-range-picker/calendar/grids/index.js +2 -2
  261. package/date-range-picker/calendar/grids/index.js.map +1 -1
  262. package/date-range-picker/calendar/index.js +5 -2
  263. package/date-range-picker/calendar/index.js.map +1 -1
  264. package/date-range-picker/index.js +8 -6
  265. package/date-range-picker/index.js.map +1 -1
  266. package/date-range-picker/utils.js +8 -2
  267. package/date-range-picker/utils.js.map +1 -1
  268. package/drawer/implementation.js +7 -6
  269. package/drawer/implementation.js.map +1 -1
  270. package/drawer/index.js +1 -1
  271. package/drawer/index.js.map +1 -1
  272. package/expandable-section/expandable-section-container.js +3 -5
  273. package/expandable-section/expandable-section-container.js.map +1 -1
  274. package/expandable-section/expandable-section-header.js +8 -8
  275. package/expandable-section/expandable-section-header.js.map +1 -1
  276. package/expandable-section/index.js +2 -4
  277. package/expandable-section/index.js.map +1 -1
  278. package/expandable-section/internal.js +2 -4
  279. package/expandable-section/internal.js.map +1 -1
  280. package/file-dropzone/index.js +1 -1
  281. package/file-dropzone/index.js.map +1 -1
  282. package/file-dropzone/internal.js +3 -5
  283. package/file-dropzone/internal.js.map +1 -1
  284. package/file-input/index.js +2 -4
  285. package/file-input/index.js.map +1 -1
  286. package/file-input/internal.js +11 -8
  287. package/file-input/internal.js.map +1 -1
  288. package/file-token-group/default-formatters.js +3 -3
  289. package/file-token-group/default-formatters.js.map +1 -1
  290. package/file-token-group/index.js +2 -4
  291. package/file-token-group/index.js.map +1 -1
  292. package/file-token-group/internal.js +2 -4
  293. package/file-token-group/internal.js.map +1 -1
  294. package/file-upload/index.js +2 -4
  295. package/file-upload/index.js.map +1 -1
  296. package/file-upload/internal.js +5 -7
  297. package/file-upload/internal.js.map +1 -1
  298. package/flashbar/collapsible-flashbar.js +33 -23
  299. package/flashbar/collapsible-flashbar.js.map +1 -1
  300. package/flashbar/common.js +1 -3
  301. package/flashbar/common.js.map +1 -1
  302. package/flashbar/flash.js +4 -6
  303. package/flashbar/flash.js.map +1 -1
  304. package/flashbar/implementation.js +2 -2
  305. package/flashbar/implementation.js.map +1 -1
  306. package/flashbar/internal-do-not-use-core.js +1 -1
  307. package/flashbar/internal-do-not-use-core.js.map +1 -1
  308. package/flashbar/non-collapsible-flashbar.js +10 -9
  309. package/flashbar/non-collapsible-flashbar.js.map +1 -1
  310. package/flashbar/style.js +50 -32
  311. package/flashbar/style.js.map +1 -1
  312. package/flashbar/styles.css.js +50 -50
  313. package/flashbar/styles.scoped.css +187 -187
  314. package/flashbar/styles.selectors.js +50 -50
  315. package/flashbar/utils.js +2 -2
  316. package/flashbar/utils.js.map +1 -1
  317. package/form/index.js +4 -7
  318. package/form/index.js.map +1 -1
  319. package/form/internal.js +2 -4
  320. package/form/internal.js.map +1 -1
  321. package/form-field/index.js +7 -9
  322. package/form-field/index.js.map +1 -1
  323. package/form-field/internal.js +6 -5
  324. package/form-field/internal.js.map +1 -1
  325. package/grid/index.js +2 -4
  326. package/grid/index.js.map +1 -1
  327. package/grid/internal.js +2 -4
  328. package/grid/internal.js.map +1 -1
  329. package/header/index.js +2 -4
  330. package/header/index.js.map +1 -1
  331. package/header/internal.js +4 -6
  332. package/header/internal.js.map +1 -1
  333. package/help-panel/implementation.js +7 -6
  334. package/help-panel/implementation.js.map +1 -1
  335. package/help-panel/index.js +1 -1
  336. package/help-panel/index.js.map +1 -1
  337. package/help-panel/styles.css.js +6 -6
  338. package/help-panel/styles.scoped.css +73 -73
  339. package/help-panel/styles.selectors.js +6 -6
  340. package/hotspot/index.js +3 -5
  341. package/hotspot/index.js.map +1 -1
  342. package/icon/internal-do-not-use-core.js +2 -4
  343. package/icon/internal-do-not-use-core.js.map +1 -1
  344. package/icon/internal.js +4 -6
  345. package/icon/internal.js.map +1 -1
  346. package/icon-provider/index.js.map +1 -1
  347. package/icon-provider/internal.js +2 -2
  348. package/icon-provider/internal.js.map +1 -1
  349. package/input/internal-do-not-use-core.js +5 -5
  350. package/input/internal-do-not-use-core.js.map +1 -1
  351. package/input/internal.js +10 -12
  352. package/input/internal.js.map +1 -1
  353. package/input/styles.css.js +13 -13
  354. package/input/styles.js +42 -30
  355. package/input/styles.js.map +1 -1
  356. package/input/styles.scoped.css +65 -65
  357. package/input/styles.selectors.js +13 -13
  358. package/internal/analytics/components/analytics-funnel.js +9 -12
  359. package/internal/analytics/components/analytics-funnel.js.map +1 -1
  360. package/internal/analytics/hooks/use-funnel.js +5 -6
  361. package/internal/analytics/hooks/use-funnel.js.map +1 -1
  362. package/internal/animate.js +1 -1
  363. package/internal/animate.js.map +1 -1
  364. package/internal/base-component/index.js +1 -1
  365. package/internal/base-component/index.js.map +1 -1
  366. package/internal/base-component/styles.scoped.css +1 -1
  367. package/internal/components/abstract-switch/index.js +21 -20
  368. package/internal/components/abstract-switch/index.js.map +1 -1
  369. package/internal/components/autosuggest-input/index.js +3 -5
  370. package/internal/components/autosuggest-input/index.js.map +1 -1
  371. package/internal/components/button-trigger/index.js +25 -6
  372. package/internal/components/button-trigger/index.js.map +1 -1
  373. package/internal/components/cartesian-chart/inline-start-labels.js +1 -1
  374. package/internal/components/cartesian-chart/inline-start-labels.js.map +1 -1
  375. package/internal/components/chart-filter/index.js +2 -4
  376. package/internal/components/chart-filter/index.js.map +1 -1
  377. package/internal/components/chart-plot/index.js +2 -2
  378. package/internal/components/chart-plot/index.js.map +1 -1
  379. package/internal/components/chart-popover/index.js +3 -5
  380. package/internal/components/chart-popover/index.js.map +1 -1
  381. package/internal/components/chart-series-details/index.js +2 -4
  382. package/internal/components/chart-series-details/index.js.map +1 -1
  383. package/internal/components/chart-wrapper/index.js +3 -5
  384. package/internal/components/chart-wrapper/index.js.map +1 -1
  385. package/internal/components/checkbox-icon/index.js +5 -7
  386. package/internal/components/checkbox-icon/index.js.map +1 -1
  387. package/internal/components/drag-handle/button.js +5 -5
  388. package/internal/components/drag-handle/button.js.map +1 -1
  389. package/internal/components/drag-handle/hooks/use-drag-handle-interaction-state.js +17 -4
  390. package/internal/components/drag-handle/hooks/use-drag-handle-interaction-state.js.map +1 -1
  391. package/internal/components/drag-handle/index.js +1 -3
  392. package/internal/components/drag-handle/index.js.map +1 -1
  393. package/internal/components/drag-handle-wrapper/styles.css.js +20 -20
  394. package/internal/components/drag-handle-wrapper/styles.scoped.css +48 -48
  395. package/internal/components/drag-handle-wrapper/styles.selectors.js +20 -20
  396. package/internal/components/dropdown/styles.css.js +20 -20
  397. package/internal/components/dropdown/styles.scoped.css +38 -38
  398. package/internal/components/dropdown/styles.selectors.js +20 -20
  399. package/internal/components/masked-input/index.js +12 -8
  400. package/internal/components/masked-input/index.js.map +1 -1
  401. package/internal/components/masked-input/utils/mask-format.js +6 -1
  402. package/internal/components/masked-input/utils/mask-format.js.map +1 -1
  403. package/internal/components/menu-dropdown/index.js +2 -4
  404. package/internal/components/menu-dropdown/index.js.map +1 -1
  405. package/internal/components/option/index.js +6 -8
  406. package/internal/components/option/index.js.map +1 -1
  407. package/internal/components/option/option-parts.js +1 -1
  408. package/internal/components/option/option-parts.js.map +1 -1
  409. package/internal/components/option/utils/flatten-options.js +1 -2
  410. package/internal/components/option/utils/flatten-options.js.map +1 -1
  411. package/internal/components/options-list/index.js +2 -4
  412. package/internal/components/options-list/index.js.map +1 -1
  413. package/internal/components/screenreader-only/index.js +1 -1
  414. package/internal/components/screenreader-only/index.js.map +1 -1
  415. package/internal/components/selectable-item/analytics-metadata/utils.js +1 -3
  416. package/internal/components/selectable-item/analytics-metadata/utils.js.map +1 -1
  417. package/internal/components/selectable-item/index.js +5 -7
  418. package/internal/components/selectable-item/index.js.map +1 -1
  419. package/internal/components/sortable-area/index.js +19 -6
  420. package/internal/components/sortable-area/index.js.map +1 -1
  421. package/internal/components/token-list/styles.css.js +10 -10
  422. package/internal/components/token-list/styles.scoped.css +25 -25
  423. package/internal/components/token-list/styles.selectors.js +10 -10
  424. package/internal/components/token-list/token-limit-toggle.js +1 -1
  425. package/internal/components/token-list/token-limit-toggle.js.map +1 -1
  426. package/internal/components/tooltip/index.js +1 -1
  427. package/internal/components/tooltip/index.js.map +1 -1
  428. package/internal/components/transition/index.js +3 -5
  429. package/internal/components/transition/index.js.map +1 -1
  430. package/internal/environment.js +2 -2
  431. package/internal/environment.json +2 -2
  432. package/internal/generated/custom-css-properties/index.d.ts +24 -0
  433. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  434. package/internal/generated/custom-css-properties/index.js +126 -102
  435. package/internal/generated/custom-css-properties/index.js.map +1 -1
  436. package/internal/hooks/use-intersection-observer/index.js +1 -1
  437. package/internal/hooks/use-intersection-observer/index.js.map +1 -1
  438. package/internal/hooks/use-performance-marks/index.js +12 -2
  439. package/internal/hooks/use-performance-marks/index.js.map +1 -1
  440. package/internal/hooks/use-virtual/index.js +5 -2
  441. package/internal/hooks/use-virtual/index.js.map +1 -1
  442. package/internal/manifest.json +1 -1
  443. package/internal/plugins/controllers/drawers.js +4 -6
  444. package/internal/plugins/controllers/drawers.js.map +1 -1
  445. package/internal/plugins/helpers/use-global-breadcrumbs.js +4 -6
  446. package/internal/plugins/helpers/use-global-breadcrumbs.js.map +1 -1
  447. package/internal/plugins/widget/index.js +1 -1
  448. package/internal/plugins/widget/index.js.map +1 -1
  449. package/internal/utils/with-native-attributes.js +4 -6
  450. package/internal/utils/with-native-attributes.js.map +1 -1
  451. package/internal/widgets/index.js +2 -2
  452. package/internal/widgets/index.js.map +1 -1
  453. package/internal/widgets/loader-mock.js +2 -2
  454. package/internal/widgets/loader-mock.js.map +1 -1
  455. package/key-value-pairs/index.js +2 -4
  456. package/key-value-pairs/index.js.map +1 -1
  457. package/key-value-pairs/internal.js +4 -6
  458. package/key-value-pairs/internal.js.map +1 -1
  459. package/line-chart/index.js +2 -4
  460. package/line-chart/index.js.map +1 -1
  461. package/link/internal-do-not-use-core.js +2 -4
  462. package/link/internal-do-not-use-core.js.map +1 -1
  463. package/link/internal.js +13 -6
  464. package/link/internal.js.map +1 -1
  465. package/link/style.js +12 -9
  466. package/link/style.js.map +1 -1
  467. package/link/styles.css.js +20 -20
  468. package/link/styles.scoped.css +103 -103
  469. package/link/styles.selectors.js +20 -20
  470. package/list/index.js +1 -1
  471. package/list/index.js.map +1 -1
  472. package/list/internal.js +6 -8
  473. package/list/internal.js.map +1 -1
  474. package/live-region/index.js +2 -4
  475. package/live-region/index.js.map +1 -1
  476. package/live-region/internal.js +2 -4
  477. package/live-region/internal.js.map +1 -1
  478. package/mixed-line-bar-chart/bar-series.js +3 -3
  479. package/mixed-line-bar-chart/bar-series.js.map +1 -1
  480. package/mixed-line-bar-chart/chart-container.js +7 -9
  481. package/mixed-line-bar-chart/chart-container.js.map +1 -1
  482. package/mixed-line-bar-chart/chart-popover.js +4 -1
  483. package/mixed-line-bar-chart/chart-popover.js.map +1 -1
  484. package/mixed-line-bar-chart/hooks/use-navigation.js +1 -1
  485. package/mixed-line-bar-chart/hooks/use-navigation.js.map +1 -1
  486. package/mixed-line-bar-chart/index.js +2 -4
  487. package/mixed-line-bar-chart/index.js.map +1 -1
  488. package/mixed-line-bar-chart/internal.js +2 -4
  489. package/mixed-line-bar-chart/internal.js.map +1 -1
  490. package/mixed-line-bar-chart/line-series.js +3 -3
  491. package/mixed-line-bar-chart/line-series.js.map +1 -1
  492. package/modal/index.js +5 -8
  493. package/modal/index.js.map +1 -1
  494. package/modal/internal.js +11 -14
  495. package/modal/internal.js.map +1 -1
  496. package/multiselect/embedded.js +15 -6
  497. package/multiselect/embedded.js.map +1 -1
  498. package/multiselect/index.js +2 -4
  499. package/multiselect/index.js.map +1 -1
  500. package/multiselect/internal.js +13 -12
  501. package/multiselect/internal.js.map +1 -1
  502. package/multiselect/use-multiselect.js +9 -5
  503. package/multiselect/use-multiselect.js.map +1 -1
  504. package/navigable-group/index.js +2 -4
  505. package/navigable-group/index.js.map +1 -1
  506. package/navigable-group/internal.js +2 -4
  507. package/navigable-group/internal.js.map +1 -1
  508. package/package.json +1 -1
  509. package/pagination/index.js +10 -10
  510. package/pagination/index.js.map +1 -1
  511. package/pagination/internal.js +36 -40
  512. package/pagination/internal.js.map +1 -1
  513. package/pie-chart/index.js +4 -6
  514. package/pie-chart/index.js.map +1 -1
  515. package/pie-chart/labels.js +2 -2
  516. package/pie-chart/labels.js.map +1 -1
  517. package/pie-chart/segments.js +1 -1
  518. package/pie-chart/segments.js.map +1 -1
  519. package/pie-chart/utils.js +17 -5
  520. package/pie-chart/utils.js.map +1 -1
  521. package/popover/body.js +3 -3
  522. package/popover/body.js.map +1 -1
  523. package/popover/container.js +1 -1
  524. package/popover/container.js.map +1 -1
  525. package/popover/index.js +2 -4
  526. package/popover/index.js.map +1 -1
  527. package/popover/internal.js +4 -6
  528. package/popover/internal.js.map +1 -1
  529. package/progress-bar/internal-do-not-use-core.js +2 -4
  530. package/progress-bar/internal-do-not-use-core.js.map +1 -1
  531. package/progress-bar/internal.js +4 -1
  532. package/progress-bar/internal.js.map +1 -1
  533. package/progress-bar/styles.css.js +19 -19
  534. package/progress-bar/styles.scoped.css +56 -56
  535. package/progress-bar/styles.selectors.js +19 -19
  536. package/prompt-input/index.js +1 -1
  537. package/prompt-input/interfaces.d.ts +48 -0
  538. package/prompt-input/interfaces.d.ts.map +1 -1
  539. package/prompt-input/interfaces.js.map +1 -1
  540. package/prompt-input/internal-do-not-use-core.js +2 -4
  541. package/prompt-input/internal-do-not-use-core.js.map +1 -1
  542. package/prompt-input/internal.d.ts.map +1 -1
  543. package/prompt-input/internal.js +5 -6
  544. package/prompt-input/internal.js.map +1 -1
  545. package/prompt-input/styles.css.js +17 -17
  546. package/prompt-input/styles.d.ts +4 -0
  547. package/prompt-input/styles.d.ts.map +1 -0
  548. package/prompt-input/styles.js +44 -0
  549. package/prompt-input/styles.js.map +1 -0
  550. package/prompt-input/styles.scoped.css +73 -61
  551. package/prompt-input/styles.selectors.js +17 -17
  552. package/property-filter/controller.js +6 -6
  553. package/property-filter/controller.js.map +1 -1
  554. package/property-filter/filter-options.js +1 -1
  555. package/property-filter/filter-options.js.map +1 -1
  556. package/property-filter/filtering-token/index.js +11 -14
  557. package/property-filter/filtering-token/index.js.map +1 -1
  558. package/property-filter/i18n-utils.js +48 -11
  559. package/property-filter/i18n-utils.js.map +1 -1
  560. package/property-filter/index.js +4 -6
  561. package/property-filter/index.js.map +1 -1
  562. package/property-filter/internal.js +15 -13
  563. package/property-filter/internal.js.map +1 -1
  564. package/property-filter/property-editor.js +1 -1
  565. package/property-filter/property-editor.js.map +1 -1
  566. package/property-filter/property-filter-autosuggest.js +8 -4
  567. package/property-filter/property-filter-autosuggest.js.map +1 -1
  568. package/property-filter/token-editor-inputs.js +10 -9
  569. package/property-filter/token-editor-inputs.js.map +1 -1
  570. package/property-filter/token-editor.js +10 -10
  571. package/property-filter/token-editor.js.map +1 -1
  572. package/property-filter/token.js +8 -8
  573. package/property-filter/token.js.map +1 -1
  574. package/property-filter/use-load-items.js +6 -1
  575. package/property-filter/use-load-items.js.map +1 -1
  576. package/radio-group/internal-do-not-use-core.js +9 -9
  577. package/radio-group/internal-do-not-use-core.js.map +1 -1
  578. package/radio-group/internal.js +10 -12
  579. package/radio-group/internal.js.map +1 -1
  580. package/radio-group/radio-button.js +4 -6
  581. package/radio-group/radio-button.js.map +1 -1
  582. package/radio-group/styles.css.js +10 -10
  583. package/radio-group/styles.scoped.css +22 -22
  584. package/radio-group/styles.selectors.js +10 -10
  585. package/s3-resource-selector/index.js +3 -5
  586. package/s3-resource-selector/index.js.map +1 -1
  587. package/s3-resource-selector/s3-in-context/index.js +1 -1
  588. package/s3-resource-selector/s3-in-context/index.js.map +1 -1
  589. package/s3-resource-selector/s3-in-context/search-input.js +1 -1
  590. package/s3-resource-selector/s3-in-context/search-input.js.map +1 -1
  591. package/s3-resource-selector/s3-modal/basic-table.js +4 -7
  592. package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
  593. package/s3-resource-selector/s3-modal/buckets-table.js +13 -1
  594. package/s3-resource-selector/s3-modal/buckets-table.js.map +1 -1
  595. package/s3-resource-selector/s3-modal/index.js +4 -1
  596. package/s3-resource-selector/s3-modal/index.js.map +1 -1
  597. package/s3-resource-selector/s3-modal/objects-table.js +14 -2
  598. package/s3-resource-selector/s3-modal/objects-table.js.map +1 -1
  599. package/s3-resource-selector/s3-modal/versions-table.js +13 -1
  600. package/s3-resource-selector/s3-modal/versions-table.js.map +1 -1
  601. package/segmented-control/index.js +1 -1
  602. package/segmented-control/index.js.map +1 -1
  603. package/segmented-control/internal.js +6 -8
  604. package/segmented-control/internal.js.map +1 -1
  605. package/segmented-control/segment.js +1 -1
  606. package/segmented-control/segment.js.map +1 -1
  607. package/select/index.js +2 -4
  608. package/select/index.js.map +1 -1
  609. package/select/internal.js +13 -10
  610. package/select/internal.js.map +1 -1
  611. package/select/parts/filter.js +9 -4
  612. package/select/parts/filter.js.map +1 -1
  613. package/select/parts/item.js +3 -5
  614. package/select/parts/item.js.map +1 -1
  615. package/select/parts/multiselect-item.js +3 -5
  616. package/select/parts/multiselect-item.js.map +1 -1
  617. package/select/parts/plain-list.js +1 -1
  618. package/select/parts/plain-list.js.map +1 -1
  619. package/select/parts/trigger.js +2 -2
  620. package/select/parts/trigger.js.map +1 -1
  621. package/select/parts/virtual-list.js +3 -3
  622. package/select/parts/virtual-list.js.map +1 -1
  623. package/select/utils/get-item-props.js +7 -1
  624. package/select/utils/get-item-props.js.map +1 -1
  625. package/select/utils/render-options.js +1 -1
  626. package/select/utils/render-options.js.map +1 -1
  627. package/side-navigation/implementation.js +2 -4
  628. package/side-navigation/implementation.js.map +1 -1
  629. package/side-navigation/index.js +2 -4
  630. package/side-navigation/index.js.map +1 -1
  631. package/side-navigation/parts.js +4 -4
  632. package/side-navigation/parts.js.map +1 -1
  633. package/slider/index.js +2 -4
  634. package/slider/index.js.map +1 -1
  635. package/slider/internal.js +2 -4
  636. package/slider/internal.js.map +1 -1
  637. package/slider/styles.css.js +26 -26
  638. package/slider/styles.scoped.css +86 -86
  639. package/slider/styles.selectors.js +26 -26
  640. package/slider/tick-marks.js +3 -3
  641. package/slider/tick-marks.js.map +1 -1
  642. package/space-between/internal-do-not-use-core.js +2 -4
  643. package/space-between/internal-do-not-use-core.js.map +1 -1
  644. package/space-between/internal.js +2 -4
  645. package/space-between/internal.js.map +1 -1
  646. package/spinner/internal-do-not-use-core.js +2 -4
  647. package/spinner/internal-do-not-use-core.js.map +1 -1
  648. package/spinner/internal.js +2 -4
  649. package/spinner/internal.js.map +1 -1
  650. package/spinner/styles.css.js +13 -13
  651. package/spinner/styles.scoped.css +39 -39
  652. package/spinner/styles.selectors.js +13 -13
  653. package/split-panel/bottom.js +2 -2
  654. package/split-panel/bottom.js.map +1 -1
  655. package/split-panel/implementation.js +2 -4
  656. package/split-panel/implementation.js.map +1 -1
  657. package/split-panel/index.js +16 -4
  658. package/split-panel/index.js.map +1 -1
  659. package/split-panel/side.js +6 -2
  660. package/split-panel/side.js.map +1 -1
  661. package/status-indicator/internal-do-not-use-core.js +2 -4
  662. package/status-indicator/internal-do-not-use-core.js.map +1 -1
  663. package/status-indicator/internal.js +3 -5
  664. package/status-indicator/internal.js.map +1 -1
  665. package/steps/internal-do-not-use-core.js +2 -4
  666. package/steps/internal-do-not-use-core.js.map +1 -1
  667. package/steps/internal.js +2 -4
  668. package/steps/internal.js.map +1 -1
  669. package/table/body-cell/disabled-inline-editor.js +4 -6
  670. package/table/body-cell/disabled-inline-editor.js.map +1 -1
  671. package/table/body-cell/index.js +9 -11
  672. package/table/body-cell/index.js.map +1 -1
  673. package/table/body-cell/inline-editor.js +18 -21
  674. package/table/body-cell/inline-editor.js.map +1 -1
  675. package/table/body-cell/td-element.js +3 -5
  676. package/table/body-cell/td-element.js.map +1 -1
  677. package/table/expandable-rows/expandable-rows-utils.js +1 -1
  678. package/table/expandable-rows/expandable-rows-utils.js.map +1 -1
  679. package/table/header-cell/index.js +20 -20
  680. package/table/header-cell/index.js.map +1 -1
  681. package/table/header-cell/th-element.js +3 -5
  682. package/table/header-cell/th-element.js.map +1 -1
  683. package/table/index.js +14 -10
  684. package/table/index.js.map +1 -1
  685. package/table/internal.js +47 -34
  686. package/table/internal.js.map +1 -1
  687. package/table/progressive-loading/loader-cell.js +2 -4
  688. package/table/progressive-loading/loader-cell.js.map +1 -1
  689. package/table/selection/selection-cell.js +8 -11
  690. package/table/selection/selection-cell.js.map +1 -1
  691. package/table/selection/selection-control.js +10 -12
  692. package/table/selection/selection-control.js.map +1 -1
  693. package/table/sticky-columns/use-sticky-columns.js +1 -1
  694. package/table/sticky-columns/use-sticky-columns.js.map +1 -1
  695. package/table/sticky-header.js +2 -2
  696. package/table/sticky-header.js.map +1 -1
  697. package/table/thead.js +5 -5
  698. package/table/thead.js.map +1 -1
  699. package/table/use-cell-editing.js +3 -4
  700. package/table/use-cell-editing.js.map +1 -1
  701. package/table/utils.js +1 -1
  702. package/table/utils.js.map +1 -1
  703. package/tabs/index.js +6 -8
  704. package/tabs/index.js.map +1 -1
  705. package/tabs/tab-header-bar.js +12 -5
  706. package/tabs/tab-header-bar.js.map +1 -1
  707. package/tag-editor/index.js +7 -9
  708. package/tag-editor/index.js.map +1 -1
  709. package/tag-editor/styles.css.js +3 -3
  710. package/tag-editor/styles.scoped.css +13 -13
  711. package/tag-editor/styles.selectors.js +3 -3
  712. package/text-content/index.js +2 -4
  713. package/text-content/index.js.map +1 -1
  714. package/text-content/styles.css.js +1 -1
  715. package/text-content/styles.scoped.css +66 -66
  716. package/text-content/styles.selectors.js +1 -1
  717. package/text-filter/index.js +1 -1
  718. package/text-filter/index.js.map +1 -1
  719. package/text-filter/internal.js +2 -4
  720. package/text-filter/internal.js.map +1 -1
  721. package/textarea/internal-do-not-use-core.js +3 -5
  722. package/textarea/internal-do-not-use-core.js.map +1 -1
  723. package/textarea/styles.css.js +5 -5
  724. package/textarea/styles.js +42 -30
  725. package/textarea/styles.js.map +1 -1
  726. package/textarea/styles.scoped.css +41 -41
  727. package/textarea/styles.selectors.js +5 -5
  728. package/tiles/index.js +3 -3
  729. package/tiles/index.js.map +1 -1
  730. package/tiles/internal.js +12 -14
  731. package/tiles/internal.js.map +1 -1
  732. package/tiles/tile.js +3 -5
  733. package/tiles/tile.js.map +1 -1
  734. package/time-input/internal-do-not-use-core.js +2 -4
  735. package/time-input/internal-do-not-use-core.js.map +1 -1
  736. package/time-input/internal.js +2 -4
  737. package/time-input/internal.js.map +1 -1
  738. package/toggle/internal-do-not-use-core.js +1 -1
  739. package/toggle/internal-do-not-use-core.js.map +1 -1
  740. package/toggle/internal.js +5 -7
  741. package/toggle/internal.js.map +1 -1
  742. package/toggle/styles.css.js +10 -10
  743. package/toggle/styles.scoped.css +23 -23
  744. package/toggle/styles.selectors.js +10 -10
  745. package/toggle-button/internal-do-not-use-core.js +2 -4
  746. package/toggle-button/internal-do-not-use-core.js.map +1 -1
  747. package/toggle-button/internal.js +3 -5
  748. package/toggle-button/internal.js.map +1 -1
  749. package/token/dismiss-button.js +2 -2
  750. package/token/dismiss-button.js.map +1 -1
  751. package/token/index.js +1 -1
  752. package/token/index.js.map +1 -1
  753. package/token/internal.js +20 -14
  754. package/token/internal.js.map +1 -1
  755. package/token-group/index.js +2 -4
  756. package/token-group/index.js.map +1 -1
  757. package/token-group/internal.js +6 -8
  758. package/token-group/internal.js.map +1 -1
  759. package/top-navigation/index.js +2 -4
  760. package/top-navigation/index.js.map +1 -1
  761. package/top-navigation/internal.js +2 -4
  762. package/top-navigation/internal.js.map +1 -1
  763. package/top-navigation/parts/overflow-menu/menu-item.js +7 -11
  764. package/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
  765. package/top-navigation/parts/overflow-menu/views/submenu.js +2 -2
  766. package/top-navigation/parts/overflow-menu/views/submenu.js.map +1 -1
  767. package/top-navigation/parts/overflow-menu/views/utilities.js +1 -1
  768. package/top-navigation/parts/overflow-menu/views/utilities.js.map +1 -1
  769. package/top-navigation/parts/utility.js +1 -1
  770. package/top-navigation/parts/utility.js.map +1 -1
  771. package/tree-view/index.js +1 -1
  772. package/tree-view/index.js.map +1 -1
  773. package/tree-view/internal.js +2 -4
  774. package/tree-view/internal.js.map +1 -1
  775. package/tutorial-panel/components/tutorial-detail-view/task-list.js +1 -1
  776. package/tutorial-panel/components/tutorial-detail-view/task-list.js.map +1 -1
  777. package/tutorial-panel/index.js +2 -4
  778. package/tutorial-panel/index.js.map +1 -1
  779. package/wizard/internal-do-not-use-core.js +2 -4
  780. package/wizard/internal-do-not-use-core.js.map +1 -1
  781. package/wizard/internal.js +23 -10
  782. package/wizard/internal.js.map +1 -1
  783. package/wizard/wizard-actions.js +3 -3
  784. package/wizard/wizard-actions.js.map +1 -1
  785. package/wizard/wizard-form.js +2 -2
  786. package/wizard/wizard-form.js.map +1 -1
  787. package/wizard/wizard-navigation.js +7 -7
  788. package/wizard/wizard-navigation.js.map +1 -1
@@ -142,11 +142,11 @@
142
142
  */
143
143
  /* Style used for links in slots/components that are text heavy, to help links stand out among
144
144
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
145
- .awsui_root_2rhyz_ihpvc_145:not(#\9) {
145
+ .awsui_root_2rhyz_qs0t8_145:not(#\9) {
146
146
  /* used in test-utils for component to distinguish input from other input-like components, for example autosuggest */
147
147
  }
148
148
 
149
- .awsui_input_2rhyz_ihpvc_149:not(#\9) {
149
+ .awsui_input_2rhyz_qs0t8_149:not(#\9) {
150
150
  border-collapse: separate;
151
151
  border-spacing: 0;
152
152
  box-sizing: border-box;
@@ -178,158 +178,158 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
178
178
  -moz-osx-font-smoothing: auto;
179
179
  padding-block: var(--space-scaled-xxs-pfm1nx, 4px);
180
180
  padding-inline: var(--space-field-horizontal-0aq2ch, 12px);
181
- color: var(--awsui-style-color-default-9t5olz, var(--color-text-body-default-vvtq8u, #0f141a));
181
+ color: var(--awsui-style-color-default-d43v8n, var(--color-text-body-default-vvtq8u, #0f141a));
182
182
  inline-size: 100%;
183
183
  cursor: text;
184
184
  box-sizing: border-box;
185
- background-color: var(--awsui-style-background-default-9t5olz, var(--color-background-input-default-ifz5bb, #ffffff));
185
+ background-color: var(--awsui-style-background-default-d43v8n, var(--color-background-input-default-ifz5bb, #ffffff));
186
186
  border-start-start-radius: var(--border-radius-input-7q0str, 8px);
187
187
  border-start-end-radius: var(--border-radius-input-7q0str, 8px);
188
188
  border-end-start-radius: var(--border-radius-input-7q0str, 8px);
189
189
  border-end-end-radius: var(--border-radius-input-7q0str, 8px);
190
- border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-default-9t5olz, var(--color-border-input-default-317xk5, #8c8c94));
191
- border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-default-9t5olz, var(--color-border-input-default-317xk5, #8c8c94));
192
- box-shadow: var(--awsui-style-box-shadow-default-9t5olz);
190
+ border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-default-d43v8n, var(--color-border-input-default-317xk5, #8c8c94));
191
+ border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-default-d43v8n, var(--color-border-input-default-317xk5, #8c8c94));
192
+ box-shadow: var(--awsui-style-box-shadow-default-d43v8n);
193
193
  font-size: var(--font-size-body-m-a7nh2n, 14px);
194
194
  line-height: var(--line-height-body-m-2mh3ke, 20px);
195
195
  block-size: var(--size-vertical-input-p1d7xx, 32px);
196
196
  }
197
- .awsui_input_2rhyz_ihpvc_149:not(#\9):hover {
198
- border-color: var(--awsui-style-border-color-hover-9t5olz, var(--awsui-style-border-color-default-9t5olz, var(--color-border-input-default-317xk5, #8c8c94)));
199
- color: var(--awsui-style-color-hover-9t5olz, var(--awsui-style-border-color-default-9t5olz, var(--color-text-body-default-vvtq8u, #0f141a)));
200
- background-color: var(--awsui-style-background-hover-9t5olz, var(--awsui-style-background-default-9t5olz, var(--color-background-input-default-ifz5bb, #ffffff)));
201
- box-shadow: var(--awsui-style-box-shadow-hover-9t5olz, --awsui-style-box-shadow-default-9t5olz);
197
+ .awsui_input_2rhyz_qs0t8_149:not(#\9):hover {
198
+ border-color: var(--awsui-style-border-color-hover-d43v8n, var(--awsui-style-border-color-default-d43v8n, var(--color-border-input-default-317xk5, #8c8c94)));
199
+ color: var(--awsui-style-color-hover-d43v8n, var(--awsui-style-border-color-default-d43v8n, var(--color-text-body-default-vvtq8u, #0f141a)));
200
+ background-color: var(--awsui-style-background-hover-d43v8n, var(--awsui-style-background-default-d43v8n, var(--color-background-input-default-ifz5bb, #ffffff)));
201
+ box-shadow: var(--awsui-style-box-shadow-hover-d43v8n, --awsui-style-box-shadow-default-d43v8n);
202
202
  }
203
- .awsui_input_2rhyz_ihpvc_149.awsui_input-readonly_2rhyz_ihpvc_203:not(#\9) {
204
- background-color: var(--awsui-style-background-readonly-9t5olz, var(--awsui-style-background-default-9t5olz, var(--color-background-input-default-ifz5bb, #ffffff)));
205
- border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-readonly-9t5olz, var(--awsui-style-border-color-default-9t5olz, var(--color-border-input-disabled-zgnzvk, #ebebf0)));
206
- border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-readonly-9t5olz, var(--awsui-style-border-color-default-9t5olz, var(--color-border-input-disabled-zgnzvk, #ebebf0)));
207
- color: var(--awsui-style-color-readonly-9t5olz, var(--awsui-style-color-default-9t5olz, var(--color-text-body-default-vvtq8u, #0f141a)));
208
- box-shadow: var(--awsui-style-box-shadow-readonly-9t5olz);
203
+ .awsui_input_2rhyz_qs0t8_149.awsui_input-readonly_2rhyz_qs0t8_203:not(#\9) {
204
+ background-color: var(--awsui-style-background-readonly-d43v8n, var(--awsui-style-background-default-d43v8n, var(--color-background-input-default-ifz5bb, #ffffff)));
205
+ border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-readonly-d43v8n, var(--awsui-style-border-color-default-d43v8n, var(--color-border-input-disabled-zgnzvk, #ebebf0)));
206
+ border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-readonly-d43v8n, var(--awsui-style-border-color-default-d43v8n, var(--color-border-input-disabled-zgnzvk, #ebebf0)));
207
+ color: var(--awsui-style-color-readonly-d43v8n, var(--awsui-style-color-default-d43v8n, var(--color-text-body-default-vvtq8u, #0f141a)));
208
+ box-shadow: var(--awsui-style-box-shadow-readonly-d43v8n);
209
209
  }
210
- .awsui_input_2rhyz_ihpvc_149:not(#\9)::-webkit-input-placeholder {
211
- color: var(--awsui-style-placeholder-color-9t5olz, var(--color-text-input-placeholder-dclg8u, #656871));
212
- font-size: var(--awsui-style-placeholder-font-size-9t5olz);
213
- font-style: var(--awsui-style-placeholder-font-style-9t5olz, italic);
214
- font-weight: var(--awsui-style-placeholder-font-weight-9t5olz);
210
+ .awsui_input_2rhyz_qs0t8_149:not(#\9)::-webkit-input-placeholder {
211
+ color: var(--awsui-style-placeholder-color-d43v8n, var(--color-text-input-placeholder-dclg8u, #656871));
212
+ font-size: var(--awsui-style-placeholder-font-size-d43v8n);
213
+ font-style: var(--awsui-style-placeholder-font-style-d43v8n, italic);
214
+ font-weight: var(--awsui-style-placeholder-font-weight-d43v8n);
215
215
  -webkit-user-select: none;
216
216
  user-select: none;
217
217
  }
218
- .awsui_input_2rhyz_ihpvc_149:not(#\9)::-moz-placeholder {
219
- color: var(--awsui-style-placeholder-color-9t5olz, var(--color-text-input-placeholder-dclg8u, #656871));
220
- font-size: var(--awsui-style-placeholder-font-size-9t5olz);
221
- font-style: var(--awsui-style-placeholder-font-style-9t5olz, italic);
222
- font-weight: var(--awsui-style-placeholder-font-weight-9t5olz);
218
+ .awsui_input_2rhyz_qs0t8_149:not(#\9)::-moz-placeholder {
219
+ color: var(--awsui-style-placeholder-color-d43v8n, var(--color-text-input-placeholder-dclg8u, #656871));
220
+ font-size: var(--awsui-style-placeholder-font-size-d43v8n);
221
+ font-style: var(--awsui-style-placeholder-font-style-d43v8n, italic);
222
+ font-weight: var(--awsui-style-placeholder-font-weight-d43v8n);
223
223
  opacity: 1;
224
224
  }
225
- .awsui_input_2rhyz_ihpvc_149:not(#\9):-moz-placeholder {
226
- color: var(--awsui-style-placeholder-color-9t5olz, var(--color-text-input-placeholder-dclg8u, #656871));
227
- font-size: var(--awsui-style-placeholder-font-size-9t5olz);
228
- font-style: var(--awsui-style-placeholder-font-style-9t5olz, italic);
229
- font-weight: var(--awsui-style-placeholder-font-weight-9t5olz);
225
+ .awsui_input_2rhyz_qs0t8_149:not(#\9):-moz-placeholder {
226
+ color: var(--awsui-style-placeholder-color-d43v8n, var(--color-text-input-placeholder-dclg8u, #656871));
227
+ font-size: var(--awsui-style-placeholder-font-size-d43v8n);
228
+ font-style: var(--awsui-style-placeholder-font-style-d43v8n, italic);
229
+ font-weight: var(--awsui-style-placeholder-font-weight-d43v8n);
230
230
  opacity: 1;
231
231
  }
232
- .awsui_input_2rhyz_ihpvc_149:not(#\9):focus {
232
+ .awsui_input_2rhyz_qs0t8_149:not(#\9):focus {
233
233
  outline: 2px dotted transparent;
234
- border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-focus-9t5olz, var(--color-border-input-focused-4z0pgn, #006ce0));
235
- border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-focus-9t5olz, var(--color-border-input-focused-4z0pgn, #006ce0));
234
+ border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-focus-d43v8n, var(--color-border-input-focused-4z0pgn, #006ce0));
235
+ border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-focus-d43v8n, var(--color-border-input-focused-4z0pgn, #006ce0));
236
236
  border-start-start-radius: var(--border-radius-input-7q0str, 8px);
237
237
  border-start-end-radius: var(--border-radius-input-7q0str, 8px);
238
238
  border-end-start-radius: var(--border-radius-input-7q0str, 8px);
239
239
  border-end-end-radius: var(--border-radius-input-7q0str, 8px);
240
- box-shadow: var(--awsui-style-box-shadow-focus-9t5olz, 0 0 0 var(--border-control-focus-ring-shadow-spread-9mjajk, 1px) var(--color-border-item-focused-uk47pl, #006ce0));
241
- color: var(--awsui-style-color-focus-9t5olz, var(--color-text-body-default-vvtq8u, #0f141a));
242
- background-color: var(--awsui-style-background-focus-9t5olz, var(--color-background-input-default-ifz5bb, #ffffff));
240
+ box-shadow: var(--awsui-style-box-shadow-focus-d43v8n, 0 0 0 var(--border-control-focus-ring-shadow-spread-9mjajk, 1px) var(--color-border-item-focused-uk47pl, #006ce0));
241
+ color: var(--awsui-style-color-focus-d43v8n, var(--color-text-body-default-vvtq8u, #0f141a));
242
+ background-color: var(--awsui-style-background-focus-d43v8n, var(--color-background-input-default-ifz5bb, #ffffff));
243
243
  }
244
- .awsui_input_2rhyz_ihpvc_149:not(#\9):disabled {
245
- background-color: var(--awsui-style-background-disabled-9t5olz, var(--color-background-input-disabled-dihaja, #ebebf0));
246
- border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-disabled-9t5olz, var(--color-border-input-disabled-zgnzvk, #ebebf0));
247
- border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-disabled-9t5olz, var(--color-border-input-disabled-zgnzvk, #ebebf0));
248
- color: var(--awsui-style-color-disabled-9t5olz, var(--color-text-input-disabled-wh1f3y, #b4b4bb));
244
+ .awsui_input_2rhyz_qs0t8_149:not(#\9):disabled {
245
+ background-color: var(--awsui-style-background-disabled-d43v8n, var(--color-background-input-disabled-dihaja, #ebebf0));
246
+ border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-disabled-d43v8n, var(--color-border-input-disabled-zgnzvk, #ebebf0));
247
+ border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-disabled-d43v8n, var(--color-border-input-disabled-zgnzvk, #ebebf0));
248
+ color: var(--awsui-style-color-disabled-d43v8n, var(--color-text-input-disabled-wh1f3y, #b4b4bb));
249
249
  cursor: default;
250
- box-shadow: var(--awsui-style-box-shadow-disabled-9t5olz);
250
+ box-shadow: var(--awsui-style-box-shadow-disabled-d43v8n);
251
251
  }
252
- .awsui_input_2rhyz_ihpvc_149:not(#\9):disabled::-webkit-input-placeholder {
252
+ .awsui_input_2rhyz_qs0t8_149:not(#\9):disabled::-webkit-input-placeholder {
253
253
  color: var(--color-text-input-placeholder-disabled-wg87og, #b4b4bb);
254
254
  -webkit-user-select: none;
255
255
  user-select: none;
256
256
  }
257
- .awsui_input_2rhyz_ihpvc_149:not(#\9):disabled::-moz-placeholder {
257
+ .awsui_input_2rhyz_qs0t8_149:not(#\9):disabled::-moz-placeholder {
258
258
  color: var(--color-text-input-placeholder-disabled-wg87og, #b4b4bb);
259
259
  opacity: 1;
260
260
  }
261
- .awsui_input_2rhyz_ihpvc_149:not(#\9):disabled:-moz-placeholder {
261
+ .awsui_input_2rhyz_qs0t8_149:not(#\9):disabled:-moz-placeholder {
262
262
  color: var(--color-text-input-placeholder-disabled-wg87og, #b4b4bb);
263
263
  opacity: 1;
264
264
  }
265
- .awsui_input_2rhyz_ihpvc_149:not(#\9):invalid {
265
+ .awsui_input_2rhyz_qs0t8_149:not(#\9):invalid {
266
266
  box-shadow: none;
267
267
  }
268
- .awsui_input_2rhyz_ihpvc_149.awsui_input-invalid_2rhyz_ihpvc_266:not(#\9) {
268
+ .awsui_input_2rhyz_qs0t8_149.awsui_input-invalid_2rhyz_qs0t8_266:not(#\9) {
269
269
  color: var(--color-text-status-error-ksqavh, #db0000);
270
270
  border-color: var(--color-text-status-error-ksqavh, #db0000);
271
271
  padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
272
272
  border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
273
273
  }
274
- .awsui_input_2rhyz_ihpvc_149.awsui_input-invalid_2rhyz_ihpvc_266:not(#\9):focus {
274
+ .awsui_input_2rhyz_qs0t8_149.awsui_input-invalid_2rhyz_qs0t8_266:not(#\9):focus {
275
275
  box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
276
276
  }
277
- .awsui_input_2rhyz_ihpvc_149.awsui_input-invalid_2rhyz_ihpvc_266.awsui_input-has-icon-left_2rhyz_ihpvc_275:not(#\9) {
277
+ .awsui_input_2rhyz_qs0t8_149.awsui_input-invalid_2rhyz_qs0t8_266.awsui_input-has-icon-left_2rhyz_qs0t8_275:not(#\9) {
278
278
  padding-inline-start: calc(var(--space-field-icon-offset-ikwzwx, 36px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
279
279
  }
280
- .awsui_input_2rhyz_ihpvc_149.awsui_input-warning_2rhyz_ihpvc_278:not(#\9) {
280
+ .awsui_input_2rhyz_qs0t8_149.awsui_input-warning_2rhyz_qs0t8_278:not(#\9) {
281
281
  color: var(--color-text-status-warning-6meo06, #855900);
282
282
  border-color: var(--color-text-status-warning-6meo06, #855900);
283
283
  padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
284
284
  border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
285
285
  }
286
- .awsui_input_2rhyz_ihpvc_149.awsui_input-warning_2rhyz_ihpvc_278:not(#\9):focus {
286
+ .awsui_input_2rhyz_qs0t8_149.awsui_input-warning_2rhyz_qs0t8_278:not(#\9):focus {
287
287
  box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
288
288
  }
289
- .awsui_input_2rhyz_ihpvc_149.awsui_input-warning_2rhyz_ihpvc_278.awsui_input-has-icon-left_2rhyz_ihpvc_275:not(#\9) {
289
+ .awsui_input_2rhyz_qs0t8_149.awsui_input-warning_2rhyz_qs0t8_278.awsui_input-has-icon-left_2rhyz_qs0t8_275:not(#\9) {
290
290
  padding-inline-start: calc(var(--space-field-icon-offset-ikwzwx, 36px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
291
291
  }
292
- .awsui_input_2rhyz_ihpvc_149.awsui_input-type-search_2rhyz_ihpvc_290:not(#\9) {
292
+ .awsui_input_2rhyz_qs0t8_149.awsui_input-type-search_2rhyz_qs0t8_290:not(#\9) {
293
293
  box-sizing: border-box;
294
294
  -webkit-appearance: none;
295
295
  }
296
- .awsui_input_2rhyz_ihpvc_149.awsui_input-type-search_2rhyz_ihpvc_290:not(#\9)::-webkit-search-decoration {
296
+ .awsui_input_2rhyz_qs0t8_149.awsui_input-type-search_2rhyz_qs0t8_290:not(#\9)::-webkit-search-decoration {
297
297
  -webkit-appearance: none;
298
298
  }
299
- .awsui_input_2rhyz_ihpvc_149.awsui_input-type-search_2rhyz_ihpvc_290:not(#\9)::-webkit-search-cancel-button {
299
+ .awsui_input_2rhyz_qs0t8_149.awsui_input-type-search_2rhyz_qs0t8_290:not(#\9)::-webkit-search-cancel-button {
300
300
  display: none;
301
301
  }
302
- .awsui_input_2rhyz_ihpvc_149.awsui_input-has-icon-left_2rhyz_ihpvc_275:not(#\9) {
302
+ .awsui_input_2rhyz_qs0t8_149.awsui_input-has-icon-left_2rhyz_qs0t8_275:not(#\9) {
303
303
  padding-inline-start: var(--space-field-icon-offset-ikwzwx, 36px);
304
304
  }
305
- .awsui_input_2rhyz_ihpvc_149.awsui_input-has-icon-right_2rhyz_ihpvc_303:not(#\9) {
305
+ .awsui_input_2rhyz_qs0t8_149.awsui_input-has-icon-right_2rhyz_qs0t8_303:not(#\9) {
306
306
  padding-inline-end: var(--space-field-icon-offset-ikwzwx, 36px);
307
307
  }
308
- .awsui_input_2rhyz_ihpvc_149.awsui_input-has-no-border-radius_2rhyz_ihpvc_306:not(#\9) {
308
+ .awsui_input_2rhyz_qs0t8_149.awsui_input-has-no-border-radius_2rhyz_qs0t8_306:not(#\9) {
309
309
  border-start-start-radius: var(--border-radius-dropdown-fgc2a1, 8px);
310
310
  border-start-end-radius: var(--border-radius-dropdown-fgc2a1, 8px);
311
311
  border-end-start-radius: var(--border-radius-dropdown-fgc2a1, 8px);
312
312
  border-end-end-radius: var(--border-radius-dropdown-fgc2a1, 8px);
313
313
  }
314
314
 
315
- .awsui_input-container_2rhyz_ihpvc_313:not(#\9) {
315
+ .awsui_input-container_2rhyz_qs0t8_313:not(#\9) {
316
316
  display: flex;
317
317
  position: relative;
318
318
  }
319
319
 
320
- .awsui_input-icon-left_2rhyz_ihpvc_318:not(#\9) {
320
+ .awsui_input-icon-left_2rhyz_qs0t8_318:not(#\9) {
321
321
  position: absolute;
322
322
  pointer-events: none;
323
323
  inset-inline-start: var(--space-field-horizontal-0aq2ch, 12px);
324
324
  inset-block-start: calc(50% - var(--line-height-body-m-2mh3ke, 20px) / 2);
325
325
  }
326
326
 
327
- .awsui_input-icon-right_2rhyz_ihpvc_325:not(#\9) {
327
+ .awsui_input-icon-right_2rhyz_qs0t8_325:not(#\9) {
328
328
  position: absolute;
329
329
  inset-block-start: calc(calc(50% - var(--line-height-body-m-2mh3ke, 20px) / 2) - var(--space-xxxs-pajhad, 2px));
330
330
  inset-inline-end: calc(var(--space-field-horizontal-0aq2ch, 12px) - var(--space-xxs-hwfkai, 4px));
331
331
  }
332
332
 
333
- .awsui_input-button-right_2rhyz_ihpvc_331:not(#\9) {
333
+ .awsui_input-button-right_2rhyz_qs0t8_331:not(#\9) {
334
334
  /* used in test-utils */
335
335
  }
@@ -2,18 +2,18 @@
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_2rhyz_ihpvc_145",
6
- "input": "awsui_input_2rhyz_ihpvc_149",
7
- "input-readonly": "awsui_input-readonly_2rhyz_ihpvc_203",
8
- "input-invalid": "awsui_input-invalid_2rhyz_ihpvc_266",
9
- "input-has-icon-left": "awsui_input-has-icon-left_2rhyz_ihpvc_275",
10
- "input-warning": "awsui_input-warning_2rhyz_ihpvc_278",
11
- "input-type-search": "awsui_input-type-search_2rhyz_ihpvc_290",
12
- "input-has-icon-right": "awsui_input-has-icon-right_2rhyz_ihpvc_303",
13
- "input-has-no-border-radius": "awsui_input-has-no-border-radius_2rhyz_ihpvc_306",
14
- "input-container": "awsui_input-container_2rhyz_ihpvc_313",
15
- "input-icon-left": "awsui_input-icon-left_2rhyz_ihpvc_318",
16
- "input-icon-right": "awsui_input-icon-right_2rhyz_ihpvc_325",
17
- "input-button-right": "awsui_input-button-right_2rhyz_ihpvc_331"
5
+ "root": "awsui_root_2rhyz_qs0t8_145",
6
+ "input": "awsui_input_2rhyz_qs0t8_149",
7
+ "input-readonly": "awsui_input-readonly_2rhyz_qs0t8_203",
8
+ "input-invalid": "awsui_input-invalid_2rhyz_qs0t8_266",
9
+ "input-has-icon-left": "awsui_input-has-icon-left_2rhyz_qs0t8_275",
10
+ "input-warning": "awsui_input-warning_2rhyz_qs0t8_278",
11
+ "input-type-search": "awsui_input-type-search_2rhyz_qs0t8_290",
12
+ "input-has-icon-right": "awsui_input-has-icon-right_2rhyz_qs0t8_303",
13
+ "input-has-no-border-radius": "awsui_input-has-no-border-radius_2rhyz_qs0t8_306",
14
+ "input-container": "awsui_input-container_2rhyz_qs0t8_313",
15
+ "input-icon-left": "awsui_input-icon-left_2rhyz_qs0t8_318",
16
+ "input-icon-right": "awsui_input-icon-right_2rhyz_qs0t8_325",
17
+ "input-button-right": "awsui_input-button-right_2rhyz_qs0t8_331"
18
18
  };
19
19
 
@@ -1,4 +1,3 @@
1
- import { __awaiter, __rest } from "tslib";
2
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
2
  // SPDX-License-Identifier: Apache-2.0
4
3
  import React, { useContext, useEffect, useRef, useState } from 'react';
@@ -23,7 +22,7 @@ export const AnalyticsFunnel = (props) => {
23
22
  if (isInFunnel && props.funnelType === 'single-page') {
24
23
  return React.createElement(React.Fragment, null, props.children);
25
24
  }
26
- return React.createElement(InnerAnalyticsFunnel, Object.assign({}, props));
25
+ return React.createElement(InnerAnalyticsFunnel, { ...props });
27
26
  };
28
27
  export const CREATION_EDIT_FLOW_DONE_EVENT_NAME = 'awsui-creation-edit-flow-done';
29
28
  const dispatchCreateEditFlowDoneEvent = () => {
@@ -31,7 +30,7 @@ const dispatchCreateEditFlowDoneEvent = () => {
31
30
  try {
32
31
  (_a = window.top) === null || _a === void 0 ? void 0 : _a.document.dispatchEvent(new Event(CREATION_EDIT_FLOW_DONE_EVENT_NAME));
33
32
  }
34
- catch (_b) {
33
+ catch {
35
34
  // probably because of cross-origin error, then do not dispatch the event
36
35
  }
37
36
  };
@@ -55,8 +54,7 @@ function evaluateSelectors(selectors, defaultSelector) {
55
54
  }
56
55
  return defaultSelector;
57
56
  }
58
- const InnerAnalyticsFunnel = (_a) => {
59
- var { mounted = true, children, stepConfiguration } = _a, props = __rest(_a, ["mounted", "children", "stepConfiguration"]);
57
+ const InnerAnalyticsFunnel = ({ mounted = true, children, stepConfiguration, ...props }) => {
60
58
  const [funnelInteractionId, setFunnelInteractionId] = useState('');
61
59
  const [submissionAttempt, setSubmissionAttempt] = useState(0);
62
60
  const isVisualRefresh = useVisualRefresh();
@@ -233,7 +231,7 @@ export const AnalyticsFunnelStep = (props) => {
233
231
  This wrapper is used to apply a `key` property to the actual (inner) AnalyticsFunnelStep
234
232
  element. This allows us to keep the state and effects separate per step.
235
233
  */
236
- return React.createElement(InnerAnalyticsFunnelStep, Object.assign({}, props, { key: props.stepNumber }));
234
+ return React.createElement(InnerAnalyticsFunnelStep, { ...props, key: props.stepNumber });
237
235
  };
238
236
  function getSubStepConfiguration() {
239
237
  const subSteps = Array.from(document.querySelectorAll(getSubStepAllSelector()));
@@ -283,8 +281,7 @@ function useStepChangeListener(stepNumber, handler) {
283
281
  }, SUBSTEP_CHANGE_DEBOUNCE);
284
282
  return { onStepChange: stepChangeCallback, subStepConfiguration };
285
283
  }
286
- const InnerAnalyticsFunnelStep = (_a) => {
287
- var { mounted = true, children, stepNumber, stepIdentifier, stepErrorContext } = _a, rest = __rest(_a, ["mounted", "children", "stepNumber", "stepIdentifier", "stepErrorContext"]);
284
+ const InnerAnalyticsFunnelStep = ({ mounted = true, children, stepNumber, stepIdentifier, stepErrorContext, ...rest }) => {
288
285
  const { funnelInteractionId, funnelIdentifier, funnelNameSelector, funnelState, funnelType } = useFunnel();
289
286
  const parentStep = useFunnelStep();
290
287
  const parentStepExists = parentStep.isInStep;
@@ -446,7 +443,7 @@ export const AnalyticsFunnelSubStep = ({ children, subStepIdentifier, subStepErr
446
443
  focusCleanupFunction,
447
444
  isNestedSubStep: false,
448
445
  };
449
- const inheritedContext = Object.assign(Object.assign({}, useContext(FunnelSubStepContext)), { isNestedSubStep: true });
446
+ const inheritedContext = { ...useContext(FunnelSubStepContext), isNestedSubStep: true };
450
447
  const isNested = Boolean(inheritedContext.subStepId);
451
448
  useEffect(() => {
452
449
  if (!isNested) {
@@ -465,7 +462,7 @@ export const AnalyticsFunnelSubStep = ({ children, subStepIdentifier, subStepErr
465
462
  return;
466
463
  }
467
464
  const onMouseDown = () => (mousePressed.current = true);
468
- const onMouseUp = () => __awaiter(void 0, void 0, void 0, function* () {
465
+ const onMouseUp = async () => {
469
466
  var _a;
470
467
  mousePressed.current = false;
471
468
  if (!isFocusedSubStep.current) {
@@ -477,7 +474,7 @@ export const AnalyticsFunnelSubStep = ({ children, subStepIdentifier, subStepErr
477
474
  event loop here, so that `document.activeElement` has the
478
475
  correct new value.
479
476
  */
480
- yield new Promise(r => setTimeout(r, 1));
477
+ await new Promise(r => setTimeout(r, 1));
481
478
  if (!subStepRef.current || !document.activeElement || !nodeBelongs(subStepRef.current, document.activeElement)) {
482
479
  isFocusedSubStep.current = false;
483
480
  /*
@@ -486,7 +483,7 @@ export const AnalyticsFunnelSubStep = ({ children, subStepIdentifier, subStepErr
486
483
  */
487
484
  (_a = focusCleanupFunction.current) === null || _a === void 0 ? void 0 : _a.call(focusCleanupFunction);
488
485
  }
489
- });
486
+ };
490
487
  const controller = new AbortController();
491
488
  window.addEventListener('mousedown', onMouseDown, { signal: controller.signal });
492
489
  window.addEventListener('mouseup', onMouseUp, { signal: controller.signal });
@@ -1 +1 @@
1
- {"version":3,"file":"analytics-funnel.js","sourceRoot":"","sources":["../../../../../src/internal/analytics/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mBAAmB;QACnB,WAAW;QACX,gBAAgB;QAChB,UAAU;QACV,mBAAmB;QACnB,eAAe;QACf,oBAAoB;QACpB,QAAQ;QACR,UAAU;KACX,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,IAC1C,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAChC,CACjC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useEffect, useRef, useState } from 'react';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { PACKAGE_VERSION, THEME } from '../../environment';\nimport { useDebounceCallback } from '../../hooks/use-debounce-callback';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { nodeBelongs } from '../../utils/node-belongs';\nimport {\n FunnelContext,\n FunnelContextValue,\n FunnelState,\n FunnelStepContext,\n FunnelStepContextValue,\n FunnelSubStepContext,\n FunnelSubStepContextValue,\n} from '../context/analytics-context';\nimport { useFunnel, useFunnelStep } from '../hooks/use-funnel';\nimport { FunnelMetrics, PerformanceMetrics } from '../index';\nimport {\n AnalyticsMetadata,\n FunnelStartProps,\n FunnelStepProps,\n StepConfiguration,\n SubStepConfiguration,\n TaskCompletionDataProps,\n} from '../interfaces';\nimport {\n DATA_ATTR_FUNNEL_STEP,\n DATA_ATTR_RESOURCE_TYPE,\n getFunnelNameSelector,\n getSubStepAllSelector,\n getSubStepNameSelector,\n getSubStepSelector,\n getTextFromSelector,\n} from '../selectors';\n\nconst FUNNEL_VERSION = '1.4';\n\ninterface AnalyticsFunnelProps {\n mounted?: boolean;\n children?: React.ReactNode;\n stepConfiguration?: StepConfiguration[];\n funnelNameSelectors?: () => string[];\n componentSelectors?: () => string[];\n funnelType: FunnelStartProps['funnelType'];\n optionalStepNumbers: FunnelStartProps['optionalStepNumbers'];\n totalFunnelSteps: FunnelStartProps['totalFunnelSteps'];\n funnelIdentifier?: AnalyticsMetadata['instanceIdentifier'];\n funnelFlowType?: AnalyticsMetadata['flowType'];\n funnelErrorContext?: AnalyticsMetadata['errorContext'];\n funnelResourceType?: AnalyticsMetadata['resourceType'];\n}\n\nexport const AnalyticsFunnel = (props: AnalyticsFunnelProps) => {\n const { isInFunnel } = useFunnel();\n /*\n If the current funnel component is a Form (i.e. single-page funnel), it should\n defer its funnel-handling to a parent Form element, if present.\n Wizards (i.e. multi-page funnels) always take highest precedence for handling funnels,\n and do not defer to any other element.\n */\n if (isInFunnel && props.funnelType === 'single-page') {\n return <>{props.children}</>;\n }\n\n return <InnerAnalyticsFunnel {...props} />;\n};\n\nexport const CREATION_EDIT_FLOW_DONE_EVENT_NAME = 'awsui-creation-edit-flow-done';\nconst dispatchCreateEditFlowDoneEvent = () => {\n try {\n window.top?.document.dispatchEvent(new Event(CREATION_EDIT_FLOW_DONE_EVENT_NAME));\n } catch {\n // probably because of cross-origin error, then do not dispatch the event\n }\n};\n\nconst onFunnelCancelled = ({\n funnelInteractionId,\n funnelIdentifier,\n}: {\n funnelInteractionId: string;\n funnelIdentifier?: string;\n}) => {\n FunnelMetrics.funnelCancelled({ funnelInteractionId, funnelIdentifier });\n};\n\nconst onFunnelComplete = (taskCompletionDataProps: TaskCompletionDataProps) => {\n FunnelMetrics.funnelComplete({\n funnelInteractionId: taskCompletionDataProps.taskInteractionId,\n funnelIdentifier: taskCompletionDataProps.taskIdentifier,\n });\n PerformanceMetrics.taskCompletionData(taskCompletionDataProps);\n dispatchCreateEditFlowDoneEvent();\n};\n\nfunction evaluateSelectors(selectors: string[], defaultSelector: string) {\n for (const selector of selectors) {\n const element = document.querySelector(selector);\n if (element) {\n return selector;\n }\n }\n\n return defaultSelector;\n}\n\nconst InnerAnalyticsFunnel = ({ mounted = true, children, stepConfiguration, ...props }: AnalyticsFunnelProps) => {\n const [funnelInteractionId, setFunnelInteractionId] = useState<string>('');\n const [submissionAttempt, setSubmissionAttempt] = useState(0);\n const isVisualRefresh = useVisualRefresh();\n const funnelState = useRef<FunnelState>('default');\n const funnelNameSelector = useRef<string>(getFunnelNameSelector());\n const componentSelector = useRef<string>();\n const errorCount = useRef<number>(0);\n const loadingButtonCount = useRef<number>(0);\n const wizardCount = useRef<number>(0);\n const latestFocusCleanupFunction = useRef<undefined | (() => void)>(undefined);\n const formSubmitStartTime = useRef<number>(0);\n // This useEffect hook is run once on component mount to initiate the funnel analytics.\n // It first calls the 'funnelStart' method from FunnelMetrics, providing all necessary details\n // about the funnel, and receives a unique interaction id.\n // This unique interaction id is then stored in the state for further use.\n //\n // On component unmount, it checks whether the funnel was successfully completed.\n // Based on this, it either calls 'funnelComplete' or 'funnelCancelled' method from FunnelMetrics.\n //\n // The eslint-disable is required as we deliberately want this effect to run only once on mount and unmount,\n // hence we do not provide any dependencies.\n useEffect(() => {\n if (!mounted) {\n return;\n }\n\n /*\n We run this effect with a delay, in order to detect whether this funnel contains a Wizard.\n If it does contain a Wizard, that Wizard should take precedence for handling the funnel, and\n this current funnel component should do nothing.\n */\n let funnelInteractionId: string;\n const handle = setTimeout(() => {\n funnelNameSelector.current = evaluateSelectors(props.funnelNameSelectors?.() || [], getFunnelNameSelector());\n componentSelector.current = evaluateSelectors(props.componentSelectors?.() || [], '');\n if (props.funnelType === 'single-page' && wizardCount.current > 0) {\n return;\n }\n\n // Reset the state, in case the component was re-mounted.\n funnelState.current = 'default';\n const funnelName = getTextFromSelector(funnelNameSelector.current) ?? '';\n\n const singleStepFlowStepConfiguration = [\n {\n number: 1,\n isOptional: false,\n name: funnelName,\n stepIdentifier: props.funnelIdentifier,\n },\n ];\n\n let componentTheme = THEME;\n if (THEME === 'polaris') {\n // This is the only place we specify the theme as classic so we cannot reuse the getVisualTheme function :(\n componentTheme = isVisualRefresh ? 'vr' : 'classic';\n }\n\n funnelInteractionId = FunnelMetrics.funnelStart({\n funnelName,\n funnelIdentifier: props.funnelIdentifier,\n flowType: props.funnelFlowType,\n funnelNameSelector: funnelNameSelector.current,\n componentSelector: componentSelector.current,\n optionalStepNumbers: props.optionalStepNumbers,\n funnelType: props.funnelType,\n totalFunnelSteps: props.totalFunnelSteps,\n componentVersion: PACKAGE_VERSION,\n componentTheme: componentTheme,\n funnelVersion: FUNNEL_VERSION,\n stepConfiguration: stepConfiguration ?? singleStepFlowStepConfiguration,\n resourceType: props.funnelResourceType || getTextFromSelector(`[${DATA_ATTR_RESOURCE_TYPE}]`),\n });\n\n setFunnelInteractionId(funnelInteractionId);\n }, 1);\n\n // A funnel counts as \"successful\" if it is unmounted after being \"complete\".\n /* eslint-disable react-hooks/exhaustive-deps */\n return () => {\n clearTimeout(handle);\n\n // There is no need in cleanup if the funnel was not started.\n if (!funnelInteractionId) {\n return;\n }\n\n if (props.funnelType === 'single-page' && wizardCount.current > 0) {\n return;\n }\n\n if (funnelState.current === 'validating') {\n // Finish the validation phase early.\n const taskCompletionDataProps: TaskCompletionDataProps = {\n taskIdentifier: props.funnelIdentifier,\n taskType: props.funnelType,\n timeToRespondAfterFormSubmit: performance.now() - formSubmitStartTime.current,\n taskInteractionId: funnelInteractionId,\n taskFlowType: props.funnelFlowType,\n };\n onFunnelComplete(taskCompletionDataProps);\n funnelState.current = 'complete';\n }\n\n if (funnelState.current === 'complete') {\n FunnelMetrics.funnelSuccessful({ funnelInteractionId, funnelIdentifier: props.funnelIdentifier });\n } else {\n funnelState.current = 'cancelled';\n onFunnelCancelled({ funnelInteractionId, funnelIdentifier: props.funnelIdentifier });\n }\n };\n }, [mounted]);\n /* eslint-enable react-hooks/exhaustive-deps */\n\n const funnelSubmit = () => {\n funnelState.current = 'validating';\n formSubmitStartTime.current = performance.now();\n /*\n When the user attempts to submit the form, we wait for 50 milliseconds before checking\n if any form validation errors are present. This value was chosen to give enough time\n for validation and rerendering to occur, but be low enough that the user will not\n be able to take further action in the meantime.\n */\n const VALIDATION_WAIT_DELAY = 50;\n /*\n Loading is expected to take longer than validation, so we can keep the pressure on the CPU low.\n */\n const LOADING_WAIT_DELAY = 100;\n\n const checkForCompleteness = () => {\n if (funnelState.current === 'complete') {\n return;\n }\n\n if (loadingButtonCount.current > 0) {\n setTimeout(checkForCompleteness, LOADING_WAIT_DELAY);\n return;\n }\n\n if (errorCount.current === 0) {\n /*\n If no validation errors are rendered, we treat the funnel as complete.\n */\n const taskCompletionDataProps: TaskCompletionDataProps = {\n taskIdentifier: props.funnelIdentifier,\n taskType: props.funnelType,\n timeToRespondAfterFormSubmit: performance.now() - formSubmitStartTime.current,\n taskInteractionId: funnelInteractionId,\n taskFlowType: props.funnelFlowType,\n };\n onFunnelComplete(taskCompletionDataProps);\n funnelState.current = 'complete';\n } else {\n funnelState.current = 'default';\n }\n };\n setTimeout(checkForCompleteness, VALIDATION_WAIT_DELAY);\n };\n\n const funnelNextOrSubmitAttempt = () => setSubmissionAttempt(i => i + 1);\n\n const funnelCancel = () => {};\n\n const funnelContextValue: FunnelContextValue = {\n funnelInteractionId,\n funnelIdentifier: props.funnelIdentifier,\n funnelFlowType: props.funnelFlowType,\n funnelErrorContext: props.funnelErrorContext,\n setFunnelInteractionId,\n funnelType: props.funnelType,\n optionalStepNumbers: props.optionalStepNumbers,\n totalFunnelSteps: props.totalFunnelSteps,\n funnelNameSelector: funnelNameSelector.current,\n funnelSubmit,\n funnelCancel,\n submissionAttempt,\n funnelNextOrSubmitAttempt,\n funnelState,\n errorCount,\n loadingButtonCount,\n latestFocusCleanupFunction,\n isInFunnel: true,\n wizardCount,\n };\n\n return <FunnelContext.Provider value={funnelContextValue}>{children}</FunnelContext.Provider>;\n};\n\ninterface AnalyticsFunnelStepProps {\n mounted?: boolean;\n stepIdentifier?: AnalyticsMetadata['instanceIdentifier'];\n stepErrorContext?: AnalyticsMetadata['errorContext'];\n children?: React.ReactNode | ((props: FunnelStepContextValue) => React.ReactNode);\n stepNameSelector?: FunnelStepProps['stepNameSelector'];\n stepNumber: FunnelStepProps['stepNumber'];\n}\n\nexport const AnalyticsFunnelStep = (props: AnalyticsFunnelStepProps) => {\n /*\n This wrapper is used to apply a `key` property to the actual (inner) AnalyticsFunnelStep\n element. This allows us to keep the state and effects separate per step.\n */\n return <InnerAnalyticsFunnelStep {...props} key={props.stepNumber} />;\n};\n\nfunction getSubStepConfiguration(): SubStepConfiguration[] {\n const subSteps = Array.from(document.querySelectorAll<HTMLElement>(getSubStepAllSelector()));\n\n const subStepConfiguration = subSteps.map((substep, index) => {\n const subStepIdentifier = (substep as any)?.__awsuiMetadata__?.analytics?.instanceIdentifier;\n const name = substep.querySelector<HTMLElement>(getSubStepNameSelector())?.innerText?.trim() ?? '';\n\n return {\n name,\n number: index + 1,\n subStepIdentifier,\n };\n });\n return subStepConfiguration;\n}\n\nfunction useStepChangeListener(stepNumber: number, handler: (stepConfiguration: SubStepConfiguration[]) => void) {\n const subStepConfiguration = useRef(new Map<number, SubStepConfiguration[] | undefined>());\n /*\n Chosen so that it's hopefully shorter than a user interaction, but gives enough time for the\n amount of containers to stabilise.\n */\n const SUBSTEP_CHANGE_DEBOUNCE = 50;\n\n const listenForSubStepChanges = useRef(false);\n useEffect(() => {\n // We prevent emitting the event on the first render.\n const handle = setTimeout(() => (listenForSubStepChanges.current = true), SUBSTEP_CHANGE_DEBOUNCE);\n\n return () => {\n clearTimeout(handle);\n listenForSubStepChanges.current = false;\n };\n }, []);\n\n useEffect(() => {\n const handle = setTimeout(\n () => subStepConfiguration.current.set(stepNumber, getSubStepConfiguration()),\n SUBSTEP_CHANGE_DEBOUNCE\n );\n return () => {\n clearTimeout(handle);\n };\n }, [stepNumber]);\n\n /* We debounce this handler, so that multiple containers can change at once without causing\n too many events. */\n const stepChangeCallback = useDebounceCallback(() => {\n // We don't want to emit the event after the component has been unmounted.\n if (!listenForSubStepChanges.current) {\n return;\n }\n\n subStepConfiguration.current.set(stepNumber, getSubStepConfiguration());\n handler(subStepConfiguration.current.get(stepNumber)!);\n }, SUBSTEP_CHANGE_DEBOUNCE);\n\n return { onStepChange: stepChangeCallback, subStepConfiguration };\n}\n\nconst InnerAnalyticsFunnelStep = ({\n mounted = true,\n children,\n stepNumber,\n stepIdentifier,\n stepErrorContext,\n ...rest\n}: AnalyticsFunnelStepProps) => {\n const { funnelInteractionId, funnelIdentifier, funnelNameSelector, funnelState, funnelType } = useFunnel();\n const parentStep = useFunnelStep();\n const parentStepExists = parentStep.isInStep;\n const parentStepFunnelInteractionId = parentStep.funnelInteractionId;\n\n const funnelStepProps = { [DATA_ATTR_FUNNEL_STEP]: stepNumber };\n\n const subStepCount = useRef<number>(0);\n\n const stepNameSelector = rest.stepNameSelector || funnelNameSelector;\n const { onStepChange, subStepConfiguration } = useStepChangeListener(stepNumber, subStepConfiguration => {\n if (!funnelInteractionId) {\n return;\n }\n\n FunnelMetrics.funnelStepChange({\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n totalSubSteps: subStepCount.current,\n subStepConfiguration,\n });\n });\n\n useEffect(() => {\n if (!funnelInteractionId) {\n // This step is not inside an active funnel.\n return;\n }\n\n if (mounted) {\n return;\n }\n\n const stepName = getTextFromSelector(stepNameSelector);\n const handler = setTimeout(() => {\n if (funnelState.current !== 'cancelled') {\n FunnelMetrics.funnelStepComplete({\n funnelIdentifier,\n funnelInteractionId,\n stepIdentifier,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n totalSubSteps: subStepCount.current,\n });\n }\n }, 0);\n\n return () => {\n clearTimeout(handler);\n };\n }, [\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n funnelState,\n parentStepExists,\n funnelType,\n parentStepFunnelInteractionId,\n mounted,\n ]);\n\n // This useEffect hook is used to track the start and completion of interaction with the step.\n // On mount, if there is a valid funnel interaction id, it calls the 'funnelStepStart' method from FunnelMetrics\n // to record the beginning of the interaction with the current step.\n // On unmount, it does a similar thing but this time calling 'funnelStepComplete' to record the completion of the interaction.\n useEffect(() => {\n if (!funnelInteractionId) {\n // This step is not inside an active funnel.\n return;\n }\n\n if (parentStepExists && parentStepFunnelInteractionId) {\n /*\n This step is inside another step, which already reports events as\n part of an active funnel (i.e. that step is not a parent of a Wizard).\n Thus, this current step does not need to report any events.\n */\n return;\n }\n\n const stepName = getTextFromSelector(stepNameSelector);\n\n if (funnelState.current === 'default') {\n FunnelMetrics.funnelStepStart({\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n totalSubSteps: subStepCount.current,\n subStepConfiguration: getSubStepConfiguration(),\n });\n }\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n if (funnelState.current !== 'cancelled') {\n FunnelMetrics.funnelStepComplete({\n funnelIdentifier,\n funnelInteractionId,\n stepIdentifier,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n totalSubSteps: subStepCount.current,\n });\n }\n };\n }, [\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n funnelState,\n parentStepExists,\n funnelType,\n parentStepFunnelInteractionId,\n ]);\n\n const contextValue: FunnelStepContextValue = {\n stepIdentifier,\n stepNumber,\n stepNameSelector,\n funnelStepProps,\n subStepCount,\n isInStep: true,\n funnelInteractionId,\n onStepChange,\n subStepConfiguration,\n stepErrorContext,\n };\n\n /*\n If this step is inside another step which already reports events as part of an active\n funnel (i.e. that step is not a parent of a Wizard), the current step becomes invisible\n in the hierarchy by passing the context of its parent through.\n */\n const effectiveContextValue = parentStepExists && parentStepFunnelInteractionId ? parentStep : contextValue;\n\n return (\n <FunnelStepContext.Provider value={effectiveContextValue}>\n {typeof children === 'function' ? children(effectiveContextValue) : children}\n </FunnelStepContext.Provider>\n );\n};\ninterface AnalyticsFunnelSubStepProps {\n subStepIdentifier?: AnalyticsMetadata['instanceIdentifier'];\n subStepErrorContext?: AnalyticsMetadata['errorContext'];\n children?: React.ReactNode | ((props: FunnelSubStepContextValue) => React.ReactNode);\n}\n\nexport const AnalyticsFunnelSubStep = ({\n children,\n subStepIdentifier,\n subStepErrorContext,\n}: AnalyticsFunnelSubStepProps) => {\n const subStepId = useUniqueId('substep');\n const subStepSelector = getSubStepSelector(subStepId);\n const subStepNameSelector = getSubStepNameSelector(subStepId);\n const subStepRef = useRef<HTMLDivElement | null>(null);\n const { subStepCount, onStepChange } = useFunnelStep();\n const mousePressed = useRef<boolean>(false);\n const isFocusedSubStep = useRef<boolean>(false);\n const focusCleanupFunction = useRef<undefined | (() => void)>(undefined);\n const { funnelState, funnelInteractionId } = useFunnel();\n const { stepNumber, stepNameSelector } = useFunnelStep();\n\n const newContext: FunnelSubStepContextValue = {\n subStepIdentifier,\n subStepErrorContext,\n subStepSelector,\n subStepNameSelector,\n subStepId,\n subStepRef,\n mousePressed,\n isFocusedSubStep,\n focusCleanupFunction,\n isNestedSubStep: false,\n };\n\n const inheritedContext = { ...useContext(FunnelSubStepContext), isNestedSubStep: true };\n\n const isNested = Boolean(inheritedContext.subStepId);\n\n useEffect(() => {\n if (!isNested) {\n subStepCount.current++;\n onStepChange();\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n subStepCount.current--;\n onStepChange();\n };\n }\n }, [isNested, subStepCount, onStepChange]);\n\n const context = isNested ? inheritedContext : newContext;\n\n useEffect(() => {\n if (isNested || !subStepRef.current) {\n return;\n }\n\n const onMouseDown = () => (mousePressed.current = true);\n\n const onMouseUp = async () => {\n mousePressed.current = false;\n\n if (!isFocusedSubStep.current) {\n return;\n }\n\n /*\n Some mouse events result in an element being focused. However,\n this happens only _after_ the onMouseUp event. We yield the\n event loop here, so that `document.activeElement` has the\n correct new value.\n */\n await new Promise(r => setTimeout(r, 1));\n\n if (!subStepRef.current || !document.activeElement || !nodeBelongs(subStepRef.current, document.activeElement)) {\n isFocusedSubStep.current = false;\n\n /*\n Run this substep's own focus cleanup function if another substep\n hasn't already done it for us.\n */\n focusCleanupFunction.current?.();\n }\n };\n const controller = new AbortController();\n window.addEventListener('mousedown', onMouseDown, { signal: controller.signal });\n window.addEventListener('mouseup', onMouseUp, { signal: controller.signal });\n return () => {\n controller.abort();\n };\n }, [\n funnelInteractionId,\n funnelState,\n stepNameSelector,\n stepNumber,\n subStepNameSelector,\n subStepSelector,\n focusCleanupFunction,\n isNested,\n subStepRef,\n ]);\n\n return (\n <FunnelSubStepContext.Provider value={context}>\n {typeof children === 'function' ? children(context) : children}\n </FunnelSubStepContext.Provider>\n );\n};\n"]}
1
+ {"version":3,"file":"analytics-funnel.js","sourceRoot":"","sources":["../../../../../src/internal/analytics/components/analytics-funnel.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACL,aAAa,EAGb,iBAAiB,EAEjB,oBAAoB,GAErB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAS7D,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAs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AC;gBAEjC;;;mBAGG;gBACH,MAAA,oBAAoB,CAAC,OAAO,oEAAI,CAAC;YACnC,CAAC;QACH,CAAC,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QACjF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7E,OAAO,GAAG,EAAE;YACV,UAAU,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC,CAAC;IACJ,CAAC,EAAE;QACD,mBAAmB;QACnB,WAAW;QACX,gBAAgB;QAChB,UAAU;QACV,mBAAmB;QACnB,eAAe;QACf,oBAAoB;QACpB,QAAQ;QACR,UAAU;KACX,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,IAC1C,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAChC,CACjC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useEffect, useRef, useState } from 'react';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { PACKAGE_VERSION, THEME } from '../../environment';\nimport { useDebounceCallback } from '../../hooks/use-debounce-callback';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { nodeBelongs } from '../../utils/node-belongs';\nimport {\n FunnelContext,\n FunnelContextValue,\n FunnelState,\n FunnelStepContext,\n FunnelStepContextValue,\n FunnelSubStepContext,\n FunnelSubStepContextValue,\n} from '../context/analytics-context';\nimport { useFunnel, useFunnelStep } from '../hooks/use-funnel';\nimport { FunnelMetrics, PerformanceMetrics } from '../index';\nimport {\n AnalyticsMetadata,\n FunnelStartProps,\n FunnelStepProps,\n StepConfiguration,\n SubStepConfiguration,\n TaskCompletionDataProps,\n} from '../interfaces';\nimport {\n DATA_ATTR_FUNNEL_STEP,\n DATA_ATTR_RESOURCE_TYPE,\n getFunnelNameSelector,\n getSubStepAllSelector,\n getSubStepNameSelector,\n getSubStepSelector,\n getTextFromSelector,\n} from '../selectors';\n\nconst FUNNEL_VERSION = '1.4';\n\ninterface AnalyticsFunnelProps {\n mounted?: boolean;\n children?: React.ReactNode;\n stepConfiguration?: StepConfiguration[];\n funnelNameSelectors?: () => string[];\n componentSelectors?: () => string[];\n funnelType: FunnelStartProps['funnelType'];\n optionalStepNumbers: FunnelStartProps['optionalStepNumbers'];\n totalFunnelSteps: FunnelStartProps['totalFunnelSteps'];\n funnelIdentifier?: AnalyticsMetadata['instanceIdentifier'];\n funnelFlowType?: AnalyticsMetadata['flowType'];\n funnelErrorContext?: AnalyticsMetadata['errorContext'];\n funnelResourceType?: AnalyticsMetadata['resourceType'];\n}\n\nexport const AnalyticsFunnel = (props: AnalyticsFunnelProps) => {\n const { isInFunnel } = useFunnel();\n /*\n If the current funnel component is a Form (i.e. single-page funnel), it should\n defer its funnel-handling to a parent Form element, if present.\n Wizards (i.e. multi-page funnels) always take highest precedence for handling funnels,\n and do not defer to any other element.\n */\n if (isInFunnel && props.funnelType === 'single-page') {\n return <>{props.children}</>;\n }\n\n return <InnerAnalyticsFunnel {...props} />;\n};\n\nexport const CREATION_EDIT_FLOW_DONE_EVENT_NAME = 'awsui-creation-edit-flow-done';\nconst dispatchCreateEditFlowDoneEvent = () => {\n try {\n window.top?.document.dispatchEvent(new Event(CREATION_EDIT_FLOW_DONE_EVENT_NAME));\n } catch {\n // probably because of cross-origin error, then do not dispatch the event\n }\n};\n\nconst onFunnelCancelled = ({\n funnelInteractionId,\n funnelIdentifier,\n}: {\n funnelInteractionId: string;\n funnelIdentifier?: string;\n}) => {\n FunnelMetrics.funnelCancelled({ funnelInteractionId, funnelIdentifier });\n};\n\nconst onFunnelComplete = (taskCompletionDataProps: TaskCompletionDataProps) => {\n FunnelMetrics.funnelComplete({\n funnelInteractionId: taskCompletionDataProps.taskInteractionId,\n funnelIdentifier: taskCompletionDataProps.taskIdentifier,\n });\n PerformanceMetrics.taskCompletionData(taskCompletionDataProps);\n dispatchCreateEditFlowDoneEvent();\n};\n\nfunction evaluateSelectors(selectors: string[], defaultSelector: string) {\n for (const selector of selectors) {\n const element = document.querySelector(selector);\n if (element) {\n return selector;\n }\n }\n\n return defaultSelector;\n}\n\nconst InnerAnalyticsFunnel = ({ mounted = true, children, stepConfiguration, ...props }: AnalyticsFunnelProps) => {\n const [funnelInteractionId, setFunnelInteractionId] = useState<string>('');\n const [submissionAttempt, setSubmissionAttempt] = useState(0);\n const isVisualRefresh = useVisualRefresh();\n const funnelState = useRef<FunnelState>('default');\n const funnelNameSelector = useRef<string>(getFunnelNameSelector());\n const componentSelector = useRef<string>();\n const errorCount = useRef<number>(0);\n const loadingButtonCount = useRef<number>(0);\n const wizardCount = useRef<number>(0);\n const latestFocusCleanupFunction = useRef<undefined | (() => void)>(undefined);\n const formSubmitStartTime = useRef<number>(0);\n // This useEffect hook is run once on component mount to initiate the funnel analytics.\n // It first calls the 'funnelStart' method from FunnelMetrics, providing all necessary details\n // about the funnel, and receives a unique interaction id.\n // This unique interaction id is then stored in the state for further use.\n //\n // On component unmount, it checks whether the funnel was successfully completed.\n // Based on this, it either calls 'funnelComplete' or 'funnelCancelled' method from FunnelMetrics.\n //\n // The eslint-disable is required as we deliberately want this effect to run only once on mount and unmount,\n // hence we do not provide any dependencies.\n useEffect(() => {\n if (!mounted) {\n return;\n }\n\n /*\n We run this effect with a delay, in order to detect whether this funnel contains a Wizard.\n If it does contain a Wizard, that Wizard should take precedence for handling the funnel, and\n this current funnel component should do nothing.\n */\n let funnelInteractionId: string;\n const handle = setTimeout(() => {\n funnelNameSelector.current = evaluateSelectors(props.funnelNameSelectors?.() || [], getFunnelNameSelector());\n componentSelector.current = evaluateSelectors(props.componentSelectors?.() || [], '');\n if (props.funnelType === 'single-page' && wizardCount.current > 0) {\n return;\n }\n\n // Reset the state, in case the component was re-mounted.\n funnelState.current = 'default';\n const funnelName = getTextFromSelector(funnelNameSelector.current) ?? '';\n\n const singleStepFlowStepConfiguration = [\n {\n number: 1,\n isOptional: false,\n name: funnelName,\n stepIdentifier: props.funnelIdentifier,\n },\n ];\n\n let componentTheme = THEME;\n if (THEME === 'polaris') {\n // This is the only place we specify the theme as classic so we cannot reuse the getVisualTheme function :(\n componentTheme = isVisualRefresh ? 'vr' : 'classic';\n }\n\n funnelInteractionId = FunnelMetrics.funnelStart({\n funnelName,\n funnelIdentifier: props.funnelIdentifier,\n flowType: props.funnelFlowType,\n funnelNameSelector: funnelNameSelector.current,\n componentSelector: componentSelector.current,\n optionalStepNumbers: props.optionalStepNumbers,\n funnelType: props.funnelType,\n totalFunnelSteps: props.totalFunnelSteps,\n componentVersion: PACKAGE_VERSION,\n componentTheme: componentTheme,\n funnelVersion: FUNNEL_VERSION,\n stepConfiguration: stepConfiguration ?? singleStepFlowStepConfiguration,\n resourceType: props.funnelResourceType || getTextFromSelector(`[${DATA_ATTR_RESOURCE_TYPE}]`),\n });\n\n setFunnelInteractionId(funnelInteractionId);\n }, 1);\n\n // A funnel counts as \"successful\" if it is unmounted after being \"complete\".\n /* eslint-disable react-hooks/exhaustive-deps */\n return () => {\n clearTimeout(handle);\n\n // There is no need in cleanup if the funnel was not started.\n if (!funnelInteractionId) {\n return;\n }\n\n if (props.funnelType === 'single-page' && wizardCount.current > 0) {\n return;\n }\n\n if (funnelState.current === 'validating') {\n // Finish the validation phase early.\n const taskCompletionDataProps: TaskCompletionDataProps = {\n taskIdentifier: props.funnelIdentifier,\n taskType: props.funnelType,\n timeToRespondAfterFormSubmit: performance.now() - formSubmitStartTime.current,\n taskInteractionId: funnelInteractionId,\n taskFlowType: props.funnelFlowType,\n };\n onFunnelComplete(taskCompletionDataProps);\n funnelState.current = 'complete';\n }\n\n if (funnelState.current === 'complete') {\n FunnelMetrics.funnelSuccessful({ funnelInteractionId, funnelIdentifier: props.funnelIdentifier });\n } else {\n funnelState.current = 'cancelled';\n onFunnelCancelled({ funnelInteractionId, funnelIdentifier: props.funnelIdentifier });\n }\n };\n }, [mounted]);\n /* eslint-enable react-hooks/exhaustive-deps */\n\n const funnelSubmit = () => {\n funnelState.current = 'validating';\n formSubmitStartTime.current = performance.now();\n /*\n When the user attempts to submit the form, we wait for 50 milliseconds before checking\n if any form validation errors are present. This value was chosen to give enough time\n for validation and rerendering to occur, but be low enough that the user will not\n be able to take further action in the meantime.\n */\n const VALIDATION_WAIT_DELAY = 50;\n /*\n Loading is expected to take longer than validation, so we can keep the pressure on the CPU low.\n */\n const LOADING_WAIT_DELAY = 100;\n\n const checkForCompleteness = () => {\n if (funnelState.current === 'complete') {\n return;\n }\n\n if (loadingButtonCount.current > 0) {\n setTimeout(checkForCompleteness, LOADING_WAIT_DELAY);\n return;\n }\n\n if (errorCount.current === 0) {\n /*\n If no validation errors are rendered, we treat the funnel as complete.\n */\n const taskCompletionDataProps: TaskCompletionDataProps = {\n taskIdentifier: props.funnelIdentifier,\n taskType: props.funnelType,\n timeToRespondAfterFormSubmit: performance.now() - formSubmitStartTime.current,\n taskInteractionId: funnelInteractionId,\n taskFlowType: props.funnelFlowType,\n };\n onFunnelComplete(taskCompletionDataProps);\n funnelState.current = 'complete';\n } else {\n funnelState.current = 'default';\n }\n };\n setTimeout(checkForCompleteness, VALIDATION_WAIT_DELAY);\n };\n\n const funnelNextOrSubmitAttempt = () => setSubmissionAttempt(i => i + 1);\n\n const funnelCancel = () => {};\n\n const funnelContextValue: FunnelContextValue = {\n funnelInteractionId,\n funnelIdentifier: props.funnelIdentifier,\n funnelFlowType: props.funnelFlowType,\n funnelErrorContext: props.funnelErrorContext,\n setFunnelInteractionId,\n funnelType: props.funnelType,\n optionalStepNumbers: props.optionalStepNumbers,\n totalFunnelSteps: props.totalFunnelSteps,\n funnelNameSelector: funnelNameSelector.current,\n funnelSubmit,\n funnelCancel,\n submissionAttempt,\n funnelNextOrSubmitAttempt,\n funnelState,\n errorCount,\n loadingButtonCount,\n latestFocusCleanupFunction,\n isInFunnel: true,\n wizardCount,\n };\n\n return <FunnelContext.Provider value={funnelContextValue}>{children}</FunnelContext.Provider>;\n};\n\ninterface AnalyticsFunnelStepProps {\n mounted?: boolean;\n stepIdentifier?: AnalyticsMetadata['instanceIdentifier'];\n stepErrorContext?: AnalyticsMetadata['errorContext'];\n children?: React.ReactNode | ((props: FunnelStepContextValue) => React.ReactNode);\n stepNameSelector?: FunnelStepProps['stepNameSelector'];\n stepNumber: FunnelStepProps['stepNumber'];\n}\n\nexport const AnalyticsFunnelStep = (props: AnalyticsFunnelStepProps) => {\n /*\n This wrapper is used to apply a `key` property to the actual (inner) AnalyticsFunnelStep\n element. This allows us to keep the state and effects separate per step.\n */\n return <InnerAnalyticsFunnelStep {...props} key={props.stepNumber} />;\n};\n\nfunction getSubStepConfiguration(): SubStepConfiguration[] {\n const subSteps = Array.from(document.querySelectorAll<HTMLElement>(getSubStepAllSelector()));\n\n const subStepConfiguration = subSteps.map((substep, index) => {\n const subStepIdentifier = (substep as any)?.__awsuiMetadata__?.analytics?.instanceIdentifier;\n const name = substep.querySelector<HTMLElement>(getSubStepNameSelector())?.innerText?.trim() ?? '';\n\n return {\n name,\n number: index + 1,\n subStepIdentifier,\n };\n });\n return subStepConfiguration;\n}\n\nfunction useStepChangeListener(stepNumber: number, handler: (stepConfiguration: SubStepConfiguration[]) => void) {\n const subStepConfiguration = useRef(new Map<number, SubStepConfiguration[] | undefined>());\n /*\n Chosen so that it's hopefully shorter than a user interaction, but gives enough time for the\n amount of containers to stabilise.\n */\n const SUBSTEP_CHANGE_DEBOUNCE = 50;\n\n const listenForSubStepChanges = useRef(false);\n useEffect(() => {\n // We prevent emitting the event on the first render.\n const handle = setTimeout(() => (listenForSubStepChanges.current = true), SUBSTEP_CHANGE_DEBOUNCE);\n\n return () => {\n clearTimeout(handle);\n listenForSubStepChanges.current = false;\n };\n }, []);\n\n useEffect(() => {\n const handle = setTimeout(\n () => subStepConfiguration.current.set(stepNumber, getSubStepConfiguration()),\n SUBSTEP_CHANGE_DEBOUNCE\n );\n return () => {\n clearTimeout(handle);\n };\n }, [stepNumber]);\n\n /* We debounce this handler, so that multiple containers can change at once without causing\n too many events. */\n const stepChangeCallback = useDebounceCallback(() => {\n // We don't want to emit the event after the component has been unmounted.\n if (!listenForSubStepChanges.current) {\n return;\n }\n\n subStepConfiguration.current.set(stepNumber, getSubStepConfiguration());\n handler(subStepConfiguration.current.get(stepNumber)!);\n }, SUBSTEP_CHANGE_DEBOUNCE);\n\n return { onStepChange: stepChangeCallback, subStepConfiguration };\n}\n\nconst InnerAnalyticsFunnelStep = ({\n mounted = true,\n children,\n stepNumber,\n stepIdentifier,\n stepErrorContext,\n ...rest\n}: AnalyticsFunnelStepProps) => {\n const { funnelInteractionId, funnelIdentifier, funnelNameSelector, funnelState, funnelType } = useFunnel();\n const parentStep = useFunnelStep();\n const parentStepExists = parentStep.isInStep;\n const parentStepFunnelInteractionId = parentStep.funnelInteractionId;\n\n const funnelStepProps = { [DATA_ATTR_FUNNEL_STEP]: stepNumber };\n\n const subStepCount = useRef<number>(0);\n\n const stepNameSelector = rest.stepNameSelector || funnelNameSelector;\n const { onStepChange, subStepConfiguration } = useStepChangeListener(stepNumber, subStepConfiguration => {\n if (!funnelInteractionId) {\n return;\n }\n\n FunnelMetrics.funnelStepChange({\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n totalSubSteps: subStepCount.current,\n subStepConfiguration,\n });\n });\n\n useEffect(() => {\n if (!funnelInteractionId) {\n // This step is not inside an active funnel.\n return;\n }\n\n if (mounted) {\n return;\n }\n\n const stepName = getTextFromSelector(stepNameSelector);\n const handler = setTimeout(() => {\n if (funnelState.current !== 'cancelled') {\n FunnelMetrics.funnelStepComplete({\n funnelIdentifier,\n funnelInteractionId,\n stepIdentifier,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n totalSubSteps: subStepCount.current,\n });\n }\n }, 0);\n\n return () => {\n clearTimeout(handler);\n };\n }, [\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n funnelState,\n parentStepExists,\n funnelType,\n parentStepFunnelInteractionId,\n mounted,\n ]);\n\n // This useEffect hook is used to track the start and completion of interaction with the step.\n // On mount, if there is a valid funnel interaction id, it calls the 'funnelStepStart' method from FunnelMetrics\n // to record the beginning of the interaction with the current step.\n // On unmount, it does a similar thing but this time calling 'funnelStepComplete' to record the completion of the interaction.\n useEffect(() => {\n if (!funnelInteractionId) {\n // This step is not inside an active funnel.\n return;\n }\n\n if (parentStepExists && parentStepFunnelInteractionId) {\n /*\n This step is inside another step, which already reports events as\n part of an active funnel (i.e. that step is not a parent of a Wizard).\n Thus, this current step does not need to report any events.\n */\n return;\n }\n\n const stepName = getTextFromSelector(stepNameSelector);\n\n if (funnelState.current === 'default') {\n FunnelMetrics.funnelStepStart({\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n totalSubSteps: subStepCount.current,\n subStepConfiguration: getSubStepConfiguration(),\n });\n }\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n if (funnelState.current !== 'cancelled') {\n FunnelMetrics.funnelStepComplete({\n funnelIdentifier,\n funnelInteractionId,\n stepIdentifier,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n totalSubSteps: subStepCount.current,\n });\n }\n };\n }, [\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n funnelState,\n parentStepExists,\n funnelType,\n parentStepFunnelInteractionId,\n ]);\n\n const contextValue: FunnelStepContextValue = {\n stepIdentifier,\n stepNumber,\n stepNameSelector,\n funnelStepProps,\n subStepCount,\n isInStep: true,\n funnelInteractionId,\n onStepChange,\n subStepConfiguration,\n stepErrorContext,\n };\n\n /*\n If this step is inside another step which already reports events as part of an active\n funnel (i.e. that step is not a parent of a Wizard), the current step becomes invisible\n in the hierarchy by passing the context of its parent through.\n */\n const effectiveContextValue = parentStepExists && parentStepFunnelInteractionId ? parentStep : contextValue;\n\n return (\n <FunnelStepContext.Provider value={effectiveContextValue}>\n {typeof children === 'function' ? children(effectiveContextValue) : children}\n </FunnelStepContext.Provider>\n );\n};\ninterface AnalyticsFunnelSubStepProps {\n subStepIdentifier?: AnalyticsMetadata['instanceIdentifier'];\n subStepErrorContext?: AnalyticsMetadata['errorContext'];\n children?: React.ReactNode | ((props: FunnelSubStepContextValue) => React.ReactNode);\n}\n\nexport const AnalyticsFunnelSubStep = ({\n children,\n subStepIdentifier,\n subStepErrorContext,\n}: AnalyticsFunnelSubStepProps) => {\n const subStepId = useUniqueId('substep');\n const subStepSelector = getSubStepSelector(subStepId);\n const subStepNameSelector = getSubStepNameSelector(subStepId);\n const subStepRef = useRef<HTMLDivElement | null>(null);\n const { subStepCount, onStepChange } = useFunnelStep();\n const mousePressed = useRef<boolean>(false);\n const isFocusedSubStep = useRef<boolean>(false);\n const focusCleanupFunction = useRef<undefined | (() => void)>(undefined);\n const { funnelState, funnelInteractionId } = useFunnel();\n const { stepNumber, stepNameSelector } = useFunnelStep();\n\n const newContext: FunnelSubStepContextValue = {\n subStepIdentifier,\n subStepErrorContext,\n subStepSelector,\n subStepNameSelector,\n subStepId,\n subStepRef,\n mousePressed,\n isFocusedSubStep,\n focusCleanupFunction,\n isNestedSubStep: false,\n };\n\n const inheritedContext = { ...useContext(FunnelSubStepContext), isNestedSubStep: true };\n\n const isNested = Boolean(inheritedContext.subStepId);\n\n useEffect(() => {\n if (!isNested) {\n subStepCount.current++;\n onStepChange();\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n subStepCount.current--;\n onStepChange();\n };\n }\n }, [isNested, subStepCount, onStepChange]);\n\n const context = isNested ? inheritedContext : newContext;\n\n useEffect(() => {\n if (isNested || !subStepRef.current) {\n return;\n }\n\n const onMouseDown = () => (mousePressed.current = true);\n\n const onMouseUp = async () => {\n mousePressed.current = false;\n\n if (!isFocusedSubStep.current) {\n return;\n }\n\n /*\n Some mouse events result in an element being focused. However,\n this happens only _after_ the onMouseUp event. We yield the\n event loop here, so that `document.activeElement` has the\n correct new value.\n */\n await new Promise(r => setTimeout(r, 1));\n\n if (!subStepRef.current || !document.activeElement || !nodeBelongs(subStepRef.current, document.activeElement)) {\n isFocusedSubStep.current = false;\n\n /*\n Run this substep's own focus cleanup function if another substep\n hasn't already done it for us.\n */\n focusCleanupFunction.current?.();\n }\n };\n const controller = new AbortController();\n window.addEventListener('mousedown', onMouseDown, { signal: controller.signal });\n window.addEventListener('mouseup', onMouseUp, { signal: controller.signal });\n return () => {\n controller.abort();\n };\n }, [\n funnelInteractionId,\n funnelState,\n stepNameSelector,\n stepNumber,\n subStepNameSelector,\n subStepSelector,\n focusCleanupFunction,\n isNested,\n subStepRef,\n ]);\n\n return (\n <FunnelSubStepContext.Provider value={context}>\n {typeof children === 'function' ? children(context) : children}\n </FunnelSubStepContext.Provider>\n );\n};\n"]}
@@ -1,6 +1,5 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import { __awaiter } from "tslib";
4
3
  import { useContext, useRef } from 'react';
5
4
  import { nodeBelongs } from '../../utils/node-belongs';
6
5
  import { FunnelMetrics } from '../';
@@ -24,11 +23,11 @@ export const useFunnelSubStep = () => {
24
23
  if (isNestedSubStep) {
25
24
  return context;
26
25
  }
27
- const onFocus = (event) => __awaiter(void 0, void 0, void 0, function* () {
26
+ const onFocus = async (event) => {
28
27
  var _a, _b, _c, _d;
29
28
  const element = event.target;
30
29
  // Ignore spurious focus events, such as when the browser window is focused again.
31
- yield new Promise(r => setTimeout(r, 1));
30
+ await new Promise(r => setTimeout(r, 1));
32
31
  if (document.activeElement !== element) {
33
32
  return;
34
33
  }
@@ -96,7 +95,7 @@ export const useFunnelSubStep = () => {
96
95
  };
97
96
  latestFocusCleanupFunction.current = focusCleanupFunction.current;
98
97
  }
99
- });
98
+ };
100
99
  const onBlur = (event) => {
101
100
  var _a;
102
101
  if (mousePressed.current) {
@@ -127,7 +126,7 @@ export const useFunnelSubStep = () => {
127
126
  onBlur,
128
127
  }
129
128
  : {};
130
- return Object.assign({ funnelSubStepProps }, context);
129
+ return { funnelSubStepProps, ...context };
131
130
  };
132
131
  /**
133
132
  * Custom React Hook to manage and interact with FunnelStep.
@@ -157,7 +156,7 @@ export const useFunnel = () => {
157
156
  [DATA_ATTR_FUNNEL_INTERACTION_ID]: context.funnelInteractionId,
158
157
  }
159
158
  : {};
160
- return Object.assign({ funnelProps }, context);
159
+ return { funnelProps, ...context };
161
160
  };
162
161
  export const useFunnelNameSelector = () => {
163
162
  const context = useContext(FunnelNameSelectorContext);