@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,23 @@
1
+ import {
2
+ FieldLabel
3
+ } from "./chunk-VSTOSLFS.js";
4
+
5
+ // src/components/deprecated/Label.tsx
6
+ import { label } from "@cerberus/styled-system/recipes";
7
+ import { cx } from "@cerberus/styled-system/css";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function Label(props) {
10
+ const { size, ...nativeProps } = props;
11
+ return /* @__PURE__ */ jsx(
12
+ FieldLabel,
13
+ {
14
+ ...nativeProps,
15
+ className: cx(label({ size }), props.className)
16
+ }
17
+ );
18
+ }
19
+
20
+ export {
21
+ Label
22
+ };
23
+ //# sourceMappingURL=chunk-LT62577B.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/deprecated/Label.tsx"],"sourcesContent":["import type { HTMLAttributes, PropsWithChildren } from 'react'\nimport { label, type LabelVariantProps } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport { FieldLabel } from '../field'\n\n/**\n * This module contains the Label component.\n * @module\n */\nexport type LabelBaseProps = HTMLAttributes<HTMLLabelElement>\nexport type LabelProps = LabelBaseProps & LabelVariantProps\n\n/**\n * @deprecated Use FieldLabel or FieldParts.Label instead.\n */\nexport function Label(props: PropsWithChildren<LabelProps>) {\n const { size, ...nativeProps } = props\n return (\n <FieldLabel\n {...nativeProps}\n className={cx(label({ size }), props.className)}\n />\n )\n}\n"],"mappings":";;;;;AACA,SAAS,aAAqC;AAC9C,SAAS,UAAU;AAgBf;AAHG,SAAS,MAAM,OAAsC;AAC1D,QAAM,EAAE,MAAM,GAAG,YAAY,IAAI;AACjC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,MAAM,SAAS;AAAA;AAAA,EAChD;AAEJ;","names":[]}
@@ -0,0 +1,48 @@
1
+ // src/components/switch/primitives.tsx
2
+ import {
3
+ Switch
4
+ } from "@ark-ui/react";
5
+ import { cx } from "@cerberus/styled-system/css";
6
+ import {
7
+ switchRecipe
8
+ } from "@cerberus/styled-system/recipes";
9
+ import { jsx } from "react/jsx-runtime";
10
+ function SwitchRoot(props) {
11
+ const { size, ...rootProps } = props;
12
+ const styles = switchRecipe({ size });
13
+ return /* @__PURE__ */ jsx(
14
+ Switch.Root,
15
+ {
16
+ ...rootProps,
17
+ className: cx(styles.root, rootProps.className)
18
+ }
19
+ );
20
+ }
21
+ function SwitchLabel(props) {
22
+ const styles = switchRecipe();
23
+ return /* @__PURE__ */ jsx(Switch.Label, { ...props, className: cx(styles.label, props.className) });
24
+ }
25
+ function SwitchControl(props) {
26
+ const styles = switchRecipe();
27
+ return /* @__PURE__ */ jsx(
28
+ Switch.Control,
29
+ {
30
+ ...props,
31
+ className: cx(styles.control, props.className)
32
+ }
33
+ );
34
+ }
35
+ function SwitchThumb(props) {
36
+ const styles = switchRecipe();
37
+ return /* @__PURE__ */ jsx(Switch.Thumb, { ...props, className: cx(styles.thumb, props.className) });
38
+ }
39
+ var SwitchHiddenInput = Switch.HiddenInput;
40
+
41
+ export {
42
+ SwitchRoot,
43
+ SwitchLabel,
44
+ SwitchControl,
45
+ SwitchThumb,
46
+ SwitchHiddenInput
47
+ };
48
+ //# sourceMappingURL=chunk-LZWNHXRP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/switch/primitives.tsx"],"sourcesContent":["import {\n Switch,\n type SwitchControlProps,\n type SwitchLabelProps,\n type SwitchRootProps,\n type SwitchThumbProps,\n} from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n switchRecipe,\n type SwitchRecipeVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Switch primitives\n * @module 'react/switch'\n */\n\n/**\n * The SwitchRoot component is the context provider for the Switch components.\n */\nexport function SwitchRoot(props: SwitchRootProps & SwitchRecipeVariantProps) {\n const { size, ...rootProps } = props\n const styles = switchRecipe({ size })\n return (\n <Switch.Root\n {...rootProps}\n className={cx(styles.root, rootProps.className)}\n />\n )\n}\n\n/**\n * The SwitchLabel component is the label for the Switch.\n */\nexport function SwitchLabel(props: SwitchLabelProps) {\n const styles = switchRecipe()\n return (\n <Switch.Label {...props} className={cx(styles.label, props.className)} />\n )\n}\n\n/**\n * The SwitchControl component is the visual input for the Switch.\n */\nexport function SwitchControl(props: SwitchControlProps) {\n const styles = switchRecipe()\n return (\n <Switch.Control\n {...props}\n className={cx(styles.control, props.className)}\n />\n )\n}\n\n/**\n * The SwitchThumb component is the thumb for the Switch.\n */\nexport function SwitchThumb(props: SwitchThumbProps) {\n const styles = switchRecipe()\n return (\n <Switch.Thumb {...props} className={cx(styles.thumb, props.className)} />\n )\n}\n\n/**\n * The SwitchHiddenInput component is the native input for the Switch.\n */\nexport const SwitchHiddenInput = Switch.HiddenInput\n"],"mappings":";AAAA;AAAA,EACE;AAAA,OAKK;AACP,SAAS,UAAU;AACnB;AAAA,EACE;AAAA,OAEK;AAcH;AAJG,SAAS,WAAW,OAAmD;AAC5E,QAAM,EAAE,MAAM,GAAG,UAAU,IAAI;AAC/B,QAAM,SAAS,aAAa,EAAE,KAAK,CAAC;AACpC,SACE;AAAA,IAAC,OAAO;AAAA,IAAP;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,OAAO,MAAM,UAAU,SAAS;AAAA;AAAA,EAChD;AAEJ;AAKO,SAAS,YAAY,OAAyB;AACnD,QAAM,SAAS,aAAa;AAC5B,SACE,oBAAC,OAAO,OAAP,EAAc,GAAG,OAAO,WAAW,GAAG,OAAO,OAAO,MAAM,SAAS,GAAG;AAE3E;AAKO,SAAS,cAAc,OAA2B;AACvD,QAAM,SAAS,aAAa;AAC5B,SACE;AAAA,IAAC,OAAO;AAAA,IAAP;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,OAAO,SAAS,MAAM,SAAS;AAAA;AAAA,EAC/C;AAEJ;AAKO,SAAS,YAAY,OAAyB;AACnD,QAAM,SAAS,aAAa;AAC5B,SACE,oBAAC,OAAO,OAAP,EAAc,GAAG,OAAO,WAAW,GAAG,OAAO,OAAO,MAAM,SAAS,GAAG;AAE3E;AAKO,IAAM,oBAAoB,OAAO;","names":[]}
@@ -1,9 +1,9 @@
1
- import {
2
- Show
3
- } from "./chunk-BUVVRQLZ.js";
4
1
  import {
5
2
  useCerberusContext
6
3
  } from "./chunk-GITT5645.js";
4
+ import {
5
+ Show
6
+ } from "./chunk-BUVVRQLZ.js";
7
7
 
8
8
  // src/components/Tag.tsx
9
9
  import { css, cx } from "@cerberus/styled-system/css";
@@ -62,4 +62,4 @@ var closableCss = css({
62
62
  export {
63
63
  Tag
64
64
  };
65
- //# sourceMappingURL=chunk-EDARV2EI.js.map
65
+ //# sourceMappingURL=chunk-MISIUX63.js.map
@@ -102,4 +102,4 @@ export {
102
102
  formatISOToMilitary,
103
103
  DateFormats
104
104
  };
105
- //# sourceMappingURL=chunk-3BM6MZ4A.js.map
105
+ //# sourceMappingURL=chunk-MWRO5QYD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/useDate.ts"],"sourcesContent":["'use client'\n\nimport {\n useState,\n useCallback,\n ChangeEvent,\n useMemo,\n type InputHTMLAttributes,\n} from 'react'\n\nexport interface UseDateBase {\n /**\n * The format of the date input\n */\n format?: string\n /**\n * The callback to run when the date input changes\n */\n onChange?: InputHTMLAttributes<HTMLInputElement>['onChange']\n}\n\nexport interface UseDateOptions extends UseDateBase {\n /**\n * The initial value of the date input\n */\n initialValue?: string\n}\n\nexport interface UseDateReturn extends UseDateBase {\n /**\n * The ISO formatted date string\n */\n ISO: string\n /**\n * The value of the date input\n */\n value: string\n}\n\n/**\n * @deprecated use the DatePicker family instead\n */\nexport function useDate(options?: UseDateOptions): UseDateReturn {\n const initialValue = options?.initialValue ?? ''\n const format = options?.format ?? DateFormats.USMilitary\n const onChange = options?.onChange\n const [value, setValue] = useState(initialValue)\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const newValue = formatMilitaryDate(e.currentTarget.value)\n if (onChange) onChange(e)\n setValue(newValue)\n },\n [onChange],\n )\n\n return useMemo(\n () => ({\n format,\n value,\n ISO: formatMilitaryToISO(value),\n onChange: handleChange,\n }),\n [format, value, handleChange],\n )\n}\n\n// helpers\n\n/**\n * Converts a string in US Military format to ISO format. Used within the `useDate` hook.\n * @param input The string to format\n * @returns The formatted string in ISO format (YYYY-MM-DD)\n */\nexport function formatMilitaryToISO(input: string) {\n const [day, month, year] = input.split(' ')\n const monthIndex = MONTHS.findIndex((m) => m.startsWith(month))\n const monthNum = monthIndex + 1\n return `${year ?? '0000'}-${monthNum.toString().padStart(2, '0')}-${day.padStart(\n 2,\n '0',\n )}`\n}\n\n/**\n * Converts a string to US Military format. Used within the `useDate` hook.\n * @param input The string to format\n * @returns The formatted string in US Military format (DD MMM YYYY)\n */\nexport function formatMilitaryDate(input: string): string {\n let formatted = input.toUpperCase().replace(/[^0-9A-Z]/g, '')\n let day = ''\n let month = ''\n let year = ''\n\n // Format day\n if (formatted.length >= 2) {\n day = formatted.replace(/[^0-9]/g, '').slice(0, 2)\n const dayNum = parseInt(day, 10)\n if (dayNum > 31) day = '31'\n else if (dayNum === 0) day = '01'\n formatted = formatted.slice(2)\n }\n\n // Format month\n if (formatted.length >= 3) {\n month = formatted.slice(0, 3)\n const monthIndex = MONTHS.findIndex((m) => m.startsWith(month))\n if (monthIndex !== -1) {\n month = MONTHS[monthIndex]\n } else {\n month = month.replace(/[^A-Z]/g, '')\n }\n formatted = formatted.slice(3)\n }\n\n // Format year\n if (formatted.length > 0) {\n year = formatted.slice(0, 4)\n }\n\n return [day, month, year].filter(Boolean).join(' ')\n}\n\n/**\n * Formats a date string to US Military format.\n * @param date The date string to format (i.e., '2024-01-01')\n * @returns The formatted date string in US Military format (DD MMM YYYY)\n */\nexport function formatISOToMilitary(date: string): string {\n const [year, month, day] = date.split('-')\n const monthIndex = parseInt(month, 10) - 1\n const monthStr = MONTHS[monthIndex]\n return `${day} ${monthStr} ${year}`\n}\n\n/**\n * Date formatting options\n * @example\n * ```tsx\n * const date = new Date()\n * const formatted = date.format(DateFormats.USMilitary)\n */\nexport const DateFormats = {\n get ISO() {\n return 'YYYY-MM-DD'\n },\n get USMilitary() {\n return 'DD MMM YYYY'\n },\n get Months() {\n return MONTHS\n },\n}\n\nconst MONTHS = [\n 'JAN',\n 'FEB',\n 'MAR',\n 'APR',\n 'MAY',\n 'JUN',\n 'JUL',\n 'AUG',\n 'SEP',\n 'OCT',\n 'NOV',\n 'DEC',\n]\n"],"mappings":";AAEA;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AA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AI,UAAU,UAAU,GAAG;AACzB,YAAQ,UAAU,MAAM,GAAG,CAAC;AAC5B,UAAM,aAAa,OAAO,UAAU,CAAC,MAAM,EAAE,WAAW,KAAK,CAAC;AAC9D,QAAI,eAAe,IAAI;AACrB,cAAQ,OAAO,UAAU;AAAA,IAC3B,OAAO;AACL,cAAQ,MAAM,QAAQ,WAAW,EAAE;AAAA,IACrC;AACA,gBAAY,UAAU,MAAM,CAAC;AAAA,EAC/B;AAGA,MAAI,UAAU,SAAS,GAAG;AACxB,WAAO,UAAU,MAAM,GAAG,CAAC;AAAA,EAC7B;AAEA,SAAO,CAAC,KAAK,OAAO,IAAI,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AACpD;AAOO,SAAS,oBAAoB,MAAsB;AACxD,QAAM,CAAC,MAAM,OAAO,GAAG,IAAI,KAAK,MAAM,GAAG;AACzC,QAAM,aAAa,SAAS,OAAO,EAAE,IAAI;AACzC,QAAM,WAAW,OAAO,UAAU;AAClC,SAAO,GAAG,GAAG,IAAI,QAAQ,IAAI,IAAI;AACnC;AASO,IAAM,cAAc;AAAA,EACzB,IAAI,MAAM;AACR,WAAO;AAAA,EACT;AAAA,EACA,IAAI,aAAa;AACf,WAAO;AAAA,EACT;AAAA,EACA,IAAI,SAAS;AACX,WAAO;AAAA,EACT;AACF;AAEA,IAAM,SAAS;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-OGYMMATX.js.map
@@ -0,0 +1,22 @@
1
+ import {
2
+ SwitchIndicator
3
+ } from "./chunk-CAZ3EICD.js";
4
+ import {
5
+ SwitchParts
6
+ } from "./chunk-KQQPZJEI.js";
7
+
8
+ // src/components/switch/switch.tsx
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ function Switch(props) {
11
+ const { children, ...rootProps } = props;
12
+ return /* @__PURE__ */ jsxs(SwitchParts.Root, { ...rootProps, children: [
13
+ /* @__PURE__ */ jsx(SwitchParts.Control, { children: /* @__PURE__ */ jsx(SwitchParts.Thumb, { children: /* @__PURE__ */ jsx(SwitchIndicator, {}) }) }),
14
+ /* @__PURE__ */ jsx(SwitchParts.Label, { children }),
15
+ /* @__PURE__ */ jsx(SwitchParts.HiddenInput, {})
16
+ ] });
17
+ }
18
+
19
+ export {
20
+ Switch
21
+ };
22
+ //# sourceMappingURL=chunk-OVHCXBBI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/switch/switch.tsx"],"sourcesContent":["import type { SwitchRootProps } from '@ark-ui/react'\nimport type { SwitchRecipeVariantProps } from '@cerberus/styled-system/recipes'\nimport { SwitchParts } from './parts'\nimport { SwitchIndicator } from './switch-indicator'\n\nexport type SwitchProps = SwitchRootProps & SwitchRecipeVariantProps\n\n/**\n * The Switch component is a and abstraction of the primitives that displays a\n * controlled Switch with a label.\n * @description [Cerberus Docs] https://cerberus.digitalu.design/react/switch\n * @description [Ark Docs] https://ark-ui.com/docs/components/switch\n */\nexport function Switch(props: SwitchProps) {\n const { children, ...rootProps } = props\n\n return (\n <SwitchParts.Root {...rootProps}>\n <SwitchParts.Control>\n <SwitchParts.Thumb>\n <SwitchIndicator />\n </SwitchParts.Thumb>\n </SwitchParts.Control>\n\n <SwitchParts.Label>{children}</SwitchParts.Label>\n\n <SwitchParts.HiddenInput />\n </SwitchParts.Root>\n )\n}\n"],"mappings":";;;;;;;;AAiBI,SAGM,KAHN;AAJG,SAAS,OAAO,OAAoB;AACzC,QAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AAEnC,SACE,qBAAC,YAAY,MAAZ,EAAkB,GAAG,WACpB;AAAA,wBAAC,YAAY,SAAZ,EACC,8BAAC,YAAY,OAAZ,EACC,8BAAC,mBAAgB,GACnB,GACF;AAAA,IAEA,oBAAC,YAAY,OAAZ,EAAmB,UAAS;AAAA,IAE7B,oBAAC,YAAY,aAAZ,EAAwB;AAAA,KAC3B;AAEJ;","names":[]}
@@ -0,0 +1,47 @@
1
+ import {
2
+ Portal
3
+ } from "./chunk-IQJDVFPP.js";
4
+ import {
5
+ SelectParts
6
+ } from "./chunk-XTNGF4D6.js";
7
+ import {
8
+ useCerberusContext
9
+ } from "./chunk-GITT5645.js";
10
+ import {
11
+ Show
12
+ } from "./chunk-BUVVRQLZ.js";
13
+
14
+ // src/components/select/select.tsx
15
+ import { HStack } from "@cerberus/styled-system/jsx";
16
+ import { jsx, jsxs } from "react/jsx-runtime";
17
+ function Select(props) {
18
+ const { collection, placeholder, ...rootProps } = props;
19
+ const { icons } = useCerberusContext();
20
+ const { selectArrow: SelectArrow, invalid: InvalidIcon } = icons;
21
+ return /* @__PURE__ */ jsxs(SelectParts.Root, { collection, ...rootProps, children: [
22
+ /* @__PURE__ */ jsx(SelectParts.Control, { children: /* @__PURE__ */ jsxs(SelectParts.Trigger, { children: [
23
+ /* @__PURE__ */ jsx(SelectParts.ValueText, { placeholder }),
24
+ /* @__PURE__ */ jsxs(HStack, { children: [
25
+ /* @__PURE__ */ jsx(Show, { when: props.invalid, children: /* @__PURE__ */ jsx(InvalidIcon, { "data-part": "invalid-icon" }) }),
26
+ /* @__PURE__ */ jsx(SelectParts.Indicator, { children: /* @__PURE__ */ jsx(SelectArrow, {}) })
27
+ ] })
28
+ ] }) }),
29
+ /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(SelectParts.Positioner, { children: /* @__PURE__ */ jsx(SelectParts.Content, { size: rootProps.size, children: props.children }) }) }),
30
+ /* @__PURE__ */ jsx(SelectParts.HiddenSelect, {})
31
+ ] });
32
+ }
33
+ function Option(props) {
34
+ const { item, ...itemProps } = props;
35
+ const { icons } = useCerberusContext();
36
+ const { selectChecked: CheckedIcon } = icons;
37
+ return /* @__PURE__ */ jsxs(SelectParts.Item, { ...itemProps, item, children: [
38
+ /* @__PURE__ */ jsx(SelectParts.ItemText, { children: item?.label }),
39
+ /* @__PURE__ */ jsx(SelectParts.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckedIcon, {}) })
40
+ ] });
41
+ }
42
+
43
+ export {
44
+ Select,
45
+ Option
46
+ };
47
+ //# sourceMappingURL=chunk-P3SF56LT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/select/select.tsx"],"sourcesContent":["'use client'\n\nimport type { SelectItemProps, SelectRootProps } from '@ark-ui/react/select'\nimport { type SelectVariantProps } from '@cerberus/styled-system/recipes'\nimport { HStack } from '@cerberus/styled-system/jsx'\nimport { useCerberusContext } from '../../context/cerberus'\nimport { Portal } from '../Portal'\nimport { Show } from '../Show'\nimport { SelectParts } from './parts'\n\n/**\n * This module contains the Select components.\n * @module 'react/select'\n */\n\nexport interface SelectCollectionItem {\n /**\n * What is displayed in the dropdown list.\n */\n label: string\n /**\n * The value of the selected item used in the form.\n */\n value: string\n /**\n * If the item is disabled.\n */\n disabled?: boolean\n}\n\nexport interface SelectCollection {\n /**\n * The items to be displayed in the dropdown list.\n */\n items: SelectCollectionItem[]\n}\n\nexport interface BaseSelectProps {\n /**\n * The placeholder text when no option is selected.\n */\n placeholder?: string\n}\n\nexport type SelectProps = SelectRootProps<SelectCollectionItem> &\n BaseSelectProps &\n SelectVariantProps\n\n/**\n * The Select component is a dropdown list that allows users to select an\n * option from a list.\n * @definition [Select docs](https://cerberus.digitalu.design/react/select)\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/select)\n * @example\n * ```tsx\n * import { Select, Option, createListCollection } from '@cerberus-design/react'\n *\n * export function SelectBasicPreview() {\n * const collection = createListCollection({\n * items: [\n * { label: 'Hades', value: 'hades' },\n * { label: 'Persephone', value: 'persephone' },\n * { label: 'Zeus', value: 'zeus', disabled: true },\n * ]\n * })\n *\n * return (\n * <Select\n * collection={collection}\n * label=\"Select Relative\"\n * placeholder=\"Choose option\"\n * >\n * {collection.items.map((item) => (\n * <Option key={item.value} item={item} />\n * ))}\n * </Select>\n * )\n * }\n */\nexport function Select(props: SelectProps) {\n const { collection, placeholder, ...rootProps } = props\n const { icons } = useCerberusContext()\n const { selectArrow: SelectArrow, invalid: InvalidIcon } = icons\n\n return (\n <SelectParts.Root collection={collection} {...rootProps}>\n <SelectParts.Control>\n <SelectParts.Trigger>\n <SelectParts.ValueText placeholder={placeholder} />\n\n <HStack>\n <Show when={props.invalid}>\n <InvalidIcon data-part=\"invalid-icon\" />\n </Show>\n <SelectParts.Indicator>\n <SelectArrow />\n </SelectParts.Indicator>\n </HStack>\n </SelectParts.Trigger>\n </SelectParts.Control>\n\n <Portal>\n <SelectParts.Positioner>\n <SelectParts.Content size={rootProps.size}>\n {props.children}\n </SelectParts.Content>\n </SelectParts.Positioner>\n </Portal>\n\n <SelectParts.HiddenSelect />\n </SelectParts.Root>\n )\n}\n\nexport interface OptionProps extends SelectItemProps {\n /**\n * The CollectionListItem to be displayed in the dropdown list.\n */\n item: SelectCollectionItem\n}\n\nexport function Option(props: OptionProps) {\n const { item, ...itemProps } = props\n const { icons } = useCerberusContext()\n const { selectChecked: CheckedIcon } = icons\n\n return (\n <SelectParts.Item {...itemProps} item={item}>\n <SelectParts.ItemText>{item?.label}</SelectParts.ItemText>\n <SelectParts.ItemIndicator>\n <CheckedIcon />\n </SelectParts.ItemIndicator>\n </SelectParts.Item>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAIA,SAAS,cAAc;AAoFb,cAEA,YAFA;AATH,SAAS,OAAO,OAAoB;AACzC,QAAM,EAAE,YAAY,aAAa,GAAG,UAAU,IAAI;AAClD,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,aAAa,aAAa,SAAS,YAAY,IAAI;AAE3D,SACE,qBAAC,YAAY,MAAZ,EAAiB,YAAyB,GAAG,WAC5C;AAAA,wBAAC,YAAY,SAAZ,EACC,+BAAC,YAAY,SAAZ,EACC;AAAA,0BAAC,YAAY,WAAZ,EAAsB,aAA0B;AAAA,MAEjD,qBAAC,UACC;AAAA,4BAAC,QAAK,MAAM,MAAM,SAChB,8BAAC,eAAY,aAAU,gBAAe,GACxC;AAAA,QACA,oBAAC,YAAY,WAAZ,EACC,8BAAC,eAAY,GACf;AAAA,SACF;AAAA,OACF,GACF;AAAA,IAEA,oBAAC,UACC,8BAAC,YAAY,YAAZ,EACC,8BAAC,YAAY,SAAZ,EAAoB,MAAM,UAAU,MAClC,gBAAM,UACT,GACF,GACF;AAAA,IAEA,oBAAC,YAAY,cAAZ,EAAyB;AAAA,KAC5B;AAEJ;AASO,SAAS,OAAO,OAAoB;AACzC,QAAM,EAAE,MAAM,GAAG,UAAU,IAAI;AAC/B,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,eAAe,YAAY,IAAI;AAEvC,SACE,qBAAC,YAAY,MAAZ,EAAkB,GAAG,WAAW,MAC/B;AAAA,wBAAC,YAAY,UAAZ,EAAsB,gBAAM,OAAM;AAAA,IACnC,oBAAC,YAAY,eAAZ,EACC,8BAAC,eAAY,GACf;AAAA,KACF;AAEJ;","names":[]}
@@ -1,4 +1,4 @@
1
- // src/components/Modal.tsx
1
+ // src/components/deprecated/Modal.tsx
2
2
  import { cx } from "@cerberus/styled-system/css";
3
3
  import { modal } from "@cerberus/styled-system/recipes";
4
4
  import { forwardRef } from "react";
@@ -18,4 +18,4 @@ var Modal = forwardRef(ModalEl);
18
18
  export {
19
19
  Modal
20
20
  };
21
- //# sourceMappingURL=chunk-JIRW4XOJ.js.map
21
+ //# sourceMappingURL=chunk-Q3I4H6EC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/deprecated/Modal.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { modal } from '@cerberus/styled-system/recipes'\nimport { forwardRef, type ForwardedRef, type HTMLAttributes } from 'react'\n\n/**\n * This module contains the Modal root component for a customizable modal.\n * @module\n */\n\n// Modal\n\nexport type ModalProps = HTMLAttributes<HTMLDialogElement>\n\nfunction ModalEl(props: ModalProps, ref: ForwardedRef<HTMLDialogElement>) {\n return (\n <dialog\n {...props}\n className={cx(props.className, modal().dialog)}\n ref={ref}\n />\n )\n}\n\n/**\n * @deprecated use `Dialog` instead\n */\nexport const Modal = forwardRef(ModalEl)\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,aAAa;AACtB,SAAS,kBAA0D;AAa/D;AAFJ,SAAS,QAAQ,OAAmB,KAAsC;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,WAAW,MAAM,EAAE,MAAM;AAAA,MAC7C;AAAA;AAAA,EACF;AAEJ;AAKO,IAAM,QAAQ,WAAW,OAAO;","names":[]}
@@ -0,0 +1,133 @@
1
+ // src/components/select/primitives.tsx
2
+ import {
3
+ createListCollection,
4
+ Select
5
+ } from "@ark-ui/react/select";
6
+ import {
7
+ select
8
+ } from "@cerberus/styled-system/recipes";
9
+ import { cx } from "@cerberus/styled-system/css";
10
+ import { jsx } from "react/jsx-runtime";
11
+ function SelectRoot(props) {
12
+ const { size, ...rootProps } = props;
13
+ const styles = select({ size });
14
+ return /* @__PURE__ */ jsx(
15
+ Select.Root,
16
+ {
17
+ ...rootProps,
18
+ className: cx(styles.root, rootProps.className)
19
+ }
20
+ );
21
+ }
22
+ function SelectLabel(props) {
23
+ const styles = select();
24
+ return /* @__PURE__ */ jsx(Select.Label, { ...props, className: cx(styles.label, props.className) });
25
+ }
26
+ function SelectControl(props) {
27
+ return /* @__PURE__ */ jsx(Select.Control, { ...props });
28
+ }
29
+ function SelectTrigger(props) {
30
+ const styles = select();
31
+ return /* @__PURE__ */ jsx(
32
+ Select.Trigger,
33
+ {
34
+ ...props,
35
+ className: cx(styles.trigger, props.className)
36
+ }
37
+ );
38
+ }
39
+ function SelectValueText(props) {
40
+ return /* @__PURE__ */ jsx(Select.ValueText, { ...props });
41
+ }
42
+ function SelectIndicator(props) {
43
+ const styles = select();
44
+ return /* @__PURE__ */ jsx(
45
+ Select.Indicator,
46
+ {
47
+ ...props,
48
+ className: cx(styles.indicator, props.className)
49
+ }
50
+ );
51
+ }
52
+ function SelectClearTrigger(props) {
53
+ return /* @__PURE__ */ jsx(Select.ClearTrigger, { ...props });
54
+ }
55
+ function SelectPositioner(props) {
56
+ const styles = select();
57
+ return /* @__PURE__ */ jsx(
58
+ Select.Positioner,
59
+ {
60
+ ...props,
61
+ className: cx(styles.positioner, props.className)
62
+ }
63
+ );
64
+ }
65
+ function SelectContent(props) {
66
+ const { size, ...contentProps } = props;
67
+ const styles = select({ size });
68
+ return /* @__PURE__ */ jsx(
69
+ Select.Content,
70
+ {
71
+ ...contentProps,
72
+ className: cx(styles.content, contentProps.className)
73
+ }
74
+ );
75
+ }
76
+ function SelectItemGroup(props) {
77
+ return /* @__PURE__ */ jsx(Select.ItemGroup, { ...props });
78
+ }
79
+ function SelectItemGroupLabel(props) {
80
+ const styles = select();
81
+ return /* @__PURE__ */ jsx(
82
+ Select.ItemGroupLabel,
83
+ {
84
+ ...props,
85
+ className: cx(styles.itemGroupLabel, props.className)
86
+ }
87
+ );
88
+ }
89
+ function SelectItem(props) {
90
+ const styles = select();
91
+ return /* @__PURE__ */ jsx(Select.Item, { ...props, className: cx(styles.item, props.className) });
92
+ }
93
+ function SelectItemText(props) {
94
+ return /* @__PURE__ */ jsx(Select.ItemText, { ...props });
95
+ }
96
+ function SelectItemIndicator(props) {
97
+ const styles = select();
98
+ return /* @__PURE__ */ jsx(
99
+ Select.ItemIndicator,
100
+ {
101
+ ...props,
102
+ className: cx(styles.itemIndicator, props.className)
103
+ }
104
+ );
105
+ }
106
+ function SelectHiddenSelect(props) {
107
+ return /* @__PURE__ */ jsx(Select.HiddenSelect, { ...props });
108
+ }
109
+ function createSelectCollection(collection) {
110
+ return createListCollection({
111
+ items: collection
112
+ });
113
+ }
114
+
115
+ export {
116
+ SelectRoot,
117
+ SelectLabel,
118
+ SelectControl,
119
+ SelectTrigger,
120
+ SelectValueText,
121
+ SelectIndicator,
122
+ SelectClearTrigger,
123
+ SelectPositioner,
124
+ SelectContent,
125
+ SelectItemGroup,
126
+ SelectItemGroupLabel,
127
+ SelectItem,
128
+ SelectItemText,
129
+ SelectItemIndicator,
130
+ SelectHiddenSelect,
131
+ createSelectCollection
132
+ };
133
+ //# sourceMappingURL=chunk-QCBLRACK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/select/primitives.tsx"],"sourcesContent":["import {\n createListCollection,\n Select,\n type ListCollection,\n type SelectClearTriggerProps,\n type SelectContentProps,\n type SelectControlProps,\n type SelectHiddenSelectProps,\n type SelectIndicatorProps,\n type SelectItemGroupLabelProps,\n type SelectItemGroupProps,\n type SelectItemIndicatorProps,\n type SelectItemProps,\n type SelectItemTextProps,\n type SelectLabelProps,\n type SelectPositionerProps,\n type SelectRootProps,\n type SelectTriggerProps,\n type SelectValueChangeDetails,\n type SelectValueTextProps,\n} from '@ark-ui/react/select'\nimport {\n select,\n type SelectVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport type { SelectCollectionItem } from './select'\n\n/**\n * This module contains the Select primitives\n * @module 'react/select'\n */\n\n/**\n * The SelectRoot component is the context provider for the Select component.\n */\nexport function SelectRoot(\n props: SelectRootProps<SelectCollectionItem> & SelectVariantProps,\n) {\n const { size, ...rootProps } = props\n const styles = select({ size })\n return (\n <Select.Root\n {...rootProps}\n className={cx(styles.root, rootProps.className)}\n />\n )\n}\n\n/**\n * The label that appears above the select input.\n */\nexport function SelectLabel(props: SelectLabelProps) {\n const styles = select()\n return (\n <Select.Label {...props} className={cx(styles.label, props.className)} />\n )\n}\n\n/**\n * The control that wraps the select trigger.\n */\nexport function SelectControl(props: SelectControlProps) {\n return <Select.Control {...props} />\n}\n\n/**\n * The trigger that opens the dropdown.\n */\nexport function SelectTrigger(props: SelectTriggerProps) {\n const styles = select()\n return (\n <Select.Trigger\n {...props}\n className={cx(styles.trigger, props.className)}\n />\n )\n}\n\n/**\n * The text that appears in the trigger.\n */\nexport function SelectValueText(props: SelectValueTextProps) {\n return <Select.ValueText {...props} />\n}\n\n/**\n * The indicator that appears in the trigger.\n */\nexport function SelectIndicator(props: SelectIndicatorProps) {\n const styles = select()\n return (\n <Select.Indicator\n {...props}\n className={cx(styles.indicator, props.className)}\n />\n )\n}\n\n/**\n * The trigger that clears the selected value.\n */\nexport function SelectClearTrigger(props: SelectClearTriggerProps) {\n return <Select.ClearTrigger {...props} />\n}\n\n/**\n * The positioner that contains the dropdown.\n */\nexport function SelectPositioner(props: SelectPositionerProps) {\n const styles = select()\n return (\n <Select.Positioner\n {...props}\n className={cx(styles.positioner, props.className)}\n />\n )\n}\n\n/**\n * The content of the dropdown (i.e. the container itself).\n */\nexport function SelectContent(props: SelectContentProps & SelectVariantProps) {\n const { size, ...contentProps } = props\n const styles = select({ size })\n return (\n <Select.Content\n {...contentProps}\n className={cx(styles.content, contentProps.className)}\n />\n )\n}\n\n/**\n * The container for a group of item options.\n */\nexport function SelectItemGroup(props: SelectItemGroupProps) {\n return <Select.ItemGroup {...props} />\n}\n\n/**\n * The label for a group of item options.\n */\nexport function SelectItemGroupLabel(props: SelectItemGroupLabelProps) {\n const styles = select()\n return (\n <Select.ItemGroupLabel\n {...props}\n className={cx(styles.itemGroupLabel, props.className)}\n />\n )\n}\n\n/**\n * The container for an item in the select content.\n */\nexport function SelectItem(props: SelectItemProps) {\n const styles = select()\n return <Select.Item {...props} className={cx(styles.item, props.className)} />\n}\n\n/**\n * The text for an item option.\n */\nexport function SelectItemText(props: SelectItemTextProps) {\n return <Select.ItemText {...props} />\n}\n\n/**\n * The indicator for an item option shown when it is selected.\n */\nexport function SelectItemIndicator(props: SelectItemIndicatorProps) {\n const styles = select()\n return (\n <Select.ItemIndicator\n {...props}\n className={cx(styles.itemIndicator, props.className)}\n />\n )\n}\n\n/**\n * The native input for a select item.\n */\nexport function SelectHiddenSelect(props: SelectHiddenSelectProps) {\n return <Select.HiddenSelect {...props} />\n}\n\n/**\n * A helper function to create a SelectCollection object.\n * @param collection - An array of SelectCollectionItem objects that matches\n * the following shape:\n * ```ts\n * [{ label: 'Hades', value: 'hades', disabled?: true }]\n * ```\n */\nexport function createSelectCollection(\n collection: SelectCollectionItem[],\n): ListCollection<SelectCollectionItem> {\n return createListCollection({\n items: collection,\n })\n}\n\nexport type { SelectValueChangeDetails, ListCollection }\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAkBK;AACP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,UAAU;AAiBf;AANG,SAAS,WACd,OACA;AACA,QAAM,EAAE,MAAM,GAAG,UAAU,IAAI;AAC/B,QAAM,SAAS,OAAO,EAAE,KAAK,CAAC;AAC9B,SACE;AAAA,IAAC,OAAO;AAAA,IAAP;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,OAAO,MAAM,UAAU,SAAS;AAAA;AAAA,EAChD;AAEJ;AAKO,SAAS,YAAY,OAAyB;AACnD,QAAM,SAAS,OAAO;AACtB,SACE,oBAAC,OAAO,OAAP,EAAc,GAAG,OAAO,WAAW,GAAG,OAAO,OAAO,MAAM,SAAS,GAAG;AAE3E;AAKO,SAAS,cAAc,OAA2B;AACvD,SAAO,oBAAC,OAAO,SAAP,EAAgB,GAAG,OAAO;AACpC;AAKO,SAAS,cAAc,OAA2B;AACvD,QAAM,SAAS,OAAO;AACtB,SACE;AAAA,IAAC,OAAO;AAAA,IAAP;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,OAAO,SAAS,MAAM,SAAS;AAAA;AAAA,EAC/C;AAEJ;AAKO,SAAS,gBAAgB,OAA6B;AAC3D,SAAO,oBAAC,OAAO,WAAP,EAAkB,GAAG,OAAO;AACtC;AAKO,SAAS,gBAAgB,OAA6B;AAC3D,QAAM,SAAS,OAAO;AACtB,SACE;AAAA,IAAC,OAAO;AAAA,IAAP;AAAA,MACE,GAAG;AAAA,MACJ,WAAW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AAAA,EACrD;AAEJ;AAKO,SAAS,mBAAmB,OAAgC;AACjE,SAAO,oBAAC,OAAO,cAAP,EAAqB,GAAG,OAAO;AACzC;AAUO,SAAS,uBACd,YACsC;AACtC,SAAO,qBAAqB;AAAA,IAC1B,OAAO;AAAA,EACT,CAAC;AACH;","names":[]}
@@ -1,6 +1,3 @@
1
- import {
2
- useFieldContext
3
- } from "./chunk-UZDVOIW5.js";
4
1
  import {
5
2
  Show
6
3
  } from "./chunk-BUVVRQLZ.js";
@@ -9,15 +6,15 @@ import {
9
6
  import { css, cx } from "@cerberus/styled-system/css";
10
7
  import { label } from "@cerberus/styled-system/recipes";
11
8
  import { hstack } from "@cerberus/styled-system/patterns";
9
+ import { useFieldContext } from "@ark-ui/react/field";
12
10
  import { jsx, jsxs } from "react/jsx-runtime";
13
11
  function Legend(props) {
14
12
  const { size, ...nativeProps } = props;
15
- const { invalid, ...formState } = useFieldContext();
13
+ const { invalid, required } = useFieldContext();
16
14
  return /* @__PURE__ */ jsxs(
17
15
  "legend",
18
16
  {
19
17
  ...nativeProps,
20
- ...formState,
21
18
  ...invalid && { "aria-invalid": true },
22
19
  className: cx(
23
20
  nativeProps.className,
@@ -31,7 +28,7 @@ function Legend(props) {
31
28
  ),
32
29
  children: [
33
30
  nativeProps.children,
34
- /* @__PURE__ */ jsx(Show, { when: formState.required, children: /* @__PURE__ */ jsx(
31
+ /* @__PURE__ */ jsx(Show, { when: required, children: /* @__PURE__ */ jsx(
35
32
  "span",
36
33
  {
37
34
  className: css({
@@ -49,4 +46,4 @@ function Legend(props) {
49
46
  export {
50
47
  Legend
51
48
  };
52
- //# sourceMappingURL=chunk-ILQW5VZT.js.map
49
+ //# sourceMappingURL=chunk-RBNOEAWJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Legend.tsx"],"sourcesContent":["'use client'\n\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { label, type LabelVariantProps } from '@cerberus/styled-system/recipes'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { type HTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { useFieldContext } from '@ark-ui/react/field'\n\n/**\n * This module contains the Fieldset component.\n * @module Fieldset\n */\n\nexport type LegendProps = HTMLAttributes<HTMLLegendElement> & LabelVariantProps\n\n/**\n * A component to provide a global label for a group of related elements in a form (for accessibility).\n * @memberof Fieldset\n * @see https://cerberus.digitalu.com/react/fieldset\n * @description [A11y Form Checklist](https://www.a11yproject.com/checklist/#forms)\n * @description [MDN Web Docs: Legend](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend)\n * @example\n * ```tsx\n * import { Fieldset, Legend, Field, Radio, Label } from '@cerberus/react'\n * import { Hstack } from '@cerberus/styled-system/jsx'\n *\n * function SomeForm() {\n * return (\n * <form>\n * <Fieldset>\n * <Legend>Do you like cats?</Legend>\n * <Hstack>\n * <Field>\n * <Radio id=\"yes\" name=\"cats\" value=\"yes\" />\n * <Label htmlFor=\"yes\">Yes</Label>\n * </Field>\n * </Hstack>\n * <Hstack>\n * <Field>\n * <Radio id=\"no\" name=\"cats\" value=\"no\" />\n * <Label htmlFor=\"no\">No</Label>\n * </Field>\n * </Hstack>\n * </Fieldset>\n * </form>\n * )\n * }\n * ```\n */\nexport function Legend(props: LegendProps) {\n const { size, ...nativeProps } = props\n const { invalid, required } = useFieldContext()\n\n return (\n <legend\n {...nativeProps}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(\n nativeProps.className,\n hstack({\n justify: 'space-between',\n w: 'full',\n }),\n label({\n size,\n }),\n )}\n >\n {nativeProps.children}\n <Show when={required}>\n <span\n className={css({\n color: 'page.text.100',\n fontSize: 'inherit',\n })}\n >\n (required)\n </span>\n </Show>\n </legend>\n )\n}\n"],"mappings":";;;;;AAEA,SAAS,KAAK,UAAU;AACxB,SAAS,aAAqC;AAC9C,SAAS,cAAc;AAGvB,SAAS,uBAAuB;AAgD5B,SAgBI,KAhBJ;AALG,SAAS,OAAO,OAAoB;AACzC,QAAM,EAAE,MAAM,GAAG,YAAY,IAAI;AACjC,QAAM,EAAE,SAAS,SAAS,IAAI,gBAAgB;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAI,WAAW,EAAE,gBAAgB,KAAK;AAAA,MACvC,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,OAAO;AAAA,UACL,SAAS;AAAA,UACT,GAAG;AAAA,QACL,CAAC;AAAA,QACD,MAAM;AAAA,UACJ;AAAA,QACF,CAAC;AAAA,MACH;AAAA,MAEC;AAAA,oBAAY;AAAA,QACb,oBAAC,QAAK,MAAM,UACV;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,IAAI;AAAA,cACb,OAAO;AAAA,cACP,UAAU;AAAA,YACZ,CAAC;AAAA,YACF;AAAA;AAAA,QAED,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -1,6 +1,3 @@
1
- import {
2
- useFieldContext
3
- } from "./chunk-UZDVOIW5.js";
4
1
  import {
5
2
  DatePickerContext,
6
3
  DatePickerTable,
@@ -21,7 +18,7 @@ import {
21
18
  } from "./chunk-GITT5645.js";
22
19
  import {
23
20
  Button
24
- } from "./chunk-EXGKZGML.js";
21
+ } from "./chunk-6KZVE4HC.js";
25
22
 
26
23
  // src/components/DatePicker.client.tsx
27
24
  import {
@@ -33,12 +30,10 @@ import { useMemo } from "react";
33
30
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
34
31
  var datePickerStyles = datePicker();
35
32
  function DatePicker(props) {
36
- const states = useFieldContext();
37
33
  return /* @__PURE__ */ jsx(
38
34
  ArkDP.Root,
39
35
  {
40
36
  ...props,
41
- ...states,
42
37
  positioning: {
43
38
  placement: "bottom-start"
44
39
  }
@@ -86,15 +81,12 @@ function DatePickerTrigger(props) {
86
81
  );
87
82
  }
88
83
  function DatePickerInput(props) {
89
- const { invalid, ...fieldStates } = useFieldContext();
90
84
  return /* @__PURE__ */ jsxs(ArkDP.Control, { className: datePickerStyles.control, children: [
91
85
  /* @__PURE__ */ jsx(DatePickerTrigger, {}),
92
86
  /* @__PURE__ */ jsx(
93
87
  ArkDP.Input,
94
88
  {
95
89
  ...props,
96
- ...fieldStates,
97
- ...invalid && { "aria-invalid": true },
98
90
  className: cx(props.className, datePickerStyles.input),
99
91
  placeholder: props.placeholder ?? "DD MMM YYYY",
100
92
  maxLength: 11
@@ -103,7 +95,6 @@ function DatePickerInput(props) {
103
95
  ] });
104
96
  }
105
97
  function RangePickerInput(props) {
106
- const { invalid, ...fieldStates } = useFieldContext();
107
98
  const { defaultValue, ...nativeProps } = props;
108
99
  const startDate = useMemo(() => defaultValue?.[0], [defaultValue]);
109
100
  const endDate = useMemo(() => defaultValue?.[1], [defaultValue]);
@@ -113,8 +104,6 @@ function RangePickerInput(props) {
113
104
  ArkDP.Input,
114
105
  {
115
106
  ...nativeProps,
116
- ...fieldStates,
117
- ...invalid && { "aria-invalid": true },
118
107
  "data-range-input": true,
119
108
  defaultValue: startDate,
120
109
  className: cx(props.className, datePickerStyles.input),
@@ -127,8 +116,6 @@ function RangePickerInput(props) {
127
116
  ArkDP.Input,
128
117
  {
129
118
  ...nativeProps,
130
- ...fieldStates,
131
- ...invalid && { "aria-invalid": true },
132
119
  "data-range-input": true,
133
120
  defaultValue: endDate,
134
121
  "data-range-end-input": true,
@@ -214,4 +201,4 @@ export {
214
201
  DatePickerYearView,
215
202
  DatePickerCalendar
216
203
  };
217
- //# sourceMappingURL=chunk-YKKNWILF.js.map
204
+ //# sourceMappingURL=chunk-RHCTPSKT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/DatePicker.client.tsx"],"sourcesContent":["'use client'\n\nimport {\n DatePicker as ArkDP,\n type DatePickerContentProps,\n type DatePickerInputProps,\n type DatePickerRootProps,\n type DatePickerTriggerProps,\n type DatePickerViewControlProps,\n type DatePickerViewProps,\n} from '@ark-ui/react'\nimport { Portal } from './Portal'\nimport { datePicker, iconButton } from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport {\n DatePickerView,\n DatePickerContext,\n DatePickerTable,\n DatePickerTableHeader,\n DatePickerTableCellTrigger,\n DatePickerTableCell,\n DatePickerViewControl,\n} from './DatePicker.server'\nimport { IconButton } from './IconButton'\nimport { Button } from './button/button'\nimport { useCerberusContext } from '../context/cerberus'\nimport { useMemo, type InputHTMLAttributes } from 'react'\n\n/**\n * This module contains the DatePicker client family components.\n * @module DatePicker:client\n */\n\n// We are not exposing this to the public API\nconst datePickerStyles = datePicker()\n\n/**\n * The main context provider for the DatePicker family components.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePicker(props: DatePickerRootProps) {\n // There is a bug with the Root component that causes random date selection\n // onBlur after the first selection if the format prop is used.\n // ref: https://github.com/chakra-ui/ark/issues/3112#event-16047829195\n\n // const handleFormat = useCallback((value: DateValue) => {\n // return formatISOToMilitary(value.toString())\n // }, [])\n\n return (\n <ArkDP.Root\n {...props}\n positioning={{\n placement: 'bottom-start',\n }}\n />\n )\n}\n\n/**\n * An abstraction of the DatePicker control that contains the prev, view, and\n * next triggers which control the calendar output.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerViewControlGroup />\n * ```\n */\nexport function DatePickerViewControlGroup(props: DatePickerViewControlProps) {\n const { icons } = useCerberusContext()\n const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons\n return (\n <DatePickerViewControl {...props}>\n <ArkDP.PrevTrigger asChild>\n <IconButton ariaLabel=\"Previous\" size=\"sm\">\n <PrevIcon />\n </IconButton>\n </ArkDP.PrevTrigger>\n\n <ArkDP.ViewTrigger asChild>\n <Button\n className={css({\n h: '2rem',\n paddingInline: 'md',\n })}\n shape=\"rounded\"\n size=\"sm\"\n usage=\"ghost\"\n >\n <ArkDP.RangeText />\n </Button>\n </ArkDP.ViewTrigger>\n\n <ArkDP.NextTrigger asChild>\n <IconButton ariaLabel=\"Next\" size=\"sm\">\n <NextIcon />\n </IconButton>\n </ArkDP.NextTrigger>\n </DatePickerViewControl>\n )\n}\n\n/**\n * The trigger component for the DatePicker which opens the calendar.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTrigger />\n * ```\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const { icons } = useCerberusContext()\n const { calendar: CalendarIcon } = icons\n return (\n <ArkDP.Trigger\n {...props}\n className={cx(\n props.className,\n iconButton({\n size: 'sm',\n usage: 'ghost',\n }),\n datePickerStyles.trigger,\n )}\n >\n <CalendarIcon />\n </ArkDP.Trigger>\n )\n}\n\n/**\n * The input component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerInput(props: DatePickerInputProps) {\n return (\n <ArkDP.Control className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...props}\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n />\n </ArkDP.Control>\n )\n}\n\nexport interface RangePickerInputProps\n extends Omit<DatePickerInputProps, 'defaultValue'> {\n /**\n * The defaultValue to add for the inputs. The first item is the start date\n * and the second item is the end date.\n */\n defaultValue?: [\n InputHTMLAttributes<HTMLInputElement>['defaultValue'],\n InputHTMLAttributes<HTMLInputElement>['defaultValue'],\n ]\n}\n\n/**\n * The input component for the DatePicker that uses ranges.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\" selection=\"range\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <RangePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function RangePickerInput(props: RangePickerInputProps) {\n const { defaultValue, ...nativeProps } = props\n\n const startDate = useMemo(() => defaultValue?.[0], [defaultValue])\n const endDate = useMemo(() => defaultValue?.[1], [defaultValue])\n\n return (\n <ArkDP.Control data-range className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...nativeProps}\n data-range-input\n defaultValue={startDate}\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={0}\n />\n <ArkDP.Input\n {...nativeProps}\n data-range-input\n defaultValue={endDate}\n data-range-end-input\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={1}\n />\n </ArkDP.Control>\n )\n}\n\n/**\n * The content component for the DatePicker which contains the calendar.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerContent(\n props: DatePickerContentProps & {\n withModal?: boolean\n },\n) {\n const { children, withModal, ...contentProps } = props\n return (\n <Portal disabled={withModal ?? false}>\n <ArkDP.Positioner className={datePickerStyles.positioner}>\n <ArkDP.Content\n {...contentProps}\n className={cx(contentProps.className, datePickerStyles.content)}\n >\n {children}\n </ArkDP.Content>\n </ArkDP.Positioner>\n </Portal>\n )\n}\n\n/**\n * The day view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerDayView(props: Omit<DatePickerViewProps, 'view'>) {\n function isToday(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const formatted = today.toISOString().split('T')[0]\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return formatted === arkDate\n }\n\n function isPastDay(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return new Date(arkDate) < today\n }\n\n function getDayValue(date: ArkDP.DateValue): 'today' | 'past' | 'future' {\n if (isToday(date)) return 'today'\n if (isPastDay(date)) return 'past'\n return 'future'\n }\n\n return (\n <DatePickerView {...props} view=\"day\">\n <DatePickerContext>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableHead>\n <ArkDP.TableRow>\n {datePicker.weekDays.map((weekDay, id) => (\n <DatePickerTableHeader key={id}>\n {weekDay.narrow}\n </DatePickerTableHeader>\n ))}\n </ArkDP.TableRow>\n </ArkDP.TableHead>\n\n <ArkDP.TableBody>\n {datePicker.weeks.map((week, id) => (\n <ArkDP.TableRow key={id}>\n {week.map((day, id) => (\n <DatePickerTableCell key={id} value={day}>\n <DatePickerTableCellTrigger\n data-date={getDayValue(day)}\n >\n {day.day}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </DatePickerContext>\n </DatePickerView>\n )\n}\n\n/**\n * The month view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerMonthView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"month\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker\n .getMonthsGrid({ columns: 4, format: 'short' })\n .map((months, id) => (\n <ArkDP.TableRow key={id}>\n {months.map((month, id) => (\n <DatePickerTableCell key={id} value={month.value}>\n <DatePickerTableCellTrigger>\n {month.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * The year view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerYearView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"year\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker.getYearsGrid({ columns: 4 }).map((years, id) => (\n <ArkDP.TableRow key={id}>\n {years.map((year, id) => (\n <DatePickerTableCell key={id} value={year.value}>\n <DatePickerTableCellTrigger>\n {year.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * An abstraction of the DatePicker content components that contain the\n * different calendar views and controls.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerCalendar(props: { withModal?: boolean }) {\n return (\n <DatePickerContent withModal={props.withModal}>\n <DatePickerDayView />\n <DatePickerMonthView />\n <DatePickerYearView />\n </DatePickerContent>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA;AAAA,EACE,cAAc;AAAA,OAOT;AAEP,SAAS,YAAY,kBAAkB;AACvC,SAAS,KAAK,UAAU;AAaxB,SAAS,eAAyC;AAkC9C,SA8OM,UA9ON,KAsBA,YAtBA;AA1BJ,IAAM,mBAAmB,WAAW;AAgB7B,SAAS,WAAW,OAA4B;AASrD,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,aAAa;AAAA,QACX,WAAW;AAAA,MACb;AAAA;AAAA,EACF;AAEJ;AAWO,SAAS,2BAA2B,OAAmC;AAC5E,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,cAAc,UAAU,cAAc,SAAS,IAAI;AAC3D,SACE,qBAAC,yBAAuB,GAAG,OACzB;AAAA,wBAAC,MAAM,aAAN,EAAkB,SAAO,MACxB,8BAAC,cAAW,WAAU,YAAW,MAAK,MACpC,8BAAC,YAAS,GACZ,GACF;AAAA,IAEA,oBAAC,MAAM,aAAN,EAAkB,SAAO,MACxB;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,IAAI;AAAA,UACb,GAAG;AAAA,UACH,eAAe;AAAA,QACjB,CAAC;AAAA,QACD,OAAM;AAAA,QACN,MAAK;AAAA,QACL,OAAM;AAAA,QAEN,8BAAC,MAAM,WAAN,EAAgB;AAAA;AAAA,IACnB,GACF;AAAA,IAEA,oBAAC,MAAM,aAAN,EAAkB,SAAO,MACxB,8BAAC,cAAW,WAAU,QAAO,MAAK,MAChC,8BAAC,YAAS,GACZ,GACF;AAAA,KACF;AAEJ;AAUO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AAAA,IAE5B,oBAAC,mBACC,8BAAC,MAAM,WAAN,EACE,UAAAA,YAAW,aAAa,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,CAAC,OAAO,OACnD,oBAAC,MAAM,UAAN,EACE,gBAAM,IAAI,CAAC,MAAMC,QAChB,oBAAC,uBAA6B,OAAO,KAAK,OACxC,8BAAC,8BACE,eAAK,OACR,KAHwBA,GAI1B,CACD,KAPkB,EAQrB,CACD,GACH,GACF;AAAA,KACF,GAEJ,GACF;AAEJ;AAiBO,SAAS,mBAAmB,OAAgC;AACjE,SACE,qBAAC,qBAAkB,WAAW,MAAM,WAClC;AAAA,wBAAC,qBAAkB;AAAA,IACnB,oBAAC,uBAAoB;AAAA,IACrB,oBAAC,sBAAmB;AAAA,KACtB;AAEJ;","names":["datePicker","id"]}
@@ -0,0 +1,22 @@
1
+ import {
2
+ RadioGroupItem,
3
+ RadioGroupItemControl,
4
+ RadioGroupItemHiddenInput,
5
+ RadioGroupItemText
6
+ } from "./chunk-5RTNSVYU.js";
7
+
8
+ // src/components/radio/radio.tsx
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ function Radio(props) {
11
+ const { size, children, ...groupProps } = props;
12
+ return /* @__PURE__ */ jsxs(RadioGroupItem, { ...groupProps, children: [
13
+ /* @__PURE__ */ jsx(RadioGroupItemControl, { size }),
14
+ /* @__PURE__ */ jsx(RadioGroupItemText, { size, children }),
15
+ /* @__PURE__ */ jsx(RadioGroupItemHiddenInput, {})
16
+ ] });
17
+ }
18
+
19
+ export {
20
+ Radio
21
+ };
22
+ //# sourceMappingURL=chunk-STLN7BMJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/radio/radio.tsx"],"sourcesContent":["import type { RadioGroupItemProps } from '@ark-ui/react'\nimport { type RadioGroupVariantProps } from '@cerberus/styled-system/recipes'\nimport {\n RadioGroupItem,\n RadioGroupItemControl,\n RadioGroupItemHiddenInput,\n RadioGroupItemText,\n} from './primitives'\n\n/**\n * This module contains the Radio component.\n * @module\n */\n\nexport type RadioProps = RadioGroupVariantProps & RadioGroupItemProps\n\n/**\n * The Radio component is used to allow users to select a single option from a list of options.\n * @see https://cerberus.digitalu.design/react/radio\n * @memberof module:Field\n * @example\n * ```tsx\n * <Radio value=\"option1\">Option 1</Radio>\n * ```\n */\nexport function Radio(props: RadioProps) {\n const { size, children, ...groupProps } = props\n return (\n <RadioGroupItem {...groupProps}>\n <RadioGroupItemControl size={size} />\n <RadioGroupItemText size={size}>{children}</RadioGroupItemText>\n <RadioGroupItemHiddenInput />\n </RadioGroupItem>\n )\n}\n"],"mappings":";;;;;;;;AA4BI,SACE,KADF;AAHG,SAAS,MAAM,OAAmB;AACvC,QAAM,EAAE,MAAM,UAAU,GAAG,WAAW,IAAI;AAC1C,SACE,qBAAC,kBAAgB,GAAG,YAClB;AAAA,wBAAC,yBAAsB,MAAY;AAAA,IACnC,oBAAC,sBAAmB,MAAa,UAAS;AAAA,IAC1C,oBAAC,6BAA0B;AAAA,KAC7B;AAEJ;","names":[]}
@@ -1,4 +1,4 @@
1
- // src/components/ModalHeading.tsx
1
+ // src/components/deprecated/ModalHeading.tsx
2
2
  import { cx } from "@cerberus/styled-system/css";
3
3
  import { modal } from "@cerberus/styled-system/recipes";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -9,4 +9,4 @@ function ModalHeading(props) {
9
9
  export {
10
10
  ModalHeading
11
11
  };
12
- //# sourceMappingURL=chunk-7NN3SJ7W.js.map
12
+ //# sourceMappingURL=chunk-SWX5JWZR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/deprecated/ModalHeading.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { modal } from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ModalHeading component for a customizable modal.\n * @module\n */\n\nexport type ModalHeadingProps = HTMLAttributes<HTMLParagraphElement>\n\n/**\n * @deprecated use `DialogHeading` instead\n */\nexport function ModalHeading(props: ModalHeadingProps) {\n return <p {...props} className={cx(props.className, modal().heading)} />\n}\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,aAAa;AAcb;AADF,SAAS,aAAa,OAA0B;AACrD,SAAO,oBAAC,OAAG,GAAG,OAAO,WAAW,GAAG,MAAM,WAAW,MAAM,EAAE,OAAO,GAAG;AACxE;","names":[]}
@@ -1,9 +1,9 @@
1
- import {
2
- Show
3
- } from "./chunk-BUVVRQLZ.js";
4
1
  import {
5
2
  useCerberusContext
6
3
  } from "./chunk-GITT5645.js";
4
+ import {
5
+ Show
6
+ } from "./chunk-BUVVRQLZ.js";
7
7
 
8
8
  // src/components/Avatar.tsx
9
9
  import { css, cx } from "@cerberus/styled-system/css";
@@ -102,4 +102,4 @@ var iconSizeMap = {
102
102
  export {
103
103
  Avatar
104
104
  };
105
- //# sourceMappingURL=chunk-GCQMH4QA.js.map
105
+ //# sourceMappingURL=chunk-SXLPDPOZ.js.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-TIJAFPHQ.js.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-TYPULJMJ.js.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-UDY6USHW.js.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-V4YYGGMH.js.map