@doist/reactist 28.7.2 → 28.7.4

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 (470) hide show
  1. package/CHANGELOG.md +1457 -0
  2. package/CODE_OF_CONDUCT.md +83 -0
  3. package/CONTRIBUTING.md +46 -0
  4. package/dist/reactist.cjs.development.js +2091 -3811
  5. package/dist/reactist.cjs.development.js.map +1 -1
  6. package/dist/reactist.cjs.production.min.js +1 -1
  7. package/dist/reactist.cjs.production.min.js.map +1 -1
  8. package/es/avatar/avatar.js +35 -30
  9. package/es/avatar/avatar.js.map +1 -1
  10. package/es/avatar/utils.js +19 -22
  11. package/es/avatar/utils.js.map +1 -1
  12. package/es/badge/badge.js +5 -16
  13. package/es/badge/badge.js.map +1 -1
  14. package/es/banner/banner.js +39 -115
  15. package/es/banner/banner.js.map +1 -1
  16. package/es/banner/banner.module.css.js +1 -1
  17. package/es/base-field/base-field.js +80 -162
  18. package/es/base-field/base-field.js.map +1 -1
  19. package/es/base-field/base-field.module.css.js +1 -1
  20. package/es/box/box.js +61 -137
  21. package/es/box/box.js.map +1 -1
  22. package/es/button/button.js +42 -95
  23. package/es/button/button.js.map +1 -1
  24. package/es/checkbox-field/checkbox-field.js +46 -73
  25. package/es/checkbox-field/checkbox-field.js.map +1 -1
  26. package/es/checkbox-field/checkbox-field.module.css.js +1 -1
  27. package/es/checkbox-field/checkbox-icon.js +28 -55
  28. package/es/checkbox-field/checkbox-icon.js.map +1 -1
  29. package/es/checkbox-field/use-fork-ref.js +29 -25
  30. package/es/checkbox-field/use-fork-ref.js.map +1 -1
  31. package/es/columns/columns.js +22 -46
  32. package/es/columns/columns.js.map +1 -1
  33. package/es/columns/columns.module.css.js +1 -1
  34. package/es/components/color-picker/color-picker.js +45 -66
  35. package/es/components/color-picker/color-picker.js.map +1 -1
  36. package/es/components/deprecated-button/deprecated-button.js +11 -34
  37. package/es/components/deprecated-button/deprecated-button.js.map +1 -1
  38. package/es/components/deprecated-dropdown/dropdown.js +136 -197
  39. package/es/components/deprecated-dropdown/dropdown.js.map +1 -1
  40. package/es/components/deprecated-input/input.js +6 -10
  41. package/es/components/deprecated-input/input.js.map +1 -1
  42. package/es/components/deprecated-select/select.js +7 -31
  43. package/es/components/deprecated-select/select.js.map +1 -1
  44. package/es/components/key-capturer/key-capturer.js +130 -171
  45. package/es/components/key-capturer/key-capturer.js.map +1 -1
  46. package/es/components/keyboard-shortcut/keyboard-shortcut.js +48 -79
  47. package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  48. package/es/components/progress-bar/progress-bar.js +8 -20
  49. package/es/components/progress-bar/progress-bar.js.map +1 -1
  50. package/es/components/time/time-utils.js +52 -64
  51. package/es/components/time/time-utils.js.map +1 -1
  52. package/es/components/time/time.js +90 -114
  53. package/es/components/time/time.js.map +1 -1
  54. package/es/divider/divider.js +4 -13
  55. package/es/divider/divider.js.map +1 -1
  56. package/es/heading/heading.js +19 -28
  57. package/es/heading/heading.js.map +1 -1
  58. package/es/hidden/hidden.js +36 -45
  59. package/es/hidden/hidden.js.map +1 -1
  60. package/es/hidden-visually/hidden-visually.js +7 -13
  61. package/es/hidden-visually/hidden-visually.js.map +1 -1
  62. package/es/icons/alert-icon.js +18 -64
  63. package/es/icons/alert-icon.js.map +1 -1
  64. package/es/icons/banner-icon.js +25 -97
  65. package/es/icons/banner-icon.js.map +1 -1
  66. package/es/icons/close-icon.js +3 -9
  67. package/es/icons/close-icon.js.map +1 -1
  68. package/es/icons/password-hidden-icon.js +6 -23
  69. package/es/icons/password-hidden-icon.js.map +1 -1
  70. package/es/icons/password-visible-icon.js +5 -16
  71. package/es/icons/password-visible-icon.js.map +1 -1
  72. package/es/inline/inline.js +8 -23
  73. package/es/inline/inline.js.map +1 -1
  74. package/es/loading/loading.js +17 -28
  75. package/es/loading/loading.js.map +1 -1
  76. package/es/menu/menu.js +127 -260
  77. package/es/menu/menu.js.map +1 -1
  78. package/es/modal/modal.js +143 -272
  79. package/es/modal/modal.js.map +1 -1
  80. package/es/modal/modal.module.css.js +1 -1
  81. package/es/notice/notice.js +8 -21
  82. package/es/notice/notice.js.map +1 -1
  83. package/es/notice/notice.module.css.js +1 -1
  84. package/es/password-field/password-field.js +10 -24
  85. package/es/password-field/password-field.js.map +1 -1
  86. package/es/prose/prose.js +10 -15
  87. package/es/prose/prose.js.map +1 -1
  88. package/es/select-field/select-field.js +14 -51
  89. package/es/select-field/select-field.js.map +1 -1
  90. package/es/spinner/spinner.js +6 -20
  91. package/es/spinner/spinner.js.map +1 -1
  92. package/es/stack/stack.js +15 -27
  93. package/es/stack/stack.js.map +1 -1
  94. package/es/switch-field/switch-field.js +38 -73
  95. package/es/switch-field/switch-field.js.map +1 -1
  96. package/es/switch-field/switch-field.module.css.js +1 -1
  97. package/es/tabs/tabs.js +120 -207
  98. package/es/tabs/tabs.js.map +1 -1
  99. package/es/text/text.js +16 -25
  100. package/es/text/text.js.map +1 -1
  101. package/es/text-area/text-area.js +54 -111
  102. package/es/text-area/text-area.js.map +1 -1
  103. package/es/text-field/text-field.js +30 -84
  104. package/es/text-field/text-field.js.map +1 -1
  105. package/es/text-link/text-link.js +9 -20
  106. package/es/text-link/text-link.js.map +1 -1
  107. package/es/text-link/text-link.module.css.js +1 -1
  108. package/es/toast/static-toast.js +35 -70
  109. package/es/toast/static-toast.js.map +1 -1
  110. package/es/toast/toast-animation.js +121 -159
  111. package/es/toast/toast-animation.js.map +1 -1
  112. package/es/toast/use-toasts.js +134 -197
  113. package/es/toast/use-toasts.js.map +1 -1
  114. package/es/tooltip/tooltip.js +31 -69
  115. package/es/tooltip/tooltip.js.map +1 -1
  116. package/es/utils/common-helpers.js +9 -13
  117. package/es/utils/common-helpers.js.map +1 -1
  118. package/es/utils/polymorphism.js +7 -8
  119. package/es/utils/polymorphism.js.map +1 -1
  120. package/es/utils/responsive-props.js +57 -66
  121. package/es/utils/responsive-props.js.map +1 -1
  122. package/lib/avatar/avatar.d.ts +21 -21
  123. package/lib/avatar/avatar.js +69 -1
  124. package/lib/avatar/avatar.js.map +1 -1
  125. package/lib/avatar/avatar.module.css.js +7 -1
  126. package/lib/avatar/avatar.module.css.js.map +1 -1
  127. package/lib/avatar/index.d.ts +1 -1
  128. package/lib/avatar/utils.d.ts +3 -3
  129. package/lib/avatar/utils.js +30 -1
  130. package/lib/avatar/utils.js.map +1 -1
  131. package/lib/badge/badge.d.ts +15 -15
  132. package/lib/badge/badge.js +36 -1
  133. package/lib/badge/badge.js.map +1 -1
  134. package/lib/badge/badge.module.css.js +7 -1
  135. package/lib/badge/badge.module.css.js.map +1 -1
  136. package/lib/badge/index.d.ts +1 -1
  137. package/lib/banner/banner.d.ts +87 -87
  138. package/lib/banner/banner.js +79 -1
  139. package/lib/banner/banner.js.map +1 -1
  140. package/lib/banner/banner.module.css.js +7 -1
  141. package/lib/banner/banner.module.css.js.map +1 -1
  142. package/lib/banner/index.d.ts +2 -2
  143. package/lib/banner/story-promo-image.d.ts +4 -4
  144. package/lib/base-field/base-field.d.ts +139 -139
  145. package/lib/base-field/base-field.js +127 -1
  146. package/lib/base-field/base-field.js.map +1 -1
  147. package/lib/base-field/base-field.module.css.js +7 -1
  148. package/lib/base-field/base-field.module.css.js.map +1 -1
  149. package/lib/base-field/index.d.ts +1 -1
  150. package/lib/box/box.d.ts +73 -73
  151. package/lib/box/box.js +103 -1
  152. package/lib/box/box.js.map +1 -1
  153. package/lib/box/box.module.css.js +7 -1
  154. package/lib/box/box.module.css.js.map +1 -1
  155. package/lib/box/gap.module.css.js +7 -1
  156. package/lib/box/gap.module.css.js.map +1 -1
  157. package/lib/box/index.d.ts +1 -1
  158. package/lib/box/margin.module.css.js +7 -1
  159. package/lib/box/margin.module.css.js.map +1 -1
  160. package/lib/box/padding.module.css.js +7 -1
  161. package/lib/box/padding.module.css.js.map +1 -1
  162. package/lib/box/width.module.css.js +7 -1
  163. package/lib/box/width.module.css.js.map +1 -1
  164. package/lib/button/button.d.ts +127 -127
  165. package/lib/button/button.js +86 -1
  166. package/lib/button/button.js.map +1 -1
  167. package/lib/button/button.module.css.js +7 -1
  168. package/lib/button/button.module.css.js.map +1 -1
  169. package/lib/button/index.d.ts +1 -1
  170. package/lib/checkbox-field/checkbox-field.d.ts +40 -40
  171. package/lib/checkbox-field/checkbox-field.js +82 -1
  172. package/lib/checkbox-field/checkbox-field.js.map +1 -1
  173. package/lib/checkbox-field/checkbox-field.module.css.js +7 -1
  174. package/lib/checkbox-field/checkbox-field.module.css.js.map +1 -1
  175. package/lib/checkbox-field/checkbox-icon.d.ts +8 -8
  176. package/lib/checkbox-field/checkbox-icon.js +59 -1
  177. package/lib/checkbox-field/checkbox-icon.js.map +1 -1
  178. package/lib/checkbox-field/index.d.ts +1 -1
  179. package/lib/checkbox-field/use-fork-ref.d.ts +11 -11
  180. package/lib/checkbox-field/use-fork-ref.js +42 -1
  181. package/lib/checkbox-field/use-fork-ref.js.map +1 -1
  182. package/lib/columns/columns.d.ts +20 -20
  183. package/lib/columns/columns.js +57 -1
  184. package/lib/columns/columns.js.map +1 -1
  185. package/lib/columns/columns.module.css.js +7 -1
  186. package/lib/columns/columns.module.css.js.map +1 -1
  187. package/lib/columns/index.d.ts +1 -1
  188. package/lib/components/color-picker/color-picker.d.ts +29 -29
  189. package/lib/components/color-picker/color-picker.js +86 -1
  190. package/lib/components/color-picker/color-picker.js.map +1 -1
  191. package/lib/components/color-picker/index.d.ts +3 -3
  192. package/lib/components/color-picker/index.js +11 -1
  193. package/lib/components/color-picker/index.js.map +1 -1
  194. package/lib/components/deprecated-button/deprecated-button.d.ts +54 -54
  195. package/lib/components/deprecated-button/deprecated-button.js +49 -1
  196. package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
  197. package/lib/components/deprecated-button/index.d.ts +4 -4
  198. package/lib/components/deprecated-button/index.js +9 -1
  199. package/lib/components/deprecated-button/index.js.map +1 -1
  200. package/lib/components/deprecated-dropdown/dropdown.d.ts +55 -55
  201. package/lib/components/deprecated-dropdown/dropdown.js +182 -1
  202. package/lib/components/deprecated-dropdown/dropdown.js.map +1 -1
  203. package/lib/components/deprecated-dropdown/index.d.ts +2 -2
  204. package/lib/components/deprecated-dropdown/index.js +9 -1
  205. package/lib/components/deprecated-dropdown/index.js.map +1 -1
  206. package/lib/components/deprecated-input/index.d.ts +2 -2
  207. package/lib/components/deprecated-input/index.js +9 -1
  208. package/lib/components/deprecated-input/index.js.map +1 -1
  209. package/lib/components/deprecated-input/input.d.ts +10 -10
  210. package/lib/components/deprecated-input/input.js +41 -1
  211. package/lib/components/deprecated-input/input.js.map +1 -1
  212. package/lib/components/deprecated-select/index.d.ts +2 -2
  213. package/lib/components/deprecated-select/index.js +9 -1
  214. package/lib/components/deprecated-select/index.js.map +1 -1
  215. package/lib/components/deprecated-select/select.d.ts +33 -33
  216. package/lib/components/deprecated-select/select.js +43 -1
  217. package/lib/components/deprecated-select/select.js.map +1 -1
  218. package/lib/components/icons/CloseIcon.svg.d.ts +3 -3
  219. package/lib/components/icons/ThinQuestionMarkIcon.svg.d.ts +3 -3
  220. package/lib/components/icons/ThreeDotsIcon.svg.d.ts +12 -12
  221. package/lib/components/key-capturer/index.d.ts +3 -3
  222. package/lib/components/key-capturer/index.js +11 -1
  223. package/lib/components/key-capturer/index.js.map +1 -1
  224. package/lib/components/key-capturer/key-capturer.d.ts +40 -40
  225. package/lib/components/key-capturer/key-capturer.js +171 -1
  226. package/lib/components/key-capturer/key-capturer.js.map +1 -1
  227. package/lib/components/keyboard-shortcut/index.d.ts +2 -2
  228. package/lib/components/keyboard-shortcut/index.js +9 -1
  229. package/lib/components/keyboard-shortcut/index.js.map +1 -1
  230. package/lib/components/keyboard-shortcut/keyboard-shortcut.d.ts +44 -44
  231. package/lib/components/keyboard-shortcut/keyboard-shortcut.js +97 -1
  232. package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  233. package/lib/components/progress-bar/index.d.ts +2 -2
  234. package/lib/components/progress-bar/index.js +9 -1
  235. package/lib/components/progress-bar/index.js.map +1 -1
  236. package/lib/components/progress-bar/progress-bar.d.ts +14 -14
  237. package/lib/components/progress-bar/progress-bar.js +44 -1
  238. package/lib/components/progress-bar/progress-bar.js.map +1 -1
  239. package/lib/components/progress-bar/progress-bar.module.css.js +7 -1
  240. package/lib/components/progress-bar/progress-bar.module.css.js.map +1 -1
  241. package/lib/components/time/index.d.ts +2 -2
  242. package/lib/components/time/index.js +9 -1
  243. package/lib/components/time/index.js.map +1 -1
  244. package/lib/components/time/time-utils.d.ts +19 -19
  245. package/lib/components/time/time-utils.js +69 -1
  246. package/lib/components/time/time-utils.js.map +1 -1
  247. package/lib/components/time/time.d.ts +39 -39
  248. package/lib/components/time/time.js +124 -1
  249. package/lib/components/time/time.js.map +1 -1
  250. package/lib/divider/divider.d.ts +8 -8
  251. package/lib/divider/divider.js +36 -1
  252. package/lib/divider/divider.js.map +1 -1
  253. package/lib/divider/divider.module.css.js +7 -1
  254. package/lib/divider/divider.module.css.js.map +1 -1
  255. package/lib/divider/index.d.ts +1 -1
  256. package/lib/heading/heading.d.ts +112 -112
  257. package/lib/heading/heading.js +51 -1
  258. package/lib/heading/heading.js.map +1 -1
  259. package/lib/heading/heading.module.css.js +7 -1
  260. package/lib/heading/heading.module.css.js.map +1 -1
  261. package/lib/heading/index.d.ts +1 -1
  262. package/lib/hidden/hidden.d.ts +49 -49
  263. package/lib/hidden/hidden.js +70 -1
  264. package/lib/hidden/hidden.js.map +1 -1
  265. package/lib/hidden/hidden.module.css.js +7 -1
  266. package/lib/hidden/hidden.module.css.js.map +1 -1
  267. package/lib/hidden/index.d.ts +1 -1
  268. package/lib/hidden-visually/hidden-visually.d.ts +11 -11
  269. package/lib/hidden-visually/hidden-visually.js +40 -1
  270. package/lib/hidden-visually/hidden-visually.js.map +1 -1
  271. package/lib/hidden-visually/hidden-visually.module.css.js +7 -1
  272. package/lib/hidden-visually/hidden-visually.module.css.js.map +1 -1
  273. package/lib/hidden-visually/index.d.ts +1 -1
  274. package/lib/hooks/use-previous/index.d.ts +1 -1
  275. package/lib/hooks/use-previous/use-previous.d.ts +15 -15
  276. package/lib/icons/alert-icon.d.ts +6 -6
  277. package/lib/icons/alert-icon.js +56 -1
  278. package/lib/icons/alert-icon.js.map +1 -1
  279. package/lib/icons/banner-icon.d.ts +6 -6
  280. package/lib/icons/banner-icon.js +68 -1
  281. package/lib/icons/banner-icon.js.map +1 -1
  282. package/lib/icons/banner-icon.module.css.js +7 -1
  283. package/lib/icons/banner-icon.module.css.js.map +1 -1
  284. package/lib/icons/close-icon.d.ts +3 -3
  285. package/lib/icons/close-icon.js +33 -1
  286. package/lib/icons/close-icon.js.map +1 -1
  287. package/lib/icons/password-hidden-icon.d.ts +3 -3
  288. package/lib/icons/password-hidden-icon.js +36 -1
  289. package/lib/icons/password-hidden-icon.js.map +1 -1
  290. package/lib/icons/password-visible-icon.d.ts +3 -3
  291. package/lib/icons/password-visible-icon.js +35 -1
  292. package/lib/icons/password-visible-icon.js.map +1 -1
  293. package/lib/index.d.ts +38 -38
  294. package/lib/index.js +106 -1
  295. package/lib/index.js.map +1 -1
  296. package/lib/inline/index.d.ts +1 -1
  297. package/lib/inline/inline.d.ts +12 -12
  298. package/lib/inline/inline.js +40 -1
  299. package/lib/inline/inline.js.map +1 -1
  300. package/lib/loading/index.d.ts +1 -1
  301. package/lib/loading/loading.d.ts +26 -26
  302. package/lib/loading/loading.js +49 -1
  303. package/lib/loading/loading.js.map +1 -1
  304. package/lib/menu/index.d.ts +2 -2
  305. package/lib/menu/menu.d.ts +128 -128
  306. package/lib/menu/menu.js +179 -1
  307. package/lib/menu/menu.js.map +1 -1
  308. package/lib/modal/index.d.ts +1 -1
  309. package/lib/modal/modal-stories-components.d.ts +47 -47
  310. package/lib/modal/modal.d.ts +185 -185
  311. package/lib/modal/modal.js +209 -1
  312. package/lib/modal/modal.js.map +1 -1
  313. package/lib/modal/modal.module.css.js +7 -1
  314. package/lib/modal/modal.module.css.js.map +1 -1
  315. package/lib/notice/index.d.ts +1 -1
  316. package/lib/notice/notice.d.ts +10 -10
  317. package/lib/notice/notice.js +42 -1
  318. package/lib/notice/notice.js.map +1 -1
  319. package/lib/notice/notice.module.css.js +7 -1
  320. package/lib/notice/notice.module.css.js.map +1 -1
  321. package/lib/password-field/index.d.ts +1 -1
  322. package/lib/password-field/password-field.d.ts +10 -10
  323. package/lib/password-field/password-field.js +43 -1
  324. package/lib/password-field/password-field.js.map +1 -1
  325. package/lib/prose/index.d.ts +2 -2
  326. package/lib/prose/prose-example.d.ts +1 -1
  327. package/lib/prose/prose.d.ts +44 -44
  328. package/lib/prose/prose.js +42 -1
  329. package/lib/prose/prose.js.map +1 -1
  330. package/lib/prose/prose.module.css.js +7 -1
  331. package/lib/prose/prose.module.css.js.map +1 -1
  332. package/lib/select-field/index.d.ts +1 -1
  333. package/lib/select-field/select-field.d.ts +7 -7
  334. package/lib/select-field/select-field.js +48 -1
  335. package/lib/select-field/select-field.js.map +1 -1
  336. package/lib/select-field/select-field.module.css.js +7 -1
  337. package/lib/select-field/select-field.module.css.js.map +1 -1
  338. package/lib/spinner/index.d.ts +1 -1
  339. package/lib/spinner/spinner.d.ts +5 -5
  340. package/lib/spinner/spinner.js +36 -1
  341. package/lib/spinner/spinner.js.map +1 -1
  342. package/lib/spinner/spinner.module.css.js +7 -1
  343. package/lib/spinner/spinner.module.css.js.map +1 -1
  344. package/lib/stack/index.d.ts +1 -1
  345. package/lib/stack/stack.d.ts +15 -15
  346. package/lib/stack/stack.js +52 -1
  347. package/lib/stack/stack.js.map +1 -1
  348. package/lib/switch-field/index.d.ts +1 -1
  349. package/lib/switch-field/switch-field.d.ts +19 -19
  350. package/lib/switch-field/switch-field.js +74 -1
  351. package/lib/switch-field/switch-field.js.map +1 -1
  352. package/lib/switch-field/switch-field.module.css.js +7 -1
  353. package/lib/switch-field/switch-field.module.css.js.map +1 -1
  354. package/lib/tabs/index.d.ts +1 -1
  355. package/lib/tabs/tabs.d.ts +125 -125
  356. package/lib/tabs/tabs.js +177 -1
  357. package/lib/tabs/tabs.js.map +1 -1
  358. package/lib/tabs/tabs.module.css.js +7 -1
  359. package/lib/tabs/tabs.module.css.js.map +1 -1
  360. package/lib/text/index.d.ts +1 -1
  361. package/lib/text/text.d.ts +47 -47
  362. package/lib/text/text.js +49 -1
  363. package/lib/text/text.js.map +1 -1
  364. package/lib/text/text.module.css.js +7 -1
  365. package/lib/text/text.module.css.js.map +1 -1
  366. package/lib/text-area/index.d.ts +1 -1
  367. package/lib/text-area/text-area.d.ts +39 -39
  368. package/lib/text-area/text-area.js +92 -1
  369. package/lib/text-area/text-area.js.map +1 -1
  370. package/lib/text-area/text-area.module.css.js +7 -1
  371. package/lib/text-area/text-area.module.css.js.map +1 -1
  372. package/lib/text-field/index.d.ts +1 -1
  373. package/lib/text-field/text-field.d.ts +18 -18
  374. package/lib/text-field/text-field.js +63 -1
  375. package/lib/text-field/text-field.js.map +1 -1
  376. package/lib/text-field/text-field.module.css.js +7 -1
  377. package/lib/text-field/text-field.module.css.js.map +1 -1
  378. package/lib/text-link/index.d.ts +1 -1
  379. package/lib/text-link/text-link.d.ts +9 -9
  380. package/lib/text-link/text-link.js +41 -1
  381. package/lib/text-link/text-link.js.map +1 -1
  382. package/lib/text-link/text-link.module.css.js +7 -1
  383. package/lib/text-link/text-link.module.css.js.map +1 -1
  384. package/lib/toast/index.d.ts +4 -4
  385. package/lib/toast/static-toast.d.ts +63 -63
  386. package/lib/toast/static-toast.js +59 -1
  387. package/lib/toast/static-toast.js.map +1 -1
  388. package/lib/toast/toast-animation.d.ts +50 -50
  389. package/lib/toast/toast-animation.js +141 -1
  390. package/lib/toast/toast-animation.js.map +1 -1
  391. package/lib/toast/toast.module.css.js +7 -1
  392. package/lib/toast/toast.module.css.js.map +1 -1
  393. package/lib/toast/use-toasts.d.ts +132 -132
  394. package/lib/toast/use-toasts.js +166 -1
  395. package/lib/toast/use-toasts.js.map +1 -1
  396. package/lib/tooltip/index.d.ts +2 -2
  397. package/lib/tooltip/tooltip.d.ts +72 -72
  398. package/lib/tooltip/tooltip.js +67 -1
  399. package/lib/tooltip/tooltip.js.map +1 -1
  400. package/lib/tooltip/tooltip.module.css.js +7 -1
  401. package/lib/tooltip/tooltip.module.css.js.map +1 -1
  402. package/lib/utils/common-helpers.d.ts +2 -2
  403. package/lib/utils/common-helpers.js +44 -1
  404. package/lib/utils/common-helpers.js.map +1 -1
  405. package/lib/utils/common-types.d.ts +42 -42
  406. package/lib/utils/polymorphism.d.ts +135 -135
  407. package/lib/utils/polymorphism.js +39 -1
  408. package/lib/utils/polymorphism.js.map +1 -1
  409. package/lib/utils/responsive-props.d.ts +44 -44
  410. package/lib/utils/responsive-props.js +70 -1
  411. package/lib/utils/responsive-props.js.map +1 -1
  412. package/lib/utils/storybook-helper.d.ts +55 -0
  413. package/lib/utils/test-helpers.d.ts +22 -22
  414. package/package.json +32 -26
  415. package/styles/avatar.css +2 -2
  416. package/styles/avatar.module.css.css +1 -1
  417. package/styles/badge.css +2 -2
  418. package/styles/badge.module.css.css +1 -1
  419. package/styles/banner.css +6 -6
  420. package/styles/banner.module.css.css +1 -1
  421. package/styles/base-field.css +4 -4
  422. package/styles/base-field.module.css.css +1 -1
  423. package/styles/box.css +1 -1
  424. package/styles/box.module.css.css +1 -1
  425. package/styles/button.css +4 -4
  426. package/styles/button.module.css.css +1 -1
  427. package/styles/checkbox-field.css +3 -3
  428. package/styles/checkbox-field.module.css.css +1 -1
  429. package/styles/columns.css +1 -1
  430. package/styles/divider.css +1 -1
  431. package/styles/heading.css +2 -2
  432. package/styles/heading.module.css.css +1 -1
  433. package/styles/hidden-visually.css +2 -2
  434. package/styles/hidden-visually.module.css.css +1 -1
  435. package/styles/hidden.css +1 -1
  436. package/styles/index.css +4 -4
  437. package/styles/loading.css +2 -2
  438. package/styles/menu.css +1 -1
  439. package/styles/modal.css +5 -5
  440. package/styles/modal.module.css.css +1 -1
  441. package/styles/notice.css +1 -1
  442. package/styles/password-field.css +7 -7
  443. package/styles/progress-bar.module.css.css +1 -1
  444. package/styles/prose.css +2 -2
  445. package/styles/prose.module.css.css +1 -1
  446. package/styles/reactist.css +30 -30
  447. package/styles/select-field.css +5 -5
  448. package/styles/select-field.module.css.css +1 -1
  449. package/styles/spinner.css +1 -1
  450. package/styles/static-toast.css +6 -6
  451. package/styles/switch-field.css +6 -6
  452. package/styles/switch-field.module.css.css +1 -1
  453. package/styles/tabs.css +2 -2
  454. package/styles/tabs.module.css.css +1 -1
  455. package/styles/text-area.css +5 -5
  456. package/styles/text-area.module.css.css +1 -1
  457. package/styles/text-field.css +5 -5
  458. package/styles/text-field.module.css.css +1 -1
  459. package/styles/text-link.css +2 -2
  460. package/styles/text-link.module.css.css +1 -1
  461. package/styles/text.css +2 -2
  462. package/styles/text.module.css.css +1 -1
  463. package/styles/toast.module.css.css +1 -1
  464. package/styles/tooltip.css +2 -2
  465. package/styles/tooltip.module.css.css +1 -1
  466. package/styles/use-toasts.css +6 -6
  467. package/es/_virtual/_rollupPluginBabelHelpers.js +0 -91
  468. package/es/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
  469. package/lib/_virtual/_rollupPluginBabelHelpers.js +0 -2
  470. package/lib/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
@@ -1,2 +1,60 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),l=require("../icons/close-icon.js"),a=require("../box/box.js"),n=require("../button/button.js"),r=require("../stack/stack.js"),i=require("../text/text.js"),o=require("./toast.module.css.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=s(t);const c=["message","description","icon","action","onDismiss","dismissLabel"];function d(e){return null!=e&&"object"==typeof e&&"label"in e&&"onClick"in e&&"string"==typeof e.label&&"function"==typeof e.onClick}function f({children:e}){return u.default.createElement(a.Box,{display:"flex",alignItems:"center",justifyContent:"center",marginX:"-xsmall",marginY:"-medium",className:o.default.slot},e)}exports.StaticToast=u.default.forwardRef((function(t,s){let{message:m,description:b,icon:p,action:x,onDismiss:j,dismissLabel:E="Close"}=t,g=e.objectWithoutProperties(t,c);return u.default.createElement(a.Box,e.objectSpread2({ref:s,role:"alert","aria-live":"polite",borderRadius:"full",width:"fitContent",background:"toast",display:"flex",padding:"large",alignItems:"center",className:o.default.toastContainer},g),p?u.default.createElement(f,null,p):null,u.default.createElement(a.Box,{flexGrow:1,maxWidth:"small"},b?u.default.createElement(r.Stack,{space:"small"},u.default.createElement(i.Text,{weight:"bold"},m," "),u.default.createElement(i.Text,null,b)):u.default.createElement(i.Text,null,m)),x?u.default.createElement(f,null,d(x)?u.default.createElement(n.Button,{variant:"tertiary",size:"small",onClick:x.onClick},x.label):x):null,j?u.default.createElement(f,null,u.default.createElement(n.IconButton,{variant:"quaternary",size:"small",onClick:j,"aria-label":E,icon:u.default.createElement(l.CloseIcon,null)})):null)})),exports.isActionObject=d;
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var React = require('react');
7
+ var closeIcon = require('../icons/close-icon.js');
8
+ var box = require('../box/box.js');
9
+ var button = require('../button/button.js');
10
+ var stack = require('../stack/stack.js');
11
+ var text = require('../text/text.js');
12
+ var toast_module = require('./toast.module.css.js');
13
+
14
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
+
16
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
17
+
18
+ /**
19
+ * A toast that shows a message, and an optional action associated with it.
20
+ *
21
+ * This component is generally not meant to be used directly. Most of the time you'll want to use
22
+ * toasts generated via `useToasts` instead. However, this component is available in case you need
23
+ * to take control of rendering a toast under different circumstances than that of notification-like
24
+ * floating toasts.
25
+ *
26
+ * This component makes no assumptions outwardly about how it is positioned on the screen. That is,
27
+ * it will not be shown floating or fixed to the viewport edges, as toasts normally show up. It only
28
+ * provides the toast look and feel, but you are responsible for positioning it as you want.
29
+ *
30
+ * @see useToasts
31
+ */
32
+ var StaticToast = React__default["default"].forwardRef(function Toast(_a, ref) {
33
+ 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 = tslib.__rest(_a, ["message", "description", "icon", "action", "onDismiss", "dismissLabel"]);
34
+ return (React__default["default"].createElement(box.Box, tslib.__assign({ ref: ref, role: "alert", "aria-live": "polite", borderRadius: "full", width: "fitContent", background: "toast", display: "flex", padding: "large", alignItems: "center", className: toast_module["default"].toastContainer }, props),
35
+ icon ? React__default["default"].createElement(ToastContentSlot, null, icon) : null,
36
+ React__default["default"].createElement(box.Box, { flexGrow: 1, maxWidth: "small" }, description ? (React__default["default"].createElement(stack.Stack, { space: "small" },
37
+ React__default["default"].createElement(text.Text, { weight: "bold" },
38
+ message,
39
+ " "),
40
+ React__default["default"].createElement(text.Text, null, description))) : (React__default["default"].createElement(text.Text, null, message))),
41
+ action ? (React__default["default"].createElement(ToastContentSlot, null, isActionObject(action) ? (React__default["default"].createElement(button.Button, { variant: "tertiary", size: "small", onClick: action.onClick }, action.label)) : (action))) : null,
42
+ onDismiss ? (React__default["default"].createElement(ToastContentSlot, null,
43
+ React__default["default"].createElement(button.IconButton, { variant: "quaternary", size: "small", onClick: onDismiss, "aria-label": dismissLabel, icon: React__default["default"].createElement(closeIcon.CloseIcon, null) }))) : null));
44
+ });
45
+ function isActionObject(action) {
46
+ return (action != null &&
47
+ typeof action === 'object' &&
48
+ 'label' in action &&
49
+ 'onClick' in action &&
50
+ typeof action.label === 'string' &&
51
+ typeof action.onClick === 'function');
52
+ }
53
+ function ToastContentSlot(_a) {
54
+ var children = _a.children;
55
+ return (React__default["default"].createElement(box.Box, { display: "flex", alignItems: "center", justifyContent: "center", marginX: "-xsmall", marginY: "-medium", className: toast_module["default"].slot }, children));
56
+ }
57
+
58
+ exports.StaticToast = StaticToast;
59
+ exports.isActionObject = isActionObject;
2
60
  //# sourceMappingURL=static-toast.js.map
@@ -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":["isActionObject","action","label","onClick","ToastContentSlot","children","React","createElement","Box","display","alignItems","justifyContent","marginX","marginY","className","styles","slot","forwardRef","ref","message","description","icon","onDismiss","dismissLabel","_ref","props","_objectWithoutProperties","objectWithoutProperties","_excluded","_objectSpread","role","aria-live","borderRadius","width","background","padding","toastContainer","flexGrow","maxWidth","Stack","space","Text","weight","Button","variant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AAAA,WAAU,CACPF,QAAQ,aACRC,KAAK,QACL1C,QAASmB,EACGyB,aAAAxB,EACZF,KAAMf,EAAA,QAAAC,cAACyC,EAAAA,UAAS,SAGxB"}
1
+ {"version":3,"file":"static-toast.js","sources":["../../src/toast/static-toast.tsx"],"sourcesContent":[null],"names":["React","__rest","Box","__assign","styles","Stack","Text","Button","IconButton","CloseIcon"],"mappings":";;;;;;;;;;;;;;;;;AA6DA;;;;;;;;;;;;;AAaG;AACG,IAAA,WAAW,GAAGA,yBAAK,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,GAAA,EAAA,CAAA,MAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,EAAsB,GAAA,EAAA,CAAA,YAAA,EAAtB,YAAY,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,OAAO,GAAA,EAAA,EAAK,KAAK,GAAjFC,YAAA,CAAA,EAAA,EAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,EAAA,cAAA,CAAmF,CAAF,CAAA;IAGjF,QACID,wCAACE,OAAG,EAAAC,cAAA,CAAA,EACA,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,OAAO,EACF,WAAA,EAAA,QAAQ,EAClB,YAAY,EAAC,MAAM,EACnB,KAAK,EAAC,YAAY,EAClB,UAAU,EAAC,OAAO,EAClB,OAAO,EAAC,MAAM,EACd,OAAO,EAAC,OAAO,EACf,UAAU,EAAC,QAAQ,EACnB,SAAS,EAAEC,uBAAM,CAAC,cAAc,IAC5B,KAAK,CAAA;QAER,IAAI,GAAGJ,yBAAC,CAAA,aAAA,CAAA,gBAAgB,EAAE,IAAA,EAAA,IAAI,CAAoB,GAAG,IAAI;QAE1DA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Q;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,QACIT,yBAAA,CAAA,aAAA,CAACE,OAAG,EAAA,EACA,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,QAAQ,EACnB,cAAc,EAAC,QAAQ,EACvB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAC,SAAS,EACjB,SAAS,EAAEE,uBAAM,CAAC,IAAI,EAAA,EAErB,QAAQ,CACP,EACT;AACL;;;;;"}
@@ -1,50 +1,50 @@
1
- /**
2
- * Adapted with minor changes from https://github.com/seek-oss/braid-design-system/blob/7a5ebccb/packages/braid-design-system/lib/components/useToast/useFlipList.ts
3
- *
4
- * MIT License
5
- *
6
- * Copyright (c) 2018 SEEK
7
- *
8
- * Permission is hereby granted, free of charge, to any person obtaining a copy
9
- * of this software and associated documentation files (the "Software"), to deal
10
- * in the Software without restriction, including without limitation the rights
11
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- * copies of the Software, and to permit persons to whom the Software is
13
- * furnished to do so, subject to the following conditions:
14
- *
15
- * The above copyright notice and this permission notice shall be included in all
16
- * copies or substantial portions of the Software.
17
- *
18
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
- * SOFTWARE.
25
- */
26
- declare const ANIMATION_TIMEOUT = 400;
27
- type ToastsAnimationToolkit = {
28
- /**
29
- * Used for gathering all the active stacked toast elements. Should be used by passing
30
- * `ref={mappedRef(toastId)}` to the stacked toasts.
31
- */
32
- mappedRef: (toastId: string) => (ref: HTMLElement | null) => void;
33
- /**
34
- * The stacked toasts view should use this callback when it needs to remove a toast, instead of
35
- * removing it right away. The actual removal from the state (and consequently, from the DOM)
36
- * should happen in the `onAnimationDone` instead.
37
- */
38
- animateRemove: (toastId: string, onAnimationDone: () => void) => void;
39
- };
40
- /**
41
- * Provides the functionality of animating the stacked toasts when they appear and before they
42
- * disappear.
43
- *
44
- * It works by keeping a mapping from toast IDs to the toast elements, and keeping a mapping from
45
- * toast IDs to their top position. Then, on every single re-render, it compares the new DOM
46
- * situation with the previously stored one in these mappings. With this information, it applies
47
- * animations that smoothly transitions between both states.
48
- */
49
- declare function useToastsAnimation(): ToastsAnimationToolkit;
50
- export { ANIMATION_TIMEOUT, useToastsAnimation };
1
+ /**
2
+ * Adapted with minor changes from https://github.com/seek-oss/braid-design-system/blob/7a5ebccb/packages/braid-design-system/lib/components/useToast/useFlipList.ts
3
+ *
4
+ * MIT License
5
+ *
6
+ * Copyright (c) 2018 SEEK
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ */
26
+ declare const ANIMATION_TIMEOUT = 400;
27
+ type ToastsAnimationToolkit = {
28
+ /**
29
+ * Used for gathering all the active stacked toast elements. Should be used by passing
30
+ * `ref={mappedRef(toastId)}` to the stacked toasts.
31
+ */
32
+ mappedRef: (toastId: string) => (ref: HTMLElement | null) => void;
33
+ /**
34
+ * The stacked toasts view should use this callback when it needs to remove a toast, instead of
35
+ * removing it right away. The actual removal from the state (and consequently, from the DOM)
36
+ * should happen in the `onAnimationDone` instead.
37
+ */
38
+ animateRemove: (toastId: string, onAnimationDone: () => void) => void;
39
+ };
40
+ /**
41
+ * Provides the functionality of animating the stacked toasts when they appear and before they
42
+ * disappear.
43
+ *
44
+ * It works by keeping a mapping from toast IDs to the toast elements, and keeping a mapping from
45
+ * toast IDs to their top position. Then, on every single re-render, it compares the new DOM
46
+ * situation with the previously stored one in these mappings. With this information, it applies
47
+ * animations that smoothly transitions between both states.
48
+ */
49
+ declare function useToastsAnimation(): ToastsAnimationToolkit;
50
+ export { ANIMATION_TIMEOUT, useToastsAnimation };
@@ -1,2 +1,142 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t({element:e,transforms:t,transition:r,done:n}){const o=setTimeout(()=>{null==n||n()},400);t.forEach(({property:t,from:r=""})=>{e.style.setProperty(t,r)}),e.style.setProperty("transition",""),e.addEventListener("transitionend",(function t(r){r.target===e&&(e.style.setProperty("transition",""),null==n||n(),e.removeEventListener("transitionend",t),clearTimeout(o))})),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{e.style.setProperty("transition",r),t.forEach(({property:t,to:r=""})=>{e.style.setProperty(t,r)})})})}exports.ANIMATION_TIMEOUT=400,exports.useToastsAnimation=function(){const r=e.useMemo(()=>new Map,[]),n=e.useMemo(()=>new Map,[]);e.useLayoutEffect(()=>{const e=[];Array.from(r.entries()).forEach(([t,o])=>{if(!o)return void r.delete(t);const s=n.get(t),{top:a,height:i}=o.getBoundingClientRect();"number"==typeof s&&s!==a?e.push({element:o,transition:"transform 0.3s ease, opacity 0.3s ease",transforms:[{property:"transform",from:`translateY(${s-a}px)`}]}):"number"!=typeof s&&e.push({element:o,transition:"transform 0.3s ease, opacity 0.3s ease",transforms:[{property:"transform",from:`translateY(${i}px)`},{property:"opacity",from:"0"}]}),n.set(t,o.getBoundingClientRect().top)}),e.forEach(({element:e,transforms:r,transition:n})=>{t({element:e,transforms:r,transition:n})})});const o=e.useCallback((function(e,n){const o=r.get(e);o&&t({element:o,transforms:[{property:"opacity",to:"0"}],transition:"opacity 0.2s ease",done:n})}),[r]);return{mappedRef:e.useCallback(e=>t=>{r.set(e,t)},[r]),animateRemove:o}};
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+
7
+ /**
8
+ * Adapted with minor changes from https://github.com/seek-oss/braid-design-system/blob/7a5ebccb/packages/braid-design-system/lib/components/useToast/useFlipList.ts
9
+ *
10
+ * MIT License
11
+ *
12
+ * Copyright (c) 2018 SEEK
13
+ *
14
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ * of this software and associated documentation files (the "Software"), to deal
16
+ * in the Software without restriction, including without limitation the rights
17
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ * copies of the Software, and to permit persons to whom the Software is
19
+ * furnished to do so, subject to the following conditions:
20
+ *
21
+ * The above copyright notice and this permission notice shall be included in all
22
+ * copies or substantial portions of the Software.
23
+ *
24
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ * SOFTWARE.
31
+ */
32
+ var ANIMATION_TIMEOUT = 400;
33
+ var ENTRANCE_TRANSITION = 'transform 0.3s ease, opacity 0.3s ease';
34
+ var EXIT_TRANSITION = 'opacity 0.2s ease';
35
+ /**
36
+ * Applies the "from" value of given CSS properties, and also sets a transition CSS property. Then
37
+ * it waits an animation frame before setting the same CSS properties to the target "to" value. This
38
+ * triggers the browser to perform the CSS transition on them.
39
+ *
40
+ * At the end of the animation, it cleans up, unsetting all the CSS properties (including the
41
+ * transition), and calls the "done" callback, if given.
42
+ */
43
+ function animate(_a) {
44
+ var element = _a.element, transforms = _a.transforms, transition = _a.transition, done = _a.done;
45
+ var fallbackTimeout = setTimeout(function () {
46
+ done === null || done === void 0 ? void 0 : done();
47
+ }, ANIMATION_TIMEOUT);
48
+ transforms.forEach(function (_a) {
49
+ var property = _a.property, _b = _a.from, from = _b === void 0 ? '' : _b;
50
+ element.style.setProperty(property, from);
51
+ });
52
+ element.style.setProperty('transition', '');
53
+ function transitionEndHandler(event) {
54
+ if (event.target !== element) {
55
+ return;
56
+ }
57
+ element.style.setProperty('transition', '');
58
+ done === null || done === void 0 ? void 0 : done();
59
+ element.removeEventListener('transitionend', transitionEndHandler);
60
+ clearTimeout(fallbackTimeout);
61
+ }
62
+ element.addEventListener('transitionend', transitionEndHandler);
63
+ // Call requestAnimationFrame twice to make sure we have a full animation frame at our disposal
64
+ window.requestAnimationFrame(function () {
65
+ window.requestAnimationFrame(function () {
66
+ element.style.setProperty('transition', transition);
67
+ transforms.forEach(function (_a) {
68
+ var property = _a.property, _b = _a.to, to = _b === void 0 ? '' : _b;
69
+ element.style.setProperty(property, to);
70
+ });
71
+ });
72
+ });
73
+ }
74
+ /**
75
+ * Provides the functionality of animating the stacked toasts when they appear and before they
76
+ * disappear.
77
+ *
78
+ * It works by keeping a mapping from toast IDs to the toast elements, and keeping a mapping from
79
+ * toast IDs to their top position. Then, on every single re-render, it compares the new DOM
80
+ * situation with the previously stored one in these mappings. With this information, it applies
81
+ * animations that smoothly transitions between both states.
82
+ */
83
+ function useToastsAnimation() {
84
+ var refs = React.useMemo(function () { return new Map(); }, []);
85
+ var positions = React.useMemo(function () { return new Map(); }, []);
86
+ React.useLayoutEffect(function () {
87
+ var animations = [];
88
+ Array.from(refs.entries()).forEach(function (_a) {
89
+ var id = _a[0], element = _a[1];
90
+ if (!element) {
91
+ refs["delete"](id);
92
+ return;
93
+ }
94
+ var prevTop = positions.get(id);
95
+ var _b = element.getBoundingClientRect(), top = _b.top, height = _b.height;
96
+ if (typeof prevTop === 'number' && prevTop !== top) {
97
+ // Move animation
98
+ animations.push({
99
+ element: element,
100
+ transition: ENTRANCE_TRANSITION,
101
+ transforms: [{ property: 'transform', from: "translateY(".concat(prevTop - top, "px)") }]
102
+ });
103
+ }
104
+ else if (typeof prevTop !== 'number') {
105
+ // Enter animation
106
+ animations.push({
107
+ element: element,
108
+ transition: ENTRANCE_TRANSITION,
109
+ transforms: [
110
+ { property: 'transform', from: "translateY(".concat(height, "px)") },
111
+ { property: 'opacity', from: '0' },
112
+ ]
113
+ });
114
+ }
115
+ positions.set(id, element.getBoundingClientRect().top);
116
+ });
117
+ animations.forEach(function (_a) {
118
+ var element = _a.element, transforms = _a.transforms, transition = _a.transition;
119
+ animate({ element: element, transforms: transforms, transition: transition });
120
+ });
121
+ });
122
+ var animateRemove = React.useCallback(function animateRemove(id, onAnimationDone) {
123
+ var element = refs.get(id);
124
+ if (element) {
125
+ // Removal animation
126
+ animate({
127
+ element: element,
128
+ transforms: [{ property: 'opacity', to: '0' }],
129
+ transition: EXIT_TRANSITION,
130
+ done: onAnimationDone
131
+ });
132
+ }
133
+ }, [refs]);
134
+ var mappedRef = React.useCallback(function (id) { return function (ref) {
135
+ refs.set(id, ref);
136
+ }; }, [refs]);
137
+ return { mappedRef: mappedRef, animateRemove: animateRemove };
138
+ }
139
+
140
+ exports.ANIMATION_TIMEOUT = ANIMATION_TIMEOUT;
141
+ exports.useToastsAnimation = useToastsAnimation;
2
142
  //# sourceMappingURL=toast-animation.js.map
@@ -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":["animate","element","transforms","transition","done","fallbackTimeout","setTimeout","forEach","property","from","style","setProperty","addEventListener","transitionEndHandler","event","target","removeEventListener","clearTimeout","window","requestAnimationFrame","to","refs","useMemo","Map","positions","useLayoutEffect","animations","Array","entries","id","delete","prevTop","get","top","height","getBoundingClientRect","push","set","animateRemove","useCallback","onAnimationDone","mappedRef","ref"],"mappings":"2FA8CA,SAASA,GAAQC,QACbA,EADaC,WAEbA,EAFaC,WAGbA,EAHaC,KAIbA,IAOA,MAAMC,EAAkBC,WAAW,KAC3B,MAAJF,GAAAA,KA9BkB,KAiCtBF,EAAWK,QAAQ,EAAGC,SAAAA,EAAUC,KAAAA,EAAO,OACnCR,EAAQS,MAAMC,YAAYH,EAAUC,KAExCR,EAAQS,MAAMC,YAAY,aAAc,IAYxCV,EAAQW,iBAAiB,iBAVzB,SAASC,EAAqBC,GACtBA,EAAMC,SAAWd,IAGrBA,EAAQS,MAAMC,YAAY,aAAc,IACpC,MAAJP,GAAAA,IACAH,EAAQe,oBAAoB,gBAAiBH,GAC7CI,aAAaZ,OAMjBa,OAAOC,sBAAsB,KACzBD,OAAOC,sBAAsB,KACzBlB,EAAQS,MAAMC,YAAY,aAAcR,GACxCD,EAAWK,QAAQ,EAAGC,SAAAA,EAAUY,GAAAA,EAAK,OACjCnB,EAAQS,MAAMC,YAAYH,EAAUY,mCAvD1B,+BAqF1B,WACI,MAAMC,EAAOC,EAAAA,QAAQ,IAAM,IAAIC,IAAmC,IAC5DC,EAAYF,EAAAA,QAAQ,IAAM,IAAIC,IAAuB,IAE3DE,EAAAA,gBAAgB,KACZ,MAAMC,EAID,GAELC,MAAMlB,KAAKY,EAAKO,WAAWrB,QAAQ,EAAEsB,EAAI5B,MACrC,IAAKA,EAED,YADAoB,EAAKS,OAAOD,GAIhB,MAAME,EAAUP,EAAUQ,IAAIH,IACxBI,IAAEA,EAAFC,OAAOA,GAAWjC,EAAQkC,wBAET,iBAAZJ,GAAwBA,IAAYE,EAE3CP,EAAWU,KAAK,CACZnC,QAAAA,EACAE,WA5GQ,yCA6GRD,WAAY,CAAC,CAAEM,SAAU,YAAaC,mBAAoBsB,EAAUE,WAE9C,iBAAZF,GAEdL,EAAWU,KAAK,CACZnC,QAAAA,EACAE,WAnHQ,yCAoHRD,WAAY,CACR,CAAEM,SAAU,YAAaC,KAAM,cAAcyB,QAC7C,CAAE1B,SAAU,UAAWC,KAAM,QAKzCe,EAAUa,IAAIR,EAAI5B,EAAQkC,wBAAwBF,OAGtDP,EAAWnB,QAAQ,EAAGN,QAAAA,EAASC,WAAAA,EAAYC,WAAAA,MACvCH,EAAQ,CAAEC,QAAAA,EAASC,WAAAA,EAAYC,WAAAA,QAIvC,MAAMmC,EAAgBC,EAAWA,aAC7B,SAAuBV,EAAYW,GAC/B,MAAMvC,EAAUoB,EAAKW,IAAIH,GACrB5B,GAEAD,EAAQ,CACJC,QAAAA,EACAC,WAAY,CAAC,CAAEM,SAAU,UAAWY,GAAI,MACxCjB,WA1II,oBA2IJC,KAAMoC,MAIlB,CAACnB,IAUL,MAAO,CAAEoB,UAPSF,EAAAA,YACbV,GAAgBa,IACbrB,EAAKgB,IAAIR,EAAIa,IAEjB,CAACrB,IAGeiB,cAAAA"}
1
+ {"version":3,"file":"toast-animation.js","sources":["../../src/toast/toast-animation.ts"],"sourcesContent":[null],"names":["useMemo","useLayoutEffect","useCallback"],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AAIG,IAAA,iBAAiB,GAAG,IAAG;AAC7B,IAAM,mBAAmB,GAAG,wCAAwC,CAAA;AACpE,IAAM,eAAe,GAAG,mBAAmB,CAAA;AAQ3C;;;;;;;AAOG;AACH,SAAS,OAAO,CAAC,EAUhB,EAAA;QATG,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,IAAI,GAAA,EAAA,CAAA,IAAA,CAAA;IAOJ,IAAM,eAAe,GAAG,UAAU,CAAC,YAAA;AAC/B,QAAA,IAAI,KAAJ,IAAA,IAAA,IAAI,KAAJ,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,IAAI,EAAI,CAAA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AAE,EAAE,EAAE,GAAG,EAAE,CAAC;AAC9C,gBAAA,UAAU,EAAE,eAAe;AAC3B,gBAAA,IAAI,EAAE,eAAe;AACxB,aAAA,CAAC,CAAA;AACL,SAAA;AACL,KAAC,EACD,CAAC,IAAI,CAAC,CACT,CAAA;IAED,IAAM,SAAS,GAAGA,iBAAW,CACzB,UAAC,EAAU,EAAA,EAAK,OAAA,UAAC,GAAuB,EAAA;AACpC,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;AACrB,KAAC,GAAA,EACD,CAAC,IAAI,CAAC,CACT,CAAA;AAED,IAAA,OAAO,EAAE,SAAS,EAAA,SAAA,EAAE,aAAa,EAAA,aAAA,EAAE,CAAA;AACvC;;;;;"}
@@ -1,2 +1,8 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={stackedToastsView:"_616cc3f3",toastContainer:"_1b5f8e86",slot:"ce2e3476"};
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var modules_d11e18f0 = {"stackedToastsView":"_616cc3f3","toastContainer":"_1b5f8e86","slot":"ce2e3476"};
6
+
7
+ exports["default"] = modules_d11e18f0;
2
8
  //# sourceMappingURL=toast.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toast.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"toast.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}