@egose/shadcn-theme 0.1.10 → 0.1.12
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/LICENSE +201 -0
- package/README.md +88 -29
- package/{chunk-GBNJFKPB.js → chunk-26NBTW3I.js} +3 -3
- package/{chunk-7PX7GVOR.mjs → chunk-2EXZ4JQX.mjs} +2 -2
- package/{chunk-YJR5JBXS.js → chunk-36GT5EGU.js} +3 -3
- package/{chunk-7ZMTJBXT.mjs → chunk-3NMW42UR.mjs} +7 -7
- package/{chunk-AGPEWIPR.mjs → chunk-3R2OBHS6.mjs} +5 -5
- package/{chunk-QCHBJMD6.mjs → chunk-3R7FZDQ7.mjs} +2 -2
- package/{chunk-PS3LNHTA.js → chunk-3RQTEIV5.js} +3 -3
- package/{chunk-E7F5KADG.mjs → chunk-3YFVUGSK.mjs} +2 -2
- package/{chunk-7MDWTJEP.mjs → chunk-42IQSRLZ.mjs} +2 -2
- package/{chunk-GV62APQ6.js → chunk-5CUM73VT.js} +3 -3
- package/{chunk-P4EDRIBH.js → chunk-5LDEF3T6.js} +44 -44
- package/{chunk-HWDU5KVD.mjs → chunk-6M7NWFTI.mjs} +4 -4
- package/{chunk-CNYC22IA.mjs → chunk-6SAR4RAU.mjs} +4 -4
- package/{chunk-XMRJIUYX.mjs → chunk-7DB2YNKV.mjs} +2 -2
- package/{chunk-RPF753T2.mjs → chunk-7S5XDE3W.mjs} +2 -2
- package/{chunk-OMQVDSR6.js → chunk-A4VKE26S.js} +4 -4
- package/{chunk-WK4MG4VT.js → chunk-AH57ACVP.js} +6 -6
- package/{chunk-4BKWF5FK.js → chunk-AIZ3XYAI.js} +6 -6
- package/{chunk-RFORRZRN.js → chunk-AOGFHEQH.js} +11 -11
- package/{chunk-6ECNY4VS.mjs → chunk-ASPR3W6A.mjs} +4 -4
- package/{chunk-OVHPXYDN.mjs → chunk-B6SBEOMV.mjs} +2 -2
- package/{chunk-ZFSZ6K4K.js → chunk-BGITSWS4.js} +1 -1
- package/{chunk-WJBTXKFN.js → chunk-BIO4TVNT.js} +14 -14
- package/{chunk-RJVQU443.mjs → chunk-BKUEN3CP.mjs} +6 -6
- package/{chunk-OUVM5NST.js → chunk-BM53W77T.js} +9 -9
- package/{chunk-JZXOJAMQ.js → chunk-C4JWWUXI.js} +8 -8
- package/{chunk-IYVLRZJ4.js → chunk-C74J4JWA.js} +1 -1
- package/{chunk-OPNHC6JN.mjs → chunk-CFG4GTRV.mjs} +3 -3
- package/{chunk-YQENFZOY.mjs → chunk-CHV7CG5L.mjs} +2 -2
- package/{chunk-UFRPUC7K.js → chunk-CRBQL2FG.js} +3 -3
- package/{chunk-K4JVHEI2.js → chunk-CZZWPS2I.js} +3 -3
- package/{chunk-LAIO3QZX.js → chunk-DD3MCW6L.js} +17 -17
- package/{chunk-WXEEDLLR.js → chunk-DNOZXQ2U.js} +15 -15
- package/{chunk-BJK4J4VY.js → chunk-DYYTK4BP.js} +7 -7
- package/{chunk-N7JSYNXM.js → chunk-FUFUQWRV.js} +1 -1
- package/{chunk-LPDYWZN6.js → chunk-GOATL3D5.js} +14 -14
- package/{chunk-VBPJD7U3.js → chunk-HCWYPASJ.js} +13 -13
- package/{chunk-SX4LQFOF.mjs → chunk-HD7GX5UE.mjs} +1 -1
- package/{chunk-6POWZMND.js → chunk-HDO7OG7I.js} +3 -3
- package/{chunk-AQIBLBXW.js → chunk-I4ICCNHG.js} +9 -9
- package/{chunk-KB6BX6LA.js → chunk-IEPLSUBR.js} +5 -5
- package/{chunk-NMJ6372G.js → chunk-IOCZ25V7.js} +11 -11
- package/{chunk-FOEQYO2Q.js → chunk-JXITZDN4.js} +15 -15
- package/{chunk-6CRGZEQF.js → chunk-JYRR3NKH.js} +9 -9
- package/{chunk-Z342XYFY.js → chunk-KDDWHY5M.js} +6 -6
- package/{chunk-KGUUDFJE.mjs → chunk-KKCJ2GMO.mjs} +1 -1
- package/{chunk-4IDPSNL3.mjs → chunk-KS7PUPPU.mjs} +9 -9
- package/{chunk-RNKMPQDZ.mjs → chunk-L7EN73HA.mjs} +4 -4
- package/{chunk-NCJI2DCV.mjs → chunk-LBOUUQFM.mjs} +3 -3
- package/{chunk-RIBB6GXJ.mjs → chunk-MBDPHX4P.mjs} +3 -3
- package/{chunk-77MASFCZ.mjs → chunk-MLXTZKBJ.mjs} +1 -1
- package/{chunk-4ETXRZKO.js → chunk-MMD72AEX.js} +8 -8
- package/{chunk-O6PHWGJH.mjs → chunk-MP7OH5ZP.mjs} +2 -2
- package/{chunk-HTEQHRTK.mjs → chunk-MSZ2AHQM.mjs} +2 -2
- package/{chunk-CSL3CTEN.mjs → chunk-N3WWOWZ4.mjs} +2 -2
- package/{chunk-PSPAJNNB.js → chunk-NBQEF4JD.js} +1 -1
- package/{chunk-QMLV5G5Z.js → chunk-NDH24NNQ.js} +37 -37
- package/{chunk-P4DW3EEW.mjs → chunk-NPEOZHKQ.mjs} +4 -4
- package/{chunk-GUB2Y4JK.mjs → chunk-NQQR2NDC.mjs} +3 -3
- package/{chunk-ZEZK2FJ4.mjs → chunk-O6E6RGZT.mjs} +1 -1
- package/{chunk-QF6PFV6M.mjs → chunk-OXUVPYJE.mjs} +2 -2
- package/{chunk-CKGMFUU2.js → chunk-OZAVO5UA.js} +3 -3
- package/{chunk-US2CUADK.mjs → chunk-OZF3JOG4.mjs} +4 -4
- package/{chunk-ICOZ5BK7.mjs → chunk-PBCJ476S.mjs} +3 -3
- package/{chunk-OXCN3BD6.mjs → chunk-PODBONNQ.mjs} +2 -2
- package/{chunk-5CBMRDT7.mjs → chunk-PW4ITUWI.mjs} +3 -3
- package/{chunk-F2QWMBUB.mjs → chunk-Q23ZKF2E.mjs} +2 -2
- package/{chunk-K23YFVYE.mjs → chunk-QFLEJVD3.mjs} +4 -4
- package/{chunk-XVWILFYQ.mjs → chunk-RG3G5IZC.mjs} +2 -2
- package/{chunk-PDB2VCWX.mjs → chunk-RKVMGHH3.mjs} +1 -1
- package/{chunk-WKQDHQAS.js → chunk-RV4AOZUL.js} +10 -10
- package/{chunk-7BYWDRRI.mjs → chunk-S2LLOGBR.mjs} +3 -3
- package/{chunk-VHYQNTH7.mjs → chunk-S7HB64F7.mjs} +4 -4
- package/{chunk-TTCGK36S.js → chunk-SOJSGQJO.js} +8 -8
- package/{chunk-YEGS4ETW.js → chunk-SSBVBEDI.js} +12 -12
- package/{chunk-FD7CNCJW.mjs → chunk-SVZMGPZC.mjs} +4 -4
- package/{chunk-VYXQVM7A.js → chunk-TGQA25KR.js} +6 -6
- package/{chunk-3HZTA2ZQ.js → chunk-UHYOQN4B.js} +11 -11
- package/{chunk-K3LYDDTD.js → chunk-VHXALM6O.js} +5 -5
- package/{chunk-ZFBUIBJH.mjs → chunk-VQWCEF3I.mjs} +4 -4
- package/{chunk-4SYFVOM2.js → chunk-VRY6WSXJ.js} +1 -1
- package/{chunk-2YMMYND2.js → chunk-VVU3Q7KV.js} +3 -3
- package/chunk-VYBFV2QD.js +31 -0
- package/{chunk-QHCOMBHI.js → chunk-W4ZJYYQP.js} +6 -6
- package/{chunk-3JPKE36M.mjs → chunk-W7CX2O2V.mjs} +8 -8
- package/{chunk-NMYVYLKF.js → chunk-W7PK2KN7.js} +3 -3
- package/{chunk-UQW3H2JS.js → chunk-WEZTFUOR.js} +7 -7
- package/chunk-WJKG5MUH.mjs +30 -0
- package/{chunk-X3V6YE47.mjs → chunk-WR7C2Q2O.mjs} +1 -1
- package/{chunk-G6WKPZTL.js → chunk-X3FLPO26.js} +10 -10
- package/{chunk-YDRPNCWF.mjs → chunk-XH7WQWOD.mjs} +5 -5
- package/{chunk-A4FV6TTM.js → chunk-XR7BY66N.js} +1 -1
- package/{chunk-UKPBHVOT.js → chunk-XWASPFJ7.js} +11 -11
- package/{chunk-7MDE2NEO.mjs → chunk-YAFFRILU.mjs} +2 -2
- package/{chunk-MM5OJOOR.mjs → chunk-YHL7Q5J3.mjs} +2 -2
- package/{chunk-RJG7QLDD.js → chunk-YMBEAV7N.js} +3 -3
- package/{chunk-BMAIJZN6.js → chunk-ZE53QYI6.js} +3 -3
- package/{chunk-3GHC4JQU.mjs → chunk-ZJRJN2UJ.mjs} +2 -2
- package/{chunk-WIISPZZE.mjs → chunk-ZLGQUL4Y.mjs} +2 -2
- package/{chunk-BEPAUXCN.mjs → chunk-ZSHUAH66.mjs} +4 -4
- package/components/form/checkbox.js +5 -5
- package/components/form/checkbox.mjs +4 -4
- package/components/form/date-picker.js +9 -9
- package/components/form/date-picker.mjs +8 -8
- package/components/form/date-range-picker.js +13 -13
- package/components/form/date-range-picker.mjs +7 -7
- package/components/form/error.js +3 -3
- package/components/form/error.mjs +2 -2
- package/components/form/hook-checkbox.d.mts +7 -5
- package/components/form/hook-checkbox.d.ts +7 -5
- package/components/form/hook-checkbox.js +21 -13
- package/components/form/hook-checkbox.js.map +1 -1
- package/components/form/hook-checkbox.mjs +16 -8
- package/components/form/hook-checkbox.mjs.map +1 -1
- package/components/form/hook-date-picker.js +12 -12
- package/components/form/hook-date-picker.mjs +9 -9
- package/components/form/hook-multi-select.js +17 -17
- package/components/form/hook-multi-select.mjs +14 -14
- package/components/form/hook-native-select.d.mts +7 -4
- package/components/form/hook-native-select.d.ts +7 -4
- package/components/form/hook-native-select.js +22 -15
- package/components/form/hook-native-select.js.map +1 -1
- package/components/form/hook-native-select.mjs +17 -10
- package/components/form/hook-native-select.mjs.map +1 -1
- package/components/form/hook-searchable-select.js +15 -15
- package/components/form/hook-searchable-select.mjs +12 -12
- package/components/form/hook-select.js +8 -8
- package/components/form/hook-select.mjs +5 -5
- package/components/form/hook-tag-picker.js +9 -9
- package/components/form/hook-tag-picker.mjs +6 -6
- package/components/form/hook-text-input.d.mts +7 -4
- package/components/form/hook-text-input.d.ts +7 -4
- package/components/form/hook-text-input.js +36 -16
- package/components/form/hook-text-input.js.map +1 -1
- package/components/form/hook-text-input.mjs +31 -11
- package/components/form/hook-text-input.mjs.map +1 -1
- package/components/form/hook-textarea.d.mts +7 -4
- package/components/form/hook-textarea.d.ts +7 -4
- package/components/form/hook-textarea.js +30 -16
- package/components/form/hook-textarea.js.map +1 -1
- package/components/form/hook-textarea.mjs +25 -11
- package/components/form/hook-textarea.mjs.map +1 -1
- package/components/form/hook-time-input.d.mts +7 -5
- package/components/form/hook-time-input.d.ts +7 -5
- package/components/form/hook-time-input.js +36 -15
- package/components/form/hook-time-input.js.map +1 -1
- package/components/form/hook-time-input.mjs +31 -10
- package/components/form/hook-time-input.mjs.map +1 -1
- package/components/form/multi-select.js +14 -14
- package/components/form/multi-select.mjs +13 -13
- package/components/form/native-select.js +4 -4
- package/components/form/native-select.mjs +3 -3
- package/components/form/searchable-select.js +12 -12
- package/components/form/searchable-select.mjs +11 -11
- package/components/form/select.js +5 -5
- package/components/form/select.mjs +4 -4
- package/components/form/tag-picker.js +6 -6
- package/components/form/tag-picker.mjs +5 -5
- package/components/form/text-input.d.mts +12 -0
- package/components/form/text-input.d.ts +12 -0
- package/components/form/text-input.js +5 -5
- package/components/form/text-input.mjs +4 -4
- package/components/form/textarea.js +5 -5
- package/components/form/textarea.mjs +4 -4
- package/components/form/time-input.js +7 -7
- package/components/form/time-input.mjs +6 -6
- package/components/form/types.d.mts +18 -2
- package/components/form/types.d.ts +18 -2
- package/components/form/types.js +12 -1
- package/components/form/types.js.map +1 -1
- package/components/form/types.mjs +11 -0
- package/components/ui/accordion.js +5 -5
- package/components/ui/accordion.mjs +1 -1
- package/components/ui/alert-dialog.js +12 -12
- package/components/ui/alert-dialog.mjs +3 -3
- package/components/ui/alert.d.mts +1 -1
- package/components/ui/alert.d.ts +1 -1
- package/components/ui/alert.js +3 -3
- package/components/ui/alert.mjs +2 -2
- package/components/ui/avatar.js +3 -3
- package/components/ui/avatar.mjs +2 -2
- package/components/ui/badge.js +3 -3
- package/components/ui/badge.mjs +2 -2
- package/components/ui/basic-alert.js +3 -3
- package/components/ui/basic-alert.mjs +2 -2
- package/components/ui/breadcrumb.js +3 -3
- package/components/ui/breadcrumb.mjs +2 -2
- package/components/ui/button-group.js +6 -6
- package/components/ui/button-group.mjs +2 -2
- package/components/ui/button.d.mts +23 -0
- package/components/ui/button.d.ts +23 -0
- package/components/ui/button.js +4 -4
- package/components/ui/button.mjs +3 -3
- package/components/ui/calendar.js +5 -5
- package/components/ui/calendar.mjs +4 -4
- package/components/ui/card.js +8 -8
- package/components/ui/card.mjs +1 -1
- package/components/ui/carousel.js +10 -10
- package/components/ui/carousel.mjs +3 -3
- package/components/ui/checkbox.js +3 -3
- package/components/ui/checkbox.mjs +2 -2
- package/components/ui/combobox.js +22 -22
- package/components/ui/combobox.mjs +6 -6
- package/components/ui/command.js +9 -9
- package/components/ui/command.mjs +8 -8
- package/components/ui/context-menu.js +11 -11
- package/components/ui/context-menu.mjs +1 -1
- package/components/ui/copy-button.js +8 -8
- package/components/ui/copy-button.mjs +3 -3
- package/components/ui/dialog.js +5 -5
- package/components/ui/dialog.mjs +4 -4
- package/components/ui/drawer.js +7 -7
- package/components/ui/drawer.mjs +1 -1
- package/components/ui/dropdown-menu.js +3 -3
- package/components/ui/dropdown-menu.mjs +2 -2
- package/components/ui/empty.js +7 -7
- package/components/ui/empty.mjs +1 -1
- package/components/ui/extension/file-input.js +5 -5
- package/components/ui/extension/file-input.mjs +4 -4
- package/components/ui/field.js +15 -15
- package/components/ui/field.mjs +3 -3
- package/components/ui/hover-card.js +2 -2
- package/components/ui/hover-card.mjs +1 -1
- package/components/ui/input-group.js +7 -7
- package/components/ui/input-group.mjs +6 -6
- package/components/ui/input-otp.js +5 -5
- package/components/ui/input-otp.mjs +1 -1
- package/components/ui/input.js +3 -3
- package/components/ui/input.mjs +2 -2
- package/components/ui/item.js +12 -12
- package/components/ui/item.mjs +2 -2
- package/components/ui/kbd.js +3 -3
- package/components/ui/kbd.mjs +1 -1
- package/components/ui/label.js +3 -3
- package/components/ui/label.mjs +2 -2
- package/components/ui/menubar.js +12 -12
- package/components/ui/menubar.mjs +1 -1
- package/components/ui/multi-select.d.mts +1 -1
- package/components/ui/multi-select.d.ts +1 -1
- package/components/ui/multi-select.js +11 -11
- package/components/ui/multi-select.mjs +10 -10
- package/components/ui/native-select.js +3 -3
- package/components/ui/native-select.mjs +1 -1
- package/components/ui/navigation-menu.js +10 -10
- package/components/ui/navigation-menu.mjs +1 -1
- package/components/ui/pagination.js +9 -9
- package/components/ui/pagination.mjs +3 -3
- package/components/ui/popover.js +3 -3
- package/components/ui/popover.mjs +2 -2
- package/components/ui/progress.js +2 -2
- package/components/ui/progress.mjs +1 -1
- package/components/ui/radio-group.js +3 -3
- package/components/ui/radio-group.mjs +1 -1
- package/components/ui/resizable.js +3 -3
- package/components/ui/resizable.mjs +1 -1
- package/components/ui/scroll-area.js +3 -3
- package/components/ui/scroll-area.mjs +1 -1
- package/components/ui/select.js +3 -3
- package/components/ui/select.mjs +2 -2
- package/components/ui/separator.js +3 -3
- package/components/ui/separator.mjs +2 -2
- package/components/ui/sheet.js +5 -5
- package/components/ui/sheet.mjs +4 -4
- package/components/ui/sidebar.js +11 -11
- package/components/ui/sidebar.mjs +10 -10
- package/components/ui/skeleton.js +3 -3
- package/components/ui/skeleton.mjs +2 -2
- package/components/ui/slider.js +2 -2
- package/components/ui/slider.mjs +1 -1
- package/components/ui/spinner.js +3 -3
- package/components/ui/spinner.mjs +2 -2
- package/components/ui/switch.js +2 -2
- package/components/ui/switch.mjs +1 -1
- package/components/ui/table.js +9 -9
- package/components/ui/table.mjs +1 -1
- package/components/ui/tabs.js +5 -5
- package/components/ui/tabs.mjs +1 -1
- package/components/ui/tag-picker.js +4 -4
- package/components/ui/tag-picker.mjs +3 -3
- package/components/ui/textarea.js +3 -3
- package/components/ui/textarea.mjs +2 -2
- package/components/ui/toggle-group.js +5 -5
- package/components/ui/toggle-group.mjs +2 -2
- package/components/ui/toggle.js +3 -3
- package/components/ui/toggle.mjs +2 -2
- package/components/ui/tooltip.js +3 -3
- package/components/ui/tooltip.mjs +2 -2
- package/components/widgets/dialog-manager/context.d.mts +26 -0
- package/components/widgets/dialog-manager/context.d.ts +26 -0
- package/components/widgets/dialog-manager/context.js +2 -2
- package/components/widgets/dialog-manager/context.mjs +1 -1
- package/components/widgets/dialog-manager/index.js +3 -3
- package/components/widgets/dialog-manager/index.mjs +2 -2
- package/components/widgets/dialog-manager/provider.d.mts +13 -0
- package/components/widgets/dialog-manager/provider.d.ts +13 -0
- package/components/widgets/dialog-manager/provider.js +3 -3
- package/components/widgets/dialog-manager/provider.mjs +2 -2
- package/components/widgets/dialog-manager/types.d.mts +10 -0
- package/components/widgets/dialog-manager/types.d.ts +10 -0
- package/hooks/use-clipboard.d.mts +12 -0
- package/hooks/use-clipboard.d.ts +12 -0
- package/hooks/use-clipboard.js +2 -2
- package/hooks/use-clipboard.mjs +1 -1
- package/hooks/use-mobile.d.mts +5 -0
- package/hooks/use-mobile.d.ts +5 -0
- package/hooks/use-mobile.js +2 -2
- package/hooks/use-mobile.mjs +1 -1
- package/layouts/sidebar1/app-sidebar.d.mts +12 -0
- package/layouts/sidebar1/app-sidebar.d.ts +12 -0
- package/layouts/sidebar1/app-sidebar.js +17 -17
- package/layouts/sidebar1/app-sidebar.mjs +16 -16
- package/layouts/sidebar1/context-switcher.js +13 -13
- package/layouts/sidebar1/context-switcher.mjs +12 -12
- package/layouts/sidebar1/index.d.mts +22 -0
- package/layouts/sidebar1/index.d.ts +22 -0
- package/layouts/sidebar1/index.js +23 -23
- package/layouts/sidebar1/index.js.map +1 -1
- package/layouts/sidebar1/index.mjs +17 -17
- package/layouts/sidebar1/index.mjs.map +1 -1
- package/layouts/sidebar1/nav-menus.js +12 -12
- package/layouts/sidebar1/nav-menus.mjs +11 -11
- package/layouts/sidebar1/nav-user.d.mts +9 -0
- package/layouts/sidebar1/nav-user.d.ts +9 -0
- package/layouts/sidebar1/nav-user.js +14 -14
- package/layouts/sidebar1/nav-user.mjs +13 -13
- package/layouts/simple/index.d.mts +23 -0
- package/layouts/simple/index.d.ts +23 -0
- package/layouts/simple/index.js +17 -17
- package/layouts/simple/index.js.map +1 -1
- package/layouts/simple/index.mjs +6 -6
- package/layouts/simple/index.mjs.map +1 -1
- package/layouts/simple/mobile-menu.js +3 -3
- package/layouts/simple/mobile-menu.mjs +2 -2
- package/layouts/simple/types.d.mts +11 -0
- package/layouts/simple/types.d.ts +11 -0
- package/layouts/simple/user-menu.js +4 -4
- package/layouts/simple/user-menu.mjs +3 -3
- package/llms.txt +102 -0
- package/package.json +96 -16
- package/utils/date.d.mts +9 -0
- package/utils/date.d.ts +9 -0
- package/utils/date.js +2 -2
- package/utils/date.mjs +1 -1
- package/utils/time.d.mts +12 -0
- package/utils/time.d.ts +12 -0
- package/utils/time.js +2 -2
- package/utils/time.mjs +1 -1
- package/utils/ui.d.mts +8 -0
- package/utils/ui.d.ts +8 -0
- package/utils/ui.js +2 -2
- package/utils/ui.mjs +1 -1
- package/chunk-2NMEKWO5.js.map +0 -1
- package/chunk-2YMMYND2.js.map +0 -1
- package/chunk-3GHC4JQU.mjs.map +0 -1
- package/chunk-3HZTA2ZQ.js.map +0 -1
- package/chunk-3JPKE36M.mjs.map +0 -1
- package/chunk-4BKWF5FK.js.map +0 -1
- package/chunk-4ETXRZKO.js.map +0 -1
- package/chunk-4IDPSNL3.mjs.map +0 -1
- package/chunk-4SYFVOM2.js.map +0 -1
- package/chunk-5CBMRDT7.mjs.map +0 -1
- package/chunk-5SLUBHNN.js.map +0 -1
- package/chunk-5TXFHYQ5.js.map +0 -1
- package/chunk-6CRGZEQF.js.map +0 -1
- package/chunk-6ECNY4VS.mjs.map +0 -1
- package/chunk-6POWZMND.js.map +0 -1
- package/chunk-6T6UTNWD.mjs.map +0 -1
- package/chunk-77MASFCZ.mjs.map +0 -1
- package/chunk-7BYWDRRI.mjs.map +0 -1
- package/chunk-7GZ7NWTV.js.map +0 -1
- package/chunk-7MDE2NEO.mjs.map +0 -1
- package/chunk-7MDWTJEP.mjs.map +0 -1
- package/chunk-7PX7GVOR.mjs.map +0 -1
- package/chunk-7ZMTJBXT.mjs.map +0 -1
- package/chunk-A4FV6TTM.js.map +0 -1
- package/chunk-AGPEWIPR.mjs.map +0 -1
- package/chunk-AQIBLBXW.js.map +0 -1
- package/chunk-B2Z7BNYW.mjs.map +0 -1
- package/chunk-BEPAUXCN.mjs.map +0 -1
- package/chunk-BJK4J4VY.js.map +0 -1
- package/chunk-BMAIJZN6.js.map +0 -1
- package/chunk-CKGMFUU2.js.map +0 -1
- package/chunk-CNYC22IA.mjs.map +0 -1
- package/chunk-CSL3CTEN.mjs.map +0 -1
- package/chunk-E7F5KADG.mjs.map +0 -1
- package/chunk-F2QWMBUB.mjs.map +0 -1
- package/chunk-FD7CNCJW.mjs.map +0 -1
- package/chunk-FOEQYO2Q.js.map +0 -1
- package/chunk-G6WKPZTL.js.map +0 -1
- package/chunk-GBNJFKPB.js.map +0 -1
- package/chunk-GUB2Y4JK.mjs.map +0 -1
- package/chunk-GV62APQ6.js.map +0 -1
- package/chunk-HTEQHRTK.mjs.map +0 -1
- package/chunk-HWDU5KVD.mjs.map +0 -1
- package/chunk-ICOZ5BK7.mjs.map +0 -1
- package/chunk-IYVLRZJ4.js.map +0 -1
- package/chunk-JZXOJAMQ.js.map +0 -1
- package/chunk-K23YFVYE.mjs.map +0 -1
- package/chunk-K3LYDDTD.js.map +0 -1
- package/chunk-K4JVHEI2.js.map +0 -1
- package/chunk-KB6BX6LA.js.map +0 -1
- package/chunk-KGUUDFJE.mjs.map +0 -1
- package/chunk-LAIO3QZX.js.map +0 -1
- package/chunk-LPDYWZN6.js.map +0 -1
- package/chunk-LVXIGNFJ.mjs.map +0 -1
- package/chunk-M6UKU56L.mjs.map +0 -1
- package/chunk-MM5OJOOR.mjs.map +0 -1
- package/chunk-N7JSYNXM.js.map +0 -1
- package/chunk-NCJI2DCV.mjs.map +0 -1
- package/chunk-NMJ6372G.js.map +0 -1
- package/chunk-NMYVYLKF.js.map +0 -1
- package/chunk-O6PHWGJH.mjs.map +0 -1
- package/chunk-OMQVDSR6.js.map +0 -1
- package/chunk-OPNHC6JN.mjs.map +0 -1
- package/chunk-OUVM5NST.js.map +0 -1
- package/chunk-OVHPXYDN.mjs.map +0 -1
- package/chunk-OXCN3BD6.mjs.map +0 -1
- package/chunk-P4DW3EEW.mjs.map +0 -1
- package/chunk-P4EDRIBH.js.map +0 -1
- package/chunk-PDB2VCWX.mjs.map +0 -1
- package/chunk-PS3LNHTA.js.map +0 -1
- package/chunk-PSPAJNNB.js.map +0 -1
- package/chunk-QCHBJMD6.mjs.map +0 -1
- package/chunk-QF6PFV6M.mjs.map +0 -1
- package/chunk-QHCOMBHI.js.map +0 -1
- package/chunk-QMLV5G5Z.js.map +0 -1
- package/chunk-RFORRZRN.js.map +0 -1
- package/chunk-RIBB6GXJ.mjs.map +0 -1
- package/chunk-RJG7QLDD.js.map +0 -1
- package/chunk-RJVQU443.mjs.map +0 -1
- package/chunk-RNKMPQDZ.mjs.map +0 -1
- package/chunk-RPF753T2.mjs.map +0 -1
- package/chunk-SC6IX6NJ.js.map +0 -1
- package/chunk-SX4LQFOF.mjs.map +0 -1
- package/chunk-TTCGK36S.js.map +0 -1
- package/chunk-UFRPUC7K.js.map +0 -1
- package/chunk-UKPBHVOT.js.map +0 -1
- package/chunk-UQW3H2JS.js.map +0 -1
- package/chunk-US2CUADK.mjs.map +0 -1
- package/chunk-VBPJD7U3.js.map +0 -1
- package/chunk-VHYQNTH7.mjs.map +0 -1
- package/chunk-VYXQVM7A.js.map +0 -1
- package/chunk-WIISPZZE.mjs.map +0 -1
- package/chunk-WJBTXKFN.js.map +0 -1
- package/chunk-WK4MG4VT.js.map +0 -1
- package/chunk-WKQDHQAS.js.map +0 -1
- package/chunk-WXEEDLLR.js.map +0 -1
- package/chunk-X3V6YE47.mjs.map +0 -1
- package/chunk-XMRJIUYX.mjs.map +0 -1
- package/chunk-XVWILFYQ.mjs.map +0 -1
- package/chunk-YDRPNCWF.mjs.map +0 -1
- package/chunk-YEGS4ETW.js.map +0 -1
- package/chunk-YJR5JBXS.js.map +0 -1
- package/chunk-YOSPWY5K.mjs.map +0 -1
- package/chunk-YQENFZOY.mjs.map +0 -1
- package/chunk-Z342XYFY.js.map +0 -1
- package/chunk-ZEZK2FJ4.mjs.map +0 -1
- package/chunk-ZFBUIBJH.mjs.map +0 -1
- package/chunk-ZFSZ6K4K.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/jahn/projects/shadcn-theme/packages/react/dist/components/form/hook-textarea.js","../../../components/form/hook-textarea.tsx"],"names":[],"mappings":"AAAA,qLAAY;AACZ;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACE;AACA;AACA;AACF,0DAAgC;AAChC;AACA;
|
|
1
|
+
{"version":3,"sources":["/home/jahn/projects/shadcn-theme/packages/react/dist/components/form/hook-textarea.js","../../../components/form/hook-textarea.tsx"],"names":[],"mappings":"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","file":"/home/jahn/projects/shadcn-theme/packages/react/dist/components/form/hook-textarea.js","sourcesContent":[null,"\"use client\";\nimport React from 'react';\nimport _get from 'lodash-es/get';\nimport { FieldValues, Path, useFormContext } from 'react-hook-form';\nimport { cn } from '../../utils/ui';\nimport { FormError } from './error';\nimport { FormTextarea } from './textarea';\nimport type { FormTextareaProps } from './textarea';\nimport { getValidationRuleValue, isValidationRuleEnabled, mergeHookFormRules } from './types';\nimport type { HookFormRules, HookFormValidationAttributes } from './types';\n\ntype HookFormTextareaValidationAttributes = Pick<HookFormValidationAttributes, 'required' | 'maxLength' | 'minLength'>;\n\ntype HookFormTextareaProps<T extends FieldValues> = Omit<\n FormTextareaProps,\n 'name' | 'inputProps' | keyof HookFormTextareaValidationAttributes\n> & {\n name: Path<T>;\n rules?: HookFormRules<T>;\n error?: string;\n} & HookFormTextareaValidationAttributes;\n\nexport function HookFormTextarea<T extends FieldValues>({\n id,\n name,\n rules,\n label,\n error,\n classNames,\n disabled,\n required,\n maxLength,\n minLength,\n ...rest\n}: HookFormTextareaProps<T>) {\n const methods = useFormContext<T>();\n if (!methods) return null;\n\n const {\n register,\n formState: { errors },\n } = methods;\n\n const fieldError = _get(errors, name);\n const errorMessage = error ?? (fieldError && String(fieldError?.message));\n const showError = !!fieldError && !disabled;\n const mergedRules = mergeHookFormRules(rules, { required, maxLength, minLength });\n\n return (\n <div className={cn('$hook-form-textarea', classNames?.wrapper)}>\n <FormTextarea\n {...rest}\n id={id}\n name={name}\n label={label}\n disabled={disabled}\n required={isValidationRuleEnabled(mergedRules?.required)}\n maxLength={getValidationRuleValue(mergedRules?.maxLength)}\n minLength={getValidationRuleValue(mergedRules?.minLength)}\n classNames={{\n label: cn(classNames?.label, {\n 'text-danger': showError,\n }),\n input: cn(classNames?.input, {\n 'ring-danger text-danger': showError,\n }),\n }}\n inputProps={register(name, mergedRules)}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"]}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
FormTextarea
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import
|
|
4
|
+
} from "../../chunk-ZSHUAH66.mjs";
|
|
5
|
+
import {
|
|
6
|
+
getValidationRuleValue,
|
|
7
|
+
isValidationRuleEnabled,
|
|
8
|
+
mergeHookFormRules
|
|
9
|
+
} from "../../chunk-WJKG5MUH.mjs";
|
|
10
|
+
import "../../chunk-CHV7CG5L.mjs";
|
|
6
11
|
import {
|
|
7
12
|
FormError
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
13
|
+
} from "../../chunk-42IQSRLZ.mjs";
|
|
14
|
+
import "../../chunk-YHL7Q5J3.mjs";
|
|
10
15
|
import {
|
|
11
16
|
cn
|
|
12
|
-
} from "../../chunk-
|
|
17
|
+
} from "../../chunk-KKCJ2GMO.mjs";
|
|
13
18
|
import {
|
|
14
19
|
__objRest,
|
|
15
20
|
__spreadProps,
|
|
@@ -28,7 +33,10 @@ function HookFormTextarea(_a) {
|
|
|
28
33
|
label,
|
|
29
34
|
error,
|
|
30
35
|
classNames,
|
|
31
|
-
disabled
|
|
36
|
+
disabled,
|
|
37
|
+
required,
|
|
38
|
+
maxLength,
|
|
39
|
+
minLength
|
|
32
40
|
} = _b, rest = __objRest(_b, [
|
|
33
41
|
"id",
|
|
34
42
|
"name",
|
|
@@ -36,7 +44,10 @@ function HookFormTextarea(_a) {
|
|
|
36
44
|
"label",
|
|
37
45
|
"error",
|
|
38
46
|
"classNames",
|
|
39
|
-
"disabled"
|
|
47
|
+
"disabled",
|
|
48
|
+
"required",
|
|
49
|
+
"maxLength",
|
|
50
|
+
"minLength"
|
|
40
51
|
]);
|
|
41
52
|
const methods = useFormContext();
|
|
42
53
|
if (!methods) return null;
|
|
@@ -47,14 +58,17 @@ function HookFormTextarea(_a) {
|
|
|
47
58
|
const fieldError = _get(errors, name);
|
|
48
59
|
const errorMessage = error != null ? error : fieldError && String(fieldError == null ? void 0 : fieldError.message);
|
|
49
60
|
const showError = !!fieldError && !disabled;
|
|
61
|
+
const mergedRules = mergeHookFormRules(rules, { required, maxLength, minLength });
|
|
50
62
|
return /* @__PURE__ */ React.createElement("div", { className: cn("$hook-form-textarea", classNames == null ? void 0 : classNames.wrapper) }, /* @__PURE__ */ React.createElement(
|
|
51
63
|
FormTextarea,
|
|
52
|
-
__spreadProps(__spreadValues({
|
|
64
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
53
65
|
id,
|
|
54
66
|
name,
|
|
55
67
|
label,
|
|
56
|
-
disabled
|
|
57
|
-
|
|
68
|
+
disabled,
|
|
69
|
+
required: isValidationRuleEnabled(mergedRules == null ? void 0 : mergedRules.required),
|
|
70
|
+
maxLength: getValidationRuleValue(mergedRules == null ? void 0 : mergedRules.maxLength),
|
|
71
|
+
minLength: getValidationRuleValue(mergedRules == null ? void 0 : mergedRules.minLength),
|
|
58
72
|
classNames: {
|
|
59
73
|
label: cn(classNames == null ? void 0 : classNames.label, {
|
|
60
74
|
"text-danger": showError
|
|
@@ -63,7 +77,7 @@ function HookFormTextarea(_a) {
|
|
|
63
77
|
"ring-danger text-danger": showError
|
|
64
78
|
})
|
|
65
79
|
},
|
|
66
|
-
inputProps: register(name,
|
|
80
|
+
inputProps: register(name, mergedRules)
|
|
67
81
|
})
|
|
68
82
|
), showError && /* @__PURE__ */ React.createElement(FormError, { field: name, className: "mt-1", message: errorMessage }));
|
|
69
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../components/form/hook-textarea.tsx"],"sourcesContent":["\"use client\";\nimport React from 'react';\nimport _get from 'lodash-es/get';\nimport { FieldValues,
|
|
1
|
+
{"version":3,"sources":["../../../components/form/hook-textarea.tsx"],"sourcesContent":["\"use client\";\nimport React from 'react';\nimport _get from 'lodash-es/get';\nimport { FieldValues, Path, useFormContext } from 'react-hook-form';\nimport { cn } from '../../utils/ui';\nimport { FormError } from './error';\nimport { FormTextarea } from './textarea';\nimport type { FormTextareaProps } from './textarea';\nimport { getValidationRuleValue, isValidationRuleEnabled, mergeHookFormRules } from './types';\nimport type { HookFormRules, HookFormValidationAttributes } from './types';\n\ntype HookFormTextareaValidationAttributes = Pick<HookFormValidationAttributes, 'required' | 'maxLength' | 'minLength'>;\n\ntype HookFormTextareaProps<T extends FieldValues> = Omit<\n FormTextareaProps,\n 'name' | 'inputProps' | keyof HookFormTextareaValidationAttributes\n> & {\n name: Path<T>;\n rules?: HookFormRules<T>;\n error?: string;\n} & HookFormTextareaValidationAttributes;\n\nexport function HookFormTextarea<T extends FieldValues>({\n id,\n name,\n rules,\n label,\n error,\n classNames,\n disabled,\n required,\n maxLength,\n minLength,\n ...rest\n}: HookFormTextareaProps<T>) {\n const methods = useFormContext<T>();\n if (!methods) return null;\n\n const {\n register,\n formState: { errors },\n } = methods;\n\n const fieldError = _get(errors, name);\n const errorMessage = error ?? (fieldError && String(fieldError?.message));\n const showError = !!fieldError && !disabled;\n const mergedRules = mergeHookFormRules(rules, { required, maxLength, minLength });\n\n return (\n <div className={cn('$hook-form-textarea', classNames?.wrapper)}>\n <FormTextarea\n {...rest}\n id={id}\n name={name}\n label={label}\n disabled={disabled}\n required={isValidationRuleEnabled(mergedRules?.required)}\n maxLength={getValidationRuleValue(mergedRules?.maxLength)}\n minLength={getValidationRuleValue(mergedRules?.minLength)}\n classNames={{\n label: cn(classNames?.label, {\n 'text-danger': showError,\n }),\n input: cn(classNames?.input, {\n 'ring-danger text-danger': showError,\n }),\n }}\n inputProps={register(name, mergedRules)}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAA4B,sBAAsB;AAmB3C,SAAS,iBAAwC,IAY3B;AAZ2B,eACtD;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAhCF,IAsBwD,IAWnD,iBAXmD,IAWnD;AAAA,IAVH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,UAAU,eAAkB;AAClC,MAAI,CAAC,QAAS,QAAO;AAErB,QAAM;AAAA,IACJ;AAAA,IACA,WAAW,EAAE,OAAO;AAAA,EACtB,IAAI;AAEJ,QAAM,aAAa,KAAK,QAAQ,IAAI;AACpC,QAAM,eAAe,wBAAU,cAAc,OAAO,yCAAY,OAAO;AACvE,QAAM,YAAY,CAAC,CAAC,cAAc,CAAC;AACnC,QAAM,cAAc,mBAAmB,OAAO,EAAE,UAAU,WAAW,UAAU,CAAC;AAEhF,SACE,oCAAC,SAAI,WAAW,GAAG,uBAAuB,yCAAY,OAAO,KAC3D;AAAA,IAAC;AAAA,qCACK,OADL;AAAA,MAEC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,wBAAwB,2CAAa,QAAQ;AAAA,MACvD,WAAW,uBAAuB,2CAAa,SAAS;AAAA,MACxD,WAAW,uBAAuB,2CAAa,SAAS;AAAA,MACxD,YAAY;AAAA,QACV,OAAO,GAAG,yCAAY,OAAO;AAAA,UAC3B,eAAe;AAAA,QACjB,CAAC;AAAA,QACD,OAAO,GAAG,yCAAY,OAAO;AAAA,UAC3B,2BAA2B;AAAA,QAC7B,CAAC;AAAA,MACH;AAAA,MACA,YAAY,SAAS,MAAM,WAAW;AAAA;AAAA,EACxC,GACC,aAAa,oCAAC,aAAU,OAAO,MAAM,WAAU,QAAO,SAAS,cAAc,CAChF;AAEJ;","names":[]}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { FieldValues, Path
|
|
2
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
3
3
|
import { FormTimeInputProps } from './time-input.mjs';
|
|
4
|
+
import { HookFormValidationAttributes, HookFormRules } from './types.mjs';
|
|
4
5
|
import './text-input.mjs';
|
|
5
6
|
|
|
6
|
-
type
|
|
7
|
+
type HookFormTimeInputValidationAttributes = Pick<HookFormValidationAttributes, 'required' | 'min' | 'max' | 'maxLength' | 'minLength'>;
|
|
8
|
+
type HookFormTimeInputProps<T extends FieldValues> = Omit<FormTimeInputProps, 'name' | 'inputProps' | keyof HookFormTimeInputValidationAttributes> & {
|
|
7
9
|
name: Path<T>;
|
|
8
|
-
rules?:
|
|
10
|
+
rules?: HookFormRules<T>;
|
|
9
11
|
error?: string;
|
|
10
|
-
};
|
|
11
|
-
declare function HookFormTimeInput<T extends FieldValues>({ id, name, rules, label, error, classNames, disabled, ...rest }: HookFormTimeInputProps<T>): React__default.JSX.Element | null;
|
|
12
|
+
} & HookFormTimeInputValidationAttributes;
|
|
13
|
+
declare function HookFormTimeInput<T extends FieldValues>({ id, name, rules, label, error, classNames, disabled, required, min, max, maxLength, minLength, ...rest }: HookFormTimeInputProps<T>): React__default.JSX.Element | null;
|
|
12
14
|
|
|
13
15
|
export { HookFormTimeInput };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { FieldValues, Path
|
|
2
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
3
3
|
import { FormTimeInputProps } from './time-input.js';
|
|
4
|
+
import { HookFormValidationAttributes, HookFormRules } from './types.js';
|
|
4
5
|
import './text-input.js';
|
|
5
6
|
|
|
6
|
-
type
|
|
7
|
+
type HookFormTimeInputValidationAttributes = Pick<HookFormValidationAttributes, 'required' | 'min' | 'max' | 'maxLength' | 'minLength'>;
|
|
8
|
+
type HookFormTimeInputProps<T extends FieldValues> = Omit<FormTimeInputProps, 'name' | 'inputProps' | keyof HookFormTimeInputValidationAttributes> & {
|
|
7
9
|
name: Path<T>;
|
|
8
|
-
rules?:
|
|
10
|
+
rules?: HookFormRules<T>;
|
|
9
11
|
error?: string;
|
|
10
|
-
};
|
|
11
|
-
declare function HookFormTimeInput<T extends FieldValues>({ id, name, rules, label, error, classNames, disabled, ...rest }: HookFormTimeInputProps<T>): React__default.JSX.Element | null;
|
|
12
|
+
} & HookFormTimeInputValidationAttributes;
|
|
13
|
+
declare function HookFormTimeInput<T extends FieldValues>({ id, name, rules, label, error, classNames, disabled, required, min, max, maxLength, minLength, ...rest }: HookFormTimeInputProps<T>): React__default.JSX.Element | null;
|
|
12
14
|
|
|
13
15
|
export { HookFormTimeInput };
|
|
@@ -2,17 +2,22 @@
|
|
|
2
2
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-UFRPUC7K.js');
|
|
5
|
+
var _chunkJYRR3NKHjs = require('../../chunk-JYRR3NKH.js');
|
|
6
|
+
require('../../chunk-WEZTFUOR.js');
|
|
8
7
|
|
|
9
8
|
|
|
10
|
-
var _chunk6POWZMNDjs = require('../../chunk-6POWZMND.js');
|
|
11
|
-
require('../../chunk-4SYFVOM2.js');
|
|
12
|
-
require('../../chunk-CKGMFUU2.js');
|
|
13
9
|
|
|
14
10
|
|
|
15
|
-
var
|
|
11
|
+
var _chunkVYBFV2QDjs = require('../../chunk-VYBFV2QD.js');
|
|
12
|
+
require('../../chunk-CRBQL2FG.js');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _chunkHDO7OG7Ijs = require('../../chunk-HDO7OG7I.js');
|
|
16
|
+
require('../../chunk-VRY6WSXJ.js');
|
|
17
|
+
require('../../chunk-OZAVO5UA.js');
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
var _chunkNBQEF4JDjs = require('../../chunk-NBQEF4JD.js');
|
|
16
21
|
|
|
17
22
|
|
|
18
23
|
|
|
@@ -31,7 +36,12 @@ function HookFormTimeInput(_a) {
|
|
|
31
36
|
label,
|
|
32
37
|
error,
|
|
33
38
|
classNames,
|
|
34
|
-
disabled
|
|
39
|
+
disabled,
|
|
40
|
+
required,
|
|
41
|
+
min,
|
|
42
|
+
max,
|
|
43
|
+
maxLength,
|
|
44
|
+
minLength
|
|
35
45
|
} = _b, rest = _chunk2NMEKWO5js.__objRest.call(void 0, _b, [
|
|
36
46
|
"id",
|
|
37
47
|
"name",
|
|
@@ -39,7 +49,12 @@ function HookFormTimeInput(_a) {
|
|
|
39
49
|
"label",
|
|
40
50
|
"error",
|
|
41
51
|
"classNames",
|
|
42
|
-
"disabled"
|
|
52
|
+
"disabled",
|
|
53
|
+
"required",
|
|
54
|
+
"min",
|
|
55
|
+
"max",
|
|
56
|
+
"maxLength",
|
|
57
|
+
"minLength"
|
|
43
58
|
]);
|
|
44
59
|
const methods = _reacthookform.useFormContext.call(void 0, );
|
|
45
60
|
if (!methods) return null;
|
|
@@ -50,14 +65,15 @@ function HookFormTimeInput(_a) {
|
|
|
50
65
|
const fieldError = _get3.default.call(void 0, errors, name);
|
|
51
66
|
const errorMessage = error != null ? error : fieldError == null ? void 0 : fieldError.message;
|
|
52
67
|
const showError = !!fieldError && !disabled;
|
|
53
|
-
|
|
68
|
+
const mergedRules = _chunkVYBFV2QDjs.mergeHookFormRules.call(void 0, rules, { required, min, max, maxLength, minLength });
|
|
69
|
+
return /* @__PURE__ */ _react2.default.createElement("div", { className: _chunkNBQEF4JDjs.cn.call(void 0, "$hook-form-time-input", classNames == null ? void 0 : classNames.wrapper) }, /* @__PURE__ */ _react2.default.createElement(
|
|
54
70
|
_reacthookform.Controller,
|
|
55
71
|
{
|
|
56
72
|
name,
|
|
57
73
|
control,
|
|
58
|
-
rules,
|
|
74
|
+
rules: mergedRules,
|
|
59
75
|
render: ({ field: { onChange, onBlur, value } }) => /* @__PURE__ */ _react2.default.createElement(
|
|
60
|
-
|
|
76
|
+
_chunkJYRR3NKHjs.FormTimeInput,
|
|
61
77
|
_chunk2NMEKWO5js.__spreadProps.call(void 0, _chunk2NMEKWO5js.__spreadValues.call(void 0, {}, rest), {
|
|
62
78
|
name,
|
|
63
79
|
label,
|
|
@@ -65,18 +81,23 @@ function HookFormTimeInput(_a) {
|
|
|
65
81
|
onChange,
|
|
66
82
|
onBlur,
|
|
67
83
|
disabled,
|
|
84
|
+
required: _chunkVYBFV2QDjs.isValidationRuleEnabled.call(void 0, mergedRules == null ? void 0 : mergedRules.required),
|
|
85
|
+
min: _chunkVYBFV2QDjs.getValidationRuleValue.call(void 0, mergedRules == null ? void 0 : mergedRules.min),
|
|
86
|
+
max: _chunkVYBFV2QDjs.getValidationRuleValue.call(void 0, mergedRules == null ? void 0 : mergedRules.max),
|
|
87
|
+
maxLength: _chunkVYBFV2QDjs.getValidationRuleValue.call(void 0, mergedRules == null ? void 0 : mergedRules.maxLength),
|
|
88
|
+
minLength: _chunkVYBFV2QDjs.getValidationRuleValue.call(void 0, mergedRules == null ? void 0 : mergedRules.minLength),
|
|
68
89
|
classNames: {
|
|
69
|
-
label:
|
|
90
|
+
label: _chunkNBQEF4JDjs.cn.call(void 0, classNames == null ? void 0 : classNames.label, {
|
|
70
91
|
"text-danger": showError
|
|
71
92
|
}),
|
|
72
|
-
input:
|
|
93
|
+
input: _chunkNBQEF4JDjs.cn.call(void 0, classNames == null ? void 0 : classNames.input, {
|
|
73
94
|
"ring-danger text-danger": showError
|
|
74
95
|
})
|
|
75
96
|
}
|
|
76
97
|
})
|
|
77
98
|
)
|
|
78
99
|
}
|
|
79
|
-
), showError && /* @__PURE__ */ _react2.default.createElement(
|
|
100
|
+
), showError && /* @__PURE__ */ _react2.default.createElement(_chunkHDO7OG7Ijs.FormError, { field: name, className: "mt-1", message: errorMessage }));
|
|
80
101
|
}
|
|
81
102
|
|
|
82
103
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/jahn/projects/shadcn-theme/packages/react/dist/components/form/hook-time-input.js","../../../components/form/hook-time-input.tsx"],"names":[],"mappings":"AAAA,qLAAY;AACZ;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACE;AACA;AACA;AACF,0DAAgC;AAChC;AACA;
|
|
1
|
+
{"version":3,"sources":["/home/jahn/projects/shadcn-theme/packages/react/dist/components/form/hook-time-input.js","../../../components/form/hook-time-input.tsx"],"names":[],"mappings":"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","file":"/home/jahn/projects/shadcn-theme/packages/react/dist/components/form/hook-time-input.js","sourcesContent":[null,"\"use client\";\nimport React from 'react';\nimport _get from 'lodash-es/get';\nimport { Controller, FieldValues, Path, useFormContext } from 'react-hook-form';\nimport { cn } from '../../utils/ui';\nimport { FormError } from './error';\nimport { FormTimeInput } from './time-input';\nimport type { FormTimeInputProps } from './time-input';\nimport { getValidationRuleValue, isValidationRuleEnabled, mergeHookFormRules } from './types';\nimport type { HookFormRules, HookFormValidationAttributes } from './types';\n\ntype HookFormTimeInputValidationAttributes = Pick<\n HookFormValidationAttributes,\n 'required' | 'min' | 'max' | 'maxLength' | 'minLength'\n>;\n\ntype HookFormTimeInputProps<T extends FieldValues> = Omit<\n FormTimeInputProps,\n 'name' | 'inputProps' | keyof HookFormTimeInputValidationAttributes\n> & {\n name: Path<T>;\n rules?: HookFormRules<T>;\n error?: string;\n} & HookFormTimeInputValidationAttributes;\n\nexport function HookFormTimeInput<T extends FieldValues>({\n id,\n name,\n rules,\n label,\n error,\n classNames,\n disabled,\n required,\n min,\n max,\n maxLength,\n minLength,\n ...rest\n}: HookFormTimeInputProps<T>) {\n const methods = useFormContext<T>();\n if (!methods) return null;\n\n const {\n control,\n formState: { errors },\n } = methods;\n\n const fieldError = _get(errors, name);\n const errorMessage = error ?? (fieldError?.message as string);\n const showError = !!fieldError && !disabled;\n const mergedRules = mergeHookFormRules(rules, { required, min, max, maxLength, minLength });\n\n return (\n <div className={cn('$hook-form-time-input', classNames?.wrapper)}>\n <Controller\n name={name}\n control={control}\n rules={mergedRules}\n render={({ field: { onChange, onBlur, value } }) => (\n <FormTimeInput\n {...rest}\n name={name}\n label={label}\n value={value}\n onChange={onChange}\n onBlur={onBlur}\n disabled={disabled}\n required={isValidationRuleEnabled(mergedRules?.required)}\n min={getValidationRuleValue(mergedRules?.min)}\n max={getValidationRuleValue(mergedRules?.max)}\n maxLength={getValidationRuleValue(mergedRules?.maxLength)}\n minLength={getValidationRuleValue(mergedRules?.minLength)}\n classNames={{\n label: cn(classNames?.label, {\n 'text-danger': showError,\n }),\n input: cn(classNames?.input, {\n 'ring-danger text-danger': showError,\n }),\n }}\n />\n )}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"]}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
FormTimeInput
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import
|
|
4
|
+
} from "../../chunk-SVZMGPZC.mjs";
|
|
5
|
+
import "../../chunk-S7HB64F7.mjs";
|
|
6
|
+
import {
|
|
7
|
+
getValidationRuleValue,
|
|
8
|
+
isValidationRuleEnabled,
|
|
9
|
+
mergeHookFormRules
|
|
10
|
+
} from "../../chunk-WJKG5MUH.mjs";
|
|
11
|
+
import "../../chunk-OXUVPYJE.mjs";
|
|
7
12
|
import {
|
|
8
13
|
FormError
|
|
9
|
-
} from "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
14
|
+
} from "../../chunk-42IQSRLZ.mjs";
|
|
15
|
+
import "../../chunk-O6E6RGZT.mjs";
|
|
16
|
+
import "../../chunk-YHL7Q5J3.mjs";
|
|
12
17
|
import {
|
|
13
18
|
cn
|
|
14
|
-
} from "../../chunk-
|
|
19
|
+
} from "../../chunk-KKCJ2GMO.mjs";
|
|
15
20
|
import {
|
|
16
21
|
__objRest,
|
|
17
22
|
__spreadProps,
|
|
@@ -30,7 +35,12 @@ function HookFormTimeInput(_a) {
|
|
|
30
35
|
label,
|
|
31
36
|
error,
|
|
32
37
|
classNames,
|
|
33
|
-
disabled
|
|
38
|
+
disabled,
|
|
39
|
+
required,
|
|
40
|
+
min,
|
|
41
|
+
max,
|
|
42
|
+
maxLength,
|
|
43
|
+
minLength
|
|
34
44
|
} = _b, rest = __objRest(_b, [
|
|
35
45
|
"id",
|
|
36
46
|
"name",
|
|
@@ -38,7 +48,12 @@ function HookFormTimeInput(_a) {
|
|
|
38
48
|
"label",
|
|
39
49
|
"error",
|
|
40
50
|
"classNames",
|
|
41
|
-
"disabled"
|
|
51
|
+
"disabled",
|
|
52
|
+
"required",
|
|
53
|
+
"min",
|
|
54
|
+
"max",
|
|
55
|
+
"maxLength",
|
|
56
|
+
"minLength"
|
|
42
57
|
]);
|
|
43
58
|
const methods = useFormContext();
|
|
44
59
|
if (!methods) return null;
|
|
@@ -49,12 +64,13 @@ function HookFormTimeInput(_a) {
|
|
|
49
64
|
const fieldError = _get(errors, name);
|
|
50
65
|
const errorMessage = error != null ? error : fieldError == null ? void 0 : fieldError.message;
|
|
51
66
|
const showError = !!fieldError && !disabled;
|
|
67
|
+
const mergedRules = mergeHookFormRules(rules, { required, min, max, maxLength, minLength });
|
|
52
68
|
return /* @__PURE__ */ React.createElement("div", { className: cn("$hook-form-time-input", classNames == null ? void 0 : classNames.wrapper) }, /* @__PURE__ */ React.createElement(
|
|
53
69
|
Controller,
|
|
54
70
|
{
|
|
55
71
|
name,
|
|
56
72
|
control,
|
|
57
|
-
rules,
|
|
73
|
+
rules: mergedRules,
|
|
58
74
|
render: ({ field: { onChange, onBlur, value } }) => /* @__PURE__ */ React.createElement(
|
|
59
75
|
FormTimeInput,
|
|
60
76
|
__spreadProps(__spreadValues({}, rest), {
|
|
@@ -64,6 +80,11 @@ function HookFormTimeInput(_a) {
|
|
|
64
80
|
onChange,
|
|
65
81
|
onBlur,
|
|
66
82
|
disabled,
|
|
83
|
+
required: isValidationRuleEnabled(mergedRules == null ? void 0 : mergedRules.required),
|
|
84
|
+
min: getValidationRuleValue(mergedRules == null ? void 0 : mergedRules.min),
|
|
85
|
+
max: getValidationRuleValue(mergedRules == null ? void 0 : mergedRules.max),
|
|
86
|
+
maxLength: getValidationRuleValue(mergedRules == null ? void 0 : mergedRules.maxLength),
|
|
87
|
+
minLength: getValidationRuleValue(mergedRules == null ? void 0 : mergedRules.minLength),
|
|
67
88
|
classNames: {
|
|
68
89
|
label: cn(classNames == null ? void 0 : classNames.label, {
|
|
69
90
|
"text-danger": showError
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../components/form/hook-time-input.tsx"],"sourcesContent":["\"use client\";\nimport React from 'react';\nimport _get from 'lodash-es/get';\nimport { Controller, FieldValues,
|
|
1
|
+
{"version":3,"sources":["../../../components/form/hook-time-input.tsx"],"sourcesContent":["\"use client\";\nimport React from 'react';\nimport _get from 'lodash-es/get';\nimport { Controller, FieldValues, Path, useFormContext } from 'react-hook-form';\nimport { cn } from '../../utils/ui';\nimport { FormError } from './error';\nimport { FormTimeInput } from './time-input';\nimport type { FormTimeInputProps } from './time-input';\nimport { getValidationRuleValue, isValidationRuleEnabled, mergeHookFormRules } from './types';\nimport type { HookFormRules, HookFormValidationAttributes } from './types';\n\ntype HookFormTimeInputValidationAttributes = Pick<\n HookFormValidationAttributes,\n 'required' | 'min' | 'max' | 'maxLength' | 'minLength'\n>;\n\ntype HookFormTimeInputProps<T extends FieldValues> = Omit<\n FormTimeInputProps,\n 'name' | 'inputProps' | keyof HookFormTimeInputValidationAttributes\n> & {\n name: Path<T>;\n rules?: HookFormRules<T>;\n error?: string;\n} & HookFormTimeInputValidationAttributes;\n\nexport function HookFormTimeInput<T extends FieldValues>({\n id,\n name,\n rules,\n label,\n error,\n classNames,\n disabled,\n required,\n min,\n max,\n maxLength,\n minLength,\n ...rest\n}: HookFormTimeInputProps<T>) {\n const methods = useFormContext<T>();\n if (!methods) return null;\n\n const {\n control,\n formState: { errors },\n } = methods;\n\n const fieldError = _get(errors, name);\n const errorMessage = error ?? (fieldError?.message as string);\n const showError = !!fieldError && !disabled;\n const mergedRules = mergeHookFormRules(rules, { required, min, max, maxLength, minLength });\n\n return (\n <div className={cn('$hook-form-time-input', classNames?.wrapper)}>\n <Controller\n name={name}\n control={control}\n rules={mergedRules}\n render={({ field: { onChange, onBlur, value } }) => (\n <FormTimeInput\n {...rest}\n name={name}\n label={label}\n value={value}\n onChange={onChange}\n onBlur={onBlur}\n disabled={disabled}\n required={isValidationRuleEnabled(mergedRules?.required)}\n min={getValidationRuleValue(mergedRules?.min)}\n max={getValidationRuleValue(mergedRules?.max)}\n maxLength={getValidationRuleValue(mergedRules?.maxLength)}\n minLength={getValidationRuleValue(mergedRules?.minLength)}\n classNames={{\n label: cn(classNames?.label, {\n 'text-danger': showError,\n }),\n input: cn(classNames?.input, {\n 'ring-danger text-danger': showError,\n }),\n }}\n />\n )}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,YAA+B,sBAAsB;AAsBvD,SAAS,kBAAyC,IAc3B;AAd2B,eACvD;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EArCF,IAyByD,IAapD,iBAboD,IAapD;AAAA,IAZH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,UAAU,eAAkB;AAClC,MAAI,CAAC,QAAS,QAAO;AAErB,QAAM;AAAA,IACJ;AAAA,IACA,WAAW,EAAE,OAAO;AAAA,EACtB,IAAI;AAEJ,QAAM,aAAa,KAAK,QAAQ,IAAI;AACpC,QAAM,eAAe,wBAAU,yCAAY;AAC3C,QAAM,YAAY,CAAC,CAAC,cAAc,CAAC;AACnC,QAAM,cAAc,mBAAmB,OAAO,EAAE,UAAU,KAAK,KAAK,WAAW,UAAU,CAAC;AAE1F,SACE,oCAAC,SAAI,WAAW,GAAG,yBAAyB,yCAAY,OAAO,KAC7D;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,OAAO;AAAA,MACP,QAAQ,CAAC,EAAE,OAAO,EAAE,UAAU,QAAQ,MAAM,EAAE,MAC5C;AAAA,QAAC;AAAA,yCACK,OADL;AAAA,UAEC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,UAAU,wBAAwB,2CAAa,QAAQ;AAAA,UACvD,KAAK,uBAAuB,2CAAa,GAAG;AAAA,UAC5C,KAAK,uBAAuB,2CAAa,GAAG;AAAA,UAC5C,WAAW,uBAAuB,2CAAa,SAAS;AAAA,UACxD,WAAW,uBAAuB,2CAAa,SAAS;AAAA,UACxD,YAAY;AAAA,YACV,OAAO,GAAG,yCAAY,OAAO;AAAA,cAC3B,eAAe;AAAA,YACjB,CAAC;AAAA,YACD,OAAO,GAAG,yCAAY,OAAO;AAAA,cAC3B,2BAA2B;AAAA,YAC7B,CAAC;AAAA,UACH;AAAA;AAAA,MACF;AAAA;AAAA,EAEJ,GACC,aAAa,oCAAC,aAAU,OAAO,MAAM,WAAU,QAAO,SAAS,cAAc,CAChF;AAEJ;","names":[]}
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
8
|
-
require('../../chunk-
|
|
9
|
-
require('../../chunk-
|
|
10
|
-
require('../../chunk-
|
|
11
|
-
require('../../chunk-
|
|
12
|
-
require('../../chunk-
|
|
13
|
-
require('../../chunk-
|
|
14
|
-
require('../../chunk-
|
|
15
|
-
require('../../chunk-
|
|
16
|
-
require('../../chunk-
|
|
17
|
-
require('../../chunk-
|
|
5
|
+
var _chunkSSBVBEDIjs = require('../../chunk-SSBVBEDI.js');
|
|
6
|
+
require('../../chunk-DNOZXQ2U.js');
|
|
7
|
+
require('../../chunk-DD3MCW6L.js');
|
|
8
|
+
require('../../chunk-GOATL3D5.js');
|
|
9
|
+
require('../../chunk-AOGFHEQH.js');
|
|
10
|
+
require('../../chunk-YMBEAV7N.js');
|
|
11
|
+
require('../../chunk-CRBQL2FG.js');
|
|
12
|
+
require('../../chunk-VVU3Q7KV.js');
|
|
13
|
+
require('../../chunk-W4ZJYYQP.js');
|
|
14
|
+
require('../../chunk-IEPLSUBR.js');
|
|
15
|
+
require('../../chunk-5CUM73VT.js');
|
|
16
|
+
require('../../chunk-OZAVO5UA.js');
|
|
17
|
+
require('../../chunk-NBQEF4JD.js');
|
|
18
18
|
require('../../chunk-2NMEKWO5.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
exports.FormMultiSelect =
|
|
21
|
+
exports.FormMultiSelect = _chunkSSBVBEDIjs.FormMultiSelect;
|
|
22
22
|
//# sourceMappingURL=multi-select.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
FormMultiSelect
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-3R2OBHS6.mjs";
|
|
5
|
+
import "../../chunk-L7EN73HA.mjs";
|
|
6
|
+
import "../../chunk-VQWCEF3I.mjs";
|
|
7
|
+
import "../../chunk-XH7WQWOD.mjs";
|
|
8
|
+
import "../../chunk-CFG4GTRV.mjs";
|
|
9
|
+
import "../../chunk-CHV7CG5L.mjs";
|
|
10
|
+
import "../../chunk-OXUVPYJE.mjs";
|
|
11
|
+
import "../../chunk-ZLGQUL4Y.mjs";
|
|
12
|
+
import "../../chunk-N3WWOWZ4.mjs";
|
|
13
|
+
import "../../chunk-S2LLOGBR.mjs";
|
|
14
|
+
import "../../chunk-ZJRJN2UJ.mjs";
|
|
15
|
+
import "../../chunk-YHL7Q5J3.mjs";
|
|
16
|
+
import "../../chunk-KKCJ2GMO.mjs";
|
|
17
17
|
import "../../chunk-YOSPWY5K.mjs";
|
|
18
18
|
export {
|
|
19
19
|
FormMultiSelect
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
5
|
+
var _chunkVHXALM6Ojs = require('../../chunk-VHXALM6O.js');
|
|
6
|
+
require('../../chunk-OZAVO5UA.js');
|
|
7
|
+
require('../../chunk-NBQEF4JD.js');
|
|
8
8
|
require('../../chunk-2NMEKWO5.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.FormNativeSelect =
|
|
11
|
+
exports.FormNativeSelect = _chunkVHXALM6Ojs.FormNativeSelect;
|
|
12
12
|
//# sourceMappingURL=native-select.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
FormNativeSelect
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-NQQR2NDC.mjs";
|
|
5
|
+
import "../../chunk-YHL7Q5J3.mjs";
|
|
6
|
+
import "../../chunk-KKCJ2GMO.mjs";
|
|
7
7
|
import "../../chunk-YOSPWY5K.mjs";
|
|
8
8
|
export {
|
|
9
9
|
FormNativeSelect
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
8
|
-
require('../../chunk-
|
|
9
|
-
require('../../chunk-
|
|
10
|
-
require('../../chunk-
|
|
11
|
-
require('../../chunk-
|
|
12
|
-
require('../../chunk-
|
|
13
|
-
require('../../chunk-
|
|
14
|
-
require('../../chunk-
|
|
15
|
-
require('../../chunk-
|
|
5
|
+
var _chunkX3FLPO26js = require('../../chunk-X3FLPO26.js');
|
|
6
|
+
require('../../chunk-DD3MCW6L.js');
|
|
7
|
+
require('../../chunk-GOATL3D5.js');
|
|
8
|
+
require('../../chunk-AOGFHEQH.js');
|
|
9
|
+
require('../../chunk-YMBEAV7N.js');
|
|
10
|
+
require('../../chunk-CRBQL2FG.js');
|
|
11
|
+
require('../../chunk-W4ZJYYQP.js');
|
|
12
|
+
require('../../chunk-IEPLSUBR.js');
|
|
13
|
+
require('../../chunk-5CUM73VT.js');
|
|
14
|
+
require('../../chunk-OZAVO5UA.js');
|
|
15
|
+
require('../../chunk-NBQEF4JD.js');
|
|
16
16
|
require('../../chunk-2NMEKWO5.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
exports.FormSearchableSelect =
|
|
19
|
+
exports.FormSearchableSelect = _chunkX3FLPO26js.FormSearchableSelect;
|
|
20
20
|
//# sourceMappingURL=searchable-select.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
FormSearchableSelect
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-BKUEN3CP.mjs";
|
|
5
|
+
import "../../chunk-VQWCEF3I.mjs";
|
|
6
|
+
import "../../chunk-XH7WQWOD.mjs";
|
|
7
|
+
import "../../chunk-CFG4GTRV.mjs";
|
|
8
|
+
import "../../chunk-CHV7CG5L.mjs";
|
|
9
|
+
import "../../chunk-OXUVPYJE.mjs";
|
|
10
|
+
import "../../chunk-N3WWOWZ4.mjs";
|
|
11
|
+
import "../../chunk-S2LLOGBR.mjs";
|
|
12
|
+
import "../../chunk-ZJRJN2UJ.mjs";
|
|
13
|
+
import "../../chunk-YHL7Q5J3.mjs";
|
|
14
|
+
import "../../chunk-KKCJ2GMO.mjs";
|
|
15
15
|
import "../../chunk-YOSPWY5K.mjs";
|
|
16
16
|
export {
|
|
17
17
|
FormSearchableSelect
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
8
|
-
require('../../chunk-
|
|
5
|
+
var _chunkAIZ3XYAIjs = require('../../chunk-AIZ3XYAI.js');
|
|
6
|
+
require('../../chunk-UHYOQN4B.js');
|
|
7
|
+
require('../../chunk-OZAVO5UA.js');
|
|
8
|
+
require('../../chunk-NBQEF4JD.js');
|
|
9
9
|
require('../../chunk-2NMEKWO5.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.FormSelect =
|
|
12
|
+
exports.FormSelect = _chunkAIZ3XYAIjs.FormSelect;
|
|
13
13
|
//# sourceMappingURL=select.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
FormSelect
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-6M7NWFTI.mjs";
|
|
5
|
+
import "../../chunk-3YFVUGSK.mjs";
|
|
6
|
+
import "../../chunk-YHL7Q5J3.mjs";
|
|
7
|
+
import "../../chunk-KKCJ2GMO.mjs";
|
|
8
8
|
import "../../chunk-YOSPWY5K.mjs";
|
|
9
9
|
export {
|
|
10
10
|
FormSelect
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
8
|
-
require('../../chunk-
|
|
9
|
-
require('../../chunk-
|
|
5
|
+
var _chunkTGQA25KRjs = require('../../chunk-TGQA25KR.js');
|
|
6
|
+
require('../../chunk-AH57ACVP.js');
|
|
7
|
+
require('../../chunk-VVU3Q7KV.js');
|
|
8
|
+
require('../../chunk-OZAVO5UA.js');
|
|
9
|
+
require('../../chunk-NBQEF4JD.js');
|
|
10
10
|
require('../../chunk-2NMEKWO5.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.FormTagPicker =
|
|
13
|
+
exports.FormTagPicker = _chunkTGQA25KRjs.FormTagPicker;
|
|
14
14
|
//# sourceMappingURL=tag-picker.js.map
|