@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
@@ -1,15 +1,3 @@
1
- import {
2
- Text
3
- } from "./chunk-RU5LOXWI.js";
4
- import {
5
- Input
6
- } from "./chunk-MZ3UCDUL.js";
7
- import {
8
- Label
9
- } from "./chunk-NMF2HYWO.js";
10
- import {
11
- Field
12
- } from "./chunk-UZDVOIW5.js";
13
1
  import {
14
2
  Dialog,
15
3
  DialogDescription,
@@ -18,16 +6,24 @@ import {
18
6
  } from "./chunk-TFL56AYR.js";
19
7
  import {
20
8
  Avatar
21
- } from "./chunk-GCQMH4QA.js";
9
+ } from "./chunk-SXLPDPOZ.js";
22
10
  import {
23
- Show
24
- } from "./chunk-BUVVRQLZ.js";
11
+ Text
12
+ } from "./chunk-RU5LOXWI.js";
13
+ import {
14
+ FieldLabel,
15
+ FieldRoot,
16
+ Input
17
+ } from "./chunk-VSTOSLFS.js";
25
18
  import {
26
19
  useCerberusContext
27
20
  } from "./chunk-GITT5645.js";
28
21
  import {
29
22
  Button
30
- } from "./chunk-EXGKZGML.js";
23
+ } from "./chunk-6KZVE4HC.js";
24
+ import {
25
+ Show
26
+ } from "./chunk-BUVVRQLZ.js";
31
27
 
32
28
  // src/context/prompt-modal.tsx
33
29
  import {
@@ -38,10 +34,10 @@ import {
38
34
  useRef,
39
35
  useState
40
36
  } from "react";
37
+ import { DialogCloseTrigger } from "@ark-ui/react";
38
+ import { HStack, VStack } from "@cerberus/styled-system/jsx";
41
39
  import { css } from "@cerberus/styled-system/css";
42
40
  import { hstack } from "@cerberus/styled-system/patterns";
43
- import { HStack, VStack } from "@cerberus/styled-system/jsx";
44
- import { DialogCloseTrigger } from "@ark-ui/react";
45
41
  import { jsx, jsxs } from "react/jsx-runtime";
46
42
  var PromptModalContext = createContext(null);
47
43
  function PromptModal(props) {
@@ -138,33 +134,34 @@ function PromptModal(props) {
138
134
  marginBlockStart: "md",
139
135
  marginBlockEnd: "lg",
140
136
  w: "full",
141
- children: /* @__PURE__ */ jsxs(Field, { invalid: !isValid, children: [
142
- /* @__PURE__ */ jsxs(
143
- Label,
144
- {
145
- className: hstack({
146
- gap: "xs",
147
- justify: "flex-start !important"
148
- }),
149
- htmlFor: "confirm",
150
- size: "md",
151
- children: [
152
- "Type",
153
- /* @__PURE__ */ jsx(Text, { as: "strong", textTransform: "uppercase", children: content?.key }),
154
- "to confirm"
155
- ]
156
- }
157
- ),
158
- /* @__PURE__ */ jsx(
159
- Input,
160
- {
161
- id: "confirm",
162
- name: "confirm",
163
- onChange: handleChange,
164
- type: "text"
165
- }
166
- )
167
- ] })
137
+ children: /* @__PURE__ */ jsxs(
138
+ FieldRoot,
139
+ {
140
+ ids: {
141
+ control: "confirm"
142
+ },
143
+ invalid: !isValid,
144
+ children: [
145
+ /* @__PURE__ */ jsxs(
146
+ FieldLabel,
147
+ {
148
+ className: hstack({
149
+ gap: "xs",
150
+ justify: "flex-start !important",
151
+ marginBlockEnd: "xs",
152
+ textStyle: "label-md"
153
+ }),
154
+ children: [
155
+ "Type",
156
+ /* @__PURE__ */ jsx(Text, { as: "strong", textTransform: "uppercase", children: content?.key }),
157
+ "to confirm"
158
+ ]
159
+ }
160
+ ),
161
+ /* @__PURE__ */ jsx(Input, { name: "confirm", onChange: handleChange, type: "text" })
162
+ ]
163
+ }
164
+ )
168
165
  }
169
166
  ),
170
167
  /* @__PURE__ */ jsxs(HStack, { gap: "md", justify: "stretch", w: "full", children: [
@@ -212,4 +209,4 @@ export {
212
209
  PromptModal,
213
210
  usePromptModal
214
211
  };
215
- //# sourceMappingURL=chunk-SD3OVTHT.js.map
212
+ //# sourceMappingURL=chunk-CMYD5KWA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/context/prompt-modal.tsx"],"sourcesContent":["'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type MouseEvent,\n type PropsWithChildren,\n} from 'react'\nimport { DialogCloseTrigger } from '@ark-ui/react'\nimport { HStack, VStack } from '@cerberus/styled-system/jsx'\nimport { css } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { FieldLabel, FieldRoot, Input } from '../components/field/index'\nimport { Button } from '../components/button/button'\nimport { Show } from '../components/Show'\nimport { Avatar } from '../components/Avatar'\nimport { Text } from '../components/Text'\nimport { useCerberusContext } from './cerberus'\nimport {\n Dialog,\n DialogDescription,\n DialogHeading,\n DialogProvider,\n} from '../components/Dialog'\n\n/**\n * This module provides a context and hook for the prompt modal.\n * @module PromptModal\n */\n\nexport interface ShowPromptModalOptions {\n /**\n * The kind of prompt modal to show.\n * @default 'non-destructive'\n */\n kind?: 'destructive' | 'non-destructive'\n /**\n * The heading of the prompt modal.\n */\n heading: string\n /**\n * The description of the prompt modal.\n */\n description?: string\n /**\n * The key to confirm the action.\n */\n key: string\n /**\n * The text for the action button.\n */\n actionText: string\n /**\n * The text for the cancel button.\n */\n cancelText: string\n}\nexport type PromptShowResult =\n | ((value: string | PromiseLike<string>) => void)\n | null\n\nexport interface PromptModalValue {\n /**\n * The method to trigger the prompt modal.\n * @returns the value of the key if the action is confirmed.\n * @example\n * ```tsx\n * const accepted = await prompt.show({\n * kind: 'destructive',\n * heading: 'Delete channel?',\n * description:\n * 'This will permanently delete a channel on your account. There is no going back.',\n * key: CHANNEL_NAME,\n * actionText: 'Yes, delete channel',\n * cancelText: 'No, cancel',\n * })\n */\n show: (options: ShowPromptModalOptions) => Promise<string>\n}\n\nconst PromptModalContext = createContext<PromptModalValue | null>(null)\n\nexport type PromptModalProviderProps = PropsWithChildren<unknown>\n\n/**\n * Provides a prompt modal to the app.\n * @see https://cerberus.digitalu.design/react/prompt-modal\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <PromptModal>\n * <SomeFeatureSection />\n * </PromptModal>\n *\n * // Use the hook to show the prompt modal.\n * const prompt = usePromptModal()\n *\n * const handleClick = useCallback(async () => {\n * const accepted = await prompt.show({\n * kind: 'destructive',\n * heading: 'Delete channel?',\n * description:\n * 'This will permanently delete a channel on your account. There is no going back.',\n * key: CHANNEL_NAME,\n * actionText: 'Yes, delete channel',\n * cancelText: 'No, cancel',\n * })\n * // do something with accepted\n * }, [prompt])\n * ```\n */\nexport function PromptModal(\n props: PropsWithChildren<PromptModalProviderProps>,\n) {\n const resolveRef = useRef<PromptShowResult>(null)\n const [open, setOpen] = useState<boolean>(false)\n const [content, setContent] = useState<ShowPromptModalOptions | null>(null)\n const [inputValue, setInputValue] = useState<string>('')\n\n const { icons } = useCerberusContext()\n const { promptModal: PromptIcon } = icons\n\n const isValid = useMemo(\n () => inputValue === content?.key,\n [inputValue, content],\n )\n\n const palette = useMemo(\n () => (content?.kind === 'destructive' ? 'danger' : 'action'),\n [content],\n )\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n setInputValue(e.currentTarget.value)\n },\n [content],\n )\n\n const handleChoice = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const target = e.currentTarget as HTMLButtonElement\n if (target.value === 'true') {\n resolveRef.current?.(inputValue)\n }\n setOpen(false)\n },\n [inputValue, setOpen],\n )\n\n const handleShow = useCallback(\n (options: ShowPromptModalOptions) => {\n return new Promise<string>((resolve) => {\n setContent({ ...options, kind: options.kind || 'non-destructive' })\n setOpen(true)\n resolveRef.current = resolve\n })\n },\n [setOpen],\n )\n\n const value = useMemo(\n () => ({\n show: handleShow,\n }),\n [handleShow],\n )\n\n return (\n <PromptModalContext.Provider value={value}>\n {props.children}\n\n <DialogProvider open={open} onOpenChange={(e) => setOpen(e.open)}>\n <Dialog size=\"sm\">\n <VStack gap=\"xl\" w=\"full\">\n <VStack alignItems=\"flex-start\" gap=\"md\" w=\"full\">\n <HStack\n alignSelf=\"center\"\n justify=\"center\"\n paddingBlockEnd=\"md\"\n w=\"full\"\n >\n <Show\n when={palette === 'danger'}\n fallback={\n <Avatar\n ariaLabel=\"\"\n gradient=\"charon-light\"\n icon={<PromptIcon size={24} />}\n src=\"\"\n />\n }\n >\n <Avatar\n ariaLabel=\"\"\n gradient=\"hades-dark\"\n icon={<PromptIcon size={24} />}\n src=\"\"\n />\n </Show>\n </HStack>\n <DialogHeading>{content?.heading}</DialogHeading>\n <DialogDescription>{content?.description}</DialogDescription>\n </VStack>\n\n <VStack\n alignItems=\"flex-start\"\n marginBlockStart=\"md\"\n marginBlockEnd=\"lg\"\n w=\"full\"\n >\n <FieldRoot\n ids={{\n control: 'confirm',\n }}\n invalid={!isValid}\n >\n <FieldLabel\n className={hstack({\n gap: 'xs',\n justify: 'flex-start !important',\n marginBlockEnd: 'xs',\n textStyle: 'label-md',\n })}\n >\n Type\n <Text as=\"strong\" textTransform=\"uppercase\">\n {content?.key}\n </Text>\n to confirm\n </FieldLabel>\n <Input name=\"confirm\" onChange={handleChange} type=\"text\" />\n </FieldRoot>\n </VStack>\n\n <HStack gap=\"md\" justify=\"stretch\" w=\"full\">\n <Button\n autoFocus\n className={css({\n w: '1/2',\n })}\n disabled={!isValid}\n name=\"confirm\"\n onClick={handleChoice}\n palette={palette}\n value=\"true\"\n >\n {content?.actionText}\n </Button>\n\n <DialogCloseTrigger asChild>\n <Button\n className={css({\n w: '1/2',\n })}\n name=\"cancel\"\n onClick={handleChoice}\n usage=\"outlined\"\n value=\"false\"\n >\n {content?.cancelText}\n </Button>\n </DialogCloseTrigger>\n </HStack>\n </VStack>\n </Dialog>\n </DialogProvider>\n </PromptModalContext.Provider>\n )\n}\n\n/**\n * Used to retrieve the context of the PromptModal provider.\n */\nexport function usePromptModal(): PromptModalValue {\n const context = useContext(PromptModalContext)\n if (context === null) {\n throw new Error('usePromptModal must be used within a PromptModal Provider')\n }\n return context\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP,SAAS,0BAA0B;AACnC,SAAS,QAAQ,cAAc;AAC/B,SAAS,WAAW;AACpB,SAAS,cAAc;AAoKX,SAagB,KAbhB;AA/FZ,IAAM,qBAAqB,cAAuC,IAAI;AA+B/D,SAAS,YACd,OACA;AACA,QAAM,aAAa,OAAyB,IAAI;AAChD,QAAM,CAAC,MAAM,OAAO,IAAI,SAAkB,KAAK;AAC/C,QAAM,CAAC,SAAS,UAAU,IAAI,SAAwC,IAAI;AAC1E,QAAM,CAAC,YAAY,aAAa,IAAI,SAAiB,EAAE;AAEvD,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,aAAa,WAAW,IAAI;AAEpC,QAAM,UAAU;AAAA,IACd,MAAM,eAAe,SAAS;AAAA,IAC9B,CAAC,YAAY,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mBAAS;AAAA;AAAA,QACZ;AAAA,QAEA,oBAAC,sBAAmB,SAAO,MACzB;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,IAAI;AAAA,cACb,GAAG;AAAA,YACL,CAAC;AAAA,YACD,MAAK;AAAA,YACL,SAAS;AAAA,YACT,OAAM;AAAA,YACN,OAAM;AAAA,YAEL,mBAAS;AAAA;AAAA,QACZ,GACF;AAAA,SACF;AAAA,OACF,GACF,GACF;AAAA,KACF;AAEJ;AAKO,SAAS,iBAAmC;AACjD,QAAM,UAAU,WAAW,kBAAkB;AAC7C,MAAI,YAAY,MAAM;AACpB,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAC7E;AACA,SAAO;AACT;","names":[]}
@@ -0,0 +1,43 @@
1
+ import {
2
+ useCerberusContext
3
+ } from "./chunk-GITT5645.js";
4
+
5
+ // src/components/field/status-indicator.tsx
6
+ import { useFieldContext } from "@ark-ui/react";
7
+ import { cx } from "@cerberus/styled-system/css";
8
+ import { field } from "@cerberus/styled-system/recipes";
9
+ import { jsx } from "react/jsx-runtime";
10
+ function FieldStatusIndicator(props) {
11
+ const { fallback, ...nativeProps } = props;
12
+ const styles = field();
13
+ const fieldContext = useFieldContext();
14
+ const { icons } = useCerberusContext();
15
+ const { invalid: InvalidIcon } = icons;
16
+ if (fieldContext.invalid) {
17
+ return /* @__PURE__ */ jsx(
18
+ "span",
19
+ {
20
+ ...nativeProps,
21
+ "aria-hidden": "true",
22
+ "data-invalid": true,
23
+ className: cx(nativeProps.className, styles.statusIndicator),
24
+ children: /* @__PURE__ */ jsx(InvalidIcon, {})
25
+ }
26
+ );
27
+ }
28
+ return /* @__PURE__ */ jsx(
29
+ "span",
30
+ {
31
+ ...nativeProps,
32
+ "aria-hidden": "true",
33
+ "data-part": "end-indicator",
34
+ className: cx(nativeProps.className, styles.endIndicator),
35
+ children: fallback
36
+ }
37
+ );
38
+ }
39
+
40
+ export {
41
+ FieldStatusIndicator
42
+ };
43
+ //# sourceMappingURL=chunk-CNA2VKAH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/field/status-indicator.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"],"mappings":";;;;;AAEA,SAAS,uBAAuB;AAChC,SAAS,UAAU;AACnB,SAAS,aAAa;AAsCd;AAhBD,SAAS,qBAAqB,OAAkC;AACrE,QAAM,EAAE,UAAU,GAAG,YAAY,IAAI;AACrC,QAAM,SAAS,MAAM;AACrB,QAAM,eAAe,gBAAgB;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,WAAW,GAAG,YAAY,WAAW,OAAO,eAAe;AAAA,QAE3D,8BAAC,eAAY;AAAA;AAAA,IACf;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAY;AAAA,MACZ,aAAU;AAAA,MACV,WAAW,GAAG,YAAY,WAAW,OAAO,YAAY;AAAA,MAEvD;AAAA;AAAA,EACH;AAEJ;","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-CYC2YUKU.js.map
@@ -1,4 +1,4 @@
1
- // src/components/FieldsetLabel.tsx
1
+ // src/components/deprecated/FieldsetLabel.tsx
2
2
  import { cx } from "@cerberus/styled-system/css";
3
3
  import { label } from "@cerberus/styled-system/recipes";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -22,4 +22,4 @@ function FieldsetLabel(props) {
22
22
  export {
23
23
  FieldsetLabel
24
24
  };
25
- //# sourceMappingURL=chunk-PZAZKQMO.js.map
25
+ //# sourceMappingURL=chunk-DRDNNRU3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/deprecated/FieldsetLabel.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { label, type LabelVariantProps } from '@cerberus/styled-system/recipes'\nimport type { LabelProps } from './Label'\n\n/**\n * This module contains the FieldsetLabel component.\n * @module FieldsetLabel\n */\n\nexport type FieldsetLabelProps = LabelProps &\n LabelVariantProps & {\n htmlFor?: string\n }\n\n/**\n * @deprecated\n */\nexport function FieldsetLabel(props: FieldsetLabelProps) {\n const { size, usage, ...nativeProps } = props\n return (\n <label\n {...nativeProps}\n className={cx(\n nativeProps.className,\n label({\n size,\n usage,\n }),\n )}\n />\n )\n}\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,aAAqC;AAmB1C;AAHG,SAAS,cAAc,OAA2B;AACvD,QAAM,EAAE,MAAM,OAAO,GAAG,YAAY,IAAI;AACxC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MatchAvatar
3
- } from "./chunk-ISCJ542I.js";
3
+ } from "./chunk-2HOUQ2DX.js";
4
4
  import {
5
5
  Show
6
6
  } from "./chunk-BUVVRQLZ.js";
@@ -65,4 +65,4 @@ export {
65
65
  AdmonitionHeading,
66
66
  AdmonitionDescription
67
67
  };
68
- //# sourceMappingURL=chunk-NJSETNRL.js.map
68
+ //# sourceMappingURL=chunk-DXBZ3HMY.js.map
@@ -0,0 +1,22 @@
1
+ import {
2
+ CheckboxParts
3
+ } from "./chunk-KWZ3CEG6.js";
4
+ import {
5
+ useCerberusContext
6
+ } from "./chunk-GITT5645.js";
7
+ import {
8
+ Show
9
+ } from "./chunk-BUVVRQLZ.js";
10
+
11
+ // src/components/checkbox/checkbox-icon.tsx
12
+ import { jsx } from "react/jsx-runtime";
13
+ function CheckboxIcon(props) {
14
+ const { icons } = useCerberusContext();
15
+ const { checkbox: CheckIcon, indeterminate: IndeterminateIcon } = icons;
16
+ return /* @__PURE__ */ jsx(CheckboxParts.Indicator, { indeterminate: props.indeterminate, children: /* @__PURE__ */ jsx(Show, { when: props.indeterminate, fallback: /* @__PURE__ */ jsx(CheckIcon, {}), children: /* @__PURE__ */ jsx(IndeterminateIcon, {}) }) });
17
+ }
18
+
19
+ export {
20
+ CheckboxIcon
21
+ };
22
+ //# sourceMappingURL=chunk-EL4MX2PG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/checkbox/checkbox-icon.tsx"],"sourcesContent":["'use client'\n\nimport { useCerberusContext } from '../../context/cerberus'\nimport { CheckboxParts } from './parts'\nimport { Show } from '../Show'\n\n/**\n * This module contains the Checkbox Icon component.\n * @module\n */\n\ninterface CheckboxIconProps {\n indeterminate?: boolean\n}\n\n/**\n * Checkbox component\n * @definition [ARIA Target Size](https://www.w3.org/WAI/WCAG21/Understanding/target-size.html#:~:text=Understanding%20SC%202.5.,%3ATarget%20Size%20(Level%20AAA)&text=The%20size%20of%20the%20target,Equivalent)\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @see https://cerberus.digitalu.design/react/checkbox\n * @example\n * ```tsx\n * <Field>\n * <Checkbox id=\"legal\" checked={checked.legal} onChange={handleChange} />\n * </Field>\n * ```\n */\nexport function CheckboxIcon(props: CheckboxIconProps) {\n const { icons } = useCerberusContext()\n const { checkbox: CheckIcon, indeterminate: IndeterminateIcon } = icons\n\n return (\n <CheckboxParts.Indicator indeterminate={props.indeterminate}>\n <Show when={props.indeterminate} fallback={<CheckIcon />}>\n <IndeterminateIcon />\n </Show>\n </CheckboxParts.Indicator>\n )\n}\n"],"mappings":";;;;;;;;;;;AAiCiD;AAN1C,SAAS,aAAa,OAA0B;AACrD,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,UAAU,WAAW,eAAe,kBAAkB,IAAI;AAElE,SACE,oBAAC,cAAc,WAAd,EAAwB,eAAe,MAAM,eAC5C,8BAAC,QAAK,MAAM,MAAM,eAAe,UAAU,oBAAC,aAAU,GACpD,8BAAC,qBAAkB,GACrB,GACF;AAEJ;","names":[]}
@@ -0,0 +1,37 @@
1
+ import {
2
+ FieldErrorText,
3
+ FieldHelperText,
4
+ FieldLabel,
5
+ FieldRoot
6
+ } from "./chunk-VSTOSLFS.js";
7
+ import {
8
+ splitProps
9
+ } from "./chunk-BL7G3577.js";
10
+ import {
11
+ Show
12
+ } from "./chunk-BUVVRQLZ.js";
13
+
14
+ // src/components/field/field.tsx
15
+ import { HStack } from "@cerberus/styled-system/jsx";
16
+ import { jsx, jsxs } from "react/jsx-runtime";
17
+ function Field(props) {
18
+ const [statusProps, fieldProps, rootProps] = splitProps(
19
+ props,
20
+ ["disabled", "required", "readOnly", "invalid"],
21
+ ["label", "helperText", "secondaryHelperText", "errorText", "children"]
22
+ );
23
+ return /* @__PURE__ */ jsxs(FieldRoot, { ...statusProps, ...rootProps, children: [
24
+ /* @__PURE__ */ jsx(Show, { when: Boolean(fieldProps.label), children: /* @__PURE__ */ jsx(FieldLabel, { children: fieldProps.label }) }),
25
+ fieldProps.children,
26
+ /* @__PURE__ */ jsx(Show, { when: Boolean(fieldProps.helperText && !statusProps.invalid), children: /* @__PURE__ */ jsxs(HStack, { justifyContent: "space-between", w: "full", children: [
27
+ /* @__PURE__ */ jsx(FieldHelperText, { children: fieldProps.helperText }),
28
+ /* @__PURE__ */ jsx(Show, { when: Boolean(fieldProps.secondaryHelperText), children: /* @__PURE__ */ jsx(FieldHelperText, { children: fieldProps.secondaryHelperText }) })
29
+ ] }) }),
30
+ /* @__PURE__ */ jsx(FieldErrorText, { children: fieldProps.errorText })
31
+ ] });
32
+ }
33
+
34
+ export {
35
+ Field
36
+ };
37
+ //# sourceMappingURL=chunk-FBS7AX76.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/field/field.tsx"],"sourcesContent":["import { type FieldRootProps } from '@ark-ui/react/field'\nimport { splitProps } from '../../utils/index'\nimport {\n FieldErrorText,\n FieldHelperText,\n FieldLabel,\n FieldRoot,\n} from './primitives'\nimport { HStack } from '@cerberus/styled-system/jsx'\nimport { Show } from '../Show'\n\nexport interface FieldProps extends FieldRootProps {\n /**\n * The label of the field.\n */\n label?: string\n /**\n * The helper text of the field.\n */\n helperText?: string\n /**\n * A helper text positioned at the end of the field. Good for Textarea fields.\n */\n secondaryHelperText?: string\n /**\n * The error text of the field. Shown when the field is invalid.\n */\n errorText?: string\n}\n\n/**\n * The Field component is the context provider for all FieldParts and displays\n * the label, helperText, and ErrorText.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <Field\n * ids={{\n * control: 'firstName',\n * }}\n * label=\"Label\"\n * helperText=\"This is what people will see on your profile.\"\n * errorText=\"A first name is required to create an account.\"\n * required\n * >\n * <Input name=\"firstName\" type=\"text\" />\n * </Field>\n * ```\n */\nexport function Field(props: FieldProps) {\n const [statusProps, fieldProps, rootProps] = splitProps(\n props,\n ['disabled', 'required', 'readOnly', 'invalid'],\n ['label', 'helperText', 'secondaryHelperText', 'errorText', 'children'],\n )\n\n return (\n <FieldRoot {...statusProps} {...rootProps}>\n <Show when={Boolean(fieldProps.label)}>\n <FieldLabel>{fieldProps.label}</FieldLabel>\n </Show>\n\n {fieldProps.children}\n\n <Show when={Boolean(fieldProps.helperText && !statusProps.invalid)}>\n <HStack justifyContent=\"space-between\" w=\"full\">\n <FieldHelperText>{fieldProps.helperText}</FieldHelperText>\n <Show when={Boolean(fieldProps.secondaryHelperText)}>\n <FieldHelperText>{fieldProps.secondaryHelperText}</FieldHelperText>\n </Show>\n </HStack>\n </Show>\n\n <FieldErrorText>{fieldProps.errorText}</FieldErrorText>\n </FieldRoot>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAQA,SAAS,cAAc;AAmDf,cAMA,YANA;AAVD,SAAS,MAAM,OAAmB;AACvC,QAAM,CAAC,aAAa,YAAY,SAAS,IAAI;AAAA,IAC3C;AAAA,IACA,CAAC,YAAY,YAAY,YAAY,SAAS;AAAA,IAC9C,CAAC,SAAS,cAAc,uBAAuB,aAAa,UAAU;AAAA,EACxE;AAEA,SACE,qBAAC,aAAW,GAAG,aAAc,GAAG,WAC9B;AAAA,wBAAC,QAAK,MAAM,QAAQ,WAAW,KAAK,GAClC,8BAAC,cAAY,qBAAW,OAAM,GAChC;AAAA,IAEC,WAAW;AAAA,IAEZ,oBAAC,QAAK,MAAM,QAAQ,WAAW,cAAc,CAAC,YAAY,OAAO,GAC/D,+BAAC,UAAO,gBAAe,iBAAgB,GAAE,QACvC;AAAA,0BAAC,mBAAiB,qBAAW,YAAW;AAAA,MACxC,oBAAC,QAAK,MAAM,QAAQ,WAAW,mBAAmB,GAChD,8BAAC,mBAAiB,qBAAW,qBAAoB,GACnD;AAAA,OACF,GACF;AAAA,IAEA,oBAAC,kBAAgB,qBAAW,WAAU;AAAA,KACxC;AAEJ;","names":[]}
@@ -10,12 +10,6 @@ import {
10
10
  import {
11
11
  Portal
12
12
  } from "./chunk-IQJDVFPP.js";
13
- import {
14
- Show
15
- } from "./chunk-BUVVRQLZ.js";
16
- import {
17
- Button
18
- } from "./chunk-EXGKZGML.js";
19
13
  import {
20
14
  addNotification,
21
15
  clearNotificationState,
@@ -23,6 +17,12 @@ import {
23
17
  removeNotification,
24
18
  updateNotificationState
25
19
  } from "./chunk-V3M3ZOQI.js";
20
+ import {
21
+ Button
22
+ } from "./chunk-6KZVE4HC.js";
23
+ import {
24
+ Show
25
+ } from "./chunk-BUVVRQLZ.js";
26
26
 
27
27
  // src/context/notification-center.tsx
28
28
  import {
@@ -177,4 +177,4 @@ export {
177
177
  NotificationCenter,
178
178
  useNotificationCenter
179
179
  };
180
- //# sourceMappingURL=chunk-JAROS4Q3.js.map
180
+ //# sourceMappingURL=chunk-FMRWRVUS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/context/notification-center.tsx"],"sourcesContent":["'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useReducer,\n type MouseEvent,\n type PropsWithChildren,\n type ReactNode,\n} from 'react'\nimport { Show } from '../components/Show'\nimport { NotificationHeading } from '../components/NotificationHeading'\nimport { NotificationDescription } from '../components/NotificationDescription'\nimport { Notification } from '../components/Notification'\nimport { animateIn, vstack } from '@cerberus/styled-system/patterns'\nimport { Portal, type PortalProps } from '../components/Portal'\nimport { notification } from '@cerberus/styled-system/recipes'\nimport { Button } from '../components/button/button'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n addNotification,\n clearNotificationState,\n notificationCenterReducer,\n removeNotification,\n updateNotificationState,\n} from './notification-center/store'\n\n/**\n * This module provides a context and hook for notifications.\n * @module\n */\n\nexport interface NotifyOptions {\n /**\n * The palette of the notification.\n * @default 'info'\n */\n palette: 'info' | 'success' | 'warning' | 'danger'\n /**\n * The heading of the notification.\n */\n heading: string\n /**\n * The unique id of the notification.\n */\n id?: string\n /**\n * The description of the notification.\n */\n description?: ReactNode\n /**\n * The action to take when the notification is closed\n */\n onClose?: () => void\n}\n\nexport interface NotificationsValue {\n notify: (options: NotifyOptions) => void\n}\n\nconst NotificationsContext = createContext<NotificationsValue | null>(null)\n\nexport type NotificationsProviderProps = PortalProps & {\n /**\n * The duration in milliseconds to show the notification.\n * @default 6000\n */\n duration?: number\n}\n\n/**\n * Provides a notification center to the app.\n * @see https://cerberus.digitalu.design/react/notification\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <Notifications>\n * <SomeFeatureSection />\n * </Notifications>\n *\n * // Use the hook to show a notification.\n * const notify = useNotifications()\n *\n * const handleClick = useCallback(() => {\n * notify({\n * palette: 'info',\n * heading: 'New feature!',\n * description: 'We have added a new feature to the app.',\n * })\n * }, [notify])\n * ```\n */\nexport function NotificationCenter(\n props: PropsWithChildren<NotificationsProviderProps>,\n) {\n const [state, dispatch] = useReducer(notificationCenterReducer, [])\n const styles = notification()\n\n const timeout = useMemo<number>(\n () => props.duration || 6000,\n [props.duration],\n )\n\n const closeNotification = useCallback(\n (id: string) => {\n updateNotificationState(dispatch, {\n id,\n state: 'closed',\n })\n window.setTimeout(() => {\n removeNotification(dispatch, id)\n }, 150)\n },\n [dispatch],\n )\n\n const handleNotify = useCallback(\n (options: NotifyOptions) => {\n const id = `${options.palette}:${state.length + 1}`\n addNotification(dispatch, {\n ...options,\n id,\n state: 'open',\n })\n\n window.setTimeout(() => {\n closeNotification(id)\n }, timeout)\n },\n [dispatch, state, timeout, closeNotification],\n )\n\n const handleClose = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const target = e.currentTarget as HTMLButtonElement\n closeNotification(target.value)\n },\n [closeNotification],\n )\n\n const handleCloseAll = useCallback(() => {\n state.forEach((item) => {\n if (item.onClose) item.onClose()\n })\n // we don't want to animate out for this one\n clearNotificationState(dispatch)\n }, [state, dispatch])\n\n const value = useMemo(\n () => ({\n notify: handleNotify,\n }),\n [handleNotify],\n )\n\n // For some reason, the vstack pattern alignItems is not registering here.\n // So we are forcing it with the style prop.\n\n return (\n <NotificationsContext.Provider value={value}>\n {props.children}\n\n <Show when={state.length > 0}>\n <Portal container={props.container}>\n <div className={styles.center}>\n <Show when={state.length >= 4}>\n <Button\n className={cx(styles.closeAll, animateIn())}\n onClick={handleCloseAll}\n palette=\"action\"\n shape=\"rounded\"\n size=\"sm\"\n usage=\"ghost\"\n >\n Close all\n </Button>\n </Show>\n\n <div\n className={vstack({\n alignItems: 'flex-end',\n gap: '4',\n })}\n style={{\n alignItems: 'flex-end',\n }}\n >\n {state.map((option) => (\n <MatchNotification\n key={option.id}\n {...option}\n onClose={handleClose}\n open={option.state}\n />\n ))}\n </div>\n </div>\n </Portal>\n </Show>\n </NotificationsContext.Provider>\n )\n}\n\ninterface MatchNotificationProps extends Omit<NotifyOptions, 'onClose'> {\n open: 'open' | 'closed'\n onClose: (e: MouseEvent<HTMLButtonElement>) => void\n key: string | undefined\n}\n\nfunction MatchNotification(props: MatchNotificationProps) {\n const { palette, id, onClose, heading, description, open } = props\n const sharedProps = useMemo(\n () => ({\n id: id!,\n open: true,\n onClose,\n 'data-state': open,\n }),\n [id, open, onClose],\n )\n\n switch (palette) {\n case 'success':\n return (\n <Notification {...sharedProps} palette=\"success\">\n <NotificationHeading palette=\"success\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"success\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n\n case 'warning':\n return (\n <Notification {...sharedProps} palette=\"warning\">\n <NotificationHeading palette=\"warning\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"warning\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n\n case 'danger':\n return (\n <Notification {...sharedProps} palette=\"danger\">\n <NotificationHeading palette=\"danger\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"danger\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n\n case 'info':\n default:\n return (\n <Notification {...sharedProps} palette=\"info\">\n <NotificationHeading palette=\"info\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"info\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n }\n}\n\n/**\n * The hook to use the NotificationCenter.\n * @returns The notify method to trigger a notification.\n * @example\n * ```tsx\n * const {notify} = useNotificationCenter()\n * notify({\n * palette: 'info',\n * heading: 'New feature',\n * description: 'We have added a new feature to the app.',\n * })\n * ```\n */\nexport function useNotificationCenter(): NotificationsValue {\n const context = useContext(NotificationsContext)\n if (!context) {\n throw new Error(\n 'useNotificationCenter must be used within a NotificationsProvider',\n )\n }\n return context\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAKP,SAAS,WAAW,cAAc;AAElC,SAAS,oBAAoB;AAE7B,SAAS,UAAU;AAkJT,SAEI,KAFJ;AAxGV,IAAM,uBAAuB,cAAyC,IAAI;AAgCnE,SAAS,mBACd,OACA;AACA,QAAM,CAAC,OAAO,QAAQ,IAAI,WAAW,2BAA2B,CAAC,CAAC;AAClE,QAAM,SAAS,aAAa;AAE5B,QAAM,UAAU;AAAA,IACd,MAAM,MAAM,YAAY;AAAA,IACxB,CAAC,MAAM,QAAQ;AAAA,EACjB;AAEA,QAAM,oBAAoB;AAAA,IACxB,CAAC,OAAe;AACd,8BAAwB,UAAU;AAAA,QAChC;AAAA,QACA,OAAO;AAAA,MACT,CAAC;AACD,aAAO,WAAW,MAAM;AACtB,2BAAmB,UAAU,EAAE;AAAA,MACjC,GAAG,GAAG;AAAA,IACR;AAAA,IACA,CAAC,QAAQ;AAAA,EACX;AAEA,QAAM,eAAe;AAAA,IACnB,CAAC,YAA2B;AAC1B,YAAM,KAAK,GAAG,QAAQ,OAAO,IAAI,MAAM,SAAS,CAAC;AACjD,sBAAg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AA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
@@ -0,0 +1,25 @@
1
+ import {
2
+ RadioGroupIndicator,
3
+ RadioGroupItem,
4
+ RadioGroupItemControl,
5
+ RadioGroupItemHiddenInput,
6
+ RadioGroupItemText,
7
+ RadioGroupLabel,
8
+ RadioGroupRoot
9
+ } from "./chunk-5RTNSVYU.js";
10
+
11
+ // src/components/radio/parts.ts
12
+ var RadioParts = {
13
+ Root: RadioGroupRoot,
14
+ Label: RadioGroupLabel,
15
+ Indicator: RadioGroupIndicator,
16
+ Item: RadioGroupItem,
17
+ ItemText: RadioGroupItemText,
18
+ ItemControl: RadioGroupItemControl,
19
+ ItemHiddenInput: RadioGroupItemHiddenInput
20
+ };
21
+
22
+ export {
23
+ RadioParts
24
+ };
25
+ //# sourceMappingURL=chunk-FUL2VRDU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/radio/parts.ts"],"sourcesContent":["import type { ElementType } from 'react'\nimport {\n RadioGroupRoot,\n RadioGroupLabel,\n RadioGroupIndicator,\n RadioGroupItem,\n RadioGroupItemText,\n RadioGroupItemControl,\n RadioGroupItemHiddenInput,\n} from './primitives'\n\n/**\n * This module contains the parts of the Radio parts.\n * @module 'radio/parts'\n */\n\ninterface RadioPartsValue {\n /**\n * The container of the field.\n */\n Root: ElementType\n /**\n * The label of the field.\n */\n Label: ElementType\n /**\n * The indicator that appears when a radio is checked.\n */\n Indicator: ElementType\n /**\n * An individual radio item of the field.\n */\n Item: ElementType\n /**\n * The text that labels a single radio of the field.\n */\n ItemText: ElementType\n /**\n * The visual radio control of the field.\n */\n ItemControl: ElementType\n /**\n * The native input for a radio item in the field.\n */\n ItemHiddenInput: ElementType\n}\n\n/**\n * An Object containing the parts of the Radio component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the RadioParts object and\n * the entire family of components vs. only what you use.\n */\nexport const RadioParts: RadioPartsValue = {\n Root: RadioGroupRoot,\n Label: RadioGroupLabel,\n Indicator: RadioGroupIndicator,\n Item: RadioGroupItem,\n ItemText: RadioGroupItemText,\n ItemControl: RadioGroupItemControl,\n ItemHiddenInput: RadioGroupItemHiddenInput,\n}\n"],"mappings":";;;;;;;;;;;AAwDO,IAAM,aAA8B;AAAA,EACzC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,WAAW;AAAA,EACX,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iBAAiB;AACnB;","names":[]}
@@ -7,16 +7,16 @@ import {
7
7
  } from "./chunk-TFL56AYR.js";
8
8
  import {
9
9
  Avatar
10
- } from "./chunk-GCQMH4QA.js";
11
- import {
12
- Show
13
- } from "./chunk-BUVVRQLZ.js";
10
+ } from "./chunk-SXLPDPOZ.js";
14
11
  import {
15
12
  useCerberusContext
16
13
  } from "./chunk-GITT5645.js";
17
14
  import {
18
15
  Button
19
- } from "./chunk-EXGKZGML.js";
16
+ } from "./chunk-6KZVE4HC.js";
17
+ import {
18
+ Show
19
+ } from "./chunk-BUVVRQLZ.js";
20
20
 
21
21
  // src/context/confirm-modal.tsx
22
22
  import {
@@ -155,4 +155,4 @@ export {
155
155
  ConfirmModal,
156
156
  useConfirmModal
157
157
  };
158
- //# sourceMappingURL=chunk-BHB56M7S.js.map
158
+ //# sourceMappingURL=chunk-H54FR7IP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/context/confirm-modal.tsx"],"sourcesContent":["'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type MouseEvent,\n type PropsWithChildren,\n type ReactNode,\n} from 'react'\nimport { Button } from '../components/button/button'\nimport { css } from '@cerberus/styled-system/css'\nimport { Show } from '../components/Show'\nimport { Avatar } from '../components/Avatar'\nimport { HStack, VStack } from '@cerberus/styled-system/jsx'\nimport { useCerberusContext } from './cerberus'\nimport {\n Dialog,\n DialogCloseTrigger,\n DialogDescription,\n DialogHeading,\n DialogProvider,\n} from '../components/Dialog'\n\n/**\n * This module provides a context and hook for the confirm modal.\n * @module\n */\n\nexport interface BaseConfirmOptions {\n /**\n * The heading of the confirm modal.\n */\n heading: string\n /**\n * The text for the action button.\n */\n actionText: string\n /**\n * The text for the cancel button.\n */\n cancelText: string\n}\n\nexport interface DestructiveConfirmOptions extends BaseConfirmOptions {\n /**\n * The kind of confirm modal to show.\n */\n kind?: 'destructive'\n /**\n * The description of the confirm modal. Can only be a string for destructive confirm modals.\n */\n description?: string\n}\n\nexport interface NonDestructiveConfirmModalOptions extends BaseConfirmOptions {\n /**\n * The kind of confirm modal to show.\n * @default 'non-destructive'\n */\n kind?: 'non-destructive'\n /**\n * The description of the confirm modal. Can be a ReactNode for non-destructive kind if you need to display text links.\n * @example\n * ```tsx\n * description: <>Use a Fragment because we put the content within a Paragraph tag.</>\n */\n description?: ReactNode\n}\n\nexport type ShowConfirmModalOptions =\n | NonDestructiveConfirmModalOptions\n | DestructiveConfirmOptions\n\nexport type ShowResult =\n | ((value: boolean | PromiseLike<boolean>) => void)\n | null\n\nexport interface ConfirmModalValue {\n show: (options: ShowConfirmModalOptions) => Promise<boolean>\n}\n\nconst ConfirmModalContext = createContext<ConfirmModalValue | null>(null)\n\nexport type ConfirmModalProviderProps = PropsWithChildren<unknown>\n\n/**\n * Provides a confirm modal to the app.\n * @see https://cerberus.digitalu.design/react/confirm-modal\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <ConfirmModal>\n * <SomeFeatureSection />\n * </ConfirmModal>\n *\n * // Use the hook to show the confirm modal.\n * const confirm = useConfirmModal()\n *\n * const handleClick = useCallback(async () => {\n * const userConsent = await confirm.show({\n * heading: 'Add new payment method?',\n * description:\n * 'This will add a new payment method to your account to be billed for future purchases.',\n * actionText: 'Yes, add payment method',\n * cancelText: 'No, cancel',\n * })\n * setConsent(userConsent)\n * }, [confirm])\n * ```\n */\nexport function ConfirmModal(\n props: PropsWithChildren<ConfirmModalProviderProps>,\n) {\n const [open, setOpen] = useState<boolean>(false)\n const [content, setContent] = useState<ShowConfirmModalOptions | null>(null)\n const resolveRef = useRef<ShowResult>(null)\n const kind = content?.kind ?? 'non-destructive'\n\n const { icons } = useCerberusContext()\n const { confirmModal: ConfirmIcon } = icons\n\n const palette = useMemo(\n () => (kind === 'destructive' ? 'danger' : 'action'),\n [kind],\n )\n\n const handleChoice = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const target = e.currentTarget as HTMLButtonElement\n if (target.value === 'true') {\n resolveRef.current?.(true)\n }\n resolveRef.current?.(false)\n setOpen(false)\n },\n [setOpen],\n )\n\n const handleShow = useCallback(\n (options: ShowConfirmModalOptions) => {\n return new Promise<boolean>((resolve) => {\n setContent({ ...options })\n setOpen(true)\n resolveRef.current = resolve\n })\n },\n [setOpen, setContent],\n )\n\n const value = useMemo(\n () => ({\n show: handleShow,\n }),\n [handleShow],\n )\n\n return (\n <ConfirmModalContext.Provider value={value}>\n {props.children}\n\n <DialogProvider open={open} onOpenChange={(e) => setOpen(e.open)}>\n <Dialog size=\"sm\">\n <VStack gap=\"xl\" w=\"full\">\n <VStack alignItems=\"flex-start\" gap=\"md\" w=\"full\">\n <HStack\n alignSelf=\"center\"\n justify=\"center\"\n paddingBlockEnd=\"md\"\n w=\"full\"\n >\n <Show\n when={palette === 'danger'}\n fallback={\n <Avatar\n ariaLabel=\"\"\n gradient=\"charon-light\"\n icon={<ConfirmIcon size={24} />}\n src=\"\"\n />\n }\n >\n <Avatar\n ariaLabel=\"\"\n gradient=\"hades-dark\"\n icon={<ConfirmIcon size={24} />}\n src=\"\"\n />\n </Show>\n </HStack>\n <DialogHeading>{content?.heading}</DialogHeading>\n <DialogDescription>{content?.description}</DialogDescription>\n </VStack>\n\n <HStack gap=\"4\" w=\"full\">\n <Button\n autoFocus\n className={css({\n w: '1/2',\n })}\n name=\"confirm\"\n onClick={handleChoice}\n palette={palette}\n value=\"true\"\n >\n {content?.actionText}\n </Button>\n <DialogCloseTrigger asChild>\n <Button\n className={css({\n w: '1/2',\n })}\n name=\"cancel\"\n onClick={handleChoice}\n usage=\"outlined\"\n value=\"false\"\n >\n {content?.cancelText}\n </Button>\n </DialogCloseTrigger>\n </HStack>\n </VStack>\n </Dialog>\n </DialogProvider>\n </ConfirmModalContext.Provider>\n )\n}\n\nexport function useConfirmModal(): ConfirmModalValue {\n const context = useContext(ConfirmModalContext)\n if (context === null) {\n throw new Error(\n 'useConfirmModal must be used within a ConfirmModal Provider',\n )\n }\n return context\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAEP,SAAS,WAAW;AAGpB,SAAS,QAAQ,cAAc;AAsJnB,SAagB,KAbhB;AAlFZ,IAAM,sBAAsB,cAAwC,IAAI;AA6BjE,SAAS,aACd,OACA;AACA,QAAM,CAAC,MAAM,OAAO,IAAI,SAAkB,KAAK;AAC/C,QAAM,CAAC,SAAS,UAAU,IAAI,SAAyC,IAAI;AAC3E,QAAM,aAAa,OAAmB,IAAI;AAC1C,QAAM,OAAO,SAAS,QAAQ;AAE9B,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,cAAc,YAAY,IAAI;AAEtC,QAAM,UAAU;AAAA,IACd,MAAO,SAAS,gBAAgB,WAAW;AAAA,IAC3C,CAAC,IAAI;AAAA,EACP;AAEA,QAAM,eAAe;AAAA,IACnB,CAAC,MAAqC;AACpC,YAAM,SAAS,EAAE;AACjB,UAAI,OAAO,UAAU,QAAQ;AAC3B,mBAAW,UAAU,IAAI;AAAA,MAC3B;AACA,iBAAW,UAAU,KAAK;AAC1B,cAAQ,KAAK;AAAA,IACf;AAAA,IACA,CAAC,OAAO;AAAA,EACV;AAEA,QAAM,aAAa;AAAA,IACjB,CAAC,YAAqC;AACpC,aAAO,IAAI,QAAiB,CAAC,YAAY;AACvC,mBAAW,EAAE,GAAG,QAAQ,CAAC;AAC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;AAAA,YACA,OAAM;AAAA,YAEL,mBAAS;AAAA;AAAA,QACZ;AAAA,QACA,oBAAC,sBAAmB,SAAO,MACzB;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,IAAI;AAAA,cACb,GAAG;AAAA,YACL,CAAC;AAAA,YACD,MAAK;AAAA,YACL,SAAS;AAAA,YACT,OAAM;AAAA,YACN,OAAM;AAAA,YAEL,mBAAS;AAAA;AAAA,QACZ,GACF;AAAA,SACF;AAAA,OACF,GACF,GACF;AAAA,KACF;AAEJ;AAEO,SAAS,kBAAqC;AACnD,QAAM,UAAU,WAAW,mBAAmB;AAC9C,MAAI,YAAY,MAAM;AACpB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
@@ -0,0 +1,19 @@
1
+ import {
2
+ SelectItemGroup,
3
+ SelectItemGroupLabel
4
+ } from "./chunk-QCBLRACK.js";
5
+
6
+ // src/components/select/option-group.tsx
7
+ import { jsx } from "react/jsx-runtime";
8
+ function OptionGroup(props) {
9
+ return /* @__PURE__ */ jsx(SelectItemGroup, { ...props });
10
+ }
11
+ function OptionGroupLabel(props) {
12
+ return /* @__PURE__ */ jsx(SelectItemGroupLabel, { ...props });
13
+ }
14
+
15
+ export {
16
+ OptionGroup,
17
+ OptionGroupLabel
18
+ };
19
+ //# sourceMappingURL=chunk-IASVL7CW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/select/option-group.tsx"],"sourcesContent":["import type {\n SelectItemGroupLabelProps,\n SelectItemGroupProps,\n} from '@ark-ui/react/select'\nimport { SelectItemGroup, SelectItemGroupLabel } from './primitives'\n\n/**\n * The OptionGroup component is a group of options in the dropdown 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 * <OptionGroup>\n * <OptionGroupLabel>Greek gods</OptionGroupLabel>\n * ...\n * </OptionGroup>\n * ```\n */\nexport function OptionGroup(props: SelectItemGroupProps) {\n return <SelectItemGroup {...props} />\n}\n\n/**\n * The OptionGroupLabel component is the label of the OptionGroup.\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 * <OptionGroupLabel>Greek gods</OptionGroupLabel>\n * ```\n */\nexport function OptionGroupLabel(props: SelectItemGroupLabelProps) {\n return <SelectItemGroupLabel {...props} />\n}\n"],"mappings":";;;;;;AAmBS;AADF,SAAS,YAAY,OAA6B;AACvD,SAAO,oBAAC,mBAAiB,GAAG,OAAO;AACrC;AAWO,SAAS,iBAAiB,OAAkC;AACjE,SAAO,oBAAC,wBAAsB,GAAG,OAAO;AAC1C;","names":[]}
@@ -19,4 +19,4 @@ function useToggle(options) {
19
19
  export {
20
20
  useToggle
21
21
  };
22
- //# sourceMappingURL=chunk-REO5GUNC.js.map
22
+ //# sourceMappingURL=chunk-ICTISECN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/useToggle.ts"],"sourcesContent":["'use client'\n\nimport { useCallback, useMemo, useState, type ChangeEvent } from 'react'\n\n/**\n * This module provides a hook for using a toggle.\n * @module useToggle\n */\n\nexport interface UseToggleOptions {\n /**\n * The initial checked state.\n */\n checked?: string\n /**\n * Called when the checked state changes.\n */\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void\n}\nexport interface ToggleHookReturn {\n /**\n * The checked state.\n */\n checked: string\n /**\n * A custom handler to be called when the checked state changes.\n */\n handleChange: (e: ChangeEvent<HTMLInputElement>) => void\n}\n\n/**\n * @deprecated Will be removed in v1. Use ToggleParts instead.\n */\nexport function useToggle(options?: UseToggleOptions): ToggleHookReturn {\n const [checked, setChecked] = useState<string>(options?.checked ?? '')\n const onChange = options?.onChange\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const target = e.currentTarget as HTMLInputElement\n setChecked((prev) => {\n return prev === target.value ? '' : target.value\n })\n onChange?.(e)\n },\n [onChange],\n )\n\n return useMemo(() => ({ checked, handleChange }), [checked, handleChange])\n}\n"],"mappings":";AAEA,SAAS,aAAa,SAAS,gBAAkC;AA+B1D,SAAS,UAAU,SAA8C;AACtE,QAAM,CAAC,SAAS,UAAU,IAAI,SAAiB,SAAS,WAAW,EAAE;AACrE,QAAM,WAAW,SAAS;AAE1B,QAAM,eAAe;AAAA,IACnB,CAAC,MAAqC;AACpC,YAAM,SAAS,EAAE;AACjB,iBAAW,CAAC,SAAS;AACnB,eAAO,SAAS,OAAO,QAAQ,KAAK,OAAO;AAAA,MAC7C,CAAC;AACD,iBAAW,CAAC;AAAA,IACd;AAAA,IACA,CAAC,QAAQ;AAAA,EACX;AAEA,SAAO,QAAQ,OAAO,EAAE,SAAS,aAAa,IAAI,CAAC,SAAS,YAAY,CAAC;AAC3E;","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-IDTAB2UJ.js.map
@@ -0,0 +1,13 @@
1
+ // src/components/for.tsx
2
+ function For(props) {
3
+ const mappableChildren = props.children;
4
+ if (props.each?.length === 0) {
5
+ return props.fallback || null;
6
+ }
7
+ return props.each?.map(mappableChildren);
8
+ }
9
+
10
+ export {
11
+ For
12
+ };
13
+ //# sourceMappingURL=chunk-IIH363FO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/for.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nexport interface ForProps<T> {\n /**\n * The array to iterate over\n */\n each: T[]\n /**\n * The fallback content to render when the array is empty\n */\n fallback?: ReactNode\n /**\n * The render function to render each item in the array\n */\n children: (item: Exclude<T, undefined>, index: number) => ReactNode\n}\n\n/**\n * The For component is used to iterate over an array and render a list of\n * components or display a fallback when the array is empty.\n * Inspired by the `<For>` component from SolidJS.\n *\n * @example\n * ```tsx\n * <For each={['a', 'b', 'c']}>\n * {(item, index) => <div key={index}>{item}</div>}\n * </For>\n * ```\n */\nexport function For<\n T extends string | number | Record<string, unknown> | object | undefined,\n>(props: ForProps<T>) {\n const mappableChildren = props.children as unknown as (\n item: T,\n index: number,\n ) => ReactNode\n\n if (props.each?.length === 0) {\n return props.fallback || null\n }\n\n return props.each?.map(mappableChildren) as ReactNode\n}\n"],"mappings":";AA6BO,SAAS,IAEd,OAAoB;AACpB,QAAM,mBAAmB,MAAM;AAK/B,MAAI,MAAM,MAAM,WAAW,GAAG;AAC5B,WAAO,MAAM,YAAY;AAAA,EAC3B;AAEA,SAAO,MAAM,MAAM,IAAI,gBAAgB;AACzC;","names":[]}
@@ -0,0 +1,21 @@
1
+ import {
2
+ SwitchControl,
3
+ SwitchHiddenInput,
4
+ SwitchLabel,
5
+ SwitchRoot,
6
+ SwitchThumb
7
+ } from "./chunk-LZWNHXRP.js";
8
+
9
+ // src/components/switch/parts.ts
10
+ var SwitchParts = {
11
+ Root: SwitchRoot,
12
+ Label: SwitchLabel,
13
+ Control: SwitchControl,
14
+ Thumb: SwitchThumb,
15
+ HiddenInput: SwitchHiddenInput
16
+ };
17
+
18
+ export {
19
+ SwitchParts
20
+ };
21
+ //# sourceMappingURL=chunk-KQQPZJEI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/switch/parts.ts"],"sourcesContent":["import type { ElementType } from 'react'\nimport {\n SwitchControl,\n SwitchLabel,\n SwitchRoot,\n SwitchThumb,\n SwitchHiddenInput,\n} from './primitives'\n\n/**\n * This module contains the parts of the Radio parts.\n * @module 'radio/parts'\n */\n\ninterface SwitchPartsValue {\n /**\n * The container of the field.\n */\n Root: ElementType\n /**\n * The label of the field.\n */\n Label: ElementType\n /**\n * The visual input of the switch.\n */\n Control: ElementType\n /**\n * The thumb item of the switch.\n */\n Thumb: ElementType\n /**\n * The native input for the switch.\n */\n HiddenInput: ElementType\n}\n\n/**\n * An Object containing the parts of the Radio component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the SwitchParts object and\n * the entire family of components vs. only what you use.\n */\nexport const SwitchParts: SwitchPartsValue = {\n Root: SwitchRoot,\n Label: SwitchLabel,\n Control: SwitchControl,\n Thumb: SwitchThumb,\n HiddenInput: SwitchHiddenInput,\n}\n"],"mappings":";;;;;;;;;AA8CO,IAAM,cAAgC;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,aAAa;AACf;","names":[]}
@@ -0,0 +1,23 @@
1
+ import {
2
+ CheckboxControl,
3
+ CheckboxGroup,
4
+ CheckboxHiddenInput,
5
+ CheckboxIndicator,
6
+ CheckboxLabel,
7
+ CheckboxRoot
8
+ } from "./chunk-BPRF34DU.js";
9
+
10
+ // src/components/checkbox/parts.ts
11
+ var CheckboxParts = {
12
+ Root: CheckboxRoot,
13
+ Label: CheckboxLabel,
14
+ Control: CheckboxControl,
15
+ Indicator: CheckboxIndicator,
16
+ HiddenInput: CheckboxHiddenInput,
17
+ Group: CheckboxGroup
18
+ };
19
+
20
+ export {
21
+ CheckboxParts
22
+ };
23
+ //# sourceMappingURL=chunk-KWZ3CEG6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/checkbox/parts.ts"],"sourcesContent":["import type { ElementType } from 'react'\nimport {\n CheckboxRoot,\n CheckboxLabel,\n CheckboxControl,\n CheckboxIndicator,\n CheckboxHiddenInput,\n CheckboxGroup,\n} from './primitives'\n\n/**\n * This module contains the parts of the Field component.\n * @module 'field/parts'\n */\n\ninterface CheckboxPartsValue {\n /**\n * The container of the field.\n */\n Root: ElementType\n /**\n * The label of the field.\n */\n Label: ElementType\n /**\n * The control of the field.\n */\n Control: ElementType\n /**\n * The indicator of the field.\n */\n Indicator: ElementType\n /**\n * The hidden input of the field.\n */\n HiddenInput: ElementType\n /**\n * The checkbox group component.\n */\n Group: ElementType\n}\n\n/**\n * An Object containing the parts of the Checkbox component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the CheckboxParts object and\n * the entire family of components vs. only what you use.\n */\nexport const CheckboxParts: CheckboxPartsValue = {\n Root: CheckboxRoot,\n Label: CheckboxLabel,\n Control: CheckboxControl,\n Indicator: CheckboxIndicator,\n HiddenInput: CheckboxHiddenInput,\n Group: CheckboxGroup,\n}\n"],"mappings":";;;;;;;;;;AAmDO,IAAM,gBAAoC;AAAA,EAC/C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,WAAW;AAAA,EACX,aAAa;AAAA,EACb,OAAO;AACT;","names":[]}
@@ -1,12 +1,9 @@
1
- import {
2
- useFieldContext
3
- } from "./chunk-UZDVOIW5.js";
4
-
5
- // src/components/FieldMessage.tsx
1
+ // src/components/deprecated/FieldMessage.tsx
6
2
  import { cx } from "@cerberus/styled-system/css";
7
3
  import {
8
4
  fieldMessage
9
5
  } from "@cerberus/styled-system/recipes";
6
+ import { useFieldContext } from "@ark-ui/react/field";
10
7
  import { jsx } from "react/jsx-runtime";
11
8
  function FieldMessage(props) {
12
9
  const { invalid } = useFieldContext();
@@ -23,4 +20,4 @@ function FieldMessage(props) {
23
20
  export {
24
21
  FieldMessage
25
22
  };
26
- //# sourceMappingURL=chunk-JWIJHSI6.js.map
23
+ //# sourceMappingURL=chunk-L7N24B6B.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/deprecated/FieldMessage.tsx"],"sourcesContent":["'use client'\n\nimport type { HTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n fieldMessage,\n type FieldMessageVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { useFieldContext } from '@ark-ui/react/field'\n\n/**\n * This module contains the FieldMessage component.\n * @module\n */\nexport interface FieldMessageBaseProps\n extends HTMLAttributes<HTMLParagraphElement> {\n /**\n * The id of the FieldMessage element describing the field. Required for accessibility. It is considered best practice to use the `help` or `error` prefix to help screen readers identify the type of message.\n *\n * @example For help messages: `help:field_id`\n * @example For error messages: `error:field_id`\n */\n id: string\n}\nexport type FieldMessageProps = FieldMessageBaseProps & FieldMessageVariantProps\n\n/**\n * @deprecated use FieldHelperText, FieldErrorText, or FieldParts instead\n */\nexport function FieldMessage(props: FieldMessageProps) {\n const { invalid } = useFieldContext()\n return (\n <small\n {...props}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(props.className, fieldMessage())}\n />\n )\n}\n"],"mappings":";AAGA,SAAS,UAAU;AACnB;AAAA,EACE;AAAA,OAEK;AACP,SAAS,uBAAuB;AAwB5B;AAHG,SAAS,aAAa,OAA0B;AACrD,QAAM,EAAE,QAAQ,IAAI,gBAAgB;AACpC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAI,WAAW,EAAE,gBAAgB,KAAK;AAAA,MACvC,WAAW,GAAG,MAAM,WAAW,aAAa,CAAC;AAAA;AAAA,EAC/C;AAEJ;","names":[]}