@customafk/lunas-ui 0.0.80 → 0.0.82
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/dist/{add-new-DfniMrHa.js → add-new-BFJvt2an.js} +2 -2
- package/dist/add-new-BFJvt2an.js.map +1 -0
- package/dist/add-new-Bt5QaeJs.cjs +2 -0
- package/dist/add-new-Bt5QaeJs.cjs.map +1 -0
- package/dist/alert-dialog-B-m2RVMu.cjs +2 -0
- package/dist/alert-dialog-B-m2RVMu.cjs.map +1 -0
- package/dist/{alert-dialog-UwGNuTYk.js → alert-dialog-DcQKEgVC.js} +1 -1
- package/dist/alert-dialog-DcQKEgVC.js.map +1 -0
- package/dist/avatar-DmMCBvb6.cjs +2 -0
- package/dist/avatar-DmMCBvb6.cjs.map +1 -0
- package/dist/avatar-iX5Jhj8E.js.map +1 -1
- package/dist/badge-AM9m3CFI.cjs +2 -0
- package/dist/badge-AM9m3CFI.cjs.map +1 -0
- package/dist/badge-tjlLdDGl.js.map +1 -1
- package/dist/button-BaLuKPtr.cjs +2 -0
- package/dist/button-BaLuKPtr.cjs.map +1 -0
- package/dist/{button-DhQJ9Ey8.js → button-CYsnwc1-.js} +2 -2
- package/dist/button-CYsnwc1-.js.map +1 -0
- package/dist/{button-CGIJb6H5.d.cts → button-D6hzitQh.d.cts} +6 -6
- package/dist/{button-BdYhnlA1.d.ts → button-DKcU4dim.d.ts} +6 -6
- package/dist/button-variants-DdVxfrSx.cjs +2 -0
- package/dist/button-variants-DdVxfrSx.cjs.map +1 -0
- package/dist/button-variants-Y1GTBayz.js.map +1 -1
- package/dist/calendar-C4zLgISS.cjs +2 -0
- package/dist/calendar-C4zLgISS.cjs.map +1 -0
- package/dist/{calendar-C2yGJ9AV.js → calendar-Dmq8I1ey.js} +2 -2
- package/dist/calendar-Dmq8I1ey.js.map +1 -0
- package/dist/card-CkKO-0o0.cjs +2 -0
- package/dist/card-CkKO-0o0.cjs.map +1 -0
- package/dist/card-DOv2mZU8.js.map +1 -1
- package/dist/cards/grid-product-card.cjs +1 -1
- package/dist/cards/grid-product-card.cjs.map +1 -1
- package/dist/cards/grid-product-card.js +1 -1
- package/dist/cards/grid-product-card.js.map +1 -1
- package/dist/cards/product-card.cjs +1 -1
- package/dist/cards/product-card.cjs.map +1 -1
- package/dist/cards/product-card.js +1 -1
- package/dist/cards/product-card.js.map +1 -1
- package/dist/cards/simple-card.cjs +1 -1
- package/dist/cards/simple-card.cjs.map +1 -1
- package/dist/cards/simple-card.js.map +1 -1
- package/dist/{command-BWvqtwPS.d.cts → command-BCHEIInv.d.cts} +12 -12
- package/dist/command-C13pL2M3.cjs +2 -0
- package/dist/command-C13pL2M3.cjs.map +1 -0
- package/dist/{command-B23xCgK_.d.ts → command-KnD1dAzj.d.ts} +12 -12
- package/dist/{command-DhSE6UaR.js → command-UXLmHGja.js} +2 -2
- package/dist/command-UXLmHGja.js.map +1 -0
- package/dist/data-display/country.cjs +1 -1
- package/dist/data-display/country.cjs.map +1 -1
- package/dist/data-display/country.d.ts +1 -1
- package/dist/data-display/country.js.map +1 -1
- package/dist/data-display/data-list.cjs +1 -1
- package/dist/data-display/data-list.cjs.map +1 -1
- package/dist/data-display/data-list.js.map +1 -1
- package/dist/data-display/date-tooltip.cjs +1 -1
- package/dist/data-display/date-tooltip.cjs.map +1 -1
- package/dist/data-display/date-tooltip.js +1 -1
- package/dist/data-display/date-tooltip.js.map +1 -1
- package/dist/data-display/date.cjs +1 -1
- package/dist/data-display/date.js +1 -1
- package/dist/data-display/empty.cjs +1 -1
- package/dist/data-display/empty.cjs.map +1 -1
- package/dist/data-display/empty.d.cts +2 -2
- package/dist/data-display/empty.js.map +1 -1
- package/dist/data-display/name.cjs +1 -1
- package/dist/data-display/name.cjs.map +1 -1
- package/dist/data-display/name.js.map +1 -1
- package/dist/data-display/phone-number.cjs +1 -1
- package/dist/data-display/phone-number.cjs.map +1 -1
- package/dist/data-display/phone-number.js.map +1 -1
- package/dist/data-display/role-badge.cjs +1 -1
- package/dist/data-display/role-badge.cjs.map +1 -1
- package/dist/data-display/role-badge.d.ts +1 -1
- package/dist/data-display/role-badge.js.map +1 -1
- package/dist/data-display/statistic.cjs +1 -1
- package/dist/data-display/statistic.cjs.map +1 -1
- package/dist/data-display/statistic.d.ts +2 -2
- package/dist/data-display/statistic.js +1 -1
- package/dist/data-display/statistic.js.map +1 -1
- package/dist/data-display/user.cjs +1 -1
- package/dist/data-display/user.cjs.map +1 -1
- package/dist/data-display/user.js.map +1 -1
- package/dist/date-BEyT-xKi.cjs +2 -0
- package/dist/date-BEyT-xKi.cjs.map +1 -0
- package/dist/{date-BuPl--Fc.js → date-CgzMwDPN.js} +2 -2
- package/dist/date-CgzMwDPN.js.map +1 -0
- package/dist/{dialog-B2LS2JLb.js → dialog-BAlJ18xi.js} +1 -1
- package/dist/dialog-BAlJ18xi.js.map +1 -0
- package/dist/dialog-BBODhbxh.cjs +2 -0
- package/dist/dialog-BBODhbxh.cjs.map +1 -0
- package/dist/{dialog-Dn2Q-QRw.d.ts → dialog-MCM90IpD.d.cts} +12 -12
- package/dist/{dialog-BFtz_6mv.d.cts → dialog-lKVaxcfs.d.ts} +12 -12
- package/dist/dialogs/confirm-dialog.cjs +1 -1
- package/dist/dialogs/confirm-dialog.cjs.map +1 -1
- package/dist/dialogs/confirm-dialog.js +1 -1
- package/dist/dialogs/confirm-dialog.js.map +1 -1
- package/dist/dialogs/detail-dialog/component/sidebar.cjs +1 -1
- package/dist/dialogs/detail-dialog/component/sidebar.d.cts +30 -30
- package/dist/dialogs/detail-dialog/component/sidebar.d.ts +30 -30
- package/dist/dialogs/detail-dialog/component/sidebar.js +1 -1
- package/dist/dialogs/detail-dialog/index.cjs +1 -1
- package/dist/dialogs/detail-dialog/index.cjs.map +1 -1
- package/dist/dialogs/detail-dialog/index.js +1 -1
- package/dist/dialogs/detail-dialog/index.js.map +1 -1
- package/dist/dialogs/error-dialog.cjs +1 -1
- package/dist/dialogs/error-dialog.js +1 -1
- package/dist/dialogs/form-dialog.cjs +1 -1
- package/dist/dialogs/form-dialog.cjs.map +1 -1
- package/dist/dialogs/form-dialog.d.cts +2 -2
- package/dist/dialogs/form-dialog.d.ts +2 -2
- package/dist/dialogs/form-dialog.js +1 -1
- package/dist/dialogs/form-dialog.js.map +1 -1
- package/dist/dialogs/loading-dialog.cjs +1 -1
- package/dist/dialogs/loading-dialog.cjs.map +1 -1
- package/dist/dialogs/loading-dialog.js +1 -1
- package/dist/dialogs/loading-dialog.js.map +1 -1
- package/dist/{dist-CkzytVha.js → dist-BgkALM7U.js} +2 -2
- package/dist/{dist-CkzytVha.js.map → dist-BgkALM7U.js.map} +1 -1
- package/dist/dist-CAevLI5t.cjs +2 -0
- package/dist/{dist-D0uO1qIz.cjs.map → dist-CAevLI5t.cjs.map} +1 -1
- package/dist/drawer-70cz3SPB.cjs +2 -0
- package/dist/drawer-70cz3SPB.cjs.map +1 -0
- package/dist/{drawer-COD1n5aA.js → drawer-DRC3X2-U.js} +1 -1
- package/dist/drawer-DRC3X2-U.js.map +1 -0
- package/dist/dropdown-menu-Bb68Wd6J.cjs +2 -0
- package/dist/dropdown-menu-Bb68Wd6J.cjs.map +1 -0
- package/dist/{dropdown-menu-Brlye320.js → dropdown-menu-DtEPAmMV.js} +1 -1
- package/dist/dropdown-menu-DtEPAmMV.js.map +1 -0
- package/dist/{error-dialog-BF1VNZXk.js → error-dialog-BeYJOtSH.js} +2 -2
- package/dist/error-dialog-BeYJOtSH.js.map +1 -0
- package/dist/error-dialog-bra3vccX.cjs +2 -0
- package/dist/error-dialog-bra3vccX.cjs.map +1 -0
- package/dist/field-A43YZ5Wj.cjs +2 -0
- package/dist/field-A43YZ5Wj.cjs.map +1 -0
- package/dist/field-CGacT8J3.js +2 -0
- package/dist/field-CGacT8J3.js.map +1 -0
- package/dist/flex-B4klVEz9.cjs +2 -0
- package/dist/flex-B4klVEz9.cjs.map +1 -0
- package/dist/flex-D6XrXRQW.js.map +1 -1
- package/dist/form-B_tL9lO4.js +2 -0
- package/dist/form-B_tL9lO4.js.map +1 -0
- package/dist/form-DV9tQbiO.cjs +2 -0
- package/dist/form-DV9tQbiO.cjs.map +1 -0
- package/dist/form-wrapper-BKTvSrZY.js +2 -0
- package/dist/form-wrapper-BKTvSrZY.js.map +1 -0
- package/dist/form-wrapper-vue82rfg.cjs +2 -0
- package/dist/form-wrapper-vue82rfg.cjs.map +1 -0
- package/dist/forms/combobox-field.cjs +1 -1
- package/dist/forms/combobox-field.cjs.map +1 -1
- package/dist/forms/combobox-field.d.cts +2 -2
- package/dist/forms/combobox-field.d.ts +2 -2
- package/dist/forms/combobox-field.js +1 -1
- package/dist/forms/combobox-field.js.map +1 -1
- package/dist/forms/date-field.cjs +1 -1
- package/dist/forms/date-field.cjs.map +1 -1
- package/dist/forms/date-field.d.cts +2 -2
- package/dist/forms/date-field.d.ts +2 -2
- package/dist/forms/date-field.js +1 -1
- package/dist/forms/date-field.js.map +1 -1
- package/dist/forms/form-wrapper.cjs +1 -1
- package/dist/forms/form-wrapper.d.cts +6 -2
- package/dist/forms/form-wrapper.d.ts +6 -2
- package/dist/forms/form-wrapper.js +1 -1
- package/dist/forms/multi-select-field.cjs +1 -1
- package/dist/forms/multi-select-field.cjs.map +1 -1
- package/dist/forms/multi-select-field.d.cts +4 -2
- package/dist/forms/multi-select-field.d.ts +4 -2
- package/dist/forms/multi-select-field.js +1 -1
- package/dist/forms/multi-select-field.js.map +1 -1
- package/dist/forms/number-field.cjs +1 -1
- package/dist/forms/number-field.cjs.map +1 -1
- package/dist/forms/number-field.d.cts +2 -2
- package/dist/forms/number-field.d.ts +2 -2
- package/dist/forms/number-field.js +1 -1
- package/dist/forms/number-field.js.map +1 -1
- package/dist/forms/password-field.cjs +1 -1
- package/dist/forms/password-field.cjs.map +1 -1
- package/dist/forms/password-field.d.cts +2 -2
- package/dist/forms/password-field.d.ts +2 -2
- package/dist/forms/password-field.js +1 -1
- package/dist/forms/password-field.js.map +1 -1
- package/dist/forms/select-field.cjs +1 -1
- package/dist/forms/select-field.cjs.map +1 -1
- package/dist/forms/select-field.d.cts +2 -2
- package/dist/forms/select-field.d.ts +2 -2
- package/dist/forms/select-field.js +1 -1
- package/dist/forms/select-field.js.map +1 -1
- package/dist/forms/switch-field.cjs +1 -1
- package/dist/forms/switch-field.cjs.map +1 -1
- package/dist/forms/switch-field.d.cts +4 -2
- package/dist/forms/switch-field.d.ts +4 -2
- package/dist/forms/switch-field.js +1 -1
- package/dist/forms/switch-field.js.map +1 -1
- package/dist/forms/text-field.cjs +1 -1
- package/dist/forms/text-field.cjs.map +1 -1
- package/dist/forms/text-field.d.cts +2 -2
- package/dist/forms/text-field.d.ts +2 -2
- package/dist/forms/text-field.js +1 -1
- package/dist/forms/text-field.js.map +1 -1
- package/dist/forms/textarea-field.cjs +1 -1
- package/dist/forms/textarea-field.cjs.map +1 -1
- package/dist/forms/textarea-field.d.cts +2 -2
- package/dist/forms/textarea-field.d.ts +2 -2
- package/dist/forms/textarea-field.js +1 -1
- package/dist/forms/textarea-field.js.map +1 -1
- package/dist/image-C0mClPAY.cjs +2 -0
- package/dist/image-C0mClPAY.cjs.map +1 -0
- package/dist/image-CiQhTTyt.js.map +1 -1
- package/dist/{input-BtT8HfYE.js → input-BStypTnq.js} +1 -1
- package/dist/input-BStypTnq.js.map +1 -0
- package/dist/{input-CwuYXUPY.d.ts → input-BbxBfHG5.d.ts} +3 -3
- package/dist/input-D_tClptL.cjs +2 -0
- package/dist/input-D_tClptL.cjs.map +1 -0
- package/dist/{input-Kq2bOgsM.d.cts → input-EieQSty7.d.cts} +3 -3
- package/dist/label-Bfd7VFEe.d.cts +11 -0
- package/dist/label-CdrxlBJ8.js.map +1 -1
- package/dist/label-D6mAvVmw.cjs +2 -0
- package/dist/label-D6mAvVmw.cjs.map +1 -0
- package/dist/label-DlBHUp00.d.ts +11 -0
- package/dist/layouts/app-layout/index.cjs +1 -1
- package/dist/layouts/app-layout/index.cjs.map +1 -1
- package/dist/layouts/app-layout/index.d.cts +28 -28
- package/dist/layouts/app-layout/index.d.ts +28 -28
- package/dist/layouts/app-layout/index.js +1 -1
- package/dist/layouts/app-layout/index.js.map +1 -1
- package/dist/layouts/flex.cjs +1 -1
- package/dist/layouts/flex.d.cts +2 -2
- package/dist/layouts/grid.cjs +1 -1
- package/dist/layouts/grid.cjs.map +1 -1
- package/dist/layouts/grid.js.map +1 -1
- package/dist/layouts/service-layout/index.cjs +1 -1
- package/dist/layouts/service-layout/index.cjs.map +1 -1
- package/dist/layouts/service-layout/index.d.cts +15 -15
- package/dist/layouts/service-layout/index.d.ts +15 -15
- package/dist/layouts/service-layout/index.js +1 -1
- package/dist/layouts/service-layout/index.js.map +1 -1
- package/dist/multi-select-C66U77ON.js +2 -0
- package/dist/multi-select-C66U77ON.js.map +1 -0
- package/dist/multi-select-D38JwSYL.cjs +2 -0
- package/dist/multi-select-D38JwSYL.cjs.map +1 -0
- package/dist/paragraph-B9fp9JaI.js.map +1 -1
- package/dist/paragraph-Q7vk3BSp.cjs +2 -0
- package/dist/paragraph-Q7vk3BSp.cjs.map +1 -0
- package/dist/{popover-BJWOgxQ5.js → popover-BnzoeyDG.js} +1 -1
- package/dist/popover-BnzoeyDG.js.map +1 -0
- package/dist/popover-D6vyPDKA.cjs +2 -0
- package/dist/popover-D6vyPDKA.cjs.map +1 -0
- package/dist/progress-BUlcGaLz.cjs +2 -0
- package/dist/progress-BUlcGaLz.cjs.map +1 -0
- package/dist/{progress-DzBPViJg.js → progress-DwLEMPaO.js} +1 -1
- package/dist/progress-DwLEMPaO.js.map +1 -0
- package/dist/{refresh-BiOPtbhd.js → refresh-CMQ49ae4.js} +2 -2
- package/dist/refresh-CMQ49ae4.js.map +1 -0
- package/dist/refresh-CvvD6Ckf.cjs +2 -0
- package/dist/refresh-CvvD6Ckf.cjs.map +1 -0
- package/dist/scroll-area-C_MkdpKg.cjs +2 -0
- package/dist/scroll-area-C_MkdpKg.cjs.map +1 -0
- package/dist/{scroll-area-BJYI14s5.js → scroll-area-DFENklE1.js} +1 -1
- package/dist/scroll-area-DFENklE1.js.map +1 -0
- package/dist/{search-input--FQFzdW3.js → search-input-BI1RjMuQ.js} +2 -2
- package/dist/search-input-BI1RjMuQ.js.map +1 -0
- package/dist/search-input-ryU0Mvaa.cjs +2 -0
- package/dist/search-input-ryU0Mvaa.cjs.map +1 -0
- package/dist/{select-Di8fOKVF.js → select-B8sXsuUI.js} +1 -1
- package/dist/select-B8sXsuUI.js.map +1 -0
- package/dist/select-BD7dul2u.cjs +2 -0
- package/dist/select-BD7dul2u.cjs.map +1 -0
- package/dist/{separator-mZ8r56s2.d.cts → separator-BBWO-2XW.d.cts} +3 -3
- package/dist/{separator-C7HQ2ThL.js → separator-D17HxS2f.js} +1 -1
- package/dist/separator-D17HxS2f.js.map +1 -0
- package/dist/separator-DMMoR-d2.cjs +2 -0
- package/dist/separator-DMMoR-d2.cjs.map +1 -0
- package/dist/{separator-C4wU5Rr6.d.ts → separator-LYCmJYd5.d.ts} +3 -3
- package/dist/{sheet-E0gvN9Gp.js → sheet-BhyEuJtA.js} +1 -1
- package/dist/sheet-BhyEuJtA.js.map +1 -0
- package/dist/sheet-Bua5MlcG.cjs +2 -0
- package/dist/sheet-Bua5MlcG.cjs.map +1 -0
- package/dist/sidebar-BgMpq73J.cjs +2 -0
- package/dist/sidebar-BgMpq73J.cjs.map +1 -0
- package/dist/{sidebar-CBEPWmnf.js → sidebar-Bs42CUTZ.js} +2 -2
- package/dist/sidebar-Bs42CUTZ.js.map +1 -0
- package/dist/skeleton-BC2E_ohw.cjs +2 -0
- package/dist/skeleton-BC2E_ohw.cjs.map +1 -0
- package/dist/skeleton-ByN-MrQO.js.map +1 -1
- package/dist/{switch-C7foFKpS.js → switch-DwBg-iL4.js} +1 -1
- package/dist/switch-DwBg-iL4.js.map +1 -0
- package/dist/switch-o_YbWKw4.cjs +2 -0
- package/dist/switch-o_YbWKw4.cjs.map +1 -0
- package/dist/systems/google.cjs +1 -1
- package/dist/systems/google.cjs.map +1 -1
- package/dist/systems/google.js +1 -1
- package/dist/systems/google.js.map +1 -1
- package/dist/table/index.cjs +1 -1
- package/dist/table/index.cjs.map +1 -1
- package/dist/table/index.d.cts +2 -2
- package/dist/table/index.d.ts +2 -2
- package/dist/table/index.js +1 -1
- package/dist/table/index.js.map +1 -1
- package/dist/{table-CKNAm27W.js → table-Cd75vfQ4.js} +1 -1
- package/dist/table-Cd75vfQ4.js.map +1 -0
- package/dist/table-fp-VtGFA.cjs +2 -0
- package/dist/table-fp-VtGFA.cjs.map +1 -0
- package/dist/{tabs-D4uObFGW.js → tabs-BVCzl3vY.js} +1 -1
- package/dist/tabs-BVCzl3vY.js.map +1 -0
- package/dist/tabs-D7oadnxg.cjs +2 -0
- package/dist/tabs-D7oadnxg.cjs.map +1 -0
- package/dist/textarea-BHME8i5L.cjs +2 -0
- package/dist/textarea-BHME8i5L.cjs.map +1 -0
- package/dist/{textarea-n8OO0QsI.js → textarea-TGDtYde1.js} +1 -1
- package/dist/textarea-TGDtYde1.js.map +1 -0
- package/dist/title-Wrzpw9RM.cjs +2 -0
- package/dist/title-Wrzpw9RM.cjs.map +1 -0
- package/dist/{title-itXqz0us.js → title-Zqs6skyV.js} +1 -1
- package/dist/title-Zqs6skyV.js.map +1 -0
- package/dist/{toggle-DuNq0es1.js → toggle-AOoz4VtN.js} +1 -1
- package/dist/toggle-AOoz4VtN.js.map +1 -0
- package/dist/{toggle-DYeyKWVE.d.cts → toggle-Bhwgx-y_.d.cts} +5 -5
- package/dist/toggle-D252Z_vH.cjs +2 -0
- package/dist/toggle-D252Z_vH.cjs.map +1 -0
- package/dist/{toggle-DPTA8XO2.d.ts → toggle-DaTd0CKm.d.ts} +5 -5
- package/dist/{tooltip-DijjzZk1.d.cts → tooltip-B3mrjes6.d.cts} +6 -6
- package/dist/tooltip-BTrjCwd8.js.map +1 -1
- package/dist/{tooltip-Dt83PTkc.d.ts → tooltip-IMUjBDRr.d.ts} +6 -6
- package/dist/tooltip-uaF-pxx8.cjs +2 -0
- package/dist/tooltip-uaF-pxx8.cjs.map +1 -0
- package/dist/{types-BHVCAwAo.d.ts → types-BcE2RjTJ.d.ts} +1 -1
- package/dist/types-BiiGENwa.js.map +1 -1
- package/dist/types-D32qXHff.cjs.map +1 -1
- package/dist/typography/paragraph.cjs +1 -1
- package/dist/typography/paragraph.d.cts +2 -2
- package/dist/typography/paragraph.d.ts +2 -2
- package/dist/typography/title.cjs +1 -1
- package/dist/typography/title.d.cts +2 -2
- package/dist/typography/title.d.ts +2 -2
- package/dist/typography/title.js +1 -1
- package/dist/ui/alert-dialog.cjs +1 -1
- package/dist/ui/alert-dialog.d.cts +12 -12
- package/dist/ui/alert-dialog.d.ts +12 -12
- package/dist/ui/alert-dialog.js +1 -1
- package/dist/ui/alert.cjs +1 -1
- package/dist/ui/alert.cjs.map +1 -1
- package/dist/ui/alert.d.cts +6 -6
- package/dist/ui/alert.d.ts +6 -6
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/aspect-ratio.cjs +1 -1
- package/dist/ui/aspect-ratio.cjs.map +1 -1
- package/dist/ui/aspect-ratio.d.cts +2 -2
- package/dist/ui/aspect-ratio.d.ts +2 -2
- package/dist/ui/aspect-ratio.js.map +1 -1
- package/dist/ui/avatar.cjs +1 -1
- package/dist/ui/avatar.d.cts +4 -4
- package/dist/ui/avatar.d.ts +4 -4
- package/dist/ui/badge.cjs +1 -1
- package/dist/ui/badge.d.cts +2 -2
- package/dist/ui/badge.d.ts +4 -4
- package/dist/ui/breadcrumb.cjs +1 -1
- package/dist/ui/breadcrumb.cjs.map +1 -1
- package/dist/ui/breadcrumb.d.cts +8 -8
- package/dist/ui/breadcrumb.d.ts +8 -8
- package/dist/ui/breadcrumb.js +1 -1
- package/dist/ui/breadcrumb.js.map +1 -1
- package/dist/ui/button-group.cjs +2 -0
- package/dist/ui/button-group.cjs.map +1 -0
- package/dist/ui/button-group.d.cts +29 -0
- package/dist/ui/button-group.d.ts +29 -0
- package/dist/ui/button-group.js +2 -0
- package/dist/ui/button-group.js.map +1 -0
- package/dist/ui/button.cjs +1 -1
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/button.js +1 -1
- package/dist/ui/buttons/add-new.cjs +1 -1
- package/dist/ui/buttons/add-new.js +1 -1
- package/dist/ui/buttons/edit.cjs +1 -1
- package/dist/ui/buttons/edit.cjs.map +1 -1
- package/dist/ui/buttons/edit.js +1 -1
- package/dist/ui/buttons/edit.js.map +1 -1
- package/dist/ui/buttons/refresh.cjs +1 -1
- package/dist/ui/buttons/refresh.js +1 -1
- package/dist/ui/buttons/trash.cjs +1 -1
- package/dist/ui/buttons/trash.cjs.map +1 -1
- package/dist/ui/buttons/trash.js +1 -1
- package/dist/ui/buttons/trash.js.map +1 -1
- package/dist/ui/buttons/upload-image.cjs +1 -1
- package/dist/ui/buttons/upload-image.cjs.map +1 -1
- package/dist/ui/buttons/upload-image.js +1 -1
- package/dist/ui/buttons/upload-image.js.map +1 -1
- package/dist/ui/calendar.cjs +1 -1
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/calendar.d.ts +4 -4
- package/dist/ui/calendar.js +1 -1
- package/dist/ui/card.cjs +1 -1
- package/dist/ui/card.d.cts +8 -8
- package/dist/ui/card.d.ts +8 -8
- package/dist/ui/carousel.cjs +1 -1
- package/dist/ui/carousel.cjs.map +1 -1
- package/dist/ui/carousel.d.cts +7 -7
- package/dist/ui/carousel.d.ts +7 -7
- package/dist/ui/carousel.js +1 -1
- package/dist/ui/carousel.js.map +1 -1
- package/dist/ui/collapsible.cjs +1 -1
- package/dist/ui/collapsible.cjs.map +1 -1
- package/dist/ui/collapsible.d.cts +4 -4
- package/dist/ui/collapsible.d.ts +4 -4
- package/dist/ui/collapsible.js.map +1 -1
- package/dist/ui/command.cjs +1 -1
- package/dist/ui/command.d.cts +2 -2
- package/dist/ui/command.d.ts +2 -2
- package/dist/ui/command.js +1 -1
- package/dist/ui/context-menu.cjs +1 -1
- package/dist/ui/context-menu.cjs.map +1 -1
- package/dist/ui/context-menu.d.cts +16 -16
- package/dist/ui/context-menu.d.ts +16 -16
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/dialog.cjs +1 -1
- package/dist/ui/dialog.d.cts +1 -1
- package/dist/ui/dialog.d.ts +1 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/dropdown-menu.cjs +1 -1
- package/dist/ui/dropdown-menu.d.cts +16 -16
- package/dist/ui/dropdown-menu.d.ts +16 -16
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/empty.cjs +2 -0
- package/dist/ui/empty.cjs.map +1 -0
- package/dist/ui/empty.d.cts +36 -0
- package/dist/ui/empty.d.ts +36 -0
- package/dist/ui/empty.js +2 -0
- package/dist/ui/empty.js.map +1 -0
- package/dist/ui/field.cjs +1 -0
- package/dist/ui/field.d.cts +65 -0
- package/dist/ui/field.d.ts +65 -0
- package/dist/ui/field.js +1 -0
- package/dist/ui/file-uploader.cjs +1 -1
- package/dist/ui/file-uploader.cjs.map +1 -1
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/file-uploader.d.ts +2 -2
- package/dist/ui/file-uploader.js +1 -1
- package/dist/ui/file-uploader.js.map +1 -1
- package/dist/ui/form.cjs +1 -1
- package/dist/ui/form.d.cts +7 -8
- package/dist/ui/form.d.ts +7 -8
- package/dist/ui/form.js +1 -1
- package/dist/ui/hover-card.cjs +1 -1
- package/dist/ui/hover-card.cjs.map +1 -1
- package/dist/ui/hover-card.d.cts +4 -4
- package/dist/ui/hover-card.d.ts +4 -4
- package/dist/ui/hover-card.js.map +1 -1
- package/dist/ui/image.cjs +1 -1
- package/dist/ui/input-otp.cjs +1 -1
- package/dist/ui/input-otp.cjs.map +1 -1
- package/dist/ui/input-otp.d.cts +5 -5
- package/dist/ui/input-otp.d.ts +5 -5
- package/dist/ui/input-otp.js +1 -1
- package/dist/ui/input-otp.js.map +1 -1
- package/dist/ui/input.cjs +1 -1
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.ts +1 -1
- package/dist/ui/input.js +1 -1
- package/dist/ui/inputs/search-input.cjs +1 -1
- package/dist/ui/inputs/search-input.d.cts +3 -3
- package/dist/ui/inputs/search-input.d.ts +3 -3
- package/dist/ui/inputs/search-input.js +1 -1
- package/dist/ui/item.cjs +2 -0
- package/dist/ui/item.cjs.map +1 -0
- package/dist/ui/item.d.cts +62 -0
- package/dist/ui/item.d.ts +62 -0
- package/dist/ui/item.js +2 -0
- package/dist/ui/item.js.map +1 -0
- package/dist/ui/label.cjs +1 -1
- package/dist/ui/label.d.cts +2 -11
- package/dist/ui/label.d.ts +2 -11
- package/dist/ui/menubar.cjs +1 -1
- package/dist/ui/menubar.cjs.map +1 -1
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/menubar.d.ts +17 -17
- package/dist/ui/menubar.js.map +1 -1
- package/dist/ui/multi-select.cjs +1 -1
- package/dist/ui/multi-select.d.cts +2 -2
- package/dist/ui/multi-select.d.ts +2 -2
- package/dist/ui/multi-select.js +1 -1
- package/dist/ui/navigation-menu.cjs +1 -1
- package/dist/ui/navigation-menu.cjs.map +1 -1
- package/dist/ui/navigation-menu.d.cts +11 -11
- package/dist/ui/navigation-menu.d.ts +11 -11
- package/dist/ui/navigation-menu.js.map +1 -1
- package/dist/ui/pagination.cjs +1 -1
- package/dist/ui/pagination.cjs.map +1 -1
- package/dist/ui/pagination.d.cts +9 -9
- package/dist/ui/pagination.d.ts +9 -9
- package/dist/ui/pagination.js +1 -1
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/popover.cjs +1 -1
- package/dist/ui/popover.d.cts +5 -5
- package/dist/ui/popover.d.ts +5 -5
- package/dist/ui/popover.js +1 -1
- package/dist/ui/progress.cjs +1 -1
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/progress.d.ts +2 -2
- package/dist/ui/progress.js +1 -1
- package/dist/ui/radio-group.cjs +1 -1
- package/dist/ui/radio-group.cjs.map +1 -1
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/radio-group.d.ts +3 -3
- package/dist/ui/radio-group.js.map +1 -1
- package/dist/ui/resizable.cjs +1 -1
- package/dist/ui/resizable.cjs.map +1 -1
- package/dist/ui/resizable.d.cts +4 -4
- package/dist/ui/resizable.d.ts +4 -4
- package/dist/ui/resizable.js.map +1 -1
- package/dist/ui/scroll-area.cjs +1 -1
- package/dist/ui/scroll-area.d.cts +3 -3
- package/dist/ui/scroll-area.d.ts +3 -3
- package/dist/ui/scroll-area.js +1 -1
- package/dist/ui/select.cjs +1 -1
- package/dist/ui/select.d.cts +11 -11
- package/dist/ui/select.d.ts +11 -11
- package/dist/ui/select.js +1 -1
- package/dist/ui/separator.cjs +1 -1
- package/dist/ui/separator.d.cts +1 -1
- package/dist/ui/separator.d.ts +1 -1
- package/dist/ui/separator.js +1 -1
- package/dist/ui/sheet.cjs +1 -1
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/sheet.d.ts +9 -9
- package/dist/ui/sheet.js +1 -1
- package/dist/ui/sidebar.cjs +1 -1
- package/dist/ui/sidebar.cjs.map +1 -1
- package/dist/ui/sidebar.d.cts +30 -30
- package/dist/ui/sidebar.d.ts +30 -30
- package/dist/ui/sidebar.js +1 -1
- package/dist/ui/sidebar.js.map +1 -1
- package/dist/ui/skeleton.cjs +1 -1
- package/dist/ui/skeleton.d.cts +2 -2
- package/dist/ui/skeleton.d.ts +2 -2
- package/dist/ui/slider.cjs +1 -1
- package/dist/ui/slider.cjs.map +1 -1
- package/dist/ui/slider.d.cts +2 -2
- package/dist/ui/slider.d.ts +2 -2
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/sonner.cjs +1 -1
- package/dist/ui/sonner.cjs.map +1 -1
- package/dist/ui/sonner.d.cts +2 -2
- package/dist/ui/sonner.d.ts +2 -2
- package/dist/ui/sonner.js.map +1 -1
- package/dist/ui/spinner.cjs +2 -0
- package/dist/ui/spinner.cjs.map +1 -0
- package/dist/ui/spinner.d.cts +10 -0
- package/dist/ui/spinner.d.ts +10 -0
- package/dist/ui/spinner.js +2 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/switch.cjs +1 -1
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/switch.d.ts +2 -2
- package/dist/ui/switch.js +1 -1
- package/dist/ui/table.cjs +1 -1
- package/dist/ui/table.d.cts +9 -9
- package/dist/ui/table.d.ts +9 -9
- package/dist/ui/table.js +1 -1
- package/dist/ui/tabs.cjs +1 -1
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/tabs.d.ts +5 -5
- package/dist/ui/tabs.js +1 -1
- package/dist/ui/textarea.cjs +1 -1
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/textarea.d.ts +2 -2
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/toggle-group.cjs +1 -1
- package/dist/ui/toggle-group.cjs.map +1 -1
- package/dist/ui/toggle-group.d.cts +4 -4
- package/dist/ui/toggle-group.d.ts +4 -4
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle-group.js.map +1 -1
- package/dist/ui/toggle.cjs +1 -1
- package/dist/ui/toggle.d.cts +1 -1
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/toggle.js +1 -1
- package/dist/ui/tooltip.cjs +1 -1
- package/dist/ui/tooltip.d.cts +1 -1
- package/dist/ui/tooltip.d.ts +1 -1
- package/package.json +26 -14
- package/dist/add-new-DfniMrHa.js.map +0 -1
- package/dist/add-new-dgznne6n.cjs +0 -2
- package/dist/add-new-dgznne6n.cjs.map +0 -1
- package/dist/alert-dialog-BgEaBYoh.cjs +0 -2
- package/dist/alert-dialog-BgEaBYoh.cjs.map +0 -1
- package/dist/alert-dialog-UwGNuTYk.js.map +0 -1
- package/dist/avatar-B4pklWJt.cjs +0 -2
- package/dist/avatar-B4pklWJt.cjs.map +0 -1
- package/dist/badge-CsA-JCDX.cjs +0 -2
- package/dist/badge-CsA-JCDX.cjs.map +0 -1
- package/dist/button-CuV2l4ge.cjs +0 -2
- package/dist/button-CuV2l4ge.cjs.map +0 -1
- package/dist/button-DhQJ9Ey8.js.map +0 -1
- package/dist/button-variants-CCiseNSC.cjs +0 -2
- package/dist/button-variants-CCiseNSC.cjs.map +0 -1
- package/dist/calendar-C2yGJ9AV.js.map +0 -1
- package/dist/calendar-Fjm1d0mU.cjs +0 -2
- package/dist/calendar-Fjm1d0mU.cjs.map +0 -1
- package/dist/card-Pnxpehsp.cjs +0 -2
- package/dist/card-Pnxpehsp.cjs.map +0 -1
- package/dist/command-DHGZlBKd.cjs +0 -2
- package/dist/command-DHGZlBKd.cjs.map +0 -1
- package/dist/command-DhSE6UaR.js.map +0 -1
- package/dist/date-2wue8L-1.cjs +0 -2
- package/dist/date-2wue8L-1.cjs.map +0 -1
- package/dist/date-BuPl--Fc.js.map +0 -1
- package/dist/dialog-B2LS2JLb.js.map +0 -1
- package/dist/dialog-BSdn3QaW.cjs +0 -2
- package/dist/dialog-BSdn3QaW.cjs.map +0 -1
- package/dist/dist-D0uO1qIz.cjs +0 -2
- package/dist/drawer-COD1n5aA.js.map +0 -1
- package/dist/drawer-CsCzBHvx.cjs +0 -2
- package/dist/drawer-CsCzBHvx.cjs.map +0 -1
- package/dist/dropdown-menu-Brlye320.js.map +0 -1
- package/dist/dropdown-menu-DwI8o0uQ.cjs +0 -2
- package/dist/dropdown-menu-DwI8o0uQ.cjs.map +0 -1
- package/dist/error-dialog-BF1VNZXk.js.map +0 -1
- package/dist/error-dialog-C3b4fqAI.cjs +0 -2
- package/dist/error-dialog-C3b4fqAI.cjs.map +0 -1
- package/dist/flex-DS4mxjtf.cjs +0 -2
- package/dist/flex-DS4mxjtf.cjs.map +0 -1
- package/dist/form-BT1TbgK6.js +0 -2
- package/dist/form-BT1TbgK6.js.map +0 -1
- package/dist/form-DyH5iWq7.cjs +0 -2
- package/dist/form-DyH5iWq7.cjs.map +0 -1
- package/dist/form-wrapper-CI2iMUNJ.cjs +0 -2
- package/dist/form-wrapper-CI2iMUNJ.cjs.map +0 -1
- package/dist/form-wrapper-DaguHv9W.js +0 -2
- package/dist/form-wrapper-DaguHv9W.js.map +0 -1
- package/dist/image-j62jo7bK.cjs +0 -2
- package/dist/image-j62jo7bK.cjs.map +0 -1
- package/dist/input-BtT8HfYE.js.map +0 -1
- package/dist/input-DfGojpRF.cjs +0 -2
- package/dist/input-DfGojpRF.cjs.map +0 -1
- package/dist/label-CHNSlaoz.cjs +0 -2
- package/dist/label-CHNSlaoz.cjs.map +0 -1
- package/dist/multi-select-C0dFenI-.cjs +0 -2
- package/dist/multi-select-C0dFenI-.cjs.map +0 -1
- package/dist/multi-select-l0HITJuv.js +0 -2
- package/dist/multi-select-l0HITJuv.js.map +0 -1
- package/dist/paragraph-BLvW7xdo.cjs +0 -2
- package/dist/paragraph-BLvW7xdo.cjs.map +0 -1
- package/dist/popover-BJWOgxQ5.js.map +0 -1
- package/dist/popover-BrDe5Jb8.cjs +0 -2
- package/dist/popover-BrDe5Jb8.cjs.map +0 -1
- package/dist/progress-DzBPViJg.js.map +0 -1
- package/dist/progress-RnZp4jUA.cjs +0 -2
- package/dist/progress-RnZp4jUA.cjs.map +0 -1
- package/dist/refresh-BiOPtbhd.js.map +0 -1
- package/dist/refresh-DgFpv8mw.cjs +0 -2
- package/dist/refresh-DgFpv8mw.cjs.map +0 -1
- package/dist/scroll-area-BJYI14s5.js.map +0 -1
- package/dist/scroll-area-slD5Jekm.cjs +0 -2
- package/dist/scroll-area-slD5Jekm.cjs.map +0 -1
- package/dist/search-input--FQFzdW3.js.map +0 -1
- package/dist/search-input-DV8zjsMQ.cjs +0 -2
- package/dist/search-input-DV8zjsMQ.cjs.map +0 -1
- package/dist/select-Ce-YROpe.cjs +0 -2
- package/dist/select-Ce-YROpe.cjs.map +0 -1
- package/dist/select-Di8fOKVF.js.map +0 -1
- package/dist/separator-C7HQ2ThL.js.map +0 -1
- package/dist/separator-WF5zTNGS.cjs +0 -2
- package/dist/separator-WF5zTNGS.cjs.map +0 -1
- package/dist/sheet-E0gvN9Gp.js.map +0 -1
- package/dist/sheet-cjXJAfUE.cjs +0 -2
- package/dist/sheet-cjXJAfUE.cjs.map +0 -1
- package/dist/sidebar-B6s0ZZHA.cjs +0 -2
- package/dist/sidebar-B6s0ZZHA.cjs.map +0 -1
- package/dist/sidebar-CBEPWmnf.js.map +0 -1
- package/dist/skeleton-BA-3d3bn.cjs +0 -2
- package/dist/skeleton-BA-3d3bn.cjs.map +0 -1
- package/dist/switch-C7foFKpS.js.map +0 -1
- package/dist/switch-DOgkZVAD.cjs +0 -2
- package/dist/switch-DOgkZVAD.cjs.map +0 -1
- package/dist/table-CKNAm27W.js.map +0 -1
- package/dist/table-CzMEpN9D.cjs +0 -2
- package/dist/table-CzMEpN9D.cjs.map +0 -1
- package/dist/tabs-D4uObFGW.js.map +0 -1
- package/dist/tabs-MolLf09Q.cjs +0 -2
- package/dist/tabs-MolLf09Q.cjs.map +0 -1
- package/dist/textarea-Ewj89Eq3.cjs +0 -2
- package/dist/textarea-Ewj89Eq3.cjs.map +0 -1
- package/dist/textarea-n8OO0QsI.js.map +0 -1
- package/dist/title-DONX1fR6.cjs +0 -2
- package/dist/title-DONX1fR6.cjs.map +0 -1
- package/dist/title-itXqz0us.js.map +0 -1
- package/dist/toggle-D0B4Ba4H.cjs +0 -2
- package/dist/toggle-D0B4Ba4H.cjs.map +0 -1
- package/dist/toggle-DuNq0es1.js.map +0 -1
- package/dist/tooltip-DXvcPsvM.cjs +0 -2
- package/dist/tooltip-DXvcPsvM.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-uploader.js","names":[],"sources":["../../packages/components/ui/file-uploader.tsx"],"sourcesContent":["'use client'\nimport { useCallback, useEffect } from 'react'\nimport Dropzone, { type DropzoneProps, type FileRejection } from 'react-dropzone'\nimport { useControllableState } from '@customafk/react-toolkit/hooks/useControllableState'\nimport { cn, formatBytes } from '@customafk/react-toolkit/utils'\n\nimport { FileText, Image, Trash2, Upload } from 'lucide-react'\nimport { toast } from 'sonner'\n\nimport { Button } from '@/components/ui/button'\nimport { Progress } from '@/components/ui/progress'\n\ninterface FileUploaderProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Value of the uploader.\n * @type File[]\n * @default undefined\n * @example value={files}\n */\n value?: File[]\n\n /**\n * Function to be called when the value changes.\n * @type (files: File[]) => void\n * @default undefined\n * @example onValueChange={(files) => setFiles(files)}\n */\n onValueChange?: (files: File[]) => void\n\n /**\n * Function to be called when files are uploaded.\n * @type (files: File[]) => Promise<void>\n * @default undefined\n * @example onUpload={(files) => uploadFiles(files)}\n */\n onUpload?: (files: File[]) => Promise<void>\n\n /**\n * Progress of the uploaded files.\n * @type Record<string, number> | undefined\n * @default undefined\n * @example progresses={{ \"file1.png\": 50 }}\n */\n progresses?: Record<string, number>\n\n /**\n * Accepted file types for the uploader.\n * @type { [key: string]: string[]}\n * @default\n * ```ts\n * { \"image/*\": [] }\n * ```\n * @example accept={[\"image/png\", \"image/jpeg\"]}\n */\n accept?: DropzoneProps['accept']\n\n /**\n * Maximum file size for the uploader.\n * @type number | undefined\n * @default 1024 * 1024 * 2 // 2MB\n * @example maxSize={1024 * 1024 * 2} // 2MB\n */\n maxSize?: DropzoneProps['maxSize']\n\n /**\n * Maximum number of files for the uploader.\n * @type number | undefined\n * @default 1\n * @example maxFileCount={4}\n */\n maxFileCount?: DropzoneProps['maxFiles']\n\n /**\n * Whether the uploader should accept multiple files.\n * @type boolean\n * @default false\n * @example multiple\n */\n multiple?: boolean\n\n /**\n * Whether the uploader is disabled.\n * @type boolean\n * @default false\n * @example disabled\n */\n disabled?: boolean\n\n showText?: boolean\n iconSize?: number\n}\n\nexport function FileUploader(props: FileUploaderProps) {\n const {\n value: valueProp,\n onValueChange,\n onUpload,\n progresses,\n accept = {\n 'image/*': [],\n },\n maxSize = 1024 * 1024 * 2,\n maxFileCount = 1,\n multiple = false,\n disabled = false,\n showText = true,\n iconSize,\n className,\n ...dropzoneProps\n } = props\n\n const [files, setFiles] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n })\n\n const onDrop = useCallback(\n (acceptedFiles: File[], rejectedFiles: FileRejection[]) => {\n if (!multiple && maxFileCount === 1 && acceptedFiles.length > 1) {\n toast.error('Cannot upload more than 1 file at a time')\n\n return\n }\n\n if ((files?.length ?? 0) + acceptedFiles.length > maxFileCount) {\n toast.error(`Cannot upload more than ${maxFileCount} files`)\n return\n }\n\n const newFiles = acceptedFiles.map((file) =>\n Object.assign(file, {\n preview: URL.createObjectURL(file),\n }),\n )\n\n const updatedFiles = files ? [...files, ...newFiles] : newFiles\n\n setFiles(updatedFiles)\n\n if (rejectedFiles.length > 0) {\n rejectedFiles.forEach(({ file }) => {\n toast.error(`File ${file.name} was rejected`)\n })\n }\n\n if (onUpload && updatedFiles.length > 0 && updatedFiles.length <= maxFileCount) {\n const target = updatedFiles.length > 0 ? `${updatedFiles.length} files` : `file`\n\n onUpload(updatedFiles).then(() => {\n setFiles([])\n toast(`${target} uploaded`)\n })\n }\n },\n\n [files, maxFileCount, multiple, onUpload, setFiles],\n )\n\n function onRemove(index: number) {\n if (!files) return\n\n if (isFileWithPreview(files[index])) {\n URL.revokeObjectURL(files[index].preview)\n }\n\n const newFiles = files.filter((_, i) => i !== index)\n setFiles(newFiles)\n onValueChange?.(newFiles)\n }\n\n // Revoke preview url when component unmounts\n useEffect(() => {\n return () => {\n if (!files) return\n files.forEach((file) => {\n if (isFileWithPreview(file)) {\n URL.revokeObjectURL(file.preview)\n }\n })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const isDisabled = disabled || (files?.length ?? 0) >= maxFileCount\n\n return (\n <div className=\"relative flex w-full flex-col gap-6\">\n <Dropzone onDrop={onDrop} accept={accept} maxSize={maxSize} maxFiles={maxFileCount} multiple={maxFileCount > 1 || multiple} disabled={isDisabled}>\n {({ getRootProps, getInputProps, isDragActive }) => (\n <div\n {...getRootProps()}\n className={cn(\n 'group',\n 'border-border-weak',\n 'hover:bg-border-weak/20',\n 'relative grid h-52 w-full cursor-pointer place-items-center rounded-lg border-2 border-dashed px-5 py-2.5 text-center transition',\n 'ring-offset-background',\n 'focus-visible:ring-primary-weak',\n 'focus-visible:ring-2',\n 'focus-visible:ring-offset-2',\n 'focus-visible:outline-hidden',\n isDragActive && 'border-border-primary-strong bg-border-weak/40',\n isDisabled && 'pointer-events-none opacity-60',\n className,\n )}\n {...dropzoneProps}\n >\n <input {...getInputProps()} />\n {isDragActive ? (\n <div className=\"flex flex-col items-center justify-center gap-4 sm:px-5\">\n <div className=\"rounded-full border border-dashed p-3\">\n <Upload className=\"text-text-positive-muted size-7\" aria-hidden=\"true\" />\n </div>\n <p className=\"text-text-positive-muted font-medium\">Drop the files here</p>\n </div>\n ) : (\n <div className=\"flex flex-col items-center justify-center gap-4 sm:px-5\">\n <div className=\"rounded-full border border-dashed p-3\">\n <Upload size={iconSize || 24} className=\"text-muted-foreground\" aria-hidden=\"true\" />\n </div>\n {showText && (\n <div className=\"flex flex-col gap-px\">\n <p className=\"text-text-positive-weak text-xs font-medium\">Drag {`'n'`} drop files here, or click to select files</p>\n <p className=\"text-text-positive-muted text-xs\">\n You can upload\n {maxFileCount > 1\n ? ` ${maxFileCount === Infinity ? 'multiple' : maxFileCount}\n files (up to ${formatBytes(maxSize)} each)`\n : ` a file with ${formatBytes(maxSize)}`}\n </p>\n </div>\n )}\n </div>\n )}\n </div>\n )}\n </Dropzone>\n {files?.length ? (\n <div className=\"h-fit w-full overflow-y-auto\">\n <div className=\"flex items-center justify-between px-3 py-2.5\">\n <div className=\"text-text-positive-weak flex items-center gap-1\">\n <Image size={16} aria-hidden=\"true\" />\n <p className=\"text-sm\">Ảnh đã tải lên ({files.length})</p>\n </div>\n <button\n className=\"hover:text-text-positive text-text-positive-muted flex cursor-pointer items-center gap-1 transition-colors duration-200\"\n onClick={() => {\n if (!files) return\n files.forEach((file) => {\n if (!isFileWithPreview(file)) return\n URL.revokeObjectURL(file.preview)\n })\n setFiles([])\n onValueChange?.([])\n }}\n >\n <Trash2 size={16} aria-hidden=\"true\" />\n <p className=\"text-sm\">Xóa tất cả</p>\n </button>\n </div>\n <div className=\"flex flex-col gap-2.5\">\n {files?.map((file, index) => (\n <FileCard key={index} file={file} onRemove={() => onRemove(index)} progress={progresses?.[file.name]} />\n ))}\n </div>\n </div>\n ) : null}\n </div>\n )\n}\n\ninterface FileCardProps {\n file: File\n onRemove: () => void\n progress?: number\n}\n\nfunction FileCard({ file, progress, onRemove }: FileCardProps) {\n return (\n <div className=\"border-border-weak hover:border-border relative flex items-center gap-4 rounded-md border py-2 pr-3 pl-2 shadow-xs transition-colors\">\n <div className=\"flex flex-1 gap-2.5\">\n {isFileWithPreview(file) ? <FilePreview file={file} /> : null}\n <div className=\"flex w-full flex-col gap-2\">\n <div className=\"flex flex-col gap-y-0.5\">\n <p className=\"text-text-positive line-clamp-1 text-sm\">{file.name}</p>\n <p className=\"text-text-positive-muted text-xs\">{formatBytes(file.size)}</p>\n </div>\n {progress ? <Progress value={progress} /> : null}\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n <Button type=\"button\" variant=\"ghost\" color=\"secondary\" size=\"icon\" className=\"size-7\" onClick={onRemove}>\n <Trash2 size={16} className=\"text-text-positive-muted\" aria-hidden=\"true\" />\n <span className=\"sr-only\">Remove file</span>\n </Button>\n </div>\n </div>\n )\n}\n\nfunction isFileWithPreview(file: File): file is File & { preview: string } {\n return 'preview' in file && typeof file.preview === 'string'\n}\n\ninterface FilePreviewProps {\n file: File & { preview: string }\n}\n\nfunction FilePreview({ file }: FilePreviewProps) {\n if (file.type.startsWith('image/')) {\n return <img src={file.preview} className=\"border-border aspect-square size-10 shrink-0 rounded border object-cover object-top shadow-sm\" />\n }\n\n return <FileText className=\"text-text-positive-muted size-10 border\" aria-hidden=\"true\" />\n}\n"],"mappings":"+jBA4FA,SAAgB,EAAa,EAA0B,CACrD,GAAM,CACJ,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OAAM,aAAgB,EAAS,GAAQ,SAAU,IAAa,EAAK,OAAhF,SAInB,QAWV,SAAS,EAAS,CAAE,OAAM,WAAU,YAA2B,CAC7D,OACE,EAAC,MAAA,CAAI,UAAU,iJACb,EAAC,MAAA,CAAI,UAAU,gCACZ,EAAkB,GAAQ,EAAC,EAAA,CAAkB,SAAW,KACzD,EAAC,MAAA,CAAI,UAAU,uCACb,EAAC,MAAA,CAAI,UAAU,oCACb,EAAC,IAAA,CAAE,UAAU,mDAA2C,EAAK,OAC7D,EAAC,IAAA,CAAE,UAAU,4CAAoC,EAAY,EAAK,WAEnE,EAAW,EAAC,EAAA,CAAS,MAAO,IAAe,WAGhD,EAAC,MAAA,CAAI,UAAU,mCACb,EAAC,EAAA,CAAO,KAAK,SAAS,QAAQ,QAAQ,MAAM,YAAY,KAAK,OAAO,UAAU,SAAS,QAAS,YAC9F,EAAC,EAAA,CAAO,KAAM,GAAI,UAAU,2BAA2B,cAAY,SACnE,EAAC,OAAA,CAAK,UAAU,mBAAU,wBAOpC,SAAS,EAAkB,EAAgD,CACzE,MAAO,YAAa,GAAQ,OAAO,EAAK,SAAY,SAOtD,SAAS,EAAY,CAAE,QAA0B,CAK/C,OAJI,EAAK,KAAK,WAAW,UAChB,EAAC,MAAA,CAAI,IAAK,EAAK,QAAS,UAAU,kGAGpC,EAAC,EAAA,CAAS,UAAU,0CAA0C,cAAY"}
|
|
1
|
+
{"version":3,"file":"file-uploader.js","names":[],"sources":["../../packages/components/ui/file-uploader.tsx"],"sourcesContent":["'use client';\nimport { useCallback, useEffect } from 'react';\nimport Dropzone, { type DropzoneProps, type FileRejection } from 'react-dropzone';\nimport { useControllableState } from '@customafk/react-toolkit/hooks/useControllableState';\nimport { cn, formatBytes } from '@customafk/react-toolkit/utils';\n\nimport { FileText, Image, Trash2, Upload } from 'lucide-react';\nimport { toast } from 'sonner';\n\nimport { Button } from '@/components/ui/button';\nimport { Progress } from '@/components/ui/progress';\n\ninterface FileUploaderProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Value of the uploader.\n * @type File[]\n * @default undefined\n * @example value={files}\n */\n value?: File[];\n\n /**\n * Function to be called when the value changes.\n * @type (files: File[]) => void\n * @default undefined\n * @example onValueChange={(files) => setFiles(files)}\n */\n onValueChange?: (files: File[]) => void;\n\n /**\n * Function to be called when files are uploaded.\n * @type (files: File[]) => Promise<void>\n * @default undefined\n * @example onUpload={(files) => uploadFiles(files)}\n */\n onUpload?: (files: File[]) => Promise<void>;\n\n /**\n * Progress of the uploaded files.\n * @type Record<string, number> | undefined\n * @default undefined\n * @example progresses={{ \"file1.png\": 50 }}\n */\n progresses?: Record<string, number>;\n\n /**\n * Accepted file types for the uploader.\n * @type { [key: string]: string[]}\n * @default\n * ```ts\n * { \"image/*\": [] }\n * ```\n * @example accept={[\"image/png\", \"image/jpeg\"]}\n */\n accept?: DropzoneProps['accept'];\n\n /**\n * Maximum file size for the uploader.\n * @type number | undefined\n * @default 1024 * 1024 * 2 // 2MB\n * @example maxSize={1024 * 1024 * 2} // 2MB\n */\n maxSize?: DropzoneProps['maxSize'];\n\n /**\n * Maximum number of files for the uploader.\n * @type number | undefined\n * @default 1\n * @example maxFileCount={4}\n */\n maxFileCount?: DropzoneProps['maxFiles'];\n\n /**\n * Whether the uploader should accept multiple files.\n * @type boolean\n * @default false\n * @example multiple\n */\n multiple?: boolean;\n\n /**\n * Whether the uploader is disabled.\n * @type boolean\n * @default false\n * @example disabled\n */\n disabled?: boolean;\n\n showText?: boolean;\n iconSize?: number;\n}\n\nexport function FileUploader(props: FileUploaderProps) {\n const {\n value: valueProp,\n onValueChange,\n onUpload,\n progresses,\n accept = {\n 'image/*': [],\n },\n maxSize = 1024 * 1024 * 2,\n maxFileCount = 1,\n multiple = false,\n disabled = false,\n showText = true,\n iconSize,\n className,\n ...dropzoneProps\n } = props;\n\n const [files, setFiles] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n });\n\n const onDrop = useCallback(\n (acceptedFiles: File[], rejectedFiles: FileRejection[]) => {\n if (!multiple && maxFileCount === 1 && acceptedFiles.length > 1) {\n toast.error('Cannot upload more than 1 file at a time');\n\n return;\n }\n\n if ((files?.length ?? 0) + acceptedFiles.length > maxFileCount) {\n toast.error(`Cannot upload more than ${maxFileCount} files`);\n return;\n }\n\n const newFiles = acceptedFiles.map(file =>\n Object.assign(file, {\n preview: URL.createObjectURL(file),\n })\n );\n\n const updatedFiles = files ? [...files, ...newFiles] : newFiles;\n\n setFiles(updatedFiles);\n\n if (rejectedFiles.length > 0) {\n rejectedFiles.forEach(({ file }) => {\n toast.error(`File ${file.name} was rejected`);\n });\n }\n\n if (onUpload && updatedFiles.length > 0 && updatedFiles.length <= maxFileCount) {\n const target = updatedFiles.length > 0 ? `${updatedFiles.length} files` : `file`;\n\n onUpload(updatedFiles).then(() => {\n setFiles([]);\n toast(`${target} uploaded`);\n });\n }\n },\n\n [files, maxFileCount, multiple, onUpload, setFiles]\n );\n\n function onRemove(index: number) {\n if (!files) return;\n\n if (isFileWithPreview(files[index])) {\n URL.revokeObjectURL(files[index].preview);\n }\n\n const newFiles = files.filter((_, i) => i !== index);\n setFiles(newFiles);\n onValueChange?.(newFiles);\n }\n\n // Revoke preview url when component unmounts\n useEffect(() => {\n return () => {\n if (!files) return;\n files.forEach(file => {\n if (isFileWithPreview(file)) {\n URL.revokeObjectURL(file.preview);\n }\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const isDisabled = disabled || (files?.length ?? 0) >= maxFileCount;\n\n return (\n <div className=\"relative flex w-full flex-col gap-6\">\n <Dropzone onDrop={onDrop} accept={accept} maxSize={maxSize} maxFiles={maxFileCount} multiple={maxFileCount > 1 || multiple} disabled={isDisabled}>\n {({ getRootProps, getInputProps, isDragActive }) => (\n <div\n {...getRootProps()}\n className={cn(\n 'group',\n 'border-border-weak',\n 'hover:bg-border-weak/20',\n 'relative grid h-52 w-full cursor-pointer place-items-center rounded-lg border-2 border-dashed px-5 py-2.5 text-center transition',\n 'ring-offset-background',\n 'focus-visible:ring-primary-weak',\n 'focus-visible:ring-2',\n 'focus-visible:ring-offset-2',\n 'focus-visible:outline-hidden',\n isDragActive && 'border-border-primary-strong bg-border-weak/40',\n isDisabled && 'pointer-events-none opacity-60',\n className\n )}\n {...dropzoneProps}\n >\n <input {...getInputProps()} />\n {isDragActive ? (\n <div className=\"flex flex-col items-center justify-center gap-4 sm:px-5\">\n <div className=\"rounded-full border border-dashed p-3\">\n <Upload className=\"text-text-positive-muted size-7\" aria-hidden=\"true\" />\n </div>\n <p className=\"text-text-positive-muted font-medium\">Drop the files here</p>\n </div>\n ) : (\n <div className=\"flex flex-col items-center justify-center gap-4 sm:px-5\">\n <div className=\"rounded-full border border-dashed p-3\">\n <Upload size={iconSize || 24} className=\"text-muted-foreground\" aria-hidden=\"true\" />\n </div>\n {showText && (\n <div className=\"flex flex-col gap-px\">\n <p className=\"text-text-positive-weak text-xs font-medium\">Drag {`'n'`} drop files here, or click to select files</p>\n <p className=\"text-text-positive-muted text-xs\">\n You can upload\n {maxFileCount > 1\n ? ` ${maxFileCount === Infinity ? 'multiple' : maxFileCount}\n files (up to ${formatBytes(maxSize)} each)`\n : ` a file with ${formatBytes(maxSize)}`}\n </p>\n </div>\n )}\n </div>\n )}\n </div>\n )}\n </Dropzone>\n {files?.length ? (\n <div className=\"h-fit w-full overflow-y-auto\">\n <div className=\"flex items-center justify-between px-3 py-2.5\">\n <div className=\"text-text-positive-weak flex items-center gap-1\">\n <Image size={16} aria-hidden=\"true\" />\n <p className=\"text-sm\">Ảnh đã tải lên ({files.length})</p>\n </div>\n <button\n className=\"hover:text-text-positive text-text-positive-muted flex cursor-pointer items-center gap-1 transition-colors duration-200\"\n onClick={() => {\n if (!files) return;\n files.forEach(file => {\n if (!isFileWithPreview(file)) return;\n URL.revokeObjectURL(file.preview);\n });\n setFiles([]);\n onValueChange?.([]);\n }}\n >\n <Trash2 size={16} aria-hidden=\"true\" />\n <p className=\"text-sm\">Xóa tất cả</p>\n </button>\n </div>\n <div className=\"flex flex-col gap-2.5\">\n {files?.map((file, index) => (\n <FileCard key={index} file={file} onRemove={() => onRemove(index)} progress={progresses?.[file.name]} />\n ))}\n </div>\n </div>\n ) : null}\n </div>\n );\n}\n\ninterface FileCardProps {\n file: File;\n onRemove: () => void;\n progress?: number;\n}\n\nfunction FileCard({ file, progress, onRemove }: FileCardProps) {\n return (\n <div className=\"border-border-weak hover:border-border relative flex items-center gap-4 rounded-md border py-2 pr-3 pl-2 shadow-xs transition-colors\">\n <div className=\"flex flex-1 gap-2.5\">\n {isFileWithPreview(file) ? <FilePreview file={file} /> : null}\n <div className=\"flex w-full flex-col gap-2\">\n <div className=\"flex flex-col gap-y-0.5\">\n <p className=\"text-text-positive line-clamp-1 text-sm\">{file.name}</p>\n <p className=\"text-text-positive-muted text-xs\">{formatBytes(file.size)}</p>\n </div>\n {progress ? <Progress value={progress} /> : null}\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n <Button type=\"button\" variant=\"ghost\" color=\"secondary\" size=\"icon\" className=\"size-7\" onClick={onRemove}>\n <Trash2 size={16} className=\"text-text-positive-muted\" aria-hidden=\"true\" />\n <span className=\"sr-only\">Remove file</span>\n </Button>\n </div>\n </div>\n );\n}\n\nfunction isFileWithPreview(file: File): file is File & { preview: string } {\n return 'preview' in file && typeof file.preview === 'string';\n}\n\ninterface FilePreviewProps {\n file: File & { preview: string };\n}\n\nfunction FilePreview({ file }: FilePreviewProps) {\n if (file.type.startsWith('image/')) {\n return <img src={file.preview} className=\"border-border aspect-square size-10 shrink-0 rounded border object-cover object-top shadow-sm\" />;\n }\n\n return <FileText className=\"text-text-positive-muted size-10 border\" aria-hidden=\"true\" />;\n}\n"],"mappings":"+jBA4FA,SAAgB,EAAa,EAA0B,CACrD,GAAM,CACJ,MAAO,EACP,gBACA,WACA,aACA,SAAS,CACP,UAAW,EAAE,CACd,CACD,UAAU,KAAO,KAAO,EACxB,eAAe,EACf,WAAW,GACX,WAAW,G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,WAAW,SAAS,CACzB,EAAC,MAAA,CAAI,IAAK,EAAK,QAAS,UAAU,iGAAkG,CAGtI,EAAC,EAAA,CAAS,UAAU,0CAA0C,cAAY,QAAS"}
|
package/dist/ui/form.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";require(`../label-
|
|
1
|
+
"use client";require(`../label-D6mAvVmw.cjs`),require(`../separator-DMMoR-d2.cjs`),require(`../field-A43YZ5Wj.cjs`);const e=require(`../form-DV9tQbiO.cjs`);exports.Form=e.Form,exports.FormControl=e.FormControl,exports.FormDescription=e.FormDescription,exports.FormField=e.FormField,exports.FormItem=e.FormItem,exports.FormLabel=e.FormLabel,exports.FormMessage=e.FormMessage,exports.useFormField=e.useFormField;
|
package/dist/ui/form.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime104 from "react/jsx-runtime";
|
|
2
2
|
import { Label, Slot } from "radix-ui";
|
|
3
3
|
import * as react_hook_form0 from "react-hook-form";
|
|
4
4
|
import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
|
@@ -7,7 +7,7 @@ import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
|
|
7
7
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form0.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
8
8
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
|
|
9
9
|
...props
|
|
10
|
-
}: ControllerProps<TFieldValues, TName>) =>
|
|
10
|
+
}: ControllerProps<TFieldValues, TName>) => react_jsx_runtime104.JSX.Element;
|
|
11
11
|
declare const useFormField: () => {
|
|
12
12
|
invalid: boolean;
|
|
13
13
|
isDirty: boolean;
|
|
@@ -25,23 +25,22 @@ declare const useFormField: () => {
|
|
|
25
25
|
declare function FormItem({
|
|
26
26
|
className,
|
|
27
27
|
...props
|
|
28
|
-
}: React.ComponentProps<'div'>):
|
|
28
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime104.JSX.Element;
|
|
29
29
|
declare function FormLabel({
|
|
30
|
-
className,
|
|
31
30
|
...props
|
|
32
|
-
}: React.ComponentProps<typeof Label.Root>):
|
|
31
|
+
}: React.ComponentProps<typeof Label.Root>): react_jsx_runtime104.JSX.Element;
|
|
33
32
|
declare function FormControl({
|
|
34
33
|
...props
|
|
35
|
-
}: React.ComponentProps<typeof Slot.Slot>):
|
|
34
|
+
}: React.ComponentProps<typeof Slot.Slot>): react_jsx_runtime104.JSX.Element;
|
|
36
35
|
declare function FormDescription({
|
|
37
36
|
className,
|
|
38
37
|
...props
|
|
39
|
-
}: React.ComponentProps<'p'>):
|
|
38
|
+
}: React.ComponentProps<'p'>): react_jsx_runtime104.JSX.Element;
|
|
40
39
|
declare function FormMessage({
|
|
41
40
|
className,
|
|
42
41
|
children,
|
|
43
42
|
...props
|
|
44
|
-
}: React.ComponentProps<'p'>):
|
|
43
|
+
}: React.ComponentProps<'p'>): react_jsx_runtime104.JSX.Element;
|
|
45
44
|
//#endregion
|
|
46
45
|
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
|
47
46
|
//# sourceMappingURL=form.d.cts.map
|
package/dist/ui/form.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime129 from "react/jsx-runtime";
|
|
2
2
|
import { Label, Slot } from "radix-ui";
|
|
3
3
|
import * as react_hook_form0 from "react-hook-form";
|
|
4
4
|
import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
|
@@ -7,7 +7,7 @@ import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
|
|
7
7
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form0.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
8
8
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
|
|
9
9
|
...props
|
|
10
|
-
}: ControllerProps<TFieldValues, TName>) =>
|
|
10
|
+
}: ControllerProps<TFieldValues, TName>) => react_jsx_runtime129.JSX.Element;
|
|
11
11
|
declare const useFormField: () => {
|
|
12
12
|
invalid: boolean;
|
|
13
13
|
isDirty: boolean;
|
|
@@ -25,23 +25,22 @@ declare const useFormField: () => {
|
|
|
25
25
|
declare function FormItem({
|
|
26
26
|
className,
|
|
27
27
|
...props
|
|
28
|
-
}: React.ComponentProps<'div'>):
|
|
28
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime129.JSX.Element;
|
|
29
29
|
declare function FormLabel({
|
|
30
|
-
className,
|
|
31
30
|
...props
|
|
32
|
-
}: React.ComponentProps<typeof Label.Root>):
|
|
31
|
+
}: React.ComponentProps<typeof Label.Root>): react_jsx_runtime129.JSX.Element;
|
|
33
32
|
declare function FormControl({
|
|
34
33
|
...props
|
|
35
|
-
}: React.ComponentProps<typeof Slot.Slot>):
|
|
34
|
+
}: React.ComponentProps<typeof Slot.Slot>): react_jsx_runtime129.JSX.Element;
|
|
36
35
|
declare function FormDescription({
|
|
37
36
|
className,
|
|
38
37
|
...props
|
|
39
|
-
}: React.ComponentProps<'p'>):
|
|
38
|
+
}: React.ComponentProps<'p'>): react_jsx_runtime129.JSX.Element;
|
|
40
39
|
declare function FormMessage({
|
|
41
40
|
className,
|
|
42
41
|
children,
|
|
43
42
|
...props
|
|
44
|
-
}: React.ComponentProps<'p'>):
|
|
43
|
+
}: React.ComponentProps<'p'>): react_jsx_runtime129.JSX.Element;
|
|
45
44
|
//#endregion
|
|
46
45
|
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
|
47
46
|
//# sourceMappingURL=form.d.ts.map
|
package/dist/ui/form.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"../label-CdrxlBJ8.js";import{Form as e,FormControl as t,FormDescription as n,FormField as r,FormItem as i,FormLabel as a,FormMessage as o,useFormField as s}from"../form-
|
|
1
|
+
"use client";import"../label-CdrxlBJ8.js";import"../separator-D17HxS2f.js";import"../field-CGacT8J3.js";import{Form as e,FormControl as t,FormDescription as n,FormField as r,FormItem as i,FormLabel as a,FormMessage as o,useFormField as s}from"../form-B_tL9lO4.js";export{e as Form,t as FormControl,n as FormDescription,r as FormField,i as FormItem,a as FormLabel,o as FormMessage,s as useFormField};
|
package/dist/ui/hover-card.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`)
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`);let t=require(`@customafk/react-toolkit/utils`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n);let r=require(`radix-ui`);r=e.__toESM(r);function i({...e}){return(0,n.jsx)(r.HoverCard.Root,{"data-slot":`hover-card`,...e})}function a({...e}){return(0,n.jsx)(r.HoverCard.Trigger,{"data-slot":`hover-card-trigger`,...e})}function o({className:e,align:i=`center`,sideOffset:a=4,...o}){return(0,n.jsx)(r.HoverCard.Portal,{"data-slot":`hover-card-portal`,children:(0,n.jsx)(r.HoverCard.Content,{"data-slot":`hover-card-content`,align:i,sideOffset:a,className:(0,t.cn)(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,e),...o})})}exports.HoverCard=i,exports.HoverCardContent=o,exports.HoverCardTrigger=a;
|
|
2
2
|
//# sourceMappingURL=hover-card.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card.cjs","names":["HoverCardPrimitive"],"sources":["../../packages/components/ui/hover-card.tsx"],"sourcesContent":["'use client'
|
|
1
|
+
{"version":3,"file":"hover-card.cjs","names":["HoverCardPrimitive"],"sources":["../../packages/components/ui/hover-card.tsx"],"sourcesContent":["'use client';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { HoverCard as HoverCardPrimitive } from 'radix-ui';\n\nfunction HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>) {\n return <HoverCardPrimitive.Root data-slot=\"hover-card\" {...props} />;\n}\n\nfunction HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {\n return <HoverCardPrimitive.Trigger data-slot=\"hover-card-trigger\" {...props} />;\n}\n\nfunction HoverCardContent({ className, align = 'center', sideOffset = 4, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>) {\n return (\n <HoverCardPrimitive.Portal data-slot=\"hover-card-portal\">\n <HoverCardPrimitive.Content\n data-slot=\"hover-card-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n );\n}\n\nexport { HoverCard, HoverCardContent, HoverCardTrigger };\n"],"mappings":"gNAKA,SAAS,EAAU,CAAE,GAAG,GAA+D,CACrF,OAAO,EAAA,EAAA,KAACA,EAAAA,UAAmB,KAAA,CAAK,YAAU,aAAa,GAAI,GAAS,CAGtE,SAAS,EAAiB,CAAE,GAAG,GAAkE,CAC/F,OAAO,EAAA,EAAA,KAACA,EAAAA,UAAmB,QAAA,CAAQ,YAAU,qBAAqB,GAAI,GAAS,CAGjF,SAAS,EAAiB,CAAE,YAAW,QAAQ,SAAU,aAAa,EAAG,GAAG,GAAkE,CAC5I,OACE,EAAA,EAAA,KAACA,EAAAA,UAAmB,OAAA,CAAO,YAAU,8BACnC,EAAA,EAAA,KAACA,EAAAA,UAAmB,QAAA,CAClB,YAAU,qBACH,QACK,aACZ,WAAA,EAAA,EAAA,IACE,oeACA,EACD,CACD,GAAI,GACJ,EACwB"}
|
package/dist/ui/hover-card.d.cts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime110 from "react/jsx-runtime";
|
|
2
2
|
import { HoverCard as HoverCard$1 } from "radix-ui";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/hover-card.d.ts
|
|
5
5
|
declare function HoverCard({
|
|
6
6
|
...props
|
|
7
|
-
}: React.ComponentProps<typeof HoverCard$1.Root>):
|
|
7
|
+
}: React.ComponentProps<typeof HoverCard$1.Root>): react_jsx_runtime110.JSX.Element;
|
|
8
8
|
declare function HoverCardTrigger({
|
|
9
9
|
...props
|
|
10
|
-
}: React.ComponentProps<typeof HoverCard$1.Trigger>):
|
|
10
|
+
}: React.ComponentProps<typeof HoverCard$1.Trigger>): react_jsx_runtime110.JSX.Element;
|
|
11
11
|
declare function HoverCardContent({
|
|
12
12
|
className,
|
|
13
13
|
align,
|
|
14
14
|
sideOffset,
|
|
15
15
|
...props
|
|
16
|
-
}: React.ComponentProps<typeof HoverCard$1.Content>):
|
|
16
|
+
}: React.ComponentProps<typeof HoverCard$1.Content>): react_jsx_runtime110.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
19
19
|
//# sourceMappingURL=hover-card.d.cts.map
|
package/dist/ui/hover-card.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime135 from "react/jsx-runtime";
|
|
2
2
|
import { HoverCard as HoverCard$1 } from "radix-ui";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/hover-card.d.ts
|
|
5
5
|
declare function HoverCard({
|
|
6
6
|
...props
|
|
7
|
-
}: React.ComponentProps<typeof HoverCard$1.Root>):
|
|
7
|
+
}: React.ComponentProps<typeof HoverCard$1.Root>): react_jsx_runtime135.JSX.Element;
|
|
8
8
|
declare function HoverCardTrigger({
|
|
9
9
|
...props
|
|
10
|
-
}: React.ComponentProps<typeof HoverCard$1.Trigger>):
|
|
10
|
+
}: React.ComponentProps<typeof HoverCard$1.Trigger>): react_jsx_runtime135.JSX.Element;
|
|
11
11
|
declare function HoverCardContent({
|
|
12
12
|
className,
|
|
13
13
|
align,
|
|
14
14
|
sideOffset,
|
|
15
15
|
...props
|
|
16
|
-
}: React.ComponentProps<typeof HoverCard$1.Content>):
|
|
16
|
+
}: React.ComponentProps<typeof HoverCard$1.Content>): react_jsx_runtime135.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
19
19
|
//# sourceMappingURL=hover-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card.js","names":["HoverCardPrimitive"],"sources":["../../packages/components/ui/hover-card.tsx"],"sourcesContent":["'use client'
|
|
1
|
+
{"version":3,"file":"hover-card.js","names":["HoverCardPrimitive"],"sources":["../../packages/components/ui/hover-card.tsx"],"sourcesContent":["'use client';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { HoverCard as HoverCardPrimitive } from 'radix-ui';\n\nfunction HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>) {\n return <HoverCardPrimitive.Root data-slot=\"hover-card\" {...props} />;\n}\n\nfunction HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {\n return <HoverCardPrimitive.Trigger data-slot=\"hover-card-trigger\" {...props} />;\n}\n\nfunction HoverCardContent({ className, align = 'center', sideOffset = 4, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>) {\n return (\n <HoverCardPrimitive.Portal data-slot=\"hover-card-portal\">\n <HoverCardPrimitive.Content\n data-slot=\"hover-card-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n );\n}\n\nexport { HoverCard, HoverCardContent, HoverCardTrigger };\n"],"mappings":"8IAKA,SAAS,EAAU,CAAE,GAAG,GAA+D,CACrF,OAAO,EAACA,EAAmB,KAAA,CAAK,YAAU,aAAa,GAAI,GAAS,CAGtE,SAAS,EAAiB,CAAE,GAAG,GAAkE,CAC/F,OAAO,EAACA,EAAmB,QAAA,CAAQ,YAAU,qBAAqB,GAAI,GAAS,CAGjF,SAAS,EAAiB,CAAE,YAAW,QAAQ,SAAU,aAAa,EAAG,GAAG,GAAkE,CAC5I,OACE,EAACA,EAAmB,OAAA,CAAO,YAAU,6BACnC,EAACA,EAAmB,QAAA,CAClB,YAAU,qBACH,QACK,aACZ,UAAW,EACT,oeACA,EACD,CACD,GAAI,GACJ,EACwB"}
|
package/dist/ui/image.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../skeleton-
|
|
1
|
+
require(`../skeleton-BC2E_ohw.cjs`);const e=require(`../image-C0mClPAY.cjs`);exports.Image=e.Image;
|
package/dist/ui/input-otp.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`)
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`);let t=require(`lucide-react`);t=e.__toESM(t);let n=require(`@customafk/react-toolkit/utils`);n=e.__toESM(n);let r=require(`react`);r=e.__toESM(r);let i=require(`react/jsx-runtime`);i=e.__toESM(i);let a=require(`input-otp`);a=e.__toESM(a);function o({className:e,containerClassName:t,...r}){return(0,i.jsx)(a.OTPInput,{"data-slot":`input-otp`,containerClassName:(0,n.cn)(`flex items-center gap-2 has-disabled:opacity-50`,t),className:(0,n.cn)(`disabled:cursor-not-allowed`,e),...r})}function s({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`input-otp-group`,className:(0,n.cn)(`flex items-center`,e),...t})}function c({index:e,className:t,...o}){let{char:s,hasFakeCaret:c,isActive:l}=(0,r.useContext)(a.OTPInputContext)?.slots[e]??{};return(0,i.jsxs)(`div`,{"data-slot":`input-otp-slot`,"data-active":l,className:(0,n.cn)(`data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]`,t),...o,children:[s,c&&(0,i.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,i.jsx)(`div`,{className:`animate-caret-blink bg-foreground h-4 w-px duration-1000`})})]})}function l({...e}){return(0,i.jsx)(`div`,{"data-slot":`input-otp-separator`,role:`separator`,...e,children:(0,i.jsx)(t.MinusIcon,{})})}exports.InputOTP=o,exports.InputOTPGroup=s,exports.InputOTPSeparator=l,exports.InputOTPSlot=c;
|
|
2
2
|
//# sourceMappingURL=input-otp.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.cjs","names":["OTPInput","OTPInputContext","MinusIcon"],"sources":["../../packages/components/ui/input-otp.tsx"],"sourcesContent":["'use client'
|
|
1
|
+
{"version":3,"file":"input-otp.cjs","names":["OTPInput","OTPInputContext","MinusIcon"],"sources":["../../packages/components/ui/input-otp.tsx"],"sourcesContent":["'use client';\nimport { useContext } from 'react';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { MinusIcon } from 'lucide-react';\n\nimport { OTPInput, OTPInputContext } from 'input-otp';\n\nfunction InputOTP({\n className,\n containerClassName,\n ...props\n}: React.ComponentProps<typeof OTPInput> & {\n containerClassName?: string;\n}) {\n return (\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn('flex items-center gap-2 has-disabled:opacity-50', containerClassName)}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n );\n}\n\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"input-otp-group\" className={cn('flex items-center', className)} {...props} />;\n}\n\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n index: number;\n}) {\n const inputOTPContext = useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n 'data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <MinusIcon />\n </div>\n );\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };\n"],"mappings":"oSAQA,SAAS,EAAS,CAChB,YACA,qBACA,GAAG,GAGF,CACD,OACE,EAAA,EAAA,KAACA,EAAAA,SAAAA,CACC,YAAU,YACV,oBAAA,EAAA,EAAA,IAAuB,kDAAmD,EAAmB,CAC7F,WAAA,EAAA,EAAA,IAAc,8BAA+B,EAAU,CACvD,GAAI,GACJ,CAIN,SAAS,EAAc,CAAE,YAAW,GAAG,GAAsC,CAC3E,OAAO,EAAA,EAAA,KAAC,MAAA,CAAI,YAAU,kBAAkB,WAAA,EAAA,EAAA,IAAc,oBAAqB,EAAU,CAAE,GAAI,GAAS,CAGtG,SAAS,EAAa,CACpB,QACA,YACA,GAAG,GAGF,CAED,GAAM,CAAE,OAAM,eAAc,aAAA,EAAA,EAAA,YADOC,EAAAA,gBAAgB,EACO,MAAM,IAAU,EAAE,CAE5E,OACE,EAAA,EAAA,MAAC,MAAA,CACC,YAAU,iBACV,cAAa,EACb,WAAA,EAAA,EAAA,IACE,2fACA,EACD,CACD,GAAI,YAEH,EACA,IACC,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,kFACb,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,2DAAA,CAA6D,EACxE,CAAA,EAEJ,CAIV,SAAS,EAAkB,CAAE,GAAG,GAAsC,CACpE,OACE,EAAA,EAAA,KAAC,MAAA,CAAI,YAAU,sBAAsB,KAAK,YAAY,GAAI,YACxD,EAAA,EAAA,KAACC,EAAAA,UAAAA,EAAAA,CAAY,EACT"}
|
package/dist/ui/input-otp.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime129 from "react/jsx-runtime";
|
|
2
2
|
import { OTPInput } from "input-otp";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/input-otp.d.ts
|
|
@@ -8,21 +8,21 @@ declare function InputOTP({
|
|
|
8
8
|
...props
|
|
9
9
|
}: React.ComponentProps<typeof OTPInput> & {
|
|
10
10
|
containerClassName?: string;
|
|
11
|
-
}):
|
|
11
|
+
}): react_jsx_runtime129.JSX.Element;
|
|
12
12
|
declare function InputOTPGroup({
|
|
13
13
|
className,
|
|
14
14
|
...props
|
|
15
|
-
}: React.ComponentProps<'div'>):
|
|
15
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime129.JSX.Element;
|
|
16
16
|
declare function InputOTPSlot({
|
|
17
17
|
index,
|
|
18
18
|
className,
|
|
19
19
|
...props
|
|
20
20
|
}: React.ComponentProps<'div'> & {
|
|
21
21
|
index: number;
|
|
22
|
-
}):
|
|
22
|
+
}): react_jsx_runtime129.JSX.Element;
|
|
23
23
|
declare function InputOTPSeparator({
|
|
24
24
|
...props
|
|
25
|
-
}: React.ComponentProps<'div'>):
|
|
25
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime129.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
28
28
|
//# sourceMappingURL=input-otp.d.cts.map
|
package/dist/ui/input-otp.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime139 from "react/jsx-runtime";
|
|
2
2
|
import { OTPInput } from "input-otp";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/input-otp.d.ts
|
|
@@ -8,21 +8,21 @@ declare function InputOTP({
|
|
|
8
8
|
...props
|
|
9
9
|
}: React.ComponentProps<typeof OTPInput> & {
|
|
10
10
|
containerClassName?: string;
|
|
11
|
-
}):
|
|
11
|
+
}): react_jsx_runtime139.JSX.Element;
|
|
12
12
|
declare function InputOTPGroup({
|
|
13
13
|
className,
|
|
14
14
|
...props
|
|
15
|
-
}: React.ComponentProps<'div'>):
|
|
15
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime139.JSX.Element;
|
|
16
16
|
declare function InputOTPSlot({
|
|
17
17
|
index,
|
|
18
18
|
className,
|
|
19
19
|
...props
|
|
20
20
|
}: React.ComponentProps<'div'> & {
|
|
21
21
|
index: number;
|
|
22
|
-
}):
|
|
22
|
+
}): react_jsx_runtime139.JSX.Element;
|
|
23
23
|
declare function InputOTPSeparator({
|
|
24
24
|
...props
|
|
25
|
-
}: React.ComponentProps<'div'>):
|
|
25
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime139.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
28
28
|
//# sourceMappingURL=input-otp.d.ts.map
|
package/dist/ui/input-otp.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{MinusIcon as e}from"lucide-react";import{cn as t}from"@customafk/react-toolkit/utils";import{useContext as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{OTPInput as a,OTPInputContext as o}from"input-otp";function s({className:e,containerClassName:n,...i}){return r(a,{"data-slot":`input-otp`,containerClassName:t(`flex items-center gap-2 has-disabled:opacity-50`,n),className:t(`disabled:cursor-not-allowed`,e),...i})}function c({className:e,...n}){return r(`div`,{"data-slot":`input-otp-group`,className:t(`flex items-center`,e),...n})}function l({index:e,className:a,...s}){let
|
|
1
|
+
"use client";import{MinusIcon as e}from"lucide-react";import{cn as t}from"@customafk/react-toolkit/utils";import{useContext as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{OTPInput as a,OTPInputContext as o}from"input-otp";function s({className:e,containerClassName:n,...i}){return r(a,{"data-slot":`input-otp`,containerClassName:t(`flex items-center gap-2 has-disabled:opacity-50`,n),className:t(`disabled:cursor-not-allowed`,e),...i})}function c({className:e,...n}){return r(`div`,{"data-slot":`input-otp-group`,className:t(`flex items-center`,e),...n})}function l({index:e,className:a,...s}){let{char:c,hasFakeCaret:l,isActive:u}=n(o)?.slots[e]??{};return i(`div`,{"data-slot":`input-otp-slot`,"data-active":u,className:t(`data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]`,a),...s,children:[c,l&&r(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:r(`div`,{className:`animate-caret-blink bg-foreground h-4 w-px duration-1000`})})]})}function u({...t}){return r(`div`,{"data-slot":`input-otp-separator`,role:`separator`,...t,children:r(e,{})})}export{s as InputOTP,c as InputOTPGroup,u as InputOTPSeparator,l as InputOTPSlot};
|
|
2
2
|
//# sourceMappingURL=input-otp.js.map
|
package/dist/ui/input-otp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.js","names":[],"sources":["../../packages/components/ui/input-otp.tsx"],"sourcesContent":["'use client'
|
|
1
|
+
{"version":3,"file":"input-otp.js","names":[],"sources":["../../packages/components/ui/input-otp.tsx"],"sourcesContent":["'use client';\nimport { useContext } from 'react';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { MinusIcon } from 'lucide-react';\n\nimport { OTPInput, OTPInputContext } from 'input-otp';\n\nfunction InputOTP({\n className,\n containerClassName,\n ...props\n}: React.ComponentProps<typeof OTPInput> & {\n containerClassName?: string;\n}) {\n return (\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn('flex items-center gap-2 has-disabled:opacity-50', containerClassName)}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n );\n}\n\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"input-otp-group\" className={cn('flex items-center', className)} {...props} />;\n}\n\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n index: number;\n}) {\n const inputOTPContext = useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n 'data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <MinusIcon />\n </div>\n );\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };\n"],"mappings":"yPAQA,SAAS,EAAS,CAChB,YACA,qBACA,GAAG,GAGF,CACD,OACE,EAAC,EAAA,CACC,YAAU,YACV,mBAAoB,EAAG,kDAAmD,EAAmB,CAC7F,UAAW,EAAG,8BAA+B,EAAU,CACvD,GAAI,GACJ,CAIN,SAAS,EAAc,CAAE,YAAW,GAAG,GAAsC,CAC3E,OAAO,EAAC,MAAA,CAAI,YAAU,kBAAkB,UAAW,EAAG,oBAAqB,EAAU,CAAE,GAAI,GAAS,CAGtG,SAAS,EAAa,CACpB,QACA,YACA,GAAG,GAGF,CAED,GAAM,CAAE,OAAM,eAAc,YADJ,EAAW,EAAgB,EACO,MAAM,IAAU,EAAE,CAE5E,OACE,EAAC,MAAA,CACC,YAAU,iBACV,cAAa,EACb,UAAW,EACT,2fACA,EACD,CACD,GAAI,YAEH,EACA,GACC,EAAC,MAAA,CAAI,UAAU,iFACb,EAAC,MAAA,CAAI,UAAU,2DAAA,CAA6D,EACxE,CAAA,EAEJ,CAIV,SAAS,EAAkB,CAAE,GAAG,GAAsC,CACpE,OACE,EAAC,MAAA,CAAI,YAAU,sBAAsB,KAAK,YAAY,GAAI,WACxD,EAAC,EAAA,EAAA,CAAY,EACT"}
|
package/dist/ui/input.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require(`../input-
|
|
1
|
+
"use client";const e=require(`../input-D_tClptL.cjs`);exports.Input=e.Input;
|
package/dist/ui/input.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Input } from "../input-
|
|
1
|
+
import { Input } from "../input-EieQSty7.cjs";
|
|
2
2
|
export { Input };
|
package/dist/ui/input.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Input } from "../input-
|
|
1
|
+
import { Input } from "../input-BbxBfHG5.js";
|
|
2
2
|
export { Input };
|
package/dist/ui/input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Input as e}from"../input-
|
|
1
|
+
"use client";import{Input as e}from"../input-BStypTnq.js";export{e as Input};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../input-
|
|
1
|
+
require(`../../input-D_tClptL.cjs`);const e=require(`../../search-input-ryU0Mvaa.cjs`);exports.SearchInput=e.SearchInput;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Input } from "../../input-
|
|
2
|
-
import * as
|
|
1
|
+
import { Input } from "../../input-EieQSty7.cjs";
|
|
2
|
+
import * as react_jsx_runtime265 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/inputs/search-input.d.ts
|
|
5
5
|
type Props = React.ComponentPropsWithoutRef<typeof Input>;
|
|
6
6
|
declare const SearchInput: ({
|
|
7
7
|
className,
|
|
8
8
|
...rest
|
|
9
|
-
}: Props) =>
|
|
9
|
+
}: Props) => react_jsx_runtime265.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { SearchInput };
|
|
12
12
|
//# sourceMappingURL=search-input.d.cts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Input } from "../../input-
|
|
2
|
-
import * as
|
|
1
|
+
import { Input } from "../../input-BbxBfHG5.js";
|
|
2
|
+
import * as react_jsx_runtime265 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/inputs/search-input.d.ts
|
|
5
5
|
type Props = React.ComponentPropsWithoutRef<typeof Input>;
|
|
6
6
|
declare const SearchInput: ({
|
|
7
7
|
className,
|
|
8
8
|
...rest
|
|
9
|
-
}: Props) =>
|
|
9
|
+
}: Props) => react_jsx_runtime265.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { SearchInput };
|
|
12
12
|
//# sourceMappingURL=search-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../input-
|
|
1
|
+
import"../../input-BStypTnq.js";import{SearchInput as e}from"../../search-input-BI1RjMuQ.js";export{e as SearchInput};
|
package/dist/ui/item.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../dist-CAevLI5t.cjs`),n=require(`../separator-DMMoR-d2.cjs`);let r=require(`@customafk/react-toolkit/utils`);r=e.__toESM(r);let i=require(`react/jsx-runtime`);i=e.__toESM(i);let a=require(`class-variance-authority`);a=e.__toESM(a);function o({className:e,...t}){return(0,i.jsx)(`div`,{role:`list`,"data-slot":`item-group`,className:(0,r.cn)(`group/item-group flex flex-col`,e),...t})}function s({className:e,...t}){return(0,i.jsx)(n.Separator,{"data-slot":`item-separator`,orientation:`horizontal`,className:(0,r.cn)(`my-0`,e),...t})}const c=(0,a.cva)(`group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-primary-strong focus-visible:ring-primary-weak focus-visible:ring-[3px]`,{variants:{variant:{default:`bg-transparent`,outline:`border-border`,muted:`bg-muted-weak`},size:{default:`p-4 gap-4 `,sm:`py-3 px-4 gap-2.5`}},defaultVariants:{variant:`default`,size:`default`}});function l({className:e,variant:n=`default`,size:a=`default`,asChild:o=!1,...s}){return(0,i.jsx)(o?t.Slot:`div`,{"data-slot":`item`,"data-variant":n,"data-size":a,className:(0,r.cn)(c({variant:n,size:a,className:e})),...s})}const u=(0,a.cva)(`flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5`,{variants:{variant:{default:`bg-transparent`,icon:`size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4`,image:`size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover`}},defaultVariants:{variant:`default`}});function d({className:e,variant:t=`default`,...n}){return(0,i.jsx)(`div`,{"data-slot":`item-media`,"data-variant":t,className:(0,r.cn)(u({variant:t,className:e})),...n})}function f({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`item-content`,className:(0,r.cn)(`flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none`,e),...t})}function p({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`item-title`,className:(0,r.cn)(`flex w-fit items-center gap-2 text-sm leading-snug font-medium`,e),...t})}function m({className:e,...t}){return(0,i.jsx)(`p`,{"data-slot":`item-description`,className:(0,r.cn)(`text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...t})}function h({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`item-actions`,className:(0,r.cn)(`flex items-center gap-2`,e),...t})}function g({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`item-header`,className:(0,r.cn)(`flex basis-full items-center justify-between gap-2`,e),...t})}function _({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`item-footer`,className:(0,r.cn)(`flex basis-full items-center justify-between gap-2`,e),...t})}exports.Item=l,exports.ItemActions=h,exports.ItemContent=f,exports.ItemDescription=m,exports.ItemFooter=_,exports.ItemGroup=o,exports.ItemHeader=g,exports.ItemMedia=d,exports.ItemSeparator=s,exports.ItemTitle=p;
|
|
2
|
+
//# sourceMappingURL=item.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.cjs","names":["Separator","Slot"],"sources":["../../packages/components/ui/item.tsx"],"sourcesContent":["import { cn } from '@customafk/react-toolkit/utils';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Separator } from '@/components/ui/separator';\n\nfunction ItemGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return <div role=\"list\" data-slot=\"item-group\" className={cn('group/item-group flex flex-col', className)} {...props} />;\n}\n\nfunction ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>) {\n return <Separator data-slot=\"item-separator\" orientation=\"horizontal\" className={cn('my-0', className)} {...props} />;\n}\n\nconst itemVariants = cva(\n 'group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-primary-strong focus-visible:ring-primary-weak focus-visible:ring-[3px]',\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n outline: 'border-border',\n muted: 'bg-muted-weak',\n },\n size: {\n default: 'p-4 gap-4 ',\n sm: 'py-3 px-4 gap-2.5',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n);\n\nfunction Item({\n className,\n variant = 'default',\n size = 'default',\n asChild = false,\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof itemVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'div';\n return <Comp data-slot=\"item\" data-variant={variant} data-size={size} className={cn(itemVariants({ variant, size, className }))} {...props} />;\n}\n\nconst itemMediaVariants = cva(\n 'flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5',\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n icon: \"size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4\",\n image: 'size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nfunction ItemMedia({ className, variant = 'default', ...props }: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>) {\n return <div data-slot=\"item-media\" data-variant={variant} className={cn(itemMediaVariants({ variant, className }))} {...props} />;\n}\n\nfunction ItemContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"item-content\" className={cn('flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none', className)} {...props} />;\n}\n\nfunction ItemTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"item-title\" className={cn('flex w-fit items-center gap-2 text-sm leading-snug font-medium', className)} {...props} />;\n}\n\nfunction ItemDescription({ className, ...props }: React.ComponentProps<'p'>) {\n return (\n <p\n data-slot=\"item-description\"\n className={cn(\n 'text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction ItemActions({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"item-actions\" className={cn('flex items-center gap-2', className)} {...props} />;\n}\n\nfunction ItemHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"item-header\" className={cn('flex basis-full items-center justify-between gap-2', className)} {...props} />;\n}\n\nfunction ItemFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"item-footer\" className={cn('flex basis-full items-center justify-between gap-2', className)} {...props} />;\n}\n\nexport { Item, ItemMedia, ItemContent, ItemActions, ItemGroup, ItemSeparator, ItemTitle, ItemDescription, ItemHeader, ItemFooter };\n"],"mappings":"4RAMA,SAAS,EAAU,CAAE,YAAW,GAAG,GAAsC,CACvE,OAAO,EAAA,EAAA,KAAC,MAAA,CAAI,KAAK,OAAO,YAAU,aAAa,WAAA,EAAA,EAAA,IAAc,iCAAkC,EAAU,CAAE,GAAI,GAAS,CAG1H,SAAS,EAAc,CAAE,YAAW,GAAG,GAAiD,CACtF,OAAO,EAAA,EAAA,KAACA,EAAAA,UAAAA,CAAU,YAAU,iBAAiB,YAAY,aAAa,WAAA,EAAA,EAAA,IAAc,OAAQ,EAAU,CAAE,GAAI,GAAS,CAGvH,MAAM,GAAA,EAAA,EAAA,KACJ,4QACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,iBACT,QAAS,gBACT,MAAO,gBACR,CACD,KAAM,CACJ,QAAS,aACT,GAAI,oBACL,CACF,CACD,gBAAiB,CACf,QAAS,UACT,KAAM,UACP,CACF,CACF,CAED,SAAS,EAAK,CACZ,YACA,UAAU,UACV,OAAO,UACP,UAAU,GACV,GAAG,GACuF,CAE1F,OAAO,EAAA,EAAA,KADM,EAAUC,EAAAA,KAAO,MAAA,CACjB,YAAU,OAAO,eAAc,EAAS,YAAW,EAAM,WAAA,EAAA,EAAA,IAAc,EAAa,CAAE,UAAS,OAAM,YAAW,CAAC,CAAC,CAAE,GAAI,GAAS,CAGhJ,MAAM,GAAA,EAAA,EAAA,KACJ,qMACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,iBACT,KAAM,yEACN,MAAO,4EACR,CACF,CACD,gBAAiB,CACf,QAAS,UACV,CACF,CACF,CAED,SAAS,EAAU,CA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
3
|
+
import * as class_variance_authority_types3 from "class-variance-authority/types";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
5
|
+
|
|
6
|
+
//#region packages/components/ui/item.d.ts
|
|
7
|
+
declare function ItemGroup({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime134.JSX.Element;
|
|
11
|
+
declare function ItemSeparator({
|
|
12
|
+
className,
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof Separator>): react_jsx_runtime134.JSX.Element;
|
|
15
|
+
declare const itemVariants: (props?: ({
|
|
16
|
+
variant?: "muted" | "default" | "outline" | null | undefined;
|
|
17
|
+
size?: "sm" | "default" | null | undefined;
|
|
18
|
+
} & class_variance_authority_types3.ClassProp) | undefined) => string;
|
|
19
|
+
declare function Item({
|
|
20
|
+
className,
|
|
21
|
+
variant,
|
|
22
|
+
size,
|
|
23
|
+
asChild,
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<'div'> & VariantProps<typeof itemVariants> & {
|
|
26
|
+
asChild?: boolean;
|
|
27
|
+
}): react_jsx_runtime134.JSX.Element;
|
|
28
|
+
declare const itemMediaVariants: (props?: ({
|
|
29
|
+
variant?: "default" | "icon" | "image" | null | undefined;
|
|
30
|
+
} & class_variance_authority_types3.ClassProp) | undefined) => string;
|
|
31
|
+
declare function ItemMedia({
|
|
32
|
+
className,
|
|
33
|
+
variant,
|
|
34
|
+
...props
|
|
35
|
+
}: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>): react_jsx_runtime134.JSX.Element;
|
|
36
|
+
declare function ItemContent({
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime134.JSX.Element;
|
|
40
|
+
declare function ItemTitle({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime134.JSX.Element;
|
|
44
|
+
declare function ItemDescription({
|
|
45
|
+
className,
|
|
46
|
+
...props
|
|
47
|
+
}: React.ComponentProps<'p'>): react_jsx_runtime134.JSX.Element;
|
|
48
|
+
declare function ItemActions({
|
|
49
|
+
className,
|
|
50
|
+
...props
|
|
51
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime134.JSX.Element;
|
|
52
|
+
declare function ItemHeader({
|
|
53
|
+
className,
|
|
54
|
+
...props
|
|
55
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime134.JSX.Element;
|
|
56
|
+
declare function ItemFooter({
|
|
57
|
+
className,
|
|
58
|
+
...props
|
|
59
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime134.JSX.Element;
|
|
60
|
+
//#endregion
|
|
61
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
62
|
+
//# sourceMappingURL=item.d.cts.map
|