@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 +1 @@
1
- {"version":3,"file":"static-toast.js","sources":["../../src/toast/static-toast.tsx"],"sourcesContent":["import React from 'react'\n\nimport { CloseIcon } from '../icons/close-icon'\nimport { Box } from '../box'\nimport { IconButton, Button } from '../button'\nimport { Stack } from '../stack'\nimport { Text } from '../text'\n\nimport styles from './toast.module.css'\n\ntype ToastActionObject = {\n label: string\n onClick: () => void\n closeToast?: boolean\n}\n\ntype StaticToastProps = {\n /**\n * The message shown in the toast.\n */\n message: NonNullable<React.ReactNode>\n\n /**\n * An optional extra description that complements the main message shown in the toast.\n */\n description?: React.ReactNode\n\n /**\n * An icon to be shown in front of the message.\n */\n icon?: React.ReactNode\n\n /**\n * The action to call when the user clicks on the dismiss button. If omitted, the dismiss button\n * does not appear.\n */\n onDismiss?: () => void\n\n /**\n * The label for the button that dismisses the toast.\n */\n dismissLabel?: string\n\n /**\n * What to render in the action slot. Usually a button or link.\n *\n * You can also pass an object that containst the action label, and a function that performs the\n * action. This is used by the toast component to render a button for you.\n *\n * In general, you should prefer the action object most of the time. But it is possible to pass\n * a React element instead, if you need more control over what to render. For instance, you may\n * want to render a link instead of a button.\n *\n * Keep in mind, though, that the default button rendered uses `variant=\"tertiary\"` and\n * `size=\"small\"`. In most cases you should stick to the variants `tertiary` or `primary`, which\n * are the ones that look better in the toast's dark background. And in all cases you should use\n * size `small`.\n */\n action?: React.ReactElement | ToastActionObject\n}\n\n/**\n * A toast that shows a message, and an optional action associated with it.\n *\n * This component is generally not meant to be used directly. Most of the time you'll want to use\n * toasts generated via `useToasts` instead. However, this component is available in case you need\n * to take control of rendering a toast under different circumstances than that of notification-like\n * floating toasts.\n *\n * This component makes no assumptions outwardly about how it is positioned on the screen. That is,\n * it will not be shown floating or fixed to the viewport edges, as toasts normally show up. It only\n * provides the toast look and feel, but you are responsible for positioning it as you want.\n *\n * @see useToasts\n */\nconst StaticToast = React.forwardRef<HTMLDivElement, StaticToastProps>(function Toast(\n { message, description, icon, action, onDismiss, dismissLabel = 'Close', ...props },\n ref,\n) {\n return (\n <Box\n ref={ref}\n role=\"alert\"\n aria-live=\"polite\"\n borderRadius=\"full\"\n width=\"fitContent\"\n background=\"toast\"\n display=\"flex\"\n padding=\"large\"\n alignItems=\"center\"\n className={styles.toastContainer}\n {...props}\n >\n {icon ? <ToastContentSlot>{icon}</ToastContentSlot> : null}\n\n <Box flexGrow={1} maxWidth=\"small\">\n {description ? (\n <Stack space=\"small\">\n <Text weight=\"bold\">{message} </Text>\n <Text>{description}</Text>\n </Stack>\n ) : (\n <Text>{message}</Text>\n )}\n </Box>\n\n {action ? (\n <ToastContentSlot>\n {isActionObject(action) ? (\n <Button variant=\"tertiary\" size=\"small\" onClick={action.onClick}>\n {action.label}\n </Button>\n ) : (\n action\n )}\n </ToastContentSlot>\n ) : null}\n\n {onDismiss ? (\n <ToastContentSlot>\n <IconButton\n variant=\"quaternary\"\n size=\"small\"\n onClick={onDismiss}\n aria-label={dismissLabel}\n icon={<CloseIcon />}\n />\n </ToastContentSlot>\n ) : null}\n </Box>\n )\n})\n\nfunction isActionObject(action: StaticToastProps['action']): action is ToastActionObject {\n return (\n action != null &&\n typeof action === 'object' &&\n 'label' in action &&\n 'onClick' in action &&\n typeof action.label === 'string' &&\n typeof action.onClick === 'function'\n )\n}\n\nfunction ToastContentSlot({ children }: { children: React.ReactNode }) {\n return (\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n marginX=\"-xsmall\"\n marginY=\"-medium\"\n className={styles.slot}\n >\n {children}\n </Box>\n )\n}\n\nexport { StaticToast, isActionObject }\nexport type { StaticToastProps }\n"],"names":["StaticToast","React","forwardRef","Toast","ref","message","description","icon","action","onDismiss","dismissLabel","props","Box","_objectSpread","role","borderRadius","width","background","display","padding","alignItems","className","styles","toastContainer","createElement","ToastContentSlot","flexGrow","maxWidth","Stack","space","Text","weight","isActionObject","Button","variant","size","onClick","label","IconButton","CloseIcon","children","justifyContent","marginX","marginY","slot"],"mappings":";;;;;;;;;;AA6DA;;;;;;;;;;;;;AAaG;;AACGA,MAAAA,WAAW,gBAAGC,cAAK,CAACC,UAAN,CAAmD,SAASC,KAAT,CAEnEC,IAAAA,EAAAA,GAFmE,EAEhE;EAAA,IADH;IAAEC,OAAF;IAAWC,WAAX;IAAwBC,IAAxB;IAA8BC,MAA9B;IAAsCC,SAAtC;AAAiDC,IAAAA,YAAY,GAAG,OAAA;GAC7D,GAAA,IAAA;AAAA,MADyEC,KACzE,GAAA,wBAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;;AAEH,EAAA,oBACIV,4BAAA,CAACW,GAAD,EAAAC,cAAA,CAAA;AACIT,IAAAA,GAAG,EAAEA,GADT;AAEIU,IAAAA,IAAI,EAAC,OAFT;AAGc,IAAA,WAAA,EAAA,QAHd;AAIIC,IAAAA,YAAY,EAAC,MAJjB;AAKIC,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AAEPC,IAAAA,IAAI,EAAC,OAFE;AAGPC,IAAAA,OAAO,EAAE3B,SAHF;AAIK,IAAA,YAAA,EAAAC,YAJL;AAKPH,IAAAA,IAAI,eAAEN,cAAA,CAAAuB,aAAA,CAACe,SAAD,EAAU,IAAV,CAAA;AALC,GAAX,CADJ,CADM,GAUN,IAhDR,CADJ,CAAA;AAoDH,CAxDmB,EAApB;;AA0DA,SAASP,cAAT,CAAwBxB,MAAxB,EAA0D;EACtD,OACIA,MAAM,IAAI,IAAV,IACA,OAAOA,MAAP,KAAkB,QADlB,IAEA,OAAWA,IAAAA,MAFX,IAGA,SAAA,IAAaA,MAHb,IAIA,OAAOA,MAAM,CAAC6B,KAAd,KAAwB,QAJxB,IAKA,OAAO7B,MAAM,CAAC4B,OAAd,KAA0B,UAN9B,CAAA;AAQH,CAAA;;AAED,SAASX,gBAAT,CAA0B;AAAEe,EAAAA,QAAAA;AAAF,CAA1B,EAAqE;AACjE,EAAA,oBACIvC,cAAA,CAAAuB,aAAA,CAACZ,GAAD,EAAI;AACAM,IAAAA,OAAO,EAAC,MADR;AAEAE,IAAAA,UAAU,EAAC,QAFX;AAGAqB,IAAAA,cAAc,EAAC,QAHf;AAIAC,IAAAA,OAAO,EAAC,SAJR;AAKAC,IAAAA,OAAO,EAAC,SALR;IAMAtB,SAAS,EAAEC,gBAAM,CAACsB,IAAAA;GANtB,EAQKJ,QARL,CADJ,CAAA;AAYH;;;;"}
1
+ {"version":3,"file":"static-toast.js","sources":["../../src/toast/static-toast.tsx"],"sourcesContent":[null],"names":["React","styles"],"mappings":";;;;;;;;;AA6DA;;;;;;;;;;;;;AAaG;AACG,IAAA,WAAW,GAAGA,cAAK,CAAC,UAAU,CAAmC,SAAS,KAAK,CACjF,EAAmF,EACnF,GAAG,EAAA;IADD,IAAA,OAAO,GAAA,EAAA,CAAA,OAAA,EAAE,WAAW,GAAA,EAAA,CAAA,WAAA,EAAE,IAAI,GAAA,EAAA,CAAA,IAAA,EAAE,MAAM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,cAAC,CAAA,aAAA,CAAA,MAAM,IAAC,OAAO,EAAC,UAAU,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAC1D,EAAA,MAAM,CAAC,KAAK,CACR,KAET,MAAM,CACT,CACc,IACnB,IAAI;AAEP,QAAA,SAAS,IACNA,6BAAC,gBAAgB,EAAA,IAAA;AACb,YAAAA,cAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EACP,OAAO,EAAC,YAAY,EACpB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,SAAS,EACN,YAAA,EAAA,YAAY,EACxB,IAAI,EAAEA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,IAAA,CAAG,EACrB,CAAA,CACa,IACnB,IAAI,CACN,EACT;AACL,CAAC,EAAC;AAEF,SAAS,cAAc,CAAC,MAAkC,EAAA;IACtD,QACI,MAAM,IAAI,IAAI;QACd,OAAO,MAAM,KAAK,QAAQ;AAC1B,QAAA,OAAO,IAAI,MAAM;AACjB,QAAA,SAAS,IAAI,MAAM;AACnB,QAAA,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ;AAChC,QAAA,OAAO,MAAM,CAAC,OAAO,KAAK,UAAU,EACvC;AACL,CAAC;AAED,SAAS,gBAAgB,CAAC,EAA2C,EAAA;AAAzC,IAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,CAAA;AAChC,IAAA,QACIA,cAAA,CAAA,aAAA,CAAC,GAAG,EAAA,EACA,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,QAAQ,EACnB,cAAc,EAAC,QAAQ,EACvB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAC,SAAS,EACjB,SAAS,EAAEC,gBAAM,CAAC,IAAI,EAAA,EAErB,QAAQ,CACP,EACT;AACL;;;;"}
@@ -1,174 +1,136 @@
1
1
  import { useMemo, useLayoutEffect, useCallback } from 'react';
2
2
 
3
- /**
4
- * Adapted with minor changes from https://github.com/seek-oss/braid-design-system/blob/7a5ebccb/packages/braid-design-system/lib/components/useToast/useFlipList.ts
5
- *
6
- * MIT License
7
- *
8
- * Copyright (c) 2018 SEEK
9
- *
10
- * Permission is hereby granted, free of charge, to any person obtaining a copy
11
- * of this software and associated documentation files (the "Software"), to deal
12
- * in the Software without restriction, including without limitation the rights
13
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- * copies of the Software, and to permit persons to whom the Software is
15
- * furnished to do so, subject to the following conditions:
16
- *
17
- * The above copyright notice and this permission notice shall be included in all
18
- * copies or substantial portions of the Software.
19
- *
20
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
- * SOFTWARE.
3
+ /**
4
+ * Adapted with minor changes from https://github.com/seek-oss/braid-design-system/blob/7a5ebccb/packages/braid-design-system/lib/components/useToast/useFlipList.ts
5
+ *
6
+ * MIT License
7
+ *
8
+ * Copyright (c) 2018 SEEK
9
+ *
10
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ * of this software and associated documentation files (the "Software"), to deal
12
+ * in the Software without restriction, including without limitation the rights
13
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ * copies of the Software, and to permit persons to whom the Software is
15
+ * furnished to do so, subject to the following conditions:
16
+ *
17
+ * The above copyright notice and this permission notice shall be included in all
18
+ * copies or substantial portions of the Software.
19
+ *
20
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ * SOFTWARE.
27
27
  */
28
- const ANIMATION_TIMEOUT = 400;
29
- const ENTRANCE_TRANSITION = 'transform 0.3s ease, opacity 0.3s ease';
30
- const EXIT_TRANSITION = 'opacity 0.2s ease';
31
- /**
32
- * Applies the "from" value of given CSS properties, and also sets a transition CSS property. Then
33
- * it waits an animation frame before setting the same CSS properties to the target "to" value. This
34
- * triggers the browser to perform the CSS transition on them.
35
- *
36
- * At the end of the animation, it cleans up, unsetting all the CSS properties (including the
37
- * transition), and calls the "done" callback, if given.
28
+ var ANIMATION_TIMEOUT = 400;
29
+ var ENTRANCE_TRANSITION = 'transform 0.3s ease, opacity 0.3s ease';
30
+ var EXIT_TRANSITION = 'opacity 0.2s ease';
31
+ /**
32
+ * Applies the "from" value of given CSS properties, and also sets a transition CSS property. Then
33
+ * it waits an animation frame before setting the same CSS properties to the target "to" value. This
34
+ * triggers the browser to perform the CSS transition on them.
35
+ *
36
+ * At the end of the animation, it cleans up, unsetting all the CSS properties (including the
37
+ * transition), and calls the "done" callback, if given.
38
38
  */
39
-
40
- function animate({
41
- element,
42
- transforms,
43
- transition,
44
- done
45
- }) {
46
- const fallbackTimeout = setTimeout(() => {
47
- done == null ? void 0 : done();
48
- }, ANIMATION_TIMEOUT);
49
- transforms.forEach(({
50
- property,
51
- from = ''
52
- }) => {
53
- element.style.setProperty(property, from);
54
- });
55
- element.style.setProperty('transition', '');
56
-
57
- function transitionEndHandler(event) {
58
- if (event.target !== element) {
59
- return;
60
- }
61
-
39
+ function animate(_a) {
40
+ var element = _a.element, transforms = _a.transforms, transition = _a.transition, done = _a.done;
41
+ var fallbackTimeout = setTimeout(function () {
42
+ done === null || done === void 0 ? void 0 : done();
43
+ }, ANIMATION_TIMEOUT);
44
+ transforms.forEach(function (_a) {
45
+ var property = _a.property, _b = _a.from, from = _b === void 0 ? '' : _b;
46
+ element.style.setProperty(property, from);
47
+ });
62
48
  element.style.setProperty('transition', '');
63
- done == null ? void 0 : done();
64
- element.removeEventListener('transitionend', transitionEndHandler);
65
- clearTimeout(fallbackTimeout);
66
- }
67
-
68
- element.addEventListener('transitionend', transitionEndHandler); // Call requestAnimationFrame twice to make sure we have a full animation frame at our disposal
69
-
70
- window.requestAnimationFrame(() => {
71
- window.requestAnimationFrame(() => {
72
- element.style.setProperty('transition', transition);
73
- transforms.forEach(({
74
- property,
75
- to = ''
76
- }) => {
77
- element.style.setProperty(property, to);
78
- });
49
+ function transitionEndHandler(event) {
50
+ if (event.target !== element) {
51
+ return;
52
+ }
53
+ element.style.setProperty('transition', '');
54
+ done === null || done === void 0 ? void 0 : done();
55
+ element.removeEventListener('transitionend', transitionEndHandler);
56
+ clearTimeout(fallbackTimeout);
57
+ }
58
+ element.addEventListener('transitionend', transitionEndHandler);
59
+ // Call requestAnimationFrame twice to make sure we have a full animation frame at our disposal
60
+ window.requestAnimationFrame(function () {
61
+ window.requestAnimationFrame(function () {
62
+ element.style.setProperty('transition', transition);
63
+ transforms.forEach(function (_a) {
64
+ var property = _a.property, _b = _a.to, to = _b === void 0 ? '' : _b;
65
+ element.style.setProperty(property, to);
66
+ });
67
+ });
79
68
  });
80
- });
81
69
  }
82
- /**
83
- * Provides the functionality of animating the stacked toasts when they appear and before they
84
- * disappear.
85
- *
86
- * It works by keeping a mapping from toast IDs to the toast elements, and keeping a mapping from
87
- * toast IDs to their top position. Then, on every single re-render, it compares the new DOM
88
- * situation with the previously stored one in these mappings. With this information, it applies
89
- * animations that smoothly transitions between both states.
70
+ /**
71
+ * Provides the functionality of animating the stacked toasts when they appear and before they
72
+ * disappear.
73
+ *
74
+ * It works by keeping a mapping from toast IDs to the toast elements, and keeping a mapping from
75
+ * toast IDs to their top position. Then, on every single re-render, it compares the new DOM
76
+ * situation with the previously stored one in these mappings. With this information, it applies
77
+ * animations that smoothly transitions between both states.
90
78
  */
91
-
92
-
93
79
  function useToastsAnimation() {
94
- const refs = useMemo(() => new Map(), []);
95
- const positions = useMemo(() => new Map(), []);
96
- useLayoutEffect(() => {
97
- const animations = [];
98
- Array.from(refs.entries()).forEach(([id, element]) => {
99
- if (!element) {
100
- refs.delete(id);
101
- return;
102
- }
103
-
104
- const prevTop = positions.get(id);
105
- const {
106
- top,
107
- height
108
- } = element.getBoundingClientRect();
109
-
110
- if (typeof prevTop === 'number' && prevTop !== top) {
111
- // Move animation
112
- animations.push({
113
- element,
114
- transition: ENTRANCE_TRANSITION,
115
- transforms: [{
116
- property: 'transform',
117
- from: "translateY(" + (prevTop - top) + "px)"
118
- }]
80
+ var refs = useMemo(function () { return new Map(); }, []);
81
+ var positions = useMemo(function () { return new Map(); }, []);
82
+ useLayoutEffect(function () {
83
+ var animations = [];
84
+ Array.from(refs.entries()).forEach(function (_a) {
85
+ var id = _a[0], element = _a[1];
86
+ if (!element) {
87
+ refs["delete"](id);
88
+ return;
89
+ }
90
+ var prevTop = positions.get(id);
91
+ var _b = element.getBoundingClientRect(), top = _b.top, height = _b.height;
92
+ if (typeof prevTop === 'number' && prevTop !== top) {
93
+ // Move animation
94
+ animations.push({
95
+ element: element,
96
+ transition: ENTRANCE_TRANSITION,
97
+ transforms: [{ property: 'transform', from: "translateY(".concat(prevTop - top, "px)") }]
98
+ });
99
+ }
100
+ else if (typeof prevTop !== 'number') {
101
+ // Enter animation
102
+ animations.push({
103
+ element: element,
104
+ transition: ENTRANCE_TRANSITION,
105
+ transforms: [
106
+ { property: 'transform', from: "translateY(".concat(height, "px)") },
107
+ { property: 'opacity', from: '0' },
108
+ ]
109
+ });
110
+ }
111
+ positions.set(id, element.getBoundingClientRect().top);
119
112
  });
120
- } else if (typeof prevTop !== 'number') {
121
- // Enter animation
122
- animations.push({
123
- element,
124
- transition: ENTRANCE_TRANSITION,
125
- transforms: [{
126
- property: 'transform',
127
- from: "translateY(" + height + "px)"
128
- }, {
129
- property: 'opacity',
130
- from: '0'
131
- }]
113
+ animations.forEach(function (_a) {
114
+ var element = _a.element, transforms = _a.transforms, transition = _a.transition;
115
+ animate({ element: element, transforms: transforms, transition: transition });
132
116
  });
133
- }
134
-
135
- positions.set(id, element.getBoundingClientRect().top);
136
- });
137
- animations.forEach(({
138
- element,
139
- transforms,
140
- transition
141
- }) => {
142
- animate({
143
- element,
144
- transforms,
145
- transition
146
- });
147
117
  });
148
- });
149
- const animateRemove = useCallback(function animateRemove(id, onAnimationDone) {
150
- const element = refs.get(id);
151
-
152
- if (element) {
153
- // Removal animation
154
- animate({
155
- element,
156
- transforms: [{
157
- property: 'opacity',
158
- to: '0'
159
- }],
160
- transition: EXIT_TRANSITION,
161
- done: onAnimationDone
162
- });
163
- }
164
- }, [refs]);
165
- const mappedRef = useCallback(id => ref => {
166
- refs.set(id, ref);
167
- }, [refs]);
168
- return {
169
- mappedRef,
170
- animateRemove
171
- };
118
+ var animateRemove = useCallback(function animateRemove(id, onAnimationDone) {
119
+ var element = refs.get(id);
120
+ if (element) {
121
+ // Removal animation
122
+ animate({
123
+ element: element,
124
+ transforms: [{ property: 'opacity', to: '0' }],
125
+ transition: EXIT_TRANSITION,
126
+ done: onAnimationDone
127
+ });
128
+ }
129
+ }, [refs]);
130
+ var mappedRef = useCallback(function (id) { return function (ref) {
131
+ refs.set(id, ref);
132
+ }; }, [refs]);
133
+ return { mappedRef: mappedRef, animateRemove: animateRemove };
172
134
  }
173
135
 
174
136
  export { ANIMATION_TIMEOUT, useToastsAnimation };
@@ -1 +1 @@
1
- {"version":3,"file":"toast-animation.js","sources":["../../src/toast/toast-animation.ts"],"sourcesContent":["/**\n * Adapted with minor changes from https://github.com/seek-oss/braid-design-system/blob/7a5ebccb/packages/braid-design-system/lib/components/useToast/useFlipList.ts\n *\n * MIT License\n *\n * Copyright (c) 2018 SEEK\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { useMemo, useCallback, useLayoutEffect } from 'react'\n\nconst ANIMATION_TIMEOUT = 400\nconst ENTRANCE_TRANSITION = 'transform 0.3s ease, opacity 0.3s ease'\nconst EXIT_TRANSITION = 'opacity 0.2s ease'\n\ntype Transform = {\n property: 'opacity' | 'transform' | 'scale'\n from?: string\n to?: string\n}\n\n/**\n * Applies the \"from\" value of given CSS properties, and also sets a transition CSS property. Then\n * it waits an animation frame before setting the same CSS properties to the target \"to\" value. This\n * triggers the browser to perform the CSS transition on them.\n *\n * At the end of the animation, it cleans up, unsetting all the CSS properties (including the\n * transition), and calls the \"done\" callback, if given.\n */\nfunction animate({\n element,\n transforms,\n transition,\n done,\n}: {\n element: HTMLElement\n transforms: Transform[]\n transition: string\n done?: () => void\n}) {\n const fallbackTimeout = setTimeout(() => {\n done?.()\n }, ANIMATION_TIMEOUT)\n\n transforms.forEach(({ property, from = '' }) => {\n element.style.setProperty(property, from)\n })\n element.style.setProperty('transition', '')\n\n function transitionEndHandler(event: TransitionEvent) {\n if (event.target !== element) {\n return\n }\n element.style.setProperty('transition', '')\n done?.()\n element.removeEventListener('transitionend', transitionEndHandler)\n clearTimeout(fallbackTimeout)\n }\n\n element.addEventListener('transitionend', transitionEndHandler)\n\n // Call requestAnimationFrame twice to make sure we have a full animation frame at our disposal\n window.requestAnimationFrame(() => {\n window.requestAnimationFrame(() => {\n element.style.setProperty('transition', transition)\n transforms.forEach(({ property, to = '' }) => {\n element.style.setProperty(property, to)\n })\n })\n })\n}\n\ntype ToastsAnimationToolkit = {\n /**\n * Used for gathering all the active stacked toast elements. Should be used by passing\n * `ref={mappedRef(toastId)}` to the stacked toasts.\n */\n mappedRef: (toastId: string) => (ref: HTMLElement | null) => void\n\n /**\n * The stacked toasts view should use this callback when it needs to remove a toast, instead of\n * removing it right away. The actual removal from the state (and consequently, from the DOM)\n * should happen in the `onAnimationDone` instead.\n */\n animateRemove: (toastId: string, onAnimationDone: () => void) => void\n}\n\n/**\n * Provides the functionality of animating the stacked toasts when they appear and before they\n * disappear.\n *\n * It works by keeping a mapping from toast IDs to the toast elements, and keeping a mapping from\n * toast IDs to their top position. Then, on every single re-render, it compares the new DOM\n * situation with the previously stored one in these mappings. With this information, it applies\n * animations that smoothly transitions between both states.\n */\nfunction useToastsAnimation(): ToastsAnimationToolkit {\n const refs = useMemo(() => new Map<string, HTMLElement | null>(), [])\n const positions = useMemo(() => new Map<string, number>(), [])\n\n useLayoutEffect(() => {\n const animations: Array<{\n element: HTMLElement\n transforms: Transform[]\n transition: string\n }> = []\n\n Array.from(refs.entries()).forEach(([id, element]) => {\n if (!element) {\n refs.delete(id)\n return\n }\n\n const prevTop = positions.get(id)\n const { top, height } = element.getBoundingClientRect()\n\n if (typeof prevTop === 'number' && prevTop !== top) {\n // Move animation\n animations.push({\n element,\n transition: ENTRANCE_TRANSITION,\n transforms: [{ property: 'transform', from: `translateY(${prevTop - top}px)` }],\n })\n } else if (typeof prevTop !== 'number') {\n // Enter animation\n animations.push({\n element,\n transition: ENTRANCE_TRANSITION,\n transforms: [\n { property: 'transform', from: `translateY(${height}px)` },\n { property: 'opacity', from: '0' },\n ],\n })\n }\n\n positions.set(id, element.getBoundingClientRect().top)\n })\n\n animations.forEach(({ element, transforms, transition }) => {\n animate({ element, transforms, transition })\n })\n })\n\n const animateRemove = useCallback(\n function animateRemove(id: string, onAnimationDone: () => void) {\n const element = refs.get(id)\n if (element) {\n // Removal animation\n animate({\n element,\n transforms: [{ property: 'opacity', to: '0' }],\n transition: EXIT_TRANSITION,\n done: onAnimationDone,\n })\n }\n },\n [refs],\n )\n\n const mappedRef = useCallback(\n (id: string) => (ref: HTMLElement | null) => {\n refs.set(id, ref)\n },\n [refs],\n )\n\n return { mappedRef, animateRemove }\n}\n\nexport { ANIMATION_TIMEOUT, useToastsAnimation }\n"],"names":["ANIMATION_TIMEOUT","ENTRANCE_TRANSITION","EXIT_TRANSITION","animate","element","transforms","transition","done","fallbackTimeout","setTimeout","forEach","property","from","style","setProperty","transitionEndHandler","event","target","removeEventListener","clearTimeout","addEventListener","window","requestAnimationFrame","to","useToastsAnimation","refs","useMemo","Map","positions","useLayoutEffect","animations","Array","entries","id","delete","prevTop","get","top","height","getBoundingClientRect","push","set","animateRemove","useCallback","onAnimationDone","mappedRef","ref"],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AAIGA,MAAAA,iBAAiB,GAAG,IAA1B;AACA,MAAMC,mBAAmB,GAAG,wCAA5B,CAAA;AACA,MAAMC,eAAe,GAAG,mBAAxB,CAAA;AAQA;;;;;;;AAOG;;AACH,SAASC,OAAT,CAAiB;EACbC,OADa;EAEbC,UAFa;EAGbC,UAHa;AAIbC,EAAAA,IAAA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