@doist/reactist 9.2.0-beta.8 → 10.0.0-beta.12

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 (416) hide show
  1. package/README.md +12 -2
  2. package/dist/reactist.cjs.development.js +1499 -866
  3. package/dist/reactist.cjs.development.js.map +1 -1
  4. package/dist/reactist.cjs.production.min.js +1 -1
  5. package/dist/reactist.cjs.production.min.js.map +1 -1
  6. package/es/_virtual/_rollupPluginBabelHelpers.js +34 -20
  7. package/es/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
  8. package/es/components/color-picker/color-picker.js +1 -1
  9. package/es/components/color-picker/color-picker.js.map +1 -1
  10. package/es/components/{button/button.js → deprecated-button/deprecated-button.js} +9 -4
  11. package/es/components/deprecated-button/deprecated-button.js.map +1 -0
  12. package/es/components/{button → deprecated-button}/index.js +1 -1
  13. package/es/components/{button → deprecated-button}/index.js.map +0 -0
  14. package/es/components/{loading/loading.js → deprecated-loading/deprecated-loading.js} +3 -1
  15. package/es/components/deprecated-loading/deprecated-loading.js.map +1 -0
  16. package/es/components/{modal/modal.js → deprecated-modal/deprecated-modal.js} +9 -2
  17. package/es/components/deprecated-modal/deprecated-modal.js.map +1 -0
  18. package/es/components/{modal → deprecated-modal}/index.js +1 -1
  19. package/es/components/deprecated-modal/index.js.map +1 -0
  20. package/es/components/dropdown/dropdown.js +8 -4
  21. package/es/components/dropdown/dropdown.js.map +1 -1
  22. package/es/components/error-message/error-message.js +4 -2
  23. package/es/components/error-message/error-message.js.map +1 -1
  24. package/es/components/icon/icon.js.map +1 -1
  25. package/es/components/key-capturer/key-capturer.js.map +1 -1
  26. package/es/components/keyboard-shortcut/keyboard-shortcut.js +6 -3
  27. package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  28. package/es/components/menu/menu.js +40 -27
  29. package/es/components/menu/menu.js.map +1 -1
  30. package/es/components/notification/notification.js +3 -1
  31. package/es/components/notification/notification.js.map +1 -1
  32. package/es/components/popover/popover.js.map +1 -1
  33. package/es/components/popover/positioning-utils.js.map +1 -1
  34. package/es/components/range-input/range-input.js +1 -1
  35. package/es/components/range-input/range-input.js.map +1 -1
  36. package/es/components/select/select.js +4 -2
  37. package/es/components/select/select.js.map +1 -1
  38. package/es/components/time/time-utils.js.map +1 -1
  39. package/es/components/time/time.js.map +1 -1
  40. package/es/components/tooltip/tooltip.js +3 -1
  41. package/es/components/tooltip/tooltip.js.map +1 -1
  42. package/es/hooks/use-previous/use-previous.js +26 -0
  43. package/es/hooks/use-previous/use-previous.js.map +1 -0
  44. package/es/index.js +11 -6
  45. package/es/index.js.map +1 -1
  46. package/es/new-components/base-button/base-button.js +72 -0
  47. package/es/new-components/base-button/base-button.js.map +1 -0
  48. package/es/new-components/base-button/base-button.module.css.js +4 -0
  49. package/es/new-components/base-button/base-button.module.css.js.map +1 -0
  50. package/es/new-components/base-field/base-field.js +29 -29
  51. package/es/new-components/base-field/base-field.js.map +1 -1
  52. package/es/new-components/base-field/base-field.module.css.js +1 -1
  53. package/es/new-components/box/box.js +29 -10
  54. package/es/new-components/box/box.js.map +1 -1
  55. package/es/new-components/box/box.module.css.js +1 -1
  56. package/es/new-components/box/margin.module.css.js +4 -0
  57. package/es/new-components/box/margin.module.css.js.map +1 -0
  58. package/es/new-components/box/padding.module.css.js +4 -0
  59. package/es/new-components/box/padding.module.css.js.map +1 -0
  60. package/es/new-components/button/button.js +41 -0
  61. package/es/new-components/button/button.js.map +1 -0
  62. package/es/new-components/button-link/button-link.js +26 -14
  63. package/es/new-components/button-link/button-link.js.map +1 -1
  64. package/es/new-components/checkbox-field/checkbox-field.js +46 -23
  65. package/es/new-components/checkbox-field/checkbox-field.js.map +1 -1
  66. package/es/new-components/checkbox-field/checkbox-field.module.css.js +1 -1
  67. package/es/new-components/checkbox-field/checkbox-icon.js +2 -1
  68. package/es/new-components/checkbox-field/checkbox-icon.js.map +1 -1
  69. package/es/new-components/columns/columns.js +28 -14
  70. package/es/new-components/columns/columns.js.map +1 -1
  71. package/es/new-components/columns/columns.module.css.js +1 -1
  72. package/es/new-components/divider/divider.js +6 -4
  73. package/es/new-components/divider/divider.js.map +1 -1
  74. package/es/new-components/divider/divider.module.css.js +1 -1
  75. package/es/new-components/heading/heading.js +10 -3
  76. package/es/new-components/heading/heading.js.map +1 -1
  77. package/es/new-components/heading/heading.module.css.js +1 -1
  78. package/es/new-components/hidden/hidden.js +55 -0
  79. package/es/new-components/hidden/hidden.js.map +1 -0
  80. package/es/new-components/hidden/hidden.module.css.js +4 -0
  81. package/es/new-components/hidden/hidden.module.css.js.map +1 -0
  82. package/es/new-components/hidden-visually/hidden-visually.js +22 -0
  83. package/es/new-components/hidden-visually/hidden-visually.js.map +1 -0
  84. package/es/new-components/hidden-visually/hidden-visually.module.css.js +4 -0
  85. package/es/new-components/hidden-visually/hidden-visually.module.css.js.map +1 -0
  86. package/es/new-components/icons/alert-icon.js +2 -1
  87. package/es/new-components/icons/alert-icon.js.map +1 -1
  88. package/es/new-components/inline/inline.js +10 -8
  89. package/es/new-components/inline/inline.js.map +1 -1
  90. package/es/new-components/loading/loading.js +34 -0
  91. package/es/new-components/loading/loading.js.map +1 -0
  92. package/es/new-components/modal/modal.js +206 -0
  93. package/es/new-components/modal/modal.js.map +1 -0
  94. package/es/new-components/modal/modal.module.css.js +4 -0
  95. package/es/new-components/modal/modal.module.css.js.map +1 -0
  96. package/es/new-components/password-field/password-field.js +8 -4
  97. package/es/new-components/password-field/password-field.js.map +1 -1
  98. package/es/new-components/responsive-props.js +21 -11
  99. package/es/new-components/responsive-props.js.map +1 -1
  100. package/es/new-components/select-field/select-field.js +13 -6
  101. package/es/new-components/select-field/select-field.js.map +1 -1
  102. package/es/new-components/select-field/select-field.module.css.js +1 -1
  103. package/es/new-components/spinner/spinner.js +26 -0
  104. package/es/new-components/spinner/spinner.js.map +1 -0
  105. package/es/new-components/spinner/spinner.module.css.js +4 -0
  106. package/es/new-components/spinner/spinner.module.css.js.map +1 -0
  107. package/es/new-components/stack/stack.js +23 -12
  108. package/es/new-components/stack/stack.js.map +1 -1
  109. package/es/new-components/switch-field/switch-field.js +48 -28
  110. package/es/new-components/switch-field/switch-field.js.map +1 -1
  111. package/es/new-components/switch-field/switch-field.module.css.js +1 -1
  112. package/es/new-components/tabs/tabs.js +147 -0
  113. package/es/new-components/tabs/tabs.js.map +1 -0
  114. package/es/new-components/tabs/tabs.module.css.js +4 -0
  115. package/es/new-components/tabs/tabs.module.css.js.map +1 -0
  116. package/es/new-components/text/text.js +16 -10
  117. package/es/new-components/text/text.js.map +1 -1
  118. package/es/new-components/text/text.module.css.js +1 -1
  119. package/es/new-components/text-area/text-area.js +3 -1
  120. package/es/new-components/text-area/text-area.js.map +1 -1
  121. package/es/new-components/text-area/text-area.module.css.js +1 -1
  122. package/es/new-components/text-field/text-field.js +5 -2
  123. package/es/new-components/text-field/text-field.js.map +1 -1
  124. package/es/new-components/text-field/text-field.module.css.js +1 -1
  125. package/es/new-components/text-link/text-link.js +9 -7
  126. package/es/new-components/text-link/text-link.js.map +1 -1
  127. package/es/utils/polymorphism.js +17 -0
  128. package/es/utils/polymorphism.js.map +1 -0
  129. package/lib/_virtual/_rollupPluginBabelHelpers.js +1 -1
  130. package/lib/components/color-picker/color-picker.js +1 -1
  131. package/lib/components/color-picker/color-picker.js.map +1 -1
  132. package/lib/components/{button/button.d.ts → deprecated-button/deprecated-button.d.ts} +7 -1
  133. package/lib/components/deprecated-button/deprecated-button.js +2 -0
  134. package/lib/components/deprecated-button/deprecated-button.js.map +1 -0
  135. package/lib/components/{button/button.test.d.ts → deprecated-button/deprecated-button.test.d.ts} +0 -0
  136. package/lib/components/deprecated-button/index.d.ts +4 -0
  137. package/lib/components/{loading → deprecated-button}/index.js +1 -1
  138. package/lib/components/{button → deprecated-button}/index.js.map +0 -0
  139. package/lib/components/{loading/loading.d.ts → deprecated-loading/deprecated-loading.d.ts} +2 -1
  140. package/lib/components/{loading/loading.js → deprecated-loading/deprecated-loading.js} +1 -1
  141. package/lib/components/deprecated-loading/deprecated-loading.js.map +1 -0
  142. package/lib/components/{loading/Loading.test.d.ts → deprecated-loading/deprecated-loading.test.d.ts} +0 -0
  143. package/lib/components/deprecated-loading/index.d.ts +1 -0
  144. package/lib/components/{modal/modal.d.ts → deprecated-modal/deprecated-modal.d.ts} +6 -1
  145. package/lib/components/{modal/modal.js → deprecated-modal/deprecated-modal.js} +2 -2
  146. package/lib/components/deprecated-modal/deprecated-modal.js.map +1 -0
  147. package/lib/components/{modal/modal.test.d.ts → deprecated-modal/deprecated-modal.test.d.ts} +0 -0
  148. package/lib/components/{modal → deprecated-modal}/index.d.ts +3 -3
  149. package/lib/components/deprecated-modal/index.js +2 -0
  150. package/lib/components/deprecated-modal/index.js.map +1 -0
  151. package/lib/components/dropdown/dropdown.js +1 -1
  152. package/lib/components/dropdown/dropdown.js.map +1 -1
  153. package/lib/components/error-message/error-message.js +1 -1
  154. package/lib/components/error-message/error-message.js.map +1 -1
  155. package/lib/components/keyboard-shortcut/keyboard-shortcut.js +1 -1
  156. package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  157. package/lib/components/menu/index.d.ts +1 -1
  158. package/lib/components/menu/menu.d.ts +8 -10
  159. package/lib/components/menu/menu.js +1 -1
  160. package/lib/components/menu/menu.js.map +1 -1
  161. package/lib/components/notification/notification.js +1 -1
  162. package/lib/components/notification/notification.js.map +1 -1
  163. package/lib/components/range-input/range-input.js +1 -1
  164. package/lib/components/range-input/range-input.js.map +1 -1
  165. package/lib/components/select/select.js +1 -1
  166. package/lib/components/select/select.js.map +1 -1
  167. package/lib/components/tooltip/index.d.ts +1 -1
  168. package/lib/components/tooltip/tooltip.js +1 -1
  169. package/lib/components/tooltip/tooltip.js.map +1 -1
  170. package/lib/hooks/use-previous/index.d.ts +1 -0
  171. package/lib/hooks/use-previous/use-previous.d.ts +15 -0
  172. package/lib/hooks/use-previous/use-previous.js +2 -0
  173. package/lib/hooks/use-previous/use-previous.js.map +1 -0
  174. package/lib/index.d.ts +10 -5
  175. package/lib/index.js +1 -1
  176. package/lib/new-components/base-button/base-button.d.ts +65 -0
  177. package/lib/new-components/base-button/base-button.js +2 -0
  178. package/lib/new-components/base-button/base-button.js.map +1 -0
  179. package/lib/new-components/base-button/base-button.module.css.js +2 -0
  180. package/lib/new-components/base-button/base-button.module.css.js.map +1 -0
  181. package/lib/new-components/base-button/index.d.ts +1 -0
  182. package/lib/new-components/base-field/base-field.d.ts +53 -13
  183. package/lib/new-components/base-field/base-field.js +1 -1
  184. package/lib/new-components/base-field/base-field.js.map +1 -1
  185. package/lib/new-components/base-field/base-field.module.css.js +1 -1
  186. package/lib/new-components/box/box.d.ts +24 -13
  187. package/lib/new-components/box/box.js +1 -1
  188. package/lib/new-components/box/box.js.map +1 -1
  189. package/lib/new-components/box/box.module.css.js +1 -1
  190. package/lib/{components/tabs/tabs.test.d.ts → new-components/box/box.test.d.ts} +0 -0
  191. package/lib/new-components/box/margin.module.css.js +2 -0
  192. package/lib/new-components/box/margin.module.css.js.map +1 -0
  193. package/lib/new-components/box/padding.module.css.js +2 -0
  194. package/lib/new-components/box/padding.module.css.js.map +1 -0
  195. package/lib/new-components/button/button.d.ts +48 -0
  196. package/lib/new-components/button/button.js +2 -0
  197. package/lib/new-components/button/button.js.map +1 -0
  198. package/lib/new-components/button/button.test.d.ts +1 -0
  199. package/lib/new-components/button/index.d.ts +1 -0
  200. package/lib/new-components/button-link/button-link-story-wrapper.d.ts +7 -0
  201. package/lib/new-components/button-link/button-link.d.ts +14 -8
  202. package/lib/new-components/button-link/button-link.js +1 -1
  203. package/lib/new-components/button-link/button-link.js.map +1 -1
  204. package/lib/new-components/button-link/button-link.test.d.ts +1 -0
  205. package/lib/new-components/checkbox-field/checkbox-field.d.ts +3 -3
  206. package/lib/new-components/checkbox-field/checkbox-field.js +1 -1
  207. package/lib/new-components/checkbox-field/checkbox-field.js.map +1 -1
  208. package/lib/new-components/checkbox-field/checkbox-field.module.css.js +1 -1
  209. package/lib/new-components/checkbox-field/checkbox-field.test.d.ts +1 -0
  210. package/lib/new-components/checkbox-field/checkbox-icon.js +1 -1
  211. package/lib/new-components/checkbox-field/checkbox-icon.js.map +1 -1
  212. package/lib/new-components/columns/columns.d.ts +4 -5
  213. package/lib/new-components/columns/columns.js +1 -1
  214. package/lib/new-components/columns/columns.js.map +1 -1
  215. package/lib/new-components/columns/columns.module.css.js +1 -1
  216. package/lib/new-components/columns/columns.test.d.ts +1 -0
  217. package/lib/new-components/common-types.d.ts +2 -0
  218. package/lib/new-components/divider/divider.d.ts +2 -2
  219. package/lib/new-components/divider/divider.js +1 -1
  220. package/lib/new-components/divider/divider.js.map +1 -1
  221. package/lib/new-components/divider/divider.module.css.js +1 -1
  222. package/lib/new-components/heading/heading.d.ts +101 -2
  223. package/lib/new-components/heading/heading.js +1 -1
  224. package/lib/new-components/heading/heading.js.map +1 -1
  225. package/lib/new-components/heading/heading.module.css.js +1 -1
  226. package/lib/new-components/heading/heading.test.d.ts +1 -0
  227. package/lib/new-components/hidden/hidden.d.ts +49 -0
  228. package/lib/new-components/hidden/hidden.js +2 -0
  229. package/lib/new-components/hidden/hidden.js.map +1 -0
  230. package/lib/new-components/hidden/hidden.module.css.js +2 -0
  231. package/lib/new-components/hidden/hidden.module.css.js.map +1 -0
  232. package/lib/new-components/hidden/hidden.test.d.ts +1 -0
  233. package/lib/new-components/hidden/index.d.ts +1 -0
  234. package/lib/new-components/hidden-visually/hidden-visually.d.ts +11 -0
  235. package/lib/new-components/hidden-visually/hidden-visually.js +2 -0
  236. package/lib/new-components/hidden-visually/hidden-visually.js.map +1 -0
  237. package/lib/new-components/hidden-visually/hidden-visually.module.css.js +2 -0
  238. package/lib/new-components/hidden-visually/hidden-visually.module.css.js.map +1 -0
  239. package/lib/new-components/hidden-visually/hidden-visually.test.d.ts +1 -0
  240. package/lib/new-components/hidden-visually/index.d.ts +1 -0
  241. package/lib/new-components/icons/alert-icon.js +1 -1
  242. package/lib/new-components/icons/alert-icon.js.map +1 -1
  243. package/lib/new-components/inline/inline.d.ts +1 -2
  244. package/lib/new-components/inline/inline.js +1 -1
  245. package/lib/new-components/inline/inline.js.map +1 -1
  246. package/lib/new-components/inline/inline.test.d.ts +1 -0
  247. package/lib/new-components/loading/index.d.ts +1 -0
  248. package/lib/new-components/loading/loading.d.ts +26 -0
  249. package/lib/new-components/loading/loading.js +2 -0
  250. package/lib/new-components/loading/loading.js.map +1 -0
  251. package/lib/new-components/loading/loading.test.d.ts +1 -0
  252. package/lib/new-components/modal/index.d.ts +1 -0
  253. package/lib/new-components/modal/modal-stories-components.d.ts +35 -0
  254. package/lib/new-components/modal/modal.d.ts +151 -0
  255. package/lib/new-components/modal/modal.js +2 -0
  256. package/lib/new-components/modal/modal.js.map +1 -0
  257. package/lib/new-components/modal/modal.module.css.js +2 -0
  258. package/lib/new-components/modal/modal.module.css.js.map +1 -0
  259. package/lib/new-components/modal/modal.test.d.ts +1 -0
  260. package/lib/new-components/password-field/password-field.d.ts +2 -2
  261. package/lib/new-components/password-field/password-field.js +1 -1
  262. package/lib/new-components/password-field/password-field.js.map +1 -1
  263. package/lib/new-components/password-field/password-field.test.d.ts +1 -0
  264. package/lib/new-components/responsive-props.d.ts +12 -14
  265. package/lib/new-components/responsive-props.js +1 -1
  266. package/lib/new-components/responsive-props.js.map +1 -1
  267. package/lib/new-components/select-field/select-field.d.ts +4 -4
  268. package/lib/new-components/select-field/select-field.js +1 -1
  269. package/lib/new-components/select-field/select-field.js.map +1 -1
  270. package/lib/new-components/select-field/select-field.module.css.js +1 -1
  271. package/lib/new-components/select-field/select-field.test.d.ts +1 -0
  272. package/lib/new-components/spinner/index.d.ts +1 -0
  273. package/lib/new-components/spinner/spinner.d.ts +5 -0
  274. package/lib/new-components/spinner/spinner.js +2 -0
  275. package/lib/new-components/spinner/spinner.js.map +1 -0
  276. package/lib/new-components/spinner/spinner.module.css.js +2 -0
  277. package/lib/new-components/spinner/spinner.module.css.js.map +1 -0
  278. package/lib/new-components/stack/stack.d.ts +8 -5
  279. package/lib/new-components/stack/stack.js +1 -1
  280. package/lib/new-components/stack/stack.js.map +1 -1
  281. package/lib/new-components/stack/stack.test.d.ts +1 -0
  282. package/lib/new-components/switch-field/switch-field.d.ts +4 -4
  283. package/lib/new-components/switch-field/switch-field.js +1 -1
  284. package/lib/new-components/switch-field/switch-field.js.map +1 -1
  285. package/lib/new-components/switch-field/switch-field.module.css.js +1 -1
  286. package/lib/new-components/switch-field/switch-field.test.d.ts +1 -0
  287. package/lib/new-components/tabs/index.d.ts +1 -0
  288. package/lib/new-components/tabs/tabs.d.ts +92 -0
  289. package/lib/new-components/tabs/tabs.js +2 -0
  290. package/lib/new-components/tabs/tabs.js.map +1 -0
  291. package/lib/new-components/tabs/tabs.module.css.js +2 -0
  292. package/lib/new-components/tabs/tabs.module.css.js.map +1 -0
  293. package/lib/new-components/tabs/tabs.test.d.ts +1 -0
  294. package/lib/new-components/test-helpers.d.ts +9 -0
  295. package/lib/new-components/text/text.d.ts +38 -5
  296. package/lib/new-components/text/text.js +1 -1
  297. package/lib/new-components/text/text.js.map +1 -1
  298. package/lib/new-components/text/text.module.css.js +1 -1
  299. package/lib/new-components/text/text.test.d.ts +1 -0
  300. package/lib/new-components/text-area/text-area.d.ts +2 -2
  301. package/lib/new-components/text-area/text-area.js +1 -1
  302. package/lib/new-components/text-area/text-area.js.map +1 -1
  303. package/lib/new-components/text-area/text-area.module.css.js +1 -1
  304. package/lib/new-components/text-field/text-field.d.ts +7 -4
  305. package/lib/new-components/text-field/text-field.js +1 -1
  306. package/lib/new-components/text-field/text-field.js.map +1 -1
  307. package/lib/new-components/text-field/text-field.module.css.js +1 -1
  308. package/lib/new-components/text-field/text-field.test.d.ts +1 -0
  309. package/lib/new-components/text-link/text-link.d.ts +1 -2
  310. package/lib/new-components/text-link/text-link.js +1 -1
  311. package/lib/new-components/text-link/text-link.js.map +1 -1
  312. package/lib/utils/polymorphism.d.ts +151 -0
  313. package/lib/utils/polymorphism.js +2 -0
  314. package/lib/utils/polymorphism.js.map +1 -0
  315. package/package.json +27 -23
  316. package/styles/alert.css +4 -2
  317. package/styles/base-button.css +6 -0
  318. package/styles/base-button.module.css.css +1 -0
  319. package/styles/base-field.css +7 -3
  320. package/styles/base-field.module.css.css +1 -1
  321. package/styles/box.css +3 -0
  322. package/styles/box.module.css.css +1 -1
  323. package/styles/checkbox-field.css +6 -2
  324. package/styles/checkbox-field.module.css.css +1 -1
  325. package/styles/color-picker.css +1 -1
  326. package/styles/columns.css +4 -2
  327. package/styles/columns.module.css.css +1 -1
  328. package/styles/deprecated-button.css +2 -0
  329. package/styles/deprecated-loading.css +1 -0
  330. package/styles/deprecated-modal.css +1 -0
  331. package/styles/divider.css +4 -2
  332. package/styles/divider.module.css.css +1 -1
  333. package/styles/dropdown.css +1 -1
  334. package/styles/heading.css +4 -2
  335. package/styles/heading.module.css.css +1 -1
  336. package/styles/hidden-visually.css +4 -0
  337. package/styles/hidden-visually.module.css.css +1 -0
  338. package/styles/hidden.css +4 -0
  339. package/styles/hidden.module.css.css +1 -0
  340. package/styles/inline.css +3 -1
  341. package/styles/loading.css +4 -1
  342. package/styles/margin.module.css.css +1 -0
  343. package/styles/menu.css +1 -1
  344. package/styles/modal.css +10 -1
  345. package/styles/modal.module.css.css +1 -0
  346. package/styles/notice.css +4 -2
  347. package/styles/padding.module.css.css +1 -0
  348. package/styles/password-field.css +8 -4
  349. package/styles/reactist.css +24 -19
  350. package/styles/select-field.css +8 -4
  351. package/styles/select-field.module.css.css +1 -1
  352. package/styles/spinner.module.css.css +1 -0
  353. package/styles/stack.css +4 -2
  354. package/styles/switch-field.css +9 -4
  355. package/styles/switch-field.module.css.css +1 -1
  356. package/styles/tabs.css +5 -1
  357. package/styles/tabs.module.css.css +1 -0
  358. package/styles/text-area.css +8 -4
  359. package/styles/text-area.module.css.css +1 -1
  360. package/styles/text-field.css +8 -4
  361. package/styles/text-field.module.css.css +1 -1
  362. package/styles/text-link.css +3 -1
  363. package/styles/text.css +4 -2
  364. package/styles/text.module.css.css +1 -1
  365. package/styles/tip.css +1 -1
  366. package/CHANGELOG.md +0 -496
  367. package/es/components/button/button.js.map +0 -1
  368. package/es/components/loading/index.js +0 -6
  369. package/es/components/loading/index.js.map +0 -1
  370. package/es/components/loading/loading.js.map +0 -1
  371. package/es/components/menu/type-helpers.js +0 -9
  372. package/es/components/menu/type-helpers.js.map +0 -1
  373. package/es/components/modal/index.js.map +0 -1
  374. package/es/components/modal/modal.js.map +0 -1
  375. package/es/components/tabs/tabs.js +0 -123
  376. package/es/components/tabs/tabs.js.map +0 -1
  377. package/es/new-components/button-link/button-link.module.css.js +0 -4
  378. package/es/new-components/button-link/button-link.module.css.js.map +0 -1
  379. package/es/new-components/loading-spinner/loading-spinner.js +0 -37
  380. package/es/new-components/loading-spinner/loading-spinner.js.map +0 -1
  381. package/es/new-components/loading-spinner/loading-spinner.module.css.js +0 -4
  382. package/es/new-components/loading-spinner/loading-spinner.module.css.js.map +0 -1
  383. package/es/new-components/type-helpers.js +0 -10
  384. package/es/new-components/type-helpers.js.map +0 -1
  385. package/lib/components/button/button.js +0 -2
  386. package/lib/components/button/button.js.map +0 -1
  387. package/lib/components/button/index.d.ts +0 -4
  388. package/lib/components/button/index.js +0 -2
  389. package/lib/components/loading/index.d.ts +0 -2
  390. package/lib/components/loading/index.js.map +0 -1
  391. package/lib/components/loading/loading.js.map +0 -1
  392. package/lib/components/menu/type-helpers.d.ts +0 -25
  393. package/lib/components/menu/type-helpers.js +0 -2
  394. package/lib/components/menu/type-helpers.js.map +0 -1
  395. package/lib/components/modal/index.js +0 -2
  396. package/lib/components/modal/index.js.map +0 -1
  397. package/lib/components/modal/modal.js.map +0 -1
  398. package/lib/components/tabs/index.d.ts +0 -1
  399. package/lib/components/tabs/tabs.d.ts +0 -33
  400. package/lib/components/tabs/tabs.js +0 -2
  401. package/lib/components/tabs/tabs.js.map +0 -1
  402. package/lib/new-components/button-link/button-link.module.css.js +0 -2
  403. package/lib/new-components/button-link/button-link.module.css.js.map +0 -1
  404. package/lib/new-components/loading-spinner/index.d.ts +0 -1
  405. package/lib/new-components/loading-spinner/loading-spinner.d.ts +0 -8
  406. package/lib/new-components/loading-spinner/loading-spinner.js +0 -2
  407. package/lib/new-components/loading-spinner/loading-spinner.js.map +0 -1
  408. package/lib/new-components/loading-spinner/loading-spinner.module.css.js +0 -2
  409. package/lib/new-components/loading-spinner/loading-spinner.module.css.js.map +0 -1
  410. package/lib/new-components/type-helpers.d.ts +0 -26
  411. package/lib/new-components/type-helpers.js +0 -2
  412. package/lib/new-components/type-helpers.js.map +0 -1
  413. package/styles/button-link.css +0 -2
  414. package/styles/button-link.module.css.css +0 -1
  415. package/styles/button.css +0 -2
  416. package/styles/loading-spinner.module.css.css +0 -1
@@ -0,0 +1,48 @@
1
+ import * as React from 'react';
2
+ import type { BaseButtonProps } from '../base-button';
3
+ declare type NativeButtonProps = Omit<React.AllHTMLAttributes<HTMLButtonElement>, 'aria-disabled' | 'className' | keyof BaseButtonProps>;
4
+ export declare type ButtonProps = NativeButtonProps & BaseButtonProps & {
5
+ type?: 'button' | 'submit' | 'reset';
6
+ exceptionallySetClassName?: string;
7
+ };
8
+ /**
9
+ * A semantic button that also looks like a button, and provides all the necessary visual variants.
10
+ * It follows the [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).
11
+ *
12
+ * 🎨 [Figma](https://www.figma.com/file/LYlWNzvhMDh907l07mPPQk/Product-Web?node-id=4693%3A175143)
13
+ *
14
+ * @see ButtonLink
15
+ */
16
+ export declare const Button: React.ForwardRefExoticComponent<(Pick<React.AllHTMLAttributes<HTMLButtonElement>, "aria-label" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
17
+ variant: "primary" | "secondary" | "tertiary" | "quaternary";
18
+ tone?: "normal" | "destructive" | undefined;
19
+ size?: "normal" | "small" | "large" | undefined;
20
+ disabled?: boolean | undefined;
21
+ loading?: boolean | undefined;
22
+ tooltip?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | (() => React.ReactNode) | null | undefined;
23
+ } & {
24
+ icon: React.ReactChild;
25
+ 'aria-label': string;
26
+ children?: undefined;
27
+ startIcon?: undefined;
28
+ endIcon?: undefined;
29
+ } & {
30
+ type?: "button" | "submit" | "reset" | undefined;
31
+ exceptionallySetClassName?: string | undefined;
32
+ } & React.RefAttributes<HTMLButtonElement>) | (Pick<React.AllHTMLAttributes<HTMLButtonElement>, "aria-label" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
33
+ variant: "primary" | "secondary" | "tertiary" | "quaternary";
34
+ tone?: "normal" | "destructive" | undefined;
35
+ size?: "normal" | "small" | "large" | undefined;
36
+ disabled?: boolean | undefined;
37
+ loading?: boolean | undefined;
38
+ tooltip?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | (() => React.ReactNode) | null | undefined;
39
+ } & {
40
+ children: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal;
41
+ startIcon?: string | number | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | undefined;
42
+ endIcon?: string | number | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | undefined;
43
+ icon?: undefined;
44
+ } & {
45
+ type?: "button" | "submit" | "reset" | undefined;
46
+ exceptionallySetClassName?: string | undefined;
47
+ } & React.RefAttributes<HTMLButtonElement>)>;
48
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),a=require("../base-button/base-button.js"),o=["variant","tone","size","type","disabled","exceptionallySetClassName"];exports.Button=t.forwardRef((function(r,s){var i=r.variant,n=r.tone,l=void 0===n?"normal":n,u=r.size,b=void 0===u?"normal":u,d=r.type,p=void 0===d?"button":d,v=r.disabled,c=void 0!==v&&v,y=r.exceptionallySetClassName,m=e.objectWithoutPropertiesLoose(r,o);return t.createElement(a.BaseButton,Object.assign({},m,{as:"button",ref:s,variant:i,tone:l,size:b,type:p,disabled:c,exceptionallySetClassName:y}))}));
2
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sources":["../../../src/new-components/button/button.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseButton } from '../base-button'\nimport type { BaseButtonProps } from '../base-button'\n\ntype NativeButtonProps = Omit<\n React.AllHTMLAttributes<HTMLButtonElement>,\n 'aria-disabled' | 'className' | keyof BaseButtonProps\n>\n\nexport type ButtonProps = NativeButtonProps &\n BaseButtonProps & {\n type?: 'button' | 'submit' | 'reset'\n exceptionallySetClassName?: string\n }\n\n/**\n * A semantic button that also looks like a button, and provides all the necessary visual variants.\n * It follows the [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).\n *\n * 🎨 [Figma](https://www.figma.com/file/LYlWNzvhMDh907l07mPPQk/Product-Web?node-id=4693%3A175143)\n *\n * @see ButtonLink\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant,\n tone = 'normal',\n size = 'normal',\n type = 'button',\n disabled = false,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n return (\n <BaseButton\n {...props}\n as=\"button\"\n ref={ref}\n variant={variant}\n tone={tone}\n size={size}\n type={type}\n disabled={disabled}\n exceptionallySetClassName={exceptionallySetClassName}\n />\n )\n})\n"],"names":["React","ref","variant","tone","size","type","disabled","exceptionallySetClassName","props","BaseButton","as"],"mappings":"wRAuBsBA,cAAiD,WAUnEC,OARIC,IAAAA,YACAC,KAAAA,aAAO,eACPC,KAAAA,aAAO,eACPC,KAAAA,aAAO,eACPC,SAAAA,gBACAC,IAAAA,0BACGC,6CAKHR,gBAACS,8BACOD,GACJE,GAAG,SACHT,IAAKA,EACLC,QAASA,EACTC,KAAMA,EACNC,KAAMA,EACNC,KAAMA,EACNC,SAAUA,EACVC,0BAA2BA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './button';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { ButtonLinkProps } from './button-link';
3
+ declare function ButtonLinkStoryWrapper(props: ButtonLinkProps): JSX.Element;
4
+ declare namespace ButtonLinkStoryWrapper {
5
+ var displayName: string;
6
+ }
7
+ export { ButtonLinkStoryWrapper as ButtonLink };
@@ -1,9 +1,15 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
+ import type { BaseButtonProps } from '../base-button';
2
3
  import type { OpenInNewTab } from '../common-types';
3
- interface ButtonLinkProps extends OpenInNewTab {
4
- variant: 'primary' | 'secondary' | 'danger';
5
- size?: 'default' | 'small' | 'large';
6
- }
7
- declare const ButtonLink: import("../type-helpers").ForwardRefComponentWithAs<ButtonLinkProps, React.ElementType<any>>;
8
- export { ButtonLink };
9
- export type { ButtonLinkProps };
4
+ declare type NativeLinkProps = Omit<JSX.IntrinsicElements['a'], 'aria-disabled' | 'target' | 'rel' | 'className'>;
5
+ export declare type ButtonLinkProps = NativeLinkProps & BaseButtonProps & OpenInNewTab;
6
+ /**
7
+ * A semantic link that looks like a button, exactly matching the `Button` component in all visual
8
+ * aspects.
9
+ *
10
+ *🎨 [Figma](https://www.figma.com/file/LYlWNzvhMDh907l07mPPQk/Product-Web?node-id=4693%3A175143)
11
+ *
12
+ * @see Button
13
+ */
14
+ export declare const ButtonLink: import("../../utils/polymorphism").PolymorphicComponent<"a", ButtonLinkProps, "obfuscateClassName">;
15
+ export {};
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),r=require("../type-helpers.js"),n=require("../box/box.js"),o=require("./button-link.module.css.js");exports.ButtonLink=r.forwardRefWithAs((function(r,i){var a=r.component,s=void 0===a?"a":a,l=r.variant,u=r.size,c=void 0===u?"default":u,p=r.openInNewTab,b=void 0!==p&&p,d=e.objectWithoutPropertiesLoose(r,["component","variant","size","openInNewTab"]);return t.createElement(n.Box,Object.assign({},d,{component:s,display:"inlineFlex",alignItems:"center",justifyContent:"center",className:[o.default.container,"reactist_button",l?"reactist_button--"+l:null,"default"!==c?"reactist_button--"+c:null],ref:i,target:b?"_blank":void 0,rel:b?"noopener noreferrer":void 0}))}));
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),o=require("../../utils/polymorphism.js"),r=require("../base-button/base-button.js"),a=["as","variant","tone","size","exceptionallySetClassName","openInNewTab"];exports.ButtonLink=o.polymorphicComponent((function(o,n){var i=o.as,s=void 0===i?"a":i,l=o.variant,u=o.tone,p=void 0===u?"normal":u,v=o.size,b=void 0===v?"normal":v,c=o.exceptionallySetClassName,m=o.openInNewTab,d=void 0!==m&&m,j=e.objectWithoutPropertiesLoose(o,a);return t.createElement(r.BaseButton,Object.assign({},j,{as:s,ref:n,variant:l,tone:p,size:b,exceptionallySetClassName:c,target:d?"_blank":void 0,rel:d?"noopener noreferrer":void 0}))}));
2
2
  //# sourceMappingURL=button-link.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-link.js","sources":["../../../src/new-components/button-link/button-link.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { forwardRefWithAs } from '../type-helpers'\nimport type { OpenInNewTab } from '../common-types'\n\nimport styles from './button-link.module.css'\n\ninterface ButtonLinkProps extends OpenInNewTab {\n variant: 'primary' | 'secondary' | 'danger'\n size?: 'default' | 'small' | 'large'\n}\n\nconst ButtonLink = forwardRefWithAs<ButtonLinkProps>(function ButtonLink(\n { component = 'a', variant, size = 'default', openInNewTab = false, ...props },\n ref,\n) {\n return (\n <Box\n {...props}\n component={component}\n display=\"inlineFlex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n className={[\n styles.container,\n 'reactist_button',\n variant ? `reactist_button--${variant}` : null,\n size !== 'default' ? `reactist_button--${size}` : null,\n ]}\n ref={ref}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n />\n )\n})\n\nexport { ButtonLink }\nexport type { ButtonLinkProps }\n"],"names":["forwardRefWithAs","ref","component","variant","size","openInNewTab","props","React","Box","display","alignItems","justifyContent","className","styles","container","target","undefined","rel"],"mappings":"2QAYmBA,oBAAkC,WAEjDC,WADEC,UAAAA,aAAY,MAAKC,IAAAA,YAASC,KAAAA,aAAO,gBAAWC,aAAAA,gBAAyBC,yFAInEC,gBAACC,uBACOF,GACJJ,UAAWA,EACXO,QAAQ,aACRC,WAAW,SACXC,eAAe,SACfC,UAAW,CACPC,UAAOC,UACP,kBACAX,sBAA8BA,EAAY,KACjC,YAATC,sBAAyCA,EAAS,MAEtDH,IAAKA,EACLc,OAAQV,EAAe,cAAWW,EAClCC,IAAKZ,EAAe,2BAAwBW"}
1
+ {"version":3,"file":"button-link.js","sources":["../../../src/new-components/button-link/button-link.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { BaseButton } from '../base-button'\nimport type { BaseButtonProps } from '../base-button'\nimport type { OpenInNewTab } from '../common-types'\n\ntype NativeLinkProps = Omit<\n JSX.IntrinsicElements['a'],\n 'aria-disabled' | 'target' | 'rel' | 'className'\n>\n\nexport type ButtonLinkProps = NativeLinkProps & BaseButtonProps & OpenInNewTab\n\n/**\n * A semantic link that looks like a button, exactly matching the `Button` component in all visual\n * aspects.\n *\n *🎨 [Figma](https://www.figma.com/file/LYlWNzvhMDh907l07mPPQk/Product-Web?node-id=4693%3A175143)\n *\n * @see Button\n */\nexport const ButtonLink = polymorphicComponent<'a', ButtonLinkProps>(function ButtonLink(\n {\n as = 'a',\n variant,\n tone = 'normal',\n size = 'normal',\n exceptionallySetClassName,\n openInNewTab = false,\n ...props\n },\n ref,\n) {\n return (\n <BaseButton\n {...props}\n as={as}\n ref={ref}\n variant={variant}\n tone={tone}\n size={size}\n exceptionallySetClassName={exceptionallySetClassName}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n />\n )\n})\n"],"names":["polymorphicComponent","ref","as","variant","tone","size","exceptionallySetClassName","openInNewTab","props","React","BaseButton","target","undefined","rel"],"mappings":"uUAqB0BA,wBAA2C,WAUjEC,WARIC,GAAAA,aAAK,MACLC,IAAAA,YACAC,KAAAA,aAAO,eACPC,KAAAA,aAAO,WACPC,IAAAA,8BACAC,aAAAA,gBACGC,6CAKHC,gBAACC,8BACOF,GACJN,GAAIA,EACJD,IAAKA,EACLE,QAASA,EACTC,KAAMA,EACNC,KAAMA,EACNC,0BAA2BA,EAC3BK,OAAQJ,EAAe,cAAWK,EAClCC,IAAKN,EAAe,2BAAwBK"}
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
- declare type CheckboxFieldProps = Omit<JSX.IntrinsicElements['input'], 'type'> & {
1
+ import * as React from 'react';
2
+ declare type CheckboxFieldProps = Omit<JSX.IntrinsicElements['input'], 'type' | 'className'> & {
3
3
  label?: string;
4
4
  indeterminate?: boolean;
5
5
  };
6
- declare function CheckboxField({ label, className, style, checked, indeterminate, ...props }: CheckboxFieldProps): JSX.Element;
6
+ declare const CheckboxField: React.ForwardRefExoticComponent<Pick<CheckboxFieldProps, "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "pattern" | "placeholder" | "readOnly" | "required" | "size" | "src" | "step" | "value" | "width" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "label" | "indeterminate"> & React.RefAttributes<HTMLInputElement>>;
7
7
  export { CheckboxField };
8
8
  export type { CheckboxFieldProps };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),r=require("../box/box.js"),a=require("reakit/VisuallyHidden"),t=require("./checkbox-icon.js"),c=require("./checkbox-field.module.css.js");exports.CheckboxField=function(n){var i,s=n.label,d=n.className,o=n.style,u=n.checked,b=n.indeterminate,m=void 0!==b&&b,h=e.objectWithoutPropertiesLoose(n,["label","className","style","checked","indeterminate"]);s||h["aria-label"]||h["aria-labelledby"]||console.warn("A Checkbox needs a label");var k=l.useRef(null);return l.useEffect((function(){k.current&&(k.current.indeterminate=m)}),[m]),l.createElement(r.Box,{component:"label",display:"flex",alignItems:"center",className:[d,c.default.container,(i={},i[c.default.checked]=u,i),"focus-marker-enabled-within"],style:o},l.createElement(a.VisuallyHidden,null,l.createElement("input",Object.assign({},h,{ref:k,type:"checkbox",checked:u}))),l.createElement(t.CheckboxIcon,{"aria-hidden":!0,checked:u,indeterminate:m,disabled:h.disabled}),s?l.createElement("span",null,s):null)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),n=require("../box/box.js"),t=require("../hidden-visually/hidden-visually.js"),a=require("../text/text.js"),r=require("reakit-utils"),i=require("./checkbox-icon.js"),c=require("./checkbox-field.module.css.js"),d=["label","disabled","indeterminate","defaultChecked","onChange"];exports.CheckboxField=l.forwardRef((function(o,u){var s,b,h,f=o.label,k=o.disabled,x=o.indeterminate,m=o.defaultChecked,p=o.onChange,v=e.objectWithoutPropertiesLoose(o,d);"boolean"!=typeof x||"boolean"==typeof v.checked||(console.warn("Cannot use indeterminate on an uncontrolled checkbox"),x=void 0),f||v["aria-label"]||v["aria-labelledby"]||console.warn("A Checkbox needs a label");var y=l.useState(null!==(s=null!==(b=v.checked)&&void 0!==b?b:m)&&void 0!==s&&s),j=y[1],C=null!==(h=v.checked)&&void 0!==h?h:y[0],q=l.useRef(null),g=r.useForkRef(q,u);return l.useEffect((function(){q.current&&"boolean"==typeof x&&(q.current.indeterminate=x)}),[x]),l.createElement(n.Box,{as:"label",display:"flex",alignItems:"center",className:[c.default.container,k?c.default.disabled:null,C?c.default.checked:null,"focus-marker-enabled-within"]},l.createElement(t.HiddenVisually,null,l.createElement("input",Object.assign({},v,{ref:g,type:"checkbox",checked:C,disabled:k,onChange:function(e){null==p||p(e),e.defaultPrevented||j(e.currentTarget.checked)}}))),l.createElement(i.CheckboxIcon,{"aria-hidden":!0,checked:C,indeterminate:x,disabled:k}),f?l.createElement(a.Text,null,f):null)}));
2
2
  //# sourceMappingURL=checkbox-field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-field.js","sources":["../../../src/new-components/checkbox-field/checkbox-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { VisuallyHidden } from 'reakit/VisuallyHidden'\nimport { Box } from '../box'\nimport { CheckboxIcon } from './checkbox-icon'\n\nimport styles from './checkbox-field.module.css'\n\ntype CheckboxFieldProps = Omit<JSX.IntrinsicElements['input'], 'type'> & {\n label?: string\n indeterminate?: boolean\n}\n\nfunction CheckboxField({\n label,\n className,\n style,\n checked,\n indeterminate = false,\n ...props\n}: CheckboxFieldProps) {\n if (!label && !props['aria-label'] && !props['aria-labelledby']) {\n // eslint-disable-next-line no-console\n console.warn('A Checkbox needs a label')\n }\n\n const checkboxRef = React.useRef<HTMLInputElement>(null)\n React.useEffect(\n function setIndeterminate() {\n if (checkboxRef.current) {\n checkboxRef.current.indeterminate = indeterminate\n }\n },\n [indeterminate],\n )\n\n return (\n <Box\n component=\"label\"\n display=\"flex\"\n alignItems=\"center\"\n className={[\n className,\n styles.container,\n { [styles.checked]: checked },\n 'focus-marker-enabled-within',\n ]}\n style={style}\n >\n <VisuallyHidden>\n <input {...props} ref={checkboxRef} type=\"checkbox\" checked={checked} />\n </VisuallyHidden>\n <CheckboxIcon\n aria-hidden\n checked={checked}\n indeterminate={indeterminate}\n disabled={props.disabled}\n />\n {label ? <span>{label}</span> : null}\n </Box>\n )\n}\n\nexport { CheckboxField }\nexport type { CheckboxFieldProps }\n"],"names":["label","className","style","checked","indeterminate","props","console","warn","checkboxRef","React","current","Box","component","display","alignItems","styles","container","VisuallyHidden","ref","type","CheckboxIcon","disabled"],"mappings":"oTAYA,kBACIA,IAAAA,MACAC,IAAAA,UACAC,IAAAA,MACAC,IAAAA,YACAC,cAAAA,gBACGC,4FAEEL,GAAUK,EAAM,eAAkBA,EAAM,oBAEzCC,QAAQC,KAAK,gCAGXC,EAAcC,SAA+B,aACnDA,aACI,WACQD,EAAYE,UACZF,EAAYE,QAAQN,cAAgBA,KAG5C,CAACA,IAIDK,gBAACE,OACGC,UAAU,QACVC,QAAQ,OACRC,WAAW,SACXb,UAAW,CACPA,EACAc,UAAOC,kBACJD,UAAOZ,SAAUA,KACpB,+BAEJD,MAAOA,GAEPO,gBAACQ,sBACGR,yCAAWJ,GAAOa,IAAKV,EAAaW,KAAK,WAAWhB,QAASA,MAEjEM,gBAACW,iCAEGjB,QAASA,EACTC,cAAeA,EACfiB,SAAUhB,EAAMgB,WAEnBrB,EAAQS,4BAAOT,GAAgB"}
1
+ {"version":3,"file":"checkbox-field.js","sources":["../../../src/new-components/checkbox-field/checkbox-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useForkRef } from 'reakit-utils'\nimport { HiddenVisually } from '../hidden-visually'\nimport { Box } from '../box'\nimport { Text } from '../text'\nimport { CheckboxIcon } from './checkbox-icon'\n\nimport styles from './checkbox-field.module.css'\n\ntype CheckboxFieldProps = Omit<JSX.IntrinsicElements['input'], 'type' | 'className'> & {\n label?: string\n indeterminate?: boolean\n}\n\nconst CheckboxField = React.forwardRef<HTMLInputElement, CheckboxFieldProps>(function CheckboxField(\n { label, disabled, indeterminate, defaultChecked, onChange, ...props },\n ref,\n) {\n const isControlledComponent = typeof props.checked === 'boolean'\n if (typeof indeterminate === 'boolean' && !isControlledComponent) {\n // eslint-disable-next-line no-console\n console.warn('Cannot use indeterminate on an uncontrolled checkbox')\n indeterminate = undefined\n }\n\n if (!label && !props['aria-label'] && !props['aria-labelledby']) {\n // eslint-disable-next-line no-console\n console.warn('A Checkbox needs a label')\n }\n\n const [checkedState, setChecked] = React.useState(props.checked ?? defaultChecked ?? false)\n const isChecked = props.checked ?? checkedState\n\n const internalRef = React.useRef<HTMLInputElement>(null)\n const combinedRef = useForkRef(internalRef, ref)\n React.useEffect(\n function setIndeterminate() {\n if (internalRef.current && typeof indeterminate === 'boolean') {\n internalRef.current.indeterminate = indeterminate\n }\n },\n [indeterminate],\n )\n\n return (\n <Box\n as=\"label\"\n display=\"flex\"\n alignItems=\"center\"\n className={[\n styles.container,\n disabled ? styles.disabled : null,\n isChecked ? styles.checked : null,\n 'focus-marker-enabled-within',\n ]}\n >\n <HiddenVisually>\n <input\n {...props}\n ref={combinedRef}\n type=\"checkbox\"\n checked={isChecked}\n disabled={disabled}\n onChange={(event) => {\n onChange?.(event)\n if (!event.defaultPrevented) {\n setChecked(event.currentTarget.checked)\n }\n }}\n />\n </HiddenVisually>\n <CheckboxIcon\n aria-hidden\n checked={isChecked}\n indeterminate={indeterminate}\n disabled={disabled}\n />\n {label ? <Text>{label}</Text> : null}\n </Box>\n )\n})\n\nexport { CheckboxField }\nexport type { CheckboxFieldProps }\n"],"names":["React","ref","label","disabled","indeterminate","defaultChecked","onChange","props","checked","console","warn","undefined","setChecked","isChecked","internalRef","combinedRef","useForkRef","current","Box","as","display","alignItems","className","styles","container","HiddenVisually","type","event","defaultPrevented","currentTarget","CheckboxIcon","Text"],"mappings":"8bAcsBA,cAAuD,WAEzEC,aADEC,IAAAA,MAAOC,IAAAA,SAAUC,IAAAA,cAAeC,IAAAA,eAAgBC,IAAAA,SAAaC,sCAIlC,kBAAlBH,GAD4C,kBAAlBG,EAAMC,UAGvCC,QAAQC,KAAK,wDACbN,OAAgBO,GAGfT,GAAUK,EAAM,eAAkBA,EAAM,oBAEzCE,QAAQC,KAAK,kCAGkBV,+BAAeO,EAAMC,uBAAWH,mBAA9CO,OACfC,YAAYN,EAAMC,4BAElBM,EAAcd,SAA+B,MAC7Ce,EAAcC,aAAWF,EAAab,UAC5CD,aACI,WACQc,EAAYG,SAAoC,kBAAlBb,IAC9BU,EAAYG,QAAQb,cAAgBA,KAG5C,CAACA,IAIDJ,gBAACkB,OACGC,GAAG,QACHC,QAAQ,OACRC,WAAW,SACXC,UAAW,CACPC,UAAOC,UACPrB,EAAWoB,UAAOpB,SAAW,KAC7BU,EAAYU,UAAOf,QAAU,KAC7B,gCAGJR,gBAACyB,sBACGzB,yCACQO,GACJN,IAAKc,EACLW,KAAK,WACLlB,QAASK,EACTV,SAAUA,EACVG,SAAU,SAACqB,GACPrB,MAAAA,GAAAA,EAAWqB,GACNA,EAAMC,kBACPhB,EAAWe,EAAME,cAAcrB,cAK/CR,gBAAC8B,iCAEGtB,QAASK,EACTT,cAAeA,EACfD,SAAUA,IAEbD,EAAQF,gBAAC+B,YAAM7B,GAAgB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={container:"_6ba70fbf",checked:"_13189b71"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={container:"f9e0a1b8",disabled:"_01411889",checked:"ffdfd8fb"};
2
2
  //# sourceMappingURL=checkbox-field.module.css.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),a=require("react"),t={checked:"M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z",unchecked:"M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z",mixed:"M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2 7H8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2z",filled:"M6 4H18C19.1046 4 20 4.89543 20 6V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4Z"};exports.CheckboxIcon=function(i){var r,d=i.checked,l=i.indeterminate,c=i.disabled,n=e.objectWithoutPropertiesLoose(i,["checked","indeterminate","disabled"]),h=(r={checked:d,indeterminate:l,disabled:c}).indeterminate?"mixed":r.checked?"checked":r.disabled?"filled":"unchecked";return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},n),a.createElement("path",{fill:"currentColor",fillRule:"nonzero",d:t[h]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),a=require("react"),t=["checked","indeterminate","disabled"],i={checked:"M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z",unchecked:"M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z",mixed:"M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2 7H8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2z",filled:"M6 4H18C19.1046 4 20 4.89543 20 6V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4Z"};exports.CheckboxIcon=function(r){var d,l=r.checked,c=r.indeterminate,n=r.disabled,h=e.objectWithoutPropertiesLoose(r,t),o=(d={checked:l,indeterminate:c,disabled:n}).indeterminate?"mixed":d.checked?"checked":d.disabled?"filled":"unchecked";return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},h),a.createElement("path",{fill:"currentColor",fillRule:"nonzero",d:i[o]}))};
2
2
  //# sourceMappingURL=checkbox-icon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-icon.js","sources":["../../../src/new-components/checkbox-field/checkbox-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nconst svgPath = {\n checked:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z',\n unchecked:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z',\n mixed:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2 7H8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2z',\n filled:\n 'M6 4H18C19.1046 4 20 4.89543 20 6V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4Z',\n} as const\n\ntype Props = React.SVGProps<SVGSVGElement> & {\n checked?: boolean\n indeterminate?: boolean\n disabled?: boolean\n}\n\nfunction getPathKey({ checked, indeterminate, disabled }: Props): keyof typeof svgPath {\n if (indeterminate) {\n return 'mixed' // indeterminate, when true, overrides the checked state\n }\n\n if (checked) {\n return 'checked'\n }\n\n // We only used 'filled' when unchecked AND disabled, because the default unchecked icon\n // is not enough to convey the disabled state with opacity alone. For all other cases\n // above, when disabled, we use the same icon the corresponds to that state, and the\n // opacity conveys the fact that the checkbox is disabled.\n // See https://twist.com/a/1585/ch/414345/t/2257308/c/65201390\n if (disabled) {\n return 'filled'\n }\n\n return 'unchecked'\n}\n\nfunction CheckboxIcon({ checked, indeterminate, disabled, ...props }: Props) {\n const pathKey = getPathKey({ checked, indeterminate, disabled })\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path fill=\"currentColor\" fillRule=\"nonzero\" d={svgPath[pathKey]} />\n </svg>\n )\n}\n\nexport { CheckboxIcon }\n"],"names":["svgPath","checked","unchecked","mixed","filled","indeterminate","disabled","props","pathKey","React","xmlns","width","height","viewBox","fill","fillRule","d"],"mappings":"oJAEMA,EAAU,CACZC,QACI,4LACJC,UACI,kJACJC,MACI,iHACJC,OACI,gJA8BR,kBAAwBH,IAAAA,QAASI,IAAAA,cAAeC,IAAAA,SAAaC,2EACnDC,KAAqB,CAAEP,QAAAA,EAASI,cAAAA,EAAeC,SAAAA,IAtB1BD,cAEhB,UAFOJ,QAMP,YAN+BK,SAe/B,SAGJ,mBAMHG,qCACIC,MAAM,6BACNC,MAAM,KACNC,OAAO,KACPC,QAAQ,aACJN,GAEJE,wBAAMK,KAAK,eAAeC,SAAS,UAAUC,EAAGhB,EAAQQ"}
1
+ {"version":3,"file":"checkbox-icon.js","sources":["../../../src/new-components/checkbox-field/checkbox-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nconst svgPath = {\n checked:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z',\n unchecked:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z',\n mixed:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2 7H8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2z',\n filled:\n 'M6 4H18C19.1046 4 20 4.89543 20 6V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4Z',\n} as const\n\ntype Props = React.SVGProps<SVGSVGElement> & {\n checked?: boolean\n indeterminate?: boolean\n disabled?: boolean\n}\n\nfunction getPathKey({ checked, indeterminate, disabled }: Props): keyof typeof svgPath {\n if (indeterminate) {\n return 'mixed' // indeterminate, when true, overrides the checked state\n }\n\n if (checked) {\n return 'checked'\n }\n\n // We only used 'filled' when unchecked AND disabled, because the default unchecked icon\n // is not enough to convey the disabled state with opacity alone. For all other cases\n // above, when disabled, we use the same icon the corresponds to that state, and the\n // opacity conveys the fact that the checkbox is disabled.\n // See https://twist.com/a/1585/ch/414345/t/2257308/c/65201390\n if (disabled) {\n return 'filled'\n }\n\n return 'unchecked'\n}\n\nfunction CheckboxIcon({ checked, indeterminate, disabled, ...props }: Props) {\n const pathKey = getPathKey({ checked, indeterminate, disabled })\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path fill=\"currentColor\" fillRule=\"nonzero\" d={svgPath[pathKey]} />\n </svg>\n )\n}\n\nexport { CheckboxIcon }\n"],"names":["svgPath","checked","unchecked","mixed","filled","indeterminate","disabled","props","pathKey","React","xmlns","width","height","viewBox","fill","fillRule","d"],"mappings":"6LAEMA,EAAU,CACZC,QACI,4LACJC,UACI,kJACJC,MACI,iHACJC,OACI,gJA8BR,kBAAwBH,IAAAA,QAASI,IAAAA,cAAeC,IAAAA,SAAaC,sCACnDC,KAAqB,CAAEP,QAAAA,EAASI,cAAAA,EAAeC,SAAAA,IAtB1BD,cAEhB,UAFOJ,QAMP,YAN+BK,SAe/B,SAGJ,mBAMHG,qCACIC,MAAM,6BACNC,MAAM,KACNC,OAAO,KACPC,QAAQ,aACJN,GAEJE,wBAAMK,KAAK,eAAeC,SAAS,UAAUC,EAAGhB,EAAQQ"}
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import type { ResponsiveProp, ResponsiveBreakpoints } from '../responsive-props';
3
2
  import type { Space } from '../common-types';
4
3
  import type { ReusableBoxProps } from '../box';
@@ -6,16 +5,16 @@ declare type ColumnWidth = 'auto' | 'content' | '1/2' | '1/3' | '2/3' | '1/4' |
6
5
  interface ColumnProps {
7
6
  width?: ColumnWidth;
8
7
  }
9
- declare const Column: import("../type-helpers").ForwardRefComponentWithAs<ColumnProps, React.ElementType<any>>;
8
+ declare const Column: import("../../utils/polymorphism").PolymorphicComponent<"div", ColumnProps, "obfuscateClassName">;
10
9
  declare type ColumnsHorizontalAlignment = 'left' | 'center' | 'right';
11
- declare type ColumnsVerticalAlignment = 'top' | 'center' | 'bottom';
12
- declare type ColumnsCollapseBelow = ResponsiveBreakpoints;
10
+ declare type ColumnsVerticalAlignment = 'top' | 'center' | 'bottom' | 'baseline';
11
+ declare type ColumnsCollapseBelow = Exclude<ResponsiveBreakpoints, 'mobile'>;
13
12
  interface ColumnsProps extends ReusableBoxProps {
14
13
  space?: ResponsiveProp<Space>;
15
14
  align?: ResponsiveProp<ColumnsHorizontalAlignment>;
16
15
  alignY?: ResponsiveProp<ColumnsVerticalAlignment>;
17
16
  collapseBelow?: ResponsiveBreakpoints;
18
17
  }
19
- declare const Columns: import("../type-helpers").ForwardRefComponentWithAs<ColumnsProps, React.ElementType<any>>;
18
+ declare const Columns: import("../../utils/polymorphism").PolymorphicComponent<"div", ColumnsProps, "obfuscateClassName">;
20
19
  export type { ColumnProps, ColumnsProps, ColumnWidth, ColumnsCollapseBelow, ColumnsHorizontalAlignment, ColumnsVerticalAlignment, };
21
20
  export { Column, Columns };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),r=require("../type-helpers.js"),o=require("../responsive-props.js"),l=require("../box/box.js"),n=require("./columns.module.css.js"),s=r.forwardRefWithAs((function(r,s){var i=r.width,a=void 0===i?"auto":i,c=r.children,u=e.objectWithoutPropertiesLoose(r,["component","width","children"]);return t.createElement(l.Box,Object.assign({className:[n.default.column,"content"!==a?o.getClassNames(n.default,"columnWidth",a.replace("/","-")):null],minWidth:0,width:"content"!==a?"full":void 0,flexShrink:"content"===a?0:void 0,ref:s},u),c)})),i=r.forwardRefWithAs((function(r,s){var i=r.space,a=r.align,c=r.alignY,u=r.collapseBelow,p=r.children,d=e.objectWithoutPropertiesLoose(r,["space","align","alignY","collapseBelow","children"]);return t.createElement(l.Box,Object.assign({},d,{className:o.getClassNames(n.default,"space",i),flexDirection:"desktop"===u?["column","column","row"]:"tablet"===u?["column","row"]:"row",display:"flex",alignItems:o.mapResponsiveProp(c,(function(e){return"top"===e?"flexStart":"bottom"===e?"flexEnd":"center"})),justifyContent:o.mapResponsiveProp(a,(function(e){return"left"===e?"flexStart":"right"===e?"flexEnd":"center"})),ref:s}),p)}));exports.Column=s,exports.Columns=i;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),l=require("../../utils/polymorphism.js"),o=require("../responsive-props.js"),r=require("../box/box.js"),s=require("./columns.module.css.js"),i=["width","children","exceptionallySetClassName"],n=["space","align","alignY","collapseBelow","children","exceptionallySetClassName"],a=l.polymorphicComponent((function(l,n){var a=l.width,c=void 0===a?"auto":a,p=l.children,u=l.exceptionallySetClassName,m=e.objectWithoutPropertiesLoose(l,i);return t.createElement(r.Box,Object.assign({},m,{className:[u,s.default.column,"content"!==c?o.getClassNames(s.default,"columnWidth",c.replace("/","-")):null],minWidth:0,width:"content"!==c?"full":void 0,height:"full",flexShrink:"content"===c?0:void 0,ref:n}),p)})),c=l.polymorphicComponent((function(l,i){var a=l.space,c=l.align,p=void 0===c?"left":c,u=l.alignY,m=void 0===u?"top":u,d=l.collapseBelow,f=l.children,h=l.exceptionallySetClassName,x=e.objectWithoutPropertiesLoose(l,n);return t.createElement(r.Box,Object.assign({},x,{className:[h,o.getClassNames(s.default,"space",a)],display:"flex",flexDirection:"desktop"===d?{mobile:"column",tablet:"column",desktop:"row"}:"tablet"===d?{mobile:"column",tablet:"row"}:"row",alignItems:o.mapResponsiveProp(m,(function(e){return"top"===e?"flexStart":"bottom"===e?"flexEnd":e})),justifyContent:o.mapResponsiveProp(p,(function(e){return"left"===e?"flexStart":"right"===e?"flexEnd":e})),ref:i}),f)}));exports.Column=a,exports.Columns=c;
2
2
  //# sourceMappingURL=columns.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"columns.js","sources":["../../../src/new-components/columns/columns.tsx"],"sourcesContent":["import * as React from 'react'\nimport { forwardRefWithAs } from '../type-helpers'\nimport { getClassNames, mapResponsiveProp } from '../responsive-props'\nimport { Box } from '../box'\n\nimport type { ResponsiveProp, ResponsiveBreakpoints } from '../responsive-props'\nimport type { Space } from '../common-types'\nimport type { ReusableBoxProps } from '../box'\n\nimport styles from './columns.module.css'\n\ntype ColumnWidth =\n | 'auto'\n | 'content'\n | '1/2'\n | '1/3'\n | '2/3'\n | '1/4'\n | '3/4'\n | '1/5'\n | '2/5'\n | '3/5'\n | '4/5'\n\ninterface ColumnProps {\n width?: ColumnWidth\n}\n\nconst Column = forwardRefWithAs<ColumnProps>(function Column(\n { component, width = 'auto', children, ...props },\n ref,\n) {\n return (\n <Box\n className={[\n styles.column,\n width !== 'content'\n ? getClassNames(styles, 'columnWidth', width.replace('/', '-'))\n : null,\n ]}\n minWidth={0}\n width={width !== 'content' ? 'full' : undefined}\n flexShrink={width === 'content' ? 0 : undefined}\n ref={ref}\n {...props}\n >\n {children}\n </Box>\n )\n})\n\ntype ColumnsHorizontalAlignment = 'left' | 'center' | 'right'\ntype ColumnsVerticalAlignment = 'top' | 'center' | 'bottom'\ntype ColumnsCollapseBelow = ResponsiveBreakpoints\n\ninterface ColumnsProps extends ReusableBoxProps {\n space?: ResponsiveProp<Space>\n align?: ResponsiveProp<ColumnsHorizontalAlignment>\n alignY?: ResponsiveProp<ColumnsVerticalAlignment>\n collapseBelow?: ResponsiveBreakpoints\n}\n\nconst Columns = forwardRefWithAs<ColumnsProps>(function Columns(\n { space, align, alignY, collapseBelow, children, ...props },\n ref,\n) {\n return (\n <Box\n {...props}\n className={getClassNames(styles, 'space', space)}\n flexDirection={\n collapseBelow === 'desktop'\n ? ['column', 'column', 'row']\n : collapseBelow === 'tablet'\n ? ['column', 'row']\n : 'row'\n }\n display=\"flex\"\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 ref={ref}\n >\n {children}\n </Box>\n )\n})\n\nexport type {\n ColumnProps,\n ColumnsProps,\n ColumnWidth,\n ColumnsCollapseBelow,\n ColumnsHorizontalAlignment,\n ColumnsVerticalAlignment,\n}\n\nexport { Column, Columns }\n"],"names":["Column","forwardRefWithAs","ref","width","children","props","React","Box","className","styles","column","getClassNames","replace","minWidth","undefined","flexShrink","Columns","space","align","alignY","collapseBelow","flexDirection","display","alignItems","mapResponsiveProp","justifyContent"],"mappings":"wRA4BMA,EAASC,oBAA8B,WAEzCC,WADaC,MAAAA,aAAQ,SAAQC,IAAAA,SAAaC,4EAItCC,gBAACC,qBACGC,UAAW,CACPC,UAAOC,OACG,YAAVP,EACMQ,gBAAcF,UAAQ,cAAeN,EAAMS,QAAQ,IAAK,MACxD,MAEVC,SAAU,EACVV,MAAiB,YAAVA,EAAsB,YAASW,EACtCC,WAAsB,YAAVZ,EAAsB,OAAIW,EACtCZ,IAAKA,GACDG,GAEHD,MAgBPY,EAAUf,oBAA+B,WAE3CC,OADEe,IAAAA,MAAOC,IAAAA,MAAOC,IAAAA,OAAQC,IAAAA,cAAehB,IAAAA,SAAaC,iGAIhDC,gBAACC,uBACOF,GACJG,UAAWG,gBAAcF,UAAQ,QAASQ,GAC1CI,cACsB,YAAlBD,EACM,CAAC,SAAU,SAAU,OACH,WAAlBA,EACA,CAAC,SAAU,OACX,MAEVE,QAAQ,OACRC,WAAYC,oBAAkBL,GAAQ,SAACA,SACxB,QAAXA,EAAmB,YAAyB,WAAXA,EAAsB,UAAY,YAEvEM,eAAgBD,oBAAkBN,GAAO,SAACA,SAC5B,SAAVA,EAAmB,YAAwB,UAAVA,EAAoB,UAAY,YAErEhB,IAAKA,IAEJE"}
1
+ {"version":3,"file":"columns.js","sources":["../../../src/new-components/columns/columns.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { getClassNames, mapResponsiveProp } from '../responsive-props'\nimport { Box } from '../box'\n\nimport type { ResponsiveProp, ResponsiveBreakpoints } from '../responsive-props'\nimport type { Space } from '../common-types'\nimport type { ReusableBoxProps } from '../box'\n\nimport styles from './columns.module.css'\n\ntype ColumnWidth =\n | 'auto'\n | 'content'\n | '1/2'\n | '1/3'\n | '2/3'\n | '1/4'\n | '3/4'\n | '1/5'\n | '2/5'\n | '3/5'\n | '4/5'\n\ninterface ColumnProps {\n width?: ColumnWidth\n}\n\nconst Column = polymorphicComponent<'div', ColumnProps>(function Column(\n { width = 'auto', children, exceptionallySetClassName, ...props },\n ref,\n) {\n return (\n <Box\n {...props}\n className={[\n exceptionallySetClassName,\n styles.column,\n width !== 'content'\n ? getClassNames(styles, 'columnWidth', width.replace('/', '-'))\n : null,\n ]}\n minWidth={0}\n width={width !== 'content' ? 'full' : undefined}\n height=\"full\"\n flexShrink={width === 'content' ? 0 : undefined}\n ref={ref}\n >\n {children}\n </Box>\n )\n})\n\ntype ColumnsHorizontalAlignment = 'left' | 'center' | 'right'\ntype ColumnsVerticalAlignment = 'top' | 'center' | 'bottom' | 'baseline'\ntype ColumnsCollapseBelow = Exclude<ResponsiveBreakpoints, 'mobile'>\n\ninterface ColumnsProps extends ReusableBoxProps {\n space?: ResponsiveProp<Space>\n align?: ResponsiveProp<ColumnsHorizontalAlignment>\n alignY?: ResponsiveProp<ColumnsVerticalAlignment>\n collapseBelow?: ResponsiveBreakpoints\n}\n\nconst Columns = polymorphicComponent<'div', ColumnsProps>(function Columns(\n {\n space,\n align = 'left',\n alignY = 'top',\n collapseBelow,\n children,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n return (\n <Box\n {...props}\n className={[exceptionallySetClassName, getClassNames(styles, 'space', space)]}\n display=\"flex\"\n flexDirection={\n collapseBelow === 'desktop'\n ? { mobile: 'column', tablet: 'column', desktop: 'row' }\n : collapseBelow === 'tablet'\n ? { mobile: 'column', tablet: 'row' }\n : 'row'\n }\n alignItems={mapResponsiveProp(alignY, (alignY) =>\n alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' : alignY,\n )}\n justifyContent={mapResponsiveProp(align, (align) =>\n align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : align,\n )}\n ref={ref}\n >\n {children}\n </Box>\n )\n})\n\nexport type {\n ColumnProps,\n ColumnsProps,\n ColumnWidth,\n ColumnsCollapseBelow,\n ColumnsHorizontalAlignment,\n ColumnsVerticalAlignment,\n}\n\nexport { Column, Columns }\n"],"names":["Column","polymorphicComponent","ref","width","children","exceptionallySetClassName","props","React","Box","className","styles","column","getClassNames","replace","minWidth","undefined","height","flexShrink","Columns","space","align","alignY","collapseBelow","display","flexDirection","mobile","tablet","desktop","alignItems","mapResponsiveProp","justifyContent"],"mappings":"waA4BMA,EAASC,wBAAyC,WAEpDC,WADEC,MAAAA,aAAQ,SAAQC,IAAAA,SAAUC,IAAAA,0BAA8BC,6CAItDC,gBAACC,uBACOF,GACJG,UAAW,CACPJ,EACAK,UAAOC,OACG,YAAVR,EACMS,gBAAcF,UAAQ,cAAeP,EAAMU,QAAQ,IAAK,MACxD,MAEVC,SAAU,EACVX,MAAiB,YAAVA,EAAsB,YAASY,EACtCC,OAAO,OACPC,WAAsB,YAAVd,EAAsB,OAAIY,EACtCb,IAAKA,IAEJE,MAgBPc,EAAUjB,wBAA0C,WAUtDC,OARIiB,IAAAA,UACAC,MAAAA,aAAQ,aACRC,OAAAA,aAAS,QACTC,IAAAA,cACAlB,IAAAA,SACAC,IAAAA,0BACGC,6CAKHC,gBAACC,uBACOF,GACJG,UAAW,CAACJ,EAA2BO,gBAAcF,UAAQ,QAASS,IACtEI,QAAQ,OACRC,cACsB,YAAlBF,EACM,CAAEG,OAAQ,SAAUC,OAAQ,SAAUC,QAAS,OAC7B,WAAlBL,EACA,CAAEG,OAAQ,SAAUC,OAAQ,OAC5B,MAEVE,WAAYC,oBAAkBR,GAAQ,SAACA,SACxB,QAAXA,EAAmB,YAAyB,WAAXA,EAAsB,UAAYA,KAEvES,eAAgBD,oBAAkBT,GAAO,SAACA,SAC5B,SAAVA,EAAmB,YAAwB,UAAVA,EAAoB,UAAYA,KAErElB,IAAKA,IAEJE"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={"space-xsmall":"_404dd1d2",column:"ba843812","space-small":"_68f43f2f","space-medium":"_56c030a5","space-large":"_68ba4cde","space-xlarge":"d0bbcce8","space-xxlarge":"cffd4d47","tablet-space-xsmall":"_9f5eab66","tablet-space-small":"_87cfd3ad","tablet-space-medium":"_77aa72c8","tablet-space-large":"_8c23eb98","tablet-space-xlarge":"_46a0eb6f","tablet-space-xxlarge":"_392aadd9","desktop-space-xsmall":"cb9101af","desktop-space-small":"fd2027f1","desktop-space-medium":"f2556874","desktop-space-large":"f384b196","desktop-space-xlarge":"_70eeac35","desktop-space-xxlarge":"_38ebe435","columnWidth-auto":"fb022b2e","columnWidth-1-2":"f80b1c59","columnWidth-1-3":"_29dbf9cb","columnWidth-2-3":"f928dd14","columnWidth-1-4":"dae94143","columnWidth-3-4":"_1896fe55","columnWidth-1-5":"a20fe1a9","columnWidth-2-5":"d8316fb5","columnWidth-3-5":"_2add1195","columnWidth-4-5":"_17e07039","tablet-tablet-space-xsmall":"c3b80a0f"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={"space-xsmall":"_6f59c771",column:"_91e05f0f","space-small":"_5a55af26","space-medium":"fa261310","space-large":"_6ebd4e46","space-xlarge":"_55ce4aea","space-xxlarge":"_04c9c3ac","tablet-space-xsmall":"ab76d8cd","tablet-space-small":"_14629bfb","tablet-space-medium":"_5b4e39ea","tablet-space-large":"ba270182","tablet-space-xlarge":"b96e7ec7","tablet-space-xxlarge":"d276612c","desktop-space-xsmall":"d7a73106","desktop-space-small":"_8f5e0e9e","desktop-space-medium":"_3a168411","desktop-space-large":"_0abcc12e","desktop-space-xlarge":"e0bafc60","desktop-space-xxlarge":"d2df9afd","columnWidth-auto":"b18d0b47","columnWidth-1-2":"_102a6b27","columnWidth-1-3":"_829872fe","columnWidth-2-3":"cf5aef9a","columnWidth-1-4":"_931bf714","columnWidth-3-4":"b0303130","columnWidth-1-5":"f6589a6f","columnWidth-2-5":"_2823aed9","columnWidth-3-5":"d00ba3bb","columnWidth-4-5":"_338f2d7c","tablet-tablet-space-xsmall":"_06582234"};
2
2
  //# sourceMappingURL=columns.module.css.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,10 @@
1
1
  import classNames from 'classnames';
2
2
  import type { HTMLAttributes } from 'react';
3
3
  export declare type Space = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
4
+ export declare type SpaceWithNegatives = Space | '-xsmall' | '-small' | '-medium' | '-large' | '-xlarge' | '-xxlarge';
4
5
  export declare type Tone = 'normal' | 'secondary' | 'danger';
5
6
  export declare type AlertTone = 'info' | 'positive' | 'caution' | 'critical';
7
+ export declare type DividerWeight = 'primary' | 'secondary' | 'tertiary' | 'none';
6
8
  declare type ClassValue = Parameters<typeof classNames>[number];
7
9
  export declare type WithEnhancedClassName<T = unknown> = T extends HTMLElement ? Omit<HTMLAttributes<T>, 'className'> & {
8
10
  className?: ClassValue;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- declare type DividerWeight = 'regular' | 'strong';
2
+ import type { DividerWeight } from '../common-types';
3
3
  interface DividerProps {
4
- weight?: DividerWeight;
4
+ weight?: Exclude<DividerWeight, 'none'>;
5
5
  }
6
6
  declare function Divider({ weight, ...props }: DividerProps): JSX.Element;
7
7
  export type { DividerProps, DividerWeight };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),i=require("../responsive-props.js"),s=require("../box/box.js"),t=require("./divider.module.css.js");exports.Divider=function(o){var u=o.weight,l=void 0===u?"regular":u,a=e.objectWithoutPropertiesLoose(o,["weight"]);return r.createElement(s.Box,Object.assign({component:"hr",className:[t.default.divider,"regular"!==l?i.getClassNames(t.default,"weight",l):null]},a))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),s=require("../responsive-props.js"),t=require("../box/box.js"),i=require("./divider.module.css.js"),o=["weight"];exports.Divider=function(u){var a=u.weight,l=void 0===a?"tertiary":a,c=e.objectWithoutPropertiesLoose(u,o);return r.createElement(t.Box,Object.assign({as:"hr",className:s.getClassNames(i.default,"weight",l)},c))};
2
2
  //# sourceMappingURL=divider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider.js","sources":["../../../src/new-components/divider/divider.tsx"],"sourcesContent":["import * as React from 'react'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\n\nimport styles from './divider.module.css'\n\ntype DividerWeight = 'regular' | 'strong'\n\ninterface DividerProps {\n weight?: DividerWeight\n}\n\nfunction Divider({ weight = 'regular', ...props }: DividerProps) {\n return (\n <Box\n component=\"hr\"\n className={[\n styles.divider,\n weight !== 'regular' ? getClassNames(styles, 'weight', weight) : null,\n ]}\n {...props}\n />\n )\n}\n\nexport type { DividerProps, DividerWeight }\nexport { Divider }\n"],"names":["weight","props","React","Box","component","className","styles","divider","getClassNames"],"mappings":"wQAYA,oBAAmBA,OAAAA,aAAS,YAAcC,sDAElCC,gBAACC,qBACGC,UAAU,KACVC,UAAW,CACPC,UAAOC,QACI,YAAXP,EAAuBQ,gBAAcF,UAAQ,SAAUN,GAAU,OAEjEC"}
1
+ {"version":3,"file":"divider.js","sources":["../../../src/new-components/divider/divider.tsx"],"sourcesContent":["import * as React from 'react'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\nimport type { DividerWeight } from '../common-types'\n\nimport styles from './divider.module.css'\n\ninterface DividerProps {\n weight?: Exclude<DividerWeight, 'none'>\n}\n\nfunction Divider({ weight = 'tertiary', ...props }: DividerProps) {\n return <Box as=\"hr\" className={getClassNames(styles, 'weight', weight)} {...props} />\n}\n\nexport type { DividerProps, DividerWeight }\nexport { Divider }\n"],"names":["weight","props","React","Box","as","className","getClassNames","styles"],"mappings":"qRAWA,oBAAmBA,OAAAA,aAAS,aAAeC,6CAChCC,gBAACC,qBAAIC,GAAG,KAAKC,UAAWC,gBAAcC,UAAQ,SAAUP,IAAaC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={divider:"_9b6c04bf","weight-strong":"_6354eb7c"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={"weight-primary":"_3f3a401c","weight-secondary":"_03b05b70","weight-tertiary":"b6f67ff8"};
2
2
  //# sourceMappingURL=divider.module.css.js.map
@@ -1,16 +1,115 @@
1
1
  import * as React from 'react';
2
+ import type { ObfuscatedClassName } from '../../utils/polymorphism';
2
3
  import type { Tone } from '../common-types';
4
+ import type { BoxProps } from '../box';
3
5
  declare type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6 | '1' | '2' | '3' | '4' | '5' | '6';
4
6
  declare type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
5
7
  declare type SupportedHeadingElementProps = Omit<JSX.IntrinsicElements[HeadingElement], 'className' | 'children'>;
6
8
  declare type HeadingProps = SupportedHeadingElementProps & {
9
+ children: React.ReactNode;
10
+ /**
11
+ * The semantic level of the heading.
12
+ */
7
13
  level: HeadingLevel;
14
+ /**
15
+ * The weight of the heading. Used to de-emphasize the heading visually when using 'light'.
16
+ *
17
+ * @default 'regular'
18
+ */
8
19
  weight?: 'regular' | 'light';
20
+ /**
21
+ * Shifts the default heading visual text size up or down, depending on the original size
22
+ * imposed by the `level`. The heading continues to be semantically at the given level.
23
+ *
24
+ * By default, no value is applied, and the default size from the level is applied. The values
25
+ * have the following effect:
26
+ *
27
+ * - 'smaller' shifts the default level size down in the font-size scale (it tends to make the
28
+ * level look visually as if it were of the immediately lower level).
29
+ * - 'larger' has the opposite effect than 'smaller' shifting the visual font size up in the
30
+ * scale.
31
+ * - 'largest' can be thought of as applying 'larger' twice.
32
+ *
33
+ * @see level
34
+ * @default undefined
35
+ */
9
36
  size?: 'smaller' | 'larger' | 'largest';
37
+ /**
38
+ * The tone (semantic color) of the heading.
39
+ *
40
+ * @default 'normal'
41
+ */
10
42
  tone?: Tone;
11
- children: React.ReactNode;
43
+ /**
44
+ * Used to truncate the heading to a given number of lines.
45
+ *
46
+ * It will add an ellipsis (`…`) to the text at the end of the last line, only if the text was
47
+ * truncated. If the text fits without it being truncated, no ellipsis is added.
48
+ *
49
+ * By default, the text is not truncated at all, no matter how many lines it takes to render it.
50
+ *
51
+ * @default undefined
52
+ */
12
53
  lineClamp?: 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5';
54
+ /**
55
+ * How to align the heading text horizontally.
56
+ *
57
+ * @default 'start'
58
+ */
59
+ align?: BoxProps['textAlign'];
13
60
  };
14
- declare const Heading: React.ForwardRefExoticComponent<Pick<HeadingProps, "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "level" | "weight" | "size" | "tone" | "lineClamp"> & React.RefAttributes<HTMLHeadingElement>>;
61
+ declare const Heading: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
62
+ children: React.ReactNode;
63
+ /**
64
+ * The semantic level of the heading.
65
+ */
66
+ level: HeadingLevel;
67
+ /**
68
+ * The weight of the heading. Used to de-emphasize the heading visually when using 'light'.
69
+ *
70
+ * @default 'regular'
71
+ */
72
+ weight?: "regular" | "light" | undefined;
73
+ /**
74
+ * Shifts the default heading visual text size up or down, depending on the original size
75
+ * imposed by the `level`. The heading continues to be semantically at the given level.
76
+ *
77
+ * By default, no value is applied, and the default size from the level is applied. The values
78
+ * have the following effect:
79
+ *
80
+ * - 'smaller' shifts the default level size down in the font-size scale (it tends to make the
81
+ * level look visually as if it were of the immediately lower level).
82
+ * - 'larger' has the opposite effect than 'smaller' shifting the visual font size up in the
83
+ * scale.
84
+ * - 'largest' can be thought of as applying 'larger' twice.
85
+ *
86
+ * @see level
87
+ * @default undefined
88
+ */
89
+ size?: "smaller" | "larger" | "largest" | undefined;
90
+ /**
91
+ * The tone (semantic color) of the heading.
92
+ *
93
+ * @default 'normal'
94
+ */
95
+ tone?: "normal" | "secondary" | "danger" | undefined;
96
+ /**
97
+ * Used to truncate the heading to a given number of lines.
98
+ *
99
+ * It will add an ellipsis (`…`) to the text at the end of the last line, only if the text was
100
+ * truncated. If the text fits without it being truncated, no ellipsis is added.
101
+ *
102
+ * By default, the text is not truncated at all, no matter how many lines it takes to render it.
103
+ *
104
+ * @default undefined
105
+ */
106
+ lineClamp?: 1 | 2 | 3 | 4 | 5 | "1" | "2" | "3" | "4" | "5" | undefined;
107
+ /**
108
+ * How to align the heading text horizontally.
109
+ *
110
+ * @default 'start'
111
+ */
112
+ align?: BoxProps['textAlign'];
113
+ } & ObfuscatedClassName, "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "level" | "weight" | "size" | "tone" | "lineClamp" | "align" | "exceptionallySetClassName"> & React.RefAttributes<HTMLHeadingElement>>;
15
114
  export type { HeadingProps, HeadingLevel };
16
115
  export { Heading };