@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,22 +1,11 @@
1
- import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
1
+ import { __assign } from 'tslib';
2
2
  import * as React from 'react';
3
3
 
4
4
  function PasswordVisibleIcon(props) {
5
- return /*#__PURE__*/React.createElement("svg", _objectSpread2({
6
- xmlns: "http://www.w3.org/2000/svg",
7
- width: "24",
8
- height: "24"
9
- }, props), /*#__PURE__*/React.createElement("g", {
10
- fill: "none",
11
- fillRule: "evenodd",
12
- stroke: "gray"
13
- }, /*#__PURE__*/React.createElement("path", {
14
- d: "M21.358 12C17.825 7.65 14.692 5.5 12 5.5c-2.624 0-5.67 2.043-9.097 6.181a.5.5 0 0 0 0 .638C6.331 16.457 9.376 18.5 12 18.5c2.692 0 5.825-2.15 9.358-6.5z"
15
- }), /*#__PURE__*/React.createElement("circle", {
16
- cx: "12",
17
- cy: "12",
18
- r: "3.5"
19
- })));
5
+ return (React.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24" }, props),
6
+ React.createElement("g", { fill: "none", fillRule: "evenodd", stroke: "gray" },
7
+ React.createElement("path", { d: "M21.358 12C17.825 7.65 14.692 5.5 12 5.5c-2.624 0-5.67 2.043-9.097 6.181a.5.5 0 0 0 0 .638C6.331 16.457 9.376 18.5 12 18.5c2.692 0 5.825-2.15 9.358-6.5z" }),
8
+ React.createElement("circle", { cx: "12", cy: "12", r: "3.5" }))));
20
9
  }
21
10
 
22
11
  export { PasswordVisibleIcon };
@@ -1 +1 @@
1
- {"version":3,"file":"password-visible-icon.js","sources":["../../src/icons/password-visible-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nfunction PasswordVisibleIcon(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" {...props}>\n <g fill=\"none\" fillRule=\"evenodd\" stroke=\"gray\">\n <path d=\"M21.358 12C17.825 7.65 14.692 5.5 12 5.5c-2.624 0-5.67 2.043-9.097 6.181a.5.5 0 0 0 0 .638C6.331 16.457 9.376 18.5 12 18.5c2.692 0 5.825-2.15 9.358-6.5z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3.5\" />\n </g>\n </svg>\n )\n}\n\nexport { PasswordVisibleIcon }\n"],"names":["PasswordVisibleIcon","props","React","createElement","_objectSpread","xmlns","width","height","fill","fillRule","stroke","d","cx","cy","r"],"mappings":";;;AAEA,SAASA,mBAAT,CAA6BC,KAA7B,EAAgE;AAC5D,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA;AAAKC,IAAAA,KAAK,EAAC,4BAAX;AAAwCC,IAAAA,KAAK,EAAC,IAA9C;AAAmDC,IAAAA,MAAM,EAAC,IAAA;AAA1D,GAAA,EAAmEN,KAAnE,CACIC,eAAAA,KAAG,CAAAC,aAAH,CAAG,GAAH,EAAG;AAAAK,IAAAA,IAAI,EAAC,MAAL;AAAYC,IAAAA,QAAQ,EAAC,SAArB;AAA+BC,IAAAA,MAAM,EAAC,MAAA;AAAtC,GAAH,eACIR,KAAM,CAAAC,aAAN,CAAM,MAAN,EAAM;AAAAQ,IAAAA,CAAC,EAAC,0JAAA;AAAF,GAAN,CADJ,eAEIT,KAAA,CAAAC,aAAA,CAAA,QAAA,EAAA;AAAQS,IAAAA,EAAE,EAAC,IAAX;AAAgBC,IAAAA,EAAE,EAAC,IAAnB;AAAwBC,IAAAA,CAAC,EAAC,KAAA;GAA1B,CAFJ,CADJ,CADJ,CAAA;AAQH;;;;"}
1
+ {"version":3,"file":"password-visible-icon.js","sources":["../../src/icons/password-visible-icon.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;AAEA,SAAS,mBAAmB,CAAC,KAAmC,EAAA;AAC5D,IAAA,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,QAAA,CAAA,EAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,IAAK,KAAK,CAAA;QACpE,KAAG,CAAA,aAAA,CAAA,GAAA,EAAA,EAAA,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS,EAAC,MAAM,EAAC,MAAM,EAAA;YAC3C,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,0JAA0J,EAAG,CAAA;AACrK,YAAA,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,KAAK,EAAA,CAAG,CAClC,CACF,EACT;AACL;;;;"}
@@ -1,31 +1,16 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
1
+ import { __rest, __assign } from 'tslib';
2
2
  import * as React from 'react';
3
3
  import { polymorphicComponent } from '../utils/polymorphism.js';
4
4
  import { mapResponsiveProp } from '../utils/responsive-props.js';
5
5
  import { Box } from '../box/box.js';
6
6
 
7
- const _excluded = ["as", "space", "align", "alignY", "children", "exceptionallySetClassName"];
8
- const Inline = /*#__PURE__*/polymorphicComponent(function Inline(_ref, ref) {
9
- let {
10
- as,
11
- space,
12
- align = 'left',
13
- alignY = 'center',
14
- children,
15
- exceptionallySetClassName
16
- } = _ref,
17
- props = _objectWithoutProperties(_ref, _excluded);
18
-
19
- return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
20
- as: as,
21
- display: "flex",
22
- flexWrap: "wrap",
23
- gap: space,
24
- className: exceptionallySetClassName,
25
- ref: ref,
26
- alignItems: mapResponsiveProp(alignY, alignY => alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' : 'center'),
27
- justifyContent: mapResponsiveProp(align, align => align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : 'center')
28
- }), children);
7
+ var Inline = polymorphicComponent(function Inline(_a, ref) {
8
+ var as = _a.as, space = _a.space, _b = _a.align, align = _b === void 0 ? 'left' : _b, _c = _a.alignY, alignY = _c === void 0 ? 'center' : _c, children = _a.children, exceptionallySetClassName = _a.exceptionallySetClassName, props = __rest(_a, ["as", "space", "align", "alignY", "children", "exceptionallySetClassName"]);
9
+ return (React.createElement(Box, __assign({}, props, { as: as, display: "flex", flexWrap: "wrap", gap: space, className: exceptionallySetClassName, ref: ref, alignItems: mapResponsiveProp(alignY, function (alignY) {
10
+ return alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' : 'center';
11
+ }), justifyContent: mapResponsiveProp(align, function (align) {
12
+ return align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : 'center';
13
+ }) }), children));
29
14
  });
30
15
 
31
16
  export { Inline };
@@ -1 +1 @@
1
- {"version":3,"file":"inline.js","sources":["../../src/inline/inline.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../utils/polymorphism'\nimport { mapResponsiveProp } from '../utils/responsive-props'\nimport { Box } from '../box'\n\nimport type { ResponsiveProp } from '../utils/responsive-props'\nimport type { Space } from '../utils/common-types'\nimport type { ReusableBoxProps } from '../box'\n\ntype InlineAlign = 'left' | 'center' | 'right'\n\ninterface InlineProps extends ReusableBoxProps {\n space?: ResponsiveProp<Space>\n align?: ResponsiveProp<InlineAlign>\n alignY?: ResponsiveProp<'top' | 'center' | 'bottom'>\n}\n\nconst Inline = polymorphicComponent<'div', InlineProps>(function Inline(\n { as, space, align = 'left', alignY = 'center', children, exceptionallySetClassName, ...props },\n ref,\n) {\n return (\n <Box\n {...props}\n as={as}\n display=\"flex\"\n flexWrap=\"wrap\"\n gap={space}\n className={exceptionallySetClassName}\n ref={ref}\n alignItems={mapResponsiveProp(alignY, (alignY) =>\n alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' : 'center',\n )}\n justifyContent={mapResponsiveProp(align, (align) =>\n align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : 'center',\n )}\n >\n {children}\n </Box>\n )\n})\n\nexport type { InlineProps, InlineAlign }\nexport { Inline }\n"],"names":["Inline","polymorphicComponent","ref","as","space","align","alignY","children","exceptionallySetClassName","props","React","Box","display","flexWrap","gap","className","alignItems","mapResponsiveProp","justifyContent"],"mappings":";;;;;;;AAiBMA,MAAAA,MAAM,gBAAGC,oBAAoB,CAAqB,SAASD,MAAT,CAAA,IAAA,EAEpDE,GAFoD,EAEjD;EAAA,IADH;IAAEC,EAAF;IAAMC,KAAN;AAAaC,IAAAA,KAAK,GAAG,MAArB;AAA6BC,IAAAA,MAAM,GAAG,QAAtC;IAAgDC,QAAhD;AAA0DC,IAAAA,yBAAAA;GACvD,GAAA,IAAA;AAAA,MADqFC,KACrF,GAAA,wBAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;;AAEH,EAAA,oBACIC,mBAAA,CAACC,GAAD,oCACQF,KADR,CAAA,EAAA,EAAA,EAAA;AAEIN,IAAAA,EAAE,EAAEA,EAFR;AAGIS,IAAAA,OAAO,EAAC,MAHZ;AAIIC,IAAAA,QAAQ,EAAC,MAJb;AAKIC,IAAAA,GAAG,EAAEV,KALT;AAMIW,IAAAA,SAAS,EAAEP,yBANf;AAOIN,IAAAA,GAAG,EAAEA,GAPT;IAQIc,UAAU,EAAEC,iBAAiB,CAACX,MAAD,EAAUA,MAAD,IAClCA,MAAM,KAAK,KAAX,GAAmB,WAAnB,GAAiCA,MAAM,KAAK,QAAX,GAAsB,SAAtB,GAAkC,QAD1C,CARjC;AAWIY,IAAAA,cAAc,EAAED,iBAAiB,CAACZ,KAAD,EAASA,KAAD,IACrCA,KAAK,KAAK,MAAV,GAAmB,WAAnB,GAAiCA,KAAK,KAAK,OAAV,GAAoB,SAApB,GAAgC,QADpC,CAAA;AAXrC,GAAA,CAAA,EAeKE,QAfL,CADJ,CAAA;AAmBH,CAvBkC;;;;"}
1
+ {"version":3,"file":"inline.js","sources":["../../src/inline/inline.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAiBM,IAAA,MAAM,GAAG,oBAAoB,CAAqB,SAAS,MAAM,CACnE,EAA+F,EAC/F,GAAG,EAAA;AADD,IAAA,IAAA,EAAE,GAAA,EAAA,CAAA,EAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,EAAc,GAAA,EAAA,CAAA,KAAA,EAAd,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,MAAM,GAAA,EAAA,EAAE,EAAA,GAAA,EAAA,CAAA,MAAiB,EAAjB,MAAM,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,QAAQ,GAAA,EAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,yBAAyB,GAAA,EAAA,CAAA,yBAAA,EAAK,KAAK,GAAA,MAAA,CAAA,EAAA,EAA7F,2EAA+F,CAAF,CAAA;AAG7F,IAAA,QACI,KAAC,CAAA,aAAA,CAAA,GAAG,EACI,QAAA,CAAA,EAAA,EAAA,KAAK,IACT,EAAE,EAAE,EAAE,EACN,OAAO,EAAC,MAAM,EACd,QAAQ,EAAC,MAAM,EACf,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,yBAAyB,EACpC,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,iBAAiB,CAAC,MAAM,EAAE,UAAC,MAAM,EAAA;YACzC,OAAA,MAAM,KAAK,KAAK,GAAG,WAAW,GAAG,MAAM,KAAK,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;SAAA,CAC9E,EACD,cAAc,EAAE,iBAAiB,CAAC,KAAK,EAAE,UAAC,KAAK,EAAA;YAC3C,OAAA,KAAK,KAAK,MAAM,GAAG,WAAW,GAAG,KAAK,KAAK,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAA;AAAzE,SAAyE,CAC5E,EAAA,CAAA,EAEA,QAAQ,CACP,EACT;AACL,CAAC;;;;"}
@@ -1,38 +1,25 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
1
+ import { __rest, __assign } from 'tslib';
2
2
  import * as React from 'react';
3
3
  import { Box } from '../box/box.js';
4
4
  import { Spinner } from '../spinner/spinner.js';
5
5
 
6
- const _excluded = ["size", "exceptionallySetClassName"];
7
- const sizeMapping = {
8
- xsmall: 16,
9
- small: 24,
10
- medium: 36,
11
- large: 48
6
+ var sizeMapping = {
7
+ xsmall: 16,
8
+ small: 24,
9
+ medium: 36,
10
+ large: 48
12
11
  };
13
-
14
- function Loading(_ref) {
15
- var _sizeMapping$size;
16
-
17
- let {
18
- size = 'small',
19
- exceptionallySetClassName
20
- } = _ref,
21
- props = _objectWithoutProperties(_ref, _excluded);
22
-
23
- const numericSize = (_sizeMapping$size = sizeMapping[size]) != null ? _sizeMapping$size : sizeMapping.small;
24
- const ariaLabel = props['aria-label'] ? props['aria-label'] : !props['aria-labelledby'] ? 'Loading…' : undefined;
25
- return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
26
- "aria-label": ariaLabel,
27
- className: exceptionallySetClassName,
28
- display: "flex",
29
- alignItems: "center",
30
- justifyContent: "center",
31
- role: "progressbar"
32
- }), /*#__PURE__*/React.createElement(Spinner, {
33
- size: numericSize,
34
- "aria-hidden": true
35
- }));
12
+ function Loading(_a) {
13
+ var _b;
14
+ var _c = _a.size, size = _c === void 0 ? 'small' : _c, exceptionallySetClassName = _a.exceptionallySetClassName, props = __rest(_a, ["size", "exceptionallySetClassName"]);
15
+ var numericSize = (_b = sizeMapping[size]) !== null && _b !== void 0 ? _b : sizeMapping.small;
16
+ var ariaLabel = props['aria-label']
17
+ ? props['aria-label']
18
+ : !props['aria-labelledby']
19
+ ? 'Loading…'
20
+ : undefined;
21
+ return (React.createElement(Box, __assign({}, props, { "aria-label": ariaLabel, className: exceptionallySetClassName, display: "flex", alignItems: "center", justifyContent: "center", role: "progressbar" }),
22
+ React.createElement(Spinner, { size: numericSize, "aria-hidden": true })));
36
23
  }
37
24
 
38
25
  export { Loading };
@@ -1 +1 @@
1
- {"version":3,"file":"loading.js","sources":["../../src/loading/loading.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { Spinner } from '../spinner'\nimport type { ObfuscatedClassName } from '../utils/common-types'\n\ntype Size = 'xsmall' | 'small' | 'medium' | 'large'\n\ntype NativeProps = Omit<\n React.HTMLAttributes<HTMLDivElement>,\n 'className' | 'aria-describedby' | 'aria-label' | 'aria-labelledby' | 'role' | 'size'\n>\n\ntype LoadingProps = NativeProps &\n ObfuscatedClassName & {\n /**\n * The size of the loading spinner.\n * @default 'small'\n */\n size?: Size\n\n /**\n * Identifies the element (or elements) that describes the loading component for assistive technologies.\n */\n 'aria-describedby'?: string\n } & (\n | {\n /** Defines a string value that labels the current loading component for assistive technologies. */\n 'aria-label': string\n 'aria-labelledby'?: never\n }\n | {\n /** Identifies the element (or elements) that labels the current loading component for assistive technologies. */\n 'aria-labelledby': string\n 'aria-label'?: never\n }\n )\n\nconst sizeMapping: Record<Size, number> = {\n xsmall: 16,\n small: 24,\n medium: 36,\n large: 48,\n}\n\nfunction Loading({ size = 'small', exceptionallySetClassName, ...props }: LoadingProps) {\n const numericSize = sizeMapping[size] ?? sizeMapping.small\n const ariaLabel = props['aria-label']\n ? props['aria-label']\n : !props['aria-labelledby']\n ? 'Loading…'\n : undefined\n\n return (\n <Box\n {...props}\n aria-label={ariaLabel}\n className={exceptionallySetClassName}\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n role=\"progressbar\"\n >\n <Spinner size={numericSize} aria-hidden />\n </Box>\n )\n}\n\nexport { Loading }\nexport type { LoadingProps }\n"],"names":["sizeMapping","xsmall","small","medium","large","Loading","size","exceptionallySetClassName","props","numericSize","ariaLabel","undefined","React","createElement","Box","className","display","alignItems","justifyContent","role","Spinner"],"mappings":";;;;;;AAqCA,MAAMA,WAAW,GAAyB;AACtCC,EAAAA,MAAM,EAAE,EAD8B;AAEtCC,EAAAA,KAAK,EAAE,EAF+B;AAGtCC,EAAAA,MAAM,EAAE,EAH8B;AAItCC,EAAAA,KAAK,EAAE,EAAA;AAJ+B,CAA1C,CAAA;;AAOA,SAASC,OAAT,CAAsF,IAAA,EAAA;AAAA,EAAA,IAAA,iBAAA,CAAA;;EAAA,IAArE;AAAEC,IAAAA,IAAI,GAAG,OAAT;AAAkBC,IAAAA,yBAAAA;GAAmD,GAAA,IAAA;AAAA,MAArBC,KAAqB,GAAA,wBAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;;EAClF,MAAMC,WAAW,wBAAGT,WAAW,CAACM,IAAD,CAAd,KAAA,IAAA,GAAA,iBAAA,GAAwBN,WAAW,CAACE,KAArD,CAAA;EACA,MAAMQ,SAAS,GAAGF,KAAK,CAAC,YAAD,CAAL,GACZA,KAAK,CAAC,YAAD,CADO,GAEZ,CAACA,KAAK,CAAC,iBAAD,CAAN,GACA,UADA,GAEAG,SAJN,CAAA;AAMA,EAAA,oBACIC,KAAC,CAAAC,aAAD,CAACC,GAAD,oCACQN,KADR,CAAA,EAAA,EAAA,EAAA;AAEgB,IAAA,YAAA,EAAAE,SAFhB;AAGIK,IAAAA,SAAS,EAAER,yBAHf;AAIIS,IAAAA,OAAO,EAAC,MAJZ;AAKIC,IAAAA,UAAU,EAAC,QALf;AAMIC,IAAAA,cAAc,EAAC,QANnB;AAOIC,IAAAA,IAAI,EAAC,aAAA;AAPT,GAAA,CAAA,eASIP,KAAC,CAAAC,aAAD,CAACO,OAAD;AAASd,IAAAA,IAAI,EAAEG;IAA2B,aAAA,EAAA,IAAA;GAA1C,CATJ,CADJ,CAAA;AAaH;;;;"}
1
+ {"version":3,"file":"loading.js","sources":["../../src/loading/loading.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAqCA,IAAM,WAAW,GAAyB;AACtC,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,KAAK,EAAE,EAAE;CACZ,CAAA;AAED,SAAS,OAAO,CAAC,EAAqE,EAAA;;AAAnE,IAAA,IAAA,EAAc,GAAA,EAAA,CAAA,IAAA,EAAd,IAAI,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,OAAO,GAAA,EAAA,EAAE,yBAAyB,GAAA,EAAA,CAAA,yBAAA,EAAK,KAAK,GAAA,MAAA,CAAA,EAAA,EAArD,qCAAuD,CAAF,CAAA;IAClE,IAAM,WAAW,GAAG,CAAA,EAAA,GAAA,WAAW,CAAC,IAAI,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,WAAW,CAAC,KAAK,CAAA;AAC1D,IAAA,IAAM,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC;AACjC,UAAE,KAAK,CAAC,YAAY,CAAC;AACrB,UAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC;AAC3B,cAAE,UAAU;cACV,SAAS,CAAA;IAEf,QACI,KAAC,CAAA,aAAA,CAAA,GAAG,EACI,QAAA,CAAA,EAAA,EAAA,KAAK,EACG,EAAA,YAAA,EAAA,SAAS,EACrB,SAAS,EAAE,yBAAyB,EACpC,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,QAAQ,EACnB,cAAc,EAAC,QAAQ,EACvB,IAAI,EAAC,aAAa,EAAA,CAAA;QAElB,KAAC,CAAA,aAAA,CAAA,OAAO,IAAC,IAAI,EAAE,WAAW,EAAgB,aAAA,EAAA,IAAA,EAAA,CAAA,CACxC,EACT;AACL;;;;"}
package/es/menu/menu.js CHANGED
@@ -1,279 +1,146 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
1
+ import { __rest, __assign } from 'tslib';
2
2
  import * as React from 'react';
3
3
  import classNames from 'classnames';
4
- import { useMenuStore, MenuButton as MenuButton$1, Role, Portal, Menu as Menu$1, MenuItem as MenuItem$1, MenuGroup as MenuGroup$1 } from '@ariakit/react';
4
+ import { MenuButton as MenuButton$1, Role, Portal, Menu as Menu$1, MenuItem as MenuItem$1, MenuGroup as MenuGroup$1, useMenuStore } from '@ariakit/react';
5
5
 
6
- const _excluded = ["children", "onItemSelect"],
7
- _excluded2 = ["exceptionallySetClassName"],
8
- _excluded3 = ["render"],
9
- _excluded4 = ["exceptionallySetClassName", "modal", "flip"],
10
- _excluded5 = ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName"],
11
- _excluded6 = ["label", "children", "exceptionallySetClassName"];
12
- const MenuContext = /*#__PURE__*/React.createContext({
13
- menuStore: null,
14
- handleItemSelect: () => undefined,
15
- getAnchorRect: null,
16
- setAnchorRect: () => undefined
6
+ var MenuContext = React.createContext({
7
+ menuStore: null,
8
+ handleItemSelect: function () { return undefined; },
9
+ getAnchorRect: null,
10
+ setAnchorRect: function () { return undefined; }
17
11
  });
18
- const SubMenuContext = /*#__PURE__*/React.createContext({
19
- isSubMenu: false
20
- });
21
- /**
22
- * Wrapper component to control a menu. It does not render anything, only providing the state
23
- * management for the menu components inside it.
12
+ var SubMenuContext = React.createContext({ isSubMenu: false });
13
+ /**
14
+ * Wrapper component to control a menu. It does not render anything, only providing the state
15
+ * management for the menu components inside it.
24
16
  */
25
-
26
- function Menu(_ref) {
27
- let {
28
- children,
29
- onItemSelect
30
- } = _ref,
31
- props = _objectWithoutProperties(_ref, _excluded);
32
-
33
- const [anchorRect, setAnchorRect] = React.useState(null);
34
- const getAnchorRect = React.useMemo(() => anchorRect ? () => anchorRect : null, [anchorRect]);
35
- const menuStore = useMenuStore(_objectSpread2({
36
- focusLoop: true
37
- }, props));
38
- const value = React.useMemo(() => ({
39
- menuStore,
40
- handleItemSelect: onItemSelect,
41
- getAnchorRect,
42
- setAnchorRect
43
- }), [menuStore, onItemSelect, getAnchorRect, setAnchorRect]);
44
- return /*#__PURE__*/React.createElement(MenuContext.Provider, {
45
- value: value
46
- }, children);
17
+ function Menu(_a) {
18
+ var children = _a.children, onItemSelect = _a.onItemSelect, props = __rest(_a, ["children", "onItemSelect"]);
19
+ var _b = React.useState(null), anchorRect = _b[0], setAnchorRect = _b[1];
20
+ var getAnchorRect = React.useMemo(function () { return (anchorRect ? function () { return anchorRect; } : null); }, [anchorRect]);
21
+ var menuStore = useMenuStore(__assign({ focusLoop: true }, props));
22
+ var value = React.useMemo(function () { return ({ menuStore: menuStore, handleItemSelect: onItemSelect, getAnchorRect: getAnchorRect, setAnchorRect: setAnchorRect }); }, [menuStore, onItemSelect, getAnchorRect, setAnchorRect]);
23
+ return React.createElement(MenuContext.Provider, { value: value }, children);
47
24
  }
48
- /**
49
- * A button to toggle a dropdown menu open or closed.
25
+ /**
26
+ * A button to toggle a dropdown menu open or closed.
50
27
  */
51
-
52
-
53
- const MenuButton = /*#__PURE__*/React.forwardRef(function MenuButton(_ref2, ref) {
54
- let {
55
- exceptionallySetClassName
56
- } = _ref2,
57
- props = _objectWithoutProperties(_ref2, _excluded2);
58
-
59
- const {
60
- menuStore
61
- } = React.useContext(MenuContext);
62
-
63
- if (!menuStore) {
64
- throw new Error('MenuButton must be wrapped in <Menu/>');
65
- }
66
-
67
- return /*#__PURE__*/React.createElement(MenuButton$1, _objectSpread2(_objectSpread2({}, props), {}, {
68
- store: menuStore,
69
- ref: ref,
70
- className: classNames('reactist_menubutton', exceptionallySetClassName)
71
- }));
28
+ var MenuButton = React.forwardRef(function MenuButton(_a, ref) {
29
+ var exceptionallySetClassName = _a.exceptionallySetClassName, props = __rest(_a, ["exceptionallySetClassName"]);
30
+ var menuStore = React.useContext(MenuContext).menuStore;
31
+ if (!menuStore) {
32
+ throw new Error('MenuButton must be wrapped in <Menu/>');
33
+ }
34
+ return (React.createElement(MenuButton$1, __assign({}, props, { store: menuStore, ref: ref, className: classNames('reactist_menubutton', exceptionallySetClassName) })));
72
35
  });
73
- const ContextMenuTrigger = /*#__PURE__*/React.forwardRef(function ContextMenuTrigger(_ref3, ref) {
74
- let {
75
- render
76
- } = _ref3,
77
- props = _objectWithoutProperties(_ref3, _excluded3);
78
-
79
- const {
80
- setAnchorRect,
81
- menuStore
82
- } = React.useContext(MenuContext);
83
-
84
- if (!menuStore) {
85
- throw new Error('ContextMenuTrigger must be wrapped in <Menu/>');
86
- }
87
-
88
- const handleContextMenu = React.useCallback(function handleContextMenu(event) {
89
- event.preventDefault();
90
- setAnchorRect({
91
- x: event.clientX,
92
- y: event.clientY
93
- });
94
- menuStore.show();
95
- }, [setAnchorRect, menuStore]);
96
- const isOpen = menuStore.useState('open');
97
- React.useEffect(() => {
98
- if (!isOpen) setAnchorRect(null);
99
- }, [isOpen, setAnchorRect]);
100
- return /*#__PURE__*/React.createElement(Role.div, _objectSpread2(_objectSpread2({}, props), {}, {
101
- onContextMenu: handleContextMenu,
102
- ref: ref,
103
- render: render
104
- }));
36
+ var ContextMenuTrigger = React.forwardRef(function ContextMenuTrigger(_a, ref) {
37
+ var render = _a.render, props = __rest(_a, ["render"]);
38
+ var _b = React.useContext(MenuContext), setAnchorRect = _b.setAnchorRect, menuStore = _b.menuStore;
39
+ if (!menuStore) {
40
+ throw new Error('ContextMenuTrigger must be wrapped in <Menu/>');
41
+ }
42
+ var handleContextMenu = React.useCallback(function handleContextMenu(event) {
43
+ event.preventDefault();
44
+ setAnchorRect({ x: event.clientX, y: event.clientY });
45
+ menuStore.show();
46
+ }, [setAnchorRect, menuStore]);
47
+ var isOpen = menuStore.useState('open');
48
+ React.useEffect(function () {
49
+ if (!isOpen)
50
+ setAnchorRect(null);
51
+ }, [isOpen, setAnchorRect]);
52
+ return React.createElement(Role.div, __assign({}, props, { onContextMenu: handleContextMenu, ref: ref, render: render }));
105
53
  });
106
- /**
107
- * The dropdown menu itself, containing a list of menu items.
54
+ /**
55
+ * The dropdown menu itself, containing a list of menu items.
108
56
  */
109
-
110
- const MenuList = /*#__PURE__*/React.forwardRef(function MenuList(_ref4, ref) {
111
- let {
112
- exceptionallySetClassName,
113
- modal = true,
114
- flip
115
- } = _ref4,
116
- props = _objectWithoutProperties(_ref4, _excluded4);
117
-
118
- const {
119
- menuStore,
120
- getAnchorRect
121
- } = React.useContext(MenuContext);
122
-
123
- if (!menuStore) {
124
- throw new Error('MenuList must be wrapped in <Menu/>');
125
- }
126
-
127
- const {
128
- isSubMenu
129
- } = React.useContext(SubMenuContext);
130
- const isOpen = menuStore.useState('open');
131
- return isOpen ? /*#__PURE__*/React.createElement(Portal, {
132
- preserveTabOrder: true
133
- }, /*#__PURE__*/React.createElement(Menu$1, _objectSpread2(_objectSpread2({}, props), {}, {
134
- store: menuStore,
135
- gutter: 8,
136
- shift: 4,
137
- ref: ref,
138
- className: classNames('reactist_menulist', exceptionallySetClassName),
139
- getAnchorRect: getAnchorRect != null ? getAnchorRect : undefined,
140
- modal: modal,
141
- flip: flip != null ? flip : isSubMenu ? 'left bottom' : undefined
142
- }))) : null;
57
+ var MenuList = React.forwardRef(function MenuList(_a, ref) {
58
+ var exceptionallySetClassName = _a.exceptionallySetClassName, _b = _a.modal, modal = _b === void 0 ? true : _b, flip = _a.flip, props = __rest(_a, ["exceptionallySetClassName", "modal", "flip"]);
59
+ var _c = React.useContext(MenuContext), menuStore = _c.menuStore, getAnchorRect = _c.getAnchorRect;
60
+ if (!menuStore) {
61
+ throw new Error('MenuList must be wrapped in <Menu/>');
62
+ }
63
+ var isSubMenu = React.useContext(SubMenuContext).isSubMenu;
64
+ var isOpen = menuStore.useState('open');
65
+ return isOpen ? (React.createElement(Portal, { preserveTabOrder: true },
66
+ React.createElement(Menu$1, __assign({}, props, { store: menuStore, gutter: 8, shift: 4, ref: ref, className: classNames('reactist_menulist', exceptionallySetClassName), getAnchorRect: getAnchorRect !== null && getAnchorRect !== void 0 ? getAnchorRect : undefined, modal: modal, flip: flip !== null && flip !== void 0 ? flip : (isSubMenu ? 'left bottom' : undefined) })))) : null;
143
67
  });
144
- /**
145
- * A menu item inside a menu list. It can be selected by the user, triggering the `onSelect`
146
- * callback.
68
+ /**
69
+ * A menu item inside a menu list. It can be selected by the user, triggering the `onSelect`
70
+ * callback.
147
71
  */
148
-
149
- const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(_ref5, ref) {
150
- let {
151
- value,
152
- children,
153
- onSelect,
154
- hideOnSelect = true,
155
- onClick,
156
- exceptionallySetClassName
157
- } = _ref5,
158
- props = _objectWithoutProperties(_ref5, _excluded5);
159
-
160
- const {
161
- handleItemSelect,
162
- menuStore
163
- } = React.useContext(MenuContext);
164
-
165
- if (!menuStore) {
166
- throw new Error('MenuItem must be wrapped in <Menu/>');
167
- }
168
-
169
- const {
170
- hide
171
- } = menuStore;
172
- const handleClick = React.useCallback(function handleClick(event) {
173
- onClick == null ? void 0 : onClick(event);
174
- const onSelectResult = onSelect && !event.defaultPrevented ? onSelect() : undefined;
175
- const shouldClose = onSelectResult !== false && hideOnSelect;
176
- handleItemSelect == null ? void 0 : handleItemSelect(value);
177
- if (shouldClose) hide();
178
- }, [onSelect, onClick, handleItemSelect, hideOnSelect, hide, value]);
179
- return /*#__PURE__*/React.createElement(MenuItem$1, _objectSpread2(_objectSpread2({}, props), {}, {
180
- store: menuStore,
181
- ref: ref,
182
- onClick: handleClick,
183
- className: exceptionallySetClassName,
184
- hideOnClick: false
185
- }), children);
72
+ var MenuItem = React.forwardRef(function MenuItem(_a, ref) {
73
+ var value = _a.value, children = _a.children, onSelect = _a.onSelect, _b = _a.hideOnSelect, hideOnSelect = _b === void 0 ? true : _b, onClick = _a.onClick, exceptionallySetClassName = _a.exceptionallySetClassName, props = __rest(_a, ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName"]);
74
+ var _c = React.useContext(MenuContext), handleItemSelect = _c.handleItemSelect, menuStore = _c.menuStore;
75
+ if (!menuStore) {
76
+ throw new Error('MenuItem must be wrapped in <Menu/>');
77
+ }
78
+ var hide = menuStore.hide;
79
+ var handleClick = React.useCallback(function handleClick(event) {
80
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
81
+ var onSelectResult = onSelect && !event.defaultPrevented ? onSelect() : undefined;
82
+ var shouldClose = onSelectResult !== false && hideOnSelect;
83
+ handleItemSelect === null || handleItemSelect === void 0 ? void 0 : handleItemSelect(value);
84
+ if (shouldClose)
85
+ hide();
86
+ }, [onSelect, onClick, handleItemSelect, hideOnSelect, hide, value]);
87
+ return (React.createElement(MenuItem$1, __assign({}, props, { store: menuStore, ref: ref, onClick: handleClick, className: exceptionallySetClassName, hideOnClick: false }), children));
186
88
  });
187
- /**
188
- * This component can be rendered alongside other `MenuItem` inside a `MenuList` in order to have
189
- * a sub-menu.
190
- *
191
- * Its children are expected to have the structure of a first level menu (a `MenuButton` and a
192
- * `MenuList`).
193
- *
194
- * ```jsx
195
- * <MenuItem label="Edit profile" />
196
- * <SubMenu>
197
- * <MenuButton>More options</MenuButton>
198
- * <MenuList>
199
- * <MenuItem label="Preferences" />
200
- * <MenuItem label="Sign out" />
201
- * </MenuList>
202
- * </SubMenu>
203
- * ```
204
- *
205
- * The `MenuButton` will become a menu item in the current menu items list, and it will lead to
206
- * opening a sub-menu with the menu items list below it.
89
+ /**
90
+ * This component can be rendered alongside other `MenuItem` inside a `MenuList` in order to have
91
+ * a sub-menu.
92
+ *
93
+ * Its children are expected to have the structure of a first level menu (a `MenuButton` and a
94
+ * `MenuList`).
95
+ *
96
+ * ```jsx
97
+ * <MenuItem label="Edit profile" />
98
+ * <SubMenu>
99
+ * <MenuButton>More options</MenuButton>
100
+ * <MenuList>
101
+ * <MenuItem label="Preferences" />
102
+ * <MenuItem label="Sign out" />
103
+ * </MenuList>
104
+ * </SubMenu>
105
+ * ```
106
+ *
107
+ * The `MenuButton` will become a menu item in the current menu items list, and it will lead to
108
+ * opening a sub-menu with the menu items list below it.
207
109
  */
208
-
209
- const SubMenu = /*#__PURE__*/React.forwardRef(function SubMenu({
210
- children,
211
- onItemSelect
212
- }, ref) {
213
- const {
214
- handleItemSelect: parentMenuItemSelect,
215
- menuStore
216
- } = React.useContext(MenuContext);
217
-
218
- if (!menuStore) {
219
- throw new Error('SubMenu must be wrapped in <Menu/>');
220
- }
221
-
222
- const {
223
- hide: parentMenuHide
224
- } = menuStore;
225
- const handleSubItemSelect = React.useCallback(function handleSubItemSelect(value) {
226
- onItemSelect == null ? void 0 : onItemSelect(value);
227
- parentMenuItemSelect == null ? void 0 : parentMenuItemSelect(value);
228
- parentMenuHide();
229
- }, [parentMenuHide, parentMenuItemSelect, onItemSelect]);
230
- const [button, list] = React.Children.toArray(children);
231
- const buttonElement = button;
232
- const subMenuContextValue = React.useMemo(() => ({
233
- isSubMenu: true
234
- }), []);
235
- return /*#__PURE__*/React.createElement(Menu, {
236
- onItemSelect: handleSubItemSelect
237
- }, /*#__PURE__*/React.createElement(MenuItem$1, {
238
- store: menuStore,
239
- ref: ref,
240
- hideOnClick: false,
241
- render: buttonElement
242
- }, buttonElement.props.children), /*#__PURE__*/React.createElement(SubMenuContext.Provider, {
243
- value: subMenuContextValue
244
- }, list));
110
+ var SubMenu = React.forwardRef(function SubMenu(_a, ref) {
111
+ var children = _a.children, onItemSelect = _a.onItemSelect;
112
+ var _b = React.useContext(MenuContext), parentMenuItemSelect = _b.handleItemSelect, menuStore = _b.menuStore;
113
+ if (!menuStore) {
114
+ throw new Error('SubMenu must be wrapped in <Menu/>');
115
+ }
116
+ var parentMenuHide = menuStore.hide;
117
+ var handleSubItemSelect = React.useCallback(function handleSubItemSelect(value) {
118
+ onItemSelect === null || onItemSelect === void 0 ? void 0 : onItemSelect(value);
119
+ parentMenuItemSelect === null || parentMenuItemSelect === void 0 ? void 0 : parentMenuItemSelect(value);
120
+ parentMenuHide();
121
+ }, [parentMenuHide, parentMenuItemSelect, onItemSelect]);
122
+ var _c = React.Children.toArray(children), button = _c[0], list = _c[1];
123
+ var buttonElement = button;
124
+ var subMenuContextValue = React.useMemo(function () { return ({ isSubMenu: true }); }, []);
125
+ return (React.createElement(Menu, { onItemSelect: handleSubItemSelect },
126
+ React.createElement(MenuItem$1, { store: menuStore, ref: ref, hideOnClick: false, render: buttonElement }, buttonElement.props.children),
127
+ React.createElement(SubMenuContext.Provider, { value: subMenuContextValue }, list)));
245
128
  });
246
- /**
247
- * A way to semantically group some menu items.
248
- *
249
- * This group does not add any visual separator. You can do that yourself adding `<hr />` elements
250
- * before and/or after the group if you so wish.
129
+ /**
130
+ * A way to semantically group some menu items.
131
+ *
132
+ * This group does not add any visual separator. You can do that yourself adding `<hr />` elements
133
+ * before and/or after the group if you so wish.
251
134
  */
252
-
253
- const MenuGroup = /*#__PURE__*/React.forwardRef(function MenuGroup(_ref6, ref) {
254
- let {
255
- label,
256
- children,
257
- exceptionallySetClassName
258
- } = _ref6,
259
- props = _objectWithoutProperties(_ref6, _excluded6);
260
-
261
- const {
262
- menuStore
263
- } = React.useContext(MenuContext);
264
-
265
- if (!menuStore) {
266
- throw new Error('MenuGroup must be wrapped in <Menu/>');
267
- }
268
-
269
- return /*#__PURE__*/React.createElement(MenuGroup$1, _objectSpread2(_objectSpread2({}, props), {}, {
270
- ref: ref,
271
- store: menuStore,
272
- className: exceptionallySetClassName
273
- }), label ? /*#__PURE__*/React.createElement("div", {
274
- role: "presentation",
275
- className: "reactist_menugroup__label"
276
- }, label) : null, children);
135
+ var MenuGroup = React.forwardRef(function MenuGroup(_a, ref) {
136
+ var label = _a.label, children = _a.children, exceptionallySetClassName = _a.exceptionallySetClassName, props = __rest(_a, ["label", "children", "exceptionallySetClassName"]);
137
+ var menuStore = React.useContext(MenuContext).menuStore;
138
+ if (!menuStore) {
139
+ throw new Error('MenuGroup must be wrapped in <Menu/>');
140
+ }
141
+ return (React.createElement(MenuGroup$1, __assign({}, props, { ref: ref, store: menuStore, className: exceptionallySetClassName }),
142
+ label ? (React.createElement("div", { role: "presentation", className: "reactist_menugroup__label" }, label)) : null,
143
+ children));
277
144
  });
278
145
 
279
146
  export { ContextMenuTrigger, Menu, MenuButton, MenuGroup, MenuItem, MenuList, SubMenu };