@doist/reactist 28.7.4 → 29.1.0

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 (267) hide show
  1. package/CHANGELOG.md +536 -549
  2. package/CODE_OF_CONDUCT.md +10 -10
  3. package/README.md +3 -5
  4. package/dist/reactist.cjs.development.js +483 -468
  5. package/dist/reactist.cjs.development.js.map +1 -1
  6. package/dist/reactist.cjs.production.min.js +1 -1
  7. package/dist/reactist.cjs.production.min.js.map +1 -1
  8. package/es/avatar/avatar.js +4 -4
  9. package/es/avatar/avatar.js.map +1 -1
  10. package/es/avatar/utils.js.map +1 -1
  11. package/es/banner/banner.js +24 -22
  12. package/es/banner/banner.js.map +1 -1
  13. package/es/banner/banner.module.css.js +1 -1
  14. package/es/base-field/base-field.js +15 -18
  15. package/es/base-field/base-field.js.map +1 -1
  16. package/es/box/box.js +3 -3
  17. package/es/box/box.js.map +1 -1
  18. package/es/button/button.js +1 -1
  19. package/es/button/button.js.map +1 -1
  20. package/es/checkbox-field/checkbox-field.js +1 -1
  21. package/es/checkbox-field/checkbox-field.js.map +1 -1
  22. package/es/checkbox-field/checkbox-icon.js +1 -1
  23. package/es/checkbox-field/checkbox-icon.js.map +1 -1
  24. package/es/checkbox-field/use-fork-ref.js.map +1 -1
  25. package/es/columns/columns.js +1 -1
  26. package/es/columns/columns.js.map +1 -1
  27. package/es/components/color-picker/color-picker.js +2 -2
  28. package/es/components/color-picker/color-picker.js.map +1 -1
  29. package/es/components/deprecated-button/deprecated-button.js +1 -1
  30. package/es/components/deprecated-button/deprecated-button.js.map +1 -1
  31. package/es/components/deprecated-dropdown/dropdown.js +4 -4
  32. package/es/components/deprecated-dropdown/dropdown.js.map +1 -1
  33. package/es/components/deprecated-input/input.js.map +1 -1
  34. package/es/components/deprecated-select/select.js +1 -1
  35. package/es/components/deprecated-select/select.js.map +1 -1
  36. package/es/components/key-capturer/key-capturer.js +46 -36
  37. package/es/components/key-capturer/key-capturer.js.map +1 -1
  38. package/es/components/keyboard-shortcut/keyboard-shortcut.js +1 -1
  39. package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  40. package/es/components/progress-bar/progress-bar.js +1 -1
  41. package/es/components/progress-bar/progress-bar.js.map +1 -1
  42. package/es/components/time/time-utils.js +1 -1
  43. package/es/components/time/time-utils.js.map +1 -1
  44. package/es/components/time/time.js +4 -4
  45. package/es/components/time/time.js.map +1 -1
  46. package/es/divider/divider.js +1 -1
  47. package/es/divider/divider.js.map +1 -1
  48. package/es/heading/heading.js +1 -1
  49. package/es/heading/heading.js.map +1 -1
  50. package/es/hidden/hidden.js +2 -2
  51. package/es/hidden/hidden.js.map +1 -1
  52. package/es/hidden-visually/hidden-visually.js +1 -1
  53. package/es/hidden-visually/hidden-visually.js.map +1 -1
  54. package/es/icons/alert-icon.js +1 -1
  55. package/es/icons/alert-icon.js.map +1 -1
  56. package/es/icons/banner-icon.js +1 -1
  57. package/es/icons/banner-icon.js.map +1 -1
  58. package/es/index.js +5 -5
  59. package/es/inline/inline.js +1 -1
  60. package/es/inline/inline.js.map +1 -1
  61. package/es/loading/loading.js +1 -1
  62. package/es/loading/loading.js.map +1 -1
  63. package/es/menu/menu.js +2 -2
  64. package/es/menu/menu.js.map +1 -1
  65. package/es/modal/modal.js +22 -22
  66. package/es/modal/modal.js.map +1 -1
  67. package/es/modal/modal.module.css.js +1 -1
  68. package/es/notice/notice.js +1 -1
  69. package/es/notice/notice.js.map +1 -1
  70. package/es/password-field/password-field.js +2 -2
  71. package/es/prose/prose.js.map +1 -1
  72. package/es/select-field/select-field.js.map +1 -1
  73. package/es/select-field/select-field.module.css.js +1 -1
  74. package/es/spinner/spinner.js.map +1 -1
  75. package/es/stack/stack.js +2 -2
  76. package/es/stack/stack.js.map +1 -1
  77. package/es/switch-field/switch-field.js +2 -2
  78. package/es/switch-field/switch-field.js.map +1 -1
  79. package/es/tabs/tabs.js +4 -4
  80. package/es/tabs/tabs.js.map +1 -1
  81. package/es/text/text.js +1 -1
  82. package/es/text/text.js.map +1 -1
  83. package/es/text-area/text-area.js.map +1 -1
  84. package/es/text-field/text-field.js +1 -1
  85. package/es/text-field/text-field.js.map +1 -1
  86. package/es/text-field/text-field.module.css.js +1 -1
  87. package/es/text-link/text-link.js.map +1 -1
  88. package/es/toast/static-toast.js +1 -1
  89. package/es/toast/toast-animation.js +4 -4
  90. package/es/toast/toast-animation.js.map +1 -1
  91. package/es/toast/use-toasts.js +2 -2
  92. package/es/toast/use-toasts.js.map +1 -1
  93. package/es/tooltip/tooltip.js +2 -2
  94. package/es/tooltip/tooltip.js.map +1 -1
  95. package/es/utils/common-helpers.js +5 -0
  96. package/es/utils/common-helpers.js.map +1 -1
  97. package/es/utils/responsive-props.js +1 -1
  98. package/es/utils/responsive-props.js.map +1 -1
  99. package/lib/avatar/avatar.d.ts +1 -1
  100. package/lib/avatar/avatar.js +4 -4
  101. package/lib/avatar/avatar.js.map +1 -1
  102. package/lib/avatar/utils.d.ts +1 -1
  103. package/lib/avatar/utils.js.map +1 -1
  104. package/lib/banner/banner.d.ts +2 -1
  105. package/lib/banner/banner.js +24 -22
  106. package/lib/banner/banner.js.map +1 -1
  107. package/lib/banner/banner.module.css.js +1 -1
  108. package/lib/banner/index.d.ts +1 -1
  109. package/lib/base-field/base-field.d.ts +1 -1
  110. package/lib/base-field/base-field.js +15 -18
  111. package/lib/base-field/base-field.js.map +1 -1
  112. package/lib/box/box.d.ts +2 -2
  113. package/lib/box/box.js +3 -3
  114. package/lib/box/box.js.map +1 -1
  115. package/lib/button/button.d.ts +3 -3
  116. package/lib/button/button.js +1 -1
  117. package/lib/button/button.js.map +1 -1
  118. package/lib/checkbox-field/checkbox-field.js +1 -1
  119. package/lib/checkbox-field/checkbox-field.js.map +1 -1
  120. package/lib/checkbox-field/checkbox-icon.js +1 -1
  121. package/lib/checkbox-field/checkbox-icon.js.map +1 -1
  122. package/lib/checkbox-field/use-fork-ref.d.ts +0 -1
  123. package/lib/checkbox-field/use-fork-ref.js.map +1 -1
  124. package/lib/columns/columns.d.ts +3 -3
  125. package/lib/columns/columns.js +1 -1
  126. package/lib/columns/columns.js.map +1 -1
  127. package/lib/components/color-picker/color-picker.d.ts +2 -2
  128. package/lib/components/color-picker/color-picker.js +2 -2
  129. package/lib/components/color-picker/color-picker.js.map +1 -1
  130. package/lib/components/color-picker/index.d.ts +1 -1
  131. package/lib/components/deprecated-button/deprecated-button.d.ts +4 -4
  132. package/lib/components/deprecated-button/deprecated-button.js +1 -1
  133. package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
  134. package/lib/components/deprecated-dropdown/dropdown.d.ts +1 -1
  135. package/lib/components/deprecated-dropdown/dropdown.js +4 -4
  136. package/lib/components/deprecated-dropdown/dropdown.js.map +1 -1
  137. package/lib/components/deprecated-input/input.d.ts +1 -1
  138. package/lib/components/deprecated-input/input.js.map +1 -1
  139. package/lib/components/deprecated-select/select.d.ts +1 -1
  140. package/lib/components/deprecated-select/select.js +1 -1
  141. package/lib/components/deprecated-select/select.js.map +1 -1
  142. package/lib/components/key-capturer/key-capturer.d.ts +1 -1
  143. package/lib/components/key-capturer/key-capturer.js +46 -36
  144. package/lib/components/key-capturer/key-capturer.js.map +1 -1
  145. package/lib/components/keyboard-shortcut/keyboard-shortcut.d.ts +1 -1
  146. package/lib/components/keyboard-shortcut/keyboard-shortcut.js +1 -1
  147. package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  148. package/lib/components/progress-bar/progress-bar.js +1 -1
  149. package/lib/components/progress-bar/progress-bar.js.map +1 -1
  150. package/lib/components/time/time-utils.d.ts +2 -1
  151. package/lib/components/time/time-utils.js +1 -1
  152. package/lib/components/time/time-utils.js.map +1 -1
  153. package/lib/components/time/time.d.ts +2 -2
  154. package/lib/components/time/time.js +4 -4
  155. package/lib/components/time/time.js.map +1 -1
  156. package/lib/divider/divider.js +1 -1
  157. package/lib/divider/divider.js.map +1 -1
  158. package/lib/heading/heading.d.ts +7 -7
  159. package/lib/heading/heading.js +1 -1
  160. package/lib/heading/heading.js.map +1 -1
  161. package/lib/hidden/hidden.js +2 -2
  162. package/lib/hidden/hidden.js.map +1 -1
  163. package/lib/hidden-visually/hidden-visually.js +1 -1
  164. package/lib/hidden-visually/hidden-visually.js.map +1 -1
  165. package/lib/icons/alert-icon.js +1 -1
  166. package/lib/icons/alert-icon.js.map +1 -1
  167. package/lib/icons/banner-icon.js +1 -1
  168. package/lib/icons/banner-icon.js.map +1 -1
  169. package/lib/index.d.ts +5 -5
  170. package/lib/index.js +16 -16
  171. package/lib/inline/inline.d.ts +3 -3
  172. package/lib/inline/inline.js +1 -1
  173. package/lib/inline/inline.js.map +1 -1
  174. package/lib/loading/loading.js +1 -1
  175. package/lib/loading/loading.js.map +1 -1
  176. package/lib/menu/index.d.ts +2 -2
  177. package/lib/menu/menu.d.ts +4 -4
  178. package/lib/menu/menu.js +2 -2
  179. package/lib/menu/menu.js.map +1 -1
  180. package/lib/modal/modal-stories-components.d.ts +3 -3
  181. package/lib/modal/modal.d.ts +4 -4
  182. package/lib/modal/modal.js +23 -23
  183. package/lib/modal/modal.js.map +1 -1
  184. package/lib/modal/modal.module.css.js +1 -1
  185. package/lib/notice/notice.js +1 -1
  186. package/lib/notice/notice.js.map +1 -1
  187. package/lib/password-field/password-field.d.ts +1 -1
  188. package/lib/password-field/password-field.js +2 -2
  189. package/lib/prose/index.d.ts +1 -1
  190. package/lib/prose/prose.js.map +1 -1
  191. package/lib/select-field/select-field.d.ts +1 -1
  192. package/lib/select-field/select-field.js.map +1 -1
  193. package/lib/select-field/select-field.module.css.js +1 -1
  194. package/lib/spinner/spinner.js.map +1 -1
  195. package/lib/stack/stack.d.ts +2 -2
  196. package/lib/stack/stack.js +2 -2
  197. package/lib/stack/stack.js.map +1 -1
  198. package/lib/switch-field/switch-field.d.ts +1 -1
  199. package/lib/switch-field/switch-field.js +2 -2
  200. package/lib/switch-field/switch-field.js.map +1 -1
  201. package/lib/tabs/tabs.d.ts +2 -2
  202. package/lib/tabs/tabs.js +4 -4
  203. package/lib/tabs/tabs.js.map +1 -1
  204. package/lib/text/text.d.ts +1 -1
  205. package/lib/text/text.js +1 -1
  206. package/lib/text/text.js.map +1 -1
  207. package/lib/text-area/text-area.d.ts +1 -1
  208. package/lib/text-area/text-area.js.map +1 -1
  209. package/lib/text-field/text-field.d.ts +1 -2
  210. package/lib/text-field/text-field.js +1 -1
  211. package/lib/text-field/text-field.js.map +1 -1
  212. package/lib/text-field/text-field.module.css.js +1 -1
  213. package/lib/text-link/text-link.js.map +1 -1
  214. package/lib/toast/index.d.ts +2 -2
  215. package/lib/toast/static-toast.d.ts +1 -1
  216. package/lib/toast/static-toast.js +1 -1
  217. package/lib/toast/toast-animation.js +4 -4
  218. package/lib/toast/toast-animation.js.map +1 -1
  219. package/lib/toast/use-toasts.d.ts +1 -1
  220. package/lib/toast/use-toasts.js +2 -2
  221. package/lib/toast/use-toasts.js.map +1 -1
  222. package/lib/tooltip/index.d.ts +1 -1
  223. package/lib/tooltip/tooltip.d.ts +1 -1
  224. package/lib/tooltip/tooltip.js +2 -2
  225. package/lib/tooltip/tooltip.js.map +1 -1
  226. package/lib/utils/common-helpers.d.ts +3 -0
  227. package/lib/utils/common-helpers.js +5 -0
  228. package/lib/utils/common-helpers.js.map +1 -1
  229. package/lib/utils/responsive-props.d.ts +1 -1
  230. package/lib/utils/responsive-props.js +1 -1
  231. package/lib/utils/responsive-props.js.map +1 -1
  232. package/lib/utils/storybook-helper.d.ts +2 -2
  233. package/lib/utils/test-helpers.d.ts +2 -2
  234. package/package.json +19 -14
  235. package/styles/avatar.css +3 -3
  236. package/styles/badge.css +2 -2
  237. package/styles/banner.css +4 -4
  238. package/styles/banner.module.css.css +1 -1
  239. package/styles/base-field.css +6 -6
  240. package/styles/box.css +3 -3
  241. package/styles/button.css +2 -2
  242. package/styles/checkbox-field.css +2 -2
  243. package/styles/columns.css +2 -2
  244. package/styles/divider.css +2 -2
  245. package/styles/heading.css +2 -2
  246. package/styles/hidden-visually.css +2 -2
  247. package/styles/hidden.css +2 -2
  248. package/styles/index.css +5 -5
  249. package/styles/loading.css +2 -2
  250. package/styles/modal.css +5 -5
  251. package/styles/modal.module.css.css +1 -1
  252. package/styles/notice.css +2 -2
  253. package/styles/password-field.css +8 -8
  254. package/styles/prose.css +2 -2
  255. package/styles/reactist.css +8 -8
  256. package/styles/select-field.css +6 -6
  257. package/styles/select-field.module.css.css +1 -1
  258. package/styles/static-toast.css +2 -2
  259. package/styles/switch-field.css +6 -6
  260. package/styles/tabs.css +2 -2
  261. package/styles/text-area.css +5 -5
  262. package/styles/text-field.css +6 -6
  263. package/styles/text-field.module.css.css +1 -1
  264. package/styles/text-link.css +2 -2
  265. package/styles/text.css +2 -2
  266. package/styles/tooltip.css +2 -2
  267. package/styles/use-toasts.css +2 -2
@@ -115,19 +115,19 @@ function mapResponsiveProp(fromValue, mapper) {
115
115
  return {
116
116
  mobile: fromValue.mobile ? mapper(fromValue.mobile) : undefined,
117
117
  tablet: fromValue.tablet ? mapper(fromValue.tablet) : undefined,
118
- desktop: fromValue.desktop ? mapper(fromValue.desktop) : undefined
118
+ desktop: fromValue.desktop ? mapper(fromValue.desktop) : undefined,
119
119
  };
120
120
  }
121
121
 
122
122
  var modules_54d944f2 = {"box":"_19abae45","position-absolute":"c77f2a47","position-fixed":"_2fe771e3","position-relative":"_7fb159a0","position-sticky":"_1b0c2c53","tablet-position-absolute":"fbfd01f5","tablet-position-fixed":"_718d00e5","tablet-position-relative":"ce0fef03","tablet-position-sticky":"_8ede9d51","desktop-position-absolute":"_5037d59d","desktop-position-fixed":"_2cf38f34","desktop-position-relative":"bf2d89a9","desktop-position-sticky":"_0a00a995","display-block":"_5e944bac","display-flex":"a7c6de33","display-inline":"_8ed03dfe","display-inlineBlock":"d7c72ae2","display-inlineFlex":"baf095bf","display-none":"fdecf61b","tablet-display-block":"e67bff4d","tablet-display-flex":"cd8908ce","tablet-display-inline":"_859da319","tablet-display-inlineBlock":"_9cfe10c7","tablet-display-inlineFlex":"bdc812ae","tablet-display-none":"_21f0dae7","desktop-display-block":"d94bf997","desktop-display-flex":"e6925ae5","desktop-display-inline":"_57151837","desktop-display-inlineBlock":"_7721cd07","desktop-display-inlineFlex":"_0e197a41","desktop-display-none":"dc1fe7a5","flexDirection-column":"_1e47f652","flexDirection-row":"_194d8611","tablet-flexDirection-column":"_11ca3004","tablet-flexDirection-row":"_7e4f2f2b","desktop-flexDirection-column":"fbca1929","desktop-flexDirection-row":"_50dd05a2","flexWrap-wrap":"afd15909","flexWrap-nowrap":"_7682c7ed","flexShrink-0":"b834b77e","flexGrow-0":"_89d517e2","flexGrow-1":"bfa58fdf","alignItems-flexStart":"_4e2075e2","alignItems-center":"_8ad6a17c","alignItems-flexEnd":"a6235493","alignItems-baseline":"_1e964f8a","tablet-alignItems-flexStart":"_87c0c7f8","tablet-alignItems-center":"_812a2195","tablet-alignItems-flexEnd":"_207fa4f7","tablet-alignItems-baseline":"_6415fbe8","desktop-alignItems-flexStart":"_84ec8c58","desktop-alignItems-center":"afdff695","desktop-alignItems-flexEnd":"_78607c32","desktop-alignItems-baseline":"_57428c98","justifyContent-flexStart":"_9e8363f8","justifyContent-center":"f88bdaf1","justifyContent-flexEnd":"_0315ed60","justifyContent-spaceAround":"_81fc01b2","justifyContent-spaceBetween":"_54d85bfe","justifyContent-spaceEvenly":"b09b6390","tablet-justifyContent-flexStart":"bea77b61","tablet-justifyContent-center":"_2f6925fc","tablet-justifyContent-flexEnd":"_462a9e07","tablet-justifyContent-spaceAround":"_1c555ae4","tablet-justifyContent-spaceBetween":"_7a9768a8","tablet-justifyContent-spaceEvenly":"_859b8158","desktop-justifyContent-flexStart":"c190fc20","desktop-justifyContent-center":"_73777561","desktop-justifyContent-flexEnd":"d2151eb8","desktop-justifyContent-spaceBetween":"b8ec7870","alignSelf-stretch":"d607c41c","alignSelf-flexStart":"_30b9c3a2","alignSelf-center":"f1f37bf1","alignSelf-flexEnd":"_341847ab","alignSelf-baseline":"_2c7dfaf8","tablet-alignSelf-stretch":"_8be172b1","tablet-alignSelf-flexStart":"_84af0ad2","tablet-alignSelf-center":"_2fb0b3f1","tablet-alignSelf-flexEnd":"d8b98da0","tablet-alignSelf-baseline":"_096c96ed","desktop-alignSelf-stretch":"_217cc45f","desktop-alignSelf-flexStart":"_29964d59","desktop-alignSelf-center":"e76ee627","desktop-alignSelf-flexEnd":"_7435c694","desktop-alignSelf-baseline":"_84758309","overflow-hidden":"_47471e4e","overflow-auto":"_37460640","overflow-visible":"_73d1ede9","overflow-scroll":"a39c32d7","height-full":"_5cede05a","bg-default":"b50b47ee","bg-aside":"_5912d165","bg-highlight":"c4b77c63","bg-selected":"_7ab4d8a9","bg-toast":"_9ce2e0c1","borderRadius-standard":"f6a2af5a","borderRadius-full":"_7e67e1f6","border-primary":"f5b8570f","border-secondary":"_5dd76b5f","border-tertiary":"_7c14c801","textAlign-start":"_57086b20","textAlign-center":"b7f35b86","textAlign-end":"_6596dbcd","textAlign-justify":"d5210e4f","tablet-textAlign-start":"_97da11d5","tablet-textAlign-center":"_9add5f3d","tablet-textAlign-end":"f8b12189","tablet-textAlign-justify":"d5acd111","desktop-textAlign-start":"b33bdab7","desktop-textAlign-center":"_0fc7972b","desktop-textAlign-end":"a0f648ae","desktop-textAlign-justify":"a0bdba20","overlayScroll":"d19e99ad"};
123
123
 
124
- var modules_b537a8ee = {"paddingTop-xsmall":"c4803194","paddingTop-small":"_4e9ab24b","paddingTop-medium":"_1d226e27","paddingTop-large":"eb6097f1","paddingTop-xlarge":"d3229ba4","paddingTop-xxlarge":"_47978ba4","tablet-paddingTop-xsmall":"f987719c","tablet-paddingTop-small":"_8dbc4b4d","tablet-paddingTop-medium":"ae44fe07","tablet-paddingTop-large":"ffe9548d","tablet-paddingTop-xlarge":"f2b76a44","tablet-paddingTop-xxlarge":"c6eb8f43","desktop-paddingTop-xsmall":"_8699b560","desktop-paddingTop-small":"_02c374b7","desktop-paddingTop-medium":"_0dd0332f","desktop-paddingTop-large":"da55f1f6","desktop-paddingTop-xlarge":"_8ef2a278","desktop-paddingTop-xxlarge":"_8b493b28","paddingRight-xsmall":"_211eebc7","paddingRight-small":"ad0ccf15","paddingRight-medium":"a03e39af","paddingRight-large":"f0941ead","paddingRight-xlarge":"e47c5a43","paddingRight-xxlarge":"e849a5cf","tablet-paddingRight-xsmall":"_85374228","tablet-paddingRight-small":"_89df37b9","tablet-paddingRight-medium":"_1cc50ebe","tablet-paddingRight-large":"_1060982b","tablet-paddingRight-xlarge":"be58847d","tablet-paddingRight-xxlarge":"_45093484","desktop-paddingRight-xsmall":"f8d99d6a","desktop-paddingRight-small":"efa076d9","desktop-paddingRight-medium":"e59caa64","desktop-paddingRight-large":"da42f46a","desktop-paddingRight-xlarge":"b3ee2580","desktop-paddingRight-xxlarge":"_3ef94658","paddingBottom-xsmall":"b0e6eab4","paddingBottom-small":"_9510d053","paddingBottom-medium":"d7af60c9","paddingBottom-large":"b75f86cd","paddingBottom-xlarge":"fbd4ce29","paddingBottom-xxlarge":"_33e3ad63","tablet-paddingBottom-xsmall":"f0302da7","tablet-paddingBottom-small":"_4f9b8012","tablet-paddingBottom-medium":"_4333e20e","tablet-paddingBottom-large":"_30bbc76c","tablet-paddingBottom-xlarge":"ba5a4008","tablet-paddingBottom-xxlarge":"_423a3b1a","desktop-paddingBottom-xsmall":"b40139b7","desktop-paddingBottom-small":"f96071fa","desktop-paddingBottom-medium":"fe803c9a","desktop-paddingBottom-large":"_01686eb9","desktop-paddingBottom-xlarge":"afa763d8","desktop-paddingBottom-xxlarge":"a95785f1","paddingLeft-xsmall":"cad4e2ec","paddingLeft-small":"d70b3c17","paddingLeft-medium":"_8c851bd6","paddingLeft-large":"_078feb3c","paddingLeft-xlarge":"_76ab968c","paddingLeft-xxlarge":"aaca85d7","tablet-paddingLeft-xsmall":"_5eb0e5aa","tablet-paddingLeft-small":"_0384fb4f","tablet-paddingLeft-medium":"edffff6f","tablet-paddingLeft-large":"_873b9a46","tablet-paddingLeft-xlarge":"_89105db5","tablet-paddingLeft-xxlarge":"db1966fe","desktop-paddingLeft-xsmall":"b17f826b","desktop-paddingLeft-small":"_6dc83610","desktop-paddingLeft-medium":"_3421b8b2","desktop-paddingLeft-large":"_68cec7a6","desktop-paddingLeft-xlarge":"_94bde020","desktop-paddingLeft-xxlarge":"b94ee579"};
124
+ var modules_8b5c09cb = {"gap-none":"_64ed24f4","gap-xsmall":"_2580a74b","gap-small":"c68f8bf6","gap-medium":"_43e5f8e9","gap-large":"_966b120f","gap-xlarge":"f957894c","gap-xxlarge":"_8cca104b","tablet-gap-none":"_5797cee2","tablet-gap-xsmall":"_9015672f","tablet-gap-small":"_7ec86eec","tablet-gap-medium":"_714d7179","tablet-gap-large":"ae1deb59","tablet-gap-xlarge":"e1cfce55","tablet-gap-xxlarge":"_168a8ff8","desktop-gap-none":"_43e2b619","desktop-gap-xsmall":"_0ea9bf88","desktop-gap-small":"d451307a","desktop-gap-medium":"bf93cf66","desktop-gap-large":"_1430cddf","desktop-gap-xlarge":"fa00c93e","desktop-gap-xxlarge":"_6f3aee54"};
125
125
 
126
126
  var modules_131405ac = {"marginTop-xsmall":"c7813d79","marginTop-small":"d3449da6","marginTop-medium":"_4ea254c1","marginTop-large":"c0844f64","marginTop-xlarge":"_213145b4","marginTop-xxlarge":"df61c84c","marginTop--xsmall":"efe72b13","marginTop--small":"_870c2768","marginTop--medium":"_0b927c57","marginTop--large":"_461db014","marginTop--xlarge":"_2a3a8cb8","marginTop--xxlarge":"_9bcda921","tablet-marginTop-xsmall":"_6add01e4","tablet-marginTop-small":"_735ef86b","tablet-marginTop-medium":"_0477d068","tablet-marginTop-large":"_2c90af97","tablet-marginTop-xlarge":"_63a82db6","tablet-marginTop-xxlarge":"_03cd7726","tablet-marginTop--xsmall":"c986a62a","tablet-marginTop--small":"be2bdcdd","tablet-marginTop--medium":"_47d2686b","tablet-marginTop--large":"_25e5af9d","tablet-marginTop--xlarge":"ee82f441","tablet-marginTop--xxlarge":"a6f9d404","desktop-marginTop-xsmall":"_4d8d9a36","desktop-marginTop-small":"e813cee7","desktop-marginTop-medium":"_56975b7d","desktop-marginTop-large":"_53b367f6","desktop-marginTop-xlarge":"d69e7311","desktop-marginTop-xxlarge":"_92f57c7e","desktop-marginTop--xsmall":"_96880d3e","desktop-marginTop--small":"dc3f3555","desktop-marginTop--medium":"_86dd06bb","desktop-marginTop--large":"c93ef12e","desktop-marginTop--xlarge":"bc8fd4a2","desktop-marginTop--xxlarge":"b12a9124","marginRight-xsmall":"_6016f4fb","marginRight-small":"b85e3dfa","marginRight-medium":"_297575f4","marginRight-large":"b401ac6c","marginRight-xlarge":"dc3ec387","marginRight-xxlarge":"_24694604","marginRight--xsmall":"_8e9bf2ee","marginRight--small":"ae9d1115","marginRight--medium":"_14e46fc3","marginRight--large":"_3370631b","marginRight--xlarge":"_3f0e9b50","marginRight--xxlarge":"bc13e010","tablet-marginRight-xsmall":"_6fa1aae3","tablet-marginRight-small":"_2976c5cb","tablet-marginRight-medium":"_38d94802","tablet-marginRight-large":"db9569b5","tablet-marginRight-xlarge":"_4a52f06d","tablet-marginRight-xxlarge":"_8a0f0410","tablet-marginRight--xsmall":"e7d40e9d","tablet-marginRight--small":"_680fde91","tablet-marginRight--medium":"_021010ca","tablet-marginRight--large":"_9e52c87c","tablet-marginRight--xlarge":"_4d602613","tablet-marginRight--xxlarge":"_21b1b65a","desktop-marginRight-xsmall":"_7321bc07","desktop-marginRight-small":"fa1721f4","desktop-marginRight-medium":"_3fd7b4b8","desktop-marginRight-large":"_4fdc2f74","desktop-marginRight-xlarge":"c0254761","desktop-marginRight-xxlarge":"_710a5f09","desktop-marginRight--xsmall":"e08bee7f","desktop-marginRight--small":"e5ab73d2","desktop-marginRight--medium":"_5e731477","desktop-marginRight--large":"_0f57a22e","desktop-marginRight--xlarge":"_25f26ed3","desktop-marginRight--xxlarge":"_11a3b4e0","marginBottom-xsmall":"_6a4f69f7","marginBottom-small":"db26b033","marginBottom-medium":"c7313022","marginBottom-large":"a5885889","marginBottom-xlarge":"_33dfbd8e","marginBottom-xxlarge":"_795ad2de","marginBottom--xsmall":"a329dbd3","marginBottom--small":"_85e739fb","marginBottom--medium":"_681f65ff","marginBottom--large":"caf50d8f","marginBottom--xlarge":"_1e084cbf","marginBottom--xxlarge":"_3dfb1c7e","tablet-marginBottom-xsmall":"ef4735be","tablet-marginBottom-small":"de55afba","tablet-marginBottom-medium":"_0e33ce88","tablet-marginBottom-large":"_8ca391fc","tablet-marginBottom-xlarge":"_3a609d23","tablet-marginBottom-xxlarge":"_3e1177e4","tablet-marginBottom--xsmall":"d384884d","tablet-marginBottom--small":"_75254cec","tablet-marginBottom--medium":"_5d9f127d","tablet-marginBottom--large":"_835f1089","tablet-marginBottom--xlarge":"dad52a72","tablet-marginBottom--xxlarge":"_8703a4bf","desktop-marginBottom-xsmall":"_90fd20e9","desktop-marginBottom-small":"f3769191","desktop-marginBottom-medium":"_156410f8","desktop-marginBottom-large":"_7fed74d0","desktop-marginBottom-xlarge":"_477dc10e","desktop-marginBottom-xxlarge":"_85c82d89","desktop-marginBottom--xsmall":"_4f09c1e0","desktop-marginBottom--small":"_9523e048","desktop-marginBottom--medium":"efe10240","desktop-marginBottom--large":"c43971e6","desktop-marginBottom--xlarge":"f9b4da15","desktop-marginBottom--xxlarge":"a10fdf70","marginLeft-xsmall":"f9be90b4","marginLeft-small":"f53218d5","marginLeft-medium":"c4a9b3ab","marginLeft-large":"_5755e2c3","marginLeft-xlarge":"_33fc9354","marginLeft-xxlarge":"_4749a3bf","marginLeft--xsmall":"c76cb3c7","marginLeft--small":"_96003c07","marginLeft--medium":"_09988d07","marginLeft--large":"b4a486f6","marginLeft--xlarge":"f396e75e","marginLeft--xxlarge":"_81d1f26d","tablet-marginLeft-xsmall":"_0a46e8f1","tablet-marginLeft-small":"_57c970af","tablet-marginLeft-medium":"_4b6099d3","tablet-marginLeft-large":"_378fcff5","tablet-marginLeft-xlarge":"f8785663","tablet-marginLeft-xxlarge":"_72f957ee","tablet-marginLeft--xsmall":"_2288c7e1","tablet-marginLeft--small":"b27c1c05","tablet-marginLeft--medium":"_702cbb13","tablet-marginLeft--large":"_1a2748b4","tablet-marginLeft--xlarge":"b8c043a5","tablet-marginLeft--xxlarge":"_8dc8ff63","desktop-marginLeft-xsmall":"c2af646d","desktop-marginLeft-small":"c03d07be","desktop-marginLeft-medium":"_915fb1d3","desktop-marginLeft-large":"_64214ee1","desktop-marginLeft-xlarge":"_7be4a22c","desktop-marginLeft-xxlarge":"_5ec0a401","desktop-marginLeft--xsmall":"ea29f1ee","desktop-marginLeft--small":"c26652c7","desktop-marginLeft--medium":"c24f6af9","desktop-marginLeft--large":"c2671f27","desktop-marginLeft--xlarge":"cc51a04e","desktop-marginLeft--xxlarge":"fd581f54"};
127
127
 
128
- var modules_89b7671c = {"minWidth-0":"_68ab48ca","minWidth-xsmall":"_6fa2b565","minWidth-small":"dd50fabd","minWidth-medium":"e7e2c808","minWidth-large":"_6abbe25e","minWidth-xlarge":"_54f479ac","maxWidth-xsmall":"_148492bc","maxWidth-small":"bd023b96","maxWidth-medium":"e102903f","maxWidth-large":"_0e8d76d7","maxWidth-xlarge":"_47a031d0","maxWidth-full":"cd4c8183","width-0":"_5f5959e8","width-full":"_8c75067a","width-auto":"_56a651f6","width-maxContent":"_26f87bb8","width-minContent":"_07a6ab44","width-fitContent":"a87016fa","width-xsmall":"_1a972e50","width-small":"c96d8261","width-medium":"f3829d42","width-large":"_2caef228","width-xlarge":"_069e1491"};
128
+ var modules_b537a8ee = {"paddingTop-xsmall":"c4803194","paddingTop-small":"_4e9ab24b","paddingTop-medium":"_1d226e27","paddingTop-large":"eb6097f1","paddingTop-xlarge":"d3229ba4","paddingTop-xxlarge":"_47978ba4","tablet-paddingTop-xsmall":"f987719c","tablet-paddingTop-small":"_8dbc4b4d","tablet-paddingTop-medium":"ae44fe07","tablet-paddingTop-large":"ffe9548d","tablet-paddingTop-xlarge":"f2b76a44","tablet-paddingTop-xxlarge":"c6eb8f43","desktop-paddingTop-xsmall":"_8699b560","desktop-paddingTop-small":"_02c374b7","desktop-paddingTop-medium":"_0dd0332f","desktop-paddingTop-large":"da55f1f6","desktop-paddingTop-xlarge":"_8ef2a278","desktop-paddingTop-xxlarge":"_8b493b28","paddingRight-xsmall":"_211eebc7","paddingRight-small":"ad0ccf15","paddingRight-medium":"a03e39af","paddingRight-large":"f0941ead","paddingRight-xlarge":"e47c5a43","paddingRight-xxlarge":"e849a5cf","tablet-paddingRight-xsmall":"_85374228","tablet-paddingRight-small":"_89df37b9","tablet-paddingRight-medium":"_1cc50ebe","tablet-paddingRight-large":"_1060982b","tablet-paddingRight-xlarge":"be58847d","tablet-paddingRight-xxlarge":"_45093484","desktop-paddingRight-xsmall":"f8d99d6a","desktop-paddingRight-small":"efa076d9","desktop-paddingRight-medium":"e59caa64","desktop-paddingRight-large":"da42f46a","desktop-paddingRight-xlarge":"b3ee2580","desktop-paddingRight-xxlarge":"_3ef94658","paddingBottom-xsmall":"b0e6eab4","paddingBottom-small":"_9510d053","paddingBottom-medium":"d7af60c9","paddingBottom-large":"b75f86cd","paddingBottom-xlarge":"fbd4ce29","paddingBottom-xxlarge":"_33e3ad63","tablet-paddingBottom-xsmall":"f0302da7","tablet-paddingBottom-small":"_4f9b8012","tablet-paddingBottom-medium":"_4333e20e","tablet-paddingBottom-large":"_30bbc76c","tablet-paddingBottom-xlarge":"ba5a4008","tablet-paddingBottom-xxlarge":"_423a3b1a","desktop-paddingBottom-xsmall":"b40139b7","desktop-paddingBottom-small":"f96071fa","desktop-paddingBottom-medium":"fe803c9a","desktop-paddingBottom-large":"_01686eb9","desktop-paddingBottom-xlarge":"afa763d8","desktop-paddingBottom-xxlarge":"a95785f1","paddingLeft-xsmall":"cad4e2ec","paddingLeft-small":"d70b3c17","paddingLeft-medium":"_8c851bd6","paddingLeft-large":"_078feb3c","paddingLeft-xlarge":"_76ab968c","paddingLeft-xxlarge":"aaca85d7","tablet-paddingLeft-xsmall":"_5eb0e5aa","tablet-paddingLeft-small":"_0384fb4f","tablet-paddingLeft-medium":"edffff6f","tablet-paddingLeft-large":"_873b9a46","tablet-paddingLeft-xlarge":"_89105db5","tablet-paddingLeft-xxlarge":"db1966fe","desktop-paddingLeft-xsmall":"b17f826b","desktop-paddingLeft-small":"_6dc83610","desktop-paddingLeft-medium":"_3421b8b2","desktop-paddingLeft-large":"_68cec7a6","desktop-paddingLeft-xlarge":"_94bde020","desktop-paddingLeft-xxlarge":"b94ee579"};
129
129
 
130
- var modules_8b5c09cb = {"gap-none":"_64ed24f4","gap-xsmall":"_2580a74b","gap-small":"c68f8bf6","gap-medium":"_43e5f8e9","gap-large":"_966b120f","gap-xlarge":"f957894c","gap-xxlarge":"_8cca104b","tablet-gap-none":"_5797cee2","tablet-gap-xsmall":"_9015672f","tablet-gap-small":"_7ec86eec","tablet-gap-medium":"_714d7179","tablet-gap-large":"ae1deb59","tablet-gap-xlarge":"e1cfce55","tablet-gap-xxlarge":"_168a8ff8","desktop-gap-none":"_43e2b619","desktop-gap-xsmall":"_0ea9bf88","desktop-gap-small":"d451307a","desktop-gap-medium":"bf93cf66","desktop-gap-large":"_1430cddf","desktop-gap-xlarge":"fa00c93e","desktop-gap-xxlarge":"_6f3aee54"};
130
+ var modules_89b7671c = {"minWidth-0":"_68ab48ca","minWidth-xsmall":"_6fa2b565","minWidth-small":"dd50fabd","minWidth-medium":"e7e2c808","minWidth-large":"_6abbe25e","minWidth-xlarge":"_54f479ac","maxWidth-xsmall":"_148492bc","maxWidth-small":"bd023b96","maxWidth-medium":"e102903f","maxWidth-large":"_0e8d76d7","maxWidth-xlarge":"_47a031d0","maxWidth-full":"cd4c8183","width-0":"_5f5959e8","width-full":"_8c75067a","width-auto":"_56a651f6","width-maxContent":"_26f87bb8","width-minContent":"_07a6ab44","width-fitContent":"a87016fa","width-xsmall":"_1a972e50","width-small":"c96d8261","width-medium":"f3829d42","width-large":"_2caef228","width-xlarge":"_069e1491"};
131
131
 
132
132
  function getBoxClassNames(_a) {
133
133
  var _b, _c, _d, _e, _f, _g, _h, _j;
@@ -188,7 +188,7 @@ var Box$1 = polymorphicComponent(function Box(_a, ref) {
188
188
  marginBottom: marginBottom,
189
189
  marginLeft: marginLeft,
190
190
  overlayScroll: overlayScroll,
191
- className: className
191
+ className: className,
192
192
  }), ref: ref }), children);
193
193
  });
194
194
 
@@ -225,31 +225,6 @@ function Divider(_a) {
225
225
  return React__namespace.createElement(Box$1, tslib.__assign({ as: "hr", className: getClassNames(modules_c742c4d7, 'weight', weight) }, props));
226
226
  }
227
227
 
228
- var Inline = polymorphicComponent(function Inline(_a, ref) {
229
- var as = _a.as, space = _a.space, _b = _a.align, align = _b === void 0 ? 'left' : _b, _c = _a.alignY, alignY = _c === void 0 ? 'center' : _c, children = _a.children, exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["as", "space", "align", "alignY", "children", "exceptionallySetClassName"]);
230
- return (React__namespace.createElement(Box$1, tslib.__assign({}, props, { as: as, display: "flex", flexWrap: "wrap", gap: space, className: exceptionallySetClassName, ref: ref, alignItems: mapResponsiveProp(alignY, function (alignY) {
231
- return alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' : 'center';
232
- }), justifyContent: mapResponsiveProp(align, function (align) {
233
- return align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : 'center';
234
- }) }), children));
235
- });
236
-
237
- var Stack = polymorphicComponent(function Stack(_a, ref) {
238
- var as = _a.as, space = _a.space, align = _a.align, _b = _a.dividers, dividers = _b === void 0 ? 'none' : _b, _c = _a.width, width = _c === void 0 ? 'full' : _c, children = _a.children, exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["as", "space", "align", "dividers", "width", "children", "exceptionallySetClassName"]);
239
- var alignItems = align === undefined
240
- ? undefined
241
- : mapResponsiveProp(align, function (align) {
242
- return align === 'start' ? 'flexStart' : align === 'end' ? 'flexEnd' : 'center';
243
- });
244
- return (React__namespace.createElement(Box$1, tslib.__assign({}, props, { display: "flex", flexDirection: "column", width: width, alignItems: alignItems, gap: space, as: as, className: exceptionallySetClassName, ref: ref }), dividers !== 'none'
245
- ? React__namespace.Children.map(flattenChildren__default["default"](children), function (child, index) {
246
- return index > 0 ? (React__namespace.createElement(React__namespace.Fragment, null,
247
- React__namespace.createElement(Divider, { weight: dividers }),
248
- child)) : (child);
249
- })
250
- : children));
251
- });
252
-
253
228
  var modules_4689e97e = {"hiddenOnPrint":"_0e595dea"};
254
229
 
255
230
  /**
@@ -287,7 +262,7 @@ var Hidden = polymorphicComponent(function Hidden(_a, ref) {
287
262
  : {
288
263
  mobile: hiddenOnMobile ? 'none' : display,
289
264
  tablet: hiddenOnTablet ? 'none' : display,
290
- desktop: hiddenOnDesktop ? 'none' : display
265
+ desktop: hiddenOnDesktop ? 'none' : display,
291
266
  } }), children));
292
267
  });
293
268
 
@@ -302,23 +277,30 @@ var HiddenVisually = polymorphicComponent(function HiddenVisually(props, ref) {
302
277
  return (React__namespace.createElement(Box$1, tslib.__assign({}, props, { ref: ref, position: "absolute", overflow: "hidden", className: modules_61c16c43.hiddenVisually })));
303
278
  });
304
279
 
305
- var uid = 0;
306
- function uniqueId() {
307
- return uid++;
308
- }
309
- function generateElementId(prefix) {
310
- var num = uniqueId();
311
- return "".concat(prefix, "-").concat(num);
312
- }
313
- function useId(providedId) {
314
- var ref = React__namespace.useRef(providedId !== null && providedId !== void 0 ? providedId : null);
315
- if (!ref.current) {
316
- ref.current = generateElementId('element');
317
- }
318
- return ref.current;
319
- }
280
+ var Inline = polymorphicComponent(function Inline(_a, ref) {
281
+ var as = _a.as, space = _a.space, _b = _a.align, align = _b === void 0 ? 'left' : _b, _c = _a.alignY, alignY = _c === void 0 ? 'center' : _c, children = _a.children, exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["as", "space", "align", "alignY", "children", "exceptionallySetClassName"]);
282
+ return (React__namespace.createElement(Box$1, tslib.__assign({}, props, { as: as, display: "flex", flexWrap: "wrap", gap: space, className: exceptionallySetClassName, ref: ref, alignItems: mapResponsiveProp(alignY, function (alignY) {
283
+ return alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' : 'center';
284
+ }), justifyContent: mapResponsiveProp(align, function (align) {
285
+ return align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : 'center';
286
+ }) }), children));
287
+ });
320
288
 
321
- var modules_afa80466 = {"banner":"e1b2ef74","image":"_8d3ff024","title":"_9ad57971","description":"_99daf106","secondary":"_59ea31f7","icon":"b1ae548b","closeButton":"c2e4ec08","copy":"cd270dad","inlineLink":"cbbd2929","staticContent":"d3bd2674","actions":"_1a63a5e1","content":"_1705b6ee"};
289
+ var Stack = polymorphicComponent(function Stack(_a, ref) {
290
+ var as = _a.as, space = _a.space, align = _a.align, _b = _a.dividers, dividers = _b === void 0 ? 'none' : _b, _c = _a.width, width = _c === void 0 ? 'full' : _c, children = _a.children, exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["as", "space", "align", "dividers", "width", "children", "exceptionallySetClassName"]);
291
+ var alignItems = align === undefined
292
+ ? undefined
293
+ : mapResponsiveProp(align, function (align) {
294
+ return align === 'start' ? 'flexStart' : align === 'end' ? 'flexEnd' : 'center';
295
+ });
296
+ return (React__namespace.createElement(Box$1, tslib.__assign({}, props, { display: "flex", flexDirection: "column", width: width, alignItems: alignItems, gap: space, as: as, className: exceptionallySetClassName, ref: ref }), dividers !== 'none'
297
+ ? React__namespace.Children.map(flattenChildren__default["default"](children), function (child, index) {
298
+ return index > 0 ? (React__namespace.createElement(React__namespace.Fragment, null,
299
+ React__namespace.createElement(Divider, { weight: dividers }),
300
+ child)) : (child);
301
+ })
302
+ : children));
303
+ });
322
304
 
323
305
  var modules_c7f5018f = {"svg":"_51539197","spinner":"_54fbe2b3","tint":"a0c466ed","fill":"_745b73d3"};
324
306
 
@@ -336,7 +318,7 @@ var defaultShowTimeout = 500;
336
318
  var defaultHideTimeout = 100;
337
319
  var TooltipContext = React__namespace.createContext({
338
320
  showTimeout: defaultShowTimeout,
339
- hideTimeout: defaultHideTimeout
321
+ hideTimeout: defaultHideTimeout,
340
322
  });
341
323
  function TooltipProvider(_a) {
342
324
  var _b = _a.showTimeout, showTimeout = _b === void 0 ? defaultShowTimeout : _b, _c = _a.hideTimeout, hideTimeout = _c === void 0 ? defaultHideTimeout : _c, children = _a.children;
@@ -349,7 +331,7 @@ var Tooltip = React__namespace.forwardRef(function (_a, ref) {
349
331
  var tooltip = react.useTooltipStore({
350
332
  placement: position,
351
333
  showTimeout: showTimeout !== null && showTimeout !== void 0 ? showTimeout : globalShowTimeout,
352
- hideTimeout: hideTimeout !== null && hideTimeout !== void 0 ? hideTimeout : globalHideTimeout
334
+ hideTimeout: hideTimeout !== null && hideTimeout !== void 0 ? hideTimeout : globalHideTimeout,
353
335
  });
354
336
  React__namespace.useImperativeHandle(ref, function () { return tooltip; }, [tooltip]);
355
337
  var isOpen = tooltip.useState('open');
@@ -418,11 +400,6 @@ var IconButton = React__namespace.forwardRef(function IconButton(_a, ref) {
418
400
  return tooltipContent ? (React__namespace.createElement(Tooltip, { content: tooltipContent }, buttonElement)) : (buttonElement);
419
401
  });
420
402
 
421
- function CloseIcon(props) {
422
- return (React__namespace.createElement("svg", tslib.__assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24" }, props),
423
- React__namespace.createElement("path", { fill: "currentColor", d: "M5.146 5.146a.5.5 0 0 1 .708 0L12 11.293l6.146-6.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 0 .708L12.707 12l6.147 6.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.708 0L12 12.707l-6.146 6.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1 0-.708L11.293 12 5.146 5.854a.5.5 0 0 1-.057-.638z" })));
424
- }
425
-
426
403
  var modules_de8ae2e5 = {"info":"_447f8e53","upgrade":"cdb7a2b8","experiment":"_210efb55","warning":"cd91167f","error":"a52763ee","success":"c6229331"};
427
404
 
428
405
  var bannerIconForType = {
@@ -431,7 +408,7 @@ var bannerIconForType = {
431
408
  experiment: BannerExperimentIcon,
432
409
  warning: BannerWarningIcon,
433
410
  error: BannerErrorIcon,
434
- success: BannerSuccessIcon
411
+ success: BannerSuccessIcon,
435
412
  };
436
413
  function BannerIcon(_a) {
437
414
  var type = _a.type, props = tslib.__rest(_a, ["type"]);
@@ -464,6 +441,11 @@ function BannerSuccessIcon(props) {
464
441
  React__namespace.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M21 12.25a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-5.555-2.99a.75.75 0 0 1 1.06 1.06l-5.303 5.303a.748.748 0 0 1-1.061 0L7.666 13.15a.75.75 0 1 1 1.06-1.06l1.945 1.944 4.774-4.773Z", clipRule: "evenodd" })));
465
442
  }
466
443
 
444
+ function CloseIcon(props) {
445
+ return (React__namespace.createElement("svg", tslib.__assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24" }, props),
446
+ React__namespace.createElement("path", { fill: "currentColor", d: "M5.146 5.146a.5.5 0 0 1 .708 0L12 11.293l6.146-6.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 0 .708L12.707 12l6.147 6.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.708 0L12 12.707l-6.146 6.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1 0-.708L11.293 12 5.146 5.854a.5.5 0 0 1-.057-.638z" })));
447
+ }
448
+
467
449
  var modules_3d05deee = {"default":"_468ce45c","inherit":"_54f92a1e","underline":"cdc8b08c","no-underline":"_06995bac","container":"d77fcdc6"};
468
450
 
469
451
  var TextLink = polymorphicComponent(function TextLink(_a, ref) {
@@ -476,6 +458,29 @@ var TextLink = polymorphicComponent(function TextLink(_a, ref) {
476
458
  ], ref: ref, target: openInNewTab ? '_blank' : undefined, rel: openInNewTab ? 'noopener noreferrer' : undefined })));
477
459
  });
478
460
 
461
+ var uid = 0;
462
+ function uniqueId() {
463
+ return uid++;
464
+ }
465
+ function generateElementId(prefix) {
466
+ var num = uniqueId();
467
+ return "".concat(prefix, "-").concat(num);
468
+ }
469
+ /**
470
+ * @deprecated Use `useId` available from React 18 or above instead.
471
+ */
472
+ function useId(providedId) {
473
+ var ref = React__namespace.useRef(providedId !== null && providedId !== void 0 ? providedId : null);
474
+ // eslint-disable-next-line react-hooks/refs
475
+ if (!ref.current) {
476
+ ref.current = generateElementId('element');
477
+ }
478
+ // eslint-disable-next-line react-hooks/refs
479
+ return ref.current;
480
+ }
481
+
482
+ var modules_afa80466 = {"banner":"_84addf6f","image":"_95759431","title":"_4103765b","description":"cf9f3361","secondary":"f4b524bc","icon":"_423bcd02","closeButton":"_0f89a4a4","copy":"_141483aa","inlineLink":"fd918521","actions":"e16490a8","topContent":"b1b4f510","content":"_105440c8"};
483
+
479
484
  /**
480
485
  * Type guard to check if the action is an Action object (button or link)
481
486
  */
@@ -486,30 +491,32 @@ function isActionObject$1(action) {
486
491
  (action.type === 'button' || action.type === 'link'));
487
492
  }
488
493
  var Banner = React__namespace.forwardRef(function Banner(_a, ref) {
489
- var id = _a.id, type = _a.type, title = _a.title, description = _a.description, action = _a.action, icon = _a.icon, image = _a.image, inlineLinks = _a.inlineLinks, closeLabel = _a.closeLabel, onClose = _a.onClose, props = tslib.__rest(_a, ["id", "type", "title", "description", "action", "icon", "image", "inlineLinks", "closeLabel", "onClose"]);
494
+ var id = _a.id, type = _a.type, title = _a.title, description = _a.description, children = _a.children, action = _a.action, icon = _a.icon, image = _a.image, inlineLinks = _a.inlineLinks, closeLabel = _a.closeLabel, onClose = _a.onClose, props = tslib.__rest(_a, ["id", "type", "title", "description", "children", "action", "icon", "image", "inlineLinks", "closeLabel", "onClose"]);
490
495
  var titleId = useId();
491
496
  var descriptionId = useId();
492
497
  var closeButton = onClose ? (React__namespace.createElement(IconButton, { exceptionallySetClassName: modules_afa80466.closeButton, variant: "quaternary", onClick: onClose, icon: React__namespace.createElement(CloseIcon, null), "aria-label": closeLabel !== null && closeLabel !== void 0 ? closeLabel : 'Close banner' })) : null;
493
498
  return (React__namespace.createElement(Box$1, tslib.__assign({}, props, { ref: ref, id: id, display: "flex", flexDirection: "column", justifyContent: "center", role: "status", "aria-labelledby": title ? titleId : descriptionId, "aria-describedby": title ? descriptionId : undefined, "aria-live": "polite", tabIndex: 0, borderRadius: "full", className: modules_afa80466.banner }),
494
499
  image ? React__namespace.createElement(Box$1, { className: modules_afa80466.image }, image) : null,
495
- React__namespace.createElement(Box$1, { className: modules_afa80466.content, display: "flex", gap: "small", alignItems: "center" },
496
- React__namespace.createElement(Box$1, { className: modules_afa80466.staticContent, display: "flex", gap: "small", flexGrow: 1 },
497
- React__namespace.createElement(Box$1, { className: modules_afa80466.icon },
498
- type === 'neutral' ? icon : React__namespace.createElement(BannerIcon, { type: type }),
499
- closeButton),
500
- React__namespace.createElement(Box$1, { className: modules_afa80466.copy, display: "flex", flexDirection: "column" },
501
- title ? (React__namespace.createElement(Box$1, { id: titleId, className: modules_afa80466.title }, title)) : null,
502
- React__namespace.createElement(Box$1, { id: descriptionId, className: [modules_afa80466.description, title ? modules_afa80466.secondary : null] },
503
- description, inlineLinks === null || inlineLinks === void 0 ? void 0 :
504
- inlineLinks.map(function (_a, index) {
505
- var label = _a.label, props = tslib.__rest(_a, ["label"]);
506
- return (React__namespace.createElement(React__namespace.Fragment, { key: index },
507
- React__namespace.createElement(TextLink, tslib.__assign({}, props, { exceptionallySetClassName: modules_afa80466.inlineLink }), label),
508
- index < inlineLinks.length - 1 ? React__namespace.createElement("span", null, " \u00B7 ") : ''));
509
- })))),
510
- action || closeButton ? (React__namespace.createElement(Box$1, { className: modules_afa80466.actions, display: "flex", gap: "small" },
511
- action ? (isActionObject$1(action) ? (action.type === 'button' ? (React__namespace.createElement(ActionButton, tslib.__assign({}, action))) : (React__namespace.createElement(ActionLink, tslib.__assign({}, action)))) : (action)) : null,
512
- closeButton)) : null)));
500
+ React__namespace.createElement(Box$1, { className: modules_afa80466.content, display: "flex", gap: "small" },
501
+ React__namespace.createElement(Box$1, { className: modules_afa80466.icon },
502
+ type === 'neutral' ? icon : React__namespace.createElement(BannerIcon, { type: type }),
503
+ closeButton),
504
+ React__namespace.createElement(Box$1, { display: "flex", flexDirection: "column", gap: "small", flexGrow: 1 },
505
+ React__namespace.createElement(Box$1, { className: modules_afa80466.topContent, display: "flex", gap: "small", alignItems: "flexStart" },
506
+ React__namespace.createElement(Box$1, { className: modules_afa80466.copy, display: "flex", flexDirection: "column", flexGrow: 1 },
507
+ title ? (React__namespace.createElement(Box$1, { id: titleId, className: modules_afa80466.title }, title)) : null,
508
+ React__namespace.createElement(Box$1, { id: descriptionId, className: [modules_afa80466.description, title ? modules_afa80466.secondary : null] },
509
+ description, inlineLinks === null || inlineLinks === void 0 ? void 0 :
510
+ inlineLinks.map(function (_a, index) {
511
+ var label = _a.label, props = tslib.__rest(_a, ["label"]);
512
+ return (React__namespace.createElement(React__namespace.Fragment, { key: index },
513
+ React__namespace.createElement(TextLink, tslib.__assign({}, props, { exceptionallySetClassName: modules_afa80466.inlineLink }), label),
514
+ index < inlineLinks.length - 1 ? React__namespace.createElement("span", null, " \u00B7 ") : ''));
515
+ }))),
516
+ action || closeButton ? (React__namespace.createElement(Box$1, { className: modules_afa80466.actions, display: "flex", gap: "small" },
517
+ action ? (isActionObject$1(action) ? (action.type === 'button' ? (React__namespace.createElement(ActionButton, tslib.__assign({}, action))) : (React__namespace.createElement(ActionLink, tslib.__assign({}, action)))) : (action)) : null,
518
+ closeButton)) : null),
519
+ children))));
513
520
  });
514
521
  function ActionButton(_a) {
515
522
  _a.type; var label = _a.label, props = tslib.__rest(_a, ["type", "label"]);
@@ -524,7 +531,7 @@ var sizeMapping = {
524
531
  xsmall: 16,
525
532
  small: 24,
526
533
  medium: 36,
527
- large: 48
534
+ large: 48,
528
535
  };
529
536
  function Loading(_a) {
530
537
  var _b;
@@ -543,7 +550,7 @@ var alertIconForTone = {
543
550
  info: AlertInfoIcon,
544
551
  positive: AlertPositiveIcon,
545
552
  caution: AlertCautionIcon,
546
- critical: AlertCriticalIcon
553
+ critical: AlertCriticalIcon,
547
554
  };
548
555
  function AlertIcon(_a) {
549
556
  var tone = _a.tone, props = tslib.__rest(_a, ["tone"]);
@@ -724,7 +731,7 @@ function useToastsAnimation() {
724
731
  Array.from(refs.entries()).forEach(function (_a) {
725
732
  var id = _a[0], element = _a[1];
726
733
  if (!element) {
727
- refs["delete"](id);
734
+ refs.delete(id);
728
735
  return;
729
736
  }
730
737
  var prevTop = positions.get(id);
@@ -734,7 +741,7 @@ function useToastsAnimation() {
734
741
  animations.push({
735
742
  element: element,
736
743
  transition: ENTRANCE_TRANSITION,
737
- transforms: [{ property: 'transform', from: "translateY(".concat(prevTop - top, "px)") }]
744
+ transforms: [{ property: 'transform', from: "translateY(".concat(prevTop - top, "px)") }],
738
745
  });
739
746
  }
740
747
  else if (typeof prevTop !== 'number') {
@@ -745,7 +752,7 @@ function useToastsAnimation() {
745
752
  transforms: [
746
753
  { property: 'transform', from: "translateY(".concat(height, "px)") },
747
754
  { property: 'opacity', from: '0' },
748
- ]
755
+ ],
749
756
  });
750
757
  }
751
758
  positions.set(id, element.getBoundingClientRect().top);
@@ -763,7 +770,7 @@ function useToastsAnimation() {
763
770
  element: element,
764
771
  transforms: [{ property: 'opacity', to: '0' }],
765
772
  transition: EXIT_TRANSITION,
766
- done: onAnimationDone
773
+ done: onAnimationDone,
767
774
  });
768
775
  }
769
776
  }, [refs]);
@@ -958,7 +965,7 @@ var svgPath = {
958
965
  checked: 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z',
959
966
  unchecked: 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z',
960
967
  mixed: 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2 7H8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2z',
961
- filled: 'M6 4H18C19.1046 4 20 4.89543 20 6V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4Z'
968
+ filled: 'M6 4H18C19.1046 4 20 4.89543 20 6V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4Z',
962
969
  };
963
970
  function getPathKey(_a) {
964
971
  var checked = _a.checked, indeterminate = _a.indeterminate, disabled = _a.disabled;
@@ -985,8 +992,6 @@ function CheckboxIcon(_a) {
985
992
  React__namespace.createElement("path", { fill: "currentColor", fillRule: "nonzero", d: svgPath[pathKey] })));
986
993
  }
987
994
 
988
- var modules_664a6a80 = {"disabled":"_131a2ca4","checked":"_95b1556d","keyFocused":"_49de7ebd","icon":"_6b4b1851","label":"_9047f3bd","container":"_84dfdb83"};
989
-
990
995
  /**
991
996
  * Sets both a function and object React ref.
992
997
  */
@@ -1022,6 +1027,8 @@ function useForkRef() {
1022
1027
  refs);
1023
1028
  }
1024
1029
 
1030
+ var modules_664a6a80 = {"disabled":"_131a2ca4","checked":"_95b1556d","keyFocused":"_49de7ebd","icon":"_6b4b1851","label":"_9047f3bd","container":"_84dfdb83"};
1031
+
1025
1032
  var CheckboxField = React__namespace.forwardRef(function CheckboxField(_a, ref) {
1026
1033
  var _b, _c, _d;
1027
1034
  var label = _a.label, icon = _a.icon, disabled = _a.disabled, indeterminate = _a.indeterminate, defaultChecked = _a.defaultChecked, onChange = _a.onChange, props = tslib.__rest(_a, ["label", "icon", "disabled", "indeterminate", "defaultChecked", "onChange"]);
@@ -1071,13 +1078,6 @@ var CheckboxField = React__namespace.forwardRef(function CheckboxField(_a, ref)
1071
1078
  React__namespace.createElement(Text, null, label))) : null));
1072
1079
  });
1073
1080
 
1074
- function PasswordVisibleIcon(props) {
1075
- return (React__namespace.createElement("svg", tslib.__assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24" }, props),
1076
- React__namespace.createElement("g", { fill: "none", fillRule: "evenodd", stroke: "gray" },
1077
- React__namespace.createElement("path", { d: "M21.358 12C17.825 7.65 14.692 5.5 12 5.5c-2.624 0-5.67 2.043-9.097 6.181a.5.5 0 0 0 0 .638C6.331 16.457 9.376 18.5 12 18.5c2.692 0 5.825-2.15 9.358-6.5z" }),
1078
- React__namespace.createElement("circle", { cx: "12", cy: "12", r: "3.5" }))));
1079
- }
1080
-
1081
1081
  function PasswordHiddenIcon(props) {
1082
1082
  return (React__namespace.createElement("svg", tslib.__assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24" }, props),
1083
1083
  React__namespace.createElement("g", { fill: "gray", fillRule: "evenodd", transform: "translate(2 4)" },
@@ -1086,6 +1086,13 @@ function PasswordHiddenIcon(props) {
1086
1086
  React__namespace.createElement("rect", { width: "21", height: "1", x: "-.722", y: "7.778", rx: ".5", transform: "rotate(-45 9.778 8.278)" }))));
1087
1087
  }
1088
1088
 
1089
+ function PasswordVisibleIcon(props) {
1090
+ return (React__namespace.createElement("svg", tslib.__assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24" }, props),
1091
+ React__namespace.createElement("g", { fill: "none", fillRule: "evenodd", stroke: "gray" },
1092
+ React__namespace.createElement("path", { d: "M21.358 12C17.825 7.65 14.692 5.5 12 5.5c-2.624 0-5.67 2.043-9.097 6.181a.5.5 0 0 0 0 .638C6.331 16.457 9.376 18.5 12 18.5c2.692 0 5.825-2.15 9.358-6.5z" }),
1093
+ React__namespace.createElement("circle", { cx: "12", cy: "12", r: "3.5" }))));
1094
+ }
1095
+
1089
1096
  var modules_540a88ff = {"auxiliaryLabel":"bfa9e249","bordered":"e8d81883","error":"_656b054e","primaryLabel":"_0eded49a","loadingIcon":"fbf1bee1","container":"d6795f2d"};
1090
1097
 
1091
1098
  // Define the remaining characters before the character count turns red
@@ -1110,14 +1117,14 @@ function validateInputLength(_a) {
1110
1117
  if (!maxLength) {
1111
1118
  return {
1112
1119
  count: null,
1113
- tone: 'neutral'
1120
+ tone: 'neutral',
1114
1121
  };
1115
1122
  }
1116
1123
  var currentLength = String(value || '').length;
1117
1124
  var isNearMaxLength = maxLength - currentLength <= MAX_LENGTH_THRESHOLD;
1118
1125
  return {
1119
1126
  count: "".concat(currentLength, "/").concat(maxLength),
1120
- tone: isNearMaxLength ? 'error' : 'neutral'
1127
+ tone: isNearMaxLength ? 'error' : 'neutral',
1121
1128
  };
1122
1129
  }
1123
1130
  /**
@@ -1128,8 +1135,10 @@ function BaseField(_a) {
1128
1135
  var id = useId(originalId);
1129
1136
  var messageId = useId();
1130
1137
  var inputLength = validateInputLength({ value: value, maxLength: maxLength });
1131
- var _f = React__namespace.useState(inputLength.count), characterCount = _f[0], setCharacterCount = _f[1];
1132
- var _g = React__namespace.useState(inputLength.tone), characterCountTone = _g[0], setCharacterCountTone = _g[1];
1138
+ var _f = React__namespace.useState(value), previousValue = _f[0], setPreviousValue = _f[1];
1139
+ var _g = React__namespace.useState(maxLength), previousMaxLength = _g[0], setPreviousMaxLength = _g[1];
1140
+ var _h = React__namespace.useState(inputLength.count), characterCount = _h[0], setCharacterCount = _h[1];
1141
+ var _j = React__namespace.useState(inputLength.tone), characterCountTone = _j[0], setCharacterCountTone = _j[1];
1133
1142
  var ariaDescribedBy = originalAriaDescribedBy !== null && originalAriaDescribedBy !== void 0 ? originalAriaDescribedBy : (message ? messageId : null);
1134
1143
  var renderCharacterCountBelow = characterCountPosition === 'below' && characterCount !== null;
1135
1144
  var renderCharacterCountInline = characterCountPosition === 'inline' && characterCount !== null;
@@ -1142,24 +1151,19 @@ function BaseField(_a) {
1142
1151
  }
1143
1152
  var inputLength = validateInputLength({
1144
1153
  value: event.currentTarget.value,
1145
- maxLength: maxLength
1154
+ maxLength: maxLength,
1146
1155
  });
1147
1156
  setCharacterCount(inputLength.count);
1148
1157
  setCharacterCountTone(inputLength.tone);
1149
1158
  },
1150
1159
  // If the character count is inline, we pass it as a prop to the children element so it can be rendered inline
1151
1160
  characterCountElement: renderCharacterCountInline ? renderCharacterCount() : null });
1152
- React__namespace.useEffect(function updateCharacterCountOnPropChange() {
1153
- if (!maxLength) {
1154
- return;
1155
- }
1156
- var inputLength = validateInputLength({
1157
- value: value,
1158
- maxLength: maxLength
1159
- });
1161
+ if (value !== previousValue || maxLength !== previousMaxLength) {
1162
+ setPreviousValue(value);
1163
+ setPreviousMaxLength(maxLength);
1160
1164
  setCharacterCount(inputLength.count);
1161
1165
  setCharacterCountTone(inputLength.tone);
1162
- }, [maxLength, value]);
1166
+ }
1163
1167
  return (React__namespace.createElement(Stack, { space: "xsmall", hidden: hidden },
1164
1168
  React__namespace.createElement(Box$1, { display: "flex", flexDirection: "row", className: [
1165
1169
  className,
@@ -1179,7 +1183,7 @@ function BaseField(_a) {
1179
1183
  characterCountPosition === 'below' ? (React__namespace.createElement(Column, { width: "content" }, renderCharacterCount())) : null)) : null));
1180
1184
  }
1181
1185
 
1182
- var modules_aaf25250 = {"inputWrapper":"_3aa2a591","readOnly":"_88dd4657","bordered":"f9ddac83","error":"_7b4ae67d","slot":"_92010b01"};
1186
+ var modules_aaf25250 = {"inputWrapper":"b1fcd7d9","readOnly":"_2075eb4a","bordered":"_2134b64f","error":"_097b28b0","slot":"_7c4f9584"};
1183
1187
 
1184
1188
  var TextField = React__namespace.forwardRef(function TextField(_a, ref) {
1185
1189
  var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, id = _a.id, label = _a.label, value = _a.value, auxiliaryLabel = _a.auxiliaryLabel, message = _a.message, tone = _a.tone, _c = _a.type, type = _c === void 0 ? 'text' : _c, maxWidth = _a.maxWidth, maxLength = _a.maxLength, hidden = _a.hidden, ariaDescribedBy = _a["aria-describedby"], startSlot = _a.startSlot, endSlot = _a.endSlot, originalOnChange = _a.onChange, _d = _a.characterCountPosition, characterCountPosition = _d === void 0 ? 'below' : _d, _e = _a.endSlotPosition, endSlotPosition = _e === void 0 ? 'bottom' : _e, props = tslib.__rest(_a, ["variant", "id", "label", "value", "auxiliaryLabel", "message", "tone", "type", "maxWidth", "maxLength", "hidden", 'aria-describedby', "startSlot", "endSlot", "onChange", "characterCountPosition", "endSlotPosition"]);
@@ -1223,7 +1227,7 @@ var PasswordField = React__namespace.forwardRef(function PasswordField(_a, ref)
1223
1227
  React__namespace.createElement(IconButton, { variant: "quaternary", icon: React__namespace.createElement(Icon, { "aria-hidden": true }), "aria-label": togglePasswordLabel, onClick: function () { return setPasswordVisible(function (v) { return !v; }); } })) })));
1224
1228
  });
1225
1229
 
1226
- var modules_1fa9b208 = {"selectWrapper":"b2a0c397","bordered":"_85aa4d58","error":"f79ed3fb"};
1230
+ var modules_1fa9b208 = {"selectWrapper":"_7f5f473c","bordered":"_63e2fa62","error":"_3a255678"};
1227
1231
 
1228
1232
  var SelectField = React__namespace.forwardRef(function SelectField(_a, ref) {
1229
1233
  var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, id = _a.id, label = _a.label, value = _a.value, auxiliaryLabel = _a.auxiliaryLabel, message = _a.message, tone = _a.tone, maxWidth = _a.maxWidth, children = _a.children, hidden = _a.hidden, ariaDescribedBy = _a["aria-describedby"], originalOnChange = _a.onChange, props = tslib.__rest(_a, ["variant", "id", "label", "value", "auxiliaryLabel", "message", "tone", "maxWidth", "children", "hidden", 'aria-describedby', "onChange"]);
@@ -1394,10 +1398,10 @@ function Avatar(_a) {
1394
1398
  var style = avatarUrl
1395
1399
  ? {
1396
1400
  backgroundImage: "url(".concat(avatarUrl, ")"),
1397
- textIndent: '-9999px'
1401
+ textIndent: '-9999px', // hide the initials
1398
1402
  }
1399
1403
  : {
1400
- backgroundColor: colorList[emailToIndex(user.email, colorList.length)]
1404
+ backgroundColor: colorList[emailToIndex(user.email, colorList.length)],
1401
1405
  };
1402
1406
  var sizeClassName = getClassNames(modules_08f3eeac, 'size', avatarSize);
1403
1407
  return (React__namespace.createElement(Box$1, tslib.__assign({ className: [className, modules_08f3eeac.avatar, sizeClassName, exceptionallySetClassName], style: style }, props), userInitials));
@@ -1412,122 +1416,262 @@ function Badge(_a) {
1412
1416
  , display: "inline", className: [modules_33c7c985.badge, modules_33c7c985["badge-".concat(tone)]] }), label));
1413
1417
  }
1414
1418
 
1415
- var modules_8f59d13b = {"overlay":"_756b318e","fadein":"_21966801","fitContent":"_52bde55e","full":"bf469f5d","large":"_3208ba07","medium":"_29f86ad4","small":"_64c0762d","xsmall":"_3196b4d0","xlarge":"_3517025e","expand":"_8d20cc11","buttonContainer":"_37ed43a6","headerContent":"_7df92d5c","container":"_46152754"};
1416
-
1417
- var ModalContext = React__namespace.createContext({
1418
- onDismiss: undefined,
1419
- height: 'fitContent',
1420
- dividers: undefined
1419
+ var MenuContext = React__namespace.createContext({
1420
+ menuStore: null,
1421
+ handleItemSelect: function () { return undefined; },
1422
+ getAnchorRect: null,
1423
+ setAnchorRect: function () { return undefined; },
1421
1424
  });
1422
- function isNotInternalFrame(element) {
1423
- return !(element.ownerDocument === document && element.tagName.toLowerCase() === 'iframe');
1424
- }
1425
+ var SubMenuContext = React__namespace.createContext({ isSubMenu: false });
1425
1426
  /**
1426
- * Renders a modal that sits on top of the rest of the content in the entire page.
1427
- *
1428
- * Follows the WAI-ARIA Dialog (Modal) Pattern.
1429
- *
1430
- * @see ModalHeader
1431
- * @see ModalFooter
1432
- * @see ModalBody
1427
+ * Wrapper component to control a menu. It does not render anything, only providing the state
1428
+ * management for the menu components inside it.
1433
1429
  */
1434
- function Modal(_a) {
1435
- var isOpen = _a.isOpen, onDismiss = _a.onDismiss, _b = _a.height, height = _b === void 0 ? 'fitContent' : _b, dividers = _a.dividers, _c = _a.width, width = _c === void 0 ? 'medium' : _c, exceptionallySetClassName = _a.exceptionallySetClassName, exceptionallySetOverlayClassName = _a.exceptionallySetOverlayClassName, _d = _a.autoFocus, autoFocus = _d === void 0 ? true : _d, _e = _a.hideOnEscape, hideOnEscape = _e === void 0 ? true : _e, _f = _a.hideOnInteractOutside, hideOnInteractOutside = _f === void 0 ? true : _f, children = _a.children, portalElement = _a.portalElement, onKeyDown = _a.onKeyDown;
1436
- // @ts-expect-error we want to make sure to not pass it to the Dialog component
1437
- _a.className; var props = tslib.__rest(_a, ["isOpen", "onDismiss", "height", "dividers", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children", "portalElement", "onKeyDown", "className"]);
1438
- var setOpen = React__namespace.useCallback(function (visible) {
1439
- if (!visible) {
1440
- onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
1441
- }
1442
- }, [onDismiss]);
1443
- var store = react.useDialogStore({ open: isOpen, setOpen: setOpen });
1444
- var contextValue = React__namespace.useMemo(function () { return ({ onDismiss: onDismiss, height: height, dividers: dividers }); }, [
1445
- onDismiss,
1446
- height,
1447
- dividers,
1448
- ]);
1449
- var portalRef = React__namespace.useRef(null);
1450
- var dialogRef = React__namespace.useRef(null);
1451
- var backdropRef = React__namespace.useRef(null);
1452
- var handleBackdropClick = React__namespace.useCallback(function (event) {
1453
- var _a, _b;
1454
- if (
1455
- // The focus lock element takes up the same space as the backdrop and is where the event bubbles up from,
1456
- // so instead of checking the backdrop as the event target, we need to make sure it's just above the dialog
1457
- !((_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)) &&
1458
- (
1459
- // Events fired from other portals will bubble up to the backdrop, even if it isn't a child in the DOM
1460
- (_b = backdropRef.current) === null || _b === void 0 ? void 0 : _b.contains(event.target))) {
1461
- event.stopPropagation();
1462
- onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
1463
- }
1464
- }, [onDismiss]);
1465
- React__namespace.useLayoutEffect(function disableAccessibilityTreeOutside() {
1466
- if (!isOpen || !portalRef.current) {
1467
- return;
1468
- }
1469
- return ariaHidden.hideOthers(portalRef.current);
1470
- }, [isOpen]);
1471
- var handleKeyDown = React__namespace.useCallback(function handleKeyDown(event) {
1472
- if (hideOnEscape &&
1473
- onDismiss != null &&
1474
- event.key === 'Escape' &&
1475
- !event.defaultPrevented) {
1476
- event.stopPropagation();
1477
- onDismiss();
1478
- }
1479
- onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
1480
- }, [onDismiss, hideOnEscape, onKeyDown]);
1481
- if (!isOpen) {
1482
- return null;
1483
- }
1484
- return (React__namespace.createElement(react.Portal, { portalRef: portalRef, portalElement: portalElement },
1485
- React__namespace.createElement(Box$1, { "data-testid": "modal-overlay", "data-overlay": true, className: classNames__default["default"](modules_8f59d13b.overlay, modules_8f59d13b[height], modules_8f59d13b[width], exceptionallySetOverlayClassName),
1486
- /**
1487
- * We're using `onPointerDown` instead of `onClick` to prevent the modal from
1488
- * closing when the click starts inside the modal and ends on the backdrop.
1489
- */
1490
- onPointerDown: hideOnInteractOutside ? handleBackdropClick : undefined, ref: backdropRef },
1491
- React__namespace.createElement(FocusLock__default["default"], { autoFocus: autoFocus, whiteList: isNotInternalFrame, returnFocus: true, crossFrame: false },
1492
- React__namespace.createElement(react.Dialog, tslib.__assign({}, props, { ref: dialogRef, render: React__namespace.createElement(Box$1, { borderRadius: "full", background: "default", display: "flex", flexDirection: "column", overflow: "hidden", height: height === 'expand' ? 'full' : undefined, flexGrow: height === 'expand' ? 1 : 0 }), className: classNames__default["default"](exceptionallySetClassName, modules_8f59d13b.container), store: store, preventBodyScroll: true,
1493
- // Disable focus lock as we set up our own using ReactFocusLock
1494
- modal: false, autoFocus: false, autoFocusOnShow: false, autoFocusOnHide: false,
1495
- // Disable portal and backdrop as we control their markup
1496
- portal: false, backdrop: false, hideOnInteractOutside: false, hideOnEscape: false, onKeyDown: handleKeyDown }),
1497
- React__namespace.createElement(ModalContext.Provider, { value: contextValue }, children))))));
1430
+ function Menu(_a) {
1431
+ var children = _a.children, onItemSelect = _a.onItemSelect, props = tslib.__rest(_a, ["children", "onItemSelect"]);
1432
+ var _b = React__namespace.useState(null), anchorRect = _b[0], setAnchorRect = _b[1];
1433
+ var getAnchorRect = React__namespace.useMemo(function () { return (anchorRect ? function () { return anchorRect; } : null); }, [anchorRect]);
1434
+ var menuStore = react.useMenuStore(tslib.__assign({ focusLoop: true }, props));
1435
+ var value = React__namespace.useMemo(function () { return ({ menuStore: menuStore, handleItemSelect: onItemSelect, getAnchorRect: getAnchorRect, setAnchorRect: setAnchorRect }); }, [menuStore, onItemSelect, getAnchorRect, setAnchorRect]);
1436
+ return React__namespace.createElement(MenuContext.Provider, { value: value }, children);
1498
1437
  }
1499
1438
  /**
1500
- * The close button rendered by ModalHeader. Provided independently so that consumers can customize
1501
- * the button's label.
1502
- *
1503
- * @see ModalHeader
1439
+ * A button to toggle a dropdown menu open or closed.
1504
1440
  */
1505
- function ModalCloseButton(props) {
1506
- var onDismiss = React__namespace.useContext(ModalContext).onDismiss;
1507
- var _a = React__namespace.useState(false), includeInTabOrder = _a[0], setIncludeInTabOrder = _a[1];
1508
- var _b = React__namespace.useState(false), isMounted = _b[0], setIsMounted = _b[1];
1509
- React__namespace.useEffect(function skipAutoFocus() {
1510
- if (isMounted) {
1511
- setIncludeInTabOrder(true);
1512
- }
1513
- else {
1514
- setIsMounted(true);
1515
- }
1516
- }, [isMounted]);
1517
- return (React__namespace.createElement(IconButton, tslib.__assign({}, props, { variant: "quaternary", onClick: onDismiss, icon: React__namespace.createElement(CloseIcon, null), tabIndex: includeInTabOrder ? 0 : -1 })));
1518
- }
1441
+ var MenuButton = React__namespace.forwardRef(function MenuButton(_a, ref) {
1442
+ var exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["exceptionallySetClassName"]);
1443
+ var menuStore = React__namespace.useContext(MenuContext).menuStore;
1444
+ if (!menuStore) {
1445
+ throw new Error('MenuButton must be wrapped in <Menu/>');
1446
+ }
1447
+ return (React__namespace.createElement(react.MenuButton, tslib.__assign({}, props, { store: menuStore, ref: ref, className: classNames__default["default"]('reactist_menubutton', exceptionallySetClassName) })));
1448
+ });
1449
+ var ContextMenuTrigger = React__namespace.forwardRef(function ContextMenuTrigger(_a, ref) {
1450
+ var render = _a.render, props = tslib.__rest(_a, ["render"]);
1451
+ var _b = React__namespace.useContext(MenuContext), setAnchorRect = _b.setAnchorRect, menuStore = _b.menuStore;
1452
+ if (!menuStore) {
1453
+ throw new Error('ContextMenuTrigger must be wrapped in <Menu/>');
1454
+ }
1455
+ var handleContextMenu = React__namespace.useCallback(function handleContextMenu(event) {
1456
+ event.preventDefault();
1457
+ setAnchorRect({ x: event.clientX, y: event.clientY });
1458
+ menuStore.show();
1459
+ }, [setAnchorRect, menuStore]);
1460
+ var isOpen = menuStore.useState('open');
1461
+ React__namespace.useEffect(function () {
1462
+ if (!isOpen)
1463
+ setAnchorRect(null);
1464
+ }, [isOpen, setAnchorRect]);
1465
+ return React__namespace.createElement(react.Role.div, tslib.__assign({}, props, { onContextMenu: handleContextMenu, ref: ref, render: render }));
1466
+ });
1519
1467
  /**
1520
- * Renders a standard modal header area with an optional close button.
1521
- *
1522
- * @see Modal
1523
- * @see ModalFooter
1524
- * @see ModalBody
1468
+ * The dropdown menu itself, containing a list of menu items.
1525
1469
  */
1526
- function ModalHeader(_a) {
1527
- var children = _a.children, _b = _a.button, button = _b === void 0 ? true : _b, _c = _a.withDivider, withDivider = _c === void 0 ? false : _c, exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["children", "button", "withDivider", "exceptionallySetClassName"]);
1528
- var dividers = React__namespace.useContext(ModalContext).dividers;
1529
- return (React__namespace.createElement(React__namespace.Fragment, null,
1530
- React__namespace.createElement(Box$1, tslib.__assign({}, props, { as: "header", paddingLeft: "large", paddingRight: button === false || button === null ? 'large' : 'small', paddingY: "small", className: exceptionallySetClassName }),
1470
+ var MenuList = React__namespace.forwardRef(function MenuList(_a, ref) {
1471
+ var exceptionallySetClassName = _a.exceptionallySetClassName, _b = _a.modal, modal = _b === void 0 ? true : _b, flip = _a.flip, props = tslib.__rest(_a, ["exceptionallySetClassName", "modal", "flip"]);
1472
+ var _c = React__namespace.useContext(MenuContext), menuStore = _c.menuStore, getAnchorRect = _c.getAnchorRect;
1473
+ if (!menuStore) {
1474
+ throw new Error('MenuList must be wrapped in <Menu/>');
1475
+ }
1476
+ var isSubMenu = React__namespace.useContext(SubMenuContext).isSubMenu;
1477
+ var isOpen = menuStore.useState('open');
1478
+ return isOpen ? (React__namespace.createElement(react.Portal, { preserveTabOrder: true },
1479
+ React__namespace.createElement(react.Menu, tslib.__assign({}, props, { store: menuStore, gutter: 8, shift: 4, ref: ref, className: classNames__default["default"]('reactist_menulist', exceptionallySetClassName), getAnchorRect: getAnchorRect !== null && getAnchorRect !== void 0 ? getAnchorRect : undefined, modal: modal, flip: flip !== null && flip !== void 0 ? flip : (isSubMenu ? 'left bottom' : undefined) })))) : null;
1480
+ });
1481
+ /**
1482
+ * A menu item inside a menu list. It can be selected by the user, triggering the `onSelect`
1483
+ * callback.
1484
+ */
1485
+ var MenuItem = React__namespace.forwardRef(function MenuItem(_a, ref) {
1486
+ var value = _a.value, children = _a.children, onSelect = _a.onSelect, _b = _a.hideOnSelect, hideOnSelect = _b === void 0 ? true : _b, onClick = _a.onClick, exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName"]);
1487
+ var _c = React__namespace.useContext(MenuContext), handleItemSelect = _c.handleItemSelect, menuStore = _c.menuStore;
1488
+ if (!menuStore) {
1489
+ throw new Error('MenuItem must be wrapped in <Menu/>');
1490
+ }
1491
+ var hide = menuStore.hide;
1492
+ var handleClick = React__namespace.useCallback(function handleClick(event) {
1493
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
1494
+ var onSelectResult = onSelect && !event.defaultPrevented ? onSelect() : undefined;
1495
+ var shouldClose = onSelectResult !== false && hideOnSelect;
1496
+ handleItemSelect === null || handleItemSelect === void 0 ? void 0 : handleItemSelect(value);
1497
+ if (shouldClose)
1498
+ hide();
1499
+ }, [onSelect, onClick, handleItemSelect, hideOnSelect, hide, value]);
1500
+ return (React__namespace.createElement(react.MenuItem, tslib.__assign({}, props, { store: menuStore, ref: ref, onClick: handleClick, className: exceptionallySetClassName, hideOnClick: false }), children));
1501
+ });
1502
+ /**
1503
+ * This component can be rendered alongside other `MenuItem` inside a `MenuList` in order to have
1504
+ * a sub-menu.
1505
+ *
1506
+ * Its children are expected to have the structure of a first level menu (a `MenuButton` and a
1507
+ * `MenuList`).
1508
+ *
1509
+ * ```jsx
1510
+ * <MenuItem label="Edit profile" />
1511
+ * <SubMenu>
1512
+ * <MenuButton>More options</MenuButton>
1513
+ * <MenuList>
1514
+ * <MenuItem label="Preferences" />
1515
+ * <MenuItem label="Sign out" />
1516
+ * </MenuList>
1517
+ * </SubMenu>
1518
+ * ```
1519
+ *
1520
+ * The `MenuButton` will become a menu item in the current menu items list, and it will lead to
1521
+ * opening a sub-menu with the menu items list below it.
1522
+ */
1523
+ var SubMenu = React__namespace.forwardRef(function SubMenu(_a, ref) {
1524
+ var children = _a.children, onItemSelect = _a.onItemSelect;
1525
+ var _b = React__namespace.useContext(MenuContext), parentMenuItemSelect = _b.handleItemSelect, menuStore = _b.menuStore;
1526
+ if (!menuStore) {
1527
+ throw new Error('SubMenu must be wrapped in <Menu/>');
1528
+ }
1529
+ var parentMenuHide = menuStore.hide;
1530
+ var handleSubItemSelect = React__namespace.useCallback(function handleSubItemSelect(value) {
1531
+ onItemSelect === null || onItemSelect === void 0 ? void 0 : onItemSelect(value);
1532
+ parentMenuItemSelect === null || parentMenuItemSelect === void 0 ? void 0 : parentMenuItemSelect(value);
1533
+ parentMenuHide();
1534
+ }, [parentMenuHide, parentMenuItemSelect, onItemSelect]);
1535
+ var _c = React__namespace.Children.toArray(children), button = _c[0], list = _c[1];
1536
+ var buttonElement = button;
1537
+ var subMenuContextValue = React__namespace.useMemo(function () { return ({ isSubMenu: true }); }, []);
1538
+ return (React__namespace.createElement(Menu, { onItemSelect: handleSubItemSelect },
1539
+ React__namespace.createElement(react.MenuItem, { store: menuStore, ref: ref, hideOnClick: false, render: buttonElement }, buttonElement.props.children),
1540
+ React__namespace.createElement(SubMenuContext.Provider, { value: subMenuContextValue }, list)));
1541
+ });
1542
+ /**
1543
+ * A way to semantically group some menu items.
1544
+ *
1545
+ * This group does not add any visual separator. You can do that yourself adding `<hr />` elements
1546
+ * before and/or after the group if you so wish.
1547
+ */
1548
+ var MenuGroup = React__namespace.forwardRef(function MenuGroup(_a, ref) {
1549
+ var label = _a.label, children = _a.children, exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["label", "children", "exceptionallySetClassName"]);
1550
+ var menuStore = React__namespace.useContext(MenuContext).menuStore;
1551
+ if (!menuStore) {
1552
+ throw new Error('MenuGroup must be wrapped in <Menu/>');
1553
+ }
1554
+ return (React__namespace.createElement(react.MenuGroup, tslib.__assign({}, props, { ref: ref, store: menuStore, className: exceptionallySetClassName }),
1555
+ label ? (React__namespace.createElement("div", { role: "presentation", className: "reactist_menugroup__label" }, label)) : null,
1556
+ children));
1557
+ });
1558
+
1559
+ var modules_8f59d13b = {"overlay":"_05da64fc","fadein":"_54ef8301","fitContent":"a191ee44","full":"b15ec657","large":"e1dec24f","medium":"_9346579f","small":"_33e2ba14","xsmall":"_13b3dd02","xlarge":"_1b7c26ab","expand":"_2e29ea19","buttonContainer":"_309f02f2","headerContent":"_094bb706","container":"_6910d6c2"};
1560
+
1561
+ var ModalContext = React__namespace.createContext({
1562
+ onDismiss: undefined,
1563
+ height: 'fitContent',
1564
+ dividers: undefined,
1565
+ });
1566
+ function isNotInternalFrame(element) {
1567
+ return !(element.ownerDocument === document && element.tagName.toLowerCase() === 'iframe');
1568
+ }
1569
+ /**
1570
+ * Renders a modal that sits on top of the rest of the content in the entire page.
1571
+ *
1572
+ * Follows the WAI-ARIA Dialog (Modal) Pattern.
1573
+ *
1574
+ * @see ModalHeader
1575
+ * @see ModalFooter
1576
+ * @see ModalBody
1577
+ */
1578
+ function Modal(_a) {
1579
+ var isOpen = _a.isOpen, onDismiss = _a.onDismiss, _b = _a.height, height = _b === void 0 ? 'fitContent' : _b, dividers = _a.dividers, _c = _a.width, width = _c === void 0 ? 'medium' : _c, exceptionallySetClassName = _a.exceptionallySetClassName, exceptionallySetOverlayClassName = _a.exceptionallySetOverlayClassName, _d = _a.autoFocus, autoFocus = _d === void 0 ? true : _d, _e = _a.hideOnEscape, hideOnEscape = _e === void 0 ? true : _e, _f = _a.hideOnInteractOutside, hideOnInteractOutside = _f === void 0 ? true : _f, children = _a.children, portalElement = _a.portalElement, onKeyDown = _a.onKeyDown;
1580
+ // @ts-expect-error we want to make sure to not pass it to the Dialog component
1581
+ _a.className; var props = tslib.__rest(_a, ["isOpen", "onDismiss", "height", "dividers", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children", "portalElement", "onKeyDown", "className"]);
1582
+ var setOpen = React__namespace.useCallback(function (visible) {
1583
+ if (!visible) {
1584
+ onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
1585
+ }
1586
+ }, [onDismiss]);
1587
+ var store = react.useDialogStore({ open: isOpen, setOpen: setOpen });
1588
+ var contextValue = React__namespace.useMemo(function () { return ({ onDismiss: onDismiss, height: height, dividers: dividers }); }, [onDismiss, height, dividers]);
1589
+ var portalRef = React__namespace.useRef(null);
1590
+ var dialogRef = React__namespace.useRef(null);
1591
+ var backdropRef = React__namespace.useRef(null);
1592
+ var handleBackdropClick = React__namespace.useCallback(function (event) {
1593
+ var _a, _b;
1594
+ if (
1595
+ // The focus lock element takes up the same space as the backdrop and is where the event bubbles up from,
1596
+ // so instead of checking the backdrop as the event target, we need to make sure it's just above the dialog
1597
+ !((_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)) &&
1598
+ (
1599
+ // Events fired from other portals will bubble up to the backdrop, even if it isn't a child in the DOM
1600
+ (_b = backdropRef.current) === null || _b === void 0 ? void 0 : _b.contains(event.target))) {
1601
+ event.stopPropagation();
1602
+ onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
1603
+ }
1604
+ }, [onDismiss]);
1605
+ React__namespace.useLayoutEffect(function disableAccessibilityTreeOutside() {
1606
+ if (!isOpen || !portalRef.current) {
1607
+ return;
1608
+ }
1609
+ return ariaHidden.hideOthers(portalRef.current);
1610
+ }, [isOpen]);
1611
+ var handleKeyDown = React__namespace.useCallback(function handleKeyDown(event) {
1612
+ if (hideOnEscape &&
1613
+ onDismiss != null &&
1614
+ event.key === 'Escape' &&
1615
+ !event.defaultPrevented) {
1616
+ event.stopPropagation();
1617
+ onDismiss();
1618
+ }
1619
+ onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
1620
+ }, [onDismiss, hideOnEscape, onKeyDown]);
1621
+ if (!isOpen) {
1622
+ return null;
1623
+ }
1624
+ return (React__namespace.createElement(react.Portal, { portalRef: portalRef, portalElement: portalElement },
1625
+ React__namespace.createElement(Box$1, { "data-testid": "modal-overlay", "data-overlay": true, className: classNames__default["default"](modules_8f59d13b.overlay, modules_8f59d13b[height], modules_8f59d13b[width], exceptionallySetOverlayClassName),
1626
+ /**
1627
+ * We're using `onPointerDown` instead of `onClick` to prevent the modal from
1628
+ * closing when the click starts inside the modal and ends on the backdrop.
1629
+ */
1630
+ onPointerDown: hideOnInteractOutside ? handleBackdropClick : undefined, ref: backdropRef },
1631
+ React__namespace.createElement(FocusLock__default["default"], { autoFocus: autoFocus, whiteList: isNotInternalFrame, returnFocus: true, crossFrame: false },
1632
+ React__namespace.createElement(react.Dialog, tslib.__assign({}, props, { ref: dialogRef, render: React__namespace.createElement(Box$1, { borderRadius: "full", background: "default", display: "flex", flexDirection: "column", overflow: "hidden", height: height === 'expand' ? 'full' : undefined, flexGrow: height === 'expand' ? 1 : 0 }), className: classNames__default["default"](exceptionallySetClassName, modules_8f59d13b.container), store: store, preventBodyScroll: true,
1633
+ // Disable focus lock as we set up our own using ReactFocusLock
1634
+ modal: false, autoFocus: false, autoFocusOnShow: false, autoFocusOnHide: false,
1635
+ // Disable portal and backdrop as we control their markup
1636
+ portal: false, backdrop: false, hideOnInteractOutside: false, hideOnEscape: false, onKeyDown: handleKeyDown }),
1637
+ React__namespace.createElement(ModalContext.Provider, { value: contextValue }, children))))));
1638
+ }
1639
+ /**
1640
+ * The close button rendered by ModalHeader. Provided independently so that consumers can customize
1641
+ * the button's label.
1642
+ *
1643
+ * @see ModalHeader
1644
+ */
1645
+ function ModalCloseButton(props) {
1646
+ var onDismiss = React__namespace.useContext(ModalContext).onDismiss;
1647
+ var buttonRef = React__namespace.useRef(null);
1648
+ React__namespace.useLayoutEffect(function skipAutoFocus() {
1649
+ var button = buttonRef.current;
1650
+ if (!button) {
1651
+ return;
1652
+ }
1653
+ button.tabIndex = -1;
1654
+ var rafId = requestAnimationFrame(function () {
1655
+ button.tabIndex = 0;
1656
+ });
1657
+ return function () {
1658
+ cancelAnimationFrame(rafId);
1659
+ };
1660
+ }, []);
1661
+ return (React__namespace.createElement(IconButton, tslib.__assign({}, props, { ref: buttonRef, variant: "quaternary", onClick: onDismiss, icon: React__namespace.createElement(CloseIcon, null) })));
1662
+ }
1663
+ /**
1664
+ * Renders a standard modal header area with an optional close button.
1665
+ *
1666
+ * @see Modal
1667
+ * @see ModalFooter
1668
+ * @see ModalBody
1669
+ */
1670
+ function ModalHeader(_a) {
1671
+ var children = _a.children, _b = _a.button, button = _b === void 0 ? true : _b, _c = _a.withDivider, withDivider = _c === void 0 ? false : _c, exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["children", "button", "withDivider", "exceptionallySetClassName"]);
1672
+ var dividers = React__namespace.useContext(ModalContext).dividers;
1673
+ return (React__namespace.createElement(React__namespace.Fragment, null,
1674
+ React__namespace.createElement(Box$1, tslib.__assign({}, props, { as: "header", paddingLeft: "large", paddingRight: button === false || button === null ? 'large' : 'small', paddingY: "small", className: exceptionallySetClassName }),
1531
1675
  React__namespace.createElement(Columns, { space: "large", alignY: "center" },
1532
1676
  React__namespace.createElement(Column, { width: "auto" }, children),
1533
1677
  button === false || button === null ? (React__namespace.createElement("div", { className: modules_8f59d13b.headerContent })) : (React__namespace.createElement(Column, { width: "content", exceptionallySetClassName: modules_8f59d13b.buttonContainer, "data-testid": "button-container" }, typeof button === 'boolean' ? (React__namespace.createElement(ModalCloseButton, { "aria-label": "Close modal", autoFocus: false })) : (button))))),
@@ -1586,7 +1730,7 @@ function Tabs(_a) {
1586
1730
  var tabStore = react.useTabStore({
1587
1731
  defaultSelectedId: defaultSelectedId,
1588
1732
  selectedId: selectedId,
1589
- setSelectedId: onSelectedIdChange
1733
+ setSelectedId: onSelectedIdChange,
1590
1734
  });
1591
1735
  var actualSelectedId = tabStore.useState('selectedId');
1592
1736
  var memoizedTabState = React__namespace.useMemo(function () { var _a; return ({ tabStore: tabStore, variant: variant, selectedId: (_a = selectedId !== null && selectedId !== void 0 ? selectedId : actualSelectedId) !== null && _a !== void 0 ? _a : null }); }, [variant, tabStore, selectedId, actualSelectedId]);
@@ -1625,7 +1769,7 @@ function TabList(_a) {
1625
1769
  setSelectedTabElement(selectedTab);
1626
1770
  setSelectedTabStyle({
1627
1771
  left: "".concat(selectedTab.offsetLeft, "px"),
1628
- width: "".concat(selectedTab.offsetWidth, "px")
1772
+ width: "".concat(selectedTab.offsetWidth, "px"),
1629
1773
  });
1630
1774
  }
1631
1775
  }, [selectedId]);
@@ -1667,7 +1811,7 @@ function TabList(_a) {
1667
1811
  var justifyContentAlignMap = {
1668
1812
  start: 'flexStart',
1669
1813
  end: 'flexEnd',
1670
- center: 'center'
1814
+ center: 'center',
1671
1815
  };
1672
1816
  return (
1673
1817
  // This extra <Box> not only provides alignment for the tabs, but also prevents <Inline>'s
@@ -1714,146 +1858,6 @@ function TabAwareSlot(_a) {
1714
1858
  return tabContextValue ? children({ selectedId: selectedId }) : null;
1715
1859
  }
1716
1860
 
1717
- var MenuContext = React__namespace.createContext({
1718
- menuStore: null,
1719
- handleItemSelect: function () { return undefined; },
1720
- getAnchorRect: null,
1721
- setAnchorRect: function () { return undefined; }
1722
- });
1723
- var SubMenuContext = React__namespace.createContext({ isSubMenu: false });
1724
- /**
1725
- * Wrapper component to control a menu. It does not render anything, only providing the state
1726
- * management for the menu components inside it.
1727
- */
1728
- function Menu(_a) {
1729
- var children = _a.children, onItemSelect = _a.onItemSelect, props = tslib.__rest(_a, ["children", "onItemSelect"]);
1730
- var _b = React__namespace.useState(null), anchorRect = _b[0], setAnchorRect = _b[1];
1731
- var getAnchorRect = React__namespace.useMemo(function () { return (anchorRect ? function () { return anchorRect; } : null); }, [anchorRect]);
1732
- var menuStore = react.useMenuStore(tslib.__assign({ focusLoop: true }, props));
1733
- var value = React__namespace.useMemo(function () { return ({ menuStore: menuStore, handleItemSelect: onItemSelect, getAnchorRect: getAnchorRect, setAnchorRect: setAnchorRect }); }, [menuStore, onItemSelect, getAnchorRect, setAnchorRect]);
1734
- return React__namespace.createElement(MenuContext.Provider, { value: value }, children);
1735
- }
1736
- /**
1737
- * A button to toggle a dropdown menu open or closed.
1738
- */
1739
- var MenuButton = React__namespace.forwardRef(function MenuButton(_a, ref) {
1740
- var exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["exceptionallySetClassName"]);
1741
- var menuStore = React__namespace.useContext(MenuContext).menuStore;
1742
- if (!menuStore) {
1743
- throw new Error('MenuButton must be wrapped in <Menu/>');
1744
- }
1745
- return (React__namespace.createElement(react.MenuButton, tslib.__assign({}, props, { store: menuStore, ref: ref, className: classNames__default["default"]('reactist_menubutton', exceptionallySetClassName) })));
1746
- });
1747
- var ContextMenuTrigger = React__namespace.forwardRef(function ContextMenuTrigger(_a, ref) {
1748
- var render = _a.render, props = tslib.__rest(_a, ["render"]);
1749
- var _b = React__namespace.useContext(MenuContext), setAnchorRect = _b.setAnchorRect, menuStore = _b.menuStore;
1750
- if (!menuStore) {
1751
- throw new Error('ContextMenuTrigger must be wrapped in <Menu/>');
1752
- }
1753
- var handleContextMenu = React__namespace.useCallback(function handleContextMenu(event) {
1754
- event.preventDefault();
1755
- setAnchorRect({ x: event.clientX, y: event.clientY });
1756
- menuStore.show();
1757
- }, [setAnchorRect, menuStore]);
1758
- var isOpen = menuStore.useState('open');
1759
- React__namespace.useEffect(function () {
1760
- if (!isOpen)
1761
- setAnchorRect(null);
1762
- }, [isOpen, setAnchorRect]);
1763
- return React__namespace.createElement(react.Role.div, tslib.__assign({}, props, { onContextMenu: handleContextMenu, ref: ref, render: render }));
1764
- });
1765
- /**
1766
- * The dropdown menu itself, containing a list of menu items.
1767
- */
1768
- var MenuList = React__namespace.forwardRef(function MenuList(_a, ref) {
1769
- var exceptionallySetClassName = _a.exceptionallySetClassName, _b = _a.modal, modal = _b === void 0 ? true : _b, flip = _a.flip, props = tslib.__rest(_a, ["exceptionallySetClassName", "modal", "flip"]);
1770
- var _c = React__namespace.useContext(MenuContext), menuStore = _c.menuStore, getAnchorRect = _c.getAnchorRect;
1771
- if (!menuStore) {
1772
- throw new Error('MenuList must be wrapped in <Menu/>');
1773
- }
1774
- var isSubMenu = React__namespace.useContext(SubMenuContext).isSubMenu;
1775
- var isOpen = menuStore.useState('open');
1776
- return isOpen ? (React__namespace.createElement(react.Portal, { preserveTabOrder: true },
1777
- React__namespace.createElement(react.Menu, tslib.__assign({}, props, { store: menuStore, gutter: 8, shift: 4, ref: ref, className: classNames__default["default"]('reactist_menulist', exceptionallySetClassName), getAnchorRect: getAnchorRect !== null && getAnchorRect !== void 0 ? getAnchorRect : undefined, modal: modal, flip: flip !== null && flip !== void 0 ? flip : (isSubMenu ? 'left bottom' : undefined) })))) : null;
1778
- });
1779
- /**
1780
- * A menu item inside a menu list. It can be selected by the user, triggering the `onSelect`
1781
- * callback.
1782
- */
1783
- var MenuItem = React__namespace.forwardRef(function MenuItem(_a, ref) {
1784
- var value = _a.value, children = _a.children, onSelect = _a.onSelect, _b = _a.hideOnSelect, hideOnSelect = _b === void 0 ? true : _b, onClick = _a.onClick, exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName"]);
1785
- var _c = React__namespace.useContext(MenuContext), handleItemSelect = _c.handleItemSelect, menuStore = _c.menuStore;
1786
- if (!menuStore) {
1787
- throw new Error('MenuItem must be wrapped in <Menu/>');
1788
- }
1789
- var hide = menuStore.hide;
1790
- var handleClick = React__namespace.useCallback(function handleClick(event) {
1791
- onClick === null || onClick === void 0 ? void 0 : onClick(event);
1792
- var onSelectResult = onSelect && !event.defaultPrevented ? onSelect() : undefined;
1793
- var shouldClose = onSelectResult !== false && hideOnSelect;
1794
- handleItemSelect === null || handleItemSelect === void 0 ? void 0 : handleItemSelect(value);
1795
- if (shouldClose)
1796
- hide();
1797
- }, [onSelect, onClick, handleItemSelect, hideOnSelect, hide, value]);
1798
- return (React__namespace.createElement(react.MenuItem, tslib.__assign({}, props, { store: menuStore, ref: ref, onClick: handleClick, className: exceptionallySetClassName, hideOnClick: false }), children));
1799
- });
1800
- /**
1801
- * This component can be rendered alongside other `MenuItem` inside a `MenuList` in order to have
1802
- * a sub-menu.
1803
- *
1804
- * Its children are expected to have the structure of a first level menu (a `MenuButton` and a
1805
- * `MenuList`).
1806
- *
1807
- * ```jsx
1808
- * <MenuItem label="Edit profile" />
1809
- * <SubMenu>
1810
- * <MenuButton>More options</MenuButton>
1811
- * <MenuList>
1812
- * <MenuItem label="Preferences" />
1813
- * <MenuItem label="Sign out" />
1814
- * </MenuList>
1815
- * </SubMenu>
1816
- * ```
1817
- *
1818
- * The `MenuButton` will become a menu item in the current menu items list, and it will lead to
1819
- * opening a sub-menu with the menu items list below it.
1820
- */
1821
- var SubMenu = React__namespace.forwardRef(function SubMenu(_a, ref) {
1822
- var children = _a.children, onItemSelect = _a.onItemSelect;
1823
- var _b = React__namespace.useContext(MenuContext), parentMenuItemSelect = _b.handleItemSelect, menuStore = _b.menuStore;
1824
- if (!menuStore) {
1825
- throw new Error('SubMenu must be wrapped in <Menu/>');
1826
- }
1827
- var parentMenuHide = menuStore.hide;
1828
- var handleSubItemSelect = React__namespace.useCallback(function handleSubItemSelect(value) {
1829
- onItemSelect === null || onItemSelect === void 0 ? void 0 : onItemSelect(value);
1830
- parentMenuItemSelect === null || parentMenuItemSelect === void 0 ? void 0 : parentMenuItemSelect(value);
1831
- parentMenuHide();
1832
- }, [parentMenuHide, parentMenuItemSelect, onItemSelect]);
1833
- var _c = React__namespace.Children.toArray(children), button = _c[0], list = _c[1];
1834
- var buttonElement = button;
1835
- var subMenuContextValue = React__namespace.useMemo(function () { return ({ isSubMenu: true }); }, []);
1836
- return (React__namespace.createElement(Menu, { onItemSelect: handleSubItemSelect },
1837
- React__namespace.createElement(react.MenuItem, { store: menuStore, ref: ref, hideOnClick: false, render: buttonElement }, buttonElement.props.children),
1838
- React__namespace.createElement(SubMenuContext.Provider, { value: subMenuContextValue }, list)));
1839
- });
1840
- /**
1841
- * A way to semantically group some menu items.
1842
- *
1843
- * This group does not add any visual separator. You can do that yourself adding `<hr />` elements
1844
- * before and/or after the group if you so wish.
1845
- */
1846
- var MenuGroup = React__namespace.forwardRef(function MenuGroup(_a, ref) {
1847
- var label = _a.label, children = _a.children, exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["label", "children", "exceptionallySetClassName"]);
1848
- var menuStore = React__namespace.useContext(MenuContext).menuStore;
1849
- if (!menuStore) {
1850
- throw new Error('MenuGroup must be wrapped in <Menu/>');
1851
- }
1852
- return (React__namespace.createElement(react.MenuGroup, tslib.__assign({}, props, { ref: ref, store: menuStore, className: exceptionallySetClassName }),
1853
- label ? (React__namespace.createElement("div", { role: "presentation", className: "reactist_menugroup__label" }, label)) : null,
1854
- children));
1855
- });
1856
-
1857
1861
  /**
1858
1862
  * @deprecated
1859
1863
  */
@@ -1867,7 +1871,7 @@ Button.displayName = 'Button';
1867
1871
  Button.defaultProps = {
1868
1872
  size: 'default',
1869
1873
  loading: false,
1870
- disabled: false
1874
+ disabled: false,
1871
1875
  };
1872
1876
 
1873
1877
  var Box = /** @class */ (function (_super) {
@@ -1901,7 +1905,7 @@ var Box = /** @class */ (function (_super) {
1901
1905
  document.removeEventListener('click', _this._handleClickOutside, true);
1902
1906
  }
1903
1907
  _this.setState({
1904
- showBody: !_this.state.showBody
1908
+ showBody: !_this.state.showBody,
1905
1909
  });
1906
1910
  };
1907
1911
  // https://facebook.github.io/react/docs/refs-and-the-dom.html#exposing-dom-refs-to-parent-components
@@ -1936,7 +1940,7 @@ var Box = /** @class */ (function (_super) {
1936
1940
  };
1937
1941
  _this.state = {
1938
1942
  showBody: false,
1939
- top: props.top || false
1943
+ top: props.top || false,
1940
1944
  };
1941
1945
  _this._timeout = undefined;
1942
1946
  return _this;
@@ -1965,7 +1969,7 @@ var Box = /** @class */ (function (_super) {
1965
1969
  body_wrapper: true,
1966
1970
  with_arrow: true,
1967
1971
  top: top,
1968
- bottom: !top
1972
+ bottom: !top,
1969
1973
  });
1970
1974
  var body = children === null || children === void 0 ? void 0 : children[1];
1971
1975
  var contentMarkup = typeof body === 'function'
@@ -2014,7 +2018,7 @@ Body.displayName = 'Dropdown.Body';
2014
2018
  var Dropdown = {
2015
2019
  Box: Box,
2016
2020
  Trigger: Trigger,
2017
- Body: Body
2021
+ Body: Body,
2018
2022
  };
2019
2023
 
2020
2024
  var COLORS = [
@@ -2047,7 +2051,7 @@ function ColorPicker(_a) {
2047
2051
  return (React__namespace.createElement("span", { className: classNames__default["default"]('color_trigger', { small: small }), style: {
2048
2052
  backgroundColor: _isNamedColor(backgroundColor)
2049
2053
  ? backgroundColor.color
2050
- : backgroundColor
2054
+ : backgroundColor,
2051
2055
  } },
2052
2056
  React__namespace.createElement("span", { className: "color_trigger--inner_ring" })));
2053
2057
  })()),
@@ -2068,71 +2072,6 @@ function ColorItem(_a) {
2068
2072
  }
2069
2073
  ColorItem.displayName = 'ColorItem';
2070
2074
 
2071
- //
2072
- // Support for setting up how to translate modifiers globally.
2073
- //
2074
- var globalTranslateKey = function (key) { return key; };
2075
- KeyboardShortcut.setTranslateKey = function (tr) {
2076
- globalTranslateKey = tr;
2077
- };
2078
- function translateKeyMac(key) {
2079
- switch (key.toLowerCase()) {
2080
- case 'cmd':
2081
- case 'mod':
2082
- return '⌘';
2083
- case 'control':
2084
- case 'ctrl':
2085
- return '⌃';
2086
- case 'alt':
2087
- return '⌥';
2088
- case 'shift':
2089
- return '⇧';
2090
- case 'space':
2091
- return '␣';
2092
- default:
2093
- return key;
2094
- }
2095
- }
2096
- //
2097
- // Some helpers
2098
- //
2099
- function capitalize(str) {
2100
- return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
2101
- }
2102
- function hasModifiers(str) {
2103
- return /\b(mod|cmd|ctrl|control|alt|shift)\b/i.test(str);
2104
- }
2105
- function isSpecialKey(str) {
2106
- return /^(mod|cmd|ctrl|control|alt|shift|space|super)$/i.test(str);
2107
- }
2108
- function parseKeys(shortcut, isMac, translateKey) {
2109
- var t = isMac ? translateKeyMac : translateKey;
2110
- var _hasModifiers = hasModifiers(shortcut);
2111
- function mapIndividualKey(str) {
2112
- if (isSpecialKey(str)) {
2113
- return capitalize(t(str));
2114
- }
2115
- if (_hasModifiers && str.length === 1) {
2116
- return str.toUpperCase();
2117
- }
2118
- return str;
2119
- }
2120
- if (!isMac) {
2121
- shortcut = shortcut.replace(/\b(mod|cmd)\b/i, 'ctrl');
2122
- }
2123
- return shortcut.split(/\s*\+\s*/).map(mapIndividualKey);
2124
- }
2125
- function KeyboardShortcut(_a) {
2126
- var _b, _c;
2127
- var children = _a.children, className = _a.className, _d = _a.translateKey, translateKey = _d === void 0 ? globalTranslateKey : _d, _e = _a.isMac, isMac = _e === void 0 ? (_c = (_b = navigator.platform) === null || _b === void 0 ? void 0 : _b.toUpperCase().includes('MAC')) !== null && _c !== void 0 ? _c : false : _e, props = tslib.__rest(_a, ["children", "className", "translateKey", "isMac"]);
2128
- var shortcuts = typeof children === 'string' ? [children] : children;
2129
- return (React__namespace.createElement("span", tslib.__assign({ className: classNames__default["default"]('reactist_keyboard_shortcut', className, {
2130
- 'reactist_keyboard_shortcut--macos': isMac
2131
- }) }, props), shortcuts.map(function (shortcut, i) { return (React__namespace.createElement(React__namespace.Fragment, { key: i },
2132
- i === 0 ? null : ', ',
2133
- React__namespace.createElement("kbd", null, parseKeys(shortcut, isMac, translateKey).map(function (key, j) { return (React__namespace.createElement("kbd", { key: j }, key)); })))); })));
2134
- }
2135
-
2136
2075
  var SUPPORTED_KEYS = {
2137
2076
  ARROW_UP: 'ArrowUp',
2138
2077
  ARROW_RIGHT: 'ArrowRight',
@@ -2140,7 +2079,7 @@ var SUPPORTED_KEYS = {
2140
2079
  ARROW_LEFT: 'ArrowLeft',
2141
2080
  ENTER: 'Enter',
2142
2081
  BACKSPACE: 'Backspace',
2143
- ESCAPE: 'Escape'
2082
+ ESCAPE: 'Escape',
2144
2083
  };
2145
2084
  var KeyCapturerResolver = {
2146
2085
  resolveByKey: function (eventKey) {
@@ -2203,7 +2142,7 @@ var KeyCapturerResolver = {
2203
2142
  return null;
2204
2143
  }
2205
2144
  }
2206
- }
2145
+ },
2207
2146
  };
2208
2147
  var keyEventHandlerMapping = {
2209
2148
  ArrowUp: 'onArrowUp',
@@ -2212,7 +2151,7 @@ var keyEventHandlerMapping = {
2212
2151
  ArrowRight: 'onArrowRight',
2213
2152
  Enter: 'onEnter',
2214
2153
  Backspace: 'onBackspace',
2215
- Escape: 'onEscape'
2154
+ Escape: 'onEscape',
2216
2155
  };
2217
2156
  var keyPropagatePropMapping = {
2218
2157
  ArrowUp: 'propagateArrowUp',
@@ -2221,7 +2160,7 @@ var keyPropagatePropMapping = {
2221
2160
  ArrowRight: 'propagateArrowRight',
2222
2161
  Enter: 'propagateEnter',
2223
2162
  Backspace: 'propagateBackspace',
2224
- Escape: 'propagateEscape'
2163
+ Escape: 'propagateEscape',
2225
2164
  };
2226
2165
  /**
2227
2166
  * Use this component to wrap anything you want to handle key events for (e.g. an input).
@@ -2234,44 +2173,120 @@ var keyPropagatePropMapping = {
2234
2173
  function KeyCapturer(props) {
2235
2174
  var _a;
2236
2175
  var children = props.children, _b = props.eventName, eventName = _b === void 0 ? 'onKeyDown' : _b;
2237
- var composingRef = React__namespace.useRef(false);
2238
- var composingEventHandlers = props.onEnter
2239
- ? {
2240
- onCompositionStart: function () {
2241
- composingRef.current = true;
2242
- },
2243
- onCompositionEnd: function () {
2244
- composingRef.current = false;
2176
+ var _c = React__namespace.useState(false), isComposing = _c[0], setIsComposing = _c[1];
2177
+ var onCompositionStart = React__namespace.useMemo(function () {
2178
+ return props.onEnter
2179
+ ? function () {
2180
+ setIsComposing(true);
2245
2181
  }
2246
- }
2247
- : undefined;
2248
- function handleKeyEvent(event) {
2249
- // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
2250
- var key = event.key !== undefined
2251
- ? KeyCapturerResolver.resolveByKey(event.key)
2252
- : KeyCapturerResolver.resolveByKeyCode(event.keyCode);
2253
- if (!key)
2254
- return;
2255
- var propagateEvent = props[keyPropagatePropMapping[key]] || false;
2256
- var eventHandler = props[keyEventHandlerMapping[key]];
2257
- if (key === 'Enter' && eventHandler) {
2258
- if (composingRef.current ||
2259
- // Safari fires the onCompositionEnd event before the keydown event, so we
2260
- // have to rely on the 229 keycode, which is Enter when fired from an IME
2261
- // https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode
2262
- (event.keyCode || event.which) === 229) {
2182
+ : undefined;
2183
+ }, [props.onEnter]);
2184
+ var onCompositionEnd = React__namespace.useMemo(function () {
2185
+ return props.onEnter
2186
+ ? function () {
2187
+ setIsComposing(false);
2188
+ }
2189
+ : undefined;
2190
+ }, [props.onEnter]);
2191
+ var handleKeyEvent = React__namespace.useMemo(function () {
2192
+ return function handleKeyEvent(event) {
2193
+ // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
2194
+ var key = event.key !== undefined
2195
+ ? KeyCapturerResolver.resolveByKey(event.key)
2196
+ : KeyCapturerResolver.resolveByKeyCode(event.keyCode);
2197
+ if (!key)
2198
+ return;
2199
+ var propagateEvent = props[keyPropagatePropMapping[key]] || false;
2200
+ var eventHandler = props[keyEventHandlerMapping[key]];
2201
+ if (!eventHandler) {
2263
2202
  return;
2264
2203
  }
2265
- }
2266
- if (eventHandler) {
2204
+ if (key === 'Enter') {
2205
+ if (isComposing ||
2206
+ // Safari fires the onCompositionEnd event before the keydown event, so we
2207
+ // have to rely on the 229 keycode, which is Enter when fired from an IME
2208
+ // https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode
2209
+ (event.keyCode || event.which) === 229) {
2210
+ return;
2211
+ }
2212
+ }
2267
2213
  eventHandler(event);
2268
2214
  if (!propagateEvent) {
2269
2215
  event.preventDefault();
2270
2216
  event.stopPropagation();
2271
2217
  }
2218
+ };
2219
+ }, [props, isComposing]);
2220
+ return React__namespace.cloneElement(children, (_a = {},
2221
+ _a[eventName] = handleKeyEvent,
2222
+ _a.onCompositionStart = onCompositionStart,
2223
+ _a.onCompositionEnd = onCompositionEnd,
2224
+ _a));
2225
+ }
2226
+
2227
+ //
2228
+ // Support for setting up how to translate modifiers globally.
2229
+ //
2230
+ var globalTranslateKey = function (key) { return key; };
2231
+ KeyboardShortcut.setTranslateKey = function (tr) {
2232
+ globalTranslateKey = tr;
2233
+ };
2234
+ function translateKeyMac(key) {
2235
+ switch (key.toLowerCase()) {
2236
+ case 'cmd':
2237
+ case 'mod':
2238
+ return '⌘';
2239
+ case 'control':
2240
+ case 'ctrl':
2241
+ return '⌃';
2242
+ case 'alt':
2243
+ return '⌥';
2244
+ case 'shift':
2245
+ return '⇧';
2246
+ case 'space':
2247
+ return '␣';
2248
+ default:
2249
+ return key;
2250
+ }
2251
+ }
2252
+ //
2253
+ // Some helpers
2254
+ //
2255
+ function capitalize(str) {
2256
+ return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
2257
+ }
2258
+ function hasModifiers(str) {
2259
+ return /\b(mod|cmd|ctrl|control|alt|shift)\b/i.test(str);
2260
+ }
2261
+ function isSpecialKey(str) {
2262
+ return /^(mod|cmd|ctrl|control|alt|shift|space|super)$/i.test(str);
2263
+ }
2264
+ function parseKeys(shortcut, isMac, translateKey) {
2265
+ var t = isMac ? translateKeyMac : translateKey;
2266
+ var _hasModifiers = hasModifiers(shortcut);
2267
+ function mapIndividualKey(str) {
2268
+ if (isSpecialKey(str)) {
2269
+ return capitalize(t(str));
2272
2270
  }
2271
+ if (_hasModifiers && str.length === 1) {
2272
+ return str.toUpperCase();
2273
+ }
2274
+ return str;
2275
+ }
2276
+ if (!isMac) {
2277
+ shortcut = shortcut.replace(/\b(mod|cmd)\b/i, 'ctrl');
2273
2278
  }
2274
- return React__namespace.cloneElement(children, tslib.__assign((_a = {}, _a[eventName] = handleKeyEvent, _a), composingEventHandlers));
2279
+ return shortcut.split(/\s*\+\s*/).map(mapIndividualKey);
2280
+ }
2281
+ function KeyboardShortcut(_a) {
2282
+ var _b, _c;
2283
+ var children = _a.children, className = _a.className, _d = _a.translateKey, translateKey = _d === void 0 ? globalTranslateKey : _d, _e = _a.isMac, isMac = _e === void 0 ? (_c = (_b = navigator.platform) === null || _b === void 0 ? void 0 : _b.toUpperCase().includes('MAC')) !== null && _c !== void 0 ? _c : false : _e, props = tslib.__rest(_a, ["children", "className", "translateKey", "isMac"]);
2284
+ var shortcuts = typeof children === 'string' ? [children] : children;
2285
+ return (React__namespace.createElement("span", tslib.__assign({ className: classNames__default["default"]('reactist_keyboard_shortcut', className, {
2286
+ 'reactist_keyboard_shortcut--macos': isMac,
2287
+ }) }, props), shortcuts.map(function (shortcut, i) { return (React__namespace.createElement(React__namespace.Fragment, { key: i },
2288
+ i === 0 ? null : ', ',
2289
+ React__namespace.createElement("kbd", null, parseKeys(shortcut, isMac, translateKey).map(function (key, j) { return (React__namespace.createElement("kbd", { key: j }, key)); })))); })));
2275
2290
  }
2276
2291
 
2277
2292
  var modules_a0e70af1 = {"progressBar":"_2661b3dc","inner":"_0ca877fd"};
@@ -2340,7 +2355,7 @@ var TimeUtils = {
2340
2355
  var date = dayjs__default["default"](timestamp * 1000);
2341
2356
  date.locale(locale);
2342
2357
  return date.format(longFormat);
2343
- }
2358
+ },
2344
2359
  };
2345
2360
 
2346
2361
  var DELAY = 60000;
@@ -2352,7 +2367,7 @@ var Time = /** @class */ (function (_super) {
2352
2367
  _this.state = {
2353
2368
  hovered: false,
2354
2369
  mouseX: undefined,
2355
- mouseY: undefined
2370
+ mouseY: undefined,
2356
2371
  };
2357
2372
  return _this;
2358
2373
  }
@@ -2384,7 +2399,7 @@ var Time = /** @class */ (function (_super) {
2384
2399
  this.setState(function () { return ({
2385
2400
  hovered: hovered,
2386
2401
  mouseX: clientX,
2387
- mouseY: clientY
2402
+ mouseY: clientY,
2388
2403
  }); });
2389
2404
  }
2390
2405
  };
@@ -2433,8 +2448,8 @@ Time.defaultProps = {
2433
2448
  daysSuffix: 'd',
2434
2449
  hoursSuffix: 'h',
2435
2450
  minutesSuffix: 'm',
2436
- momentsAgo: 'moments ago'
2437
- }
2451
+ momentsAgo: 'moments ago',
2452
+ },
2438
2453
  };
2439
2454
 
2440
2455
  /**
@@ -2454,7 +2469,7 @@ function Select(_a) {
2454
2469
  Select.displayName = 'Select';
2455
2470
  Select.defaultProps = {
2456
2471
  options: [],
2457
- disabled: false
2472
+ disabled: false,
2458
2473
  };
2459
2474
 
2460
2475
  exports.Avatar = Avatar;