@customafk/lunas-ui 0.2.38 → 0.2.39
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/{alert-BbvPwf2x.mjs → alert-BzBDfGk2.js} +1 -1
- package/dist/alert-BzBDfGk2.js.map +1 -0
- package/dist/{alert-DDxGzOzi.d.cts → alert-CNFuxKp7.d.cts} +5 -5
- package/dist/{alert-C-bk-pne.d.mts → alert-DOpQdSIC.d.ts} +7 -7
- package/dist/{avatar-fltdRVsJ.mjs → avatar-Hpj8lmux.js} +1 -1
- package/dist/avatar-Hpj8lmux.js.map +1 -0
- package/dist/{badge-CDGBGq8X.mjs → badge-CRpRXSuO.js} +1 -1
- package/dist/badge-CRpRXSuO.js.map +1 -0
- package/dist/{badge-IUtmECjN.d.cts → badge-D4c9IlYD.d.cts} +6 -6
- package/dist/{badge-lvr8nB_0.d.mts → badge-DowUoI6w.d.ts} +6 -6
- package/dist/{button-DhDRMeFA.d.mts → button-D4YMSwqK.d.ts} +6 -6
- package/dist/{button-Brw-tmr9.d.cts → button-IMi0bEY_.d.cts} +4 -4
- package/dist/button-LMMbL-uH.js +2 -0
- package/dist/button-LMMbL-uH.js.map +1 -0
- package/dist/{button.variants-DkMqWB8G.mjs → button.variants-CoSpd71B.js} +1 -1
- package/dist/button.variants-CoSpd71B.js.map +1 -0
- package/dist/calendar-DzPt7b6k.js +2 -0
- package/dist/calendar-DzPt7b6k.js.map +1 -0
- package/dist/cards/{grid-product-card.d.mts → grid-product-card.d.ts} +1 -1
- package/dist/cards/grid-product-card.js +2 -0
- package/dist/cards/grid-product-card.js.map +1 -0
- package/dist/cards/{product-card.d.mts → product-card.d.ts} +1 -1
- package/dist/cards/product-card.js +2 -0
- package/dist/cards/product-card.js.map +1 -0
- package/dist/cards/{simple-card.d.mts → simple-card.d.ts} +1 -1
- package/dist/cards/simple-card.js +2 -0
- package/dist/cards/simple-card.js.map +1 -0
- package/dist/{checkbox-Cat3i08X.mjs → checkbox-DLGDoU-1.js} +1 -1
- package/dist/checkbox-DLGDoU-1.js.map +1 -0
- package/dist/{close-_UHFeiLS.mjs → close-C0PdZGxr.js} +1 -1
- package/dist/close-C0PdZGxr.js.map +1 -0
- package/dist/cms-layout-tPwrgJZc.js +2 -0
- package/dist/cms-layout-tPwrgJZc.js.map +1 -0
- package/dist/command-2gUejA6g.js +2 -0
- package/dist/command-2gUejA6g.js.map +1 -0
- package/dist/data-display/{country.d.mts → country.d.ts} +2 -2
- package/dist/data-display/country.js +2 -0
- package/dist/data-display/country.js.map +1 -0
- package/dist/data-display/{data-list.d.mts → data-list.d.ts} +1 -1
- package/dist/data-display/{data-list.mjs → data-list.js} +1 -1
- package/dist/data-display/data-list.js.map +1 -0
- package/dist/data-display/{date-tooltip.d.mts → date-tooltip.d.ts} +1 -1
- package/dist/data-display/date-tooltip.js +2 -0
- package/dist/data-display/date-tooltip.js.map +1 -0
- package/dist/data-display/{date.d.mts → date.d.ts} +1 -1
- package/dist/data-display/date.js +1 -0
- package/dist/data-display/{empty.d.mts → empty.d.ts} +1 -1
- package/dist/data-display/{empty.mjs → empty.js} +1 -1
- package/dist/data-display/empty.js.map +1 -0
- package/dist/data-display/{name.d.mts → name.d.ts} +1 -1
- package/dist/data-display/name.js +2 -0
- package/dist/data-display/name.js.map +1 -0
- package/dist/data-display/{phone-number.d.mts → phone-number.d.ts} +1 -1
- package/dist/data-display/phone-number.js +2 -0
- package/dist/data-display/phone-number.js.map +1 -0
- package/dist/data-display/{role-badge.d.mts → role-badge.d.ts} +2 -2
- package/dist/data-display/role-badge.js +2 -0
- package/dist/data-display/role-badge.js.map +1 -0
- package/dist/data-display/statistic.d.cts +3 -3
- package/dist/data-display/{statistic.d.mts → statistic.d.ts} +4 -4
- package/dist/data-display/statistic.js +1 -0
- package/dist/data-display/{user.d.mts → user.d.ts} +1 -1
- package/dist/data-display/user.js +1 -0
- package/dist/{date-fY3sUcLp.mjs → date-BIqCFM1Z.js} +1 -1
- package/dist/date-BIqCFM1Z.js.map +1 -0
- package/dist/{dialog-CsltUGHB.d.mts → dialog-AcOtFuF4.d.ts} +12 -12
- package/dist/{dialog-D0zfwr8i.d.cts → dialog-BLjShZci.d.cts} +12 -12
- package/dist/dialog-CmutQ3rp.js +2 -0
- package/dist/dialog-CmutQ3rp.js.map +1 -0
- package/dist/dialogs/{confirm-dialog.d.mts → confirm-dialog.d.ts} +1 -1
- package/dist/dialogs/confirm-dialog.js +2 -0
- package/dist/dialogs/confirm-dialog.js.map +1 -0
- package/dist/dialogs/detail-dialog/components/sidebar.d.cts +24 -24
- package/dist/dialogs/detail-dialog/components/{sidebar.d.mts → sidebar.d.ts} +29 -29
- package/dist/dialogs/detail-dialog/components/sidebar.js +1 -0
- package/dist/dialogs/detail-dialog/{index.d.mts → index.d.ts} +1 -1
- package/dist/dialogs/detail-dialog/index.js +2 -0
- package/dist/dialogs/detail-dialog/index.js.map +1 -0
- package/dist/dialogs/{error-dialog.d.mts → error-dialog.d.ts} +1 -1
- package/dist/dialogs/error-dialog.js +2 -0
- package/dist/dialogs/error-dialog.js.map +1 -0
- package/dist/dialogs/{loading-dialog.d.mts → loading-dialog.d.ts} +1 -1
- package/dist/dialogs/loading-dialog.js +2 -0
- package/dist/dialogs/loading-dialog.js.map +1 -0
- package/dist/{dist-DVrfqn8H.mjs → dist-EPxjIRJp.js} +1 -1
- package/dist/dist-EPxjIRJp.js.map +1 -0
- package/dist/{drawer-CMD7JWH8.mjs → drawer-B3qXaN5p.js} +1 -1
- package/dist/drawer-B3qXaN5p.js.map +1 -0
- package/dist/{dropdown-menu-BWhiVsEf.mjs → dropdown-menu-DeHCVyby.js} +1 -1
- package/dist/dropdown-menu-DeHCVyby.js.map +1 -0
- package/dist/features/descriptions/index.d.cts +1 -1
- package/dist/features/descriptions/{index.d.mts → index.d.ts} +7 -7
- package/dist/features/descriptions/index.js +2 -0
- package/dist/features/descriptions/index.js.map +1 -0
- package/dist/features/search-modal/index.d.cts +2 -2
- package/dist/features/search-modal/{index.d.mts → index.d.ts} +3 -3
- package/dist/features/search-modal/index.js +1 -0
- package/dist/features/tables/index.d.cts +1 -1
- package/dist/features/tables/{index.d.mts → index.d.ts} +2 -2
- package/dist/features/tables/index.js +1 -0
- package/dist/features/tanstack-form/index.d.cts +1 -1
- package/dist/features/tanstack-form/{index.d.mts → index.d.ts} +1 -1
- package/dist/features/tanstack-form/index.js +1 -0
- package/dist/features/text-editor/index.d.cts +1 -1
- package/dist/features/text-editor/{index.d.mts → index.d.ts} +1 -1
- package/dist/features/text-editor/index.js +1 -0
- package/dist/field-DpoKF1nY.js +2 -0
- package/dist/field-DpoKF1nY.js.map +1 -0
- package/dist/{flex-B6YSJzGe.mjs → flex-CinRrgEy.js} +1 -1
- package/dist/flex-CinRrgEy.js.map +1 -0
- package/dist/{heading-De4Pn3mZ.mjs → heading-Bz-hSatD.js} +1 -1
- package/dist/heading-Bz-hSatD.js.map +1 -0
- package/dist/image-BpTuF_1w.js +2 -0
- package/dist/image-BpTuF_1w.js.map +1 -0
- package/dist/{index-BuNzvvj3.d.mts → index-BDMEeMn4.d.ts} +31 -31
- package/dist/{index-SMYnpHIM.d.mts → index-BiAWxLAj.d.ts} +330 -330
- package/dist/{index-Cm62M0Ft.d.mts → index-BlQGXGqt.d.ts} +1 -1
- package/dist/{index-9eog5ilY.d.cts → index-BxoQxUnW.d.cts} +2 -2
- package/dist/{index-CG8iS6qj.d.cts → index-C1WfBa-T.d.ts} +3 -3
- package/dist/{index-DI8qmezw.d.mts → index-Du_HLRsN.d.cts} +7 -7
- package/dist/{index-DsD83ZN8.d.cts → index-gSP59hja.d.cts} +8 -8
- package/dist/index.d.cts +8 -8
- package/dist/{index.d.mts → index.d.ts} +92 -92
- package/dist/index.js +1 -0
- package/dist/{input-DvkEND5a.d.cts → input-Aa-GQW2V.d.cts} +6 -6
- package/dist/{input-BFtFMzRG.d.mts → input-B1Wc5jsb.d.ts} +6 -6
- package/dist/{input-NJP2wQOm.mjs → input-DAfP6LZ7.js} +1 -1
- package/dist/input-DAfP6LZ7.js.map +1 -0
- package/dist/{label-CUCpwS5D.mjs → label-B8cAG2kc.js} +1 -1
- package/dist/label-B8cAG2kc.js.map +1 -0
- package/dist/layouts/cms-layout/index.d.ts +2 -0
- package/dist/layouts/cms-layout/index.js +1 -0
- package/dist/layouts/flex.d.cts +6 -6
- package/dist/layouts/{flex.d.mts → flex.d.ts} +7 -7
- package/dist/layouts/flex.js +1 -0
- package/dist/layouts/{grid.d.mts → grid.d.ts} +1 -1
- package/dist/layouts/{grid.mjs → grid.js} +1 -1
- package/dist/layouts/grid.js.map +1 -0
- package/dist/layouts/payment-layout/{index.d.mts → index.d.ts} +1 -1
- package/dist/layouts/payment-layout/index.js +1 -0
- package/dist/pages/FeatureDeveloping.d.cts +2 -2
- package/dist/pages/{FeatureDeveloping.d.mts → FeatureDeveloping.d.ts} +3 -3
- package/dist/pages/FeatureDeveloping.js +2 -0
- package/dist/pages/FeatureDeveloping.js.map +1 -0
- package/dist/pages/FeatureFixing.d.cts +2 -2
- package/dist/pages/{FeatureFixing.d.mts → FeatureFixing.d.ts} +3 -3
- package/dist/pages/FeatureFixing.js +2 -0
- package/dist/pages/FeatureFixing.js.map +1 -0
- package/dist/pages/LoginPage.d.cts +2 -2
- package/dist/pages/{LoginPage.d.mts → LoginPage.d.ts} +3 -3
- package/dist/pages/LoginPage.js +2 -0
- package/dist/pages/LoginPage.js.map +1 -0
- package/dist/pages/NotAuthorized.d.cts +2 -2
- package/dist/pages/{NotAuthorized.d.mts → NotAuthorized.d.ts} +3 -3
- package/dist/pages/NotAuthorized.js +2 -0
- package/dist/pages/NotAuthorized.js.map +1 -0
- package/dist/pages/NotFound.d.cts +2 -2
- package/dist/pages/{NotFound.d.mts → NotFound.d.ts} +3 -3
- package/dist/pages/NotFound.js +2 -0
- package/dist/pages/NotFound.js.map +1 -0
- package/dist/pages/RegisterPage.d.cts +2 -2
- package/dist/pages/{RegisterPage.d.mts → RegisterPage.d.ts} +3 -3
- package/dist/pages/RegisterPage.js +2 -0
- package/dist/pages/RegisterPage.js.map +1 -0
- package/dist/pages/VerifyEmailPage.d.cts +2 -2
- package/dist/pages/{VerifyEmailPage.d.mts → VerifyEmailPage.d.ts} +3 -3
- package/dist/pages/VerifyEmailPage.js +2 -0
- package/dist/pages/VerifyEmailPage.js.map +1 -0
- package/dist/{paragraph-DYLaQtTV.mjs → paragraph-Cc13ZI4d.js} +1 -1
- package/dist/paragraph-Cc13ZI4d.js.map +1 -0
- package/dist/payment-layout-giaGvs8T.js +2 -0
- package/dist/payment-layout-giaGvs8T.js.map +1 -0
- package/dist/popover-6233wU1s.js +2 -0
- package/dist/popover-6233wU1s.js.map +1 -0
- package/dist/{progress-CLeM0e7Z.mjs → progress-AYknlEgK.js} +1 -1
- package/dist/progress-AYknlEgK.js.map +1 -0
- package/dist/{radio-group-Y9bhdr55.mjs → radio-group-ImoBjpqZ.js} +1 -1
- package/dist/radio-group-ImoBjpqZ.js.map +1 -0
- package/dist/{resizable-CpCaSCFB.mjs → resizable-C-M-mu6b.js} +1 -1
- package/dist/resizable-C-M-mu6b.js.map +1 -0
- package/dist/search-modal-b2AE5WEW.js +2 -0
- package/dist/search-modal-b2AE5WEW.js.map +1 -0
- package/dist/{select-LlPCZFSF.mjs → select-CryLzZA0.js} +1 -1
- package/dist/select-CryLzZA0.js.map +1 -0
- package/dist/{separator-D3Gmkxzq.mjs → separator-BM8hA4DP.js} +1 -1
- package/dist/separator-BM8hA4DP.js.map +1 -0
- package/dist/{sheet-BFlIfNaA.mjs → sheet-DGXXYgWB.js} +1 -1
- package/dist/sheet-DGXXYgWB.js.map +1 -0
- package/dist/sidebar-BDrsbzo5.js +2 -0
- package/dist/sidebar-BDrsbzo5.js.map +1 -0
- package/dist/{skeleton-C51IdOfK.mjs → skeleton-DlRDNM97.js} +1 -1
- package/dist/skeleton-DlRDNM97.js.map +1 -0
- package/dist/{spinner-eClTgHjk.mjs → spinner-C1eamx3w.js} +1 -1
- package/dist/spinner-C1eamx3w.js.map +1 -0
- package/dist/{statistic-cwLwcukn.mjs → statistic-CYMqAYNc.js} +1 -1
- package/dist/statistic-CYMqAYNc.js.map +1 -0
- package/dist/{switch-BP7EPatj.mjs → switch-BLHmdRq2.js} +1 -1
- package/dist/switch-BLHmdRq2.js.map +1 -0
- package/dist/systems/{google.d.mts → google.d.ts} +1 -1
- package/dist/systems/{google.mjs → google.js} +1 -1
- package/dist/systems/google.js.map +1 -0
- package/dist/tables-DWQytYNm.js +4 -0
- package/dist/tables-DWQytYNm.js.map +1 -0
- package/dist/tanstack-form-YVdm9V01.js +12 -0
- package/dist/tanstack-form-YVdm9V01.js.map +1 -0
- package/dist/text-editor-WbS7pJJs.js +2 -0
- package/dist/text-editor-WbS7pJJs.js.map +1 -0
- package/dist/{textarea-7HDXcaK9.mjs → textarea-Bp6VvhiA.js} +1 -1
- package/dist/textarea-Bp6VvhiA.js.map +1 -0
- package/dist/{tooltip-Dxl5Wa8i.mjs → tooltip-CVIl6Hln.js} +1 -1
- package/dist/tooltip-CVIl6Hln.js.map +1 -0
- package/dist/{types-YLu40dXY.d.mts → types-BVSfF-1o.d.ts} +1 -1
- package/dist/{types-B5nyTWtO.mjs → types-BZqffRVJ.js} +1 -1
- package/dist/types-BZqffRVJ.js.map +1 -0
- package/dist/typography/paragraph.d.cts +5 -5
- package/dist/typography/{paragraph.d.mts → paragraph.d.ts} +6 -6
- package/dist/typography/paragraph.js +1 -0
- package/dist/typography/{title.d.mts → title.d.ts} +1 -1
- package/dist/typography/{title.mjs → title.js} +1 -1
- package/dist/typography/title.js.map +1 -0
- package/dist/ui/alert-dialog.d.cts +12 -12
- package/dist/ui/{alert-dialog.d.mts → alert-dialog.d.ts} +13 -13
- package/dist/ui/alert-dialog.js +2 -0
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.d.cts +1 -1
- package/dist/ui/{alert.d.mts → alert.d.ts} +1 -1
- package/dist/ui/alert.js +1 -0
- package/dist/ui/aspect-ratio.d.cts +2 -2
- package/dist/ui/{aspect-ratio.d.mts → aspect-ratio.d.ts} +3 -3
- package/dist/ui/{aspect-ratio.mjs → aspect-ratio.js} +1 -1
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/avatar.d.cts +4 -4
- package/dist/ui/{avatar.d.mts → avatar.d.ts} +5 -5
- package/dist/ui/avatar.js +1 -0
- package/dist/ui/badge.d.cts +1 -1
- package/dist/ui/badge.d.ts +2 -0
- package/dist/ui/badge.js +1 -0
- package/dist/ui/breadcrumb.d.cts +8 -8
- package/dist/ui/{breadcrumb.d.mts → breadcrumb.d.ts} +9 -9
- package/dist/ui/breadcrumb.js +2 -0
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button-group.d.cts +7 -7
- package/dist/ui/{button-group.d.mts → button-group.d.ts} +9 -9
- package/dist/ui/button-group.js +2 -0
- package/dist/ui/button-group.js.map +1 -0
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.ts +2 -0
- package/dist/ui/button.js +1 -0
- package/dist/ui/buttons/{add-new.d.mts → add-new.d.ts} +1 -1
- package/dist/ui/buttons/add-new.js +2 -0
- package/dist/ui/buttons/add-new.js.map +1 -0
- package/dist/ui/buttons/{edit.d.mts → edit.d.ts} +1 -1
- package/dist/ui/buttons/edit.js +2 -0
- package/dist/ui/buttons/edit.js.map +1 -0
- package/dist/ui/buttons/{refresh.d.mts → refresh.d.ts} +1 -1
- package/dist/ui/buttons/refresh.js +2 -0
- package/dist/ui/buttons/refresh.js.map +1 -0
- package/dist/ui/buttons/{trash.d.mts → trash.d.ts} +1 -1
- package/dist/ui/buttons/trash.js +2 -0
- package/dist/ui/buttons/trash.js.map +1 -0
- package/dist/ui/buttons/{upload-image.d.mts → upload-image.d.ts} +1 -1
- package/dist/ui/buttons/upload-image.js +2 -0
- package/dist/ui/buttons/upload-image.js.map +1 -0
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/{calendar.d.mts → calendar.d.ts} +5 -5
- package/dist/ui/calendar.js +1 -0
- package/dist/ui/card.d.cts +8 -8
- package/dist/ui/{card.d.mts → card.d.ts} +9 -9
- package/dist/ui/card.js +2 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/carousel.d.cts +7 -7
- package/dist/ui/{carousel.d.mts → carousel.d.ts} +8 -8
- package/dist/ui/carousel.js +2 -0
- package/dist/ui/carousel.js.map +1 -0
- package/dist/ui/checkbox.d.cts +2 -2
- package/dist/ui/{checkbox.d.mts → checkbox.d.ts} +3 -3
- package/dist/ui/checkbox.js +1 -0
- package/dist/ui/collapsible.d.cts +4 -4
- package/dist/ui/{collapsible.d.mts → collapsible.d.ts} +5 -5
- package/dist/ui/{collapsible.mjs → collapsible.js} +1 -1
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/command.d.cts +11 -11
- package/dist/ui/{command.d.mts → command.d.ts} +12 -12
- package/dist/ui/command.js +1 -0
- package/dist/ui/context-menu.d.cts +16 -16
- package/dist/ui/{context-menu.d.mts → context-menu.d.ts} +17 -17
- package/dist/ui/{context-menu.mjs → context-menu.js} +1 -1
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/dialog.d.cts +1 -1
- package/dist/ui/{dialog.d.mts → dialog.d.ts} +1 -1
- package/dist/ui/dialog.js +1 -0
- package/dist/ui/drawer.d.cts +11 -11
- package/dist/ui/{drawer.d.mts → drawer.d.ts} +12 -12
- package/dist/ui/drawer.js +1 -0
- package/dist/ui/dropdown-menu.d.cts +16 -16
- package/dist/ui/{dropdown-menu.d.mts → dropdown-menu.d.ts} +17 -17
- package/dist/ui/dropdown-menu.js +1 -0
- package/dist/ui/empty.d.cts +9 -9
- package/dist/ui/{empty.d.mts → empty.d.ts} +10 -10
- package/dist/ui/{empty.mjs → empty.js} +1 -1
- package/dist/ui/empty.js.map +1 -0
- package/dist/ui/field.d.cts +24 -24
- package/dist/ui/field.d.ts +65 -0
- package/dist/ui/field.js +1 -0
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/{file-uploader.d.mts → file-uploader.d.ts} +3 -3
- package/dist/ui/file-uploader.js +3 -0
- package/dist/ui/file-uploader.js.map +1 -0
- package/dist/ui/form.d.cts +10 -10
- package/dist/ui/{form.d.mts → form.d.ts} +11 -11
- package/dist/ui/form.js +2 -0
- package/dist/ui/form.js.map +1 -0
- package/dist/ui/hover-card.d.cts +4 -4
- package/dist/ui/{hover-card.d.mts → hover-card.d.ts} +5 -5
- package/dist/ui/{hover-card.mjs → hover-card.js} +1 -1
- package/dist/ui/hover-card.js.map +1 -0
- package/dist/ui/{image.d.mts → image.d.ts} +1 -1
- package/dist/ui/image.js +1 -0
- package/dist/ui/input-otp.d.cts +5 -5
- package/dist/ui/{input-otp.d.mts → input-otp.d.ts} +6 -6
- package/dist/ui/{input-otp.mjs → input-otp.js} +1 -1
- package/dist/ui/input-otp.js.map +1 -0
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.ts +2 -0
- package/dist/ui/input.js +1 -0
- package/dist/ui/inputs/search-input.d.cts +3 -3
- package/dist/ui/inputs/{search-input.d.mts → search-input.d.ts} +4 -4
- package/dist/ui/inputs/search-input.js +2 -0
- package/dist/ui/inputs/search-input.js.map +1 -0
- package/dist/ui/item.d.cts +14 -14
- package/dist/ui/{item.d.mts → item.d.ts} +16 -16
- package/dist/ui/item.js +2 -0
- package/dist/ui/item.js.map +1 -0
- package/dist/ui/label.d.cts +2 -2
- package/dist/ui/{label.d.mts → label.d.ts} +3 -3
- package/dist/ui/label.js +1 -0
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/{menubar.d.mts → menubar.d.ts} +18 -18
- package/dist/ui/{menubar.mjs → menubar.js} +1 -1
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/multi-select.d.cts +2 -2
- package/dist/ui/{multi-select.d.mts → multi-select.d.ts} +5 -5
- package/dist/ui/multi-select.js +2 -0
- package/dist/ui/multi-select.js.map +1 -0
- package/dist/ui/navigation-menu.d.cts +11 -11
- package/dist/ui/{navigation-menu.d.mts → navigation-menu.d.ts} +12 -12
- package/dist/ui/{navigation-menu.mjs → navigation-menu.js} +1 -1
- package/dist/ui/navigation-menu.js.map +1 -0
- package/dist/ui/pagination.d.cts +9 -9
- package/dist/ui/{pagination.d.mts → pagination.d.ts} +10 -10
- package/dist/ui/pagination.js +2 -0
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/popover.d.cts +6 -6
- package/dist/ui/{popover.d.mts → popover.d.ts} +7 -7
- package/dist/ui/popover.js +1 -0
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/{progress.d.mts → progress.d.ts} +3 -3
- package/dist/ui/progress.js +1 -0
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/{radio-group.d.mts → radio-group.d.ts} +4 -4
- package/dist/ui/radio-group.js +1 -0
- package/dist/ui/resizable.d.cts +9 -9
- package/dist/ui/{resizable.d.mts → resizable.d.ts} +10 -10
- package/dist/ui/resizable.js +1 -0
- package/dist/ui/scroll-area.d.cts +5 -5
- package/dist/ui/{scroll-area.d.mts → scroll-area.d.ts} +6 -6
- package/dist/ui/{scroll-area.mjs → scroll-area.js} +1 -1
- package/dist/ui/scroll-area.js.map +1 -0
- package/dist/ui/select.d.cts +9 -9
- package/dist/ui/{select.d.mts → select.d.ts} +10 -10
- package/dist/ui/select.js +1 -0
- package/dist/ui/separator.d.cts +2 -2
- package/dist/ui/{separator.d.mts → separator.d.ts} +3 -3
- package/dist/ui/separator.js +1 -0
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/{sheet.d.mts → sheet.d.ts} +10 -10
- package/dist/ui/sheet.js +1 -0
- package/dist/ui/skeleton.d.cts +2 -2
- package/dist/ui/{skeleton.d.mts → skeleton.d.ts} +3 -3
- package/dist/ui/skeleton.js +1 -0
- package/dist/ui/slider.d.cts +2 -2
- package/dist/ui/{slider.d.mts → slider.d.ts} +3 -3
- package/dist/ui/{slider.mjs → slider.js} +1 -1
- package/dist/ui/slider.js.map +1 -0
- package/dist/ui/sonner.d.cts +2 -2
- package/dist/ui/{sonner.d.mts → sonner.d.ts} +3 -3
- package/dist/ui/{sonner.mjs → sonner.js} +1 -1
- package/dist/ui/sonner.js.map +1 -0
- package/dist/ui/spinner.d.cts +2 -2
- package/dist/ui/{spinner.d.mts → spinner.d.ts} +3 -3
- package/dist/ui/spinner.js +1 -0
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/{switch.d.mts → switch.d.ts} +3 -3
- package/dist/ui/switch.js +1 -0
- package/dist/ui/table.d.cts +17 -17
- package/dist/ui/{table.d.mts → table.d.ts} +18 -18
- package/dist/ui/{table.mjs → table.js} +1 -1
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/{tabs.d.mts → tabs.d.ts} +6 -6
- package/dist/ui/{tabs.mjs → tabs.js} +1 -1
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/{textarea.d.mts → textarea.d.ts} +3 -3
- package/dist/ui/textarea.js +1 -0
- package/dist/ui/toggle-group.d.cts +3 -3
- package/dist/ui/{toggle-group.d.mts → toggle-group.d.ts} +5 -5
- package/dist/ui/toggle-group.js +2 -0
- package/dist/ui/toggle-group.js.map +1 -0
- package/dist/ui/toggle.d.cts +4 -4
- package/dist/ui/{toggle.d.mts → toggle.d.ts} +5 -5
- package/dist/ui/{toggle.mjs → toggle.js} +1 -1
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.d.cts +5 -5
- package/dist/ui/{tooltip.d.mts → tooltip.d.ts} +6 -6
- package/dist/ui/tooltip.js +1 -0
- package/dist/user-BSpgswEC.js +2 -0
- package/dist/user-BSpgswEC.js.map +1 -0
- package/package.json +1 -1
- package/dist/alert-BbvPwf2x.mjs.map +0 -1
- package/dist/avatar-fltdRVsJ.mjs.map +0 -1
- package/dist/badge-CDGBGq8X.mjs.map +0 -1
- package/dist/button-CCVJTHBI.mjs +0 -2
- package/dist/button-CCVJTHBI.mjs.map +0 -1
- package/dist/button.variants-DkMqWB8G.mjs.map +0 -1
- package/dist/calendar-R866yyd1.mjs +0 -2
- package/dist/calendar-R866yyd1.mjs.map +0 -1
- package/dist/cards/grid-product-card.mjs +0 -2
- package/dist/cards/grid-product-card.mjs.map +0 -1
- package/dist/cards/product-card.mjs +0 -2
- package/dist/cards/product-card.mjs.map +0 -1
- package/dist/cards/simple-card.mjs +0 -2
- package/dist/cards/simple-card.mjs.map +0 -1
- package/dist/checkbox-Cat3i08X.mjs.map +0 -1
- package/dist/close-_UHFeiLS.mjs.map +0 -1
- package/dist/cms-layout-DkCR1AfG.mjs +0 -2
- package/dist/cms-layout-DkCR1AfG.mjs.map +0 -1
- package/dist/command-D6_CSbwJ.mjs +0 -2
- package/dist/command-D6_CSbwJ.mjs.map +0 -1
- package/dist/data-display/country.mjs +0 -2
- package/dist/data-display/country.mjs.map +0 -1
- package/dist/data-display/data-list.mjs.map +0 -1
- package/dist/data-display/date-tooltip.mjs +0 -2
- package/dist/data-display/date-tooltip.mjs.map +0 -1
- package/dist/data-display/date.mjs +0 -1
- package/dist/data-display/empty.mjs.map +0 -1
- package/dist/data-display/name.mjs +0 -2
- package/dist/data-display/name.mjs.map +0 -1
- package/dist/data-display/phone-number.mjs +0 -2
- package/dist/data-display/phone-number.mjs.map +0 -1
- package/dist/data-display/role-badge.mjs +0 -2
- package/dist/data-display/role-badge.mjs.map +0 -1
- package/dist/data-display/statistic.mjs +0 -1
- package/dist/data-display/user.mjs +0 -1
- package/dist/date-fY3sUcLp.mjs.map +0 -1
- package/dist/dialog-CLDnvNH_.mjs +0 -2
- package/dist/dialog-CLDnvNH_.mjs.map +0 -1
- package/dist/dialogs/confirm-dialog.mjs +0 -2
- package/dist/dialogs/confirm-dialog.mjs.map +0 -1
- package/dist/dialogs/detail-dialog/components/sidebar.mjs +0 -1
- package/dist/dialogs/detail-dialog/index.mjs +0 -2
- package/dist/dialogs/detail-dialog/index.mjs.map +0 -1
- package/dist/dialogs/error-dialog.mjs +0 -2
- package/dist/dialogs/error-dialog.mjs.map +0 -1
- package/dist/dialogs/loading-dialog.mjs +0 -2
- package/dist/dialogs/loading-dialog.mjs.map +0 -1
- package/dist/dist-DVrfqn8H.mjs.map +0 -1
- package/dist/drawer-CMD7JWH8.mjs.map +0 -1
- package/dist/dropdown-menu-BWhiVsEf.mjs.map +0 -1
- package/dist/features/descriptions/index.mjs +0 -2
- package/dist/features/descriptions/index.mjs.map +0 -1
- package/dist/features/search-modal/index.mjs +0 -1
- package/dist/features/tables/index.mjs +0 -1
- package/dist/features/tanstack-form/index.mjs +0 -1
- package/dist/features/text-editor/index.mjs +0 -1
- package/dist/field-dYemS0hQ.mjs +0 -2
- package/dist/field-dYemS0hQ.mjs.map +0 -1
- package/dist/flex-B6YSJzGe.mjs.map +0 -1
- package/dist/heading-De4Pn3mZ.mjs.map +0 -1
- package/dist/image-D7OZ13Ib.mjs +0 -2
- package/dist/image-D7OZ13Ib.mjs.map +0 -1
- package/dist/index.mjs +0 -1
- package/dist/input-NJP2wQOm.mjs.map +0 -1
- package/dist/label-CUCpwS5D.mjs.map +0 -1
- package/dist/layouts/cms-layout/index.d.mts +0 -2
- package/dist/layouts/cms-layout/index.mjs +0 -1
- package/dist/layouts/flex.mjs +0 -1
- package/dist/layouts/grid.mjs.map +0 -1
- package/dist/layouts/payment-layout/index.mjs +0 -1
- package/dist/pages/FeatureDeveloping.mjs +0 -2
- package/dist/pages/FeatureDeveloping.mjs.map +0 -1
- package/dist/pages/FeatureFixing.mjs +0 -2
- package/dist/pages/FeatureFixing.mjs.map +0 -1
- package/dist/pages/LoginPage.mjs +0 -2
- package/dist/pages/LoginPage.mjs.map +0 -1
- package/dist/pages/NotAuthorized.mjs +0 -2
- package/dist/pages/NotAuthorized.mjs.map +0 -1
- package/dist/pages/NotFound.mjs +0 -2
- package/dist/pages/NotFound.mjs.map +0 -1
- package/dist/pages/RegisterPage.mjs +0 -2
- package/dist/pages/RegisterPage.mjs.map +0 -1
- package/dist/pages/VerifyEmailPage.mjs +0 -2
- package/dist/pages/VerifyEmailPage.mjs.map +0 -1
- package/dist/paragraph-DYLaQtTV.mjs.map +0 -1
- package/dist/payment-layout-DrQ0kZPX.mjs +0 -2
- package/dist/payment-layout-DrQ0kZPX.mjs.map +0 -1
- package/dist/popover-C8rcemA3.mjs +0 -2
- package/dist/popover-C8rcemA3.mjs.map +0 -1
- package/dist/progress-CLeM0e7Z.mjs.map +0 -1
- package/dist/radio-group-Y9bhdr55.mjs.map +0 -1
- package/dist/resizable-CpCaSCFB.mjs.map +0 -1
- package/dist/search-modal-Bn-GOOCy.mjs +0 -2
- package/dist/search-modal-Bn-GOOCy.mjs.map +0 -1
- package/dist/select-LlPCZFSF.mjs.map +0 -1
- package/dist/separator-D3Gmkxzq.mjs.map +0 -1
- package/dist/sheet-BFlIfNaA.mjs.map +0 -1
- package/dist/sidebar-ChtCyu-n.mjs +0 -2
- package/dist/sidebar-ChtCyu-n.mjs.map +0 -1
- package/dist/skeleton-C51IdOfK.mjs.map +0 -1
- package/dist/spinner-eClTgHjk.mjs.map +0 -1
- package/dist/statistic-cwLwcukn.mjs.map +0 -1
- package/dist/switch-BP7EPatj.mjs.map +0 -1
- package/dist/systems/google.mjs.map +0 -1
- package/dist/tables-CFrsk2lM.mjs +0 -4
- package/dist/tables-CFrsk2lM.mjs.map +0 -1
- package/dist/tanstack-form-DT1TqIDl.mjs +0 -12
- package/dist/tanstack-form-DT1TqIDl.mjs.map +0 -1
- package/dist/text-editor-5mA7XyaI.mjs +0 -2
- package/dist/text-editor-5mA7XyaI.mjs.map +0 -1
- package/dist/textarea-7HDXcaK9.mjs.map +0 -1
- package/dist/tooltip-Dxl5Wa8i.mjs.map +0 -1
- package/dist/types-B5nyTWtO.mjs.map +0 -1
- package/dist/typography/paragraph.mjs +0 -1
- package/dist/typography/title.mjs.map +0 -1
- package/dist/ui/alert-dialog.mjs +0 -2
- package/dist/ui/alert-dialog.mjs.map +0 -1
- package/dist/ui/alert.mjs +0 -1
- package/dist/ui/aspect-ratio.mjs.map +0 -1
- package/dist/ui/avatar.mjs +0 -1
- package/dist/ui/badge.d.mts +0 -2
- package/dist/ui/badge.mjs +0 -1
- package/dist/ui/breadcrumb.mjs +0 -2
- package/dist/ui/breadcrumb.mjs.map +0 -1
- package/dist/ui/button-group.mjs +0 -2
- package/dist/ui/button-group.mjs.map +0 -1
- package/dist/ui/button.d.mts +0 -2
- package/dist/ui/button.mjs +0 -1
- package/dist/ui/buttons/add-new.mjs +0 -2
- package/dist/ui/buttons/add-new.mjs.map +0 -1
- package/dist/ui/buttons/edit.mjs +0 -2
- package/dist/ui/buttons/edit.mjs.map +0 -1
- package/dist/ui/buttons/refresh.mjs +0 -2
- package/dist/ui/buttons/refresh.mjs.map +0 -1
- package/dist/ui/buttons/trash.mjs +0 -2
- package/dist/ui/buttons/trash.mjs.map +0 -1
- package/dist/ui/buttons/upload-image.mjs +0 -2
- package/dist/ui/buttons/upload-image.mjs.map +0 -1
- package/dist/ui/calendar.mjs +0 -1
- package/dist/ui/card.mjs +0 -2
- package/dist/ui/card.mjs.map +0 -1
- package/dist/ui/carousel.mjs +0 -2
- package/dist/ui/carousel.mjs.map +0 -1
- package/dist/ui/checkbox.mjs +0 -1
- package/dist/ui/collapsible.mjs.map +0 -1
- package/dist/ui/command.mjs +0 -1
- package/dist/ui/context-menu.mjs.map +0 -1
- package/dist/ui/dialog.mjs +0 -1
- package/dist/ui/drawer.mjs +0 -1
- package/dist/ui/dropdown-menu.mjs +0 -1
- package/dist/ui/empty.mjs.map +0 -1
- package/dist/ui/field.d.mts +0 -65
- package/dist/ui/field.mjs +0 -1
- package/dist/ui/file-uploader.mjs +0 -3
- package/dist/ui/file-uploader.mjs.map +0 -1
- package/dist/ui/form.mjs +0 -2
- package/dist/ui/form.mjs.map +0 -1
- package/dist/ui/hover-card.mjs.map +0 -1
- package/dist/ui/image.mjs +0 -1
- package/dist/ui/input-otp.mjs.map +0 -1
- package/dist/ui/input.d.mts +0 -2
- package/dist/ui/input.mjs +0 -1
- package/dist/ui/inputs/search-input.mjs +0 -2
- package/dist/ui/inputs/search-input.mjs.map +0 -1
- package/dist/ui/item.mjs +0 -2
- package/dist/ui/item.mjs.map +0 -1
- package/dist/ui/label.mjs +0 -1
- package/dist/ui/menubar.mjs.map +0 -1
- package/dist/ui/multi-select.mjs +0 -2
- package/dist/ui/multi-select.mjs.map +0 -1
- package/dist/ui/navigation-menu.mjs.map +0 -1
- package/dist/ui/pagination.mjs +0 -2
- package/dist/ui/pagination.mjs.map +0 -1
- package/dist/ui/popover.mjs +0 -1
- package/dist/ui/progress.mjs +0 -1
- package/dist/ui/radio-group.mjs +0 -1
- package/dist/ui/resizable.mjs +0 -1
- package/dist/ui/scroll-area.mjs.map +0 -1
- package/dist/ui/select.mjs +0 -1
- package/dist/ui/separator.mjs +0 -1
- package/dist/ui/sheet.mjs +0 -1
- package/dist/ui/skeleton.mjs +0 -1
- package/dist/ui/slider.mjs.map +0 -1
- package/dist/ui/sonner.mjs.map +0 -1
- package/dist/ui/spinner.mjs +0 -1
- package/dist/ui/switch.mjs +0 -1
- package/dist/ui/table.mjs.map +0 -1
- package/dist/ui/tabs.mjs.map +0 -1
- package/dist/ui/textarea.mjs +0 -1
- package/dist/ui/toggle-group.mjs +0 -2
- package/dist/ui/toggle-group.mjs.map +0 -1
- package/dist/ui/toggle.mjs.map +0 -1
- package/dist/ui/tooltip.mjs +0 -1
- package/dist/user-DtZy4P9d.mjs +0 -2
- package/dist/user-DtZy4P9d.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["DescriptionEmpty: React.FC","DescriptionBadge: React.FC<DescriptionBadgeProps>","DescriptionBoolean: React.FC<DescriptionBooleanProps>","DescriptionCopy: React.FC<DescriptionCopyProps>","DescriptionDate: React.FC<DescriptionDateProps>","DescriptionImages: React.FC<{\n images?: Array<ImageItem> | null | undefined;\n}>","Image","DescriptionLink: React.FC<DescriptionLinkProps>","DescriptionLongText: React.FC<{ content: string | null | undefined | number }>","DescriptionName: React.FC<{\n name?: string | null | undefined;\n}>","DescriptionNumberPhone: React.FC<{ value: string }>","options: Intl.NumberFormatOptions","dotColorMap: Record<StatusColor, string>","DescriptionStatus: React.FC<DescriptionStatusProps>","DescriptionTagList: React.FC<DescriptionTagListProps>","DescriptionUser: React.FC<DescriptionUserProps>","DescriptionItem: React.FC<\n React.PropsWithChildren<{\n /** Text displayed in the label column. */\n label: string;\n /**\n * Number of grid columns (out of 12) allocated to the label in horizontal orientation.\n * @default 3\n */\n labelColSpan?: number;\n /**\n * Layout direction of the label/value pair.\n * - `'horizontal'` — label and value are side by side.\n * - `'vertical'` — label sits above the value.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /** Optional node rendered in the top-right corner of the label area (e.g. an edit action). */\n action?: React.ReactNode;\n }>\n>","DescriptionHeader: React.FC<{\n /** Primary heading text. */\n title: string;\n /** Optional secondary text rendered below the title in a smaller, muted style. */\n description?: string;\n /** Optional node rendered on the right side of the header (e.g. action buttons). */\n extra?: React.ReactNode;\n /** Additional CSS class names applied to the header wrapper. */\n className?: string;\n}>","DescriptionSection: React.FC<{\n /** Optional section label rendered as uppercase small-caps text beside the divider line. */\n title?: string;\n /** Additional CSS class names applied to the section wrapper. */\n className?: string;\n}>","DescriptionLoadingSkeleton: React.FC<{ rows: number }>","Description: React.FC<\n React.PropsWithChildren<{\n /** Additional CSS class names applied to the root wrapper element. */\n className?: string;\n /** Strips the outer card shadow/ring and adapts sizing for embedding inside another Description. */\n nested?: boolean;\n /** Replaces children with animated skeleton rows while data is loading. */\n loading?: boolean;\n /** Number of skeleton rows shown when `loading` is true. @default 4 */\n loadingRows?: number;\n }>\n>","DescriptionGroup: React.FC<\n React.PropsWithChildren<{\n /** Additional CSS class names applied to the group wrapper. */\n className?: string;\n }>\n>"],"sources":["../../../packages/components/features/descriptions/components/empty.tsx","../../../packages/components/features/descriptions/components/badge.tsx","../../../packages/components/features/descriptions/components/boolean.tsx","../../../packages/components/features/descriptions/components/copy.tsx","../../../packages/components/features/descriptions/components/date.tsx","../../../packages/components/features/descriptions/components/images.tsx","../../../packages/components/features/descriptions/components/link.tsx","../../../packages/components/features/descriptions/components/longtext.tsx","../../../packages/components/features/descriptions/components/name.tsx","../../../packages/components/features/descriptions/components/number-phone.tsx","../../../packages/components/features/descriptions/components/statistic.tsx","../../../packages/components/features/descriptions/components/status.tsx","../../../packages/components/features/descriptions/components/tag-list.tsx","../../../packages/components/features/descriptions/components/user.tsx","../../../packages/components/features/descriptions/index.tsx"],"sourcesContent":["'use client';\n\nexport const DescriptionEmpty: React.FC = () => {\n return (\n <span data-slot=\"description-empty\" aria-label=\"Empty value\" className=\"select-none font-medium text-sm text-text-positive-muted\">\n —\n </span>\n );\n};\n","'use client';\n\nimport { Badge } from '@/components/ui/badge';\nimport type { BadgeProps } from '@/components/ui/badge';\n\nimport { DescriptionEmpty } from './empty';\n\ntype DescriptionBadgeProps = {\n label: string | number | null | undefined;\n color?: BadgeProps['color'];\n variant?: BadgeProps['variant'];\n size?: BadgeProps['size'];\n};\n\nexport const DescriptionBadge: React.FC<DescriptionBadgeProps> = ({ label, color = 'secondary', variant = 'soft', size = 'sm' }) => {\n if (!label) return <DescriptionEmpty />;\n return (\n <Badge data-slot=\"description-badge\" color={color} variant={variant} size={size}>\n {label}\n </Badge>\n );\n};\n","'use client';\n\nimport { Badge } from '@/components/ui/badge';\n\nimport { DescriptionEmpty } from './empty';\n\ntype DescriptionBooleanProps = {\n value: boolean | null | undefined;\n trueLabel?: string;\n falseLabel?: string;\n};\n\nexport const DescriptionBoolean: React.FC<DescriptionBooleanProps> = ({ value, trueLabel = 'Yes', falseLabel = 'No' }) => {\n if (value == null) return <DescriptionEmpty />;\n return (\n <Badge data-slot=\"description-boolean\" variant=\"soft\" color={value ? 'success' : 'danger'} size=\"sm\">\n {value ? trueLabel : falseLabel}\n </Badge>\n );\n};\n","'use client';\n\nimport { useCallback, useState } from 'react';\nimport { CheckIcon, CopyIcon } from 'lucide-react';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { DescriptionEmpty } from './empty';\n\ntype DescriptionCopyProps = {\n value: string | null | undefined;\n truncate?: boolean;\n};\n\nexport const DescriptionCopy: React.FC<DescriptionCopyProps> = ({ value, truncate = true }) => {\n const [copied, setCopied] = useState(false);\n\n const handleCopy = useCallback(async () => {\n if (!value) return;\n await navigator.clipboard.writeText(value);\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n }, [value]);\n\n if (!value) return <DescriptionEmpty />;\n\n return (\n <button\n type=\"button\"\n data-slot=\"description-copy\"\n onClick={handleCopy}\n className={cn(\n 'group inline-flex max-w-full cursor-pointer items-center gap-1.5 rounded-sm border border-border-weak bg-secondary-muted px-2 py-0.5 font-mono text-xs text-text-positive-weak transition-[border-color,color,box-shadow] hover:border-border hover:text-text-positive hover:shadow-xs',\n truncate && 'min-w-0'\n )}\n >\n <span className={cn('tabular-nums', truncate && 'truncate')}>{value}</span>\n {copied ? <CheckIcon size={12} className=\"shrink-0 text-success\" /> : <CopyIcon size={12} className=\"shrink-0 opacity-50 group-hover:opacity-100\" />}\n </button>\n );\n};\n","'use client';\n\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\nimport { DateDisplay } from '@/components/data-display/date';\n\nimport { DescriptionEmpty } from './empty';\n\ntype DescriptionDateProps = {\n date: Date | string | number | null | undefined;\n};\n\nexport const DescriptionDate: React.FC<DescriptionDateProps> = ({ date }) => {\n if (date == null) return <DescriptionEmpty />;\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <DateDisplay data-slot=\"description-date\" date={date} format=\"medium\" className=\"cursor-help\" />\n </TooltipTrigger>\n <TooltipContent>\n <DateDisplay date={date} format=\"full\" showTime className=\"text-xs font-medium\" />\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n};\n","'use client';\n\nimport { Image } from '@/components/ui/image';\n\nimport { DescriptionEmpty } from './empty';\n\ntype ImageItem = { id: string; src: string; alt: string };\n\nexport const DescriptionImages: React.FC<{\n images?: Array<ImageItem> | null | undefined;\n}> = ({ images }) => {\n if (!images?.length) return <DescriptionEmpty />;\n\n const isSingle = images.length === 1;\n\n return (\n <div data-slot=\"description-images\" className=\"flex flex-wrap gap-4\">\n {images.map(image => (\n <div\n key={image.id}\n className={\n isSingle\n ? 'group relative size-42 overflow-hidden rounded-sm border border-border shadow-xs transition-shadow hover:shadow-card'\n : 'group relative size-16 overflow-hidden rounded-lg border border-border shadow-xs transition-shadow hover:shadow-card'\n }\n >\n <Image src={image.src} alt={image.alt} width=\"100%\" height=\"100%\" className=\"transition-transform duration-200 group-hover:scale-105\" />\n </div>\n ))}\n </div>\n );\n};\n","'use client';\n\nimport { ExternalLinkIcon, LinkIcon } from 'lucide-react';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { DescriptionEmpty } from './empty';\n\ntype DescriptionLinkProps = {\n href: string | null | undefined;\n label?: string;\n external?: boolean;\n className?: string;\n};\n\nexport const DescriptionLink: React.FC<DescriptionLinkProps> = ({ href, label, external = true, className }) => {\n if (!href) return <DescriptionEmpty />;\n\n return (\n <a\n data-slot=\"description-link\"\n href={href}\n target={external ? '_blank' : undefined}\n rel={external ? 'noopener noreferrer' : undefined}\n className={cn(\n 'inline-flex max-w-full items-center gap-1 text-sm text-primary underline decoration-dashed underline-offset-2 transition-colors hover:text-primary-strong hover:decoration-solid',\n className\n )}\n >\n {!external && <LinkIcon size={12} className=\"shrink-0 opacity-70\" />}\n <span className=\"truncate\">{label ?? href}</span>\n {external && <ExternalLinkIcon size={12} className=\"shrink-0 opacity-70\" />}\n </a>\n );\n};\n","'use client';\n\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\nimport { Paragraph } from '@/components/typography/paragraph';\n\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionLongText: React.FC<{ content: string | null | undefined | number }> = ({ content }) => {\n if (content == null) return <DescriptionEmpty />;\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <Paragraph\n data-slot=\"description-longtext\"\n variant=\"sm\"\n className=\"line-clamp-2 cursor-pointer whitespace-pre-line break-all text-start text-sm hover:text-text-positive transition-colors\"\n >\n {content}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{content}</p>\n <p className=\"w-full text-end text-text-positive-subtle\">{content.toString().length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","'use client';\n\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\nimport { Paragraph } from '@/components/typography/paragraph';\n\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionName: React.FC<{\n name?: string | null | undefined;\n}> = ({ name }) => {\n if (!name) return <DescriptionEmpty />;\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <Paragraph data-slot=\"description-name\" variant=\"sm\" className=\"line-clamp-2 w-full cursor-pointer truncate hover:text-text-positive transition-colors\">\n {name}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{name}</p>\n <p className=\"w-full text-end text-text-positive-subtle\">{name.length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","'use client';\n\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\nimport { Paragraph } from '@/components/typography/paragraph';\n\nexport const DescriptionNumberPhone: React.FC<{ value: string }> = ({ value }) => {\n return (\n <Tooltip>\n <TooltipTrigger data-slot=\"description-phone\">\n <Paragraph variant=\"sm\" className=\"tabular-nums transition-colors\">\n {value.replace(/(\\d{3})(\\d{3})(\\d{4})/, '($1) $2-$3')}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\">\n <p className=\"tabular-nums\">{value.slice(1).replace(/(\\d{2})(\\d{3})(\\d{4})/, '(00) (+84) ($1) $2-$3')}</p>\n </TooltipContent>\n </Tooltip>\n );\n};\n","'use client';\n\nimport { memo, useCallback, useMemo } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { DescriptionEmpty } from './empty';\n\nconst applyRounding = (num: number, precisionValue: number, roundingMode?: 'round' | 'floor' | 'ceil') => {\n const multiplier = 10 ** precisionValue;\n switch (roundingMode) {\n case 'floor':\n return Math.floor(num * multiplier) / multiplier;\n case 'ceil':\n return Math.ceil(num * multiplier) / multiplier;\n default:\n return Math.round(num * multiplier) / multiplier;\n }\n};\n\nconst descriptionStatisticVariants = cva('inline-flex items-center gap-1 font-number tabular-nums transition-colors', {\n variants: {\n size: {\n xs: 'text-xs',\n sm: 'text-sm',\n md: 'text-base',\n lg: 'text-lg',\n xl: 'text-xl',\n },\n trend: {\n neutral: 'text-text-positive',\n up: 'text-success',\n down: 'text-danger',\n },\n },\n defaultVariants: {\n size: 'sm',\n trend: 'neutral',\n },\n});\n\nexport type DescriptionStatisticProps = VariantProps<typeof descriptionStatisticVariants> & {\n decimalSeparator?: string;\n groupSeparator?: string;\n prefix?: React.ReactNode;\n suffix?: React.ReactNode;\n precision?: number;\n roundingMode?: 'round' | 'floor' | 'ceil';\n showTrailingZeros?: boolean;\n value: number | string | null | undefined;\n className?: string;\n};\n\nexport const DescriptionStatistic = memo(\n ({\n decimalSeparator = '.',\n groupSeparator = ',',\n prefix: Prefix,\n suffix: Suffix,\n precision,\n roundingMode = 'round',\n showTrailingZeros = false,\n size = 'sm',\n trend = 'neutral',\n value = 0,\n className,\n }: DescriptionStatisticProps) => {\n const formatOptions = useMemo((): Intl.NumberFormatOptions => {\n const options: Intl.NumberFormatOptions = {};\n if (typeof precision === 'number' && precision >= 0) {\n if (showTrailingZeros) {\n options.minimumFractionDigits = precision;\n options.maximumFractionDigits = precision;\n } else {\n options.maximumFractionDigits = precision;\n }\n }\n return options;\n }, [precision, showTrailingZeros]);\n\n const formatNumber = useCallback(\n (num: number): string => {\n let processedNum = num;\n if (typeof precision === 'number' && precision >= 0) {\n processedNum = applyRounding(num, precision, roundingMode);\n }\n return processedNum.toLocaleString('en-US', formatOptions);\n },\n [roundingMode, formatOptions, precision]\n );\n\n const processedValue = useMemo((): string => {\n if (typeof value === 'number') {\n if (Number.isNaN(value) || !Number.isFinite(value)) return 'N/A';\n return formatNumber(value);\n }\n if (typeof value === 'string') {\n const trimmedValue = value.trim();\n if (!trimmedValue) return 'N/A';\n const numValue = Number(trimmedValue);\n if (Number.isNaN(numValue) || !Number.isFinite(numValue)) return 'N/A';\n return formatNumber(numValue);\n }\n return 'N/A';\n }, [value, formatNumber]);\n\n const finalFormattedValue = useMemo((): string => {\n if (decimalSeparator === '.' && groupSeparator === ',') return processedValue;\n return processedValue.replace(/,/g, groupSeparator).replace(/\\./g, decimalSeparator);\n }, [processedValue, decimalSeparator, groupSeparator]);\n\n if (finalFormattedValue === '0' || finalFormattedValue === 'N/A' || !finalFormattedValue) {\n return <DescriptionEmpty />;\n }\n\n return (\n <div data-slot=\"description-statistic\" className={cn(descriptionStatisticVariants({ size, trend }), className)}>\n {Prefix && <span data-slot=\"description-statistic-prefix\">{Prefix}</span>}\n <p data-slot=\"description-statistic-value\">{finalFormattedValue}</p>\n {Suffix && <span data-slot=\"description-statistic-suffix\">{Suffix}</span>}\n </div>\n );\n }\n);\nDescriptionStatistic.displayName = 'DescriptionStatistic';\n","'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Badge } from '@/components/ui/badge';\nimport type { BadgeProps } from '@/components/ui/badge';\n\nimport { DescriptionEmpty } from './empty';\n\ntype StatusColor = NonNullable<BadgeProps['color']>;\n\nconst dotColorMap: Record<StatusColor, string> = {\n primary: 'bg-primary',\n secondary: 'bg-secondary',\n muted: 'bg-muted',\n accent: 'bg-accent',\n info: 'bg-info',\n success: 'bg-success',\n warning: 'bg-warning',\n danger: 'bg-danger',\n};\n\ntype DescriptionStatusProps = {\n label: string | null | undefined;\n color?: StatusColor;\n dot?: boolean;\n};\n\nexport const DescriptionStatus: React.FC<DescriptionStatusProps> = ({ label, color = 'info', dot = true }) => {\n if (!label) return <DescriptionEmpty />;\n return (\n <Badge data-slot=\"description-status\" variant=\"soft\" color={color} size=\"sm\" className=\"gap-1.5\">\n {dot && <span className={cn('inline-block size-1.5 shrink-0 rounded-full', dotColorMap[color])} />}\n {label}\n </Badge>\n );\n};\n","'use client';\n\nimport { Badge } from '@/components/ui/badge';\nimport type { BadgeProps } from '@/components/ui/badge';\n\nimport { DescriptionEmpty } from './empty';\n\ntype DescriptionTagListProps = {\n tags: Array<string | number> | null | undefined;\n max?: number;\n color?: BadgeProps['color'];\n variant?: BadgeProps['variant'];\n};\n\nexport const DescriptionTagList: React.FC<DescriptionTagListProps> = ({ tags, max = 5, color = 'secondary', variant = 'soft' }) => {\n if (!tags?.length) return <DescriptionEmpty />;\n\n const visible = tags.slice(0, max);\n const overflow = tags.length - visible.length;\n\n return (\n <div data-slot=\"description-tag-list\" className=\"flex flex-wrap gap-1\">\n {visible.map((tag, i) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: static display list\n <Badge key={i} variant={variant} color={color} size=\"sm\">\n {tag}\n </Badge>\n ))}\n {overflow > 0 && (\n <Badge variant=\"outline\" color=\"muted\" size=\"sm\">\n +{overflow}\n </Badge>\n )}\n </div>\n );\n};\n","'use client';\n\nimport { UserDataDisplay } from '@/components/data-display/user';\n\nimport { DescriptionEmpty } from './empty';\n\ntype DescriptionUserProps = {\n uuid?: string | null;\n username?: string | null;\n email?: string | null;\n};\n\nexport const DescriptionUser: React.FC<DescriptionUserProps> = ({ uuid, username, email }) => {\n if (!uuid || !username || !email) return <DescriptionEmpty />;\n return <UserDataDisplay uuid={uuid} username={username} email={email} />;\n};\n","'use client';\n\nimport { createContext, useContext } from 'react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nexport * from './components';\n\nconst DescriptionGroupContext = createContext(false);\n\n/**\n * A single labeled row within a {@link Description} container, supporting both horizontal (side-by-side label/value) and vertical (stacked) layouts.\n *\n * @example\n * import { Description, DescriptionItem } from '@customafk/lunas-ui/features/descriptions';\n *\n * <Description>\n * <DescriptionItem label=\"Full name\">John Doe</DescriptionItem>\n * <DescriptionItem label=\"Email\" orientation=\"vertical\">john@example.com</DescriptionItem>\n * </Description>\n */\nexport const DescriptionItem: React.FC<\n React.PropsWithChildren<{\n /** Text displayed in the label column. */\n label: string;\n /**\n * Number of grid columns (out of 12) allocated to the label in horizontal orientation.\n * @default 3\n */\n labelColSpan?: number;\n /**\n * Layout direction of the label/value pair.\n * - `'horizontal'` — label and value are side by side.\n * - `'vertical'` — label sits above the value.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /** Optional node rendered in the top-right corner of the label area (e.g. an edit action). */\n action?: React.ReactNode;\n }>\n> = ({ label, labelColSpan = 3, orientation = 'horizontal', action, children }) => {\n if (orientation === 'vertical') {\n return (\n <div data-slot=\"description-item\" className=\"flex flex-col border-b border-b-border last:border-b-0\">\n <div\n data-slot=\"description-item-label\"\n className=\"flex items-center justify-between border-b border-b-border bg-secondary-muted py-2 pr-2 pl-4 text-sm font-medium text-text-positive-weak\"\n >\n <span>{label}</span>\n {action && <div className=\"shrink-0\">{action}</div>}\n </div>\n <div data-slot=\"description-item-value\" className=\"flex flex-wrap items-center gap-2 py-3 pr-2 pl-4 text-sm text-text-positive\">\n {children}\n </div>\n </div>\n );\n }\n\n return (\n <div\n data-slot=\"description-item\"\n style={{ display: 'grid', gridTemplateColumns: 'repeat(12, minmax(0, 1fr))' }}\n className=\"grid border-b border-b-border last:border-b-0\"\n >\n <div\n data-slot=\"description-item-label\"\n style={{ gridColumn: `span ${labelColSpan} / span ${labelColSpan}` }}\n className=\"flex min-w-full items-center justify-between overflow-x-hidden text-wrap break-all border-r border-r-border bg-secondary-muted py-3 pr-2 pl-4 text-sm font-medium text-text-positive-weak tabular-nums\"\n >\n <span>{label}</span>\n {action && <div className=\"shrink-0 pr-1\">{action}</div>}\n </div>\n <div\n data-slot=\"description-item-value\"\n style={{ gridColumn: `span ${12 - labelColSpan} / span ${12 - labelColSpan}` }}\n className=\"flex flex-wrap items-center gap-2 py-3 pr-2 pl-4 text-sm text-text-positive\"\n >\n {children}\n </div>\n </div>\n );\n};\n\n/**\n * A header bar for a {@link Description} block, showing a title, an optional subtitle, and an optional trailing action area.\n *\n * @example\n * import { Description, DescriptionHeader } from '@customafk/lunas-ui/features/descriptions';\n *\n * <Description>\n * <DescriptionHeader title=\"User details\" description=\"Read-only overview\" extra={<EditBtn />} />\n * </Description>\n */\nexport const DescriptionHeader: React.FC<{\n /** Primary heading text. */\n title: string;\n /** Optional secondary text rendered below the title in a smaller, muted style. */\n description?: string;\n /** Optional node rendered on the right side of the header (e.g. action buttons). */\n extra?: React.ReactNode;\n /** Additional CSS class names applied to the header wrapper. */\n className?: string;\n}> = ({ title, description, extra, className }) => {\n return (\n <div\n data-slot=\"description-header\"\n className={cn('sticky top-0 z-10 flex items-center justify-between gap-4 border-b border-b-border bg-card px-4 py-3', className)}\n >\n <div className=\"flex flex-col gap-0.5\">\n <p className=\"text-sm font-semibold text-text-positive\">{title}</p>\n {description && <p className=\"text-xs text-text-positive-muted\">{description}</p>}\n </div>\n {extra && <div className=\"shrink-0\">{extra}</div>}\n </div>\n );\n};\n\n/**\n * A visual section divider inside a {@link Description} container that optionally displays a section title with a decorative horizontal rule.\n *\n * @example\n * import { Description, DescriptionSection, DescriptionItem } from '@customafk/lunas-ui/features/descriptions';\n *\n * <Description>\n * <DescriptionSection title=\"Contact\" />\n * <DescriptionItem label=\"Email\">john@example.com</DescriptionItem>\n * </Description>\n */\nexport const DescriptionSection: React.FC<{\n /** Optional section label rendered as uppercase small-caps text beside the divider line. */\n title?: string;\n /** Additional CSS class names applied to the section wrapper. */\n className?: string;\n}> = ({ title, className }) => {\n return (\n <div data-slot=\"description-section\" className={cn('flex items-center gap-3 border-b border-b-border px-4 py-2.5', className)}>\n {title && <p className=\"shrink-0 text-xs font-semibold uppercase tracking-widest text-text-positive-muted\">{title}</p>}\n <div className=\"h-px flex-1 bg-border\" />\n </div>\n );\n};\n\nconst DescriptionLoadingSkeleton: React.FC<{ rows: number }> = ({ rows }) => (\n <div data-slot=\"description-loading\" className=\"animate-pulse\">\n <div className=\"flex items-center justify-between border-b border-b-border px-4 py-3\">\n <div className=\"flex flex-col gap-1.5\">\n <div className=\"h-3.5 w-36 rounded bg-border\" />\n <div className=\"h-2.5 w-24 rounded bg-border-weak\" />\n </div>\n <div className=\"h-5 w-16 rounded bg-border-weak\" />\n </div>\n {Array.from({ length: rows }).map((_, i) => (\n <div key={i} style={{ display: 'grid', gridTemplateColumns: 'repeat(12, minmax(0, 1fr))' }} className=\"grid border-b border-b-border last:border-b-0\">\n <div style={{ gridColumn: 'span 3 / span 3' }} className=\"flex items-center border-r border-r-border bg-secondary-muted py-3 pl-4 pr-2\">\n <div className=\"h-3 w-20 rounded bg-border\" />\n </div>\n <div style={{ gridColumn: 'span 9 / span 9' }} className=\"flex items-center py-3 pl-4 pr-2\">\n <div className=\"h-3 w-28 rounded bg-border-weak\" />\n </div>\n </div>\n ))}\n </div>\n);\n\n/**\n * Root container for a description block — a bordered, rounded card that groups {@link DescriptionHeader}, {@link DescriptionSection}, and {@link DescriptionItem} elements.\n *\n * Set `nested` when embedding one `Description` inside another (removes the outer card shadow/ring and constrains sizing).\n * Set `loading` to replace content with animated skeleton rows while data is being fetched.\n *\n * @example\n * import { Description, DescriptionHeader, DescriptionItem } from '@customafk/lunas-ui/features/descriptions';\n *\n * <Description>\n * <DescriptionHeader title=\"Order #1234\" />\n * <DescriptionItem label=\"Status\">Shipped</DescriptionItem>\n * <DescriptionItem label=\"Total\">$99.00</DescriptionItem>\n * </Description>\n */\nexport const Description: React.FC<\n React.PropsWithChildren<{\n /** Additional CSS class names applied to the root wrapper element. */\n className?: string;\n /** Strips the outer card shadow/ring and adapts sizing for embedding inside another Description. */\n nested?: boolean;\n /** Replaces children with animated skeleton rows while data is loading. */\n loading?: boolean;\n /** Number of skeleton rows shown when `loading` is true. @default 4 */\n loadingRows?: number;\n }>\n> = ({ children, className, nested = false, loading = false, loadingRows = 4 }) => {\n const inGroup = useContext(DescriptionGroupContext);\n\n return (\n <div\n data-slot=\"description\"\n className={cn(\n 'relative flex flex-col bg-card',\n inGroup\n ? 'border-b border-b-border last:border-b-0'\n : nested\n ? 'w-full overflow-hidden rounded-md border border-border'\n : 'size-full overflow-y-auto rounded-lg border border-border shadow-card ring-1 ring-border-weak',\n className\n )}\n >\n {loading ? <DescriptionLoadingSkeleton rows={loadingRows} /> : children}\n </div>\n );\n};\n\n/**\n * A scrollable container that groups multiple {@link Description} blocks and makes each\n * {@link DescriptionHeader} sticky. As you scroll, the next section header stacks above\n * (pushes out) the previous one — standard CSS sticky behaviour within a single scroll context.\n *\n * @example\n * import { DescriptionGroup, Description, DescriptionHeader, DescriptionItem } from '@customafk/lunas-ui/features/descriptions';\n *\n * <DescriptionGroup>\n * <Description>\n * <DescriptionHeader title=\"Personal info\" />\n * <DescriptionItem label=\"Name\">John Doe</DescriptionItem>\n * </Description>\n * <Description>\n * <DescriptionHeader title=\"Contact\" />\n * <DescriptionItem label=\"Email\">john@example.com</DescriptionItem>\n * </Description>\n * </DescriptionGroup>\n */\nexport const DescriptionGroup: React.FC<\n React.PropsWithChildren<{\n /** Additional CSS class names applied to the group wrapper. */\n className?: string;\n }>\n> = ({ children, className }) => {\n return (\n <DescriptionGroupContext.Provider value={true}>\n <div\n data-slot=\"description-group\"\n className={cn('relative size-full overflow-y-auto rounded-lg border border-border bg-card shadow-card ring-1 ring-border-weak', className)}\n >\n {children}\n </div>\n </DescriptionGroupContext.Provider>\n );\n};\n"],"mappings":"4uBAEA,MAA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EAAC,MAAA,CAAI,UAAU,iFACb,EAAC,MAAA,CAAI,UAAU,kCACb,EAAC,MAAA,CAAI,UAAU,+BAAA,CAAiC,CAChD,EAAC,MAAA,CAAI,UAAU,oCAAA,CAAsC,CAAA,EACjD,CACN,EAAC,MAAA,CAAI,UAAU,kCAAA,CAAoC,CAAA,EAC/C,CACL,MAAM,KAAK,CAAE,OAAQ,EAAM,CAAC,CAAC,KAAK,EAAG,IACpC,EAAC,MAAA,CAAY,MAAO,CAAE,QAAS,OAAQ,oBAAqB,6BAA8B,CAAE,UAAU,0DACpG,EAAC,MAAA,CAAI,MAAO,CAAE,WAAY,kBAAmB,CAAE,UAAU,wFACvD,EAAC,MAAA,CAAI,UAAU,6BAAA,CAA+B,EAC1C,CACN,EAAC,MAAA,CAAI,MAAO,CAAE,WAAY,kBAAmB,CAAE,UAAU,4CACvD,EAAC,MAAA,CAAI,UAAU,kCAAA,CAAoC,EAC/C,CAAA,EANE,EAOJ,CACN,CAAA,EACE,CAkBKC,GAWR,CAAE,WAAU,YAAW,SAAS,GAAO,UAAU,GAAO,cAAc,KAAQ,CACjF,IAAM,EAAU,EAAW,EAAwB,CAEnD,OACE,EAAC,MAAA,CACC,YAAU,cACV,UAAW,EACT,iCACA,EACI,2CACA,EACE,yDACA,gGACN,EACD,UAEA,EAAU,EAAC,EAAA,CAA2B,KAAM,EAAA,CAAe,CAAG,GAC3D,EAuBGC,GAKR,CAAE,WAAU,eAEb,EAAC,EAAwB,SAAA,CAAS,MAAO,YACvC,EAAC,MAAA,CACC,YAAU,oBACV,UAAW,EAAG,iHAAkH,EAAU,CAEzI,YACG,EAC2B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../heading-De4Pn3mZ.mjs";import"../../paragraph-DYLaQtTV.mjs";import"../../close-_UHFeiLS.mjs";import"../../dialog-CLDnvNH_.mjs";import"../../command-D6_CSbwJ.mjs";import{t as e}from"../../search-modal-Bn-GOOCy.mjs";export{e as SearchModal};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../button.variants-DkMqWB8G.mjs";import"../../button-CCVJTHBI.mjs";import"../../paragraph-DYLaQtTV.mjs";import"../../flex-B6YSJzGe.mjs";import"../../date-fY3sUcLp.mjs";import"../../badge-CDGBGq8X.mjs";import"../../tooltip-Dxl5Wa8i.mjs";import"../../statistic-cwLwcukn.mjs";import"../../avatar-fltdRVsJ.mjs";import"../../separator-D3Gmkxzq.mjs";import"../../close-_UHFeiLS.mjs";import{A as e,B as t,C as n,D as r,E as i,F as a,H as o,I as s,L as c,M as l,N as u,O as d,P as f,R as p,S as m,T as h,V as g,_,a as v,b as y,c as b,d as x,f as S,g as C,h as w,i as T,j as E,k as D,l as O,m as k,n as A,o as j,p as M,r as N,s as P,t as F,u as I,v as L,w as R,x as z,y as B,z as V}from"../../tables-CFrsk2lM.mjs";import"../../dropdown-menu-BWhiVsEf.mjs";import"../../progress-CLeM0e7Z.mjs";import"../../checkbox-Cat3i08X.mjs";import"../../spinner-eClTgHjk.mjs";import"../../resizable-CpCaSCFB.mjs";import"../../input-NJP2wQOm.mjs";import"../../label-CUCpwS5D.mjs";import"../../popover-C8rcemA3.mjs";import"../../select-LlPCZFSF.mjs";export{P as UITableAnalysisPanel,o as UITableAvatarNameDisplay,g as UITableBadgeDisplay,h as UITableBody,t as UITableBooleanDisplay,R as UITableCell,n as UITableCellActions,m as UITableCellSelect,b as UITableContainer,V as UITableCurrencyDisplay,p as UITableDateDisplay,c as UITableDescriptionDisplay,s as UITableEmailDisplay,z as UITableEmptyDisplay,j as UITableFilter,y as UITableFooter,B as UITableFooterRow,L as UITableHead,C as UITableHeadCell,_ as UITableHeadCellOption,w as UITableHeadCellSelect,k as UITableHeadRow,M as UITableInnerTable,S as UITableInnerWrapper,a as UITableListDisplay,x as UITableLoadMore,f as UITableMoreButton,u as UITableNameDisplay,l as UITablePermalink,E as UITablePhoneNumberDisplay,e as UITableProgressDisplay,v as UITableProvider,D as UITableRemoveButton,I as UITableRow,d as UITableStatisticDisplay,r as UITableStatusDisplay,T as UITableSummaryBar,F as UITableTooltip,A as UITableTooltipActions,N as UITableTooltipFilter,i as UITableUserDataDisplay,O as UITableWrapper};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,T as b,U as x,V as S,W as C,X as w,Y as T,Z as E,_ as D,a as O,b as k,c as A,d as j,et as M,f as N,g as P,h as F,i as I,j as L,k as R,l as z,m as B,n as V,o as H,p as U,q as W,r as G,s as K,t as q,u as J,v as Y,w as X,x as Z,y as Q,z as $}from"../../tanstack-form-DT1TqIDl.mjs";import"../../button.variants-DkMqWB8G.mjs";import"../../button-CCVJTHBI.mjs";import"../../heading-De4Pn3mZ.mjs";import"../../paragraph-DYLaQtTV.mjs";import"../../tooltip-Dxl5Wa8i.mjs";import"../../separator-D3Gmkxzq.mjs";import"../../close-_UHFeiLS.mjs";import"../../dialog-CLDnvNH_.mjs";import"../../command-D6_CSbwJ.mjs";import"../../dropdown-menu-BWhiVsEf.mjs";import"../../checkbox-Cat3i08X.mjs";import"../../input-NJP2wQOm.mjs";import"../../label-CUCpwS5D.mjs";import"../../popover-C8rcemA3.mjs";import"../../select-LlPCZFSF.mjs";import"../../switch-BP7EPatj.mjs";import"../../drawer-CMD7JWH8.mjs";import"../../calendar-R866yyd1.mjs";import"../../radio-group-Y9bhdr55.mjs";import"../../textarea-7HDXcaK9.mjs";import"../../text-editor-5mA7XyaI.mjs";export{_ as ArrayCol,e as ArrayHeaderRow,N as CancelButton,h as CheckboxField,i as ComboboxField,a as DateField,b as EmailField,$ as Field,n as FieldContent,S as FieldContentMain,c as FieldDescription,x as FieldError,C as FieldGroup,s as FieldLabel,d as FieldLegend,W as FieldNote,u as FieldSeparator,T as FieldSet,w as FieldTitle,E as FieldTooltip,X as NumberField,r as PasswordField,y as RadioGroupField,Z as SelectField,M as SimpleArrayField,v as SimpleBooleanField,f as SimpleComboboxField,l as SimpleDateField,g as SimpleEmailField,m as SimpleNumberField,p as SimplePasswordField,o as SimpleRadioGroupField,L as SimpleSelectField,R as SimpleTextField,t as SimpleTextareaField,j as SubmitButton,k as SwitchField,P as TanStackActionSubmit,F as TanStackActionsForm,B as TanStackCardForm,U as TanStackContainerForm,J as TanStackDialogForm,z as TanStackFieldGroup,A as TanStackPopoverForm,K as TanStackSectionForm,H as TanStackTitleField,D as TextEditorField,Q as TextField,Y as TextareaField,q as useTanStackFieldContext,V as useTanStackForm,G as useTanStackFormContext,I as withTanStackFieldGroup,O as withTanStackForm};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import"../../close-_UHFeiLS.mjs";import"../../dropdown-menu-BWhiVsEf.mjs";import"../../popover-C8rcemA3.mjs";import{n as e,r as t,t as n}from"../../text-editor-5mA7XyaI.mjs";export{t as LinkDialog,n as TextEditor,e as TextEditorToolbar};
|
package/dist/field-dYemS0hQ.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./separator-D3Gmkxzq.mjs";import{t}from"./label-CUCpwS5D.mjs";import{BanIcon as n}from"lucide-react";import{memo as r,useMemo as i}from"react";import{cn as a}from"@customafk/react-toolkit/utils";import{cva as o}from"class-variance-authority";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=r(({className:e,...t})=>s(`fieldset`,{"data-slot":`field-set`,className:a(`flex flex-col gap-6`,`has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));l.displayName=`FieldSet`;const u=r(({className:e,variant:t=`legend`,...n})=>s(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:a(`mb-3 font-medium`,`data-[variant=legend]:text-base`,`data-[variant=label]:text-sm`,e),...n}));u.displayName=`FieldLegend`;const d=r(({className:e,...t})=>s(`div`,{"data-slot":`field-group`,className:a(`group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t}));d.displayName=`FieldGroup`;const f=o(`group/field flex w-full gap-3 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:[`flex-col *:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center`,`*:data-[slot=field-label]:flex-auto`,`has-[>[data-slot=field-content]]:items-start`,`has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col *:w-full [&>.sr-only]:w-auto`,`@md/field-group:flex-row`,`@md/field-group:items-center`,`@md/field-group:*:w-auto`,`@md/field-group:*:data-[slot=field-label]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start`,`@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}}),p=r(({className:e,orientation:t=`vertical`,...n})=>s(`div`,{"data-slot":`field`,"data-orientation":t,className:a(f({orientation:t}),e),...n}));p.displayName=`Field`;const m=r(({className:e,...t})=>s(`div`,{"data-slot":`field-content`,className:a(`group/field-content flex basis-2/5 flex-col gap-1.5 leading-snug`,e),...t}));m.displayName=`FieldContent`;const h=r(({className:e,...n})=>s(t,{"data-slot":`field-label`,className:a(`group/field-label peer/field-label flex w-fit gap-2 leading-snug`,`group-data-[disabled=true]/field:opacity-50`,`has-[>[data-slot=field]]:w-full`,`has-[>[data-slot=field]]:flex-col`,`has-[>[data-slot=field]]:rounded-md`,`has-[>[data-slot=field]]:border`,`*:data-[slot=field]:p-4`,`has-data-[state=checked]:bg-primary/5`,`has-data-[state=checked]:border-primary`,e),...n}));h.displayName=`FieldLabel`;const g=r(({className:e,...t})=>s(`div`,{"data-slot":`field-label`,className:a(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));g.displayName=`FieldTitle`;const _=r(({className:e,...t})=>s(`p`,{"data-slot":`field-description`,className:a(`text-text-positive-weak text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...t}));_.displayName=`FieldDescription`;const v=r(({children:t,className:n,...r})=>c(`div`,{"data-slot":`field-separator`,"data-content":!!t,className:a(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,n),...r,children:[s(e,{className:`absolute inset-0 top-1/2`}),t&&s(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:t})]}));v.displayName=`FieldSeparator`;const y=r(({className:e,children:t,errors:r,...o})=>{let l=i(()=>t||(r?r?.length===1&&r[0]?.message?c(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:[s(n,{size:14}),s(`p`,{children:r[0].message})]}):s(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:r.map(e=>typeof e==`string`?s(`li`,{children:e},e):e?.message?s(`li`,{children:e.message},e.message):null)}):null),[t,r]);return l?s(`div`,{role:`alert`,"data-slot":`field-error`,className:a(`w-full font-normal text-danger text-xs`,e),...o,children:l}):null});y.displayName=`FieldError`;export{d as a,v as c,y as i,l,m as n,h as o,_ as r,u as s,p as t,g as u};
|
|
2
|
-
//# sourceMappingURL=field-dYemS0hQ.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"field-dYemS0hQ.mjs","names":[],"sources":["../packages/components/ui/field.tsx"],"sourcesContent":["'use client';\n\nimport { memo, useMemo } from 'react';\n\nimport { BanIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Label } from '@/components/ui/label';\nimport { Separator } from '@/components/ui/separator';\n\nconst FieldSet = memo(({ className, ...props }: React.ComponentProps<'fieldset'>) => {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn('flex flex-col gap-6', 'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3', className)}\n {...props}\n />\n );\n});\nFieldSet.displayName = 'FieldSet';\n\nconst FieldLegend = memo(({ className, variant = 'legend', ...props }: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) => {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn('mb-3 font-medium', 'data-[variant=legend]:text-base', 'data-[variant=label]:text-sm', className)}\n {...props}\n />\n );\n});\nFieldLegend.displayName = 'FieldLegend';\n\nconst FieldGroup = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4',\n className\n )}\n {...props}\n />\n );\n});\nFieldGroup.displayName = 'FieldGroup';\n\nconst fieldVariants = cva('group/field flex w-full gap-3 data-[invalid=true]:text-destructive', {\n variants: {\n orientation: {\n vertical: ['flex-col *:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center',\n '*:data-[slot=field-label]:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start',\n 'has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full [&>.sr-only]:w-auto',\n '@md/field-group:flex-row',\n '@md/field-group:items-center',\n '@md/field-group:*:w-auto',\n '@md/field-group:*:data-[slot=field-label]:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start',\n '@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\nconst Field = memo(({ className, orientation = 'vertical', ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) => {\n return <div data-slot=\"field\" data-orientation={orientation} className={cn(fieldVariants({ orientation }), className)} {...props} />;\n});\nField.displayName = 'Field';\n\nconst FieldContent = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"field-content\" className={cn('group/field-content flex basis-2/5 flex-col gap-1.5 leading-snug', className)} {...props} />;\n});\nFieldContent.displayName = 'FieldContent';\n\nconst FieldLabel = memo(({ className, ...props }: React.ComponentProps<typeof Label>) => {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug',\n 'group-data-[disabled=true]/field:opacity-50',\n 'has-[>[data-slot=field]]:w-full',\n 'has-[>[data-slot=field]]:flex-col',\n 'has-[>[data-slot=field]]:rounded-md',\n 'has-[>[data-slot=field]]:border',\n '*:data-[slot=field]:p-4',\n 'has-data-[state=checked]:bg-primary/5',\n 'has-data-[state=checked]:border-primary',\n className\n )}\n {...props}\n />\n );\n});\nFieldLabel.displayName = 'FieldLabel';\n\nconst FieldTitle = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-label\"\n className={cn('flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50', className)}\n {...props}\n />\n );\n});\nFieldTitle.displayName = 'FieldTitle';\n\nconst FieldDescription = memo(({ className, ...props }: React.ComponentProps<'p'>) => {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n 'text-text-positive-weak text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n );\n});\nFieldDescription.displayName = 'FieldDescription';\n\nconst FieldSeparator = memo(\n ({\n children,\n className,\n ...props\n }: React.ComponentProps<'div'> & {\n children?: React.ReactNode;\n }) => {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className)}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span className=\"relative mx-auto block w-fit bg-background px-2 text-text-positive-weak\" data-slot=\"field-separator-content\">\n {children}\n </span>\n )}\n </div>\n );\n }\n);\nFieldSeparator.displayName = 'FieldSeparator';\n\nconst FieldError = memo(\n ({\n className,\n children,\n errors,\n ...props\n }: React.ComponentProps<'div'> & {\n errors?: Array<{ message?: string } | undefined>;\n }) => {\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors) {\n return null;\n }\n\n if (errors?.length === 1 && errors[0]?.message) {\n return (\n <div className=\"flex flex-row items-center justify-start gap-x-0.5\">\n <BanIcon size={14} />\n <p>{errors[0].message}</p>\n </div>\n );\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map(error => {\n if (typeof error === 'string') return <li key={error}>{error}</li>;\n if (!error?.message) return null;\n return <li key={error.message}>{error.message}</li>;\n })}\n </ul>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div role=\"alert\" data-slot=\"field-error\" className={cn('w-full font-normal text-danger text-xs', className)} {...props}>\n {content}\n </div>\n );\n }\n);\nFieldError.displayName = 'FieldError';\n\nexport { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle };\n"],"mappings":"uTAYA,MAAM,EAAW,GAAM,CAAE,YAAW,GAAG,KAEnC,EAAC,WAAA,CACC,YAAU,YACV,UAAW,EAAG,sBAAuB,+EAAgF,EAAU,CAC/H,GAAI,GACJ,CAEJ,CACF,EAAS,YAAc,WAEvB,MAAM,EAAc,GAAM,CAAE,YAAW,UAAU,SAAU,GAAG,KAE1D,EAAC,SAAA,CACC,YAAU,eACV,eAAc,EACd,UAAW,EAAG,mBAAoB,kCAAmC,+BAAgC,EAAU,CAC/G,GAAI,GACJ,CAEJ,CACF,EAAY,YAAc,cAE1B,MAAM,EAAa,GAAM,CAAE,YAAW,GAAG,KAErC,EAAC,MAAA,CACC,YAAU,cACV,U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AAW,EAAG,4EAA6E,EAAU,CACrG,GAAI,YAEJ,EAAC,EAAA,CAAU,UAAU,2BAAA,CAA6B,CACjD,GACC,EAAC,OAAA,CAAK,UAAU,0EAA0E,YAAU,0BACjG,YACI,CAAA,EAEL,CAGX,CACD,EAAe,YAAc,iBAE7B,MAAM,EAAa,GAChB,CACC,YACA,WACA,SACA,GAAG,KAGC,CACJ,IAAM,EAAU,MACV,IAIC,EAID,GAAQ,SAAW,GAAK,EAAO,IAAI,QAEnC,EAAC,MAAA,CAAI,UAAU,+DACb,EAAC,EAAA,CAAQ,KAAM,GAAA,CAAM,CACrB,EAAC,IAAA,CAAA,SAAG,EAAO,GAAG,QAAA,CAAY,CAAA,EACtB,CAKR,EAAC,KAAA,CAAG,UAAU,8CACX,EAAO,IAAI,GACN,OAAO,GAAU,SAAiB,EAAC,KAAA,CAAA,SAAgB,EAAA,CAAR,EAAmB,CAC7D,GAAO,QACL,EAAC,KAAA,CAAA,SAAwB,EAAM,QAAA,CAAtB,EAAM,QAA6B,CADvB,KAE5B,EACC,CAnBE,MAqBR,CAAC,EAAU,EAAO,CAAC,CAMtB,OAJK,EAKH,EAAC,MAAA,CAAI,KAAK,QAAQ,YAAU,cAAc,UAAW,EAAG,yCAA0C,EAAU,CAAE,GAAI,WAC/G,GACG,CANC,MASZ,CACD,EAAW,YAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flex-B6YSJzGe.mjs","names":[],"sources":["../packages/components/layouts/flex.tsx"],"sourcesContent":["'use client';\nimport { memo } from 'react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nconst flexVariants = cva(['relative flex', 'text-sm'], {\n variants: {\n vertical: {\n true: 'flex-col',\n false: 'flex-row',\n },\n width: {\n full: 'w-full',\n auto: 'w-auto',\n fit: 'w-fit',\n screen: 'w-screen',\n min: 'w-min',\n max: 'w-max',\n null: '',\n },\n wrap: {\n true: 'flex-wrap',\n false: 'flex-nowrap',\n },\n margin: {\n sm: 'm-2',\n md: 'm-4',\n lg: 'm-6',\n xl: 'm-8',\n none: 'm-0',\n },\n padding: {\n sm: 'p-2',\n md: 'p-4',\n lg: 'p-6',\n xl: 'p-8',\n none: 'p-0',\n },\n gap: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-4',\n lg: 'gap-6',\n xl: 'gap-8',\n none: 'gap-0',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n stretch: 'justify-stretch',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n baseline: 'items-baseline',\n stretch: 'items-stretch',\n },\n },\n defaultVariants: {\n vertical: false,\n wrap: true,\n width: 'fit',\n margin: 'none',\n padding: 'sm',\n gap: 'xs',\n justify: 'start',\n align: 'center',\n },\n});\n\ntype Props = {\n /** Additional Tailwind classes merged on top of the variant-generated classes. */\n className?: string;\n /**\n * Stacks children vertically (`flex-col`) when `true`, horizontally (`flex-row`) when `false`.\n * @default false\n */\n vertical?: boolean;\n /**\n * Controls the width of the flex container.\n * - `'full'` — `w-full`\n * - `'auto'` — `w-auto`\n * - `'fit'` — `w-fit` (default)\n * - `'screen'` — `w-screen`\n * - `'min'` — `w-min`\n * - `'max'` — `w-max`\n * - `'null'` — no width utility applied\n * @default 'fit'\n */\n width?: 'full' | 'auto' | 'fit' | 'screen' | 'min' | 'max' | 'null';\n /**\n * Allows children to wrap onto multiple lines when `true`.\n * @default true\n */\n wrap?: boolean;\n /**\n * Uniform margin applied to the container.\n * - `'none'` — `m-0` (default)\n * - `'sm'` — `m-2`\n * - `'md'` — `m-4`\n * - `'lg'` — `m-6`\n * - `'xl'` — `m-8`\n * @default 'none'\n */\n margin?: 'sm' | 'md' | 'lg' | 'xl' | 'none';\n /**\n * Uniform padding applied to the container.\n * - `'none'` — `p-0`\n * - `'sm'` — `p-2` (default)\n * - `'md'` — `p-4`\n * - `'lg'` — `p-6`\n * - `'xl'` — `p-8`\n * @default 'sm'\n */\n padding?: 'sm' | 'md' | 'lg' | 'xl' | 'none';\n /**\n * Gap between child elements.\n * - `'none'` — `gap-0`\n * - `'xs'` — `gap-1` (default)\n * - `'sm'` — `gap-2`\n * - `'md'` — `gap-4`\n * - `'lg'` — `gap-6`\n * - `'xl'` — `gap-8`\n * @default 'xs'\n */\n gap?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'none';\n /**\n * Justification of children along the main axis (`justify-content`).\n * @default 'start'\n */\n justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly' | 'stretch';\n /**\n * Alignment of children along the cross axis (`align-items`).\n * @default 'center'\n */\n align?: 'start' | 'center' | 'end' | 'baseline' | 'stretch';\n} & VariantProps<typeof flexVariants>;\n\n/**\n * A flexible, variant-driven flex container built on CVA and TailwindCSS.\n *\n * @example\n * ```tsx\n * import { Flex } from '@customafk/lunas-ui/layouts/flex';\n *\n * // Horizontal row with centered children and a medium gap\n * <Flex gap=\"md\" justify=\"between\" align=\"center\">\n * <span>Left</span>\n * <span>Right</span>\n * </Flex>\n *\n * // Vertical stack that fills parent width\n * <Flex vertical width=\"full\" gap=\"sm\" padding=\"md\">\n * <p>First item</p>\n * <p>Second item</p>\n * </Flex>\n * ```\n */\nexport const Flex = memo(({ vertical, wrap, width, margin, padding, gap, justify, align, className, children }: React.PropsWithChildren<Props>) => {\n return (\n <div\n className={cn(\n flexVariants({\n vertical,\n width,\n wrap,\n margin,\n padding,\n gap,\n justify,\n align,\n className,\n })\n )}\n >\n {children}\n </div>\n );\n});\nFlex.displayName = 'Flex';\n"],"mappings":"wKAOA,MAAM,EAAe,EAAI,CAAC,gBAAiB,UAAU,CAAE,CACrD,SAAU,CACR,SAAU,CACR,KAAM,WACN,MAAO,WACR,CACD,MAAO,CACL,KAAM,SACN,KAAM,SACN,IAAK,QACL,OAAQ,WACR,IAAK,QACL,IAAK,QACL,KAAM,GACP,CACD,KAAM,CACJ,KAAM,YACN,MAAO,cACR,CACD,OAAQ,CACN,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,KAAM,MACP,CACD,QAAS,CACP,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,KAAM,MACP,CACD,IAAK,CACH,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,KAAM,QACP,CACD,QAAS,CACP,MAAO,gBACP,OAAQ,iBACR,IAAK,cACL,QAAS,kBACT,OAAQ,iBACR,OAAQ,iBACR,QAAS,kBACV,CACD,MAAO,CACL,MAAO,cACP,OAAQ,eACR,IAAK,YACL,SAAU,iBACV,QAAS,gBACV,CACF,CACD,gBAAiB,CACf,SAAU,GACV,KAAM,GACN,MAAO,MACP,OAAQ,OACR,QAAS,KACT,IAAK,KACL,QAAS,QACT,MAAO,SACR,CACF,CAAC,CA0FW,EAAO,GAAM,CAAE,WAAU,OAAM,QAAO,SAAQ,UAAS,MAAK,UAAS,QAAO,YAAW,cAEhG,EAAC,MAAA,CACC,UAAW,EACT,EAAa,CACX,WACA,QACA,OACA,SACA,UACA,MACA,UACA,QACA,YACD,CAAC,CACH,CAEA,YACG,CAER,CACF,EAAK,YAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"heading-De4Pn3mZ.mjs","names":[],"sources":["../packages/components/typography/heading.tsx"],"sourcesContent":["'use client';\n\nimport type { ElementType, ReactNode } from 'react';\nimport { cn } from '@customafk/react-toolkit/utils';\nimport { cva } from 'class-variance-authority';\n\ntype HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n\nexport type HeadingProps = {\n level?: HeadingLevel;\n className?: string;\n children?: ReactNode;\n as?: ElementType;\n};\n\nexport const headingVariants = cva('scroll-m-20 text-start text-balance text-text-positive-strong tracking-tight transition-colors', {\n variants: {\n level: {\n h1: 'text-3xl leading-tight font-bold md:text-4xl',\n h2: 'text-2xl leading-tight font-semibold md:text-3xl',\n h3: 'text-xl leading-snug font-semibold md:text-2xl',\n h4: 'text-lg leading-snug font-semibold md:text-xl',\n h5: 'text-base leading-normal font-semibold md:text-lg',\n },\n },\n defaultVariants: {\n level: 'h2',\n },\n});\n\nexport const Heading = ({ level = 'h3', className, as, children }: HeadingProps) => {\n const Component = as || level;\n\n return (\n <Component data-slot=\"heading\" className={cn(headingVariants({ level }), className)}>\n {children}\n </Component>\n );\n};\n"],"mappings":"2IAeA,MAAa,EAAkB,EAAI,iGAAkG,CACnI,SAAU,CACR,MAAO,CACL,GAAI,+CACJ,GAAI,mDACJ,GAAI,iDACJ,GAAI,gDACJ,GAAI,oDACL,CACF,CACD,gBAAiB,CACf,MAAO,KACR,CACF,CAAC"}
|
package/dist/image-D7OZ13Ib.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./skeleton-C51IdOfK.mjs";import{AlertCircleIcon as t}from"lucide-react";import{useCallback as n,useRef as r,useState as i}from"react";import{cn as a}from"@customafk/react-toolkit/utils";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c=({src:c,alt:l,width:u,height:d,maxRetries:f=3,retryDelay:p=500,className:m,imageClassName:h,onClick:g})=>{let _=r(null),[v,y]=i(c),[b,x]=i(0),[S,C]=i(!1),[w,T]=i(!1),E=n(()=>{C(!0)},[]),D=n(()=>{if(b<f){T(!1);let e=b+1;x(e),setTimeout(()=>{y(c+`?retry=${Date.now()}&attempt=${e}`)},p*e);return}T(!0),C(!0),y(c)},[f,b,p,c]);return w?o(`div`,{style:{width:u,height:d},className:a(`@container relative inline-block`,m),children:s(`div`,{className:`flex size-full flex-col items-center justify-center gap-y-2 rounded bg-danger-muted shadow-card`,children:[o(t,{className:`@max-[52px]:size-6 size-8 text-danger`}),o(`span`,{className:`@max-[96px]:sr-only text-center text-danger-weak text-xs`,children:`Image failed to load`})]})}):s(`div`,{style:{width:u,height:d},className:a(`relative flex items-center justify-center overflow-hidden rounded`,m),onClick:g,children:[!S&&o(e,{className:`absolute inset-0 flex size-full animate-pulse items-center justify-center`}),o(`img`,{src:v,className:`absolute inset-0 z-0 size-full scale-110 object-cover blur-xl brightness-60`}),o(`img`,{id:v,ref:_,src:v,alt:l,loading:`lazy`,className:a(`relative h-6/5 w-auto object-cover shadow-card transition-opacity duration-300`,S&&`opacity-100`,!S&&`pointer-events-none opacity-0`,h),onLoad:E,onError:D})]})};export{c as t};
|
|
2
|
-
//# sourceMappingURL=image-D7OZ13Ib.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"image-D7OZ13Ib.mjs","names":["Image: React.FC<Props>"],"sources":["../packages/components/ui/image.tsx"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\n\nimport { AlertCircleIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Skeleton } from './skeleton';\n\n/** Props for the Image component. */\ntype Props = {\n /** URL of the image to display. */\n src?: string;\n /** Accessible alt text for the image. */\n alt?: string;\n /** Width of the image container (number treated as pixels). */\n width?: number | string;\n /** Height of the image container (number treated as pixels). */\n height?: number | string;\n /** Maximum number of retry attempts on load failure before showing an error state. @default 3 */\n maxRetries?: number;\n /** Base delay in milliseconds between retry attempts (multiplied by the attempt count). @default 500 */\n retryDelay?: number;\n /** Class name applied to the outer container div. */\n className?: string;\n /** Class name applied to the `<img>` element. */\n imageClassName?: string;\n /** Click handler for the image container. */\n onClick?: () => void;\n};\n\n/**\n * A lazy-loading image with an automatic retry mechanism, a blurred background placeholder, a skeleton loader, and an error fallback.\n *\n * @example\n * ```tsx\n * import { Image } from '@customafk/lunas-ui/ui/image';\n *\n * <Image src=\"/hero.jpg\" alt=\"Hero\" width={400} height={300} maxRetries={3} />\n * ```\n */\nexport const Image: React.FC<Props> = ({ src, alt, width, height, maxRetries = 3, retryDelay = 500, className, imageClassName, 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=\"flex size-full flex-col items-center justify-center gap-y-2 rounded bg-danger-muted shadow-card\">\n <AlertCircleIcon className=\"@max-[52px]:size-6 size-8 text-danger\" />\n <span className=\"@max-[96px]:sr-only text-center text-danger-weak text-xs\">Image failed to load</span>\n </div>\n </div>\n );\n }\n\n return (\n <div style={{ width, height }} className={cn('relative flex items-center justify-center overflow-hidden rounded', className)} onClick={onClick}>\n {!isLoaded && <Skeleton className=\"absolute inset-0 flex size-full animate-pulse items-center justify-center\" />}\n <img src={currentSrc} className=\"absolute inset-0 z-0 size-full scale-110 object-cover blur-xl brightness-60\" />\n <img\n id={currentSrc}\n ref={imageRef}\n src={currentSrc}\n alt={alt}\n loading=\"lazy\"\n className={cn(\n 'relative h-6/5 w-auto object-cover shadow-card transition-opacity duration-300',\n isLoaded && 'opacity-100',\n !isLoaded && 'pointer-events-none opacity-0',\n imageClassName\n )}\n onLoad={handleLoad}\n onError={handleError}\n />\n </div>\n );\n};\n"],"mappings":"+PAwCA,MAAaA,GAA0B,CAAE,MAAK,MAAK,QAAO,SAAQ,aAAa,EAAG,aAAa,IAAK,YAAW,iBAAg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,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,T as b,U as x,V as S,W as C,X as w,Y as T,Z as E,_ as D,a as O,b as k,c as A,d as j,et as M,f as N,g as P,h as F,i as I,j as L,k as R,l as z,m as B,n as V,o as H,p as U,q as W,r as G,s as K,t as q,u as J,v as Y,w as X,x as Z,y as Q,z as $}from"./tanstack-form-DT1TqIDl.mjs";import"./button.variants-DkMqWB8G.mjs";import{t as ee}from"./button-CCVJTHBI.mjs";import"./heading-De4Pn3mZ.mjs";import{n as te,t as ne}from"./paragraph-DYLaQtTV.mjs";import{Card as re,CardAction as ie,CardContent as ae,CardDescription as oe,CardFooter as se,CardHeader as ce,CardTitle as le}from"./ui/card.mjs";import{t as ue}from"./skeleton-C51IdOfK.mjs";import{t as de}from"./image-D7OZ13Ib.mjs";import{GridProductCard as fe}from"./cards/grid-product-card.mjs";import{ProductCard as pe}from"./cards/product-card.mjs";import{SimpleCard as me}from"./cards/simple-card.mjs";import{t as he}from"./flex-B6YSJzGe.mjs";import{CountryDisplay as ge}from"./data-display/country.mjs";import{DataList as _e,DataListItem as ve}from"./data-display/data-list.mjs";import{t as ye}from"./date-fY3sUcLp.mjs";import{n as be,t as xe}from"./badge-CDGBGq8X.mjs";import{i as Se,n as Ce,r as we,t as Te}from"./tooltip-Dxl5Wa8i.mjs";import{DateTooltip as Ee}from"./data-display/date-tooltip.mjs";import{EmptyDisplay as De}from"./data-display/empty.mjs";import{NameDisplay as Oe}from"./data-display/name.mjs";import{PhoneNumberDisplay as ke}from"./data-display/phone-number.mjs";import{RoleBadge as Ae}from"./data-display/role-badge.mjs";import{t as je}from"./statistic-cwLwcukn.mjs";import{n as Me,r as Ne,t as Pe}from"./avatar-fltdRVsJ.mjs";import{t as Fe}from"./user-DtZy4P9d.mjs";import{AlertDialog as Ie,AlertDialogAction as Le,AlertDialogCancel as Re,AlertDialogContent as ze,AlertDialogDescription as Be,AlertDialogFooter as Ve,AlertDialogHeader as He,AlertDialogOverlay as Ue,AlertDialogPortal as We,AlertDialogTitle as Ge,AlertDialogTrigger as Ke}from"./ui/alert-dialog.mjs";import{ConfirmDialog as qe}from"./dialogs/confirm-dialog.mjs";import{Title as Je}from"./typography/title.mjs";import{t as Ye}from"./separator-D3Gmkxzq.mjs";import{a as Xe,c as Ze,i as Qe,n as $e,o as et,r as tt,s as nt,t as rt}from"./sheet-BFlIfNaA.mjs";import"./sidebar-ChtCyu-n.mjs";import{DetailDialog as it}from"./dialogs/detail-dialog/index.mjs";import{ErrorDialog as at}from"./dialogs/error-dialog.mjs";import"./close-_UHFeiLS.mjs";import{a as ot,c as st,i as ct,l as lt,n as ut,o as dt,r as ft,s as pt,t as mt,u as ht}from"./dialog-CLDnvNH_.mjs";import{LoadingDialog as gt}from"./dialogs/loading-dialog.mjs";import{Description as _t,DescriptionBadge as vt,DescriptionBoolean as yt,DescriptionCopy as bt,DescriptionDate as xt,DescriptionEmpty as St,DescriptionHeader as Ct,DescriptionImages as wt,DescriptionItem as Tt,DescriptionLink as Et,DescriptionLongText as Dt,DescriptionName as Ot,DescriptionNumberPhone as kt,DescriptionSection as At,DescriptionStatistic as jt,DescriptionStatus as Mt,DescriptionTagList as Nt,DescriptionUser as Pt}from"./features/descriptions/index.mjs";import{a as Ft,c as It,i as Lt,l as Rt,n as zt,o as Bt,r as Vt,s as Ht,t as Ut}from"./command-D6_CSbwJ.mjs";import{t as Wt}from"./search-modal-Bn-GOOCy.mjs";import{A as Gt,B as Kt,C as qt,D as Jt,E as Yt,F as Xt,H as Zt,I as Qt,L as $t,M as en,N as tn,O as nn,P as rn,R as an,S as on,T as sn,V as cn,_ as ln,a as un,b as dn,c as fn,d as pn,f as mn,g as hn,h as gn,i as _n,j as vn,k as yn,l as bn,m as xn,n as Sn,o as Cn,p as wn,r as Tn,s as En,t as Dn,u as On,v as kn,w as An,x as jn,y as Mn,z as Nn}from"./tables-CFrsk2lM.mjs";import{a as Pn,c as Fn,d as In,f as Ln,h as Rn,i as zn,l as Bn,m as Vn,n as Hn,o as Un,p as Wn,r as Gn,s as Kn,t as qn,u as Jn}from"./dropdown-menu-BWhiVsEf.mjs";import{t as Yn}from"./progress-CLeM0e7Z.mjs";import{t as Xn}from"./checkbox-Cat3i08X.mjs";import{t as Zn}from"./spinner-eClTgHjk.mjs";import{n as Qn,r as $n,t as er}from"./resizable-CpCaSCFB.mjs";import{t as tr}from"./input-NJP2wQOm.mjs";import{t as nr}from"./label-CUCpwS5D.mjs";import{a as rr,i as ir,n as ar,r as or,t as sr}from"./popover-C8rcemA3.mjs";import{a as cr,c as lr,i as ur,n as dr,o as fr,r as pr,s as mr,t as hr}from"./select-LlPCZFSF.mjs";import{t as gr}from"./switch-BP7EPatj.mjs";import{a as _r,c as vr,i as yr,l as br,n as xr,o as Sr,r as Cr,s as wr,t as Tr,u as Er}from"./drawer-CMD7JWH8.mjs";import{n as Dr,t as Or}from"./calendar-R866yyd1.mjs";import{n as kr,t as Ar}from"./radio-group-Y9bhdr55.mjs";import{t as jr}from"./textarea-7HDXcaK9.mjs";import{n as Mr,t as Nr}from"./text-editor-5mA7XyaI.mjs";import{t as Pr}from"./cms-layout-DkCR1AfG.mjs";import{t as Fr}from"./payment-layout-DrQ0kZPX.mjs";import{Grid as Ir}from"./layouts/grid.mjs";import{FeatureDeveloping as Lr}from"./pages/FeatureDeveloping.mjs";import{FeatureFixing as Rr}from"./pages/FeatureFixing.mjs";import{NotAuthorized as zr}from"./pages/NotAuthorized.mjs";import{NotFound as Br}from"./pages/NotFound.mjs";import{n as Vr,r as Hr,t as Ur}from"./alert-BbvPwf2x.mjs";import{LoginPage as Wr}from"./pages/LoginPage.mjs";import{RegisterPage as Gr}from"./pages/RegisterPage.mjs";import{InputOTP as Kr,InputOTPGroup as qr,InputOTPSeparator as Jr,InputOTPSlot as Yr}from"./ui/input-otp.mjs";import{VerifyEmailPage as Xr}from"./pages/VerifyEmailPage.mjs";import{Google as Zr}from"./systems/google.mjs";import{AddNewBtn as Qr}from"./ui/buttons/add-new.mjs";import{EditBtn as $r}from"./ui/buttons/edit.mjs";import{RefreshBtn as ei}from"./ui/buttons/refresh.mjs";import{TrashBtn as ti}from"./ui/buttons/trash.mjs";import{UploadImageBtn as ni}from"./ui/buttons/upload-image.mjs";import{SearchInput as ri}from"./ui/inputs/search-input.mjs";import{AspectRatio as ii}from"./ui/aspect-ratio.mjs";import{Breadcrumb as ai,BreadcrumbEllipsis as oi,BreadcrumbItem as si,BreadcrumbLink as ci,BreadcrumbList as li,BreadcrumbPage as ui,BreadcrumbSeparator as di}from"./ui/breadcrumb.mjs";import{ButtonGroup as fi,ButtonGroupSeparator as pi,ButtonGroupText as mi,buttonGroupVariants as hi}from"./ui/button-group.mjs";import{Carousel as gi,CarouselContent as _i,CarouselItem as vi,CarouselNext as yi,CarouselPrevious as bi}from"./ui/carousel.mjs";import{Collapsible as xi,CollapsibleContent as Si,CollapsibleTrigger as Ci}from"./ui/collapsible.mjs";import{ContextMenu as wi,ContextMenuCheckboxItem as Ti,ContextMenuContent as Ei,ContextMenuGroup as Di,ContextMenuItem as Oi,ContextMenuLabel as ki,ContextMenuPortal as Ai,ContextMenuRadioGroup as ji,ContextMenuRadioItem as Mi,ContextMenuSeparator as Ni,ContextMenuShortcut as Pi,ContextMenuSub as Fi,ContextMenuSubContent as Ii,ContextMenuSubTrigger as Li,ContextMenuTrigger as Ri}from"./ui/context-menu.mjs";import{Empty as zi,EmptyContent as Bi,EmptyDescription as Vi,EmptyHeader as Hi,EmptyMedia as Ui,EmptyTitle as Wi}from"./ui/empty.mjs";import{FileUploader as Gi}from"./ui/file-uploader.mjs";import"./field-dYemS0hQ.mjs";import{Form as Ki,FormControl as qi,FormDescription as Ji,FormField as Yi,FormItem as Xi,FormLabel as Zi,FormMessage as Qi,useFormField as $i}from"./ui/form.mjs";import{HoverCard as ea,HoverCardContent as ta,HoverCardTrigger as na}from"./ui/hover-card.mjs";import{Item as ra,ItemActions as ia,ItemContent as aa,ItemDescription as oa,ItemFooter as sa,ItemGroup as ca,ItemHeader as la,ItemMedia as ua,ItemSeparator as da,ItemTitle as fa}from"./ui/item.mjs";import{Menubar as pa,MenubarCheckboxItem as ma,MenubarContent as ha,MenubarGroup as ga,MenubarItem as _a,MenubarLabel as va,MenubarMenu as ya,MenubarPortal as ba,MenubarRadioGroup as xa,MenubarRadioItem as Sa,MenubarSeparator as Ca,MenubarShortcut as wa,MenubarSub as Ta,MenubarSubContent as Ea,MenubarSubTrigger as Da,MenubarTrigger as Oa}from"./ui/menubar.mjs";import{MultipleSelector as ka,useDebounce as Aa}from"./ui/multi-select.mjs";import{NavigationMenu as ja,NavigationMenuContent as Ma,NavigationMenuIndicator as Na,NavigationMenuItem as Pa,NavigationMenuLink as Fa,NavigationMenuList as Ia,NavigationMenuTrigger as La,NavigationMenuViewport as Ra,navigationMenuTriggerStyle as za}from"./ui/navigation-menu.mjs";import{Pagination as Ba,PaginationContent as Va,PaginationEllipsis as Ha,PaginationItem as Ua,PaginationLink as Wa,PaginationNext as Ga,PaginationPrevious as Ka}from"./ui/pagination.mjs";import{ScrollArea as qa,ScrollBar as Ja}from"./ui/scroll-area.mjs";import{Slider as Ya}from"./ui/slider.mjs";import{Toaster as Xa,toast as Za}from"./ui/sonner.mjs";import{Table as Qa,TableBody as $a,TableCaption as eo,TableCell as to,TableFooter as no,TableHead as ro,TableHeader as io,TableRow as ao}from"./ui/table.mjs";import{Tabs as oo,TabsContent as so,TabsList as co,TabsTrigger as lo}from"./ui/tabs.mjs";import{Toggle as uo,toggleVariants as fo}from"./ui/toggle.mjs";import{ToggleGroup as po,ToggleGroupItem as mo}from"./ui/toggle-group.mjs";export{Qr as AddNewBtn,Ur as Alert,Vr as AlertDescription,Ie as AlertDialog,Le as AlertDialogAction,Re as AlertDialogCancel,ze as AlertDialogContent,Be as AlertDialogDescription,Ve as AlertDialogFooter,He as AlertDialogHeader,Ue as AlertDialogOverlay,We as AlertDialogPortal,Ge as AlertDialogTitle,Ke as AlertDialogTrigger,Hr as AlertTitle,_ as ArrayCol,e as ArrayHeaderRow,ii as AspectRatio,Pe as Avatar,Me as AvatarFallback,Ne as AvatarImage,xe as Badge,ai as Breadcrumb,oi as BreadcrumbEllipsis,si as BreadcrumbItem,ci as BreadcrumbLink,li as BreadcrumbList,ui as BreadcrumbPage,di as BreadcrumbSeparator,ee as Button,fi as ButtonGroup,pi as ButtonGroupSeparator,mi as ButtonGroupText,Pr as CMSLayout,Or as Calendar,Dr as CalendarDayButton,N as CancelButton,re as Card,ie as CardAction,ae as CardContent,oe as CardDescription,se as CardFooter,ce as CardHeader,le as CardTitle,gi as Carousel,_i as CarouselContent,vi as CarouselItem,yi as CarouselNext,bi as CarouselPrevious,Xn as Checkbox,h as CheckboxField,xi as Collapsible,Si as CollapsibleContent,Ci as CollapsibleTrigger,i as ComboboxField,Ut as Command,zt as CommandDialog,Vt as CommandEmpty,Lt as CommandGroup,Ft as CommandInput,Bt as CommandItem,Ht as CommandList,It as CommandSeparator,Rt as CommandShortcut,qe as ConfirmDialog,wi as ContextMenu,Ti as ContextMenuCheckboxItem,Ei as ContextMenuContent,Di as ContextMenuGroup,Oi as ContextMenuItem,ki as ContextMenuLabel,Ai as ContextMenuPortal,ji as ContextMenuRadioGroup,Mi as ContextMenuRadioItem,Ni as ContextMenuSeparator,Pi as ContextMenuShortcut,Fi as ContextMenuSub,Ii as ContextMenuSubContent,Li as ContextMenuSubTrigger,Ri as ContextMenuTrigger,ge as CountryDisplay,_e as DataList,ve as DataListItem,ye as DateDisplay,a as DateField,Ee as DateTooltip,_t as Description,vt as DescriptionBadge,yt as DescriptionBoolean,bt as DescriptionCopy,xt as DescriptionDate,St as DescriptionEmpty,Ct as DescriptionHeader,wt as DescriptionImages,Tt as DescriptionItem,Et as DescriptionLink,Dt as DescriptionLongText,Ot as DescriptionName,kt as DescriptionNumberPhone,At as DescriptionSection,jt as DescriptionStatistic,Mt as DescriptionStatus,Nt as DescriptionTagList,Pt as DescriptionUser,it as DetailDialog,mt as Dialog,ut as DialogClose,ft as DialogContent,ct as DialogDescription,ot as DialogFooter,dt as DialogHeader,pt as DialogOverlay,st as DialogPortal,lt as DialogTitle,ht as DialogTrigger,Tr as Drawer,xr as DrawerClose,Cr as DrawerContent,yr as DrawerDescription,_r as DrawerFooter,Sr as DrawerHeader,wr as DrawerOverlay,vr as DrawerPortal,br as DrawerTitle,Er as DrawerTrigger,qn as DropdownMenu,Hn as DropdownMenuCheckboxItem,Gn as DropdownMenuContent,zn as DropdownMenuGroup,Pn as DropdownMenuItem,Un as DropdownMenuLabel,Kn as DropdownMenuPortal,Fn as DropdownMenuRadioGroup,Bn as DropdownMenuRadioItem,Jn as DropdownMenuSeparator,In as DropdownMenuShortcut,Ln as DropdownMenuSub,Wn as DropdownMenuSubContent,Vn as DropdownMenuSubTrigger,Rn as DropdownMenuTrigger,$r as EditBtn,b as EmailField,zi as Empty,Bi as EmptyContent,Vi as EmptyDescription,De as EmptyDisplay,Hi as EmptyHeader,Ui as EmptyMedia,Wi as EmptyTitle,at as ErrorDialog,Lr as FeatureDeveloping,Rr as FeatureFixing,$ as Field,n as FieldContent,S as FieldContentMain,c as FieldDescription,x as FieldError,C as FieldGroup,s as FieldLabel,d as FieldLegend,W as FieldNote,u as FieldSeparator,T as FieldSet,w as FieldTitle,E as FieldTooltip,Gi as FileUploader,he as Flex,Ki as Form,qi as FormControl,Ji as FormDescription,Yi as FormField,Xi as FormItem,Zi as FormLabel,Qi as FormMessage,Zr as Google,Ir as Grid,fe as GridProductCard,ea as HoverCard,ta as HoverCardContent,na as HoverCardTrigger,de as Image,tr as Input,Kr as InputOTP,qr as InputOTPGroup,Jr as InputOTPSeparator,Yr as InputOTPSlot,ra as Item,ia as ItemActions,aa as ItemContent,oa as ItemDescription,sa as ItemFooter,ca as ItemGroup,la as ItemHeader,ua as ItemMedia,da as ItemSeparator,fa as ItemTitle,nr as Label,gt as LoadingDialog,Wr as LoginPage,pa as Menubar,ma as MenubarCheckboxItem,ha as MenubarContent,ga as MenubarGroup,_a as MenubarItem,va as MenubarLabel,ya as MenubarMenu,ba as MenubarPortal,xa as MenubarRadioGroup,Sa as MenubarRadioItem,Ca as MenubarSeparator,wa as MenubarShortcut,Ta as MenubarSub,Ea as MenubarSubContent,Da as MenubarSubTrigger,Oa as MenubarTrigger,ka as MultipleSelector,Oe as NameDisplay,ja as NavigationMenu,Ma as NavigationMenuContent,Na as NavigationMenuIndicator,Pa as NavigationMenuItem,Fa as NavigationMenuLink,Ia as NavigationMenuList,La as NavigationMenuTrigger,Ra as NavigationMenuViewport,zr as NotAuthorized,Br as NotFound,X as NumberField,Ba as Pagination,Va as PaginationContent,Ha as PaginationEllipsis,Ua as PaginationItem,Wa as PaginationLink,Ga as PaginationNext,Ka as PaginationPrevious,ne as Paragraph,r as PasswordField,Fr as PaymentLayout,ke as PhoneNumberDisplay,sr as Popover,ar as PopoverAnchor,or as PopoverClose,ir as PopoverContent,rr as PopoverTrigger,pe as ProductCard,Yn as Progress,Ar as RadioGroup,y as RadioGroupField,kr as RadioGroupItem,ei as RefreshBtn,Gr as RegisterPage,er as ResizableHandle,Qn as ResizablePanel,$n as ResizablePanelGroup,Ae as RoleBadge,qa as ScrollArea,Ja as ScrollBar,ri as SearchInput,Wt as SearchModal,hr as Select,dr as SelectContent,Z as SelectField,pr as SelectGroup,ur as SelectItem,cr as SelectLabel,fr as SelectSeparator,mr as SelectTrigger,lr as SelectValue,Ye as Separator,rt as Sheet,$e as SheetClose,tt as SheetContent,Qe as SheetDescription,Xe as SheetFooter,et as SheetHeader,nt as SheetTitle,Ze as SheetTrigger,M as SimpleArrayField,v as SimpleBooleanField,me as SimpleCard,f as SimpleComboboxField,l as SimpleDateField,g as SimpleEmailField,m as SimpleNumberField,p as SimplePasswordField,o as SimpleRadioGroupField,L as SimpleSelectField,R as SimpleTextField,t as SimpleTextareaField,ue as Skeleton,Ya as Slider,Zn as Spinner,je as Statistic,j as SubmitButton,gr as Switch,k as SwitchField,Qa as Table,$a as TableBody,eo as TableCaption,to as TableCell,no as TableFooter,ro as TableHead,io as TableHeader,ao as TableRow,oo as Tabs,so as TabsContent,co as TabsList,lo as TabsTrigger,P as TanStackActionSubmit,F as TanStackActionsForm,B as TanStackCardForm,U as TanStackContainerForm,J as TanStackDialogForm,z as TanStackFieldGroup,A as TanStackPopoverForm,K as TanStackSectionForm,H as TanStackTitleField,Nr as TextEditor,D as TextEditorField,Mr as TextEditorToolbar,Q as TextField,jr as Textarea,Y as TextareaField,Je as Title,Xa as Toaster,uo as Toggle,po as ToggleGroup,mo as ToggleGroupItem,Te as Tooltip,Ce as TooltipContent,we as TooltipProvider,Se as TooltipTrigger,ti as TrashBtn,En as UITableAnalysisPanel,Zt as UITableAvatarNameDisplay,cn as UITableBadgeDisplay,sn as UITableBody,Kt as UITableBooleanDisplay,An as UITableCell,qt as UITableCellActions,on as UITableCellSelect,fn as UITableContainer,Nn as UITableCurrencyDisplay,an as UITableDateDisplay,$t as UITableDescriptionDisplay,Qt as UITableEmailDisplay,jn as UITableEmptyDisplay,Cn as UITableFilter,dn as UITableFooter,Mn as UITableFooterRow,kn as UITableHead,hn as UITableHeadCell,ln as UITableHeadCellOption,gn as UITableHeadCellSelect,xn as UITableHeadRow,wn as UITableInnerTable,mn as UITableInnerWrapper,Xt as UITableListDisplay,pn as UITableLoadMore,rn as UITableMoreButton,tn as UITableNameDisplay,en as UITablePermalink,vn as UITablePhoneNumberDisplay,Gt as UITableProgressDisplay,un as UITableProvider,yn as UITableRemoveButton,On as UITableRow,nn as UITableStatisticDisplay,Jt as UITableStatusDisplay,_n as UITableSummaryBar,Dn as UITableTooltip,Sn as UITableTooltipActions,Tn as UITableTooltipFilter,Yt as UITableUserDataDisplay,bn as UITableWrapper,ni as UploadImageBtn,Fe as UserDataDisplay,Xr as VerifyEmailPage,be as badgeVariants,hi as buttonGroupVariants,za as navigationMenuTriggerStyle,te as paragraphVariants,Za as toast,fo as toggleVariants,Aa as useDebounce,$i as useFormField,q as useTanStackFieldContext,V as useTanStackForm,G as useTanStackFormContext,I as withTanStackFieldGroup,O as withTanStackForm};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-NJP2wQOm.mjs","names":[],"sources":["../packages/components/ui/input.tsx"],"sourcesContent":["'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useCallback } from 'react';\n\n/** CVA variant definitions for the `Input` component — controls sizing and visual style. */\nexport const inputVariants = cva(\n [\n 'w-full rounded font-normal text-text-positive caret-primary transition-all tabular-nums',\n 'placeholder:text-text-positive-muted',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n 'read-only:pointer-events-none read-only:bg-muted-muted read-only:placeholder:text-text-positive-weak',\n ],\n {\n variants: {\n variant: {\n outline: [\n 'outline-1 outline-border -outline-offset-1 bg-transparent shadow-input',\n 'focus-visible:outline-primary-strong',\n 'focus-visible:ring-4',\n 'focus-visible:ring-primary-weak',\n 'aria-invalid:outline-danger',\n 'aria-invalid:ring-danger-weak',\n 'aria-invalid:bg-danger-bg-subtle',\n 'aria-invalid:focus-visible:outline-danger-strong',\n 'aria-invalid:focus-visible:ring-4',\n 'aria-invalid:placeholder:text-text-positive-weak',\n ],\n ghost: '',\n none: '',\n soft: '',\n subtle: '',\n },\n size: {\n xs: 'px-2 py-1 text-xs leading-4',\n sm: 'px-2.5 py-1.5 text-xs leading-4',\n md: 'px-2.5 py-2 text-sm leading-5',\n lg: 'px-3 py-2 text-sm leading-5',\n xl: 'px-3 py-2 text-base leading-6',\n },\n },\n defaultVariants: {\n variant: 'outline',\n size: 'md',\n },\n }\n);\n\nexport type InputVariantProps = VariantProps<typeof inputVariants>;\n\n/**\n * Styled text input field built on the native `<input>` element with CVA-driven size and variant tokens.\n *\n * @example\n * ```tsx\n * import { Input } from '@customafk/lunas-ui/ui/input';\n *\n * <Input\n * placeholder=\"Enter your name\"\n * variant=\"outline\"\n * size=\"md\"\n * onValueChange={(value) => console.log(value)}\n * />\n * ```\n */\nfunction Input({\n className,\n variant,\n size,\n onChange,\n onValueChange,\n ...props\n}: Omit<React.ComponentProps<'input'>, 'size'> & {\n /** Visual style of the input border — `'outline'` (default), `'ghost'`, `'none'`, `'soft'`, or `'subtle'`. */\n variant?: InputVariantProps['variant'];\n /** Controls padding and font size — `'xs'` | `'sm'` | `'md'` (default) | `'lg'` | `'xl'`. */\n size?: InputVariantProps['size'];\n /** Convenience callback that receives the raw string value on every change, bypassing the synthetic event. */\n onValueChange?: (value: string) => void;\n}) {\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(e);\n onValueChange?.(e.target.value);\n },\n [onChange, onValueChange]\n );\n return <input data-slot=\"input\" className={inputVariants({ variant, size, className })} {...props} onChange={handleChange} />;\n}\n\nexport { Input };\n"],"mappings":"2HAMA,MAAa,EAAgB,EAC3B,CACE,0FACA,uCACA,+EACA,uGACD,CACD,CACE,SAAU,CACR,QAAS,CACP,QAAS,CACP,yEACA,uCACA,uBACA,kCACA,8BACA,gCACA,mCACA,mDACA,oCACA,mDACD,CACD,MAAO,GACP,KAAM,GACN,KAAM,GACN,OAAQ,GACT,CACD,KAAM,CACJ,GAAI,8BACJ,GAAI,kCACJ,GAAI,gCACJ,GAAI,8BACJ,GAAI,gCACL,CACF,CACD,gBAAiB,CACf,QAAS,UACT,KAAM,KACP,CACF,CACF,CAmBD,SAAS,EAAM,CACb,YACA,UACA,OACA,WACA,gBACA,GAAG,GAQF,CACD,IAAM,EAAe,EAClB,GAA2C,CAC1C,IAAW,EAAE,CACb,IAAgB,EAAE,OAAO,MAAM,EAEjC,CAAC,EAAU,EAAc,CAC1B,CACD,OAAO,EAAC,QAAA,CAAM,YAAU,QAAQ,UAAW,EAAc,CAAE,UAAS,OAAM,YAAW,CAAC,CAAE,GAAI,EAAO,SAAU,GAAgB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"label-CUCpwS5D.mjs","names":["Label","LabelPrimitive"],"sources":["../packages/components/ui/label.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Label as LabelPrimitive } from 'radix-ui';\n\n/**\n * Accessible form label built on Radix UI's `Label.Root`, with styles for disabled and peer-disabled states.\n *\n * @example\n * ```tsx\n * import { Label } from '@customafk/lunas-ui/ui/label';\n * import { Input } from '@customafk/lunas-ui/ui/input';\n *\n * <Label htmlFor=\"email\">Email address</Label>\n * <Input id=\"email\" type=\"email\" placeholder=\"you@example.com\" />\n * ```\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 'select-none font-medium text-sm/6 leading-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":"6HAkBA,SAASA,EAAM,CAAE,YAAW,GAAG,GAA2D,CACxF,OACE,EAACC,EAAe,KAAA,CACd,YAAU,QACV,UAAW,EACT,qBACA,0BACA,iDACA,iDACA,wCACA,mCACA,2BACA,EACD,CACD,GAAI,GACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import"../../button.variants-DkMqWB8G.mjs";import"../../button-CCVJTHBI.mjs";import"../../skeleton-C51IdOfK.mjs";import"../../tooltip-Dxl5Wa8i.mjs";import"../../avatar-fltdRVsJ.mjs";import"../../separator-D3Gmkxzq.mjs";import"../../sheet-BFlIfNaA.mjs";import"../../dropdown-menu-BWhiVsEf.mjs";import"../../input-NJP2wQOm.mjs";import{t as e}from"../../cms-layout-DkCR1AfG.mjs";export{e as CMSLayout};
|
package/dist/layouts/flex.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{t as e}from"../flex-B6YSJzGe.mjs";export{e as Flex};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid.mjs","names":["Grid: React.FC<React.PropsWithChildren>"],"sources":["../../packages/components/layouts/grid.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\n/**\n * A responsive, container-query-driven grid that automatically adjusts column count based on available width.\n *\n * @example\n * ```tsx\n * import { Grid } from '@customafk/lunas-ui/layouts/grid';\n *\n * <Grid>\n * <Card />\n * <Card />\n * <Card />\n * </Grid>\n * ```\n */\nexport const Grid: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <div className=\"@container size-full\">\n <div\n className={cn(\n 'grid grid-cols-1 gap-4',\n '@3xs:grid-cols-1',\n '@2xs:grid-cols-1',\n '@xs:grid-cols-1',\n '@sm:grid-cols-1',\n '@md:grid-cols-2',\n '@lg:grid-cols-2',\n '@xl:grid-cols-2',\n '@2xl:grid-cols-2',\n '@3xl:grid-cols-3',\n '@4xl:grid-cols-3',\n '@5xl:grid-cols-4',\n '@6xl:grid-cols-4',\n '@7xl:grid-cols-5',\n '@8xl:grid-cols-6',\n '@9xl:grid-cols-7',\n '@10xl:grid-cols-8'\n )}\n >\n {children}\n </div>\n </div>\n );\n};\n"],"mappings":"yGAkBA,MAAaA,GAA2C,CAAE,cAEtD,EAAC,MAAA,CAAI,UAAU,gCACb,EAAC,MAAA,CACC,UAAW,EACT,yBACA,mBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,oBACD,CAEA,YACG,EACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../button.variants-DkMqWB8G.mjs";import"../../button-CCVJTHBI.mjs";import"../../paragraph-DYLaQtTV.mjs";import"../../skeleton-C51IdOfK.mjs";import"../../flex-B6YSJzGe.mjs";import"../../tooltip-Dxl5Wa8i.mjs";import"../../avatar-fltdRVsJ.mjs";import"../../separator-D3Gmkxzq.mjs";import"../../sheet-BFlIfNaA.mjs";import"../../dropdown-menu-BWhiVsEf.mjs";import"../../input-NJP2wQOm.mjs";import{t as e}from"../../payment-layout-DrQ0kZPX.mjs";export{e as PaymentLayout};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"../button.variants-DkMqWB8G.mjs";import{t as e}from"../button-CCVJTHBI.mjs";import{Construction 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";const a=({title:a=`Tính năng đang phát triển`,subtitle:o=`Chúng tôi đang phát triển tính năng này. Vui lòng quay lại sau.`,buttonText:s=`Quay lại`,onButtonClick:c=()=>window.history.back(),className:l,iconClassName:u})=>i(`div`,{className:n(`flex flex-col items-center justify-center min-h-[50vh] gap-4 sm:gap-6 py-8 sm:py-10 px-4 text-center w-full`,l),children:[i(`div`,{className:`flex flex-col items-center gap-2`,children:[r(t,{className:n(`size-16 sm:size-24 text-yellow-500`,u)}),r(`div`,{className:`text-3xl sm:text-5xl font-bold text-yellow-500`})]}),r(`h1`,{className:`text-xl sm:text-2xl font-semibold mt-2`,children:a}),r(`p`,{className:`text-muted-foreground max-w-md text-sm sm:text-base`,children:o}),r(e,{onClick:c,variant:`default`,className:`mt-2`,size:`sm`,children:s})]});var o=a;export{a as FeatureDeveloping,o as default};
|
|
2
|
-
//# sourceMappingURL=FeatureDeveloping.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureDeveloping.mjs","names":[],"sources":["../../packages/components/pages/FeatureDeveloping.tsx"],"sourcesContent":["import { Construction } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Button } from '../ui/button';\n\nexport interface FeatureDevelopingProps {\n /** Main heading shown beneath the construction icon. Defaults to `'Tính năng đang phát triển'`. */\n title?: string;\n /** Supporting text shown below the title. Defaults to a Vietnamese message asking the user to check back later. */\n subtitle?: string;\n /** Label for the action button. Defaults to `'Quay lại'`. */\n buttonText?: string;\n /** Handler called when the action button is clicked. Defaults to `window.history.back()`. */\n onButtonClick?: () => void;\n /** Additional class names applied to the root container element. */\n className?: string;\n /** Additional class names applied to the `Construction` icon. */\n iconClassName?: string;\n}\n\n/**\n * Full-page placeholder displayed when a feature is still under active development.\n *\n * @example\n * ```tsx\n * import { FeatureDeveloping } from '@customafk/lunas-ui/pages/FeatureDeveloping';\n *\n * <FeatureDeveloping\n * title=\"Coming Soon\"\n * subtitle=\"This feature is not ready yet.\"\n * buttonText=\"Go Back\"\n * onButtonClick={() => router.back()}\n * />\n * ```\n */\nexport const FeatureDeveloping = ({\n title = 'Tính năng đang phát triển',\n subtitle = 'Chúng tôi đang phát triển tính năng này. Vui lòng quay lại sau.',\n buttonText = 'Quay lại',\n onButtonClick = () => window.history.back(),\n className,\n iconClassName,\n}: FeatureDevelopingProps) => {\n return (\n <div className={cn('flex flex-col items-center justify-center min-h-[50vh] gap-4 sm:gap-6 py-8 sm:py-10 px-4 text-center w-full', className)}>\n <div className=\"flex flex-col items-center gap-2\">\n <Construction className={cn('size-16 sm:size-24 text-yellow-500', iconClassName)} />\n <div className=\"text-3xl sm:text-5xl font-bold text-yellow-500\">{/* This text shows the feature is in development */}</div>\n </div>\n\n <h1 className=\"text-xl sm:text-2xl font-semibold mt-2\">{title}</h1>\n\n <p className=\"text-muted-foreground max-w-md text-sm sm:text-base\">{subtitle}</p>\n\n <Button onClick={onButtonClick} variant=\"default\" className=\"mt-2\" size=\"sm\">\n {buttonText}\n </Button>\n </div>\n );\n};\n\nexport default FeatureDeveloping;\n"],"mappings":"qOAoCA,MAAa,GAAqB,CAChC,QAAQ,4BACR,WAAW,kEACX,aAAa,WACb,oBAAsB,OAAO,QAAQ,MAAM,CAC3C,YACA,mBAGE,EAAC,MAAA,CAAI,UAAW,EAAG,8GAA+G,EAAU,WAC1I,EAAC,MAAA,CAAI,UAAU,6CACb,EAAC,EAAA,CAAa,UAAW,EAAG,qCAAsC,EAAc,CAAA,CAAI,CACpF,EAAC,MAAA,CAAI,UAAU,iDAAA,CAA4G,CAAA,EACvH,CAEN,EAAC,KAAA,CAAG,UAAU,kDAA0C,GAAW,CAEnE,EAAC,IAAA,CAAE,UAAU,+DAAuD,GAAa,CAEjF,EAAC,EAAA,CAAO,QAAS,EAAe,QAAQ,UAAU,UAAU,OAAO,KAAK,cACrE,GACM,GACL,CAIV,IAAA,EAAe"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"../button.variants-DkMqWB8G.mjs";import{t as e}from"../button-CCVJTHBI.mjs";import{Wrench 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";const a=({title:a=`Tính năng đang bảo trì`,subtitle:o=`Chúng tôi đang khắc phục vấn đề với tính năng này. Vui lòng quay lại sau.`,buttonText:s=`Quay lại`,onButtonClick:c=()=>window.history.back(),className:l,iconClassName:u})=>i(`div`,{className:n(`flex flex-col items-center justify-center min-h-[50vh] gap-4 sm:gap-6 py-8 sm:py-10 px-4 text-center w-full`,l),children:[i(`div`,{className:`flex flex-col items-center gap-2`,children:[r(t,{className:n(`size-16 sm:size-24 text-orange-500`,u)}),r(`div`,{className:`text-3xl sm:text-5xl font-bold text-orange-500`})]}),r(`h1`,{className:`text-xl sm:text-2xl font-semibold mt-2`,children:a}),r(`p`,{className:`text-muted-foreground max-w-md text-sm sm:text-base`,children:o}),r(e,{onClick:c,variant:`default`,className:`mt-2`,size:`sm`,children:s})]});var o=a;export{a as FeatureFixing,o as default};
|
|
2
|
-
//# sourceMappingURL=FeatureFixing.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureFixing.mjs","names":[],"sources":["../../packages/components/pages/FeatureFixing.tsx"],"sourcesContent":["import { Button } from '../ui/button';\nimport { cn } from '@customafk/react-toolkit/utils';\nimport { Wrench } from 'lucide-react';\n\nexport interface FeatureFixingProps {\n /** Main heading shown beneath the wrench icon. Defaults to `'Tính năng đang bảo trì'`. */\n title?: string;\n /** Supporting text shown below the title. Defaults to a Vietnamese maintenance message. */\n subtitle?: string;\n /** Label for the action button. Defaults to `'Quay lại'`. */\n buttonText?: string;\n /** Handler called when the action button is clicked. Defaults to `window.history.back()`. */\n onButtonClick?: () => void;\n /** Additional class names applied to the root container element. */\n className?: string;\n /** Additional class names applied to the `Wrench` icon. */\n iconClassName?: string;\n}\n\n/**\n * Full-page placeholder displayed when a feature is temporarily unavailable due to maintenance or bug fixes.\n *\n * @example\n * ```tsx\n * import { FeatureFixing } from '@customafk/lunas-ui/pages/FeatureFixing';\n *\n * <FeatureFixing\n * title=\"Under Maintenance\"\n * subtitle=\"We are fixing an issue. Please check back later.\"\n * buttonText=\"Go Back\"\n * onButtonClick={() => router.back()}\n * />\n * ```\n */\nexport const FeatureFixing = ({\n title = 'Tính năng đang bảo trì',\n subtitle = 'Chúng tôi đang khắc phục vấn đề với tính năng này. Vui lòng quay lại sau.',\n buttonText = 'Quay lại',\n onButtonClick = () => window.history.back(),\n className,\n iconClassName,\n}: FeatureFixingProps) => {\n return (\n <div className={cn('flex flex-col items-center justify-center min-h-[50vh] gap-4 sm:gap-6 py-8 sm:py-10 px-4 text-center w-full', className)}>\n <div className=\"flex flex-col items-center gap-2\">\n <Wrench className={cn('size-16 sm:size-24 text-orange-500', iconClassName)} />\n <div className=\"text-3xl sm:text-5xl font-bold text-orange-500\">{/* This text indicates the feature is being fixed */}</div>\n </div>\n\n <h1 className=\"text-xl sm:text-2xl font-semibold mt-2\">{title}</h1>\n\n <p className=\"text-muted-foreground max-w-md text-sm sm:text-base\">{subtitle}</p>\n\n <Button onClick={onButtonClick} variant=\"default\" className=\"mt-2\" size=\"sm\">\n {buttonText}\n </Button>\n </div>\n );\n};\n\nexport default FeatureFixing;\n"],"mappings":"+NAkCA,MAAa,GAAiB,CAC5B,QAAQ,yBACR,WAAW,4EACX,aAAa,WACb,oBAAsB,OAAO,QAAQ,MAAM,CAC3C,YACA,mBAGE,EAAC,MAAA,CAAI,UAAW,EAAG,8GAA+G,EAAU,WAC1I,EAAC,MAAA,CAAI,UAAU,6CACb,EAAC,EAAA,CAAO,UAAW,EAAG,qCAAsC,EAAc,CAAA,CAAI,CAC9E,EAAC,MAAA,CAAI,UAAU,iDAAA,CAA6G,CAAA,EACxH,CAEN,EAAC,KAAA,CAAG,UAAU,kDAA0C,GAAW,CAEnE,EAAC,IAAA,CAAE,UAAU,+DAAuD,GAAa,CAEjF,EAAC,EAAA,CAAO,QAAS,EAAe,QAAQ,UAAU,UAAU,OAAO,KAAK,cACrE,GACM,GACL,CAIV,IAAA,EAAe"}
|
package/dist/pages/LoginPage.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";import"../button.variants-DkMqWB8G.mjs";import{t as e}from"../button-CCVJTHBI.mjs";import"../heading-De4Pn3mZ.mjs";import"../paragraph-DYLaQtTV.mjs";import"../close-_UHFeiLS.mjs";import{i as t,l as n,o as r,r as i,t as a}from"../dialog-CLDnvNH_.mjs";import{t as o}from"../input-NJP2wQOm.mjs";import{t as s}from"../label-CUCpwS5D.mjs";import{n as c,t as l}from"../alert-BbvPwf2x.mjs";import{Eye as u,EyeOff as d}from"lucide-react";import{useId as f,useState as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{z as g}from"zod";const _=g.object({email:g.string().min(1,`Vui lòng nhập email`).email(`Email không hợp lệ`),password:g.string().min(1,`Vui lòng nhập mật khẩu`)}),v=({open:g,onOpenChange:v,onLogin:y,onForgotPassword:b,onRegister:x,isLoading:S=!1,errorMessage:C,title:w=`Đăng nhập`,subtitle:T=`Nhập thông tin để tiếp tục`})=>{let E=f(),D=f(),[O,k]=p(``),[A,j]=p(``),[M,N]=p(!1),[P,F]=p({});return m(a,{open:g,onOpenChange:v,children:h(i,{className:`max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=closed]:zoom-out-100 max-sm:top-auto max-sm:right-0 max-sm:bottom-0 max-sm:left-0 max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none sm:max-w-sm`,children:[h(r,{children:[m(n,{children:w}),m(t,{children:T})]}),h(`form`,{onSubmit:async e=>{e.preventDefault();let t=_.safeParse({email:O,password:A});if(!t.success){let e=t.error.flatten().fieldErrors;F({email:e.email?.[0],password:e.password?.[0]});return}F({}),await y(O,A)},noValidate:!0,className:`flex flex-col gap-4`,children:[C&&m(l,{variant:`destructive`,children:m(c,{children:C})}),h(`div`,{className:`flex flex-col gap-1.5`,children:[m(s,{htmlFor:E,children:`Email`}),m(o,{id:E,type:`email`,autoComplete:`email`,placeholder:`you@example.com`,value:O,onChange:e=>k(e.target.value),"aria-invalid":!!P.email,disabled:S}),P.email&&m(`p`,{className:`text-destructive text-xs`,children:P.email})]}),h(`div`,{className:`flex flex-col gap-1.5`,children:[h(`div`,{className:`flex items-center justify-between`,children:[m(s,{htmlFor:D,children:`Mật khẩu`}),b&&m(e,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs`,onClick:b,children:`Quên mật khẩu?`})]}),h(`div`,{className:`relative`,children:[m(o,{id:D,type:M?`text`:`password`,autoComplete:`current-password`,placeholder:`••••••••`,value:A,onChange:e=>j(e.target.value),"aria-invalid":!!P.password,disabled:S,className:`pr-10`}),m(`button`,{type:`button`,className:`absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground`,onMouseDown:e=>{e.preventDefault(),N(e=>!e)},"aria-label":M?`Ẩn mật khẩu`:`Hiện mật khẩu`,children:m(M?d:u,{size:16})})]}),P.password&&m(`p`,{className:`text-destructive text-xs`,children:P.password})]}),m(e,{type:`submit`,isLoading:S,className:`w-full`,children:`Đăng nhập`}),m(e,{type:`button`,variant:`outline`,className:`w-full`,disabled:S,onClick:()=>v(!1),children:`Đóng hộp thoại`})]}),x&&h(`div`,{className:`flex justify-center gap-1 text-muted-foreground text-sm`,children:[m(`span`,{children:`Chưa có tài khoản?`}),m(e,{variant:`link`,size:`sm`,className:`h-auto p-0`,onClick:x,children:`Đăng ký`})]})]})})};export{v as LoginPage};
|
|
2
|
-
//# sourceMappingURL=LoginPage.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LoginPage.mjs","names":[],"sources":["../../packages/components/pages/LoginPage.tsx"],"sourcesContent":["'use client';\n\nimport { useId, useState } from 'react';\n\nimport { Eye, EyeOff } from 'lucide-react';\nimport { z } from 'zod';\n\nimport { Alert, AlertDescription } from '../ui/alert';\nimport { Button } from '../ui/button';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '../ui/dialog';\nimport { Input } from '../ui/input';\nimport { Label } from '../ui/label';\n\nexport interface LoginPageProps {\n /** Controls whether the dialog is open */\n open: boolean;\n /** Called when the dialog open state changes */\n onOpenChange: (open: boolean) => void;\n /** Called when the user submits login credentials */\n onLogin: (email: string, password: string) => Promise<void> | void;\n /** Called when the \"Quên mật khẩu?\" link is clicked */\n onForgotPassword?: () => void;\n /** Called when the \"Đăng ký\" link is clicked */\n onRegister?: () => void;\n /** Disables the form and shows a spinner on the submit button */\n isLoading?: boolean;\n /** Server-side error message rendered in a destructive Alert */\n errorMessage?: string;\n /** Dialog heading. Default: \"Đăng nhập\" */\n title?: string;\n /** Dialog subheading. Default: \"Nhập thông tin để tiếp tục\" */\n subtitle?: string;\n}\n\nconst loginSchema = z.object({\n email: z.string().min(1, 'Vui lòng nhập email').email('Email không hợp lệ'),\n password: z.string().min(1, 'Vui lòng nhập mật khẩu'),\n});\n\n/**\n * Modal login dialog for the client authentication flow.\n *\n * @example\n * ```tsx\n * import { LoginPage } from '@customafk/lunas-ui/pages/LoginPage';\n *\n * <LoginPage\n * open={open}\n * onOpenChange={setOpen}\n * onLogin={async (email, password) => {\n * await authService.login(email, password);\n * setOpen(false);\n * }}\n * onRegister={() => { setOpen(false); setRegisterOpen(true); }}\n * />\n * ```\n */\nexport const LoginPage = ({\n open,\n onOpenChange,\n onLogin,\n onForgotPassword,\n onRegister,\n isLoading = false,\n errorMessage,\n title = 'Đăng nhập',\n subtitle = 'Nhập thông tin để tiếp tục',\n}: LoginPageProps) => {\n const emailId = useId();\n const passwordId = useId();\n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n const [showPassword, setShowPassword] = useState(false);\n const [fieldErrors, setFieldErrors] = useState<{ email?: string; password?: string }>({});\n\n const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n const result = loginSchema.safeParse({ email, password });\n if (!result.success) {\n const errors = result.error.flatten().fieldErrors;\n setFieldErrors({ email: errors.email?.[0], password: errors.password?.[0] });\n return;\n }\n setFieldErrors({});\n await onLogin(email, password);\n };\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className=\"max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=closed]:zoom-out-100 max-sm:top-auto max-sm:right-0 max-sm:bottom-0 max-sm:left-0 max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none sm:max-w-sm\">\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{subtitle}</DialogDescription>\n </DialogHeader>\n\n <form onSubmit={handleSubmit} noValidate className=\"flex flex-col gap-4\">\n {errorMessage && (\n <Alert variant=\"destructive\">\n <AlertDescription>{errorMessage}</AlertDescription>\n </Alert>\n )}\n\n <div className=\"flex flex-col gap-1.5\">\n <Label htmlFor={emailId}>Email</Label>\n <Input\n id={emailId}\n type=\"email\"\n autoComplete=\"email\"\n placeholder=\"you@example.com\"\n value={email}\n onChange={e => setEmail(e.target.value)}\n aria-invalid={!!fieldErrors.email}\n disabled={isLoading}\n />\n {fieldErrors.email && <p className=\"text-destructive text-xs\">{fieldErrors.email}</p>}\n </div>\n\n <div className=\"flex flex-col gap-1.5\">\n <div className=\"flex items-center justify-between\">\n <Label htmlFor={passwordId}>Mật khẩu</Label>\n {onForgotPassword && (\n <Button type=\"button\" variant=\"link\" size=\"sm\" className=\"h-auto p-0 text-xs\" onClick={onForgotPassword}>\n Quên mật khẩu?\n </Button>\n )}\n </div>\n <div className=\"relative\">\n <Input\n id={passwordId}\n type={showPassword ? 'text' : 'password'}\n autoComplete=\"current-password\"\n placeholder=\"••••••••\"\n value={password}\n onChange={e => setPassword(e.target.value)}\n aria-invalid={!!fieldErrors.password}\n disabled={isLoading}\n className=\"pr-10\"\n />\n <button\n type=\"button\"\n className=\"absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground\"\n onMouseDown={e => {\n e.preventDefault();\n setShowPassword(v => !v);\n }}\n aria-label={showPassword ? 'Ẩn mật khẩu' : 'Hiện mật khẩu'}\n >\n {showPassword ? <EyeOff size={16} /> : <Eye size={16} />}\n </button>\n </div>\n {fieldErrors.password && <p className=\"text-destructive text-xs\">{fieldErrors.password}</p>}\n </div>\n\n <Button type=\"submit\" isLoading={isLoading} className=\"w-full\">\n Đăng nhập\n </Button>\n <Button type=\"button\" variant=\"outline\" className=\"w-full\" disabled={isLoading} onClick={() => onOpenChange(false)}>\n Đóng hộp thoại\n </Button>\n </form>\n\n {onRegister && (\n <div className=\"flex justify-center gap-1 text-muted-foreground text-sm\">\n <span>Chưa có tài khoản?</span>\n <Button variant=\"link\" size=\"sm\" className=\"h-auto p-0\" onClick={onRegister}>\n Đăng ký\n </Button>\n </div>\n )}\n </DialogContent>\n </Dialog>\n );\n};\n"],"mappings":"ijBAkCA,MAAM,EAAc,EAAE,OAAO,CAC3B,MAAO,EAAE,QAAQ,CAAC,IAAI,EAAG,sBAAsB,CAAC,MAAM,qBAAqB,CAC3E,SAAU,EAAE,QAAQ,CAAC,IAAI,EAAG,yBAAyB,CACtD,CAAC,CAoBW,GAAa,CACxB,OACA,eACA,UACA,mBACA,aACA,YAAY,GACZ,eACA,QAAQ,YACR,WAAW,gCACS,CACpB,IAAM,EAAU,GAAO,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C,EAAC,EAAA,CAAO,KAAK,SAAS,QAAQ,OAAO,KAAK,KAAK,UAAU,qBAAqB,QAAS,WAAkB,kBAEhG,CAAA,EAEP,CACN,EAAC,MAAA,CAAI,UAAU,qBACb,EAAC,EAAA,CACC,GAAI,EACJ,KAAM,EAAe,OAAS,WAC9B,aAAa,mBACb,YAAY,WACZ,MAAO,EACP,SAAU,GAAK,EAAY,EAAE,OAAO,MAAM,CAC1C,eAAc,CAAC,CAAC,EAAY,SAC5B,SAAU,EACV,UAAU,SACV,CACF,EAAC,SAAA,CACC,KAAK,SACL,UAAU,gGACV,YAAa,GAAK,CAChB,EAAE,gBAAgB,CAClB,EAAgB,GAAK,CAAC,EAAE,EAE1B,aAAY,EAAe,cAAgB,yBAE3B,EAAf,EAAgB,EAAuB,EAAvB,CAAO,KAAM,GAAA,CAA0B,EACjD,CAAA,EACL,CACL,EAAY,UAAY,EAAC,IAAA,CAAE,UAAU,oCAA4B,EAAY,UAAa,GACvF,CAEN,EAAC,EAAA,CAAO,KAAK,SAAoB,YAAW,UAAU,kBAAS,aAEtD,CACT,EAAC,EAAA,CAAO,KAAK,SAAS,QAAQ,UAAU,UAAU,SAAS,SAAU,EAAW,YAAe,EAAa,GAAM,UAAE,kBAE3G,GACJ,CAEN,GACC,EAAC,MAAA,CAAI,UAAU,oEACb,EAAC,OAAA,CAAA,SAAK,qBAAA,CAAyB,CAC/B,EAAC,EAAA,CAAO,QAAQ,OAAO,KAAK,KAAK,UAAU,aAAa,QAAS,WAAY,WAEpE,CAAA,EACL,GAEM,EACT"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"../button.variants-DkMqWB8G.mjs";import{t as e}from"../button-CCVJTHBI.mjs";import{ShieldAlert 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";const a=({title:a=`Quyền truy cập bị từ chối`,subtitle:o=`Xin lỗi, bạn không có quyền truy cập vào trang này.`,buttonText:s=`Quay lại`,onButtonClick:c=()=>window.history.back(),className:l,iconClassName:u})=>i(`div`,{className:n(`flex flex-col items-center justify-center min-h-[50vh] gap-4 sm:gap-6 py-8 sm:py-10 px-4 text-center w-full`,l),children:[i(`div`,{className:`flex flex-col items-center gap-2`,children:[r(t,{className:n(`size-16 sm:size-24 text-primary`,u)}),r(`div`,{className:`text-4xl sm:text-6xl font-bold text-primary`,children:`403`})]}),r(`h1`,{className:`text-xl sm:text-2xl font-semibold mt-2`,children:a}),r(`p`,{className:`text-muted-foreground max-w-md text-sm sm:text-base`,children:o}),r(e,{onClick:c,variant:`default`,className:`mt-2`,size:`sm`,children:s})]});var o=a;export{a as NotAuthorized,o as default};
|
|
2
|
-
//# sourceMappingURL=NotAuthorized.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotAuthorized.mjs","names":[],"sources":["../../packages/components/pages/NotAuthorized.tsx"],"sourcesContent":["import { Button } from '../ui/button';\nimport { cn } from '@customafk/react-toolkit/utils';\nimport { ShieldAlert } from 'lucide-react';\n\nexport interface NotAuthorizedProps {\n /** Main heading shown beneath the shield icon. Defaults to `'Quyền truy cập bị từ chối'`. */\n title?: string;\n /** Supporting text shown below the title. Defaults to a Vietnamese access-denied message. */\n subtitle?: string;\n /** Label for the action button. Defaults to `'Quay lại'`. */\n buttonText?: string;\n /** Handler called when the action button is clicked. Defaults to `window.history.back()`. */\n onButtonClick?: () => void;\n /** Additional class names applied to the root container element. */\n className?: string;\n /** Additional class names applied to the `ShieldAlert` icon. */\n iconClassName?: string;\n}\n\n/**\n * Full-page 403 error screen shown when the current user lacks permission to access a resource.\n *\n * @example\n * ```tsx\n * import { NotAuthorized } from '@customafk/lunas-ui/pages/NotAuthorized';\n *\n * <NotAuthorized\n * title=\"Access Denied\"\n * subtitle=\"You do not have permission to view this page.\"\n * buttonText=\"Go Back\"\n * onButtonClick={() => router.push('/')}\n * />\n * ```\n */\nexport const NotAuthorized = ({\n title = 'Quyền truy cập bị từ chối',\n subtitle = 'Xin lỗi, bạn không có quyền truy cập vào trang này.',\n buttonText = 'Quay lại',\n onButtonClick = () => window.history.back(),\n className,\n iconClassName,\n}: NotAuthorizedProps) => {\n return (\n <div className={cn('flex flex-col items-center justify-center min-h-[50vh] gap-4 sm:gap-6 py-8 sm:py-10 px-4 text-center w-full', className)}>\n <div className=\"flex flex-col items-center gap-2\">\n <ShieldAlert className={cn('size-16 sm:size-24 text-primary', iconClassName)} />\n <div className=\"text-4xl sm:text-6xl font-bold text-primary\">403</div>\n </div>\n\n <h1 className=\"text-xl sm:text-2xl font-semibold mt-2\">{title}</h1>\n\n <p className=\"text-muted-foreground max-w-md text-sm sm:text-base\">{subtitle}</p>\n\n <Button onClick={onButtonClick} variant=\"default\" className=\"mt-2\" size=\"sm\">\n {buttonText}\n </Button>\n </div>\n );\n};\n\nexport default NotAuthorized;\n"],"mappings":"oOAkCA,MAAa,GAAiB,CAC5B,QAAQ,4BACR,WAAW,sDACX,aAAa,WACb,oBAAsB,OAAO,QAAQ,MAAM,CAC3C,YACA,mBAGE,EAAC,MAAA,CAAI,UAAW,EAAG,8GAA+G,EAAU,WAC1I,EAAC,MAAA,CAAI,UAAU,6CACb,EAAC,EAAA,CAAY,UAAW,EAAG,kCAAmC,EAAc,CAAA,CAAI,CAChF,EAAC,MAAA,CAAI,UAAU,uDAA8C,OAAS,CAAA,EAClE,CAEN,EAAC,KAAA,CAAG,UAAU,kDAA0C,GAAW,CAEnE,EAAC,IAAA,CAAE,UAAU,+DAAuD,GAAa,CAEjF,EAAC,EAAA,CAAO,QAAS,EAAe,QAAQ,UAAU,UAAU,OAAO,KAAK,cACrE,GACM,GACL,CAIV,IAAA,EAAe"}
|
package/dist/pages/NotFound.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"../button.variants-DkMqWB8G.mjs";import{t as e}from"../button-CCVJTHBI.mjs";import{FileQuestion 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";const a=({title:a=`Không tìm thấy trang`,subtitle:o=`Xin lỗi, trang bạn đang tìm kiếm không tồn tại hoặc đã bị di chuyển.`,buttonText:s=`Trở về trang chủ`,onButtonClick:c=()=>window.history.back(),className:l,iconClassName:u})=>i(`div`,{className:n(`flex flex-col items-center justify-center min-h-[50vh] gap-4 sm:gap-6 py-8 sm:py-10 px-4 text-center w-full`,l),children:[i(`div`,{className:`flex flex-col items-center gap-2`,children:[r(t,{className:n(`size-16 sm:size-24 text-primary`,u)}),r(`div`,{className:`text-4xl sm:text-6xl font-bold text-primary`,children:`404`})]}),r(`h1`,{className:`text-xl sm:text-2xl font-semibold mt-2`,children:a}),r(`p`,{className:`text-muted-foreground max-w-md text-sm sm:text-base`,children:o}),r(e,{onClick:c,variant:`default`,className:`mt-2`,size:`sm`,children:s})]});var o=a;export{a as NotFound,o as default};
|
|
2
|
-
//# sourceMappingURL=NotFound.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotFound.mjs","names":[],"sources":["../../packages/components/pages/NotFound.tsx"],"sourcesContent":["import { Button } from '../ui/button';\nimport { cn } from '@customafk/react-toolkit/utils';\nimport { FileQuestion } from 'lucide-react';\n\nexport interface NotFoundProps {\n /** Main heading shown beneath the file-question icon. Defaults to `'Không tìm thấy trang'`. */\n title?: string;\n /** Supporting text shown below the title. Defaults to a Vietnamese 404 message. */\n subtitle?: string;\n /** Label for the action button. Defaults to `'Trở về trang chủ'`. */\n buttonText?: string;\n /** Handler called when the action button is clicked. Defaults to `window.history.back()`. */\n onButtonClick?: () => void;\n /** Additional class names applied to the root container element. */\n className?: string;\n /** Additional class names applied to the `FileQuestion` icon. */\n iconClassName?: string;\n}\n\n/**\n * Full-page 404 error screen displayed when a requested route or resource does not exist.\n *\n * @example\n * ```tsx\n * import { NotFound } from '@customafk/lunas-ui/pages/NotFound';\n *\n * <NotFound\n * title=\"Page Not Found\"\n * subtitle=\"The page you are looking for does not exist.\"\n * buttonText=\"Go Home\"\n * onButtonClick={() => router.push('/')}\n * />\n * ```\n */\nexport const NotFound = ({\n title = 'Không tìm thấy trang',\n subtitle = 'Xin lỗi, trang bạn đang tìm kiếm không tồn tại hoặc đã bị di chuyển.',\n buttonText = 'Trở về trang chủ',\n onButtonClick = () => window.history.back(),\n className,\n iconClassName,\n}: NotFoundProps) => {\n return (\n <div className={cn('flex flex-col items-center justify-center min-h-[50vh] gap-4 sm:gap-6 py-8 sm:py-10 px-4 text-center w-full', className)}>\n <div className=\"flex flex-col items-center gap-2\">\n <FileQuestion className={cn('size-16 sm:size-24 text-primary', iconClassName)} />\n <div className=\"text-4xl sm:text-6xl font-bold text-primary\">404</div>\n </div>\n\n <h1 className=\"text-xl sm:text-2xl font-semibold mt-2\">{title}</h1>\n\n <p className=\"text-muted-foreground max-w-md text-sm sm:text-base\">{subtitle}</p>\n\n <Button onClick={onButtonClick} variant=\"default\" className=\"mt-2\" size=\"sm\">\n {buttonText}\n </Button>\n </div>\n );\n};\n\nexport default NotFound;\n"],"mappings":"qOAkCA,MAAa,GAAY,CACvB,QAAQ,uBACR,WAAW,uEACX,aAAa,mBACb,oBAAsB,OAAO,QAAQ,MAAM,CAC3C,YACA,mBAGE,EAAC,MAAA,CAAI,UAAW,EAAG,8GAA+G,EAAU,WAC1I,EAAC,MAAA,CAAI,UAAU,6CACb,EAAC,EAAA,CAAa,UAAW,EAAG,kCAAmC,EAAc,CAAA,CAAI,CACjF,EAAC,MAAA,CAAI,UAAU,uDAA8C,OAAS,CAAA,EAClE,CAEN,EAAC,KAAA,CAAG,UAAU,kDAA0C,GAAW,CAEnE,EAAC,IAAA,CAAE,UAAU,+DAAuD,GAAa,CAEjF,EAAC,EAAA,CAAO,QAAS,EAAe,QAAQ,UAAU,UAAU,OAAO,KAAK,cACrE,GACM,GACL,CAIV,IAAA,EAAe"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";import"../button.variants-DkMqWB8G.mjs";import{t as e}from"../button-CCVJTHBI.mjs";import"../heading-De4Pn3mZ.mjs";import"../paragraph-DYLaQtTV.mjs";import"../close-_UHFeiLS.mjs";import{i as t,l as n,o as r,r as i,t as a}from"../dialog-CLDnvNH_.mjs";import{t as o}from"../input-NJP2wQOm.mjs";import{t as s}from"../label-CUCpwS5D.mjs";import{n as c,t as l}from"../alert-BbvPwf2x.mjs";import{Eye as u,EyeOff as d}from"lucide-react";import{useId as f,useState as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{z as g}from"zod";const _=g.object({email:g.string().min(1,`Vui lòng nhập email`).email(`Email không hợp lệ`),password:g.string().min(8,`Mật khẩu phải có ít nhất 8 ký tự`).max(50,`Mật khẩu không được vượt quá 50 ký tự`).regex(/[A-Z]/,`Phải có ít nhất một chữ hoa`).regex(/[a-z]/,`Phải có ít nhất một chữ thường`).regex(/[0-9]/,`Phải có ít nhất một chữ số`).regex(/[^A-Za-z0-9]/,`Phải có ít nhất một ký tự đặc biệt`),confirmPassword:g.string().min(1,`Vui lòng xác nhận mật khẩu`)}).refine(e=>e.password===e.confirmPassword,{message:`Mật khẩu xác nhận không khớp`,path:[`confirmPassword`]}),v=({open:g,onOpenChange:v,onRegister:y,onLogin:b,isLoading:x=!1,errorMessage:S,title:C=`Đăng ký`,subtitle:w=`Tạo tài khoản mới để bắt đầu`})=>{let T=f(),E=f(),D=f(),[O,k]=p(``),[A,j]=p(``),[M,N]=p(``),[P,F]=p(!1),[I,L]=p(!1),[R,z]=p({});return m(a,{open:g,onOpenChange:v,children:h(i,{className:`max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=closed]:zoom-out-100 max-sm:top-auto max-sm:right-0 max-sm:bottom-0 max-sm:left-0 max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none sm:max-w-sm`,children:[h(r,{children:[m(n,{children:C}),m(t,{children:w})]}),h(`form`,{onSubmit:async e=>{e.preventDefault();let t=_.safeParse({email:O,password:A,confirmPassword:M});if(!t.success){let e=t.error.flatten().fieldErrors;z({email:e.email?.[0],password:e.password?.[0],confirmPassword:e.confirmPassword?.[0]});return}z({}),await y(O,A)},noValidate:!0,className:`flex flex-col gap-4`,children:[S&&m(l,{variant:`destructive`,children:m(c,{children:S})}),h(`div`,{className:`flex flex-col gap-1.5`,children:[m(s,{htmlFor:T,children:`Email`}),m(o,{id:T,type:`email`,autoComplete:`email`,placeholder:`you@example.com`,value:O,onChange:e=>k(e.target.value),"aria-invalid":!!R.email,disabled:x}),R.email&&m(`p`,{className:`text-destructive text-xs`,children:R.email})]}),h(`div`,{className:`flex flex-col gap-1.5`,children:[m(s,{htmlFor:E,children:`Mật khẩu`}),h(`div`,{className:`relative`,children:[m(o,{id:E,type:P?`text`:`password`,autoComplete:`new-password`,placeholder:`••••••••`,value:A,onChange:e=>j(e.target.value),"aria-invalid":!!R.password,disabled:x,className:`pr-10`}),m(`button`,{type:`button`,className:`absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground`,onMouseDown:e=>{e.preventDefault(),F(e=>!e)},"aria-label":P?`Ẩn mật khẩu`:`Hiện mật khẩu`,children:m(P?d:u,{size:16})})]}),R.password?m(`p`,{className:`text-destructive text-xs`,children:R.password}):m(`p`,{className:`text-muted-foreground text-xs`,children:`Tối thiểu 8 ký tự, bao gồm chữ hoa, chữ thường, số và ký tự đặc biệt.`})]}),h(`div`,{className:`flex flex-col gap-1.5`,children:[m(s,{htmlFor:D,children:`Xác nhận mật khẩu`}),h(`div`,{className:`relative`,children:[m(o,{id:D,type:I?`text`:`password`,autoComplete:`new-password`,placeholder:`••••••••`,value:M,onChange:e=>N(e.target.value),"aria-invalid":!!R.confirmPassword,disabled:x,className:`pr-10`}),m(`button`,{type:`button`,className:`absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground`,onMouseDown:e=>{e.preventDefault(),L(e=>!e)},"aria-label":I?`Ẩn mật khẩu`:`Hiện mật khẩu`,children:m(I?d:u,{size:16})})]}),R.confirmPassword&&m(`p`,{className:`text-destructive text-xs`,children:R.confirmPassword})]}),m(e,{type:`submit`,isLoading:x,className:`w-full`,children:`Đăng ký`}),m(e,{type:`button`,variant:`outline`,className:`w-full`,disabled:x,onClick:()=>v(!1),children:`Đóng hộp thoại`})]}),b&&h(`div`,{className:`flex justify-center gap-1 text-muted-foreground text-sm`,children:[m(`span`,{children:`Đã có tài khoản?`}),m(e,{variant:`link`,size:`sm`,className:`h-auto p-0`,onClick:b,children:`Đăng nhập`})]})]})})};export{v as RegisterPage};
|
|
2
|
-
//# sourceMappingURL=RegisterPage.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RegisterPage.mjs","names":[],"sources":["../../packages/components/pages/RegisterPage.tsx"],"sourcesContent":["'use client';\n\nimport { useId, useState } from 'react';\n\nimport { Eye, EyeOff } from 'lucide-react';\nimport { z } from 'zod';\n\nimport { Alert, AlertDescription } from '../ui/alert';\nimport { Button } from '../ui/button';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '../ui/dialog';\nimport { Input } from '../ui/input';\nimport { Label } from '../ui/label';\n\nexport interface RegisterPageProps {\n /** Controls whether the dialog is open */\n open: boolean;\n /** Called when the dialog open state changes */\n onOpenChange: (open: boolean) => void;\n /** Called when the user submits registration credentials */\n onRegister: (email: string, password: string) => Promise<void> | void;\n /** Called when the \"Đăng nhập\" link is clicked */\n onLogin?: () => void;\n /** Disables the form and shows a spinner on the submit button */\n isLoading?: boolean;\n /** Server-side error message rendered in a destructive Alert */\n errorMessage?: string;\n /** Dialog heading. Default: \"Đăng ký\" */\n title?: string;\n /** Dialog subheading. Default: \"Tạo tài khoản mới để bắt đầu\" */\n subtitle?: string;\n}\n\nconst registerSchema = z\n .object({\n email: z.string().min(1, 'Vui lòng nhập email').email('Email không hợp lệ'),\n password: z\n .string()\n .min(8, 'Mật khẩu phải có ít nhất 8 ký tự')\n .max(50, 'Mật khẩu không được vượt quá 50 ký tự')\n .regex(/[A-Z]/, 'Phải có ít nhất một chữ hoa')\n .regex(/[a-z]/, 'Phải có ít nhất một chữ thường')\n .regex(/[0-9]/, 'Phải có ít nhất một chữ số')\n .regex(/[^A-Za-z0-9]/, 'Phải có ít nhất một ký tự đặc biệt'),\n confirmPassword: z.string().min(1, 'Vui lòng xác nhận mật khẩu'),\n })\n .refine(data => data.password === data.confirmPassword, {\n message: 'Mật khẩu xác nhận không khớp',\n path: ['confirmPassword'],\n });\n\n/**\n * Modal registration dialog for the client authentication flow.\n *\n * @example\n * ```tsx\n * import { RegisterPage } from '@customafk/lunas-ui/pages/RegisterPage';\n *\n * <RegisterPage\n * open={open}\n * onOpenChange={setOpen}\n * onRegister={async (email, password) => {\n * await authService.register(email, password);\n * setOpen(false);\n * }}\n * onLogin={() => { setOpen(false); setLoginOpen(true); }}\n * />\n * ```\n */\nexport const RegisterPage = ({\n open,\n onOpenChange,\n onRegister,\n onLogin,\n isLoading = false,\n errorMessage,\n title = 'Đăng ký',\n subtitle = 'Tạo tài khoản mới để bắt đầu',\n}: RegisterPageProps) => {\n const emailId = useId();\n const passwordId = useId();\n const confirmPasswordId = useId();\n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n const [confirmPassword, setConfirmPassword] = useState('');\n const [showPassword, setShowPassword] = useState(false);\n const [showConfirmPassword, setShowConfirmPassword] = useState(false);\n const [fieldErrors, setFieldErrors] = useState<{\n email?: string;\n password?: string;\n confirmPassword?: string;\n }>({});\n\n const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n const result = registerSchema.safeParse({ email, password, confirmPassword });\n if (!result.success) {\n const errors = result.error.flatten().fieldErrors;\n setFieldErrors({\n email: errors.email?.[0],\n password: errors.password?.[0],\n confirmPassword: errors.confirmPassword?.[0],\n });\n return;\n }\n setFieldErrors({});\n await onRegister(email, password);\n };\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className=\"max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=closed]:zoom-out-100 max-sm:top-auto max-sm:right-0 max-sm:bottom-0 max-sm:left-0 max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none sm:max-w-sm\">\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{subtitle}</DialogDescription>\n </DialogHeader>\n\n <form onSubmit={handleSubmit} noValidate className=\"flex flex-col gap-4\">\n {errorMessage && (\n <Alert variant=\"destructive\">\n <AlertDescription>{errorMessage}</AlertDescription>\n </Alert>\n )}\n\n <div className=\"flex flex-col gap-1.5\">\n <Label htmlFor={emailId}>Email</Label>\n <Input\n id={emailId}\n type=\"email\"\n autoComplete=\"email\"\n placeholder=\"you@example.com\"\n value={email}\n onChange={e => setEmail(e.target.value)}\n aria-invalid={!!fieldErrors.email}\n disabled={isLoading}\n />\n {fieldErrors.email && <p className=\"text-destructive text-xs\">{fieldErrors.email}</p>}\n </div>\n\n <div className=\"flex flex-col gap-1.5\">\n <Label htmlFor={passwordId}>Mật khẩu</Label>\n <div className=\"relative\">\n <Input\n id={passwordId}\n type={showPassword ? 'text' : 'password'}\n autoComplete=\"new-password\"\n placeholder=\"••••••••\"\n value={password}\n onChange={e => setPassword(e.target.value)}\n aria-invalid={!!fieldErrors.password}\n disabled={isLoading}\n className=\"pr-10\"\n />\n <button\n type=\"button\"\n className=\"absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground\"\n onMouseDown={e => {\n e.preventDefault();\n setShowPassword(v => !v);\n }}\n aria-label={showPassword ? 'Ẩn mật khẩu' : 'Hiện mật khẩu'}\n >\n {showPassword ? <EyeOff size={16} /> : <Eye size={16} />}\n </button>\n </div>\n {fieldErrors.password ? (\n <p className=\"text-destructive text-xs\">{fieldErrors.password}</p>\n ) : (\n <p className=\"text-muted-foreground text-xs\">Tối thiểu 8 ký tự, bao gồm chữ hoa, chữ thường, số và ký tự đặc biệt.</p>\n )}\n </div>\n\n <div className=\"flex flex-col gap-1.5\">\n <Label htmlFor={confirmPasswordId}>Xác nhận mật khẩu</Label>\n <div className=\"relative\">\n <Input\n id={confirmPasswordId}\n type={showConfirmPassword ? 'text' : 'password'}\n autoComplete=\"new-password\"\n placeholder=\"••••••••\"\n value={confirmPassword}\n onChange={e => setConfirmPassword(e.target.value)}\n aria-invalid={!!fieldErrors.confirmPassword}\n disabled={isLoading}\n className=\"pr-10\"\n />\n <button\n type=\"button\"\n className=\"absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground\"\n onMouseDown={e => {\n e.preventDefault();\n setShowConfirmPassword(v => !v);\n }}\n aria-label={showConfirmPassword ? 'Ẩn mật khẩu' : 'Hiện mật khẩu'}\n >\n {showConfirmPassword ? <EyeOff size={16} /> : <Eye size={16} />}\n </button>\n </div>\n {fieldErrors.confirmPassword && <p className=\"text-destructive text-xs\">{fieldErrors.confirmPassword}</p>}\n </div>\n\n <Button type=\"submit\" isLoading={isLoading} className=\"w-full\">\n Đăng ký\n </Button>\n <Button type=\"button\" variant=\"outline\" className=\"w-full\" disabled={isLoading} onClick={() => onOpenChange(false)}>\n Đóng hộp thoại\n </Button>\n </form>\n\n {onLogin && (\n <div className=\"flex justify-center gap-1 text-muted-foreground text-sm\">\n <span>Đã có tài khoản?</span>\n <Button variant=\"link\" size=\"sm\" className=\"h-auto p-0\" onClick={onLogin}>\n Đăng nhập\n </Button>\n </div>\n )}\n </DialogContent>\n </Dialog>\n );\n};\n"],"mappings":"ijBAgCA,MAAM,EAAiB,EACpB,OAAO,CACN,MAAO,EAAE,QAAQ,CAAC,IAAI,EAAG,sBAAsB,CAAC,MAAM,qBAAqB,CAC3E,SAAU,EACP,QAAQ,CACR,IAAI,EAAG,mCAAmC,CAC1C,IAAI,GAAI,wCAAwC,CAChD,MAAM,QAAS,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OAAO,MAAM,CACjD,eAAc,CAAC,CAAC,EAAY,gBAC5B,SAAU,EACV,UAAU,SACV,CACF,EAAC,SAAA,CACC,KAAK,SACL,UAAU,gGACV,YAAa,GAAK,CAChB,EAAE,gBAAgB,CAClB,EAAuB,GAAK,CAAC,EAAE,EAEjC,aAAY,EAAsB,cAAgB,yBAE3B,EAAtB,EAAuB,EAAuB,EAAvB,CAAO,KAAM,GAAA,CAA0B,EACxD,CAAA,EACL,CACL,EAAY,iBAAmB,EAAC,IAAA,CAAE,UAAU,oCAA4B,EAAY,iBAAoB,GACrG,CAEN,EAAC,EAAA,CAAO,KAAK,SAAoB,YAAW,UAAU,kBAAS,WAEtD,CACT,EAAC,EAAA,CAAO,KAAK,SAAS,QAAQ,UAAU,UAAU,SAAS,SAAU,EAAW,YAAe,EAAa,GAAM,UAAE,kBAE3G,GACJ,CAEN,GACC,EAAC,MAAA,CAAI,UAAU,oEACb,EAAC,OAAA,CAAA,SAAK,mBAAA,CAAuB,CAC7B,EAAC,EAAA,CAAO,QAAQ,OAAO,KAAK,KAAK,UAAU,aAAa,QAAS,WAAS,aAEjE,CAAA,EACL,GAEM,EACT"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";import"../button.variants-DkMqWB8G.mjs";import{t as e}from"../button-CCVJTHBI.mjs";import"../heading-De4Pn3mZ.mjs";import"../paragraph-DYLaQtTV.mjs";import"../close-_UHFeiLS.mjs";import{i as t,l as n,o as r,r as i,t as a}from"../dialog-CLDnvNH_.mjs";import{n as o,t as s}from"../alert-BbvPwf2x.mjs";import{InputOTP as c,InputOTPGroup as l,InputOTPSeparator as u,InputOTPSlot as d}from"../ui/input-otp.mjs";import{useCallback as f,useEffect as p,useRef as m,useState as h}from"react";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";const y=({open:y,onOpenChange:b,email:x,onVerify:S,onResend:C,onBack:w,isLoading:T=!1,errorMessage:E,title:D=`Xác thực email`,subtitle:O,resendCooldownSeconds:k=60})=>{let[A,j]=h(``),[M,N]=h(k),P=m(null),F=f(e=>{P.current&&clearInterval(P.current),N(e),P.current=setInterval(()=>{N(e=>e<=1?(P.current&&clearInterval(P.current),0):e-1)},1e3)},[]);p(()=>(y&&k>0&&F(k),()=>{P.current&&clearInterval(P.current)}),[y,k,F]);let I=f(async()=>{F(k),await C(x)},[x,C,k,F]),L=f(async()=>{A.length<6||await S(x,A)},[x,A,S]);return _(a,{open:y,onOpenChange:b,children:v(i,{className:`max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=closed]:zoom-out-100 max-sm:top-auto max-sm:right-0 max-sm:bottom-0 max-sm:left-0 max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none sm:max-w-sm`,children:[v(r,{children:[_(n,{children:D}),_(t,{children:O??v(g,{children:[`Nhập mã OTP đã được gửi tới `,_(`span`,{className:`font-medium text-foreground`,children:x}),`. Mã có hiệu lực trong 10 phút.`]})})]}),v(`div`,{className:`flex flex-col items-center gap-4`,children:[E&&_(s,{variant:`destructive`,className:`w-full`,children:_(o,{children:E})}),v(c,{maxLength:6,value:A,onChange:j,onComplete:L,disabled:T,children:[v(l,{children:[_(d,{index:0}),_(d,{index:1}),_(d,{index:2})]}),_(u,{}),v(l,{children:[_(d,{index:3}),_(d,{index:4}),_(d,{index:5})]})]}),_(e,{type:`button`,isLoading:T,disabled:A.length<6,className:`w-full`,onClick:L,children:`Xác thực`}),v(`div`,{className:`flex items-center gap-1 text-muted-foreground text-sm`,children:[_(`span`,{children:`Chưa nhận được mã?`}),_(e,{variant:`link`,size:`sm`,className:`h-auto p-0`,disabled:M>0||T,onClick:I,children:M>0?`Gửi lại (${M}s)`:`Gửi lại`})]}),w&&_(e,{variant:`ghost`,size:`sm`,className:`w-full`,onClick:w,children:`Quay lại`})]})]})})};export{y as VerifyEmailPage};
|
|
2
|
-
//# sourceMappingURL=VerifyEmailPage.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyEmailPage.mjs","names":[],"sources":["../../packages/components/pages/VerifyEmailPage.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { Alert, AlertDescription } from '../ui/alert';\nimport { Button } from '../ui/button';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '../ui/dialog';\nimport { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from '../ui/input-otp';\n\nexport interface VerifyEmailPageProps {\n /** Controls whether the dialog is open */\n open: boolean;\n /** Called when the dialog open state changes */\n onOpenChange: (open: boolean) => void;\n /** The email address the OTP was dispatched to — displayed as context and passed to callbacks */\n email: string;\n /** Called when the user submits the OTP code */\n onVerify: (email: string, otp: string) => Promise<void> | void;\n /** Called when the user requests a new OTP; triggers a fresh cooldown */\n onResend: (email: string) => Promise<void> | void;\n /** Called when the back link is clicked */\n onBack?: () => void;\n /** Disables the form and shows a spinner on the submit button */\n isLoading?: boolean;\n /** Server-side error message rendered in a destructive Alert */\n errorMessage?: string;\n /** Dialog heading. Default: \"Xác thực email\" */\n title?: string;\n /** Dialog subheading. Default: built from the email prop */\n subtitle?: string;\n /** Seconds before the resend button becomes available. Default: 60 */\n resendCooldownSeconds?: number;\n}\n\n/**\n * Modal email OTP verification dialog for the client authentication flow.\n *\n * @example\n * ```tsx\n * import { VerifyEmailPage } from '@customafk/lunas-ui/pages/VerifyEmailPage';\n *\n * <VerifyEmailPage\n * open={open}\n * onOpenChange={setOpen}\n * email=\"user@example.com\"\n * onVerify={async (email, otp) => {\n * await authService.verifyEmail(email, otp);\n * setOpen(false);\n * }}\n * onResend={async (email) => {\n * await authService.resendVerification(email);\n * }}\n * />\n * ```\n */\nexport const VerifyEmailPage = ({\n open,\n onOpenChange,\n email,\n onVerify,\n onResend,\n onBack,\n isLoading = false,\n errorMessage,\n title = 'Xác thực email',\n subtitle,\n resendCooldownSeconds = 60,\n}: VerifyEmailPageProps) => {\n const [otp, setOtp] = useState('');\n const [countdown, setCountdown] = useState(resendCooldownSeconds);\n const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null);\n\n const startCountdown = useCallback((seconds: number) => {\n if (intervalRef.current) clearInterval(intervalRef.current);\n setCountdown(seconds);\n intervalRef.current = setInterval(() => {\n setCountdown(prev => {\n if (prev <= 1) {\n if (intervalRef.current) clearInterval(intervalRef.current);\n return 0;\n }\n return prev - 1;\n });\n }, 1000);\n }, []);\n\n useEffect(() => {\n if (open && resendCooldownSeconds > 0) startCountdown(resendCooldownSeconds);\n return () => {\n if (intervalRef.current) clearInterval(intervalRef.current);\n };\n }, [open, resendCooldownSeconds, startCountdown]);\n\n const handleResend = useCallback(async () => {\n startCountdown(resendCooldownSeconds);\n await onResend(email);\n }, [email, onResend, resendCooldownSeconds, startCountdown]);\n\n const handleVerify = useCallback(async () => {\n if (otp.length < 6) return;\n await onVerify(email, otp);\n }, [email, otp, onVerify]);\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className=\"max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=closed]:zoom-out-100 max-sm:top-auto max-sm:right-0 max-sm:bottom-0 max-sm:left-0 max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none sm:max-w-sm\">\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>\n {subtitle ?? (\n <>\n Nhập mã OTP đã được gửi tới <span className=\"font-medium text-foreground\">{email}</span>. Mã có hiệu lực trong 10 phút.\n </>\n )}\n </DialogDescription>\n </DialogHeader>\n\n <div className=\"flex flex-col items-center gap-4\">\n {errorMessage && (\n <Alert variant=\"destructive\" className=\"w-full\">\n <AlertDescription>{errorMessage}</AlertDescription>\n </Alert>\n )}\n\n <InputOTP maxLength={6} value={otp} onChange={setOtp} onComplete={handleVerify} disabled={isLoading}>\n <InputOTPGroup>\n <InputOTPSlot index={0} />\n <InputOTPSlot index={1} />\n <InputOTPSlot index={2} />\n </InputOTPGroup>\n <InputOTPSeparator />\n <InputOTPGroup>\n <InputOTPSlot index={3} />\n <InputOTPSlot index={4} />\n <InputOTPSlot index={5} />\n </InputOTPGroup>\n </InputOTP>\n\n <Button type=\"button\" isLoading={isLoading} disabled={otp.length < 6} className=\"w-full\" onClick={handleVerify}>\n Xác thực\n </Button>\n\n <div className=\"flex items-center gap-1 text-muted-foreground text-sm\">\n <span>Chưa nhận được mã?</span>\n <Button variant=\"link\" size=\"sm\" className=\"h-auto p-0\" disabled={countdown > 0 || isLoading} onClick={handleResend}>\n {countdown > 0 ? `Gửi lại (${countdown}s)` : 'Gửi lại'}\n </Button>\n </div>\n\n {onBack && (\n <Button variant=\"ghost\" size=\"sm\" className=\"w-full\" onClick={onBack}>\n Quay lại\n </Button>\n )}\n </div>\n </DialogContent>\n </Dialog>\n );\n};\n"],"mappings":"gjBAuDA,MAAa,GAAmB,CAC9B,OACA,eACA,QACA,WACA,WACA,SACA,YAAY,GACZ,eACA,QAAQ,iBACR,WACA,wBAAwB,MACE,CAC1B,GAAM,CAAC,EAAK,GAAU,EAAS,GAAG,CAC5B,CAAC,EAAW,GAAgB,EAAS,EAAsB,CAC3D,EAAc,EAA8C,KAAK,CAEjE,EAAiB,EAAa,GAAoB,CAClD,EAAY,SAAS,cAAc,EAAY,QAAQ,CAC3D,EAAa,EAAQ,CACrB,EAAY,QAAU,gBAAkB,CACtC,EAAa,GACP,GAAQ,GACN,EAAY,SAAS,cAAc,EAAY,QAAQ,CACpD,GAEF,EAAO,EACd,EACD,IAAK,EACP,EAAE,CAAC,CAEN,OACM,GAAQ,EAAwB,GAAG,EAAe,EAAsB,KAC/D,CACP,EAAY,SAAS,cAAc,EAAY,QAAQ,GAE5D,CAAC,EAAM,EAAuB,EAAe,CAAC,CAEjD,IAAM,EAAe,EAAY,SAAY,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,CAC/B,EAAC,EAAA,CAAO,QAAQ,OAAO,KAAK,KAAK,UAAU,aAAa,SAAU,EAAY,GAAK,EAAW,QAAS,WACpG,EAAY,EAAI,YAAY,EAAU,IAAM,WACtC,CAAA,EACL,CAEL,GACC,EAAC,EAAA,CAAO,QAAQ,QAAQ,KAAK,KAAK,UAAU,SAAS,QAAS,WAAQ,YAE7D,GAEP,CAAA,EACQ,EACT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paragraph-DYLaQtTV.mjs","names":[],"sources":["../packages/components/typography/paragraph.tsx"],"sourcesContent":["'use client';\n\nimport type { ComponentPropsWithoutRef } from 'react';\nimport { cn } from '@customafk/react-toolkit/utils';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nexport const paragraphVariants = cva('not-first:mt-3 max-w-prose whitespace-pre-line text-pretty text-start leading-7 transition-colors', {\n variants: {\n variant: {\n lead: 'text-base leading-8 font-medium text-text-positive-strong md:text-lg',\n lg: 'text-base leading-8 font-normal text-text-positive md:text-lg',\n p: 'text-sm font-normal text-text-positive md:text-base',\n sm: 'text-sm leading-6 font-normal text-text-positive',\n muted: 'text-sm font-normal text-text-positive-weak md:text-base',\n xs: 'text-xs leading-5 font-normal text-text-positive-weak',\n },\n },\n defaultVariants: {\n variant: 'p',\n },\n});\n\n/**\n * Props for the {@link Paragraph} component.\n *\n * Extends all native `<p>` HTML attributes plus the CVA variant.\n *\n * @property variant - Visual style variant.\n * - `'lead'` — large, medium-weight introductory text (default size `text-base` / `md:text-lg`)\n * - `'lg'` — large normal-weight text\n * - `'p'` — standard body text (default)\n * - `'sm'` — small normal-weight text with tighter leading\n * - `'muted'` — subdued colour, standard body size\n * - `'xs'` — extra-small text in a muted colour\n */\nexport type ParagraphProps = ComponentPropsWithoutRef<'p'> & VariantProps<typeof paragraphVariants>;\n\n/**\n * A styled `<p>` element with semantic size and weight variants for body text.\n *\n * @example\n * ```tsx\n * import { Paragraph } from '@customafk/lunas-ui/typography/paragraph';\n *\n * // Default body paragraph\n * <Paragraph>This is body text.</Paragraph>\n *\n * // Lead paragraph with larger, medium-weight text\n * <Paragraph variant=\"lead\">Introducing our new feature.</Paragraph>\n *\n * // Muted helper text\n * <Paragraph variant=\"muted\">Last updated 3 days ago.</Paragraph>\n * ```\n */\nexport const Paragraph = ({ variant, className, ...props }: ParagraphProps) => {\n return <p data-slot=\"paragraph\" className={cn(paragraphVariants({ variant }), className)} {...props} />;\n};\n"],"mappings":"2IAMA,MAAa,EAAoB,EAAI,oGAAqG,CACxI,SAAU,CACR,QAAS,CACP,KAAM,uEACN,GAAI,gEACJ,EAAG,sDACH,GAAI,mDACJ,MAAO,2DACP,GAAI,wDACL,CACF,CACD,gBAAiB,CACf,QAAS,IACV,CACF,CAAC,CAkCW,GAAa,CAAE,UAAS,YAAW,GAAG,KAC1C,EAAC,IAAA,CAAE,YAAU,YAAY,UAAW,EAAG,EAAkB,CAAE,UAAS,CAAC,CAAE,EAAU,CAAE,GAAI,GAAS"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./dist-DVrfqn8H.mjs";import{t}from"./button-CCVJTHBI.mjs";import{t as n}from"./paragraph-DYLaQtTV.mjs";import{t as r}from"./flex-B6YSJzGe.mjs";import{i,n as a,r as o,t as s}from"./tooltip-Dxl5Wa8i.mjs";import{n as c,t as l}from"./avatar-fltdRVsJ.mjs";import{i as u,o as d,r as f,s as p,t as m}from"./sheet-BFlIfNaA.mjs";import{a as h,h as g,i as _,o as v,r as y,t as b,u as x}from"./dropdown-menu-BWhiVsEf.mjs";import{LogOutIcon as S,MenuIcon as C,ShoppingCartIcon as w,UserRoundIcon as T}from"lucide-react";import{createContext as E,useCallback as D,useContext as O,useEffect as k,useMemo as A,useState as j}from"react";import{cn as M}from"@customafk/react-toolkit/utils";import{cva as N}from"class-variance-authority";import{jsx as P,jsxs as F}from"react/jsx-runtime";import{colorHashLight as I}from"@customafk/react-toolkit/color-hash";import{useIsMobile as L}from"@customafk/react-toolkit/hooks/useMobile";const R=E(null);function z(){let e=O(R);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function B({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...s}){let c=L(),[l,u]=j(!1),[d,f]=j(e),p=t??d,m=D(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,p]),h=D(()=>c?u(e=>!e):m(e=>!e),[c,m]);k(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h]);let g=p?`expanded`:`collapsed`,_=A(()=>({state:g,open:p,setOpen:m,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:h}),[g,p,m,c,l,h]);return P(R.Provider,{value:_,children:P(o,{delayDuration:0,children:P(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...i},className:M(`group/sidebar-wrapper flex h-dvh w-full`,r),...s,children:a})})})}function V({side:e=`left`,variant:n=`sidebar`,collapsible:r=`offcanvas`,className:i,children:a,...o}){let{isMobile:s,state:c,openMobile:l,setOpenMobile:h,toggleSidebar:g}=z();return r===`none`?P(`aside`,{"data-slot":`sidebar`,className:M(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,i),...o,children:a}):s?P(m,{open:l,onOpenChange:h,...o,children:F(f,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`18rem`},side:e,children:[F(d,{className:`sr-only`,children:[P(p,{children:`Sidebar`}),P(u,{children:`Displays the mobile sidebar.`})]}),F(`div`,{className:`flex size-full flex-col`,children:[F(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[F(t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:M(`size-10 rounded-full`,i),onClick:e=>{g(),e.preventDefault(),e.stopPropagation()},children:[P(C,{className:`size-6!`}),P(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),P(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:P(w,{size:20})}),F(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[P(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),P(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),P(`div`,{className:`flex flex-1 flex-col p-2`,children:a})]})]})}):F(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":c,"data-collapsible":c===`collapsed`?r:``,"data-variant":n,"data-side":e,"data-slot":`sidebar`,children:[P(`div`,{"data-slot":`sidebar-gap`,className:M(`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`,n===`floating`||n===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),P(`div`,{"data-slot":`sidebar-container`,className:M(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-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)]`,n===`floating`||n===`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`,i),...o,children:P(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:M(`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:a})})]})}function H({className:e,children:t,...n}){return F(`main`,{"data-slot":`sidebar-inset`,className:M(`relative flex w-full flex-1 flex-col`,e),...n,children:[P(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),P(`div`,{className:`inset-shadow-sm flex-1`,children:t})]})}function U({className:e,...t}){return P(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:M(`flex flex-col gap-2 p-2`,e),...t})}function W({className:e,...t}){return P(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:M(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function G({className:e,...t}){return P(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:M(`relative flex w-full min-w-0 flex-col`,e),...t})}function K({className:t,asChild:n=!1,...r}){return P(n?e:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:M(`flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,t),...r})}function q({className:e,...t}){return P(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:M(`w-full text-sm`,e),...t})}function J({className:e,...t}){return P(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:M(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function Y({className:e,...t}){return P(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:M(`group/menu-item relative`,e),...t})}const X=N([`peer/menu-button`,`cursor-pointer`,`flex w-full items-center gap-2`,`overflow-hidden rounded-md p-2 outline-hidden`,`truncate text-left font-normal`,`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]:text-sidebar-primary`,`data-[state=open]:hover:bg-sidebar-accent`,`data-[state=open]:hover:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:size-12!`,`group-data-[collapsible=icon]:p-3!`,`group-data-[collapsible=icon]:gap-3!`,`[&>svg]:size-6`,`[&>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-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Z({asChild:t=!1,isActive:n=!1,variant:r=`default`,size:o=`default`,tooltip:c,className:l,...u}){let d=t?e:`button`,{isMobile:f,state:p}=z(),m=P(d,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":o,"data-active":n,className:M(X({variant:r,size:o}),l),...u});return c?(typeof c==`string`&&(c={children:c}),F(s,{children:[P(i,{asChild:!0,children:m}),P(a,{side:`right`,align:`center`,hidden:p!==`collapsed`||f,...c})]})):m}const Q=({uuid:e,username:t,email:i})=>F(r,{"data-slot":`user-display`,wrap:!1,gap:`sm`,padding:`none`,children:[P(l,{className:`size-9 shadow-card`,children:P(c,{style:{backgroundColor:I.hex(e)},children:P(T,{size:28,className:`text-white`})})}),F(r,{vertical:!0,padding:`none`,gap:`none`,align:`start`,className:`hidden sm:flex`,children:[P(n,{className:`text-sm font-medium text-text-positive`,children:t}),P(n,{variant:`sm`,className:`mt-0! text-xs text-text-positive-weak`,children:i})]})]}),$=({user:e,isLogin:n=!0,onLogin:r,onLogout:i})=>{let{toggleSidebar:a}=z(),o=D(e=>{e.preventDefault(),e.stopPropagation(),a()},[a]),s=D(e=>{e.preventDefault(),e.stopPropagation(),i?.()},[i]),c=D(e=>{e.preventDefault(),e.stopPropagation(),r?.()},[r]);return F(`header`,{"data-slot":`payment-layout-header`,className:M(`bg-card`,`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-2.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[n&&F(t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:`hidden size-10 rounded-full transition-all hover:text-text-positive md:flex`,onClick:o,children:[P(C,{className:`size-6!`}),P(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),F(`div`,{className:`flex flex-1 gap-x-2 sm:ml-2.5`,children:[P(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:P(w,{size:20})}),F(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[P(`span`,{className:`truncate font-medium`,children:`Lunas Payment`}),P(`span`,{className:`truncate text-xs`,children:`Quản lý đơn hàng`})]})]}),e?F(b,{children:[P(g,{asChild:!0,children:P(t,{variant:`ghost`,color:`muted`,className:`gap-x-2 rounded-full px-2 transition-all hover:text-text-positive`,children:P(Q,{uuid:e?.uuid??``,username:e.fullname,email:e.email})})}),F(y,{align:`end`,className:`w-56`,children:[F(v,{className:`font-normal`,children:[P(`p`,{className:`font-medium`,children:e.fullname}),P(`p`,{className:`text-muted-foreground text-xs`,children:e.email})]}),P(x,{}),P(_,{children:F(h,{onClick:s,children:[P(S,{size:14}),`Đăng xuất`]})})]})]}):P(t,{size:`sm`,onClick:c,children:`Đăng nhập`})]})},ee=({items:e,activeNavItemId:t})=>{let{isMobile:n}=z();if(!n||e.length===0)return null;let r=e.slice(0,5);return P(`nav`,{"data-slot":`mobile-bottom-nav`,className:`fixed inset-x-0 bottom-0 z-20 flex h-16 items-stretch border-border border-t bg-card md:hidden`,children:r.map(e=>F(`button`,{type:`button`,onClick:e.onClick,"data-active":e.id===t,className:M(`flex flex-1 flex-col items-center justify-center gap-0.5`,`text-muted-foreground transition-colors`,`data-[active=true]:text-sidebar-primary`,`[&>svg]:size-5 [&>svg]:shrink-0`),children:[e.icon,P(`span`,{className:`max-w-16 truncate text-[10px] leading-3`,children:e.label})]},e.id))})},te=({activeNavItemId:e,sidebar:t,user:n,isLogin:r=!0,onLogin:i,onLogout:a,children:o})=>{let s=A(()=>t?.groupcontent||[],[t]),c=A(()=>s.flatMap(e=>e.items),[s]);return F(B,{children:[P($,{user:n,isLogin:r,onLogin:i,onLogout:a}),r&&F(V,{variant:`inset`,collapsible:`icon`,children:[P(W,{children:s.map(t=>F(G,{children:[P(K,{children:t.label}),P(q,{children:P(J,{children:t.items.map(t=>P(Y,{children:F(Z,{isActive:t.id===e,onClick:e=>{t.onClick?.(),e.preventDefault(),e.stopPropagation()},children:[t.icon,t.label]})},t.id))})})]},t.id))}),P(U,{children:P(J,{children:P(Y,{className:`mt-2 border-t border-t-border`,children:P(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})})})]}),P(H,{children:P(`section`,{className:`relative size-full`,children:P(`div`,{className:M(`absolute inset-0 overflow-y-auto`,r&&`pb-16 md:pb-0`),children:o})})}),r&&P(ee,{items:c,activeNavItemId:e})]})};export{te as t};
|
|
2
|
-
//# sourceMappingURL=payment-layout-DrQ0kZPX.mjs.map
|