@cerberus-design/react 0.15.0 → 0.16.0-next-feeb186
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/legacy/_tsup-dts-rollup.d.cts +1345 -319
- package/build/legacy/components/Accordion.cjs.map +1 -1
- package/build/legacy/components/AccordionItemGroup.cjs.map +1 -1
- package/build/legacy/components/DatePicker.client.cjs +63 -77
- package/build/legacy/components/DatePicker.client.cjs.map +1 -1
- package/build/legacy/components/FileStatus.cjs +126 -79
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/Legend.cjs +10 -22
- package/build/legacy/components/Legend.cjs.map +1 -1
- package/build/legacy/components/button/button.cjs +154 -0
- package/build/legacy/components/button/button.cjs.map +1 -0
- package/build/legacy/components/button/index.cjs +163 -0
- package/build/legacy/components/button/index.cjs.map +1 -0
- package/build/legacy/components/button/parts.cjs +159 -0
- package/build/legacy/components/button/parts.cjs.map +1 -0
- package/build/legacy/components/checkbox/checkbox-icon.cjs +121 -0
- package/build/legacy/components/checkbox/checkbox-icon.cjs.map +1 -0
- package/build/legacy/components/checkbox/checkbox.cjs +165 -0
- package/build/legacy/components/checkbox/checkbox.cjs.map +1 -0
- package/build/legacy/components/checkbox/index.cjs +179 -0
- package/build/legacy/components/checkbox/index.cjs.map +1 -0
- package/build/legacy/components/checkbox/parts.cjs +89 -0
- package/build/legacy/components/checkbox/parts.cjs.map +1 -0
- package/build/legacy/components/checkbox/primitives.cjs +87 -0
- package/build/legacy/components/checkbox/primitives.cjs.map +1 -0
- package/build/legacy/components/cta-dialog/context.cjs +33 -0
- package/build/legacy/components/cta-dialog/context.cjs.map +1 -0
- package/build/legacy/components/cta-dialog/index.cjs +433 -0
- package/build/legacy/components/cta-dialog/index.cjs.map +1 -0
- package/build/legacy/{context/cta-modal.cjs → components/cta-dialog/provider.cjs} +175 -128
- package/build/legacy/components/cta-dialog/provider.cjs.map +1 -0
- package/build/legacy/components/cta-dialog/trigger-item.cjs +99 -0
- package/build/legacy/components/cta-dialog/trigger-item.cjs.map +1 -0
- package/build/legacy/components/cta-dialog/utils.cjs +47 -0
- package/build/legacy/components/cta-dialog/utils.cjs.map +1 -0
- package/build/legacy/components/{FieldMessage.cjs → deprecated/FieldMessage.cjs} +4 -17
- package/build/legacy/components/deprecated/FieldMessage.cjs.map +1 -0
- package/build/legacy/components/{FieldsetLabel.cjs → deprecated/FieldsetLabel.cjs} +1 -1
- package/build/legacy/components/deprecated/FieldsetLabel.cjs.map +1 -0
- package/build/legacy/components/{Textarea.cjs → deprecated/Label.cjs} +24 -36
- package/build/legacy/components/deprecated/Label.cjs.map +1 -0
- package/build/legacy/components/{Modal.cjs → deprecated/Modal.cjs} +1 -1
- package/build/legacy/components/deprecated/Modal.cjs.map +1 -0
- package/build/legacy/components/{ModalDescription.cjs → deprecated/ModalDescription.cjs} +1 -1
- package/build/legacy/components/deprecated/ModalDescription.cjs.map +1 -0
- package/build/legacy/components/{ModalHeader.cjs → deprecated/ModalHeader.cjs} +1 -1
- package/build/legacy/components/deprecated/ModalHeader.cjs.map +1 -0
- package/build/legacy/components/{ModalHeading.cjs → deprecated/ModalHeading.cjs} +1 -1
- package/build/legacy/components/deprecated/ModalHeading.cjs.map +1 -0
- package/build/legacy/components/{NavMenuLink.cjs → deprecated/NavMenuLink.cjs} +2 -2
- package/build/legacy/components/deprecated/NavMenuLink.cjs.map +1 -0
- package/build/legacy/components/{NavMenuList.cjs → deprecated/NavMenuList.cjs} +2 -2
- package/build/legacy/components/deprecated/NavMenuList.cjs.map +1 -0
- package/build/legacy/components/{NavMenuTrigger.cjs → deprecated/NavMenuTrigger.cjs} +2 -2
- package/build/legacy/components/deprecated/NavMenuTrigger.cjs.map +1 -0
- package/build/legacy/components/field/field.cjs +130 -0
- package/build/legacy/components/field/field.cjs.map +1 -0
- package/build/legacy/components/field/index.cjs +267 -0
- package/build/legacy/components/field/index.cjs.map +1 -0
- package/build/legacy/components/field/parts.cjs +188 -0
- package/build/legacy/components/field/parts.cjs.map +1 -0
- package/build/legacy/components/field/primitives.cjs +191 -0
- package/build/legacy/components/field/primitives.cjs.map +1 -0
- package/build/legacy/components/{Button.cjs → field/start-indicator.cjs} +14 -19
- package/build/legacy/components/field/start-indicator.cjs.map +1 -0
- package/build/legacy/components/field/status-indicator.cjs +78 -0
- package/build/legacy/components/field/status-indicator.cjs.map +1 -0
- package/build/legacy/components/fieldset/fieldset.cjs +116 -0
- package/build/legacy/components/fieldset/fieldset.cjs.map +1 -0
- package/build/legacy/components/fieldset/index.cjs +126 -0
- package/build/legacy/components/fieldset/index.cjs.map +1 -0
- package/build/legacy/components/fieldset/parts.cjs +80 -0
- package/build/legacy/components/fieldset/parts.cjs.map +1 -0
- package/build/legacy/components/fieldset/primitives.cjs +76 -0
- package/build/legacy/components/fieldset/primitives.cjs.map +1 -0
- package/build/legacy/components/for.cjs +37 -0
- package/build/legacy/components/for.cjs.map +1 -0
- package/build/legacy/components/radio/index.cjs +143 -0
- package/build/legacy/components/radio/index.cjs.map +1 -0
- package/build/legacy/components/radio/parts.cjs +113 -0
- package/build/legacy/components/radio/parts.cjs.map +1 -0
- package/build/legacy/components/radio/primitives.cjs +115 -0
- package/build/legacy/components/radio/primitives.cjs.map +1 -0
- package/build/legacy/components/radio/radio.cjs +82 -0
- package/build/legacy/components/radio/radio.cjs.map +1 -0
- package/build/legacy/components/select/index.cjs +265 -0
- package/build/legacy/components/select/index.cjs.map +1 -0
- package/build/legacy/components/select/option-group.cjs +60 -0
- package/build/legacy/components/select/option-group.cjs.map +1 -0
- package/build/legacy/components/select/parts.cjs +153 -0
- package/build/legacy/components/select/parts.cjs.map +1 -0
- package/build/legacy/components/select/primitives.cjs +167 -0
- package/build/legacy/components/select/primitives.cjs.map +1 -0
- package/build/legacy/components/select/select.cjs +212 -0
- package/build/legacy/components/select/select.cjs.map +1 -0
- package/build/legacy/components/switch/index.cjs +118 -0
- package/build/legacy/components/switch/index.cjs.map +1 -0
- package/build/legacy/components/switch/parts.cjs +75 -0
- package/build/legacy/components/switch/parts.cjs.map +1 -0
- package/build/legacy/components/switch/primitives.cjs +72 -0
- package/build/legacy/components/switch/primitives.cjs.map +1 -0
- package/build/legacy/components/{Fieldset.cjs → switch/switch-indicator.cjs} +17 -32
- package/build/legacy/components/switch/switch-indicator.cjs.map +1 -0
- package/build/legacy/components/switch/switch.cjs +106 -0
- package/build/legacy/components/switch/switch.cjs.map +1 -0
- package/build/legacy/components/toggle/index.cjs +45 -0
- package/build/legacy/components/toggle/index.cjs.map +1 -0
- package/build/legacy/components/toggle/parts.cjs +41 -0
- package/build/legacy/components/toggle/parts.cjs.map +1 -0
- package/build/legacy/components/toggle/primitives.cjs +35 -0
- package/build/legacy/components/toggle/primitives.cjs.map +1 -0
- package/build/legacy/config/types.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs +55 -45
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/field.cjs +23 -4
- package/build/legacy/context/field.cjs.map +1 -1
- package/build/legacy/context/notification-center.cjs +24 -16
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs +206 -194
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/hooks/useDate.cjs.map +1 -1
- package/build/legacy/hooks/useRootColors.cjs +0 -1
- package/build/legacy/hooks/useRootColors.cjs.map +1 -1
- package/build/legacy/hooks/useToggle.cjs.map +1 -1
- package/build/legacy/index.cjs +2023 -1466
- package/build/legacy/index.cjs.map +1 -1
- package/build/legacy/utils/index.cjs +22 -2
- package/build/legacy/utils/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +1345 -319
- package/build/modern/{chunk-PM7CWT3N.js → chunk-245SMQ45.js} +2 -2
- package/build/modern/chunk-245SMQ45.js.map +1 -0
- package/build/modern/chunk-2BIHLH4V.js +15 -0
- package/build/modern/chunk-2BIHLH4V.js.map +1 -0
- package/build/modern/chunk-2CVGNLIM.js +15 -0
- package/build/modern/chunk-2CVGNLIM.js.map +1 -0
- package/build/modern/{chunk-ISCJ542I.js → chunk-2HOUQ2DX.js} +2 -2
- package/build/modern/chunk-2LF3HPNA.js +1 -0
- package/build/modern/chunk-4LSTU6WU.js +8 -0
- package/build/modern/chunk-4LSTU6WU.js.map +1 -0
- package/build/modern/chunk-5RTNSVYU.js +88 -0
- package/build/modern/chunk-5RTNSVYU.js.map +1 -0
- package/build/modern/chunk-6I2FW4WI.js +33 -0
- package/build/modern/chunk-6I2FW4WI.js.map +1 -0
- package/build/modern/chunk-6ICNCCPD.js +47 -0
- package/build/modern/chunk-6ICNCCPD.js.map +1 -0
- package/build/modern/chunk-6KZVE4HC.js +52 -0
- package/build/modern/chunk-6KZVE4HC.js.map +1 -0
- package/build/modern/{chunk-25HMVHLT.js → chunk-7SU6FCTJ.js} +5 -5
- package/build/modern/chunk-7TQRTBUP.js +19 -0
- package/build/modern/chunk-7TQRTBUP.js.map +1 -0
- package/build/modern/{chunk-UZVQ4INR.js → chunk-AIJ75ENY.js} +2 -2
- package/build/modern/chunk-AIJ75ENY.js.map +1 -0
- package/build/modern/chunk-AO3GB72J.js +27 -0
- package/build/modern/chunk-AO3GB72J.js.map +1 -0
- package/build/modern/{chunk-NUMM4TNC.js → chunk-AUALRL3U.js} +2 -2
- package/build/modern/chunk-AUALRL3U.js.map +1 -0
- package/build/modern/{chunk-IGHMP4WA.js → chunk-AZRFYQO7.js} +1 -1
- package/build/modern/chunk-AZRFYQO7.js.map +1 -0
- package/build/modern/chunk-BL7G3577.js +29 -0
- package/build/modern/chunk-BL7G3577.js.map +1 -0
- package/build/modern/chunk-BPRF34DU.js +62 -0
- package/build/modern/chunk-BPRF34DU.js.map +1 -0
- package/build/modern/chunk-CAZ3EICD.js +16 -0
- package/build/modern/chunk-CAZ3EICD.js.map +1 -0
- package/build/modern/chunk-CIMY2U22.js +10 -0
- package/build/modern/chunk-CIMY2U22.js.map +1 -0
- package/build/modern/chunk-CNA2VKAH.js +43 -0
- package/build/modern/chunk-CNA2VKAH.js.map +1 -0
- package/build/modern/chunk-CYC2YUKU.js +1 -0
- package/build/modern/{chunk-PZAZKQMO.js → chunk-DRDNNRU3.js} +2 -2
- package/build/modern/chunk-DRDNNRU3.js.map +1 -0
- package/build/modern/{chunk-NJSETNRL.js → chunk-DXBZ3HMY.js} +2 -2
- package/build/modern/chunk-DXOKSZVQ.js +12 -0
- package/build/modern/chunk-DXOKSZVQ.js.map +1 -0
- package/build/modern/chunk-EL4MX2PG.js +22 -0
- package/build/modern/chunk-EL4MX2PG.js.map +1 -0
- package/build/modern/chunk-FBS7AX76.js +37 -0
- package/build/modern/chunk-FBS7AX76.js.map +1 -0
- package/build/modern/chunk-FUL2VRDU.js +25 -0
- package/build/modern/chunk-FUL2VRDU.js.map +1 -0
- package/build/modern/{chunk-BHB56M7S.js → chunk-H54FR7IP.js} +6 -6
- package/build/modern/chunk-H54FR7IP.js.map +1 -0
- package/build/modern/chunk-IASVL7CW.js +19 -0
- package/build/modern/chunk-IASVL7CW.js.map +1 -0
- package/build/modern/{chunk-REO5GUNC.js → chunk-ICTISECN.js} +1 -1
- package/build/modern/chunk-ICTISECN.js.map +1 -0
- package/build/modern/chunk-IDTAB2UJ.js +1 -0
- package/build/modern/chunk-IKDXADLX.js +1 -0
- package/build/modern/chunk-KQQPZJEI.js +21 -0
- package/build/modern/chunk-KQQPZJEI.js.map +1 -0
- package/build/modern/chunk-KWZ3CEG6.js +23 -0
- package/build/modern/chunk-KWZ3CEG6.js.map +1 -0
- package/build/modern/{chunk-JWIJHSI6.js → chunk-L7N24B6B.js} +3 -6
- package/build/modern/chunk-L7N24B6B.js.map +1 -0
- package/build/modern/chunk-LT62577B.js +23 -0
- package/build/modern/chunk-LT62577B.js.map +1 -0
- package/build/modern/chunk-LZWNHXRP.js +48 -0
- package/build/modern/chunk-LZWNHXRP.js.map +1 -0
- package/build/modern/{chunk-EDARV2EI.js → chunk-MISIUX63.js} +4 -4
- package/build/modern/chunk-MVO2GNUA.js +47 -0
- package/build/modern/chunk-MVO2GNUA.js.map +1 -0
- package/build/modern/{chunk-3BM6MZ4A.js → chunk-MWRO5QYD.js} +1 -1
- package/build/modern/chunk-MWRO5QYD.js.map +1 -0
- package/build/modern/{chunk-SD3OVTHT.js → chunk-O542MPR7.js} +40 -43
- package/build/modern/chunk-O542MPR7.js.map +1 -0
- package/build/modern/chunk-OGYMMATX.js +1 -0
- package/build/modern/chunk-OVHCXBBI.js +22 -0
- package/build/modern/chunk-OVHCXBBI.js.map +1 -0
- package/build/modern/chunk-PLHYOCY3.js +23 -0
- package/build/modern/chunk-PLHYOCY3.js.map +1 -0
- package/build/modern/{chunk-JIRW4XOJ.js → chunk-Q3I4H6EC.js} +2 -2
- package/build/modern/chunk-Q3I4H6EC.js.map +1 -0
- package/build/modern/chunk-QCBLRACK.js +133 -0
- package/build/modern/chunk-QCBLRACK.js.map +1 -0
- package/build/modern/{chunk-FGCO27TC.js → chunk-QEM3M4N3.js} +25 -34
- package/build/modern/chunk-QEM3M4N3.js.map +1 -0
- package/build/modern/{chunk-ILQW5VZT.js → chunk-RBNOEAWJ.js} +4 -7
- package/build/modern/chunk-RBNOEAWJ.js.map +1 -0
- package/build/modern/{chunk-YKKNWILF.js → chunk-RHCTPSKT.js} +2 -15
- package/build/modern/chunk-RHCTPSKT.js.map +1 -0
- package/build/modern/chunk-STLN7BMJ.js +22 -0
- package/build/modern/chunk-STLN7BMJ.js.map +1 -0
- package/build/modern/{chunk-7NN3SJ7W.js → chunk-SWX5JWZR.js} +2 -2
- package/build/modern/chunk-SWX5JWZR.js.map +1 -0
- package/build/modern/{chunk-GCQMH4QA.js → chunk-SXLPDPOZ.js} +4 -4
- package/build/modern/chunk-TIJAFPHQ.js +1 -0
- package/build/modern/chunk-TYPULJMJ.js +1 -0
- package/build/modern/chunk-UDY6USHW.js +1 -0
- package/build/modern/chunk-V4YYGGMH.js +1 -0
- package/build/modern/chunk-VSTOSLFS.js +100 -0
- package/build/modern/chunk-VSTOSLFS.js.map +1 -0
- package/build/modern/{chunk-ZL6ZITLA.js → chunk-WECB67DC.js} +2 -2
- package/build/modern/chunk-WECB67DC.js.map +1 -0
- package/build/modern/{chunk-BAWZBF5Q.js → chunk-WN7TJX6J.js} +2 -2
- package/build/modern/{chunk-RMVJK26W.js → chunk-XJQXHSH7.js} +1 -2
- package/build/modern/chunk-XJQXHSH7.js.map +1 -0
- package/build/modern/chunk-XTNGF4D6.js +41 -0
- package/build/modern/chunk-XTNGF4D6.js.map +1 -0
- package/build/modern/chunk-Y4ZEJ2EF.js +31 -0
- package/build/modern/chunk-Y4ZEJ2EF.js.map +1 -0
- package/build/modern/{chunk-WPVDQRRF.js → chunk-YOTXFCCC.js} +2 -2
- package/build/modern/chunk-YOTXFCCC.js.map +1 -0
- package/build/modern/chunk-Z3FDG263.js +53 -0
- package/build/modern/chunk-Z3FDG263.js.map +1 -0
- package/build/modern/{chunk-JAROS4Q3.js → chunk-Z4342DRO.js} +10 -10
- package/build/modern/chunk-Z4342DRO.js.map +1 -0
- package/build/modern/chunk-Z52R6ABJ.js +21 -0
- package/build/modern/chunk-Z52R6ABJ.js.map +1 -0
- package/build/modern/{chunk-O6LFWUHI.js → chunk-ZFFW5ELD.js} +10 -10
- package/build/modern/chunk-ZFFW5ELD.js.map +1 -0
- package/build/modern/components/Accordion.js +1 -1
- package/build/modern/components/AccordionItemGroup.js +3 -3
- package/build/modern/components/Admonition.client.js +3 -3
- package/build/modern/components/Admonition.js +4 -4
- package/build/modern/components/Avatar.js +2 -2
- package/build/modern/components/DatePicker.client.js +4 -3
- package/build/modern/components/FileStatus.js +11 -5
- package/build/modern/components/FileUploader.js +3 -3
- package/build/modern/components/Legend.js +1 -2
- package/build/modern/components/Tag.js +2 -2
- package/build/modern/components/button/button.js +12 -0
- package/build/modern/components/button/index.js +16 -0
- package/build/modern/components/button/parts.js +10 -0
- package/build/modern/components/checkbox/checkbox-icon.js +12 -0
- package/build/modern/components/checkbox/checkbox.js +13 -0
- package/build/modern/components/checkbox/index.js +30 -0
- package/build/modern/components/checkbox/parts.js +8 -0
- package/build/modern/components/checkbox/primitives.js +17 -0
- package/build/modern/components/cta-dialog/context.js +8 -0
- package/build/modern/components/cta-dialog/index.js +26 -0
- package/build/modern/components/cta-dialog/provider.js +22 -0
- package/build/modern/components/cta-dialog/provider.js.map +1 -0
- package/build/modern/components/cta-dialog/trigger-item.js +10 -0
- package/build/modern/components/cta-dialog/trigger-item.js.map +1 -0
- package/build/modern/components/cta-dialog/utils.js +7 -0
- package/build/modern/components/cta-dialog/utils.js.map +1 -0
- package/build/modern/components/deprecated/FieldMessage.js +8 -0
- package/build/modern/components/deprecated/FieldMessage.js.map +1 -0
- package/build/modern/components/deprecated/FieldsetLabel.js +7 -0
- package/build/modern/components/deprecated/FieldsetLabel.js.map +1 -0
- package/build/modern/components/deprecated/Label.js +17 -0
- package/build/modern/components/deprecated/Label.js.map +1 -0
- package/build/modern/components/deprecated/Modal.js +7 -0
- package/build/modern/components/deprecated/Modal.js.map +1 -0
- package/build/modern/components/deprecated/ModalDescription.js +7 -0
- package/build/modern/components/deprecated/ModalDescription.js.map +1 -0
- package/build/modern/components/deprecated/ModalHeader.js +7 -0
- package/build/modern/components/deprecated/ModalHeader.js.map +1 -0
- package/build/modern/components/deprecated/ModalHeading.js +7 -0
- package/build/modern/components/deprecated/ModalHeading.js.map +1 -0
- package/build/modern/components/deprecated/NavMenuLink.js +8 -0
- package/build/modern/components/deprecated/NavMenuLink.js.map +1 -0
- package/build/modern/components/deprecated/NavMenuList.js +12 -0
- package/build/modern/components/deprecated/NavMenuList.js.map +1 -0
- package/build/modern/components/deprecated/NavMenuTrigger.js +11 -0
- package/build/modern/components/deprecated/NavMenuTrigger.js.map +1 -0
- package/build/modern/components/field/field.js +14 -0
- package/build/modern/components/field/field.js.map +1 -0
- package/build/modern/components/field/index.js +44 -0
- package/build/modern/components/field/index.js.map +1 -0
- package/build/modern/components/field/parts.js +11 -0
- package/build/modern/components/field/parts.js.map +1 -0
- package/build/modern/components/field/primitives.js +26 -0
- package/build/modern/components/field/primitives.js.map +1 -0
- package/build/modern/components/field/start-indicator.js +7 -0
- package/build/modern/components/field/start-indicator.js.map +1 -0
- package/build/modern/components/field/status-indicator.js +9 -0
- package/build/modern/components/field/status-indicator.js.map +1 -0
- package/build/modern/components/fieldset/fieldset.js +11 -0
- package/build/modern/components/fieldset/fieldset.js.map +1 -0
- package/build/modern/components/fieldset/index.js +24 -0
- package/build/modern/components/fieldset/index.js.map +1 -0
- package/build/modern/components/fieldset/parts.js +8 -0
- package/build/modern/components/fieldset/parts.js.map +1 -0
- package/build/modern/components/fieldset/primitives.js +13 -0
- package/build/modern/components/fieldset/primitives.js.map +1 -0
- package/build/modern/components/for.js +7 -0
- package/build/modern/components/for.js.map +1 -0
- package/build/modern/components/radio/index.js +30 -0
- package/build/modern/components/radio/index.js.map +1 -0
- package/build/modern/components/radio/parts.js +8 -0
- package/build/modern/components/radio/parts.js.map +1 -0
- package/build/modern/components/radio/primitives.js +21 -0
- package/build/modern/components/radio/primitives.js.map +1 -0
- package/build/modern/components/radio/radio.js +8 -0
- package/build/modern/components/radio/radio.js.map +1 -0
- package/build/modern/components/select/index.js +57 -0
- package/build/modern/components/select/index.js.map +1 -0
- package/build/modern/components/select/option-group.js +10 -0
- package/build/modern/components/select/option-group.js.map +1 -0
- package/build/modern/components/select/parts.js +8 -0
- package/build/modern/components/select/parts.js.map +1 -0
- package/build/modern/components/select/primitives.js +37 -0
- package/build/modern/components/select/primitives.js.map +1 -0
- package/build/modern/components/select/select.js +15 -0
- package/build/modern/components/select/select.js.map +1 -0
- package/build/modern/components/switch/index.js +26 -0
- package/build/modern/components/switch/index.js.map +1 -0
- package/build/modern/components/switch/parts.js +8 -0
- package/build/modern/components/switch/parts.js.map +1 -0
- package/build/modern/components/switch/primitives.js +15 -0
- package/build/modern/components/switch/primitives.js.map +1 -0
- package/build/modern/components/switch/switch-indicator.js +9 -0
- package/build/modern/components/switch/switch-indicator.js.map +1 -0
- package/build/modern/components/switch/switch.js +11 -0
- package/build/modern/components/switch/switch.js.map +1 -0
- package/build/modern/components/toggle/index.js +14 -0
- package/build/modern/components/toggle/index.js.map +1 -0
- package/build/modern/components/toggle/parts.js +8 -0
- package/build/modern/components/toggle/parts.js.map +1 -0
- package/build/modern/components/toggle/primitives.js +9 -0
- package/build/modern/components/toggle/primitives.js.map +1 -0
- package/build/modern/context/confirm-modal.js +5 -4
- package/build/modern/context/field.js +34 -4
- package/build/modern/context/field.js.map +1 -1
- package/build/modern/context/notification-center.js +5 -4
- package/build/modern/context/prompt-modal.js +13 -7
- package/build/modern/hooks/useDate.js +1 -1
- package/build/modern/hooks/useRootColors.js +1 -1
- package/build/modern/hooks/useToggle.js +1 -1
- package/build/modern/index.js +304 -129
- package/build/modern/index.js.map +1 -1
- package/build/modern/utils/index.js +5 -3
- package/package.json +2 -2
- package/src/components/Accordion.tsx +1 -0
- package/src/components/DatePicker.client.tsx +3 -15
- package/src/components/FileStatus.tsx +4 -5
- package/src/components/Legend.tsx +5 -6
- package/src/components/button/button.tsx +77 -0
- package/src/components/button/index.ts +2 -0
- package/src/components/button/parts.ts +32 -0
- package/src/components/checkbox/checkbox-icon.tsx +39 -0
- package/src/components/checkbox/checkbox.tsx +42 -0
- package/src/components/checkbox/index.ts +3 -0
- package/src/components/checkbox/parts.ts +59 -0
- package/src/components/checkbox/primitives.tsx +104 -0
- package/src/components/cta-dialog/context.tsx +34 -0
- package/src/components/cta-dialog/index.ts +2 -0
- package/src/{context/cta-modal.tsx → components/cta-dialog/provider.tsx} +34 -68
- package/src/components/cta-dialog/trigger-item.tsx +53 -0
- package/src/components/cta-dialog/utils.ts +57 -0
- package/src/components/{FieldMessage.tsx → deprecated/FieldMessage.tsx} +2 -13
- package/src/components/deprecated/FieldsetLabel.tsx +32 -0
- package/src/components/deprecated/Label.tsx +24 -0
- package/src/components/{NavMenuLink.tsx → deprecated/NavMenuLink.tsx} +1 -1
- package/src/components/{NavMenuList.tsx → deprecated/NavMenuList.tsx} +3 -3
- package/src/components/{NavMenuTrigger.tsx → deprecated/NavMenuTrigger.tsx} +4 -4
- package/src/components/field/field.tsx +77 -0
- package/src/components/field/index.ts +5 -0
- package/src/components/field/parts.ts +77 -0
- package/src/components/field/primitives.tsx +204 -0
- package/src/components/field/start-indicator.tsx +23 -0
- package/src/components/field/status-indicator.tsx +58 -0
- package/src/components/fieldset/fieldset.tsx +55 -0
- package/src/components/fieldset/index.ts +3 -0
- package/src/components/fieldset/parts.ts +47 -0
- package/src/components/fieldset/primitives.tsx +79 -0
- package/src/components/for.tsx +38 -0
- package/src/components/radio/index.ts +3 -0
- package/src/components/radio/parts.ts +65 -0
- package/src/components/radio/primitives.tsx +123 -0
- package/src/components/radio/radio.tsx +35 -0
- package/src/components/select/index.ts +4 -0
- package/src/components/select/option-group.tsx +34 -0
- package/src/components/select/parts.ts +113 -0
- package/src/components/select/primitives.tsx +205 -0
- package/src/components/select/select.tsx +135 -0
- package/src/components/switch/index.ts +3 -0
- package/src/components/switch/parts.ts +53 -0
- package/src/components/switch/primitives.tsx +69 -0
- package/src/components/switch/switch-indicator.tsx +9 -0
- package/src/components/switch/switch.tsx +30 -0
- package/src/components/toggle/index.ts +2 -0
- package/src/components/toggle/parts.ts +32 -0
- package/src/components/toggle/primitives.tsx +17 -0
- package/src/config/types.ts +1 -0
- package/src/context/confirm-modal.tsx +1 -1
- package/src/context/field.tsx +6 -5
- package/src/context/notification-center.tsx +1 -1
- package/src/context/prompt-modal.tsx +16 -18
- package/src/hooks/useDate.ts +1 -7
- package/src/hooks/useRootColors.ts +0 -1
- package/src/hooks/useToggle.ts +1 -3
- package/src/index.ts +24 -24
- package/src/utils/index.ts +30 -0
- package/build/legacy/components/Button.cjs.map +0 -1
- package/build/legacy/components/Checkbox.cjs +0 -113
- package/build/legacy/components/Checkbox.cjs.map +0 -1
- package/build/legacy/components/FieldMessage.cjs.map +0 -1
- package/build/legacy/components/Fieldset.cjs.map +0 -1
- package/build/legacy/components/FieldsetLabel.cjs.map +0 -1
- package/build/legacy/components/Input.cjs +0 -95
- package/build/legacy/components/Input.cjs.map +0 -1
- package/build/legacy/components/Label.cjs +0 -93
- package/build/legacy/components/Label.cjs.map +0 -1
- package/build/legacy/components/Modal.cjs.map +0 -1
- package/build/legacy/components/ModalDescription.cjs.map +0 -1
- package/build/legacy/components/ModalHeader.cjs.map +0 -1
- package/build/legacy/components/ModalHeading.cjs.map +0 -1
- package/build/legacy/components/NavMenuLink.cjs.map +0 -1
- package/build/legacy/components/NavMenuList.cjs.map +0 -1
- package/build/legacy/components/NavMenuTrigger.cjs.map +0 -1
- package/build/legacy/components/Radio.cjs +0 -81
- package/build/legacy/components/Radio.cjs.map +0 -1
- package/build/legacy/components/Select.cjs +0 -120
- package/build/legacy/components/Select.cjs.map +0 -1
- package/build/legacy/components/Textarea.cjs.map +0 -1
- package/build/legacy/components/Toggle.cjs +0 -101
- package/build/legacy/components/Toggle.cjs.map +0 -1
- package/build/legacy/context/cta-modal.cjs.map +0 -1
- package/build/modern/chunk-3BM6MZ4A.js.map +0 -1
- package/build/modern/chunk-3ZDFQO25.js +0 -31
- package/build/modern/chunk-3ZDFQO25.js.map +0 -1
- package/build/modern/chunk-7NN3SJ7W.js.map +0 -1
- package/build/modern/chunk-BHB56M7S.js.map +0 -1
- package/build/modern/chunk-C5EHJUS5.js +0 -10
- package/build/modern/chunk-C5EHJUS5.js.map +0 -1
- package/build/modern/chunk-EXGKZGML.js +0 -28
- package/build/modern/chunk-EXGKZGML.js.map +0 -1
- package/build/modern/chunk-FGCO27TC.js.map +0 -1
- package/build/modern/chunk-FTPZHG6J.js +0 -46
- package/build/modern/chunk-FTPZHG6J.js.map +0 -1
- package/build/modern/chunk-IGHMP4WA.js.map +0 -1
- package/build/modern/chunk-ILQW5VZT.js.map +0 -1
- package/build/modern/chunk-JAROS4Q3.js.map +0 -1
- package/build/modern/chunk-JIJM6JFJ.js +0 -36
- package/build/modern/chunk-JIJM6JFJ.js.map +0 -1
- package/build/modern/chunk-JIRW4XOJ.js.map +0 -1
- package/build/modern/chunk-JWIJHSI6.js.map +0 -1
- package/build/modern/chunk-KKHL3ZO4.js +0 -69
- package/build/modern/chunk-KKHL3ZO4.js.map +0 -1
- package/build/modern/chunk-MZ3UCDUL.js +0 -43
- package/build/modern/chunk-MZ3UCDUL.js.map +0 -1
- package/build/modern/chunk-N24COMHJ.js +0 -63
- package/build/modern/chunk-N24COMHJ.js.map +0 -1
- package/build/modern/chunk-NMF2HYWO.js +0 -50
- package/build/modern/chunk-NMF2HYWO.js.map +0 -1
- package/build/modern/chunk-NUMM4TNC.js.map +0 -1
- package/build/modern/chunk-O6LFWUHI.js.map +0 -1
- package/build/modern/chunk-PM7CWT3N.js.map +0 -1
- package/build/modern/chunk-PZAZKQMO.js.map +0 -1
- package/build/modern/chunk-REO5GUNC.js.map +0 -1
- package/build/modern/chunk-RMVJK26W.js.map +0 -1
- package/build/modern/chunk-SD3OVTHT.js.map +0 -1
- package/build/modern/chunk-UZDVOIW5.js +0 -33
- package/build/modern/chunk-UZDVOIW5.js.map +0 -1
- package/build/modern/chunk-UZVQ4INR.js.map +0 -1
- package/build/modern/chunk-WPVDQRRF.js.map +0 -1
- package/build/modern/chunk-XQICKZH4.js +0 -59
- package/build/modern/chunk-XQICKZH4.js.map +0 -1
- package/build/modern/chunk-YKKNWILF.js.map +0 -1
- package/build/modern/chunk-ZL6ZITLA.js.map +0 -1
- package/build/modern/components/Button.js +0 -7
- package/build/modern/components/Checkbox.js +0 -11
- package/build/modern/components/FieldMessage.js +0 -9
- package/build/modern/components/Fieldset.js +0 -9
- package/build/modern/components/FieldsetLabel.js +0 -7
- package/build/modern/components/Input.js +0 -11
- package/build/modern/components/Label.js +0 -10
- package/build/modern/components/Modal.js +0 -7
- package/build/modern/components/ModalDescription.js +0 -7
- package/build/modern/components/ModalHeader.js +0 -7
- package/build/modern/components/ModalHeading.js +0 -7
- package/build/modern/components/NavMenuLink.js +0 -8
- package/build/modern/components/NavMenuList.js +0 -12
- package/build/modern/components/NavMenuTrigger.js +0 -11
- package/build/modern/components/Radio.js +0 -9
- package/build/modern/components/Select.js +0 -13
- package/build/modern/components/Textarea.js +0 -9
- package/build/modern/components/Toggle.js +0 -10
- package/build/modern/context/cta-modal.js +0 -18
- package/src/components/Button.tsx +0 -35
- package/src/components/Checkbox.tsx +0 -93
- package/src/components/Fieldset.tsx +0 -65
- package/src/components/FieldsetLabel.tsx +0 -59
- package/src/components/Input.tsx +0 -69
- package/src/components/Label.tsx +0 -69
- package/src/components/Radio.tsx +0 -73
- package/src/components/Select.tsx +0 -108
- package/src/components/Textarea.tsx +0 -52
- package/src/components/Toggle.tsx +0 -91
- /package/build/modern/{chunk-ISCJ542I.js.map → chunk-2HOUQ2DX.js.map} +0 -0
- /package/build/modern/{components/Button.js.map → chunk-2LF3HPNA.js.map} +0 -0
- /package/build/modern/{chunk-25HMVHLT.js.map → chunk-7SU6FCTJ.js.map} +0 -0
- /package/build/modern/{components/Checkbox.js.map → chunk-CYC2YUKU.js.map} +0 -0
- /package/build/modern/{chunk-NJSETNRL.js.map → chunk-DXBZ3HMY.js.map} +0 -0
- /package/build/modern/{components/FieldMessage.js.map → chunk-IDTAB2UJ.js.map} +0 -0
- /package/build/modern/{components/Fieldset.js.map → chunk-IKDXADLX.js.map} +0 -0
- /package/build/modern/{chunk-EDARV2EI.js.map → chunk-MISIUX63.js.map} +0 -0
- /package/build/modern/{components/FieldsetLabel.js.map → chunk-OGYMMATX.js.map} +0 -0
- /package/build/modern/{chunk-GCQMH4QA.js.map → chunk-SXLPDPOZ.js.map} +0 -0
- /package/build/modern/{components/Input.js.map → chunk-TIJAFPHQ.js.map} +0 -0
- /package/build/modern/{components/Label.js.map → chunk-TYPULJMJ.js.map} +0 -0
- /package/build/modern/{components/Modal.js.map → chunk-UDY6USHW.js.map} +0 -0
- /package/build/modern/{components/ModalDescription.js.map → chunk-V4YYGGMH.js.map} +0 -0
- /package/build/modern/{chunk-BAWZBF5Q.js.map → chunk-WN7TJX6J.js.map} +0 -0
- /package/build/modern/components/{ModalHeader.js.map → button/button.js.map} +0 -0
- /package/build/modern/components/{ModalHeading.js.map → button/index.js.map} +0 -0
- /package/build/modern/components/{NavMenuLink.js.map → button/parts.js.map} +0 -0
- /package/build/modern/components/{NavMenuList.js.map → checkbox/checkbox-icon.js.map} +0 -0
- /package/build/modern/components/{NavMenuTrigger.js.map → checkbox/checkbox.js.map} +0 -0
- /package/build/modern/components/{Radio.js.map → checkbox/index.js.map} +0 -0
- /package/build/modern/components/{Select.js.map → checkbox/parts.js.map} +0 -0
- /package/build/modern/components/{Textarea.js.map → checkbox/primitives.js.map} +0 -0
- /package/build/modern/components/{Toggle.js.map → cta-dialog/context.js.map} +0 -0
- /package/build/modern/{context/cta-modal.js.map → components/cta-dialog/index.js.map} +0 -0
- /package/src/components/{Modal.tsx → deprecated/Modal.tsx} +0 -0
- /package/src/components/{ModalDescription.tsx → deprecated/ModalDescription.tsx} +0 -0
- /package/src/components/{ModalHeader.tsx → deprecated/ModalHeader.tsx} +0 -0
- /package/src/components/{ModalHeading.tsx → deprecated/ModalHeading.tsx} +0 -0
|
@@ -25,73 +25,122 @@ __export(prompt_modal_exports, {
|
|
|
25
25
|
usePromptModal: () => usePromptModal
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(prompt_modal_exports);
|
|
28
|
-
var
|
|
28
|
+
var import_react7 = require("react");
|
|
29
|
+
var import_react8 = require("@ark-ui/react");
|
|
30
|
+
var import_jsx3 = require("@cerberus/styled-system/jsx");
|
|
31
|
+
var import_css7 = require("@cerberus/styled-system/css");
|
|
32
|
+
var import_patterns2 = require("@cerberus/styled-system/patterns");
|
|
33
|
+
|
|
34
|
+
// src/components/field/primitives.tsx
|
|
35
|
+
var import_field = require("@ark-ui/react/field");
|
|
36
|
+
var import_css3 = require("@cerberus/styled-system/css");
|
|
37
|
+
var import_recipes3 = require("@cerberus/styled-system/recipes");
|
|
29
38
|
|
|
30
|
-
// src/components/
|
|
39
|
+
// src/components/field/status-indicator.tsx
|
|
40
|
+
var import_react2 = require("@ark-ui/react");
|
|
31
41
|
var import_css = require("@cerberus/styled-system/css");
|
|
32
42
|
var import_recipes = require("@cerberus/styled-system/recipes");
|
|
43
|
+
|
|
44
|
+
// src/context/cerberus.tsx
|
|
45
|
+
var import_react = require("react");
|
|
33
46
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
47
|
+
var CerberusContext = (0, import_react.createContext)(null);
|
|
48
|
+
function useCerberusContext() {
|
|
49
|
+
const context = (0, import_react.useContext)(CerberusContext);
|
|
50
|
+
if (!context) {
|
|
51
|
+
throw new Error("useCerberus must be used within a CerberusProvider");
|
|
52
|
+
}
|
|
53
|
+
return context;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// src/components/field/status-indicator.tsx
|
|
57
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
58
|
+
function FieldStatusIndicator(props) {
|
|
59
|
+
const { fallback, ...nativeProps } = props;
|
|
60
|
+
const styles = (0, import_recipes.field)();
|
|
61
|
+
const fieldContext = (0, import_react2.useFieldContext)();
|
|
62
|
+
const { icons } = useCerberusContext();
|
|
63
|
+
const { invalid: InvalidIcon } = icons;
|
|
64
|
+
if (fieldContext.invalid) {
|
|
65
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
66
|
+
"span",
|
|
67
|
+
{
|
|
68
|
+
...nativeProps,
|
|
69
|
+
"aria-hidden": "true",
|
|
70
|
+
"data-invalid": true,
|
|
71
|
+
className: (0, import_css.cx)(nativeProps.className, styles.statusIndicator),
|
|
72
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(InvalidIcon, {})
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
77
|
+
"span",
|
|
38
78
|
{
|
|
39
79
|
...nativeProps,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
usage,
|
|
45
|
-
shape
|
|
46
|
-
})
|
|
47
|
-
)
|
|
80
|
+
"aria-hidden": "true",
|
|
81
|
+
"data-part": "end-indicator",
|
|
82
|
+
className: (0, import_css.cx)(nativeProps.className, styles.endIndicator),
|
|
83
|
+
children: fallback
|
|
48
84
|
}
|
|
49
85
|
);
|
|
50
86
|
}
|
|
51
87
|
|
|
52
|
-
// src/
|
|
53
|
-
var import_css6 = require("@cerberus/styled-system/css");
|
|
54
|
-
var import_patterns3 = require("@cerberus/styled-system/patterns");
|
|
55
|
-
|
|
56
|
-
// src/components/Input.tsx
|
|
57
|
-
var import_recipes2 = require("@cerberus/styled-system/recipes");
|
|
88
|
+
// src/components/field/start-indicator.tsx
|
|
58
89
|
var import_css2 = require("@cerberus/styled-system/css");
|
|
90
|
+
var import_recipes2 = require("@cerberus/styled-system/recipes");
|
|
91
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
92
|
+
function FieldStartIndicator(props) {
|
|
93
|
+
const styles = (0, import_recipes2.field)();
|
|
94
|
+
if (!props.children) return null;
|
|
95
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
96
|
+
"span",
|
|
97
|
+
{
|
|
98
|
+
...props,
|
|
99
|
+
"data-part": "start-indicator",
|
|
100
|
+
className: (0, import_css2.cx)(props.className, styles.startIndicator)
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}
|
|
59
104
|
|
|
60
|
-
// src/
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}),
|
|
72
|
-
[props.disabled, props.readOnly, props.required, props.invalid]
|
|
105
|
+
// src/components/field/primitives.tsx
|
|
106
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
107
|
+
function FieldRoot(props) {
|
|
108
|
+
const { size, ...fieldProps } = props;
|
|
109
|
+
const styles = (0, import_recipes3.field)({ size });
|
|
110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
111
|
+
import_field.Field.Root,
|
|
112
|
+
{
|
|
113
|
+
...fieldProps,
|
|
114
|
+
className: (0, import_css3.cx)(styles.root, fieldProps.className)
|
|
115
|
+
}
|
|
73
116
|
);
|
|
74
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FieldContext.Provider, { value, children: props.children });
|
|
75
117
|
}
|
|
76
|
-
function
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
118
|
+
function FieldLabel(props) {
|
|
119
|
+
const { children, ...nativeProps } = props;
|
|
120
|
+
const styles = (0, import_recipes3.field)();
|
|
121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_field.Field.Label, { ...nativeProps, className: (0, import_css3.cx)(styles.label, props.className), children: [
|
|
122
|
+
children,
|
|
123
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_field.Field.RequiredIndicator, { children: "(required)" })
|
|
124
|
+
] });
|
|
82
125
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
126
|
+
function FieldInput(props) {
|
|
127
|
+
const { size, startIcon, endIcon, ...fieldProps } = props;
|
|
128
|
+
const styles = (0, import_recipes3.field)({ size });
|
|
129
|
+
const hasStartIcon = Boolean(startIcon);
|
|
130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: styles.inputRoot, children: [
|
|
131
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FieldStartIndicator, { children: startIcon }),
|
|
132
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
133
|
+
import_field.Field.Input,
|
|
134
|
+
{
|
|
135
|
+
...fieldProps,
|
|
136
|
+
...hasStartIcon && { "data-has": "start-indicator" },
|
|
137
|
+
className: (0, import_css3.cx)(styles.input, fieldProps.className)
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FieldStatusIndicator, { fallback: endIcon })
|
|
141
|
+
] });
|
|
94
142
|
}
|
|
143
|
+
var Input = FieldInput;
|
|
95
144
|
|
|
96
145
|
// src/components/Show.tsx
|
|
97
146
|
var import_react3 = require("react");
|
|
@@ -104,76 +153,40 @@ function Show(props) {
|
|
|
104
153
|
}, [condition, children, fallback]);
|
|
105
154
|
}
|
|
106
155
|
|
|
107
|
-
// src/components/
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const { invalid, ...fieldStates } = useFieldContext();
|
|
113
|
-
const hasEndIcon = Boolean(endIcon);
|
|
114
|
-
const { icons } = useCerberusContext();
|
|
115
|
-
const { invalid: InvalidIcon } = icons;
|
|
116
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: inputStyles.root, children: [
|
|
117
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Show, { when: Boolean(startIcon), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: inputStyles.startIcon, children: startIcon }) }),
|
|
118
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
119
|
-
"input",
|
|
120
|
-
{
|
|
121
|
-
...nativeProps,
|
|
122
|
-
...fieldStates,
|
|
123
|
-
...describedBy && { "aria-describedby": describedBy },
|
|
124
|
-
...invalid && { "aria-invalid": true },
|
|
125
|
-
"data-start-icon": Boolean(startIcon),
|
|
126
|
-
className: (0, import_css2.cx)("peer", nativeProps.className, inputStyles.input)
|
|
127
|
-
}
|
|
128
|
-
),
|
|
129
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(InvalidIcon, { className: inputStyles.icon }) }),
|
|
130
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Show, { when: hasEndIcon && !invalid, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: inputStyles.icon, children: endIcon }) })
|
|
131
|
-
] });
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// src/components/Label.tsx
|
|
135
|
-
var import_recipes3 = require("@cerberus/styled-system/recipes");
|
|
136
|
-
var import_css3 = require("@cerberus/styled-system/css");
|
|
137
|
-
var import_patterns = require("@cerberus/styled-system/patterns");
|
|
156
|
+
// src/components/button/button.tsx
|
|
157
|
+
var import_react4 = require("react");
|
|
158
|
+
var import_css4 = require("@cerberus/styled-system/css");
|
|
159
|
+
var import_recipes4 = require("@cerberus/styled-system/recipes");
|
|
160
|
+
var import_jsx = require("@cerberus/styled-system/jsx");
|
|
138
161
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
162
|
+
var ButtonContext = (0, import_react4.createContext)({
|
|
163
|
+
pending: false
|
|
164
|
+
});
|
|
165
|
+
function Button(props) {
|
|
166
|
+
const { palette, usage, shape, size, pending = false, ...nativeProps } = props;
|
|
167
|
+
const value = (0, import_react4.useMemo)(() => ({ pending }), [pending]);
|
|
168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ButtonContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
169
|
+
"button",
|
|
145
170
|
{
|
|
146
171
|
...nativeProps,
|
|
147
|
-
|
|
148
|
-
className: (0,
|
|
172
|
+
disabled: pending || nativeProps.disabled,
|
|
173
|
+
className: (0, import_css4.cx)(
|
|
149
174
|
nativeProps.className,
|
|
150
|
-
(0,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
175
|
+
(0, import_recipes4.button)({
|
|
176
|
+
palette,
|
|
177
|
+
usage,
|
|
178
|
+
shape,
|
|
179
|
+
size
|
|
154
180
|
})
|
|
155
|
-
)
|
|
156
|
-
children: [
|
|
157
|
-
props.children,
|
|
158
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Show, { when: required, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
159
|
-
"span",
|
|
160
|
-
{
|
|
161
|
-
className: (0, import_css3.css)({
|
|
162
|
-
color: "page.text.100",
|
|
163
|
-
fontSize: "inherit"
|
|
164
|
-
}),
|
|
165
|
-
children: "(required)"
|
|
166
|
-
}
|
|
167
|
-
) })
|
|
168
|
-
]
|
|
181
|
+
)
|
|
169
182
|
}
|
|
170
|
-
);
|
|
183
|
+
) });
|
|
171
184
|
}
|
|
172
185
|
|
|
173
186
|
// src/components/Avatar.tsx
|
|
174
|
-
var
|
|
175
|
-
var
|
|
176
|
-
var
|
|
187
|
+
var import_css5 = require("@cerberus/styled-system/css");
|
|
188
|
+
var import_patterns = require("@cerberus/styled-system/patterns");
|
|
189
|
+
var import_recipes5 = require("@cerberus/styled-system/recipes");
|
|
177
190
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
178
191
|
function Avatar(props) {
|
|
179
192
|
const {
|
|
@@ -194,10 +207,10 @@ function Avatar(props) {
|
|
|
194
207
|
"div",
|
|
195
208
|
{
|
|
196
209
|
...nativeProps,
|
|
197
|
-
className: (0,
|
|
210
|
+
className: (0, import_css5.cx)(
|
|
198
211
|
nativeProps.className,
|
|
199
|
-
(0,
|
|
200
|
-
(0,
|
|
212
|
+
(0, import_recipes5.avatar)({ gradient, size }),
|
|
213
|
+
(0, import_patterns.circle)()
|
|
201
214
|
),
|
|
202
215
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
203
216
|
Show,
|
|
@@ -231,7 +244,7 @@ function Avatar(props) {
|
|
|
231
244
|
"img",
|
|
232
245
|
{
|
|
233
246
|
alt: props.ariaLabel,
|
|
234
|
-
className: (0,
|
|
247
|
+
className: (0, import_css5.css)({
|
|
235
248
|
h: "full",
|
|
236
249
|
objectFit: "cover",
|
|
237
250
|
w: "full"
|
|
@@ -263,105 +276,103 @@ var iconSizeMap = {
|
|
|
263
276
|
};
|
|
264
277
|
|
|
265
278
|
// src/components/Text.tsx
|
|
266
|
-
var
|
|
279
|
+
var import_jsx2 = require("@cerberus/styled-system/jsx");
|
|
267
280
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
268
281
|
function Text(props) {
|
|
269
282
|
const { as = "p", ...pandaJSXProps } = props;
|
|
270
283
|
switch (as) {
|
|
271
284
|
case "h1":
|
|
272
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx2.H1, { ...pandaJSXProps });
|
|
273
286
|
case "h2":
|
|
274
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx2.H2, { ...pandaJSXProps });
|
|
275
288
|
case "h3":
|
|
276
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx2.H3, { ...pandaJSXProps });
|
|
277
290
|
case "h4":
|
|
278
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx2.H4, { ...pandaJSXProps });
|
|
279
292
|
case "h5":
|
|
280
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx2.H5, { ...pandaJSXProps });
|
|
281
294
|
case "h6":
|
|
282
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx2.H6, { ...pandaJSXProps });
|
|
283
296
|
case "strong":
|
|
284
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx2.Strong, { ...pandaJSXProps });
|
|
285
298
|
case "em":
|
|
286
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx2.Em, { ...pandaJSXProps });
|
|
287
300
|
case "small":
|
|
288
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx2.Small, { ...pandaJSXProps });
|
|
289
302
|
case "span":
|
|
290
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx2.Span, { ...pandaJSXProps });
|
|
291
304
|
default:
|
|
292
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx2.P, { ...pandaJSXProps });
|
|
293
306
|
}
|
|
294
307
|
}
|
|
295
308
|
|
|
296
309
|
// src/components/Dialog.tsx
|
|
297
|
-
var
|
|
298
|
-
var
|
|
310
|
+
var import_react6 = require("@ark-ui/react");
|
|
311
|
+
var import_recipes6 = require("@cerberus/styled-system/recipes");
|
|
299
312
|
|
|
300
313
|
// src/components/Portal.tsx
|
|
301
|
-
var
|
|
302
|
-
var Portal =
|
|
314
|
+
var import_react5 = require("@ark-ui/react");
|
|
315
|
+
var Portal = import_react5.Portal;
|
|
303
316
|
|
|
304
317
|
// src/components/Dialog.tsx
|
|
305
|
-
var
|
|
318
|
+
var import_css6 = require("@cerberus/styled-system/css");
|
|
306
319
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
307
320
|
function DialogProvider(props) {
|
|
308
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react6.Dialog.Root, { ...props });
|
|
309
322
|
}
|
|
310
323
|
function Dialog(props) {
|
|
311
324
|
const { size, ...contentProps } = props;
|
|
312
|
-
const styles = (0,
|
|
325
|
+
const styles = (0, import_recipes6.dialog)({ size });
|
|
313
326
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Portal, { children: [
|
|
314
327
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DialogBackdrop, { className: styles.backdrop }),
|
|
315
328
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DialogPositioner, { className: styles.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DialogContent, { className: styles.content, ...contentProps }) })
|
|
316
329
|
] });
|
|
317
330
|
}
|
|
318
331
|
function DialogHeading(props) {
|
|
319
|
-
const styles = (0,
|
|
320
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
332
|
+
const styles = (0, import_recipes6.dialog)();
|
|
333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react6.Dialog.Title, { ...props, className: (0, import_css6.cx)(props.className, styles.title) });
|
|
321
334
|
}
|
|
322
335
|
function DialogDescription(props) {
|
|
323
|
-
const styles = (0,
|
|
336
|
+
const styles = (0, import_recipes6.dialog)();
|
|
324
337
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
325
|
-
|
|
338
|
+
import_react6.Dialog.Description,
|
|
326
339
|
{
|
|
327
340
|
...props,
|
|
328
|
-
className: (0,
|
|
341
|
+
className: (0, import_css6.cx)(props.className, styles.description)
|
|
329
342
|
}
|
|
330
343
|
);
|
|
331
344
|
}
|
|
332
|
-
var DialogTrigger =
|
|
333
|
-
var DialogCloseTrigger =
|
|
334
|
-
var DialogBackdrop =
|
|
335
|
-
var DialogPositioner =
|
|
336
|
-
var DialogContent =
|
|
345
|
+
var DialogTrigger = import_react6.Dialog.Trigger;
|
|
346
|
+
var DialogCloseTrigger = import_react6.Dialog.CloseTrigger;
|
|
347
|
+
var DialogBackdrop = import_react6.Dialog.Backdrop;
|
|
348
|
+
var DialogPositioner = import_react6.Dialog.Positioner;
|
|
349
|
+
var DialogContent = import_react6.Dialog.Content;
|
|
337
350
|
|
|
338
351
|
// src/context/prompt-modal.tsx
|
|
339
|
-
var import_jsx2 = require("@cerberus/styled-system/jsx");
|
|
340
|
-
var import_react7 = require("@ark-ui/react");
|
|
341
352
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
342
|
-
var PromptModalContext = (0,
|
|
353
|
+
var PromptModalContext = (0, import_react7.createContext)(null);
|
|
343
354
|
function PromptModal(props) {
|
|
344
|
-
const resolveRef = (0,
|
|
345
|
-
const [open, setOpen] = (0,
|
|
346
|
-
const [content, setContent] = (0,
|
|
347
|
-
const [inputValue, setInputValue] = (0,
|
|
355
|
+
const resolveRef = (0, import_react7.useRef)(null);
|
|
356
|
+
const [open, setOpen] = (0, import_react7.useState)(false);
|
|
357
|
+
const [content, setContent] = (0, import_react7.useState)(null);
|
|
358
|
+
const [inputValue, setInputValue] = (0, import_react7.useState)("");
|
|
348
359
|
const { icons } = useCerberusContext();
|
|
349
360
|
const { promptModal: PromptIcon } = icons;
|
|
350
|
-
const isValid = (0,
|
|
361
|
+
const isValid = (0, import_react7.useMemo)(
|
|
351
362
|
() => inputValue === (content == null ? void 0 : content.key),
|
|
352
363
|
[inputValue, content]
|
|
353
364
|
);
|
|
354
|
-
const palette = (0,
|
|
365
|
+
const palette = (0, import_react7.useMemo)(
|
|
355
366
|
() => (content == null ? void 0 : content.kind) === "destructive" ? "danger" : "action",
|
|
356
367
|
[content]
|
|
357
368
|
);
|
|
358
|
-
const handleChange = (0,
|
|
369
|
+
const handleChange = (0, import_react7.useCallback)(
|
|
359
370
|
(e) => {
|
|
360
371
|
setInputValue(e.currentTarget.value);
|
|
361
372
|
},
|
|
362
373
|
[content]
|
|
363
374
|
);
|
|
364
|
-
const handleChoice = (0,
|
|
375
|
+
const handleChoice = (0, import_react7.useCallback)(
|
|
365
376
|
(e) => {
|
|
366
377
|
var _a;
|
|
367
378
|
const target = e.currentTarget;
|
|
@@ -372,7 +383,7 @@ function PromptModal(props) {
|
|
|
372
383
|
},
|
|
373
384
|
[inputValue, setOpen]
|
|
374
385
|
);
|
|
375
|
-
const handleShow = (0,
|
|
386
|
+
const handleShow = (0, import_react7.useCallback)(
|
|
376
387
|
(options) => {
|
|
377
388
|
return new Promise((resolve) => {
|
|
378
389
|
setContent({ ...options, kind: options.kind || "non-destructive" });
|
|
@@ -382,7 +393,7 @@ function PromptModal(props) {
|
|
|
382
393
|
},
|
|
383
394
|
[setOpen]
|
|
384
395
|
);
|
|
385
|
-
const value = (0,
|
|
396
|
+
const value = (0, import_react7.useMemo)(
|
|
386
397
|
() => ({
|
|
387
398
|
show: handleShow
|
|
388
399
|
}),
|
|
@@ -390,10 +401,10 @@ function PromptModal(props) {
|
|
|
390
401
|
);
|
|
391
402
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(PromptModalContext.Provider, { value, children: [
|
|
392
403
|
props.children,
|
|
393
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Dialog, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
394
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
404
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Dialog, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx3.VStack, { gap: "xl", w: "full", children: [
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx3.VStack, { alignItems: "flex-start", gap: "md", w: "full", children: [
|
|
395
406
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
396
|
-
|
|
407
|
+
import_jsx3.HStack,
|
|
397
408
|
{
|
|
398
409
|
alignSelf: "center",
|
|
399
410
|
justify: "center",
|
|
@@ -429,47 +440,48 @@ function PromptModal(props) {
|
|
|
429
440
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DialogDescription, { children: content == null ? void 0 : content.description })
|
|
430
441
|
] }),
|
|
431
442
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
432
|
-
|
|
443
|
+
import_jsx3.VStack,
|
|
433
444
|
{
|
|
434
445
|
alignItems: "flex-start",
|
|
435
446
|
marginBlockStart: "md",
|
|
436
447
|
marginBlockEnd: "lg",
|
|
437
448
|
w: "full",
|
|
438
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
{
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
449
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
450
|
+
FieldRoot,
|
|
451
|
+
{
|
|
452
|
+
ids: {
|
|
453
|
+
control: "confirm"
|
|
454
|
+
},
|
|
455
|
+
invalid: !isValid,
|
|
456
|
+
children: [
|
|
457
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
458
|
+
FieldLabel,
|
|
459
|
+
{
|
|
460
|
+
className: (0, import_patterns2.hstack)({
|
|
461
|
+
gap: "xs",
|
|
462
|
+
justify: "flex-start !important",
|
|
463
|
+
marginBlockEnd: "xs",
|
|
464
|
+
textStyle: "label-md"
|
|
465
|
+
}),
|
|
466
|
+
children: [
|
|
467
|
+
"Type",
|
|
468
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { as: "strong", textTransform: "uppercase", children: content == null ? void 0 : content.key }),
|
|
469
|
+
"to confirm"
|
|
470
|
+
]
|
|
471
|
+
}
|
|
472
|
+
),
|
|
473
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Input, { name: "confirm", onChange: handleChange, type: "text" })
|
|
474
|
+
]
|
|
475
|
+
}
|
|
476
|
+
)
|
|
465
477
|
}
|
|
466
478
|
),
|
|
467
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
479
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx3.HStack, { gap: "md", justify: "stretch", w: "full", children: [
|
|
468
480
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
469
481
|
Button,
|
|
470
482
|
{
|
|
471
483
|
autoFocus: true,
|
|
472
|
-
className: (0,
|
|
484
|
+
className: (0, import_css7.css)({
|
|
473
485
|
w: "1/2"
|
|
474
486
|
}),
|
|
475
487
|
disabled: !isValid,
|
|
@@ -480,10 +492,10 @@ function PromptModal(props) {
|
|
|
480
492
|
children: content == null ? void 0 : content.actionText
|
|
481
493
|
}
|
|
482
494
|
),
|
|
483
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
495
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react8.DialogCloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
484
496
|
Button,
|
|
485
497
|
{
|
|
486
|
-
className: (0,
|
|
498
|
+
className: (0, import_css7.css)({
|
|
487
499
|
w: "1/2"
|
|
488
500
|
}),
|
|
489
501
|
name: "cancel",
|
|
@@ -498,7 +510,7 @@ function PromptModal(props) {
|
|
|
498
510
|
] });
|
|
499
511
|
}
|
|
500
512
|
function usePromptModal() {
|
|
501
|
-
const context = (0,
|
|
513
|
+
const context = (0, import_react7.useContext)(PromptModalContext);
|
|
502
514
|
if (context === null) {
|
|
503
515
|
throw new Error("usePromptModal must be used within a PromptModal Provider");
|
|
504
516
|
}
|