@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,2 +1,37 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./spinner.module.css.js");function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,t}var a=r(e);exports.Spinner=function({size:e=18}){return a.createElement("svg",{"aria-hidden":!0,width:e,height:e,viewBox:"0 0 24 24",className:t.default.svg,"data-chromatic":"ignore"},a.createElement("g",{fill:"none",fillRule:"nonzero"},a.createElement("path",{className:t.default.tint,d:"M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z"}),a.createElement("path",{className:t.default.fill,d:"M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z"})))};
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var spinner_module = require('./spinner.module.css.js');
7
+
8
+ function _interopNamespace(e) {
9
+ if (e && e.__esModule) return e;
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n["default"] = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
27
+
28
+ function Spinner(_a) {
29
+ var _b = _a.size, size = _b === void 0 ? 18 : _b;
30
+ return (React__namespace.createElement("svg", { "aria-hidden": true, width: size, height: size, viewBox: "0 0 24 24", className: spinner_module["default"].svg, "data-chromatic": "ignore" },
31
+ React__namespace.createElement("g", { fill: "none", fillRule: "nonzero" },
32
+ React__namespace.createElement("path", { className: spinner_module["default"].tint, d: "M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z" }),
33
+ React__namespace.createElement("path", { className: spinner_module["default"].fill, d: "M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z" }))));
34
+ }
35
+
36
+ exports.Spinner = Spinner;
2
37
  //# sourceMappingURL=spinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.js","sources":["../../src/spinner/spinner.tsx"],"sourcesContent":["import * as React from 'react'\nimport styles from './spinner.module.css'\n\nfunction Spinner({ size = 18 }: { size?: number }) {\n return (\n <svg\n aria-hidden\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n className={styles.svg}\n data-chromatic=\"ignore\"\n >\n <g fill=\"none\" fillRule=\"nonzero\">\n <path\n className={styles.tint}\n d=\"M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z\"\n />\n <path\n className={styles.fill}\n d=\"M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z\"\n />\n </g>\n </svg>\n )\n}\n\nexport { Spinner }\n"],"names":["size","React","width","height","viewBox","className","styles","svg","createElement","fill","fillRule","tint","d"],"mappings":"2aAGA,UAAiBA,KAAEA,EAAO,KACtB,OACIC,wCAEIC,MAAOF,EACPG,OAAQH,EACRI,QAAQ,YACRC,UAAWC,EAAM,QAACC,qBACH,UAEfN,EAAAO,cAAA,IAAA,CAAGC,KAAK,OAAOC,SAAS,WACpBT,EACIO,cAAA,OAAA,CAAAH,UAAWC,EAAM,QAACK,KAClBC,EAAE,iJAENX,EAAAO,cAAA,OAAA,CACIH,UAAWC,EAAM,QAACG,KAClBG,EAAE"}
1
+ {"version":3,"file":"spinner.js","sources":["../../src/spinner/spinner.tsx"],"sourcesContent":[null],"names":["React","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,SAAS,OAAO,CAAC,EAAgC,EAAA;AAA9B,IAAA,IAAA,EAAA,GAAA,EAAA,CAAA,IAAS,EAAT,IAAI,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,EAAE,GAAA,EAAA,CAAA;IACxB,QACIA,6DAEI,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,OAAO,EAAC,WAAW,EACnB,SAAS,EAAEC,yBAAM,CAAC,GAAG,oBACN,QAAQ,EAAA;AAEvB,QAAAD,gBAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS,EAAA;YAC7BA,gBACI,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAEC,yBAAM,CAAC,IAAI,EACtB,CAAC,EAAC,8IAA8I,EAClJ,CAAA;AACF,YAAAD,gBAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACI,SAAS,EAAEC,yBAAM,CAAC,IAAI,EACtB,CAAC,EAAC,2NAA2N,EAAA,CAC/N,CACF,CACF,EACT;AACL;;;;"}
@@ -1,2 +1,8 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={svg:"_51539197",spinner:"_54fbe2b3",tint:"a0c466ed",fill:"_745b73d3"};
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var modules_c7f5018f = {"svg":"_51539197","spinner":"_54fbe2b3","tint":"a0c466ed","fill":"_745b73d3"};
6
+
7
+ exports["default"] = modules_c7f5018f;
2
8
  //# sourceMappingURL=spinner.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"spinner.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +1 @@
1
- export * from './stack';
1
+ export * from './stack';
@@ -1,15 +1,15 @@
1
- import type { ResponsiveProp } from '../utils/responsive-props';
2
- import type { DividerWeight, Space } from '../utils/common-types';
3
- import type { ReusableBoxProps } from '../box';
4
- type Align = 'start' | 'center' | 'end';
5
- interface StackProps extends ReusableBoxProps {
6
- /** Space between items */
7
- space?: ResponsiveProp<Space>;
8
- /** Align items horizontally */
9
- align?: ResponsiveProp<Align>;
10
- /** The weight of the dividers to add. Defaults to 'none', which means no dividers are added */
11
- dividers?: DividerWeight;
12
- }
13
- declare const Stack: import("../utils/polymorphism").PolymorphicComponent<"div", StackProps, "obfuscateClassName">;
14
- export type { StackProps };
15
- export { Stack };
1
+ import type { ResponsiveProp } from '../utils/responsive-props';
2
+ import type { DividerWeight, Space } from '../utils/common-types';
3
+ import type { ReusableBoxProps } from '../box';
4
+ type Align = 'start' | 'center' | 'end';
5
+ interface StackProps extends ReusableBoxProps {
6
+ /** Space between items */
7
+ space?: ResponsiveProp<Space>;
8
+ /** Align items horizontally */
9
+ align?: ResponsiveProp<Align>;
10
+ /** The weight of the dividers to add. Defaults to 'none', which means no dividers are added */
11
+ dividers?: DividerWeight;
12
+ }
13
+ declare const Stack: import("../utils/polymorphism").PolymorphicComponent<"div", StackProps, "obfuscateClassName">;
14
+ export type { StackProps };
15
+ export { Stack };
@@ -1,2 +1,53 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),t=require("react-keyed-flatten-children"),i=require("../utils/polymorphism.js"),n=require("../utils/responsive-props.js"),l=require("../box/box.js"),a=require("../divider/divider.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,r}var c=s(r),u=o(t);const d=["as","space","align","dividers","width","children","exceptionallySetClassName"];exports.Stack=i.polymorphicComponent((function(r,t){let{as:i,space:o,align:s,dividers:p="none",width:f="full",children:m,exceptionallySetClassName:v}=r,j=e.objectWithoutProperties(r,d);const b=void 0===s?void 0:n.mapResponsiveProp(s,e=>"start"===e?"flexStart":"end"===e?"flexEnd":"center");return c.createElement(l.Box,e.objectSpread2(e.objectSpread2({},j),{},{display:"flex",flexDirection:"column",width:f,alignItems:b,gap:o,as:i,className:v,ref:t}),"none"!==p?c.Children.map(u.default(m),(e,r)=>r>0?c.createElement(c.Fragment,null,c.createElement(a.Divider,{weight:p}),e):e):m)}));
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var React = require('react');
7
+ var flattenChildren = require('react-keyed-flatten-children');
8
+ var polymorphism = require('../utils/polymorphism.js');
9
+ var responsiveProps = require('../utils/responsive-props.js');
10
+ var box = require('../box/box.js');
11
+ var divider = require('../divider/divider.js');
12
+
13
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
+
15
+ function _interopNamespace(e) {
16
+ if (e && e.__esModule) return e;
17
+ var n = Object.create(null);
18
+ if (e) {
19
+ Object.keys(e).forEach(function (k) {
20
+ if (k !== 'default') {
21
+ var d = Object.getOwnPropertyDescriptor(e, k);
22
+ Object.defineProperty(n, k, d.get ? d : {
23
+ enumerable: true,
24
+ get: function () { return e[k]; }
25
+ });
26
+ }
27
+ });
28
+ }
29
+ n["default"] = e;
30
+ return Object.freeze(n);
31
+ }
32
+
33
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
34
+ var flattenChildren__default = /*#__PURE__*/_interopDefaultLegacy(flattenChildren);
35
+
36
+ var Stack = polymorphism.polymorphicComponent(function Stack(_a, ref) {
37
+ var as = _a.as, space = _a.space, align = _a.align, _b = _a.dividers, dividers = _b === void 0 ? 'none' : _b, _c = _a.width, width = _c === void 0 ? 'full' : _c, children = _a.children, exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["as", "space", "align", "dividers", "width", "children", "exceptionallySetClassName"]);
38
+ var alignItems = align === undefined
39
+ ? undefined
40
+ : responsiveProps.mapResponsiveProp(align, function (align) {
41
+ return align === 'start' ? 'flexStart' : align === 'end' ? 'flexEnd' : 'center';
42
+ });
43
+ return (React__namespace.createElement(box.Box, tslib.__assign({}, props, { display: "flex", flexDirection: "column", width: width, alignItems: alignItems, gap: space, as: as, className: exceptionallySetClassName, ref: ref }), dividers !== 'none'
44
+ ? React__namespace.Children.map(flattenChildren__default["default"](children), function (child, index) {
45
+ return index > 0 ? (React__namespace.createElement(React__namespace.Fragment, null,
46
+ React__namespace.createElement(divider.Divider, { weight: dividers }),
47
+ child)) : (child);
48
+ })
49
+ : children));
50
+ });
51
+
52
+ exports.Stack = Stack;
2
53
  //# sourceMappingURL=stack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack.js","sources":["../../src/stack/stack.tsx"],"sourcesContent":["import * as React from 'react'\nimport flattenChildren from 'react-keyed-flatten-children'\nimport { polymorphicComponent } from '../utils/polymorphism'\nimport { mapResponsiveProp } from '../utils/responsive-props'\nimport { Box } from '../box'\nimport { Divider } from '../divider'\n\nimport type { ResponsiveProp } from '../utils/responsive-props'\nimport type { DividerWeight, Space } from '../utils/common-types'\nimport type { BoxProps, ReusableBoxProps } from '../box'\n\ntype Align = 'start' | 'center' | 'end'\n\ninterface StackProps extends ReusableBoxProps {\n /** Space between items */\n space?: ResponsiveProp<Space>\n /** Align items horizontally */\n align?: ResponsiveProp<Align>\n /** The weight of the dividers to add. Defaults to 'none', which means no dividers are added */\n dividers?: DividerWeight\n}\n\nconst Stack = polymorphicComponent<'div', StackProps>(function Stack(\n {\n as,\n space,\n align,\n dividers = 'none',\n width = 'full',\n children,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n const alignItems: BoxProps['alignItems'] =\n align === undefined\n ? undefined\n : mapResponsiveProp(align, (align) =>\n align === 'start' ? 'flexStart' : align === 'end' ? 'flexEnd' : 'center',\n )\n\n return (\n <Box\n {...props}\n display=\"flex\"\n flexDirection=\"column\"\n width={width}\n alignItems={alignItems}\n gap={space}\n as={as}\n className={exceptionallySetClassName}\n ref={ref}\n >\n {dividers !== 'none'\n ? React.Children.map(flattenChildren(children), (child, index) =>\n index > 0 ? (\n <>\n <Divider weight={dividers} />\n {child}\n </>\n ) : (\n child\n ),\n )\n : children}\n </Box>\n )\n})\n\nexport type { StackProps }\nexport { Stack }\n"],"names":["polymorphicComponent","_ref","ref","as","space","align","dividers","width","children","exceptionallySetClassName","props","_objectWithoutProperties","objectWithoutProperties","_excluded","alignItems","undefined","mapResponsiveProp","React","createElement","Box","display","flexDirection","gap","className","Children","map","flattenChildren","child","index","Fragment","Divider","weight"],"mappings":"0xBAsBcA,EAAAA,sBAAwC,SAAAC,EAWlDC,GAAG,IAVHC,GACIA,EADJC,MAEIA,EAFJC,MAGIA,EAHJC,SAIIA,EAAW,OAJfC,MAKIA,EAAQ,OALZC,SAMIA,EANJC,0BAOIA,GAGDR,EAFIS,EAEJC,EAAAC,wBAAAX,EAAAY,GAEH,MAAMC,OACQC,IAAVV,OACMU,EACAC,EAAAA,kBAAkBX,EAAQA,GACZ,UAAVA,EAAoB,YAAwB,QAAVA,EAAkB,UAAY,UAG9E,OACIY,EAACC,cAAAC,yCACOT,GADR,GAAA,CAEIU,QAAQ,OACRC,cAAc,SACdd,MAAOA,EACPO,WAAYA,EACZQ,IAAKlB,EACLD,GAAIA,EACJoB,UAAWd,EACXP,IAAKA,IAES,SAAbI,EACKW,EAAMO,SAASC,IAAIC,EAAe,QAAClB,GAAW,CAACmB,EAAOC,IAClDA,EAAQ,EACJX,EAAAC,cAAAD,EAAAY,SAAA,KACIZ,EAAAC,cAACY,UAAO,CAACC,OAAQzB,IAChBqB,GAGLA,GAGRnB"}
1
+ {"version":3,"file":"stack.js","sources":["../../src/stack/stack.tsx"],"sourcesContent":[null],"names":["polymorphicComponent","__rest","mapResponsiveProp","React","Box","flattenChildren","Divider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBM,IAAA,KAAK,GAAGA,iCAAoB,CAAoB,SAAS,KAAK,CAChE,EASC,EACD,GAAG,EAAA;AATC,IAAA,IAAA,EAAE,GAAA,EAAA,CAAA,EAAA,EACF,KAAK,WAAA,EACL,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,EAAiB,GAAA,EAAA,CAAA,QAAA,EAAjB,QAAQ,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,MAAM,GAAA,EAAA,EACjB,EAAc,GAAA,EAAA,CAAA,KAAA,EAAd,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,MAAM,GAAA,EAAA,EACd,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,yBAAyB,GAAA,EAAA,CAAA,yBAAA,EACtB,KAAK,GAAAC,YAAA,CAAA,EAAA,EARZ,sFASC,CADW,CAAA;AAIZ,IAAA,IAAM,UAAU,GACZ,KAAK,KAAK,SAAS;AACf,UAAE,SAAS;AACX,UAAEC,iCAAiB,CAAC,KAAK,EAAE,UAAC,KAAK,EAAA;YAC3B,OAAA,KAAK,KAAK,OAAO,GAAG,WAAW,GAAG,KAAK,KAAK,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAA;AAAxE,SAAwE,CAC3E,CAAA;AAEX,IAAA,QACIC,gBAAC,CAAA,aAAA,CAAAC,OAAG,qBACI,KAAK,EAAA,EACT,OAAO,EAAC,MAAM,EACd,aAAa,EAAC,QAAQ,EACtB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,KAAK,EACV,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,yBAAyB,EACpC,GAAG,EAAE,GAAG,EAEP,CAAA,EAAA,QAAQ,KAAK,MAAM;AAChB,UAAED,gBAAK,CAAC,QAAQ,CAAC,GAAG,CAACE,mCAAe,CAAC,QAAQ,CAAC,EAAE,UAAC,KAAK,EAAE,KAAK,EAAA;AACvD,YAAA,OAAA,KAAK,GAAG,CAAC,IACLF,gBAAA,CAAA,aAAA,CAAAA,gBAAA,CAAA,QAAA,EAAA,IAAA;AACI,gBAAAA,gBAAA,CAAA,aAAA,CAACG,eAAO,EAAA,EAAC,MAAM,EAAE,QAAQ,EAAI,CAAA;AAC5B,gBAAA,KAAK,CACP,KAEH,KAAK,CACR,CAAA;AAPD,SAOC,CACJ;AACH,UAAE,QAAQ,CACZ,EACT;AACL,CAAC;;;;"}
@@ -1 +1 @@
1
- export * from './switch-field';
1
+ export * from './switch-field';
@@ -1,19 +1,19 @@
1
- import * as React from 'react';
2
- import { FieldComponentProps } from '../base-field';
3
- interface SwitchFieldProps extends Omit<FieldComponentProps<HTMLInputElement>, 'type' | 'auxiliaryLabel' | 'maxWidth' | 'aria-describedby' | 'aria-label' | 'aria-labelledby'> {
4
- /**
5
- * Identifies the element (or elements) that describes the switch for assistive technologies.
6
- */
7
- 'aria-describedby'?: string;
8
- /**
9
- * Defines a string value that labels the current switch for assistive technologies.
10
- */
11
- 'aria-label'?: string;
12
- /**
13
- * Identifies the element (or elements) that labels the current switch for assistive technologies.
14
- */
15
- 'aria-labelledby'?: string;
16
- }
17
- declare const SwitchField: React.ForwardRefExoticComponent<Omit<SwitchFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
18
- export { SwitchField };
19
- export type { SwitchFieldProps };
1
+ import * as React from 'react';
2
+ import { FieldComponentProps } from '../base-field';
3
+ interface SwitchFieldProps extends Omit<FieldComponentProps<HTMLInputElement>, 'type' | 'auxiliaryLabel' | 'maxWidth' | 'aria-describedby' | 'aria-label' | 'aria-labelledby'> {
4
+ /**
5
+ * Identifies the element (or elements) that describes the switch for assistive technologies.
6
+ */
7
+ 'aria-describedby'?: string;
8
+ /**
9
+ * Defines a string value that labels the current switch for assistive technologies.
10
+ */
11
+ 'aria-label'?: string;
12
+ /**
13
+ * Identifies the element (or elements) that labels the current switch for assistive technologies.
14
+ */
15
+ 'aria-labelledby'?: string;
16
+ }
17
+ declare const SwitchField: React.ForwardRefExoticComponent<Omit<SwitchFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
18
+ export { SwitchField };
19
+ export type { SwitchFieldProps };
@@ -1,2 +1,75 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),a=require("../box/box.js"),t=require("../stack/stack.js"),r=require("../text/text.js"),n=require("../hidden-visually/hidden-visually.js"),i=require("../base-field/base-field.js"),d=require("../utils/common-helpers.js"),u=require("./switch-field.module.css.js");function s(e){if(e&&e.__esModule)return e;var l=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var t=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(l,a,t.get?t:{enumerable:!0,get:function(){return e[a]}})}})),l.default=e,l}var c=s(l);const o=["label","message","tone","disabled","hidden","defaultChecked","id","aria-describedby","aria-label","aria-labelledby","onChange"];exports.SwitchField=c.forwardRef((function(l,s){var b,f,h;let{label:p,message:m,tone:y="neutral",disabled:g=!1,hidden:j,defaultChecked:v,id:k,"aria-describedby":x,"aria-label":q,"aria-labelledby":E,onChange:S}=l,B=e.objectWithoutProperties(l,o);const C=d.useId(k),O=d.useId(),P=null!=x?x:m?O:void 0,_=null!=q?q:void 0,w=null!=E?E:void 0,[N,F]=c.useState(!1),[I,K]=c.useState(null!=(b=null!=(f=B.checked)?f:v)&&b),M=null!=(h=B.checked)?h:I;return c.createElement(t.Stack,{space:"small",hidden:j},c.createElement(a.Box,{className:[u.default.container,g?u.default.disabled:null,M?u.default.checked:null,N?u.default.keyFocused:null],as:"label",display:"flex",alignItems:"center"},c.createElement(a.Box,{position:"relative",display:"inlineBlock",overflow:"visible",marginRight:"small",flexShrink:0,className:u.default.toggle},c.createElement(n.HiddenVisually,null,c.createElement("input",e.objectSpread2(e.objectSpread2({},B),{},{id:C,type:"checkbox",disabled:g,"aria-describedby":P,"aria-label":_,"aria-labelledby":w,ref:s,checked:M,onChange:e=>{null==S||S(e),e.defaultPrevented||K(e.currentTarget.checked)},onBlur:e=>{F(!1),null==B||null==B.onBlur||B.onBlur(e)},onKeyUp:e=>{F(!0),null==B||null==B.onKeyUp||B.onKeyUp(e)}}))),c.createElement("span",{className:u.default.handle})),c.createElement(r.Text,{exceptionallySetClassName:u.default.label},p)),m?c.createElement(i.FieldMessage,{id:O,tone:y},m):null)}));
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var React = require('react');
7
+ var box = require('../box/box.js');
8
+ var stack = require('../stack/stack.js');
9
+ var text = require('../text/text.js');
10
+ var hiddenVisually = require('../hidden-visually/hidden-visually.js');
11
+ var baseField = require('../base-field/base-field.js');
12
+ var commonHelpers = require('../utils/common-helpers.js');
13
+ var switchField_module = require('./switch-field.module.css.js');
14
+
15
+ function _interopNamespace(e) {
16
+ if (e && e.__esModule) return e;
17
+ var n = Object.create(null);
18
+ if (e) {
19
+ Object.keys(e).forEach(function (k) {
20
+ if (k !== 'default') {
21
+ var d = Object.getOwnPropertyDescriptor(e, k);
22
+ Object.defineProperty(n, k, d.get ? d : {
23
+ enumerable: true,
24
+ get: function () { return e[k]; }
25
+ });
26
+ }
27
+ });
28
+ }
29
+ n["default"] = e;
30
+ return Object.freeze(n);
31
+ }
32
+
33
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
34
+
35
+ var SwitchField = React__namespace.forwardRef(function SwitchField(_a, ref) {
36
+ var _b, _c, _d;
37
+ var label = _a.label, message = _a.message, _e = _a.tone, tone = _e === void 0 ? 'neutral' : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, hidden = _a.hidden, defaultChecked = _a.defaultChecked, originalId = _a.id, originalAriaDescribedBy = _a["aria-describedby"], originalAriaLabel = _a["aria-label"], originalAriaLabelledby = _a["aria-labelledby"], onChange = _a.onChange, props = tslib.__rest(_a, ["label", "message", "tone", "disabled", "hidden", "defaultChecked", "id", 'aria-describedby', 'aria-label', 'aria-labelledby', "onChange"]);
38
+ var id = commonHelpers.useId(originalId);
39
+ var messageId = commonHelpers.useId();
40
+ var ariaDescribedBy = originalAriaDescribedBy !== null && originalAriaDescribedBy !== void 0 ? originalAriaDescribedBy : (message ? messageId : undefined);
41
+ var ariaLabel = originalAriaLabel !== null && originalAriaLabel !== void 0 ? originalAriaLabel : undefined;
42
+ var ariaLabelledBy = originalAriaLabelledby !== null && originalAriaLabelledby !== void 0 ? originalAriaLabelledby : undefined;
43
+ var _g = React__namespace.useState(false), keyFocused = _g[0], setKeyFocused = _g[1];
44
+ var _h = React__namespace.useState((_c = (_b = props.checked) !== null && _b !== void 0 ? _b : defaultChecked) !== null && _c !== void 0 ? _c : false), checkedState = _h[0], setChecked = _h[1];
45
+ var isChecked = (_d = props.checked) !== null && _d !== void 0 ? _d : checkedState;
46
+ return (React__namespace.createElement(stack.Stack, { space: "small", hidden: hidden },
47
+ React__namespace.createElement(box.Box, { className: [
48
+ switchField_module["default"].container,
49
+ disabled ? switchField_module["default"].disabled : null,
50
+ isChecked ? switchField_module["default"].checked : null,
51
+ keyFocused ? switchField_module["default"].keyFocused : null,
52
+ ], as: "label", display: "flex", alignItems: "center" },
53
+ React__namespace.createElement(box.Box, { position: "relative", display: "inlineBlock", overflow: "visible", marginRight: "small", flexShrink: 0, className: switchField_module["default"].toggle },
54
+ React__namespace.createElement(hiddenVisually.HiddenVisually, null,
55
+ React__namespace.createElement("input", tslib.__assign({}, props, { id: id, type: "checkbox", disabled: disabled, "aria-describedby": ariaDescribedBy, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ref: ref, checked: isChecked, onChange: function (event) {
56
+ onChange === null || onChange === void 0 ? void 0 : onChange(event);
57
+ if (!event.defaultPrevented) {
58
+ setChecked(event.currentTarget.checked);
59
+ }
60
+ }, onBlur: function (event) {
61
+ var _a;
62
+ setKeyFocused(false);
63
+ (_a = props === null || props === void 0 ? void 0 : props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, event);
64
+ }, onKeyUp: function (event) {
65
+ var _a;
66
+ setKeyFocused(true);
67
+ (_a = props === null || props === void 0 ? void 0 : props.onKeyUp) === null || _a === void 0 ? void 0 : _a.call(props, event);
68
+ } }))),
69
+ React__namespace.createElement("span", { className: switchField_module["default"].handle })),
70
+ React__namespace.createElement(text.Text, { exceptionallySetClassName: switchField_module["default"].label }, label)),
71
+ message ? (React__namespace.createElement(baseField.FieldMessage, { id: messageId, tone: tone }, message)) : null));
72
+ });
73
+
74
+ exports.SwitchField = SwitchField;
2
75
  //# sourceMappingURL=switch-field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch-field.js","sources":["../../src/switch-field/switch-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { Stack } from '../stack'\nimport { Text } from '../text'\nimport { HiddenVisually } from '../hidden-visually'\nimport { FieldComponentProps, FieldMessage } from '../base-field'\nimport { useId } from '../utils/common-helpers'\nimport styles from './switch-field.module.css'\n\ninterface SwitchFieldProps\n extends Omit<\n FieldComponentProps<HTMLInputElement>,\n | 'type'\n | 'auxiliaryLabel'\n | 'maxWidth'\n | 'aria-describedby'\n | 'aria-label'\n | 'aria-labelledby'\n > {\n /**\n * Identifies the element (or elements) that describes the switch for assistive technologies.\n */\n 'aria-describedby'?: string\n\n /**\n * Defines a string value that labels the current switch for assistive technologies.\n */\n 'aria-label'?: string\n\n /**\n * Identifies the element (or elements) that labels the current switch for assistive technologies.\n */\n 'aria-labelledby'?: string\n}\n\nconst SwitchField = React.forwardRef<HTMLInputElement, SwitchFieldProps>(function SwitchField(\n {\n label,\n message,\n tone = 'neutral',\n disabled = false,\n hidden,\n defaultChecked,\n id: originalId,\n 'aria-describedby': originalAriaDescribedBy,\n 'aria-label': originalAriaLabel,\n 'aria-labelledby': originalAriaLabelledby,\n onChange,\n ...props\n },\n ref,\n) {\n const id = useId(originalId)\n const messageId = useId()\n\n const ariaDescribedBy = originalAriaDescribedBy ?? (message ? messageId : undefined)\n const ariaLabel = originalAriaLabel ?? undefined\n const ariaLabelledBy = originalAriaLabelledby ?? undefined\n\n const [keyFocused, setKeyFocused] = React.useState(false)\n const [checkedState, setChecked] = React.useState(props.checked ?? defaultChecked ?? false)\n const isChecked = props.checked ?? checkedState\n\n return (\n <Stack space=\"small\" hidden={hidden}>\n <Box\n className={[\n styles.container,\n disabled ? styles.disabled : null,\n isChecked ? styles.checked : null,\n keyFocused ? styles.keyFocused : null,\n ]}\n as=\"label\"\n display=\"flex\"\n alignItems=\"center\"\n >\n <Box\n position=\"relative\"\n display=\"inlineBlock\"\n overflow=\"visible\"\n marginRight=\"small\"\n flexShrink={0}\n className={styles.toggle}\n >\n <HiddenVisually>\n <input\n {...props}\n id={id}\n type=\"checkbox\"\n disabled={disabled}\n aria-describedby={ariaDescribedBy}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n ref={ref}\n checked={isChecked}\n onChange={(event) => {\n onChange?.(event)\n if (!event.defaultPrevented) {\n setChecked(event.currentTarget.checked)\n }\n }}\n onBlur={(event) => {\n setKeyFocused(false)\n props?.onBlur?.(event)\n }}\n onKeyUp={(event) => {\n setKeyFocused(true)\n props?.onKeyUp?.(event)\n }}\n />\n </HiddenVisually>\n <span className={styles.handle} />\n </Box>\n <Text exceptionallySetClassName={styles.label}>{label}</Text>\n </Box>\n {message ? (\n <FieldMessage id={messageId} tone={tone}>\n {message}\n </FieldMessage>\n ) : null}\n </Stack>\n )\n})\n\nexport { SwitchField }\nexport type { SwitchFieldProps }\n"],"names":["React","forwardRef","ref","_ref2","_props$checked","_props$checked2","label","message","tone","disabled","hidden","defaultChecked","id","originalId","aria-describedby","originalAriaDescribedBy","aria-label","originalAriaLabel","aria-labelledby","originalAriaLabelledby","onChange","_ref","props","_objectWithoutProperties","objectWithoutProperties","_excluded","useId","messageId","ariaDescribedBy","undefined","ariaLabel","ariaLabelledBy","keyFocused","setKeyFocused","useState","checkedState","setChecked","checked","isChecked","createElement","Stack","space","Box","className","styles","container","as","display","alignItems","position","overflow","marginRight","flexShrink","toggle","HiddenVisually","type","event","defaultPrevented","currentTarget","onBlur","onKeyUp","handle","Text","exceptionallySetClassName","FieldMessage"],"mappings":"+0BAmCoBA,EAAMC,YAA+C,SAerEC,EAAAA,GAAG,IAAAC,EAAAC,EAAAC,EAAA,IAdHC,MACIA,EADJC,QAEIA,EAFJC,KAGIA,EAAO,UAHXC,SAIIA,GAAW,EAJfC,OAKIA,EALJC,eAMIA,EACAC,GAAIC,EACJC,mBAAoBC,EACpBC,aAAcC,EACdC,kBAAmBC,EAVvBC,SAWIA,GAGDC,EAFIC,EAEJC,EAAAC,wBAAAH,EAAAI,GAEH,MAAMb,EAAKc,QAAMb,GACXc,EAAYD,EAAAA,QAEZE,EAAkBb,MAAAA,EAAAA,EAA4BR,EAAUoB,OAAYE,EACpEC,EAAYb,MAAAA,EAAAA,OAAqBY,EACjCE,EAAiBZ,MAAAA,EAAAA,OAA0BU,GAE1CG,EAAYC,GAAiBjC,EAAMkC,UAAS,IAC5CC,EAAcC,GAAcpC,EAAMkC,SAAN,OAAeZ,EAAf,OAAeA,EAAAA,EAAMe,SAArBjC,EAAgCO,IAAhCR,GAC7BmC,SAAYhB,EAAAA,EAAMe,WAAWF,EAEnC,OACInC,EAACuC,cAAAC,QAAM,CAAAC,MAAM,QAAQ/B,OAAQA,GACzBV,EAACuC,cAAAG,MACG,CAAAC,UAAW,CACPC,EAAAA,QAAOC,UACPpC,EAAWmC,EAAAA,QAAOnC,SAAW,KAC7B6B,EAAYM,EAAM,QAACP,QAAU,KAC7BL,EAAaY,EAAM,QAACZ,WAAa,MAErCc,GAAG,QACHC,QAAQ,OACRC,WAAW,UAEXhD,EAACuC,cAAAG,MACG,CAAAO,SAAS,WACTF,QAAQ,cACRG,SAAS,UACTC,YAAY,QACZC,WAAY,EACZT,UAAWC,EAAM,QAACS,QAElBrD,EAAAuC,cAACe,iBAAc,KACXtD,EAAAuC,cAAA,2CACQjB,GADR,GAAA,CAEIV,GAAIA,EACJ2C,KAAK,WACL9C,SAAUA,qBACQmB,EAAeZ,aACrBc,EAASZ,kBACJa,EACjB7B,IAAKA,EACLmC,QAASC,EACTlB,SAAWoC,IACP,MAAApC,GAAAA,EAAWoC,GACNA,EAAMC,kBACPrB,EAAWoB,EAAME,cAAcrB,UAGvCsB,OAASH,IACLvB,GAAc,GACT,MAALX,SAAAA,EAAOqC,QAAPrC,EAAOqC,OAASH,IAEpBI,QAAUJ,IACNvB,GAAc,GACT,MAALX,SAAAA,EAAOsC,SAAPtC,EAAOsC,QAAUJ,QAI7BxD,EAAAuC,cAAA,OAAA,CAAMI,UAAWC,EAAM,QAACiB,UAE5B7D,EAACuC,cAAAuB,OAAK,CAAAC,0BAA2BnB,EAAM,QAACtC,OAAQA,IAEnDC,EACGP,EAAAuC,cAACyB,EAAAA,aAAa,CAAApD,GAAIe,EAAWnB,KAAMA,GAC9BD,GAEL"}
1
+ {"version":3,"file":"switch-field.js","sources":["../../src/switch-field/switch-field.tsx"],"sourcesContent":[null],"names":["React","__rest","useId","Stack","Box","styles","HiddenVisually","__assign","Text","FieldMessage"],"mappings":"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"}
@@ -1,2 +1,8 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={container:"bae487be",disabled:"_408d32a0",checked:"_99b0ead7",toggle:"_5af09fb5",label:"a66e1846",handle:"_0dcf70ec",keyFocused:"_1f5e7fd4"};
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var modules_8e05f7c9 = {"disabled":"_408d32a0","label":"a66e1846","checked":"_99b0ead7","toggle":"_5af09fb5","handle":"_0dcf70ec","keyFocused":"_1f5e7fd4","container":"bae487be"};
6
+
7
+ exports["default"] = modules_8e05f7c9;
2
8
  //# sourceMappingURL=switch-field.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch-field.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"switch-field.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +1 @@
1
- export * from './tabs';
1
+ export * from './tabs';
@@ -1,125 +1,125 @@
1
- import * as React from 'react';
2
- import { TabProps as BaseTabProps, TabPanelProps as BaseTabPanelProps } from '@ariakit/react';
3
- import type { ObfuscatedClassName, Space } from '../utils/common-types';
4
- interface TabsProps {
5
- /**
6
- * The `<Tabs>` component must be composed from a `<TabList>` and corresponding `<TabPanel>`
7
- * components
8
- */
9
- children: React.ReactNode;
10
- /**
11
- * Determines the look and feel of the tabs
12
- */
13
- variant?: 'themed' | 'neutral';
14
- /**
15
- * The id of the selected tab. Assigning a value makes this a controlled component
16
- */
17
- selectedId?: string | null;
18
- /**
19
- * The tab to initially select. This can be used if the component should not
20
- * be a controlled component but needs to have a tab selected
21
- */
22
- defaultSelectedId?: string | null;
23
- /**
24
- * Called with the tab id when a tab is selected
25
- */
26
- onSelectedIdChange?: (selectedId: string | null | undefined) => void;
27
- }
28
- /**
29
- * Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.
30
- */
31
- declare function Tabs({ children, selectedId, defaultSelectedId, variant, onSelectedIdChange, }: TabsProps): React.ReactElement;
32
- interface TabProps extends ObfuscatedClassName, Omit<BaseTabProps, 'store' | 'className' | 'children' | 'id'> {
33
- /**
34
- * The content to render inside of the tab button
35
- */
36
- children: React.ReactNode;
37
- /**
38
- * The tab's identifier. This must match its corresponding `<TabPanel>`'s id
39
- */
40
- id: string;
41
- /**
42
- * Defines wether or not the tab is disabled.
43
- */
44
- disabled?: boolean;
45
- }
46
- /**
47
- * Represents the individual tab elements within the group. Each `<Tab>` must have a corresponding `<TabPanel>` component.
48
- */
49
- declare const Tab: React.ForwardRefExoticComponent<Omit<TabProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
50
- type TabListProps = ({
51
- /** Labels the tab list for assistive technologies. This must be provided if `aria-labelledby` is omitted. */
52
- 'aria-label': string;
53
- } | {
54
- /**
55
- * One or more element IDs used to label the tab list for assistive technologies. Required if
56
- * `aria-label` is omitted.
57
- */
58
- 'aria-labelledby': string;
59
- } | {
60
- /**
61
- * For cases where multiple instances of the tab list exists, the duplicates may be marked as aria-hidden
62
- */
63
- 'aria-hidden': boolean;
64
- }) & {
65
- /**
66
- * A list of `<Tab>` elements
67
- */
68
- children: React.ReactNode;
69
- /**
70
- * Controls the spacing between tabs
71
- */
72
- space?: Space;
73
- /**
74
- * The width of the tab list.
75
- *
76
- * - `'maxContent'`: Each tab will be as wide as its content.
77
- * - `'full'`: Each tab will be as wide as the tab list.
78
- *
79
- * @default 'maxContent'
80
- */
81
- width?: 'maxContent' | 'full';
82
- /**
83
- * How to align the tabs within the tab list.
84
- *
85
- * @default 'start'
86
- */
87
- align?: 'start' | 'center' | 'end';
88
- } & ObfuscatedClassName;
89
- /**
90
- * A component used to group `<Tab>` elements together.
91
- */
92
- declare function TabList({ children, space, width, align, exceptionallySetClassName, ...props }: TabListProps): React.ReactElement | null;
93
- interface TabPanelProps extends React.HTMLAttributes<HTMLDivElement>, Pick<BaseTabPanelProps, 'render'> {
94
- /** The content to be rendered inside the tab */
95
- children?: React.ReactNode;
96
- /** The tabPanel's identifier. This must match its corresponding `<Tab>`'s id */
97
- id: string;
98
- /**
99
- * By default, the tab panel's content is always rendered even when they are not active. This
100
- * behaviour can be changed to 'active', which renders only when the tab is active, and 'lazy',
101
- * meaning while inactive tab panels will not be rendered initially, they will remain mounted
102
- * once they are active until the entire Tabs tree is unmounted.
103
- */
104
- renderMode?: 'always' | 'active' | 'lazy';
105
- }
106
- /**
107
- * Used to define the content to be rendered when a tab is active. Each `<TabPanel>` must have a
108
- * corresponding `<Tab>` component.
109
- */
110
- declare const TabPanel: React.ForwardRefExoticComponent<TabPanelProps & React.RefAttributes<HTMLDivElement>>;
111
- type TabAwareSlotProps = {
112
- /**
113
- * Render prop used to provide the content to be rendered inside the slot. The render prop will
114
- * be called with the current `selectedId`
115
- */
116
- children: (provided: {
117
- selectedId?: string | null;
118
- }) => React.ReactElement | null;
119
- };
120
- /**
121
- * Allows content to be rendered based on the current tab being selected while outside of the
122
- * TabPanel component. Can be placed freely within the main `<Tabs>` component.
123
- */
124
- declare function TabAwareSlot({ children }: TabAwareSlotProps): React.ReactElement | null;
125
- export { Tab, Tabs, TabList, TabPanel, TabAwareSlot };
1
+ import * as React from 'react';
2
+ import { TabProps as BaseTabProps, TabPanelProps as BaseTabPanelProps } from '@ariakit/react';
3
+ import type { ObfuscatedClassName, Space } from '../utils/common-types';
4
+ interface TabsProps {
5
+ /**
6
+ * The `<Tabs>` component must be composed from a `<TabList>` and corresponding `<TabPanel>`
7
+ * components
8
+ */
9
+ children: React.ReactNode;
10
+ /**
11
+ * Determines the look and feel of the tabs
12
+ */
13
+ variant?: 'themed' | 'neutral';
14
+ /**
15
+ * The id of the selected tab. Assigning a value makes this a controlled component
16
+ */
17
+ selectedId?: string | null;
18
+ /**
19
+ * The tab to initially select. This can be used if the component should not
20
+ * be a controlled component but needs to have a tab selected
21
+ */
22
+ defaultSelectedId?: string | null;
23
+ /**
24
+ * Called with the tab id when a tab is selected
25
+ */
26
+ onSelectedIdChange?: (selectedId: string | null | undefined) => void;
27
+ }
28
+ /**
29
+ * Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.
30
+ */
31
+ declare function Tabs({ children, selectedId, defaultSelectedId, variant, onSelectedIdChange, }: TabsProps): React.ReactElement;
32
+ interface TabProps extends ObfuscatedClassName, Omit<BaseTabProps, 'store' | 'className' | 'children' | 'id'> {
33
+ /**
34
+ * The content to render inside of the tab button
35
+ */
36
+ children: React.ReactNode;
37
+ /**
38
+ * The tab's identifier. This must match its corresponding `<TabPanel>`'s id
39
+ */
40
+ id: string;
41
+ /**
42
+ * Defines wether or not the tab is disabled.
43
+ */
44
+ disabled?: boolean;
45
+ }
46
+ /**
47
+ * Represents the individual tab elements within the group. Each `<Tab>` must have a corresponding `<TabPanel>` component.
48
+ */
49
+ declare const Tab: React.ForwardRefExoticComponent<Omit<TabProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
50
+ type TabListProps = ({
51
+ /** Labels the tab list for assistive technologies. This must be provided if `aria-labelledby` is omitted. */
52
+ 'aria-label': string;
53
+ } | {
54
+ /**
55
+ * One or more element IDs used to label the tab list for assistive technologies. Required if
56
+ * `aria-label` is omitted.
57
+ */
58
+ 'aria-labelledby': string;
59
+ } | {
60
+ /**
61
+ * For cases where multiple instances of the tab list exists, the duplicates may be marked as aria-hidden
62
+ */
63
+ 'aria-hidden': boolean;
64
+ }) & {
65
+ /**
66
+ * A list of `<Tab>` elements
67
+ */
68
+ children: React.ReactNode;
69
+ /**
70
+ * Controls the spacing between tabs
71
+ */
72
+ space?: Space;
73
+ /**
74
+ * The width of the tab list.
75
+ *
76
+ * - `'maxContent'`: Each tab will be as wide as its content.
77
+ * - `'full'`: Each tab will be as wide as the tab list.
78
+ *
79
+ * @default 'maxContent'
80
+ */
81
+ width?: 'maxContent' | 'full';
82
+ /**
83
+ * How to align the tabs within the tab list.
84
+ *
85
+ * @default 'start'
86
+ */
87
+ align?: 'start' | 'center' | 'end';
88
+ } & ObfuscatedClassName;
89
+ /**
90
+ * A component used to group `<Tab>` elements together.
91
+ */
92
+ declare function TabList({ children, space, width, align, exceptionallySetClassName, ...props }: TabListProps): React.ReactElement | null;
93
+ interface TabPanelProps extends React.HTMLAttributes<HTMLDivElement>, Pick<BaseTabPanelProps, 'render'> {
94
+ /** The content to be rendered inside the tab */
95
+ children?: React.ReactNode;
96
+ /** The tabPanel's identifier. This must match its corresponding `<Tab>`'s id */
97
+ id: string;
98
+ /**
99
+ * By default, the tab panel's content is always rendered even when they are not active. This
100
+ * behaviour can be changed to 'active', which renders only when the tab is active, and 'lazy',
101
+ * meaning while inactive tab panels will not be rendered initially, they will remain mounted
102
+ * once they are active until the entire Tabs tree is unmounted.
103
+ */
104
+ renderMode?: 'always' | 'active' | 'lazy';
105
+ }
106
+ /**
107
+ * Used to define the content to be rendered when a tab is active. Each `<TabPanel>` must have a
108
+ * corresponding `<Tab>` component.
109
+ */
110
+ declare const TabPanel: React.ForwardRefExoticComponent<TabPanelProps & React.RefAttributes<HTMLDivElement>>;
111
+ type TabAwareSlotProps = {
112
+ /**
113
+ * Render prop used to provide the content to be rendered inside the slot. The render prop will
114
+ * be called with the current `selectedId`
115
+ */
116
+ children: (provided: {
117
+ selectedId?: string | null;
118
+ }) => React.ReactElement | null;
119
+ };
120
+ /**
121
+ * Allows content to be rendered based on the current tab being selected while outside of the
122
+ * TabPanel component. Can be placed freely within the main `<Tabs>` component.
123
+ */
124
+ declare function TabAwareSlot({ children }: TabAwareSlotProps): React.ReactElement | null;
125
+ export { Tab, Tabs, TabList, TabPanel, TabAwareSlot };