@customafk/lunas-ui 0.0.66 → 0.0.67
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-Dvke5DtJ.js → add-new-BFDOXej7.js} +2 -2
- package/dist/{add-new-Dvke5DtJ.js.map → add-new-BFDOXej7.js.map} +1 -1
- package/dist/{add-new-vx3iCRLK.cjs → add-new-D3b8hc2C.cjs} +2 -2
- package/dist/{add-new-vx3iCRLK.cjs.map → add-new-D3b8hc2C.cjs.map} +1 -1
- package/dist/{alert-dialog-BELDR1IC.js → alert-dialog-B5dXkMIF.js} +1 -1
- package/dist/{alert-dialog-BELDR1IC.js.map → alert-dialog-B5dXkMIF.js.map} +1 -1
- package/dist/{alert-dialog-CAeBwm2W.cjs → alert-dialog-D-4wxqLK.cjs} +1 -1
- package/dist/{alert-dialog-CAeBwm2W.cjs.map → alert-dialog-D-4wxqLK.cjs.map} +1 -1
- package/dist/{avatar-CGYZELuM.cjs → avatar-Ch6Lx2oc.cjs} +1 -1
- package/dist/{avatar-CGYZELuM.cjs.map → avatar-Ch6Lx2oc.cjs.map} +1 -1
- package/dist/{avatar-DYfrjbMs.js → avatar-ClIgQDJO.js} +1 -1
- package/dist/{avatar-DYfrjbMs.js.map → avatar-ClIgQDJO.js.map} +1 -1
- package/dist/{badge-BE7eawbg.js → badge-6RQPy3Eo.js} +1 -1
- package/dist/{badge-BE7eawbg.js.map → badge-6RQPy3Eo.js.map} +1 -1
- package/dist/{badge-BMNKZpjB.cjs → badge-BMXpbMfX.cjs} +1 -1
- package/dist/{badge-BMNKZpjB.cjs.map → badge-BMXpbMfX.cjs.map} +1 -1
- package/dist/{button-D8OpZBOr.d.cts → button-NPRxTW9Y.d.cts} +4 -4
- package/dist/{button-Bz9yIbYt.d.ts → button-ld6DUDGr.d.ts} +4 -4
- package/dist/cards/grid-product-card.cjs +1 -1
- package/dist/cards/grid-product-card.js +1 -1
- package/dist/cards/product-card.cjs +1 -1
- package/dist/cards/product-card.js +1 -1
- package/dist/{command-D0Yqyd7M.d.ts → command-BL20khiI.d.ts} +12 -12
- package/dist/{command-tDhBQnm6.cjs → command-BNYekOzL.cjs} +2 -2
- package/dist/{command-tDhBQnm6.cjs.map → command-BNYekOzL.cjs.map} +1 -1
- package/dist/{command-Dk_NXe3X.d.cts → command-CgW_wSCe.d.cts} +12 -12
- package/dist/{command-BJ6dPKIN.js → command-CyWyRcle.js} +2 -2
- package/dist/{command-BJ6dPKIN.js.map → command-CyWyRcle.js.map} +1 -1
- package/dist/data-display/country.cjs +1 -1
- package/dist/data-display/country.js +1 -1
- package/dist/data-display/data-list.cjs +1 -1
- package/dist/data-display/data-list.js +1 -1
- package/dist/data-display/date-tooltip.cjs +1 -1
- package/dist/data-display/date-tooltip.js +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.d.cts +2 -2
- package/dist/data-display/empty.d.ts +2 -2
- package/dist/data-display/empty.js +1 -1
- package/dist/data-display/name.cjs +1 -1
- package/dist/data-display/name.js +1 -1
- package/dist/data-display/phone-number.cjs +1 -1
- package/dist/data-display/phone-number.js +1 -1
- package/dist/data-display/role-badge.cjs +1 -1
- package/dist/data-display/role-badge.js +1 -1
- package/dist/data-display/statistic.cjs +1 -1
- package/dist/data-display/statistic.d.cts +2 -2
- package/dist/data-display/statistic.d.ts +2 -2
- package/dist/data-display/statistic.js +1 -1
- package/dist/data-display/user.cjs +1 -1
- package/dist/data-display/user.js +1 -1
- package/dist/{date-D_78qgVx.js → date-DWxL795U.js} +1 -1
- package/dist/{date-D_78qgVx.js.map → date-DWxL795U.js.map} +1 -1
- package/dist/{date-XHYNYGxU.cjs → date-wo9LyN6l.cjs} +1 -1
- package/dist/{date-XHYNYGxU.cjs.map → date-wo9LyN6l.cjs.map} +1 -1
- package/dist/{dialog-BfzZHsN5.d.ts → dialog-BfrTUQrJ.d.ts} +12 -12
- package/dist/{dialog-BJ1YyPJ1.d.cts → dialog-CTwMjrks.d.cts} +12 -12
- package/dist/{dialog-DIvrOnbv.js → dialog-pMHkBJ-w.js} +1 -1
- package/dist/{dialog-DIvrOnbv.js.map → dialog-pMHkBJ-w.js.map} +1 -1
- package/dist/{dialog-DQ9MCS8A.cjs → dialog-wX27mb8E.cjs} +1 -1
- package/dist/{dialog-DQ9MCS8A.cjs.map → dialog-wX27mb8E.cjs.map} +1 -1
- package/dist/dialogs/confirm-dialog.cjs +1 -1
- package/dist/dialogs/confirm-dialog.js +1 -1
- package/dist/dialogs/detail-dialog/component/sidebar.cjs +1 -1
- package/dist/dialogs/detail-dialog/component/sidebar.d.cts +28 -28
- package/dist/dialogs/detail-dialog/component/sidebar.d.ts +28 -28
- 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/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.d.cts +2 -2
- package/dist/dialogs/form-dialog.js +1 -1
- package/dist/dialogs/loading-dialog.cjs +1 -1
- package/dist/dialogs/loading-dialog.js +1 -1
- package/dist/{drawer-DDwXRMGp.js → drawer-DnhgwetT.js} +1 -1
- package/dist/{drawer-DDwXRMGp.js.map → drawer-DnhgwetT.js.map} +1 -1
- package/dist/{drawer-CjLYonvG.cjs → drawer-sRfKhXA3.cjs} +1 -1
- package/dist/{drawer-CjLYonvG.cjs.map → drawer-sRfKhXA3.cjs.map} +1 -1
- package/dist/{dropdown-menu-BTtuJiO_.js → dropdown-menu-Bj39Rmxd.js} +1 -1
- package/dist/{dropdown-menu-BTtuJiO_.js.map → dropdown-menu-Bj39Rmxd.js.map} +1 -1
- package/dist/{dropdown-menu-4TQefUjw.cjs → dropdown-menu-SNcBwTOA.cjs} +1 -1
- package/dist/{dropdown-menu-4TQefUjw.cjs.map → dropdown-menu-SNcBwTOA.cjs.map} +1 -1
- package/dist/{error-dialog-DFfdCNGJ.js → error-dialog-CphiTB4y.js} +2 -2
- package/dist/{error-dialog-DFfdCNGJ.js.map → error-dialog-CphiTB4y.js.map} +1 -1
- package/dist/{error-dialog-DJwjY5C8.cjs → error-dialog-DGg0x5xF.cjs} +2 -2
- package/dist/{error-dialog-DJwjY5C8.cjs.map → error-dialog-DGg0x5xF.cjs.map} +1 -1
- package/dist/{flex-DHGKjMIL.js → flex-BZHWRUkz.js} +1 -1
- package/dist/{flex-DHGKjMIL.js.map → flex-BZHWRUkz.js.map} +1 -1
- package/dist/{flex-e9OPvFYl.cjs → flex-DMgD86BT.cjs} +1 -1
- package/dist/{flex-e9OPvFYl.cjs.map → flex-DMgD86BT.cjs.map} +1 -1
- package/dist/{form-C4Zn5Meu.js → form-B-KLKj5u.js} +2 -2
- package/dist/{form-C4Zn5Meu.js.map → form-B-KLKj5u.js.map} +1 -1
- package/dist/{form-A2qAueDp.cjs → form-CtpHZKmh.cjs} +2 -2
- package/dist/{form-A2qAueDp.cjs.map → form-CtpHZKmh.cjs.map} +1 -1
- package/dist/{form-wrapper-p2OwxpA0.cjs → form-wrapper-C3pU1F5r.cjs} +2 -2
- package/dist/{form-wrapper-p2OwxpA0.cjs.map → form-wrapper-C3pU1F5r.cjs.map} +1 -1
- package/dist/{form-wrapper-BvnGERhM.js → form-wrapper-Deo8gKv5.js} +2 -2
- package/dist/{form-wrapper-BvnGERhM.js.map → form-wrapper-Deo8gKv5.js.map} +1 -1
- package/dist/forms/combobox-field.cjs +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/date-field.cjs +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/form-wrapper.cjs +1 -1
- package/dist/forms/form-wrapper.d.cts +2 -2
- package/dist/forms/form-wrapper.d.ts +2 -2
- package/dist/forms/form-wrapper.js +1 -1
- package/dist/forms/multi-select-field.cjs +1 -1
- package/dist/forms/multi-select-field.d.cts +2 -2
- package/dist/forms/multi-select-field.d.ts +2 -2
- package/dist/forms/multi-select-field.js +1 -1
- package/dist/forms/number-field.cjs +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/password-field.cjs +1 -1
- package/dist/forms/password-field.d.cts +2 -2
- package/dist/forms/password-field.js +1 -1
- package/dist/forms/select-field.cjs +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/switch-field.cjs +1 -1
- package/dist/forms/switch-field.d.cts +2 -2
- package/dist/forms/switch-field.d.ts +2 -2
- package/dist/forms/switch-field.js +1 -1
- package/dist/forms/text-field.cjs +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/textarea-field.cjs +1 -1
- package/dist/forms/textarea-field.d.ts +2 -2
- package/dist/forms/textarea-field.js +1 -1
- package/dist/{image-Cm4vJeHx.cjs → image-D3D8dE6s.cjs} +2 -2
- package/dist/image-D3D8dE6s.cjs.map +1 -0
- package/dist/{image-BdTzYp1S.js → image-Dm3jT9QX.js} +2 -2
- package/dist/{image-BdTzYp1S.js.map → image-Dm3jT9QX.js.map} +1 -1
- package/dist/{input-CZXCSepU.d.ts → input-CWzkJbaD.d.ts} +3 -3
- package/dist/{input-Cn3ENNm6.d.cts → input-Dx2DxNMy.d.cts} +3 -3
- package/dist/{label-BM6rVDz-.cjs → label-BZqk7MPJ.cjs} +1 -1
- package/dist/{label-BM6rVDz-.cjs.map → label-BZqk7MPJ.cjs.map} +1 -1
- package/dist/{label-D4GUfxTB.js → label-HVpeECNr.js} +1 -1
- package/dist/{label-D4GUfxTB.js.map → label-HVpeECNr.js.map} +1 -1
- package/dist/layouts/app-layout/index.cjs +1 -1
- package/dist/layouts/app-layout/index.d.cts +3 -3
- package/dist/layouts/app-layout/index.d.ts +28 -28
- package/dist/layouts/app-layout/index.js +1 -1
- package/dist/layouts/flex.cjs +1 -1
- package/dist/layouts/flex.d.cts +4 -4
- package/dist/layouts/flex.js +1 -1
- package/dist/layouts/service-layout/index.cjs +1 -1
- package/dist/layouts/service-layout/index.d.cts +3 -3
- 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-BGoJRW7y.cjs → multi-select-DRKqFg1M.cjs} +2 -2
- package/dist/{multi-select-BGoJRW7y.cjs.map → multi-select-DRKqFg1M.cjs.map} +1 -1
- package/dist/{multi-select-B5ACggbh.js → multi-select-DyhAPckx.js} +2 -2
- package/dist/{multi-select-B5ACggbh.js.map → multi-select-DyhAPckx.js.map} +1 -1
- package/dist/{paragraph-TwyIN27a.js → paragraph-BwSskqDY.js} +1 -1
- package/dist/{paragraph-TwyIN27a.js.map → paragraph-BwSskqDY.js.map} +1 -1
- package/dist/{paragraph-D466nycw.cjs → paragraph-CI28eVP0.cjs} +1 -1
- package/dist/{paragraph-D466nycw.cjs.map → paragraph-CI28eVP0.cjs.map} +1 -1
- package/dist/{refresh-CayYkwzH.cjs → refresh-CQyFVZx9.cjs} +2 -2
- package/dist/{refresh-CayYkwzH.cjs.map → refresh-CQyFVZx9.cjs.map} +1 -1
- package/dist/{refresh-BjCic3TP.js → refresh-CTcKzu_a.js} +2 -2
- package/dist/{refresh-BjCic3TP.js.map → refresh-CTcKzu_a.js.map} +1 -1
- package/dist/{scroll-area-C7kyYKAP.js → scroll-area-CqevC_nb.js} +1 -1
- package/dist/{scroll-area-C7kyYKAP.js.map → scroll-area-CqevC_nb.js.map} +1 -1
- package/dist/{scroll-area-CrifnXd7.cjs → scroll-area-Dgjr1n1T.cjs} +1 -1
- package/dist/{scroll-area-CrifnXd7.cjs.map → scroll-area-Dgjr1n1T.cjs.map} +1 -1
- package/dist/{search-input-BZnoWja5.cjs → search-input-BkhVqB3R.cjs} +1 -1
- package/dist/{search-input-BZnoWja5.cjs.map → search-input-BkhVqB3R.cjs.map} +1 -1
- package/dist/{search-input-CLO-QRF1.js → search-input-DnYrPBeT.js} +1 -1
- package/dist/{search-input-CLO-QRF1.js.map → search-input-DnYrPBeT.js.map} +1 -1
- package/dist/{separator-ClWRPBeh.d.ts → separator-9s0ppov1.d.ts} +3 -3
- package/dist/{separator-N8MVZxoC.d.cts → separator-ZGvcRkrl.d.cts} +3 -3
- package/dist/{sidebar-BOj6aD9h.cjs → sidebar-CROF88rz.cjs} +2 -2
- package/dist/{sidebar-BOj6aD9h.cjs.map → sidebar-CROF88rz.cjs.map} +1 -1
- package/dist/{sidebar-DP3pg9uN.js → sidebar-CrStgrmq.js} +2 -2
- package/dist/{sidebar-DP3pg9uN.js.map → sidebar-CrStgrmq.js.map} +1 -1
- package/dist/table/index.cjs +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-Btz3llJc.cjs → table-CuhHhpgi.cjs} +2 -2
- package/dist/{table-Btz3llJc.cjs.map → table-CuhHhpgi.cjs.map} +1 -1
- package/dist/{table-BiZjONQ-.js → table-oROsZcz4.js} +2 -2
- package/dist/{table-BiZjONQ-.js.map → table-oROsZcz4.js.map} +1 -1
- package/dist/{title-BX8MBhB_.cjs → title-B51-Oj-Y.cjs} +1 -1
- package/dist/{title-BX8MBhB_.cjs.map → title-B51-Oj-Y.cjs.map} +1 -1
- package/dist/{title-C4w7vOR0.js → title-Cb4SosQb.js} +1 -1
- package/dist/{title-C4w7vOR0.js.map → title-Cb4SosQb.js.map} +1 -1
- package/dist/{toggle-C_TsU7XT.d.cts → toggle-DIRRdVOx.d.ts} +4 -4
- package/dist/{toggle-D1jSpEk0.d.ts → toggle-DpUG0EqP.d.cts} +5 -5
- package/dist/{tooltip-CbhtsOGz.d.cts → tooltip-BZDwRKZ6.d.cts} +6 -6
- package/dist/{tooltip-BMKX80GV.cjs → tooltip-CQ8hkJ42.cjs} +1 -1
- package/dist/{tooltip-BMKX80GV.cjs.map → tooltip-CQ8hkJ42.cjs.map} +1 -1
- package/dist/{tooltip-Bmdk684V.js → tooltip-CTUSyCdh.js} +1 -1
- package/dist/{tooltip-Bmdk684V.js.map → tooltip-CTUSyCdh.js.map} +1 -1
- package/dist/{tooltip-DHJrQ0qt.d.ts → tooltip-ChyvXWdm.d.ts} +6 -6
- package/dist/{types-D8BVDfSP.js → types-Cgr_eoPF.js} +1 -1
- package/dist/{types-D8BVDfSP.js.map → types-Cgr_eoPF.js.map} +1 -1
- package/dist/{types-B5_UaDJF.cjs → types-DMNCf28U.cjs} +1 -1
- package/dist/{types-B5_UaDJF.cjs.map → types-DMNCf28U.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/paragraph.js +1 -1
- 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.d.cts +6 -6
- package/dist/ui/alert.d.ts +6 -6
- package/dist/ui/aspect-ratio.d.cts +2 -2
- package/dist/ui/aspect-ratio.d.ts +2 -2
- 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/avatar.js +1 -1
- package/dist/ui/badge.cjs +1 -1
- package/dist/ui/badge.d.cts +4 -4
- package/dist/ui/badge.d.ts +4 -4
- package/dist/ui/badge.js +1 -1
- package/dist/ui/breadcrumb.d.cts +8 -8
- package/dist/ui/breadcrumb.d.ts +8 -8
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/buttons/add-new.cjs +1 -1
- package/dist/ui/buttons/add-new.js +1 -1
- package/dist/ui/buttons/refresh.cjs +1 -1
- package/dist/ui/buttons/refresh.js +1 -1
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/calendar.d.ts +4 -4
- package/dist/ui/card.d.cts +8 -8
- package/dist/ui/card.d.ts +8 -8
- package/dist/ui/carousel.d.cts +7 -7
- package/dist/ui/carousel.d.ts +7 -7
- package/dist/ui/collapsible.d.cts +4 -4
- package/dist/ui/collapsible.d.ts +4 -4
- 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.d.cts +16 -16
- package/dist/ui/context-menu.d.ts +16 -16
- 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/file-uploader.d.cts +2 -2
- package/dist/ui/file-uploader.d.ts +2 -2
- package/dist/ui/form.cjs +1 -1
- package/dist/ui/form.d.cts +7 -7
- package/dist/ui/form.d.ts +7 -7
- package/dist/ui/form.js +1 -1
- package/dist/ui/hover-card.d.cts +4 -4
- package/dist/ui/hover-card.d.ts +4 -4
- package/dist/ui/image.cjs +1 -1
- package/dist/ui/image.js +1 -1
- package/dist/ui/input-otp.d.cts +5 -5
- package/dist/ui/input-otp.d.ts +5 -5
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.ts +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/label.cjs +1 -1
- package/dist/ui/label.d.cts +2 -2
- package/dist/ui/label.d.ts +2 -2
- package/dist/ui/label.js +1 -1
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/menubar.d.ts +17 -17
- 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.d.cts +9 -9
- package/dist/ui/navigation-menu.d.ts +11 -11
- package/dist/ui/pagination.d.cts +9 -9
- package/dist/ui/pagination.d.ts +9 -9
- package/dist/ui/popover.d.ts +5 -5
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/progress.d.ts +2 -2
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/radio-group.d.ts +3 -3
- package/dist/ui/resizable.d.cts +4 -4
- package/dist/ui/resizable.d.ts +4 -4
- 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.d.cts +11 -11
- package/dist/ui/select.d.ts +11 -11
- package/dist/ui/separator.d.cts +1 -1
- package/dist/ui/separator.d.ts +1 -1
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/sheet.d.ts +9 -9
- package/dist/ui/sidebar.cjs +1 -1
- package/dist/ui/sidebar.d.cts +28 -28
- package/dist/ui/sidebar.d.ts +30 -30
- package/dist/ui/sidebar.js +1 -1
- package/dist/ui/skeleton.d.cts +2 -2
- package/dist/ui/skeleton.d.ts +2 -2
- package/dist/ui/slider.d.cts +2 -2
- package/dist/ui/slider.d.ts +2 -2
- package/dist/ui/sonner.d.cts +2 -2
- package/dist/ui/sonner.d.ts +2 -2
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/switch.d.ts +2 -2
- 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.d.cts +5 -5
- package/dist/ui/tabs.d.ts +5 -5
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/textarea.d.ts +2 -2
- package/dist/ui/toggle-group.d.cts +4 -4
- package/dist/ui/toggle-group.d.ts +4 -4
- package/dist/ui/toggle.d.cts +1 -1
- package/dist/ui/toggle.d.ts +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/dist/ui/tooltip.js +1 -1
- package/package.json +1 -1
- package/dist/image-Cm4vJeHx.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
2
2
|
import { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/form-wrapper.d.ts
|
|
@@ -18,7 +18,7 @@ declare const FormWrapper: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
18
18
|
onError,
|
|
19
19
|
onSubcribe,
|
|
20
20
|
children
|
|
21
|
-
}: React.PropsWithChildren<Props<TFieldValues>>) =>
|
|
21
|
+
}: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime9.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { FormWrapper };
|
|
24
24
|
//# sourceMappingURL=form-wrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../button-CvQQTSka.js";import"../alert-dialog-
|
|
1
|
+
import"../button-CvQQTSka.js";import"../alert-dialog-B5dXkMIF.js";import"../error-dialog-CphiTB4y.js";import"../label-HVpeECNr.js";import"../form-B-KLKj5u.js";import{FormWrapper as e}from"../form-wrapper-Deo8gKv5.js";export{e as FormWrapper};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../button-119IIVCy.cjs`),require(`../label-
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../button-119IIVCy.cjs`),require(`../label-BZqk7MPJ.cjs`);const t=require(`../form-CtpHZKmh.cjs`);require(`../dialog-wX27mb8E.cjs`),require(`../command-BNYekOzL.cjs`);const n=require(`../multi-select-DRKqFg1M.cjs`),r=e.__toESM(require(`react/jsx-runtime`)),i=({name:e,label:i=`Multi Select Field`,isShowLabel:a=!0,isShowErrorMsg:o,placeholder:s=`Select options`,description:c=``,options:l=[],onAdd:u})=>(0,r.jsx)(t.FormField,{name:e,render:({field:{value:e,onChange:d}})=>{let f=l.filter(t=>e?.includes(t.value)),p=e=>{let t=e.map(e=>e.value);d(t)};return(0,r.jsxs)(t.FormItem,{className:`w-full gap-0`,children:[a&&(0,r.jsx)(t.FormLabel,{children:i}),(0,r.jsx)(t.FormControl,{children:(0,r.jsx)(n.MultipleSelector,{placeholder:s,emptyIndicator:`No options available`,value:f,options:l,onChange:p,onAddNewItem:u})}),!!c&&(0,r.jsx)(t.FormDescription,{children:c}),o&&(0,r.jsx)(t.FormMessage,{})]})}});exports.MultiSelectField=i;
|
|
2
2
|
//# sourceMappingURL=multi-select-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/multi-select-field.d.ts
|
|
@@ -24,7 +24,7 @@ declare const MultiSelectField: <TFieldValues extends FieldValues = FieldValues>
|
|
|
24
24
|
description,
|
|
25
25
|
options,
|
|
26
26
|
onAdd
|
|
27
|
-
}: Props<TFieldValues>) =>
|
|
27
|
+
}: Props<TFieldValues>) => react_jsx_runtime5.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { MultiSelectField };
|
|
30
30
|
//# sourceMappingURL=multi-select-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/multi-select-field.d.ts
|
|
@@ -24,7 +24,7 @@ declare const MultiSelectField: <TFieldValues extends FieldValues = FieldValues>
|
|
|
24
24
|
description,
|
|
25
25
|
options,
|
|
26
26
|
onAdd
|
|
27
|
-
}: Props<TFieldValues>) =>
|
|
27
|
+
}: Props<TFieldValues>) => react_jsx_runtime3.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { MultiSelectField };
|
|
30
30
|
//# sourceMappingURL=multi-select-field.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import"../button-CvQQTSka.js";import"../label-
|
|
1
|
+
"use client";import"../button-CvQQTSka.js";import"../label-HVpeECNr.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-B-KLKj5u.js";import"../dialog-pMHkBJ-w.js";import"../command-CyWyRcle.js";import{MultipleSelector as o}from"../multi-select-DyhAPckx.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=({name:l,label:u=`Multi Select Field`,isShowLabel:d=!0,isShowErrorMsg:f,placeholder:p=`Select options`,description:m=``,options:h=[],onAdd:g})=>s(n,{name:l,render:({field:{value:n,onChange:l}})=>{let _=h.filter(e=>n?.includes(e.value)),v=e=>{let t=e.map(e=>e.value);l(t)};return c(r,{className:`w-full gap-0`,children:[d&&s(i,{children:u}),s(e,{children:s(o,{placeholder:p,emptyIndicator:`No options available`,value:_,options:h,onChange:v,onAddNewItem:g})}),!!m&&s(t,{children:m}),f&&s(a,{})]})}});export{l as MultiSelectField};
|
|
2
2
|
//# sourceMappingURL=multi-select-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-
|
|
1
|
+
const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-BZqk7MPJ.cjs`);const t=require(`../form-CtpHZKmh.cjs`),n=require(`../input-DgtTVBtN.cjs`),r=e.__toESM(require(`@customafk/react-toolkit/utils`)),i=e.__toESM(require(`react/jsx-runtime`)),a=e.__toESM(require(`react`)),o=e.__toESM(require(`react-hook-form`)),s=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,c=e=>Number(e).toLocaleString(),l=({disabled:e=!1,readonly:t=!1,allowNegative:o=!1,numberAfterDecimalPoint:l=2,roundingRule:u=`none`,value:d=``,unitText:f,decimal:p,placeholder:m,precision:h,onChange:g,onValueChange:_,onBlur:v,...y})=>{let b=(0,a.useRef)(null),x=(0,a.useRef)(null),[S,C]=(0,a.useState)(d.toString()),w=p?.[1]??l,T=p&&p[0]-p[1],E=(0,a.useMemo)(()=>s(o),[o]),D=(0,a.useCallback)(e=>{if(!w&&e.includes(`.`))return!1;let t=e.split(`.`)[1];return!t||t.length<=w},[w]),O=(0,a.useCallback)(e=>{if(!p||e===`-`)return!0;let[t,n=``]=e.split(`.`);return n.length<=p[1]&&(t.startsWith(`-`)?t.length-1:t.length)<=T},[p,T]),k=(0,a.useCallback)((e,t)=>{if(u===`none`)return e;let n=Math.pow(10,t),r=e*n;switch(u){case`up`:return Math.ceil(r)/n;case`down`:return Math.floor(r)/n;case`nearest`:return r%1<.1?Math.floor(r)/n:r%1>=.59?Math.ceil(r)/n:(Math.floor(r)+.5)/n;default:return e}},[u]),A=(0,a.useCallback)(e=>!l&&e.includes(`.`)||e.split(`.`)[1]?.length>l,[l]),j=(0,a.useCallback)(e=>{if(e===`0`)return`0`;if(!Number(e))return``;let t=parseFloat(e),n=Math.min(w-1,h||0),r=k(t,n).toString(),[i,a=``]=r.split(`.`),o=c(i);return a?`${o}.${a}`:o},[k,w,h]),M=(0,a.useCallback)(e=>{if(!p||e===`-`)return!0;let[t,n=``]=e.split(`.`),r=t.startsWith(`-`)?t.length-1:t.length,i=p[0]-p[1];return n.length<=p[1]&&r<=i},[p]),N=(0,a.useCallback)(e=>{g?.(e);let{value:t}=e.target;if(!t){_?.(void 0),C(``);return}let n=t===`0`,r=t===`-`&&o;if(n||r){_?.(0),C(t);return}let i=E.test(t)&&O(t)&&(p||D(t));if(!i)return;let a=parseFloat(t)||0;_?.(a),C(t)},[o,p,D,O,g,_,E]),P=(0,a.useCallback)(()=>{t||C(e=>e.replace(/,/g,``))},[t]),F=(0,a.useCallback)(()=>{t||(v?.(),C(e=>j(e)))},[t,v,j]);return(0,a.useEffect)(()=>{let e=document.activeElement===x.current;if(!d||!E.test(d.toString())||!M(d.toString())||!p&&A(d.toString())){C(``);return}C(t=>t===`-`?`-`:t?e?d.toString():j(d.toString()):``)},[p,j,d,A,M,E]),(0,a.useEffect)(()=>{if(!b.current||!x.current||!f)return;let e=b.current.offsetWidth;x.current.style.setProperty(`padding-right`,`${(e+10)/16}rem`)},[e,f]),(0,i.jsxs)(`div`,{className:`relative`,children:[(0,i.jsx)(n.Input,{...y,ref:x,value:S||(t?`0`:``),placeholder:m,disabled:e,readOnly:t,className:(0,r.cn)(`font-number text-end`,t&&`bg-muted text-muted-foreground`),onChange:N,onFocus:P,onBlur:F}),f&&(0,i.jsx)(`span`,{ref:b,className:`text-muted-foreground pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 text-sm`,children:f})]})},u=({name:e,label:n=`Number Field`,placeholder:r=`0`,isShowErrorMsg:a=!1,isShowCount:s=!1,unitText:c=``,description:u=``,onValueChange:d})=>{let f=(0,o.useWatch)({name:e});return(0,i.jsx)(t.FormField,{name:e,render:({field:{onChange:e,...o}})=>(0,i.jsxs)(t.FormItem,{className:`w-full gap-0`,children:[(0,i.jsx)(t.FormLabel,{children:n}),(0,i.jsx)(t.FormControl,{children:(0,i.jsx)(l,{...o,placeholder:r,className:`w-full`,unitText:c,onValueChange:t=>{e(t),d?.(t)}})}),s&&(0,i.jsxs)(`div`,{className:`text-muted-foreground text-end text-xs`,children:[f?.length??0,` characters`]}),!!u&&(0,i.jsx)(t.FormDescription,{children:u}),a&&(0,i.jsx)(t.FormMessage,{})]})})};exports.NumberField=u;
|
|
2
2
|
//# sourceMappingURL=number-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/number-field.d.ts
|
|
@@ -22,7 +22,7 @@ declare const NumberField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
22
22
|
unitText,
|
|
23
23
|
description,
|
|
24
24
|
onValueChange
|
|
25
|
-
}: Props<TFieldValues>) =>
|
|
25
|
+
}: Props<TFieldValues>) => react_jsx_runtime6.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { NumberField };
|
|
28
28
|
//# sourceMappingURL=number-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/number-field.d.ts
|
|
@@ -22,7 +22,7 @@ declare const NumberField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
22
22
|
unitText,
|
|
23
23
|
description,
|
|
24
24
|
onValueChange
|
|
25
|
-
}: Props<TFieldValues>) =>
|
|
25
|
+
}: Props<TFieldValues>) => react_jsx_runtime7.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { NumberField };
|
|
28
28
|
//# sourceMappingURL=number-field.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../label-
|
|
1
|
+
import"../label-HVpeECNr.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-B-KLKj5u.js";import{Input as o}from"../input-BUYJ4_aj.js";import{cn as s}from"@customafk/react-toolkit/utils";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{useCallback as u,useEffect as d,useMemo as f,useRef as p,useState as m}from"react";import{useWatch as h}from"react-hook-form";const g=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,_=e=>Number(e).toLocaleString(),v=({disabled:e=!1,readonly:t=!1,allowNegative:n=!1,numberAfterDecimalPoint:r=2,roundingRule:i=`none`,value:a=``,unitText:h,decimal:v,placeholder:y,precision:b,onChange:x,onValueChange:S,onBlur:C,...w})=>{let T=p(null),E=p(null),[D,O]=m(a.toString()),k=v?.[1]??r,A=v&&v[0]-v[1],j=f(()=>g(n),[n]),M=u(e=>{if(!k&&e.includes(`.`))return!1;let t=e.split(`.`)[1];return!t||t.length<=k},[k]),N=u(e=>{if(!v||e===`-`)return!0;let[t,n=``]=e.split(`.`);return n.length<=v[1]&&(t.startsWith(`-`)?t.length-1:t.length)<=A},[v,A]),P=u((e,t)=>{if(i===`none`)return e;let n=Math.pow(10,t),r=e*n;switch(i){case`up`:return Math.ceil(r)/n;case`down`:return Math.floor(r)/n;case`nearest`:return r%1<.1?Math.floor(r)/n:r%1>=.59?Math.ceil(r)/n:(Math.floor(r)+.5)/n;default:return e}},[i]),F=u(e=>!r&&e.includes(`.`)||e.split(`.`)[1]?.length>r,[r]),I=u(e=>{if(e===`0`)return`0`;if(!Number(e))return``;let t=parseFloat(e),n=Math.min(k-1,b||0),r=P(t,n).toString(),[i,a=``]=r.split(`.`),o=_(i);return a?`${o}.${a}`:o},[P,k,b]),L=u(e=>{if(!v||e===`-`)return!0;let[t,n=``]=e.split(`.`),r=t.startsWith(`-`)?t.length-1:t.length,i=v[0]-v[1];return n.length<=v[1]&&r<=i},[v]),R=u(e=>{x?.(e);let{value:t}=e.target;if(!t){S?.(void 0),O(``);return}let r=t===`0`,i=t===`-`&&n;if(r||i){S?.(0),O(t);return}let a=j.test(t)&&N(t)&&(v||M(t));if(!a)return;let o=parseFloat(t)||0;S?.(o),O(t)},[n,v,M,N,x,S,j]),z=u(()=>{t||O(e=>e.replace(/,/g,``))},[t]),B=u(()=>{t||(C?.(),O(e=>I(e)))},[t,C,I]);return d(()=>{let e=document.activeElement===E.current;if(!a||!j.test(a.toString())||!L(a.toString())||!v&&F(a.toString())){O(``);return}O(t=>t===`-`?`-`:t?e?a.toString():I(a.toString()):``)},[v,I,a,F,L,j]),d(()=>{if(!T.current||!E.current||!h)return;let e=T.current.offsetWidth;E.current.style.setProperty(`padding-right`,`${(e+10)/16}rem`)},[e,h]),l(`div`,{className:`relative`,children:[c(o,{...w,ref:E,value:D||(t?`0`:``),placeholder:y,disabled:e,readOnly:t,className:s(`font-number text-end`,t&&`bg-muted text-muted-foreground`),onChange:R,onFocus:z,onBlur:B}),h&&c(`span`,{ref:T,className:`text-muted-foreground pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 text-sm`,children:h})]})},y=({name:o,label:s=`Number Field`,placeholder:u=`0`,isShowErrorMsg:d=!1,isShowCount:f=!1,unitText:p=``,description:m=``,onValueChange:g})=>{let _=h({name:o});return c(n,{name:o,render:({field:{onChange:n,...o}})=>l(r,{className:`w-full gap-0`,children:[c(i,{children:s}),c(e,{children:c(v,{...o,placeholder:u,className:`w-full`,unitText:p,onValueChange:e=>{n(e),g?.(e)}})}),f&&l(`div`,{className:`text-muted-foreground text-end text-xs`,children:[_?.length??0,` characters`]}),!!m&&c(t,{children:m}),d&&c(a,{})]})})};export{y as NumberField};
|
|
2
2
|
//# sourceMappingURL=number-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-BZqk7MPJ.cjs`);const t=require(`../form-CtpHZKmh.cjs`),n=require(`../input-DgtTVBtN.cjs`),r=e.__toESM(require(`lucide-react`)),i=e.__toESM(require(`@customafk/react-toolkit/utils`)),a=e.__toESM(require(`react/jsx-runtime`)),o=e.__toESM(require(`react`)),s=({className:e,...t})=>{let s=(0,o.useId)(),[c,l]=(0,o.useState)(!1),u=(0,o.useCallback)(()=>l(e=>!e),[]);return(0,a.jsxs)(`div`,{className:`relative`,children:[(0,a.jsx)(n.Input,{...t,id:s,placeholder:`Password`,type:c?`text`:`password`,className:(0,i.cn)(`pe-9`,e)}),(0,a.jsx)(`button`,{className:`text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:u,"aria-label":c?`Hide password`:`Show password`,"aria-pressed":c,"aria-controls":`password`,children:c?(0,a.jsx)(r.EyeOffIcon,{size:16,"aria-hidden":`true`}):(0,a.jsx)(r.EyeIcon,{size:16,"aria-hidden":`true`})})]})},c=({name:e,label:n=`Text Field`,placeholder:r=`Enter text here`,isShowErrorMsg:i=!1,description:o,onValueChange:c})=>(0,a.jsx)(t.FormField,{name:e,render:({field:e})=>(0,a.jsxs)(t.FormItem,{className:`w-full`,children:[(0,a.jsx)(t.FormLabel,{children:n}),(0,a.jsx)(t.FormControl,{children:(0,a.jsx)(s,{placeholder:r,...e,onValueChange:c})}),!!o&&(0,a.jsx)(t.FormDescription,{children:o}),i&&(0,a.jsx)(t.FormMessage,{})]})});exports.PasswordField=c;
|
|
2
2
|
//# sourceMappingURL=password-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime25 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/password-field.d.ts
|
|
@@ -17,7 +17,7 @@ declare const PasswordField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
17
17
|
isShowErrorMsg,
|
|
18
18
|
description,
|
|
19
19
|
onValueChange
|
|
20
|
-
}: Props<TFieldValues>) =>
|
|
20
|
+
}: Props<TFieldValues>) => react_jsx_runtime25.JSX.Element;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { PasswordField };
|
|
23
23
|
//# sourceMappingURL=password-field.d.cts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import"../label-
|
|
1
|
+
"use client";import"../label-HVpeECNr.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-B-KLKj5u.js";import{Input as o}from"../input-BUYJ4_aj.js";import{EyeIcon as s,EyeOffIcon as c}from"lucide-react";import{cn as l}from"@customafk/react-toolkit/utils";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{useCallback as f,useId as p,useState as m}from"react";const h=({className:e,...t})=>{let n=p(),[r,i]=m(!1),a=f(()=>i(e=>!e),[]);return d(`div`,{className:`relative`,children:[u(o,{...t,id:n,placeholder:`Password`,type:r?`text`:`password`,className:l(`pe-9`,e)}),u(`button`,{className:`text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:a,"aria-label":r?`Hide password`:`Show password`,"aria-pressed":r,"aria-controls":`password`,children:u(r?c:s,{size:16,"aria-hidden":`true`})})]})},g=({name:o,label:s=`Text Field`,placeholder:c=`Enter text here`,isShowErrorMsg:l=!1,description:f,onValueChange:p})=>u(n,{name:o,render:({field:n})=>d(r,{className:`w-full`,children:[u(i,{children:s}),u(e,{children:u(h,{placeholder:c,...n,onValueChange:p})}),!!f&&u(t,{children:f}),l&&u(a,{})]})});export{g as PasswordField};
|
|
2
2
|
//# sourceMappingURL=password-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-BZqk7MPJ.cjs`);const t=require(`../form-CtpHZKmh.cjs`),n=require(`../select-DAE3Xg7g.cjs`),r=e.__toESM(require(`@customafk/react-toolkit/utils`)),i=e.__toESM(require(`react/jsx-runtime`)),a=({name:e,label:a=`Select Field`,placeholder:o=`Select an option`,disabledValues:s=[],options:c=[],isShowLabel:l=!0,isShowErrorMsg:u=!1,description:d=``,className:f=``})=>(0,i.jsx)(t.FormField,{name:e,render:({field:e})=>(0,i.jsxs)(t.FormItem,{className:(0,r.cn)(`w-full`,f),children:[l&&(0,i.jsx)(t.FormLabel,{children:a}),(0,i.jsxs)(n.Select,{defaultValue:e.value,onValueChange:e.onChange,children:[(0,i.jsx)(t.FormControl,{children:(0,i.jsx)(n.SelectTrigger,{className:`w-full`,children:(0,i.jsx)(n.SelectValue,{placeholder:o})})}),(0,i.jsx)(n.SelectContent,{children:c.map(e=>(0,i.jsx)(n.SelectItem,{disabled:s.includes(e.value),value:e.value,children:e.label},e.value))})]}),!!d&&(0,i.jsx)(t.FormDescription,{children:d}),u&&(0,i.jsx)(t.FormMessage,{})]})});exports.SelectField=a;
|
|
2
2
|
//# sourceMappingURL=select-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/select-field.d.ts
|
|
@@ -27,7 +27,7 @@ declare const SelectField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
27
27
|
isShowErrorMsg,
|
|
28
28
|
description,
|
|
29
29
|
className
|
|
30
|
-
}: Props<TFieldValues>) =>
|
|
30
|
+
}: Props<TFieldValues>) => react_jsx_runtime0.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { SelectField };
|
|
33
33
|
//# sourceMappingURL=select-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/select-field.d.ts
|
|
@@ -27,7 +27,7 @@ declare const SelectField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
27
27
|
isShowErrorMsg,
|
|
28
28
|
description,
|
|
29
29
|
className
|
|
30
|
-
}: Props<TFieldValues>) =>
|
|
30
|
+
}: Props<TFieldValues>) => react_jsx_runtime4.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { SelectField };
|
|
33
33
|
//# sourceMappingURL=select-field.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import"../label-
|
|
1
|
+
"use client";import"../label-HVpeECNr.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-B-KLKj5u.js";import{Select as o,SelectContent as s,SelectItem as c,SelectTrigger as l,SelectValue as u}from"../select-Cmq5a3Wg.js";import{cn as d}from"@customafk/react-toolkit/utils";import{jsx as f,jsxs as p}from"react/jsx-runtime";const m=({name:m,label:h=`Select Field`,placeholder:g=`Select an option`,disabledValues:_=[],options:v=[],isShowLabel:y=!0,isShowErrorMsg:b=!1,description:x=``,className:S=``})=>f(n,{name:m,render:({field:n})=>p(r,{className:d(`w-full`,S),children:[y&&f(i,{children:h}),p(o,{defaultValue:n.value,onValueChange:n.onChange,children:[f(e,{children:f(l,{className:`w-full`,children:f(u,{placeholder:g})})}),f(s,{children:v.map(e=>f(c,{disabled:_.includes(e.value),value:e.value,children:e.label},e.value))})]}),!!x&&f(t,{children:x}),b&&f(a,{})]})});export{m as SelectField};
|
|
2
2
|
//# sourceMappingURL=select-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-BZqk7MPJ.cjs`);const t=require(`../form-CtpHZKmh.cjs`),n=require(`../switch-BnHSwQ5T.cjs`),r=e.__toESM(require(`@customafk/react-toolkit/utils`)),i=e.__toESM(require(`react/jsx-runtime`)),a=({name:e,label:a=`Switch Field`,description:o,isShowErrorMsg:s=!1})=>(0,i.jsx)(t.FormField,{name:e,render:({field:e})=>(0,i.jsxs)(`div`,{className:`spage-y-1`,children:[(0,i.jsxs)(t.FormItem,{className:(0,r.cn)(`border-border-weak flex flex-row items-center justify-between rounded-lg border p-3 shadow-xs`),children:[(0,i.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,i.jsx)(t.FormLabel,{className:`cursor-pointer text-sm`,children:a}),o&&(0,i.jsx)(t.FormDescription,{className:`text-xs`,children:o})]}),(0,i.jsx)(t.FormControl,{children:(0,i.jsx)(n.Switch,{checked:e.value,onCheckedChange:e.onChange})})]}),s&&(0,i.jsx)(t.FormMessage,{})]})});exports.SwitchField=a;
|
|
2
2
|
//# sourceMappingURL=switch-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime54 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/switch-field.d.ts
|
|
@@ -13,7 +13,7 @@ declare const SwitchField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
13
13
|
label,
|
|
14
14
|
description,
|
|
15
15
|
isShowErrorMsg
|
|
16
|
-
}: Props<TFieldValues>) =>
|
|
16
|
+
}: Props<TFieldValues>) => react_jsx_runtime54.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { SwitchField };
|
|
19
19
|
//# sourceMappingURL=switch-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/switch-field.d.ts
|
|
@@ -13,7 +13,7 @@ declare const SwitchField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
13
13
|
label,
|
|
14
14
|
description,
|
|
15
15
|
isShowErrorMsg
|
|
16
|
-
}: Props<TFieldValues>) =>
|
|
16
|
+
}: Props<TFieldValues>) => react_jsx_runtime12.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { SwitchField };
|
|
19
19
|
//# sourceMappingURL=switch-field.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import"../label-
|
|
1
|
+
"use client";import"../label-HVpeECNr.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-B-KLKj5u.js";import{Switch as o}from"../switch-iwm2-R_e.js";import{cn as s}from"@customafk/react-toolkit/utils";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=({name:u,label:d=`Switch Field`,description:f,isShowErrorMsg:p=!1})=>c(n,{name:u,render:({field:n})=>l(`div`,{className:`spage-y-1`,children:[l(r,{className:s(`border-border-weak flex flex-row items-center justify-between rounded-lg border p-3 shadow-xs`),children:[l(`div`,{className:`space-y-0.5`,children:[c(i,{className:`cursor-pointer text-sm`,children:d}),f&&c(t,{className:`text-xs`,children:f})]}),c(e,{children:c(o,{checked:n.value,onCheckedChange:n.onChange})})]}),p&&c(a,{})]})});export{u as SwitchField};
|
|
2
2
|
//# sourceMappingURL=switch-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`)
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../flex-DMgD86BT.cjs`);require(`../label-BZqk7MPJ.cjs`);const n=require(`../form-CtpHZKmh.cjs`),r=require(`../input-DgtTVBtN.cjs`),i=e.__toESM(require(`lucide-react`)),a=e.__toESM(require(`@customafk/react-toolkit/utils`)),o=e.__toESM(require(`react/jsx-runtime`)),s=e.__toESM(require(`react`)),c=e.__toESM(require(`react-hook-form`)),l=({name:e,label:l=`Text Field`,placeholder:u=`Enter text here`,isShowLabel:d=!0,isShowClearButton:f=!1,isShowErrorMsg:p=!1,isShowCount:m=!1,description:h,className:g=``,onValueChange:_})=>{let{resetField:v}=n.useFormField(),y=(0,c.useWatch)({name:e}),b=(0,s.useCallback)(()=>{v(e)},[v,e]);return(0,o.jsx)(n.FormField,{name:e,render:({field:e})=>(0,o.jsxs)(n.FormItem,{className:(0,a.cn)(`w-full gap-0`,m||!!h&&`space-y-1`,g),children:[d&&(0,o.jsx)(n.FormLabel,{children:l}),(0,o.jsxs)(`div`,{className:`relative`,children:[(0,o.jsx)(n.FormControl,{children:(0,o.jsx)(r.Input,{...e,placeholder:u,className:(0,a.cn)(`w-full`,f&&`pr-9`),onValueChange:_})}),f&&y&&(0,o.jsx)(`button`,{type:`button`,className:`text-text-positive-weak hover:text-text-positive focus-visible:ring-border absolute inset-y-0 end-0 flex h-full w-8 cursor-pointer items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-2`,"aria-label":`Clear input`,onClick:b,children:(0,o.jsx)(i.XIcon,{size:14,"aria-hidden":`true`})})]}),(0,o.jsxs)(t.Flex,{width:`full`,padding:`none`,justify:`end`,children:[p&&(0,o.jsx)(n.FormMessage,{className:`grow`}),m&&(0,o.jsxs)(`div`,{className:`text-text-positive-weak text-end text-xs`,children:[y?.length??0,` characters`]})]}),!!h&&(0,o.jsx)(n.FormDescription,{children:h})]})})};exports.TextField=l;
|
|
2
2
|
//# sourceMappingURL=text-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime87 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/text-field.d.ts
|
|
@@ -25,7 +25,7 @@ declare const TextField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
25
25
|
description,
|
|
26
26
|
className,
|
|
27
27
|
onValueChange
|
|
28
|
-
}: Props<TFieldValues>) =>
|
|
28
|
+
}: Props<TFieldValues>) => react_jsx_runtime87.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { TextField };
|
|
31
31
|
//# sourceMappingURL=text-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/text-field.d.ts
|
|
@@ -25,7 +25,7 @@ declare const TextField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
25
25
|
description,
|
|
26
26
|
className,
|
|
27
27
|
onValueChange
|
|
28
|
-
}: Props<TFieldValues>) =>
|
|
28
|
+
}: Props<TFieldValues>) => react_jsx_runtime10.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { TextField };
|
|
31
31
|
//# sourceMappingURL=text-field.d.ts.map
|
package/dist/forms/text-field.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import"../label-
|
|
1
|
+
"use client";import{Flex as e}from"../flex-BZHWRUkz.js";import"../label-HVpeECNr.js";import{FormControl as t,FormDescription as n,FormField as r,FormItem as i,FormLabel as a,FormMessage as o,useFormField as s}from"../form-B-KLKj5u.js";import{Input as c}from"../input-BUYJ4_aj.js";import{XIcon as l}from"lucide-react";import{cn as u}from"@customafk/react-toolkit/utils";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{useCallback as p}from"react";import{useWatch as m}from"react-hook-form";const h=({name:h,label:g=`Text Field`,placeholder:_=`Enter text here`,isShowLabel:v=!0,isShowClearButton:y=!1,isShowErrorMsg:b=!1,isShowCount:x=!1,description:S,className:C=``,onValueChange:w})=>{let{resetField:T}=s(),E=m({name:h}),D=p(()=>{T(h)},[T,h]);return d(r,{name:h,render:({field:r})=>f(i,{className:u(`w-full gap-0`,x||!!S&&`space-y-1`,C),children:[v&&d(a,{children:g}),f(`div`,{className:`relative`,children:[d(t,{children:d(c,{...r,placeholder:_,className:u(`w-full`,y&&`pr-9`),onValueChange:w})}),y&&E&&d(`button`,{type:`button`,className:`text-text-positive-weak hover:text-text-positive focus-visible:ring-border absolute inset-y-0 end-0 flex h-full w-8 cursor-pointer items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-2`,"aria-label":`Clear input`,onClick:D,children:d(l,{size:14,"aria-hidden":`true`})})]}),f(e,{width:`full`,padding:`none`,justify:`end`,children:[b&&d(o,{className:`grow`}),x&&f(`div`,{className:`text-text-positive-weak text-end text-xs`,children:[E?.length??0,` characters`]})]}),!!S&&d(n,{children:S})]})})};export{h as TextField};
|
|
2
2
|
//# sourceMappingURL=text-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-BZqk7MPJ.cjs`);const t=require(`../form-CtpHZKmh.cjs`),n=require(`../textarea-DK_bNV0u.cjs`),r=e.__toESM(require(`react/jsx-runtime`)),i=e.__toESM(require(`react-hook-form`)),a=({name:e,label:a=`Textarea Field`,placeholder:o=`Enter text here`,isShowErrorMsg:s=!1,isShowCount:c=!1,description:l,rows:u=3,onValueChange:d})=>{let f=(0,i.useWatch)({name:e});return(0,r.jsx)(t.FormField,{name:e,render:({field:e})=>(0,r.jsxs)(t.FormItem,{className:`w-full`,children:[(0,r.jsx)(t.FormLabel,{children:a}),(0,r.jsx)(t.FormControl,{children:(0,r.jsx)(n.Textarea,{...e,placeholder:o,className:`w-full`,rows:u,onValueChange:d})}),c&&(0,r.jsxs)(`div`,{className:`text-muted-foreground text-end text-xs`,children:[f?.length??0,` characters`]}),!!l&&(0,r.jsx)(t.FormDescription,{children:l}),s&&(0,r.jsx)(t.FormMessage,{})]})})};exports.TextareaField=a;
|
|
2
2
|
//# sourceMappingURL=textarea-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/textarea-field.d.ts
|
|
@@ -21,7 +21,7 @@ declare const TextareaField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
21
21
|
description,
|
|
22
22
|
rows,
|
|
23
23
|
onValueChange
|
|
24
|
-
}: Props<TFieldValues>) =>
|
|
24
|
+
}: Props<TFieldValues>) => react_jsx_runtime11.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { TextareaField };
|
|
27
27
|
//# sourceMappingURL=textarea-field.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import"../label-
|
|
1
|
+
"use client";import"../label-HVpeECNr.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-B-KLKj5u.js";import{Textarea as o}from"../textarea-DbNqKCAi.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{useWatch as l}from"react-hook-form";const u=({name:u,label:d=`Textarea Field`,placeholder:f=`Enter text here`,isShowErrorMsg:p=!1,isShowCount:m=!1,description:h,rows:g=3,onValueChange:_})=>{let v=l({name:u});return s(n,{name:u,render:({field:n})=>c(r,{className:`w-full`,children:[s(i,{children:d}),s(e,{children:s(o,{...n,placeholder:f,className:`w-full`,rows:g,onValueChange:_})}),m&&c(`div`,{className:`text-muted-foreground text-end text-xs`,children:[v?.length??0,` characters`]}),!!h&&s(t,{children:h}),p&&s(a,{})]})})};export{u as TextareaField};
|
|
2
2
|
//# sourceMappingURL=textarea-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`./chunk-CUT6urMc.cjs`),t=require(`./skeleton-CmGSyYRm.cjs`),n=e.__toESM(require(`lucide-react`)),r=e.__toESM(require(`@customafk/react-toolkit/utils`)),i=e.__toESM(require(`react/jsx-runtime`)),a=e.__toESM(require(`react`)),o=({src:e,alt:o,width:s,height:c,maxRetries:l=3,retryDelay:u=500,className:d,onClick:f})=>{let p=(0,a.useRef)(null),[m,h]=(0,a.useState)(e),[g,_]=(0,a.useState)(0),[v,y]=(0,a.useState)(!1),[b,x]=(0,a.useState)(!1),S=(0,a.useCallback)(()=>{y(!0)},[]),C=(0,a.useCallback)(()=>{if(g<l){x(!1);let t=g+1;_(t),setTimeout(()=>{let n=`?retry=${Date.now()}&attempt=${t}`;h(e+n)},u*t);return}x(!0),y(!0),h(e)},[l,g,u,e]);return b?(0,i.jsx)(`div`,{style:{width:s,height:c},className:(0,r.cn)(`@container relative inline-block`,d),children:(0,i.jsxs)(`div`,{className:`bg-danger-muted shadow-card flex size-full flex-col items-center justify-center gap-y-2 rounded-md`,children:[(0,i.jsx)(n.AlertCircleIcon,{className:`text-danger size-8 @max-[52px]:size-6`}),(0,i.jsx)(`span`,{className:`text-danger-weak
|
|
2
|
-
//# sourceMappingURL=image-
|
|
1
|
+
const e=require(`./chunk-CUT6urMc.cjs`),t=require(`./skeleton-CmGSyYRm.cjs`),n=e.__toESM(require(`lucide-react`)),r=e.__toESM(require(`@customafk/react-toolkit/utils`)),i=e.__toESM(require(`react/jsx-runtime`)),a=e.__toESM(require(`react`)),o=({src:e,alt:o,width:s,height:c,maxRetries:l=3,retryDelay:u=500,className:d,onClick:f})=>{let p=(0,a.useRef)(null),[m,h]=(0,a.useState)(e),[g,_]=(0,a.useState)(0),[v,y]=(0,a.useState)(!1),[b,x]=(0,a.useState)(!1),S=(0,a.useCallback)(()=>{y(!0)},[]),C=(0,a.useCallback)(()=>{if(g<l){x(!1);let t=g+1;_(t),setTimeout(()=>{let n=`?retry=${Date.now()}&attempt=${t}`;h(e+n)},u*t);return}x(!0),y(!0),h(e)},[l,g,u,e]);return b?(0,i.jsx)(`div`,{style:{width:s,height:c},className:(0,r.cn)(`@container relative inline-block`,d),children:(0,i.jsxs)(`div`,{className:`bg-danger-muted shadow-card flex size-full flex-col items-center justify-center gap-y-2 rounded-md`,children:[(0,i.jsx)(n.AlertCircleIcon,{className:`text-danger size-8 @max-[52px]:size-6`}),(0,i.jsx)(`span`,{className:`text-danger-weak text-xs @max-[96px]:sr-only text-center`,children:`Image failed to load`})]})}):(0,i.jsxs)(`div`,{style:{width:s,height:c},className:(0,r.cn)(`relative inline-block`,d),onClick:f,children:[!v&&(0,i.jsx)(t.Skeleton,{className:`absolute inset-0 flex size-full items-center justify-center animate-pulse`}),(0,i.jsx)(`img`,{id:m,ref:p,src:m,alt:o,loading:`lazy`,className:(0,r.cn)(`shadow-card size-full rounded-md object-cover transition-opacity duration-300`,v&&`opacity-100`,!v&&`pointer-events-none opacity-0`),onLoad:S,onError:C})]})};Object.defineProperty(exports,`Image`,{enumerable:!0,get:function(){return o}});
|
|
2
|
+
//# sourceMappingURL=image-D3D8dE6s.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-D3D8dE6s.cjs","names":["Image: React.FC<Props>","AlertCircleIcon","Skeleton"],"sources":["../packages/components/ui/image.tsx"],"sourcesContent":["import { useCallback, useRef, useState } from 'react'\nimport { cn } from '@customafk/react-toolkit/utils'\n\nimport { AlertCircleIcon } from 'lucide-react'\n\nimport { Skeleton } from './skeleton'\n\ntype Props = {\n src?: string\n alt?: string\n width?: number | string\n height?: number | string\n maxRetries?: number\n retryDelay?: number\n className?: string\n onClick?: () => void\n}\nexport const Image: React.FC<Props> = ({ src, alt, width, height, maxRetries = 3, retryDelay = 500, className, onClick }) => {\n const imageRef = useRef<HTMLImageElement>(null)\n const [currentSrc, setCurrentSrc] = useState<string | undefined>(src)\n const [retryCount, setRetryCount] = useState<number>(0)\n const [isLoaded, setIsLoaded] = useState<boolean>(false)\n const [hasError, setHasError] = useState<boolean>(false)\n\n const handleLoad = useCallback(() => {\n setIsLoaded(true)\n }, [])\n\n const handleError = useCallback(() => {\n if (retryCount < maxRetries) {\n // imageRef.current?.style.setProperty('display', 'none')\n setHasError(false)\n const newRetryCount = retryCount + 1\n setRetryCount(newRetryCount)\n\n // Retry with exponential backoff and cache busting\n setTimeout(() => {\n const cacheBuster = `?retry=${Date.now()}&attempt=${newRetryCount}`\n setCurrentSrc(src + cacheBuster)\n }, retryDelay * newRetryCount)\n return\n }\n\n setHasError(true)\n setIsLoaded(true)\n setCurrentSrc(src)\n }, [maxRetries, retryCount, retryDelay, src])\n\n if (hasError) {\n return (\n <div style={{ width, height }} className={cn('@container relative inline-block', className)}>\n <div className=\"bg-danger-muted shadow-card flex size-full flex-col items-center justify-center gap-y-2 rounded-md\">\n <AlertCircleIcon className=\"text-danger size-8 @max-[52px]:size-6\" />\n <span className=\"text-danger-weak text-xs @max-[96px]:sr-only text-center\">Image failed to load</span>\n </div>\n </div>\n )\n }\n\n return (\n <div style={{ width, height }} className={cn('relative inline-block', className)} onClick={onClick}>\n {!isLoaded && (\n <Skeleton className=\"absolute inset-0 flex size-full items-center justify-center animate-pulse\"/>\n )}\n <img\n id={currentSrc}\n ref={imageRef}\n src={currentSrc}\n alt={alt}\n loading=\"lazy\"\n className={cn(\n 'shadow-card size-full rounded-md object-cover transition-opacity duration-300',\n isLoaded && 'opacity-100',\n !isLoaded && 'pointer-events-none opacity-0',\n )}\n onLoad={handleLoad}\n onError={handleError}\n />\n </div>\n )\n}\n"],"mappings":"iPAiBaA,GAA0B,CAAE,MAAK,MAAK,QAAO,SAAQ,aAAa,EAAG,aAAa,IAAK,YAAW,aAAc,CAC3H,IAAM,GAAA,EAAA,EAAA,QAAoC,MACpC,CAAC,EAAY,IAAA,EAAA,EAAA,UAA8C,GAC3D,CAAC,EAAY,IAAA,EAAA,EAAA,UAAkC,GAC/C,CAAC,EAAU,IAAA,EAAA,EAAA,UAAiC,IAC5C,CAAC,EAAU,IAAA,EAAA,EAAA,UAAiC,IAE5C,GAAA,EAAA,EAAA,iBAA+B,CACnC,EAAY,KACX,IAEG,GAAA,EAAA,EAAA,iBAAgC,CACpC,GAAI,EAAa,EAAY,CAE3B,EAAY,IACZ,IAAM,EAAgB,EAAa,EACnC,EAAc,GAGd,eAAiB,CACf,IAAM,EAAc,UAAU,KAAK,MAAM,WAAW,IACpD,EAAc,EAAM,IACnB,EAAa,GAChB,OAGF,EAAY,IACZ,EAAY,IACZ,EAAc,IACb,CAAC,EAAY,EAAY,EAAY,IAaxC,OAXI,GAEA,EAAA,EAAA,KAAC,MAAA,CAAI,MAAO,CAAE,QAAO,UAAU,WAAA,EAAA,EAAA,IAAc,mCAAoC,aAC/E,EAAA,EAAA,MAAC,MAAA,CAAI,UAAU,gHACb,EAAA,EAAA,KAACC,EAAAA,gBAAAA,CAAgB,UAAU,2CAC3B,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,oEAA2D,+BAOjF,EAAA,EAAA,MAAC,MAAA,CAAI,MAAO,CAAE,QAAO,UAAU,WAAA,EAAA,EAAA,IAAc,wBAAyB,GAAqB,oBACxF,CAAC,IACA,EAAA,EAAA,KAACC,EAAAA,SAAAA,CAAS,UAAU,+EAEtB,EAAA,EAAA,KAAC,MAAA,CACC,GAAI,EACJ,IAAK,EACL,IAAK,EACA,MACL,QAAQ,OACR,WAAA,EAAA,EAAA,IACE,gFACA,GAAY,cACZ,CAAC,GAAY,iCAEf,OAAQ,EACR,QAAS"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Skeleton as e}from"./skeleton-DFF0w4en.js";import{AlertCircleIcon as t}from"lucide-react";import{cn as n}from"@customafk/react-toolkit/utils";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{useCallback as a,useRef as o,useState as s}from"react";const c=({src:c,alt:l,width:u,height:d,maxRetries:f=3,retryDelay:p=500,className:m,onClick:h})=>{let g=o(null),[_,v]=s(c),[y,b]=s(0),[x,S]=s(!1),[C,w]=s(!1),T=a(()=>{S(!0)},[]),E=a(()=>{if(y<f){w(!1);let e=y+1;b(e),setTimeout(()=>{let t=`?retry=${Date.now()}&attempt=${e}`;v(c+t)},p*e);return}w(!0),S(!0),v(c)},[f,y,p,c]);return C?r(`div`,{style:{width:u,height:d},className:n(`@container relative inline-block`,m),children:i(`div`,{className:`bg-danger-muted shadow-card flex size-full flex-col items-center justify-center gap-y-2 rounded-md`,children:[r(t,{className:`text-danger size-8 @max-[52px]:size-6`}),r(`span`,{className:`text-danger-weak
|
|
2
|
-
//# sourceMappingURL=image-
|
|
1
|
+
import{Skeleton as e}from"./skeleton-DFF0w4en.js";import{AlertCircleIcon as t}from"lucide-react";import{cn as n}from"@customafk/react-toolkit/utils";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{useCallback as a,useRef as o,useState as s}from"react";const c=({src:c,alt:l,width:u,height:d,maxRetries:f=3,retryDelay:p=500,className:m,onClick:h})=>{let g=o(null),[_,v]=s(c),[y,b]=s(0),[x,S]=s(!1),[C,w]=s(!1),T=a(()=>{S(!0)},[]),E=a(()=>{if(y<f){w(!1);let e=y+1;b(e),setTimeout(()=>{let t=`?retry=${Date.now()}&attempt=${e}`;v(c+t)},p*e);return}w(!0),S(!0),v(c)},[f,y,p,c]);return C?r(`div`,{style:{width:u,height:d},className:n(`@container relative inline-block`,m),children:i(`div`,{className:`bg-danger-muted shadow-card flex size-full flex-col items-center justify-center gap-y-2 rounded-md`,children:[r(t,{className:`text-danger size-8 @max-[52px]:size-6`}),r(`span`,{className:`text-danger-weak text-xs @max-[96px]:sr-only text-center`,children:`Image failed to load`})]})}):i(`div`,{style:{width:u,height:d},className:n(`relative inline-block`,m),onClick:h,children:[!x&&r(e,{className:`absolute inset-0 flex size-full items-center justify-center animate-pulse`}),r(`img`,{id:_,ref:g,src:_,alt:l,loading:`lazy`,className:n(`shadow-card size-full rounded-md object-cover transition-opacity duration-300`,x&&`opacity-100`,!x&&`pointer-events-none opacity-0`),onLoad:T,onError:E})]})};export{c as Image};
|
|
2
|
+
//# sourceMappingURL=image-Dm3jT9QX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-
|
|
1
|
+
{"version":3,"file":"image-Dm3jT9QX.js","names":["Image: React.FC<Props>"],"sources":["../packages/components/ui/image.tsx"],"sourcesContent":["import { useCallback, useRef, useState } from 'react'\nimport { cn } from '@customafk/react-toolkit/utils'\n\nimport { AlertCircleIcon } from 'lucide-react'\n\nimport { Skeleton } from './skeleton'\n\ntype Props = {\n src?: string\n alt?: string\n width?: number | string\n height?: number | string\n maxRetries?: number\n retryDelay?: number\n className?: string\n onClick?: () => void\n}\nexport const Image: React.FC<Props> = ({ src, alt, width, height, maxRetries = 3, retryDelay = 500, className, onClick }) => {\n const imageRef = useRef<HTMLImageElement>(null)\n const [currentSrc, setCurrentSrc] = useState<string | undefined>(src)\n const [retryCount, setRetryCount] = useState<number>(0)\n const [isLoaded, setIsLoaded] = useState<boolean>(false)\n const [hasError, setHasError] = useState<boolean>(false)\n\n const handleLoad = useCallback(() => {\n setIsLoaded(true)\n }, [])\n\n const handleError = useCallback(() => {\n if (retryCount < maxRetries) {\n // imageRef.current?.style.setProperty('display', 'none')\n setHasError(false)\n const newRetryCount = retryCount + 1\n setRetryCount(newRetryCount)\n\n // Retry with exponential backoff and cache busting\n setTimeout(() => {\n const cacheBuster = `?retry=${Date.now()}&attempt=${newRetryCount}`\n setCurrentSrc(src + cacheBuster)\n }, retryDelay * newRetryCount)\n return\n }\n\n setHasError(true)\n setIsLoaded(true)\n setCurrentSrc(src)\n }, [maxRetries, retryCount, retryDelay, src])\n\n if (hasError) {\n return (\n <div style={{ width, height }} className={cn('@container relative inline-block', className)}>\n <div className=\"bg-danger-muted shadow-card flex size-full flex-col items-center justify-center gap-y-2 rounded-md\">\n <AlertCircleIcon className=\"text-danger size-8 @max-[52px]:size-6\" />\n <span className=\"text-danger-weak text-xs @max-[96px]:sr-only text-center\">Image failed to load</span>\n </div>\n </div>\n )\n }\n\n return (\n <div style={{ width, height }} className={cn('relative inline-block', className)} onClick={onClick}>\n {!isLoaded && (\n <Skeleton className=\"absolute inset-0 flex size-full items-center justify-center animate-pulse\"/>\n )}\n <img\n id={currentSrc}\n ref={imageRef}\n src={currentSrc}\n alt={alt}\n loading=\"lazy\"\n className={cn(\n 'shadow-card size-full rounded-md object-cover transition-opacity duration-300',\n isLoaded && 'opacity-100',\n !isLoaded && 'pointer-events-none opacity-0',\n )}\n onLoad={handleLoad}\n onError={handleError}\n />\n </div>\n )\n}\n"],"mappings":"qQAiBA,MAAaA,GAA0B,CAAE,MAAK,MAAK,QAAO,SAAQ,aAAa,EAAG,aAAa,IAAK,YAAW,aAAc,CAC3H,IAAM,EAAW,EAAyB,MACpC,CAAC,EAAY,GAAiB,EAA6B,GAC3D,CAAC,EAAY,GAAiB,EAAiB,GAC/C,CAAC,EAAU,GAAe,EAAkB,IAC5C,CAAC,EAAU,GAAe,EAAkB,IAE5C,EAAa,MAAkB,CACnC,EAAY,KACX,IAEG,EAAc,MAAkB,CACpC,GAAI,EAAa,EAAY,CAE3B,EAAY,IACZ,IAAM,EAAgB,EAAa,EACnC,EAAc,GAGd,eAAiB,CACf,IAAM,EAAc,UAAU,KAAK,MAAM,WAAW,IACpD,EAAc,EAAM,IACnB,EAAa,GAChB,OAGF,EAAY,IACZ,EAAY,IACZ,EAAc,IACb,CAAC,EAAY,EAAY,EAAY,IAaxC,OAXI,EAEA,EAAC,MAAA,CAAI,MAAO,CAAE,QAAO,UAAU,UAAW,EAAG,mCAAoC,YAC/E,EAAC,MAAA,CAAI,UAAU,+GACb,EAAC,EAAA,CAAgB,UAAU,0CAC3B,EAAC,OAAA,CAAK,UAAU,oEAA2D,8BAOjF,EAAC,MAAA,CAAI,MAAO,CAAE,QAAO,UAAU,UAAW,EAAG,wBAAyB,GAAqB,oBACxF,CAAC,GACA,EAAC,EAAA,CAAS,UAAU,8EAEtB,EAAC,MAAA,CACC,GAAI,EACJ,IAAK,EACL,IAAK,EACA,MACL,QAAQ,OACR,UAAW,EACT,gFACA,GAAY,cACZ,CAAC,GAAY,iCAEf,OAAQ,EACR,QAAS"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime103 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/ui/input.d.ts
|
|
4
4
|
declare function Input({
|
|
@@ -8,7 +8,7 @@ declare function Input({
|
|
|
8
8
|
...props
|
|
9
9
|
}: React.ComponentProps<'input'> & {
|
|
10
10
|
onValueChange?: (value: string) => void;
|
|
11
|
-
}):
|
|
11
|
+
}): react_jsx_runtime103.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { Input };
|
|
14
|
-
//# sourceMappingURL=input-
|
|
14
|
+
//# sourceMappingURL=input-CWzkJbaD.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime55 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/ui/input.d.ts
|
|
4
4
|
declare function Input({
|
|
@@ -8,7 +8,7 @@ declare function Input({
|
|
|
8
8
|
...props
|
|
9
9
|
}: React.ComponentProps<'input'> & {
|
|
10
10
|
onValueChange?: (value: string) => void;
|
|
11
|
-
}):
|
|
11
|
+
}): react_jsx_runtime55.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { Input };
|
|
14
|
-
//# sourceMappingURL=input-
|
|
14
|
+
//# sourceMappingURL=input-Dx2DxNMy.d.cts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const e=require(`./chunk-CUT6urMc.cjs`),t=e.__toESM(require(`@customafk/react-toolkit/utils`)),n=e.__toESM(require(`radix-ui`)),r=e.__toESM(require(`react/jsx-runtime`));function i({className:e,...i}){return(0,r.jsx)(n.Label.Root,{"data-slot":`label`,className:(0,t.cn)(`text-text-positive`,`flex items-center gap-2`,`text-sm leading-none font-medium select-none`,`group-data-[disabled=true]:pointer-events-none`,`group-data-[disabled=true]:opacity-50`,`peer-disabled:cursor-not-allowed`,`peer-disabled:opacity-50`,e),...i})}Object.defineProperty(exports,`Label`,{enumerable:!0,get:function(){return i}});
|
|
2
|
-
//# sourceMappingURL=label-
|
|
2
|
+
//# sourceMappingURL=label-BZqk7MPJ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-
|
|
1
|
+
{"version":3,"file":"label-BZqk7MPJ.cjs","names":["LabelPrimitive"],"sources":["../packages/components/ui/label.tsx"],"sourcesContent":["'use client'\nimport { cn } from '@customafk/react-toolkit/utils'\n\nimport { Label as LabelPrimitive } from 'radix-ui'\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'text-text-positive',\n 'flex items-center gap-2',\n 'text-sm leading-none font-medium select-none',\n 'group-data-[disabled=true]:pointer-events-none',\n 'group-data-[disabled=true]:opacity-50',\n 'peer-disabled:cursor-not-allowed',\n 'peer-disabled:opacity-50',\n className,\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n"],"mappings":"0KAKA,SAAS,EAAM,CAAE,YAAW,GAAG,GAA2D,CACxF,OACE,EAAA,EAAA,KAACA,EAAAA,MAAe,KAAA,CACd,YAAU,QACV,WAAA,EAAA,EAAA,IACE,qBACA,0BACA,+CACA,iDACA,wCACA,mCACA,2BACA,GAEF,GAAI"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{cn as e}from"@customafk/react-toolkit/utils";import{Label as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function r({className:r,...i}){return n(t.Root,{"data-slot":`label`,className:e(`text-text-positive`,`flex items-center gap-2`,`text-sm leading-none font-medium select-none`,`group-data-[disabled=true]:pointer-events-none`,`group-data-[disabled=true]:opacity-50`,`peer-disabled:cursor-not-allowed`,`peer-disabled:opacity-50`,r),...i})}export{r as Label};
|
|
2
|
-
//# sourceMappingURL=label-
|
|
2
|
+
//# sourceMappingURL=label-HVpeECNr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-
|
|
1
|
+
{"version":3,"file":"label-HVpeECNr.js","names":["Label","LabelPrimitive"],"sources":["../packages/components/ui/label.tsx"],"sourcesContent":["'use client'\nimport { cn } from '@customafk/react-toolkit/utils'\n\nimport { Label as LabelPrimitive } from 'radix-ui'\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'text-text-positive',\n 'flex items-center gap-2',\n 'text-sm leading-none font-medium select-none',\n 'group-data-[disabled=true]:pointer-events-none',\n 'group-data-[disabled=true]:opacity-50',\n 'peer-disabled:cursor-not-allowed',\n 'peer-disabled:opacity-50',\n className,\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n"],"mappings":"6HAKA,SAASA,EAAM,CAAE,YAAW,GAAG,GAA2D,CACxF,OACE,EAACC,EAAe,KAAA,CACd,YAAU,QACV,UAAW,EACT,qBACA,0BACA,+CACA,iDACA,wCACA,mCACA,2BACA,GAEF,GAAI"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../../chunk-CUT6urMc.cjs`),t=require(`../../button-119IIVCy.cjs`),n=require(`../../skeleton-CmGSyYRm.cjs`),r=require(`../../tooltip-BMKX80GV.cjs`),i=require(`../../separator-JGL-8B0V.cjs`),a=require(`../../sheet-slcLNlWv.cjs`),o=e.__toESM(require(`lucide-react`)),s=e.__toESM(require(`@customafk/react-toolkit/utils`)),c=e.__toESM(require(`class-variance-authority`)),l=e.__toESM(require(`radix-ui`)),u=e.__toESM(require(`react/jsx-runtime`)),d=e.__toESM(require(`react`)),f=e.__toESM(require(`@customafk/react-toolkit/hooks/useMobile`)),p=`sidebar_state`,m=3600*24*7,h=`16rem`,g=`16rem`,_=`3rem`,v=`b`,y=(0,d.createContext)(null);function b(){let e=(0,d.useContext)(y);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function x({defaultOpen:e=!0,open:t,onOpenChange:n,className:i,style:a,children:o,...c}){let l=(0,f.useIsMobile)(),[p,m]=(0,d.useState)(!1),[h,g]=(0,d.useState)(e),_=t??h,v=(0,d.useCallback)(e=>{let t=typeof e==`function`?e(_):e;n?n(t):g(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,_]),b=(0,d.useCallback)(()=>l?m(e=>!e):v(e=>!e),[l,v,m]);(0,d.useEffect)(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),b())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b]);let x=_?`expanded`:`collapsed`,S=(0,d.useMemo)(()=>({state:x,isMobile:l,toggleSidebar:b,open:_,setOpen:v,openMobile:p,setOpenMobile:m}),[x,_,v,l,p,m,b]);return(0,u.jsx)(y.Provider,{value:S,children:(0,u.jsx)(r.TooltipProvider,{delayDuration:0,children:(0,u.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:(0,s.cn)(`group/sidebar-wrapper`,`has-data-[variant=inset]:bg-sidebar`,`flex h-svh w-full`,i),...c,children:o})})})}function S({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...c}){let{isMobile:l,state:d,openMobile:f,setOpenMobile:p}=b();return n===`none`?(0,u.jsx)(`aside`,{"data-slot":`sidebar`,className:(0,s.cn)(`bg-sidebar`,`text-sidebar-foreground`,`flex h-full w-(--sidebar-width) flex-col`,r),...c,children:i}):l?(0,u.jsx)(a.Sheet,{open:f,onOpenChange:p,...c,children:(0,u.jsxs)(a.SheetContent,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden`,style:{"--sidebar-width":`16rem`},side:e,children:[(0,u.jsxs)(a.SheetHeader,{className:`sr-only`,children:[(0,u.jsx)(a.SheetTitle,{children:`Sidebar`}),(0,u.jsx)(a.SheetDescription,{children:`Displays the mobile sidebar.`})]}),(0,u.jsxs)(`div`,{className:`flex size-full flex-col`,children:[(0,u.jsxs)(`div`,{className:`border-border-weak flex items-center gap-x-2 border-b p-2 pr-4`,children:[(0,u.jsx)(C,{}),(0,u.jsx)(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground ml-2 flex aspect-square size-8 items-center justify-center rounded-lg`,children:(0,u.jsx)(o.ShoppingCartIcon,{size:20})}),(0,u.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,u.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,u.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),i]})]})}):(0,u.jsxs)(`aside`,{className:`group peer text-sidebar-foreground bg-card hidden md:block`,"data-state":d,"data-collapsible":d===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,u.jsx)(`div`,{"data-slot":`sidebar-gap`,className:(0,s.cn)(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height) + 0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,u.jsx)(`div`,{"data-slot":`sidebar-container`,className:(0,s.cn)(`hidden md:flex`,`shadow-nav fixed inset-y-0 top-14 z-10`,`h-[calc(100svh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...c,children:(0,u.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:(0,s.cn)(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function C({className:e,onClick:n,...r}){let{toggleSidebar:i}=b();return(0,u.jsxs)(t.Button,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:(0,s.cn)(`size-10 rounded-full`,e),onClick:e=>{n?.(e),i()},...r,children:[(0,u.jsx)(o.MenuIcon,{className:`!size-6`}),(0,u.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function w({className:e,...t}){let{toggleSidebar:n}=b();return(0,u.jsx)(`button`,{"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:n,title:`Toggle Sidebar`,className:(0,s.cn)(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear sm:flex`,`after:absolute after:inset-y-0 after:left-1/2 after:w-[2px]`,`group-data-[side=left]:-right-4`,`group-data-[side=right]:left-0`,`in-data-[side=left]:cursor-w-resize`,`in-data-[side=right]:cursor-e-resize`,`hover:after:bg-sidebar-border`,`hover:group-data-[collapsible=offcanvas]:bg-sidebar`,`group-data-[collapsible=offcanvas]:translate-x-0`,`group-data-[collapsible=offcanvas]:after:left-full`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize`,`[[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,e),...t})}function T({className:e,children:t,...n}){return(0,u.jsxs)(`main`,{"data-slot":`sidebar-inset`,className:(0,s.cn)(`relative flex w-full flex-1 flex-col`,e),...n,children:[(0,u.jsx)(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)_+_0.5rem)]`}),(0,u.jsx)(`div`,{className:(0,s.cn)(`flex-1 inset-shadow-sm`),children:t})]})}function E({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:(0,s.cn)(`flex flex-col gap-2 p-2`,e),...t})}function D({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:(0,s.cn)(`flex flex-col gap-2 p-2`,e),...t})}function O({className:e,...t}){return(0,u.jsx)(i.Separator,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:(0,s.cn)(`bg-sidebar-border mx-2 w-auto`,e),...t})}function k({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:(0,s.cn)(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function A({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:(0,s.cn)(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function j({className:e,asChild:t=!1,...n}){let r=t?l.Slot.Slot:`div`;return(0,u.jsx)(r,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:(0,s.cn)(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2`,`text-sidebar-foreground/70`,`ring-sidebar-ring`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function M({className:e,asChild:t=!1,...n}){let r=t?l.Slot.Slot:`button`;return(0,u.jsx)(r,{"data-slot":`sidebar-group-action`,"data-sidebar":`group-action`,className:(0,s.cn)(`text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform`,`focus-visible:ring-2`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`after:absolute after:-inset-2 md:after:hidden`,`group-data-[collapsible=icon]:hidden`,e),...n})}function N({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:(0,s.cn)(`w-full text-sm`,e),...t})}function P({className:e,...t}){return(0,u.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:(0,s.cn)(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function F({className:e,...t}){return(0,u.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:(0,s.cn)(`group/menu-item relative`,e),...t})}const I=(0,c.cva)([`peer/menu-button`,`cursor-pointer`,`flex w-full items-center gap-2`,`overflow-hidden rounded-md p-2 outline-hidden`,`text-left truncate`,`transition-[color,width,height,padding]`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`group-has-data-[sidebar=menu-action]/menu-item:pr-8`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`data-[active=true]:bg-sidebar-primary-muted`,`data-[active=true]:font-medium`,`data-[active=true]:text-sidebar-primary`,`data-[state=open]:hover:bg-sidebar-accent`,`data-[state=open]:hover:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:size-8!`,`group-data-[collapsible=icon]:p-2!`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`[&>span:last-child]:truncate`],{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function L({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:i=`default`,tooltip:a,className:o,...c}){let d=e?l.Slot.Slot:`button`,{isMobile:f,state:p}=b(),m=(0,u.jsx)(d,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":i,"data-active":t,className:(0,s.cn)(I({variant:n,size:i}),o),...c});return a?(typeof a==`string`&&(a={children:a}),(0,u.jsxs)(r.Tooltip,{children:[(0,u.jsx)(r.TooltipTrigger,{asChild:!0,children:m}),(0,u.jsx)(r.TooltipContent,{side:`right`,align:`center`,hidden:p!==`collapsed`||f,...a})]})):m}function R({className:e,asChild:t=!1,showOnHover:n=!1,...r}){let i=t?l.Slot.Slot:`button`;return(0,u.jsx)(i,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:(0,s.cn)(`text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform`,`focus-visible:ring-2`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`after:absolute after:-inset-2 md:after:hidden`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,n&&`peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,n&&`group-focus-within/menu-item:opacity-100`,n&&`group-hover/menu-item:opacity-100`,n&&`data-[state=open]:opacity-100 md:opacity-0`,e),...r})}function z({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:(0,s.cn)(`text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none`,`peer-hover/menu-button:text-sidebar-accent-foreground`,`peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,e),...t})}function B({className:e,showIcon:t=!1,...r}){let i=(0,d.useMemo)(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,u.jsxs)(`div`,{"data-slot":`sidebar-menu-skeleton`,"data-sidebar":`menu-skeleton`,className:(0,s.cn)(`flex h-8 items-center gap-2 rounded-md px-2`,e),...r,children:[t&&(0,u.jsx)(n.Skeleton,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),(0,u.jsx)(n.Skeleton,{className:`h-4 max-w-(--skeleton-width) flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})}function V({className:e,...t}){return(0,u.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:(0,s.cn)(`border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5`,`group-data-[collapsible=icon]:hidden`,e),...t})}function H({className:e,...t}){return(0,u.jsx)(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:(0,s.cn)(`group/menu-sub-item relative`,e),...t})}function U({asChild:e=!1,size:t=`md`,isActive:n=!1,className:r,...i}){let a=e?l.Slot.Slot:`a`;return(0,u.jsx)(a,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:(0,s.cn)(`text-sidebar-foreground`,`ring-sidebar-ring`,`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden`,`focus-visible:ring-2`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`[&>svg]:text-sidebar-accent-foreground`,`[&>span:last-child]:truncate`,`data-[active=true]:bg-sidebar-accent`,`data-[active=true]:text-sidebar-accent-foreground`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,`group-data-[collapsible=icon]:hidden`,r),...i})}const W=({children:e})=>(0,u.jsx)(x,{children:e}),G=({children:e})=>(0,u.jsxs)(`header`,{className:(0,s.cn)(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)_+_0.5rem)]`,`sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`shadow-nav flex items-center`,`transition-[width,height] ease-linear`,`group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)`,`sm:group-has-data-[collapsible=icon]/sidebar-wrapper:h-[calc(var(--header-height)_+_0.5rem)]`),children:[(0,u.jsx)(C,{}),(0,u.jsxs)(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[(0,u.jsx)(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg`,children:(0,u.jsx)(o.ShoppingCartIcon,{size:20})}),(0,u.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,u.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,u.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,u.jsx)(`div`,{className:`flex flex-1 items-center justify-end`,children:e})]}),K=({children:e,...t})=>(0,u.jsx)(S,{variant:`inset`,collapsible:`icon`,...t,children:e}),q=({children:e})=>(0,u.jsx)(T,{children:(0,u.jsx)(`section`,{className:`relative size-full`,children:(0,u.jsx)(`div`,{className:`absolute inset-0 flex flex-col`,children:e})})}),J=({className:e,children:t})=>(0,u.jsx)(`div`,{"data-slot":`main-header`,className:(0,s.cn)(`flex-0 snap-start`,e),children:t}),Y=({className:e,children:t})=>(0,u.jsx)(`div`,{"data-slot":`main-content`,className:(0,s.cn)(`flex w-full flex-1 snap-y flex-col gap-4 overflow-y-auto px-2 sm:px-4`,e),children:t}),X=({className:e,children:t})=>(0,u.jsx)(`div`,{"data-slot":`main-footer`,className:(0,s.cn)(`border-border-weak hidden w-full flex-0 border-t pt-2 sm:flex`,e),children:t}),Z=({children:e,className:t})=>(0,u.jsx)(`div`,{"data-slot":`main-group`,className:(0,s.cn)(`flex size-full flex-col gap-4`,t),children:e}),Q=({className:e,children:t})=>(0,u.jsx)(`div`,{"data-slot":`main-group-content`,className:(0,s.cn)(`bg-card shadow-card size-full max-w-5xl flex-1 snap-start snap-always scroll-mt-4 rounded-md p-4`,e),children:t});exports.AppLayoutHeader=G,exports.AppLayoutMain=q,exports.AppLayoutMainContent=Y,exports.AppLayoutMainFooter=X,exports.AppLayoutMainGroup=Z,exports.AppLayoutMainGroupContent=Q,exports.AppLayoutMainHeader=J,exports.AppLayoutSidebar=K,exports.AppLayoutSidebarContent=k,exports.AppLayoutSidebarFooter=D,exports.AppLayoutSidebarGroup=A,exports.AppLayoutSidebarGroupAction=M,exports.AppLayoutSidebarGroupContent=N,exports.AppLayoutSidebarGroupLabel=j,exports.AppLayoutSidebarHeader=E,exports.AppLayoutSidebarInset=T,exports.AppLayoutSidebarMenu=P,exports.AppLayoutSidebarMenuAction=R,exports.AppLayoutSidebarMenuBadge=z,exports.AppLayoutSidebarMenuButton=L,exports.AppLayoutSidebarMenuItem=F,exports.AppLayoutSidebarMenuSkeleton=B,exports.AppLayoutSidebarMenuSub=V,exports.AppLayoutSidebarMenuSubButton=U,exports.AppLayoutSidebarMenuSubItem=H,exports.AppLayoutSidebarRail=w,exports.AppLayoutSidebarSeparator=O,exports.AppLayoutSidebarTrigger=C,exports.AppLayoutWrapper=W,exports.Sidebar=S,exports.SidebarProvider=x,exports.useSidebar=b;
|
|
1
|
+
"use client";const e=require(`../../chunk-CUT6urMc.cjs`),t=require(`../../button-119IIVCy.cjs`),n=require(`../../skeleton-CmGSyYRm.cjs`),r=require(`../../tooltip-CQ8hkJ42.cjs`),i=require(`../../separator-JGL-8B0V.cjs`),a=require(`../../sheet-slcLNlWv.cjs`),o=e.__toESM(require(`lucide-react`)),s=e.__toESM(require(`@customafk/react-toolkit/utils`)),c=e.__toESM(require(`class-variance-authority`)),l=e.__toESM(require(`radix-ui`)),u=e.__toESM(require(`react/jsx-runtime`)),d=e.__toESM(require(`react`)),f=e.__toESM(require(`@customafk/react-toolkit/hooks/useMobile`)),p=`sidebar_state`,m=3600*24*7,h=`16rem`,g=`16rem`,_=`3rem`,v=`b`,y=(0,d.createContext)(null);function b(){let e=(0,d.useContext)(y);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function x({defaultOpen:e=!0,open:t,onOpenChange:n,className:i,style:a,children:o,...c}){let l=(0,f.useIsMobile)(),[p,m]=(0,d.useState)(!1),[h,g]=(0,d.useState)(e),_=t??h,v=(0,d.useCallback)(e=>{let t=typeof e==`function`?e(_):e;n?n(t):g(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,_]),b=(0,d.useCallback)(()=>l?m(e=>!e):v(e=>!e),[l,v,m]);(0,d.useEffect)(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),b())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b]);let x=_?`expanded`:`collapsed`,S=(0,d.useMemo)(()=>({state:x,isMobile:l,toggleSidebar:b,open:_,setOpen:v,openMobile:p,setOpenMobile:m}),[x,_,v,l,p,m,b]);return(0,u.jsx)(y.Provider,{value:S,children:(0,u.jsx)(r.TooltipProvider,{delayDuration:0,children:(0,u.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:(0,s.cn)(`group/sidebar-wrapper`,`has-data-[variant=inset]:bg-sidebar`,`flex h-svh w-full`,i),...c,children:o})})})}function S({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...c}){let{isMobile:l,state:d,openMobile:f,setOpenMobile:p}=b();return n===`none`?(0,u.jsx)(`aside`,{"data-slot":`sidebar`,className:(0,s.cn)(`bg-sidebar`,`text-sidebar-foreground`,`flex h-full w-(--sidebar-width) flex-col`,r),...c,children:i}):l?(0,u.jsx)(a.Sheet,{open:f,onOpenChange:p,...c,children:(0,u.jsxs)(a.SheetContent,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden`,style:{"--sidebar-width":`16rem`},side:e,children:[(0,u.jsxs)(a.SheetHeader,{className:`sr-only`,children:[(0,u.jsx)(a.SheetTitle,{children:`Sidebar`}),(0,u.jsx)(a.SheetDescription,{children:`Displays the mobile sidebar.`})]}),(0,u.jsxs)(`div`,{className:`flex size-full flex-col`,children:[(0,u.jsxs)(`div`,{className:`border-border-weak flex items-center gap-x-2 border-b p-2 pr-4`,children:[(0,u.jsx)(C,{}),(0,u.jsx)(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground ml-2 flex aspect-square size-8 items-center justify-center rounded-lg`,children:(0,u.jsx)(o.ShoppingCartIcon,{size:20})}),(0,u.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,u.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,u.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),i]})]})}):(0,u.jsxs)(`aside`,{className:`group peer text-sidebar-foreground bg-card hidden md:block`,"data-state":d,"data-collapsible":d===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,u.jsx)(`div`,{"data-slot":`sidebar-gap`,className:(0,s.cn)(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height) + 0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,u.jsx)(`div`,{"data-slot":`sidebar-container`,className:(0,s.cn)(`hidden md:flex`,`shadow-nav fixed inset-y-0 top-14 z-10`,`h-[calc(100svh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...c,children:(0,u.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:(0,s.cn)(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function C({className:e,onClick:n,...r}){let{toggleSidebar:i}=b();return(0,u.jsxs)(t.Button,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:(0,s.cn)(`size-10 rounded-full`,e),onClick:e=>{n?.(e),i()},...r,children:[(0,u.jsx)(o.MenuIcon,{className:`!size-6`}),(0,u.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function w({className:e,...t}){let{toggleSidebar:n}=b();return(0,u.jsx)(`button`,{"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:n,title:`Toggle Sidebar`,className:(0,s.cn)(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear sm:flex`,`after:absolute after:inset-y-0 after:left-1/2 after:w-[2px]`,`group-data-[side=left]:-right-4`,`group-data-[side=right]:left-0`,`in-data-[side=left]:cursor-w-resize`,`in-data-[side=right]:cursor-e-resize`,`hover:after:bg-sidebar-border`,`hover:group-data-[collapsible=offcanvas]:bg-sidebar`,`group-data-[collapsible=offcanvas]:translate-x-0`,`group-data-[collapsible=offcanvas]:after:left-full`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize`,`[[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,e),...t})}function T({className:e,children:t,...n}){return(0,u.jsxs)(`main`,{"data-slot":`sidebar-inset`,className:(0,s.cn)(`relative flex w-full flex-1 flex-col`,e),...n,children:[(0,u.jsx)(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)_+_0.5rem)]`}),(0,u.jsx)(`div`,{className:(0,s.cn)(`flex-1 inset-shadow-sm`),children:t})]})}function E({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:(0,s.cn)(`flex flex-col gap-2 p-2`,e),...t})}function D({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:(0,s.cn)(`flex flex-col gap-2 p-2`,e),...t})}function O({className:e,...t}){return(0,u.jsx)(i.Separator,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:(0,s.cn)(`bg-sidebar-border mx-2 w-auto`,e),...t})}function k({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:(0,s.cn)(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function A({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:(0,s.cn)(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function j({className:e,asChild:t=!1,...n}){let r=t?l.Slot.Slot:`div`;return(0,u.jsx)(r,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:(0,s.cn)(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2`,`text-sidebar-foreground/70`,`ring-sidebar-ring`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function M({className:e,asChild:t=!1,...n}){let r=t?l.Slot.Slot:`button`;return(0,u.jsx)(r,{"data-slot":`sidebar-group-action`,"data-sidebar":`group-action`,className:(0,s.cn)(`text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform`,`focus-visible:ring-2`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`after:absolute after:-inset-2 md:after:hidden`,`group-data-[collapsible=icon]:hidden`,e),...n})}function N({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:(0,s.cn)(`w-full text-sm`,e),...t})}function P({className:e,...t}){return(0,u.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:(0,s.cn)(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function F({className:e,...t}){return(0,u.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:(0,s.cn)(`group/menu-item relative`,e),...t})}const I=(0,c.cva)([`peer/menu-button`,`cursor-pointer`,`flex w-full items-center gap-2`,`overflow-hidden rounded-md p-2 outline-hidden`,`text-left truncate`,`transition-[color,width,height,padding]`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`group-has-data-[sidebar=menu-action]/menu-item:pr-8`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`data-[active=true]:bg-sidebar-primary-muted`,`data-[active=true]:font-medium`,`data-[active=true]:text-sidebar-primary`,`data-[state=open]:hover:bg-sidebar-accent`,`data-[state=open]:hover:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:size-8!`,`group-data-[collapsible=icon]:p-2!`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`[&>span:last-child]:truncate`],{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function L({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:i=`default`,tooltip:a,className:o,...c}){let d=e?l.Slot.Slot:`button`,{isMobile:f,state:p}=b(),m=(0,u.jsx)(d,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":i,"data-active":t,className:(0,s.cn)(I({variant:n,size:i}),o),...c});return a?(typeof a==`string`&&(a={children:a}),(0,u.jsxs)(r.Tooltip,{children:[(0,u.jsx)(r.TooltipTrigger,{asChild:!0,children:m}),(0,u.jsx)(r.TooltipContent,{side:`right`,align:`center`,hidden:p!==`collapsed`||f,...a})]})):m}function R({className:e,asChild:t=!1,showOnHover:n=!1,...r}){let i=t?l.Slot.Slot:`button`;return(0,u.jsx)(i,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:(0,s.cn)(`text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform`,`focus-visible:ring-2`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`after:absolute after:-inset-2 md:after:hidden`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,n&&`peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,n&&`group-focus-within/menu-item:opacity-100`,n&&`group-hover/menu-item:opacity-100`,n&&`data-[state=open]:opacity-100 md:opacity-0`,e),...r})}function z({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:(0,s.cn)(`text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none`,`peer-hover/menu-button:text-sidebar-accent-foreground`,`peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,e),...t})}function B({className:e,showIcon:t=!1,...r}){let i=(0,d.useMemo)(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,u.jsxs)(`div`,{"data-slot":`sidebar-menu-skeleton`,"data-sidebar":`menu-skeleton`,className:(0,s.cn)(`flex h-8 items-center gap-2 rounded-md px-2`,e),...r,children:[t&&(0,u.jsx)(n.Skeleton,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),(0,u.jsx)(n.Skeleton,{className:`h-4 max-w-(--skeleton-width) flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})}function V({className:e,...t}){return(0,u.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:(0,s.cn)(`border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5`,`group-data-[collapsible=icon]:hidden`,e),...t})}function H({className:e,...t}){return(0,u.jsx)(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:(0,s.cn)(`group/menu-sub-item relative`,e),...t})}function U({asChild:e=!1,size:t=`md`,isActive:n=!1,className:r,...i}){let a=e?l.Slot.Slot:`a`;return(0,u.jsx)(a,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:(0,s.cn)(`text-sidebar-foreground`,`ring-sidebar-ring`,`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden`,`focus-visible:ring-2`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`[&>svg]:text-sidebar-accent-foreground`,`[&>span:last-child]:truncate`,`data-[active=true]:bg-sidebar-accent`,`data-[active=true]:text-sidebar-accent-foreground`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,`group-data-[collapsible=icon]:hidden`,r),...i})}const W=({children:e})=>(0,u.jsx)(x,{children:e}),G=({children:e})=>(0,u.jsxs)(`header`,{className:(0,s.cn)(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)_+_0.5rem)]`,`sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`shadow-nav flex items-center`,`transition-[width,height] ease-linear`,`group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)`,`sm:group-has-data-[collapsible=icon]/sidebar-wrapper:h-[calc(var(--header-height)_+_0.5rem)]`),children:[(0,u.jsx)(C,{}),(0,u.jsxs)(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[(0,u.jsx)(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg`,children:(0,u.jsx)(o.ShoppingCartIcon,{size:20})}),(0,u.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,u.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,u.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,u.jsx)(`div`,{className:`flex flex-1 items-center justify-end`,children:e})]}),K=({children:e,...t})=>(0,u.jsx)(S,{variant:`inset`,collapsible:`icon`,...t,children:e}),q=({children:e})=>(0,u.jsx)(T,{children:(0,u.jsx)(`section`,{className:`relative size-full`,children:(0,u.jsx)(`div`,{className:`absolute inset-0 flex flex-col`,children:e})})}),J=({className:e,children:t})=>(0,u.jsx)(`div`,{"data-slot":`main-header`,className:(0,s.cn)(`flex-0 snap-start`,e),children:t}),Y=({className:e,children:t})=>(0,u.jsx)(`div`,{"data-slot":`main-content`,className:(0,s.cn)(`flex w-full flex-1 snap-y flex-col gap-4 overflow-y-auto px-2 sm:px-4`,e),children:t}),X=({className:e,children:t})=>(0,u.jsx)(`div`,{"data-slot":`main-footer`,className:(0,s.cn)(`border-border-weak hidden w-full flex-0 border-t pt-2 sm:flex`,e),children:t}),Z=({children:e,className:t})=>(0,u.jsx)(`div`,{"data-slot":`main-group`,className:(0,s.cn)(`flex size-full flex-col gap-4`,t),children:e}),Q=({className:e,children:t})=>(0,u.jsx)(`div`,{"data-slot":`main-group-content`,className:(0,s.cn)(`bg-card shadow-card size-full max-w-5xl flex-1 snap-start snap-always scroll-mt-4 rounded-md p-4`,e),children:t});exports.AppLayoutHeader=G,exports.AppLayoutMain=q,exports.AppLayoutMainContent=Y,exports.AppLayoutMainFooter=X,exports.AppLayoutMainGroup=Z,exports.AppLayoutMainGroupContent=Q,exports.AppLayoutMainHeader=J,exports.AppLayoutSidebar=K,exports.AppLayoutSidebarContent=k,exports.AppLayoutSidebarFooter=D,exports.AppLayoutSidebarGroup=A,exports.AppLayoutSidebarGroupAction=M,exports.AppLayoutSidebarGroupContent=N,exports.AppLayoutSidebarGroupLabel=j,exports.AppLayoutSidebarHeader=E,exports.AppLayoutSidebarInset=T,exports.AppLayoutSidebarMenu=P,exports.AppLayoutSidebarMenuAction=R,exports.AppLayoutSidebarMenuBadge=z,exports.AppLayoutSidebarMenuButton=L,exports.AppLayoutSidebarMenuItem=F,exports.AppLayoutSidebarMenuSkeleton=B,exports.AppLayoutSidebarMenuSub=V,exports.AppLayoutSidebarMenuSubButton=U,exports.AppLayoutSidebarMenuSubItem=H,exports.AppLayoutSidebarRail=w,exports.AppLayoutSidebarSeparator=O,exports.AppLayoutSidebarTrigger=C,exports.AppLayoutWrapper=W,exports.Sidebar=S,exports.SidebarProvider=x,exports.useSidebar=b;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|