@doist/reactist 9.2.0-beta.7 → 10.0.0-beta.10

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 (388) hide show
  1. package/README.md +12 -2
  2. package/dist/reactist.cjs.development.js +1405 -842
  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/components/color-picker/color-picker.js +1 -1
  7. package/es/components/color-picker/color-picker.js.map +1 -1
  8. package/es/components/{button/button.js → deprecated-button/deprecated-button.js} +7 -3
  9. package/es/components/deprecated-button/deprecated-button.js.map +1 -0
  10. package/es/components/{button → deprecated-button}/index.js +1 -1
  11. package/es/components/{button → deprecated-button}/index.js.map +0 -0
  12. package/es/components/{loading/loading.js → deprecated-loading/deprecated-loading.js} +3 -1
  13. package/es/components/deprecated-loading/deprecated-loading.js.map +1 -0
  14. package/es/components/{modal/modal.js → deprecated-modal/deprecated-modal.js} +9 -2
  15. package/es/components/deprecated-modal/deprecated-modal.js.map +1 -0
  16. package/es/components/{modal → deprecated-modal}/index.js +1 -1
  17. package/es/components/deprecated-modal/index.js.map +1 -0
  18. package/es/components/dropdown/dropdown.js +5 -3
  19. package/es/components/dropdown/dropdown.js.map +1 -1
  20. package/es/components/error-message/error-message.js +3 -1
  21. package/es/components/error-message/error-message.js.map +1 -1
  22. package/es/components/keyboard-shortcut/keyboard-shortcut.js +4 -2
  23. package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  24. package/es/components/menu/menu.js +22 -20
  25. package/es/components/menu/menu.js.map +1 -1
  26. package/es/components/range-input/range-input.js +1 -1
  27. package/es/components/range-input/range-input.js.map +1 -1
  28. package/es/components/select/select.js +1 -1
  29. package/es/components/select/select.js.map +1 -1
  30. package/es/hooks/use-previous/use-previous.js +26 -0
  31. package/es/hooks/use-previous/use-previous.js.map +1 -0
  32. package/es/index.js +11 -6
  33. package/es/index.js.map +1 -1
  34. package/es/new-components/base-button/base-button.js +70 -0
  35. package/es/new-components/base-button/base-button.js.map +1 -0
  36. package/es/new-components/base-button/base-button.module.css.js +4 -0
  37. package/es/new-components/base-button/base-button.module.css.js.map +1 -0
  38. package/es/new-components/base-field/base-field.js +29 -29
  39. package/es/new-components/base-field/base-field.js.map +1 -1
  40. package/es/new-components/base-field/base-field.module.css.js +1 -1
  41. package/es/new-components/box/box.js +28 -10
  42. package/es/new-components/box/box.js.map +1 -1
  43. package/es/new-components/box/box.module.css.js +1 -1
  44. package/es/new-components/box/margin.module.css.js +4 -0
  45. package/es/new-components/box/margin.module.css.js.map +1 -0
  46. package/es/new-components/box/padding.module.css.js +4 -0
  47. package/es/new-components/box/padding.module.css.js.map +1 -0
  48. package/es/new-components/button/button.js +40 -0
  49. package/es/new-components/button/button.js.map +1 -0
  50. package/es/new-components/button-link/button-link.js +25 -14
  51. package/es/new-components/button-link/button-link.js.map +1 -1
  52. package/es/new-components/checkbox-field/checkbox-field.js +45 -23
  53. package/es/new-components/checkbox-field/checkbox-field.js.map +1 -1
  54. package/es/new-components/checkbox-field/checkbox-field.module.css.js +1 -1
  55. package/es/new-components/columns/columns.js +28 -17
  56. package/es/new-components/columns/columns.js.map +1 -1
  57. package/es/new-components/columns/columns.module.css.js +1 -1
  58. package/es/new-components/divider/divider.js +3 -3
  59. package/es/new-components/divider/divider.js.map +1 -1
  60. package/es/new-components/divider/divider.module.css.js +1 -1
  61. package/es/new-components/heading/heading.js +9 -3
  62. package/es/new-components/heading/heading.js.map +1 -1
  63. package/es/new-components/heading/heading.module.css.js +1 -1
  64. package/es/new-components/hidden/hidden.js +54 -0
  65. package/es/new-components/hidden/hidden.js.map +1 -0
  66. package/es/new-components/hidden/hidden.module.css.js +4 -0
  67. package/es/new-components/hidden/hidden.module.css.js.map +1 -0
  68. package/es/new-components/hidden-visually/hidden-visually.js +22 -0
  69. package/es/new-components/hidden-visually/hidden-visually.js.map +1 -0
  70. package/es/new-components/hidden-visually/hidden-visually.module.css.js +4 -0
  71. package/es/new-components/hidden-visually/hidden-visually.module.css.js.map +1 -0
  72. package/es/new-components/inline/inline.js +9 -8
  73. package/es/new-components/inline/inline.js.map +1 -1
  74. package/es/new-components/loading/loading.js +33 -0
  75. package/es/new-components/loading/loading.js.map +1 -0
  76. package/es/new-components/modal/modal.js +201 -0
  77. package/es/new-components/modal/modal.js.map +1 -0
  78. package/es/new-components/modal/modal.module.css.js +4 -0
  79. package/es/new-components/modal/modal.module.css.js.map +1 -0
  80. package/es/new-components/password-field/password-field.js +7 -4
  81. package/es/new-components/password-field/password-field.js.map +1 -1
  82. package/es/new-components/responsive-props.js +21 -11
  83. package/es/new-components/responsive-props.js.map +1 -1
  84. package/es/new-components/select-field/select-field.js +12 -6
  85. package/es/new-components/select-field/select-field.js.map +1 -1
  86. package/es/new-components/select-field/select-field.module.css.js +1 -1
  87. package/es/new-components/spinner/spinner.js +26 -0
  88. package/es/new-components/spinner/spinner.js.map +1 -0
  89. package/es/new-components/spinner/spinner.module.css.js +4 -0
  90. package/es/new-components/spinner/spinner.module.css.js.map +1 -0
  91. package/es/new-components/stack/stack.js +23 -13
  92. package/es/new-components/stack/stack.js.map +1 -1
  93. package/es/new-components/switch-field/switch-field.js +47 -28
  94. package/es/new-components/switch-field/switch-field.js.map +1 -1
  95. package/es/new-components/switch-field/switch-field.module.css.js +1 -1
  96. package/es/new-components/tabs/tabs.js +142 -0
  97. package/es/new-components/tabs/tabs.js.map +1 -0
  98. package/es/new-components/tabs/tabs.module.css.js +4 -0
  99. package/es/new-components/tabs/tabs.module.css.js.map +1 -0
  100. package/es/new-components/text/text.js +15 -10
  101. package/es/new-components/text/text.js.map +1 -1
  102. package/es/new-components/text/text.module.css.js +1 -1
  103. package/es/new-components/text-area/text-area.js.map +1 -1
  104. package/es/new-components/text-area/text-area.module.css.js +1 -1
  105. package/es/new-components/text-field/text-field.js +4 -2
  106. package/es/new-components/text-field/text-field.js.map +1 -1
  107. package/es/new-components/text-field/text-field.module.css.js +1 -1
  108. package/es/new-components/text-link/text-link.js +8 -7
  109. package/es/new-components/text-link/text-link.js.map +1 -1
  110. package/es/utils/polymorphism.js +17 -0
  111. package/es/utils/polymorphism.js.map +1 -0
  112. package/lib/components/color-picker/color-picker.js +1 -1
  113. package/lib/components/color-picker/color-picker.js.map +1 -1
  114. package/lib/components/{button/button.d.ts → deprecated-button/deprecated-button.d.ts} +7 -1
  115. package/lib/components/{button/button.js → deprecated-button/deprecated-button.js} +2 -2
  116. package/lib/components/deprecated-button/deprecated-button.js.map +1 -0
  117. package/lib/components/{button/button.test.d.ts → deprecated-button/deprecated-button.test.d.ts} +0 -0
  118. package/lib/components/deprecated-button/index.d.ts +4 -0
  119. package/lib/components/{loading → deprecated-button}/index.js +1 -1
  120. package/lib/components/{button → deprecated-button}/index.js.map +0 -0
  121. package/lib/components/{loading/loading.d.ts → deprecated-loading/deprecated-loading.d.ts} +2 -1
  122. package/lib/components/{loading/loading.js → deprecated-loading/deprecated-loading.js} +1 -1
  123. package/lib/components/deprecated-loading/deprecated-loading.js.map +1 -0
  124. package/lib/components/{loading/Loading.test.d.ts → deprecated-loading/deprecated-loading.test.d.ts} +0 -0
  125. package/lib/components/deprecated-loading/index.d.ts +1 -0
  126. package/lib/components/{modal/modal.d.ts → deprecated-modal/deprecated-modal.d.ts} +6 -1
  127. package/lib/components/{modal/modal.js → deprecated-modal/deprecated-modal.js} +2 -2
  128. package/lib/components/deprecated-modal/deprecated-modal.js.map +1 -0
  129. package/lib/components/{modal/modal.test.d.ts → deprecated-modal/deprecated-modal.test.d.ts} +0 -0
  130. package/lib/components/{modal → deprecated-modal}/index.d.ts +3 -3
  131. package/lib/components/deprecated-modal/index.js +2 -0
  132. package/lib/components/deprecated-modal/index.js.map +1 -0
  133. package/lib/components/dropdown/dropdown.js +1 -1
  134. package/lib/components/dropdown/dropdown.js.map +1 -1
  135. package/lib/components/error-message/error-message.js +1 -1
  136. package/lib/components/error-message/error-message.js.map +1 -1
  137. package/lib/components/keyboard-shortcut/keyboard-shortcut.js +1 -1
  138. package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  139. package/lib/components/menu/index.d.ts +1 -1
  140. package/lib/components/menu/menu.d.ts +8 -10
  141. package/lib/components/menu/menu.js +1 -1
  142. package/lib/components/menu/menu.js.map +1 -1
  143. package/lib/components/range-input/range-input.js +1 -1
  144. package/lib/components/range-input/range-input.js.map +1 -1
  145. package/lib/components/select/select.js +1 -1
  146. package/lib/components/select/select.js.map +1 -1
  147. package/lib/components/tooltip/index.d.ts +1 -1
  148. package/lib/hooks/use-previous/index.d.ts +1 -0
  149. package/lib/hooks/use-previous/use-previous.d.ts +15 -0
  150. package/lib/hooks/use-previous/use-previous.js +2 -0
  151. package/lib/hooks/use-previous/use-previous.js.map +1 -0
  152. package/lib/index.d.ts +10 -5
  153. package/lib/index.js +1 -1
  154. package/lib/new-components/base-button/base-button.d.ts +65 -0
  155. package/lib/new-components/base-button/base-button.js +2 -0
  156. package/lib/new-components/base-button/base-button.js.map +1 -0
  157. package/lib/new-components/base-button/base-button.module.css.js +2 -0
  158. package/lib/new-components/base-button/base-button.module.css.js.map +1 -0
  159. package/lib/new-components/base-button/index.d.ts +1 -0
  160. package/lib/new-components/base-field/base-field.d.ts +53 -13
  161. package/lib/new-components/base-field/base-field.js +1 -1
  162. package/lib/new-components/base-field/base-field.js.map +1 -1
  163. package/lib/new-components/base-field/base-field.module.css.js +1 -1
  164. package/lib/new-components/box/box.d.ts +24 -13
  165. package/lib/new-components/box/box.js +1 -1
  166. package/lib/new-components/box/box.js.map +1 -1
  167. package/lib/new-components/box/box.module.css.js +1 -1
  168. package/lib/{components/tabs/tabs.test.d.ts → new-components/box/box.test.d.ts} +0 -0
  169. package/lib/new-components/box/margin.module.css.js +2 -0
  170. package/lib/new-components/box/margin.module.css.js.map +1 -0
  171. package/lib/new-components/box/padding.module.css.js +2 -0
  172. package/lib/new-components/box/padding.module.css.js.map +1 -0
  173. package/lib/new-components/button/button.d.ts +48 -0
  174. package/lib/new-components/button/button.js +2 -0
  175. package/lib/new-components/button/button.js.map +1 -0
  176. package/lib/new-components/button/button.test.d.ts +1 -0
  177. package/lib/new-components/button/index.d.ts +1 -0
  178. package/lib/new-components/button-link/button-link-story-wrapper.d.ts +7 -0
  179. package/lib/new-components/button-link/button-link.d.ts +14 -8
  180. package/lib/new-components/button-link/button-link.js +1 -1
  181. package/lib/new-components/button-link/button-link.js.map +1 -1
  182. package/lib/new-components/button-link/button-link.test.d.ts +1 -0
  183. package/lib/new-components/checkbox-field/checkbox-field.d.ts +3 -3
  184. package/lib/new-components/checkbox-field/checkbox-field.js +1 -1
  185. package/lib/new-components/checkbox-field/checkbox-field.js.map +1 -1
  186. package/lib/new-components/checkbox-field/checkbox-field.module.css.js +1 -1
  187. package/lib/new-components/checkbox-field/checkbox-field.test.d.ts +1 -0
  188. package/lib/new-components/columns/columns.d.ts +4 -5
  189. package/lib/new-components/columns/columns.js +1 -1
  190. package/lib/new-components/columns/columns.js.map +1 -1
  191. package/lib/new-components/columns/columns.module.css.js +1 -1
  192. package/lib/new-components/columns/columns.test.d.ts +1 -0
  193. package/lib/new-components/common-types.d.ts +2 -0
  194. package/lib/new-components/divider/divider.d.ts +2 -2
  195. package/lib/new-components/divider/divider.js +1 -1
  196. package/lib/new-components/divider/divider.js.map +1 -1
  197. package/lib/new-components/divider/divider.module.css.js +1 -1
  198. package/lib/new-components/heading/heading.d.ts +101 -2
  199. package/lib/new-components/heading/heading.js +1 -1
  200. package/lib/new-components/heading/heading.js.map +1 -1
  201. package/lib/new-components/heading/heading.module.css.js +1 -1
  202. package/lib/new-components/heading/heading.test.d.ts +1 -0
  203. package/lib/new-components/hidden/hidden.d.ts +49 -0
  204. package/lib/new-components/hidden/hidden.js +2 -0
  205. package/lib/new-components/hidden/hidden.js.map +1 -0
  206. package/lib/new-components/hidden/hidden.module.css.js +2 -0
  207. package/lib/new-components/hidden/hidden.module.css.js.map +1 -0
  208. package/lib/new-components/hidden/hidden.test.d.ts +1 -0
  209. package/lib/new-components/hidden/index.d.ts +1 -0
  210. package/lib/new-components/hidden-visually/hidden-visually.d.ts +11 -0
  211. package/lib/new-components/hidden-visually/hidden-visually.js +2 -0
  212. package/lib/new-components/hidden-visually/hidden-visually.js.map +1 -0
  213. package/lib/new-components/hidden-visually/hidden-visually.module.css.js +2 -0
  214. package/lib/new-components/hidden-visually/hidden-visually.module.css.js.map +1 -0
  215. package/lib/new-components/hidden-visually/hidden-visually.test.d.ts +1 -0
  216. package/lib/new-components/hidden-visually/index.d.ts +1 -0
  217. package/lib/new-components/inline/inline.d.ts +1 -2
  218. package/lib/new-components/inline/inline.js +1 -1
  219. package/lib/new-components/inline/inline.js.map +1 -1
  220. package/lib/new-components/inline/inline.test.d.ts +1 -0
  221. package/lib/new-components/loading/index.d.ts +1 -0
  222. package/lib/new-components/loading/loading.d.ts +26 -0
  223. package/lib/new-components/loading/loading.js +2 -0
  224. package/lib/new-components/loading/loading.js.map +1 -0
  225. package/lib/new-components/loading/loading.test.d.ts +1 -0
  226. package/lib/new-components/modal/index.d.ts +1 -0
  227. package/lib/new-components/modal/modal-stories-components.d.ts +35 -0
  228. package/lib/new-components/modal/modal.d.ts +151 -0
  229. package/lib/new-components/modal/modal.js +2 -0
  230. package/lib/new-components/modal/modal.js.map +1 -0
  231. package/lib/new-components/modal/modal.module.css.js +2 -0
  232. package/lib/new-components/modal/modal.module.css.js.map +1 -0
  233. package/lib/new-components/modal/modal.test.d.ts +1 -0
  234. package/lib/new-components/password-field/password-field.d.ts +2 -2
  235. package/lib/new-components/password-field/password-field.js +1 -1
  236. package/lib/new-components/password-field/password-field.js.map +1 -1
  237. package/lib/new-components/password-field/password-field.test.d.ts +1 -0
  238. package/lib/new-components/responsive-props.d.ts +12 -14
  239. package/lib/new-components/responsive-props.js +1 -1
  240. package/lib/new-components/responsive-props.js.map +1 -1
  241. package/lib/new-components/select-field/select-field.d.ts +4 -4
  242. package/lib/new-components/select-field/select-field.js +1 -1
  243. package/lib/new-components/select-field/select-field.js.map +1 -1
  244. package/lib/new-components/select-field/select-field.module.css.js +1 -1
  245. package/lib/new-components/select-field/select-field.test.d.ts +1 -0
  246. package/lib/new-components/spinner/index.d.ts +1 -0
  247. package/lib/new-components/spinner/spinner.d.ts +5 -0
  248. package/lib/new-components/spinner/spinner.js +2 -0
  249. package/lib/new-components/spinner/spinner.js.map +1 -0
  250. package/lib/new-components/spinner/spinner.module.css.js +2 -0
  251. package/lib/new-components/spinner/spinner.module.css.js.map +1 -0
  252. package/lib/new-components/stack/stack.d.ts +8 -5
  253. package/lib/new-components/stack/stack.js +1 -1
  254. package/lib/new-components/stack/stack.js.map +1 -1
  255. package/lib/new-components/stack/stack.test.d.ts +1 -0
  256. package/lib/new-components/switch-field/switch-field.d.ts +4 -4
  257. package/lib/new-components/switch-field/switch-field.js +1 -1
  258. package/lib/new-components/switch-field/switch-field.js.map +1 -1
  259. package/lib/new-components/switch-field/switch-field.module.css.js +1 -1
  260. package/lib/new-components/switch-field/switch-field.test.d.ts +1 -0
  261. package/lib/new-components/tabs/index.d.ts +1 -0
  262. package/lib/new-components/tabs/tabs.d.ts +92 -0
  263. package/lib/new-components/tabs/tabs.js +2 -0
  264. package/lib/new-components/tabs/tabs.js.map +1 -0
  265. package/lib/new-components/tabs/tabs.module.css.js +2 -0
  266. package/lib/new-components/tabs/tabs.module.css.js.map +1 -0
  267. package/lib/new-components/tabs/tabs.test.d.ts +1 -0
  268. package/lib/new-components/test-helpers.d.ts +9 -0
  269. package/lib/new-components/text/text.d.ts +38 -5
  270. package/lib/new-components/text/text.js +1 -1
  271. package/lib/new-components/text/text.js.map +1 -1
  272. package/lib/new-components/text/text.module.css.js +1 -1
  273. package/lib/new-components/text/text.test.d.ts +1 -0
  274. package/lib/new-components/text-area/text-area.d.ts +2 -2
  275. package/lib/new-components/text-area/text-area.js.map +1 -1
  276. package/lib/new-components/text-area/text-area.module.css.js +1 -1
  277. package/lib/new-components/text-field/text-field.d.ts +7 -4
  278. package/lib/new-components/text-field/text-field.js +1 -1
  279. package/lib/new-components/text-field/text-field.js.map +1 -1
  280. package/lib/new-components/text-field/text-field.module.css.js +1 -1
  281. package/lib/new-components/text-field/text-field.test.d.ts +1 -0
  282. package/lib/new-components/text-link/text-link.d.ts +1 -2
  283. package/lib/new-components/text-link/text-link.js +1 -1
  284. package/lib/new-components/text-link/text-link.js.map +1 -1
  285. package/lib/utils/polymorphism.d.ts +151 -0
  286. package/lib/utils/polymorphism.js +2 -0
  287. package/lib/utils/polymorphism.js.map +1 -0
  288. package/package.json +27 -23
  289. package/styles/alert.css +4 -3
  290. package/styles/base-button.css +6 -0
  291. package/styles/base-button.module.css.css +1 -0
  292. package/styles/base-field.css +7 -3
  293. package/styles/base-field.module.css.css +1 -1
  294. package/styles/box.css +3 -0
  295. package/styles/box.module.css.css +1 -1
  296. package/styles/checkbox-field.css +6 -2
  297. package/styles/checkbox-field.module.css.css +1 -1
  298. package/styles/color-picker.css +1 -1
  299. package/styles/columns.css +4 -3
  300. package/styles/columns.module.css.css +1 -1
  301. package/styles/deprecated-button.css +2 -0
  302. package/styles/deprecated-loading.css +1 -0
  303. package/styles/deprecated-modal.css +1 -0
  304. package/styles/divider.css +4 -2
  305. package/styles/divider.module.css.css +1 -1
  306. package/styles/dropdown.css +1 -1
  307. package/styles/heading.css +4 -2
  308. package/styles/heading.module.css.css +1 -1
  309. package/styles/hidden-visually.css +4 -0
  310. package/styles/hidden-visually.module.css.css +1 -0
  311. package/styles/hidden.css +4 -0
  312. package/styles/hidden.module.css.css +1 -0
  313. package/styles/inline.css +3 -1
  314. package/styles/loading.css +4 -1
  315. package/styles/margin.module.css.css +1 -0
  316. package/styles/menu.css +1 -1
  317. package/styles/modal.css +10 -1
  318. package/styles/modal.module.css.css +1 -0
  319. package/styles/notice.css +4 -3
  320. package/styles/padding.module.css.css +1 -0
  321. package/styles/password-field.css +8 -4
  322. package/styles/reactist.css +24 -19
  323. package/styles/select-field.css +8 -4
  324. package/styles/select-field.module.css.css +1 -1
  325. package/styles/spinner.module.css.css +1 -0
  326. package/styles/stack.css +4 -2
  327. package/styles/switch-field.css +9 -4
  328. package/styles/switch-field.module.css.css +1 -1
  329. package/styles/tabs.css +5 -1
  330. package/styles/tabs.module.css.css +1 -0
  331. package/styles/text-area.css +8 -4
  332. package/styles/text-area.module.css.css +1 -1
  333. package/styles/text-field.css +8 -4
  334. package/styles/text-field.module.css.css +1 -1
  335. package/styles/text-link.css +3 -1
  336. package/styles/text.css +4 -2
  337. package/styles/text.module.css.css +1 -1
  338. package/styles/tip.css +1 -1
  339. package/CHANGELOG.md +0 -492
  340. package/es/components/button/button.js.map +0 -1
  341. package/es/components/loading/index.js +0 -6
  342. package/es/components/loading/index.js.map +0 -1
  343. package/es/components/loading/loading.js.map +0 -1
  344. package/es/components/menu/type-helpers.js +0 -9
  345. package/es/components/menu/type-helpers.js.map +0 -1
  346. package/es/components/modal/index.js.map +0 -1
  347. package/es/components/modal/modal.js.map +0 -1
  348. package/es/components/tabs/tabs.js +0 -123
  349. package/es/components/tabs/tabs.js.map +0 -1
  350. package/es/new-components/button-link/button-link.module.css.js +0 -4
  351. package/es/new-components/button-link/button-link.module.css.js.map +0 -1
  352. package/es/new-components/loading-spinner/loading-spinner.js +0 -37
  353. package/es/new-components/loading-spinner/loading-spinner.js.map +0 -1
  354. package/es/new-components/loading-spinner/loading-spinner.module.css.js +0 -4
  355. package/es/new-components/loading-spinner/loading-spinner.module.css.js.map +0 -1
  356. package/es/new-components/type-helpers.js +0 -10
  357. package/es/new-components/type-helpers.js.map +0 -1
  358. package/lib/components/button/button.js.map +0 -1
  359. package/lib/components/button/index.d.ts +0 -4
  360. package/lib/components/button/index.js +0 -2
  361. package/lib/components/loading/index.d.ts +0 -2
  362. package/lib/components/loading/index.js.map +0 -1
  363. package/lib/components/loading/loading.js.map +0 -1
  364. package/lib/components/menu/type-helpers.d.ts +0 -25
  365. package/lib/components/menu/type-helpers.js +0 -2
  366. package/lib/components/menu/type-helpers.js.map +0 -1
  367. package/lib/components/modal/index.js +0 -2
  368. package/lib/components/modal/index.js.map +0 -1
  369. package/lib/components/modal/modal.js.map +0 -1
  370. package/lib/components/tabs/index.d.ts +0 -1
  371. package/lib/components/tabs/tabs.d.ts +0 -33
  372. package/lib/components/tabs/tabs.js +0 -2
  373. package/lib/components/tabs/tabs.js.map +0 -1
  374. package/lib/new-components/button-link/button-link.module.css.js +0 -2
  375. package/lib/new-components/button-link/button-link.module.css.js.map +0 -1
  376. package/lib/new-components/loading-spinner/index.d.ts +0 -1
  377. package/lib/new-components/loading-spinner/loading-spinner.d.ts +0 -8
  378. package/lib/new-components/loading-spinner/loading-spinner.js +0 -2
  379. package/lib/new-components/loading-spinner/loading-spinner.js.map +0 -1
  380. package/lib/new-components/loading-spinner/loading-spinner.module.css.js +0 -2
  381. package/lib/new-components/loading-spinner/loading-spinner.module.css.js.map +0 -1
  382. package/lib/new-components/type-helpers.d.ts +0 -26
  383. package/lib/new-components/type-helpers.js +0 -2
  384. package/lib/new-components/type-helpers.js.map +0 -1
  385. package/styles/button-link.css +0 -2
  386. package/styles/button-link.module.css.css +0 -1
  387. package/styles/button.css +0 -2
  388. package/styles/loading-spinner.module.css.css +0 -1
@@ -1,12 +1,15 @@
1
- import * as React from 'react';
2
1
  import type { ResponsiveProp } from '../responsive-props';
3
- import type { Space } from '../common-types';
2
+ import type { DividerWeight, Space } from '../common-types';
4
3
  import type { ReusableBoxProps } from '../box';
5
- import type { DividerWeight } from '../divider';
4
+ declare type Align = 'start' | 'center' | 'end';
6
5
  interface StackProps extends ReusableBoxProps {
6
+ /** Space between items */
7
7
  space?: ResponsiveProp<Space>;
8
- dividers?: boolean | DividerWeight;
8
+ /** Align items horizontally */
9
+ align?: ResponsiveProp<Align>;
10
+ /** The weight of the dividers to add. Defaults to 'none', which means no dividers are added */
11
+ dividers?: DividerWeight;
9
12
  }
10
- declare const Stack: import("../type-helpers").ForwardRefComponentWithAs<StackProps, React.ElementType<any>>;
13
+ declare const Stack: import("../../utils/polymorphism").PolymorphicComponent<"div", StackProps, "obfuscateClassName">;
11
14
  export type { StackProps };
12
15
  export { Stack };
@@ -1,2 +1,2 @@
1
- "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),i=(e(t),require("../type-helpers.js")),s=require("../responsive-props.js"),a=require("../box/box.js"),n=require("./stack.module.css.js"),o=require("../divider/divider.js"),c=e(require("react-keyed-flatten-children"));exports.Stack=i.forwardRefWithAs((function(e,i){var l=e.component,u=e.space,d=e.dividers,p=void 0!==d&&d,f=e.children,m=e.className,v=r.objectWithoutPropertiesLoose(e,["component","space","dividers","children","className"]);return t.createElement(a.Box,Object.assign({component:l,className:[m,s.getClassNames(n.default,"space",u)],ref:i},v),p?t.Children.map(c(f),(function(e,r){return r>0?t.createElement(t.Fragment,null,t.createElement(o.Divider,{weight:"string"==typeof p?p:void 0}),e):e})):f)}));
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),i=(e(t),require("../../utils/polymorphism.js")),s=require("../responsive-props.js"),a=require("../box/box.js"),l=require("../divider/divider.js"),n=e(require("react-keyed-flatten-children")),o=require("./stack.module.css.js");exports.Stack=i.polymorphicComponent((function(e,i){var u=e.as,c=e.space,d=e.align,p=void 0===d?"start":d,m=e.dividers,f=void 0===m?"none":m,v=e.children,x=e.exceptionallySetClassName,j=r.objectWithoutPropertiesLoose(e,["as","space","align","dividers","children","exceptionallySetClassName"]),h="start"===p?void 0:{width:"full",flexDirection:"column",display:"flex",alignItems:s.mapResponsiveProp(p,(function(e){return"start"===e?"flexStart":"end"===e?"flexEnd":"center"}))};return t.createElement(a.Box,Object.assign({},j,h,{as:u,className:[x,s.getClassNames(o.default,"space",c)],ref:i}),"none"!==f?t.Children.map(n(v),(function(e,r){return r>0?t.createElement(t.Fragment,null,t.createElement(l.Divider,{weight:f}),e):e})):v)}));
2
2
  //# sourceMappingURL=stack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack.js","sources":["../../../src/new-components/stack/stack.tsx"],"sourcesContent":["import * as React from 'react'\nimport flattenChildren from 'react-keyed-flatten-children'\nimport { forwardRefWithAs } from '../type-helpers'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\nimport { Divider } from '../divider'\n\nimport type { ResponsiveProp } from '../responsive-props'\nimport type { Space } from '../common-types'\nimport type { ReusableBoxProps } from '../box'\nimport type { DividerWeight } from '../divider'\n\nimport styles from './stack.module.css'\n\ninterface StackProps extends ReusableBoxProps {\n space?: ResponsiveProp<Space>\n dividers?: boolean | DividerWeight\n}\n\nconst Stack = forwardRefWithAs<StackProps>(function Stack(\n { component, space, dividers = false, children, className, ...props },\n ref,\n) {\n return (\n <Box\n component={component}\n className={[className, getClassNames(styles, 'space', space)]}\n ref={ref}\n {...props}\n >\n {dividers\n ? React.Children.map(flattenChildren(children), (child, index) =>\n index > 0 ? (\n <>\n <Divider\n weight={typeof dividers === 'string' ? dividers : undefined}\n />\n {child}\n </>\n ) : (\n child\n ),\n )\n : children}\n </Box>\n )\n})\n\nexport type { StackProps }\nexport { Stack }\n"],"names":["forwardRefWithAs","ref","component","space","dividers","children","className","props","React","Box","getClassNames","styles","map","flattenChildren","child","index","Divider","weight","undefined"],"mappings":"icAmBcA,oBAA6B,WAEvCC,OADEC,IAAAA,UAAWC,IAAAA,UAAOC,SAAAA,gBAAkBC,IAAAA,SAAUC,IAAAA,UAAcC,mGAI1DC,gBAACC,qBACGP,UAAWA,EACXI,UAAW,CAACA,EAAWI,gBAAcC,UAAQ,QAASR,IACtDF,IAAKA,GACDM,GAEHH,EACKI,WAAeI,IAAIC,EAAgBR,IAAW,SAACS,EAAOC,UAClDA,EAAQ,EACJP,gCACIA,gBAACQ,WACGC,OAA4B,iBAAbb,EAAwBA,OAAWc,IAErDJ,GAGLA,KAGRT"}
1
+ {"version":3,"file":"stack.js","sources":["../../../src/new-components/stack/stack.tsx"],"sourcesContent":["import * as React from 'react'\nimport flattenChildren from 'react-keyed-flatten-children'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { getClassNames, mapResponsiveProp } from '../responsive-props'\nimport { Box } from '../box'\nimport { Divider } from '../divider'\n\nimport type { ResponsiveProp } from '../responsive-props'\nimport type { DividerWeight, Space } from '../common-types'\nimport type { BoxProps, ReusableBoxProps } from '../box'\n\nimport styles from './stack.module.css'\n\ntype Align = 'start' | 'center' | 'end'\n\ninterface StackProps extends ReusableBoxProps {\n /** Space between items */\n space?: ResponsiveProp<Space>\n /** Align items horizontally */\n align?: ResponsiveProp<Align>\n /** The weight of the dividers to add. Defaults to 'none', which means no dividers are added */\n dividers?: DividerWeight\n}\n\nconst Stack = polymorphicComponent<'div', StackProps>(function Stack(\n {\n as,\n space,\n align = 'start',\n dividers = 'none',\n children,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n const alignProps: BoxProps | undefined =\n align === 'start'\n ? undefined\n : {\n width: 'full',\n flexDirection: 'column',\n display: 'flex',\n alignItems: mapResponsiveProp(align, (align) =>\n align === 'start' ? 'flexStart' : align === 'end' ? 'flexEnd' : 'center',\n ),\n }\n\n return (\n <Box\n {...props}\n {...alignProps}\n as={as}\n className={[exceptionallySetClassName, getClassNames(styles, 'space', space)]}\n ref={ref}\n >\n {dividers !== 'none'\n ? React.Children.map(flattenChildren(children), (child, index) =>\n index > 0 ? (\n <>\n <Divider weight={dividers} />\n {child}\n </>\n ) : (\n child\n ),\n )\n : children}\n </Box>\n )\n})\n\nexport type { StackProps }\nexport { Stack }\n"],"names":["polymorphicComponent","ref","as","space","align","dividers","children","exceptionallySetClassName","props","alignProps","undefined","width","flexDirection","display","alignItems","mapResponsiveProp","React","Box","className","getClassNames","styles","map","flattenChildren","child","index","Divider","weight"],"mappings":"0cAwBcA,wBAAwC,WAUlDC,OARIC,IAAAA,GACAC,IAAAA,UACAC,MAAAA,aAAQ,cACRC,SAAAA,aAAW,SACXC,IAAAA,SACAC,IAAAA,0BACGC,6GAIDC,EACQ,UAAVL,OACMM,EACA,CACIC,MAAO,OACPC,cAAe,SACfC,QAAS,OACTC,WAAYC,oBAAkBX,GAAO,SAACA,SACxB,UAAVA,EAAoB,YAAwB,QAAVA,EAAkB,UAAY,oBAK9EY,gBAACC,uBACOT,EACAC,GACJP,GAAIA,EACJgB,UAAW,CAACX,EAA2BY,gBAAcC,UAAQ,QAASjB,IACtEF,IAAKA,IAES,SAAbI,EACKW,WAAeK,IAAIC,EAAgBhB,IAAW,SAACiB,EAAOC,UAClDA,EAAQ,EACJR,gCACIA,gBAACS,WAAQC,OAAQrB,IAChBkB,GAGLA,KAGRjB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
- import { BaseFieldProps } from '../base-field';
3
- declare type SwitchFieldProps = BaseFieldProps<HTMLInputElement>;
4
- declare function SwitchField({ label, hint, disabled, checked, maxWidth, ...props }: SwitchFieldProps): JSX.Element;
1
+ import * as React from 'react';
2
+ import { FieldComponentProps } from '../base-field';
3
+ declare type SwitchFieldProps = Omit<FieldComponentProps<HTMLInputElement>, 'type' | 'secondaryLabel' | 'auxiliaryLabel' | 'maxWidth'>;
4
+ declare const SwitchField: React.ForwardRefExoticComponent<Pick<Pick<FieldComponentProps<HTMLInputElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "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" | "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" | "label" | "hint" | "ref" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "pattern" | "readOnly" | "required" | "size" | "src" | "step" | "value" | "width">, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "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" | "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" | "label" | "hint" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "pattern" | "readOnly" | "required" | "size" | "src" | "step" | "value" | "width"> & React.RefAttributes<HTMLInputElement>>;
5
5
  export { SwitchField };
6
6
  export type { SwitchFieldProps };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),t=require("../box/box.js"),r=require("../common-helpers.js"),a=require("../base-field/base-field.js"),i=require("./switch-field.module.css.js");function n(){for(var e=arguments.length,l=new Array(e),t=0;t<e;t++)l[t]=arguments[t];var r=l.map((function(e){return null==e?void 0:e.trim()})).filter(Boolean);return r.length>0?r.join(" "):void 0}exports.SwitchField=function(d){var s=d.label,c=d.hint,u=d.disabled,o=void 0!==u&&u,b=d.checked,m=void 0!==b&&b,h=d.maxWidth,p=e.objectWithoutPropertiesLoose(d,["label","hint","disabled","checked","maxWidth"]),f=r.useId(p.id),x=r.useId();return l.createElement(t.Box,{className:[i.default.container,o?i.default.disabled:null],maxWidth:h},l.createElement(t.Box,{component:"label",display:"flex",alignItems:"center"},l.createElement(t.Box,{className:[i.default.inputWrapper,m?i.default.checked:null]},l.createElement("input",Object.assign({id:f,type:"checkbox",checked:m,disabled:o,"aria-describedby":n(c?x:null,p["aria-describedby"])},p)),l.createElement("span",{className:i.default.handle})),l.createElement("span",null,s)),c?l.createElement(a.FieldHint,{id:x},c):null)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),a=require("../box/box.js"),i=require("../stack/stack.js"),t=require("../hidden-visually/hidden-visually.js"),d=require("../text/text.js"),r=require("../common-helpers.js"),s=require("../base-field/base-field.js"),n=require("./switch-field.module.css.js");exports.SwitchField=l.forwardRef((function(c,u){var o,h,b,f=c.label,m=c.hint,p=c.disabled,v=void 0!==p&&p,k=c.hidden,x=c.defaultChecked,g=c.id,j=c["aria-describedby"],y=c.onChange,q=e.objectWithoutPropertiesLoose(c,["label","hint","disabled","hidden","defaultChecked","id","aria-describedby","onChange"]),E=r.useId(g),C=r.useId(),S=null!=j?j:m?C:void 0,w=l.useState(null!==(o=null!==(h=q.checked)&&void 0!==h?h:x)&&void 0!==o&&o),B=w[1],N=null!==(b=q.checked)&&void 0!==b?b:w[0];return l.createElement(i.Stack,{space:"small",hidden:k},l.createElement(a.Box,{className:[n.default.container,v?n.default.disabled:null,N?n.default.checked:null],as:"label",display:"flex",alignItems:"center"},l.createElement(a.Box,{position:"relative",display:"inlineBlock",overflow:"visible",marginRight:"small",flexShrink:0,className:n.default.toggle},l.createElement(t.HiddenVisually,null,l.createElement("input",Object.assign({},q,{id:E,type:"checkbox",disabled:v,"aria-describedby":S,ref:u,checked:N,onChange:function(e){null==y||y(e),e.defaultPrevented||B(e.currentTarget.checked)}}))),l.createElement("span",{className:n.default.handle})),l.createElement(d.Text,{exceptionallySetClassName:n.default.label},f)),m?l.createElement(s.FieldHint,{id:C},m):null)}));
2
2
  //# sourceMappingURL=switch-field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch-field.js","sources":["../../../src/new-components/switch-field/switch-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { BaseFieldProps, FieldHint } from '../base-field'\nimport styles from './switch-field.module.css'\nimport { useId } from '../common-helpers'\n\nfunction join(...args: Array<string | null | undefined>) {\n const list = args.map((s) => s?.trim()).filter(Boolean)\n return list.length > 0 ? list.join(' ') : undefined\n}\n\ntype SwitchFieldProps = BaseFieldProps<HTMLInputElement>\n\nfunction SwitchField({\n label,\n hint,\n disabled = false,\n checked = false,\n maxWidth,\n ...props\n}: SwitchFieldProps) {\n const id = useId(props.id)\n const hintId = useId()\n return (\n <Box className={[styles.container, disabled ? styles.disabled : null]} maxWidth={maxWidth}>\n <Box component=\"label\" display=\"flex\" alignItems=\"center\">\n <Box className={[styles.inputWrapper, checked ? styles.checked : null]}>\n <input\n id={id}\n type=\"checkbox\"\n checked={checked}\n disabled={disabled}\n aria-describedby={join(hint ? hintId : null, props['aria-describedby'])}\n {...props}\n />\n <span className={styles.handle} />\n </Box>\n <span>{label}</span>\n </Box>\n {hint ? <FieldHint id={hintId}>{hint}</FieldHint> : null}\n </Box>\n )\n}\n\nexport { SwitchField }\nexport type { SwitchFieldProps }\n"],"names":["join","args","list","map","s","trim","filter","Boolean","length","undefined","label","hint","disabled","checked","maxWidth","props","id","useId","hintId","React","Box","className","styles","container","component","display","alignItems","inputWrapper","type","handle","FieldHint"],"mappings":"oSAMA,SAASA,+BAAQC,2BAAAA,sBACPC,EAAOD,EAAKE,KAAI,SAACC,UAAMA,MAAAA,SAAAA,EAAGC,UAAQC,OAAOC,gBACxCL,EAAKM,OAAS,EAAIN,EAAKF,KAAK,UAAOS,sBAK9C,gBACIC,IAAAA,MACAC,IAAAA,SACAC,SAAAA,oBACAC,QAAAA,gBACAC,IAAAA,SACGC,qFAEGC,EAAKC,QAAMF,EAAMC,IACjBE,EAASD,iBAEXE,gBAACC,OAAIC,UAAW,CAACC,UAAOC,UAAWX,EAAWU,UAAOV,SAAW,MAAOE,SAAUA,GAC7EK,gBAACC,OAAII,UAAU,QAAQC,QAAQ,OAAOC,WAAW,UAC7CP,gBAACC,OAAIC,UAAW,CAACC,UAAOK,aAAcd,EAAUS,UAAOT,QAAU,OAC7DM,uCACIH,GAAIA,EACJY,KAAK,WACLf,QAASA,EACTD,SAAUA,qBACQZ,EAAKW,EAAOO,EAAS,KAAMH,EAAM,sBAC/CA,IAERI,wBAAME,UAAWC,UAAOO,UAE5BV,4BAAOT,IAEVC,EAAOQ,gBAACW,aAAUd,GAAIE,GAASP,GAAoB"}
1
+ {"version":3,"file":"switch-field.js","sources":["../../../src/new-components/switch-field/switch-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { Stack } from '../stack'\nimport { Text } from '../text'\nimport { HiddenVisually } from '../hidden-visually'\nimport { FieldComponentProps, FieldHint } from '../base-field'\nimport { useId } from '../common-helpers'\nimport styles from './switch-field.module.css'\n\ntype SwitchFieldProps = Omit<\n FieldComponentProps<HTMLInputElement>,\n 'type' | 'secondaryLabel' | 'auxiliaryLabel' | 'maxWidth'\n>\n\nconst SwitchField = React.forwardRef<HTMLInputElement, SwitchFieldProps>(function SwitchField(\n {\n label,\n hint,\n disabled = false,\n hidden,\n defaultChecked,\n id: originalId,\n 'aria-describedby': originalAriaDescribedBy,\n onChange,\n ...props\n },\n ref,\n) {\n const id = useId(originalId)\n const hintId = useId()\n const ariaDescribedBy = originalAriaDescribedBy ?? (hint ? hintId : undefined)\n const [checkedState, setChecked] = React.useState(props.checked ?? defaultChecked ?? false)\n const isChecked = props.checked ?? checkedState\n return (\n <Stack space=\"small\" hidden={hidden}>\n <Box\n className={[\n styles.container,\n disabled ? styles.disabled : null,\n isChecked ? styles.checked : null,\n ]}\n as=\"label\"\n display=\"flex\"\n alignItems=\"center\"\n >\n <Box\n position=\"relative\"\n display=\"inlineBlock\"\n overflow=\"visible\"\n marginRight=\"small\"\n flexShrink={0}\n className={styles.toggle}\n >\n <HiddenVisually>\n <input\n {...props}\n id={id}\n type=\"checkbox\"\n disabled={disabled}\n aria-describedby={ariaDescribedBy}\n ref={ref}\n checked={isChecked}\n onChange={(event) => {\n onChange?.(event)\n if (!event.defaultPrevented) {\n setChecked(event.currentTarget.checked)\n }\n }}\n />\n </HiddenVisually>\n <span className={styles.handle} />\n </Box>\n <Text exceptionallySetClassName={styles.label}>{label}</Text>\n </Box>\n {hint ? <FieldHint id={hintId}>{hint}</FieldHint> : null}\n </Stack>\n )\n})\n\nexport { SwitchField }\nexport type { SwitchFieldProps }\n"],"names":["React","ref","label","hint","disabled","hidden","defaultChecked","originalId","id","originalAriaDescribedBy","onChange","props","useId","hintId","ariaDescribedBy","undefined","checked","setChecked","isChecked","Stack","space","Box","className","styles","container","as","display","alignItems","position","overflow","marginRight","flexShrink","toggle","HiddenVisually","type","event","defaultPrevented","currentTarget","handle","Text","exceptionallySetClassName","FieldHint"],"mappings":"uaAcoBA,cAAqD,WAYrEC,aAVIC,IAAAA,MACAC,IAAAA,SACAC,SAAAA,gBACAC,IAAAA,OACAC,IAAAA,eACIC,IAAJC,GACoBC,IAApB,oBACAC,IAAAA,SACGC,6HAIDH,EAAKI,QAAML,GACXM,EAASD,UACTE,EAAkBL,MAAAA,EAAAA,EAA4BN,EAAOU,OAASE,IACjCf,+BAAeW,EAAMK,uBAAWV,mBAA9CW,OACfC,YAAYP,EAAMK,mCAEpBhB,gBAACmB,SAAMC,MAAM,QAAQf,OAAQA,GACzBL,gBAACqB,OACGC,UAAW,CACPC,UAAOC,UACPpB,EAAWmB,UAAOnB,SAAW,KAC7Bc,EAAYK,UAAOP,QAAU,MAEjCS,GAAG,QACHC,QAAQ,OACRC,WAAW,UAEX3B,gBAACqB,OACGO,SAAS,WACTF,QAAQ,cACRG,SAAS,UACTC,YAAY,QACZC,WAAY,EACZT,UAAWC,UAAOS,QAElBhC,gBAACiC,sBACGjC,yCACQW,GACJH,GAAIA,EACJ0B,KAAK,WACL9B,SAAUA,qBACQU,EAClBb,IAAKA,EACLe,QAASE,EACTR,SAAU,SAACyB,GACPzB,MAAAA,GAAAA,EAAWyB,GACNA,EAAMC,kBACPnB,EAAWkB,EAAME,cAAcrB,cAK/ChB,wBAAMsB,UAAWC,UAAOe,UAE5BtC,gBAACuC,QAAKC,0BAA2BjB,UAAOrB,OAAQA,IAEnDC,EAAOH,gBAACyC,aAAUjC,GAAIK,GAASV,GAAoB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={container:"_81e23633",disabled:"aa388da4",inputWrapper:"_196b41c2",handle:"_272b1f96",checked:"f3d4f232"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={container:"_99a80509",disabled:"b5cf26ef",checked:"a63c43a2",toggle:"f318ae83",label:"_427926b9",handle:"_9fcd994c"};
2
2
  //# sourceMappingURL=switch-field.module.css.js.map
@@ -0,0 +1 @@
1
+ export * from './tabs';
@@ -0,0 +1,92 @@
1
+ import * as React from 'react';
2
+ import type { ResponsiveProp } from '../responsive-props';
3
+ import type { Space } from '../common-types';
4
+ declare type TabsProps = {
5
+ /** The `<Tabs>` component must be composed from a `<TabList>` and corresponding `<TabPanel>` components */
6
+ children: React.ReactNode;
7
+ /**
8
+ * Determines the primary colour of the tabs
9
+ */
10
+ color?: 'primary' | 'secondary' | 'tertiary';
11
+ /**
12
+ * Determines the style of the tabs
13
+ */
14
+ variant?: 'normal' | 'plain';
15
+ /**
16
+ * The id of the selected tab
17
+ */
18
+ selectedId?: string | null;
19
+ };
20
+ /**
21
+ * Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.
22
+ */
23
+ export declare function Tabs({ children, selectedId, color, variant, }: TabsProps): React.ReactElement;
24
+ declare type TabProps = {
25
+ /** The content to render inside of the tab button */
26
+ children: React.ReactNode;
27
+ /** The tab's identifier. This must match its corresponding `<TabPanel>`'s id */
28
+ id: string;
29
+ };
30
+ /**
31
+ * Represents the individual tab elements within the group. Each `<Tab>` must have a corresponding `<TabPanel>` component.
32
+ */
33
+ export declare function Tab({ children, id }: TabProps): React.ReactElement | null;
34
+ declare type TabListProps = ({
35
+ /** Labels the tab list for assistive technologies. This must be provided if `aria-labelledby` is omitted. */
36
+ 'aria-label': string;
37
+ } | {
38
+ /**
39
+ * One or more element IDs used to label the tab list for assistive technologies. Required if
40
+ * `aria-label` is omitted.
41
+ */
42
+ 'aria-labelledby': string;
43
+ } | {
44
+ /**
45
+ * For cases where multiple instances of the tab list exists, the duplicates may be marked as aria-hidden
46
+ */
47
+ 'aria-hidden': boolean;
48
+ }) & {
49
+ /**
50
+ * A list of `<Tab>` elements
51
+ */
52
+ children: React.ReactNode;
53
+ /**
54
+ * Controls the spacing between tabs
55
+ */
56
+ space?: ResponsiveProp<Space>;
57
+ };
58
+ /**
59
+ * A component used to group `<Tab>` elements together.
60
+ */
61
+ export declare function TabList({ children, space, ...props }: TabListProps): React.ReactElement | null;
62
+ declare type TabPanelProps = {
63
+ /** The content to be rendered inside the tab */
64
+ children: React.ReactNode;
65
+ /** The tabPanel's identifier. This must match its corresponding `<Tab>`'s id */
66
+ id: string;
67
+ /**
68
+ * By default, the tab panel's content is always rendered even when they are not active. This behaviour can be changed to
69
+ * 'active', which renders only when the tab is active, and 'lazy', meaning while inactive tab panels will not be rendered
70
+ * initially, they will remain mounted once they are active until the entire Tabs tree is unmounted.
71
+ */
72
+ render?: 'always' | 'active' | 'lazy';
73
+ };
74
+ /**
75
+ * Used to define the content to be rendered when a tab is active. Each `<TabPanel>` must have a corresponding `<Tab>` component.
76
+ */
77
+ export declare const TabPanel: import("../../utils/polymorphism").PolymorphicComponent<"div", TabPanelProps, "omitClassName">;
78
+ declare type TabAwareSlotProps = {
79
+ /**
80
+ * Render prop used to provide the content to be rendered inside the slot. The render prop will be
81
+ * called with the current `selectedId`
82
+ */
83
+ children: (provided: {
84
+ selectedId?: string | null;
85
+ }) => React.ReactElement | null;
86
+ };
87
+ /**
88
+ * Allows content to be rendered based on the current tab being selected while outside of the TabPanel
89
+ * component. Can be placed freely within the main `<Tabs>` component.
90
+ */
91
+ export declare function TabAwareSlot({ children }: TabAwareSlotProps): React.ReactElement | null;
92
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),o=(e(r),e(require("classnames"))),a=require("../../utils/polymorphism.js"),n=require("../inline/inline.js"),i=require("reakit/Tab"),l=require("../../hooks/use-previous/use-previous.js"),s=require("./tabs.module.css.js"),u=r.createContext(null),c=a.polymorphicComponent((function(e,o){var a=e.children,n=e.id,l=e.as,s=e.render,c=void 0===s?"always":s,d=t.objectWithoutPropertiesLoose(e,["children","id","as","render"]),v=r.useContext(u),b=r.useState(!1),p=b[0],f=b[1],j=(null==v?void 0:v.selectedId)===n;if(r.useEffect((function(){!p&&j&&f(!0)}),[p,j]),!v)return null;var m=t.objectWithoutPropertiesLoose(v,["color","variant"]);return r.createElement(i.TabPanel,Object.assign({tabId:n},m,d,{as:l,ref:o}),"always"===c?a:null,"active"===c&&j?a:null,"lazy"===c&&(j||p)?a:null)}));exports.Tab=function(e){var a=e.children,n=e.id,l=r.useContext(u);if(!l)return null;var c=l.color,d=l.variant,v=t.objectWithoutPropertiesLoose(l,["color","variant"]);return r.createElement(i.Tab,Object.assign({className:o(s.default.tab,s.default["tab-"+(null!=d?d:"")],s.default["tab-"+(null!=c?c:"")]),id:n},v),a)},exports.TabAwareSlot=function(e){var t=e.children,o=r.useContext(u);return o?t({selectedId:o.selectedId}):null},exports.TabList=function(e){var o=e.children,a=e.space,l=void 0===a?"medium":a,s=t.objectWithoutPropertiesLoose(e,["children","space"]),c=r.useContext(u);if(!c)return null;var d=t.objectWithoutPropertiesLoose(c,["color","variant"]);return r.createElement(i.TabList,Object.assign({},s,d),r.createElement(n.Inline,{space:l},o))},exports.TabPanel=c,exports.Tabs=function(e){var o=e.children,a=e.selectedId,n=e.color,s=void 0===n?"primary":n,c=e.variant,d=void 0===c?"normal":c,v=i.useTabState({selectedId:a}),b=l.usePrevious(a),p=v.selectedId,f=v.select;r.useEffect((function(){b!==a&&a!==p&&void 0!==a&&f(a)}),[a,p,f,b]);var j=r.useMemo((function(){return t.objectSpread2(t.objectSpread2({},v),{},{color:s,variant:d})}),[s,d].concat(Object.values(v)));return r.createElement(u.Provider,{value:j},o)};
2
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.js","sources":["../../../src/new-components/tabs/tabs.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\nimport {\n useTabState,\n Tab as BaseTab,\n TabList as BaseTabList,\n TabPanel as BaseTabPanel,\n TabStateReturn,\n} from 'reakit/Tab'\nimport { Inline } from '../inline'\nimport { usePrevious } from '../../hooks/use-previous'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport type { ResponsiveProp } from '../responsive-props'\nimport type { Space } from '../common-types'\n\nimport styles from './tabs.module.css'\n\nconst TabsContext = React.createContext<\n (TabStateReturn & Omit<TabsProps, 'children' | 'selectedId'>) | null\n>(null)\n\ntype TabsProps = {\n /** The `<Tabs>` component must be composed from a `<TabList>` and corresponding `<TabPanel>` components */\n children: React.ReactNode\n /**\n * Determines the primary colour of the tabs\n */\n color?: 'primary' | 'secondary' | 'tertiary'\n /**\n * Determines the style of the tabs\n */\n variant?: 'normal' | 'plain'\n /**\n * The id of the selected tab\n */\n selectedId?: string | null\n}\n\n/**\n * Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.\n */\nexport function Tabs({\n children,\n selectedId,\n color = 'primary',\n variant = 'normal',\n}: TabsProps): React.ReactElement {\n const tabState = useTabState({ selectedId })\n const previousSelectedId = usePrevious(selectedId)\n const { selectedId: actualSelectedId, select } = tabState\n\n React.useEffect(\n function selectTab() {\n if (\n previousSelectedId !== selectedId &&\n selectedId !== actualSelectedId &&\n selectedId !== undefined\n ) {\n select(selectedId)\n }\n },\n [selectedId, actualSelectedId, select, previousSelectedId],\n )\n\n const memoizedTabState = React.useMemo(\n function memoizeTabState() {\n return {\n ...tabState,\n color,\n variant,\n }\n },\n // There is no guarantee that useTabState returns a stable object when there are no changes, so\n // following reakit/Tab's example we only return a new objet when any of its values have changed\n // eslint-disable-next-line\n [color, variant, ...Object.values(tabState)],\n )\n\n return <TabsContext.Provider value={memoizedTabState}>{children}</TabsContext.Provider>\n}\n\ntype TabProps = {\n /** The content to render inside of the tab button */\n children: React.ReactNode\n\n /** The tab's identifier. This must match its corresponding `<TabPanel>`'s id */\n id: string\n}\n\n/**\n * Represents the individual tab elements within the group. Each `<Tab>` must have a corresponding `<TabPanel>` component.\n */\nexport function Tab({ children, id }: TabProps): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n if (!tabContextValue) {\n return null\n }\n\n const { color, variant, ...tabState } = tabContextValue\n\n return (\n <BaseTab\n className={classNames(\n styles.tab,\n styles[`tab-${variant ?? ''}`],\n styles[`tab-${color ?? ''}`],\n )}\n id={id}\n {...tabState}\n >\n {children}\n </BaseTab>\n )\n}\n\ntype TabListProps = (\n | {\n /** Labels the tab list for assistive technologies. This must be provided if `aria-labelledby` is omitted. */\n 'aria-label': string\n }\n | {\n /**\n * One or more element IDs used to label the tab list for assistive technologies. Required if\n * `aria-label` is omitted.\n */\n 'aria-labelledby': string\n }\n | {\n /**\n * For cases where multiple instances of the tab list exists, the duplicates may be marked as aria-hidden\n */\n 'aria-hidden': boolean\n }\n) & {\n /**\n * A list of `<Tab>` elements\n */\n children: React.ReactNode\n\n /**\n * Controls the spacing between tabs\n */\n space?: ResponsiveProp<Space>\n}\n\n/**\n * A component used to group `<Tab>` elements together.\n */\nexport function TabList({\n children,\n space = 'medium',\n ...props\n}: TabListProps): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n if (!tabContextValue) {\n return null\n }\n\n const { color, variant, ...tabState } = tabContextValue\n\n return (\n <BaseTabList {...props} {...tabState}>\n <Inline space={space}>{children}</Inline>\n </BaseTabList>\n )\n}\n\ntype TabPanelProps = {\n /** The content to be rendered inside the tab */\n children: React.ReactNode\n\n /** The tabPanel's identifier. This must match its corresponding `<Tab>`'s id */\n id: string\n\n /**\n * By default, the tab panel's content is always rendered even when they are not active. This behaviour can be changed to\n * 'active', which renders only when the tab is active, and 'lazy', meaning while inactive tab panels will not be rendered\n * initially, they will remain mounted once they are active until the entire Tabs tree is unmounted.\n */\n render?: 'always' | 'active' | 'lazy'\n}\n\n/**\n * Used to define the content to be rendered when a tab is active. Each `<TabPanel>` must have a corresponding `<Tab>` component.\n */\nexport const TabPanel = polymorphicComponent<'div', TabPanelProps, 'omitClassName'>(\n function TabPanel(\n { children, id, as, render = 'always', ...props },\n ref,\n ): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n const [tabRendered, setTabRendered] = React.useState(false)\n const tabIsActive = tabContextValue?.selectedId === id\n\n React.useEffect(\n function trackTabRenderedState() {\n if (!tabRendered && tabIsActive) {\n setTabRendered(true)\n }\n },\n [tabRendered, tabIsActive],\n )\n\n if (!tabContextValue) {\n return null\n }\n\n const { color, variant, ...tabState } = tabContextValue\n\n return (\n <BaseTabPanel tabId={id} {...tabState} {...props} as={as} ref={ref}>\n {render === 'always' ? children : null}\n {render === 'active' && tabIsActive ? children : null}\n {render === 'lazy' && (tabIsActive || tabRendered) ? children : null}\n </BaseTabPanel>\n )\n },\n)\n\ntype TabAwareSlotProps = {\n /**\n * Render prop used to provide the content to be rendered inside the slot. The render prop will be\n * called with the current `selectedId`\n */\n children: (provided: { selectedId?: string | null }) => React.ReactElement | null\n}\n\n/**\n * Allows content to be rendered based on the current tab being selected while outside of the TabPanel\n * component. Can be placed freely within the main `<Tabs>` component.\n */\nexport function TabAwareSlot({ children }: TabAwareSlotProps): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n return tabContextValue ? children({ selectedId: tabContextValue.selectedId }) : null\n}\n"],"names":["TabsContext","React","TabPanel","polymorphicComponent","ref","children","id","as","render","props","tabContextValue","tabRendered","setTabRendered","tabIsActive","selectedId","tabState","BaseTabPanel","tabId","color","variant","BaseTab","className","classNames","styles","tab","space","BaseTabList","Inline","useTabState","previousSelectedId","usePrevious","actualSelectedId","select","undefined","memoizedTabState","Object","values","Provider","value"],"mappings":"sbAiBMA,EAAcC,gBAElB,MAwKWC,EAAWC,wBACpB,WAEIC,OADEC,IAAAA,SAAUC,IAAAA,GAAIC,IAAAA,OAAIC,OAAAA,aAAS,WAAaC,oEAGpCC,EAAkBT,aAAiBD,KACHC,YAAe,GAA9CU,OAAaC,OACdC,GAAcH,MAAAA,SAAAA,EAAiBI,cAAeR,KAEpDL,aACI,YACSU,GAAeE,GAChBD,GAAe,KAGvB,CAACD,EAAaE,KAGbH,SACM,SAGgBK,iCAAaL,8BAGpCT,gBAACe,0BAAaC,MAAOX,GAAQS,EAAcN,GAAOF,GAAIA,EAAIH,IAAKA,IAC/C,WAAXI,EAAsBH,EAAW,KACtB,WAAXG,GAAuBK,EAAcR,EAAW,KACrC,SAAXG,IAAsBK,GAAeF,GAAeN,EAAW,qCA3H1DA,IAAAA,SAAUC,IAAAA,GACtBI,EAAkBT,aAAiBD,OAEpCU,SACM,SAGHQ,EAAgCR,EAAhCQ,MAAOC,EAAyBT,EAAzBS,QAAYJ,iCAAaL,8BAGpCT,gBAACmB,qBACGC,UAAWC,EACPC,UAAOC,IACPD,kBAAcJ,MAAAA,EAAAA,EAAW,KACzBI,kBAAcL,MAAAA,EAAAA,EAAS,MAE3BZ,GAAIA,GACAS,GAEHV,yCA0HkBA,IAAAA,SACrBK,EAAkBT,aAAiBD,UAElCU,EAAkBL,EAAS,CAAES,WAAYJ,EAAgBI,aAAgB,sCAtFhFT,IAAAA,aACAoB,MAAAA,aAAQ,WACLhB,yDAEGC,EAAkBT,aAAiBD,OAEpCU,SACM,SAGgBK,iCAAaL,8BAGpCT,gBAACyB,2BAAgBjB,EAAWM,GACxBd,gBAAC0B,UAAOF,MAAOA,GAAQpB,qDA1H/BA,IAAAA,SACAS,IAAAA,eACAI,MAAAA,aAAQ,gBACRC,QAAAA,aAAU,WAEJJ,EAAWa,cAAY,CAAEd,WAAAA,IACzBe,EAAqBC,cAAYhB,GACnBiB,EAA6BhB,EAAzCD,WAA8BkB,EAAWjB,EAAXiB,OAEtC/B,aACI,WAEQ4B,IAAuBf,GACvBA,IAAeiB,QACAE,IAAfnB,GAEAkB,EAAOlB,KAGf,CAACA,EAAYiB,EAAkBC,EAAQH,QAGrCK,EAAmBjC,WACrB,qDAEWc,OACHG,MAAAA,EACAC,QAAAA,OAMPD,EAAOC,UAAYgB,OAAOC,OAAOrB,YAG/Bd,gBAACD,EAAYqC,UAASC,MAAOJ,GAAmB7B"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={tab:"_7cdcd0b6","tab-normal":"af6705d0","tab-primary":"ad705020","tab-secondary":"_69a2043b","tab-tertiary":"_5b695667","tab-plain":"_88d3dc5e"};
2
+ //# sourceMappingURL=tabs.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { ResponsiveProp } from './responsive-props';
3
+ import { Space } from './common-types';
4
+ declare type PropsWithSpace = {
5
+ space?: ResponsiveProp<Space>;
6
+ 'data-testid'?: string;
7
+ };
8
+ declare function runSpaceTests<Props extends PropsWithSpace>(Component: React.ComponentType<Props>): void;
9
+ export { runSpaceTests };
@@ -1,14 +1,47 @@
1
1
  import * as React from 'react';
2
- import { ComponentTypes } from '../type-helpers';
3
2
  import type { Tone } from '../common-types';
3
+ import type { BoxProps } from '../box';
4
4
  declare type TextProps = {
5
- component?: ComponentTypes;
6
5
  children: React.ReactNode;
7
- size?: 'xsmall' | 'small' | 'standard' | 'large' | 'xlarge';
8
- weight?: 'regular' | 'medium' | 'strong';
6
+ /**
7
+ * The size of the text.
8
+ *
9
+ * The supported values, from smaller size to larger size, are:
10
+ * 'caption', 'copy', 'body', and 'subtitle'
11
+ *
12
+ * @default 'body'
13
+ */
14
+ size?: 'caption' | 'copy' | 'body' | 'subtitle';
15
+ /**
16
+ * The weight of the text font.
17
+ *
18
+ * @default 'regular'
19
+ */
20
+ weight?: 'regular' | 'semibold' | 'bold';
21
+ /**
22
+ * The tone (semantic color) of the text.
23
+ *
24
+ * @default 'normal'
25
+ */
9
26
  tone?: Tone;
27
+ /**
28
+ * Used to truncate the text to a given number of lines.
29
+ *
30
+ * It will add an ellipsis (`…`) to the text at the end of the last line, only if the text was
31
+ * truncated. If the text fits without it being truncated, no ellipsis is added.
32
+ *
33
+ * By default, the text is not truncated at all, no matter how many lines it takes to render it.
34
+ *
35
+ * @default undefined
36
+ */
10
37
  lineClamp?: 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5';
38
+ /**
39
+ * How to align the text horizontally.
40
+ *
41
+ * @default 'start'
42
+ */
43
+ align?: BoxProps['textAlign'];
11
44
  };
12
- declare const Text: import("../type-helpers").ForwardRefComponentWithAs<TextProps, React.ElementType<any>>;
45
+ declare const Text: import("../../utils/polymorphism").PolymorphicComponent<"div", TextProps, "obfuscateClassName">;
13
46
  export type { TextProps };
14
47
  export { Text };
@@ -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"),l=require("../responsive-props.js"),s=require("../box/box.js"),a=require("./text.module.css.js");exports.Text=r.forwardRefWithAs((function(r,n){var o=r.component,i=void 0===o?"span":o,u=r.size,p=void 0===u?"standard":u,d=r.weight,m=void 0===d?"regular":d,c=r.tone,g=void 0===c?"normal":c,f=r.children,v=r.lineClamp,h=e.objectWithoutPropertiesLoose(r,["component","size","weight","tone","children","lineClamp"]),j="string"==typeof v?parseInt(v,10)>1:(v||0)>1;return t.createElement(s.Box,Object.assign({},h,{component:i,className:[a.default.text,"standard"!==p?l.getClassNames(a.default,"size",p):null,"regular"!==m?l.getClassNames(a.default,"weight",m):null,"normal"!==g?l.getClassNames(a.default,"tone",g):null,j?a.default.lineClamp:null,v?l.getClassNames(a.default,"line-clamp",v.toString()):null],ref:n}),f)}));
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),t=require("../../utils/polymorphism.js"),s=require("../responsive-props.js"),a=require("../box/box.js"),i=require("./text.module.css.js");exports.Text=t.polymorphicComponent((function(t,r){var o=t.as,n=t.size,u=void 0===n?"body":n,p=t.weight,m=void 0===p?"regular":p,d=t.tone,g=void 0===d?"normal":d,c=t.align,x=t.children,C=t.lineClamp,f=t.exceptionallySetClassName,b=e.objectWithoutPropertiesLoose(t,["as","size","weight","tone","align","children","lineClamp","exceptionallySetClassName"]),h="string"==typeof C?Number(C)>1:(null!=C?C:1)>1;return l.createElement(a.Box,Object.assign({},b,{as:o,className:[f,i.default.text,"body"!==u?s.getClassNames(i.default,"size",u):null,"regular"!==m?s.getClassNames(i.default,"weight",m):null,"normal"!==g?s.getClassNames(i.default,"tone",g):null,h?i.default.lineClampMultipleLines:null,C?s.getClassNames(i.default,"lineClamp",C.toString()):null],textAlign:c,paddingRight:C?"xsmall":void 0,ref:r}),x)}));
2
2
  //# sourceMappingURL=text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sources":["../../../src/new-components/text/text.tsx"],"sourcesContent":["import * as React from 'react'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\n\nimport { ComponentTypes, forwardRefWithAs } from '../type-helpers'\nimport type { Tone } from '../common-types'\n\nimport styles from './text.module.css'\n\ntype TextProps = {\n component?: ComponentTypes\n children: React.ReactNode\n size?: 'xsmall' | 'small' | 'standard' | 'large' | 'xlarge'\n weight?: 'regular' | 'medium' | 'strong'\n tone?: Tone\n lineClamp?: 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5'\n}\n\nconst Text = forwardRefWithAs<TextProps>(function Text(\n {\n component = 'span',\n size = 'standard',\n weight = 'regular',\n tone = 'normal',\n children,\n lineClamp,\n ...rest\n },\n ref,\n) {\n const lineClampMultipleLines =\n typeof lineClamp === 'string' ? parseInt(lineClamp, 10) > 1 : (lineClamp || 0) > 1\n\n return (\n <Box\n {...rest}\n component={component}\n className={[\n styles.text,\n size !== 'standard' ? getClassNames(styles, 'size', size) : null,\n weight !== 'regular' ? getClassNames(styles, 'weight', weight) : null,\n tone !== 'normal' ? getClassNames(styles, 'tone', tone) : null,\n lineClampMultipleLines ? styles.lineClamp : null,\n lineClamp ? getClassNames(styles, 'line-clamp', lineClamp.toString()) : null,\n ]}\n ref={ref}\n >\n {children}\n </Box>\n )\n})\n\nexport type { TextProps }\nexport { Text }\n"],"names":["forwardRefWithAs","ref","component","size","weight","tone","children","lineClamp","rest","lineClampMultipleLines","parseInt","React","Box","className","styles","text","getClassNames","toString"],"mappings":"kSAkBaA,oBAA4B,WAUrCC,WARIC,UAAAA,aAAY,aACZC,KAAAA,aAAO,iBACPC,OAAAA,aAAS,gBACTC,KAAAA,aAAO,WACPC,IAAAA,SACAC,IAAAA,UACGC,gGAIDC,EACmB,iBAAdF,EAAyBG,SAASH,EAAW,IAAM,GAAKA,GAAa,GAAK,SAGjFI,gBAACC,uBACOJ,GACJN,UAAWA,EACXW,UAAW,CACPC,UAAOC,KACE,aAATZ,EAAsBa,gBAAcF,UAAQ,OAAQX,GAAQ,KACjD,YAAXC,EAAuBY,gBAAcF,UAAQ,SAAUV,GAAU,KACxD,WAATC,EAAoBW,gBAAcF,UAAQ,OAAQT,GAAQ,KAC1DI,EAAyBK,UAAOP,UAAY,KAC5CA,EAAYS,gBAAcF,UAAQ,aAAcP,EAAUU,YAAc,MAE5EhB,IAAKA,IAEJK"}
1
+ {"version":3,"file":"text.js","sources":["../../../src/new-components/text/text.tsx"],"sourcesContent":["import * as React from 'react'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\nimport { polymorphicComponent } from '../../utils/polymorphism'\n\nimport type { Tone } from '../common-types'\nimport type { BoxProps } from '../box'\n\nimport styles from './text.module.css'\n\ntype TextProps = {\n children: React.ReactNode\n /**\n * The size of the text.\n *\n * The supported values, from smaller size to larger size, are:\n * 'caption', 'copy', 'body', and 'subtitle'\n *\n * @default 'body'\n */\n size?: 'caption' | 'copy' | 'body' | 'subtitle'\n /**\n * The weight of the text font.\n *\n * @default 'regular'\n */\n weight?: 'regular' | 'semibold' | 'bold'\n /**\n * The tone (semantic color) of the text.\n *\n * @default 'normal'\n */\n tone?: Tone\n /**\n * Used to truncate the text to a given number of lines.\n *\n * It will add an ellipsis (`…`) to the text at the end of the last line, only if the text was\n * truncated. If the text fits without it being truncated, no ellipsis is added.\n *\n * By default, the text is not truncated at all, no matter how many lines it takes to render it.\n *\n * @default undefined\n */\n lineClamp?: 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5'\n /**\n * How to align the text horizontally.\n *\n * @default 'start'\n */\n align?: BoxProps['textAlign']\n}\n\nconst Text = polymorphicComponent<'div', TextProps>(function Text(\n {\n as,\n size = 'body',\n weight = 'regular',\n tone = 'normal',\n align,\n children,\n lineClamp,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n const lineClampMultipleLines =\n typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp ?? 1) > 1\n\n return (\n <Box\n {...props}\n as={as}\n className={[\n exceptionallySetClassName,\n styles.text,\n size !== 'body' ? getClassNames(styles, 'size', size) : null,\n weight !== 'regular' ? getClassNames(styles, 'weight', weight) : null,\n tone !== 'normal' ? getClassNames(styles, 'tone', tone) : null,\n lineClampMultipleLines ? styles.lineClampMultipleLines : null,\n lineClamp ? getClassNames(styles, 'lineClamp', lineClamp.toString()) : null,\n ]}\n textAlign={align}\n // Prevents emojis from being cut-off\n // See https://github.com/Doist/reactist/pull/528\n paddingRight={lineClamp ? 'xsmall' : undefined}\n ref={ref}\n >\n {children}\n </Box>\n )\n})\n\nexport type { TextProps }\nexport { Text }\n"],"names":["polymorphicComponent","ref","as","size","weight","tone","align","children","lineClamp","exceptionallySetClassName","props","lineClampMultipleLines","Number","React","Box","className","styles","text","getClassNames","toString","textAlign","paddingRight","undefined"],"mappings":"2SAoDaA,wBAAuC,WAYhDC,OAVIC,IAAAA,OACAC,KAAAA,aAAO,aACPC,OAAAA,aAAS,gBACTC,KAAAA,aAAO,WACPC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,UACAC,IAAAA,0BACGC,6HAIDC,EACmB,iBAAdH,EAAyBI,OAAOJ,GAAa,GAAKA,MAAAA,EAAAA,EAAa,GAAK,SAG3EK,gBAACC,uBACOJ,GACJR,GAAIA,EACJa,UAAW,CACPN,EACAO,UAAOC,KACE,SAATd,EAAkBe,gBAAcF,UAAQ,OAAQb,GAAQ,KAC7C,YAAXC,EAAuBc,gBAAcF,UAAQ,SAAUZ,GAAU,KACxD,WAATC,EAAoBa,gBAAcF,UAAQ,OAAQX,GAAQ,KAC1DM,EAAyBK,UAAOL,uBAAyB,KACzDH,EAAYU,gBAAcF,UAAQ,YAAaR,EAAUW,YAAc,MAE3EC,UAAWd,EAGXe,aAAcb,EAAY,cAAWc,EACrCrB,IAAKA,IAEJM"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={text:"e25b6eac","size-xsmall":"_7be564c9","size-small":"_0b65f3be","size-large":"_148c266b","size-xlarge":"efa6a189","weight-medium":"a1ce91c1","weight-strong":"_615a6cf6","tone-secondary":"e1348c0a","tone-danger":"f2471c06","line-clamp-1":"_8f257fa0",lineClamp:"b219e836","line-clamp-2":"d1379189","line-clamp-3":"edc9a040","line-clamp-4":"d463b64b","line-clamp-5":"_4feee537"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={text:"c12d1277","size-caption":"c88e1204","size-copy":"_426d67ec","size-subtitle":"f978d6c7","weight-semibold":"_0c31eccd","weight-bold":"aba17bdd","tone-secondary":"_2767b43d","tone-danger":"e8ae531e",lineClampMultipleLines:"dc839422","lineClamp-1":"e2d23135","lineClamp-2":"_7c778b7e","lineClamp-3":"_5ff41166","lineClamp-4":"b7a4998e","lineClamp-5":"_6a7f8803"};
2
2
  //# sourceMappingURL=text.module.css.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { BaseFieldProps } from '../base-field';
3
- declare type TextAreaProps = BaseFieldProps<HTMLTextAreaElement>;
2
+ import { FieldComponentProps } from '../base-field';
3
+ declare type TextAreaProps = FieldComponentProps<HTMLTextAreaElement>;
4
4
  declare function TextArea({ id, label, secondaryLabel, auxiliaryLabel, hint, maxWidth, ...props }: TextAreaProps): JSX.Element;
5
5
  export { TextArea };
6
6
  export type { TextAreaProps };
@@ -1 +1 @@
1
- {"version":3,"file":"text-area.js","sources":["../../../src/new-components/text-area/text-area.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseField, BaseFieldProps } from '../base-field'\nimport { Box } from '../box'\nimport styles from './text-area.module.css'\n\ntype TextAreaProps = BaseFieldProps<HTMLTextAreaElement>\n\nfunction TextArea({\n id,\n label,\n secondaryLabel,\n auxiliaryLabel,\n hint,\n maxWidth,\n ...props\n}: TextAreaProps) {\n return (\n <BaseField\n id={id}\n label={label}\n secondaryLabel={secondaryLabel}\n auxiliaryLabel={auxiliaryLabel}\n hint={hint}\n className={styles.container}\n maxWidth={maxWidth}\n >\n {(extraProps) => (\n <Box width=\"full\">\n <textarea {...props} {...extraProps} />\n </Box>\n )}\n </BaseField>\n )\n}\n\nexport { TextArea }\nexport type { TextAreaProps }\n"],"names":["id","label","secondaryLabel","auxiliaryLabel","hint","maxWidth","props","React","BaseField","className","styles","container","extraProps","Box","width"],"mappings":"gRAOA,gBACIA,IAAAA,GACAC,IAAAA,MACAC,IAAAA,eACAC,IAAAA,eACAC,IAAAA,KACAC,IAAAA,SACGC,8GAGCC,gBAACC,aACGR,GAAIA,EACJC,MAAOA,EACPC,eAAgBA,EAChBC,eAAgBA,EAChBC,KAAMA,EACNK,UAAWC,UAAOC,UAClBN,SAAUA,IAET,SAACO,UACEL,gBAACM,OAAIC,MAAM,QACPP,4CAAcD,EAAWM"}
1
+ {"version":3,"file":"text-area.js","sources":["../../../src/new-components/text-area/text-area.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseField, FieldComponentProps } from '../base-field'\nimport { Box } from '../box'\nimport styles from './text-area.module.css'\n\ntype TextAreaProps = FieldComponentProps<HTMLTextAreaElement>\n\nfunction TextArea({\n id,\n label,\n secondaryLabel,\n auxiliaryLabel,\n hint,\n maxWidth,\n ...props\n}: TextAreaProps) {\n return (\n <BaseField\n id={id}\n label={label}\n secondaryLabel={secondaryLabel}\n auxiliaryLabel={auxiliaryLabel}\n hint={hint}\n className={styles.container}\n maxWidth={maxWidth}\n >\n {(extraProps) => (\n <Box width=\"full\">\n <textarea {...props} {...extraProps} />\n </Box>\n )}\n </BaseField>\n )\n}\n\nexport { TextArea }\nexport type { TextAreaProps }\n"],"names":["id","label","secondaryLabel","auxiliaryLabel","hint","maxWidth","props","React","BaseField","className","styles","container","extraProps","Box","width"],"mappings":"gRAOA,gBACIA,IAAAA,GACAC,IAAAA,MACAC,IAAAA,eACAC,IAAAA,eACAC,IAAAA,KACAC,IAAAA,SACGC,8GAGCC,gBAACC,aACGR,GAAIA,EACJC,MAAOA,EACPC,eAAgBA,EAChBC,eAAgBA,EAChBC,KAAMA,EACNK,UAAWC,UAAOC,UAClBN,SAAUA,IAET,SAACO,UACEL,gBAACM,OAAIC,MAAM,QACPP,4CAAcD,EAAWM"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={container:"b2fe9429"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={container:"_5a579f96"};
2
2
  //# sourceMappingURL=text-area.module.css.js.map
@@ -1,6 +1,9 @@
1
1
  import * as React from 'react';
2
- import { BaseFieldProps } from '../base-field';
3
- declare type TextFieldProps = BaseFieldProps<HTMLInputElement>;
4
- declare const TextField: React.ForwardRefExoticComponent<Pick<TextFieldProps, "id" | "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" | "type" | "value" | "width" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "slot" | "spellCheck" | "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" | "secondaryLabel" | "auxiliaryLabel" | "hint" | "maxWidth"> & React.RefAttributes<HTMLInputElement>>;
2
+ import type { FieldComponentProps } from '../base-field';
3
+ declare type TextFieldType = 'email' | 'search' | 'tel' | 'text' | 'url';
4
+ declare type TextFieldProps = Omit<FieldComponentProps<HTMLInputElement>, 'type'> & {
5
+ type?: TextFieldType;
6
+ };
7
+ declare const TextField: React.ForwardRefExoticComponent<Pick<TextFieldProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "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" | "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" | "label" | "secondaryLabel" | "auxiliaryLabel" | "hint" | "maxWidth" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "pattern" | "readOnly" | "required" | "size" | "src" | "step" | "type" | "value" | "width"> & React.RefAttributes<HTMLInputElement>>;
5
8
  export { TextField };
6
- export type { TextFieldProps };
9
+ export type { TextFieldProps, TextFieldType };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),i=require("../box/box.js"),t=require("../base-field/base-field.js"),a=require("./text-field.module.css.js");exports.TextField=r.forwardRef((function(l,d){var s=l.id,n=l.label,u=l.secondaryLabel,o=l.auxiliaryLabel,b=l.hint,c=l.type,x=void 0===c?"text":c,p=l.maxWidth,f=l.hidden,h=e.objectWithoutPropertiesLoose(l,["id","label","secondaryLabel","auxiliaryLabel","hint","type","maxWidth","hidden"]);return r.createElement(t.BaseField,{id:s,label:n,secondaryLabel:u,auxiliaryLabel:o,hint:b,maxWidth:p,hidden:f},(function(e){return r.createElement(i.Box,{className:a.default.inputWrapper},r.createElement("input",Object.assign({},h,e,{type:x,ref:d})))}))}));
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),i=require("../box/box.js"),a=require("../base-field/base-field.js"),t=require("./text-field.module.css.js");exports.TextField=r.forwardRef((function(l,d){var s=l.id,b=l.label,n=l.secondaryLabel,u=l.auxiliaryLabel,o=l.hint,c=l.type,x=void 0===c?"text":c,p=l.maxWidth,y=l.hidden,f=l["aria-describedby"],h=e.objectWithoutPropertiesLoose(l,["id","label","secondaryLabel","auxiliaryLabel","hint","type","maxWidth","hidden","aria-describedby"]);return r.createElement(a.BaseField,{id:s,label:b,secondaryLabel:n,auxiliaryLabel:u,hint:o,maxWidth:p,hidden:y,"aria-describedby":f},(function(e){return r.createElement(i.Box,{className:t.default.inputWrapper},r.createElement("input",Object.assign({},h,e,{type:x,ref:d})))}))}));
2
2
  //# sourceMappingURL=text-field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-field.js","sources":["../../../src/new-components/text-field/text-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseField, BaseFieldProps } from '../base-field'\nimport { Box } from '../box'\nimport styles from './text-field.module.css'\n\ntype TextFieldProps = BaseFieldProps<HTMLInputElement>\n\nconst TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(function TextField(\n { id, label, secondaryLabel, auxiliaryLabel, hint, type = 'text', maxWidth, hidden, ...props },\n ref,\n) {\n return (\n <BaseField\n id={id}\n label={label}\n secondaryLabel={secondaryLabel}\n auxiliaryLabel={auxiliaryLabel}\n hint={hint}\n maxWidth={maxWidth}\n hidden={hidden}\n >\n {(extraProps) => (\n <Box className={styles.inputWrapper}>\n <input {...props} {...extraProps} type={type} ref={ref} />\n </Box>\n )}\n </BaseField>\n )\n})\n\nexport { TextField }\nexport type { TextFieldProps }\n"],"names":["React","ref","id","label","secondaryLabel","auxiliaryLabel","hint","type","maxWidth","hidden","props","BaseField","extraProps","Box","className","styles","inputWrapper"],"mappings":"kRAOkBA,cAAmD,WAEjEC,OADEC,IAAAA,GAAIC,IAAAA,MAAOC,IAAAA,eAAgBC,IAAAA,eAAgBC,IAAAA,SAAMC,KAAAA,aAAO,SAAQC,IAAAA,SAAUC,IAAAA,OAAWC,8HAInFV,gBAACW,aACGT,GAAIA,EACJC,MAAOA,EACPC,eAAgBA,EAChBC,eAAgBA,EAChBC,KAAMA,EACNE,SAAUA,EACVC,OAAQA,IAEP,SAACG,UACEZ,gBAACa,OAAIC,UAAWC,UAAOC,cACnBhB,yCAAWU,EAAWE,GAAYL,KAAMA,EAAMN,IAAKA"}
1
+ {"version":3,"file":"text-field.js","sources":["../../../src/new-components/text-field/text-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseField } from '../base-field'\nimport { Box } from '../box'\nimport styles from './text-field.module.css'\nimport type { FieldComponentProps } from '../base-field'\n\ntype TextFieldType = 'email' | 'search' | 'tel' | 'text' | 'url'\n\ntype TextFieldProps = Omit<FieldComponentProps<HTMLInputElement>, 'type'> & {\n type?: TextFieldType\n}\n\nconst TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(function TextField(\n {\n id,\n label,\n secondaryLabel,\n auxiliaryLabel,\n hint,\n type = 'text',\n maxWidth,\n hidden,\n 'aria-describedby': ariaDescribedBy,\n ...props\n },\n ref,\n) {\n return (\n <BaseField\n id={id}\n label={label}\n secondaryLabel={secondaryLabel}\n auxiliaryLabel={auxiliaryLabel}\n hint={hint}\n maxWidth={maxWidth}\n hidden={hidden}\n aria-describedby={ariaDescribedBy}\n >\n {(extraProps) => (\n <Box className={styles.inputWrapper}>\n <input {...props} {...extraProps} type={type} ref={ref} />\n </Box>\n )}\n </BaseField>\n )\n})\n\nexport { TextField }\nexport type { TextFieldProps, TextFieldType }\n"],"names":["React","ref","id","label","secondaryLabel","auxiliaryLabel","hint","type","maxWidth","hidden","ariaDescribedBy","props","BaseField","extraProps","Box","className","styles","inputWrapper"],"mappings":"kRAYkBA,cAAmD,WAajEC,OAXIC,IAAAA,GACAC,IAAAA,MACAC,IAAAA,eACAC,IAAAA,eACAC,IAAAA,SACAC,KAAAA,aAAO,SACPC,IAAAA,SACAC,IAAAA,OACoBC,IAApB,oBACGC,iJAKHX,gBAACY,aACGV,GAAIA,EACJC,MAAOA,EACPC,eAAgBA,EAChBC,eAAgBA,EAChBC,KAAMA,EACNE,SAAUA,EACVC,OAAQA,qBACUC,IAEjB,SAACG,UACEb,gBAACc,OAAIC,UAAWC,UAAOC,cACnBjB,yCAAWW,EAAWE,GAAYN,KAAMA,EAAMN,IAAKA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={inputWrapper:"_509cf6b5"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={inputWrapper:"dd9ffeab"};
2
2
  //# sourceMappingURL=text-field.module.css.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,5 @@
1
- import * as React from 'react';
2
1
  import type { OpenInNewTab } from '../common-types';
3
2
  declare type TextLinkProps = OpenInNewTab;
4
- declare const TextLink: import("../type-helpers").ForwardRefComponentWithAs<OpenInNewTab, React.ElementType<any>>;
3
+ declare const TextLink: import("../../utils/polymorphism").PolymorphicComponent<"a", OpenInNewTab, "obfuscateClassName">;
5
4
  export { TextLink };
6
5
  export type { TextLinkProps };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),o=require("../type-helpers.js"),t=require("../box/box.js"),n=require("./text-link.module.css.js");exports.TextLink=o.forwardRefWithAs((function(o,i){var s=o.component,a=void 0===s?"a":s,l=o.openInNewTab,u=void 0!==l&&l,p=e.objectWithoutPropertiesLoose(o,["component","tone","openInNewTab"]);return r.createElement(t.Box,Object.assign({},p,{component:a,display:"inline",className:n.default.container,ref:i,target:u?"_blank":void 0,rel:u?"noopener noreferrer":void 0}))}));
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),o=require("../../utils/polymorphism.js"),t=require("../box/box.js"),i=require("./text-link.module.css.js");exports.TextLink=o.polymorphicComponent((function(o,s){var a=o.as,l=void 0===a?"a":a,n=o.openInNewTab,p=void 0!==n&&n,u=o.exceptionallySetClassName,c=e.objectWithoutPropertiesLoose(o,["as","openInNewTab","exceptionallySetClassName"]);return r.createElement(t.Box,Object.assign({},c,{as:l,display:"inline",className:[u,i.default.container],ref:s,target:p?"_blank":void 0,rel:p?"noopener noreferrer":void 0}))}));
2
2
  //# sourceMappingURL=text-link.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-link.js","sources":["../../../src/new-components/text-link/text-link.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { forwardRefWithAs } from '../type-helpers'\nimport styles from './text-link.module.css'\nimport type { OpenInNewTab } from '../common-types'\n\ntype TextLinkProps = OpenInNewTab\n\nconst TextLink = forwardRefWithAs<TextLinkProps>(function TextLink(\n { component = 'a', tone = 'normal', openInNewTab = false, ...props },\n ref,\n) {\n return (\n <Box\n {...props}\n component={component}\n display=\"inline\"\n className={styles.container}\n ref={ref}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n />\n )\n})\n\nexport { TextLink }\nexport type { TextLinkProps }\n"],"names":["forwardRefWithAs","ref","component","openInNewTab","props","React","Box","display","className","styles","container","target","undefined","rel"],"mappings":"uQAQiBA,oBAAgC,WAE7CC,WADEC,UAAAA,aAAY,UAAsBC,aAAAA,gBAAyBC,+EAIzDC,gBAACC,uBACOF,GACJF,UAAWA,EACXK,QAAQ,SACRC,UAAWC,UAAOC,UAClBT,IAAKA,EACLU,OAAQR,EAAe,cAAWS,EAClCC,IAAKV,EAAe,2BAAwBS"}
1
+ {"version":3,"file":"text-link.js","sources":["../../../src/new-components/text-link/text-link.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport styles from './text-link.module.css'\nimport type { OpenInNewTab } from '../common-types'\n\ntype TextLinkProps = OpenInNewTab\n\nconst TextLink = polymorphicComponent<'a', TextLinkProps>(function TextLink(\n { as = 'a', openInNewTab = false, exceptionallySetClassName, ...props },\n ref,\n) {\n return (\n <Box\n {...props}\n as={as}\n display=\"inline\"\n className={[exceptionallySetClassName, styles.container]}\n ref={ref}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n />\n )\n})\n\nexport { TextLink }\nexport type { TextLinkProps }\n"],"names":["polymorphicComponent","ref","as","openInNewTab","exceptionallySetClassName","props","React","Box","display","className","styles","container","target","undefined","rel"],"mappings":"gRAQiBA,wBAAyC,WAEtDC,WADEC,GAAAA,aAAK,UAAKC,aAAAA,gBAAsBC,IAAAA,0BAA8BC,6FAI5DC,gBAACC,uBACOF,GACJH,GAAIA,EACJM,QAAQ,SACRC,UAAW,CAACL,EAA2BM,UAAOC,WAC9CV,IAAKA,EACLW,OAAQT,EAAe,cAAWU,EAClCC,IAAKX,EAAe,2BAAwBU"}