@doist/reactist 28.7.0 → 28.7.3

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 (468) hide show
  1. package/dist/reactist.cjs.development.js +2093 -3829
  2. package/dist/reactist.cjs.development.js.map +1 -1
  3. package/dist/reactist.cjs.production.min.js +1 -1
  4. package/dist/reactist.cjs.production.min.js.map +1 -1
  5. package/es/avatar/avatar.js +35 -30
  6. package/es/avatar/avatar.js.map +1 -1
  7. package/es/avatar/utils.js +19 -22
  8. package/es/avatar/utils.js.map +1 -1
  9. package/es/badge/badge.js +5 -16
  10. package/es/badge/badge.js.map +1 -1
  11. package/es/banner/banner.js +39 -115
  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 +80 -162
  15. package/es/base-field/base-field.js.map +1 -1
  16. package/es/base-field/base-field.module.css.js +1 -1
  17. package/es/box/box.js +61 -139
  18. package/es/box/box.js.map +1 -1
  19. package/es/button/button.js +42 -95
  20. package/es/button/button.js.map +1 -1
  21. package/es/checkbox-field/checkbox-field.js +46 -75
  22. package/es/checkbox-field/checkbox-field.js.map +1 -1
  23. package/es/checkbox-field/checkbox-field.module.css.js +1 -1
  24. package/es/checkbox-field/checkbox-icon.js +28 -55
  25. package/es/checkbox-field/checkbox-icon.js.map +1 -1
  26. package/es/checkbox-field/use-fork-ref.js +29 -25
  27. package/es/checkbox-field/use-fork-ref.js.map +1 -1
  28. package/es/columns/columns.js +22 -46
  29. package/es/columns/columns.js.map +1 -1
  30. package/es/columns/columns.module.css.js +1 -1
  31. package/es/components/color-picker/color-picker.js +45 -66
  32. package/es/components/color-picker/color-picker.js.map +1 -1
  33. package/es/components/deprecated-button/deprecated-button.js +11 -34
  34. package/es/components/deprecated-button/deprecated-button.js.map +1 -1
  35. package/es/components/deprecated-dropdown/dropdown.js +136 -197
  36. package/es/components/deprecated-dropdown/dropdown.js.map +1 -1
  37. package/es/components/deprecated-input/input.js +6 -10
  38. package/es/components/deprecated-input/input.js.map +1 -1
  39. package/es/components/deprecated-select/select.js +7 -31
  40. package/es/components/deprecated-select/select.js.map +1 -1
  41. package/es/components/key-capturer/key-capturer.js +130 -171
  42. package/es/components/key-capturer/key-capturer.js.map +1 -1
  43. package/es/components/keyboard-shortcut/keyboard-shortcut.js +48 -79
  44. package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  45. package/es/components/progress-bar/progress-bar.js +8 -20
  46. package/es/components/progress-bar/progress-bar.js.map +1 -1
  47. package/es/components/time/time-utils.js +52 -64
  48. package/es/components/time/time-utils.js.map +1 -1
  49. package/es/components/time/time.js +90 -114
  50. package/es/components/time/time.js.map +1 -1
  51. package/es/divider/divider.js +4 -13
  52. package/es/divider/divider.js.map +1 -1
  53. package/es/heading/heading.js +19 -28
  54. package/es/heading/heading.js.map +1 -1
  55. package/es/hidden/hidden.js +36 -45
  56. package/es/hidden/hidden.js.map +1 -1
  57. package/es/hidden-visually/hidden-visually.js +7 -13
  58. package/es/hidden-visually/hidden-visually.js.map +1 -1
  59. package/es/icons/alert-icon.js +18 -64
  60. package/es/icons/alert-icon.js.map +1 -1
  61. package/es/icons/banner-icon.js +25 -97
  62. package/es/icons/banner-icon.js.map +1 -1
  63. package/es/icons/close-icon.js +3 -9
  64. package/es/icons/close-icon.js.map +1 -1
  65. package/es/icons/password-hidden-icon.js +6 -23
  66. package/es/icons/password-hidden-icon.js.map +1 -1
  67. package/es/icons/password-visible-icon.js +5 -16
  68. package/es/icons/password-visible-icon.js.map +1 -1
  69. package/es/inline/inline.js +8 -23
  70. package/es/inline/inline.js.map +1 -1
  71. package/es/loading/loading.js +17 -30
  72. package/es/loading/loading.js.map +1 -1
  73. package/es/menu/menu.js +127 -260
  74. package/es/menu/menu.js.map +1 -1
  75. package/es/modal/modal.js +143 -272
  76. package/es/modal/modal.js.map +1 -1
  77. package/es/modal/modal.module.css.js +1 -1
  78. package/es/notice/notice.js +8 -21
  79. package/es/notice/notice.js.map +1 -1
  80. package/es/notice/notice.module.css.js +1 -1
  81. package/es/password-field/password-field.js +10 -24
  82. package/es/password-field/password-field.js.map +1 -1
  83. package/es/prose/prose.js +10 -15
  84. package/es/prose/prose.js.map +1 -1
  85. package/es/select-field/select-field.js +14 -51
  86. package/es/select-field/select-field.js.map +1 -1
  87. package/es/spinner/spinner.js +6 -20
  88. package/es/spinner/spinner.js.map +1 -1
  89. package/es/stack/stack.js +15 -27
  90. package/es/stack/stack.js.map +1 -1
  91. package/es/switch-field/switch-field.js +38 -75
  92. package/es/switch-field/switch-field.js.map +1 -1
  93. package/es/switch-field/switch-field.module.css.js +1 -1
  94. package/es/tabs/tabs.js +120 -211
  95. package/es/tabs/tabs.js.map +1 -1
  96. package/es/text/text.js +16 -25
  97. package/es/text/text.js.map +1 -1
  98. package/es/text-area/text-area.js +54 -111
  99. package/es/text-area/text-area.js.map +1 -1
  100. package/es/text-field/text-field.js +30 -84
  101. package/es/text-field/text-field.js.map +1 -1
  102. package/es/text-link/text-link.js +9 -20
  103. package/es/text-link/text-link.js.map +1 -1
  104. package/es/text-link/text-link.module.css.js +1 -1
  105. package/es/toast/static-toast.js +35 -70
  106. package/es/toast/static-toast.js.map +1 -1
  107. package/es/toast/toast-animation.js +121 -159
  108. package/es/toast/toast-animation.js.map +1 -1
  109. package/es/toast/use-toasts.js +134 -201
  110. package/es/toast/use-toasts.js.map +1 -1
  111. package/es/tooltip/tooltip.js +31 -69
  112. package/es/tooltip/tooltip.js.map +1 -1
  113. package/es/utils/common-helpers.js +9 -13
  114. package/es/utils/common-helpers.js.map +1 -1
  115. package/es/utils/polymorphism.js +7 -8
  116. package/es/utils/polymorphism.js.map +1 -1
  117. package/es/utils/responsive-props.js +57 -66
  118. package/es/utils/responsive-props.js.map +1 -1
  119. package/lib/avatar/avatar.d.ts +21 -21
  120. package/lib/avatar/avatar.js +69 -1
  121. package/lib/avatar/avatar.js.map +1 -1
  122. package/lib/avatar/avatar.module.css.js +7 -1
  123. package/lib/avatar/avatar.module.css.js.map +1 -1
  124. package/lib/avatar/index.d.ts +1 -1
  125. package/lib/avatar/utils.d.ts +3 -3
  126. package/lib/avatar/utils.js +30 -1
  127. package/lib/avatar/utils.js.map +1 -1
  128. package/lib/badge/badge.d.ts +15 -15
  129. package/lib/badge/badge.js +36 -1
  130. package/lib/badge/badge.js.map +1 -1
  131. package/lib/badge/badge.module.css.js +7 -1
  132. package/lib/badge/badge.module.css.js.map +1 -1
  133. package/lib/badge/index.d.ts +1 -1
  134. package/lib/banner/banner.d.ts +87 -87
  135. package/lib/banner/banner.js +79 -1
  136. package/lib/banner/banner.js.map +1 -1
  137. package/lib/banner/banner.module.css.js +7 -1
  138. package/lib/banner/banner.module.css.js.map +1 -1
  139. package/lib/banner/index.d.ts +2 -2
  140. package/lib/banner/story-promo-image.d.ts +4 -4
  141. package/lib/base-field/base-field.d.ts +139 -139
  142. package/lib/base-field/base-field.js +127 -1
  143. package/lib/base-field/base-field.js.map +1 -1
  144. package/lib/base-field/base-field.module.css.js +7 -1
  145. package/lib/base-field/base-field.module.css.js.map +1 -1
  146. package/lib/base-field/index.d.ts +1 -1
  147. package/lib/box/box.d.ts +73 -73
  148. package/lib/box/box.js +103 -1
  149. package/lib/box/box.js.map +1 -1
  150. package/lib/box/box.module.css.js +7 -1
  151. package/lib/box/box.module.css.js.map +1 -1
  152. package/lib/box/gap.module.css.js +7 -1
  153. package/lib/box/gap.module.css.js.map +1 -1
  154. package/lib/box/index.d.ts +1 -1
  155. package/lib/box/margin.module.css.js +7 -1
  156. package/lib/box/margin.module.css.js.map +1 -1
  157. package/lib/box/padding.module.css.js +7 -1
  158. package/lib/box/padding.module.css.js.map +1 -1
  159. package/lib/box/width.module.css.js +7 -1
  160. package/lib/box/width.module.css.js.map +1 -1
  161. package/lib/button/button.d.ts +127 -127
  162. package/lib/button/button.js +86 -1
  163. package/lib/button/button.js.map +1 -1
  164. package/lib/button/button.module.css.js +7 -1
  165. package/lib/button/button.module.css.js.map +1 -1
  166. package/lib/button/index.d.ts +1 -1
  167. package/lib/checkbox-field/checkbox-field.d.ts +40 -40
  168. package/lib/checkbox-field/checkbox-field.js +82 -1
  169. package/lib/checkbox-field/checkbox-field.js.map +1 -1
  170. package/lib/checkbox-field/checkbox-field.module.css.js +7 -1
  171. package/lib/checkbox-field/checkbox-field.module.css.js.map +1 -1
  172. package/lib/checkbox-field/checkbox-icon.d.ts +8 -8
  173. package/lib/checkbox-field/checkbox-icon.js +59 -1
  174. package/lib/checkbox-field/checkbox-icon.js.map +1 -1
  175. package/lib/checkbox-field/index.d.ts +1 -1
  176. package/lib/checkbox-field/use-fork-ref.d.ts +11 -11
  177. package/lib/checkbox-field/use-fork-ref.js +42 -1
  178. package/lib/checkbox-field/use-fork-ref.js.map +1 -1
  179. package/lib/columns/columns.d.ts +20 -20
  180. package/lib/columns/columns.js +57 -1
  181. package/lib/columns/columns.js.map +1 -1
  182. package/lib/columns/columns.module.css.js +7 -1
  183. package/lib/columns/columns.module.css.js.map +1 -1
  184. package/lib/columns/index.d.ts +1 -1
  185. package/lib/components/color-picker/color-picker.d.ts +29 -29
  186. package/lib/components/color-picker/color-picker.js +86 -1
  187. package/lib/components/color-picker/color-picker.js.map +1 -1
  188. package/lib/components/color-picker/index.d.ts +3 -3
  189. package/lib/components/color-picker/index.js +11 -1
  190. package/lib/components/color-picker/index.js.map +1 -1
  191. package/lib/components/deprecated-button/deprecated-button.d.ts +54 -54
  192. package/lib/components/deprecated-button/deprecated-button.js +49 -1
  193. package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
  194. package/lib/components/deprecated-button/index.d.ts +4 -4
  195. package/lib/components/deprecated-button/index.js +9 -1
  196. package/lib/components/deprecated-button/index.js.map +1 -1
  197. package/lib/components/deprecated-dropdown/dropdown.d.ts +55 -55
  198. package/lib/components/deprecated-dropdown/dropdown.js +182 -1
  199. package/lib/components/deprecated-dropdown/dropdown.js.map +1 -1
  200. package/lib/components/deprecated-dropdown/index.d.ts +2 -2
  201. package/lib/components/deprecated-dropdown/index.js +9 -1
  202. package/lib/components/deprecated-dropdown/index.js.map +1 -1
  203. package/lib/components/deprecated-input/index.d.ts +2 -2
  204. package/lib/components/deprecated-input/index.js +9 -1
  205. package/lib/components/deprecated-input/index.js.map +1 -1
  206. package/lib/components/deprecated-input/input.d.ts +10 -10
  207. package/lib/components/deprecated-input/input.js +41 -1
  208. package/lib/components/deprecated-input/input.js.map +1 -1
  209. package/lib/components/deprecated-select/index.d.ts +2 -2
  210. package/lib/components/deprecated-select/index.js +9 -1
  211. package/lib/components/deprecated-select/index.js.map +1 -1
  212. package/lib/components/deprecated-select/select.d.ts +33 -33
  213. package/lib/components/deprecated-select/select.js +43 -1
  214. package/lib/components/deprecated-select/select.js.map +1 -1
  215. package/lib/components/icons/CloseIcon.svg.d.ts +3 -3
  216. package/lib/components/icons/ThinQuestionMarkIcon.svg.d.ts +3 -3
  217. package/lib/components/icons/ThreeDotsIcon.svg.d.ts +12 -12
  218. package/lib/components/key-capturer/index.d.ts +3 -3
  219. package/lib/components/key-capturer/index.js +11 -1
  220. package/lib/components/key-capturer/index.js.map +1 -1
  221. package/lib/components/key-capturer/key-capturer.d.ts +40 -40
  222. package/lib/components/key-capturer/key-capturer.js +171 -1
  223. package/lib/components/key-capturer/key-capturer.js.map +1 -1
  224. package/lib/components/keyboard-shortcut/index.d.ts +2 -2
  225. package/lib/components/keyboard-shortcut/index.js +9 -1
  226. package/lib/components/keyboard-shortcut/index.js.map +1 -1
  227. package/lib/components/keyboard-shortcut/keyboard-shortcut.d.ts +44 -44
  228. package/lib/components/keyboard-shortcut/keyboard-shortcut.js +97 -1
  229. package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  230. package/lib/components/progress-bar/index.d.ts +2 -2
  231. package/lib/components/progress-bar/index.js +9 -1
  232. package/lib/components/progress-bar/index.js.map +1 -1
  233. package/lib/components/progress-bar/progress-bar.d.ts +14 -14
  234. package/lib/components/progress-bar/progress-bar.js +44 -1
  235. package/lib/components/progress-bar/progress-bar.js.map +1 -1
  236. package/lib/components/progress-bar/progress-bar.module.css.js +7 -1
  237. package/lib/components/progress-bar/progress-bar.module.css.js.map +1 -1
  238. package/lib/components/time/index.d.ts +2 -2
  239. package/lib/components/time/index.js +9 -1
  240. package/lib/components/time/index.js.map +1 -1
  241. package/lib/components/time/time-utils.d.ts +19 -19
  242. package/lib/components/time/time-utils.js +69 -1
  243. package/lib/components/time/time-utils.js.map +1 -1
  244. package/lib/components/time/time.d.ts +39 -39
  245. package/lib/components/time/time.js +124 -1
  246. package/lib/components/time/time.js.map +1 -1
  247. package/lib/divider/divider.d.ts +8 -8
  248. package/lib/divider/divider.js +36 -1
  249. package/lib/divider/divider.js.map +1 -1
  250. package/lib/divider/divider.module.css.js +7 -1
  251. package/lib/divider/divider.module.css.js.map +1 -1
  252. package/lib/divider/index.d.ts +1 -1
  253. package/lib/heading/heading.d.ts +112 -112
  254. package/lib/heading/heading.js +51 -1
  255. package/lib/heading/heading.js.map +1 -1
  256. package/lib/heading/heading.module.css.js +7 -1
  257. package/lib/heading/heading.module.css.js.map +1 -1
  258. package/lib/heading/index.d.ts +1 -1
  259. package/lib/hidden/hidden.d.ts +49 -49
  260. package/lib/hidden/hidden.js +70 -1
  261. package/lib/hidden/hidden.js.map +1 -1
  262. package/lib/hidden/hidden.module.css.js +7 -1
  263. package/lib/hidden/hidden.module.css.js.map +1 -1
  264. package/lib/hidden/index.d.ts +1 -1
  265. package/lib/hidden-visually/hidden-visually.d.ts +11 -11
  266. package/lib/hidden-visually/hidden-visually.js +40 -1
  267. package/lib/hidden-visually/hidden-visually.js.map +1 -1
  268. package/lib/hidden-visually/hidden-visually.module.css.js +7 -1
  269. package/lib/hidden-visually/hidden-visually.module.css.js.map +1 -1
  270. package/lib/hidden-visually/index.d.ts +1 -1
  271. package/lib/hooks/use-previous/index.d.ts +1 -1
  272. package/lib/hooks/use-previous/use-previous.d.ts +15 -15
  273. package/lib/icons/alert-icon.d.ts +6 -6
  274. package/lib/icons/alert-icon.js +56 -1
  275. package/lib/icons/alert-icon.js.map +1 -1
  276. package/lib/icons/banner-icon.d.ts +6 -6
  277. package/lib/icons/banner-icon.js +68 -1
  278. package/lib/icons/banner-icon.js.map +1 -1
  279. package/lib/icons/banner-icon.module.css.js +7 -1
  280. package/lib/icons/banner-icon.module.css.js.map +1 -1
  281. package/lib/icons/close-icon.d.ts +3 -3
  282. package/lib/icons/close-icon.js +33 -1
  283. package/lib/icons/close-icon.js.map +1 -1
  284. package/lib/icons/password-hidden-icon.d.ts +3 -3
  285. package/lib/icons/password-hidden-icon.js +36 -1
  286. package/lib/icons/password-hidden-icon.js.map +1 -1
  287. package/lib/icons/password-visible-icon.d.ts +3 -3
  288. package/lib/icons/password-visible-icon.js +35 -1
  289. package/lib/icons/password-visible-icon.js.map +1 -1
  290. package/lib/index.d.ts +38 -38
  291. package/lib/index.js +106 -1
  292. package/lib/index.js.map +1 -1
  293. package/lib/inline/index.d.ts +1 -1
  294. package/lib/inline/inline.d.ts +12 -12
  295. package/lib/inline/inline.js +40 -1
  296. package/lib/inline/inline.js.map +1 -1
  297. package/lib/loading/index.d.ts +1 -1
  298. package/lib/loading/loading.d.ts +26 -26
  299. package/lib/loading/loading.js +49 -1
  300. package/lib/loading/loading.js.map +1 -1
  301. package/lib/menu/index.d.ts +2 -2
  302. package/lib/menu/menu.d.ts +128 -128
  303. package/lib/menu/menu.js +179 -1
  304. package/lib/menu/menu.js.map +1 -1
  305. package/lib/modal/index.d.ts +1 -1
  306. package/lib/modal/modal-stories-components.d.ts +47 -47
  307. package/lib/modal/modal.d.ts +185 -185
  308. package/lib/modal/modal.js +209 -1
  309. package/lib/modal/modal.js.map +1 -1
  310. package/lib/modal/modal.module.css.js +7 -1
  311. package/lib/modal/modal.module.css.js.map +1 -1
  312. package/lib/notice/index.d.ts +1 -1
  313. package/lib/notice/notice.d.ts +10 -10
  314. package/lib/notice/notice.js +42 -1
  315. package/lib/notice/notice.js.map +1 -1
  316. package/lib/notice/notice.module.css.js +7 -1
  317. package/lib/notice/notice.module.css.js.map +1 -1
  318. package/lib/password-field/index.d.ts +1 -1
  319. package/lib/password-field/password-field.d.ts +10 -10
  320. package/lib/password-field/password-field.js +43 -1
  321. package/lib/password-field/password-field.js.map +1 -1
  322. package/lib/prose/index.d.ts +2 -2
  323. package/lib/prose/prose-example.d.ts +1 -1
  324. package/lib/prose/prose.d.ts +44 -44
  325. package/lib/prose/prose.js +42 -1
  326. package/lib/prose/prose.js.map +1 -1
  327. package/lib/prose/prose.module.css.js +7 -1
  328. package/lib/prose/prose.module.css.js.map +1 -1
  329. package/lib/select-field/index.d.ts +1 -1
  330. package/lib/select-field/select-field.d.ts +7 -7
  331. package/lib/select-field/select-field.js +48 -1
  332. package/lib/select-field/select-field.js.map +1 -1
  333. package/lib/select-field/select-field.module.css.js +7 -1
  334. package/lib/select-field/select-field.module.css.js.map +1 -1
  335. package/lib/spinner/index.d.ts +1 -1
  336. package/lib/spinner/spinner.d.ts +5 -5
  337. package/lib/spinner/spinner.js +36 -1
  338. package/lib/spinner/spinner.js.map +1 -1
  339. package/lib/spinner/spinner.module.css.js +7 -1
  340. package/lib/spinner/spinner.module.css.js.map +1 -1
  341. package/lib/stack/index.d.ts +1 -1
  342. package/lib/stack/stack.d.ts +15 -15
  343. package/lib/stack/stack.js +52 -1
  344. package/lib/stack/stack.js.map +1 -1
  345. package/lib/switch-field/index.d.ts +1 -1
  346. package/lib/switch-field/switch-field.d.ts +19 -19
  347. package/lib/switch-field/switch-field.js +74 -1
  348. package/lib/switch-field/switch-field.js.map +1 -1
  349. package/lib/switch-field/switch-field.module.css.js +7 -1
  350. package/lib/switch-field/switch-field.module.css.js.map +1 -1
  351. package/lib/tabs/index.d.ts +1 -1
  352. package/lib/tabs/tabs.d.ts +125 -125
  353. package/lib/tabs/tabs.js +177 -1
  354. package/lib/tabs/tabs.js.map +1 -1
  355. package/lib/tabs/tabs.module.css.js +7 -1
  356. package/lib/tabs/tabs.module.css.js.map +1 -1
  357. package/lib/text/index.d.ts +1 -1
  358. package/lib/text/text.d.ts +47 -47
  359. package/lib/text/text.js +49 -1
  360. package/lib/text/text.js.map +1 -1
  361. package/lib/text/text.module.css.js +7 -1
  362. package/lib/text/text.module.css.js.map +1 -1
  363. package/lib/text-area/index.d.ts +1 -1
  364. package/lib/text-area/text-area.d.ts +39 -39
  365. package/lib/text-area/text-area.js +92 -1
  366. package/lib/text-area/text-area.js.map +1 -1
  367. package/lib/text-area/text-area.module.css.js +7 -1
  368. package/lib/text-area/text-area.module.css.js.map +1 -1
  369. package/lib/text-field/index.d.ts +1 -1
  370. package/lib/text-field/text-field.d.ts +18 -18
  371. package/lib/text-field/text-field.js +63 -1
  372. package/lib/text-field/text-field.js.map +1 -1
  373. package/lib/text-field/text-field.module.css.js +7 -1
  374. package/lib/text-field/text-field.module.css.js.map +1 -1
  375. package/lib/text-link/index.d.ts +1 -1
  376. package/lib/text-link/text-link.d.ts +9 -9
  377. package/lib/text-link/text-link.js +41 -1
  378. package/lib/text-link/text-link.js.map +1 -1
  379. package/lib/text-link/text-link.module.css.js +7 -1
  380. package/lib/text-link/text-link.module.css.js.map +1 -1
  381. package/lib/toast/index.d.ts +4 -4
  382. package/lib/toast/static-toast.d.ts +63 -63
  383. package/lib/toast/static-toast.js +59 -1
  384. package/lib/toast/static-toast.js.map +1 -1
  385. package/lib/toast/toast-animation.d.ts +50 -50
  386. package/lib/toast/toast-animation.js +141 -1
  387. package/lib/toast/toast-animation.js.map +1 -1
  388. package/lib/toast/toast.module.css.js +7 -1
  389. package/lib/toast/toast.module.css.js.map +1 -1
  390. package/lib/toast/use-toasts.d.ts +132 -132
  391. package/lib/toast/use-toasts.js +166 -1
  392. package/lib/toast/use-toasts.js.map +1 -1
  393. package/lib/tooltip/index.d.ts +2 -2
  394. package/lib/tooltip/tooltip.d.ts +72 -72
  395. package/lib/tooltip/tooltip.js +67 -1
  396. package/lib/tooltip/tooltip.js.map +1 -1
  397. package/lib/tooltip/tooltip.module.css.js +7 -1
  398. package/lib/tooltip/tooltip.module.css.js.map +1 -1
  399. package/lib/utils/common-helpers.d.ts +2 -2
  400. package/lib/utils/common-helpers.js +44 -1
  401. package/lib/utils/common-helpers.js.map +1 -1
  402. package/lib/utils/common-types.d.ts +42 -42
  403. package/lib/utils/polymorphism.d.ts +135 -135
  404. package/lib/utils/polymorphism.js +39 -1
  405. package/lib/utils/polymorphism.js.map +1 -1
  406. package/lib/utils/responsive-props.d.ts +44 -44
  407. package/lib/utils/responsive-props.js +70 -1
  408. package/lib/utils/responsive-props.js.map +1 -1
  409. package/lib/utils/storybook-helper.d.ts +55 -0
  410. package/lib/utils/test-helpers.d.ts +22 -22
  411. package/package.json +16 -23
  412. package/styles/avatar.css +3 -3
  413. package/styles/avatar.module.css.css +1 -1
  414. package/styles/badge.css +3 -3
  415. package/styles/badge.module.css.css +1 -1
  416. package/styles/banner.css +7 -7
  417. package/styles/banner.module.css.css +1 -1
  418. package/styles/base-field.css +5 -5
  419. package/styles/base-field.module.css.css +1 -1
  420. package/styles/box.css +2 -2
  421. package/styles/box.module.css.css +1 -1
  422. package/styles/button.css +5 -5
  423. package/styles/button.module.css.css +1 -1
  424. package/styles/checkbox-field.css +4 -4
  425. package/styles/checkbox-field.module.css.css +1 -1
  426. package/styles/columns.css +2 -2
  427. package/styles/divider.css +2 -2
  428. package/styles/heading.css +3 -3
  429. package/styles/heading.module.css.css +1 -1
  430. package/styles/hidden-visually.css +3 -3
  431. package/styles/hidden-visually.module.css.css +1 -1
  432. package/styles/hidden.css +2 -2
  433. package/styles/index.css +5 -5
  434. package/styles/loading.css +3 -3
  435. package/styles/menu.css +1 -1
  436. package/styles/modal.css +6 -6
  437. package/styles/modal.module.css.css +1 -1
  438. package/styles/notice.css +2 -2
  439. package/styles/password-field.css +8 -8
  440. package/styles/progress-bar.module.css.css +1 -1
  441. package/styles/prose.css +3 -3
  442. package/styles/prose.module.css.css +1 -1
  443. package/styles/reactist.css +31 -31
  444. package/styles/select-field.css +6 -6
  445. package/styles/select-field.module.css.css +1 -1
  446. package/styles/spinner.css +1 -1
  447. package/styles/static-toast.css +7 -7
  448. package/styles/switch-field.css +7 -7
  449. package/styles/switch-field.module.css.css +1 -1
  450. package/styles/tabs.css +3 -3
  451. package/styles/tabs.module.css.css +1 -1
  452. package/styles/text-area.css +6 -6
  453. package/styles/text-area.module.css.css +1 -1
  454. package/styles/text-field.css +6 -6
  455. package/styles/text-field.module.css.css +1 -1
  456. package/styles/text-link.css +3 -3
  457. package/styles/text-link.module.css.css +1 -1
  458. package/styles/text.css +3 -3
  459. package/styles/text.module.css.css +1 -1
  460. package/styles/toast.module.css.css +1 -1
  461. package/styles/tooltip.css +3 -3
  462. package/styles/tooltip.module.css.css +1 -1
  463. package/styles/use-toasts.css +7 -7
  464. package/styles/width.module.css.css +1 -1
  465. package/es/_virtual/_rollupPluginBabelHelpers.js +0 -91
  466. package/es/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
  467. package/lib/_virtual/_rollupPluginBabelHelpers.js +0 -2
  468. package/lib/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
1
+ import { __rest, __assign } from 'tslib';
2
2
  import * as React from 'react';
3
3
  import classNames from 'classnames';
4
4
  import { useMergeRefs } from 'use-callback-ref';
@@ -6,117 +6,60 @@ import { BaseField } from '../base-field/base-field.js';
6
6
  import { Box } from '../box/box.js';
7
7
  import modules_2728c236 from './text-area.module.css.js';
8
8
 
9
- const _excluded = ["variant", "id", "label", "value", "auxiliaryLabel", "message", "tone", "maxWidth", "maxLength", "hidden", "aria-describedby", "rows", "autoExpand", "disableResize", "onChange"],
10
- _excluded2 = ["onChange"];
11
- const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
12
- let {
13
- variant = 'default',
14
- id,
15
- label,
16
- value,
17
- auxiliaryLabel,
18
- message,
19
- tone,
20
- maxWidth,
21
- maxLength,
22
- hidden,
23
- 'aria-describedby': ariaDescribedBy,
24
- rows,
25
- autoExpand = false,
26
- disableResize = false,
27
- onChange: originalOnChange
28
- } = _ref,
29
- props = _objectWithoutProperties(_ref, _excluded);
30
-
31
- const containerRef = React.useRef(null);
32
- const internalRef = React.useRef(null);
33
- const combinedRef = useMergeRefs([ref, internalRef]);
34
- useAutoExpand({
35
- value,
36
- autoExpand,
37
- containerRef,
38
- internalRef
39
- });
40
- const textAreaClassName = classNames([autoExpand ? modules_2728c236.disableResize : null, disableResize ? modules_2728c236.disableResize : null]);
41
- return /*#__PURE__*/React.createElement(BaseField, {
42
- variant: variant,
43
- id: id,
44
- label: label,
45
- value: value,
46
- auxiliaryLabel: auxiliaryLabel,
47
- message: message,
48
- tone: tone,
49
- hidden: hidden,
50
- "aria-describedby": ariaDescribedBy,
51
- className: [modules_2728c236.textAreaContainer, tone === 'error' ? modules_2728c236.error : null, variant === 'bordered' ? modules_2728c236.bordered : null],
52
- maxWidth: maxWidth,
53
- maxLength: maxLength
54
- }, _ref2 => {
55
- let {
56
- onChange
57
- } = _ref2,
58
- extraProps = _objectWithoutProperties(_ref2, _excluded2);
59
-
60
- return /*#__PURE__*/React.createElement(Box, {
61
- width: "full",
62
- display: "flex",
63
- className: modules_2728c236.innerContainer,
64
- ref: containerRef
65
- }, /*#__PURE__*/React.createElement("textarea", _objectSpread2(_objectSpread2(_objectSpread2({}, props), extraProps), {}, {
66
- ref: combinedRef,
67
- rows: rows,
68
- className: textAreaClassName,
69
- maxLength: maxLength,
70
- onChange: event => {
71
- originalOnChange == null ? void 0 : originalOnChange(event);
72
- onChange == null ? void 0 : onChange(event);
73
- }
74
- })));
75
- });
9
+ var TextArea = React.forwardRef(function TextArea(_a, ref) {
10
+ 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, maxLength = _a.maxLength, hidden = _a.hidden, ariaDescribedBy = _a["aria-describedby"], rows = _a.rows, _c = _a.autoExpand, autoExpand = _c === void 0 ? false : _c, _d = _a.disableResize, disableResize = _d === void 0 ? false : _d, originalOnChange = _a.onChange, props = __rest(_a, ["variant", "id", "label", "value", "auxiliaryLabel", "message", "tone", "maxWidth", "maxLength", "hidden", 'aria-describedby', "rows", "autoExpand", "disableResize", "onChange"]);
11
+ var containerRef = React.useRef(null);
12
+ var internalRef = React.useRef(null);
13
+ var combinedRef = useMergeRefs([ref, internalRef]);
14
+ useAutoExpand({ value: value, autoExpand: autoExpand, containerRef: containerRef, internalRef: internalRef });
15
+ var textAreaClassName = classNames([
16
+ autoExpand ? modules_2728c236.disableResize : null,
17
+ disableResize ? modules_2728c236.disableResize : null,
18
+ ]);
19
+ return (React.createElement(BaseField, { variant: variant, id: id, label: label, value: value, auxiliaryLabel: auxiliaryLabel, message: message, tone: tone, hidden: hidden, "aria-describedby": ariaDescribedBy, className: [
20
+ modules_2728c236.textAreaContainer,
21
+ tone === 'error' ? modules_2728c236.error : null,
22
+ variant === 'bordered' ? modules_2728c236.bordered : null,
23
+ ], maxWidth: maxWidth, maxLength: maxLength }, function (_a) {
24
+ var onChange = _a.onChange, extraProps = __rest(_a, ["onChange"]);
25
+ return (React.createElement(Box, { width: "full", display: "flex", className: modules_2728c236.innerContainer, ref: containerRef },
26
+ React.createElement("textarea", __assign({}, props, extraProps, { ref: combinedRef, rows: rows, className: textAreaClassName, maxLength: maxLength, onChange: function (event) {
27
+ originalOnChange === null || originalOnChange === void 0 ? void 0 : originalOnChange(event);
28
+ onChange === null || onChange === void 0 ? void 0 : onChange(event);
29
+ } }))));
30
+ }));
76
31
  });
77
-
78
- function useAutoExpand({
79
- value,
80
- autoExpand,
81
- containerRef,
82
- internalRef
83
- }) {
84
- const isControlled = value !== undefined;
85
- React.useEffect(function setupAutoExpandWhenUncontrolled() {
86
- const textAreaElement = internalRef.current;
87
-
88
- if (!textAreaElement || !autoExpand || isControlled) {
89
- return undefined;
90
- }
91
-
92
- const containerElement = containerRef.current;
93
-
94
- function handleAutoExpand(value) {
95
- if (containerElement) {
96
- containerElement.dataset.replicatedValue = value;
97
- }
98
- }
99
-
100
- function handleInput(event) {
101
- handleAutoExpand(event.currentTarget.value);
102
- } // Apply change initially, in case the text area has a non-empty initial value
103
-
104
-
105
- handleAutoExpand(textAreaElement.value);
106
- textAreaElement.addEventListener('input', handleInput);
107
- return () => textAreaElement.removeEventListener('input', handleInput);
108
- }, [autoExpand, containerRef, internalRef, isControlled]);
109
- React.useEffect(function setupAutoExpandWhenControlled() {
110
- if (!isControlled || !autoExpand) {
111
- return;
112
- }
113
-
114
- const containerElement = containerRef.current;
115
-
116
- if (containerElement) {
117
- containerElement.dataset.replicatedValue = value;
118
- }
119
- }, [value, containerRef, isControlled, autoExpand]);
32
+ function useAutoExpand(_a) {
33
+ var value = _a.value, autoExpand = _a.autoExpand, containerRef = _a.containerRef, internalRef = _a.internalRef;
34
+ var isControlled = value !== undefined;
35
+ React.useEffect(function setupAutoExpandWhenUncontrolled() {
36
+ var textAreaElement = internalRef.current;
37
+ if (!textAreaElement || !autoExpand || isControlled) {
38
+ return undefined;
39
+ }
40
+ var containerElement = containerRef.current;
41
+ function handleAutoExpand(value) {
42
+ if (containerElement) {
43
+ containerElement.dataset.replicatedValue = value;
44
+ }
45
+ }
46
+ function handleInput(event) {
47
+ handleAutoExpand(event.currentTarget.value);
48
+ }
49
+ // Apply change initially, in case the text area has a non-empty initial value
50
+ handleAutoExpand(textAreaElement.value);
51
+ textAreaElement.addEventListener('input', handleInput);
52
+ return function () { return textAreaElement.removeEventListener('input', handleInput); };
53
+ }, [autoExpand, containerRef, internalRef, isControlled]);
54
+ React.useEffect(function setupAutoExpandWhenControlled() {
55
+ if (!isControlled || !autoExpand) {
56
+ return;
57
+ }
58
+ var containerElement = containerRef.current;
59
+ if (containerElement) {
60
+ containerElement.dataset.replicatedValue = value;
61
+ }
62
+ }, [value, containerRef, isControlled, autoExpand]);
120
63
  }
121
64
 
122
65
  export { TextArea };
@@ -1 +1 @@
1
- {"version":3,"file":"text-area.js","sources":["../../src/text-area/text-area.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\nimport { useMergeRefs } from 'use-callback-ref'\nimport { BaseField, BaseFieldVariantProps, FieldComponentProps } from '../base-field'\nimport { Box } from '../box'\nimport styles from './text-area.module.css'\n\ninterface TextAreaProps\n extends Omit<FieldComponentProps<HTMLTextAreaElement>, 'characterCountPosition'>,\n Omit<\n BaseFieldVariantProps,\n 'supportsStartAndEndSlots' | 'endSlot' | 'endSlotPosition' | 'value'\n > {\n /**\n * The value of the text area.\n *\n * If this prop is not specified, the text area will be uncontrolled and the component will\n * manage its own state.\n */\n value?: string\n\n /**\n * The number of visible text lines for the text area.\n *\n * If it is specified, it must be a positive integer. If it is not specified, the default\n * value is 2 (set by the browser).\n *\n * When `autoExpand` is true, this value serves the purpose of specifying the minimum number\n * of rows that the textarea will shrink to when the content is not large enough to make it\n * expand.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n */\n rows?: number\n\n /**\n * If `true`, the textarea will be automatically resized to fit the content, and the ability to\n * manually resize the textarea will be disabled.\n */\n autoExpand?: boolean\n\n /**\n * If `true`, the ability to manually resize the textarea will be disabled.\n *\n * When `autoExpand` is true, this property serves no purpose, because the ability to manually\n * resize the textarea is always disabled when `autoExpand` is true.\n */\n disableResize?: boolean\n}\n\nconst TextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps>(function TextArea(\n {\n variant = 'default',\n id,\n label,\n value,\n auxiliaryLabel,\n message,\n tone,\n maxWidth,\n maxLength,\n hidden,\n 'aria-describedby': ariaDescribedBy,\n rows,\n autoExpand = false,\n disableResize = false,\n onChange: originalOnChange,\n ...props\n },\n ref,\n) {\n const containerRef = React.useRef<HTMLDivElement>(null)\n const internalRef = React.useRef<HTMLTextAreaElement>(null)\n const combinedRef = useMergeRefs([ref, internalRef])\n\n useAutoExpand({ value, autoExpand, containerRef, internalRef })\n\n const textAreaClassName = classNames([\n autoExpand ? styles.disableResize : null,\n disableResize ? styles.disableResize : null,\n ])\n\n return (\n <BaseField\n variant={variant}\n id={id}\n label={label}\n value={value}\n auxiliaryLabel={auxiliaryLabel}\n message={message}\n tone={tone}\n hidden={hidden}\n aria-describedby={ariaDescribedBy}\n className={[\n styles.textAreaContainer,\n tone === 'error' ? styles.error : null,\n variant === 'bordered' ? styles.bordered : null,\n ]}\n maxWidth={maxWidth}\n maxLength={maxLength}\n >\n {({ onChange, ...extraProps }) => (\n <Box\n width=\"full\"\n display=\"flex\"\n className={styles.innerContainer}\n ref={containerRef}\n >\n <textarea\n {...props}\n {...extraProps}\n ref={combinedRef}\n rows={rows}\n className={textAreaClassName}\n maxLength={maxLength}\n onChange={(event) => {\n originalOnChange?.(event)\n onChange?.(event)\n }}\n />\n </Box>\n )}\n </BaseField>\n )\n})\n\nfunction useAutoExpand({\n value,\n autoExpand,\n containerRef,\n internalRef,\n}: {\n value: string | undefined\n autoExpand: boolean\n containerRef: React.RefObject<HTMLDivElement>\n internalRef: React.RefObject<HTMLTextAreaElement>\n}) {\n const isControlled = value !== undefined\n\n React.useEffect(\n function setupAutoExpandWhenUncontrolled() {\n const textAreaElement = internalRef.current\n if (!textAreaElement || !autoExpand || isControlled) {\n return undefined\n }\n\n const containerElement = containerRef.current\n\n function handleAutoExpand(value: string) {\n if (containerElement) {\n containerElement.dataset.replicatedValue = value\n }\n }\n\n function handleInput(event: Event) {\n handleAutoExpand((event.currentTarget as HTMLTextAreaElement).value)\n }\n\n // Apply change initially, in case the text area has a non-empty initial value\n handleAutoExpand(textAreaElement.value)\n textAreaElement.addEventListener('input', handleInput)\n return () => textAreaElement.removeEventListener('input', handleInput)\n },\n [autoExpand, containerRef, internalRef, isControlled],\n )\n\n React.useEffect(\n function setupAutoExpandWhenControlled() {\n if (!isControlled || !autoExpand) {\n return\n }\n\n const containerElement = containerRef.current\n if (containerElement) {\n containerElement.dataset.replicatedValue = value\n }\n },\n [value, containerRef, isControlled, autoExpand],\n )\n}\n\nexport { TextArea }\nexport type { TextAreaProps }\n"],"names":["TextArea","React","forwardRef","ref","variant","id","label","value","auxiliaryLabel","message","tone","maxWidth","maxLength","hidden","ariaDescribedBy","rows","autoExpand","disableResize","onChange","originalOnChange","props","containerRef","useRef","internalRef","combinedRef","useMergeRefs","useAutoExpand","textAreaClassName","classNames","styles","createElement","BaseField","className","textAreaContainer","error","bordered","extraProps","Box","width","display","innerContainer","_objectSpread","event","isControlled","undefined","useEffect","setupAutoExpandWhenUncontrolled","textAreaElement","current","containerElement","handleAutoExpand","dataset","replicatedValue","handleInput","currentTarget","addEventListener","removeEventListener","setupAutoExpandWhenControlled"],"mappings":";;;;;;;;;;AAkDMA,MAAAA,QAAQ,gBAAGC,KAAK,CAACC,UAAN,CAAqD,SAASF,QAAT,CAmBlEG,IAAAA,EAAAA,GAnBkE,EAmB/D;EAAA,IAlBH;AACIC,IAAAA,OAAO,GAAG,SADd;IAEIC,EAFJ;IAGIC,KAHJ;IAIIC,KAJJ;IAKIC,cALJ;IAMIC,OANJ;IAOIC,IAPJ;IAQIC,QARJ;IASIC,SATJ;IAUIC,MAVJ;AAWI,IAAA,kBAAA,EAAoBC,eAXxB;IAYIC,IAZJ;AAaIC,IAAAA,UAAU,GAAG,KAbjB;AAcIC,IAAAA,aAAa,GAAG,KAdpB;AAeIC,IAAAA,QAAQ,EAAEC,gBAAAA;GAGX,GAAA,IAAA;AAAA,MAFIC,KAEJ,GAAA,wBAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;;AAEH,EAAA,MAAMC,YAAY,GAAGpB,KAAK,CAACqB,MAAN,CAA6B,IAA7B,CAArB,CAAA;AACA,EAAA,MAAMC,WAAW,GAAGtB,KAAK,CAACqB,MAAN,CAAkC,IAAlC,CAApB,CAAA;EACA,MAAME,WAAW,GA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AAC,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAzD,EAAyD,CAAA;KACzE,EACD,CAAC,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,CAAC,CACxD,CAAA;AAED,IAAA,KAAK,CAAC,SAAS,CACX,SAAS,6BAA6B,GAAA;AAClC,QAAA,IAAI,CAAC,YAAY,IAAI,CAAC,UAAU,EAAE;YAC9B,OAAM;AACT,SAAA;AAED,QAAA,IAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,CAAA;AAC7C,QAAA,IAAI,gBAAgB,EAAE;AAClB,YAAA,gBAAgB,CAAC,OAAO,CAAC,eAAe,GAAG,KAAK,CAAA;AACnD,SAAA;KACJ,EACD,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,CAAC,CAClD,CAAA;AACL;;;;"}
@@ -1,93 +1,39 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
1
+ import { __rest, __assign } from 'tslib';
2
2
  import * as React from 'react';
3
3
  import { BaseField } from '../base-field/base-field.js';
4
4
  import { Box } from '../box/box.js';
5
5
  import modules_aaf25250 from './text-field.module.css.js';
6
6
  import { useMergeRefs } from 'use-callback-ref';
7
7
 
8
- const _excluded = ["variant", "id", "label", "value", "auxiliaryLabel", "message", "tone", "type", "maxWidth", "maxLength", "hidden", "aria-describedby", "startSlot", "endSlot", "onChange", "characterCountPosition", "endSlotPosition"],
9
- _excluded2 = ["onChange", "characterCountElement"];
10
- const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
11
- let {
12
- variant = 'default',
13
- id,
14
- label,
15
- value,
16
- auxiliaryLabel,
17
- message,
18
- tone,
19
- type = 'text',
20
- maxWidth,
21
- maxLength,
22
- hidden,
23
- 'aria-describedby': ariaDescribedBy,
24
- startSlot,
25
- endSlot,
26
- onChange: originalOnChange,
27
- characterCountPosition = 'below',
28
- endSlotPosition = 'bottom'
29
- } = _ref,
30
- props = _objectWithoutProperties(_ref, _excluded);
31
-
32
- const internalRef = React.useRef(null);
33
- const combinedRef = useMergeRefs([ref, internalRef]);
34
-
35
- function handleClick(event) {
36
- var _internalRef$current;
37
-
38
- if (event.currentTarget === combinedRef.current) return;
39
- (_internalRef$current = internalRef.current) == null ? void 0 : _internalRef$current.focus();
40
- }
41
-
42
- const displayEndSlot = endSlot && (variant === 'default' || variant === 'bordered' && endSlotPosition === 'bottom');
43
- return /*#__PURE__*/React.createElement(BaseField, {
44
- variant: variant,
45
- id: id,
46
- label: label,
47
- value: value,
48
- auxiliaryLabel: auxiliaryLabel,
49
- message: message,
50
- tone: tone,
51
- maxWidth: maxWidth,
52
- maxLength: maxLength,
53
- hidden: hidden,
54
- "aria-describedby": ariaDescribedBy,
55
- characterCountPosition: characterCountPosition,
56
- supportsStartAndEndSlots: true,
57
- endSlot: endSlot,
58
- endSlotPosition: variant === 'bordered' ? endSlotPosition : undefined
59
- }, _ref2 => {
60
- let {
61
- onChange,
62
- characterCountElement
63
- } = _ref2,
64
- extraProps = _objectWithoutProperties(_ref2, _excluded2);
65
-
66
- return /*#__PURE__*/React.createElement(Box, {
67
- display: "flex",
68
- alignItems: "center",
69
- className: [modules_aaf25250.inputWrapper, tone === 'error' ? modules_aaf25250.error : null, variant === 'bordered' ? modules_aaf25250.bordered : null, props.readOnly ? modules_aaf25250.readOnly : null],
70
- onClick: handleClick
71
- }, startSlot ? /*#__PURE__*/React.createElement(Box, {
72
- className: modules_aaf25250.slot,
73
- display: "flex",
74
- marginRight: variant === 'bordered' ? 'xsmall' : '-xsmall',
75
- marginLeft: variant === 'bordered' ? '-xsmall' : 'xsmall'
76
- }, startSlot) : null, /*#__PURE__*/React.createElement("input", _objectSpread2(_objectSpread2(_objectSpread2({}, props), extraProps), {}, {
77
- type: type,
78
- ref: combinedRef,
79
- maxLength: maxLength,
80
- onChange: event => {
81
- originalOnChange == null ? void 0 : originalOnChange(event);
82
- onChange == null ? void 0 : onChange(event);
83
- }
84
- })), displayEndSlot || characterCountElement ? /*#__PURE__*/React.createElement(Box, {
85
- className: modules_aaf25250.slot,
86
- display: "flex",
87
- marginRight: variant === 'bordered' ? '-xsmall' : 'xsmall',
88
- marginLeft: variant === 'bordered' ? 'xsmall' : '-xsmall'
89
- }, characterCountElement, displayEndSlot ? endSlot : null) : null);
90
- });
8
+ var TextField = React.forwardRef(function TextField(_a, ref) {
9
+ 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 = __rest(_a, ["variant", "id", "label", "value", "auxiliaryLabel", "message", "tone", "type", "maxWidth", "maxLength", "hidden", 'aria-describedby', "startSlot", "endSlot", "onChange", "characterCountPosition", "endSlotPosition"]);
10
+ var internalRef = React.useRef(null);
11
+ var combinedRef = useMergeRefs([ref, internalRef]);
12
+ function handleClick(event) {
13
+ var _a;
14
+ if (event.currentTarget === combinedRef.current)
15
+ return;
16
+ (_a = internalRef.current) === null || _a === void 0 ? void 0 : _a.focus();
17
+ }
18
+ var displayEndSlot = endSlot &&
19
+ (variant === 'default' || (variant === 'bordered' && endSlotPosition === 'bottom'));
20
+ return (React.createElement(BaseField, { variant: variant, id: id, label: label, value: value, auxiliaryLabel: auxiliaryLabel, message: message, tone: tone, maxWidth: maxWidth, maxLength: maxLength, hidden: hidden, "aria-describedby": ariaDescribedBy, characterCountPosition: characterCountPosition, supportsStartAndEndSlots: true, endSlot: endSlot, endSlotPosition: variant === 'bordered' ? endSlotPosition : undefined }, function (_a) {
21
+ var onChange = _a.onChange, characterCountElement = _a.characterCountElement, extraProps = __rest(_a, ["onChange", "characterCountElement"]);
22
+ return (React.createElement(Box, { display: "flex", alignItems: "center", className: [
23
+ modules_aaf25250.inputWrapper,
24
+ tone === 'error' ? modules_aaf25250.error : null,
25
+ variant === 'bordered' ? modules_aaf25250.bordered : null,
26
+ props.readOnly ? modules_aaf25250.readOnly : null,
27
+ ], onClick: handleClick },
28
+ startSlot ? (React.createElement(Box, { className: modules_aaf25250.slot, display: "flex", marginRight: variant === 'bordered' ? 'xsmall' : '-xsmall', marginLeft: variant === 'bordered' ? '-xsmall' : 'xsmall' }, startSlot)) : null,
29
+ React.createElement("input", __assign({}, props, extraProps, { type: type, ref: combinedRef, maxLength: maxLength, onChange: function (event) {
30
+ originalOnChange === null || originalOnChange === void 0 ? void 0 : originalOnChange(event);
31
+ onChange === null || onChange === void 0 ? void 0 : onChange(event);
32
+ } })),
33
+ displayEndSlot || characterCountElement ? (React.createElement(Box, { className: modules_aaf25250.slot, display: "flex", marginRight: variant === 'bordered' ? '-xsmall' : 'xsmall', marginLeft: variant === 'bordered' ? 'xsmall' : '-xsmall' },
34
+ characterCountElement,
35
+ displayEndSlot ? endSlot : null)) : null));
36
+ }));
91
37
  });
92
38
 
93
39
  export { TextField };
@@ -1 +1 @@
1
- {"version":3,"file":"text-field.js","sources":["../../src/text-field/text-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseField, BaseFieldVariantProps } from '../base-field'\nimport { Box } from '../box'\nimport styles from './text-field.module.css'\nimport type { BaseFieldProps, FieldComponentProps } from '../base-field'\nimport { useMergeRefs } from 'use-callback-ref'\n\ntype TextFieldType = 'email' | 'search' | 'tel' | 'text' | 'url'\n\ninterface TextFieldProps\n extends Omit<FieldComponentProps<HTMLInputElement>, 'type' | 'supportsStartAndEndSlots'>,\n BaseFieldVariantProps,\n Pick<BaseFieldProps, 'characterCountPosition'> {\n type?: TextFieldType\n startSlot?: React.ReactElement | string | number\n endSlot?: React.ReactElement | string | number\n /**\n * The maximum number of characters that the input field can accept.\n * When this limit is reached, the input field will not accept any more characters.\n * The counter element will turn red when the number of characters is within 10 of the maximum limit.\n */\n maxLength?: number\n}\n\nconst TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(function TextField(\n {\n variant = 'default',\n id,\n label,\n value,\n auxiliaryLabel,\n message,\n tone,\n type = 'text',\n maxWidth,\n maxLength,\n hidden,\n 'aria-describedby': ariaDescribedBy,\n startSlot,\n endSlot,\n onChange: originalOnChange,\n characterCountPosition = 'below',\n endSlotPosition = 'bottom',\n ...props\n },\n ref,\n) {\n const internalRef = React.useRef<HTMLInputElement>(null)\n const combinedRef = useMergeRefs([ref, internalRef])\n\n function handleClick(event: React.MouseEvent) {\n if (event.currentTarget === combinedRef.current) return\n internalRef.current?.focus()\n }\n\n const displayEndSlot =\n endSlot &&\n (variant === 'default' || (variant === 'bordered' && endSlotPosition === 'bottom'))\n\n return (\n <BaseField\n variant={variant}\n id={id}\n label={label}\n value={value}\n auxiliaryLabel={auxiliaryLabel}\n message={message}\n tone={tone}\n maxWidth={maxWidth}\n maxLength={maxLength}\n hidden={hidden}\n aria-describedby={ariaDescribedBy}\n characterCountPosition={characterCountPosition}\n supportsStartAndEndSlots\n endSlot={endSlot}\n endSlotPosition={variant === 'bordered' ? endSlotPosition : undefined}\n >\n {({ onChange, characterCountElement, ...extraProps }) => (\n <Box\n display=\"flex\"\n alignItems=\"center\"\n className={[\n styles.inputWrapper,\n tone === 'error' ? styles.error : null,\n variant === 'bordered' ? styles.bordered : null,\n props.readOnly ? styles.readOnly : null,\n ]}\n onClick={handleClick}\n >\n {startSlot ? (\n <Box\n className={styles.slot}\n display=\"flex\"\n marginRight={variant === 'bordered' ? 'xsmall' : '-xsmall'}\n marginLeft={variant === 'bordered' ? '-xsmall' : 'xsmall'}\n >\n {startSlot}\n </Box>\n ) : null}\n <input\n {...props}\n {...extraProps}\n type={type}\n ref={combinedRef}\n maxLength={maxLength}\n onChange={(event) => {\n originalOnChange?.(event)\n onChange?.(event)\n }}\n />\n {displayEndSlot || characterCountElement ? (\n <Box\n className={styles.slot}\n display=\"flex\"\n marginRight={variant === 'bordered' ? '-xsmall' : 'xsmall'}\n marginLeft={variant === 'bordered' ? 'xsmall' : '-xsmall'}\n >\n {characterCountElement}\n {displayEndSlot ? endSlot : null}\n </Box>\n ) : null}\n </Box>\n )}\n </BaseField>\n )\n})\n\nexport { TextField }\nexport type { TextFieldProps, TextFieldType }\n"],"names":["TextField","React","forwardRef","ref","variant","id","label","value","auxiliaryLabel","message","tone","type","maxWidth","maxLength","hidden","ariaDescribedBy","startSlot","endSlot","onChange","originalOnChange","characterCountPosition","endSlotPosition","props","internalRef","useRef","combinedRef","useMergeRefs","handleClick","event","currentTarget","current","focus","displayEndSlot","BaseField","supportsStartAndEndSlots","undefined","characterCountElement","extraProps","createElement","Box","display","alignItems","className","styles","inputWrapper","error","bordered","readOnly","onClick","slot","marginRight","marginLeft"],"mappings":";;;;;;;;;AAwBMA,MAAAA,SAAS,gBAAGC,KAAK,CAACC,UAAN,CAAmD,SAASF,SAAT,CAqBjEG,IAAAA,EAAAA,GArBiE,EAqB9D;EAAA,IApBH;AACIC,IAAAA,OAAO,GAAG,SADd;IAEIC,EAFJ;IAGIC,KAHJ;IAIIC,KAJJ;IAKIC,cALJ;IAMIC,OANJ;IAOIC,IAPJ;AAQIC,IAAAA,IAAI,GAAG,MARX;IASIC,QATJ;IAUIC,SAVJ;IAWIC,MAXJ;AAYI,IAAA,kBAAA,EAAoBC,eAZxB;IAaIC,SAbJ;IAcIC,OAdJ;AAeIC,IAAAA,QAAQ,EAAEC,gBAfd;AAgBIC,IAAAA,sBAAsB,GAAG,OAhB7B;AAiBIC,IAAAA,eAAe,GAAG,QAAA;GAGnB,GAAA,IAAA;AAAA,MAFIC,KAEJ,GAAA,wBAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;;AAEH,EAAA,MAAMC,WAAW,GAAGtB,K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BAAgB,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAhB,gBAAgB,CAAG,KAAK,CAAC,CAAA;AACzB,oBAAA,QAAQ,aAAR,QAAQ,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAR,QAAQ,CAAG,KAAK,CAAC,CAAA;AACrB,iBAAC,EACH,CAAA,CAAA;YACD,cAAc,IAAI,qBAAqB,IACpC,KAAA,CAAA,aAAA,CAAC,GAAG,EACA,EAAA,SAAS,EAAEA,gBAAM,CAAC,IAAI,EACtB,OAAO,EAAC,MAAM,EACd,WAAW,EAAE,OAAO,KAAK,UAAU,GAAG,SAAS,GAAG,QAAQ,EAC1D,UAAU,EAAE,OAAO,KAAK,UAAU,GAAG,QAAQ,GAAG,SAAS,EAAA;gBAExD,qBAAqB;AACrB,gBAAA,cAAc,GAAG,OAAO,GAAG,IAAI,CAC9B,IACN,IAAI,CACN,EACT;AAAA,KAAA,CACO,EACf;AACL,CAAC;;;;"}
@@ -1,28 +1,17 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
1
+ import { __rest, __assign } from 'tslib';
2
2
  import * as React from 'react';
3
3
  import { Box } from '../box/box.js';
4
4
  import { polymorphicComponent } from '../utils/polymorphism.js';
5
5
  import modules_3d05deee from './text-link.module.css.js';
6
6
 
7
- const _excluded = ["as", "openInNewTab", "exceptionallySetClassName", "color", "underline"];
8
- const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref) {
9
- let {
10
- as = 'a',
11
- openInNewTab = false,
12
- exceptionallySetClassName,
13
- color = 'default',
14
- underline = true
15
- } = _ref,
16
- props = _objectWithoutProperties(_ref, _excluded);
17
-
18
- return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
19
- as: as,
20
- display: "inline",
21
- className: [exceptionallySetClassName, modules_3d05deee.container, modules_3d05deee[color], underline ? modules_3d05deee.underline : modules_3d05deee['no-underline']],
22
- ref: ref,
23
- target: openInNewTab ? '_blank' : undefined,
24
- rel: openInNewTab ? 'noopener noreferrer' : undefined
25
- }));
7
+ var TextLink = polymorphicComponent(function TextLink(_a, ref) {
8
+ var _b = _a.as, as = _b === void 0 ? 'a' : _b, _c = _a.openInNewTab, openInNewTab = _c === void 0 ? false : _c, exceptionallySetClassName = _a.exceptionallySetClassName, _d = _a.color, color = _d === void 0 ? 'default' : _d, _e = _a.underline, underline = _e === void 0 ? true : _e, props = __rest(_a, ["as", "openInNewTab", "exceptionallySetClassName", "color", "underline"]);
9
+ return (React.createElement(Box, __assign({}, props, { as: as, display: "inline", className: [
10
+ exceptionallySetClassName,
11
+ modules_3d05deee.container,
12
+ modules_3d05deee[color],
13
+ underline ? modules_3d05deee.underline : modules_3d05deee['no-underline'],
14
+ ], ref: ref, target: openInNewTab ? '_blank' : undefined, rel: openInNewTab ? 'noopener noreferrer' : undefined })));
26
15
  });
27
16
 
28
17
  export { TextLink };
@@ -1 +1 @@
1
- {"version":3,"file":"text-link.js","sources":["../../src/text-link/text-link.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { polymorphicComponent } from '../utils/polymorphism'\nimport styles from './text-link.module.css'\nimport type { OpenInNewTab } from '../utils/common-types'\n\ntype TextLinkColors = 'default' | 'inherit'\n\ntype TextLinkProps = OpenInNewTab & {\n color?: TextLinkColors\n underline?: boolean\n}\n\nconst TextLink = polymorphicComponent<'a', TextLinkProps>(function TextLink(\n {\n as = 'a',\n openInNewTab = false,\n exceptionallySetClassName,\n color = 'default',\n underline = true,\n ...props\n },\n ref,\n) {\n return (\n <Box\n {...props}\n as={as}\n display=\"inline\"\n className={[\n exceptionallySetClassName,\n styles.container,\n styles[color],\n underline ? styles.underline : styles['no-underline'],\n ]}\n ref={ref}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n />\n )\n})\n\nexport { TextLink }\nexport type { TextLinkProps }\n"],"names":["TextLink","polymorphicComponent","ref","as","openInNewTab","exceptionallySetClassName","color","underline","props","React","createElement","Box","display","className","styles","container","target","undefined","rel"],"mappings":";;;;;;;AAaMA,MAAAA,QAAQ,gBAAGC,oBAAoB,CAAqB,SAASD,QAAT,CAAA,IAAA,EAStDE,GATsD,EASnD;EAAA,IARH;AACIC,IAAAA,EAAE,GAAG,GADT;AAEIC,IAAAA,YAAY,GAAG,KAFnB;IAGIC,yBAHJ;AAIIC,IAAAA,KAAK,GAAG,SAJZ;AAKIC,IAAAA,SAAS,GAAG,IAAA;GAGb,GAAA,IAAA;AAAA,MAFIC,KAEJ,GAAA,wBAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;;AAEH,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAACC,GAAD,oCACQH,KADR,CAAA,EAAA,EAAA,EAAA;AAEIL,IAAAA,EAAE,EAAEA,EAFR;AAGIS,IAAAA,OAAO,EAAC,QAHZ;IAIIC,SAAS,EAAE,CACPR,yBADO,EAEPS,gBAAM,CAACC,SAFA,EAGPD,gBAAM,CAACR,KAAD,CAHC,EAIPC,SAAS,GAAGO,gBAAM,CAACP,SAAV,GAAsBO,gBAAM,CAAC,cAAD,CAJ9B,CAJf;AAUIZ,IAAAA,GAAG,EAAEA,GAVT;AAWIc,IAAAA,MAAM,EAAEZ,YAAY,GAAG,QAAH,GAAca,SAXtC;AAYIC,IAAAA,GAAG,EAAEd,YAAY,GAAG,qBAAH,GAA2Ba,SAAAA;GAbpD,CAAA,CAAA,CAAA;AAgBH,CA3BoC;;;;"}
1
+ {"version":3,"file":"text-link.js","sources":["../../src/text-link/text-link.tsx"],"sourcesContent":[null],"names":["styles"],"mappings":";;;;;;AAaM,IAAA,QAAQ,GAAG,oBAAoB,CAAqB,SAAS,QAAQ,CACvE,EAOC,EACD,GAAG,EAAA;AAPC,IAAA,IAAA,EAAQ,GAAA,EAAA,CAAA,EAAA,EAAR,EAAE,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,GAAG,GAAA,EAAA,EACR,EAAoB,GAAA,EAAA,CAAA,YAAA,EAApB,YAAY,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,KAAK,GAAA,EAAA,EACpB,yBAAyB,GAAA,EAAA,CAAA,yBAAA,EACzB,EAAiB,GAAA,EAAA,CAAA,KAAA,EAAjB,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,SAAS,GAAA,EAAA,EACjB,EAAgB,GAAA,EAAA,CAAA,SAAA,EAAhB,SAAS,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,IAAI,GAAA,EAAA,EACb,KAAK,GAAA,MAAA,CAAA,EAAA,EANZ,yEAOC,CADW,CAAA;AAIZ,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,GAAG,EAAA,QAAA,CAAA,EAAA,EACI,KAAK,EACT,EAAA,EAAE,EAAE,EAAE,EACN,OAAO,EAAC,QAAQ,EAChB,SAAS,EAAE;YACP,yBAAyB;AACzB,YAAAA,gBAAM,CAAC,SAAS;YAChBA,gBAAM,CAAC,KAAK,CAAC;AACb,YAAA,SAAS,GAAGA,gBAAM,CAAC,SAAS,GAAGA,gBAAM,CAAC,cAAc,CAAC;AACxD,SAAA,EACD,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,YAAY,GAAG,QAAQ,GAAG,SAAS,EAC3C,GAAG,EAAE,YAAY,GAAG,qBAAqB,GAAG,SAAS,EAAA,CAAA,CACvD,EACL;AACL,CAAC;;;;"}
@@ -1,4 +1,4 @@
1
- var modules_3d05deee = {"container":"d77fcdc6","default":"_468ce45c","inherit":"_54f92a1e","underline":"cdc8b08c","no-underline":"_06995bac"};
1
+ var modules_3d05deee = {"default":"_468ce45c","inherit":"_54f92a1e","underline":"cdc8b08c","no-underline":"_06995bac","container":"d77fcdc6"};
2
2
 
3
3
  export { modules_3d05deee as default };
4
4
  //# sourceMappingURL=text-link.module.css.js.map
@@ -1,4 +1,4 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
1
+ import { __rest, __assign } from 'tslib';
2
2
  import React__default from 'react';
3
3
  import { CloseIcon } from '../icons/close-icon.js';
4
4
  import { Box } from '../box/box.js';
@@ -7,79 +7,44 @@ import { Stack } from '../stack/stack.js';
7
7
  import { Text } from '../text/text.js';
8
8
  import modules_d11e18f0 from './toast.module.css.js';
9
9
 
10
- const _excluded = ["message", "description", "icon", "action", "onDismiss", "dismissLabel"];
11
- /**
12
- * A toast that shows a message, and an optional action associated with it.
13
- *
14
- * This component is generally not meant to be used directly. Most of the time you'll want to use
15
- * toasts generated via `useToasts` instead. However, this component is available in case you need
16
- * to take control of rendering a toast under different circumstances than that of notification-like
17
- * floating toasts.
18
- *
19
- * This component makes no assumptions outwardly about how it is positioned on the screen. That is,
20
- * it will not be shown floating or fixed to the viewport edges, as toasts normally show up. It only
21
- * provides the toast look and feel, but you are responsible for positioning it as you want.
22
- *
23
- * @see useToasts
10
+ /**
11
+ * A toast that shows a message, and an optional action associated with it.
12
+ *
13
+ * This component is generally not meant to be used directly. Most of the time you'll want to use
14
+ * toasts generated via `useToasts` instead. However, this component is available in case you need
15
+ * to take control of rendering a toast under different circumstances than that of notification-like
16
+ * floating toasts.
17
+ *
18
+ * This component makes no assumptions outwardly about how it is positioned on the screen. That is,
19
+ * it will not be shown floating or fixed to the viewport edges, as toasts normally show up. It only
20
+ * provides the toast look and feel, but you are responsible for positioning it as you want.
21
+ *
22
+ * @see useToasts
24
23
  */
25
-
26
- const StaticToast = /*#__PURE__*/React__default.forwardRef(function Toast(_ref, ref) {
27
- let {
28
- message,
29
- description,
30
- icon,
31
- action,
32
- onDismiss,
33
- dismissLabel = 'Close'
34
- } = _ref,
35
- props = _objectWithoutProperties(_ref, _excluded);
36
-
37
- return /*#__PURE__*/React__default.createElement(Box, _objectSpread2({
38
- ref: ref,
39
- role: "alert",
40
- "aria-live": "polite",
41
- borderRadius: "full",
42
- width: "fitContent",
43
- background: "toast",
44
- display: "flex",
45
- padding: "large",
46
- alignItems: "center",
47
- className: modules_d11e18f0.toastContainer
48
- }, props), icon ? /*#__PURE__*/React__default.createElement(ToastContentSlot, null, icon) : null, /*#__PURE__*/React__default.createElement(Box, {
49
- flexGrow: 1,
50
- maxWidth: "small"
51
- }, description ? /*#__PURE__*/React__default.createElement(Stack, {
52
- space: "small"
53
- }, /*#__PURE__*/React__default.createElement(Text, {
54
- weight: "bold"
55
- }, message, " "), /*#__PURE__*/React__default.createElement(Text, null, description)) : /*#__PURE__*/React__default.createElement(Text, null, message)), action ? /*#__PURE__*/React__default.createElement(ToastContentSlot, null, isActionObject(action) ? /*#__PURE__*/React__default.createElement(Button, {
56
- variant: "tertiary",
57
- size: "small",
58
- onClick: action.onClick
59
- }, action.label) : action) : null, onDismiss ? /*#__PURE__*/React__default.createElement(ToastContentSlot, null, /*#__PURE__*/React__default.createElement(IconButton, {
60
- variant: "quaternary",
61
- size: "small",
62
- onClick: onDismiss,
63
- "aria-label": dismissLabel,
64
- icon: /*#__PURE__*/React__default.createElement(CloseIcon, null)
65
- })) : null);
24
+ var StaticToast = React__default.forwardRef(function Toast(_a, ref) {
25
+ var message = _a.message, description = _a.description, icon = _a.icon, action = _a.action, onDismiss = _a.onDismiss, _b = _a.dismissLabel, dismissLabel = _b === void 0 ? 'Close' : _b, props = __rest(_a, ["message", "description", "icon", "action", "onDismiss", "dismissLabel"]);
26
+ return (React__default.createElement(Box, __assign({ ref: ref, role: "alert", "aria-live": "polite", borderRadius: "full", width: "fitContent", background: "toast", display: "flex", padding: "large", alignItems: "center", className: modules_d11e18f0.toastContainer }, props),
27
+ icon ? React__default.createElement(ToastContentSlot, null, icon) : null,
28
+ React__default.createElement(Box, { flexGrow: 1, maxWidth: "small" }, description ? (React__default.createElement(Stack, { space: "small" },
29
+ React__default.createElement(Text, { weight: "bold" },
30
+ message,
31
+ " "),
32
+ React__default.createElement(Text, null, description))) : (React__default.createElement(Text, null, message))),
33
+ action ? (React__default.createElement(ToastContentSlot, null, isActionObject(action) ? (React__default.createElement(Button, { variant: "tertiary", size: "small", onClick: action.onClick }, action.label)) : (action))) : null,
34
+ onDismiss ? (React__default.createElement(ToastContentSlot, null,
35
+ React__default.createElement(IconButton, { variant: "quaternary", size: "small", onClick: onDismiss, "aria-label": dismissLabel, icon: React__default.createElement(CloseIcon, null) }))) : null));
66
36
  });
67
-
68
37
  function isActionObject(action) {
69
- return action != null && typeof action === 'object' && 'label' in action && 'onClick' in action && typeof action.label === 'string' && typeof action.onClick === 'function';
38
+ return (action != null &&
39
+ typeof action === 'object' &&
40
+ 'label' in action &&
41
+ 'onClick' in action &&
42
+ typeof action.label === 'string' &&
43
+ typeof action.onClick === 'function');
70
44
  }
71
-
72
- function ToastContentSlot({
73
- children
74
- }) {
75
- return /*#__PURE__*/React__default.createElement(Box, {
76
- display: "flex",
77
- alignItems: "center",
78
- justifyContent: "center",
79
- marginX: "-xsmall",
80
- marginY: "-medium",
81
- className: modules_d11e18f0.slot
82
- }, children);
45
+ function ToastContentSlot(_a) {
46
+ var children = _a.children;
47
+ return (React__default.createElement(Box, { display: "flex", alignItems: "center", justifyContent: "center", marginX: "-xsmall", marginY: "-medium", className: modules_d11e18f0.slot }, children));
83
48
  }
84
49
 
85
50
  export { StaticToast, isActionObject };