@cerberus-design/react 0.15.0 → 0.16.0-next-feeb186
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.
- package/build/legacy/_tsup-dts-rollup.d.cts +1345 -319
- package/build/legacy/components/Accordion.cjs.map +1 -1
- package/build/legacy/components/AccordionItemGroup.cjs.map +1 -1
- package/build/legacy/components/DatePicker.client.cjs +63 -77
- package/build/legacy/components/DatePicker.client.cjs.map +1 -1
- package/build/legacy/components/FileStatus.cjs +126 -79
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/Legend.cjs +10 -22
- package/build/legacy/components/Legend.cjs.map +1 -1
- package/build/legacy/components/button/button.cjs +154 -0
- package/build/legacy/components/button/button.cjs.map +1 -0
- package/build/legacy/components/button/index.cjs +163 -0
- package/build/legacy/components/button/index.cjs.map +1 -0
- package/build/legacy/components/button/parts.cjs +159 -0
- package/build/legacy/components/button/parts.cjs.map +1 -0
- package/build/legacy/components/checkbox/checkbox-icon.cjs +121 -0
- package/build/legacy/components/checkbox/checkbox-icon.cjs.map +1 -0
- package/build/legacy/components/checkbox/checkbox.cjs +165 -0
- package/build/legacy/components/checkbox/checkbox.cjs.map +1 -0
- package/build/legacy/components/checkbox/index.cjs +179 -0
- package/build/legacy/components/checkbox/index.cjs.map +1 -0
- package/build/legacy/components/checkbox/parts.cjs +89 -0
- package/build/legacy/components/checkbox/parts.cjs.map +1 -0
- package/build/legacy/components/checkbox/primitives.cjs +87 -0
- package/build/legacy/components/checkbox/primitives.cjs.map +1 -0
- package/build/legacy/components/cta-dialog/context.cjs +33 -0
- package/build/legacy/components/cta-dialog/context.cjs.map +1 -0
- package/build/legacy/components/cta-dialog/index.cjs +433 -0
- package/build/legacy/components/cta-dialog/index.cjs.map +1 -0
- package/build/legacy/{context/cta-modal.cjs → components/cta-dialog/provider.cjs} +175 -128
- package/build/legacy/components/cta-dialog/provider.cjs.map +1 -0
- package/build/legacy/components/cta-dialog/trigger-item.cjs +99 -0
- package/build/legacy/components/cta-dialog/trigger-item.cjs.map +1 -0
- package/build/legacy/components/cta-dialog/utils.cjs +47 -0
- package/build/legacy/components/cta-dialog/utils.cjs.map +1 -0
- package/build/legacy/components/{FieldMessage.cjs → deprecated/FieldMessage.cjs} +4 -17
- package/build/legacy/components/deprecated/FieldMessage.cjs.map +1 -0
- package/build/legacy/components/{FieldsetLabel.cjs → deprecated/FieldsetLabel.cjs} +1 -1
- package/build/legacy/components/deprecated/FieldsetLabel.cjs.map +1 -0
- package/build/legacy/components/{Textarea.cjs → deprecated/Label.cjs} +24 -36
- package/build/legacy/components/deprecated/Label.cjs.map +1 -0
- package/build/legacy/components/{Modal.cjs → deprecated/Modal.cjs} +1 -1
- package/build/legacy/components/deprecated/Modal.cjs.map +1 -0
- package/build/legacy/components/{ModalDescription.cjs → deprecated/ModalDescription.cjs} +1 -1
- package/build/legacy/components/deprecated/ModalDescription.cjs.map +1 -0
- package/build/legacy/components/{ModalHeader.cjs → deprecated/ModalHeader.cjs} +1 -1
- package/build/legacy/components/deprecated/ModalHeader.cjs.map +1 -0
- package/build/legacy/components/{ModalHeading.cjs → deprecated/ModalHeading.cjs} +1 -1
- package/build/legacy/components/deprecated/ModalHeading.cjs.map +1 -0
- package/build/legacy/components/{NavMenuLink.cjs → deprecated/NavMenuLink.cjs} +2 -2
- package/build/legacy/components/deprecated/NavMenuLink.cjs.map +1 -0
- package/build/legacy/components/{NavMenuList.cjs → deprecated/NavMenuList.cjs} +2 -2
- package/build/legacy/components/deprecated/NavMenuList.cjs.map +1 -0
- package/build/legacy/components/{NavMenuTrigger.cjs → deprecated/NavMenuTrigger.cjs} +2 -2
- package/build/legacy/components/deprecated/NavMenuTrigger.cjs.map +1 -0
- package/build/legacy/components/field/field.cjs +130 -0
- package/build/legacy/components/field/field.cjs.map +1 -0
- package/build/legacy/components/field/index.cjs +267 -0
- package/build/legacy/components/field/index.cjs.map +1 -0
- package/build/legacy/components/field/parts.cjs +188 -0
- package/build/legacy/components/field/parts.cjs.map +1 -0
- package/build/legacy/components/field/primitives.cjs +191 -0
- package/build/legacy/components/field/primitives.cjs.map +1 -0
- package/build/legacy/components/{Button.cjs → field/start-indicator.cjs} +14 -19
- package/build/legacy/components/field/start-indicator.cjs.map +1 -0
- package/build/legacy/components/field/status-indicator.cjs +78 -0
- package/build/legacy/components/field/status-indicator.cjs.map +1 -0
- package/build/legacy/components/fieldset/fieldset.cjs +116 -0
- package/build/legacy/components/fieldset/fieldset.cjs.map +1 -0
- package/build/legacy/components/fieldset/index.cjs +126 -0
- package/build/legacy/components/fieldset/index.cjs.map +1 -0
- package/build/legacy/components/fieldset/parts.cjs +80 -0
- package/build/legacy/components/fieldset/parts.cjs.map +1 -0
- package/build/legacy/components/fieldset/primitives.cjs +76 -0
- package/build/legacy/components/fieldset/primitives.cjs.map +1 -0
- package/build/legacy/components/for.cjs +37 -0
- package/build/legacy/components/for.cjs.map +1 -0
- package/build/legacy/components/radio/index.cjs +143 -0
- package/build/legacy/components/radio/index.cjs.map +1 -0
- package/build/legacy/components/radio/parts.cjs +113 -0
- package/build/legacy/components/radio/parts.cjs.map +1 -0
- package/build/legacy/components/radio/primitives.cjs +115 -0
- package/build/legacy/components/radio/primitives.cjs.map +1 -0
- package/build/legacy/components/radio/radio.cjs +82 -0
- package/build/legacy/components/radio/radio.cjs.map +1 -0
- package/build/legacy/components/select/index.cjs +265 -0
- package/build/legacy/components/select/index.cjs.map +1 -0
- package/build/legacy/components/select/option-group.cjs +60 -0
- package/build/legacy/components/select/option-group.cjs.map +1 -0
- package/build/legacy/components/select/parts.cjs +153 -0
- package/build/legacy/components/select/parts.cjs.map +1 -0
- package/build/legacy/components/select/primitives.cjs +167 -0
- package/build/legacy/components/select/primitives.cjs.map +1 -0
- package/build/legacy/components/select/select.cjs +212 -0
- package/build/legacy/components/select/select.cjs.map +1 -0
- package/build/legacy/components/switch/index.cjs +118 -0
- package/build/legacy/components/switch/index.cjs.map +1 -0
- package/build/legacy/components/switch/parts.cjs +75 -0
- package/build/legacy/components/switch/parts.cjs.map +1 -0
- package/build/legacy/components/switch/primitives.cjs +72 -0
- package/build/legacy/components/switch/primitives.cjs.map +1 -0
- package/build/legacy/components/{Fieldset.cjs → switch/switch-indicator.cjs} +17 -32
- package/build/legacy/components/switch/switch-indicator.cjs.map +1 -0
- package/build/legacy/components/switch/switch.cjs +106 -0
- package/build/legacy/components/switch/switch.cjs.map +1 -0
- package/build/legacy/components/toggle/index.cjs +45 -0
- package/build/legacy/components/toggle/index.cjs.map +1 -0
- package/build/legacy/components/toggle/parts.cjs +41 -0
- package/build/legacy/components/toggle/parts.cjs.map +1 -0
- package/build/legacy/components/toggle/primitives.cjs +35 -0
- package/build/legacy/components/toggle/primitives.cjs.map +1 -0
- package/build/legacy/config/types.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs +55 -45
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/field.cjs +23 -4
- package/build/legacy/context/field.cjs.map +1 -1
- package/build/legacy/context/notification-center.cjs +24 -16
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs +206 -194
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/hooks/useDate.cjs.map +1 -1
- package/build/legacy/hooks/useRootColors.cjs +0 -1
- package/build/legacy/hooks/useRootColors.cjs.map +1 -1
- package/build/legacy/hooks/useToggle.cjs.map +1 -1
- package/build/legacy/index.cjs +2023 -1466
- package/build/legacy/index.cjs.map +1 -1
- package/build/legacy/utils/index.cjs +22 -2
- package/build/legacy/utils/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +1345 -319
- package/build/modern/{chunk-PM7CWT3N.js → chunk-245SMQ45.js} +2 -2
- package/build/modern/chunk-245SMQ45.js.map +1 -0
- package/build/modern/chunk-2BIHLH4V.js +15 -0
- package/build/modern/chunk-2BIHLH4V.js.map +1 -0
- package/build/modern/chunk-2CVGNLIM.js +15 -0
- package/build/modern/chunk-2CVGNLIM.js.map +1 -0
- package/build/modern/{chunk-ISCJ542I.js → chunk-2HOUQ2DX.js} +2 -2
- package/build/modern/chunk-2LF3HPNA.js +1 -0
- package/build/modern/chunk-4LSTU6WU.js +8 -0
- package/build/modern/chunk-4LSTU6WU.js.map +1 -0
- package/build/modern/chunk-5RTNSVYU.js +88 -0
- package/build/modern/chunk-5RTNSVYU.js.map +1 -0
- package/build/modern/chunk-6I2FW4WI.js +33 -0
- package/build/modern/chunk-6I2FW4WI.js.map +1 -0
- package/build/modern/chunk-6ICNCCPD.js +47 -0
- package/build/modern/chunk-6ICNCCPD.js.map +1 -0
- package/build/modern/chunk-6KZVE4HC.js +52 -0
- package/build/modern/chunk-6KZVE4HC.js.map +1 -0
- package/build/modern/{chunk-25HMVHLT.js → chunk-7SU6FCTJ.js} +5 -5
- package/build/modern/chunk-7TQRTBUP.js +19 -0
- package/build/modern/chunk-7TQRTBUP.js.map +1 -0
- package/build/modern/{chunk-UZVQ4INR.js → chunk-AIJ75ENY.js} +2 -2
- package/build/modern/chunk-AIJ75ENY.js.map +1 -0
- package/build/modern/chunk-AO3GB72J.js +27 -0
- package/build/modern/chunk-AO3GB72J.js.map +1 -0
- package/build/modern/{chunk-NUMM4TNC.js → chunk-AUALRL3U.js} +2 -2
- package/build/modern/chunk-AUALRL3U.js.map +1 -0
- package/build/modern/{chunk-IGHMP4WA.js → chunk-AZRFYQO7.js} +1 -1
- package/build/modern/chunk-AZRFYQO7.js.map +1 -0
- package/build/modern/chunk-BL7G3577.js +29 -0
- package/build/modern/chunk-BL7G3577.js.map +1 -0
- package/build/modern/chunk-BPRF34DU.js +62 -0
- package/build/modern/chunk-BPRF34DU.js.map +1 -0
- package/build/modern/chunk-CAZ3EICD.js +16 -0
- package/build/modern/chunk-CAZ3EICD.js.map +1 -0
- package/build/modern/chunk-CIMY2U22.js +10 -0
- package/build/modern/chunk-CIMY2U22.js.map +1 -0
- package/build/modern/chunk-CNA2VKAH.js +43 -0
- package/build/modern/chunk-CNA2VKAH.js.map +1 -0
- package/build/modern/chunk-CYC2YUKU.js +1 -0
- package/build/modern/{chunk-PZAZKQMO.js → chunk-DRDNNRU3.js} +2 -2
- package/build/modern/chunk-DRDNNRU3.js.map +1 -0
- package/build/modern/{chunk-NJSETNRL.js → chunk-DXBZ3HMY.js} +2 -2
- package/build/modern/chunk-DXOKSZVQ.js +12 -0
- package/build/modern/chunk-DXOKSZVQ.js.map +1 -0
- package/build/modern/chunk-EL4MX2PG.js +22 -0
- package/build/modern/chunk-EL4MX2PG.js.map +1 -0
- package/build/modern/chunk-FBS7AX76.js +37 -0
- package/build/modern/chunk-FBS7AX76.js.map +1 -0
- package/build/modern/chunk-FUL2VRDU.js +25 -0
- package/build/modern/chunk-FUL2VRDU.js.map +1 -0
- package/build/modern/{chunk-BHB56M7S.js → chunk-H54FR7IP.js} +6 -6
- package/build/modern/chunk-H54FR7IP.js.map +1 -0
- package/build/modern/chunk-IASVL7CW.js +19 -0
- package/build/modern/chunk-IASVL7CW.js.map +1 -0
- package/build/modern/{chunk-REO5GUNC.js → chunk-ICTISECN.js} +1 -1
- package/build/modern/chunk-ICTISECN.js.map +1 -0
- package/build/modern/chunk-IDTAB2UJ.js +1 -0
- package/build/modern/chunk-IKDXADLX.js +1 -0
- package/build/modern/chunk-KQQPZJEI.js +21 -0
- package/build/modern/chunk-KQQPZJEI.js.map +1 -0
- package/build/modern/chunk-KWZ3CEG6.js +23 -0
- package/build/modern/chunk-KWZ3CEG6.js.map +1 -0
- package/build/modern/{chunk-JWIJHSI6.js → chunk-L7N24B6B.js} +3 -6
- package/build/modern/chunk-L7N24B6B.js.map +1 -0
- package/build/modern/chunk-LT62577B.js +23 -0
- package/build/modern/chunk-LT62577B.js.map +1 -0
- package/build/modern/chunk-LZWNHXRP.js +48 -0
- package/build/modern/chunk-LZWNHXRP.js.map +1 -0
- package/build/modern/{chunk-EDARV2EI.js → chunk-MISIUX63.js} +4 -4
- package/build/modern/chunk-MVO2GNUA.js +47 -0
- package/build/modern/chunk-MVO2GNUA.js.map +1 -0
- package/build/modern/{chunk-3BM6MZ4A.js → chunk-MWRO5QYD.js} +1 -1
- package/build/modern/chunk-MWRO5QYD.js.map +1 -0
- package/build/modern/{chunk-SD3OVTHT.js → chunk-O542MPR7.js} +40 -43
- package/build/modern/chunk-O542MPR7.js.map +1 -0
- package/build/modern/chunk-OGYMMATX.js +1 -0
- package/build/modern/chunk-OVHCXBBI.js +22 -0
- package/build/modern/chunk-OVHCXBBI.js.map +1 -0
- package/build/modern/chunk-PLHYOCY3.js +23 -0
- package/build/modern/chunk-PLHYOCY3.js.map +1 -0
- package/build/modern/{chunk-JIRW4XOJ.js → chunk-Q3I4H6EC.js} +2 -2
- package/build/modern/chunk-Q3I4H6EC.js.map +1 -0
- package/build/modern/chunk-QCBLRACK.js +133 -0
- package/build/modern/chunk-QCBLRACK.js.map +1 -0
- package/build/modern/{chunk-FGCO27TC.js → chunk-QEM3M4N3.js} +25 -34
- package/build/modern/chunk-QEM3M4N3.js.map +1 -0
- package/build/modern/{chunk-ILQW5VZT.js → chunk-RBNOEAWJ.js} +4 -7
- package/build/modern/chunk-RBNOEAWJ.js.map +1 -0
- package/build/modern/{chunk-YKKNWILF.js → chunk-RHCTPSKT.js} +2 -15
- package/build/modern/chunk-RHCTPSKT.js.map +1 -0
- package/build/modern/chunk-STLN7BMJ.js +22 -0
- package/build/modern/chunk-STLN7BMJ.js.map +1 -0
- package/build/modern/{chunk-7NN3SJ7W.js → chunk-SWX5JWZR.js} +2 -2
- package/build/modern/chunk-SWX5JWZR.js.map +1 -0
- package/build/modern/{chunk-GCQMH4QA.js → chunk-SXLPDPOZ.js} +4 -4
- package/build/modern/chunk-TIJAFPHQ.js +1 -0
- package/build/modern/chunk-TYPULJMJ.js +1 -0
- package/build/modern/chunk-UDY6USHW.js +1 -0
- package/build/modern/chunk-V4YYGGMH.js +1 -0
- package/build/modern/chunk-VSTOSLFS.js +100 -0
- package/build/modern/chunk-VSTOSLFS.js.map +1 -0
- package/build/modern/{chunk-ZL6ZITLA.js → chunk-WECB67DC.js} +2 -2
- package/build/modern/chunk-WECB67DC.js.map +1 -0
- package/build/modern/{chunk-BAWZBF5Q.js → chunk-WN7TJX6J.js} +2 -2
- package/build/modern/{chunk-RMVJK26W.js → chunk-XJQXHSH7.js} +1 -2
- package/build/modern/chunk-XJQXHSH7.js.map +1 -0
- package/build/modern/chunk-XTNGF4D6.js +41 -0
- package/build/modern/chunk-XTNGF4D6.js.map +1 -0
- package/build/modern/chunk-Y4ZEJ2EF.js +31 -0
- package/build/modern/chunk-Y4ZEJ2EF.js.map +1 -0
- package/build/modern/{chunk-WPVDQRRF.js → chunk-YOTXFCCC.js} +2 -2
- package/build/modern/chunk-YOTXFCCC.js.map +1 -0
- package/build/modern/chunk-Z3FDG263.js +53 -0
- package/build/modern/chunk-Z3FDG263.js.map +1 -0
- package/build/modern/{chunk-JAROS4Q3.js → chunk-Z4342DRO.js} +10 -10
- package/build/modern/chunk-Z4342DRO.js.map +1 -0
- package/build/modern/chunk-Z52R6ABJ.js +21 -0
- package/build/modern/chunk-Z52R6ABJ.js.map +1 -0
- package/build/modern/{chunk-O6LFWUHI.js → chunk-ZFFW5ELD.js} +10 -10
- package/build/modern/chunk-ZFFW5ELD.js.map +1 -0
- package/build/modern/components/Accordion.js +1 -1
- package/build/modern/components/AccordionItemGroup.js +3 -3
- package/build/modern/components/Admonition.client.js +3 -3
- package/build/modern/components/Admonition.js +4 -4
- package/build/modern/components/Avatar.js +2 -2
- package/build/modern/components/DatePicker.client.js +4 -3
- package/build/modern/components/FileStatus.js +11 -5
- package/build/modern/components/FileUploader.js +3 -3
- package/build/modern/components/Legend.js +1 -2
- package/build/modern/components/Tag.js +2 -2
- package/build/modern/components/button/button.js +12 -0
- package/build/modern/components/button/index.js +16 -0
- package/build/modern/components/button/parts.js +10 -0
- package/build/modern/components/checkbox/checkbox-icon.js +12 -0
- package/build/modern/components/checkbox/checkbox.js +13 -0
- package/build/modern/components/checkbox/index.js +30 -0
- package/build/modern/components/checkbox/parts.js +8 -0
- package/build/modern/components/checkbox/primitives.js +17 -0
- package/build/modern/components/cta-dialog/context.js +8 -0
- package/build/modern/components/cta-dialog/index.js +26 -0
- package/build/modern/components/cta-dialog/provider.js +22 -0
- package/build/modern/components/cta-dialog/provider.js.map +1 -0
- package/build/modern/components/cta-dialog/trigger-item.js +10 -0
- package/build/modern/components/cta-dialog/trigger-item.js.map +1 -0
- package/build/modern/components/cta-dialog/utils.js +7 -0
- package/build/modern/components/cta-dialog/utils.js.map +1 -0
- package/build/modern/components/deprecated/FieldMessage.js +8 -0
- package/build/modern/components/deprecated/FieldMessage.js.map +1 -0
- package/build/modern/components/deprecated/FieldsetLabel.js +7 -0
- package/build/modern/components/deprecated/FieldsetLabel.js.map +1 -0
- package/build/modern/components/deprecated/Label.js +17 -0
- package/build/modern/components/deprecated/Label.js.map +1 -0
- package/build/modern/components/deprecated/Modal.js +7 -0
- package/build/modern/components/deprecated/Modal.js.map +1 -0
- package/build/modern/components/deprecated/ModalDescription.js +7 -0
- package/build/modern/components/deprecated/ModalDescription.js.map +1 -0
- package/build/modern/components/deprecated/ModalHeader.js +7 -0
- package/build/modern/components/deprecated/ModalHeader.js.map +1 -0
- package/build/modern/components/deprecated/ModalHeading.js +7 -0
- package/build/modern/components/deprecated/ModalHeading.js.map +1 -0
- package/build/modern/components/deprecated/NavMenuLink.js +8 -0
- package/build/modern/components/deprecated/NavMenuLink.js.map +1 -0
- package/build/modern/components/deprecated/NavMenuList.js +12 -0
- package/build/modern/components/deprecated/NavMenuList.js.map +1 -0
- package/build/modern/components/deprecated/NavMenuTrigger.js +11 -0
- package/build/modern/components/deprecated/NavMenuTrigger.js.map +1 -0
- package/build/modern/components/field/field.js +14 -0
- package/build/modern/components/field/field.js.map +1 -0
- package/build/modern/components/field/index.js +44 -0
- package/build/modern/components/field/index.js.map +1 -0
- package/build/modern/components/field/parts.js +11 -0
- package/build/modern/components/field/parts.js.map +1 -0
- package/build/modern/components/field/primitives.js +26 -0
- package/build/modern/components/field/primitives.js.map +1 -0
- package/build/modern/components/field/start-indicator.js +7 -0
- package/build/modern/components/field/start-indicator.js.map +1 -0
- package/build/modern/components/field/status-indicator.js +9 -0
- package/build/modern/components/field/status-indicator.js.map +1 -0
- package/build/modern/components/fieldset/fieldset.js +11 -0
- package/build/modern/components/fieldset/fieldset.js.map +1 -0
- package/build/modern/components/fieldset/index.js +24 -0
- package/build/modern/components/fieldset/index.js.map +1 -0
- package/build/modern/components/fieldset/parts.js +8 -0
- package/build/modern/components/fieldset/parts.js.map +1 -0
- package/build/modern/components/fieldset/primitives.js +13 -0
- package/build/modern/components/fieldset/primitives.js.map +1 -0
- package/build/modern/components/for.js +7 -0
- package/build/modern/components/for.js.map +1 -0
- package/build/modern/components/radio/index.js +30 -0
- package/build/modern/components/radio/index.js.map +1 -0
- package/build/modern/components/radio/parts.js +8 -0
- package/build/modern/components/radio/parts.js.map +1 -0
- package/build/modern/components/radio/primitives.js +21 -0
- package/build/modern/components/radio/primitives.js.map +1 -0
- package/build/modern/components/radio/radio.js +8 -0
- package/build/modern/components/radio/radio.js.map +1 -0
- package/build/modern/components/select/index.js +57 -0
- package/build/modern/components/select/index.js.map +1 -0
- package/build/modern/components/select/option-group.js +10 -0
- package/build/modern/components/select/option-group.js.map +1 -0
- package/build/modern/components/select/parts.js +8 -0
- package/build/modern/components/select/parts.js.map +1 -0
- package/build/modern/components/select/primitives.js +37 -0
- package/build/modern/components/select/primitives.js.map +1 -0
- package/build/modern/components/select/select.js +15 -0
- package/build/modern/components/select/select.js.map +1 -0
- package/build/modern/components/switch/index.js +26 -0
- package/build/modern/components/switch/index.js.map +1 -0
- package/build/modern/components/switch/parts.js +8 -0
- package/build/modern/components/switch/parts.js.map +1 -0
- package/build/modern/components/switch/primitives.js +15 -0
- package/build/modern/components/switch/primitives.js.map +1 -0
- package/build/modern/components/switch/switch-indicator.js +9 -0
- package/build/modern/components/switch/switch-indicator.js.map +1 -0
- package/build/modern/components/switch/switch.js +11 -0
- package/build/modern/components/switch/switch.js.map +1 -0
- package/build/modern/components/toggle/index.js +14 -0
- package/build/modern/components/toggle/index.js.map +1 -0
- package/build/modern/components/toggle/parts.js +8 -0
- package/build/modern/components/toggle/parts.js.map +1 -0
- package/build/modern/components/toggle/primitives.js +9 -0
- package/build/modern/components/toggle/primitives.js.map +1 -0
- package/build/modern/context/confirm-modal.js +5 -4
- package/build/modern/context/field.js +34 -4
- package/build/modern/context/field.js.map +1 -1
- package/build/modern/context/notification-center.js +5 -4
- package/build/modern/context/prompt-modal.js +13 -7
- package/build/modern/hooks/useDate.js +1 -1
- package/build/modern/hooks/useRootColors.js +1 -1
- package/build/modern/hooks/useToggle.js +1 -1
- package/build/modern/index.js +304 -129
- package/build/modern/index.js.map +1 -1
- package/build/modern/utils/index.js +5 -3
- package/package.json +2 -2
- package/src/components/Accordion.tsx +1 -0
- package/src/components/DatePicker.client.tsx +3 -15
- package/src/components/FileStatus.tsx +4 -5
- package/src/components/Legend.tsx +5 -6
- package/src/components/button/button.tsx +77 -0
- package/src/components/button/index.ts +2 -0
- package/src/components/button/parts.ts +32 -0
- package/src/components/checkbox/checkbox-icon.tsx +39 -0
- package/src/components/checkbox/checkbox.tsx +42 -0
- package/src/components/checkbox/index.ts +3 -0
- package/src/components/checkbox/parts.ts +59 -0
- package/src/components/checkbox/primitives.tsx +104 -0
- package/src/components/cta-dialog/context.tsx +34 -0
- package/src/components/cta-dialog/index.ts +2 -0
- package/src/{context/cta-modal.tsx → components/cta-dialog/provider.tsx} +34 -68
- package/src/components/cta-dialog/trigger-item.tsx +53 -0
- package/src/components/cta-dialog/utils.ts +57 -0
- package/src/components/{FieldMessage.tsx → deprecated/FieldMessage.tsx} +2 -13
- package/src/components/deprecated/FieldsetLabel.tsx +32 -0
- package/src/components/deprecated/Label.tsx +24 -0
- package/src/components/{NavMenuLink.tsx → deprecated/NavMenuLink.tsx} +1 -1
- package/src/components/{NavMenuList.tsx → deprecated/NavMenuList.tsx} +3 -3
- package/src/components/{NavMenuTrigger.tsx → deprecated/NavMenuTrigger.tsx} +4 -4
- package/src/components/field/field.tsx +77 -0
- package/src/components/field/index.ts +5 -0
- package/src/components/field/parts.ts +77 -0
- package/src/components/field/primitives.tsx +204 -0
- package/src/components/field/start-indicator.tsx +23 -0
- package/src/components/field/status-indicator.tsx +58 -0
- package/src/components/fieldset/fieldset.tsx +55 -0
- package/src/components/fieldset/index.ts +3 -0
- package/src/components/fieldset/parts.ts +47 -0
- package/src/components/fieldset/primitives.tsx +79 -0
- package/src/components/for.tsx +38 -0
- package/src/components/radio/index.ts +3 -0
- package/src/components/radio/parts.ts +65 -0
- package/src/components/radio/primitives.tsx +123 -0
- package/src/components/radio/radio.tsx +35 -0
- package/src/components/select/index.ts +4 -0
- package/src/components/select/option-group.tsx +34 -0
- package/src/components/select/parts.ts +113 -0
- package/src/components/select/primitives.tsx +205 -0
- package/src/components/select/select.tsx +135 -0
- package/src/components/switch/index.ts +3 -0
- package/src/components/switch/parts.ts +53 -0
- package/src/components/switch/primitives.tsx +69 -0
- package/src/components/switch/switch-indicator.tsx +9 -0
- package/src/components/switch/switch.tsx +30 -0
- package/src/components/toggle/index.ts +2 -0
- package/src/components/toggle/parts.ts +32 -0
- package/src/components/toggle/primitives.tsx +17 -0
- package/src/config/types.ts +1 -0
- package/src/context/confirm-modal.tsx +1 -1
- package/src/context/field.tsx +6 -5
- package/src/context/notification-center.tsx +1 -1
- package/src/context/prompt-modal.tsx +16 -18
- package/src/hooks/useDate.ts +1 -7
- package/src/hooks/useRootColors.ts +0 -1
- package/src/hooks/useToggle.ts +1 -3
- package/src/index.ts +24 -24
- package/src/utils/index.ts +30 -0
- package/build/legacy/components/Button.cjs.map +0 -1
- package/build/legacy/components/Checkbox.cjs +0 -113
- package/build/legacy/components/Checkbox.cjs.map +0 -1
- package/build/legacy/components/FieldMessage.cjs.map +0 -1
- package/build/legacy/components/Fieldset.cjs.map +0 -1
- package/build/legacy/components/FieldsetLabel.cjs.map +0 -1
- package/build/legacy/components/Input.cjs +0 -95
- package/build/legacy/components/Input.cjs.map +0 -1
- package/build/legacy/components/Label.cjs +0 -93
- package/build/legacy/components/Label.cjs.map +0 -1
- package/build/legacy/components/Modal.cjs.map +0 -1
- package/build/legacy/components/ModalDescription.cjs.map +0 -1
- package/build/legacy/components/ModalHeader.cjs.map +0 -1
- package/build/legacy/components/ModalHeading.cjs.map +0 -1
- package/build/legacy/components/NavMenuLink.cjs.map +0 -1
- package/build/legacy/components/NavMenuList.cjs.map +0 -1
- package/build/legacy/components/NavMenuTrigger.cjs.map +0 -1
- package/build/legacy/components/Radio.cjs +0 -81
- package/build/legacy/components/Radio.cjs.map +0 -1
- package/build/legacy/components/Select.cjs +0 -120
- package/build/legacy/components/Select.cjs.map +0 -1
- package/build/legacy/components/Textarea.cjs.map +0 -1
- package/build/legacy/components/Toggle.cjs +0 -101
- package/build/legacy/components/Toggle.cjs.map +0 -1
- package/build/legacy/context/cta-modal.cjs.map +0 -1
- package/build/modern/chunk-3BM6MZ4A.js.map +0 -1
- package/build/modern/chunk-3ZDFQO25.js +0 -31
- package/build/modern/chunk-3ZDFQO25.js.map +0 -1
- package/build/modern/chunk-7NN3SJ7W.js.map +0 -1
- package/build/modern/chunk-BHB56M7S.js.map +0 -1
- package/build/modern/chunk-C5EHJUS5.js +0 -10
- package/build/modern/chunk-C5EHJUS5.js.map +0 -1
- package/build/modern/chunk-EXGKZGML.js +0 -28
- package/build/modern/chunk-EXGKZGML.js.map +0 -1
- package/build/modern/chunk-FGCO27TC.js.map +0 -1
- package/build/modern/chunk-FTPZHG6J.js +0 -46
- package/build/modern/chunk-FTPZHG6J.js.map +0 -1
- package/build/modern/chunk-IGHMP4WA.js.map +0 -1
- package/build/modern/chunk-ILQW5VZT.js.map +0 -1
- package/build/modern/chunk-JAROS4Q3.js.map +0 -1
- package/build/modern/chunk-JIJM6JFJ.js +0 -36
- package/build/modern/chunk-JIJM6JFJ.js.map +0 -1
- package/build/modern/chunk-JIRW4XOJ.js.map +0 -1
- package/build/modern/chunk-JWIJHSI6.js.map +0 -1
- package/build/modern/chunk-KKHL3ZO4.js +0 -69
- package/build/modern/chunk-KKHL3ZO4.js.map +0 -1
- package/build/modern/chunk-MZ3UCDUL.js +0 -43
- package/build/modern/chunk-MZ3UCDUL.js.map +0 -1
- package/build/modern/chunk-N24COMHJ.js +0 -63
- package/build/modern/chunk-N24COMHJ.js.map +0 -1
- package/build/modern/chunk-NMF2HYWO.js +0 -50
- package/build/modern/chunk-NMF2HYWO.js.map +0 -1
- package/build/modern/chunk-NUMM4TNC.js.map +0 -1
- package/build/modern/chunk-O6LFWUHI.js.map +0 -1
- package/build/modern/chunk-PM7CWT3N.js.map +0 -1
- package/build/modern/chunk-PZAZKQMO.js.map +0 -1
- package/build/modern/chunk-REO5GUNC.js.map +0 -1
- package/build/modern/chunk-RMVJK26W.js.map +0 -1
- package/build/modern/chunk-SD3OVTHT.js.map +0 -1
- package/build/modern/chunk-UZDVOIW5.js +0 -33
- package/build/modern/chunk-UZDVOIW5.js.map +0 -1
- package/build/modern/chunk-UZVQ4INR.js.map +0 -1
- package/build/modern/chunk-WPVDQRRF.js.map +0 -1
- package/build/modern/chunk-XQICKZH4.js +0 -59
- package/build/modern/chunk-XQICKZH4.js.map +0 -1
- package/build/modern/chunk-YKKNWILF.js.map +0 -1
- package/build/modern/chunk-ZL6ZITLA.js.map +0 -1
- package/build/modern/components/Button.js +0 -7
- package/build/modern/components/Checkbox.js +0 -11
- package/build/modern/components/FieldMessage.js +0 -9
- package/build/modern/components/Fieldset.js +0 -9
- package/build/modern/components/FieldsetLabel.js +0 -7
- package/build/modern/components/Input.js +0 -11
- package/build/modern/components/Label.js +0 -10
- package/build/modern/components/Modal.js +0 -7
- package/build/modern/components/ModalDescription.js +0 -7
- package/build/modern/components/ModalHeader.js +0 -7
- package/build/modern/components/ModalHeading.js +0 -7
- package/build/modern/components/NavMenuLink.js +0 -8
- package/build/modern/components/NavMenuList.js +0 -12
- package/build/modern/components/NavMenuTrigger.js +0 -11
- package/build/modern/components/Radio.js +0 -9
- package/build/modern/components/Select.js +0 -13
- package/build/modern/components/Textarea.js +0 -9
- package/build/modern/components/Toggle.js +0 -10
- package/build/modern/context/cta-modal.js +0 -18
- package/src/components/Button.tsx +0 -35
- package/src/components/Checkbox.tsx +0 -93
- package/src/components/Fieldset.tsx +0 -65
- package/src/components/FieldsetLabel.tsx +0 -59
- package/src/components/Input.tsx +0 -69
- package/src/components/Label.tsx +0 -69
- package/src/components/Radio.tsx +0 -73
- package/src/components/Select.tsx +0 -108
- package/src/components/Textarea.tsx +0 -52
- package/src/components/Toggle.tsx +0 -91
- /package/build/modern/{chunk-ISCJ542I.js.map → chunk-2HOUQ2DX.js.map} +0 -0
- /package/build/modern/{components/Button.js.map → chunk-2LF3HPNA.js.map} +0 -0
- /package/build/modern/{chunk-25HMVHLT.js.map → chunk-7SU6FCTJ.js.map} +0 -0
- /package/build/modern/{components/Checkbox.js.map → chunk-CYC2YUKU.js.map} +0 -0
- /package/build/modern/{chunk-NJSETNRL.js.map → chunk-DXBZ3HMY.js.map} +0 -0
- /package/build/modern/{components/FieldMessage.js.map → chunk-IDTAB2UJ.js.map} +0 -0
- /package/build/modern/{components/Fieldset.js.map → chunk-IKDXADLX.js.map} +0 -0
- /package/build/modern/{chunk-EDARV2EI.js.map → chunk-MISIUX63.js.map} +0 -0
- /package/build/modern/{components/FieldsetLabel.js.map → chunk-OGYMMATX.js.map} +0 -0
- /package/build/modern/{chunk-GCQMH4QA.js.map → chunk-SXLPDPOZ.js.map} +0 -0
- /package/build/modern/{components/Input.js.map → chunk-TIJAFPHQ.js.map} +0 -0
- /package/build/modern/{components/Label.js.map → chunk-TYPULJMJ.js.map} +0 -0
- /package/build/modern/{components/Modal.js.map → chunk-UDY6USHW.js.map} +0 -0
- /package/build/modern/{components/ModalDescription.js.map → chunk-V4YYGGMH.js.map} +0 -0
- /package/build/modern/{chunk-BAWZBF5Q.js.map → chunk-WN7TJX6J.js.map} +0 -0
- /package/build/modern/components/{ModalHeader.js.map → button/button.js.map} +0 -0
- /package/build/modern/components/{ModalHeading.js.map → button/index.js.map} +0 -0
- /package/build/modern/components/{NavMenuLink.js.map → button/parts.js.map} +0 -0
- /package/build/modern/components/{NavMenuList.js.map → checkbox/checkbox-icon.js.map} +0 -0
- /package/build/modern/components/{NavMenuTrigger.js.map → checkbox/checkbox.js.map} +0 -0
- /package/build/modern/components/{Radio.js.map → checkbox/index.js.map} +0 -0
- /package/build/modern/components/{Select.js.map → checkbox/parts.js.map} +0 -0
- /package/build/modern/components/{Textarea.js.map → checkbox/primitives.js.map} +0 -0
- /package/build/modern/components/{Toggle.js.map → cta-dialog/context.js.map} +0 -0
- /package/build/modern/{context/cta-modal.js.map → components/cta-dialog/index.js.map} +0 -0
- /package/src/components/{Modal.tsx → deprecated/Modal.tsx} +0 -0
- /package/src/components/{ModalDescription.tsx → deprecated/ModalDescription.tsx} +0 -0
- /package/src/components/{ModalHeader.tsx → deprecated/ModalHeader.tsx} +0 -0
- /package/src/components/{ModalHeading.tsx → deprecated/ModalHeading.tsx} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Accordion.tsx"],"sourcesContent":["import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\n\nexport type AccordionProps = ArkAccordion.RootProps & AccordionVariantProps\n\n/**\n * The context provider for the Accordion family.\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Item 1 heading\" value=\"one\">\n * This is the content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function Accordion(props: AccordionProps) {\n const { size, className, ...rootProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Root\n collapsible\n className={cx(className, styles.root)}\n {...rootProps}\n />\n )\n}\n\ntype AccordionItemProps = ArkAccordion.ItemProps & AccordionVariantProps\n\n/**\n * The item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItem(props: AccordionItemProps) {\n const { size, ...itemProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Item\n {...itemProps}\n className={cx(itemProps.className, styles.item)}\n />\n )\n}\n\nexport type AccordionItemTriggerProps = ArkAccordion.ItemTriggerProps &\n AccordionVariantProps\n\n/**\n * The trigger for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItemTrigger(props: AccordionItemTriggerProps) {\n const { size, ...triggerProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemTrigger\n {...triggerProps}\n className={cx(triggerProps.className, styles.itemTrigger)}\n />\n )\n}\n\nexport type AccordionItemContentProps = ArkAccordion.ItemContentProps &\n AccordionVariantProps\n\n/**\n * The content for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemContent(props: AccordionItemContentProps) {\n const { size, ...contentProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemContent\n {...contentProps}\n className={cx(contentProps.className, styles.itemContent)}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAC1C,iBAAmB;AACnB,qBAGO;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Accordion.tsx"],"sourcesContent":["import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\n\nexport type AccordionProps = ArkAccordion.RootProps & AccordionVariantProps\n\n/**\n * The context provider for the Accordion family.\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Item 1 heading\" value=\"one\">\n * This is the content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function Accordion(props: AccordionProps) {\n const { size, className, ...rootProps } = props\n const styles = accordion({ size })\n\n return (\n <ArkAccordion.Root\n collapsible\n className={cx(className, styles.root)}\n {...rootProps}\n />\n )\n}\n\ntype AccordionItemProps = ArkAccordion.ItemProps & AccordionVariantProps\n\n/**\n * The item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItem(props: AccordionItemProps) {\n const { size, ...itemProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Item\n {...itemProps}\n className={cx(itemProps.className, styles.item)}\n />\n )\n}\n\nexport type AccordionItemTriggerProps = ArkAccordion.ItemTriggerProps &\n AccordionVariantProps\n\n/**\n * The trigger for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItemTrigger(props: AccordionItemTriggerProps) {\n const { size, ...triggerProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemTrigger\n {...triggerProps}\n className={cx(triggerProps.className, styles.itemTrigger)}\n />\n )\n}\n\nexport type AccordionItemContentProps = ArkAccordion.ItemContentProps &\n AccordionVariantProps\n\n/**\n * The content for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemContent(props: AccordionItemContentProps) {\n const { size, ...contentProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemContent\n {...contentProps}\n className={cx(contentProps.className, styles.itemContent)}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAC1C,iBAAmB;AACnB,qBAGO;AAqBH;AALG,SAAS,UAAU,OAAuB;AAC/C,QAAM,EAAE,MAAM,WAAW,GAAG,UAAU,IAAI;AAC1C,QAAM,aAAS,0BAAU,EAAE,KAAK,CAAC;AAEjC,SACE;AAAA,IAAC,aAAAA,UAAa;AAAA,IAAb;AAAA,MACC,aAAW;AAAA,MACX,eAAW,eAAG,WAAW,OAAO,IAAI;AAAA,MACnC,GAAG;AAAA;AAAA,EACN;AAEJ;AAqBO,SAAS,cAAc,OAA2B;AACvD,QAAM,EAAE,MAAM,GAAG,UAAU,IAAI;AAC/B,QAAM,aAAS,0BAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAAA,UAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,UAAU,WAAW,OAAO,IAAI;AAAA;AAAA,EAChD;AAEJ;AAsBO,SAAS,qBAAqB,OAAkC;AACrE,QAAM,EAAE,MAAM,GAAG,aAAa,IAAI;AAClC,QAAM,aAAS,0BAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAAA,UAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,aAAa,WAAW,OAAO,WAAW;AAAA;AAAA,EAC1D;AAEJ;AAsBO,SAAS,qBAAqB,OAAkC;AACrE,QAAM,EAAE,MAAM,GAAG,aAAa,IAAI;AAClC,QAAM,aAAS,0BAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAAA,UAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,aAAa,WAAW,OAAO,WAAW;AAAA;AAAA,EAC1D;AAEJ;","names":["ArkAccordion"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/AccordionItemGroup.tsx","../../../src/components/Show.tsx","../../../src/components/Accordion.tsx","../../../src/components/Accordion.client.tsx","../../../src/context/cerberus.tsx"],"sourcesContent":["import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { type AccordionVariantProps } from '@cerberus/styled-system/recipes'\nimport type { PropsWithChildren } from 'react'\nimport { Show } from './Show'\nimport {\n AccordionItem,\n AccordionItemContent,\n AccordionItemTrigger,\n} from './Accordion'\nimport { css } from '@cerberus/styled-system/css'\nimport { AccordionItemIndicator } from './Accordion.client'\n\n/**\n * This module contains an abstraction of the AccordionItem components.\n * @module\n */\n\nexport interface AccordionItemGroupBaseProps extends ArkAccordion.ItemProps {\n /**\n * The heading of the accordion item to open and close the content.\n */\n heading: string\n /**\n * The position of the arrow indicator.\n */\n indicatorPosition?: 'start' | 'end'\n}\nexport type AccordionItemGroupProps = AccordionItemGroupBaseProps &\n AccordionVariantProps\n\n/**\n * A grouped item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Accordion Item 1\" value=\"one\">\n * Accordion Item 1 content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function AccordionItemGroup(\n props: PropsWithChildren<AccordionItemGroupProps>,\n) {\n const {\n size,\n heading,\n children,\n indicatorPosition = 'end',\n ...itemProps\n } = props\n const triggerStyles =\n indicatorPosition === 'start'\n ? {\n gap: 'md',\n justifyContent: 'flex-start',\n }\n : undefined\n\n return (\n <AccordionItem {...itemProps}>\n <AccordionItemTrigger className={css(triggerStyles)} size={size}>\n <Show when={indicatorPosition === 'start'}>\n <AccordionItemIndicator size={size} />\n </Show>\n\n {heading}\n\n <Show when={indicatorPosition === 'end'}>\n <AccordionItemIndicator size={size} />\n </Show>\n </AccordionItemTrigger>\n\n <AccordionItemContent size={size}>{children}</AccordionItemContent>\n </AccordionItem>\n )\n}\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 { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\n\nexport type AccordionProps = ArkAccordion.RootProps & AccordionVariantProps\n\n/**\n * The context provider for the Accordion family.\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Item 1 heading\" value=\"one\">\n * This is the content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function Accordion(props: AccordionProps) {\n const { size, className, ...rootProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Root\n collapsible\n className={cx(className, styles.root)}\n {...rootProps}\n />\n )\n}\n\ntype AccordionItemProps = ArkAccordion.ItemProps & AccordionVariantProps\n\n/**\n * The item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItem(props: AccordionItemProps) {\n const { size, ...itemProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Item\n {...itemProps}\n className={cx(itemProps.className, styles.item)}\n />\n )\n}\n\nexport type AccordionItemTriggerProps = ArkAccordion.ItemTriggerProps &\n AccordionVariantProps\n\n/**\n * The trigger for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItemTrigger(props: AccordionItemTriggerProps) {\n const { size, ...triggerProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemTrigger\n {...triggerProps}\n className={cx(triggerProps.className, styles.itemTrigger)}\n />\n )\n}\n\nexport type AccordionItemContentProps = ArkAccordion.ItemContentProps &\n AccordionVariantProps\n\n/**\n * The content for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemContent(props: AccordionItemContentProps) {\n const { size, ...contentProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemContent\n {...contentProps}\n className={cx(contentProps.className, styles.itemContent)}\n />\n )\n}\n","'use client'\n\nimport { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { useCerberusContext } from '../context/cerberus'\n\nexport type AccordionItemIndicatorProps = ArkAccordion.ItemIndicatorProps &\n AccordionVariantProps\n\n/**\n * The indicator for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemIndicator(props: AccordionItemIndicatorProps) {\n const { size, ...indicatorProps } = props\n const styles = accordion({ size })\n const iconSize = size === 'sm' ? 16 : '24'\n const { icons } = useCerberusContext()\n const ChevronDown = icons.accordionIndicator\n\n return (\n <ArkAccordion.ItemIndicator\n {...indicatorProps}\n className={cx(indicatorProps.className, styles.itemIndicator)}\n >\n <ChevronDown size={iconSize} />\n </ArkAccordion.ItemIndicator>\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,mBAAgE;AA4BzD,SAAS,KAAK,OAAgD;AACnE,QAAM,EAAE,MAAM,UAAU,SAAS,IAAI;AACrC,QAAM,gBAAY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,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;ADDM,IAAAC,sBAAA;AAZC,SAAS,uBAAuB,OAAoC;AACzE,QAAM,EAAE,MAAM,GAAG,eAAe,IAAI;AACpC,QAAM,aAAS,2BAAU,EAAE,KAAK,CAAC;AACjC,QAAM,WAAW,SAAS,OAAO,KAAK;AACtC,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,cAAc,MAAM;AAE1B,SACE;AAAA,IAAC,cAAAC,UAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,gBAAG,eAAe,WAAW,OAAO,aAAa;AAAA,MAE5D,uDAAC,eAAY,MAAM,UAAU;AAAA;AAAA,EAC/B;AAEJ;;;AHkBM,IAAAC,sBAAA;AApBC,SAAS,mBACd,OACA;AACA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,oBAAoB;AAAA,IACpB,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,gBACJ,sBAAsB,UAClB;AAAA,IACE,KAAK;AAAA,IACL,gBAAgB;AAAA,EAClB,IACA;AAEN,SACE,8CAAC,iBAAe,GAAG,WACjB;AAAA,kDAAC,wBAAqB,eAAW,iBAAI,aAAa,GAAG,MACnD;AAAA,mDAAC,QAAK,MAAM,sBAAsB,SAChC,uDAAC,0BAAuB,MAAY,GACtC;AAAA,MAEC;AAAA,MAED,6CAAC,QAAK,MAAM,sBAAsB,OAChC,uDAAC,0BAAuB,MAAY,GACtC;AAAA,OACF;AAAA,IAEA,6CAAC,wBAAqB,MAAa,UAAS;AAAA,KAC9C;AAEJ;","names":["import_react","ArkAccordion","import_css","import_react","import_css","import_recipes","import_react","import_jsx_runtime","import_jsx_runtime","ArkAccordion","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AccordionItemGroup.tsx","../../../src/components/Show.tsx","../../../src/components/Accordion.tsx","../../../src/components/Accordion.client.tsx","../../../src/context/cerberus.tsx"],"sourcesContent":["import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { type AccordionVariantProps } from '@cerberus/styled-system/recipes'\nimport type { PropsWithChildren } from 'react'\nimport { Show } from './Show'\nimport {\n AccordionItem,\n AccordionItemContent,\n AccordionItemTrigger,\n} from './Accordion'\nimport { css } from '@cerberus/styled-system/css'\nimport { AccordionItemIndicator } from './Accordion.client'\n\n/**\n * This module contains an abstraction of the AccordionItem components.\n * @module\n */\n\nexport interface AccordionItemGroupBaseProps extends ArkAccordion.ItemProps {\n /**\n * The heading of the accordion item to open and close the content.\n */\n heading: string\n /**\n * The position of the arrow indicator.\n */\n indicatorPosition?: 'start' | 'end'\n}\nexport type AccordionItemGroupProps = AccordionItemGroupBaseProps &\n AccordionVariantProps\n\n/**\n * A grouped item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Accordion Item 1\" value=\"one\">\n * Accordion Item 1 content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function AccordionItemGroup(\n props: PropsWithChildren<AccordionItemGroupProps>,\n) {\n const {\n size,\n heading,\n children,\n indicatorPosition = 'end',\n ...itemProps\n } = props\n const triggerStyles =\n indicatorPosition === 'start'\n ? {\n gap: 'md',\n justifyContent: 'flex-start',\n }\n : undefined\n\n return (\n <AccordionItem {...itemProps}>\n <AccordionItemTrigger className={css(triggerStyles)} size={size}>\n <Show when={indicatorPosition === 'start'}>\n <AccordionItemIndicator size={size} />\n </Show>\n\n {heading}\n\n <Show when={indicatorPosition === 'end'}>\n <AccordionItemIndicator size={size} />\n </Show>\n </AccordionItemTrigger>\n\n <AccordionItemContent size={size}>{children}</AccordionItemContent>\n </AccordionItem>\n )\n}\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 { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\n\nexport type AccordionProps = ArkAccordion.RootProps & AccordionVariantProps\n\n/**\n * The context provider for the Accordion family.\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Item 1 heading\" value=\"one\">\n * This is the content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function Accordion(props: AccordionProps) {\n const { size, className, ...rootProps } = props\n const styles = accordion({ size })\n\n return (\n <ArkAccordion.Root\n collapsible\n className={cx(className, styles.root)}\n {...rootProps}\n />\n )\n}\n\ntype AccordionItemProps = ArkAccordion.ItemProps & AccordionVariantProps\n\n/**\n * The item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItem(props: AccordionItemProps) {\n const { size, ...itemProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Item\n {...itemProps}\n className={cx(itemProps.className, styles.item)}\n />\n )\n}\n\nexport type AccordionItemTriggerProps = ArkAccordion.ItemTriggerProps &\n AccordionVariantProps\n\n/**\n * The trigger for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItemTrigger(props: AccordionItemTriggerProps) {\n const { size, ...triggerProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemTrigger\n {...triggerProps}\n className={cx(triggerProps.className, styles.itemTrigger)}\n />\n )\n}\n\nexport type AccordionItemContentProps = ArkAccordion.ItemContentProps &\n AccordionVariantProps\n\n/**\n * The content for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemContent(props: AccordionItemContentProps) {\n const { size, ...contentProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemContent\n {...contentProps}\n className={cx(contentProps.className, styles.itemContent)}\n />\n )\n}\n","'use client'\n\nimport { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { useCerberusContext } from '../context/cerberus'\n\nexport type AccordionItemIndicatorProps = ArkAccordion.ItemIndicatorProps &\n AccordionVariantProps\n\n/**\n * The indicator for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemIndicator(props: AccordionItemIndicatorProps) {\n const { size, ...indicatorProps } = props\n const styles = accordion({ size })\n const iconSize = size === 'sm' ? 16 : '24'\n const { icons } = useCerberusContext()\n const ChevronDown = icons.accordionIndicator\n\n return (\n <ArkAccordion.ItemIndicator\n {...indicatorProps}\n className={cx(indicatorProps.className, styles.itemIndicator)}\n >\n <ChevronDown size={iconSize} />\n </ArkAccordion.ItemIndicator>\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,mBAAg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,sBAAkB,6BAA2C,IAAI;AAyBhE,SAAS,qBAAqB;AACnC,QAAM,cAAU,0BAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;ADDM,IAAAC,sBAAA;AAZC,SAAS,uBAAuB,OAAoC;AACzE,QAAM,EAAE,MAAM,GAAG,eAAe,IAAI;AACpC,QAAM,aAAS,2BAAU,EAAE,KAAK,CAAC;AACjC,QAAM,WAAW,SAAS,OAAO,KAAK;AACtC,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,cAAc,MAAM;AAE1B,SACE;AAAA,IAAC,cAAAC,UAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,gBAAG,eAAe,WAAW,OAAO,aAAa;AAAA,MAE5D,uDAAC,eAAY,MAAM,UAAU;AAAA;AAAA,EAC/B;AAEJ;;;AHkBM,IAAAC,sBAAA;AApBC,SAAS,mBACd,OACA;AACA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,oBAAoB;AAAA,IACpB,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,gBACJ,sBAAsB,UAClB;AAAA,IACE,KAAK;AAAA,IACL,gBAAgB;AAAA,EAClB,IACA;AAEN,SACE,8CAAC,iBAAe,GAAG,WACjB;AAAA,kDAAC,wBAAqB,eAAW,iBAAI,aAAa,GAAG,MACnD;AAAA,mDAAC,QAAK,MAAM,sBAAsB,SAChC,uDAAC,0BAAuB,MAAY,GACtC;AAAA,MAEC;AAAA,MAED,6CAAC,QAAK,MAAM,sBAAsB,OAChC,uDAAC,0BAAuB,MAAY,GACtC;AAAA,OACF;AAAA,IAEA,6CAAC,wBAAqB,MAAa,UAAS;AAAA,KAC9C;AAEJ;","names":["import_react","ArkAccordion","import_css","import_react","import_css","import_recipes","import_react","import_jsx_runtime","import_jsx_runtime","ArkAccordion","import_jsx_runtime"]}
|
|
@@ -43,27 +43,15 @@ var Portal = import_react.Portal;
|
|
|
43
43
|
var import_recipes4 = require("@cerberus/styled-system/recipes");
|
|
44
44
|
var import_css4 = require("@cerberus/styled-system/css");
|
|
45
45
|
|
|
46
|
-
// src/context/field.tsx
|
|
47
|
-
var import_react2 = require("react");
|
|
48
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
49
|
-
var FieldContext = (0, import_react2.createContext)(null);
|
|
50
|
-
function useFieldContext() {
|
|
51
|
-
const context = (0, import_react2.useContext)(FieldContext);
|
|
52
|
-
if (!context) {
|
|
53
|
-
throw new Error("useFieldContext must be used within a Field Provider.");
|
|
54
|
-
}
|
|
55
|
-
return context;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
46
|
// src/components/DatePicker.server.tsx
|
|
59
|
-
var
|
|
47
|
+
var import_react2 = require("@ark-ui/react");
|
|
60
48
|
var import_css = require("@cerberus/styled-system/css");
|
|
61
49
|
var import_recipes = require("@cerberus/styled-system/recipes");
|
|
62
|
-
var
|
|
50
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
63
51
|
var datePickerStyles = (0, import_recipes.datePicker)();
|
|
64
52
|
function DatePickerViewControl(props) {
|
|
65
|
-
return /* @__PURE__ */ (0,
|
|
66
|
-
|
|
53
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
import_react2.DatePicker.Control,
|
|
67
55
|
{
|
|
68
56
|
...props,
|
|
69
57
|
className: (0, import_css.cx)(props.className, datePickerStyles.viewControl)
|
|
@@ -71,8 +59,8 @@ function DatePickerViewControl(props) {
|
|
|
71
59
|
);
|
|
72
60
|
}
|
|
73
61
|
function DatePickerTable(props) {
|
|
74
|
-
return /* @__PURE__ */ (0,
|
|
75
|
-
|
|
62
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
|
+
import_react2.DatePicker.Table,
|
|
76
64
|
{
|
|
77
65
|
...props,
|
|
78
66
|
className: (0, import_css.cx)(props.className, datePickerStyles.table)
|
|
@@ -80,8 +68,8 @@ function DatePickerTable(props) {
|
|
|
80
68
|
);
|
|
81
69
|
}
|
|
82
70
|
function DatePickerTableHeader(props) {
|
|
83
|
-
return /* @__PURE__ */ (0,
|
|
84
|
-
|
|
71
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
72
|
+
import_react2.DatePicker.TableHeader,
|
|
85
73
|
{
|
|
86
74
|
...props,
|
|
87
75
|
className: (0, import_css.cx)(props.className, datePickerStyles.tableHeader)
|
|
@@ -89,8 +77,8 @@ function DatePickerTableHeader(props) {
|
|
|
89
77
|
);
|
|
90
78
|
}
|
|
91
79
|
function DatePickerTableCell(props) {
|
|
92
|
-
return /* @__PURE__ */ (0,
|
|
93
|
-
|
|
80
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
|
+
import_react2.DatePicker.TableCell,
|
|
94
82
|
{
|
|
95
83
|
...props,
|
|
96
84
|
className: (0, import_css.cx)(props.className, datePickerStyles.tableCell)
|
|
@@ -98,24 +86,24 @@ function DatePickerTableCell(props) {
|
|
|
98
86
|
);
|
|
99
87
|
}
|
|
100
88
|
function DatePickerTableCellTrigger(props) {
|
|
101
|
-
return /* @__PURE__ */ (0,
|
|
102
|
-
|
|
89
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
90
|
+
import_react2.DatePicker.TableCellTrigger,
|
|
103
91
|
{
|
|
104
92
|
...props,
|
|
105
93
|
className: (0, import_css.cx)(props.className, datePickerStyles.tableCellTrigger)
|
|
106
94
|
}
|
|
107
95
|
);
|
|
108
96
|
}
|
|
109
|
-
var DatePickerView =
|
|
110
|
-
var DatePickerContext =
|
|
97
|
+
var DatePickerView = import_react2.DatePicker.View;
|
|
98
|
+
var DatePickerContext = import_react2.DatePicker.Context;
|
|
111
99
|
|
|
112
100
|
// src/components/IconButton.tsx
|
|
113
101
|
var import_css2 = require("@cerberus/styled-system/css");
|
|
114
102
|
var import_recipes2 = require("@cerberus/styled-system/recipes");
|
|
115
|
-
var
|
|
103
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
116
104
|
function IconButton(props) {
|
|
117
105
|
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
118
|
-
return /* @__PURE__ */ (0,
|
|
106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
119
107
|
"button",
|
|
120
108
|
{
|
|
121
109
|
...nativeProps,
|
|
@@ -132,31 +120,39 @@ function IconButton(props) {
|
|
|
132
120
|
);
|
|
133
121
|
}
|
|
134
122
|
|
|
135
|
-
// src/components/
|
|
123
|
+
// src/components/button/button.tsx
|
|
124
|
+
var import_react3 = require("react");
|
|
136
125
|
var import_css3 = require("@cerberus/styled-system/css");
|
|
137
126
|
var import_recipes3 = require("@cerberus/styled-system/recipes");
|
|
138
|
-
var
|
|
127
|
+
var import_jsx = require("@cerberus/styled-system/jsx");
|
|
128
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
129
|
+
var ButtonContext = (0, import_react3.createContext)({
|
|
130
|
+
pending: false
|
|
131
|
+
});
|
|
139
132
|
function Button(props) {
|
|
140
|
-
const { palette, usage, shape, ...nativeProps } = props;
|
|
141
|
-
|
|
133
|
+
const { palette, usage, shape, size, pending = false, ...nativeProps } = props;
|
|
134
|
+
const value = (0, import_react3.useMemo)(() => ({ pending }), [pending]);
|
|
135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ButtonContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
142
136
|
"button",
|
|
143
137
|
{
|
|
144
138
|
...nativeProps,
|
|
139
|
+
disabled: pending || nativeProps.disabled,
|
|
145
140
|
className: (0, import_css3.cx)(
|
|
146
141
|
nativeProps.className,
|
|
147
142
|
(0, import_recipes3.button)({
|
|
148
143
|
palette,
|
|
149
144
|
usage,
|
|
150
|
-
shape
|
|
145
|
+
shape,
|
|
146
|
+
size
|
|
151
147
|
})
|
|
152
148
|
)
|
|
153
149
|
}
|
|
154
|
-
);
|
|
150
|
+
) });
|
|
155
151
|
}
|
|
156
152
|
|
|
157
153
|
// src/context/cerberus.tsx
|
|
158
154
|
var import_react4 = require("react");
|
|
159
|
-
var
|
|
155
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
160
156
|
var CerberusContext = (0, import_react4.createContext)(null);
|
|
161
157
|
function useCerberusContext() {
|
|
162
158
|
const context = (0, import_react4.useContext)(CerberusContext);
|
|
@@ -168,15 +164,13 @@ function useCerberusContext() {
|
|
|
168
164
|
|
|
169
165
|
// src/components/DatePicker.client.tsx
|
|
170
166
|
var import_react6 = require("react");
|
|
171
|
-
var
|
|
167
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
172
168
|
var datePickerStyles2 = (0, import_recipes4.datePicker)();
|
|
173
169
|
function DatePicker(props) {
|
|
174
|
-
|
|
175
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
176
171
|
import_react5.DatePicker.Root,
|
|
177
172
|
{
|
|
178
173
|
...props,
|
|
179
|
-
...states,
|
|
180
174
|
positioning: {
|
|
181
175
|
placement: "bottom-start"
|
|
182
176
|
}
|
|
@@ -186,9 +180,9 @@ function DatePicker(props) {
|
|
|
186
180
|
function DatePickerViewControlGroup(props) {
|
|
187
181
|
const { icons } = useCerberusContext();
|
|
188
182
|
const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons;
|
|
189
|
-
return /* @__PURE__ */ (0,
|
|
190
|
-
/* @__PURE__ */ (0,
|
|
191
|
-
/* @__PURE__ */ (0,
|
|
183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(DatePickerViewControl, { ...props, children: [
|
|
184
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconButton, { ariaLabel: "Previous", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PrevIcon, {}) }) }),
|
|
185
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.ViewTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
192
186
|
Button,
|
|
193
187
|
{
|
|
194
188
|
className: (0, import_css4.css)({
|
|
@@ -198,16 +192,16 @@ function DatePickerViewControlGroup(props) {
|
|
|
198
192
|
shape: "rounded",
|
|
199
193
|
size: "sm",
|
|
200
194
|
usage: "ghost",
|
|
201
|
-
children: /* @__PURE__ */ (0,
|
|
195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.RangeText, {})
|
|
202
196
|
}
|
|
203
197
|
) }),
|
|
204
|
-
/* @__PURE__ */ (0,
|
|
198
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.NextTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconButton, { ariaLabel: "Next", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(NextIcon, {}) }) })
|
|
205
199
|
] });
|
|
206
200
|
}
|
|
207
201
|
function DatePickerTrigger(props) {
|
|
208
202
|
const { icons } = useCerberusContext();
|
|
209
203
|
const { calendar: CalendarIcon } = icons;
|
|
210
|
-
return /* @__PURE__ */ (0,
|
|
204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
211
205
|
import_react5.DatePicker.Trigger,
|
|
212
206
|
{
|
|
213
207
|
...props,
|
|
@@ -219,20 +213,17 @@ function DatePickerTrigger(props) {
|
|
|
219
213
|
}),
|
|
220
214
|
datePickerStyles2.trigger
|
|
221
215
|
),
|
|
222
|
-
children: /* @__PURE__ */ (0,
|
|
216
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CalendarIcon, {})
|
|
223
217
|
}
|
|
224
218
|
);
|
|
225
219
|
}
|
|
226
220
|
function DatePickerInput(props) {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
/* @__PURE__ */ (0,
|
|
230
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react5.DatePicker.Control, { className: datePickerStyles2.control, children: [
|
|
222
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerTrigger, {}),
|
|
223
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
231
224
|
import_react5.DatePicker.Input,
|
|
232
225
|
{
|
|
233
226
|
...props,
|
|
234
|
-
...fieldStates,
|
|
235
|
-
...invalid && { "aria-invalid": true },
|
|
236
227
|
className: (0, import_css4.cx)(props.className, datePickerStyles2.input),
|
|
237
228
|
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
238
229
|
maxLength: 11
|
|
@@ -241,18 +232,15 @@ function DatePickerInput(props) {
|
|
|
241
232
|
] });
|
|
242
233
|
}
|
|
243
234
|
function RangePickerInput(props) {
|
|
244
|
-
const { invalid, ...fieldStates } = useFieldContext();
|
|
245
235
|
const { defaultValue, ...nativeProps } = props;
|
|
246
236
|
const startDate = (0, import_react6.useMemo)(() => defaultValue == null ? void 0 : defaultValue[0], [defaultValue]);
|
|
247
237
|
const endDate = (0, import_react6.useMemo)(() => defaultValue == null ? void 0 : defaultValue[1], [defaultValue]);
|
|
248
|
-
return /* @__PURE__ */ (0,
|
|
249
|
-
/* @__PURE__ */ (0,
|
|
250
|
-
/* @__PURE__ */ (0,
|
|
238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react5.DatePicker.Control, { "data-range": true, className: datePickerStyles2.control, children: [
|
|
239
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerTrigger, {}),
|
|
240
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
251
241
|
import_react5.DatePicker.Input,
|
|
252
242
|
{
|
|
253
243
|
...nativeProps,
|
|
254
|
-
...fieldStates,
|
|
255
|
-
...invalid && { "aria-invalid": true },
|
|
256
244
|
"data-range-input": true,
|
|
257
245
|
defaultValue: startDate,
|
|
258
246
|
className: (0, import_css4.cx)(props.className, datePickerStyles2.input),
|
|
@@ -261,12 +249,10 @@ function RangePickerInput(props) {
|
|
|
261
249
|
index: 0
|
|
262
250
|
}
|
|
263
251
|
),
|
|
264
|
-
/* @__PURE__ */ (0,
|
|
252
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
265
253
|
import_react5.DatePicker.Input,
|
|
266
254
|
{
|
|
267
255
|
...nativeProps,
|
|
268
|
-
...fieldStates,
|
|
269
|
-
...invalid && { "aria-invalid": true },
|
|
270
256
|
"data-range-input": true,
|
|
271
257
|
defaultValue: endDate,
|
|
272
258
|
"data-range-end-input": true,
|
|
@@ -280,7 +266,7 @@ function RangePickerInput(props) {
|
|
|
280
266
|
}
|
|
281
267
|
function DatePickerContent(props) {
|
|
282
268
|
const { children, withModal, ...contentProps } = props;
|
|
283
|
-
return /* @__PURE__ */ (0,
|
|
269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Portal, { disabled: withModal ?? false, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.Positioner, { className: datePickerStyles2.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
284
270
|
import_react5.DatePicker.Content,
|
|
285
271
|
{
|
|
286
272
|
...contentProps,
|
|
@@ -306,11 +292,11 @@ function DatePickerDayView(props) {
|
|
|
306
292
|
if (isPastDay(date)) return "past";
|
|
307
293
|
return "future";
|
|
308
294
|
}
|
|
309
|
-
return /* @__PURE__ */ (0,
|
|
310
|
-
/* @__PURE__ */ (0,
|
|
311
|
-
/* @__PURE__ */ (0,
|
|
312
|
-
/* @__PURE__ */ (0,
|
|
313
|
-
/* @__PURE__ */ (0,
|
|
295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerView, { ...props, view: "day", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerContext, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
296
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerViewControlGroup, {}),
|
|
297
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(DatePickerTable, { children: [
|
|
298
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.TableRow, { children: datePicker3.weekDays.map((weekDay, id) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerTableHeader, { children: weekDay.narrow }, id)) }) }),
|
|
299
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.TableBody, { children: datePicker3.weeks.map((week, id) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.TableRow, { children: week.map((day, id2) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerTableCell, { value: day, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
314
300
|
DatePickerTableCellTrigger,
|
|
315
301
|
{
|
|
316
302
|
"data-date": getDayValue(day),
|
|
@@ -321,22 +307,22 @@ function DatePickerDayView(props) {
|
|
|
321
307
|
] }) }) });
|
|
322
308
|
}
|
|
323
309
|
function DatePickerMonthView(props) {
|
|
324
|
-
return /* @__PURE__ */ (0,
|
|
325
|
-
/* @__PURE__ */ (0,
|
|
326
|
-
/* @__PURE__ */ (0,
|
|
310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.View, { ...props, view: "month", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
311
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerViewControlGroup, {}),
|
|
312
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.TableBody, { children: datePicker3.getMonthsGrid({ columns: 4, format: "short" }).map((months, id) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.TableRow, { children: months.map((month, id2) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerTableCell, { value: month.value, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerTableCellTrigger, { children: month.label }) }, id2)) }, id)) }) })
|
|
327
313
|
] }) }) });
|
|
328
314
|
}
|
|
329
315
|
function DatePickerYearView(props) {
|
|
330
|
-
return /* @__PURE__ */ (0,
|
|
331
|
-
/* @__PURE__ */ (0,
|
|
332
|
-
/* @__PURE__ */ (0,
|
|
316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.View, { ...props, view: "year", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
317
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerViewControlGroup, {}),
|
|
318
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.TableBody, { children: datePicker3.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react5.DatePicker.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerTableCell, { value: year.value, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerTableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
|
|
333
319
|
] }) }) });
|
|
334
320
|
}
|
|
335
321
|
function DatePickerCalendar(props) {
|
|
336
|
-
return /* @__PURE__ */ (0,
|
|
337
|
-
/* @__PURE__ */ (0,
|
|
338
|
-
/* @__PURE__ */ (0,
|
|
339
|
-
/* @__PURE__ */ (0,
|
|
322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(DatePickerContent, { withModal: props.withModal, children: [
|
|
323
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerDayView, {}),
|
|
324
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerMonthView, {}),
|
|
325
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerYearView, {})
|
|
340
326
|
] });
|
|
341
327
|
}
|
|
342
328
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/DatePicker.client.tsx","../../../src/components/Portal.tsx","../../../src/context/field.tsx","../../../src/components/DatePicker.server.tsx","../../../src/components/IconButton.tsx","../../../src/components/Button.tsx","../../../src/context/cerberus.tsx"],"sourcesContent":["'use client'\n\nimport {\n DatePicker as ArkDP,\n type DatePickerContentProps,\n type DatePickerInputProps,\n type DatePickerRootProps,\n type DatePickerTriggerProps,\n type DatePickerViewControlProps,\n type DatePickerViewProps,\n} from '@ark-ui/react'\nimport { Portal } from './Portal'\nimport { datePicker, iconButton } from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { useFieldContext } from '../context/field'\nimport {\n DatePickerView,\n DatePickerContext,\n DatePickerTable,\n DatePickerTableHeader,\n DatePickerTableCellTrigger,\n DatePickerTableCell,\n DatePickerViewControl,\n} from './DatePicker.server'\nimport { IconButton } from './IconButton'\nimport { Button } from './Button'\nimport { useCerberusContext } from '../context/cerberus'\nimport { useMemo, type InputHTMLAttributes } from 'react'\n\n/**\n * This module contains the DatePicker client family components.\n * @module DatePicker:client\n */\n\n// We are not exposing this to the public API\nconst datePickerStyles = datePicker()\n\n/**\n * The main context provider for the DatePicker family components.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePicker(props: DatePickerRootProps) {\n const states = useFieldContext()\n\n // TODO: Remove this once the bug is fixed: https://github.com/chakra-ui/ark/issues/3112\n\n // There is a bug with the Root component that causes random date selection\n // onBlur after the first selection if the format prop is used.\n // const handleFormat = useCallback((value: DateValue) => {\n // return formatISOToMilitary(value.toString())\n // }, [])\n\n return (\n <ArkDP.Root\n {...props}\n {...states}\n positioning={{\n placement: 'bottom-start',\n }}\n />\n )\n}\n\n/**\n * An abstraction of the DatePicker control that contains the prev, view, and\n * next triggers which control the calendar output.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerViewControlGroup />\n * ```\n */\nexport function DatePickerViewControlGroup(props: DatePickerViewControlProps) {\n const { icons } = useCerberusContext()\n const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons\n return (\n <DatePickerViewControl {...props}>\n <ArkDP.PrevTrigger asChild>\n <IconButton ariaLabel=\"Previous\" size=\"sm\">\n <PrevIcon />\n </IconButton>\n </ArkDP.PrevTrigger>\n\n <ArkDP.ViewTrigger asChild>\n <Button\n className={css({\n h: '2rem',\n paddingInline: 'md',\n })}\n shape=\"rounded\"\n size=\"sm\"\n usage=\"ghost\"\n >\n <ArkDP.RangeText />\n </Button>\n </ArkDP.ViewTrigger>\n\n <ArkDP.NextTrigger asChild>\n <IconButton ariaLabel=\"Next\" size=\"sm\">\n <NextIcon />\n </IconButton>\n </ArkDP.NextTrigger>\n </DatePickerViewControl>\n )\n}\n\n/**\n * The trigger component for the DatePicker which opens the calendar.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTrigger />\n * ```\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const { icons } = useCerberusContext()\n const { calendar: CalendarIcon } = icons\n return (\n <ArkDP.Trigger\n {...props}\n className={cx(\n props.className,\n iconButton({\n size: 'sm',\n usage: 'ghost',\n }),\n datePickerStyles.trigger,\n )}\n >\n <CalendarIcon />\n </ArkDP.Trigger>\n )\n}\n\n/**\n * The input component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerInput(props: DatePickerInputProps) {\n const { invalid, ...fieldStates } = useFieldContext()\n return (\n <ArkDP.Control className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...props}\n {...fieldStates}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n />\n </ArkDP.Control>\n )\n}\n\nexport interface RangePickerInputProps\n extends Omit<DatePickerInputProps, 'defaultValue'> {\n /**\n * The defaultValue to add for the inputs. The first item is the start date\n * and the second item is the end date.\n */\n defaultValue?: [\n InputHTMLAttributes<HTMLInputElement>['defaultValue'],\n InputHTMLAttributes<HTMLInputElement>['defaultValue'],\n ]\n}\n\n/**\n * The input component for the DatePicker that uses ranges.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\" selection=\"range\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <RangePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function RangePickerInput(props: RangePickerInputProps) {\n const { invalid, ...fieldStates } = useFieldContext()\n const { defaultValue, ...nativeProps } = props\n\n const startDate = useMemo(() => defaultValue?.[0], [defaultValue])\n const endDate = useMemo(() => defaultValue?.[1], [defaultValue])\n\n return (\n <ArkDP.Control data-range className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...nativeProps}\n {...fieldStates}\n {...(invalid && { 'aria-invalid': true })}\n data-range-input\n defaultValue={startDate}\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={0}\n />\n <ArkDP.Input\n {...nativeProps}\n {...fieldStates}\n {...(invalid && { 'aria-invalid': true })}\n data-range-input\n defaultValue={endDate}\n data-range-end-input\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={1}\n />\n </ArkDP.Control>\n )\n}\n\n/**\n * The content component for the DatePicker which contains the calendar.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerContent(\n props: DatePickerContentProps & {\n withModal?: boolean\n },\n) {\n const { children, withModal, ...contentProps } = props\n return (\n <Portal disabled={withModal ?? false}>\n <ArkDP.Positioner className={datePickerStyles.positioner}>\n <ArkDP.Content\n {...contentProps}\n className={cx(contentProps.className, datePickerStyles.content)}\n >\n {children}\n </ArkDP.Content>\n </ArkDP.Positioner>\n </Portal>\n )\n}\n\n/**\n * The day view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerDayView(props: Omit<DatePickerViewProps, 'view'>) {\n function isToday(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const formatted = today.toISOString().split('T')[0]\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return formatted === arkDate\n }\n\n function isPastDay(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return new Date(arkDate) < today\n }\n\n function getDayValue(date: ArkDP.DateValue): 'today' | 'past' | 'future' {\n if (isToday(date)) return 'today'\n if (isPastDay(date)) return 'past'\n return 'future'\n }\n\n return (\n <DatePickerView {...props} view=\"day\">\n <DatePickerContext>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableHead>\n <ArkDP.TableRow>\n {datePicker.weekDays.map((weekDay, id) => (\n <DatePickerTableHeader key={id}>\n {weekDay.narrow}\n </DatePickerTableHeader>\n ))}\n </ArkDP.TableRow>\n </ArkDP.TableHead>\n\n <ArkDP.TableBody>\n {datePicker.weeks.map((week, id) => (\n <ArkDP.TableRow key={id}>\n {week.map((day, id) => (\n <DatePickerTableCell key={id} value={day}>\n <DatePickerTableCellTrigger\n data-date={getDayValue(day)}\n >\n {day.day}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </DatePickerContext>\n </DatePickerView>\n )\n}\n\n/**\n * The month view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerMonthView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"month\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker\n .getMonthsGrid({ columns: 4, format: 'short' })\n .map((months, id) => (\n <ArkDP.TableRow key={id}>\n {months.map((month, id) => (\n <DatePickerTableCell key={id} value={month.value}>\n <DatePickerTableCellTrigger>\n {month.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * The year view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerYearView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"year\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker.getYearsGrid({ columns: 4 }).map((years, id) => (\n <ArkDP.TableRow key={id}>\n {years.map((year, id) => (\n <DatePickerTableCell key={id} value={year.value}>\n <DatePickerTableCellTrigger>\n {year.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * An abstraction of the DatePicker content components that contain the\n * different calendar views and controls.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerCalendar(props: { withModal?: boolean }) {\n return (\n <DatePickerContent withModal={props.withModal}>\n <DatePickerDayView />\n <DatePickerMonthView />\n <DatePickerYearView />\n </DatePickerContent>\n )\n}\n","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 {\n createContext,\n useContext,\n useMemo,\n type PropsWithChildren,\n} from 'react'\n\n/**\n * This module provides a context and hook for the field.\n * @module Field\n */\n\nexport interface FieldContextValue {\n /**\n * Whether the field is disabled.\n * @description [Moz Input Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attributes)\n */\n disabled?: boolean\n /**\n * Whether the field is read-only.\n */\n readOnly?: boolean\n /**\n * Whether the field is required.\n */\n required?: boolean\n /**\n * Whether the field is invalid.\n */\n invalid?: boolean\n}\n\nconst FieldContext = createContext<FieldContextValue | null>(null)\n\n/**\n * Provides the field state for a all related components used within a group.\n * @see https://cerberus.digitalu.design/react/input\n */\nexport function Field(\n props: PropsWithChildren<FieldContextValue>,\n): JSX.Element {\n const value = useMemo(\n () => ({\n disabled: props.disabled,\n readOnly: props.readOnly,\n required: props.required,\n invalid: props.invalid,\n }),\n [props.disabled, props.readOnly, props.required, props.invalid],\n )\n\n return (\n <FieldContext.Provider value={value}>\n {props.children}\n </FieldContext.Provider>\n )\n}\n\n/**\n * Used to access the field context.\n * @returns The field context.\n */\nexport function useFieldContext(): FieldContextValue {\n const context = useContext(FieldContext)\n if (!context) {\n throw new Error('useFieldContext must be used within a Field Provider.')\n }\n return context\n}\n","import {\n DatePicker as ArkDP,\n type DatePickerLabelProps,\n type DatePickerTableCellProps,\n type DatePickerTableCellTriggerProps,\n type DatePickerTableHeaderProps,\n type DatePickerTableProps,\n type DatePickerViewControlProps,\n} from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { datePicker, label } from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the DatePicker server family components.\n * @module DatePicker\n */\n\n// We are not exposing this to the public API\nconst datePickerStyles = datePicker()\n\n/**\n * The label component for the DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerLabel>\n * <DatePickerLabel.Label>...</DatePickerLabel.Label>\n * </DatePickerLabel>\n * ```\n */\nexport function DatePickerLabel(props: DatePickerLabelProps) {\n const { className, ...arkProps } = props\n return (\n <ArkDP.Label\n {...arkProps}\n className={cx(\n className,\n label({\n size: 'sm',\n }),\n )}\n />\n )\n}\n\n/**\n * The control component for the DatePicker which wraps the triggers to switch\n * between calendar views.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerViewControl>\n * <PrevTrigger />\n * <ViewTrigger />\n * <NextTrigger />\n * </DatePickerViewControl>\n * ```\n */\nexport function DatePickerViewControl(props: DatePickerViewControlProps) {\n return (\n <ArkDP.Control\n {...props}\n className={cx(props.className, datePickerStyles.viewControl)}\n />\n )\n}\n\n/**\n * The table component for the DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTable />\n * ```\n */\nexport function DatePickerTable(props: DatePickerTableProps) {\n return (\n <ArkDP.Table\n {...props}\n className={cx(props.className, datePickerStyles.table)}\n />\n )\n}\n\n/**\n * The header component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableHeader />\n * ```\n */\nexport function DatePickerTableHeader(props: DatePickerTableHeaderProps) {\n return (\n <ArkDP.TableHeader\n {...props}\n className={cx(props.className, datePickerStyles.tableHeader)}\n />\n )\n}\n\n/**\n * The cell component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableCell />\n * ```\n */\nexport function DatePickerTableCell(props: DatePickerTableCellProps) {\n return (\n <ArkDP.TableCell\n {...props}\n className={cx(props.className, datePickerStyles.tableCell)}\n />\n )\n}\n\n/**\n * The cell component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableCell />\n * ```\n */\nexport function DatePickerTableCellTrigger(\n props: DatePickerTableCellTriggerProps,\n) {\n return (\n <ArkDP.TableCellTrigger\n {...props}\n className={cx(props.className, datePickerStyles.tableCellTrigger)}\n />\n )\n}\n\n/**\n * The view container which wraps the control and content components.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerView />\n * ```\n */\nexport const DatePickerView = ArkDP.View\n\n/**\n * The context component for the DatePicker which provides the DatePicker state.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerContext />\n * ```\n */\nexport const DatePickerContext = ArkDP.Context\n","import type { ButtonHTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n iconButton,\n type IconButtonVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps): JSX.Element {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","import type { ButtonHTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n button,\n type ButtonVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Button component.\n * @module\n */\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &\n ButtonVariantProps\n\n/**\n * A component that allows the user to perform actions\n * @see https://cerberus.digitalu.design/react/button\n */\nexport function Button(props: ButtonProps): JSX.Element {\n const { palette, usage, shape, ...nativeProps } = props\n return (\n <button\n {...nativeProps}\n className={cx(\n nativeProps.className,\n button({\n palette,\n usage,\n shape,\n }),\n )}\n />\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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IAE5B,6CAAC,mBACC,uDAAC,cAAAD,WAAM,WAAN,EACE,UAAAC,YAAW,aAAa,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,CAAC,OAAO,OACnD,6CAAC,cAAAD,WAAM,UAAN,EACE,gBAAM,IAAI,CAAC,MAAME,QAChB,6CAAC,uBAA6B,OAAO,KAAK,OACxC,uDAAC,8BACE,eAAK,OACR,KAHwBA,GAI1B,CACD,KAPkB,EAQrB,CACD,GACH,GACF;AAAA,KACF,GAEJ,GACF;AAEJ;AAiBO,SAAS,mBAAmB,OAAgC;AACjE,SACE,8CAAC,qBAAkB,WAAW,MAAM,WAClC;AAAA,iDAAC,qBAAkB;AAAA,IACnB,6CAAC,uBAAoB;AAAA,IACrB,6CAAC,sBAAmB;AAAA,KACtB;AAEJ;","names":["import_react","ArkPortal","import_recipes","import_css","import_react","import_react","import_jsx_runtime","ArkDP","import_css","import_recipes","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_jsx_runtime","datePickerStyles","ArkDP","datePicker","id"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/DatePicker.client.tsx","../../../src/components/Portal.tsx","../../../src/components/DatePicker.server.tsx","../../../src/components/IconButton.tsx","../../../src/components/button/button.tsx","../../../src/context/cerberus.tsx"],"sourcesContent":["'use client'\n\nimport {\n DatePicker as ArkDP,\n type DatePickerContentProps,\n type DatePickerInputProps,\n type DatePickerRootProps,\n type DatePickerTriggerProps,\n type DatePickerViewControlProps,\n type DatePickerViewProps,\n} from '@ark-ui/react'\nimport { Portal } from './Portal'\nimport { datePicker, iconButton } from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport {\n DatePickerView,\n DatePickerContext,\n DatePickerTable,\n DatePickerTableHeader,\n DatePickerTableCellTrigger,\n DatePickerTableCell,\n DatePickerViewControl,\n} from './DatePicker.server'\nimport { IconButton } from './IconButton'\nimport { Button } from './button/button'\nimport { useCerberusContext } from '../context/cerberus'\nimport { useMemo, type InputHTMLAttributes } from 'react'\n\n/**\n * This module contains the DatePicker client family components.\n * @module DatePicker:client\n */\n\n// We are not exposing this to the public API\nconst datePickerStyles = datePicker()\n\n/**\n * The main context provider for the DatePicker family components.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePicker(props: DatePickerRootProps) {\n // There is a bug with the Root component that causes random date selection\n // onBlur after the first selection if the format prop is used.\n // ref: https://github.com/chakra-ui/ark/issues/3112#event-16047829195\n\n // const handleFormat = useCallback((value: DateValue) => {\n // return formatISOToMilitary(value.toString())\n // }, [])\n\n return (\n <ArkDP.Root\n {...props}\n positioning={{\n placement: 'bottom-start',\n }}\n />\n )\n}\n\n/**\n * An abstraction of the DatePicker control that contains the prev, view, and\n * next triggers which control the calendar output.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerViewControlGroup />\n * ```\n */\nexport function DatePickerViewControlGroup(props: DatePickerViewControlProps) {\n const { icons } = useCerberusContext()\n const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons\n return (\n <DatePickerViewControl {...props}>\n <ArkDP.PrevTrigger asChild>\n <IconButton ariaLabel=\"Previous\" size=\"sm\">\n <PrevIcon />\n </IconButton>\n </ArkDP.PrevTrigger>\n\n <ArkDP.ViewTrigger asChild>\n <Button\n className={css({\n h: '2rem',\n paddingInline: 'md',\n })}\n shape=\"rounded\"\n size=\"sm\"\n usage=\"ghost\"\n >\n <ArkDP.RangeText />\n </Button>\n </ArkDP.ViewTrigger>\n\n <ArkDP.NextTrigger asChild>\n <IconButton ariaLabel=\"Next\" size=\"sm\">\n <NextIcon />\n </IconButton>\n </ArkDP.NextTrigger>\n </DatePickerViewControl>\n )\n}\n\n/**\n * The trigger component for the DatePicker which opens the calendar.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTrigger />\n * ```\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const { icons } = useCerberusContext()\n const { calendar: CalendarIcon } = icons\n return (\n <ArkDP.Trigger\n {...props}\n className={cx(\n props.className,\n iconButton({\n size: 'sm',\n usage: 'ghost',\n }),\n datePickerStyles.trigger,\n )}\n >\n <CalendarIcon />\n </ArkDP.Trigger>\n )\n}\n\n/**\n * The input component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerInput(props: DatePickerInputProps) {\n return (\n <ArkDP.Control className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...props}\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n />\n </ArkDP.Control>\n )\n}\n\nexport interface RangePickerInputProps\n extends Omit<DatePickerInputProps, 'defaultValue'> {\n /**\n * The defaultValue to add for the inputs. The first item is the start date\n * and the second item is the end date.\n */\n defaultValue?: [\n InputHTMLAttributes<HTMLInputElement>['defaultValue'],\n InputHTMLAttributes<HTMLInputElement>['defaultValue'],\n ]\n}\n\n/**\n * The input component for the DatePicker that uses ranges.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\" selection=\"range\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <RangePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function RangePickerInput(props: RangePickerInputProps) {\n const { defaultValue, ...nativeProps } = props\n\n const startDate = useMemo(() => defaultValue?.[0], [defaultValue])\n const endDate = useMemo(() => defaultValue?.[1], [defaultValue])\n\n return (\n <ArkDP.Control data-range className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...nativeProps}\n data-range-input\n defaultValue={startDate}\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={0}\n />\n <ArkDP.Input\n {...nativeProps}\n data-range-input\n defaultValue={endDate}\n data-range-end-input\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={1}\n />\n </ArkDP.Control>\n )\n}\n\n/**\n * The content component for the DatePicker which contains the calendar.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerContent(\n props: DatePickerContentProps & {\n withModal?: boolean\n },\n) {\n const { children, withModal, ...contentProps } = props\n return (\n <Portal disabled={withModal ?? false}>\n <ArkDP.Positioner className={datePickerStyles.positioner}>\n <ArkDP.Content\n {...contentProps}\n className={cx(contentProps.className, datePickerStyles.content)}\n >\n {children}\n </ArkDP.Content>\n </ArkDP.Positioner>\n </Portal>\n )\n}\n\n/**\n * The day view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerDayView(props: Omit<DatePickerViewProps, 'view'>) {\n function isToday(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const formatted = today.toISOString().split('T')[0]\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return formatted === arkDate\n }\n\n function isPastDay(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return new Date(arkDate) < today\n }\n\n function getDayValue(date: ArkDP.DateValue): 'today' | 'past' | 'future' {\n if (isToday(date)) return 'today'\n if (isPastDay(date)) return 'past'\n return 'future'\n }\n\n return (\n <DatePickerView {...props} view=\"day\">\n <DatePickerContext>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableHead>\n <ArkDP.TableRow>\n {datePicker.weekDays.map((weekDay, id) => (\n <DatePickerTableHeader key={id}>\n {weekDay.narrow}\n </DatePickerTableHeader>\n ))}\n </ArkDP.TableRow>\n </ArkDP.TableHead>\n\n <ArkDP.TableBody>\n {datePicker.weeks.map((week, id) => (\n <ArkDP.TableRow key={id}>\n {week.map((day, id) => (\n <DatePickerTableCell key={id} value={day}>\n <DatePickerTableCellTrigger\n data-date={getDayValue(day)}\n >\n {day.day}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </DatePickerContext>\n </DatePickerView>\n )\n}\n\n/**\n * The month view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerMonthView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"month\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker\n .getMonthsGrid({ columns: 4, format: 'short' })\n .map((months, id) => (\n <ArkDP.TableRow key={id}>\n {months.map((month, id) => (\n <DatePickerTableCell key={id} value={month.value}>\n <DatePickerTableCellTrigger>\n {month.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * The year view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerYearView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"year\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker.getYearsGrid({ columns: 4 }).map((years, id) => (\n <ArkDP.TableRow key={id}>\n {years.map((year, id) => (\n <DatePickerTableCell key={id} value={year.value}>\n <DatePickerTableCellTrigger>\n {year.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * An abstraction of the DatePicker content components that contain the\n * different calendar views and controls.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerCalendar(props: { withModal?: boolean }) {\n return (\n <DatePickerContent withModal={props.withModal}>\n <DatePickerDayView />\n <DatePickerMonthView />\n <DatePickerYearView />\n </DatePickerContent>\n )\n}\n","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","import {\n DatePicker as ArkDP,\n type DatePickerLabelProps,\n type DatePickerTableCellProps,\n type DatePickerTableCellTriggerProps,\n type DatePickerTableHeaderProps,\n type DatePickerTableProps,\n type DatePickerViewControlProps,\n} from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { datePicker, label } from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the DatePicker server family components.\n * @module DatePicker\n */\n\n// We are not exposing this to the public API\nconst datePickerStyles = datePicker()\n\n/**\n * The label component for the DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerLabel>\n * <DatePickerLabel.Label>...</DatePickerLabel.Label>\n * </DatePickerLabel>\n * ```\n */\nexport function DatePickerLabel(props: DatePickerLabelProps) {\n const { className, ...arkProps } = props\n return (\n <ArkDP.Label\n {...arkProps}\n className={cx(\n className,\n label({\n size: 'sm',\n }),\n )}\n />\n )\n}\n\n/**\n * The control component for the DatePicker which wraps the triggers to switch\n * between calendar views.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerViewControl>\n * <PrevTrigger />\n * <ViewTrigger />\n * <NextTrigger />\n * </DatePickerViewControl>\n * ```\n */\nexport function DatePickerViewControl(props: DatePickerViewControlProps) {\n return (\n <ArkDP.Control\n {...props}\n className={cx(props.className, datePickerStyles.viewControl)}\n />\n )\n}\n\n/**\n * The table component for the DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTable />\n * ```\n */\nexport function DatePickerTable(props: DatePickerTableProps) {\n return (\n <ArkDP.Table\n {...props}\n className={cx(props.className, datePickerStyles.table)}\n />\n )\n}\n\n/**\n * The header component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableHeader />\n * ```\n */\nexport function DatePickerTableHeader(props: DatePickerTableHeaderProps) {\n return (\n <ArkDP.TableHeader\n {...props}\n className={cx(props.className, datePickerStyles.tableHeader)}\n />\n )\n}\n\n/**\n * The cell component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableCell />\n * ```\n */\nexport function DatePickerTableCell(props: DatePickerTableCellProps) {\n return (\n <ArkDP.TableCell\n {...props}\n className={cx(props.className, datePickerStyles.tableCell)}\n />\n )\n}\n\n/**\n * The cell component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableCell />\n * ```\n */\nexport function DatePickerTableCellTrigger(\n props: DatePickerTableCellTriggerProps,\n) {\n return (\n <ArkDP.TableCellTrigger\n {...props}\n className={cx(props.className, datePickerStyles.tableCellTrigger)}\n />\n )\n}\n\n/**\n * The view container which wraps the control and content components.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerView />\n * ```\n */\nexport const DatePickerView = ArkDP.View\n\n/**\n * The context component for the DatePicker which provides the DatePicker state.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerContext />\n * ```\n */\nexport const DatePickerContext = ArkDP.Context\n","import type { ButtonHTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n iconButton,\n type IconButtonVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps): JSX.Element {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","'use client'\n\nimport {\n type ButtonHTMLAttributes,\n type PropsWithChildren,\n createContext,\n useContext,\n useMemo,\n} from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n button,\n type ButtonVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { Box } from '@cerberus/styled-system/jsx'\nimport { Show } from '../Show'\nimport { Spinner } from '../Spinner'\n\n/**\n * This module contains the Button component.\n * @module\n */\n\ninterface ButtonContextValue {\n pending: boolean\n}\n\nconst ButtonContext = createContext<ButtonContextValue>({\n pending: false,\n})\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &\n ButtonVariantProps & {\n pending?: boolean\n }\n\n/**\n * A component that allows the user to perform actions\n * @see https://cerberus.digitalu.design/react/button\n */\nexport function Button(props: ButtonProps): JSX.Element {\n const { palette, usage, shape, size, pending = false, ...nativeProps } = props\n const value = useMemo(() => ({ pending }), [pending])\n\n return (\n <ButtonContext.Provider value={value}>\n <button\n {...nativeProps}\n disabled={pending || nativeProps.disabled}\n className={cx(\n nativeProps.className,\n button({\n palette,\n usage,\n shape,\n size,\n }),\n )}\n />\n </ButtonContext.Provider>\n )\n}\n\n/**\n * An icon to display in a button that utilizes the pending state to display\n * a loading spinner.\n */\nexport function ButtonIcon(props: PropsWithChildren<object>) {\n const { pending } = useContext(ButtonContext)\n return (\n <Show when={pending} fallback={<>{props.children}</>}>\n <Box w=\"4\">\n <Spinner />\n </Box>\n </Show>\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,gBAQO;;;ACVP,mBAGO;AA2BA,IAAM,SAAS,aAAAC;;;ADlBtB,IAAAC,kBAAuC;AACvC,IAAAC,cAAwB;;;AEbxB,IAAAC,gBAQO;AACP,iBAAmB;AACnB,qBAAkC;AAuB9B;AAfJ,IAAM,uBAAmB,2BAAW;AAwC7B,SAAS,sBAAsB,OAAmC;AACvE,SACE;AAAA,IAAC,cAAAC,WAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,MAAM,WAAW,iBAAiB,WAAW;AAAA;AAAA,EAC7D;AAEJ;AAUO,SAAS,gBAAgB,OAA6B;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AAC,cAAAD,WAAM,WAAN,EACE,UAAAC,YACE,cAAc,EAAE,SAAS,GAAG,QAAQ,QAAQ,CAAC,EAC7C,IAAI,CAAC,QAAQ,OACZ,6CAAC,cAAAD,WAAM,UAAN,EACE,iBAAO,IAAI,CAAC,OAAOE,QAClB,6CAAC,uBAA6B,OAAO,MAAM,OACzC,uDAAC,8BACE,gBAAM,OACT,KAHwBA,GAI1B,CACD,KAPkB,EAQrB,CACD,GACL,GACF;AAAA,KACF,GAEJ,GACF;AAEJ;AAgBO,SAAS,mBAAmB,OAA0C;AAC3E,SACE,6CAAC,cAAAF,WAAM,MAAN,EAAY,GAAG,OAAO,MAAK,QAC1B,uDAAC,cAAAA,WAAM,SAAN,EACE,WAACC,gBACA,8EACE;AAAA,iDAAC,8BAA2B;AAAA,IAE5B,6CAAC,mBACC,uDAAC,cAAAD,WAAM,WAAN,EACE,UAAAC,YAAW,aAAa,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,CAAC,OAAO,OACnD,6CAAC,cAAAD,WAAM,UAAN,EACE,gBAAM,IAAI,CAAC,MAAME,QAChB,6CAAC,uBAA6B,OAAO,KAAK,OACxC,uDAAC,8BACE,eAAK,OACR,KAHwBA,GAI1B,CACD,KAPkB,EAQrB,CACD,GACH,GACF;AAAA,KACF,GAEJ,GACF;AAEJ;AAiBO,SAAS,mBAAmB,OAAgC;AACjE,SACE,8CAAC,qBAAkB,WAAW,MAAM,WAClC;AAAA,iDAAC,qBAAkB;AAAA,IACnB,6CAAC,uBAAoB;AAAA,IACrB,6CAAC,sBAAmB;AAAA,KACtB;AAEJ;","names":["import_react","ArkPortal","import_recipes","import_css","import_react","ArkDP","import_css","import_recipes","import_jsx_runtime","import_react","import_css","import_recipes","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_jsx_runtime","datePickerStyles","ArkDP","datePicker","id"]}
|