@cerberus-design/react 0.15.0 → 0.16.0-next-4f6c716

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 (519) hide show
  1. package/build/legacy/_tsup-dts-rollup.d.cts +1329 -360
  2. package/build/legacy/components/Accordion.cjs.map +1 -1
  3. package/build/legacy/components/AccordionItemGroup.cjs.map +1 -1
  4. package/build/legacy/components/DatePicker.client.cjs +63 -77
  5. package/build/legacy/components/DatePicker.client.cjs.map +1 -1
  6. package/build/legacy/components/FileStatus.cjs +126 -79
  7. package/build/legacy/components/FileStatus.cjs.map +1 -1
  8. package/build/legacy/components/Legend.cjs +10 -22
  9. package/build/legacy/components/Legend.cjs.map +1 -1
  10. package/build/legacy/components/button/button.cjs +154 -0
  11. package/build/legacy/components/button/button.cjs.map +1 -0
  12. package/build/legacy/components/button/index.cjs +163 -0
  13. package/build/legacy/components/button/index.cjs.map +1 -0
  14. package/build/legacy/components/button/parts.cjs +159 -0
  15. package/build/legacy/components/button/parts.cjs.map +1 -0
  16. package/build/legacy/components/checkbox/checkbox-icon.cjs +121 -0
  17. package/build/legacy/components/checkbox/checkbox-icon.cjs.map +1 -0
  18. package/build/legacy/components/checkbox/checkbox.cjs +165 -0
  19. package/build/legacy/components/checkbox/checkbox.cjs.map +1 -0
  20. package/build/legacy/components/checkbox/index.cjs +179 -0
  21. package/build/legacy/components/checkbox/index.cjs.map +1 -0
  22. package/build/legacy/components/checkbox/parts.cjs +89 -0
  23. package/build/legacy/components/checkbox/parts.cjs.map +1 -0
  24. package/build/legacy/components/checkbox/primitives.cjs +87 -0
  25. package/build/legacy/components/checkbox/primitives.cjs.map +1 -0
  26. package/build/legacy/components/{FieldMessage.cjs → deprecated/FieldMessage.cjs} +4 -17
  27. package/build/legacy/components/deprecated/FieldMessage.cjs.map +1 -0
  28. package/build/legacy/components/{FieldsetLabel.cjs → deprecated/FieldsetLabel.cjs} +1 -1
  29. package/build/legacy/components/deprecated/FieldsetLabel.cjs.map +1 -0
  30. package/build/legacy/components/{Textarea.cjs → deprecated/Label.cjs} +24 -36
  31. package/build/legacy/components/deprecated/Label.cjs.map +1 -0
  32. package/build/legacy/components/{Modal.cjs → deprecated/Modal.cjs} +1 -1
  33. package/build/legacy/components/deprecated/Modal.cjs.map +1 -0
  34. package/build/legacy/components/{ModalDescription.cjs → deprecated/ModalDescription.cjs} +1 -1
  35. package/build/legacy/components/deprecated/ModalDescription.cjs.map +1 -0
  36. package/build/legacy/components/{ModalHeader.cjs → deprecated/ModalHeader.cjs} +1 -1
  37. package/build/legacy/components/deprecated/ModalHeader.cjs.map +1 -0
  38. package/build/legacy/components/{ModalHeading.cjs → deprecated/ModalHeading.cjs} +1 -1
  39. package/build/legacy/components/deprecated/ModalHeading.cjs.map +1 -0
  40. package/build/legacy/components/{NavMenuLink.cjs → deprecated/NavMenuLink.cjs} +2 -2
  41. package/build/legacy/components/deprecated/NavMenuLink.cjs.map +1 -0
  42. package/build/legacy/components/{NavMenuList.cjs → deprecated/NavMenuList.cjs} +2 -2
  43. package/build/legacy/components/deprecated/NavMenuList.cjs.map +1 -0
  44. package/build/legacy/components/{NavMenuTrigger.cjs → deprecated/NavMenuTrigger.cjs} +2 -2
  45. package/build/legacy/components/deprecated/NavMenuTrigger.cjs.map +1 -0
  46. package/build/legacy/components/field/field.cjs +130 -0
  47. package/build/legacy/components/field/field.cjs.map +1 -0
  48. package/build/legacy/components/field/index.cjs +267 -0
  49. package/build/legacy/components/field/index.cjs.map +1 -0
  50. package/build/legacy/components/field/parts.cjs +188 -0
  51. package/build/legacy/components/field/parts.cjs.map +1 -0
  52. package/build/legacy/components/field/primitives.cjs +191 -0
  53. package/build/legacy/components/field/primitives.cjs.map +1 -0
  54. package/build/legacy/components/{Button.cjs → field/start-indicator.cjs} +14 -19
  55. package/build/legacy/components/field/start-indicator.cjs.map +1 -0
  56. package/build/legacy/components/field/status-indicator.cjs +78 -0
  57. package/build/legacy/components/field/status-indicator.cjs.map +1 -0
  58. package/build/legacy/components/fieldset/fieldset.cjs +116 -0
  59. package/build/legacy/components/fieldset/fieldset.cjs.map +1 -0
  60. package/build/legacy/components/fieldset/index.cjs +126 -0
  61. package/build/legacy/components/fieldset/index.cjs.map +1 -0
  62. package/build/legacy/components/fieldset/parts.cjs +80 -0
  63. package/build/legacy/components/fieldset/parts.cjs.map +1 -0
  64. package/build/legacy/components/fieldset/primitives.cjs +76 -0
  65. package/build/legacy/components/fieldset/primitives.cjs.map +1 -0
  66. package/build/legacy/components/for.cjs +38 -0
  67. package/build/legacy/components/for.cjs.map +1 -0
  68. package/build/legacy/components/radio/index.cjs +143 -0
  69. package/build/legacy/components/radio/index.cjs.map +1 -0
  70. package/build/legacy/components/radio/parts.cjs +113 -0
  71. package/build/legacy/components/radio/parts.cjs.map +1 -0
  72. package/build/legacy/components/radio/primitives.cjs +115 -0
  73. package/build/legacy/components/radio/primitives.cjs.map +1 -0
  74. package/build/legacy/components/radio/radio.cjs +82 -0
  75. package/build/legacy/components/radio/radio.cjs.map +1 -0
  76. package/build/legacy/components/select/index.cjs +265 -0
  77. package/build/legacy/components/select/index.cjs.map +1 -0
  78. package/build/legacy/components/select/option-group.cjs +60 -0
  79. package/build/legacy/components/select/option-group.cjs.map +1 -0
  80. package/build/legacy/components/select/parts.cjs +153 -0
  81. package/build/legacy/components/select/parts.cjs.map +1 -0
  82. package/build/legacy/components/select/primitives.cjs +167 -0
  83. package/build/legacy/components/select/primitives.cjs.map +1 -0
  84. package/build/legacy/components/select/select.cjs +212 -0
  85. package/build/legacy/components/select/select.cjs.map +1 -0
  86. package/build/legacy/components/switch/index.cjs +118 -0
  87. package/build/legacy/components/switch/index.cjs.map +1 -0
  88. package/build/legacy/components/switch/parts.cjs +75 -0
  89. package/build/legacy/components/switch/parts.cjs.map +1 -0
  90. package/build/legacy/components/switch/primitives.cjs +72 -0
  91. package/build/legacy/components/switch/primitives.cjs.map +1 -0
  92. package/build/legacy/components/{Fieldset.cjs → switch/switch-indicator.cjs} +17 -32
  93. package/build/legacy/components/switch/switch-indicator.cjs.map +1 -0
  94. package/build/legacy/components/switch/switch.cjs +106 -0
  95. package/build/legacy/components/switch/switch.cjs.map +1 -0
  96. package/build/legacy/components/toggle/index.cjs +45 -0
  97. package/build/legacy/components/toggle/index.cjs.map +1 -0
  98. package/build/legacy/components/toggle/parts.cjs +41 -0
  99. package/build/legacy/components/toggle/parts.cjs.map +1 -0
  100. package/build/legacy/components/toggle/primitives.cjs +35 -0
  101. package/build/legacy/components/toggle/primitives.cjs.map +1 -0
  102. package/build/legacy/config/types.cjs.map +1 -1
  103. package/build/legacy/context/confirm-modal.cjs +55 -45
  104. package/build/legacy/context/confirm-modal.cjs.map +1 -1
  105. package/build/legacy/context/cta-modal.cjs +55 -45
  106. package/build/legacy/context/cta-modal.cjs.map +1 -1
  107. package/build/legacy/context/field.cjs +23 -4
  108. package/build/legacy/context/field.cjs.map +1 -1
  109. package/build/legacy/context/notification-center.cjs +24 -16
  110. package/build/legacy/context/notification-center.cjs.map +1 -1
  111. package/build/legacy/context/prompt-modal.cjs +206 -194
  112. package/build/legacy/context/prompt-modal.cjs.map +1 -1
  113. package/build/legacy/hooks/useDate.cjs.map +1 -1
  114. package/build/legacy/hooks/useRootColors.cjs +0 -1
  115. package/build/legacy/hooks/useRootColors.cjs.map +1 -1
  116. package/build/legacy/hooks/useToggle.cjs.map +1 -1
  117. package/build/legacy/index.cjs +1831 -1330
  118. package/build/legacy/index.cjs.map +1 -1
  119. package/build/legacy/utils/index.cjs +22 -2
  120. package/build/legacy/utils/index.cjs.map +1 -1
  121. package/build/modern/_tsup-dts-rollup.d.ts +1329 -360
  122. package/build/modern/{chunk-PM7CWT3N.js → chunk-245SMQ45.js} +2 -2
  123. package/build/modern/chunk-245SMQ45.js.map +1 -0
  124. package/build/modern/chunk-2BIHLH4V.js +15 -0
  125. package/build/modern/chunk-2BIHLH4V.js.map +1 -0
  126. package/build/modern/chunk-2CVGNLIM.js +15 -0
  127. package/build/modern/chunk-2CVGNLIM.js.map +1 -0
  128. package/build/modern/{chunk-ISCJ542I.js → chunk-2HOUQ2DX.js} +2 -2
  129. package/build/modern/chunk-2LF3HPNA.js +1 -0
  130. package/build/modern/chunk-5RTNSVYU.js +88 -0
  131. package/build/modern/chunk-5RTNSVYU.js.map +1 -0
  132. package/build/modern/chunk-6I2FW4WI.js +33 -0
  133. package/build/modern/chunk-6I2FW4WI.js.map +1 -0
  134. package/build/modern/chunk-6KZVE4HC.js +52 -0
  135. package/build/modern/chunk-6KZVE4HC.js.map +1 -0
  136. package/build/modern/{chunk-25HMVHLT.js → chunk-7SU6FCTJ.js} +5 -5
  137. package/build/modern/chunk-7TQRTBUP.js +19 -0
  138. package/build/modern/chunk-7TQRTBUP.js.map +1 -0
  139. package/build/modern/{chunk-UZVQ4INR.js → chunk-AIJ75ENY.js} +2 -2
  140. package/build/modern/chunk-AIJ75ENY.js.map +1 -0
  141. package/build/modern/chunk-AO3GB72J.js +27 -0
  142. package/build/modern/chunk-AO3GB72J.js.map +1 -0
  143. package/build/modern/{chunk-NUMM4TNC.js → chunk-AUALRL3U.js} +2 -2
  144. package/build/modern/chunk-AUALRL3U.js.map +1 -0
  145. package/build/modern/{chunk-IGHMP4WA.js → chunk-AZRFYQO7.js} +1 -1
  146. package/build/modern/chunk-AZRFYQO7.js.map +1 -0
  147. package/build/modern/chunk-BL7G3577.js +29 -0
  148. package/build/modern/chunk-BL7G3577.js.map +1 -0
  149. package/build/modern/chunk-BPRF34DU.js +62 -0
  150. package/build/modern/chunk-BPRF34DU.js.map +1 -0
  151. package/build/modern/chunk-CAZ3EICD.js +16 -0
  152. package/build/modern/chunk-CAZ3EICD.js.map +1 -0
  153. package/build/modern/chunk-CIMY2U22.js +10 -0
  154. package/build/modern/chunk-CIMY2U22.js.map +1 -0
  155. package/build/modern/{chunk-SD3OVTHT.js → chunk-CMYD5KWA.js} +43 -46
  156. package/build/modern/chunk-CMYD5KWA.js.map +1 -0
  157. package/build/modern/chunk-CNA2VKAH.js +43 -0
  158. package/build/modern/chunk-CNA2VKAH.js.map +1 -0
  159. package/build/modern/chunk-CYC2YUKU.js +1 -0
  160. package/build/modern/{chunk-PZAZKQMO.js → chunk-DRDNNRU3.js} +2 -2
  161. package/build/modern/chunk-DRDNNRU3.js.map +1 -0
  162. package/build/modern/{chunk-NJSETNRL.js → chunk-DXBZ3HMY.js} +2 -2
  163. package/build/modern/chunk-EL4MX2PG.js +22 -0
  164. package/build/modern/chunk-EL4MX2PG.js.map +1 -0
  165. package/build/modern/chunk-FBS7AX76.js +37 -0
  166. package/build/modern/chunk-FBS7AX76.js.map +1 -0
  167. package/build/modern/{chunk-JAROS4Q3.js → chunk-FMRWRVUS.js} +7 -7
  168. package/build/modern/chunk-FMRWRVUS.js.map +1 -0
  169. package/build/modern/chunk-FUL2VRDU.js +25 -0
  170. package/build/modern/chunk-FUL2VRDU.js.map +1 -0
  171. package/build/modern/{chunk-BHB56M7S.js → chunk-H54FR7IP.js} +6 -6
  172. package/build/modern/chunk-H54FR7IP.js.map +1 -0
  173. package/build/modern/chunk-IASVL7CW.js +19 -0
  174. package/build/modern/chunk-IASVL7CW.js.map +1 -0
  175. package/build/modern/{chunk-REO5GUNC.js → chunk-ICTISECN.js} +1 -1
  176. package/build/modern/chunk-ICTISECN.js.map +1 -0
  177. package/build/modern/chunk-IDTAB2UJ.js +1 -0
  178. package/build/modern/chunk-IIH363FO.js +13 -0
  179. package/build/modern/chunk-IIH363FO.js.map +1 -0
  180. package/build/modern/chunk-KQQPZJEI.js +21 -0
  181. package/build/modern/chunk-KQQPZJEI.js.map +1 -0
  182. package/build/modern/chunk-KWZ3CEG6.js +23 -0
  183. package/build/modern/chunk-KWZ3CEG6.js.map +1 -0
  184. package/build/modern/{chunk-JWIJHSI6.js → chunk-L7N24B6B.js} +3 -6
  185. package/build/modern/chunk-L7N24B6B.js.map +1 -0
  186. package/build/modern/chunk-LT62577B.js +23 -0
  187. package/build/modern/chunk-LT62577B.js.map +1 -0
  188. package/build/modern/chunk-LZWNHXRP.js +48 -0
  189. package/build/modern/chunk-LZWNHXRP.js.map +1 -0
  190. package/build/modern/{chunk-EDARV2EI.js → chunk-MISIUX63.js} +4 -4
  191. package/build/modern/{chunk-3BM6MZ4A.js → chunk-MWRO5QYD.js} +1 -1
  192. package/build/modern/chunk-MWRO5QYD.js.map +1 -0
  193. package/build/modern/chunk-OGYMMATX.js +1 -0
  194. package/build/modern/chunk-OVHCXBBI.js +22 -0
  195. package/build/modern/chunk-OVHCXBBI.js.map +1 -0
  196. package/build/modern/chunk-P3SF56LT.js +47 -0
  197. package/build/modern/chunk-P3SF56LT.js.map +1 -0
  198. package/build/modern/{chunk-JIRW4XOJ.js → chunk-Q3I4H6EC.js} +2 -2
  199. package/build/modern/chunk-Q3I4H6EC.js.map +1 -0
  200. package/build/modern/chunk-QCBLRACK.js +133 -0
  201. package/build/modern/chunk-QCBLRACK.js.map +1 -0
  202. package/build/modern/{chunk-ILQW5VZT.js → chunk-RBNOEAWJ.js} +4 -7
  203. package/build/modern/chunk-RBNOEAWJ.js.map +1 -0
  204. package/build/modern/{chunk-YKKNWILF.js → chunk-RHCTPSKT.js} +2 -15
  205. package/build/modern/chunk-RHCTPSKT.js.map +1 -0
  206. package/build/modern/chunk-STLN7BMJ.js +22 -0
  207. package/build/modern/chunk-STLN7BMJ.js.map +1 -0
  208. package/build/modern/{chunk-7NN3SJ7W.js → chunk-SWX5JWZR.js} +2 -2
  209. package/build/modern/chunk-SWX5JWZR.js.map +1 -0
  210. package/build/modern/{chunk-GCQMH4QA.js → chunk-SXLPDPOZ.js} +4 -4
  211. package/build/modern/chunk-TIJAFPHQ.js +1 -0
  212. package/build/modern/chunk-TYPULJMJ.js +1 -0
  213. package/build/modern/chunk-UDY6USHW.js +1 -0
  214. package/build/modern/chunk-V4YYGGMH.js +1 -0
  215. package/build/modern/chunk-VSTOSLFS.js +100 -0
  216. package/build/modern/chunk-VSTOSLFS.js.map +1 -0
  217. package/build/modern/{chunk-ZL6ZITLA.js → chunk-WECB67DC.js} +2 -2
  218. package/build/modern/chunk-WECB67DC.js.map +1 -0
  219. package/build/modern/{chunk-BAWZBF5Q.js → chunk-WN7TJX6J.js} +2 -2
  220. package/build/modern/{chunk-RMVJK26W.js → chunk-XJQXHSH7.js} +1 -2
  221. package/build/modern/chunk-XJQXHSH7.js.map +1 -0
  222. package/build/modern/chunk-XTNGF4D6.js +41 -0
  223. package/build/modern/chunk-XTNGF4D6.js.map +1 -0
  224. package/build/modern/chunk-Y4ZEJ2EF.js +31 -0
  225. package/build/modern/chunk-Y4ZEJ2EF.js.map +1 -0
  226. package/build/modern/{chunk-WPVDQRRF.js → chunk-YOTXFCCC.js} +2 -2
  227. package/build/modern/chunk-YOTXFCCC.js.map +1 -0
  228. package/build/modern/chunk-Z3FDG263.js +53 -0
  229. package/build/modern/chunk-Z3FDG263.js.map +1 -0
  230. package/build/modern/chunk-Z52R6ABJ.js +21 -0
  231. package/build/modern/chunk-Z52R6ABJ.js.map +1 -0
  232. package/build/modern/{chunk-FGCO27TC.js → chunk-ZDANBCM3.js} +6 -6
  233. package/build/modern/chunk-ZDANBCM3.js.map +1 -0
  234. package/build/modern/{chunk-O6LFWUHI.js → chunk-ZFFW5ELD.js} +10 -10
  235. package/build/modern/chunk-ZFFW5ELD.js.map +1 -0
  236. package/build/modern/components/Accordion.js +1 -1
  237. package/build/modern/components/AccordionItemGroup.js +3 -3
  238. package/build/modern/components/Admonition.client.js +3 -3
  239. package/build/modern/components/Admonition.js +4 -4
  240. package/build/modern/components/Avatar.js +2 -2
  241. package/build/modern/components/DatePicker.client.js +4 -3
  242. package/build/modern/components/FileStatus.js +11 -5
  243. package/build/modern/components/FileUploader.js +3 -3
  244. package/build/modern/components/Legend.js +1 -2
  245. package/build/modern/components/Tag.js +2 -2
  246. package/build/modern/components/button/button.js +12 -0
  247. package/build/modern/components/button/index.js +16 -0
  248. package/build/modern/components/button/parts.js +10 -0
  249. package/build/modern/components/checkbox/checkbox-icon.js +12 -0
  250. package/build/modern/components/checkbox/checkbox.js +13 -0
  251. package/build/modern/components/checkbox/index.js +30 -0
  252. package/build/modern/components/checkbox/parts.js +8 -0
  253. package/build/modern/components/checkbox/primitives.js +17 -0
  254. package/build/modern/components/deprecated/FieldMessage.js +8 -0
  255. package/build/modern/components/deprecated/FieldsetLabel.js +7 -0
  256. package/build/modern/components/deprecated/Label.js +17 -0
  257. package/build/modern/components/deprecated/Label.js.map +1 -0
  258. package/build/modern/components/deprecated/Modal.js +7 -0
  259. package/build/modern/components/deprecated/Modal.js.map +1 -0
  260. package/build/modern/components/deprecated/ModalDescription.js +7 -0
  261. package/build/modern/components/deprecated/ModalDescription.js.map +1 -0
  262. package/build/modern/components/deprecated/ModalHeader.js +7 -0
  263. package/build/modern/components/deprecated/ModalHeader.js.map +1 -0
  264. package/build/modern/components/deprecated/ModalHeading.js +7 -0
  265. package/build/modern/components/deprecated/ModalHeading.js.map +1 -0
  266. package/build/modern/components/deprecated/NavMenuLink.js +8 -0
  267. package/build/modern/components/deprecated/NavMenuLink.js.map +1 -0
  268. package/build/modern/components/deprecated/NavMenuList.js +12 -0
  269. package/build/modern/components/deprecated/NavMenuList.js.map +1 -0
  270. package/build/modern/components/deprecated/NavMenuTrigger.js +11 -0
  271. package/build/modern/components/deprecated/NavMenuTrigger.js.map +1 -0
  272. package/build/modern/components/field/field.js +14 -0
  273. package/build/modern/components/field/field.js.map +1 -0
  274. package/build/modern/components/field/index.js +44 -0
  275. package/build/modern/components/field/index.js.map +1 -0
  276. package/build/modern/components/field/parts.js +11 -0
  277. package/build/modern/components/field/parts.js.map +1 -0
  278. package/build/modern/components/field/primitives.js +26 -0
  279. package/build/modern/components/field/primitives.js.map +1 -0
  280. package/build/modern/components/field/start-indicator.js +7 -0
  281. package/build/modern/components/field/start-indicator.js.map +1 -0
  282. package/build/modern/components/field/status-indicator.js +9 -0
  283. package/build/modern/components/field/status-indicator.js.map +1 -0
  284. package/build/modern/components/fieldset/fieldset.js +11 -0
  285. package/build/modern/components/fieldset/fieldset.js.map +1 -0
  286. package/build/modern/components/fieldset/index.js +24 -0
  287. package/build/modern/components/fieldset/index.js.map +1 -0
  288. package/build/modern/components/fieldset/parts.js +8 -0
  289. package/build/modern/components/fieldset/parts.js.map +1 -0
  290. package/build/modern/components/fieldset/primitives.js +13 -0
  291. package/build/modern/components/fieldset/primitives.js.map +1 -0
  292. package/build/modern/components/for.js +7 -0
  293. package/build/modern/components/for.js.map +1 -0
  294. package/build/modern/components/radio/index.js +30 -0
  295. package/build/modern/components/radio/index.js.map +1 -0
  296. package/build/modern/components/radio/parts.js +8 -0
  297. package/build/modern/components/radio/parts.js.map +1 -0
  298. package/build/modern/components/radio/primitives.js +21 -0
  299. package/build/modern/components/radio/primitives.js.map +1 -0
  300. package/build/modern/components/radio/radio.js +8 -0
  301. package/build/modern/components/radio/radio.js.map +1 -0
  302. package/build/modern/components/select/index.js +57 -0
  303. package/build/modern/components/select/index.js.map +1 -0
  304. package/build/modern/components/select/option-group.js +10 -0
  305. package/build/modern/components/select/option-group.js.map +1 -0
  306. package/build/modern/components/select/parts.js +8 -0
  307. package/build/modern/components/select/parts.js.map +1 -0
  308. package/build/modern/components/select/primitives.js +37 -0
  309. package/build/modern/components/select/primitives.js.map +1 -0
  310. package/build/modern/components/select/select.js +15 -0
  311. package/build/modern/components/select/select.js.map +1 -0
  312. package/build/modern/components/switch/index.js +26 -0
  313. package/build/modern/components/switch/index.js.map +1 -0
  314. package/build/modern/components/switch/parts.js +8 -0
  315. package/build/modern/components/switch/parts.js.map +1 -0
  316. package/build/modern/components/switch/primitives.js +15 -0
  317. package/build/modern/components/switch/primitives.js.map +1 -0
  318. package/build/modern/components/switch/switch-indicator.js +9 -0
  319. package/build/modern/components/switch/switch-indicator.js.map +1 -0
  320. package/build/modern/components/switch/switch.js +11 -0
  321. package/build/modern/components/switch/switch.js.map +1 -0
  322. package/build/modern/components/toggle/index.js +14 -0
  323. package/build/modern/components/toggle/index.js.map +1 -0
  324. package/build/modern/components/toggle/parts.js +8 -0
  325. package/build/modern/components/toggle/parts.js.map +1 -0
  326. package/build/modern/components/toggle/primitives.js +9 -0
  327. package/build/modern/components/toggle/primitives.js.map +1 -0
  328. package/build/modern/context/confirm-modal.js +5 -4
  329. package/build/modern/context/cta-modal.js +6 -5
  330. package/build/modern/context/field.js +34 -4
  331. package/build/modern/context/field.js.map +1 -1
  332. package/build/modern/context/notification-center.js +5 -4
  333. package/build/modern/context/prompt-modal.js +14 -8
  334. package/build/modern/hooks/useDate.js +1 -1
  335. package/build/modern/hooks/useRootColors.js +1 -1
  336. package/build/modern/hooks/useToggle.js +1 -1
  337. package/build/modern/index.js +284 -116
  338. package/build/modern/index.js.map +1 -1
  339. package/build/modern/utils/index.js +5 -3
  340. package/package.json +2 -2
  341. package/src/components/Accordion.tsx +1 -0
  342. package/src/components/DatePicker.client.tsx +3 -15
  343. package/src/components/FileStatus.tsx +4 -5
  344. package/src/components/Legend.tsx +5 -6
  345. package/src/components/button/button.tsx +77 -0
  346. package/src/components/button/index.ts +2 -0
  347. package/src/components/button/parts.ts +32 -0
  348. package/src/components/checkbox/checkbox-icon.tsx +39 -0
  349. package/src/components/checkbox/checkbox.tsx +42 -0
  350. package/src/components/checkbox/index.ts +3 -0
  351. package/src/components/checkbox/parts.ts +59 -0
  352. package/src/components/checkbox/primitives.tsx +104 -0
  353. package/src/components/{FieldMessage.tsx → deprecated/FieldMessage.tsx} +2 -13
  354. package/src/components/deprecated/FieldsetLabel.tsx +32 -0
  355. package/src/components/deprecated/Label.tsx +24 -0
  356. package/src/components/{NavMenuLink.tsx → deprecated/NavMenuLink.tsx} +1 -1
  357. package/src/components/{NavMenuList.tsx → deprecated/NavMenuList.tsx} +3 -3
  358. package/src/components/{NavMenuTrigger.tsx → deprecated/NavMenuTrigger.tsx} +4 -4
  359. package/src/components/field/field.tsx +77 -0
  360. package/src/components/field/index.ts +5 -0
  361. package/src/components/field/parts.ts +77 -0
  362. package/src/components/field/primitives.tsx +204 -0
  363. package/src/components/field/start-indicator.tsx +23 -0
  364. package/src/components/field/status-indicator.tsx +58 -0
  365. package/src/components/fieldset/fieldset.tsx +55 -0
  366. package/src/components/fieldset/index.ts +3 -0
  367. package/src/components/fieldset/parts.ts +47 -0
  368. package/src/components/fieldset/primitives.tsx +79 -0
  369. package/src/components/for.tsx +43 -0
  370. package/src/components/radio/index.ts +3 -0
  371. package/src/components/radio/parts.ts +65 -0
  372. package/src/components/radio/primitives.tsx +123 -0
  373. package/src/components/radio/radio.tsx +35 -0
  374. package/src/components/select/index.ts +4 -0
  375. package/src/components/select/option-group.tsx +34 -0
  376. package/src/components/select/parts.ts +113 -0
  377. package/src/components/select/primitives.tsx +205 -0
  378. package/src/components/select/select.tsx +135 -0
  379. package/src/components/switch/index.ts +3 -0
  380. package/src/components/switch/parts.ts +53 -0
  381. package/src/components/switch/primitives.tsx +69 -0
  382. package/src/components/switch/switch-indicator.tsx +9 -0
  383. package/src/components/switch/switch.tsx +30 -0
  384. package/src/components/toggle/index.ts +2 -0
  385. package/src/components/toggle/parts.ts +32 -0
  386. package/src/components/toggle/primitives.tsx +17 -0
  387. package/src/config/types.ts +1 -0
  388. package/src/context/confirm-modal.tsx +1 -1
  389. package/src/context/cta-modal.tsx +1 -1
  390. package/src/context/field.tsx +6 -5
  391. package/src/context/notification-center.tsx +1 -1
  392. package/src/context/prompt-modal.tsx +16 -18
  393. package/src/hooks/useDate.ts +1 -7
  394. package/src/hooks/useRootColors.ts +0 -1
  395. package/src/hooks/useToggle.ts +1 -3
  396. package/src/index.ts +23 -23
  397. package/src/utils/index.ts +30 -0
  398. package/build/legacy/components/Button.cjs.map +0 -1
  399. package/build/legacy/components/Checkbox.cjs +0 -113
  400. package/build/legacy/components/Checkbox.cjs.map +0 -1
  401. package/build/legacy/components/FieldMessage.cjs.map +0 -1
  402. package/build/legacy/components/Fieldset.cjs.map +0 -1
  403. package/build/legacy/components/FieldsetLabel.cjs.map +0 -1
  404. package/build/legacy/components/Input.cjs +0 -95
  405. package/build/legacy/components/Input.cjs.map +0 -1
  406. package/build/legacy/components/Label.cjs +0 -93
  407. package/build/legacy/components/Label.cjs.map +0 -1
  408. package/build/legacy/components/Modal.cjs.map +0 -1
  409. package/build/legacy/components/ModalDescription.cjs.map +0 -1
  410. package/build/legacy/components/ModalHeader.cjs.map +0 -1
  411. package/build/legacy/components/ModalHeading.cjs.map +0 -1
  412. package/build/legacy/components/NavMenuLink.cjs.map +0 -1
  413. package/build/legacy/components/NavMenuList.cjs.map +0 -1
  414. package/build/legacy/components/NavMenuTrigger.cjs.map +0 -1
  415. package/build/legacy/components/Radio.cjs +0 -81
  416. package/build/legacy/components/Radio.cjs.map +0 -1
  417. package/build/legacy/components/Select.cjs +0 -120
  418. package/build/legacy/components/Select.cjs.map +0 -1
  419. package/build/legacy/components/Textarea.cjs.map +0 -1
  420. package/build/legacy/components/Toggle.cjs +0 -101
  421. package/build/legacy/components/Toggle.cjs.map +0 -1
  422. package/build/modern/chunk-3BM6MZ4A.js.map +0 -1
  423. package/build/modern/chunk-3ZDFQO25.js +0 -31
  424. package/build/modern/chunk-3ZDFQO25.js.map +0 -1
  425. package/build/modern/chunk-7NN3SJ7W.js.map +0 -1
  426. package/build/modern/chunk-BHB56M7S.js.map +0 -1
  427. package/build/modern/chunk-C5EHJUS5.js +0 -10
  428. package/build/modern/chunk-C5EHJUS5.js.map +0 -1
  429. package/build/modern/chunk-EXGKZGML.js +0 -28
  430. package/build/modern/chunk-EXGKZGML.js.map +0 -1
  431. package/build/modern/chunk-FGCO27TC.js.map +0 -1
  432. package/build/modern/chunk-FTPZHG6J.js +0 -46
  433. package/build/modern/chunk-FTPZHG6J.js.map +0 -1
  434. package/build/modern/chunk-IGHMP4WA.js.map +0 -1
  435. package/build/modern/chunk-ILQW5VZT.js.map +0 -1
  436. package/build/modern/chunk-JAROS4Q3.js.map +0 -1
  437. package/build/modern/chunk-JIJM6JFJ.js +0 -36
  438. package/build/modern/chunk-JIJM6JFJ.js.map +0 -1
  439. package/build/modern/chunk-JIRW4XOJ.js.map +0 -1
  440. package/build/modern/chunk-JWIJHSI6.js.map +0 -1
  441. package/build/modern/chunk-KKHL3ZO4.js +0 -69
  442. package/build/modern/chunk-KKHL3ZO4.js.map +0 -1
  443. package/build/modern/chunk-MZ3UCDUL.js +0 -43
  444. package/build/modern/chunk-MZ3UCDUL.js.map +0 -1
  445. package/build/modern/chunk-N24COMHJ.js +0 -63
  446. package/build/modern/chunk-N24COMHJ.js.map +0 -1
  447. package/build/modern/chunk-NMF2HYWO.js +0 -50
  448. package/build/modern/chunk-NMF2HYWO.js.map +0 -1
  449. package/build/modern/chunk-NUMM4TNC.js.map +0 -1
  450. package/build/modern/chunk-O6LFWUHI.js.map +0 -1
  451. package/build/modern/chunk-PM7CWT3N.js.map +0 -1
  452. package/build/modern/chunk-PZAZKQMO.js.map +0 -1
  453. package/build/modern/chunk-REO5GUNC.js.map +0 -1
  454. package/build/modern/chunk-RMVJK26W.js.map +0 -1
  455. package/build/modern/chunk-SD3OVTHT.js.map +0 -1
  456. package/build/modern/chunk-UZDVOIW5.js +0 -33
  457. package/build/modern/chunk-UZDVOIW5.js.map +0 -1
  458. package/build/modern/chunk-UZVQ4INR.js.map +0 -1
  459. package/build/modern/chunk-WPVDQRRF.js.map +0 -1
  460. package/build/modern/chunk-XQICKZH4.js +0 -59
  461. package/build/modern/chunk-XQICKZH4.js.map +0 -1
  462. package/build/modern/chunk-YKKNWILF.js.map +0 -1
  463. package/build/modern/chunk-ZL6ZITLA.js.map +0 -1
  464. package/build/modern/components/Button.js +0 -7
  465. package/build/modern/components/Checkbox.js +0 -11
  466. package/build/modern/components/FieldMessage.js +0 -9
  467. package/build/modern/components/Fieldset.js +0 -9
  468. package/build/modern/components/FieldsetLabel.js +0 -7
  469. package/build/modern/components/Input.js +0 -11
  470. package/build/modern/components/Label.js +0 -10
  471. package/build/modern/components/Modal.js +0 -7
  472. package/build/modern/components/ModalDescription.js +0 -7
  473. package/build/modern/components/ModalHeader.js +0 -7
  474. package/build/modern/components/ModalHeading.js +0 -7
  475. package/build/modern/components/NavMenuLink.js +0 -8
  476. package/build/modern/components/NavMenuList.js +0 -12
  477. package/build/modern/components/NavMenuTrigger.js +0 -11
  478. package/build/modern/components/Radio.js +0 -9
  479. package/build/modern/components/Select.js +0 -13
  480. package/build/modern/components/Textarea.js +0 -9
  481. package/build/modern/components/Toggle.js +0 -10
  482. package/src/components/Button.tsx +0 -35
  483. package/src/components/Checkbox.tsx +0 -93
  484. package/src/components/Fieldset.tsx +0 -65
  485. package/src/components/FieldsetLabel.tsx +0 -59
  486. package/src/components/Input.tsx +0 -69
  487. package/src/components/Label.tsx +0 -69
  488. package/src/components/Radio.tsx +0 -73
  489. package/src/components/Select.tsx +0 -108
  490. package/src/components/Textarea.tsx +0 -52
  491. package/src/components/Toggle.tsx +0 -91
  492. /package/build/modern/{chunk-ISCJ542I.js.map → chunk-2HOUQ2DX.js.map} +0 -0
  493. /package/build/modern/{components/Button.js.map → chunk-2LF3HPNA.js.map} +0 -0
  494. /package/build/modern/{chunk-25HMVHLT.js.map → chunk-7SU6FCTJ.js.map} +0 -0
  495. /package/build/modern/{components/Checkbox.js.map → chunk-CYC2YUKU.js.map} +0 -0
  496. /package/build/modern/{chunk-NJSETNRL.js.map → chunk-DXBZ3HMY.js.map} +0 -0
  497. /package/build/modern/{components/FieldMessage.js.map → chunk-IDTAB2UJ.js.map} +0 -0
  498. /package/build/modern/{chunk-EDARV2EI.js.map → chunk-MISIUX63.js.map} +0 -0
  499. /package/build/modern/{components/Fieldset.js.map → chunk-OGYMMATX.js.map} +0 -0
  500. /package/build/modern/{chunk-GCQMH4QA.js.map → chunk-SXLPDPOZ.js.map} +0 -0
  501. /package/build/modern/{components/FieldsetLabel.js.map → chunk-TIJAFPHQ.js.map} +0 -0
  502. /package/build/modern/{components/Input.js.map → chunk-TYPULJMJ.js.map} +0 -0
  503. /package/build/modern/{components/Label.js.map → chunk-UDY6USHW.js.map} +0 -0
  504. /package/build/modern/{components/Modal.js.map → chunk-V4YYGGMH.js.map} +0 -0
  505. /package/build/modern/{chunk-BAWZBF5Q.js.map → chunk-WN7TJX6J.js.map} +0 -0
  506. /package/build/modern/components/{ModalDescription.js.map → button/button.js.map} +0 -0
  507. /package/build/modern/components/{ModalHeader.js.map → button/index.js.map} +0 -0
  508. /package/build/modern/components/{ModalHeading.js.map → button/parts.js.map} +0 -0
  509. /package/build/modern/components/{NavMenuLink.js.map → checkbox/checkbox-icon.js.map} +0 -0
  510. /package/build/modern/components/{NavMenuList.js.map → checkbox/checkbox.js.map} +0 -0
  511. /package/build/modern/components/{NavMenuTrigger.js.map → checkbox/index.js.map} +0 -0
  512. /package/build/modern/components/{Radio.js.map → checkbox/parts.js.map} +0 -0
  513. /package/build/modern/components/{Select.js.map → checkbox/primitives.js.map} +0 -0
  514. /package/build/modern/components/{Textarea.js.map → deprecated/FieldMessage.js.map} +0 -0
  515. /package/build/modern/components/{Toggle.js.map → deprecated/FieldsetLabel.js.map} +0 -0
  516. /package/src/components/{Modal.tsx → deprecated/Modal.tsx} +0 -0
  517. /package/src/components/{ModalDescription.tsx → deprecated/ModalDescription.tsx} +0 -0
  518. /package/src/components/{ModalHeader.tsx → deprecated/ModalHeader.tsx} +0 -0
  519. /package/src/components/{ModalHeading.tsx → deprecated/ModalHeading.tsx} +0 -0
@@ -0,0 +1,191 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/field/primitives.tsx
21
+ var primitives_exports = {};
22
+ __export(primitives_exports, {
23
+ FieldErrorText: () => FieldErrorText,
24
+ FieldHelperText: () => FieldHelperText,
25
+ FieldInput: () => FieldInput,
26
+ FieldLabel: () => FieldLabel,
27
+ FieldRequiredIndicator: () => FieldRequiredIndicator,
28
+ FieldRoot: () => FieldRoot,
29
+ FieldTextarea: () => FieldTextarea,
30
+ Input: () => Input,
31
+ Textarea: () => Textarea
32
+ });
33
+ module.exports = __toCommonJS(primitives_exports);
34
+ var import_field = require("@ark-ui/react/field");
35
+ var import_css3 = require("@cerberus/styled-system/css");
36
+ var import_recipes3 = require("@cerberus/styled-system/recipes");
37
+
38
+ // src/components/field/status-indicator.tsx
39
+ var import_react2 = require("@ark-ui/react");
40
+ var import_css = require("@cerberus/styled-system/css");
41
+ var import_recipes = require("@cerberus/styled-system/recipes");
42
+
43
+ // src/context/cerberus.tsx
44
+ var import_react = require("react");
45
+ var import_jsx_runtime = require("react/jsx-runtime");
46
+ var CerberusContext = (0, import_react.createContext)(null);
47
+ function useCerberusContext() {
48
+ const context = (0, import_react.useContext)(CerberusContext);
49
+ if (!context) {
50
+ throw new Error("useCerberus must be used within a CerberusProvider");
51
+ }
52
+ return context;
53
+ }
54
+
55
+ // src/components/field/status-indicator.tsx
56
+ var import_jsx_runtime2 = require("react/jsx-runtime");
57
+ function FieldStatusIndicator(props) {
58
+ const { fallback, ...nativeProps } = props;
59
+ const styles = (0, import_recipes.field)();
60
+ const fieldContext = (0, import_react2.useFieldContext)();
61
+ const { icons } = useCerberusContext();
62
+ const { invalid: InvalidIcon } = icons;
63
+ if (fieldContext.invalid) {
64
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
65
+ "span",
66
+ {
67
+ ...nativeProps,
68
+ "aria-hidden": "true",
69
+ "data-invalid": true,
70
+ className: (0, import_css.cx)(nativeProps.className, styles.statusIndicator),
71
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(InvalidIcon, {})
72
+ }
73
+ );
74
+ }
75
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
76
+ "span",
77
+ {
78
+ ...nativeProps,
79
+ "aria-hidden": "true",
80
+ "data-part": "end-indicator",
81
+ className: (0, import_css.cx)(nativeProps.className, styles.endIndicator),
82
+ children: fallback
83
+ }
84
+ );
85
+ }
86
+
87
+ // src/components/field/start-indicator.tsx
88
+ var import_css2 = require("@cerberus/styled-system/css");
89
+ var import_recipes2 = require("@cerberus/styled-system/recipes");
90
+ var import_jsx_runtime3 = require("react/jsx-runtime");
91
+ function FieldStartIndicator(props) {
92
+ const styles = (0, import_recipes2.field)();
93
+ if (!props.children) return null;
94
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
95
+ "span",
96
+ {
97
+ ...props,
98
+ "data-part": "start-indicator",
99
+ className: (0, import_css2.cx)(props.className, styles.startIndicator)
100
+ }
101
+ );
102
+ }
103
+
104
+ // src/components/field/primitives.tsx
105
+ var import_jsx_runtime4 = require("react/jsx-runtime");
106
+ function FieldRoot(props) {
107
+ const { size, ...fieldProps } = props;
108
+ const styles = (0, import_recipes3.field)({ size });
109
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
110
+ import_field.Field.Root,
111
+ {
112
+ ...fieldProps,
113
+ className: (0, import_css3.cx)(styles.root, fieldProps.className)
114
+ }
115
+ );
116
+ }
117
+ function FieldLabel(props) {
118
+ const { children, ...nativeProps } = props;
119
+ const styles = (0, import_recipes3.field)();
120
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_field.Field.Label, { ...nativeProps, className: (0, import_css3.cx)(styles.label, props.className), children: [
121
+ children,
122
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_field.Field.RequiredIndicator, { children: "(required)" })
123
+ ] });
124
+ }
125
+ function FieldRequiredIndicator() {
126
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_field.Field.RequiredIndicator, { children: "(required)" });
127
+ }
128
+ function FieldInput(props) {
129
+ const { size, startIcon, endIcon, ...fieldProps } = props;
130
+ const styles = (0, import_recipes3.field)({ size });
131
+ const hasStartIcon = Boolean(startIcon);
132
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: styles.inputRoot, children: [
133
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FieldStartIndicator, { children: startIcon }),
134
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
135
+ import_field.Field.Input,
136
+ {
137
+ ...fieldProps,
138
+ ...hasStartIcon && { "data-has": "start-indicator" },
139
+ className: (0, import_css3.cx)(styles.input, fieldProps.className)
140
+ }
141
+ ),
142
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FieldStatusIndicator, { fallback: endIcon })
143
+ ] });
144
+ }
145
+ function FieldHelperText(props) {
146
+ const styles = (0, import_recipes3.field)();
147
+ if (!props.children) return null;
148
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
149
+ import_field.Field.HelperText,
150
+ {
151
+ ...props,
152
+ className: (0, import_css3.cx)(styles.helperText, props.className)
153
+ }
154
+ );
155
+ }
156
+ function FieldErrorText(props) {
157
+ const styles = (0, import_recipes3.field)();
158
+ if (!props.children) return null;
159
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
160
+ import_field.Field.ErrorText,
161
+ {
162
+ ...props,
163
+ className: (0, import_css3.cx)(styles.errorText, props.className)
164
+ }
165
+ );
166
+ }
167
+ function FieldTextarea(props) {
168
+ const styles = (0, import_recipes3.field)();
169
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
170
+ import_field.Field.Textarea,
171
+ {
172
+ ...props,
173
+ className: (0, import_css3.cx)(styles.textarea, props.className)
174
+ }
175
+ );
176
+ }
177
+ var Input = FieldInput;
178
+ var Textarea = FieldTextarea;
179
+ // Annotate the CommonJS export names for ESM import in node:
180
+ 0 && (module.exports = {
181
+ FieldErrorText,
182
+ FieldHelperText,
183
+ FieldInput,
184
+ FieldLabel,
185
+ FieldRequiredIndicator,
186
+ FieldRoot,
187
+ FieldTextarea,
188
+ Input,
189
+ Textarea
190
+ });
191
+ //# sourceMappingURL=primitives.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/field/primitives.tsx","../../../../src/components/field/status-indicator.tsx","../../../../src/context/cerberus.tsx","../../../../src/components/field/start-indicator.tsx"],"sourcesContent":["import {\n Field,\n type FieldHelperTextProps,\n type FieldInputProps as ArkFieldInputProps,\n type FieldLabelProps,\n type FieldRootProps as ArkFieldRootProps,\n type FieldTextareaProps,\n} from '@ark-ui/react/field'\nimport type { ReactNode } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { field, type FieldVariantProps } from '@cerberus/styled-system/recipes'\nimport { FieldStatusIndicator } from './status-indicator'\nimport { FieldStartIndicator } from './start-indicator'\n\n/**\n * This module contains all the primitives of the Field component.\n * @module 'field'\n */\n\nexport type FieldRootProps = ArkFieldRootProps & FieldVariantProps\n\n/**\n * The context & container for the Field components.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot required ids={{ input: 'exampleId' }}>\n * <FieldLabel>Label</FieldLabel>\n * <FieldInput />\n * </FieldRoot>\n * ```\n */\nexport function FieldRoot(props: FieldRootProps) {\n const { size, ...fieldProps } = props\n const styles = field({ size })\n return (\n <Field.Root\n {...fieldProps}\n className={cx(styles.root, fieldProps.className)}\n />\n )\n}\n\n/**\n * The label for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldLabel>Label</FieldLabel>\n * </FieldRoot>\n * ```\n */\nexport function FieldLabel(props: FieldLabelProps) {\n const { children, ...nativeProps } = props\n const styles = field()\n return (\n <Field.Label {...nativeProps} className={cx(styles.label, props.className)}>\n {children}\n <Field.RequiredIndicator>(required)</Field.RequiredIndicator>\n </Field.Label>\n )\n}\n\n/**\n * The required indicator for the Field component.\n */\nexport function FieldRequiredIndicator() {\n return <Field.RequiredIndicator>(required)</Field.RequiredIndicator>\n}\n\nexport interface FieldInputProps\n extends Omit<ArkFieldInputProps, 'size'>,\n FieldVariantProps {\n /**\n * An optional icon to display at the start of the input.\n */\n startIcon?: ReactNode\n /**\n * An optional icon to display at the end of the input.\n */\n endIcon?: ReactNode\n}\n\n/**\n * The input for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldInput />\n * </FieldRoot>\n * ```\n */\nexport function FieldInput(props: FieldInputProps) {\n const { size, startIcon, endIcon, ...fieldProps } = props\n const styles = field({ size })\n const hasStartIcon = Boolean(startIcon)\n\n return (\n <div className={styles.inputRoot}>\n <FieldStartIndicator>{startIcon}</FieldStartIndicator>\n <Field.Input\n {...fieldProps}\n {...(hasStartIcon && { 'data-has': 'start-indicator' })}\n className={cx(styles.input, fieldProps.className)}\n />\n <FieldStatusIndicator fallback={endIcon} />\n </div>\n )\n}\n\n/**\n * The helper text for the Field component that is shown when the field is\n * valid.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldInput />\n * <FieldHelperText>Helper text</FieldHelperText>\n * </FieldRoot>\n * ```\n */\nexport function FieldHelperText(props: FieldHelperTextProps) {\n const styles = field()\n\n if (!props.children) return null\n\n return (\n <Field.HelperText\n {...props}\n className={cx(styles.helperText, props.className)}\n />\n )\n}\n\n/**\n * The error text for the Field component that is shown when the field is\n * invalid.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldInput />\n * <FieldErrorText>Error text</FieldErrorText>\n * </FieldRoot>\n * ```\n */\nexport function FieldErrorText(props: FieldHelperTextProps) {\n const styles = field()\n\n if (!props.children) return null\n\n return (\n <Field.ErrorText\n {...props}\n className={cx(styles.errorText, props.className)}\n />\n )\n}\n\n/**\n * The textarea for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldTextarea />\n * </FieldRoot>\n * ```\n */\nexport function FieldTextarea(props: FieldTextareaProps) {\n const styles = field()\n return (\n <Field.Textarea\n {...props}\n className={cx(styles.textarea, props.className)}\n />\n )\n}\n\n/**\n * A named export for the FieldInput component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * import { Input } from '@cerberus/react'\n *\n * <Field\n * ids={{\n * control: 'email',\n * }}\n * label=\"Enter your email\"\n * helperText=\"We'll never share your email with anyone else.\"\n * errorText=\"Email is required.\"\n * required\n * >\n * <Input type=\"email\" />\n * </Field>\n * ```\n */\nexport const Input = FieldInput\nexport const Textarea = FieldTextarea\n","'use client'\n\nimport { useFieldContext } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { field } from '@cerberus/styled-system/recipes'\nimport { useCerberusContext } from '../../context/cerberus'\nimport type { HTMLAttributes, ReactNode } from 'react'\n\nexport interface FieldStatusIndicatorProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * The fallback content to display when the field is valid.\n */\n fallback?: ReactNode\n}\n\n/**\n * The invalid status indicator for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldStatusIndicator />\n * </FieldRoot>\n * ```\n */\nexport function FieldStatusIndicator(props: FieldStatusIndicatorProps) {\n const { fallback, ...nativeProps } = props\n const styles = field()\n const fieldContext = useFieldContext()\n\n const { icons } = useCerberusContext()\n const { invalid: InvalidIcon } = icons\n\n if (fieldContext.invalid) {\n return (\n <span\n {...nativeProps}\n aria-hidden=\"true\"\n data-invalid\n className={cx(nativeProps.className, styles.statusIndicator)}\n >\n <InvalidIcon />\n </span>\n )\n }\n\n return (\n <span\n {...nativeProps}\n aria-hidden=\"true\"\n data-part=\"end-indicator\"\n className={cx(nativeProps.className, styles.endIndicator)}\n >\n {fallback}\n </span>\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport { field } from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\nexport type FieldIndicatorProps = HTMLAttributes<HTMLSpanElement>\n\n/**\n * The start indicator displays an indicator at the start of the Input.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n */\nexport function FieldStartIndicator(props: FieldIndicatorProps) {\n const styles = field()\n\n if (!props.children) return null\n\n return (\n <span\n {...props}\n data-part=\"start-indicator\"\n className={cx(props.className, styles.startIndicator)}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAOO;AAEP,IAAAA,cAAmB;AACnB,IAAAC,kBAA8C;;;ACR9C,IAAAC,gBAAgC;AAChC,iBAAmB;AACnB,qBAAsB;;;ACF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AO;AAE5B,SACE;AAAA,IAAC,mBAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,gBAAG,OAAO,WAAW,MAAM,SAAS;AAAA;AAAA,EACjD;AAEJ;AAYO,SAAS,cAAc,OAA2B;AACvD,QAAM,aAAS,uBAAM;AACrB,SACE;AAAA,IAAC,mBAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,gBAAG,OAAO,UAAU,MAAM,SAAS;AAAA;AAAA,EAChD;AAEJ;AAsBO,IAAM,QAAQ;AACd,IAAM,WAAW;","names":["import_css","import_recipes","import_react","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime"]}
@@ -17,34 +17,29 @@ var __copyProps = (to, from, except, desc) => {
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
- // src/components/Button.tsx
21
- var Button_exports = {};
22
- __export(Button_exports, {
23
- Button: () => Button
20
+ // src/components/field/start-indicator.tsx
21
+ var start_indicator_exports = {};
22
+ __export(start_indicator_exports, {
23
+ FieldStartIndicator: () => FieldStartIndicator
24
24
  });
25
- module.exports = __toCommonJS(Button_exports);
25
+ module.exports = __toCommonJS(start_indicator_exports);
26
26
  var import_css = require("@cerberus/styled-system/css");
27
27
  var import_recipes = require("@cerberus/styled-system/recipes");
28
28
  var import_jsx_runtime = require("react/jsx-runtime");
29
- function Button(props) {
30
- const { palette, usage, shape, ...nativeProps } = props;
29
+ function FieldStartIndicator(props) {
30
+ const styles = (0, import_recipes.field)();
31
+ if (!props.children) return null;
31
32
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
32
- "button",
33
+ "span",
33
34
  {
34
- ...nativeProps,
35
- className: (0, import_css.cx)(
36
- nativeProps.className,
37
- (0, import_recipes.button)({
38
- palette,
39
- usage,
40
- shape
41
- })
42
- )
35
+ ...props,
36
+ "data-part": "start-indicator",
37
+ className: (0, import_css.cx)(props.className, styles.startIndicator)
43
38
  }
44
39
  );
45
40
  }
46
41
  // Annotate the CommonJS export names for ESM import in node:
47
42
  0 && (module.exports = {
48
- Button
43
+ FieldStartIndicator
49
44
  });
50
- //# sourceMappingURL=Button.cjs.map
45
+ //# sourceMappingURL=start-indicator.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/field/start-indicator.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { field } from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\nexport type FieldIndicatorProps = HTMLAttributes<HTMLSpanElement>\n\n/**\n * The start indicator displays an indicator at the start of the Input.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n */\nexport function FieldStartIndicator(props: FieldIndicatorProps) {\n const styles = field()\n\n if (!props.children) return null\n\n return (\n <span\n {...props}\n data-part=\"start-indicator\"\n className={cx(props.className, styles.startIndicator)}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAmB;AACnB,qBAAsB;AAelB;AANG,SAAS,oBAAoB,OAA4B;AAC9D,QAAM,aAAS,sBAAM;AAErB,MAAI,CAAC,MAAM,SAAU,QAAO;AAE5B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,aAAU;AAAA,MACV,eAAW,eAAG,MAAM,WAAW,OAAO,cAAc;AAAA;AAAA,EACtD;AAEJ;","names":[]}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/components/field/status-indicator.tsx
22
+ var status_indicator_exports = {};
23
+ __export(status_indicator_exports, {
24
+ FieldStatusIndicator: () => FieldStatusIndicator
25
+ });
26
+ module.exports = __toCommonJS(status_indicator_exports);
27
+ var import_react2 = require("@ark-ui/react");
28
+ var import_css = require("@cerberus/styled-system/css");
29
+ var import_recipes = require("@cerberus/styled-system/recipes");
30
+
31
+ // src/context/cerberus.tsx
32
+ var import_react = require("react");
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var CerberusContext = (0, import_react.createContext)(null);
35
+ function useCerberusContext() {
36
+ const context = (0, import_react.useContext)(CerberusContext);
37
+ if (!context) {
38
+ throw new Error("useCerberus must be used within a CerberusProvider");
39
+ }
40
+ return context;
41
+ }
42
+
43
+ // src/components/field/status-indicator.tsx
44
+ var import_jsx_runtime2 = require("react/jsx-runtime");
45
+ function FieldStatusIndicator(props) {
46
+ const { fallback, ...nativeProps } = props;
47
+ const styles = (0, import_recipes.field)();
48
+ const fieldContext = (0, import_react2.useFieldContext)();
49
+ const { icons } = useCerberusContext();
50
+ const { invalid: InvalidIcon } = icons;
51
+ if (fieldContext.invalid) {
52
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
53
+ "span",
54
+ {
55
+ ...nativeProps,
56
+ "aria-hidden": "true",
57
+ "data-invalid": true,
58
+ className: (0, import_css.cx)(nativeProps.className, styles.statusIndicator),
59
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(InvalidIcon, {})
60
+ }
61
+ );
62
+ }
63
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
64
+ "span",
65
+ {
66
+ ...nativeProps,
67
+ "aria-hidden": "true",
68
+ "data-part": "end-indicator",
69
+ className: (0, import_css.cx)(nativeProps.className, styles.endIndicator),
70
+ children: fallback
71
+ }
72
+ );
73
+ }
74
+ // Annotate the CommonJS export names for ESM import in node:
75
+ 0 && (module.exports = {
76
+ FieldStatusIndicator
77
+ });
78
+ //# sourceMappingURL=status-indicator.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/field/status-indicator.tsx","../../../../src/context/cerberus.tsx"],"sourcesContent":["'use client'\n\nimport { useFieldContext } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { field } from '@cerberus/styled-system/recipes'\nimport { useCerberusContext } from '../../context/cerberus'\nimport type { HTMLAttributes, ReactNode } from 'react'\n\nexport interface FieldStatusIndicatorProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * The fallback content to display when the field is valid.\n */\n fallback?: ReactNode\n}\n\n/**\n * The invalid status indicator for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldStatusIndicator />\n * </FieldRoot>\n * ```\n */\nexport function FieldStatusIndicator(props: FieldStatusIndicatorProps) {\n const { fallback, ...nativeProps } = props\n const styles = field()\n const fieldContext = useFieldContext()\n\n const { icons } = useCerberusContext()\n const { invalid: InvalidIcon } = icons\n\n if (fieldContext.invalid) {\n return (\n <span\n {...nativeProps}\n aria-hidden=\"true\"\n data-invalid\n className={cx(nativeProps.className, styles.statusIndicator)}\n >\n <InvalidIcon />\n </span>\n )\n }\n\n return (\n <span\n {...nativeProps}\n aria-hidden=\"true\"\n data-part=\"end-indicator\"\n className={cx(nativeProps.className, styles.endIndicator)}\n >\n {fallback}\n </span>\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,gBAAgC;AAChC,iBAAmB;AACnB,qBAAsB;;;ACFtB,mBAAkE;AAyB9D;AAfJ,IAAM,sBAAkB,4BAA2C,IAAI;AAyBhE,SAAS,qBAAqB;AACnC,QAAM,cAAU,yBAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;ADDQ,IAAAC,sBAAA;AAhBD,SAAS,qBAAqB,OAAkC;AACrE,QAAM,EAAE,UAAU,GAAG,YAAY,IAAI;AACrC,QAAM,aAAS,sBAAM;AACrB,QAAM,mBAAe,+BAAgB;AAErC,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,SAAS,YAAY,IAAI;AAEjC,MAAI,aAAa,SAAS;AACxB,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,eAAY;AAAA,QACZ,gBAAY;AAAA,QACZ,eAAW,eAAG,YAAY,WAAW,OAAO,eAAe;AAAA,QAE3D,uDAAC,eAAY;AAAA;AAAA,IACf;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAY;AAAA,MACZ,aAAU;AAAA,MACV,eAAW,eAAG,YAAY,WAAW,OAAO,YAAY;AAAA,MAEvD;AAAA;AAAA,EACH;AAEJ;","names":["import_react","import_jsx_runtime"]}
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/fieldset/fieldset.tsx
21
+ var fieldset_exports = {};
22
+ __export(fieldset_exports, {
23
+ Fieldset: () => Fieldset2
24
+ });
25
+ module.exports = __toCommonJS(fieldset_exports);
26
+
27
+ // src/utils/index.ts
28
+ function splitProps(props, ...keyGroups) {
29
+ const result = keyGroups.map(() => ({}));
30
+ const rest = {};
31
+ for (const key in props) {
32
+ let assigned = false;
33
+ for (let i = 0; i < keyGroups.length; i++) {
34
+ if (keyGroups[i].includes(key)) {
35
+ result[i][key] = props[key];
36
+ assigned = true;
37
+ break;
38
+ }
39
+ }
40
+ if (!assigned) {
41
+ rest[key] = props[key];
42
+ }
43
+ }
44
+ return [...result, rest];
45
+ }
46
+
47
+ // src/components/fieldset/primitives.tsx
48
+ var import_fieldset = require("@ark-ui/react/fieldset");
49
+ var import_css = require("@cerberus/styled-system/css");
50
+ var import_recipes = require("@cerberus/styled-system/recipes");
51
+ var import_jsx_runtime = require("react/jsx-runtime");
52
+ function FieldsetRoot(props) {
53
+ const styles = (0, import_recipes.fieldset)();
54
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fieldset.Fieldset.Root, { ...props, className: (0, import_css.cx)(styles.root, props.className) });
55
+ }
56
+ function FieldsetLegend(props) {
57
+ const { usage, ...legendProps } = props;
58
+ const styles = (0, import_recipes.fieldset)({ usage });
59
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
+ import_fieldset.Fieldset.Legend,
61
+ {
62
+ ...legendProps,
63
+ className: (0, import_css.cx)(styles.legend, legendProps.className)
64
+ }
65
+ );
66
+ }
67
+ function FieldsetHelperText(props) {
68
+ const { usage, ...helperTextProps } = props;
69
+ const styles = (0, import_recipes.fieldset)({ usage });
70
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
+ import_fieldset.Fieldset.HelperText,
72
+ {
73
+ ...helperTextProps,
74
+ className: (0, import_css.cx)(styles.helperText, helperTextProps.className)
75
+ }
76
+ );
77
+ }
78
+ function FieldsetErrorText(props) {
79
+ const styles = (0, import_recipes.fieldset)();
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
+ import_fieldset.Fieldset.ErrorText,
82
+ {
83
+ ...props,
84
+ className: (0, import_css.cx)(styles.errorText, props.className)
85
+ }
86
+ );
87
+ }
88
+
89
+ // src/components/fieldset/parts.ts
90
+ var FieldsetParts = {
91
+ Root: FieldsetRoot,
92
+ Legend: FieldsetLegend,
93
+ HelperText: FieldsetHelperText,
94
+ ErrorText: FieldsetErrorText
95
+ };
96
+
97
+ // src/components/fieldset/fieldset.tsx
98
+ var import_jsx_runtime2 = require("react/jsx-runtime");
99
+ function Fieldset2(props) {
100
+ const [fieldsetProps, { usage }, rootProps] = splitProps(
101
+ props,
102
+ ["legend", "helperText", "errorText", "children"],
103
+ ["usage"]
104
+ );
105
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(FieldsetParts.Root, { ...rootProps, children: [
106
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FieldsetParts.Legend, { usage, children: fieldsetProps.legend }),
107
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FieldsetParts.HelperText, { usage, children: fieldsetProps.helperText }),
108
+ fieldsetProps.children,
109
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FieldsetParts.ErrorText, { children: fieldsetProps.errorText })
110
+ ] });
111
+ }
112
+ // Annotate the CommonJS export names for ESM import in node:
113
+ 0 && (module.exports = {
114
+ Fieldset
115
+ });
116
+ //# sourceMappingURL=fieldset.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/fieldset/fieldset.tsx","../../../../src/utils/index.ts","../../../../src/components/fieldset/primitives.tsx","../../../../src/components/fieldset/parts.ts"],"sourcesContent":["import type { FieldsetRootProps } from '@ark-ui/react'\nimport { splitProps } from '../../utils'\nimport { FieldsetParts } from './parts'\nimport type { FieldsetVariantProps } from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Fieldset component.\n * @module Fieldset\n */\n\nexport interface FieldsetProps extends FieldsetRootProps, FieldsetVariantProps {\n /**\n * The legend/title/label of the fieldset group.\n */\n legend?: string\n /**\n * The description text for the fieldset group.\n */\n helperText?: string\n /**\n * The error text for the fieldset group shown when the field is invalid.\n */\n errorText?: string\n}\n\n/**\n * A component used for grouping related fields in a form that is an\n * abstraction of the Fieldset primitives.\n * @description [Fieldset Docs](https://cerberus.digitalu.design/react/fieldset)\n * @description [Primitive Docs](https://ark-ui.com/react/docs/components/fieldset)\n */\nexport function Fieldset(props: FieldsetProps) {\n const [fieldsetProps, { usage }, rootProps] = splitProps(\n props,\n ['legend', 'helperText', 'errorText', 'children'],\n ['usage'],\n )\n\n return (\n <FieldsetParts.Root {...rootProps}>\n <FieldsetParts.Legend usage={usage}>\n {fieldsetProps.legend}\n </FieldsetParts.Legend>\n <FieldsetParts.HelperText usage={usage}>\n {fieldsetProps.helperText}\n </FieldsetParts.HelperText>\n\n {fieldsetProps.children}\n\n <FieldsetParts.ErrorText>\n {fieldsetProps.errorText}\n </FieldsetParts.ErrorText>\n </FieldsetParts.Root>\n )\n}\n","/**\n * This module contains utility functions that are used across your app.\n * @module Utils\n */\n\n/**\n * Formats the count of notifications to be displayed in the notification badge.\n * @param count - The number of notifications.\n * @returns The formatted count of notifications.\n * @example\n * ```tsx\n * const count = formatNotifyCount(100)\n * console.log(count) // '99+'\n * ```\n */\nexport function formatNotifyCount(count: number): string {\n if (count > 99) return '99+'\n return count.toString()\n}\n\n/**\n * Splits the properties of an object into multiple groups based on lists of keys.\n * @param props - The object to split.\n * @param keyGroups - The lists of keys to include in each group.\n * @returns An array of objects: each containing the properties specified in the corresponding key group, and the last object containing the remaining keys.\n */\nexport function splitProps<T extends object>(\n props: T,\n ...keyGroups: (keyof T)[][]\n): { [K in keyof T]?: T[K] }[] {\n const result = keyGroups.map(() => ({}) as { [K in keyof T]?: T[K] })\n const rest = {} as { [K in keyof T]?: T[K] }\n\n for (const key in props) {\n let assigned = false\n for (let i = 0; i < keyGroups.length; i++) {\n if (keyGroups[i].includes(key as keyof T)) {\n result[i][key as keyof T] = props[key]\n assigned = true\n break\n }\n }\n if (!assigned) {\n rest[key as keyof T] = props[key]\n }\n }\n\n return [...result, rest]\n}\n\nexport * from './localStorage'\n","import {\n Fieldset,\n type FieldsetHelperTextProps,\n type FieldsetLegendProps,\n type FieldsetRootProps,\n} from '@ark-ui/react/fieldset'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n fieldset,\n type FieldsetVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains all the primitives of the Fieldset component.\n * @module 'react/fieldset'\n */\n\n/**\n * The context & container for the Fieldset components.\n * @description [Fieldset Docs](https://cerberus.digitalu.design/react/fieldset)\n * @description [Primitive Docs](https://ark-ui.com/react/docs/components/fieldset)\n */\nexport function FieldsetRoot(props: FieldsetRootProps) {\n const styles = fieldset()\n return (\n <Fieldset.Root {...props} className={cx(styles.root, props.className)} />\n )\n}\n\n/**\n * The legend element for the Fieldset group.\n * @description [Fieldset Docs](https://cerberus.digitalu.design/react/fieldset)\n * @description [Primitive Docs](https://ark-ui.com/react/docs/components/fieldset)\n */\nexport function FieldsetLegend(\n props: FieldsetLegendProps & FieldsetVariantProps,\n) {\n const { usage, ...legendProps } = props\n const styles = fieldset({ usage })\n return (\n <Fieldset.Legend\n {...legendProps}\n className={cx(styles.legend, legendProps.className)}\n />\n )\n}\n\n/**\n * The description element for the Fieldset group.\n * @description [Fieldset Docs](https://cerberus.digitalu.design/react/fieldset)\n * @description [Primitive Docs](https://ark-ui.com/react/docs/components/fieldset)\n */\nexport function FieldsetHelperText(\n props: FieldsetHelperTextProps & FieldsetVariantProps,\n) {\n const { usage, ...helperTextProps } = props\n const styles = fieldset({ usage })\n return (\n <Fieldset.HelperText\n {...helperTextProps}\n className={cx(styles.helperText, helperTextProps.className)}\n />\n )\n}\n\n/**\n * The error text element for the Fieldset group.\n * @description [Fieldset Docs](https://cerberus.digitalu.design/react/fieldset)\n * @description [Primitive Docs](https://ark-ui.com/react/docs/components/fieldset)\n */\nexport function FieldsetErrorText(props: FieldsetHelperTextProps) {\n const styles = fieldset()\n return (\n <Fieldset.ErrorText\n {...props}\n className={cx(styles.errorText, props.className)}\n />\n )\n}\n","import type { ElementType } from 'react'\nimport {\n FieldsetErrorText,\n FieldsetHelperText,\n FieldsetLegend,\n FieldsetRoot,\n} from './primitives'\n\n/**\n * This module contains the parts of the Field component.\n * @module 'field/parts'\n */\n\ninterface FieldsetPartsValue {\n /**\n * The container of the field.\n */\n Root: ElementType\n /**\n * The label of the field.\n */\n Legend: ElementType\n /**\n * The text that displays when the field is valid.\n */\n HelperText: ElementType\n /**\n * The text that displays when the field is invalid.\n */\n ErrorText: ElementType\n}\n\n/**\n * An Object containing the parts of the Field component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the FieldParts object and\n * the entire family of components vs. only what you use.\n */\nexport const FieldsetParts: FieldsetPartsValue = {\n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eAAG,OAAO,YAAY,gBAAgB,SAAS;AAAA;AAAA,EAC5D;AAEJ;AAOO,SAAS,kBAAkB,OAAgC;AAChE,QAAM,aAAS,yBAAS;AACxB,SACE;AAAA,IAAC,yBAAS;AAAA,IAAT;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,OAAO,WAAW,MAAM,SAAS;AAAA;AAAA,EACjD;AAEJ;;;ACrCO,IAAM,gBAAoC;AAAA,EAC/C,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,WAAW;AACb;;;AHPI,IAAAC,sBAAA;AARG,SAASC,UAAS,OAAsB;AAC7C,QAAM,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,IAAI;AAAA,IAC5C;AAAA,IACA,CAAC,UAAU,cAAc,aAAa,UAAU;AAAA,IAChD,CAAC,OAAO;AAAA,EACV;AAEA,SACE,8CAAC,cAAc,MAAd,EAAoB,GAAG,WACtB;AAAA,iDAAC,cAAc,QAAd,EAAqB,OACnB,wBAAc,QACjB;AAAA,IACA,6CAAC,cAAc,YAAd,EAAyB,OACvB,wBAAc,YACjB;AAAA,IAEC,cAAc;AAAA,IAEf,6CAAC,cAAc,WAAd,EACE,wBAAc,WACjB;AAAA,KACF;AAEJ;","names":["Fieldset","import_jsx_runtime","Fieldset"]}
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/fieldset/index.ts
21
+ var fieldset_exports = {};
22
+ __export(fieldset_exports, {
23
+ Fieldset: () => Fieldset2,
24
+ FieldsetErrorText: () => FieldsetErrorText,
25
+ FieldsetHelperText: () => FieldsetHelperText,
26
+ FieldsetLegend: () => FieldsetLegend,
27
+ FieldsetParts: () => FieldsetParts,
28
+ FieldsetRoot: () => FieldsetRoot
29
+ });
30
+ module.exports = __toCommonJS(fieldset_exports);
31
+
32
+ // src/utils/index.ts
33
+ function splitProps(props, ...keyGroups) {
34
+ const result = keyGroups.map(() => ({}));
35
+ const rest = {};
36
+ for (const key in props) {
37
+ let assigned = false;
38
+ for (let i = 0; i < keyGroups.length; i++) {
39
+ if (keyGroups[i].includes(key)) {
40
+ result[i][key] = props[key];
41
+ assigned = true;
42
+ break;
43
+ }
44
+ }
45
+ if (!assigned) {
46
+ rest[key] = props[key];
47
+ }
48
+ }
49
+ return [...result, rest];
50
+ }
51
+
52
+ // src/components/fieldset/primitives.tsx
53
+ var import_fieldset = require("@ark-ui/react/fieldset");
54
+ var import_css = require("@cerberus/styled-system/css");
55
+ var import_recipes = require("@cerberus/styled-system/recipes");
56
+ var import_jsx_runtime = require("react/jsx-runtime");
57
+ function FieldsetRoot(props) {
58
+ const styles = (0, import_recipes.fieldset)();
59
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fieldset.Fieldset.Root, { ...props, className: (0, import_css.cx)(styles.root, props.className) });
60
+ }
61
+ function FieldsetLegend(props) {
62
+ const { usage, ...legendProps } = props;
63
+ const styles = (0, import_recipes.fieldset)({ usage });
64
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
65
+ import_fieldset.Fieldset.Legend,
66
+ {
67
+ ...legendProps,
68
+ className: (0, import_css.cx)(styles.legend, legendProps.className)
69
+ }
70
+ );
71
+ }
72
+ function FieldsetHelperText(props) {
73
+ const { usage, ...helperTextProps } = props;
74
+ const styles = (0, import_recipes.fieldset)({ usage });
75
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
+ import_fieldset.Fieldset.HelperText,
77
+ {
78
+ ...helperTextProps,
79
+ className: (0, import_css.cx)(styles.helperText, helperTextProps.className)
80
+ }
81
+ );
82
+ }
83
+ function FieldsetErrorText(props) {
84
+ const styles = (0, import_recipes.fieldset)();
85
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
86
+ import_fieldset.Fieldset.ErrorText,
87
+ {
88
+ ...props,
89
+ className: (0, import_css.cx)(styles.errorText, props.className)
90
+ }
91
+ );
92
+ }
93
+
94
+ // src/components/fieldset/parts.ts
95
+ var FieldsetParts = {
96
+ Root: FieldsetRoot,
97
+ Legend: FieldsetLegend,
98
+ HelperText: FieldsetHelperText,
99
+ ErrorText: FieldsetErrorText
100
+ };
101
+
102
+ // src/components/fieldset/fieldset.tsx
103
+ var import_jsx_runtime2 = require("react/jsx-runtime");
104
+ function Fieldset2(props) {
105
+ const [fieldsetProps, { usage }, rootProps] = splitProps(
106
+ props,
107
+ ["legend", "helperText", "errorText", "children"],
108
+ ["usage"]
109
+ );
110
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(FieldsetParts.Root, { ...rootProps, children: [
111
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FieldsetParts.Legend, { usage, children: fieldsetProps.legend }),
112
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FieldsetParts.HelperText, { usage, children: fieldsetProps.helperText }),
113
+ fieldsetProps.children,
114
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FieldsetParts.ErrorText, { children: fieldsetProps.errorText })
115
+ ] });
116
+ }
117
+ // Annotate the CommonJS export names for ESM import in node:
118
+ 0 && (module.exports = {
119
+ Fieldset,
120
+ FieldsetErrorText,
121
+ FieldsetHelperText,
122
+ FieldsetLegend,
123
+ FieldsetParts,
124
+ FieldsetRoot
125
+ });
126
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/fieldset/index.ts","../../../../src/utils/index.ts","../../../../src/components/fieldset/primitives.tsx","../../../../src/components/fieldset/parts.ts","../../../../src/components/fieldset/fieldset.tsx"],"sourcesContent":["export * from './fieldset'\nexport * from './parts'\nexport * from './primitives'\n","/**\n * This module contains utility functions that are used across your app.\n * @module Utils\n */\n\n/**\n * Formats the count of notifications to be displayed in the notification badge.\n * @param count - The number of notifications.\n * @returns The formatted count of notifications.\n * @example\n * ```tsx\n * const count = formatNotifyCount(100)\n * console.log(count) // '99+'\n * ```\n */\nexport function formatNotifyCount(count: number): string {\n if (count > 99) return '99+'\n return count.toString()\n}\n\n/**\n * Splits the properties of an object into multiple groups based on lists of keys.\n * @param props - The object to split.\n * @param keyGroups - The lists of keys to include in each group.\n * @returns An array of objects: each containing the properties specified in the corresponding key group, and the last object containing the remaining keys.\n */\nexport function splitProps<T extends object>(\n props: T,\n ...keyGroups: (keyof T)[][]\n): { [K in keyof T]?: T[K] }[] {\n const result = keyGroups.map(() => ({}) as { [K in keyof T]?: T[K] })\n const rest = {} as { [K in keyof T]?: T[K] }\n\n for (const key in props) {\n let assigned = false\n for (let i = 0; i < keyGroups.length; i++) {\n if (keyGroups[i].includes(key as keyof T)) {\n result[i][key as keyof T] = props[key]\n assigned = true\n break\n }\n }\n if (!assigned) {\n rest[key as keyof T] = props[key]\n }\n }\n\n return [...result, rest]\n}\n\nexport * from './localStorage'\n","import {\n Fieldset,\n type FieldsetHelperTextProps,\n type FieldsetLegendProps,\n type FieldsetRootProps,\n} from '@ark-ui/react/fieldset'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n fieldset,\n type FieldsetVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains all the primitives of the Fieldset component.\n * @module 'react/fieldset'\n */\n\n/**\n * The context & container for the Fieldset components.\n * @description [Fieldset Docs](https://cerberus.digitalu.design/react/fieldset)\n * @description [Primitive Docs](https://ark-ui.com/react/docs/components/fieldset)\n */\nexport function FieldsetRoot(props: FieldsetRootProps) {\n const styles = fieldset()\n return (\n <Fieldset.Root {...props} className={cx(styles.root, props.className)} />\n )\n}\n\n/**\n * The legend element for the Fieldset group.\n * @description [Fieldset Docs](https://cerberus.digitalu.design/react/fieldset)\n * @description [Primitive Docs](https://ark-ui.com/react/docs/components/fieldset)\n */\nexport function FieldsetLegend(\n props: FieldsetLegendProps & FieldsetVariantProps,\n) {\n const { usage, ...legendProps } = props\n const styles = fieldset({ usage })\n return (\n <Fieldset.Legend\n {...legendProps}\n className={cx(styles.legend, legendProps.className)}\n />\n )\n}\n\n/**\n * The description element for the Fieldset group.\n * @description [Fieldset Docs](https://cerberus.digitalu.design/react/fieldset)\n * @description [Primitive Docs](https://ark-ui.com/react/docs/components/fieldset)\n */\nexport function FieldsetHelperText(\n props: FieldsetHelperTextProps & FieldsetVariantProps,\n) {\n const { usage, ...helperTextProps } = props\n const styles = fieldset({ usage })\n return (\n <Fieldset.HelperText\n {...helperTextProps}\n className={cx(styles.helperText, helperTextProps.className)}\n />\n )\n}\n\n/**\n * The error text element for the Fieldset group.\n * @description [Fieldset Docs](https://cerberus.digitalu.design/react/fieldset)\n * @description [Primitive Docs](https://ark-ui.com/react/docs/components/fieldset)\n */\nexport function FieldsetErrorText(props: FieldsetHelperTextProps) {\n const styles = fieldset()\n return (\n <Fieldset.ErrorText\n {...props}\n className={cx(styles.errorText, props.className)}\n />\n )\n}\n","import type { ElementType } from 'react'\nimport {\n FieldsetErrorText,\n FieldsetHelperText,\n FieldsetLegend,\n FieldsetRoot,\n} from './primitives'\n\n/**\n * This module contains the parts of the Field component.\n * @module 'field/parts'\n */\n\ninterface FieldsetPartsValue {\n /**\n * The container of the field.\n */\n Root: ElementType\n /**\n * The label of the field.\n */\n Legend: ElementType\n /**\n * The text that displays when the field is valid.\n */\n HelperText: ElementType\n /**\n * The text that displays when the field is invalid.\n */\n ErrorText: ElementType\n}\n\n/**\n * An Object containing the parts of the Field component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the FieldParts object and\n * the entire family of components vs. only what you use.\n */\nexport const FieldsetParts: FieldsetPartsValue = {\n Root: FieldsetRoot,\n Legend: FieldsetLegend,\n HelperText: FieldsetHelperText,\n ErrorText: FieldsetErrorText,\n}\n","import type { FieldsetRootProps } from '@ark-ui/react'\nimport { splitProps } from '../../utils'\nimport { FieldsetParts } from './parts'\nimport type { FieldsetVariantProps } from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Fieldset component.\n * @module Fieldset\n */\n\nexport interface FieldsetProps extends FieldsetRootProps, FieldsetVariantProps {\n /**\n * The legend/title/label of the fieldset group.\n */\n legend?: string\n /**\n * The description text for the fieldset group.\n */\n helperText?: string\n /**\n * The error text for the fieldset group shown when the field is invalid.\n */\n errorText?: string\n}\n\n/**\n * A component used for grouping related fields in a form that is an\n * abstraction of the Fieldset primitives.\n * @description [Fieldset Docs](https://cerberus.digitalu.design/react/fieldset)\n * @description [Primitive Docs](https://ark-ui.com/react/docs/components/fieldset)\n */\nexport function Fieldset(props: FieldsetProps) {\n const [fieldsetProps, { usage }, rootProps] = splitProps(\n props,\n ['legend', 'helperText', 'errorText', 'children'],\n ['usage'],\n )\n\n return (\n <FieldsetParts.Root {...rootProps}>\n <FieldsetParts.Legend usage={usage}>\n {fieldsetProps.legend}\n </FieldsetParts.Legend>\n <FieldsetParts.HelperText usage={usage}>\n {fieldsetProps.helperText}\n </FieldsetParts.HelperText>\n\n {fieldsetProps.children}\n\n <FieldsetParts.ErrorText>\n {fieldsetProps.errorText}\n </FieldsetParts.ErrorText>\n </FieldsetParts.Root>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,kBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC0BO,SAAS,WACd,UACG,WAC0B;AAC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