@cloudscape-design/components-themeable 3.0.1257 → 3.0.1259

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 (260) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/{internal/components/dropdown → dropdown}/motion.scss +2 -2
  3. package/lib/internal/scss/dropdown/styles.scss +127 -0
  4. package/lib/internal/scss/dropdown/test-classes/styles.scss +16 -0
  5. package/lib/internal/scss/internal/components/dropdown/styles.scss +2 -113
  6. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +155 -152
  7. package/lib/internal/scss/internal/styles/forms/mixins.scss +15 -11
  8. package/lib/internal/template/alert/styles.css.js +27 -27
  9. package/lib/internal/template/alert/styles.scoped.css +50 -50
  10. package/lib/internal/template/alert/styles.selectors.js +27 -27
  11. package/lib/internal/template/annotation-context/annotation/styles.css.js +13 -13
  12. package/lib/internal/template/annotation-context/annotation/styles.scoped.css +21 -21
  13. package/lib/internal/template/annotation-context/annotation/styles.selectors.js +13 -13
  14. package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
  15. package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
  16. package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
  17. package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -86
  18. package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +258 -258
  19. package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -86
  20. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +32 -32
  21. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +89 -89
  22. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +32 -32
  23. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
  24. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
  25. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
  26. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +27 -27
  27. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +54 -54
  28. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +27 -27
  29. package/lib/internal/template/attribute-editor/styles.css.js +15 -15
  30. package/lib/internal/template/attribute-editor/styles.scoped.css +28 -28
  31. package/lib/internal/template/attribute-editor/styles.selectors.js +15 -15
  32. package/lib/internal/template/autosuggest/interfaces.d.ts +1 -1
  33. package/lib/internal/template/autosuggest/interfaces.d.ts.map +1 -1
  34. package/lib/internal/template/autosuggest/interfaces.js.map +1 -1
  35. package/lib/internal/template/autosuggest/internal.js.map +1 -1
  36. package/lib/internal/template/autosuggest/load-more-controller.d.ts +1 -1
  37. package/lib/internal/template/autosuggest/load-more-controller.d.ts.map +1 -1
  38. package/lib/internal/template/autosuggest/load-more-controller.js.map +1 -1
  39. package/lib/internal/template/breadcrumb-group/item/styles.css.js +7 -7
  40. package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +28 -28
  41. package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +7 -7
  42. package/lib/internal/template/button/styles.css.js +22 -22
  43. package/lib/internal/template/button/styles.scoped.css +256 -256
  44. package/lib/internal/template/button/styles.selectors.js +22 -22
  45. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js +1 -1
  46. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  47. package/lib/internal/template/button-dropdown/interfaces.d.ts +1 -1
  48. package/lib/internal/template/button-dropdown/interfaces.d.ts.map +1 -1
  49. package/lib/internal/template/button-dropdown/interfaces.js.map +1 -1
  50. package/lib/internal/template/button-dropdown/internal.js +1 -1
  51. package/lib/internal/template/button-dropdown/internal.js.map +1 -1
  52. package/lib/internal/template/button-dropdown/item-element/index.js +1 -1
  53. package/lib/internal/template/button-dropdown/item-element/index.js.map +1 -1
  54. package/lib/internal/template/button-dropdown/item-element/styles.css.js +21 -21
  55. package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +37 -37
  56. package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +21 -21
  57. package/lib/internal/template/checkbox/styles.css.js +3 -3
  58. package/lib/internal/template/checkbox/styles.scoped.css +11 -11
  59. package/lib/internal/template/checkbox/styles.selectors.js +3 -3
  60. package/lib/internal/template/content-layout/styles.css.js +14 -14
  61. package/lib/internal/template/content-layout/styles.scoped.css +27 -27
  62. package/lib/internal/template/content-layout/styles.selectors.js +14 -14
  63. package/lib/internal/template/date-picker/index.js +1 -1
  64. package/lib/internal/template/date-picker/index.js.map +1 -1
  65. package/lib/internal/template/date-picker/interfaces.d.ts +1 -1
  66. package/lib/internal/template/date-picker/interfaces.d.ts.map +1 -1
  67. package/lib/internal/template/date-picker/interfaces.js.map +1 -1
  68. package/lib/internal/template/date-range-picker/index.js +1 -1
  69. package/lib/internal/template/date-range-picker/index.js.map +1 -1
  70. package/lib/internal/template/date-range-picker/interfaces.d.ts +1 -1
  71. package/lib/internal/template/date-range-picker/interfaces.d.ts.map +1 -1
  72. package/lib/internal/template/date-range-picker/interfaces.js.map +1 -1
  73. package/lib/internal/template/dropdown/context.d.ts.map +1 -0
  74. package/lib/internal/template/dropdown/context.js.map +1 -0
  75. package/lib/internal/template/{internal/components/dropdown → dropdown}/dropdown-fit-handler.d.ts +1 -1
  76. package/lib/internal/template/dropdown/dropdown-fit-handler.d.ts.map +1 -0
  77. package/lib/internal/template/{internal/components/dropdown → dropdown}/dropdown-fit-handler.js +1 -1
  78. package/lib/internal/template/dropdown/dropdown-fit-handler.js.map +1 -0
  79. package/lib/internal/template/dropdown/dropdown-position.d.ts.map +1 -0
  80. package/lib/internal/template/dropdown/dropdown-position.js.map +1 -0
  81. package/lib/internal/template/dropdown/index.d.ts +7 -0
  82. package/lib/internal/template/dropdown/index.d.ts.map +1 -0
  83. package/lib/internal/template/dropdown/index.js +16 -0
  84. package/lib/internal/template/dropdown/index.js.map +1 -0
  85. package/lib/internal/template/{internal/components/dropdown → dropdown}/interfaces.d.ts +54 -82
  86. package/lib/internal/template/dropdown/interfaces.d.ts.map +1 -0
  87. package/lib/internal/template/dropdown/interfaces.js.map +1 -0
  88. package/lib/internal/template/dropdown/internal.d.ts +24 -0
  89. package/lib/internal/template/dropdown/internal.d.ts.map +1 -0
  90. package/lib/internal/template/{internal/components/dropdown/index.js → dropdown/internal.js} +29 -21
  91. package/lib/internal/template/dropdown/internal.js.map +1 -0
  92. package/lib/internal/template/dropdown/style.d.ts +9 -0
  93. package/lib/internal/template/dropdown/style.d.ts.map +1 -0
  94. package/lib/internal/template/dropdown/style.js +16 -0
  95. package/lib/internal/template/dropdown/style.js.map +1 -0
  96. package/lib/internal/template/dropdown/styles.css.js +25 -0
  97. package/lib/internal/template/dropdown/styles.scoped.css +380 -0
  98. package/lib/internal/template/dropdown/styles.selectors.js +26 -0
  99. package/lib/internal/template/dropdown/test-classes/styles.css.js +8 -0
  100. package/lib/internal/template/dropdown/test-classes/styles.scoped.css +15 -0
  101. package/lib/internal/template/dropdown/test-classes/styles.selectors.js +9 -0
  102. package/lib/internal/template/file-token-group/styles.css.js +23 -23
  103. package/lib/internal/template/file-token-group/styles.scoped.css +36 -36
  104. package/lib/internal/template/file-token-group/styles.selectors.js +23 -23
  105. package/lib/internal/template/flashbar/styles.css.js +50 -50
  106. package/lib/internal/template/flashbar/styles.scoped.css +187 -187
  107. package/lib/internal/template/flashbar/styles.selectors.js +50 -50
  108. package/lib/internal/template/help-panel/styles.css.js +6 -6
  109. package/lib/internal/template/help-panel/styles.scoped.css +73 -73
  110. package/lib/internal/template/help-panel/styles.selectors.js +6 -6
  111. package/lib/internal/template/index.d.ts +1 -0
  112. package/lib/internal/template/index.d.ts.map +1 -1
  113. package/lib/internal/template/index.js +1 -0
  114. package/lib/internal/template/index.js.map +1 -1
  115. package/lib/internal/template/input/styles.css.js +13 -13
  116. package/lib/internal/template/input/styles.scoped.css +74 -74
  117. package/lib/internal/template/input/styles.selectors.js +13 -13
  118. package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  119. package/lib/internal/template/internal/analytics/components/analytics-funnel.js +5 -2
  120. package/lib/internal/template/internal/analytics/components/analytics-funnel.js.map +1 -1
  121. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  122. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts +1 -1
  123. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
  124. package/lib/internal/template/internal/components/autosuggest-input/index.js +2 -2
  125. package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
  126. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +30 -30
  127. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +58 -58
  128. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
  129. package/lib/internal/template/internal/components/dropdown/styles.css.js +2 -20
  130. package/lib/internal/template/internal/components/dropdown/styles.scoped.css +4 -373
  131. package/lib/internal/template/internal/components/dropdown/styles.selectors.js +2 -20
  132. package/lib/internal/template/internal/components/radio-button/styles.css.js +7 -7
  133. package/lib/internal/template/internal/components/radio-button/styles.scoped.css +18 -18
  134. package/lib/internal/template/internal/components/radio-button/styles.selectors.js +7 -7
  135. package/lib/internal/template/internal/components/token-list/styles.css.js +10 -10
  136. package/lib/internal/template/internal/components/token-list/styles.scoped.css +25 -25
  137. package/lib/internal/template/internal/components/token-list/styles.selectors.js +10 -10
  138. package/lib/internal/template/internal/environment.js +2 -2
  139. package/lib/internal/template/internal/environment.json +2 -2
  140. package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts +3 -0
  141. package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  142. package/lib/internal/template/internal/generated/custom-css-properties/index.js +154 -151
  143. package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
  144. package/lib/internal/template/internal/utils/browser-scrollbar-size.js +1 -1
  145. package/lib/internal/template/internal/utils/browser-scrollbar-size.js.map +1 -1
  146. package/lib/internal/template/internal/utils/get-dropdown-min-width.d.ts +1 -1
  147. package/lib/internal/template/internal/utils/get-dropdown-min-width.d.ts.map +1 -1
  148. package/lib/internal/template/internal/utils/get-dropdown-min-width.js.map +1 -1
  149. package/lib/internal/template/link/styles.css.js +20 -20
  150. package/lib/internal/template/link/styles.scoped.css +103 -103
  151. package/lib/internal/template/link/styles.selectors.js +20 -20
  152. package/lib/internal/template/modal/styles.css.js +31 -31
  153. package/lib/internal/template/modal/styles.scoped.css +48 -48
  154. package/lib/internal/template/modal/styles.selectors.js +31 -31
  155. package/lib/internal/template/multiselect/embedded.d.ts +1 -1
  156. package/lib/internal/template/multiselect/internal.d.ts +1 -1
  157. package/lib/internal/template/multiselect/internal.js +1 -1
  158. package/lib/internal/template/multiselect/internal.js.map +1 -1
  159. package/lib/internal/template/multiselect/use-multiselect.d.ts +1 -1
  160. package/lib/internal/template/package.json +1 -0
  161. package/lib/internal/template/progress-bar/styles.css.js +18 -18
  162. package/lib/internal/template/progress-bar/styles.scoped.css +48 -48
  163. package/lib/internal/template/progress-bar/styles.selectors.js +18 -18
  164. package/lib/internal/template/prompt-input/styles.css.js +17 -17
  165. package/lib/internal/template/prompt-input/styles.scoped.css +79 -79
  166. package/lib/internal/template/prompt-input/styles.selectors.js +17 -17
  167. package/lib/internal/template/property-filter/interfaces.d.ts +1 -1
  168. package/lib/internal/template/property-filter/interfaces.d.ts.map +1 -1
  169. package/lib/internal/template/property-filter/interfaces.js.map +1 -1
  170. package/lib/internal/template/property-filter/property-filter-autosuggest.d.ts.map +1 -1
  171. package/lib/internal/template/property-filter/property-filter-autosuggest.js.map +1 -1
  172. package/lib/internal/template/property-filter/use-load-items.d.ts +1 -1
  173. package/lib/internal/template/segmented-control/styles.css.js +16 -16
  174. package/lib/internal/template/segmented-control/styles.scoped.css +46 -46
  175. package/lib/internal/template/segmented-control/styles.selectors.js +16 -16
  176. package/lib/internal/template/select/interfaces.d.ts +1 -1
  177. package/lib/internal/template/select/interfaces.d.ts.map +1 -1
  178. package/lib/internal/template/select/interfaces.js.map +1 -1
  179. package/lib/internal/template/select/internal.js +1 -1
  180. package/lib/internal/template/select/internal.js.map +1 -1
  181. package/lib/internal/template/select/utils/use-select.d.ts +2 -2
  182. package/lib/internal/template/select/utils/use-select.d.ts.map +1 -1
  183. package/lib/internal/template/select/utils/use-select.js.map +1 -1
  184. package/lib/internal/template/slider/styles.css.js +26 -26
  185. package/lib/internal/template/slider/styles.scoped.css +165 -165
  186. package/lib/internal/template/slider/styles.selectors.js +26 -26
  187. package/lib/internal/template/spinner/styles.css.js +13 -13
  188. package/lib/internal/template/spinner/styles.scoped.css +39 -39
  189. package/lib/internal/template/spinner/styles.selectors.js +13 -13
  190. package/lib/internal/template/tabs/styles.css.js +30 -30
  191. package/lib/internal/template/tabs/styles.scoped.css +76 -76
  192. package/lib/internal/template/tabs/styles.selectors.js +30 -30
  193. package/lib/internal/template/tag-editor/styles.css.js +3 -3
  194. package/lib/internal/template/tag-editor/styles.scoped.css +13 -13
  195. package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
  196. package/lib/internal/template/test-utils/dom/autosuggest/index.js +18 -17
  197. package/lib/internal/template/test-utils/dom/autosuggest/index.js.map +1 -1
  198. package/lib/internal/template/test-utils/dom/button-dropdown/index.js +3 -2
  199. package/lib/internal/template/test-utils/dom/button-dropdown/index.js.map +1 -1
  200. package/lib/internal/template/test-utils/dom/dropdown/index.d.ts +41 -0
  201. package/lib/internal/template/test-utils/dom/dropdown/index.js +65 -0
  202. package/lib/internal/template/test-utils/dom/dropdown/index.js.map +1 -0
  203. package/lib/internal/template/test-utils/dom/index.d.ts +28 -0
  204. package/lib/internal/template/test-utils/dom/index.js +21 -2
  205. package/lib/internal/template/test-utils/dom/index.js.map +1 -1
  206. package/lib/internal/template/test-utils/dom/internal/autosuggest-input.js +7 -6
  207. package/lib/internal/template/test-utils/dom/internal/autosuggest-input.js.map +1 -1
  208. package/lib/internal/template/test-utils/dom/internal/dropdown-host.d.ts +3 -3
  209. package/lib/internal/template/test-utils/dom/internal/dropdown-host.js +24 -23
  210. package/lib/internal/template/test-utils/dom/internal/dropdown-host.js.map +1 -1
  211. package/lib/internal/template/test-utils/dom/internal/dropdown.d.ts +1 -0
  212. package/lib/internal/template/test-utils/dom/internal/dropdown.js +7 -2
  213. package/lib/internal/template/test-utils/dom/internal/dropdown.js.map +1 -1
  214. package/lib/internal/template/test-utils/selectors/autosuggest/index.js +18 -17
  215. package/lib/internal/template/test-utils/selectors/autosuggest/index.js.map +1 -1
  216. package/lib/internal/template/test-utils/selectors/button-dropdown/index.js +3 -2
  217. package/lib/internal/template/test-utils/selectors/button-dropdown/index.js.map +1 -1
  218. package/lib/internal/template/test-utils/selectors/dropdown/index.d.ts +41 -0
  219. package/lib/internal/template/test-utils/selectors/dropdown/index.js +65 -0
  220. package/lib/internal/template/test-utils/selectors/dropdown/index.js.map +1 -0
  221. package/lib/internal/template/test-utils/selectors/index.d.ts +18 -0
  222. package/lib/internal/template/test-utils/selectors/index.js +16 -2
  223. package/lib/internal/template/test-utils/selectors/index.js.map +1 -1
  224. package/lib/internal/template/test-utils/selectors/internal/autosuggest-input.js +7 -6
  225. package/lib/internal/template/test-utils/selectors/internal/autosuggest-input.js.map +1 -1
  226. package/lib/internal/template/test-utils/selectors/internal/dropdown-host.d.ts +3 -3
  227. package/lib/internal/template/test-utils/selectors/internal/dropdown-host.js +23 -22
  228. package/lib/internal/template/test-utils/selectors/internal/dropdown-host.js.map +1 -1
  229. package/lib/internal/template/test-utils/selectors/internal/dropdown.d.ts +1 -0
  230. package/lib/internal/template/test-utils/selectors/internal/dropdown.js +7 -2
  231. package/lib/internal/template/test-utils/selectors/internal/dropdown.js.map +1 -1
  232. package/lib/internal/template/text-content/styles.css.js +1 -1
  233. package/lib/internal/template/text-content/styles.scoped.css +66 -66
  234. package/lib/internal/template/text-content/styles.selectors.js +1 -1
  235. package/lib/internal/template/textarea/styles.css.js +5 -5
  236. package/lib/internal/template/textarea/styles.scoped.css +45 -45
  237. package/lib/internal/template/textarea/styles.selectors.js +5 -5
  238. package/lib/internal/template/toggle/styles.css.js +10 -10
  239. package/lib/internal/template/toggle/styles.scoped.css +23 -23
  240. package/lib/internal/template/toggle/styles.selectors.js +10 -10
  241. package/lib/internal/template/token/styles.css.js +14 -14
  242. package/lib/internal/template/token/styles.scoped.css +48 -48
  243. package/lib/internal/template/token/styles.selectors.js +14 -14
  244. package/package.json +1 -1
  245. package/lib/internal/template/internal/components/dropdown/context.d.ts.map +0 -1
  246. package/lib/internal/template/internal/components/dropdown/context.js.map +0 -1
  247. package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.d.ts.map +0 -1
  248. package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.js.map +0 -1
  249. package/lib/internal/template/internal/components/dropdown/dropdown-position.d.ts.map +0 -1
  250. package/lib/internal/template/internal/components/dropdown/dropdown-position.js.map +0 -1
  251. package/lib/internal/template/internal/components/dropdown/index.d.ts +0 -4
  252. package/lib/internal/template/internal/components/dropdown/index.d.ts.map +0 -1
  253. package/lib/internal/template/internal/components/dropdown/index.js.map +0 -1
  254. package/lib/internal/template/internal/components/dropdown/interfaces.d.ts.map +0 -1
  255. package/lib/internal/template/internal/components/dropdown/interfaces.js.map +0 -1
  256. /package/lib/internal/template/{internal/components/dropdown → dropdown}/context.d.ts +0 -0
  257. /package/lib/internal/template/{internal/components/dropdown → dropdown}/context.js +0 -0
  258. /package/lib/internal/template/{internal/components/dropdown → dropdown}/dropdown-position.d.ts +0 -0
  259. /package/lib/internal/template/{internal/components/dropdown → dropdown}/dropdown-position.js +0 -0
  260. /package/lib/internal/template/{internal/components/dropdown → dropdown}/interfaces.js +0 -0
@@ -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_s5c52_145:not(#\9) {
145
+ .awsui_root_2rhyz_11grl_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_s5c52_149:not(#\9) {
149
+ .awsui_input_2rhyz_11grl_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-jatbiv, 4px);
180
180
  padding-inline: var(--space-field-horizontal-n5peob, 8px);
181
- color: var(--awsui-style-color-default-hzjhvz, var(--color-text-body-default-5qid0u, #16191f));
181
+ color: var(--awsui-style-color-default-u09ddc, var(--color-text-body-default-5qid0u, #16191f));
182
182
  inline-size: 100%;
183
183
  cursor: text;
184
184
  box-sizing: border-box;
185
- background-color: var(--awsui-style-background-default-hzjhvz, var(--color-background-input-default-1z2buq, #ffffff));
185
+ background-color: var(--awsui-style-background-default-u09ddc, var(--color-background-input-default-1z2buq, #ffffff));
186
186
  border-start-start-radius: var(--border-radius-input-4vr9on, 2px);
187
187
  border-start-end-radius: var(--border-radius-input-4vr9on, 2px);
188
188
  border-end-start-radius: var(--border-radius-input-4vr9on, 2px);
189
189
  border-end-end-radius: var(--border-radius-input-4vr9on, 2px);
190
- border-block: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-default-hzjhvz, var(--color-border-input-default-txli8y, #687078));
191
- border-inline: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-default-hzjhvz, var(--color-border-input-default-txli8y, #687078));
192
- box-shadow: var(--awsui-style-box-shadow-default-hzjhvz);
190
+ border-block: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-default-u09ddc, var(--color-border-input-default-txli8y, #687078));
191
+ border-inline: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-default-u09ddc, var(--color-border-input-default-txli8y, #687078));
192
+ box-shadow: var(--awsui-style-box-shadow-default-u09ddc);
193
193
  font-size: var(--font-size-body-m-vv54cm, 14px);
194
194
  line-height: var(--line-height-body-m-bedeoh, 22px);
195
195
  block-size: var(--size-vertical-input-8gzd1t, 32px);
196
196
  }
197
- .awsui_input_2rhyz_s5c52_149:not(#\9):hover {
198
- border-color: var(--awsui-style-border-color-hover-hzjhvz, var(--awsui-style-border-color-default-hzjhvz, var(--color-border-input-default-txli8y, #687078)));
199
- color: var(--awsui-style-color-hover-hzjhvz, var(--awsui-style-border-color-default-hzjhvz, var(--color-text-body-default-5qid0u, #16191f)));
200
- background-color: var(--awsui-style-background-hover-hzjhvz, var(--awsui-style-background-default-hzjhvz, var(--color-background-input-default-1z2buq, #ffffff)));
201
- box-shadow: var(--awsui-style-box-shadow-hover-hzjhvz, --awsui-style-box-shadow-default-hzjhvz);
197
+ .awsui_input_2rhyz_11grl_149:not(#\9):hover {
198
+ border-color: var(--awsui-style-border-color-hover-u09ddc, var(--awsui-style-border-color-default-u09ddc, var(--color-border-input-default-txli8y, #687078)));
199
+ color: var(--awsui-style-color-hover-u09ddc, var(--awsui-style-border-color-default-u09ddc, var(--color-text-body-default-5qid0u, #16191f)));
200
+ background-color: var(--awsui-style-background-hover-u09ddc, var(--awsui-style-background-default-u09ddc, var(--color-background-input-default-1z2buq, #ffffff)));
201
+ box-shadow: var(--awsui-style-box-shadow-hover-u09ddc, --awsui-style-box-shadow-default-u09ddc);
202
202
  }
203
- .awsui_input_2rhyz_s5c52_149.awsui_input-readonly_2rhyz_s5c52_203:not(#\9) {
204
- background-color: var(--awsui-style-background-readonly-hzjhvz, var(--awsui-style-background-default-hzjhvz, var(--color-background-input-default-1z2buq, #ffffff)));
205
- border-block: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-readonly-hzjhvz, var(--awsui-style-border-color-default-hzjhvz, var(--color-border-input-disabled-tz38ro, #eaeded)));
206
- border-inline: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-readonly-hzjhvz, var(--awsui-style-border-color-default-hzjhvz, var(--color-border-input-disabled-tz38ro, #eaeded)));
207
- color: var(--awsui-style-color-readonly-hzjhvz, var(--awsui-style-color-default-hzjhvz, var(--color-text-body-default-5qid0u, #16191f)));
208
- box-shadow: var(--awsui-style-box-shadow-readonly-hzjhvz);
203
+ .awsui_input_2rhyz_11grl_149.awsui_input-readonly_2rhyz_11grl_203:not(#\9) {
204
+ background-color: var(--awsui-style-background-readonly-u09ddc, var(--awsui-style-background-default-u09ddc, var(--color-background-input-default-1z2buq, #ffffff)));
205
+ border-block: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-readonly-u09ddc, var(--awsui-style-border-color-default-u09ddc, var(--color-border-input-disabled-tz38ro, #eaeded)));
206
+ border-inline: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-readonly-u09ddc, var(--awsui-style-border-color-default-u09ddc, var(--color-border-input-disabled-tz38ro, #eaeded)));
207
+ color: var(--awsui-style-color-readonly-u09ddc, var(--awsui-style-color-default-u09ddc, var(--color-text-body-default-5qid0u, #16191f)));
208
+ box-shadow: var(--awsui-style-box-shadow-readonly-u09ddc);
209
209
  }
210
- .awsui_input_2rhyz_s5c52_149:not(#\9)::-webkit-input-placeholder {
211
- color: var(--awsui-style-placeholder-color-hzjhvz, var(--color-text-input-placeholder-hvcry0, #687078));
212
- font-size: var(--awsui-style-placeholder-font-size-hzjhvz);
213
- font-style: var(--awsui-style-placeholder-font-style-hzjhvz, italic);
214
- font-weight: var(--awsui-style-placeholder-font-weight-hzjhvz);
210
+ .awsui_input_2rhyz_11grl_149:not(#\9)::-webkit-input-placeholder {
211
+ color: var(--awsui-style-placeholder-color-u09ddc, var(--color-text-input-placeholder-hvcry0, #687078));
212
+ font-size: var(--awsui-style-placeholder-font-size-u09ddc);
213
+ font-style: var(--awsui-style-placeholder-font-style-u09ddc, italic);
214
+ font-weight: var(--awsui-style-placeholder-font-weight-u09ddc);
215
215
  -webkit-user-select: none;
216
216
  user-select: none;
217
217
  }
218
- .awsui_input_2rhyz_s5c52_149:not(#\9)::-moz-placeholder {
219
- color: var(--awsui-style-placeholder-color-hzjhvz, var(--color-text-input-placeholder-hvcry0, #687078));
220
- font-size: var(--awsui-style-placeholder-font-size-hzjhvz);
221
- font-style: var(--awsui-style-placeholder-font-style-hzjhvz, italic);
222
- font-weight: var(--awsui-style-placeholder-font-weight-hzjhvz);
218
+ .awsui_input_2rhyz_11grl_149:not(#\9)::-moz-placeholder {
219
+ color: var(--awsui-style-placeholder-color-u09ddc, var(--color-text-input-placeholder-hvcry0, #687078));
220
+ font-size: var(--awsui-style-placeholder-font-size-u09ddc);
221
+ font-style: var(--awsui-style-placeholder-font-style-u09ddc, italic);
222
+ font-weight: var(--awsui-style-placeholder-font-weight-u09ddc);
223
223
  opacity: 1;
224
224
  }
225
- .awsui_input_2rhyz_s5c52_149:not(#\9):-moz-placeholder {
226
- color: var(--awsui-style-placeholder-color-hzjhvz, var(--color-text-input-placeholder-hvcry0, #687078));
227
- font-size: var(--awsui-style-placeholder-font-size-hzjhvz);
228
- font-style: var(--awsui-style-placeholder-font-style-hzjhvz, italic);
229
- font-weight: var(--awsui-style-placeholder-font-weight-hzjhvz);
225
+ .awsui_input_2rhyz_11grl_149:not(#\9):-moz-placeholder {
226
+ color: var(--awsui-style-placeholder-color-u09ddc, var(--color-text-input-placeholder-hvcry0, #687078));
227
+ font-size: var(--awsui-style-placeholder-font-size-u09ddc);
228
+ font-style: var(--awsui-style-placeholder-font-style-u09ddc, italic);
229
+ font-weight: var(--awsui-style-placeholder-font-weight-u09ddc);
230
230
  opacity: 1;
231
231
  }
232
- .awsui_input_2rhyz_s5c52_149:not(#\9):focus {
232
+ .awsui_input_2rhyz_11grl_149:not(#\9):focus {
233
233
  outline: 2px dotted transparent;
234
- border-block: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-focus-hzjhvz, var(--color-border-input-focused-lslq4r, #0073bb));
235
- border-inline: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-focus-hzjhvz, var(--color-border-input-focused-lslq4r, #0073bb));
234
+ border-block: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-focus-u09ddc, var(--color-border-input-focused-lslq4r, #0073bb));
235
+ border-inline: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-focus-u09ddc, var(--color-border-input-focused-lslq4r, #0073bb));
236
236
  border-start-start-radius: var(--border-radius-input-4vr9on, 2px);
237
237
  border-start-end-radius: var(--border-radius-input-4vr9on, 2px);
238
238
  border-end-start-radius: var(--border-radius-input-4vr9on, 2px);
239
239
  border-end-end-radius: var(--border-radius-input-4vr9on, 2px);
240
- box-shadow: var(--awsui-style-box-shadow-focus-hzjhvz, 0 0 0 var(--border-control-focus-ring-shadow-spread-ql2vj7, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
241
- color: var(--awsui-style-color-focus-hzjhvz, var(--color-text-body-default-5qid0u, #16191f));
242
- background-color: var(--awsui-style-background-focus-hzjhvz, var(--color-background-input-default-1z2buq, #ffffff));
240
+ box-shadow: var(--awsui-style-box-shadow-focus-u09ddc, 0 0 0 var(--border-control-focus-ring-shadow-spread-ql2vj7, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
241
+ color: var(--awsui-style-color-focus-u09ddc, var(--color-text-body-default-5qid0u, #16191f));
242
+ background-color: var(--awsui-style-background-focus-u09ddc, var(--color-background-input-default-1z2buq, #ffffff));
243
243
  }
244
- .awsui_input_2rhyz_s5c52_149:not(#\9):disabled {
245
- background-color: var(--awsui-style-background-disabled-hzjhvz, var(--color-background-input-disabled-4vlau3, #eaeded));
246
- border-block: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-disabled-hzjhvz, var(--color-border-input-disabled-tz38ro, #eaeded));
247
- border-inline: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-disabled-hzjhvz, var(--color-border-input-disabled-tz38ro, #eaeded));
248
- color: var(--awsui-style-color-disabled-hzjhvz, var(--color-text-input-disabled-y5t5v9, #879596));
244
+ .awsui_input_2rhyz_11grl_149:not(#\9):disabled {
245
+ background-color: var(--awsui-style-background-disabled-u09ddc, var(--color-background-input-disabled-4vlau3, #eaeded));
246
+ border-block: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-disabled-u09ddc, var(--color-border-input-disabled-tz38ro, #eaeded));
247
+ border-inline: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-disabled-u09ddc, var(--color-border-input-disabled-tz38ro, #eaeded));
248
+ color: var(--awsui-style-color-disabled-u09ddc, var(--color-text-input-disabled-y5t5v9, #879596));
249
249
  cursor: default;
250
- box-shadow: var(--awsui-style-box-shadow-disabled-hzjhvz);
250
+ box-shadow: var(--awsui-style-box-shadow-disabled-u09ddc);
251
251
  }
252
- .awsui_input_2rhyz_s5c52_149:not(#\9):disabled::-webkit-input-placeholder {
253
- color: var(--awsui-style-placeholder-color-hzjhvz, var(--color-text-input-placeholder-disabled-x4lauf, #687078));
252
+ .awsui_input_2rhyz_11grl_149:not(#\9):disabled::-webkit-input-placeholder {
253
+ color: var(--awsui-style-placeholder-color-u09ddc, var(--color-text-input-placeholder-disabled-x4lauf, #687078));
254
254
  -webkit-user-select: none;
255
255
  user-select: none;
256
256
  }
257
- .awsui_input_2rhyz_s5c52_149:not(#\9):disabled::-moz-placeholder {
258
- color: var(--awsui-style-placeholder-color-hzjhvz, var(--color-text-input-placeholder-disabled-x4lauf, #687078));
257
+ .awsui_input_2rhyz_11grl_149:not(#\9):disabled::-moz-placeholder {
258
+ color: var(--awsui-style-placeholder-color-u09ddc, var(--color-text-input-placeholder-disabled-x4lauf, #687078));
259
259
  opacity: 1;
260
260
  }
261
- .awsui_input_2rhyz_s5c52_149:not(#\9):disabled:-moz-placeholder {
262
- color: var(--awsui-style-placeholder-color-hzjhvz, var(--color-text-input-placeholder-disabled-x4lauf, #687078));
261
+ .awsui_input_2rhyz_11grl_149:not(#\9):disabled:-moz-placeholder {
262
+ color: var(--awsui-style-placeholder-color-u09ddc, var(--color-text-input-placeholder-disabled-x4lauf, #687078));
263
263
  opacity: 1;
264
264
  }
265
- .awsui_input_2rhyz_s5c52_149:not(#\9):invalid {
265
+ .awsui_input_2rhyz_11grl_149:not(#\9):invalid {
266
266
  box-shadow: none;
267
267
  }
268
- .awsui_input_2rhyz_s5c52_149.awsui_input-invalid_2rhyz_s5c52_266:not(#\9) {
269
- color: var(--awsui-style-color-default-hzjhvz, var(--color-text-status-error-aknuvu, #d13212));
270
- border-color: var(--awsui-style-border-color-default-hzjhvz, var(--color-text-status-error-aknuvu, #d13212));
268
+ .awsui_input_2rhyz_11grl_149.awsui_input-invalid_2rhyz_11grl_266:not(#\9) {
269
+ color: var(--awsui-style-color-default-u09ddc, var(--color-text-status-error-aknuvu, #d13212));
270
+ border-color: var(--awsui-style-border-color-default-u09ddc, var(--color-text-status-error-aknuvu, #d13212));
271
271
  padding-inline-start: calc(var(--space-field-horizontal-n5peob, 8px) - (var(--border-invalid-width-z5cnpo, 4px) - var(--border-width-field-9k1tdz, 1px)));
272
272
  border-inline-start-width: var(--border-invalid-width-z5cnpo, 4px);
273
273
  }
274
- .awsui_input_2rhyz_s5c52_149.awsui_input-invalid_2rhyz_s5c52_266:not(#\9):focus {
275
- box-shadow: var(--awsui-style-box-shadow-focus-hzjhvz, 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-t0us6n, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
274
+ .awsui_input_2rhyz_11grl_149.awsui_input-invalid_2rhyz_11grl_266:not(#\9):focus {
275
+ box-shadow: var(--awsui-style-box-shadow-focus-u09ddc, 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-t0us6n, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
276
276
  }
277
- .awsui_input_2rhyz_s5c52_149.awsui_input-invalid_2rhyz_s5c52_266.awsui_input-has-icon-left_2rhyz_s5c52_275:not(#\9) {
277
+ .awsui_input_2rhyz_11grl_149.awsui_input-invalid_2rhyz_11grl_266.awsui_input-has-icon-left_2rhyz_11grl_275:not(#\9) {
278
278
  padding-inline-start: calc(var(--space-field-icon-offset-ihoxql, 32px) - (var(--border-invalid-width-z5cnpo, 4px) - var(--border-width-field-9k1tdz, 1px)));
279
279
  }
280
- .awsui_input_2rhyz_s5c52_149.awsui_input-warning_2rhyz_s5c52_278:not(#\9) {
281
- color: var(--awsui-style-color-default-hzjhvz, var(--color-text-status-warning-9b45qh, #906806));
282
- border-color: var(--awsui-style-border-color-default-hzjhvz, var(--color-text-status-warning-9b45qh, #906806));
280
+ .awsui_input_2rhyz_11grl_149.awsui_input-warning_2rhyz_11grl_278:not(#\9) {
281
+ color: var(--awsui-style-color-default-u09ddc, var(--color-text-status-warning-9b45qh, #906806));
282
+ border-color: var(--awsui-style-border-color-default-u09ddc, var(--color-text-status-warning-9b45qh, #906806));
283
283
  padding-inline-start: calc(var(--space-field-horizontal-n5peob, 8px) - (var(--border-invalid-width-z5cnpo, 4px) - var(--border-width-field-9k1tdz, 1px)));
284
284
  border-inline-start-width: var(--border-invalid-width-z5cnpo, 4px);
285
285
  }
286
- .awsui_input_2rhyz_s5c52_149.awsui_input-warning_2rhyz_s5c52_278:not(#\9):focus {
287
- box-shadow: var(--awsui-style-box-shadow-focus-hzjhvz, 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-t0us6n, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
286
+ .awsui_input_2rhyz_11grl_149.awsui_input-warning_2rhyz_11grl_278:not(#\9):focus {
287
+ box-shadow: var(--awsui-style-box-shadow-focus-u09ddc, 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-t0us6n, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
288
288
  }
289
- .awsui_input_2rhyz_s5c52_149.awsui_input-warning_2rhyz_s5c52_278.awsui_input-has-icon-left_2rhyz_s5c52_275:not(#\9) {
289
+ .awsui_input_2rhyz_11grl_149.awsui_input-warning_2rhyz_11grl_278.awsui_input-has-icon-left_2rhyz_11grl_275:not(#\9) {
290
290
  padding-inline-start: calc(var(--space-field-icon-offset-ihoxql, 32px) - (var(--border-invalid-width-z5cnpo, 4px) - var(--border-width-field-9k1tdz, 1px)));
291
291
  }
292
- .awsui_input_2rhyz_s5c52_149.awsui_input-type-search_2rhyz_s5c52_290:not(#\9) {
292
+ .awsui_input_2rhyz_11grl_149.awsui_input-type-search_2rhyz_11grl_290:not(#\9) {
293
293
  box-sizing: border-box;
294
294
  -webkit-appearance: none;
295
295
  }
296
- .awsui_input_2rhyz_s5c52_149.awsui_input-type-search_2rhyz_s5c52_290:not(#\9)::-webkit-search-decoration {
296
+ .awsui_input_2rhyz_11grl_149.awsui_input-type-search_2rhyz_11grl_290:not(#\9)::-webkit-search-decoration {
297
297
  -webkit-appearance: none;
298
298
  }
299
- .awsui_input_2rhyz_s5c52_149.awsui_input-type-search_2rhyz_s5c52_290:not(#\9)::-webkit-search-cancel-button {
299
+ .awsui_input_2rhyz_11grl_149.awsui_input-type-search_2rhyz_11grl_290:not(#\9)::-webkit-search-cancel-button {
300
300
  display: none;
301
301
  }
302
- .awsui_input_2rhyz_s5c52_149.awsui_input-has-icon-left_2rhyz_s5c52_275:not(#\9) {
302
+ .awsui_input_2rhyz_11grl_149.awsui_input-has-icon-left_2rhyz_11grl_275:not(#\9) {
303
303
  padding-inline-start: var(--space-field-icon-offset-ihoxql, 32px);
304
304
  }
305
- .awsui_input_2rhyz_s5c52_149.awsui_input-has-icon-right_2rhyz_s5c52_303:not(#\9) {
305
+ .awsui_input_2rhyz_11grl_149.awsui_input-has-icon-right_2rhyz_11grl_303:not(#\9) {
306
306
  padding-inline-end: var(--space-field-icon-offset-ihoxql, 32px);
307
307
  }
308
- .awsui_input_2rhyz_s5c52_149.awsui_input-has-no-border-radius_2rhyz_s5c52_306:not(#\9) {
308
+ .awsui_input_2rhyz_11grl_149.awsui_input-has-no-border-radius_2rhyz_11grl_306:not(#\9) {
309
309
  border-start-start-radius: var(--border-radius-dropdown-oaxffg, 0px);
310
310
  border-start-end-radius: var(--border-radius-dropdown-oaxffg, 0px);
311
311
  border-end-start-radius: var(--border-radius-dropdown-oaxffg, 0px);
312
312
  border-end-end-radius: var(--border-radius-dropdown-oaxffg, 0px);
313
313
  }
314
314
 
315
- .awsui_input-container_2rhyz_s5c52_313:not(#\9) {
315
+ .awsui_input-container_2rhyz_11grl_313:not(#\9) {
316
316
  display: flex;
317
317
  position: relative;
318
318
  }
319
319
 
320
- .awsui_input-icon-left_2rhyz_s5c52_318:not(#\9) {
320
+ .awsui_input-icon-left_2rhyz_11grl_318:not(#\9) {
321
321
  position: absolute;
322
322
  pointer-events: none;
323
323
  inset-inline-start: var(--space-field-horizontal-n5peob, 8px);
324
324
  inset-block-start: calc(50% - var(--line-height-body-m-bedeoh, 22px) / 2);
325
325
  }
326
326
 
327
- .awsui_input-icon-right_2rhyz_s5c52_325:not(#\9) {
327
+ .awsui_input-icon-right_2rhyz_11grl_325:not(#\9) {
328
328
  position: absolute;
329
329
  inset-block-start: calc(calc(50% - var(--line-height-body-m-bedeoh, 22px) / 2) - var(--space-xxxs-3w1kr2, 2px));
330
330
  inset-inline-end: calc(var(--space-field-horizontal-n5peob, 8px) - var(--space-xxs-jnczic, 4px));
331
331
  }
332
332
 
333
- .awsui_input-button-right_2rhyz_s5c52_331:not(#\9) {
333
+ .awsui_input-button-right_2rhyz_11grl_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_s5c52_145",
6
- "input": "awsui_input_2rhyz_s5c52_149",
7
- "input-readonly": "awsui_input-readonly_2rhyz_s5c52_203",
8
- "input-invalid": "awsui_input-invalid_2rhyz_s5c52_266",
9
- "input-has-icon-left": "awsui_input-has-icon-left_2rhyz_s5c52_275",
10
- "input-warning": "awsui_input-warning_2rhyz_s5c52_278",
11
- "input-type-search": "awsui_input-type-search_2rhyz_s5c52_290",
12
- "input-has-icon-right": "awsui_input-has-icon-right_2rhyz_s5c52_303",
13
- "input-has-no-border-radius": "awsui_input-has-no-border-radius_2rhyz_s5c52_306",
14
- "input-container": "awsui_input-container_2rhyz_s5c52_313",
15
- "input-icon-left": "awsui_input-icon-left_2rhyz_s5c52_318",
16
- "input-icon-right": "awsui_input-icon-right_2rhyz_s5c52_325",
17
- "input-button-right": "awsui_input-button-right_2rhyz_s5c52_331"
5
+ "root": "awsui_root_2rhyz_11grl_145",
6
+ "input": "awsui_input_2rhyz_11grl_149",
7
+ "input-readonly": "awsui_input-readonly_2rhyz_11grl_203",
8
+ "input-invalid": "awsui_input-invalid_2rhyz_11grl_266",
9
+ "input-has-icon-left": "awsui_input-has-icon-left_2rhyz_11grl_275",
10
+ "input-warning": "awsui_input-warning_2rhyz_11grl_278",
11
+ "input-type-search": "awsui_input-type-search_2rhyz_11grl_290",
12
+ "input-has-icon-right": "awsui_input-has-icon-right_2rhyz_11grl_303",
13
+ "input-has-no-border-radius": "awsui_input-has-no-border-radius_2rhyz_11grl_306",
14
+ "input-container": "awsui_input-container_2rhyz_11grl_313",
15
+ "input-icon-left": "awsui_input-icon-left_2rhyz_11grl_318",
16
+ "input-icon-right": "awsui_input-icon-right_2rhyz_11grl_325",
17
+ "input-button-right": "awsui_input-button-right_2rhyz_11grl_331"
18
18
  };
19
19
 
@@ -1 +1 @@
1
- {"version":3,"file":"analytics-funnel.d.ts","sourceRoot":"","sources":["../../../../../src/internal/analytics/components/analytics-funnel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAQvE,OAAO,EAKL,sBAAsB,EAEtB,yBAAyB,EAC1B,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EACL,iBAAi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CAC3C;AAED,eAAO,MAAM,mBAAmB,GAAI,OAAO,wBAAwB,gBAMlE,CAAC;AAoOF,UAAU,2BAA2B;IACnC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IAC5D,mBAAmB,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACxD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,yBAAyB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CACtF;AAED,eAAO,MAAM,sBAAsB,GAAI,uDAIpC,2BAA2B,gBAmG7B,CAAC"}
1
+ {"version":3,"file":"analytics-funnel.d.ts","sourceRoot":"","sources":["../../../../../src/internal/analytics/components/analytics-funnel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAQvE,OAAO,EAKL,sBAAsB,EAEtB,yBAAyB,EAC1B,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EAGlB,MAAM,eAAe,CAAC;AAavB,UAAU,oBAAoB;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACxC,mBAAmB,CAAC,EAAE,MAAM,MAAM,EAAE,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,MAAM,EAAE,CAAC;IACpC,UAAU,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAC3C,mBAAmB,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;IAC7D,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;IACvD,gBAAgB,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IAC3D,cAAc,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC/C,kBAAkB,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACvD,kBAAkB,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;CACxD;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,gBAa1D,CAAC;AAEF,eAAO,MAAM,kCAAkC,kCAAkC,CAAC;AAuOlF,UAAU,wBAAwB;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IACzD,gBAAgB,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,sBAAsB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAClF,gBAAgB,CAAC,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAC;IACvD,UAAU,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;CAC3C;AAED,eAAO,MAAM,mBAAmB,GAAI,OAAO,wBAAwB,gBAMlE,CAAC;AAoOF,UAAU,2BAA2B;IACnC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IAC5D,mBAAmB,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACxD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,yBAAyB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CACtF;AAED,eAAO,MAAM,sBAAsB,GAAI,uDAIpC,2BAA2B,gBAmG7B,CAAC"}
@@ -66,6 +66,7 @@ const InnerAnalyticsFunnel = ({ mounted = true, children, stepConfiguration, ...
66
66
  const wizardCount = useRef(0);
67
67
  const latestFocusCleanupFunction = useRef(undefined);
68
68
  const formSubmitStartTime = useRef(0);
69
+ const activeValidationTimerId = useRef();
69
70
  // This useEffect hook is run once on component mount to initiate the funnel analytics.
70
71
  // It first calls the 'funnelStart' method from FunnelMetrics, providing all necessary details
71
72
  // about the funnel, and receives a unique interaction id.
@@ -129,6 +130,7 @@ const InnerAnalyticsFunnel = ({ mounted = true, children, stepConfiguration, ...
129
130
  // A funnel counts as "successful" if it is unmounted after being "complete".
130
131
  /* eslint-disable react-hooks/exhaustive-deps */
131
132
  return () => {
133
+ clearTimeout(activeValidationTimerId.current);
132
134
  clearTimeout(handle);
133
135
  // There is no need in cleanup if the funnel was not started.
134
136
  if (!funnelInteractionId) {
@@ -160,6 +162,7 @@ const InnerAnalyticsFunnel = ({ mounted = true, children, stepConfiguration, ...
160
162
  }, [mounted]);
161
163
  /* eslint-enable react-hooks/exhaustive-deps */
162
164
  const funnelSubmit = () => {
165
+ clearTimeout(activeValidationTimerId.current);
163
166
  funnelState.current = 'validating';
164
167
  formSubmitStartTime.current = performance.now();
165
168
  /*
@@ -178,7 +181,7 @@ const InnerAnalyticsFunnel = ({ mounted = true, children, stepConfiguration, ...
178
181
  return;
179
182
  }
180
183
  if (loadingButtonCount.current > 0) {
181
- setTimeout(checkForCompleteness, LOADING_WAIT_DELAY);
184
+ activeValidationTimerId.current = setTimeout(checkForCompleteness, LOADING_WAIT_DELAY);
182
185
  return;
183
186
  }
184
187
  if (errorCount.current === 0) {
@@ -199,7 +202,7 @@ const InnerAnalyticsFunnel = ({ mounted = true, children, stepConfiguration, ...
199
202
  funnelState.current = 'default';
200
203
  }
201
204
  };
202
- setTimeout(checkForCompleteness, VALIDATION_WAIT_DELAY);
205
+ activeValidationTimerId.current = setTimeout(checkForCompleteness, VALIDATION_WAIT_DELAY);
203
206
  };
204
207
  const funnelNextOrSubmitAttempt = () => setSubmissionAttempt(i => i + 1);
205
208
  const funnelCancel = () => { };
@@ -1 +1 @@
1
- {"version":3,"file":"analytics-funnel.js","sourceRoot":"","sources":["../../../../../src/internal/analytics/components/analytics-funnel.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,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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,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,cAAc,GAAG,KAAK,CAAC;AAiB7B,MAAM,CAAC,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O,EAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;gBAC/G,gBAAgB,CAAC,OAAO,GAAG,KAAK,CAAC;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 const activeValidationTimerId = useRef<ReturnType<typeof setTimeout>>();\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(activeValidationTimerId.current);\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 clearTimeout(activeValidationTimerId.current);\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 activeValidationTimerId.current = 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 activeValidationTimerId.current = 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"]}
@@ -3818,5 +3818,5 @@ body {
3818
3818
  }
3819
3819
  }
3820
3820
  :root {
3821
- --awsui-version-info-7d3ac020: true;
3821
+ --awsui-version-info-c8acad4a: true;
3822
3822
  }
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { AutosuggestProps } from '../../../autosuggest/interfaces';
3
+ import { ExpandToViewport } from '../../../dropdown/interfaces';
3
4
  import { BaseChangeDetail, BaseInputProps, InputAutoCorrect, InputClearLabel, InputKeyEvents, InputProps } from '../../../input/interfaces';
4
5
  import { BaseComponentProps } from '../../base-component';
5
6
  import { FormFieldValidationControlProps } from '../../context/form-field-context';
6
7
  import { NonCancelableEventHandler } from '../../events';
7
8
  import { InternalBaseComponentProps } from '../../hooks/use-base-component';
8
- import { ExpandToViewport } from '../dropdown/interfaces';
9
9
  interface AutosuggestInputProps extends BaseComponentProps, BaseInputProps, InputAutoCorrect, InputKeyEvents, InputClearLabel, FormFieldValidationControlProps, ExpandToViewport, InternalBaseComponentProps {
10
10
  ariaControls?: string;
11
11
  ariaActivedescendant?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAKrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,UAAU,EACX,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,+BAA+B,EAAuB,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAA8D,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACrH,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAO5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D,UAAU,qBACR,SAAQ,kBAAkB,EACxB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,+BAA+B,EAC/B,gBAAgB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AC,GAAG;IAC/D,KAAK,CAAC,OAAO,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACpD,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;CACf;AAED,QAAA,MAAM,gBAAgB,mGA4RrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -3,6 +3,7 @@
3
3
  import React, { useEffect, useImperativeHandle, useRef, useState } from 'react';
4
4
  import clsx from 'clsx';
5
5
  import { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';
6
+ import InternalDropdown from '../../../dropdown/internal';
6
7
  import InternalInput from '../../../input/internal';
7
8
  import { getBaseProps } from '../../base-component';
8
9
  import { getBreakpointValue } from '../../breakpoints';
@@ -13,7 +14,6 @@ import { KeyCode } from '../../keycode';
13
14
  import { getDropdownMinWidth } from '../../utils/get-dropdown-min-width';
14
15
  import { nodeBelongs } from '../../utils/node-belongs';
15
16
  import { processAttributes } from '../../utils/with-native-attributes';
16
- import Dropdown from '../dropdown';
17
17
  import styles from './styles.css.js';
18
18
  const AutosuggestInput = React.forwardRef(({ value, onChange, onBlur, onFocus, onKeyUp, onKeyDown, name, placeholder, disabled, readOnly, autoFocus, ariaLabel, ariaRequired, disableBrowserAutocorrect = false, expandToViewport, ariaControls, ariaActivedescendant, clearAriaLabel, dropdownExpanded = true, dropdownContentKey, dropdownContentFocusable = false, dropdownContent = null, dropdownFooter = null, dropdownWidth, loopFocus, nativeInputAttributes, onCloseDropdown, onDelayedInput, onPressArrowDown, onPressArrowUp, onPressEnter, style, __internalRootRef, ...restProps }, ref) => {
19
19
  const baseProps = getBaseProps(restProps);
@@ -185,7 +185,7 @@ const AutosuggestInput = React.forwardRef(({ value, onChange, onBlur, onFocus, o
185
185
  }
186
186
  };
187
187
  return (React.createElement("div", { ...baseProps, className: clsx(baseProps.className, styles.root), ref: __internalRootRef },
188
- React.createElement(Dropdown, { minWidth: getDropdownMinWidth({ expandToViewport, triggerWidth, dropdownWidth }), maxWidth: getBreakpointValue('xxs'), contentKey: dropdownContentKey, onFocus: handleFocus, onBlur: handleBlur, trigger: React.createElement(InternalInput, { type: "visualSearch", value: value, onChange: event => handleChange(event.detail.value), __onDelayedInput: event => handleDelayedInput(event.detail.value), onKeyDown: handleKeyDown, onKeyUp: onKeyUp, disabled: disabled, disableBrowserAutocorrect: disableBrowserAutocorrect, readOnly: readOnly, ariaRequired: ariaRequired, clearAriaLabel: clearAriaLabel, ref: inputRef, autoComplete: false, nativeInputAttributes: processAttributes(nativeAttributes, nativeInputAttributes, 'Autosuggest'), __skipNativeAttributesWarnings: Object.keys(nativeAttributes), style: style, ...formFieldContext }), onMouseDown: handleDropdownMouseDown, open: open && (!!dropdownContent || !!dropdownFooter), footer: dropdownFooterRef && (React.createElement("div", { ref: dropdownFooterRef, className: styles['dropdown-footer'], onKeyDown: handleDropdownKeyDown }, open && dropdownFooter ? dropdownFooter : null)), expandToViewport: expandToViewport, loopFocus: loopFocus, content: open && dropdownContent ? (React.createElement("div", { ref: dropdownContentRef, className: styles['dropdown-content'] }, dropdownContent)) : null })));
188
+ React.createElement(InternalDropdown, { minWidth: getDropdownMinWidth({ expandToViewport, triggerWidth, dropdownWidth }), maxWidth: getBreakpointValue('xxs'), contentKey: dropdownContentKey, onFocus: handleFocus, onBlur: handleBlur, trigger: React.createElement(InternalInput, { type: "visualSearch", value: value, onChange: event => handleChange(event.detail.value), __onDelayedInput: event => handleDelayedInput(event.detail.value), onKeyDown: handleKeyDown, onKeyUp: onKeyUp, disabled: disabled, disableBrowserAutocorrect: disableBrowserAutocorrect, readOnly: readOnly, ariaRequired: ariaRequired, clearAriaLabel: clearAriaLabel, ref: inputRef, autoComplete: false, nativeInputAttributes: processAttributes(nativeAttributes, nativeInputAttributes, 'Autosuggest'), __skipNativeAttributesWarnings: Object.keys(nativeAttributes), style: style, ...formFieldContext }), onMouseDown: handleDropdownMouseDown, open: open && (!!dropdownContent || !!dropdownFooter), footer: dropdownFooterRef && (React.createElement("div", { ref: dropdownFooterRef, className: styles['dropdown-footer'], onKeyDown: handleDropdownKeyDown }, open && dropdownFooter ? dropdownFooter : null)), expandToViewport: expandToViewport, loopFocus: loopFocus, content: open && dropdownContent ? (React.createElement("div", { ref: dropdownContentRef, className: styles['dropdown-content'] }, dropdownContent)) : null })));
189
189
  });
190
190
  export default AutosuggestInput;
191
191
  //# sourceMappingURL=index.js.map