@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,82 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/radio/radio.tsx
21
+ var radio_exports = {};
22
+ __export(radio_exports, {
23
+ Radio: () => Radio
24
+ });
25
+ module.exports = __toCommonJS(radio_exports);
26
+
27
+ // src/components/radio/primitives.tsx
28
+ var import_radio_group = require("@ark-ui/react/radio-group");
29
+ var import_css = require("@cerberus/styled-system/css");
30
+ var import_recipes = require("@cerberus/styled-system/recipes");
31
+ var import_jsx_runtime = require("react/jsx-runtime");
32
+ function RadioGroupItem(props) {
33
+ const styles = (0, import_recipes.radioGroup)();
34
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
35
+ import_radio_group.RadioGroup.Item,
36
+ {
37
+ ...props,
38
+ className: (0, import_css.cx)(styles.item, props.className)
39
+ }
40
+ );
41
+ }
42
+ function RadioGroupItemText(props) {
43
+ const { size, orientation, ...itemTextProps } = props;
44
+ const styles = (0, import_recipes.radioGroup)({ size, orientation });
45
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
46
+ import_radio_group.RadioGroup.ItemText,
47
+ {
48
+ ...itemTextProps,
49
+ className: (0, import_css.cx)(styles.itemText, itemTextProps.className)
50
+ }
51
+ );
52
+ }
53
+ function RadioGroupItemControl(props) {
54
+ const { size, orientation, ...itemControlProps } = props;
55
+ const styles = (0, import_recipes.radioGroup)({ size, orientation });
56
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
+ import_radio_group.RadioGroup.ItemControl,
58
+ {
59
+ ...itemControlProps,
60
+ className: (0, import_css.cx)(styles.itemControl, itemControlProps.className)
61
+ }
62
+ );
63
+ }
64
+ function RadioGroupItemHiddenInput(props) {
65
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_radio_group.RadioGroup.ItemHiddenInput, { ...props });
66
+ }
67
+
68
+ // src/components/radio/radio.tsx
69
+ var import_jsx_runtime2 = require("react/jsx-runtime");
70
+ function Radio(props) {
71
+ const { size, children, ...groupProps } = props;
72
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(RadioGroupItem, { ...groupProps, children: [
73
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RadioGroupItemControl, { size }),
74
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RadioGroupItemText, { size, children }),
75
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RadioGroupItemHiddenInput, {})
76
+ ] });
77
+ }
78
+ // Annotate the CommonJS export names for ESM import in node:
79
+ 0 && (module.exports = {
80
+ Radio
81
+ });
82
+ //# sourceMappingURL=radio.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/radio/radio.tsx","../../../../src/components/radio/primitives.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","import {\n RadioGroup as ArkRadioGroup,\n type RadioGroupIndicatorProps,\n type RadioGroupItemControlProps,\n type RadioGroupItemHiddenInputProps,\n type RadioGroupItemProps,\n type RadioGroupItemTextProps,\n type RadioGroupLabelProps,\n type RadioGroupRootProps,\n} from '@ark-ui/react/radio-group'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n radioGroup,\n type RadioGroupVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Radio primitives\n * @module 'react/radio'\n */\n\n/**\n * The RadioGroupRoot component is used to group radio buttons together.\n */\nexport function RadioGroupRoot(\n props: RadioGroupRootProps & RadioGroupVariantProps,\n) {\n const { size, orientation, ...rootProps } = props\n const styles = radioGroup({ size, orientation })\n return (\n <ArkRadioGroup.Root\n {...rootProps}\n className={cx(styles.root, rootProps.className)}\n />\n )\n}\n\n/**\n * The RadioGroupLabel component is used to label a group of radio buttons.\n */\nexport function RadioGroupLabel(props: RadioGroupLabelProps) {\n const styles = radioGroup()\n return (\n <ArkRadioGroup.Label\n {...props}\n className={cx(styles.label, props.className)}\n />\n )\n}\n\n/**\n * The RadioGroupIndicator component is used to indicate the selected radio\n * button in a group.\n */\nexport function RadioGroupIndicator(props: RadioGroupIndicatorProps) {\n const styles = radioGroup()\n return (\n <ArkRadioGroup.Indicator\n {...props}\n className={cx(styles.indicator, props.className)}\n />\n )\n}\n\n/**\n * The RadioGroupItem component is used to render a single radio button in a\n * group.\n */\nexport function RadioGroupItem(props: RadioGroupItemProps) {\n const styles = radioGroup()\n return (\n <ArkRadioGroup.Item\n {...props}\n className={cx(styles.item, props.className)}\n />\n )\n}\n\n/**\n * The RadioGroupItemText component is used to render the text label for a\n * single radio button in a group.\n */\nexport function RadioGroupItemText(\n props: RadioGroupItemTextProps & RadioGroupVariantProps,\n) {\n const { size, orientation, ...itemTextProps } = props\n const styles = radioGroup({ size, orientation })\n return (\n <ArkRadioGroup.ItemText\n {...itemTextProps}\n className={cx(styles.itemText, itemTextProps.className)}\n />\n )\n}\n\n/**\n * The RadioGroupItemControl component is used to render the control for a\n * single radio button in a group.\n */\nexport function RadioGroupItemControl(\n props: RadioGroupItemControlProps & RadioGroupVariantProps,\n) {\n const { size, orientation, ...itemControlProps } = props\n const styles = radioGroup({ size, orientation })\n return (\n <ArkRadioGroup.ItemControl\n {...itemControlProps}\n className={cx(styles.itemControl, itemControlProps.className)}\n />\n )\n}\n\n/**\n * The RadioGroupItemHiddenInput component is used to render the hidden input\n * for a single radio button in a group.\n */\nexport function RadioGroupItemHiddenInput(\n props: RadioGroupItemHiddenInputProps,\n) {\n return <ArkRadioGroup.ItemHiddenInput {...props} />\n}\n\nexport const RadioGroup = RadioGroupRoot\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,yBASO;AACP,iBAAmB;AACnB,qBAGO;AAgBH;AAsCG,SAAS,eAAe,OAA4B;AACzD,QAAM,aAAS,2BAAW;AAC1B,SACE;AAAA,IAAC,mBAAAA,WAAc;AAAA,IAAd;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,OAAO,MAAM,MAAM,SAAS;AAAA;AAAA,EAC5C;AAEJ;AAMO,SAAS,mBACd,OACA;AACA,QAAM,EAAE,MAAM,aAAa,GAAG,cAAc,IAAI;AAChD,QAAM,aAAS,2BAAW,EAAE,MAAM,YAAY,CAAC;AAC/C,SACE;AAAA,IAAC,mBAAAA,WAAc;AAAA,IAAd;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,OAAO,UAAU,cAAc,SAAS;AAAA;AAAA,EACxD;AAEJ;AAMO,SAAS,sBACd,OACA;AACA,QAAM,EAAE,MAAM,aAAa,GAAG,iBAAiB,IAAI;AACnD,QAAM,aAAS,2BAAW,EAAE,MAAM,YAAY,CAAC;AAC/C,SACE;AAAA,IAAC,mBAAAA,WAAc;AAAA,IAAd;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,OAAO,aAAa,iBAAiB,SAAS;AAAA;AAAA,EAC9D;AAEJ;AAMO,SAAS,0BACd,OACA;AACA,SAAO,4CAAC,mBAAAA,WAAc,iBAAd,EAA+B,GAAG,OAAO;AACnD;;;AD5FI,IAAAC,sBAAA;AAHG,SAAS,MAAM,OAAmB;AACvC,QAAM,EAAE,MAAM,UAAU,GAAG,WAAW,IAAI;AAC1C,SACE,8CAAC,kBAAgB,GAAG,YAClB;AAAA,iDAAC,yBAAsB,MAAY;AAAA,IACnC,6CAAC,sBAAmB,MAAa,UAAS;AAAA,IAC1C,6CAAC,6BAA0B;AAAA,KAC7B;AAEJ;","names":["ArkRadioGroup","import_jsx_runtime"]}
@@ -0,0 +1,265 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/select/index.ts
21
+ var select_exports = {};
22
+ __export(select_exports, {
23
+ Option: () => Option,
24
+ OptionGroup: () => OptionGroup,
25
+ OptionGroupLabel: () => OptionGroupLabel,
26
+ Select: () => Select2,
27
+ SelectClearTrigger: () => SelectClearTrigger,
28
+ SelectContent: () => SelectContent,
29
+ SelectControl: () => SelectControl,
30
+ SelectHiddenSelect: () => SelectHiddenSelect,
31
+ SelectIndicator: () => SelectIndicator,
32
+ SelectItem: () => SelectItem,
33
+ SelectItemGroup: () => SelectItemGroup,
34
+ SelectItemGroupLabel: () => SelectItemGroupLabel,
35
+ SelectItemIndicator: () => SelectItemIndicator,
36
+ SelectItemText: () => SelectItemText,
37
+ SelectLabel: () => SelectLabel,
38
+ SelectParts: () => SelectParts,
39
+ SelectPositioner: () => SelectPositioner,
40
+ SelectRoot: () => SelectRoot,
41
+ SelectTrigger: () => SelectTrigger,
42
+ SelectValueText: () => SelectValueText,
43
+ createSelectCollection: () => createSelectCollection
44
+ });
45
+ module.exports = __toCommonJS(select_exports);
46
+
47
+ // src/components/select/primitives.tsx
48
+ var import_select = require("@ark-ui/react/select");
49
+ var import_recipes = require("@cerberus/styled-system/recipes");
50
+ var import_css = require("@cerberus/styled-system/css");
51
+ var import_jsx_runtime = require("react/jsx-runtime");
52
+ function SelectRoot(props) {
53
+ const { size, ...rootProps } = props;
54
+ const styles = (0, import_recipes.select)({ size });
55
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
+ import_select.Select.Root,
57
+ {
58
+ ...rootProps,
59
+ className: (0, import_css.cx)(styles.root, rootProps.className)
60
+ }
61
+ );
62
+ }
63
+ function SelectLabel(props) {
64
+ const styles = (0, import_recipes.select)();
65
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.Label, { ...props, className: (0, import_css.cx)(styles.label, props.className) });
66
+ }
67
+ function SelectControl(props) {
68
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.Control, { ...props });
69
+ }
70
+ function SelectTrigger(props) {
71
+ const styles = (0, import_recipes.select)();
72
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
+ import_select.Select.Trigger,
74
+ {
75
+ ...props,
76
+ className: (0, import_css.cx)(styles.trigger, props.className)
77
+ }
78
+ );
79
+ }
80
+ function SelectValueText(props) {
81
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.ValueText, { ...props });
82
+ }
83
+ function SelectIndicator(props) {
84
+ const styles = (0, import_recipes.select)();
85
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
86
+ import_select.Select.Indicator,
87
+ {
88
+ ...props,
89
+ className: (0, import_css.cx)(styles.indicator, props.className)
90
+ }
91
+ );
92
+ }
93
+ function SelectClearTrigger(props) {
94
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.ClearTrigger, { ...props });
95
+ }
96
+ function SelectPositioner(props) {
97
+ const styles = (0, import_recipes.select)();
98
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
99
+ import_select.Select.Positioner,
100
+ {
101
+ ...props,
102
+ className: (0, import_css.cx)(styles.positioner, props.className)
103
+ }
104
+ );
105
+ }
106
+ function SelectContent(props) {
107
+ const { size, ...contentProps } = props;
108
+ const styles = (0, import_recipes.select)({ size });
109
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
+ import_select.Select.Content,
111
+ {
112
+ ...contentProps,
113
+ className: (0, import_css.cx)(styles.content, contentProps.className)
114
+ }
115
+ );
116
+ }
117
+ function SelectItemGroup(props) {
118
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.ItemGroup, { ...props });
119
+ }
120
+ function SelectItemGroupLabel(props) {
121
+ const styles = (0, import_recipes.select)();
122
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
123
+ import_select.Select.ItemGroupLabel,
124
+ {
125
+ ...props,
126
+ className: (0, import_css.cx)(styles.itemGroupLabel, props.className)
127
+ }
128
+ );
129
+ }
130
+ function SelectItem(props) {
131
+ const styles = (0, import_recipes.select)();
132
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.Item, { ...props, className: (0, import_css.cx)(styles.item, props.className) });
133
+ }
134
+ function SelectItemText(props) {
135
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.ItemText, { ...props });
136
+ }
137
+ function SelectItemIndicator(props) {
138
+ const styles = (0, import_recipes.select)();
139
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
140
+ import_select.Select.ItemIndicator,
141
+ {
142
+ ...props,
143
+ className: (0, import_css.cx)(styles.itemIndicator, props.className)
144
+ }
145
+ );
146
+ }
147
+ function SelectHiddenSelect(props) {
148
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.HiddenSelect, { ...props });
149
+ }
150
+ function createSelectCollection(collection) {
151
+ return (0, import_select.createListCollection)({
152
+ items: collection
153
+ });
154
+ }
155
+
156
+ // src/components/select/parts.ts
157
+ var SelectParts = {
158
+ Root: SelectRoot,
159
+ Label: SelectLabel,
160
+ Control: SelectControl,
161
+ Trigger: SelectTrigger,
162
+ ClearTrigger: SelectClearTrigger,
163
+ ValueText: SelectValueText,
164
+ Indicator: SelectIndicator,
165
+ Positioner: SelectPositioner,
166
+ Content: SelectContent,
167
+ ItemGroup: SelectItemGroup,
168
+ ItemGroupLabel: SelectItemGroupLabel,
169
+ Item: SelectItem,
170
+ ItemText: SelectItemText,
171
+ ItemIndicator: SelectItemIndicator,
172
+ HiddenSelect: SelectHiddenSelect
173
+ };
174
+
175
+ // src/components/select/select.tsx
176
+ var import_jsx = require("@cerberus/styled-system/jsx");
177
+
178
+ // src/context/cerberus.tsx
179
+ var import_react = require("react");
180
+ var import_jsx_runtime2 = require("react/jsx-runtime");
181
+ var CerberusContext = (0, import_react.createContext)(null);
182
+ function useCerberusContext() {
183
+ const context = (0, import_react.useContext)(CerberusContext);
184
+ if (!context) {
185
+ throw new Error("useCerberus must be used within a CerberusProvider");
186
+ }
187
+ return context;
188
+ }
189
+
190
+ // src/components/Portal.tsx
191
+ var import_react2 = require("@ark-ui/react");
192
+ var Portal = import_react2.Portal;
193
+
194
+ // src/components/Show.tsx
195
+ var import_react3 = require("react");
196
+ function Show(props) {
197
+ const { when, children, fallback } = props;
198
+ const condition = (0, import_react3.useMemo)(() => when ?? false, [when]);
199
+ return (0, import_react3.useMemo)(() => {
200
+ if (condition) return children;
201
+ return fallback ?? null;
202
+ }, [condition, children, fallback]);
203
+ }
204
+
205
+ // src/components/select/select.tsx
206
+ var import_jsx_runtime3 = require("react/jsx-runtime");
207
+ function Select2(props) {
208
+ const { collection, placeholder, ...rootProps } = props;
209
+ const { icons } = useCerberusContext();
210
+ const { selectArrow: SelectArrow, invalid: InvalidIcon } = icons;
211
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(SelectParts.Root, { collection, ...rootProps, children: [
212
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectParts.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(SelectParts.Trigger, { children: [
213
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectParts.ValueText, { placeholder }),
214
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx.HStack, { children: [
215
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Show, { when: props.invalid, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InvalidIcon, { "data-part": "invalid-icon" }) }),
216
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectParts.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectArrow, {}) })
217
+ ] })
218
+ ] }) }),
219
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectParts.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectParts.Content, { size: rootProps.size, children: props.children }) }) }),
220
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectParts.HiddenSelect, {})
221
+ ] });
222
+ }
223
+ function Option(props) {
224
+ const { item, ...itemProps } = props;
225
+ const { icons } = useCerberusContext();
226
+ const { selectChecked: CheckedIcon } = icons;
227
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(SelectParts.Item, { ...itemProps, item, children: [
228
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectParts.ItemText, { children: item == null ? void 0 : item.label }),
229
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectParts.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckedIcon, {}) })
230
+ ] });
231
+ }
232
+
233
+ // src/components/select/option-group.tsx
234
+ var import_jsx_runtime4 = require("react/jsx-runtime");
235
+ function OptionGroup(props) {
236
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectItemGroup, { ...props });
237
+ }
238
+ function OptionGroupLabel(props) {
239
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectItemGroupLabel, { ...props });
240
+ }
241
+ // Annotate the CommonJS export names for ESM import in node:
242
+ 0 && (module.exports = {
243
+ Option,
244
+ OptionGroup,
245
+ OptionGroupLabel,
246
+ Select,
247
+ SelectClearTrigger,
248
+ SelectContent,
249
+ SelectControl,
250
+ SelectHiddenSelect,
251
+ SelectIndicator,
252
+ SelectItem,
253
+ SelectItemGroup,
254
+ SelectItemGroupLabel,
255
+ SelectItemIndicator,
256
+ SelectItemText,
257
+ SelectLabel,
258
+ SelectParts,
259
+ SelectPositioner,
260
+ SelectRoot,
261
+ SelectTrigger,
262
+ SelectValueText,
263
+ createSelectCollection
264
+ });
265
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/select/index.ts","../../../../src/components/select/primitives.tsx","../../../../src/components/select/parts.ts","../../../../src/components/select/select.tsx","../../../../src/context/cerberus.tsx","../../../../src/components/Portal.tsx","../../../../src/components/Show.tsx","../../../../src/components/select/option-group.tsx"],"sourcesContent":["export * from './parts'\nexport * from './primitives'\nexport * from './select'\nexport * from './option-group'\n","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","import type { ElementType } from 'react'\nimport {\n SelectClearTrigger,\n SelectContent,\n SelectControl,\n SelectHiddenSelect,\n SelectIndicator,\n SelectItem,\n SelectItemGroup,\n SelectItemGroupLabel,\n SelectItemIndicator,\n SelectItemText,\n SelectLabel,\n SelectPositioner,\n SelectRoot,\n SelectTrigger,\n SelectValueText,\n} from './primitives'\n\n/**\n * This module contains the parts of the Select parts.\n * @module 'select/parts'\n */\n\ninterface SelectPartsValue {\n /**\n * The context provider for the Select component.\n */\n Root: ElementType\n /**\n * The label that appears above the select input.\n */\n Label: ElementType\n /**\n * The control that wraps the select trigger.\n */\n Control: ElementType\n /**\n * The trigger that opens the dropdown.\n */\n Trigger: ElementType\n /**\n * The trigger to clear the select input.\n */\n ClearTrigger: ElementType\n /**\n * The text that appears in the trigger.\n */\n ValueText: ElementType\n /**\n * The indicator that appears in the trigger.\n */\n Indicator: ElementType\n /**\n * The positioner that wraps the content.\n */\n Positioner: ElementType\n /**\n * The content of the select component.\n */\n Content: ElementType\n /**\n * A group of items in the select component.\n */\n ItemGroup: ElementType\n /**\n * The label for a group of items in the select component.\n */\n ItemGroupLabel: ElementType\n /**\n * An individual item in the select component.\n */\n Item: ElementType\n /**\n * The text that labels a single radio of the field.\n */\n ItemText: ElementType\n /**\n * The indicator that appears when the item has been selected.\n */\n ItemIndicator: ElementType\n /**\n * The native select for use within a field.\n */\n HiddenSelect: 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 SelectParts object and\n * the entire family of components vs. only what you use.\n */\nexport const SelectParts: SelectPartsValue = {\n Root: SelectRoot,\n Label: SelectLabel,\n Control: SelectControl,\n Trigger: SelectTrigger,\n ClearTrigger: SelectClearTrigger,\n ValueText: SelectValueText,\n Indicator: SelectIndicator,\n Positioner: SelectPositioner,\n Content: SelectContent,\n ItemGroup: SelectItemGroup,\n ItemGroupLabel: SelectItemGroupLabel,\n Item: SelectItem,\n ItemText: SelectItemText,\n ItemIndicator: SelectItemIndicator,\n HiddenSelect: SelectHiddenSelect,\n}\n","'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","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import {\n Portal as ArkPortal,\n type PortalProps as ArkPortalProps,\n} from '@ark-ui/react'\n\n/**\n * This module is the Portal component.\n * @module\n */\n\nexport type PortalProps = ArkPortalProps\n\n/**\n * The Portal component is used to render children into a DOM node that exists outside the DOM hierarchy of the parent component.\n * @see https://cerberus.digitalu.design/react/portal\n * @definition [React Portal Docs](https://react.dev/reference/react-dom/createPortal)\n * @example\n * ```tsx\n * 'use client'\n *\n * import { Portal } from '@cerberus/react'\n *\n * function SomeFeatureWithinSSRPage() {\n * return (\n * <Portal>\n * <div>Portal Content outside of the React VDom tree</div>\n * </Portal>\n * )\n * }\n */\nexport const Portal = ArkPortal\n","'use client'\n\nimport { useMemo, type PropsWithChildren, type ReactNode } from 'react'\n\n/**\n * This module contains the Show component.\n * @module\n */\n\nexport interface ShowProps {\n /**\n * The condition to render memoized children or the fallback content.\n */\n when: boolean | null | undefined\n /**\n * The children to render when the condition is false.\n */\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render a memoized version of the children or optional fallback\n * content.\n * @see https://cerberus.digitalu.design/react/show\n * @example\n * ```tsx\n * <Show when={isLoggedIn} fallback={<Navigate to=\"/login\" />}>\n * <Dashboard />\n * </Show>\n */\nexport function Show(props: PropsWithChildren<ShowProps>): ReactNode {\n const { when, children, fallback } = props\n const condition = useMemo(() => when ?? false, [when])\n\n return useMemo(() => {\n if (condition) return children\n return fallback ?? null\n }, [condition, children, fallback])\n}\n","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":"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","names":["Select","import_jsx_runtime","import_react","ArkPortal","import_react","import_jsx_runtime","Select","import_jsx_runtime"]}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/select/option-group.tsx
21
+ var option_group_exports = {};
22
+ __export(option_group_exports, {
23
+ OptionGroup: () => OptionGroup,
24
+ OptionGroupLabel: () => OptionGroupLabel
25
+ });
26
+ module.exports = __toCommonJS(option_group_exports);
27
+
28
+ // src/components/select/primitives.tsx
29
+ var import_select = require("@ark-ui/react/select");
30
+ var import_recipes = require("@cerberus/styled-system/recipes");
31
+ var import_css = require("@cerberus/styled-system/css");
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ function SelectItemGroup(props) {
34
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.ItemGroup, { ...props });
35
+ }
36
+ function SelectItemGroupLabel(props) {
37
+ const styles = (0, import_recipes.select)();
38
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
39
+ import_select.Select.ItemGroupLabel,
40
+ {
41
+ ...props,
42
+ className: (0, import_css.cx)(styles.itemGroupLabel, props.className)
43
+ }
44
+ );
45
+ }
46
+
47
+ // src/components/select/option-group.tsx
48
+ var import_jsx_runtime2 = require("react/jsx-runtime");
49
+ function OptionGroup(props) {
50
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectItemGroup, { ...props });
51
+ }
52
+ function OptionGroupLabel(props) {
53
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectItemGroupLabel, { ...props });
54
+ }
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ OptionGroup,
58
+ OptionGroupLabel
59
+ });
60
+ //# sourceMappingURL=option-group.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/select/option-group.tsx","../../../../src/components/select/primitives.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","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;AAAA;AAAA;AAAA;AAAA;;;ACAA,oBAoBO;AACP,qBAGO;AACP,iBAAmB;AAiBf;AA8FG,SAAS,gBAAgB,OAA6B;AAC3D,SAAO,4CAAC,qBAAO,WAAP,EAAkB,GAAG,OAAO;AACtC;AAKO,SAAS,qBAAqB,OAAkC;AACrE,QAAM,aAAS,uBAAO;AACtB,SACE;AAAA,IAAC,qBAAO;AAAA,IAAP;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,OAAO,gBAAgB,MAAM,SAAS;AAAA;AAAA,EACtD;AAEJ;;;ADpIS,IAAAA,sBAAA;AADF,SAAS,YAAY,OAA6B;AACvD,SAAO,6CAAC,mBAAiB,GAAG,OAAO;AACrC;AAWO,SAAS,iBAAiB,OAAkC;AACjE,SAAO,6CAAC,wBAAsB,GAAG,OAAO;AAC1C;","names":["import_jsx_runtime"]}
@@ -0,0 +1,153 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/select/parts.ts
21
+ var parts_exports = {};
22
+ __export(parts_exports, {
23
+ SelectParts: () => SelectParts
24
+ });
25
+ module.exports = __toCommonJS(parts_exports);
26
+
27
+ // src/components/select/primitives.tsx
28
+ var import_select = require("@ark-ui/react/select");
29
+ var import_recipes = require("@cerberus/styled-system/recipes");
30
+ var import_css = require("@cerberus/styled-system/css");
31
+ var import_jsx_runtime = require("react/jsx-runtime");
32
+ function SelectRoot(props) {
33
+ const { size, ...rootProps } = props;
34
+ const styles = (0, import_recipes.select)({ size });
35
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
36
+ import_select.Select.Root,
37
+ {
38
+ ...rootProps,
39
+ className: (0, import_css.cx)(styles.root, rootProps.className)
40
+ }
41
+ );
42
+ }
43
+ function SelectLabel(props) {
44
+ const styles = (0, import_recipes.select)();
45
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.Label, { ...props, className: (0, import_css.cx)(styles.label, props.className) });
46
+ }
47
+ function SelectControl(props) {
48
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.Control, { ...props });
49
+ }
50
+ function SelectTrigger(props) {
51
+ const styles = (0, import_recipes.select)();
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
53
+ import_select.Select.Trigger,
54
+ {
55
+ ...props,
56
+ className: (0, import_css.cx)(styles.trigger, props.className)
57
+ }
58
+ );
59
+ }
60
+ function SelectValueText(props) {
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.ValueText, { ...props });
62
+ }
63
+ function SelectIndicator(props) {
64
+ const styles = (0, import_recipes.select)();
65
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
66
+ import_select.Select.Indicator,
67
+ {
68
+ ...props,
69
+ className: (0, import_css.cx)(styles.indicator, props.className)
70
+ }
71
+ );
72
+ }
73
+ function SelectClearTrigger(props) {
74
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.ClearTrigger, { ...props });
75
+ }
76
+ function SelectPositioner(props) {
77
+ const styles = (0, import_recipes.select)();
78
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
79
+ import_select.Select.Positioner,
80
+ {
81
+ ...props,
82
+ className: (0, import_css.cx)(styles.positioner, props.className)
83
+ }
84
+ );
85
+ }
86
+ function SelectContent(props) {
87
+ const { size, ...contentProps } = props;
88
+ const styles = (0, import_recipes.select)({ size });
89
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
+ import_select.Select.Content,
91
+ {
92
+ ...contentProps,
93
+ className: (0, import_css.cx)(styles.content, contentProps.className)
94
+ }
95
+ );
96
+ }
97
+ function SelectItemGroup(props) {
98
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.ItemGroup, { ...props });
99
+ }
100
+ function SelectItemGroupLabel(props) {
101
+ const styles = (0, import_recipes.select)();
102
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
103
+ import_select.Select.ItemGroupLabel,
104
+ {
105
+ ...props,
106
+ className: (0, import_css.cx)(styles.itemGroupLabel, props.className)
107
+ }
108
+ );
109
+ }
110
+ function SelectItem(props) {
111
+ const styles = (0, import_recipes.select)();
112
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.Item, { ...props, className: (0, import_css.cx)(styles.item, props.className) });
113
+ }
114
+ function SelectItemText(props) {
115
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.ItemText, { ...props });
116
+ }
117
+ function SelectItemIndicator(props) {
118
+ const styles = (0, import_recipes.select)();
119
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
120
+ import_select.Select.ItemIndicator,
121
+ {
122
+ ...props,
123
+ className: (0, import_css.cx)(styles.itemIndicator, props.className)
124
+ }
125
+ );
126
+ }
127
+ function SelectHiddenSelect(props) {
128
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.HiddenSelect, { ...props });
129
+ }
130
+
131
+ // src/components/select/parts.ts
132
+ var SelectParts = {
133
+ Root: SelectRoot,
134
+ Label: SelectLabel,
135
+ Control: SelectControl,
136
+ Trigger: SelectTrigger,
137
+ ClearTrigger: SelectClearTrigger,
138
+ ValueText: SelectValueText,
139
+ Indicator: SelectIndicator,
140
+ Positioner: SelectPositioner,
141
+ Content: SelectContent,
142
+ ItemGroup: SelectItemGroup,
143
+ ItemGroupLabel: SelectItemGroupLabel,
144
+ Item: SelectItem,
145
+ ItemText: SelectItemText,
146
+ ItemIndicator: SelectItemIndicator,
147
+ HiddenSelect: SelectHiddenSelect
148
+ };
149
+ // Annotate the CommonJS export names for ESM import in node:
150
+ 0 && (module.exports = {
151
+ SelectParts
152
+ });
153
+ //# sourceMappingURL=parts.cjs.map