@cerberus-design/react 0.15.0 → 0.16.0-next-4f6c716
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/legacy/_tsup-dts-rollup.d.cts +1329 -360
- 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/{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 +38 -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/cta-modal.cjs +55 -45
- package/build/legacy/context/cta-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 +1831 -1330
- 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 +1329 -360
- 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-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-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-SD3OVTHT.js → chunk-CMYD5KWA.js} +43 -46
- package/build/modern/chunk-CMYD5KWA.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-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-JAROS4Q3.js → chunk-FMRWRVUS.js} +7 -7
- package/build/modern/chunk-FMRWRVUS.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-IIH363FO.js +13 -0
- package/build/modern/chunk-IIH363FO.js.map +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-3BM6MZ4A.js → chunk-MWRO5QYD.js} +1 -1
- package/build/modern/chunk-MWRO5QYD.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-P3SF56LT.js +47 -0
- package/build/modern/chunk-P3SF56LT.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-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-Z52R6ABJ.js +21 -0
- package/build/modern/chunk-Z52R6ABJ.js.map +1 -0
- package/build/modern/{chunk-FGCO27TC.js → chunk-ZDANBCM3.js} +6 -6
- package/build/modern/chunk-ZDANBCM3.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/deprecated/FieldMessage.js +8 -0
- package/build/modern/components/deprecated/FieldsetLabel.js +7 -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/cta-modal.js +6 -5
- 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 +14 -8
- 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 +284 -116
- 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/{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 +43 -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/cta-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 +23 -23
- 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/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/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/{chunk-EDARV2EI.js.map → chunk-MISIUX63.js.map} +0 -0
- /package/build/modern/{components/Fieldset.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/FieldsetLabel.js.map → chunk-TIJAFPHQ.js.map} +0 -0
- /package/build/modern/{components/Input.js.map → chunk-TYPULJMJ.js.map} +0 -0
- /package/build/modern/{components/Label.js.map → chunk-UDY6USHW.js.map} +0 -0
- /package/build/modern/{components/Modal.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/{ModalDescription.js.map → button/button.js.map} +0 -0
- /package/build/modern/components/{ModalHeader.js.map → button/index.js.map} +0 -0
- /package/build/modern/components/{ModalHeading.js.map → button/parts.js.map} +0 -0
- /package/build/modern/components/{NavMenuLink.js.map → checkbox/checkbox-icon.js.map} +0 -0
- /package/build/modern/components/{NavMenuList.js.map → checkbox/checkbox.js.map} +0 -0
- /package/build/modern/components/{NavMenuTrigger.js.map → checkbox/index.js.map} +0 -0
- /package/build/modern/components/{Radio.js.map → checkbox/parts.js.map} +0 -0
- /package/build/modern/components/{Select.js.map → checkbox/primitives.js.map} +0 -0
- /package/build/modern/components/{Textarea.js.map → deprecated/FieldMessage.js.map} +0 -0
- /package/build/modern/components/{Toggle.js.map → deprecated/FieldsetLabel.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
package/build/legacy/index.cjs
CHANGED
|
@@ -32,9 +32,18 @@ __export(src_exports, {
|
|
|
32
32
|
AdmonitionHeading: () => AdmonitionHeading,
|
|
33
33
|
Avatar: () => Avatar,
|
|
34
34
|
Button: () => Button,
|
|
35
|
+
ButtonIcon: () => ButtonIcon,
|
|
36
|
+
ButtonParts: () => ButtonParts,
|
|
35
37
|
CTAModal: () => CTAModal,
|
|
36
38
|
CerberusProvider: () => CerberusProvider,
|
|
37
|
-
Checkbox: () =>
|
|
39
|
+
Checkbox: () => Checkbox2,
|
|
40
|
+
CheckboxControl: () => CheckboxControl,
|
|
41
|
+
CheckboxGroup: () => CheckboxGroup,
|
|
42
|
+
CheckboxHiddenInput: () => CheckboxHiddenInput,
|
|
43
|
+
CheckboxIndicator: () => CheckboxIndicator,
|
|
44
|
+
CheckboxLabel: () => CheckboxLabel,
|
|
45
|
+
CheckboxParts: () => CheckboxParts,
|
|
46
|
+
CheckboxRoot: () => CheckboxRoot,
|
|
38
47
|
CircularProgress: () => CircularProgress,
|
|
39
48
|
ConfirmModal: () => ConfirmModal,
|
|
40
49
|
DateFormats: () => DateFormats,
|
|
@@ -68,12 +77,28 @@ __export(src_exports, {
|
|
|
68
77
|
Droppable: () => Droppable,
|
|
69
78
|
FeatureFlag: () => FeatureFlag,
|
|
70
79
|
FeatureFlags: () => FeatureFlags,
|
|
71
|
-
Field: () =>
|
|
80
|
+
Field: () => Field2,
|
|
81
|
+
FieldErrorText: () => FieldErrorText,
|
|
82
|
+
FieldHelperText: () => FieldHelperText,
|
|
83
|
+
FieldInput: () => FieldInput,
|
|
84
|
+
FieldLabel: () => FieldLabel,
|
|
72
85
|
FieldMessage: () => FieldMessage,
|
|
73
|
-
|
|
86
|
+
FieldParts: () => FieldParts,
|
|
87
|
+
FieldRequiredIndicator: () => FieldRequiredIndicator,
|
|
88
|
+
FieldRoot: () => FieldRoot,
|
|
89
|
+
FieldStartIndicator: () => FieldStartIndicator,
|
|
90
|
+
FieldStatusIndicator: () => FieldStatusIndicator,
|
|
91
|
+
FieldTextarea: () => FieldTextarea,
|
|
92
|
+
Fieldset: () => Fieldset2,
|
|
93
|
+
FieldsetErrorText: () => FieldsetErrorText,
|
|
94
|
+
FieldsetHelperText: () => FieldsetHelperText,
|
|
74
95
|
FieldsetLabel: () => FieldsetLabel,
|
|
96
|
+
FieldsetLegend: () => FieldsetLegend,
|
|
97
|
+
FieldsetParts: () => FieldsetParts,
|
|
98
|
+
FieldsetRoot: () => FieldsetRoot,
|
|
75
99
|
FileStatus: () => FileStatus,
|
|
76
100
|
FileUploader: () => FileUploader,
|
|
101
|
+
For: () => For,
|
|
77
102
|
IconButton: () => IconButton,
|
|
78
103
|
Input: () => Input,
|
|
79
104
|
Label: () => Label,
|
|
@@ -99,14 +124,48 @@ __export(src_exports, {
|
|
|
99
124
|
NotificationDescription: () => NotificationDescription,
|
|
100
125
|
NotificationHeading: () => NotificationHeading,
|
|
101
126
|
Option: () => Option,
|
|
127
|
+
OptionGroup: () => OptionGroup,
|
|
128
|
+
OptionGroupLabel: () => OptionGroupLabel,
|
|
102
129
|
Portal: () => Portal,
|
|
103
130
|
ProgressBar: () => ProgressBar,
|
|
104
131
|
PromptModal: () => PromptModal,
|
|
105
132
|
Radio: () => Radio,
|
|
133
|
+
RadioGroup: () => RadioGroup,
|
|
134
|
+
RadioGroupIndicator: () => RadioGroupIndicator,
|
|
135
|
+
RadioGroupItem: () => RadioGroupItem,
|
|
136
|
+
RadioGroupItemControl: () => RadioGroupItemControl,
|
|
137
|
+
RadioGroupItemHiddenInput: () => RadioGroupItemHiddenInput,
|
|
138
|
+
RadioGroupItemText: () => RadioGroupItemText,
|
|
139
|
+
RadioGroupLabel: () => RadioGroupLabel,
|
|
140
|
+
RadioGroupRoot: () => RadioGroupRoot,
|
|
141
|
+
RadioParts: () => RadioParts,
|
|
106
142
|
RangePickerInput: () => RangePickerInput,
|
|
107
|
-
Select: () =>
|
|
143
|
+
Select: () => Select2,
|
|
144
|
+
SelectClearTrigger: () => SelectClearTrigger,
|
|
145
|
+
SelectContent: () => SelectContent,
|
|
146
|
+
SelectControl: () => SelectControl,
|
|
147
|
+
SelectHiddenSelect: () => SelectHiddenSelect,
|
|
148
|
+
SelectIndicator: () => SelectIndicator,
|
|
149
|
+
SelectItem: () => SelectItem,
|
|
150
|
+
SelectItemGroup: () => SelectItemGroup,
|
|
151
|
+
SelectItemGroupLabel: () => SelectItemGroupLabel,
|
|
152
|
+
SelectItemIndicator: () => SelectItemIndicator,
|
|
153
|
+
SelectItemText: () => SelectItemText,
|
|
154
|
+
SelectLabel: () => SelectLabel,
|
|
155
|
+
SelectParts: () => SelectParts,
|
|
156
|
+
SelectPositioner: () => SelectPositioner,
|
|
157
|
+
SelectRoot: () => SelectRoot,
|
|
158
|
+
SelectTrigger: () => SelectTrigger,
|
|
159
|
+
SelectValueText: () => SelectValueText,
|
|
108
160
|
Show: () => Show,
|
|
109
161
|
Spinner: () => Spinner,
|
|
162
|
+
Switch: () => Switch2,
|
|
163
|
+
SwitchControl: () => SwitchControl,
|
|
164
|
+
SwitchHiddenInput: () => SwitchHiddenInput,
|
|
165
|
+
SwitchLabel: () => SwitchLabel,
|
|
166
|
+
SwitchParts: () => SwitchParts,
|
|
167
|
+
SwitchRoot: () => SwitchRoot,
|
|
168
|
+
SwitchThumb: () => SwitchThumb,
|
|
110
169
|
THEME_KEY: () => THEME_KEY,
|
|
111
170
|
Tab: () => Tab,
|
|
112
171
|
TabIndicator: () => TabIndicator,
|
|
@@ -124,10 +183,13 @@ __export(src_exports, {
|
|
|
124
183
|
Th: () => Th,
|
|
125
184
|
Thead: () => Thead,
|
|
126
185
|
ThemeProvider: () => ThemeProvider,
|
|
127
|
-
|
|
186
|
+
ToggleIndicator: () => ToggleIndicator,
|
|
187
|
+
ToggleParts: () => ToggleParts,
|
|
188
|
+
ToggleRoot: () => ToggleRoot,
|
|
128
189
|
Tooltip: () => Tooltip,
|
|
129
190
|
Tr: () => Tr,
|
|
130
191
|
createNavTriggerProps: () => createNavTriggerProps,
|
|
192
|
+
createSelectCollection: () => createSelectCollection,
|
|
131
193
|
defineIcons: () => defineIcons,
|
|
132
194
|
formatISOToMilitary: () => formatISOToMilitary,
|
|
133
195
|
formatMilitaryDate: () => formatMilitaryDate,
|
|
@@ -138,13 +200,13 @@ __export(src_exports, {
|
|
|
138
200
|
makeSystemConfig: () => makeSystemConfig,
|
|
139
201
|
processStatus: () => processStatus,
|
|
140
202
|
setLocalStorage: () => setLocalStorage,
|
|
203
|
+
splitProps: () => splitProps,
|
|
141
204
|
trapFocus: () => trapFocus,
|
|
142
205
|
useCTAModal: () => useCTAModal,
|
|
143
206
|
useCerberusContext: () => useCerberusContext,
|
|
144
207
|
useConfirmModal: () => useConfirmModal,
|
|
145
208
|
useDate: () => useDate,
|
|
146
209
|
useFeatureFlags: () => useFeatureFlags,
|
|
147
|
-
useFieldContext: () => useFieldContext,
|
|
148
210
|
useModal: () => useModal,
|
|
149
211
|
useNavMenuContext: () => useNavMenuContext,
|
|
150
212
|
useNotificationCenter: () => useNotificationCenter,
|
|
@@ -157,33 +219,321 @@ __export(src_exports, {
|
|
|
157
219
|
});
|
|
158
220
|
module.exports = __toCommonJS(src_exports);
|
|
159
221
|
|
|
160
|
-
// src/components/
|
|
222
|
+
// src/components/deprecated/FieldMessage.tsx
|
|
161
223
|
var import_css = require("@cerberus/styled-system/css");
|
|
162
224
|
var import_recipes = require("@cerberus/styled-system/recipes");
|
|
163
|
-
var
|
|
225
|
+
var import_field = require("@ark-ui/react/field");
|
|
164
226
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
165
|
-
function
|
|
227
|
+
function FieldMessage(props) {
|
|
228
|
+
const { invalid } = (0, import_field.useFieldContext)();
|
|
166
229
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
230
|
+
"small",
|
|
231
|
+
{
|
|
232
|
+
...props,
|
|
233
|
+
...invalid && { "aria-invalid": true },
|
|
234
|
+
className: (0, import_css.cx)(props.className, (0, import_recipes.fieldMessage)())
|
|
235
|
+
}
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// src/components/deprecated/FieldsetLabel.tsx
|
|
240
|
+
var import_css2 = require("@cerberus/styled-system/css");
|
|
241
|
+
var import_recipes2 = require("@cerberus/styled-system/recipes");
|
|
242
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
243
|
+
function FieldsetLabel(props) {
|
|
244
|
+
const { size, usage, ...nativeProps } = props;
|
|
245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
246
|
+
"label",
|
|
247
|
+
{
|
|
248
|
+
...nativeProps,
|
|
249
|
+
className: (0, import_css2.cx)(
|
|
250
|
+
nativeProps.className,
|
|
251
|
+
(0, import_recipes2.label)({
|
|
252
|
+
size,
|
|
253
|
+
usage
|
|
254
|
+
})
|
|
255
|
+
)
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// src/components/deprecated/Label.tsx
|
|
261
|
+
var import_recipes6 = require("@cerberus/styled-system/recipes");
|
|
262
|
+
var import_css6 = require("@cerberus/styled-system/css");
|
|
263
|
+
|
|
264
|
+
// src/utils/localStorage.ts
|
|
265
|
+
function getLocalStorage(key, defaultValue) {
|
|
266
|
+
const value = window.localStorage.getItem(key);
|
|
267
|
+
if (value) {
|
|
268
|
+
return value;
|
|
269
|
+
}
|
|
270
|
+
return defaultValue;
|
|
271
|
+
}
|
|
272
|
+
function setLocalStorage(key, value) {
|
|
273
|
+
const stringValue = typeof value === "string" ? value : JSON.stringify(value);
|
|
274
|
+
window.localStorage.setItem(key, stringValue);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// src/utils/index.ts
|
|
278
|
+
function formatNotifyCount(count) {
|
|
279
|
+
if (count > 99) return "99+";
|
|
280
|
+
return count.toString();
|
|
281
|
+
}
|
|
282
|
+
function splitProps(props, ...keyGroups) {
|
|
283
|
+
const result = keyGroups.map(() => ({}));
|
|
284
|
+
const rest = {};
|
|
285
|
+
for (const key in props) {
|
|
286
|
+
let assigned = false;
|
|
287
|
+
for (let i = 0; i < keyGroups.length; i++) {
|
|
288
|
+
if (keyGroups[i].includes(key)) {
|
|
289
|
+
result[i][key] = props[key];
|
|
290
|
+
assigned = true;
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
if (!assigned) {
|
|
295
|
+
rest[key] = props[key];
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
return [...result, rest];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// src/components/field/primitives.tsx
|
|
302
|
+
var import_field2 = require("@ark-ui/react/field");
|
|
303
|
+
var import_css5 = require("@cerberus/styled-system/css");
|
|
304
|
+
var import_recipes5 = require("@cerberus/styled-system/recipes");
|
|
305
|
+
|
|
306
|
+
// src/components/field/status-indicator.tsx
|
|
307
|
+
var import_react2 = require("@ark-ui/react");
|
|
308
|
+
var import_css3 = require("@cerberus/styled-system/css");
|
|
309
|
+
var import_recipes3 = require("@cerberus/styled-system/recipes");
|
|
310
|
+
|
|
311
|
+
// src/context/cerberus.tsx
|
|
312
|
+
var import_react = require("react");
|
|
313
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
314
|
+
var CerberusContext = (0, import_react.createContext)(null);
|
|
315
|
+
function CerberusProvider(props) {
|
|
316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CerberusContext.Provider, { value: props.config, children: props.children });
|
|
317
|
+
}
|
|
318
|
+
function useCerberusContext() {
|
|
319
|
+
const context = (0, import_react.useContext)(CerberusContext);
|
|
320
|
+
if (!context) {
|
|
321
|
+
throw new Error("useCerberus must be used within a CerberusProvider");
|
|
322
|
+
}
|
|
323
|
+
return context;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// src/components/field/status-indicator.tsx
|
|
327
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
328
|
+
function FieldStatusIndicator(props) {
|
|
329
|
+
const { fallback, ...nativeProps } = props;
|
|
330
|
+
const styles = (0, import_recipes3.field)();
|
|
331
|
+
const fieldContext = (0, import_react2.useFieldContext)();
|
|
332
|
+
const { icons } = useCerberusContext();
|
|
333
|
+
const { invalid: InvalidIcon } = icons;
|
|
334
|
+
if (fieldContext.invalid) {
|
|
335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
336
|
+
"span",
|
|
337
|
+
{
|
|
338
|
+
...nativeProps,
|
|
339
|
+
"aria-hidden": "true",
|
|
340
|
+
"data-invalid": true,
|
|
341
|
+
className: (0, import_css3.cx)(nativeProps.className, styles.statusIndicator),
|
|
342
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(InvalidIcon, {})
|
|
343
|
+
}
|
|
344
|
+
);
|
|
345
|
+
}
|
|
346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
347
|
+
"span",
|
|
348
|
+
{
|
|
349
|
+
...nativeProps,
|
|
350
|
+
"aria-hidden": "true",
|
|
351
|
+
"data-part": "end-indicator",
|
|
352
|
+
className: (0, import_css3.cx)(nativeProps.className, styles.endIndicator),
|
|
353
|
+
children: fallback
|
|
354
|
+
}
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// src/components/field/start-indicator.tsx
|
|
359
|
+
var import_css4 = require("@cerberus/styled-system/css");
|
|
360
|
+
var import_recipes4 = require("@cerberus/styled-system/recipes");
|
|
361
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
362
|
+
function FieldStartIndicator(props) {
|
|
363
|
+
const styles = (0, import_recipes4.field)();
|
|
364
|
+
if (!props.children) return null;
|
|
365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
366
|
+
"span",
|
|
367
|
+
{
|
|
368
|
+
...props,
|
|
369
|
+
"data-part": "start-indicator",
|
|
370
|
+
className: (0, import_css4.cx)(props.className, styles.startIndicator)
|
|
371
|
+
}
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// src/components/field/primitives.tsx
|
|
376
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
377
|
+
function FieldRoot(props) {
|
|
378
|
+
const { size, ...fieldProps } = props;
|
|
379
|
+
const styles = (0, import_recipes5.field)({ size });
|
|
380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
381
|
+
import_field2.Field.Root,
|
|
382
|
+
{
|
|
383
|
+
...fieldProps,
|
|
384
|
+
className: (0, import_css5.cx)(styles.root, fieldProps.className)
|
|
385
|
+
}
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
function FieldLabel(props) {
|
|
389
|
+
const { children, ...nativeProps } = props;
|
|
390
|
+
const styles = (0, import_recipes5.field)();
|
|
391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_field2.Field.Label, { ...nativeProps, className: (0, import_css5.cx)(styles.label, props.className), children: [
|
|
392
|
+
children,
|
|
393
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_field2.Field.RequiredIndicator, { children: "(required)" })
|
|
394
|
+
] });
|
|
395
|
+
}
|
|
396
|
+
function FieldRequiredIndicator() {
|
|
397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_field2.Field.RequiredIndicator, { children: "(required)" });
|
|
398
|
+
}
|
|
399
|
+
function FieldInput(props) {
|
|
400
|
+
const { size, startIcon, endIcon, ...fieldProps } = props;
|
|
401
|
+
const styles = (0, import_recipes5.field)({ size });
|
|
402
|
+
const hasStartIcon = Boolean(startIcon);
|
|
403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: styles.inputRoot, children: [
|
|
404
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldStartIndicator, { children: startIcon }),
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
406
|
+
import_field2.Field.Input,
|
|
407
|
+
{
|
|
408
|
+
...fieldProps,
|
|
409
|
+
...hasStartIcon && { "data-has": "start-indicator" },
|
|
410
|
+
className: (0, import_css5.cx)(styles.input, fieldProps.className)
|
|
411
|
+
}
|
|
412
|
+
),
|
|
413
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldStatusIndicator, { fallback: endIcon })
|
|
414
|
+
] });
|
|
415
|
+
}
|
|
416
|
+
function FieldHelperText(props) {
|
|
417
|
+
const styles = (0, import_recipes5.field)();
|
|
418
|
+
if (!props.children) return null;
|
|
419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
420
|
+
import_field2.Field.HelperText,
|
|
421
|
+
{
|
|
422
|
+
...props,
|
|
423
|
+
className: (0, import_css5.cx)(styles.helperText, props.className)
|
|
424
|
+
}
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
function FieldErrorText(props) {
|
|
428
|
+
const styles = (0, import_recipes5.field)();
|
|
429
|
+
if (!props.children) return null;
|
|
430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
431
|
+
import_field2.Field.ErrorText,
|
|
432
|
+
{
|
|
433
|
+
...props,
|
|
434
|
+
className: (0, import_css5.cx)(styles.errorText, props.className)
|
|
435
|
+
}
|
|
436
|
+
);
|
|
437
|
+
}
|
|
438
|
+
function FieldTextarea(props) {
|
|
439
|
+
const styles = (0, import_recipes5.field)();
|
|
440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
441
|
+
import_field2.Field.Textarea,
|
|
442
|
+
{
|
|
443
|
+
...props,
|
|
444
|
+
className: (0, import_css5.cx)(styles.textarea, props.className)
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
var Input = FieldInput;
|
|
449
|
+
var Textarea = FieldTextarea;
|
|
450
|
+
|
|
451
|
+
// src/components/field/field.tsx
|
|
452
|
+
var import_jsx = require("@cerberus/styled-system/jsx");
|
|
453
|
+
|
|
454
|
+
// src/components/Show.tsx
|
|
455
|
+
var import_react3 = require("react");
|
|
456
|
+
function Show(props) {
|
|
457
|
+
const { when, children, fallback } = props;
|
|
458
|
+
const condition = (0, import_react3.useMemo)(() => when ?? false, [when]);
|
|
459
|
+
return (0, import_react3.useMemo)(() => {
|
|
460
|
+
if (condition) return children;
|
|
461
|
+
return fallback ?? null;
|
|
462
|
+
}, [condition, children, fallback]);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// src/components/field/field.tsx
|
|
466
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
467
|
+
function Field2(props) {
|
|
468
|
+
const [statusProps, fieldProps, rootProps] = splitProps(
|
|
469
|
+
props,
|
|
470
|
+
["disabled", "required", "readOnly", "invalid"],
|
|
471
|
+
["label", "helperText", "secondaryHelperText", "errorText", "children"]
|
|
472
|
+
);
|
|
473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(FieldRoot, { ...statusProps, ...rootProps, children: [
|
|
474
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Show, { when: Boolean(fieldProps.label), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FieldLabel, { children: fieldProps.label }) }),
|
|
475
|
+
fieldProps.children,
|
|
476
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Show, { when: Boolean(fieldProps.helperText && !statusProps.invalid), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx.HStack, { justifyContent: "space-between", w: "full", children: [
|
|
477
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FieldHelperText, { children: fieldProps.helperText }),
|
|
478
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Show, { when: Boolean(fieldProps.secondaryHelperText), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FieldHelperText, { children: fieldProps.secondaryHelperText }) })
|
|
479
|
+
] }) }),
|
|
480
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FieldErrorText, { children: fieldProps.errorText })
|
|
481
|
+
] });
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
// src/components/field/parts.ts
|
|
485
|
+
var FieldParts = {
|
|
486
|
+
Root: FieldRoot,
|
|
487
|
+
Label: FieldLabel,
|
|
488
|
+
Input: FieldInput,
|
|
489
|
+
Textarea: FieldTextarea,
|
|
490
|
+
HelperText: FieldHelperText,
|
|
491
|
+
ErrorText: FieldErrorText,
|
|
492
|
+
StartIndicator: FieldStartIndicator,
|
|
493
|
+
StatusIndicator: FieldStatusIndicator,
|
|
494
|
+
RequiredIndicator: FieldRequiredIndicator
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
// src/components/deprecated/Label.tsx
|
|
498
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
499
|
+
function Label(props) {
|
|
500
|
+
const { size, ...nativeProps } = props;
|
|
501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
502
|
+
FieldLabel,
|
|
503
|
+
{
|
|
504
|
+
...nativeProps,
|
|
505
|
+
className: (0, import_css6.cx)((0, import_recipes6.label)({ size }), props.className)
|
|
506
|
+
}
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
// src/components/deprecated/Modal.tsx
|
|
511
|
+
var import_css7 = require("@cerberus/styled-system/css");
|
|
512
|
+
var import_recipes7 = require("@cerberus/styled-system/recipes");
|
|
513
|
+
var import_react4 = require("react");
|
|
514
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
515
|
+
function ModalEl(props, ref) {
|
|
516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
167
517
|
"dialog",
|
|
168
518
|
{
|
|
169
519
|
...props,
|
|
170
|
-
className: (0,
|
|
520
|
+
className: (0, import_css7.cx)(props.className, (0, import_recipes7.modal)().dialog),
|
|
171
521
|
ref
|
|
172
522
|
}
|
|
173
523
|
);
|
|
174
524
|
}
|
|
175
|
-
var Modal = (0,
|
|
525
|
+
var Modal = (0, import_react4.forwardRef)(ModalEl);
|
|
176
526
|
|
|
177
|
-
// src/components/ModalHeader.tsx
|
|
178
|
-
var
|
|
527
|
+
// src/components/deprecated/ModalHeader.tsx
|
|
528
|
+
var import_css8 = require("@cerberus/styled-system/css");
|
|
179
529
|
var import_patterns = require("@cerberus/styled-system/patterns");
|
|
180
|
-
var
|
|
530
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
181
531
|
function ModalHeader(props) {
|
|
182
|
-
return /* @__PURE__ */ (0,
|
|
532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
183
533
|
"div",
|
|
184
534
|
{
|
|
185
535
|
...props,
|
|
186
|
-
className: (0,
|
|
536
|
+
className: (0, import_css8.cx)(
|
|
187
537
|
props.className,
|
|
188
538
|
(0, import_patterns.vstack)({
|
|
189
539
|
alignItems: "flex-start",
|
|
@@ -195,26 +545,26 @@ function ModalHeader(props) {
|
|
|
195
545
|
);
|
|
196
546
|
}
|
|
197
547
|
|
|
198
|
-
// src/components/ModalHeading.tsx
|
|
199
|
-
var
|
|
200
|
-
var
|
|
201
|
-
var
|
|
548
|
+
// src/components/deprecated/ModalHeading.tsx
|
|
549
|
+
var import_css9 = require("@cerberus/styled-system/css");
|
|
550
|
+
var import_recipes8 = require("@cerberus/styled-system/recipes");
|
|
551
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
202
552
|
function ModalHeading(props) {
|
|
203
|
-
return /* @__PURE__ */ (0,
|
|
553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { ...props, className: (0, import_css9.cx)(props.className, (0, import_recipes8.modal)().heading) });
|
|
204
554
|
}
|
|
205
555
|
|
|
206
|
-
// src/components/ModalDescription.tsx
|
|
207
|
-
var
|
|
208
|
-
var
|
|
209
|
-
var
|
|
556
|
+
// src/components/deprecated/ModalDescription.tsx
|
|
557
|
+
var import_css10 = require("@cerberus/styled-system/css");
|
|
558
|
+
var import_recipes9 = require("@cerberus/styled-system/recipes");
|
|
559
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
210
560
|
function ModalDescription(props) {
|
|
211
|
-
return /* @__PURE__ */ (0,
|
|
561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { ...props, className: (0, import_css10.cx)(props.className, (0, import_recipes9.modal)().description) });
|
|
212
562
|
}
|
|
213
563
|
|
|
214
|
-
// src/components/NavMenuTrigger.tsx
|
|
215
|
-
var
|
|
216
|
-
var
|
|
217
|
-
var
|
|
564
|
+
// src/components/deprecated/NavMenuTrigger.tsx
|
|
565
|
+
var import_react6 = require("react");
|
|
566
|
+
var import_css12 = require("@cerberus/styled-system/css");
|
|
567
|
+
var import_recipes10 = require("@cerberus/styled-system/recipes");
|
|
218
568
|
|
|
219
569
|
// src/aria-helpers/nav-menu.aria.ts
|
|
220
570
|
function createNavTriggerProps(values) {
|
|
@@ -225,18 +575,18 @@ function createNavTriggerProps(values) {
|
|
|
225
575
|
}
|
|
226
576
|
|
|
227
577
|
// src/context/navMenu.tsx
|
|
228
|
-
var
|
|
229
|
-
var
|
|
230
|
-
var
|
|
231
|
-
var NavMenuContext = (0,
|
|
578
|
+
var import_css11 = require("@cerberus/styled-system/css");
|
|
579
|
+
var import_react5 = require("react");
|
|
580
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
581
|
+
var NavMenuContext = (0, import_react5.createContext)(null);
|
|
232
582
|
function NavMenu(props) {
|
|
233
|
-
const triggerRef = (0,
|
|
234
|
-
const menuRef = (0,
|
|
235
|
-
const [expanded, setExpanded] = (0,
|
|
236
|
-
const handleToggle = (0,
|
|
583
|
+
const triggerRef = (0, import_react5.useRef)(null);
|
|
584
|
+
const menuRef = (0, import_react5.useRef)(null);
|
|
585
|
+
const [expanded, setExpanded] = (0, import_react5.useState)(false);
|
|
586
|
+
const handleToggle = (0, import_react5.useCallback)(() => {
|
|
237
587
|
setExpanded((prev) => !prev);
|
|
238
588
|
}, []);
|
|
239
|
-
const value = (0,
|
|
589
|
+
const value = (0, import_react5.useMemo)(
|
|
240
590
|
() => ({
|
|
241
591
|
triggerRef,
|
|
242
592
|
menuRef,
|
|
@@ -245,10 +595,10 @@ function NavMenu(props) {
|
|
|
245
595
|
}),
|
|
246
596
|
[expanded, handleToggle]
|
|
247
597
|
);
|
|
248
|
-
return /* @__PURE__ */ (0,
|
|
598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(NavMenuContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
249
599
|
"nav",
|
|
250
600
|
{
|
|
251
|
-
className: (0,
|
|
601
|
+
className: (0, import_css11.css)({
|
|
252
602
|
position: "relative"
|
|
253
603
|
}),
|
|
254
604
|
children: props.children
|
|
@@ -256,26 +606,15 @@ function NavMenu(props) {
|
|
|
256
606
|
) });
|
|
257
607
|
}
|
|
258
608
|
function useNavMenuContext() {
|
|
259
|
-
const context = (0,
|
|
609
|
+
const context = (0, import_react5.useContext)(NavMenuContext);
|
|
260
610
|
if (!context) {
|
|
261
611
|
throw new Error("useNavMenuContext must be used within a NavMenu.");
|
|
262
612
|
}
|
|
263
613
|
return context;
|
|
264
614
|
}
|
|
265
615
|
|
|
266
|
-
// src/components/
|
|
267
|
-
var
|
|
268
|
-
function Show(props) {
|
|
269
|
-
const { when, children, fallback } = props;
|
|
270
|
-
const condition = (0, import_react3.useMemo)(() => when ?? false, [when]);
|
|
271
|
-
return (0, import_react3.useMemo)(() => {
|
|
272
|
-
if (condition) return children;
|
|
273
|
-
return fallback ?? null;
|
|
274
|
-
}, [condition, children, fallback]);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
// src/components/NavMenuTrigger.tsx
|
|
278
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
616
|
+
// src/components/deprecated/NavMenuTrigger.tsx
|
|
617
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
279
618
|
function NavMenuTrigger(props) {
|
|
280
619
|
const {
|
|
281
620
|
as,
|
|
@@ -294,25 +633,25 @@ function NavMenuTrigger(props) {
|
|
|
294
633
|
});
|
|
295
634
|
const hasAs = Boolean(as);
|
|
296
635
|
const AsSub = as;
|
|
297
|
-
const handleClick = (0,
|
|
636
|
+
const handleClick = (0, import_react6.useCallback)(
|
|
298
637
|
(e) => {
|
|
299
638
|
if (onClick) return onClick(e);
|
|
300
639
|
onToggle();
|
|
301
640
|
},
|
|
302
641
|
[onClick, onToggle]
|
|
303
642
|
);
|
|
304
|
-
return /* @__PURE__ */ (0,
|
|
643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
305
644
|
Show,
|
|
306
645
|
{
|
|
307
646
|
when: hasAs,
|
|
308
|
-
fallback: /* @__PURE__ */ (0,
|
|
647
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
309
648
|
"button",
|
|
310
649
|
{
|
|
311
650
|
...nativeProps,
|
|
312
651
|
...ariaProps,
|
|
313
|
-
className: (0,
|
|
652
|
+
className: (0, import_css12.cx)(
|
|
314
653
|
nativeProps.className,
|
|
315
|
-
(0,
|
|
654
|
+
(0, import_recipes10.button)({
|
|
316
655
|
palette,
|
|
317
656
|
usage,
|
|
318
657
|
shape
|
|
@@ -323,7 +662,7 @@ function NavMenuTrigger(props) {
|
|
|
323
662
|
children: props.children
|
|
324
663
|
}
|
|
325
664
|
),
|
|
326
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
665
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
327
666
|
AsSub,
|
|
328
667
|
{
|
|
329
668
|
...nativeProps,
|
|
@@ -336,11 +675,11 @@ function NavMenuTrigger(props) {
|
|
|
336
675
|
);
|
|
337
676
|
}
|
|
338
677
|
|
|
339
|
-
// src/components/NavMenuList.tsx
|
|
340
|
-
var
|
|
341
|
-
var
|
|
678
|
+
// src/components/deprecated/NavMenuList.tsx
|
|
679
|
+
var import_react7 = require("react");
|
|
680
|
+
var import_css13 = require("@cerberus/styled-system/css");
|
|
342
681
|
var import_patterns2 = require("@cerberus/styled-system/patterns");
|
|
343
|
-
var
|
|
682
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
344
683
|
function getPosition(position) {
|
|
345
684
|
const defaultPositions = {
|
|
346
685
|
left: "auto",
|
|
@@ -394,46 +733,46 @@ var navListStyles = (0, import_patterns2.vstack)({
|
|
|
394
733
|
function NavMenuList(props) {
|
|
395
734
|
const { position, ...nativeProps } = props;
|
|
396
735
|
const { menuRef, expanded } = useNavMenuContext();
|
|
397
|
-
const locationStyles = (0,
|
|
736
|
+
const locationStyles = (0, import_react7.useMemo)(
|
|
398
737
|
() => getPosition(position ?? "bottom"),
|
|
399
738
|
[position]
|
|
400
739
|
);
|
|
401
|
-
return /* @__PURE__ */ (0,
|
|
740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Show, { when: expanded, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
402
741
|
"ul",
|
|
403
742
|
{
|
|
404
743
|
...nativeProps,
|
|
405
744
|
"data-position": position ?? "bottom",
|
|
406
|
-
className: (0,
|
|
745
|
+
className: (0, import_css13.cx)(nativeProps.className, navListStyles),
|
|
407
746
|
ref: menuRef,
|
|
408
747
|
style: locationStyles
|
|
409
748
|
}
|
|
410
749
|
) });
|
|
411
750
|
}
|
|
412
751
|
|
|
413
|
-
// src/components/NavMenuLink.tsx
|
|
414
|
-
var
|
|
415
|
-
var
|
|
752
|
+
// src/components/deprecated/NavMenuLink.tsx
|
|
753
|
+
var import_css14 = require("@cerberus/styled-system/css");
|
|
754
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
416
755
|
function NavMenuLink(props) {
|
|
417
756
|
const { as, ...nativeProps } = props;
|
|
418
757
|
const hasAs = Boolean(as);
|
|
419
758
|
const AsSub = as;
|
|
420
|
-
return /* @__PURE__ */ (0,
|
|
759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
421
760
|
"li",
|
|
422
761
|
{
|
|
423
|
-
className: (0,
|
|
762
|
+
className: (0, import_css14.css)({
|
|
424
763
|
w: "full"
|
|
425
764
|
}),
|
|
426
|
-
children: /* @__PURE__ */ (0,
|
|
765
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
427
766
|
Show,
|
|
428
767
|
{
|
|
429
768
|
when: hasAs,
|
|
430
|
-
fallback: /* @__PURE__ */ (0,
|
|
769
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
431
770
|
"a",
|
|
432
771
|
{
|
|
433
772
|
...nativeProps,
|
|
434
|
-
className: (0,
|
|
773
|
+
className: (0, import_css14.cx)(
|
|
435
774
|
nativeProps.className,
|
|
436
|
-
(0,
|
|
775
|
+
(0, import_css14.css)({
|
|
437
776
|
color: "action.navigation.initial",
|
|
438
777
|
textStyle: "link",
|
|
439
778
|
_hover: {
|
|
@@ -443,105 +782,224 @@ function NavMenuLink(props) {
|
|
|
443
782
|
)
|
|
444
783
|
}
|
|
445
784
|
),
|
|
446
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
785
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AsSub, { ...nativeProps })
|
|
447
786
|
}
|
|
448
787
|
)
|
|
449
788
|
}
|
|
450
789
|
);
|
|
451
790
|
}
|
|
452
791
|
|
|
453
|
-
// src/
|
|
454
|
-
var
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
const
|
|
460
|
-
const
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
792
|
+
// src/hooks/useDate.ts
|
|
793
|
+
var import_react8 = require("react");
|
|
794
|
+
function useDate(options) {
|
|
795
|
+
const initialValue = (options == null ? void 0 : options.initialValue) ?? "";
|
|
796
|
+
const format = (options == null ? void 0 : options.format) ?? DateFormats.USMilitary;
|
|
797
|
+
const onChange = options == null ? void 0 : options.onChange;
|
|
798
|
+
const [value, setValue] = (0, import_react8.useState)(initialValue);
|
|
799
|
+
const handleChange = (0, import_react8.useCallback)(
|
|
800
|
+
(e) => {
|
|
801
|
+
const newValue = formatMilitaryDate(e.currentTarget.value);
|
|
802
|
+
if (onChange) onChange(e);
|
|
803
|
+
setValue(newValue);
|
|
804
|
+
},
|
|
805
|
+
[onChange]
|
|
806
|
+
);
|
|
807
|
+
return (0, import_react8.useMemo)(
|
|
808
|
+
() => ({
|
|
809
|
+
format,
|
|
810
|
+
value,
|
|
811
|
+
ISO: formatMilitaryToISO(value),
|
|
812
|
+
onChange: handleChange
|
|
813
|
+
}),
|
|
814
|
+
[format, value, handleChange]
|
|
468
815
|
);
|
|
469
816
|
}
|
|
470
|
-
function
|
|
817
|
+
function formatMilitaryToISO(input) {
|
|
818
|
+
const [day, month, year] = input.split(" ");
|
|
819
|
+
const monthIndex = MONTHS.findIndex((m) => m.startsWith(month));
|
|
820
|
+
const monthNum = monthIndex + 1;
|
|
821
|
+
return `${year ?? "0000"}-${monthNum.toString().padStart(2, "0")}-${day.padStart(
|
|
822
|
+
2,
|
|
823
|
+
"0"
|
|
824
|
+
)}`;
|
|
825
|
+
}
|
|
826
|
+
function formatMilitaryDate(input) {
|
|
827
|
+
let formatted = input.toUpperCase().replace(/[^0-9A-Z]/g, "");
|
|
828
|
+
let day = "";
|
|
829
|
+
let month = "";
|
|
830
|
+
let year = "";
|
|
831
|
+
if (formatted.length >= 2) {
|
|
832
|
+
day = formatted.replace(/[^0-9]/g, "").slice(0, 2);
|
|
833
|
+
const dayNum = parseInt(day, 10);
|
|
834
|
+
if (dayNum > 31) day = "31";
|
|
835
|
+
else if (dayNum === 0) day = "01";
|
|
836
|
+
formatted = formatted.slice(2);
|
|
837
|
+
}
|
|
838
|
+
if (formatted.length >= 3) {
|
|
839
|
+
month = formatted.slice(0, 3);
|
|
840
|
+
const monthIndex = MONTHS.findIndex((m) => m.startsWith(month));
|
|
841
|
+
if (monthIndex !== -1) {
|
|
842
|
+
month = MONTHS[monthIndex];
|
|
843
|
+
} else {
|
|
844
|
+
month = month.replace(/[^A-Z]/g, "");
|
|
845
|
+
}
|
|
846
|
+
formatted = formatted.slice(3);
|
|
847
|
+
}
|
|
848
|
+
if (formatted.length > 0) {
|
|
849
|
+
year = formatted.slice(0, 4);
|
|
850
|
+
}
|
|
851
|
+
return [day, month, year].filter(Boolean).join(" ");
|
|
852
|
+
}
|
|
853
|
+
function formatISOToMilitary(date) {
|
|
854
|
+
const [year, month, day] = date.split("-");
|
|
855
|
+
const monthIndex = parseInt(month, 10) - 1;
|
|
856
|
+
const monthStr = MONTHS[monthIndex];
|
|
857
|
+
return `${day} ${monthStr} ${year}`;
|
|
858
|
+
}
|
|
859
|
+
var DateFormats = {
|
|
860
|
+
get ISO() {
|
|
861
|
+
return "YYYY-MM-DD";
|
|
862
|
+
},
|
|
863
|
+
get USMilitary() {
|
|
864
|
+
return "DD MMM YYYY";
|
|
865
|
+
},
|
|
866
|
+
get Months() {
|
|
867
|
+
return MONTHS;
|
|
868
|
+
}
|
|
869
|
+
};
|
|
870
|
+
var MONTHS = [
|
|
871
|
+
"JAN",
|
|
872
|
+
"FEB",
|
|
873
|
+
"MAR",
|
|
874
|
+
"APR",
|
|
875
|
+
"MAY",
|
|
876
|
+
"JUN",
|
|
877
|
+
"JUL",
|
|
878
|
+
"AUG",
|
|
879
|
+
"SEP",
|
|
880
|
+
"OCT",
|
|
881
|
+
"NOV",
|
|
882
|
+
"DEC"
|
|
883
|
+
];
|
|
884
|
+
|
|
885
|
+
// src/hooks/useModal.ts
|
|
886
|
+
var import_react9 = require("react");
|
|
887
|
+
function useModal() {
|
|
888
|
+
const modalRef = (0, import_react9.useRef)(null);
|
|
889
|
+
const [isOpen, setIsOpen] = (0, import_react9.useState)(false);
|
|
890
|
+
const show = (0, import_react9.useCallback)(() => {
|
|
891
|
+
var _a;
|
|
892
|
+
(_a = modalRef.current) == null ? void 0 : _a.showModal();
|
|
893
|
+
setIsOpen(true);
|
|
894
|
+
}, []);
|
|
895
|
+
const close = (0, import_react9.useCallback)(() => {
|
|
896
|
+
var _a;
|
|
897
|
+
(_a = modalRef.current) == null ? void 0 : _a.close();
|
|
898
|
+
setIsOpen(false);
|
|
899
|
+
}, []);
|
|
900
|
+
return (0, import_react9.useMemo)(() => {
|
|
901
|
+
return {
|
|
902
|
+
modalRef,
|
|
903
|
+
show,
|
|
904
|
+
close,
|
|
905
|
+
isOpen
|
|
906
|
+
};
|
|
907
|
+
}, [modalRef, show, close, isOpen]);
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
// src/hooks/useToggle.ts
|
|
911
|
+
var import_react10 = require("react");
|
|
912
|
+
function useToggle(options) {
|
|
913
|
+
const [checked, setChecked] = (0, import_react10.useState)((options == null ? void 0 : options.checked) ?? "");
|
|
914
|
+
const onChange = options == null ? void 0 : options.onChange;
|
|
915
|
+
const handleChange = (0, import_react10.useCallback)(
|
|
916
|
+
(e) => {
|
|
917
|
+
const target = e.currentTarget;
|
|
918
|
+
setChecked((prev) => {
|
|
919
|
+
return prev === target.value ? "" : target.value;
|
|
920
|
+
});
|
|
921
|
+
onChange == null ? void 0 : onChange(e);
|
|
922
|
+
},
|
|
923
|
+
[onChange]
|
|
924
|
+
);
|
|
925
|
+
return (0, import_react10.useMemo)(() => ({ checked, handleChange }), [checked, handleChange]);
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
// src/components/Accordion.tsx
|
|
929
|
+
var import_react11 = require("@ark-ui/react");
|
|
930
|
+
var import_css15 = require("@cerberus/styled-system/css");
|
|
931
|
+
var import_recipes11 = require("@cerberus/styled-system/recipes");
|
|
932
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
933
|
+
function Accordion(props) {
|
|
934
|
+
const { size, className, ...rootProps } = props;
|
|
935
|
+
const styles = (0, import_recipes11.accordion)({ size });
|
|
936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
937
|
+
import_react11.Accordion.Root,
|
|
938
|
+
{
|
|
939
|
+
collapsible: true,
|
|
940
|
+
className: (0, import_css15.cx)(className, styles.root),
|
|
941
|
+
...rootProps
|
|
942
|
+
}
|
|
943
|
+
);
|
|
944
|
+
}
|
|
945
|
+
function AccordionItem(props) {
|
|
471
946
|
const { size, ...itemProps } = props;
|
|
472
|
-
const styles = (0,
|
|
473
|
-
return /* @__PURE__ */ (0,
|
|
474
|
-
|
|
947
|
+
const styles = (0, import_recipes11.accordion)({ size });
|
|
948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
949
|
+
import_react11.Accordion.Item,
|
|
475
950
|
{
|
|
476
951
|
...itemProps,
|
|
477
|
-
className: (0,
|
|
952
|
+
className: (0, import_css15.cx)(itemProps.className, styles.item)
|
|
478
953
|
}
|
|
479
954
|
);
|
|
480
955
|
}
|
|
481
956
|
function AccordionItemTrigger(props) {
|
|
482
957
|
const { size, ...triggerProps } = props;
|
|
483
|
-
const styles = (0,
|
|
484
|
-
return /* @__PURE__ */ (0,
|
|
485
|
-
|
|
958
|
+
const styles = (0, import_recipes11.accordion)({ size });
|
|
959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
960
|
+
import_react11.Accordion.ItemTrigger,
|
|
486
961
|
{
|
|
487
962
|
...triggerProps,
|
|
488
|
-
className: (0,
|
|
963
|
+
className: (0, import_css15.cx)(triggerProps.className, styles.itemTrigger)
|
|
489
964
|
}
|
|
490
965
|
);
|
|
491
966
|
}
|
|
492
967
|
function AccordionItemContent(props) {
|
|
493
968
|
const { size, ...contentProps } = props;
|
|
494
|
-
const styles = (0,
|
|
495
|
-
return /* @__PURE__ */ (0,
|
|
496
|
-
|
|
969
|
+
const styles = (0, import_recipes11.accordion)({ size });
|
|
970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
971
|
+
import_react11.Accordion.ItemContent,
|
|
497
972
|
{
|
|
498
973
|
...contentProps,
|
|
499
|
-
className: (0,
|
|
974
|
+
className: (0, import_css15.cx)(contentProps.className, styles.itemContent)
|
|
500
975
|
}
|
|
501
976
|
);
|
|
502
977
|
}
|
|
503
978
|
|
|
504
979
|
// src/components/Accordion.client.tsx
|
|
505
|
-
var
|
|
506
|
-
var
|
|
507
|
-
var
|
|
508
|
-
|
|
509
|
-
// src/context/cerberus.tsx
|
|
510
|
-
var import_react7 = require("react");
|
|
511
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
512
|
-
var CerberusContext = (0, import_react7.createContext)(null);
|
|
513
|
-
function CerberusProvider(props) {
|
|
514
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CerberusContext.Provider, { value: props.config, children: props.children });
|
|
515
|
-
}
|
|
516
|
-
function useCerberusContext() {
|
|
517
|
-
const context = (0, import_react7.useContext)(CerberusContext);
|
|
518
|
-
if (!context) {
|
|
519
|
-
throw new Error("useCerberus must be used within a CerberusProvider");
|
|
520
|
-
}
|
|
521
|
-
return context;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
// src/components/Accordion.client.tsx
|
|
525
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
980
|
+
var import_react12 = require("@ark-ui/react");
|
|
981
|
+
var import_css16 = require("@cerberus/styled-system/css");
|
|
982
|
+
var import_recipes12 = require("@cerberus/styled-system/recipes");
|
|
983
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
526
984
|
function AccordionItemIndicator(props) {
|
|
527
985
|
const { size, ...indicatorProps } = props;
|
|
528
|
-
const styles = (0,
|
|
986
|
+
const styles = (0, import_recipes12.accordion)({ size });
|
|
529
987
|
const iconSize = size === "sm" ? 16 : "24";
|
|
530
988
|
const { icons } = useCerberusContext();
|
|
531
989
|
const ChevronDown = icons.accordionIndicator;
|
|
532
|
-
return /* @__PURE__ */ (0,
|
|
533
|
-
|
|
990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
991
|
+
import_react12.Accordion.ItemIndicator,
|
|
534
992
|
{
|
|
535
993
|
...indicatorProps,
|
|
536
|
-
className: (0,
|
|
537
|
-
children: /* @__PURE__ */ (0,
|
|
994
|
+
className: (0, import_css16.cx)(indicatorProps.className, styles.itemIndicator),
|
|
995
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronDown, { size: iconSize })
|
|
538
996
|
}
|
|
539
997
|
);
|
|
540
998
|
}
|
|
541
999
|
|
|
542
1000
|
// src/components/AccordionItemGroup.tsx
|
|
543
|
-
var
|
|
544
|
-
var
|
|
1001
|
+
var import_css17 = require("@cerberus/styled-system/css");
|
|
1002
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
545
1003
|
function AccordionItemGroup(props) {
|
|
546
1004
|
const {
|
|
547
1005
|
size,
|
|
@@ -554,26 +1012,26 @@ function AccordionItemGroup(props) {
|
|
|
554
1012
|
gap: "md",
|
|
555
1013
|
justifyContent: "flex-start"
|
|
556
1014
|
} : void 0;
|
|
557
|
-
return /* @__PURE__ */ (0,
|
|
558
|
-
/* @__PURE__ */ (0,
|
|
559
|
-
/* @__PURE__ */ (0,
|
|
1015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(AccordionItem, { ...itemProps, children: [
|
|
1016
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(AccordionItemTrigger, { className: (0, import_css17.css)(triggerStyles), size, children: [
|
|
1017
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Show, { when: indicatorPosition === "start", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AccordionItemIndicator, { size }) }),
|
|
560
1018
|
heading,
|
|
561
|
-
/* @__PURE__ */ (0,
|
|
1019
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Show, { when: indicatorPosition === "end", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AccordionItemIndicator, { size }) })
|
|
562
1020
|
] }),
|
|
563
|
-
/* @__PURE__ */ (0,
|
|
1021
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AccordionItemContent, { size, children })
|
|
564
1022
|
] });
|
|
565
1023
|
}
|
|
566
1024
|
|
|
567
1025
|
// src/components/Admonition.tsx
|
|
568
|
-
var
|
|
569
|
-
var
|
|
1026
|
+
var import_recipes14 = require("@cerberus/styled-system/recipes");
|
|
1027
|
+
var import_css19 = require("@cerberus/styled-system/css");
|
|
570
1028
|
var import_patterns4 = require("@cerberus/styled-system/patterns");
|
|
571
1029
|
|
|
572
1030
|
// src/components/Avatar.tsx
|
|
573
|
-
var
|
|
1031
|
+
var import_css18 = require("@cerberus/styled-system/css");
|
|
574
1032
|
var import_patterns3 = require("@cerberus/styled-system/patterns");
|
|
575
|
-
var
|
|
576
|
-
var
|
|
1033
|
+
var import_recipes13 = require("@cerberus/styled-system/recipes");
|
|
1034
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
577
1035
|
function Avatar(props) {
|
|
578
1036
|
const {
|
|
579
1037
|
ariaLabel,
|
|
@@ -589,28 +1047,28 @@ function Avatar(props) {
|
|
|
589
1047
|
const { icons } = useCerberusContext();
|
|
590
1048
|
const { avatar: AvatarIcon } = icons;
|
|
591
1049
|
const initials = (ariaLabel || "").split(" ").map((word) => word[0]).join("").slice(0, 2);
|
|
592
|
-
return /* @__PURE__ */ (0,
|
|
1050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
593
1051
|
"div",
|
|
594
1052
|
{
|
|
595
1053
|
...nativeProps,
|
|
596
|
-
className: (0,
|
|
1054
|
+
className: (0, import_css18.cx)(
|
|
597
1055
|
nativeProps.className,
|
|
598
|
-
(0,
|
|
1056
|
+
(0, import_recipes13.avatar)({ gradient, size }),
|
|
599
1057
|
(0, import_patterns3.circle)()
|
|
600
1058
|
),
|
|
601
|
-
children: /* @__PURE__ */ (0,
|
|
1059
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
602
1060
|
Show,
|
|
603
1061
|
{
|
|
604
1062
|
when: Boolean(src) || Boolean(as),
|
|
605
|
-
fallback: /* @__PURE__ */ (0,
|
|
1063
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
606
1064
|
Show,
|
|
607
1065
|
{
|
|
608
1066
|
when: Boolean(initials),
|
|
609
|
-
fallback: /* @__PURE__ */ (0,
|
|
1067
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
610
1068
|
Show,
|
|
611
1069
|
{
|
|
612
1070
|
when: Boolean(icon),
|
|
613
|
-
fallback: /* @__PURE__ */ (0,
|
|
1071
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
614
1072
|
AvatarIcon,
|
|
615
1073
|
{
|
|
616
1074
|
size: iconSizeMap[size]
|
|
@@ -622,15 +1080,15 @@ function Avatar(props) {
|
|
|
622
1080
|
children: initials
|
|
623
1081
|
}
|
|
624
1082
|
),
|
|
625
|
-
children: /* @__PURE__ */ (0,
|
|
1083
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
626
1084
|
Show,
|
|
627
1085
|
{
|
|
628
1086
|
when: Boolean(as),
|
|
629
|
-
fallback: /* @__PURE__ */ (0,
|
|
1087
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
630
1088
|
"img",
|
|
631
1089
|
{
|
|
632
1090
|
alt: props.ariaLabel,
|
|
633
|
-
className: (0,
|
|
1091
|
+
className: (0, import_css18.css)({
|
|
634
1092
|
h: "full",
|
|
635
1093
|
objectFit: "cover",
|
|
636
1094
|
w: "full"
|
|
@@ -662,7 +1120,7 @@ var iconSizeMap = {
|
|
|
662
1120
|
};
|
|
663
1121
|
|
|
664
1122
|
// src/components/Admonition.client.tsx
|
|
665
|
-
var
|
|
1123
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
666
1124
|
function MatchAvatar(props) {
|
|
667
1125
|
const { icons } = useCerberusContext();
|
|
668
1126
|
const {
|
|
@@ -673,56 +1131,56 @@ function MatchAvatar(props) {
|
|
|
673
1131
|
} = icons;
|
|
674
1132
|
switch (props.palette) {
|
|
675
1133
|
case "page":
|
|
676
|
-
return /* @__PURE__ */ (0,
|
|
1134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
677
1135
|
Avatar,
|
|
678
1136
|
{
|
|
679
1137
|
gradient: "charon-light",
|
|
680
1138
|
ariaLabel: "",
|
|
681
|
-
icon: /* @__PURE__ */ (0,
|
|
1139
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InfoIcon, {}),
|
|
682
1140
|
size: "sm",
|
|
683
1141
|
src: ""
|
|
684
1142
|
}
|
|
685
1143
|
);
|
|
686
1144
|
case "info":
|
|
687
|
-
return /* @__PURE__ */ (0,
|
|
1145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
688
1146
|
Avatar,
|
|
689
1147
|
{
|
|
690
1148
|
gradient: "amphiaraus-dark",
|
|
691
1149
|
ariaLabel: "",
|
|
692
|
-
icon: /* @__PURE__ */ (0,
|
|
1150
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InfoIcon, {}),
|
|
693
1151
|
size: "sm",
|
|
694
1152
|
src: ""
|
|
695
1153
|
}
|
|
696
1154
|
);
|
|
697
1155
|
case "success":
|
|
698
|
-
return /* @__PURE__ */ (0,
|
|
1156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
699
1157
|
Avatar,
|
|
700
1158
|
{
|
|
701
1159
|
gradient: "thanatos-dark",
|
|
702
1160
|
ariaLabel: "",
|
|
703
|
-
icon: /* @__PURE__ */ (0,
|
|
1161
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SuccessIcon, {}),
|
|
704
1162
|
size: "sm",
|
|
705
1163
|
src: ""
|
|
706
1164
|
}
|
|
707
1165
|
);
|
|
708
1166
|
case "warning":
|
|
709
|
-
return /* @__PURE__ */ (0,
|
|
1167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
710
1168
|
Avatar,
|
|
711
1169
|
{
|
|
712
1170
|
gradient: "asphodel-light",
|
|
713
1171
|
ariaLabel: "",
|
|
714
|
-
icon: /* @__PURE__ */ (0,
|
|
1172
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(WarningIcon, {}),
|
|
715
1173
|
size: "sm",
|
|
716
1174
|
src: ""
|
|
717
1175
|
}
|
|
718
1176
|
);
|
|
719
1177
|
case "danger":
|
|
720
|
-
return /* @__PURE__ */ (0,
|
|
1178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
721
1179
|
Avatar,
|
|
722
1180
|
{
|
|
723
1181
|
gradient: "hades-light",
|
|
724
1182
|
ariaLabel: "",
|
|
725
|
-
icon: /* @__PURE__ */ (0,
|
|
1183
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DangerIcon, {}),
|
|
726
1184
|
size: "sm",
|
|
727
1185
|
src: ""
|
|
728
1186
|
}
|
|
@@ -733,161 +1191,296 @@ function MatchAvatar(props) {
|
|
|
733
1191
|
}
|
|
734
1192
|
|
|
735
1193
|
// src/components/Admonition.tsx
|
|
736
|
-
var
|
|
1194
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
737
1195
|
function Admonition(props) {
|
|
738
1196
|
const { children, palette = "page", usage, icon, ...nativeProps } = props;
|
|
739
|
-
return /* @__PURE__ */ (0,
|
|
1197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
740
1198
|
"aside",
|
|
741
1199
|
{
|
|
742
1200
|
...nativeProps,
|
|
743
|
-
className: (0,
|
|
1201
|
+
className: (0, import_css19.cx)(
|
|
744
1202
|
nativeProps.className,
|
|
745
1203
|
(0, import_patterns4.hstack)({
|
|
746
1204
|
gap: "md",
|
|
747
1205
|
w: "full"
|
|
748
1206
|
}),
|
|
749
|
-
(0,
|
|
1207
|
+
(0, import_recipes14.admonition)({ palette, usage }).root
|
|
750
1208
|
),
|
|
751
1209
|
children: [
|
|
752
|
-
/* @__PURE__ */ (0,
|
|
753
|
-
/* @__PURE__ */ (0,
|
|
1210
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Show, { when: Boolean(icon), fallback: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MatchAvatar, { palette }), children: icon }),
|
|
1211
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children })
|
|
754
1212
|
]
|
|
755
1213
|
}
|
|
756
1214
|
);
|
|
757
1215
|
}
|
|
758
1216
|
function AdmonitionHeading(props) {
|
|
759
1217
|
const { palette, usage, ...nativeProps } = props;
|
|
760
|
-
return /* @__PURE__ */ (0,
|
|
1218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
761
1219
|
"p",
|
|
762
1220
|
{
|
|
763
1221
|
...nativeProps,
|
|
764
|
-
className: (0,
|
|
1222
|
+
className: (0, import_css19.cx)(
|
|
765
1223
|
nativeProps.className,
|
|
766
|
-
(0,
|
|
1224
|
+
(0, import_recipes14.admonition)({ palette, usage }).heading
|
|
767
1225
|
)
|
|
768
1226
|
}
|
|
769
1227
|
);
|
|
770
1228
|
}
|
|
771
1229
|
function AdmonitionDescription(props) {
|
|
772
1230
|
const { palette, usage, ...nativeProps } = props;
|
|
773
|
-
return /* @__PURE__ */ (0,
|
|
1231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
774
1232
|
"p",
|
|
775
1233
|
{
|
|
776
1234
|
...nativeProps,
|
|
777
|
-
className: (0,
|
|
1235
|
+
className: (0, import_css19.cx)(
|
|
778
1236
|
nativeProps.className,
|
|
779
|
-
(0,
|
|
1237
|
+
(0, import_recipes14.admonition)({ palette, usage }).description
|
|
780
1238
|
)
|
|
781
1239
|
}
|
|
782
1240
|
);
|
|
783
1241
|
}
|
|
784
1242
|
|
|
785
|
-
// src/components/
|
|
786
|
-
var
|
|
787
|
-
var
|
|
788
|
-
var
|
|
1243
|
+
// src/components/button/button.tsx
|
|
1244
|
+
var import_react13 = require("react");
|
|
1245
|
+
var import_css20 = require("@cerberus/styled-system/css");
|
|
1246
|
+
var import_recipes15 = require("@cerberus/styled-system/recipes");
|
|
1247
|
+
var import_jsx2 = require("@cerberus/styled-system/jsx");
|
|
1248
|
+
|
|
1249
|
+
// src/components/Spinner.tsx
|
|
1250
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1251
|
+
function Spinner(props) {
|
|
1252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1253
|
+
"svg",
|
|
1254
|
+
{
|
|
1255
|
+
"aria-busy": "true",
|
|
1256
|
+
role: "status",
|
|
1257
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1258
|
+
height: props.size,
|
|
1259
|
+
width: props.size,
|
|
1260
|
+
viewBox: "0 0 24 24",
|
|
1261
|
+
...props,
|
|
1262
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1263
|
+
"g",
|
|
1264
|
+
{
|
|
1265
|
+
fill: "none",
|
|
1266
|
+
stroke: "currentColor",
|
|
1267
|
+
strokeLinecap: "round",
|
|
1268
|
+
strokeLinejoin: "round",
|
|
1269
|
+
strokeWidth: 2,
|
|
1270
|
+
children: [
|
|
1271
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1272
|
+
"path",
|
|
1273
|
+
{
|
|
1274
|
+
strokeDasharray: 16,
|
|
1275
|
+
strokeDashoffset: 16,
|
|
1276
|
+
d: "M12 3c4.97 0 9 4.03 9 9",
|
|
1277
|
+
children: [
|
|
1278
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1279
|
+
"animate",
|
|
1280
|
+
{
|
|
1281
|
+
fill: "freeze",
|
|
1282
|
+
attributeName: "stroke-dashoffset",
|
|
1283
|
+
dur: "0.15s",
|
|
1284
|
+
values: "16;0"
|
|
1285
|
+
}
|
|
1286
|
+
),
|
|
1287
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1288
|
+
"animateTransform",
|
|
1289
|
+
{
|
|
1290
|
+
attributeName: "transform",
|
|
1291
|
+
dur: "0.75s",
|
|
1292
|
+
repeatCount: "indefinite",
|
|
1293
|
+
type: "rotate",
|
|
1294
|
+
values: "0 12 12;360 12 12"
|
|
1295
|
+
}
|
|
1296
|
+
)
|
|
1297
|
+
]
|
|
1298
|
+
}
|
|
1299
|
+
),
|
|
1300
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1301
|
+
"path",
|
|
1302
|
+
{
|
|
1303
|
+
strokeDasharray: 64,
|
|
1304
|
+
strokeDashoffset: 64,
|
|
1305
|
+
strokeOpacity: 0.3,
|
|
1306
|
+
d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z",
|
|
1307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1308
|
+
"animate",
|
|
1309
|
+
{
|
|
1310
|
+
fill: "freeze",
|
|
1311
|
+
attributeName: "stroke-dashoffset",
|
|
1312
|
+
dur: "0.6s",
|
|
1313
|
+
values: "64;0"
|
|
1314
|
+
}
|
|
1315
|
+
)
|
|
1316
|
+
}
|
|
1317
|
+
)
|
|
1318
|
+
]
|
|
1319
|
+
}
|
|
1320
|
+
)
|
|
1321
|
+
}
|
|
1322
|
+
);
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
// src/components/button/button.tsx
|
|
1326
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1327
|
+
var ButtonContext = (0, import_react13.createContext)({
|
|
1328
|
+
pending: false
|
|
1329
|
+
});
|
|
789
1330
|
function Button(props) {
|
|
790
|
-
const { palette, usage, shape, ...nativeProps } = props;
|
|
791
|
-
|
|
1331
|
+
const { palette, usage, shape, size, pending = false, ...nativeProps } = props;
|
|
1332
|
+
const value = (0, import_react13.useMemo)(() => ({ pending }), [pending]);
|
|
1333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ButtonContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
792
1334
|
"button",
|
|
793
1335
|
{
|
|
794
1336
|
...nativeProps,
|
|
795
|
-
|
|
1337
|
+
disabled: pending || nativeProps.disabled,
|
|
1338
|
+
className: (0, import_css20.cx)(
|
|
796
1339
|
nativeProps.className,
|
|
797
|
-
(0,
|
|
1340
|
+
(0, import_recipes15.button)({
|
|
798
1341
|
palette,
|
|
799
1342
|
usage,
|
|
800
|
-
shape
|
|
1343
|
+
shape,
|
|
1344
|
+
size
|
|
801
1345
|
})
|
|
802
1346
|
)
|
|
803
1347
|
}
|
|
804
|
-
);
|
|
1348
|
+
) });
|
|
1349
|
+
}
|
|
1350
|
+
function ButtonIcon(props) {
|
|
1351
|
+
const { pending } = (0, import_react13.useContext)(ButtonContext);
|
|
1352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Show, { when: pending, fallback: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jsx_runtime24.Fragment, { children: props.children }), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jsx2.Box, { w: "4", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Spinner, {}) }) });
|
|
805
1353
|
}
|
|
806
1354
|
|
|
807
|
-
// src/components/
|
|
808
|
-
var
|
|
809
|
-
|
|
810
|
-
|
|
1355
|
+
// src/components/button/parts.ts
|
|
1356
|
+
var ButtonParts = {
|
|
1357
|
+
Root: Button,
|
|
1358
|
+
Icon: ButtonIcon
|
|
1359
|
+
};
|
|
811
1360
|
|
|
812
|
-
// src/
|
|
813
|
-
var
|
|
814
|
-
var
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
1361
|
+
// src/components/Text.tsx
|
|
1362
|
+
var import_jsx3 = require("@cerberus/styled-system/jsx");
|
|
1363
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1364
|
+
function Text(props) {
|
|
1365
|
+
const { as = "p", ...pandaJSXProps } = props;
|
|
1366
|
+
switch (as) {
|
|
1367
|
+
case "h1":
|
|
1368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx3.H1, { ...pandaJSXProps });
|
|
1369
|
+
case "h2":
|
|
1370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx3.H2, { ...pandaJSXProps });
|
|
1371
|
+
case "h3":
|
|
1372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx3.H3, { ...pandaJSXProps });
|
|
1373
|
+
case "h4":
|
|
1374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx3.H4, { ...pandaJSXProps });
|
|
1375
|
+
case "h5":
|
|
1376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx3.H5, { ...pandaJSXProps });
|
|
1377
|
+
case "h6":
|
|
1378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx3.H6, { ...pandaJSXProps });
|
|
1379
|
+
case "strong":
|
|
1380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx3.Strong, { ...pandaJSXProps });
|
|
1381
|
+
case "em":
|
|
1382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx3.Em, { ...pandaJSXProps });
|
|
1383
|
+
case "small":
|
|
1384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx3.Small, { ...pandaJSXProps });
|
|
1385
|
+
case "span":
|
|
1386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx3.Span, { ...pandaJSXProps });
|
|
1387
|
+
default:
|
|
1388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx3.P, { ...pandaJSXProps });
|
|
832
1389
|
}
|
|
833
|
-
return context;
|
|
834
1390
|
}
|
|
835
1391
|
|
|
836
|
-
// src/components/
|
|
837
|
-
var
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
const
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
851
|
-
"div",
|
|
1392
|
+
// src/components/checkbox/primitives.tsx
|
|
1393
|
+
var import_react14 = require("@ark-ui/react");
|
|
1394
|
+
var import_css21 = require("@cerberus/styled-system/css");
|
|
1395
|
+
var import_recipes16 = require("@cerberus/styled-system/recipes");
|
|
1396
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1397
|
+
function CheckboxRoot(props) {
|
|
1398
|
+
const styles = (0, import_recipes16.checkbox)();
|
|
1399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react14.Checkbox.Root, { ...props, className: (0, import_css21.cx)(styles.root, props.className) });
|
|
1400
|
+
}
|
|
1401
|
+
function CheckboxLabel(props) {
|
|
1402
|
+
const { size, ...labelProps } = props;
|
|
1403
|
+
const styles = (0, import_recipes16.checkbox)({ size });
|
|
1404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1405
|
+
import_react14.Checkbox.Label,
|
|
852
1406
|
{
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
1407
|
+
...labelProps,
|
|
1408
|
+
className: (0, import_css21.cx)(styles.label, labelProps.className)
|
|
1409
|
+
}
|
|
1410
|
+
);
|
|
1411
|
+
}
|
|
1412
|
+
function CheckboxControl(props) {
|
|
1413
|
+
const { size, ...controlProps } = props;
|
|
1414
|
+
const styles = (0, import_recipes16.checkbox)({ size });
|
|
1415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1416
|
+
import_react14.Checkbox.Control,
|
|
1417
|
+
{
|
|
1418
|
+
...controlProps,
|
|
1419
|
+
className: (0, import_css21.cx)(styles.control, controlProps.className)
|
|
1420
|
+
}
|
|
1421
|
+
);
|
|
1422
|
+
}
|
|
1423
|
+
function CheckboxIndicator(props) {
|
|
1424
|
+
const styles = (0, import_recipes16.checkbox)();
|
|
1425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1426
|
+
import_react14.Checkbox.Indicator,
|
|
1427
|
+
{
|
|
1428
|
+
...props,
|
|
1429
|
+
className: (0, import_css21.cx)(styles.indicator, props.className)
|
|
876
1430
|
}
|
|
877
1431
|
);
|
|
878
1432
|
}
|
|
1433
|
+
function CheckboxHiddenInput(props) {
|
|
1434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react14.Checkbox.HiddenInput, { ...props });
|
|
1435
|
+
}
|
|
1436
|
+
function CheckboxGroup(props) {
|
|
1437
|
+
const styles = (0, import_recipes16.checkbox)();
|
|
1438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react14.Checkbox.Group, { ...props, className: (0, import_css21.cx)(styles.group, props.className) });
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
// src/components/checkbox/parts.ts
|
|
1442
|
+
var CheckboxParts = {
|
|
1443
|
+
Root: CheckboxRoot,
|
|
1444
|
+
Label: CheckboxLabel,
|
|
1445
|
+
Control: CheckboxControl,
|
|
1446
|
+
Indicator: CheckboxIndicator,
|
|
1447
|
+
HiddenInput: CheckboxHiddenInput,
|
|
1448
|
+
Group: CheckboxGroup
|
|
1449
|
+
};
|
|
1450
|
+
|
|
1451
|
+
// src/components/checkbox/checkbox-icon.tsx
|
|
1452
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1453
|
+
function CheckboxIcon(props) {
|
|
1454
|
+
const { icons } = useCerberusContext();
|
|
1455
|
+
const { checkbox: CheckIcon, indeterminate: IndeterminateIcon2 } = icons;
|
|
1456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CheckboxParts.Indicator, { indeterminate: props.indeterminate, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Show, { when: props.indeterminate, fallback: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CheckIcon, {}), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IndeterminateIcon2, {}) }) });
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
// src/components/checkbox/checkbox.tsx
|
|
1460
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1461
|
+
function Checkbox2(props) {
|
|
1462
|
+
const { size, children, ...rootProps } = props;
|
|
1463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(CheckboxParts.Root, { ...rootProps, children: [
|
|
1464
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CheckboxParts.Control, { size, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CheckboxIcon, { indeterminate: rootProps.checked === "indeterminate" }) }),
|
|
1465
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(CheckboxParts.Label, { size, children: [
|
|
1466
|
+
children,
|
|
1467
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Show, { when: props.required, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { as: "span", "data-part": "required-indicator", children: "(required)" }) })
|
|
1468
|
+
] }),
|
|
1469
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CheckboxParts.HiddenInput, {})
|
|
1470
|
+
] });
|
|
1471
|
+
}
|
|
879
1472
|
|
|
880
1473
|
// src/components/CircularProgress.tsx
|
|
881
|
-
var
|
|
882
|
-
var
|
|
883
|
-
var
|
|
1474
|
+
var import_patterns5 = require("@cerberus/styled-system/patterns");
|
|
1475
|
+
var import_css22 = require("@cerberus/styled-system/css");
|
|
1476
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
884
1477
|
function CircularProgress(props) {
|
|
885
1478
|
const strokeW = 14;
|
|
886
1479
|
const radius = `calc(50% * (1 - ${strokeW}/100))`;
|
|
887
1480
|
const status = props.syntax ?? "Done";
|
|
888
1481
|
const now = props.now >= 100 ? 100 : props.now;
|
|
889
1482
|
const bgStyle = props.bgStyle ?? "filled";
|
|
890
|
-
return /* @__PURE__ */ (0,
|
|
1483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
891
1484
|
"div",
|
|
892
1485
|
{
|
|
893
1486
|
id: props.id,
|
|
@@ -895,18 +1488,18 @@ function CircularProgress(props) {
|
|
|
895
1488
|
"aria-valuemin": 0,
|
|
896
1489
|
"aria-valuemax": 100,
|
|
897
1490
|
"aria-valuenow": now,
|
|
898
|
-
className: (0,
|
|
1491
|
+
className: (0, import_patterns5.cq)({
|
|
899
1492
|
alignSelf: "stretch",
|
|
900
1493
|
flex: 1,
|
|
901
1494
|
m: "4px",
|
|
902
1495
|
position: "relative"
|
|
903
1496
|
}),
|
|
904
1497
|
role: "progressbar",
|
|
905
|
-
children: /* @__PURE__ */ (0,
|
|
1498
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
906
1499
|
"svg",
|
|
907
1500
|
{
|
|
908
1501
|
"data-complete": now === 100,
|
|
909
|
-
className: (0,
|
|
1502
|
+
className: (0, import_css22.css)({
|
|
910
1503
|
display: "block",
|
|
911
1504
|
rounded: "full",
|
|
912
1505
|
transition: "all 0.5s ease"
|
|
@@ -917,17 +1510,17 @@ function CircularProgress(props) {
|
|
|
917
1510
|
viewBox: "0 0 100 100",
|
|
918
1511
|
xmlns: "http://www.w3.org/2000/svg",
|
|
919
1512
|
children: [
|
|
920
|
-
/* @__PURE__ */ (0,
|
|
921
|
-
/* @__PURE__ */ (0,
|
|
922
|
-
/* @__PURE__ */ (0,
|
|
923
|
-
/* @__PURE__ */ (0,
|
|
1513
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("title", { children: props.title }),
|
|
1514
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("desc", { children: `${now}% ${status}` }),
|
|
1515
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("linearGradient", { id: "gradient", children: [
|
|
1516
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
924
1517
|
"stop",
|
|
925
1518
|
{
|
|
926
1519
|
offset: "0%",
|
|
927
1520
|
stopColor: "var(--cerberus-colors-data-viz-progress-start)"
|
|
928
1521
|
}
|
|
929
1522
|
),
|
|
930
|
-
/* @__PURE__ */ (0,
|
|
1523
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
931
1524
|
"stop",
|
|
932
1525
|
{
|
|
933
1526
|
offset: "100%",
|
|
@@ -935,10 +1528,10 @@ function CircularProgress(props) {
|
|
|
935
1528
|
}
|
|
936
1529
|
)
|
|
937
1530
|
] }) }),
|
|
938
|
-
/* @__PURE__ */ (0,
|
|
1531
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Show, { when: bgStyle === "filled", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
939
1532
|
"circle",
|
|
940
1533
|
{
|
|
941
|
-
className: (0,
|
|
1534
|
+
className: (0, import_css22.css)({
|
|
942
1535
|
fill: "page.surface.initial"
|
|
943
1536
|
}),
|
|
944
1537
|
cx: "50%",
|
|
@@ -947,10 +1540,10 @@ function CircularProgress(props) {
|
|
|
947
1540
|
pathLength: "100"
|
|
948
1541
|
}
|
|
949
1542
|
) }),
|
|
950
|
-
/* @__PURE__ */ (0,
|
|
1543
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
951
1544
|
"circle",
|
|
952
1545
|
{
|
|
953
|
-
className: (0,
|
|
1546
|
+
className: (0, import_css22.css)({
|
|
954
1547
|
stroke: "page.bg.100"
|
|
955
1548
|
}),
|
|
956
1549
|
cx: "50%",
|
|
@@ -959,11 +1552,11 @@ function CircularProgress(props) {
|
|
|
959
1552
|
pathLength: "100"
|
|
960
1553
|
}
|
|
961
1554
|
),
|
|
962
|
-
/* @__PURE__ */ (0,
|
|
1555
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
963
1556
|
"circle",
|
|
964
1557
|
{
|
|
965
1558
|
"data-complete": now === 100,
|
|
966
|
-
className: (0,
|
|
1559
|
+
className: (0, import_css22.css)({
|
|
967
1560
|
stroke: "url(#gradient)",
|
|
968
1561
|
transition: "stroke-dashoffset, stroke 0.5s ease",
|
|
969
1562
|
_isComplete: {
|
|
@@ -980,11 +1573,11 @@ function CircularProgress(props) {
|
|
|
980
1573
|
transform: "rotate(-90 50 50)"
|
|
981
1574
|
}
|
|
982
1575
|
),
|
|
983
|
-
/* @__PURE__ */ (0,
|
|
984
|
-
/* @__PURE__ */ (0,
|
|
1576
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("g", { children: [
|
|
1577
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
985
1578
|
"text",
|
|
986
1579
|
{
|
|
987
|
-
className: (0,
|
|
1580
|
+
className: (0, import_css22.css)({
|
|
988
1581
|
fill: "page.text.initial",
|
|
989
1582
|
fontFamily: "mono",
|
|
990
1583
|
textStyle: "1.25rem"
|
|
@@ -999,10 +1592,10 @@ function CircularProgress(props) {
|
|
|
999
1592
|
]
|
|
1000
1593
|
}
|
|
1001
1594
|
),
|
|
1002
|
-
/* @__PURE__ */ (0,
|
|
1595
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1003
1596
|
"text",
|
|
1004
1597
|
{
|
|
1005
|
-
className: (0,
|
|
1598
|
+
className: (0, import_css22.css)({
|
|
1006
1599
|
fill: "page.text.100",
|
|
1007
1600
|
fontSize: "0.5rem",
|
|
1008
1601
|
fontWeight: 600
|
|
@@ -1023,31 +1616,31 @@ function CircularProgress(props) {
|
|
|
1023
1616
|
}
|
|
1024
1617
|
|
|
1025
1618
|
// src/components/DatePicker.client.tsx
|
|
1026
|
-
var
|
|
1619
|
+
var import_react17 = require("@ark-ui/react");
|
|
1027
1620
|
|
|
1028
1621
|
// src/components/Portal.tsx
|
|
1029
|
-
var
|
|
1030
|
-
var Portal =
|
|
1622
|
+
var import_react15 = require("@ark-ui/react");
|
|
1623
|
+
var Portal = import_react15.Portal;
|
|
1031
1624
|
|
|
1032
1625
|
// src/components/DatePicker.client.tsx
|
|
1033
|
-
var
|
|
1034
|
-
var
|
|
1626
|
+
var import_recipes19 = require("@cerberus/styled-system/recipes");
|
|
1627
|
+
var import_css25 = require("@cerberus/styled-system/css");
|
|
1035
1628
|
|
|
1036
1629
|
// src/components/DatePicker.server.tsx
|
|
1037
|
-
var
|
|
1038
|
-
var
|
|
1039
|
-
var
|
|
1040
|
-
var
|
|
1041
|
-
var datePickerStyles = (0,
|
|
1630
|
+
var import_react16 = require("@ark-ui/react");
|
|
1631
|
+
var import_css23 = require("@cerberus/styled-system/css");
|
|
1632
|
+
var import_recipes17 = require("@cerberus/styled-system/recipes");
|
|
1633
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1634
|
+
var datePickerStyles = (0, import_recipes17.datePicker)();
|
|
1042
1635
|
function DatePickerLabel(props) {
|
|
1043
1636
|
const { className, ...arkProps } = props;
|
|
1044
|
-
return /* @__PURE__ */ (0,
|
|
1045
|
-
|
|
1637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1638
|
+
import_react16.DatePicker.Label,
|
|
1046
1639
|
{
|
|
1047
1640
|
...arkProps,
|
|
1048
|
-
className: (0,
|
|
1641
|
+
className: (0, import_css23.cx)(
|
|
1049
1642
|
className,
|
|
1050
|
-
(0,
|
|
1643
|
+
(0, import_recipes17.label)({
|
|
1051
1644
|
size: "sm"
|
|
1052
1645
|
})
|
|
1053
1646
|
)
|
|
@@ -1055,67 +1648,67 @@ function DatePickerLabel(props) {
|
|
|
1055
1648
|
);
|
|
1056
1649
|
}
|
|
1057
1650
|
function DatePickerViewControl(props) {
|
|
1058
|
-
return /* @__PURE__ */ (0,
|
|
1059
|
-
|
|
1651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1652
|
+
import_react16.DatePicker.Control,
|
|
1060
1653
|
{
|
|
1061
1654
|
...props,
|
|
1062
|
-
className: (0,
|
|
1655
|
+
className: (0, import_css23.cx)(props.className, datePickerStyles.viewControl)
|
|
1063
1656
|
}
|
|
1064
1657
|
);
|
|
1065
1658
|
}
|
|
1066
1659
|
function DatePickerTable(props) {
|
|
1067
|
-
return /* @__PURE__ */ (0,
|
|
1068
|
-
|
|
1660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1661
|
+
import_react16.DatePicker.Table,
|
|
1069
1662
|
{
|
|
1070
1663
|
...props,
|
|
1071
|
-
className: (0,
|
|
1664
|
+
className: (0, import_css23.cx)(props.className, datePickerStyles.table)
|
|
1072
1665
|
}
|
|
1073
1666
|
);
|
|
1074
1667
|
}
|
|
1075
1668
|
function DatePickerTableHeader(props) {
|
|
1076
|
-
return /* @__PURE__ */ (0,
|
|
1077
|
-
|
|
1669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1670
|
+
import_react16.DatePicker.TableHeader,
|
|
1078
1671
|
{
|
|
1079
1672
|
...props,
|
|
1080
|
-
className: (0,
|
|
1673
|
+
className: (0, import_css23.cx)(props.className, datePickerStyles.tableHeader)
|
|
1081
1674
|
}
|
|
1082
1675
|
);
|
|
1083
1676
|
}
|
|
1084
1677
|
function DatePickerTableCell(props) {
|
|
1085
|
-
return /* @__PURE__ */ (0,
|
|
1086
|
-
|
|
1678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1679
|
+
import_react16.DatePicker.TableCell,
|
|
1087
1680
|
{
|
|
1088
1681
|
...props,
|
|
1089
|
-
className: (0,
|
|
1682
|
+
className: (0, import_css23.cx)(props.className, datePickerStyles.tableCell)
|
|
1090
1683
|
}
|
|
1091
1684
|
);
|
|
1092
1685
|
}
|
|
1093
1686
|
function DatePickerTableCellTrigger(props) {
|
|
1094
|
-
return /* @__PURE__ */ (0,
|
|
1095
|
-
|
|
1687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1688
|
+
import_react16.DatePicker.TableCellTrigger,
|
|
1096
1689
|
{
|
|
1097
1690
|
...props,
|
|
1098
|
-
className: (0,
|
|
1691
|
+
className: (0, import_css23.cx)(props.className, datePickerStyles.tableCellTrigger)
|
|
1099
1692
|
}
|
|
1100
1693
|
);
|
|
1101
1694
|
}
|
|
1102
|
-
var DatePickerView =
|
|
1103
|
-
var DatePickerContext =
|
|
1695
|
+
var DatePickerView = import_react16.DatePicker.View;
|
|
1696
|
+
var DatePickerContext = import_react16.DatePicker.Context;
|
|
1104
1697
|
|
|
1105
1698
|
// src/components/IconButton.tsx
|
|
1106
|
-
var
|
|
1107
|
-
var
|
|
1108
|
-
var
|
|
1699
|
+
var import_css24 = require("@cerberus/styled-system/css");
|
|
1700
|
+
var import_recipes18 = require("@cerberus/styled-system/recipes");
|
|
1701
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1109
1702
|
function IconButton(props) {
|
|
1110
1703
|
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
1111
|
-
return /* @__PURE__ */ (0,
|
|
1704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1112
1705
|
"button",
|
|
1113
1706
|
{
|
|
1114
1707
|
...nativeProps,
|
|
1115
1708
|
"aria-label": ariaLabel ?? "Icon Button",
|
|
1116
|
-
className: (0,
|
|
1709
|
+
className: (0, import_css24.cx)(
|
|
1117
1710
|
nativeProps.className,
|
|
1118
|
-
(0,
|
|
1711
|
+
(0, import_recipes18.iconButton)({
|
|
1119
1712
|
palette,
|
|
1120
1713
|
usage,
|
|
1121
1714
|
size
|
|
@@ -1126,16 +1719,14 @@ function IconButton(props) {
|
|
|
1126
1719
|
}
|
|
1127
1720
|
|
|
1128
1721
|
// src/components/DatePicker.client.tsx
|
|
1129
|
-
var
|
|
1130
|
-
var
|
|
1131
|
-
var datePickerStyles2 = (0,
|
|
1722
|
+
var import_react18 = require("react");
|
|
1723
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1724
|
+
var datePickerStyles2 = (0, import_recipes19.datePicker)();
|
|
1132
1725
|
function DatePicker(props) {
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
import_react12.DatePicker.Root,
|
|
1726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1727
|
+
import_react17.DatePicker.Root,
|
|
1136
1728
|
{
|
|
1137
1729
|
...props,
|
|
1138
|
-
...states,
|
|
1139
1730
|
positioning: {
|
|
1140
1731
|
placement: "bottom-start"
|
|
1141
1732
|
}
|
|
@@ -1145,54 +1736,51 @@ function DatePicker(props) {
|
|
|
1145
1736
|
function DatePickerViewControlGroup(props) {
|
|
1146
1737
|
const { icons } = useCerberusContext();
|
|
1147
1738
|
const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons;
|
|
1148
|
-
return /* @__PURE__ */ (0,
|
|
1149
|
-
/* @__PURE__ */ (0,
|
|
1150
|
-
/* @__PURE__ */ (0,
|
|
1739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DatePickerViewControl, { ...props, children: [
|
|
1740
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconButton, { ariaLabel: "Previous", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PrevIcon, {}) }) }),
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.ViewTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1151
1742
|
Button,
|
|
1152
1743
|
{
|
|
1153
|
-
className: (0,
|
|
1744
|
+
className: (0, import_css25.css)({
|
|
1154
1745
|
h: "2rem",
|
|
1155
1746
|
paddingInline: "md"
|
|
1156
1747
|
}),
|
|
1157
1748
|
shape: "rounded",
|
|
1158
1749
|
size: "sm",
|
|
1159
1750
|
usage: "ghost",
|
|
1160
|
-
children: /* @__PURE__ */ (0,
|
|
1751
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.RangeText, {})
|
|
1161
1752
|
}
|
|
1162
1753
|
) }),
|
|
1163
|
-
/* @__PURE__ */ (0,
|
|
1754
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.NextTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconButton, { ariaLabel: "Next", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(NextIcon, {}) }) })
|
|
1164
1755
|
] });
|
|
1165
1756
|
}
|
|
1166
1757
|
function DatePickerTrigger(props) {
|
|
1167
1758
|
const { icons } = useCerberusContext();
|
|
1168
1759
|
const { calendar: CalendarIcon } = icons;
|
|
1169
|
-
return /* @__PURE__ */ (0,
|
|
1170
|
-
|
|
1760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1761
|
+
import_react17.DatePicker.Trigger,
|
|
1171
1762
|
{
|
|
1172
1763
|
...props,
|
|
1173
|
-
className: (0,
|
|
1764
|
+
className: (0, import_css25.cx)(
|
|
1174
1765
|
props.className,
|
|
1175
|
-
(0,
|
|
1766
|
+
(0, import_recipes19.iconButton)({
|
|
1176
1767
|
size: "sm",
|
|
1177
1768
|
usage: "ghost"
|
|
1178
1769
|
}),
|
|
1179
1770
|
datePickerStyles2.trigger
|
|
1180
1771
|
),
|
|
1181
|
-
children: /* @__PURE__ */ (0,
|
|
1772
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CalendarIcon, {})
|
|
1182
1773
|
}
|
|
1183
1774
|
);
|
|
1184
1775
|
}
|
|
1185
1776
|
function DatePickerInput(props) {
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
/* @__PURE__ */ (0,
|
|
1189
|
-
|
|
1190
|
-
import_react12.DatePicker.Input,
|
|
1777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react17.DatePicker.Control, { className: datePickerStyles2.control, children: [
|
|
1778
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerTrigger, {}),
|
|
1779
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1780
|
+
import_react17.DatePicker.Input,
|
|
1191
1781
|
{
|
|
1192
1782
|
...props,
|
|
1193
|
-
|
|
1194
|
-
...invalid && { "aria-invalid": true },
|
|
1195
|
-
className: (0, import_css19.cx)(props.className, datePickerStyles2.input),
|
|
1783
|
+
className: (0, import_css25.cx)(props.className, datePickerStyles2.input),
|
|
1196
1784
|
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
1197
1785
|
maxLength: 11
|
|
1198
1786
|
}
|
|
@@ -1200,36 +1788,31 @@ function DatePickerInput(props) {
|
|
|
1200
1788
|
] });
|
|
1201
1789
|
}
|
|
1202
1790
|
function RangePickerInput(props) {
|
|
1203
|
-
const { invalid, ...fieldStates } = useFieldContext();
|
|
1204
1791
|
const { defaultValue, ...nativeProps } = props;
|
|
1205
|
-
const startDate = (0,
|
|
1206
|
-
const endDate = (0,
|
|
1207
|
-
return /* @__PURE__ */ (0,
|
|
1208
|
-
/* @__PURE__ */ (0,
|
|
1209
|
-
/* @__PURE__ */ (0,
|
|
1210
|
-
|
|
1792
|
+
const startDate = (0, import_react18.useMemo)(() => defaultValue == null ? void 0 : defaultValue[0], [defaultValue]);
|
|
1793
|
+
const endDate = (0, import_react18.useMemo)(() => defaultValue == null ? void 0 : defaultValue[1], [defaultValue]);
|
|
1794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react17.DatePicker.Control, { "data-range": true, className: datePickerStyles2.control, children: [
|
|
1795
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerTrigger, {}),
|
|
1796
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1797
|
+
import_react17.DatePicker.Input,
|
|
1211
1798
|
{
|
|
1212
1799
|
...nativeProps,
|
|
1213
|
-
...fieldStates,
|
|
1214
|
-
...invalid && { "aria-invalid": true },
|
|
1215
1800
|
"data-range-input": true,
|
|
1216
1801
|
defaultValue: startDate,
|
|
1217
|
-
className: (0,
|
|
1802
|
+
className: (0, import_css25.cx)(props.className, datePickerStyles2.input),
|
|
1218
1803
|
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
1219
1804
|
maxLength: 11,
|
|
1220
1805
|
index: 0
|
|
1221
1806
|
}
|
|
1222
1807
|
),
|
|
1223
|
-
/* @__PURE__ */ (0,
|
|
1224
|
-
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1809
|
+
import_react17.DatePicker.Input,
|
|
1225
1810
|
{
|
|
1226
1811
|
...nativeProps,
|
|
1227
|
-
...fieldStates,
|
|
1228
|
-
...invalid && { "aria-invalid": true },
|
|
1229
1812
|
"data-range-input": true,
|
|
1230
1813
|
defaultValue: endDate,
|
|
1231
1814
|
"data-range-end-input": true,
|
|
1232
|
-
className: (0,
|
|
1815
|
+
className: (0, import_css25.cx)(props.className, datePickerStyles2.input),
|
|
1233
1816
|
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
1234
1817
|
maxLength: 11,
|
|
1235
1818
|
index: 1
|
|
@@ -1239,11 +1822,11 @@ function RangePickerInput(props) {
|
|
|
1239
1822
|
}
|
|
1240
1823
|
function DatePickerContent(props) {
|
|
1241
1824
|
const { children, withModal, ...contentProps } = props;
|
|
1242
|
-
return /* @__PURE__ */ (0,
|
|
1243
|
-
|
|
1825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Portal, { disabled: withModal ?? false, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.Positioner, { className: datePickerStyles2.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1826
|
+
import_react17.DatePicker.Content,
|
|
1244
1827
|
{
|
|
1245
1828
|
...contentProps,
|
|
1246
|
-
className: (0,
|
|
1829
|
+
className: (0, import_css25.cx)(contentProps.className, datePickerStyles2.content),
|
|
1247
1830
|
children
|
|
1248
1831
|
}
|
|
1249
1832
|
) }) });
|
|
@@ -1265,11 +1848,11 @@ function DatePickerDayView(props) {
|
|
|
1265
1848
|
if (isPastDay(date)) return "past";
|
|
1266
1849
|
return "future";
|
|
1267
1850
|
}
|
|
1268
|
-
return /* @__PURE__ */ (0,
|
|
1269
|
-
/* @__PURE__ */ (0,
|
|
1270
|
-
/* @__PURE__ */ (0,
|
|
1271
|
-
/* @__PURE__ */ (0,
|
|
1272
|
-
/* @__PURE__ */ (0,
|
|
1851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerView, { ...props, view: "day", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerContext, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
1852
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerViewControlGroup, {}),
|
|
1853
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DatePickerTable, { children: [
|
|
1854
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.TableRow, { children: datePicker3.weekDays.map((weekDay, id) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerTableHeader, { children: weekDay.narrow }, id)) }) }),
|
|
1855
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.TableBody, { children: datePicker3.weeks.map((week, id) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.TableRow, { children: week.map((day, id2) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerTableCell, { value: day, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1273
1856
|
DatePickerTableCellTrigger,
|
|
1274
1857
|
{
|
|
1275
1858
|
"data-date": getDayValue(day),
|
|
@@ -1280,84 +1863,84 @@ function DatePickerDayView(props) {
|
|
|
1280
1863
|
] }) }) });
|
|
1281
1864
|
}
|
|
1282
1865
|
function DatePickerMonthView(props) {
|
|
1283
|
-
return /* @__PURE__ */ (0,
|
|
1284
|
-
/* @__PURE__ */ (0,
|
|
1285
|
-
/* @__PURE__ */ (0,
|
|
1866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.View, { ...props, view: "month", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
1867
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerViewControlGroup, {}),
|
|
1868
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.TableBody, { children: datePicker3.getMonthsGrid({ columns: 4, format: "short" }).map((months, id) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.TableRow, { children: months.map((month, id2) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerTableCell, { value: month.value, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerTableCellTrigger, { children: month.label }) }, id2)) }, id)) }) })
|
|
1286
1869
|
] }) }) });
|
|
1287
1870
|
}
|
|
1288
1871
|
function DatePickerYearView(props) {
|
|
1289
|
-
return /* @__PURE__ */ (0,
|
|
1290
|
-
/* @__PURE__ */ (0,
|
|
1291
|
-
/* @__PURE__ */ (0,
|
|
1872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.View, { ...props, view: "year", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
1873
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerViewControlGroup, {}),
|
|
1874
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.TableBody, { children: datePicker3.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.DatePicker.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerTableCell, { value: year.value, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerTableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
|
|
1292
1875
|
] }) }) });
|
|
1293
1876
|
}
|
|
1294
1877
|
function DatePickerCalendar(props) {
|
|
1295
|
-
return /* @__PURE__ */ (0,
|
|
1296
|
-
/* @__PURE__ */ (0,
|
|
1297
|
-
/* @__PURE__ */ (0,
|
|
1298
|
-
/* @__PURE__ */ (0,
|
|
1878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DatePickerContent, { withModal: props.withModal, children: [
|
|
1879
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerDayView, {}),
|
|
1880
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerMonthView, {}),
|
|
1881
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DatePickerYearView, {})
|
|
1299
1882
|
] });
|
|
1300
1883
|
}
|
|
1301
1884
|
|
|
1302
1885
|
// src/components/Dialog.tsx
|
|
1303
|
-
var
|
|
1304
|
-
var
|
|
1305
|
-
var
|
|
1306
|
-
var
|
|
1886
|
+
var import_react19 = require("@ark-ui/react");
|
|
1887
|
+
var import_recipes20 = require("@cerberus/styled-system/recipes");
|
|
1888
|
+
var import_css26 = require("@cerberus/styled-system/css");
|
|
1889
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1307
1890
|
function DialogProvider(props) {
|
|
1308
|
-
return /* @__PURE__ */ (0,
|
|
1891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react19.Dialog.Root, { ...props });
|
|
1309
1892
|
}
|
|
1310
1893
|
function Dialog(props) {
|
|
1311
1894
|
const { size, ...contentProps } = props;
|
|
1312
|
-
const styles = (0,
|
|
1313
|
-
return /* @__PURE__ */ (0,
|
|
1314
|
-
/* @__PURE__ */ (0,
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1895
|
+
const styles = (0, import_recipes20.dialog)({ size });
|
|
1896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Portal, { children: [
|
|
1897
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DialogBackdrop, { className: styles.backdrop }),
|
|
1898
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DialogPositioner, { className: styles.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DialogContent, { className: styles.content, ...contentProps }) })
|
|
1316
1899
|
] });
|
|
1317
1900
|
}
|
|
1318
1901
|
function DialogHeading(props) {
|
|
1319
|
-
const styles = (0,
|
|
1320
|
-
return /* @__PURE__ */ (0,
|
|
1902
|
+
const styles = (0, import_recipes20.dialog)();
|
|
1903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react19.Dialog.Title, { ...props, className: (0, import_css26.cx)(props.className, styles.title) });
|
|
1321
1904
|
}
|
|
1322
1905
|
function DialogDescription(props) {
|
|
1323
|
-
const styles = (0,
|
|
1324
|
-
return /* @__PURE__ */ (0,
|
|
1325
|
-
|
|
1906
|
+
const styles = (0, import_recipes20.dialog)();
|
|
1907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1908
|
+
import_react19.Dialog.Description,
|
|
1326
1909
|
{
|
|
1327
1910
|
...props,
|
|
1328
|
-
className: (0,
|
|
1911
|
+
className: (0, import_css26.cx)(props.className, styles.description)
|
|
1329
1912
|
}
|
|
1330
1913
|
);
|
|
1331
1914
|
}
|
|
1332
|
-
var DialogTrigger =
|
|
1333
|
-
var DialogCloseTrigger =
|
|
1334
|
-
var DialogBackdrop =
|
|
1335
|
-
var DialogPositioner =
|
|
1336
|
-
var DialogContent =
|
|
1915
|
+
var DialogTrigger = import_react19.Dialog.Trigger;
|
|
1916
|
+
var DialogCloseTrigger = import_react19.Dialog.CloseTrigger;
|
|
1917
|
+
var DialogBackdrop = import_react19.Dialog.Backdrop;
|
|
1918
|
+
var DialogPositioner = import_react19.Dialog.Positioner;
|
|
1919
|
+
var DialogContent = import_react19.Dialog.Content;
|
|
1337
1920
|
|
|
1338
1921
|
// src/components/Dialog.client.tsx
|
|
1339
|
-
var
|
|
1340
|
-
var
|
|
1341
|
-
var
|
|
1342
|
-
var
|
|
1922
|
+
var import_react20 = require("@ark-ui/react");
|
|
1923
|
+
var import_recipes21 = require("@cerberus/styled-system/recipes");
|
|
1924
|
+
var import_css27 = require("@cerberus/styled-system/css");
|
|
1925
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1343
1926
|
function DialogCloseIconTrigger(props) {
|
|
1344
1927
|
const { icons } = useCerberusContext();
|
|
1345
1928
|
const { close: CloseIcon } = icons;
|
|
1346
|
-
const styles = (0,
|
|
1347
|
-
return /* @__PURE__ */ (0,
|
|
1348
|
-
|
|
1929
|
+
const styles = (0, import_recipes21.dialog)();
|
|
1930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1931
|
+
import_react20.Dialog.CloseTrigger,
|
|
1349
1932
|
{
|
|
1350
1933
|
...props,
|
|
1351
|
-
className: (0,
|
|
1934
|
+
className: (0, import_css27.cx)(props.className, styles.closeTrigger),
|
|
1352
1935
|
asChild: true,
|
|
1353
|
-
children: /* @__PURE__ */ (0,
|
|
1936
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1354
1937
|
IconButton,
|
|
1355
1938
|
{
|
|
1356
1939
|
ariaLabel: "Close dialog",
|
|
1357
1940
|
palette: "action",
|
|
1358
1941
|
size: "lg",
|
|
1359
1942
|
usage: "ghost",
|
|
1360
|
-
children: /* @__PURE__ */ (0,
|
|
1943
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CloseIcon, {})
|
|
1361
1944
|
}
|
|
1362
1945
|
)
|
|
1363
1946
|
}
|
|
@@ -1366,18 +1949,18 @@ function DialogCloseIconTrigger(props) {
|
|
|
1366
1949
|
|
|
1367
1950
|
// src/components/Droppable.tsx
|
|
1368
1951
|
var import_core = require("@dnd-kit/core");
|
|
1369
|
-
var
|
|
1370
|
-
var
|
|
1952
|
+
var import_react21 = require("react");
|
|
1953
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1371
1954
|
function Droppable(props) {
|
|
1372
1955
|
const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } = props;
|
|
1373
|
-
const uuid = (0,
|
|
1956
|
+
const uuid = (0, import_react21.useId)();
|
|
1374
1957
|
const { isOver, setNodeRef } = (0, import_core.useDroppable)({
|
|
1375
1958
|
data,
|
|
1376
1959
|
disabled,
|
|
1377
1960
|
id: id || uuid,
|
|
1378
1961
|
resizeObserverConfig
|
|
1379
1962
|
});
|
|
1380
|
-
return /* @__PURE__ */ (0,
|
|
1963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1381
1964
|
"div",
|
|
1382
1965
|
{
|
|
1383
1966
|
...nativeProps,
|
|
@@ -1389,31 +1972,15 @@ function Droppable(props) {
|
|
|
1389
1972
|
);
|
|
1390
1973
|
}
|
|
1391
1974
|
|
|
1392
|
-
// src/components/FieldMessage.tsx
|
|
1393
|
-
var import_css22 = require("@cerberus/styled-system/css");
|
|
1394
|
-
var import_recipes16 = require("@cerberus/styled-system/recipes");
|
|
1395
|
-
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1396
|
-
function FieldMessage(props) {
|
|
1397
|
-
const { invalid } = useFieldContext();
|
|
1398
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1399
|
-
"small",
|
|
1400
|
-
{
|
|
1401
|
-
...props,
|
|
1402
|
-
...invalid && { "aria-invalid": true },
|
|
1403
|
-
className: (0, import_css22.cx)(props.className, (0, import_recipes16.fieldMessage)())
|
|
1404
|
-
}
|
|
1405
|
-
);
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1408
1975
|
// src/context/feature-flags.tsx
|
|
1409
|
-
var
|
|
1410
|
-
var
|
|
1411
|
-
var FeatureFlagContext = (0,
|
|
1976
|
+
var import_react22 = require("react");
|
|
1977
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1978
|
+
var FeatureFlagContext = (0, import_react22.createContext)(null);
|
|
1412
1979
|
function FeatureFlags(props) {
|
|
1413
|
-
return /* @__PURE__ */ (0,
|
|
1980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FeatureFlagContext.Provider, { value: props.flags, children: props.children });
|
|
1414
1981
|
}
|
|
1415
1982
|
function useFeatureFlags(key) {
|
|
1416
|
-
const context = (0,
|
|
1983
|
+
const context = (0, import_react22.useContext)(FeatureFlagContext);
|
|
1417
1984
|
if (context === null) {
|
|
1418
1985
|
throw new Error(
|
|
1419
1986
|
"useFeatureFlag must be used within a FeatureFlags Provider"
|
|
@@ -1423,74 +1990,96 @@ function useFeatureFlags(key) {
|
|
|
1423
1990
|
}
|
|
1424
1991
|
|
|
1425
1992
|
// src/components/FeatureFlag.tsx
|
|
1426
|
-
var
|
|
1993
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1427
1994
|
function FeatureFlag(props) {
|
|
1428
1995
|
const showContent = useFeatureFlags(props.flag);
|
|
1429
|
-
return /* @__PURE__ */ (0,
|
|
1996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Show, { when: showContent, children: props.children });
|
|
1430
1997
|
}
|
|
1431
1998
|
|
|
1432
|
-
// src/components/
|
|
1433
|
-
var
|
|
1434
|
-
var
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1999
|
+
// src/components/fieldset/primitives.tsx
|
|
2000
|
+
var import_fieldset = require("@ark-ui/react/fieldset");
|
|
2001
|
+
var import_css28 = require("@cerberus/styled-system/css");
|
|
2002
|
+
var import_recipes22 = require("@cerberus/styled-system/recipes");
|
|
2003
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2004
|
+
function FieldsetRoot(props) {
|
|
2005
|
+
const styles = (0, import_recipes22.fieldset)();
|
|
2006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_fieldset.Fieldset.Root, { ...props, className: (0, import_css28.cx)(styles.root, props.className) });
|
|
2007
|
+
}
|
|
2008
|
+
function FieldsetLegend(props) {
|
|
2009
|
+
const { usage, ...legendProps } = props;
|
|
2010
|
+
const styles = (0, import_recipes22.fieldset)({ usage });
|
|
2011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2012
|
+
import_fieldset.Fieldset.Legend,
|
|
1439
2013
|
{
|
|
1440
|
-
...
|
|
1441
|
-
|
|
1442
|
-
...invalid && { "aria-invalid": true },
|
|
1443
|
-
className: (0, import_css23.cx)(
|
|
1444
|
-
props.className,
|
|
1445
|
-
(0, import_css23.css)({
|
|
1446
|
-
border: "none",
|
|
1447
|
-
pt: 2,
|
|
1448
|
-
margin: 0
|
|
1449
|
-
})
|
|
1450
|
-
)
|
|
2014
|
+
...legendProps,
|
|
2015
|
+
className: (0, import_css28.cx)(styles.legend, legendProps.className)
|
|
1451
2016
|
}
|
|
1452
2017
|
);
|
|
1453
2018
|
}
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
function FieldsetLabel(props) {
|
|
1460
|
-
const { size, usage, ...nativeProps } = props;
|
|
1461
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1462
|
-
"label",
|
|
2019
|
+
function FieldsetHelperText(props) {
|
|
2020
|
+
const { usage, ...helperTextProps } = props;
|
|
2021
|
+
const styles = (0, import_recipes22.fieldset)({ usage });
|
|
2022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2023
|
+
import_fieldset.Fieldset.HelperText,
|
|
1463
2024
|
{
|
|
1464
|
-
...
|
|
1465
|
-
className: (0,
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
2025
|
+
...helperTextProps,
|
|
2026
|
+
className: (0, import_css28.cx)(styles.helperText, helperTextProps.className)
|
|
2027
|
+
}
|
|
2028
|
+
);
|
|
2029
|
+
}
|
|
2030
|
+
function FieldsetErrorText(props) {
|
|
2031
|
+
const styles = (0, import_recipes22.fieldset)();
|
|
2032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2033
|
+
import_fieldset.Fieldset.ErrorText,
|
|
2034
|
+
{
|
|
2035
|
+
...props,
|
|
2036
|
+
className: (0, import_css28.cx)(styles.errorText, props.className)
|
|
1472
2037
|
}
|
|
1473
2038
|
);
|
|
1474
2039
|
}
|
|
1475
2040
|
|
|
2041
|
+
// src/components/fieldset/parts.ts
|
|
2042
|
+
var FieldsetParts = {
|
|
2043
|
+
Root: FieldsetRoot,
|
|
2044
|
+
Legend: FieldsetLegend,
|
|
2045
|
+
HelperText: FieldsetHelperText,
|
|
2046
|
+
ErrorText: FieldsetErrorText
|
|
2047
|
+
};
|
|
2048
|
+
|
|
2049
|
+
// src/components/fieldset/fieldset.tsx
|
|
2050
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2051
|
+
function Fieldset2(props) {
|
|
2052
|
+
const [fieldsetProps, { usage }, rootProps] = splitProps(
|
|
2053
|
+
props,
|
|
2054
|
+
["legend", "helperText", "errorText", "children"],
|
|
2055
|
+
["usage"]
|
|
2056
|
+
);
|
|
2057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(FieldsetParts.Root, { ...rootProps, children: [
|
|
2058
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(FieldsetParts.Legend, { usage, children: fieldsetProps.legend }),
|
|
2059
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(FieldsetParts.HelperText, { usage, children: fieldsetProps.helperText }),
|
|
2060
|
+
fieldsetProps.children,
|
|
2061
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(FieldsetParts.ErrorText, { children: fieldsetProps.errorText })
|
|
2062
|
+
] });
|
|
2063
|
+
}
|
|
2064
|
+
|
|
1476
2065
|
// src/components/FileStatus.tsx
|
|
1477
|
-
var
|
|
1478
|
-
var
|
|
1479
|
-
var
|
|
1480
|
-
var
|
|
2066
|
+
var import_react23 = require("react");
|
|
2067
|
+
var import_recipes24 = require("@cerberus/styled-system/recipes");
|
|
2068
|
+
var import_css30 = require("@cerberus/styled-system/css");
|
|
2069
|
+
var import_patterns6 = require("@cerberus/styled-system/patterns");
|
|
1481
2070
|
|
|
1482
2071
|
// src/components/ProgressBar.tsx
|
|
1483
|
-
var
|
|
1484
|
-
var
|
|
1485
|
-
var
|
|
2072
|
+
var import_css29 = require("@cerberus/styled-system/css");
|
|
2073
|
+
var import_recipes23 = require("@cerberus/styled-system/recipes");
|
|
2074
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1486
2075
|
function ProgressBar(props) {
|
|
1487
2076
|
const { indeterminate, size, usage, now, label: label5, ...nativeProps } = props;
|
|
1488
|
-
const styles = (0,
|
|
2077
|
+
const styles = (0, import_recipes23.progressBar)({ size, usage });
|
|
1489
2078
|
const nowClamped = Math.min(100, Math.max(0, now || 0));
|
|
1490
2079
|
const width = {
|
|
1491
2080
|
width: indeterminate ? "50%" : `${nowClamped}%`
|
|
1492
2081
|
};
|
|
1493
|
-
return /* @__PURE__ */ (0,
|
|
2082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1494
2083
|
"div",
|
|
1495
2084
|
{
|
|
1496
2085
|
...nativeProps,
|
|
@@ -1498,9 +2087,9 @@ function ProgressBar(props) {
|
|
|
1498
2087
|
"aria-valuemin": 0,
|
|
1499
2088
|
"aria-valuemax": 100,
|
|
1500
2089
|
"aria-valuenow": indeterminate ? 0 : nowClamped,
|
|
1501
|
-
className: (0,
|
|
2090
|
+
className: (0, import_css29.cx)(nativeProps.className, styles.root),
|
|
1502
2091
|
role: "progressbar",
|
|
1503
|
-
children: /* @__PURE__ */ (0,
|
|
2092
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1504
2093
|
"div",
|
|
1505
2094
|
{
|
|
1506
2095
|
...indeterminate && { "data-indeterminate": true },
|
|
@@ -1514,7 +2103,7 @@ function ProgressBar(props) {
|
|
|
1514
2103
|
}
|
|
1515
2104
|
|
|
1516
2105
|
// src/components/FileStatus.tsx
|
|
1517
|
-
var
|
|
2106
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1518
2107
|
var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
1519
2108
|
processStatus2["TODO"] = "todo";
|
|
1520
2109
|
processStatus2["PROCESSING"] = "processing";
|
|
@@ -1524,24 +2113,24 @@ var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
|
1524
2113
|
})(processStatus || {});
|
|
1525
2114
|
function FileStatus(props) {
|
|
1526
2115
|
const { file, now, status, onClick, ...nativeProps } = props;
|
|
1527
|
-
const actionLabel = (0,
|
|
1528
|
-
const palette = (0,
|
|
1529
|
-
const modalIconPalette = (0,
|
|
1530
|
-
const styles = (0,
|
|
2116
|
+
const actionLabel = (0, import_react23.useMemo)(() => getStatusActionLabel(status), [status]);
|
|
2117
|
+
const palette = (0, import_react23.useMemo)(() => getPalette(status), [status]);
|
|
2118
|
+
const modalIconPalette = (0, import_react23.useMemo)(() => getModalIconPalette(status), [status]);
|
|
2119
|
+
const styles = (0, import_react23.useMemo)(() => {
|
|
1531
2120
|
switch (status) {
|
|
1532
2121
|
case "todo" /* TODO */:
|
|
1533
|
-
return (0,
|
|
2122
|
+
return (0, import_recipes24.fileStatus)({ status: "todo" });
|
|
1534
2123
|
case "processing" /* PROCESSING */:
|
|
1535
|
-
return (0,
|
|
2124
|
+
return (0, import_recipes24.fileStatus)({ status: "processing" });
|
|
1536
2125
|
case "done" /* DONE */:
|
|
1537
|
-
return (0,
|
|
2126
|
+
return (0, import_recipes24.fileStatus)({ status: "done" });
|
|
1538
2127
|
case "error" /* ERROR */:
|
|
1539
|
-
return (0,
|
|
2128
|
+
return (0, import_recipes24.fileStatus)({ status: "error" });
|
|
1540
2129
|
default:
|
|
1541
|
-
return (0,
|
|
2130
|
+
return (0, import_recipes24.fileStatus)();
|
|
1542
2131
|
}
|
|
1543
2132
|
}, [status]);
|
|
1544
|
-
const handleClick = (0,
|
|
2133
|
+
const handleClick = (0, import_react23.useCallback)(
|
|
1545
2134
|
(e) => {
|
|
1546
2135
|
const actionStatus = getStatusActionLabel(
|
|
1547
2136
|
status
|
|
@@ -1550,41 +2139,41 @@ function FileStatus(props) {
|
|
|
1550
2139
|
},
|
|
1551
2140
|
[onClick]
|
|
1552
2141
|
);
|
|
1553
|
-
return /* @__PURE__ */ (0,
|
|
2142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
1554
2143
|
"div",
|
|
1555
2144
|
{
|
|
1556
2145
|
...nativeProps,
|
|
1557
|
-
className: (0,
|
|
2146
|
+
className: (0, import_css30.cx)(nativeProps.className, styles.root, (0, import_patterns6.hstack)()),
|
|
1558
2147
|
children: [
|
|
1559
|
-
/* @__PURE__ */ (0,
|
|
2148
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1560
2149
|
Avatar,
|
|
1561
2150
|
{
|
|
1562
2151
|
ariaLabel: "",
|
|
1563
2152
|
gradient: modalIconPalette,
|
|
1564
|
-
icon: /* @__PURE__ */ (0,
|
|
2153
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(MatchFileStatusIcon, { size: 24, status }),
|
|
1565
2154
|
src: ""
|
|
1566
2155
|
}
|
|
1567
2156
|
),
|
|
1568
|
-
/* @__PURE__ */ (0,
|
|
2157
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
1569
2158
|
"div",
|
|
1570
2159
|
{
|
|
1571
|
-
className: (0,
|
|
2160
|
+
className: (0, import_patterns6.vstack)({
|
|
1572
2161
|
alignItems: "flex-start",
|
|
1573
2162
|
gap: "0.12rem",
|
|
1574
2163
|
w: "full"
|
|
1575
2164
|
}),
|
|
1576
2165
|
children: [
|
|
1577
|
-
/* @__PURE__ */ (0,
|
|
2166
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1578
2167
|
"small",
|
|
1579
2168
|
{
|
|
1580
|
-
className: (0,
|
|
2169
|
+
className: (0, import_css30.css)({
|
|
1581
2170
|
color: "page.text.initial",
|
|
1582
2171
|
textStyle: "label-sm"
|
|
1583
2172
|
}),
|
|
1584
2173
|
children: file
|
|
1585
2174
|
}
|
|
1586
2175
|
),
|
|
1587
|
-
/* @__PURE__ */ (0,
|
|
2176
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1588
2177
|
ProgressBar,
|
|
1589
2178
|
{
|
|
1590
2179
|
id: props.id,
|
|
@@ -1593,27 +2182,27 @@ function FileStatus(props) {
|
|
|
1593
2182
|
size: "sm"
|
|
1594
2183
|
}
|
|
1595
2184
|
),
|
|
1596
|
-
/* @__PURE__ */ (0,
|
|
1597
|
-
|
|
2185
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Field2, { label: "", invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2186
|
+
FieldHelperText,
|
|
1598
2187
|
{
|
|
1599
|
-
className: (0,
|
|
2188
|
+
className: (0, import_css30.css)({
|
|
1600
2189
|
color: "page.text.100"
|
|
1601
2190
|
}),
|
|
1602
2191
|
id: `help:${file}`,
|
|
1603
|
-
children: /* @__PURE__ */ (0,
|
|
2192
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(MatchFileStatusText, { status, now })
|
|
1604
2193
|
}
|
|
1605
2194
|
) })
|
|
1606
2195
|
]
|
|
1607
2196
|
}
|
|
1608
2197
|
),
|
|
1609
|
-
/* @__PURE__ */ (0,
|
|
2198
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1610
2199
|
IconButton,
|
|
1611
2200
|
{
|
|
1612
2201
|
ariaLabel: actionLabel,
|
|
1613
2202
|
onClick: handleClick,
|
|
1614
2203
|
palette,
|
|
1615
2204
|
size: "sm",
|
|
1616
|
-
children: /* @__PURE__ */ (0,
|
|
2205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(MatchStatusAction, { status })
|
|
1617
2206
|
}
|
|
1618
2207
|
)
|
|
1619
2208
|
]
|
|
@@ -1630,13 +2219,13 @@ function MatchFileStatusIcon(props) {
|
|
|
1630
2219
|
} = icons;
|
|
1631
2220
|
switch (props.status) {
|
|
1632
2221
|
case "todo" /* TODO */:
|
|
1633
|
-
return /* @__PURE__ */ (0,
|
|
2222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TodoIcon, { size: props.size });
|
|
1634
2223
|
case "processing" /* PROCESSING */:
|
|
1635
|
-
return /* @__PURE__ */ (0,
|
|
2224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(FileUploaderIcon, { size: props.size });
|
|
1636
2225
|
case "done" /* DONE */:
|
|
1637
|
-
return /* @__PURE__ */ (0,
|
|
2226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DoneIcon, { size: props.size });
|
|
1638
2227
|
case "error" /* ERROR */:
|
|
1639
|
-
return /* @__PURE__ */ (0,
|
|
2228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(InvalidIcon, { size: props.size });
|
|
1640
2229
|
default:
|
|
1641
2230
|
throw new Error("Unknown status");
|
|
1642
2231
|
}
|
|
@@ -1661,11 +2250,11 @@ function MatchStatusAction(props) {
|
|
|
1661
2250
|
switch (props.status) {
|
|
1662
2251
|
case "todo" /* TODO */:
|
|
1663
2252
|
case "processing" /* PROCESSING */:
|
|
1664
|
-
return /* @__PURE__ */ (0,
|
|
2253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CloseIcon, {});
|
|
1665
2254
|
case "error" /* ERROR */:
|
|
1666
|
-
return /* @__PURE__ */ (0,
|
|
2255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(RedoIcon, {});
|
|
1667
2256
|
case "done" /* DONE */:
|
|
1668
|
-
return /* @__PURE__ */ (0,
|
|
2257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TrashIcon, {});
|
|
1669
2258
|
default:
|
|
1670
2259
|
throw new Error("Invalid status");
|
|
1671
2260
|
}
|
|
@@ -1711,57 +2300,57 @@ function getModalIconPalette(status) {
|
|
|
1711
2300
|
}
|
|
1712
2301
|
|
|
1713
2302
|
// src/components/FileUploader.tsx
|
|
1714
|
-
var
|
|
1715
|
-
var
|
|
1716
|
-
var
|
|
1717
|
-
var
|
|
2303
|
+
var import_css31 = require("@cerberus/styled-system/css");
|
|
2304
|
+
var import_patterns7 = require("@cerberus/styled-system/patterns");
|
|
2305
|
+
var import_recipes25 = require("@cerberus/styled-system/recipes");
|
|
2306
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1718
2307
|
function FileUploader(props) {
|
|
1719
2308
|
var _a;
|
|
1720
2309
|
const { icons } = useCerberusContext();
|
|
1721
|
-
const styles = (0,
|
|
2310
|
+
const styles = (0, import_recipes25.fileUploader)();
|
|
1722
2311
|
const { waitingFileUploader: Icon } = icons;
|
|
1723
|
-
return /* @__PURE__ */ (0,
|
|
2312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
1724
2313
|
"div",
|
|
1725
2314
|
{
|
|
1726
2315
|
...props.disabled ? { "aria-disabled": true } : {},
|
|
1727
|
-
className: (0,
|
|
1728
|
-
(0,
|
|
2316
|
+
className: (0, import_css31.cx)(
|
|
2317
|
+
(0, import_patterns7.vstack)({
|
|
1729
2318
|
justify: "center"
|
|
1730
2319
|
}),
|
|
1731
2320
|
styles.container
|
|
1732
2321
|
),
|
|
1733
2322
|
children: [
|
|
1734
|
-
/* @__PURE__ */ (0,
|
|
2323
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1735
2324
|
Avatar,
|
|
1736
2325
|
{
|
|
1737
2326
|
gradient: "charon-light",
|
|
1738
2327
|
ariaLabel: "",
|
|
1739
|
-
icon: /* @__PURE__ */ (0,
|
|
2328
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, {}),
|
|
1740
2329
|
size: "md",
|
|
1741
2330
|
src: ""
|
|
1742
2331
|
}
|
|
1743
2332
|
) }),
|
|
1744
|
-
/* @__PURE__ */ (0,
|
|
2333
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
1745
2334
|
"label",
|
|
1746
2335
|
{
|
|
1747
|
-
className: (0,
|
|
1748
|
-
(0,
|
|
2336
|
+
className: (0, import_css31.cx)(
|
|
2337
|
+
(0, import_patterns7.vstack)({
|
|
1749
2338
|
justify: "center"
|
|
1750
2339
|
}),
|
|
1751
2340
|
styles.label
|
|
1752
2341
|
),
|
|
1753
2342
|
htmlFor: props.name,
|
|
1754
2343
|
children: [
|
|
1755
|
-
/* @__PURE__ */ (0,
|
|
2344
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Show, { when: Boolean(props.heading), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: styles.heading, children: props.heading }) }),
|
|
1756
2345
|
"Import ",
|
|
1757
2346
|
(_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
|
|
1758
2347
|
" files",
|
|
1759
|
-
/* @__PURE__ */ (0,
|
|
1760
|
-
/* @__PURE__ */ (0,
|
|
2348
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: styles.description, children: "Click to select files" }),
|
|
2349
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1761
2350
|
"input",
|
|
1762
2351
|
{
|
|
1763
2352
|
...props,
|
|
1764
|
-
className: (0,
|
|
2353
|
+
className: (0, import_css31.cx)(props.className, styles.input),
|
|
1765
2354
|
type: "file"
|
|
1766
2355
|
}
|
|
1767
2356
|
)
|
|
@@ -1773,104 +2362,46 @@ function FileUploader(props) {
|
|
|
1773
2362
|
);
|
|
1774
2363
|
}
|
|
1775
2364
|
|
|
1776
|
-
// src/components/
|
|
1777
|
-
|
|
1778
|
-
var
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
const hasEndIcon = Boolean(endIcon);
|
|
1785
|
-
const { icons } = useCerberusContext();
|
|
1786
|
-
const { invalid: InvalidIcon } = icons;
|
|
1787
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: inputStyles.root, children: [
|
|
1788
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Show, { when: Boolean(startIcon), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: inputStyles.startIcon, children: startIcon }) }),
|
|
1789
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1790
|
-
"input",
|
|
1791
|
-
{
|
|
1792
|
-
...nativeProps,
|
|
1793
|
-
...fieldStates,
|
|
1794
|
-
...describedBy && { "aria-describedby": describedBy },
|
|
1795
|
-
...invalid && { "aria-invalid": true },
|
|
1796
|
-
"data-start-icon": Boolean(startIcon),
|
|
1797
|
-
className: (0, import_css28.cx)("peer", nativeProps.className, inputStyles.input)
|
|
1798
|
-
}
|
|
1799
|
-
),
|
|
1800
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(InvalidIcon, { className: inputStyles.icon }) }),
|
|
1801
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Show, { when: hasEndIcon && !invalid, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: inputStyles.icon, children: endIcon }) })
|
|
1802
|
-
] });
|
|
2365
|
+
// src/components/for.tsx
|
|
2366
|
+
function For(props) {
|
|
2367
|
+
var _a, _b;
|
|
2368
|
+
const mappableChildren = props.children;
|
|
2369
|
+
if (((_a = props.each) == null ? void 0 : _a.length) === 0) {
|
|
2370
|
+
return props.fallback || null;
|
|
2371
|
+
}
|
|
2372
|
+
return (_b = props.each) == null ? void 0 : _b.map(mappableChildren);
|
|
1803
2373
|
}
|
|
1804
2374
|
|
|
1805
|
-
// src/components/
|
|
1806
|
-
var
|
|
1807
|
-
var
|
|
1808
|
-
var
|
|
1809
|
-
var
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
const {
|
|
1813
|
-
const
|
|
1814
|
-
return /* @__PURE__ */ (0,
|
|
1815
|
-
"
|
|
2375
|
+
// src/components/Legend.tsx
|
|
2376
|
+
var import_css32 = require("@cerberus/styled-system/css");
|
|
2377
|
+
var import_recipes26 = require("@cerberus/styled-system/recipes");
|
|
2378
|
+
var import_patterns8 = require("@cerberus/styled-system/patterns");
|
|
2379
|
+
var import_field5 = require("@ark-ui/react/field");
|
|
2380
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2381
|
+
function Legend(props) {
|
|
2382
|
+
const { size, ...nativeProps } = props;
|
|
2383
|
+
const { invalid, required } = (0, import_field5.useFieldContext)();
|
|
2384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
2385
|
+
"legend",
|
|
1816
2386
|
{
|
|
1817
2387
|
...nativeProps,
|
|
1818
|
-
...
|
|
1819
|
-
className: (0,
|
|
2388
|
+
...invalid && { "aria-invalid": true },
|
|
2389
|
+
className: (0, import_css32.cx)(
|
|
1820
2390
|
nativeProps.className,
|
|
1821
|
-
(0,
|
|
1822
|
-
(0, import_patterns9.hstack)({
|
|
2391
|
+
(0, import_patterns8.hstack)({
|
|
1823
2392
|
justify: "space-between",
|
|
1824
2393
|
w: "full"
|
|
2394
|
+
}),
|
|
2395
|
+
(0, import_recipes26.label)({
|
|
2396
|
+
size
|
|
1825
2397
|
})
|
|
1826
2398
|
),
|
|
1827
2399
|
children: [
|
|
1828
|
-
|
|
1829
|
-
/* @__PURE__ */ (0,
|
|
2400
|
+
nativeProps.children,
|
|
2401
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Show, { when: required, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1830
2402
|
"span",
|
|
1831
2403
|
{
|
|
1832
|
-
className: (0,
|
|
1833
|
-
color: "page.text.100",
|
|
1834
|
-
fontSize: "inherit"
|
|
1835
|
-
}),
|
|
1836
|
-
children: "(required)"
|
|
1837
|
-
}
|
|
1838
|
-
) })
|
|
1839
|
-
]
|
|
1840
|
-
}
|
|
1841
|
-
);
|
|
1842
|
-
}
|
|
1843
|
-
|
|
1844
|
-
// src/components/Legend.tsx
|
|
1845
|
-
var import_css30 = require("@cerberus/styled-system/css");
|
|
1846
|
-
var import_recipes23 = require("@cerberus/styled-system/recipes");
|
|
1847
|
-
var import_patterns10 = require("@cerberus/styled-system/patterns");
|
|
1848
|
-
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1849
|
-
function Legend(props) {
|
|
1850
|
-
const { size, ...nativeProps } = props;
|
|
1851
|
-
const { invalid, ...formState } = useFieldContext();
|
|
1852
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
1853
|
-
"legend",
|
|
1854
|
-
{
|
|
1855
|
-
...nativeProps,
|
|
1856
|
-
...formState,
|
|
1857
|
-
...invalid && { "aria-invalid": true },
|
|
1858
|
-
className: (0, import_css30.cx)(
|
|
1859
|
-
nativeProps.className,
|
|
1860
|
-
(0, import_patterns10.hstack)({
|
|
1861
|
-
justify: "space-between",
|
|
1862
|
-
w: "full"
|
|
1863
|
-
}),
|
|
1864
|
-
(0, import_recipes23.label)({
|
|
1865
|
-
size
|
|
1866
|
-
})
|
|
1867
|
-
),
|
|
1868
|
-
children: [
|
|
1869
|
-
nativeProps.children,
|
|
1870
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Show, { when: formState.required, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1871
|
-
"span",
|
|
1872
|
-
{
|
|
1873
|
-
className: (0, import_css30.css)({
|
|
2404
|
+
className: (0, import_css32.css)({
|
|
1874
2405
|
color: "page.text.100",
|
|
1875
2406
|
fontSize: "inherit"
|
|
1876
2407
|
}),
|
|
@@ -1883,52 +2414,52 @@ function Legend(props) {
|
|
|
1883
2414
|
}
|
|
1884
2415
|
|
|
1885
2416
|
// src/components/Menu.tsx
|
|
1886
|
-
var
|
|
1887
|
-
var
|
|
1888
|
-
var
|
|
1889
|
-
var
|
|
1890
|
-
var menuStyles = (0,
|
|
1891
|
-
var Menu =
|
|
2417
|
+
var import_react24 = require("@ark-ui/react");
|
|
2418
|
+
var import_recipes27 = require("@cerberus/styled-system/recipes");
|
|
2419
|
+
var import_css33 = require("@cerberus/styled-system/css");
|
|
2420
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2421
|
+
var menuStyles = (0, import_recipes27.menu)();
|
|
2422
|
+
var Menu = import_react24.Menu.Root;
|
|
1892
2423
|
function MenuTrigger(props) {
|
|
1893
|
-
return /* @__PURE__ */ (0,
|
|
2424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react24.Menu.Trigger, { ...props, asChild: true });
|
|
1894
2425
|
}
|
|
1895
2426
|
function MenuContent(props) {
|
|
1896
|
-
return /* @__PURE__ */ (0,
|
|
1897
|
-
|
|
2427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react24.Menu.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2428
|
+
import_react24.Menu.Content,
|
|
1898
2429
|
{
|
|
1899
2430
|
...props,
|
|
1900
|
-
className: (0,
|
|
2431
|
+
className: (0, import_css33.cx)(props.className, menuStyles.content)
|
|
1901
2432
|
}
|
|
1902
2433
|
) });
|
|
1903
2434
|
}
|
|
1904
2435
|
function MenuItem(props) {
|
|
1905
|
-
return /* @__PURE__ */ (0,
|
|
2436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react24.Menu.Item, { ...props, className: (0, import_css33.cx)(props.className, menuStyles.item) });
|
|
1906
2437
|
}
|
|
1907
|
-
var MenuItemGroup =
|
|
2438
|
+
var MenuItemGroup = import_react24.Menu.ItemGroup;
|
|
1908
2439
|
function MenuGroupLabel(props) {
|
|
1909
|
-
return /* @__PURE__ */ (0,
|
|
1910
|
-
|
|
2440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2441
|
+
import_react24.Menu.ItemGroupLabel,
|
|
1911
2442
|
{
|
|
1912
2443
|
...props,
|
|
1913
|
-
className: (0,
|
|
2444
|
+
className: (0, import_css33.cx)(props.className, menuStyles.itemGroupLabel)
|
|
1914
2445
|
}
|
|
1915
2446
|
);
|
|
1916
2447
|
}
|
|
1917
2448
|
function MenuSeparator(props) {
|
|
1918
|
-
return /* @__PURE__ */ (0,
|
|
1919
|
-
|
|
2449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2450
|
+
import_react24.Menu.Separator,
|
|
1920
2451
|
{
|
|
1921
2452
|
...props,
|
|
1922
|
-
className: (0,
|
|
2453
|
+
className: (0, import_css33.cx)(props.className, menuStyles.separator)
|
|
1923
2454
|
}
|
|
1924
2455
|
);
|
|
1925
2456
|
}
|
|
1926
2457
|
|
|
1927
2458
|
// src/components/Notification.tsx
|
|
1928
|
-
var
|
|
1929
|
-
var
|
|
1930
|
-
var
|
|
1931
|
-
var
|
|
2459
|
+
var import_css34 = require("@cerberus/styled-system/css");
|
|
2460
|
+
var import_patterns9 = require("@cerberus/styled-system/patterns");
|
|
2461
|
+
var import_recipes28 = require("@cerberus/styled-system/recipes");
|
|
2462
|
+
var import_react25 = require("react");
|
|
1932
2463
|
|
|
1933
2464
|
// src/aria-helpers/trap-focus.aria.ts
|
|
1934
2465
|
function trapFocus(modalRef) {
|
|
@@ -1957,29 +2488,29 @@ function trapFocus(modalRef) {
|
|
|
1957
2488
|
}
|
|
1958
2489
|
|
|
1959
2490
|
// src/components/Notification.tsx
|
|
1960
|
-
var
|
|
2491
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1961
2492
|
function MatchNotificationIcon(props) {
|
|
1962
2493
|
const { icons } = useCerberusContext();
|
|
1963
2494
|
const palette = props.palette || "info";
|
|
1964
2495
|
const key = `${palette}Notification`;
|
|
1965
2496
|
const Icon = icons[key];
|
|
1966
|
-
return /* @__PURE__ */ (0,
|
|
2497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icon, {});
|
|
1967
2498
|
}
|
|
1968
2499
|
function Notification(props) {
|
|
1969
2500
|
const { children, palette, onClose, ...nativeProps } = props;
|
|
1970
|
-
const ref = (0,
|
|
2501
|
+
const ref = (0, import_react25.useRef)(null);
|
|
1971
2502
|
const onKeyDown = trapFocus(ref);
|
|
1972
|
-
const styles = (0,
|
|
2503
|
+
const styles = (0, import_recipes28.notification)({ palette });
|
|
1973
2504
|
const { icons } = useCerberusContext();
|
|
1974
2505
|
const { close: CloseIcon } = icons;
|
|
1975
|
-
return /* @__PURE__ */ (0,
|
|
2506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
1976
2507
|
"dialog",
|
|
1977
2508
|
{
|
|
1978
2509
|
...nativeProps,
|
|
1979
2510
|
"data-placement": "left",
|
|
1980
|
-
className: (0,
|
|
2511
|
+
className: (0, import_css34.cx)(
|
|
1981
2512
|
nativeProps.className,
|
|
1982
|
-
(0,
|
|
2513
|
+
(0, import_patterns9.hstack)({
|
|
1983
2514
|
position: "relative",
|
|
1984
2515
|
gap: "4"
|
|
1985
2516
|
}),
|
|
@@ -1988,11 +2519,11 @@ function Notification(props) {
|
|
|
1988
2519
|
onKeyDown,
|
|
1989
2520
|
ref,
|
|
1990
2521
|
children: [
|
|
1991
|
-
/* @__PURE__ */ (0,
|
|
1992
|
-
/* @__PURE__ */ (0,
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(MatchNotificationIcon, { palette }) }),
|
|
2523
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1993
2524
|
"div",
|
|
1994
2525
|
{
|
|
1995
|
-
className: (0,
|
|
2526
|
+
className: (0, import_patterns9.vstack)({
|
|
1996
2527
|
alignItems: "flex-start",
|
|
1997
2528
|
gap: "0",
|
|
1998
2529
|
py: "2"
|
|
@@ -2000,14 +2531,14 @@ function Notification(props) {
|
|
|
2000
2531
|
children
|
|
2001
2532
|
}
|
|
2002
2533
|
),
|
|
2003
|
-
/* @__PURE__ */ (0,
|
|
2534
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2004
2535
|
"button",
|
|
2005
2536
|
{
|
|
2006
2537
|
"aria-label": "Close",
|
|
2007
2538
|
className: styles.close,
|
|
2008
2539
|
onClick: onClose,
|
|
2009
2540
|
value: props.id,
|
|
2010
|
-
children: /* @__PURE__ */ (0,
|
|
2541
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CloseIcon, {})
|
|
2011
2542
|
}
|
|
2012
2543
|
)
|
|
2013
2544
|
]
|
|
@@ -2016,233 +2547,377 @@ function Notification(props) {
|
|
|
2016
2547
|
}
|
|
2017
2548
|
|
|
2018
2549
|
// src/components/NotificationHeading.tsx
|
|
2019
|
-
var
|
|
2020
|
-
var
|
|
2021
|
-
var
|
|
2550
|
+
var import_css35 = require("@cerberus/styled-system/css");
|
|
2551
|
+
var import_recipes29 = require("@cerberus/styled-system/recipes");
|
|
2552
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2022
2553
|
function NotificationHeading(props) {
|
|
2023
2554
|
const { palette, ...nativeProps } = props;
|
|
2024
|
-
const styles = (0,
|
|
2025
|
-
return /* @__PURE__ */ (0,
|
|
2555
|
+
const styles = (0, import_recipes29.notification)({ palette });
|
|
2556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: (0, import_css35.cx)(nativeProps.className, styles.heading), ...nativeProps });
|
|
2026
2557
|
}
|
|
2027
2558
|
|
|
2028
2559
|
// src/components/NotificationDescription.tsx
|
|
2029
|
-
var
|
|
2030
|
-
var
|
|
2031
|
-
var
|
|
2560
|
+
var import_css36 = require("@cerberus/styled-system/css");
|
|
2561
|
+
var import_recipes30 = require("@cerberus/styled-system/recipes");
|
|
2562
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2032
2563
|
function NotificationDescription(props) {
|
|
2033
2564
|
const { palette, ...nativeProps } = props;
|
|
2034
|
-
const styles = (0,
|
|
2035
|
-
return /* @__PURE__ */ (0,
|
|
2565
|
+
const styles = (0, import_recipes30.notification)({ palette });
|
|
2566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2036
2567
|
"p",
|
|
2037
2568
|
{
|
|
2038
|
-
className: (0,
|
|
2569
|
+
className: (0, import_css36.cx)(nativeProps.className, styles.description),
|
|
2039
2570
|
...nativeProps
|
|
2040
2571
|
}
|
|
2041
2572
|
);
|
|
2042
2573
|
}
|
|
2043
2574
|
|
|
2044
|
-
// src/components/
|
|
2045
|
-
var
|
|
2046
|
-
var
|
|
2047
|
-
var
|
|
2048
|
-
var
|
|
2575
|
+
// src/components/radio/primitives.tsx
|
|
2576
|
+
var import_radio_group = require("@ark-ui/react/radio-group");
|
|
2577
|
+
var import_css37 = require("@cerberus/styled-system/css");
|
|
2578
|
+
var import_recipes31 = require("@cerberus/styled-system/recipes");
|
|
2579
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2580
|
+
function RadioGroupRoot(props) {
|
|
2581
|
+
const { size, orientation, ...rootProps } = props;
|
|
2582
|
+
const styles = (0, import_recipes31.radioGroup)({ size, orientation });
|
|
2583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2584
|
+
import_radio_group.RadioGroup.Root,
|
|
2585
|
+
{
|
|
2586
|
+
...rootProps,
|
|
2587
|
+
className: (0, import_css37.cx)(styles.root, rootProps.className)
|
|
2588
|
+
}
|
|
2589
|
+
);
|
|
2590
|
+
}
|
|
2591
|
+
function RadioGroupLabel(props) {
|
|
2592
|
+
const styles = (0, import_recipes31.radioGroup)();
|
|
2593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2594
|
+
import_radio_group.RadioGroup.Label,
|
|
2595
|
+
{
|
|
2596
|
+
...props,
|
|
2597
|
+
className: (0, import_css37.cx)(styles.label, props.className)
|
|
2598
|
+
}
|
|
2599
|
+
);
|
|
2600
|
+
}
|
|
2601
|
+
function RadioGroupIndicator(props) {
|
|
2602
|
+
const styles = (0, import_recipes31.radioGroup)();
|
|
2603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2604
|
+
import_radio_group.RadioGroup.Indicator,
|
|
2605
|
+
{
|
|
2606
|
+
...props,
|
|
2607
|
+
className: (0, import_css37.cx)(styles.indicator, props.className)
|
|
2608
|
+
}
|
|
2609
|
+
);
|
|
2610
|
+
}
|
|
2611
|
+
function RadioGroupItem(props) {
|
|
2612
|
+
const styles = (0, import_recipes31.radioGroup)();
|
|
2613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2614
|
+
import_radio_group.RadioGroup.Item,
|
|
2615
|
+
{
|
|
2616
|
+
...props,
|
|
2617
|
+
className: (0, import_css37.cx)(styles.item, props.className)
|
|
2618
|
+
}
|
|
2619
|
+
);
|
|
2620
|
+
}
|
|
2621
|
+
function RadioGroupItemText(props) {
|
|
2622
|
+
const { size, orientation, ...itemTextProps } = props;
|
|
2623
|
+
const styles = (0, import_recipes31.radioGroup)({ size, orientation });
|
|
2624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2625
|
+
import_radio_group.RadioGroup.ItemText,
|
|
2626
|
+
{
|
|
2627
|
+
...itemTextProps,
|
|
2628
|
+
className: (0, import_css37.cx)(styles.itemText, itemTextProps.className)
|
|
2629
|
+
}
|
|
2630
|
+
);
|
|
2631
|
+
}
|
|
2632
|
+
function RadioGroupItemControl(props) {
|
|
2633
|
+
const { size, orientation, ...itemControlProps } = props;
|
|
2634
|
+
const styles = (0, import_recipes31.radioGroup)({ size, orientation });
|
|
2635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2636
|
+
import_radio_group.RadioGroup.ItemControl,
|
|
2637
|
+
{
|
|
2638
|
+
...itemControlProps,
|
|
2639
|
+
className: (0, import_css37.cx)(styles.itemControl, itemControlProps.className)
|
|
2640
|
+
}
|
|
2641
|
+
);
|
|
2642
|
+
}
|
|
2643
|
+
function RadioGroupItemHiddenInput(props) {
|
|
2644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_radio_group.RadioGroup.ItemHiddenInput, { ...props });
|
|
2645
|
+
}
|
|
2646
|
+
var RadioGroup = RadioGroupRoot;
|
|
2647
|
+
|
|
2648
|
+
// src/components/radio/parts.ts
|
|
2649
|
+
var RadioParts = {
|
|
2650
|
+
Root: RadioGroupRoot,
|
|
2651
|
+
Label: RadioGroupLabel,
|
|
2652
|
+
Indicator: RadioGroupIndicator,
|
|
2653
|
+
Item: RadioGroupItem,
|
|
2654
|
+
ItemText: RadioGroupItemText,
|
|
2655
|
+
ItemControl: RadioGroupItemControl,
|
|
2656
|
+
ItemHiddenInput: RadioGroupItemHiddenInput
|
|
2657
|
+
};
|
|
2658
|
+
|
|
2659
|
+
// src/components/radio/radio.tsx
|
|
2660
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2049
2661
|
function Radio(props) {
|
|
2050
|
-
const {
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2662
|
+
const { size, children, ...groupProps } = props;
|
|
2663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(RadioGroupItem, { ...groupProps, children: [
|
|
2664
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RadioGroupItemControl, { size }),
|
|
2665
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RadioGroupItemText, { size, children }),
|
|
2666
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RadioGroupItemHiddenInput, {})
|
|
2667
|
+
] });
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
// src/components/select/primitives.tsx
|
|
2671
|
+
var import_select = require("@ark-ui/react/select");
|
|
2672
|
+
var import_recipes32 = require("@cerberus/styled-system/recipes");
|
|
2673
|
+
var import_css38 = require("@cerberus/styled-system/css");
|
|
2674
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2675
|
+
function SelectRoot(props) {
|
|
2676
|
+
const { size, ...rootProps } = props;
|
|
2677
|
+
const styles = (0, import_recipes32.select)({ size });
|
|
2678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2679
|
+
import_select.Select.Root,
|
|
2055
2680
|
{
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2681
|
+
...rootProps,
|
|
2682
|
+
className: (0, import_css38.cx)(styles.root, rootProps.className)
|
|
2683
|
+
}
|
|
2684
|
+
);
|
|
2685
|
+
}
|
|
2686
|
+
function SelectLabel(props) {
|
|
2687
|
+
const styles = (0, import_recipes32.select)();
|
|
2688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.Select.Label, { ...props, className: (0, import_css38.cx)(styles.label, props.className) });
|
|
2689
|
+
}
|
|
2690
|
+
function SelectControl(props) {
|
|
2691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.Select.Control, { ...props });
|
|
2692
|
+
}
|
|
2693
|
+
function SelectTrigger(props) {
|
|
2694
|
+
const styles = (0, import_recipes32.select)();
|
|
2695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2696
|
+
import_select.Select.Trigger,
|
|
2697
|
+
{
|
|
2698
|
+
...props,
|
|
2699
|
+
className: (0, import_css38.cx)(styles.trigger, props.className)
|
|
2700
|
+
}
|
|
2701
|
+
);
|
|
2702
|
+
}
|
|
2703
|
+
function SelectValueText(props) {
|
|
2704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.Select.ValueText, { ...props });
|
|
2705
|
+
}
|
|
2706
|
+
function SelectIndicator(props) {
|
|
2707
|
+
const styles = (0, import_recipes32.select)();
|
|
2708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2709
|
+
import_select.Select.Indicator,
|
|
2710
|
+
{
|
|
2711
|
+
...props,
|
|
2712
|
+
className: (0, import_css38.cx)(styles.indicator, props.className)
|
|
2078
2713
|
}
|
|
2079
2714
|
);
|
|
2080
2715
|
}
|
|
2716
|
+
function SelectClearTrigger(props) {
|
|
2717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.Select.ClearTrigger, { ...props });
|
|
2718
|
+
}
|
|
2719
|
+
function SelectPositioner(props) {
|
|
2720
|
+
const styles = (0, import_recipes32.select)();
|
|
2721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2722
|
+
import_select.Select.Positioner,
|
|
2723
|
+
{
|
|
2724
|
+
...props,
|
|
2725
|
+
className: (0, import_css38.cx)(styles.positioner, props.className)
|
|
2726
|
+
}
|
|
2727
|
+
);
|
|
2728
|
+
}
|
|
2729
|
+
function SelectContent(props) {
|
|
2730
|
+
const { size, ...contentProps } = props;
|
|
2731
|
+
const styles = (0, import_recipes32.select)({ size });
|
|
2732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2733
|
+
import_select.Select.Content,
|
|
2734
|
+
{
|
|
2735
|
+
...contentProps,
|
|
2736
|
+
className: (0, import_css38.cx)(styles.content, contentProps.className)
|
|
2737
|
+
}
|
|
2738
|
+
);
|
|
2739
|
+
}
|
|
2740
|
+
function SelectItemGroup(props) {
|
|
2741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.Select.ItemGroup, { ...props });
|
|
2742
|
+
}
|
|
2743
|
+
function SelectItemGroupLabel(props) {
|
|
2744
|
+
const styles = (0, import_recipes32.select)();
|
|
2745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2746
|
+
import_select.Select.ItemGroupLabel,
|
|
2747
|
+
{
|
|
2748
|
+
...props,
|
|
2749
|
+
className: (0, import_css38.cx)(styles.itemGroupLabel, props.className)
|
|
2750
|
+
}
|
|
2751
|
+
);
|
|
2752
|
+
}
|
|
2753
|
+
function SelectItem(props) {
|
|
2754
|
+
const styles = (0, import_recipes32.select)();
|
|
2755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.Select.Item, { ...props, className: (0, import_css38.cx)(styles.item, props.className) });
|
|
2756
|
+
}
|
|
2757
|
+
function SelectItemText(props) {
|
|
2758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.Select.ItemText, { ...props });
|
|
2759
|
+
}
|
|
2760
|
+
function SelectItemIndicator(props) {
|
|
2761
|
+
const styles = (0, import_recipes32.select)();
|
|
2762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2763
|
+
import_select.Select.ItemIndicator,
|
|
2764
|
+
{
|
|
2765
|
+
...props,
|
|
2766
|
+
className: (0, import_css38.cx)(styles.itemIndicator, props.className)
|
|
2767
|
+
}
|
|
2768
|
+
);
|
|
2769
|
+
}
|
|
2770
|
+
function SelectHiddenSelect(props) {
|
|
2771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.Select.HiddenSelect, { ...props });
|
|
2772
|
+
}
|
|
2773
|
+
function createSelectCollection(collection) {
|
|
2774
|
+
return (0, import_select.createListCollection)({
|
|
2775
|
+
items: collection
|
|
2776
|
+
});
|
|
2777
|
+
}
|
|
2081
2778
|
|
|
2082
|
-
// src/components/
|
|
2083
|
-
var
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2779
|
+
// src/components/select/parts.ts
|
|
2780
|
+
var SelectParts = {
|
|
2781
|
+
Root: SelectRoot,
|
|
2782
|
+
Label: SelectLabel,
|
|
2783
|
+
Control: SelectControl,
|
|
2784
|
+
Trigger: SelectTrigger,
|
|
2785
|
+
ClearTrigger: SelectClearTrigger,
|
|
2786
|
+
ValueText: SelectValueText,
|
|
2787
|
+
Indicator: SelectIndicator,
|
|
2788
|
+
Positioner: SelectPositioner,
|
|
2789
|
+
Content: SelectContent,
|
|
2790
|
+
ItemGroup: SelectItemGroup,
|
|
2791
|
+
ItemGroupLabel: SelectItemGroupLabel,
|
|
2792
|
+
Item: SelectItem,
|
|
2793
|
+
ItemText: SelectItemText,
|
|
2794
|
+
ItemIndicator: SelectItemIndicator,
|
|
2795
|
+
HiddenSelect: SelectHiddenSelect
|
|
2796
|
+
};
|
|
2797
|
+
|
|
2798
|
+
// src/components/select/select.tsx
|
|
2799
|
+
var import_jsx4 = require("@cerberus/styled-system/jsx");
|
|
2800
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2801
|
+
function Select2(props) {
|
|
2802
|
+
const { collection, placeholder, ...rootProps } = props;
|
|
2090
2803
|
const { icons } = useCerberusContext();
|
|
2091
|
-
const {
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
...invalid && { "aria-invalid": true },
|
|
2103
|
-
className: styles.input
|
|
2104
|
-
}
|
|
2105
|
-
),
|
|
2106
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2107
|
-
"span",
|
|
2108
|
-
{
|
|
2109
|
-
className: (0, import_css36.cx)(
|
|
2110
|
-
styles.iconStack,
|
|
2111
|
-
(0, import_patterns13.hstack)({
|
|
2112
|
-
gap: "2"
|
|
2113
|
-
})
|
|
2114
|
-
),
|
|
2115
|
-
children: [
|
|
2116
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2117
|
-
"span",
|
|
2118
|
-
{
|
|
2119
|
-
...invalid && { "data-invalid": true },
|
|
2120
|
-
className: styles.stateIcon,
|
|
2121
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(InvalidIcon, {})
|
|
2122
|
-
}
|
|
2123
|
-
) }),
|
|
2124
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: styles.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SelectArrow, {}) })
|
|
2125
|
-
]
|
|
2126
|
-
}
|
|
2127
|
-
)
|
|
2804
|
+
const { selectArrow: SelectArrow, invalid: InvalidIcon } = icons;
|
|
2805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(SelectParts.Root, { collection, ...rootProps, children: [
|
|
2806
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectParts.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(SelectParts.Trigger, { children: [
|
|
2807
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectParts.ValueText, { placeholder }),
|
|
2808
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx4.HStack, { children: [
|
|
2809
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Show, { when: props.invalid, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(InvalidIcon, { "data-part": "invalid-icon" }) }),
|
|
2810
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectParts.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectArrow, {}) })
|
|
2811
|
+
] })
|
|
2812
|
+
] }) }),
|
|
2813
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectParts.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectParts.Content, { size: rootProps.size, children: props.children }) }) }),
|
|
2814
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectParts.HiddenSelect, {})
|
|
2128
2815
|
] });
|
|
2129
2816
|
}
|
|
2130
2817
|
function Option(props) {
|
|
2131
|
-
|
|
2818
|
+
const { item, ...itemProps } = props;
|
|
2819
|
+
const { icons } = useCerberusContext();
|
|
2820
|
+
const { selectChecked: CheckedIcon } = icons;
|
|
2821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(SelectParts.Item, { ...itemProps, item, children: [
|
|
2822
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectParts.ItemText, { children: item == null ? void 0 : item.label }),
|
|
2823
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectParts.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CheckedIcon, {}) })
|
|
2824
|
+
] });
|
|
2132
2825
|
}
|
|
2133
2826
|
|
|
2134
|
-
// src/components/
|
|
2135
|
-
var
|
|
2136
|
-
function
|
|
2137
|
-
return /* @__PURE__ */ (0,
|
|
2138
|
-
|
|
2827
|
+
// src/components/select/option-group.tsx
|
|
2828
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2829
|
+
function OptionGroup(props) {
|
|
2830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItemGroup, { ...props });
|
|
2831
|
+
}
|
|
2832
|
+
function OptionGroupLabel(props) {
|
|
2833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItemGroupLabel, { ...props });
|
|
2834
|
+
}
|
|
2835
|
+
|
|
2836
|
+
// src/components/switch/primitives.tsx
|
|
2837
|
+
var import_react26 = require("@ark-ui/react");
|
|
2838
|
+
var import_css39 = require("@cerberus/styled-system/css");
|
|
2839
|
+
var import_recipes33 = require("@cerberus/styled-system/recipes");
|
|
2840
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2841
|
+
function SwitchRoot(props) {
|
|
2842
|
+
const { size, ...rootProps } = props;
|
|
2843
|
+
const styles = (0, import_recipes33.switchRecipe)({ size });
|
|
2844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2845
|
+
import_react26.Switch.Root,
|
|
2846
|
+
{
|
|
2847
|
+
...rootProps,
|
|
2848
|
+
className: (0, import_css39.cx)(styles.root, rootProps.className)
|
|
2849
|
+
}
|
|
2850
|
+
);
|
|
2851
|
+
}
|
|
2852
|
+
function SwitchLabel(props) {
|
|
2853
|
+
const styles = (0, import_recipes33.switchRecipe)();
|
|
2854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react26.Switch.Label, { ...props, className: (0, import_css39.cx)(styles.label, props.className) });
|
|
2855
|
+
}
|
|
2856
|
+
function SwitchControl(props) {
|
|
2857
|
+
const styles = (0, import_recipes33.switchRecipe)();
|
|
2858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2859
|
+
import_react26.Switch.Control,
|
|
2139
2860
|
{
|
|
2140
|
-
"aria-busy": "true",
|
|
2141
|
-
role: "status",
|
|
2142
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2143
|
-
height: props.size,
|
|
2144
|
-
width: props.size,
|
|
2145
|
-
viewBox: "0 0 24 24",
|
|
2146
2861
|
...props,
|
|
2147
|
-
|
|
2148
|
-
"g",
|
|
2149
|
-
{
|
|
2150
|
-
fill: "none",
|
|
2151
|
-
stroke: "currentColor",
|
|
2152
|
-
strokeLinecap: "round",
|
|
2153
|
-
strokeLinejoin: "round",
|
|
2154
|
-
strokeWidth: 2,
|
|
2155
|
-
children: [
|
|
2156
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
2157
|
-
"path",
|
|
2158
|
-
{
|
|
2159
|
-
strokeDasharray: 16,
|
|
2160
|
-
strokeDashoffset: 16,
|
|
2161
|
-
d: "M12 3c4.97 0 9 4.03 9 9",
|
|
2162
|
-
children: [
|
|
2163
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2164
|
-
"animate",
|
|
2165
|
-
{
|
|
2166
|
-
fill: "freeze",
|
|
2167
|
-
attributeName: "stroke-dashoffset",
|
|
2168
|
-
dur: "0.15s",
|
|
2169
|
-
values: "16;0"
|
|
2170
|
-
}
|
|
2171
|
-
),
|
|
2172
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2173
|
-
"animateTransform",
|
|
2174
|
-
{
|
|
2175
|
-
attributeName: "transform",
|
|
2176
|
-
dur: "0.75s",
|
|
2177
|
-
repeatCount: "indefinite",
|
|
2178
|
-
type: "rotate",
|
|
2179
|
-
values: "0 12 12;360 12 12"
|
|
2180
|
-
}
|
|
2181
|
-
)
|
|
2182
|
-
]
|
|
2183
|
-
}
|
|
2184
|
-
),
|
|
2185
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2186
|
-
"path",
|
|
2187
|
-
{
|
|
2188
|
-
strokeDasharray: 64,
|
|
2189
|
-
strokeDashoffset: 64,
|
|
2190
|
-
strokeOpacity: 0.3,
|
|
2191
|
-
d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z",
|
|
2192
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2193
|
-
"animate",
|
|
2194
|
-
{
|
|
2195
|
-
fill: "freeze",
|
|
2196
|
-
attributeName: "stroke-dashoffset",
|
|
2197
|
-
dur: "0.6s",
|
|
2198
|
-
values: "64;0"
|
|
2199
|
-
}
|
|
2200
|
-
)
|
|
2201
|
-
}
|
|
2202
|
-
)
|
|
2203
|
-
]
|
|
2204
|
-
}
|
|
2205
|
-
)
|
|
2862
|
+
className: (0, import_css39.cx)(styles.control, props.className)
|
|
2206
2863
|
}
|
|
2207
2864
|
);
|
|
2208
2865
|
}
|
|
2866
|
+
function SwitchThumb(props) {
|
|
2867
|
+
const styles = (0, import_recipes33.switchRecipe)();
|
|
2868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react26.Switch.Thumb, { ...props, className: (0, import_css39.cx)(styles.thumb, props.className) });
|
|
2869
|
+
}
|
|
2870
|
+
var SwitchHiddenInput = import_react26.Switch.HiddenInput;
|
|
2209
2871
|
|
|
2210
|
-
// src/components/
|
|
2211
|
-
var
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2872
|
+
// src/components/switch/parts.ts
|
|
2873
|
+
var SwitchParts = {
|
|
2874
|
+
Root: SwitchRoot,
|
|
2875
|
+
Label: SwitchLabel,
|
|
2876
|
+
Control: SwitchControl,
|
|
2877
|
+
Thumb: SwitchThumb,
|
|
2878
|
+
HiddenInput: SwitchHiddenInput
|
|
2879
|
+
};
|
|
2218
2880
|
|
|
2219
|
-
// src/
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
}
|
|
2225
|
-
return defaultValue;
|
|
2881
|
+
// src/components/switch/switch-indicator.tsx
|
|
2882
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2883
|
+
function SwitchIndicator() {
|
|
2884
|
+
const { icons } = useCerberusContext();
|
|
2885
|
+
const { toggleChecked: CheckIcon } = icons;
|
|
2886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CheckIcon, {});
|
|
2226
2887
|
}
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2888
|
+
|
|
2889
|
+
// src/components/switch/switch.tsx
|
|
2890
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2891
|
+
function Switch2(props) {
|
|
2892
|
+
const { children, ...rootProps } = props;
|
|
2893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(SwitchParts.Root, { ...rootProps, children: [
|
|
2894
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SwitchParts.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SwitchParts.Thumb, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SwitchIndicator, {}) }) }),
|
|
2895
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SwitchParts.Label, { children }),
|
|
2896
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SwitchParts.HiddenInput, {})
|
|
2897
|
+
] });
|
|
2230
2898
|
}
|
|
2231
2899
|
|
|
2900
|
+
// src/components/Tabs.client.tsx
|
|
2901
|
+
var import_tabs2 = require("@ark-ui/react/tabs");
|
|
2902
|
+
var import_css40 = require("@cerberus/styled-system/css");
|
|
2903
|
+
|
|
2232
2904
|
// src/context/tabs.tsx
|
|
2233
|
-
var
|
|
2234
|
-
var
|
|
2905
|
+
var import_tabs = require("@ark-ui/react/tabs");
|
|
2906
|
+
var import_recipes34 = require("@cerberus/styled-system/recipes");
|
|
2907
|
+
var import_react27 = require("react");
|
|
2908
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2909
|
+
var TabsContext = (0, import_react27.createContext)(null);
|
|
2235
2910
|
function Tabs(props) {
|
|
2236
2911
|
const { cache, defaultValue, palette, uuid, ...arkProps } = props;
|
|
2237
|
-
const [activeTab, setActiveTab] = (0,
|
|
2912
|
+
const [activeTab, setActiveTab] = (0, import_react27.useState)(
|
|
2238
2913
|
() => cache ? "" : defaultValue
|
|
2239
2914
|
);
|
|
2240
|
-
const styles = (0,
|
|
2241
|
-
const cacheKey = (0,
|
|
2915
|
+
const styles = (0, import_recipes34.tabs)({ palette });
|
|
2916
|
+
const cacheKey = (0, import_react27.useMemo)(
|
|
2242
2917
|
() => uuid ? `cerberus-tabs-${uuid}` : "cerberus-tabs",
|
|
2243
2918
|
[uuid]
|
|
2244
2919
|
);
|
|
2245
|
-
const handleValueChange = (0,
|
|
2920
|
+
const handleValueChange = (0, import_react27.useCallback)(
|
|
2246
2921
|
(details) => {
|
|
2247
2922
|
if (cache) {
|
|
2248
2923
|
setLocalStorage(cacheKey, details.value);
|
|
@@ -2251,20 +2926,20 @@ function Tabs(props) {
|
|
|
2251
2926
|
},
|
|
2252
2927
|
[cache]
|
|
2253
2928
|
);
|
|
2254
|
-
(0,
|
|
2929
|
+
(0, import_react27.useEffect)(() => {
|
|
2255
2930
|
if (cache && !activeTab) {
|
|
2256
2931
|
const cachedTab = getLocalStorage(cacheKey, defaultValue ?? "");
|
|
2257
2932
|
setActiveTab(cachedTab);
|
|
2258
2933
|
}
|
|
2259
2934
|
}, [cache, defaultValue, activeTab]);
|
|
2260
|
-
const value = (0,
|
|
2935
|
+
const value = (0, import_react27.useMemo)(
|
|
2261
2936
|
() => ({
|
|
2262
2937
|
active: activeTab,
|
|
2263
2938
|
styles
|
|
2264
2939
|
}),
|
|
2265
2940
|
[activeTab, palette, styles]
|
|
2266
2941
|
);
|
|
2267
|
-
return /* @__PURE__ */ (0,
|
|
2942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TabsContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2268
2943
|
import_tabs.Tabs.Root,
|
|
2269
2944
|
{
|
|
2270
2945
|
...arkProps,
|
|
@@ -2278,7 +2953,7 @@ function Tabs(props) {
|
|
|
2278
2953
|
) });
|
|
2279
2954
|
}
|
|
2280
2955
|
function useTabsContext() {
|
|
2281
|
-
const context = (0,
|
|
2956
|
+
const context = (0, import_react27.useContext)(TabsContext);
|
|
2282
2957
|
if (!context) {
|
|
2283
2958
|
throw new Error("useTabsContext must be used within a Tabs Provider.");
|
|
2284
2959
|
}
|
|
@@ -2286,18 +2961,18 @@ function useTabsContext() {
|
|
|
2286
2961
|
}
|
|
2287
2962
|
|
|
2288
2963
|
// src/components/Tabs.client.tsx
|
|
2289
|
-
var
|
|
2964
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2290
2965
|
function TabsList(props) {
|
|
2291
2966
|
const { children, ...tabsProps } = props;
|
|
2292
2967
|
const { styles } = useTabsContext();
|
|
2293
|
-
return /* @__PURE__ */ (0,
|
|
2968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
2294
2969
|
import_tabs2.Tabs.List,
|
|
2295
2970
|
{
|
|
2296
2971
|
...tabsProps,
|
|
2297
|
-
className: (0,
|
|
2972
|
+
className: (0, import_css40.cx)(tabsProps.className, styles.list),
|
|
2298
2973
|
children: [
|
|
2299
2974
|
children,
|
|
2300
|
-
/* @__PURE__ */ (0,
|
|
2975
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TabIndicator, {})
|
|
2301
2976
|
]
|
|
2302
2977
|
}
|
|
2303
2978
|
);
|
|
@@ -2305,90 +2980,90 @@ function TabsList(props) {
|
|
|
2305
2980
|
var TabList = TabsList;
|
|
2306
2981
|
function Tab(props) {
|
|
2307
2982
|
const { styles } = useTabsContext();
|
|
2308
|
-
return /* @__PURE__ */ (0,
|
|
2983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2309
2984
|
import_tabs2.Tabs.Trigger,
|
|
2310
2985
|
{
|
|
2311
2986
|
...props,
|
|
2312
|
-
className: (0,
|
|
2987
|
+
className: (0, import_css40.cx)(props.className, styles.trigger)
|
|
2313
2988
|
}
|
|
2314
2989
|
);
|
|
2315
2990
|
}
|
|
2316
2991
|
function TabIndicator(props) {
|
|
2317
2992
|
const { styles } = useTabsContext();
|
|
2318
|
-
return /* @__PURE__ */ (0,
|
|
2993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2319
2994
|
import_tabs2.Tabs.Indicator,
|
|
2320
2995
|
{
|
|
2321
2996
|
...props,
|
|
2322
|
-
className: (0,
|
|
2997
|
+
className: (0, import_css40.cx)(props.className, styles.indicator)
|
|
2323
2998
|
}
|
|
2324
2999
|
);
|
|
2325
3000
|
}
|
|
2326
3001
|
function TabPanel(props) {
|
|
2327
3002
|
const { styles } = useTabsContext();
|
|
2328
|
-
return /* @__PURE__ */ (0,
|
|
3003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2329
3004
|
import_tabs2.Tabs.Content,
|
|
2330
3005
|
{
|
|
2331
3006
|
...props,
|
|
2332
|
-
className: (0,
|
|
3007
|
+
className: (0, import_css40.cx)(props.className, styles.content)
|
|
2333
3008
|
}
|
|
2334
3009
|
);
|
|
2335
3010
|
}
|
|
2336
3011
|
|
|
2337
3012
|
// src/components/Table.tsx
|
|
2338
|
-
var
|
|
2339
|
-
var
|
|
2340
|
-
var
|
|
3013
|
+
var import_css41 = require("@cerberus/styled-system/css");
|
|
3014
|
+
var import_recipes35 = require("@cerberus/styled-system/recipes");
|
|
3015
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2341
3016
|
function Table(props) {
|
|
2342
3017
|
const { caption, children, ...nativeProps } = props;
|
|
2343
|
-
const styles = (0,
|
|
2344
|
-
return /* @__PURE__ */ (0,
|
|
3018
|
+
const styles = (0, import_recipes35.table)();
|
|
3019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: styles.container, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
2345
3020
|
"table",
|
|
2346
3021
|
{
|
|
2347
3022
|
...nativeProps,
|
|
2348
|
-
className: (0,
|
|
3023
|
+
className: (0, import_css41.cx)(nativeProps.className, styles.table),
|
|
2349
3024
|
children: [
|
|
2350
|
-
/* @__PURE__ */ (0,
|
|
3025
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("caption", { className: styles.caption, children: caption }),
|
|
2351
3026
|
children
|
|
2352
3027
|
]
|
|
2353
3028
|
}
|
|
2354
3029
|
) });
|
|
2355
3030
|
}
|
|
2356
3031
|
function Tr(props) {
|
|
2357
|
-
return /* @__PURE__ */ (0,
|
|
3032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("tr", { ...props });
|
|
2358
3033
|
}
|
|
2359
3034
|
|
|
2360
3035
|
// src/components/Thead.tsx
|
|
2361
|
-
var
|
|
2362
|
-
var
|
|
2363
|
-
var
|
|
3036
|
+
var import_css42 = require("@cerberus/styled-system/css");
|
|
3037
|
+
var import_recipes36 = require("@cerberus/styled-system/recipes");
|
|
3038
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2364
3039
|
function Thead(props) {
|
|
2365
|
-
return /* @__PURE__ */ (0,
|
|
3040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("thead", { ...props, className: (0, import_css42.cx)(props.className, (0, import_recipes36.thead)()) });
|
|
2366
3041
|
}
|
|
2367
3042
|
|
|
2368
3043
|
// src/components/Th.tsx
|
|
2369
|
-
var
|
|
2370
|
-
var
|
|
2371
|
-
var
|
|
3044
|
+
var import_css43 = require("@cerberus/styled-system/css");
|
|
3045
|
+
var import_recipes37 = require("@cerberus/styled-system/recipes");
|
|
3046
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2372
3047
|
function Th(props) {
|
|
2373
3048
|
const { size, onClick, ...nativeProps } = props;
|
|
2374
|
-
return /* @__PURE__ */ (0,
|
|
3049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2375
3050
|
Show,
|
|
2376
3051
|
{
|
|
2377
3052
|
when: Boolean(onClick),
|
|
2378
|
-
fallback: /* @__PURE__ */ (0,
|
|
3053
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2379
3054
|
"th",
|
|
2380
3055
|
{
|
|
2381
3056
|
...nativeProps,
|
|
2382
|
-
className: (0,
|
|
3057
|
+
className: (0, import_css43.cx)(nativeProps.className, (0, import_recipes37.th)({ size }))
|
|
2383
3058
|
}
|
|
2384
3059
|
),
|
|
2385
|
-
children: /* @__PURE__ */ (0,
|
|
3060
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("th", { ...nativeProps, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2386
3061
|
"button",
|
|
2387
3062
|
{
|
|
2388
|
-
className: (0,
|
|
3063
|
+
className: (0, import_css43.cx)(
|
|
2389
3064
|
nativeProps.className,
|
|
2390
|
-
(0,
|
|
2391
|
-
(0,
|
|
3065
|
+
(0, import_recipes37.th)({ size }),
|
|
3066
|
+
(0, import_css43.css)({
|
|
2392
3067
|
alignItems: "center",
|
|
2393
3068
|
display: "inline-flex",
|
|
2394
3069
|
justifyContent: "space-between",
|
|
@@ -2408,18 +3083,18 @@ function Th(props) {
|
|
|
2408
3083
|
}
|
|
2409
3084
|
|
|
2410
3085
|
// src/components/Td.tsx
|
|
2411
|
-
var
|
|
2412
|
-
var
|
|
2413
|
-
var
|
|
3086
|
+
var import_css44 = require("@cerberus/styled-system/css");
|
|
3087
|
+
var import_recipes38 = require("@cerberus/styled-system/recipes");
|
|
3088
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2414
3089
|
function Td(props) {
|
|
2415
3090
|
const { size, ...nativeProps } = props;
|
|
2416
|
-
return /* @__PURE__ */ (0,
|
|
3091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2417
3092
|
"td",
|
|
2418
3093
|
{
|
|
2419
3094
|
...nativeProps,
|
|
2420
|
-
className: (0,
|
|
3095
|
+
className: (0, import_css44.cx)(
|
|
2421
3096
|
nativeProps.className,
|
|
2422
|
-
(0,
|
|
3097
|
+
(0, import_recipes38.td)({
|
|
2423
3098
|
size
|
|
2424
3099
|
})
|
|
2425
3100
|
)
|
|
@@ -2427,19 +3102,19 @@ function Td(props) {
|
|
|
2427
3102
|
);
|
|
2428
3103
|
}
|
|
2429
3104
|
|
|
2430
|
-
// src/components/Tbody.tsx
|
|
2431
|
-
var
|
|
2432
|
-
var
|
|
2433
|
-
var
|
|
3105
|
+
// src/components/Tbody.tsx
|
|
3106
|
+
var import_recipes39 = require("@cerberus/styled-system/recipes");
|
|
3107
|
+
var import_css45 = require("@cerberus/styled-system/css");
|
|
3108
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2434
3109
|
function Tbody(props) {
|
|
2435
3110
|
const { decoration, ...nativeProps } = props;
|
|
2436
|
-
return /* @__PURE__ */ (0,
|
|
3111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2437
3112
|
"tbody",
|
|
2438
3113
|
{
|
|
2439
3114
|
...nativeProps,
|
|
2440
|
-
className: (0,
|
|
3115
|
+
className: (0, import_css45.cx)(
|
|
2441
3116
|
nativeProps.className,
|
|
2442
|
-
(0,
|
|
3117
|
+
(0, import_recipes39.tbody)({
|
|
2443
3118
|
decoration
|
|
2444
3119
|
})
|
|
2445
3120
|
)
|
|
@@ -2448,9 +3123,9 @@ function Tbody(props) {
|
|
|
2448
3123
|
}
|
|
2449
3124
|
|
|
2450
3125
|
// src/components/Tag.tsx
|
|
2451
|
-
var
|
|
2452
|
-
var
|
|
2453
|
-
var
|
|
3126
|
+
var import_css46 = require("@cerberus/styled-system/css");
|
|
3127
|
+
var import_recipes40 = require("@cerberus/styled-system/recipes");
|
|
3128
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2454
3129
|
function Tag(props) {
|
|
2455
3130
|
const { shape: initShape, gradient, onClick, usage, ...nativeProps } = props;
|
|
2456
3131
|
const palette = (props == null ? void 0 : props.palette) ?? "page";
|
|
@@ -2459,13 +3134,13 @@ function Tag(props) {
|
|
|
2459
3134
|
const closableStyles = isClosable ? closableCss : "";
|
|
2460
3135
|
const { icons } = useCerberusContext();
|
|
2461
3136
|
const { close: Close } = icons;
|
|
2462
|
-
return /* @__PURE__ */ (0,
|
|
3137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
2463
3138
|
"span",
|
|
2464
3139
|
{
|
|
2465
3140
|
...nativeProps,
|
|
2466
|
-
className: (0,
|
|
3141
|
+
className: (0, import_css46.cx)(
|
|
2467
3142
|
nativeProps.className,
|
|
2468
|
-
(0,
|
|
3143
|
+
(0, import_recipes40.tag)({
|
|
2469
3144
|
gradient,
|
|
2470
3145
|
palette,
|
|
2471
3146
|
shape,
|
|
@@ -2475,154 +3150,60 @@ function Tag(props) {
|
|
|
2475
3150
|
),
|
|
2476
3151
|
children: [
|
|
2477
3152
|
props.children,
|
|
2478
|
-
/* @__PURE__ */ (0,
|
|
3153
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Show, { when: isClosable, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2479
3154
|
"button",
|
|
2480
3155
|
{
|
|
2481
3156
|
"aria-label": "Close",
|
|
2482
|
-
className: (0,
|
|
3157
|
+
className: (0, import_recipes40.iconButton)({
|
|
2483
3158
|
palette: "action",
|
|
2484
3159
|
usage: "filled",
|
|
2485
3160
|
size: "sm"
|
|
2486
3161
|
}),
|
|
2487
3162
|
onClick,
|
|
2488
|
-
children: /* @__PURE__ */ (0,
|
|
3163
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Close, {})
|
|
2489
3164
|
}
|
|
2490
3165
|
) })
|
|
2491
3166
|
]
|
|
2492
3167
|
}
|
|
2493
3168
|
);
|
|
2494
3169
|
}
|
|
2495
|
-
var closableCss = (0,
|
|
3170
|
+
var closableCss = (0, import_css46.css)({
|
|
2496
3171
|
bgColor: "action.bg.active",
|
|
2497
3172
|
color: "action.text.initial",
|
|
2498
3173
|
paddingInlineEnd: "0"
|
|
2499
3174
|
});
|
|
2500
3175
|
|
|
2501
|
-
// src/components/
|
|
2502
|
-
var
|
|
2503
|
-
var
|
|
2504
|
-
|
|
2505
|
-
const { as = "p", ...pandaJSXProps } = props;
|
|
2506
|
-
switch (as) {
|
|
2507
|
-
case "h1":
|
|
2508
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H1, { ...pandaJSXProps });
|
|
2509
|
-
case "h2":
|
|
2510
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H2, { ...pandaJSXProps });
|
|
2511
|
-
case "h3":
|
|
2512
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H3, { ...pandaJSXProps });
|
|
2513
|
-
case "h4":
|
|
2514
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H4, { ...pandaJSXProps });
|
|
2515
|
-
case "h5":
|
|
2516
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H5, { ...pandaJSXProps });
|
|
2517
|
-
case "h6":
|
|
2518
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H6, { ...pandaJSXProps });
|
|
2519
|
-
case "strong":
|
|
2520
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.Strong, { ...pandaJSXProps });
|
|
2521
|
-
case "em":
|
|
2522
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.Em, { ...pandaJSXProps });
|
|
2523
|
-
case "small":
|
|
2524
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.Small, { ...pandaJSXProps });
|
|
2525
|
-
case "span":
|
|
2526
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.Span, { ...pandaJSXProps });
|
|
2527
|
-
default:
|
|
2528
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.P, { ...pandaJSXProps });
|
|
2529
|
-
}
|
|
2530
|
-
}
|
|
2531
|
-
|
|
2532
|
-
// src/components/Textarea.tsx
|
|
2533
|
-
var import_css44 = require("@cerberus/styled-system/css");
|
|
2534
|
-
var import_recipes37 = require("@cerberus/styled-system/recipes");
|
|
2535
|
-
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2536
|
-
function Textarea(props) {
|
|
2537
|
-
const { describedBy, ...nativeProps } = props;
|
|
2538
|
-
const { invalid, ...fieldState } = useFieldContext();
|
|
2539
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2540
|
-
"textarea",
|
|
2541
|
-
{
|
|
2542
|
-
...nativeProps,
|
|
2543
|
-
...fieldState,
|
|
2544
|
-
...describedBy && { "aria-describedby": describedBy },
|
|
2545
|
-
...invalid && { "aria-invalid": true },
|
|
2546
|
-
className: (0, import_css44.cx)(
|
|
2547
|
-
props.className,
|
|
2548
|
-
(0, import_recipes37.input)().input,
|
|
2549
|
-
(0, import_css44.css)({
|
|
2550
|
-
pxi: "2",
|
|
2551
|
-
py: "2",
|
|
2552
|
-
resize: "vertical"
|
|
2553
|
-
})
|
|
2554
|
-
),
|
|
2555
|
-
rows: 4
|
|
2556
|
-
}
|
|
2557
|
-
);
|
|
2558
|
-
}
|
|
3176
|
+
// src/components/toggle/primitives.tsx
|
|
3177
|
+
var import_toggle = require("@ark-ui/react/toggle");
|
|
3178
|
+
var ToggleRoot = import_toggle.Toggle.Root;
|
|
3179
|
+
var ToggleIndicator = import_toggle.Toggle.Indicator;
|
|
2559
3180
|
|
|
2560
|
-
// src/components/
|
|
2561
|
-
var
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
function Toggle(props) {
|
|
2566
|
-
const { size, describedBy, ...nativeProps } = props;
|
|
2567
|
-
const styles = (0, import_recipes38.toggle)({ size });
|
|
2568
|
-
const { invalid, ...state } = useFieldContext();
|
|
2569
|
-
const { icons } = useCerberusContext();
|
|
2570
|
-
const CheckedIcon = icons.toggleChecked;
|
|
2571
|
-
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
2572
|
-
"span",
|
|
2573
|
-
{
|
|
2574
|
-
className: (0, import_css45.cx)("group", styles.track, (0, import_patterns14.hstack)()),
|
|
2575
|
-
"data-checked": props.checked || props.defaultChecked,
|
|
2576
|
-
children: [
|
|
2577
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2578
|
-
"input",
|
|
2579
|
-
{
|
|
2580
|
-
...nativeProps,
|
|
2581
|
-
...state,
|
|
2582
|
-
...describedBy && { "aria-describedby": describedBy },
|
|
2583
|
-
...invalid && { "aria-invalid": true },
|
|
2584
|
-
className: (0, import_css45.cx)("peer", styles.input),
|
|
2585
|
-
role: "switch",
|
|
2586
|
-
type: "checkbox"
|
|
2587
|
-
}
|
|
2588
|
-
),
|
|
2589
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2590
|
-
"span",
|
|
2591
|
-
{
|
|
2592
|
-
className: (0, import_css45.cx)(
|
|
2593
|
-
styles.thumb,
|
|
2594
|
-
(0, import_patterns14.vstack)({
|
|
2595
|
-
justify: "center"
|
|
2596
|
-
})
|
|
2597
|
-
),
|
|
2598
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CheckedIcon, {})
|
|
2599
|
-
}
|
|
2600
|
-
)
|
|
2601
|
-
]
|
|
2602
|
-
}
|
|
2603
|
-
);
|
|
2604
|
-
}
|
|
3181
|
+
// src/components/toggle/parts.ts
|
|
3182
|
+
var ToggleParts = {
|
|
3183
|
+
Root: ToggleRoot,
|
|
3184
|
+
Indicator: ToggleIndicator
|
|
3185
|
+
};
|
|
2605
3186
|
|
|
2606
3187
|
// src/components/Tooltip.tsx
|
|
2607
3188
|
var import_tooltip = require("@ark-ui/react/tooltip");
|
|
2608
|
-
var
|
|
2609
|
-
var
|
|
2610
|
-
var
|
|
3189
|
+
var import_css47 = require("@cerberus/styled-system/css");
|
|
3190
|
+
var import_recipes41 = require("@cerberus/styled-system/recipes");
|
|
3191
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2611
3192
|
function Tooltip(props) {
|
|
2612
3193
|
const { content, children, asChild, ...nativeProps } = props;
|
|
2613
|
-
const styles = (0,
|
|
3194
|
+
const styles = (0, import_recipes41.tooltip)();
|
|
2614
3195
|
const position = {
|
|
2615
3196
|
placement: props.position || "top"
|
|
2616
3197
|
};
|
|
2617
|
-
return /* @__PURE__ */ (0,
|
|
2618
|
-
/* @__PURE__ */ (0,
|
|
2619
|
-
/* @__PURE__ */ (0,
|
|
3198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_tooltip.Tooltip.Root, { openDelay: 400, positioning: position, children: [
|
|
3199
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_tooltip.Tooltip.Trigger, { className: styles.trigger, asChild, children }),
|
|
3200
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_tooltip.Tooltip.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
2620
3201
|
import_tooltip.Tooltip.Content,
|
|
2621
3202
|
{
|
|
2622
3203
|
...nativeProps,
|
|
2623
|
-
className: (0,
|
|
3204
|
+
className: (0, import_css47.cx)(nativeProps.className, styles.content),
|
|
2624
3205
|
children: [
|
|
2625
|
-
/* @__PURE__ */ (0,
|
|
3206
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_tooltip.Tooltip.Arrow, { className: styles.arrow, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_tooltip.Tooltip.ArrowTip, { className: styles.arrowTip }) }),
|
|
2626
3207
|
content
|
|
2627
3208
|
]
|
|
2628
3209
|
}
|
|
@@ -2631,23 +3212,23 @@ function Tooltip(props) {
|
|
|
2631
3212
|
}
|
|
2632
3213
|
|
|
2633
3214
|
// src/context/confirm-modal.tsx
|
|
2634
|
-
var
|
|
2635
|
-
var
|
|
2636
|
-
var
|
|
2637
|
-
var
|
|
2638
|
-
var ConfirmModalContext = (0,
|
|
3215
|
+
var import_react28 = require("react");
|
|
3216
|
+
var import_css48 = require("@cerberus/styled-system/css");
|
|
3217
|
+
var import_jsx5 = require("@cerberus/styled-system/jsx");
|
|
3218
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3219
|
+
var ConfirmModalContext = (0, import_react28.createContext)(null);
|
|
2639
3220
|
function ConfirmModal(props) {
|
|
2640
|
-
const [open, setOpen] = (0,
|
|
2641
|
-
const [content, setContent] = (0,
|
|
2642
|
-
const resolveRef = (0,
|
|
3221
|
+
const [open, setOpen] = (0, import_react28.useState)(false);
|
|
3222
|
+
const [content, setContent] = (0, import_react28.useState)(null);
|
|
3223
|
+
const resolveRef = (0, import_react28.useRef)(null);
|
|
2643
3224
|
const kind = (content == null ? void 0 : content.kind) ?? "non-destructive";
|
|
2644
3225
|
const { icons } = useCerberusContext();
|
|
2645
3226
|
const { confirmModal: ConfirmIcon } = icons;
|
|
2646
|
-
const palette = (0,
|
|
3227
|
+
const palette = (0, import_react28.useMemo)(
|
|
2647
3228
|
() => kind === "destructive" ? "danger" : "action",
|
|
2648
3229
|
[kind]
|
|
2649
3230
|
);
|
|
2650
|
-
const handleChoice = (0,
|
|
3231
|
+
const handleChoice = (0, import_react28.useCallback)(
|
|
2651
3232
|
(e) => {
|
|
2652
3233
|
var _a, _b;
|
|
2653
3234
|
const target = e.currentTarget;
|
|
@@ -2659,7 +3240,7 @@ function ConfirmModal(props) {
|
|
|
2659
3240
|
},
|
|
2660
3241
|
[setOpen]
|
|
2661
3242
|
);
|
|
2662
|
-
const handleShow = (0,
|
|
3243
|
+
const handleShow = (0, import_react28.useCallback)(
|
|
2663
3244
|
(options) => {
|
|
2664
3245
|
return new Promise((resolve) => {
|
|
2665
3246
|
setContent({ ...options });
|
|
@@ -2669,42 +3250,42 @@ function ConfirmModal(props) {
|
|
|
2669
3250
|
},
|
|
2670
3251
|
[setOpen, setContent]
|
|
2671
3252
|
);
|
|
2672
|
-
const value = (0,
|
|
3253
|
+
const value = (0, import_react28.useMemo)(
|
|
2673
3254
|
() => ({
|
|
2674
3255
|
show: handleShow
|
|
2675
3256
|
}),
|
|
2676
3257
|
[handleShow]
|
|
2677
3258
|
);
|
|
2678
|
-
return /* @__PURE__ */ (0,
|
|
3259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(ConfirmModalContext.Provider, { value, children: [
|
|
2679
3260
|
props.children,
|
|
2680
|
-
/* @__PURE__ */ (0,
|
|
2681
|
-
/* @__PURE__ */ (0,
|
|
2682
|
-
/* @__PURE__ */ (0,
|
|
2683
|
-
|
|
3261
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Dialog, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx5.VStack, { gap: "xl", w: "full", children: [
|
|
3262
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx5.VStack, { alignItems: "flex-start", gap: "md", w: "full", children: [
|
|
3263
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3264
|
+
import_jsx5.HStack,
|
|
2684
3265
|
{
|
|
2685
3266
|
alignSelf: "center",
|
|
2686
3267
|
justify: "center",
|
|
2687
3268
|
paddingBlockEnd: "md",
|
|
2688
3269
|
w: "full",
|
|
2689
|
-
children: /* @__PURE__ */ (0,
|
|
3270
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2690
3271
|
Show,
|
|
2691
3272
|
{
|
|
2692
3273
|
when: palette === "danger",
|
|
2693
|
-
fallback: /* @__PURE__ */ (0,
|
|
3274
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2694
3275
|
Avatar,
|
|
2695
3276
|
{
|
|
2696
3277
|
ariaLabel: "",
|
|
2697
3278
|
gradient: "charon-light",
|
|
2698
|
-
icon: /* @__PURE__ */ (0,
|
|
3279
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(ConfirmIcon, { size: 24 }),
|
|
2699
3280
|
src: ""
|
|
2700
3281
|
}
|
|
2701
3282
|
),
|
|
2702
|
-
children: /* @__PURE__ */ (0,
|
|
3283
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2703
3284
|
Avatar,
|
|
2704
3285
|
{
|
|
2705
3286
|
ariaLabel: "",
|
|
2706
3287
|
gradient: "hades-dark",
|
|
2707
|
-
icon: /* @__PURE__ */ (0,
|
|
3288
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(ConfirmIcon, { size: 24 }),
|
|
2708
3289
|
src: ""
|
|
2709
3290
|
}
|
|
2710
3291
|
)
|
|
@@ -2712,15 +3293,15 @@ function ConfirmModal(props) {
|
|
|
2712
3293
|
)
|
|
2713
3294
|
}
|
|
2714
3295
|
),
|
|
2715
|
-
/* @__PURE__ */ (0,
|
|
2716
|
-
/* @__PURE__ */ (0,
|
|
3296
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DialogHeading, { children: content == null ? void 0 : content.heading }),
|
|
3297
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DialogDescription, { children: content == null ? void 0 : content.description })
|
|
2717
3298
|
] }),
|
|
2718
|
-
/* @__PURE__ */ (0,
|
|
2719
|
-
/* @__PURE__ */ (0,
|
|
3299
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx5.HStack, { gap: "4", w: "full", children: [
|
|
3300
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2720
3301
|
Button,
|
|
2721
3302
|
{
|
|
2722
3303
|
autoFocus: true,
|
|
2723
|
-
className: (0,
|
|
3304
|
+
className: (0, import_css48.css)({
|
|
2724
3305
|
w: "1/2"
|
|
2725
3306
|
}),
|
|
2726
3307
|
name: "confirm",
|
|
@@ -2730,10 +3311,10 @@ function ConfirmModal(props) {
|
|
|
2730
3311
|
children: content == null ? void 0 : content.actionText
|
|
2731
3312
|
}
|
|
2732
3313
|
),
|
|
2733
|
-
/* @__PURE__ */ (0,
|
|
3314
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DialogCloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2734
3315
|
Button,
|
|
2735
3316
|
{
|
|
2736
|
-
className: (0,
|
|
3317
|
+
className: (0, import_css48.css)({
|
|
2737
3318
|
w: "1/2"
|
|
2738
3319
|
}),
|
|
2739
3320
|
name: "cancel",
|
|
@@ -2748,7 +3329,7 @@ function ConfirmModal(props) {
|
|
|
2748
3329
|
] });
|
|
2749
3330
|
}
|
|
2750
3331
|
function useConfirmModal() {
|
|
2751
|
-
const context = (0,
|
|
3332
|
+
const context = (0, import_react28.useContext)(ConfirmModalContext);
|
|
2752
3333
|
if (context === null) {
|
|
2753
3334
|
throw new Error(
|
|
2754
3335
|
"useConfirmModal must be used within a ConfirmModal Provider"
|
|
@@ -2758,20 +3339,20 @@ function useConfirmModal() {
|
|
|
2758
3339
|
}
|
|
2759
3340
|
|
|
2760
3341
|
// src/context/cta-modal.tsx
|
|
2761
|
-
var
|
|
2762
|
-
var
|
|
2763
|
-
var
|
|
2764
|
-
var
|
|
2765
|
-
var
|
|
2766
|
-
var CTAModalContext = (0,
|
|
3342
|
+
var import_react29 = require("react");
|
|
3343
|
+
var import_jsx6 = require("@cerberus/styled-system/jsx");
|
|
3344
|
+
var import_css49 = require("@cerberus/styled-system/css");
|
|
3345
|
+
var import_jsx7 = require("@cerberus/styled-system/jsx");
|
|
3346
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3347
|
+
var CTAModalContext = (0, import_react29.createContext)(null);
|
|
2767
3348
|
function CTAModal(props) {
|
|
2768
3349
|
var _a, _b;
|
|
2769
|
-
const [open, setOpen] = (0,
|
|
2770
|
-
const [content, setContent] = (0,
|
|
3350
|
+
const [open, setOpen] = (0, import_react29.useState)(false);
|
|
3351
|
+
const [content, setContent] = (0, import_react29.useState)(null);
|
|
2771
3352
|
const confirmIcon = content == null ? void 0 : content.icon;
|
|
2772
3353
|
const { icons } = useCerberusContext();
|
|
2773
3354
|
const { confirmModal: FallbackIcon } = icons;
|
|
2774
|
-
const handleShow = (0,
|
|
3355
|
+
const handleShow = (0, import_react29.useCallback)(
|
|
2775
3356
|
(options) => {
|
|
2776
3357
|
const maxActions = 2;
|
|
2777
3358
|
if (options.actions.length > maxActions) {
|
|
@@ -2784,7 +3365,7 @@ function CTAModal(props) {
|
|
|
2784
3365
|
},
|
|
2785
3366
|
[setOpen]
|
|
2786
3367
|
);
|
|
2787
|
-
const handleActionClick = (0,
|
|
3368
|
+
const handleActionClick = (0, import_react29.useCallback)(
|
|
2788
3369
|
(event) => {
|
|
2789
3370
|
const index = event.currentTarget.getAttribute("data-index");
|
|
2790
3371
|
const action = content == null ? void 0 : content.actions[Number(index)];
|
|
@@ -2794,42 +3375,42 @@ function CTAModal(props) {
|
|
|
2794
3375
|
},
|
|
2795
3376
|
[content, setOpen]
|
|
2796
3377
|
);
|
|
2797
|
-
const value = (0,
|
|
3378
|
+
const value = (0, import_react29.useMemo)(
|
|
2798
3379
|
() => ({
|
|
2799
3380
|
show: handleShow
|
|
2800
3381
|
}),
|
|
2801
3382
|
[handleShow]
|
|
2802
3383
|
);
|
|
2803
|
-
return /* @__PURE__ */ (0,
|
|
3384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(CTAModalContext.Provider, { value, children: [
|
|
2804
3385
|
props.children,
|
|
2805
|
-
/* @__PURE__ */ (0,
|
|
2806
|
-
/* @__PURE__ */ (0,
|
|
2807
|
-
/* @__PURE__ */ (0,
|
|
2808
|
-
/* @__PURE__ */ (0,
|
|
2809
|
-
/* @__PURE__ */ (0,
|
|
3386
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Dialog, { size: "sm", children: [
|
|
3387
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DialogCloseIconTrigger, {}),
|
|
3388
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx7.VStack, { gap: "xl", w: "full", children: [
|
|
3389
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx7.VStack, { alignItems: "flex-start", gap: "md", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx7.VStack, { gap: "lg", w: "full", children: [
|
|
3390
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
2810
3391
|
Avatar,
|
|
2811
3392
|
{
|
|
2812
3393
|
ariaLabel: "",
|
|
2813
3394
|
gradient: "charon-light",
|
|
2814
|
-
icon: /* @__PURE__ */ (0,
|
|
3395
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
2815
3396
|
Show,
|
|
2816
3397
|
{
|
|
2817
3398
|
when: Boolean(confirmIcon),
|
|
2818
|
-
fallback: /* @__PURE__ */ (0,
|
|
3399
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(FallbackIcon, { size: 24 }),
|
|
2819
3400
|
children: confirmIcon
|
|
2820
3401
|
}
|
|
2821
3402
|
),
|
|
2822
3403
|
src: ""
|
|
2823
3404
|
}
|
|
2824
3405
|
),
|
|
2825
|
-
/* @__PURE__ */ (0,
|
|
2826
|
-
/* @__PURE__ */ (0,
|
|
3406
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DialogHeading, { children: content == null ? void 0 : content.heading }),
|
|
3407
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DialogDescription, { children: content == null ? void 0 : content.description })
|
|
2827
3408
|
] }) }),
|
|
2828
|
-
/* @__PURE__ */ (0,
|
|
3409
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx6.HStack, { gap: "md", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Show, { when: Boolean((_a = content == null ? void 0 : content.actions) == null ? void 0 : _a.length), children: (_b = content == null ? void 0 : content.actions) == null ? void 0 : _b.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
2829
3410
|
Button,
|
|
2830
3411
|
{
|
|
2831
3412
|
"data-index": index,
|
|
2832
|
-
className: (0,
|
|
3413
|
+
className: (0, import_css49.css)({
|
|
2833
3414
|
w: "1/2"
|
|
2834
3415
|
}),
|
|
2835
3416
|
onClick: handleActionClick,
|
|
@@ -2844,7 +3425,7 @@ function CTAModal(props) {
|
|
|
2844
3425
|
] });
|
|
2845
3426
|
}
|
|
2846
3427
|
function useCTAModal() {
|
|
2847
|
-
const context = (0,
|
|
3428
|
+
const context = (0, import_react29.useContext)(CTAModalContext);
|
|
2848
3429
|
if (context === null) {
|
|
2849
3430
|
throw new Error("useCTAModal must be used within a CTAModal Provider");
|
|
2850
3431
|
}
|
|
@@ -2852,10 +3433,10 @@ function useCTAModal() {
|
|
|
2852
3433
|
}
|
|
2853
3434
|
|
|
2854
3435
|
// src/context/notification-center.tsx
|
|
2855
|
-
var
|
|
2856
|
-
var
|
|
2857
|
-
var
|
|
2858
|
-
var
|
|
3436
|
+
var import_react30 = require("react");
|
|
3437
|
+
var import_patterns10 = require("@cerberus/styled-system/patterns");
|
|
3438
|
+
var import_recipes42 = require("@cerberus/styled-system/recipes");
|
|
3439
|
+
var import_css50 = require("@cerberus/styled-system/css");
|
|
2859
3440
|
|
|
2860
3441
|
// src/context/notification-center/store.ts
|
|
2861
3442
|
function notificationCenterReducer(state, action) {
|
|
@@ -2888,16 +3469,16 @@ function clearNotificationState(dispatch) {
|
|
|
2888
3469
|
}
|
|
2889
3470
|
|
|
2890
3471
|
// src/context/notification-center.tsx
|
|
2891
|
-
var
|
|
2892
|
-
var NotificationsContext = (0,
|
|
3472
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3473
|
+
var NotificationsContext = (0, import_react30.createContext)(null);
|
|
2893
3474
|
function NotificationCenter(props) {
|
|
2894
|
-
const [state, dispatch] = (0,
|
|
2895
|
-
const styles = (0,
|
|
2896
|
-
const timeout = (0,
|
|
3475
|
+
const [state, dispatch] = (0, import_react30.useReducer)(notificationCenterReducer, []);
|
|
3476
|
+
const styles = (0, import_recipes42.notification)();
|
|
3477
|
+
const timeout = (0, import_react30.useMemo)(
|
|
2897
3478
|
() => props.duration || 6e3,
|
|
2898
3479
|
[props.duration]
|
|
2899
3480
|
);
|
|
2900
|
-
const closeNotification = (0,
|
|
3481
|
+
const closeNotification = (0, import_react30.useCallback)(
|
|
2901
3482
|
(id) => {
|
|
2902
3483
|
updateNotificationState(dispatch, {
|
|
2903
3484
|
id,
|
|
@@ -2909,7 +3490,7 @@ function NotificationCenter(props) {
|
|
|
2909
3490
|
},
|
|
2910
3491
|
[dispatch]
|
|
2911
3492
|
);
|
|
2912
|
-
const handleNotify = (0,
|
|
3493
|
+
const handleNotify = (0, import_react30.useCallback)(
|
|
2913
3494
|
(options) => {
|
|
2914
3495
|
const id = `${options.palette}:${state.length + 1}`;
|
|
2915
3496
|
addNotification(dispatch, {
|
|
@@ -2923,32 +3504,32 @@ function NotificationCenter(props) {
|
|
|
2923
3504
|
},
|
|
2924
3505
|
[dispatch, state, timeout, closeNotification]
|
|
2925
3506
|
);
|
|
2926
|
-
const handleClose = (0,
|
|
3507
|
+
const handleClose = (0, import_react30.useCallback)(
|
|
2927
3508
|
(e) => {
|
|
2928
3509
|
const target = e.currentTarget;
|
|
2929
3510
|
closeNotification(target.value);
|
|
2930
3511
|
},
|
|
2931
3512
|
[closeNotification]
|
|
2932
3513
|
);
|
|
2933
|
-
const handleCloseAll = (0,
|
|
3514
|
+
const handleCloseAll = (0, import_react30.useCallback)(() => {
|
|
2934
3515
|
state.forEach((item) => {
|
|
2935
3516
|
if (item.onClose) item.onClose();
|
|
2936
3517
|
});
|
|
2937
3518
|
clearNotificationState(dispatch);
|
|
2938
3519
|
}, [state, dispatch]);
|
|
2939
|
-
const value = (0,
|
|
3520
|
+
const value = (0, import_react30.useMemo)(
|
|
2940
3521
|
() => ({
|
|
2941
3522
|
notify: handleNotify
|
|
2942
3523
|
}),
|
|
2943
3524
|
[handleNotify]
|
|
2944
3525
|
);
|
|
2945
|
-
return /* @__PURE__ */ (0,
|
|
3526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(NotificationsContext.Provider, { value, children: [
|
|
2946
3527
|
props.children,
|
|
2947
|
-
/* @__PURE__ */ (0,
|
|
2948
|
-
/* @__PURE__ */ (0,
|
|
3528
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Show, { when: state.length > 0, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Portal, { container: props.container, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: styles.center, children: [
|
|
3529
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Show, { when: state.length >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2949
3530
|
Button,
|
|
2950
3531
|
{
|
|
2951
|
-
className: (0,
|
|
3532
|
+
className: (0, import_css50.cx)(styles.closeAll, (0, import_patterns10.animateIn)()),
|
|
2952
3533
|
onClick: handleCloseAll,
|
|
2953
3534
|
palette: "action",
|
|
2954
3535
|
shape: "rounded",
|
|
@@ -2957,17 +3538,17 @@ function NotificationCenter(props) {
|
|
|
2957
3538
|
children: "Close all"
|
|
2958
3539
|
}
|
|
2959
3540
|
) }),
|
|
2960
|
-
/* @__PURE__ */ (0,
|
|
3541
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2961
3542
|
"div",
|
|
2962
3543
|
{
|
|
2963
|
-
className: (0,
|
|
3544
|
+
className: (0, import_patterns10.vstack)({
|
|
2964
3545
|
alignItems: "flex-end",
|
|
2965
3546
|
gap: "4"
|
|
2966
3547
|
}),
|
|
2967
3548
|
style: {
|
|
2968
3549
|
alignItems: "flex-end"
|
|
2969
3550
|
},
|
|
2970
|
-
children: state.map((option) => /* @__PURE__ */ (0,
|
|
3551
|
+
children: state.map((option) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2971
3552
|
MatchNotification,
|
|
2972
3553
|
{
|
|
2973
3554
|
...option,
|
|
@@ -2983,7 +3564,7 @@ function NotificationCenter(props) {
|
|
|
2983
3564
|
}
|
|
2984
3565
|
function MatchNotification(props) {
|
|
2985
3566
|
const { palette, id, onClose, heading, description, open } = props;
|
|
2986
|
-
const sharedProps = (0,
|
|
3567
|
+
const sharedProps = (0, import_react30.useMemo)(
|
|
2987
3568
|
() => ({
|
|
2988
3569
|
id,
|
|
2989
3570
|
open: true,
|
|
@@ -2994,30 +3575,30 @@ function MatchNotification(props) {
|
|
|
2994
3575
|
);
|
|
2995
3576
|
switch (palette) {
|
|
2996
3577
|
case "success":
|
|
2997
|
-
return /* @__PURE__ */ (0,
|
|
2998
|
-
/* @__PURE__ */ (0,
|
|
2999
|
-
/* @__PURE__ */ (0,
|
|
3578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Notification, { ...sharedProps, palette: "success", children: [
|
|
3579
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NotificationHeading, { palette: "success", children: heading }),
|
|
3580
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NotificationDescription, { palette: "success", children: description })
|
|
3000
3581
|
] });
|
|
3001
3582
|
case "warning":
|
|
3002
|
-
return /* @__PURE__ */ (0,
|
|
3003
|
-
/* @__PURE__ */ (0,
|
|
3004
|
-
/* @__PURE__ */ (0,
|
|
3583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Notification, { ...sharedProps, palette: "warning", children: [
|
|
3584
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NotificationHeading, { palette: "warning", children: heading }),
|
|
3585
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NotificationDescription, { palette: "warning", children: description })
|
|
3005
3586
|
] });
|
|
3006
3587
|
case "danger":
|
|
3007
|
-
return /* @__PURE__ */ (0,
|
|
3008
|
-
/* @__PURE__ */ (0,
|
|
3009
|
-
/* @__PURE__ */ (0,
|
|
3588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Notification, { ...sharedProps, palette: "danger", children: [
|
|
3589
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NotificationHeading, { palette: "danger", children: heading }),
|
|
3590
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NotificationDescription, { palette: "danger", children: description })
|
|
3010
3591
|
] });
|
|
3011
3592
|
case "info":
|
|
3012
3593
|
default:
|
|
3013
|
-
return /* @__PURE__ */ (0,
|
|
3014
|
-
/* @__PURE__ */ (0,
|
|
3015
|
-
/* @__PURE__ */ (0,
|
|
3594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Notification, { ...sharedProps, palette: "info", children: [
|
|
3595
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NotificationHeading, { palette: "info", children: heading }),
|
|
3596
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NotificationDescription, { palette: "info", children: description })
|
|
3016
3597
|
] });
|
|
3017
3598
|
}
|
|
3018
3599
|
}
|
|
3019
3600
|
function useNotificationCenter() {
|
|
3020
|
-
const context = (0,
|
|
3601
|
+
const context = (0, import_react30.useContext)(NotificationsContext);
|
|
3021
3602
|
if (!context) {
|
|
3022
3603
|
throw new Error(
|
|
3023
3604
|
"useNotificationCenter must be used within a NotificationsProvider"
|
|
@@ -3027,35 +3608,35 @@ function useNotificationCenter() {
|
|
|
3027
3608
|
}
|
|
3028
3609
|
|
|
3029
3610
|
// src/context/prompt-modal.tsx
|
|
3030
|
-
var
|
|
3031
|
-
var
|
|
3032
|
-
var
|
|
3033
|
-
var
|
|
3034
|
-
var
|
|
3035
|
-
var
|
|
3036
|
-
var PromptModalContext = (0,
|
|
3611
|
+
var import_react31 = require("react");
|
|
3612
|
+
var import_react32 = require("@ark-ui/react");
|
|
3613
|
+
var import_jsx8 = require("@cerberus/styled-system/jsx");
|
|
3614
|
+
var import_css51 = require("@cerberus/styled-system/css");
|
|
3615
|
+
var import_patterns11 = require("@cerberus/styled-system/patterns");
|
|
3616
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3617
|
+
var PromptModalContext = (0, import_react31.createContext)(null);
|
|
3037
3618
|
function PromptModal(props) {
|
|
3038
|
-
const resolveRef = (0,
|
|
3039
|
-
const [open, setOpen] = (0,
|
|
3040
|
-
const [content, setContent] = (0,
|
|
3041
|
-
const [inputValue, setInputValue] = (0,
|
|
3619
|
+
const resolveRef = (0, import_react31.useRef)(null);
|
|
3620
|
+
const [open, setOpen] = (0, import_react31.useState)(false);
|
|
3621
|
+
const [content, setContent] = (0, import_react31.useState)(null);
|
|
3622
|
+
const [inputValue, setInputValue] = (0, import_react31.useState)("");
|
|
3042
3623
|
const { icons } = useCerberusContext();
|
|
3043
3624
|
const { promptModal: PromptIcon } = icons;
|
|
3044
|
-
const isValid = (0,
|
|
3625
|
+
const isValid = (0, import_react31.useMemo)(
|
|
3045
3626
|
() => inputValue === (content == null ? void 0 : content.key),
|
|
3046
3627
|
[inputValue, content]
|
|
3047
3628
|
);
|
|
3048
|
-
const palette = (0,
|
|
3629
|
+
const palette = (0, import_react31.useMemo)(
|
|
3049
3630
|
() => (content == null ? void 0 : content.kind) === "destructive" ? "danger" : "action",
|
|
3050
3631
|
[content]
|
|
3051
3632
|
);
|
|
3052
|
-
const handleChange = (0,
|
|
3633
|
+
const handleChange = (0, import_react31.useCallback)(
|
|
3053
3634
|
(e) => {
|
|
3054
3635
|
setInputValue(e.currentTarget.value);
|
|
3055
3636
|
},
|
|
3056
3637
|
[content]
|
|
3057
3638
|
);
|
|
3058
|
-
const handleChoice = (0,
|
|
3639
|
+
const handleChoice = (0, import_react31.useCallback)(
|
|
3059
3640
|
(e) => {
|
|
3060
3641
|
var _a;
|
|
3061
3642
|
const target = e.currentTarget;
|
|
@@ -3066,7 +3647,7 @@ function PromptModal(props) {
|
|
|
3066
3647
|
},
|
|
3067
3648
|
[inputValue, setOpen]
|
|
3068
3649
|
);
|
|
3069
|
-
const handleShow = (0,
|
|
3650
|
+
const handleShow = (0, import_react31.useCallback)(
|
|
3070
3651
|
(options) => {
|
|
3071
3652
|
return new Promise((resolve) => {
|
|
3072
3653
|
setContent({ ...options, kind: options.kind || "non-destructive" });
|
|
@@ -3076,42 +3657,42 @@ function PromptModal(props) {
|
|
|
3076
3657
|
},
|
|
3077
3658
|
[setOpen]
|
|
3078
3659
|
);
|
|
3079
|
-
const value = (0,
|
|
3660
|
+
const value = (0, import_react31.useMemo)(
|
|
3080
3661
|
() => ({
|
|
3081
3662
|
show: handleShow
|
|
3082
3663
|
}),
|
|
3083
3664
|
[handleShow]
|
|
3084
3665
|
);
|
|
3085
|
-
return /* @__PURE__ */ (0,
|
|
3666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(PromptModalContext.Provider, { value, children: [
|
|
3086
3667
|
props.children,
|
|
3087
|
-
/* @__PURE__ */ (0,
|
|
3088
|
-
/* @__PURE__ */ (0,
|
|
3089
|
-
/* @__PURE__ */ (0,
|
|
3090
|
-
|
|
3668
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Dialog, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx8.VStack, { gap: "xl", w: "full", children: [
|
|
3669
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx8.VStack, { alignItems: "flex-start", gap: "md", w: "full", children: [
|
|
3670
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3671
|
+
import_jsx8.HStack,
|
|
3091
3672
|
{
|
|
3092
3673
|
alignSelf: "center",
|
|
3093
3674
|
justify: "center",
|
|
3094
3675
|
paddingBlockEnd: "md",
|
|
3095
3676
|
w: "full",
|
|
3096
|
-
children: /* @__PURE__ */ (0,
|
|
3677
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3097
3678
|
Show,
|
|
3098
3679
|
{
|
|
3099
3680
|
when: palette === "danger",
|
|
3100
|
-
fallback: /* @__PURE__ */ (0,
|
|
3681
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3101
3682
|
Avatar,
|
|
3102
3683
|
{
|
|
3103
3684
|
ariaLabel: "",
|
|
3104
3685
|
gradient: "charon-light",
|
|
3105
|
-
icon: /* @__PURE__ */ (0,
|
|
3686
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(PromptIcon, { size: 24 }),
|
|
3106
3687
|
src: ""
|
|
3107
3688
|
}
|
|
3108
3689
|
),
|
|
3109
|
-
children: /* @__PURE__ */ (0,
|
|
3690
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3110
3691
|
Avatar,
|
|
3111
3692
|
{
|
|
3112
3693
|
ariaLabel: "",
|
|
3113
3694
|
gradient: "hades-dark",
|
|
3114
|
-
icon: /* @__PURE__ */ (0,
|
|
3695
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(PromptIcon, { size: 24 }),
|
|
3115
3696
|
src: ""
|
|
3116
3697
|
}
|
|
3117
3698
|
)
|
|
@@ -3119,51 +3700,52 @@ function PromptModal(props) {
|
|
|
3119
3700
|
)
|
|
3120
3701
|
}
|
|
3121
3702
|
),
|
|
3122
|
-
/* @__PURE__ */ (0,
|
|
3123
|
-
/* @__PURE__ */ (0,
|
|
3703
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(DialogHeading, { children: content == null ? void 0 : content.heading }),
|
|
3704
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(DialogDescription, { children: content == null ? void 0 : content.description })
|
|
3124
3705
|
] }),
|
|
3125
|
-
/* @__PURE__ */ (0,
|
|
3126
|
-
|
|
3706
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3707
|
+
import_jsx8.VStack,
|
|
3127
3708
|
{
|
|
3128
3709
|
alignItems: "flex-start",
|
|
3129
3710
|
marginBlockStart: "md",
|
|
3130
3711
|
marginBlockEnd: "lg",
|
|
3131
3712
|
w: "full",
|
|
3132
|
-
children: /* @__PURE__ */ (0,
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
{
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3713
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
3714
|
+
FieldRoot,
|
|
3715
|
+
{
|
|
3716
|
+
ids: {
|
|
3717
|
+
control: "confirm"
|
|
3718
|
+
},
|
|
3719
|
+
invalid: !isValid,
|
|
3720
|
+
children: [
|
|
3721
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
3722
|
+
FieldLabel,
|
|
3723
|
+
{
|
|
3724
|
+
className: (0, import_patterns11.hstack)({
|
|
3725
|
+
gap: "xs",
|
|
3726
|
+
justify: "flex-start !important",
|
|
3727
|
+
marginBlockEnd: "xs",
|
|
3728
|
+
textStyle: "label-md"
|
|
3729
|
+
}),
|
|
3730
|
+
children: [
|
|
3731
|
+
"Type",
|
|
3732
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Text, { as: "strong", textTransform: "uppercase", children: content == null ? void 0 : content.key }),
|
|
3733
|
+
"to confirm"
|
|
3734
|
+
]
|
|
3735
|
+
}
|
|
3736
|
+
),
|
|
3737
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Input, { name: "confirm", onChange: handleChange, type: "text" })
|
|
3738
|
+
]
|
|
3739
|
+
}
|
|
3740
|
+
)
|
|
3159
3741
|
}
|
|
3160
3742
|
),
|
|
3161
|
-
/* @__PURE__ */ (0,
|
|
3162
|
-
/* @__PURE__ */ (0,
|
|
3743
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx8.HStack, { gap: "md", justify: "stretch", w: "full", children: [
|
|
3744
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3163
3745
|
Button,
|
|
3164
3746
|
{
|
|
3165
3747
|
autoFocus: true,
|
|
3166
|
-
className: (0,
|
|
3748
|
+
className: (0, import_css51.css)({
|
|
3167
3749
|
w: "1/2"
|
|
3168
3750
|
}),
|
|
3169
3751
|
disabled: !isValid,
|
|
@@ -3174,10 +3756,10 @@ function PromptModal(props) {
|
|
|
3174
3756
|
children: content == null ? void 0 : content.actionText
|
|
3175
3757
|
}
|
|
3176
3758
|
),
|
|
3177
|
-
/* @__PURE__ */ (0,
|
|
3759
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react32.DialogCloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3178
3760
|
Button,
|
|
3179
3761
|
{
|
|
3180
|
-
className: (0,
|
|
3762
|
+
className: (0, import_css51.css)({
|
|
3181
3763
|
w: "1/2"
|
|
3182
3764
|
}),
|
|
3183
3765
|
name: "cancel",
|
|
@@ -3192,7 +3774,7 @@ function PromptModal(props) {
|
|
|
3192
3774
|
] });
|
|
3193
3775
|
}
|
|
3194
3776
|
function usePromptModal() {
|
|
3195
|
-
const context = (0,
|
|
3777
|
+
const context = (0, import_react31.useContext)(PromptModalContext);
|
|
3196
3778
|
if (context === null) {
|
|
3197
3779
|
throw new Error("usePromptModal must be used within a PromptModal Provider");
|
|
3198
3780
|
}
|
|
@@ -3200,50 +3782,50 @@ function usePromptModal() {
|
|
|
3200
3782
|
}
|
|
3201
3783
|
|
|
3202
3784
|
// src/context/theme.tsx
|
|
3203
|
-
var
|
|
3785
|
+
var import_react34 = require("react");
|
|
3204
3786
|
|
|
3205
3787
|
// src/hooks/useTheme.ts
|
|
3206
|
-
var
|
|
3788
|
+
var import_react33 = require("react");
|
|
3207
3789
|
var THEME_KEY = "cerberus-theme";
|
|
3208
3790
|
var MODE_KEY = "cerberus-mode";
|
|
3209
3791
|
function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options = {}) {
|
|
3210
3792
|
const { updateMode, updateTheme, cache } = options;
|
|
3211
|
-
const [theme, setTheme] = (0,
|
|
3212
|
-
const [colorMode, setColorMode] = (0,
|
|
3213
|
-
const handleThemeChange = (0,
|
|
3793
|
+
const [theme, setTheme] = (0, import_react33.useState)(defaultTheme);
|
|
3794
|
+
const [colorMode, setColorMode] = (0, import_react33.useState)(defaultColorMode);
|
|
3795
|
+
const handleThemeChange = (0, import_react33.useCallback)(
|
|
3214
3796
|
(newTheme) => {
|
|
3215
3797
|
setTheme(newTheme);
|
|
3216
3798
|
updateTheme == null ? void 0 : updateTheme(newTheme);
|
|
3217
3799
|
},
|
|
3218
3800
|
[updateTheme]
|
|
3219
3801
|
);
|
|
3220
|
-
const handleColorModeChange = (0,
|
|
3802
|
+
const handleColorModeChange = (0, import_react33.useCallback)(
|
|
3221
3803
|
(newMode) => {
|
|
3222
3804
|
setColorMode(newMode);
|
|
3223
3805
|
updateMode == null ? void 0 : updateMode(newMode);
|
|
3224
3806
|
},
|
|
3225
3807
|
[updateMode]
|
|
3226
3808
|
);
|
|
3227
|
-
(0,
|
|
3809
|
+
(0, import_react33.useLayoutEffect)(() => {
|
|
3228
3810
|
const theme2 = localStorage.getItem(THEME_KEY);
|
|
3229
3811
|
if (theme2) {
|
|
3230
3812
|
setTheme(theme2);
|
|
3231
3813
|
}
|
|
3232
3814
|
}, []);
|
|
3233
|
-
(0,
|
|
3815
|
+
(0, import_react33.useLayoutEffect)(() => {
|
|
3234
3816
|
const mode = localStorage.getItem(MODE_KEY);
|
|
3235
3817
|
if (mode) {
|
|
3236
3818
|
setColorMode(mode);
|
|
3237
3819
|
}
|
|
3238
3820
|
}, []);
|
|
3239
|
-
(0,
|
|
3821
|
+
(0, import_react33.useEffect)(() => {
|
|
3240
3822
|
const root = document.documentElement;
|
|
3241
3823
|
root.dataset.pandaTheme = theme;
|
|
3242
3824
|
if (cache) {
|
|
3243
3825
|
localStorage.setItem(THEME_KEY, theme);
|
|
3244
3826
|
}
|
|
3245
3827
|
}, [theme, cache]);
|
|
3246
|
-
(0,
|
|
3828
|
+
(0, import_react33.useEffect)(() => {
|
|
3247
3829
|
const root = document.documentElement;
|
|
3248
3830
|
if (colorMode === "system") {
|
|
3249
3831
|
root.dataset.colorMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
@@ -3254,7 +3836,7 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
3254
3836
|
localStorage.setItem(MODE_KEY, colorMode);
|
|
3255
3837
|
}
|
|
3256
3838
|
}, [colorMode, cache]);
|
|
3257
|
-
return (0,
|
|
3839
|
+
return (0, import_react33.useMemo)(
|
|
3258
3840
|
() => ({
|
|
3259
3841
|
theme,
|
|
3260
3842
|
mode: colorMode,
|
|
@@ -3266,8 +3848,8 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
3266
3848
|
}
|
|
3267
3849
|
|
|
3268
3850
|
// src/context/theme.tsx
|
|
3269
|
-
var
|
|
3270
|
-
var ThemeContext = (0,
|
|
3851
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3852
|
+
var ThemeContext = (0, import_react34.createContext)(
|
|
3271
3853
|
null
|
|
3272
3854
|
);
|
|
3273
3855
|
function ThemeProvider(props) {
|
|
@@ -3276,168 +3858,31 @@ function ThemeProvider(props) {
|
|
|
3276
3858
|
updateMode: props.updateMode,
|
|
3277
3859
|
updateTheme: props.updateTheme
|
|
3278
3860
|
});
|
|
3279
|
-
return /* @__PURE__ */ (0,
|
|
3861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ThemeContext.Provider, { value: state, children: props.children });
|
|
3280
3862
|
}
|
|
3281
3863
|
function useThemeContext() {
|
|
3282
|
-
const context = (0,
|
|
3864
|
+
const context = (0, import_react34.useContext)(ThemeContext);
|
|
3283
3865
|
if (!context) {
|
|
3284
3866
|
throw new Error("useThemeContext must be used within a ThemeProvider");
|
|
3285
3867
|
}
|
|
3286
3868
|
return context;
|
|
3287
3869
|
}
|
|
3288
3870
|
|
|
3289
|
-
// src/hooks/useDate.ts
|
|
3290
|
-
var import_react29 = require("react");
|
|
3291
|
-
function useDate(options) {
|
|
3292
|
-
const initialValue = (options == null ? void 0 : options.initialValue) ?? "";
|
|
3293
|
-
const format = (options == null ? void 0 : options.format) ?? DateFormats.USMilitary;
|
|
3294
|
-
const onChange = options == null ? void 0 : options.onChange;
|
|
3295
|
-
const [value, setValue] = (0, import_react29.useState)(initialValue);
|
|
3296
|
-
const handleChange = (0, import_react29.useCallback)(
|
|
3297
|
-
(e) => {
|
|
3298
|
-
const newValue = formatMilitaryDate(e.currentTarget.value);
|
|
3299
|
-
if (onChange) onChange(e);
|
|
3300
|
-
setValue(newValue);
|
|
3301
|
-
},
|
|
3302
|
-
[onChange]
|
|
3303
|
-
);
|
|
3304
|
-
return (0, import_react29.useMemo)(
|
|
3305
|
-
() => ({
|
|
3306
|
-
format,
|
|
3307
|
-
value,
|
|
3308
|
-
ISO: formatMilitaryToISO(value),
|
|
3309
|
-
onChange: handleChange
|
|
3310
|
-
}),
|
|
3311
|
-
[format, value, handleChange]
|
|
3312
|
-
);
|
|
3313
|
-
}
|
|
3314
|
-
function formatMilitaryToISO(input3) {
|
|
3315
|
-
const [day, month, year] = input3.split(" ");
|
|
3316
|
-
const monthIndex = MONTHS.findIndex((m) => m.startsWith(month));
|
|
3317
|
-
const monthNum = monthIndex + 1;
|
|
3318
|
-
return `${year ?? "0000"}-${monthNum.toString().padStart(2, "0")}-${day.padStart(
|
|
3319
|
-
2,
|
|
3320
|
-
"0"
|
|
3321
|
-
)}`;
|
|
3322
|
-
}
|
|
3323
|
-
function formatMilitaryDate(input3) {
|
|
3324
|
-
let formatted = input3.toUpperCase().replace(/[^0-9A-Z]/g, "");
|
|
3325
|
-
let day = "";
|
|
3326
|
-
let month = "";
|
|
3327
|
-
let year = "";
|
|
3328
|
-
if (formatted.length >= 2) {
|
|
3329
|
-
day = formatted.replace(/[^0-9]/g, "").slice(0, 2);
|
|
3330
|
-
const dayNum = parseInt(day, 10);
|
|
3331
|
-
if (dayNum > 31) day = "31";
|
|
3332
|
-
else if (dayNum === 0) day = "01";
|
|
3333
|
-
formatted = formatted.slice(2);
|
|
3334
|
-
}
|
|
3335
|
-
if (formatted.length >= 3) {
|
|
3336
|
-
month = formatted.slice(0, 3);
|
|
3337
|
-
const monthIndex = MONTHS.findIndex((m) => m.startsWith(month));
|
|
3338
|
-
if (monthIndex !== -1) {
|
|
3339
|
-
month = MONTHS[monthIndex];
|
|
3340
|
-
} else {
|
|
3341
|
-
month = month.replace(/[^A-Z]/g, "");
|
|
3342
|
-
}
|
|
3343
|
-
formatted = formatted.slice(3);
|
|
3344
|
-
}
|
|
3345
|
-
if (formatted.length > 0) {
|
|
3346
|
-
year = formatted.slice(0, 4);
|
|
3347
|
-
}
|
|
3348
|
-
return [day, month, year].filter(Boolean).join(" ");
|
|
3349
|
-
}
|
|
3350
|
-
function formatISOToMilitary(date) {
|
|
3351
|
-
const [year, month, day] = date.split("-");
|
|
3352
|
-
const monthIndex = parseInt(month, 10) - 1;
|
|
3353
|
-
const monthStr = MONTHS[monthIndex];
|
|
3354
|
-
return `${day} ${monthStr} ${year}`;
|
|
3355
|
-
}
|
|
3356
|
-
var DateFormats = {
|
|
3357
|
-
get ISO() {
|
|
3358
|
-
return "YYYY-MM-DD";
|
|
3359
|
-
},
|
|
3360
|
-
get USMilitary() {
|
|
3361
|
-
return "DD MMM YYYY";
|
|
3362
|
-
},
|
|
3363
|
-
get Months() {
|
|
3364
|
-
return MONTHS;
|
|
3365
|
-
}
|
|
3366
|
-
};
|
|
3367
|
-
var MONTHS = [
|
|
3368
|
-
"JAN",
|
|
3369
|
-
"FEB",
|
|
3370
|
-
"MAR",
|
|
3371
|
-
"APR",
|
|
3372
|
-
"MAY",
|
|
3373
|
-
"JUN",
|
|
3374
|
-
"JUL",
|
|
3375
|
-
"AUG",
|
|
3376
|
-
"SEP",
|
|
3377
|
-
"OCT",
|
|
3378
|
-
"NOV",
|
|
3379
|
-
"DEC"
|
|
3380
|
-
];
|
|
3381
|
-
|
|
3382
|
-
// src/hooks/useModal.ts
|
|
3383
|
-
var import_react30 = require("react");
|
|
3384
|
-
function useModal() {
|
|
3385
|
-
const modalRef = (0, import_react30.useRef)(null);
|
|
3386
|
-
const [isOpen, setIsOpen] = (0, import_react30.useState)(false);
|
|
3387
|
-
const show = (0, import_react30.useCallback)(() => {
|
|
3388
|
-
var _a;
|
|
3389
|
-
(_a = modalRef.current) == null ? void 0 : _a.showModal();
|
|
3390
|
-
setIsOpen(true);
|
|
3391
|
-
}, []);
|
|
3392
|
-
const close = (0, import_react30.useCallback)(() => {
|
|
3393
|
-
var _a;
|
|
3394
|
-
(_a = modalRef.current) == null ? void 0 : _a.close();
|
|
3395
|
-
setIsOpen(false);
|
|
3396
|
-
}, []);
|
|
3397
|
-
return (0, import_react30.useMemo)(() => {
|
|
3398
|
-
return {
|
|
3399
|
-
modalRef,
|
|
3400
|
-
show,
|
|
3401
|
-
close,
|
|
3402
|
-
isOpen
|
|
3403
|
-
};
|
|
3404
|
-
}, [modalRef, show, close, isOpen]);
|
|
3405
|
-
}
|
|
3406
|
-
|
|
3407
|
-
// src/hooks/useToggle.ts
|
|
3408
|
-
var import_react31 = require("react");
|
|
3409
|
-
function useToggle(options) {
|
|
3410
|
-
const [checked, setChecked] = (0, import_react31.useState)((options == null ? void 0 : options.checked) ?? "");
|
|
3411
|
-
const onChange = options == null ? void 0 : options.onChange;
|
|
3412
|
-
const handleChange = (0, import_react31.useCallback)(
|
|
3413
|
-
(e) => {
|
|
3414
|
-
const target = e.currentTarget;
|
|
3415
|
-
setChecked((prev) => {
|
|
3416
|
-
return prev === target.value ? "" : target.value;
|
|
3417
|
-
});
|
|
3418
|
-
onChange == null ? void 0 : onChange(e);
|
|
3419
|
-
},
|
|
3420
|
-
[onChange]
|
|
3421
|
-
);
|
|
3422
|
-
return (0, import_react31.useMemo)(() => ({ checked, handleChange }), [checked, handleChange]);
|
|
3423
|
-
}
|
|
3424
|
-
|
|
3425
3871
|
// src/hooks/useRootColors.ts
|
|
3426
|
-
var
|
|
3872
|
+
var import_react35 = require("react");
|
|
3427
3873
|
function useRootColors(colors = []) {
|
|
3428
|
-
const [state, dispatch] = (0,
|
|
3429
|
-
const handleRefetch = (0,
|
|
3874
|
+
const [state, dispatch] = (0, import_react35.useReducer)(rootColorsReducer, {});
|
|
3875
|
+
const handleRefetch = (0, import_react35.useCallback)(() => {
|
|
3430
3876
|
return new Promise((resolve) => {
|
|
3431
3877
|
dispatch(formatColors(colors));
|
|
3432
3878
|
resolve();
|
|
3433
3879
|
});
|
|
3434
3880
|
}, []);
|
|
3435
|
-
(0,
|
|
3881
|
+
(0, import_react35.useEffect)(() => {
|
|
3436
3882
|
if (Object.keys(state).length === colors.length) return;
|
|
3437
3883
|
dispatch(formatColors(colors));
|
|
3438
|
-
console.log("updating colors in root hook");
|
|
3439
3884
|
}, [colors]);
|
|
3440
|
-
return (0,
|
|
3885
|
+
return (0, import_react35.useMemo)(
|
|
3441
3886
|
() => ({ colors: state, refetch: handleRefetch }),
|
|
3442
3887
|
[state, handleRefetch]
|
|
3443
3888
|
);
|
|
@@ -3458,9 +3903,9 @@ function rootColorsReducer(state, action) {
|
|
|
3458
3903
|
}
|
|
3459
3904
|
|
|
3460
3905
|
// src/config/icons/checkbox.icons.tsx
|
|
3461
|
-
var
|
|
3906
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3462
3907
|
function CheckmarkIcon(props) {
|
|
3463
|
-
return /* @__PURE__ */ (0,
|
|
3908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3464
3909
|
"svg",
|
|
3465
3910
|
{
|
|
3466
3911
|
"aria-hidden": "true",
|
|
@@ -3469,7 +3914,7 @@ function CheckmarkIcon(props) {
|
|
|
3469
3914
|
role: "img",
|
|
3470
3915
|
viewBox: "0 0 24 24",
|
|
3471
3916
|
...props,
|
|
3472
|
-
children: /* @__PURE__ */ (0,
|
|
3917
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3473
3918
|
"path",
|
|
3474
3919
|
{
|
|
3475
3920
|
fill: "currentColor",
|
|
@@ -3480,7 +3925,7 @@ function CheckmarkIcon(props) {
|
|
|
3480
3925
|
);
|
|
3481
3926
|
}
|
|
3482
3927
|
function IndeterminateIcon(props) {
|
|
3483
|
-
return /* @__PURE__ */ (0,
|
|
3928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3484
3929
|
"svg",
|
|
3485
3930
|
{
|
|
3486
3931
|
"aria-hidden": "true",
|
|
@@ -3489,15 +3934,15 @@ function IndeterminateIcon(props) {
|
|
|
3489
3934
|
fill: "none",
|
|
3490
3935
|
viewBox: "0 0 24 24",
|
|
3491
3936
|
...props,
|
|
3492
|
-
children: /* @__PURE__ */ (0,
|
|
3937
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
|
|
3493
3938
|
}
|
|
3494
3939
|
);
|
|
3495
3940
|
}
|
|
3496
3941
|
|
|
3497
3942
|
// src/components/AnimatingUploadIcon.tsx
|
|
3498
|
-
var
|
|
3943
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3499
3944
|
function AnimatingUploadIcon(props) {
|
|
3500
|
-
return /* @__PURE__ */ (0,
|
|
3945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3501
3946
|
"svg",
|
|
3502
3947
|
{
|
|
3503
3948
|
"aria-hidden": "true",
|
|
@@ -3505,7 +3950,7 @@ function AnimatingUploadIcon(props) {
|
|
|
3505
3950
|
width: props.size ?? "1em",
|
|
3506
3951
|
height: props.size ?? "1em",
|
|
3507
3952
|
viewBox: "0 0 24 24",
|
|
3508
|
-
children: /* @__PURE__ */ (0,
|
|
3953
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
3509
3954
|
"g",
|
|
3510
3955
|
{
|
|
3511
3956
|
fill: "none",
|
|
@@ -3514,14 +3959,14 @@ function AnimatingUploadIcon(props) {
|
|
|
3514
3959
|
strokeLinejoin: "round",
|
|
3515
3960
|
strokeWidth: 1.5,
|
|
3516
3961
|
children: [
|
|
3517
|
-
/* @__PURE__ */ (0,
|
|
3962
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3518
3963
|
"path",
|
|
3519
3964
|
{
|
|
3520
3965
|
"data-name": "animating-trail",
|
|
3521
3966
|
strokeDasharray: "2 4",
|
|
3522
3967
|
strokeDashoffset: 6,
|
|
3523
3968
|
d: "M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",
|
|
3524
|
-
children: /* @__PURE__ */ (0,
|
|
3969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3525
3970
|
"animate",
|
|
3526
3971
|
{
|
|
3527
3972
|
attributeName: "stroke-dashoffset",
|
|
@@ -3532,14 +3977,14 @@ function AnimatingUploadIcon(props) {
|
|
|
3532
3977
|
)
|
|
3533
3978
|
}
|
|
3534
3979
|
),
|
|
3535
|
-
/* @__PURE__ */ (0,
|
|
3980
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3536
3981
|
"path",
|
|
3537
3982
|
{
|
|
3538
3983
|
"data-name": "half-circle",
|
|
3539
3984
|
strokeDasharray: 32,
|
|
3540
3985
|
strokeDashoffset: 32,
|
|
3541
3986
|
d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",
|
|
3542
|
-
children: /* @__PURE__ */ (0,
|
|
3987
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3543
3988
|
"animate",
|
|
3544
3989
|
{
|
|
3545
3990
|
fill: "freeze",
|
|
@@ -3551,7 +3996,7 @@ function AnimatingUploadIcon(props) {
|
|
|
3551
3996
|
)
|
|
3552
3997
|
}
|
|
3553
3998
|
),
|
|
3554
|
-
/* @__PURE__ */ (0,
|
|
3999
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3555
4000
|
"svg",
|
|
3556
4001
|
{
|
|
3557
4002
|
"aria-hidden": "true",
|
|
@@ -3561,7 +4006,7 @@ function AnimatingUploadIcon(props) {
|
|
|
3561
4006
|
x: "27%",
|
|
3562
4007
|
y: "27%",
|
|
3563
4008
|
viewBox: "0 0 24 24",
|
|
3564
|
-
children: /* @__PURE__ */ (0,
|
|
4009
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3565
4010
|
"polygon",
|
|
3566
4011
|
{
|
|
3567
4012
|
fill: "currentColor",
|
|
@@ -3569,7 +4014,7 @@ function AnimatingUploadIcon(props) {
|
|
|
3569
4014
|
strokeWidth: 0.8,
|
|
3570
4015
|
opacity: "1",
|
|
3571
4016
|
points: "3.7,6.7 7.5,2.9 7.5,15 8.5,15 8.5,2.9 12.3,6.7 13,6 8,1 3,6 ",
|
|
3572
|
-
children: /* @__PURE__ */ (0,
|
|
4017
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3573
4018
|
"animate",
|
|
3574
4019
|
{
|
|
3575
4020
|
fill: "freeze",
|
|
@@ -3608,12 +4053,6 @@ function makeSystemConfig(options) {
|
|
|
3608
4053
|
return options;
|
|
3609
4054
|
}
|
|
3610
4055
|
|
|
3611
|
-
// src/utils/index.ts
|
|
3612
|
-
function formatNotifyCount(count) {
|
|
3613
|
-
if (count > 99) return "99+";
|
|
3614
|
-
return count.toString();
|
|
3615
|
-
}
|
|
3616
|
-
|
|
3617
4056
|
// src/index.ts
|
|
3618
4057
|
__reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
3619
4058
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -3629,9 +4068,18 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
3629
4068
|
AdmonitionHeading,
|
|
3630
4069
|
Avatar,
|
|
3631
4070
|
Button,
|
|
4071
|
+
ButtonIcon,
|
|
4072
|
+
ButtonParts,
|
|
3632
4073
|
CTAModal,
|
|
3633
4074
|
CerberusProvider,
|
|
3634
4075
|
Checkbox,
|
|
4076
|
+
CheckboxControl,
|
|
4077
|
+
CheckboxGroup,
|
|
4078
|
+
CheckboxHiddenInput,
|
|
4079
|
+
CheckboxIndicator,
|
|
4080
|
+
CheckboxLabel,
|
|
4081
|
+
CheckboxParts,
|
|
4082
|
+
CheckboxRoot,
|
|
3635
4083
|
CircularProgress,
|
|
3636
4084
|
ConfirmModal,
|
|
3637
4085
|
DateFormats,
|
|
@@ -3666,11 +4114,27 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
3666
4114
|
FeatureFlag,
|
|
3667
4115
|
FeatureFlags,
|
|
3668
4116
|
Field,
|
|
4117
|
+
FieldErrorText,
|
|
4118
|
+
FieldHelperText,
|
|
4119
|
+
FieldInput,
|
|
4120
|
+
FieldLabel,
|
|
3669
4121
|
FieldMessage,
|
|
4122
|
+
FieldParts,
|
|
4123
|
+
FieldRequiredIndicator,
|
|
4124
|
+
FieldRoot,
|
|
4125
|
+
FieldStartIndicator,
|
|
4126
|
+
FieldStatusIndicator,
|
|
4127
|
+
FieldTextarea,
|
|
3670
4128
|
Fieldset,
|
|
4129
|
+
FieldsetErrorText,
|
|
4130
|
+
FieldsetHelperText,
|
|
3671
4131
|
FieldsetLabel,
|
|
4132
|
+
FieldsetLegend,
|
|
4133
|
+
FieldsetParts,
|
|
4134
|
+
FieldsetRoot,
|
|
3672
4135
|
FileStatus,
|
|
3673
4136
|
FileUploader,
|
|
4137
|
+
For,
|
|
3674
4138
|
IconButton,
|
|
3675
4139
|
Input,
|
|
3676
4140
|
Label,
|
|
@@ -3696,14 +4160,48 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
3696
4160
|
NotificationDescription,
|
|
3697
4161
|
NotificationHeading,
|
|
3698
4162
|
Option,
|
|
4163
|
+
OptionGroup,
|
|
4164
|
+
OptionGroupLabel,
|
|
3699
4165
|
Portal,
|
|
3700
4166
|
ProgressBar,
|
|
3701
4167
|
PromptModal,
|
|
3702
4168
|
Radio,
|
|
4169
|
+
RadioGroup,
|
|
4170
|
+
RadioGroupIndicator,
|
|
4171
|
+
RadioGroupItem,
|
|
4172
|
+
RadioGroupItemControl,
|
|
4173
|
+
RadioGroupItemHiddenInput,
|
|
4174
|
+
RadioGroupItemText,
|
|
4175
|
+
RadioGroupLabel,
|
|
4176
|
+
RadioGroupRoot,
|
|
4177
|
+
RadioParts,
|
|
3703
4178
|
RangePickerInput,
|
|
3704
4179
|
Select,
|
|
4180
|
+
SelectClearTrigger,
|
|
4181
|
+
SelectContent,
|
|
4182
|
+
SelectControl,
|
|
4183
|
+
SelectHiddenSelect,
|
|
4184
|
+
SelectIndicator,
|
|
4185
|
+
SelectItem,
|
|
4186
|
+
SelectItemGroup,
|
|
4187
|
+
SelectItemGroupLabel,
|
|
4188
|
+
SelectItemIndicator,
|
|
4189
|
+
SelectItemText,
|
|
4190
|
+
SelectLabel,
|
|
4191
|
+
SelectParts,
|
|
4192
|
+
SelectPositioner,
|
|
4193
|
+
SelectRoot,
|
|
4194
|
+
SelectTrigger,
|
|
4195
|
+
SelectValueText,
|
|
3705
4196
|
Show,
|
|
3706
4197
|
Spinner,
|
|
4198
|
+
Switch,
|
|
4199
|
+
SwitchControl,
|
|
4200
|
+
SwitchHiddenInput,
|
|
4201
|
+
SwitchLabel,
|
|
4202
|
+
SwitchParts,
|
|
4203
|
+
SwitchRoot,
|
|
4204
|
+
SwitchThumb,
|
|
3707
4205
|
THEME_KEY,
|
|
3708
4206
|
Tab,
|
|
3709
4207
|
TabIndicator,
|
|
@@ -3721,10 +4219,13 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
3721
4219
|
Th,
|
|
3722
4220
|
Thead,
|
|
3723
4221
|
ThemeProvider,
|
|
3724
|
-
|
|
4222
|
+
ToggleIndicator,
|
|
4223
|
+
ToggleParts,
|
|
4224
|
+
ToggleRoot,
|
|
3725
4225
|
Tooltip,
|
|
3726
4226
|
Tr,
|
|
3727
4227
|
createNavTriggerProps,
|
|
4228
|
+
createSelectCollection,
|
|
3728
4229
|
defineIcons,
|
|
3729
4230
|
formatISOToMilitary,
|
|
3730
4231
|
formatMilitaryDate,
|
|
@@ -3735,13 +4236,13 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
3735
4236
|
makeSystemConfig,
|
|
3736
4237
|
processStatus,
|
|
3737
4238
|
setLocalStorage,
|
|
4239
|
+
splitProps,
|
|
3738
4240
|
trapFocus,
|
|
3739
4241
|
useCTAModal,
|
|
3740
4242
|
useCerberusContext,
|
|
3741
4243
|
useConfirmModal,
|
|
3742
4244
|
useDate,
|
|
3743
4245
|
useFeatureFlags,
|
|
3744
|
-
useFieldContext,
|
|
3745
4246
|
useModal,
|
|
3746
4247
|
useNavMenuContext,
|
|
3747
4248
|
useNotificationCenter,
|