@customafk/lunas-ui 0.2.38 → 0.2.40
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-C-bk-pne.d.mts → alert-BztgYPpW.d.cts} +6 -6
- package/dist/{alert-DDxGzOzi.d.cts → alert-DFvMshuq.d.ts} +6 -6
- package/dist/{avatar-fltdRVsJ.mjs → avatar-Hpj8lmux.js} +1 -1
- package/dist/avatar-Hpj8lmux.js.map +1 -0
- package/dist/{badge-IUtmECjN.d.cts → badge-BvKBYsIh.d.ts} +6 -6
- package/dist/{badge-CDGBGq8X.mjs → badge-CRpRXSuO.js} +1 -1
- package/dist/badge-CRpRXSuO.js.map +1 -0
- package/dist/{badge-lvr8nB_0.d.mts → badge-Y-DJHIVI.d.cts} +6 -6
- package/dist/{button-DhDRMeFA.d.mts → button-CRSezlCi.d.cts} +6 -6
- package/dist/{button-Brw-tmr9.d.cts → button-DloFFxkz.d.ts} +5 -5
- 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-BXkm3_Bk.d.ts} +12 -12
- package/dist/dialog-CmutQ3rp.js +2 -0
- package/dist/dialog-CmutQ3rp.js.map +1 -0
- package/dist/{dialog-D0zfwr8i.d.cts → dialog-DAl7wicp.d.cts} +12 -12
- 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} +4 -4
- 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-CG8iS6qj.d.cts → index-0jdHH3H_.d.ts} +7 -7
- package/dist/{index-BuNzvvj3.d.mts → index-B3NschgB.d.ts} +31 -31
- package/dist/{index-9eog5ilY.d.cts → index-BX_ZHO1J.d.cts} +30 -30
- package/dist/{index-Cm62M0Ft.d.mts → index-BlQGXGqt.d.ts} +1 -1
- package/dist/{index-SMYnpHIM.d.mts → index-DSciiDhn.d.cts} +332 -332
- package/dist/{index-DsD83ZN8.d.cts → index-DZVn4x4Q.d.ts} +332 -332
- package/dist/{index-DI8qmezw.d.mts → index-FIl1Am8j.d.cts} +6 -6
- 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-BFtFMzRG.d.mts → input-BBxY18n7.d.ts} +4 -4
- package/dist/{input-DvkEND5a.d.cts → input-D59Pfu7U.d.cts} +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} +5 -5
- 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 +2 -2
- 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 +97 -97
- 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,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react50 from "react";
|
|
2
2
|
import { Dialog } from "radix-ui";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/dialog.d.ts
|
|
@@ -33,24 +33,24 @@ import { Dialog } from "radix-ui";
|
|
|
33
33
|
*/
|
|
34
34
|
declare function Dialog$1({
|
|
35
35
|
...props
|
|
36
|
-
}: React.ComponentProps<typeof Dialog.Root>):
|
|
36
|
+
}: React.ComponentProps<typeof Dialog.Root>): react50.JSX.Element;
|
|
37
37
|
/** Element that opens the dialog when clicked; typically wrapped with `asChild` around a `Button`. */
|
|
38
38
|
declare function DialogTrigger({
|
|
39
39
|
...props
|
|
40
|
-
}: React.ComponentProps<typeof Dialog.Trigger>):
|
|
40
|
+
}: React.ComponentProps<typeof Dialog.Trigger>): react50.JSX.Element;
|
|
41
41
|
/** Renders dialog overlay and content into a portal outside the normal React tree. */
|
|
42
42
|
declare function DialogPortal({
|
|
43
43
|
...props
|
|
44
|
-
}: React.ComponentProps<typeof Dialog.Portal>):
|
|
44
|
+
}: React.ComponentProps<typeof Dialog.Portal>): react50.JSX.Element;
|
|
45
45
|
/** Button that closes the dialog; can be composed with `asChild` to use a custom element. */
|
|
46
46
|
declare function DialogClose({
|
|
47
47
|
...props
|
|
48
|
-
}: React.ComponentProps<typeof Dialog.Close>):
|
|
48
|
+
}: React.ComponentProps<typeof Dialog.Close>): react50.JSX.Element;
|
|
49
49
|
/** Semi-transparent backdrop rendered behind the dialog panel with fade-in/out animation. */
|
|
50
50
|
declare function DialogOverlay({
|
|
51
51
|
className,
|
|
52
52
|
...props
|
|
53
|
-
}: React.ComponentProps<typeof Dialog.Overlay>):
|
|
53
|
+
}: React.ComponentProps<typeof Dialog.Overlay>): react50.JSX.Element;
|
|
54
54
|
/**
|
|
55
55
|
* Animated dialog panel centred on screen; includes `DialogOverlay` and an optional close button.
|
|
56
56
|
*
|
|
@@ -64,27 +64,27 @@ declare function DialogContent({
|
|
|
64
64
|
}: React.ComponentProps<typeof Dialog.Content> & {
|
|
65
65
|
/** When `true` (default), renders an `×` close button fixed to the top-right corner of the panel. */
|
|
66
66
|
showCloseButton?: boolean;
|
|
67
|
-
}):
|
|
67
|
+
}): react50.JSX.Element;
|
|
68
68
|
/** Layout wrapper for the dialog title and description, stacked vertically with left alignment on wider screens. */
|
|
69
69
|
declare function DialogHeader({
|
|
70
70
|
className,
|
|
71
71
|
...props
|
|
72
|
-
}: React.ComponentProps<'div'>):
|
|
72
|
+
}: React.ComponentProps<'div'>): react50.JSX.Element;
|
|
73
73
|
/** Layout wrapper for dialog action buttons, stacked on mobile and right-aligned in a row on wider screens. */
|
|
74
74
|
declare function DialogFooter({
|
|
75
75
|
className,
|
|
76
76
|
...props
|
|
77
|
-
}: React.ComponentProps<'div'>):
|
|
77
|
+
}: React.ComponentProps<'div'>): react50.JSX.Element;
|
|
78
78
|
/** Accessible heading for the dialog panel, styled with the h3 heading variant and announced by screen readers. */
|
|
79
79
|
declare function DialogTitle({
|
|
80
80
|
className,
|
|
81
81
|
...props
|
|
82
|
-
}: React.ComponentProps<typeof Dialog.Title>):
|
|
82
|
+
}: React.ComponentProps<typeof Dialog.Title>): react50.JSX.Element;
|
|
83
83
|
/** Muted supporting text that describes the dialog's purpose; read by screen readers alongside the title. */
|
|
84
84
|
declare function DialogDescription({
|
|
85
85
|
className,
|
|
86
86
|
...props
|
|
87
|
-
}: React.ComponentProps<typeof Dialog.Description>):
|
|
87
|
+
}: React.ComponentProps<typeof Dialog.Description>): react50.JSX.Element;
|
|
88
88
|
//#endregion
|
|
89
89
|
export { DialogFooter as a, DialogPortal as c, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog$1 as t, DialogTrigger as u };
|
|
90
|
-
//# sourceMappingURL=dialog-
|
|
90
|
+
//# sourceMappingURL=dialog-DAl7wicp.d.cts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import"../button.variants-CoSpd71B.js";import"../heading-Bz-hSatD.js";import"../paragraph-Cc13ZI4d.js";import{AlertDialog as e,AlertDialogAction as t,AlertDialogCancel as n,AlertDialogContent as r,AlertDialogDescription as i,AlertDialogFooter as a,AlertDialogHeader as o,AlertDialogTitle as s}from"../ui/alert-dialog.js";import{TriangleAlert as c}from"lucide-react";import{useCallback as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";const f=({open:f,isLoading:p=!1,title:m,description:h,cancelText:g=`Cancel`,submitText:_=`Confirm`,descriptionClassName:v,onOpenChange:y,onConfirm:b})=>{let x=l(e=>{e.preventDefault(),e.stopPropagation(),b?.()},[b]);return u(e,{open:f,onOpenChange:y,children:d(r,{className:`p-4 pb-5`,children:[d(o,{className:`gap-2`,children:[d(s,{className:`inline-flex items-center gap-x-1`,children:[u(c,{size:20}),u(`p`,{children:m})]}),u(i,{className:v,children:h})]}),d(a,{children:[u(n,{children:g}),u(t,{type:`button`,className:`min-h-9 w-full md:w-24`,onClick:x,children:p?u(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:u(`div`,{className:`loader-spinner text-text-positive-weak`})}):_})]})]})})};export{f as ConfirmDialog};
|
|
2
|
+
//# sourceMappingURL=confirm-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm-dialog.js","names":["ConfirmDialog: React.FC<ConfirmDialogProps>"],"sources":["../../packages/components/dialogs/confirm-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback } from 'react';\n\nimport { TriangleAlert } from 'lucide-react';\n\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '../ui/alert-dialog';\n\n/**\n * Props for the {@link ConfirmDialog} component.\n */\nexport type ConfirmDialogProps = {\n /**\n * Controls whether the dialog is currently open.\n * This is a **controlled** prop — pair it with `onOpenChange` to manage state.\n */\n open?: boolean;\n\n /**\n * When `true`, shows an animated spinner inside the confirm button and\n * prevents double-submission. Typically bound to a mutation's pending state.\n *\n * @default false\n */\n isLoading?: boolean;\n\n /**\n * The dialog heading text. Keep it short and action-oriented,\n * e.g. `\"Delete user?\"` or `\"Unsaved changes\"`.\n */\n title: string;\n\n /**\n * Body copy explaining what will happen if the user confirms.\n * For irreversible actions, state explicitly that the action cannot be undone.\n */\n description: string;\n\n /**\n * Label for the cancel / dismiss button.\n *\n * @default \"Cancel\"\n */\n cancelText?: string;\n\n /**\n * Label for the confirm / submit button.\n *\n * @default \"Confirm\"\n */\n submitText?: string;\n\n /**\n * Additional class names applied to the `AlertDialogDescription` element.\n * Useful for overriding text color or font size for specific contexts.\n */\n descriptionClassName?: string;\n\n /**\n * Callback fired when the dialog open state changes.\n * Required to implement controlled open / close behavior.\n *\n * @param open - `true` when opening, `false` when closing.\n */\n onOpenChange?: (open: boolean) => void;\n\n /**\n * Async-safe callback fired when the user clicks the confirm button.\n * Supports both synchronous and `Promise`-returning functions.\n *\n * The dialog does **not** auto-close after `onConfirm` resolves — the caller\n * is responsible for setting `open` to `false` once the operation completes.\n *\n * @example\n * ```tsx\n * onConfirm={async () => {\n * await deleteUser(userId);\n * setOpen(false);\n * }}\n * ```\n */\n onConfirm?: () => Promise<void> | void;\n};\n\n/**\n * A controlled confirmation dialog for destructive or irreversible actions.\n *\n * Built on Radix UI's `AlertDialog` primitive. Renders a warning icon, title,\n * description, and Cancel / Confirm buttons. The confirm button supports an\n * async loading state to prevent double-submission.\n *\n * **Import:** `import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog'`\n *\n * @example Delete confirmation with React state\n * ```tsx\n * import { useState } from 'react';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n * import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog';\n *\n * export function DeleteUserButton({ userId }: { userId: string }) {\n * const [open, setOpen] = useState(false);\n * const [isPending, setIsPending] = useState(false);\n *\n * const handleDelete = async () => {\n * setIsPending(true);\n * try {\n * await deleteUser(userId);\n * setOpen(false);\n * } finally {\n * setIsPending(false);\n * }\n * };\n *\n * return (\n * <>\n * <Button variant=\"outline\" color=\"danger\" onClick={() => setOpen(true)}>\n * Delete user\n * </Button>\n * <ConfirmDialog\n * open={open}\n * title=\"Delete user?\"\n * description=\"This action is permanent and cannot be undone.\"\n * submitText=\"Yes, delete\"\n * isLoading={isPending}\n * onOpenChange={setOpen}\n * onConfirm={handleDelete}\n * />\n * </>\n * );\n * }\n * ```\n *\n * @example With TanStack Query mutation\n * ```tsx\n * import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog';\n * import { useMutation } from '@tanstack/react-query';\n *\n * export function ArchiveDialog({ open, onOpenChange, id }: Props) {\n * const { mutateAsync, isPending } = useMutation({ mutationFn: archiveItem });\n *\n * return (\n * <ConfirmDialog\n * open={open}\n * title=\"Archive item?\"\n * description=\"The item will be hidden but can be restored later.\"\n * submitText=\"Archive\"\n * isLoading={isPending}\n * onOpenChange={onOpenChange}\n * onConfirm={() => mutateAsync(id).then(() => onOpenChange(false))}\n * />\n * );\n * }\n * ```\n */\nexport const ConfirmDialog: React.FC<ConfirmDialogProps> = ({\n open,\n isLoading = false,\n title,\n description,\n cancelText = 'Cancel',\n submitText = 'Confirm',\n descriptionClassName,\n onOpenChange,\n onConfirm,\n}) => {\n const handleConfirm = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n onConfirm?.();\n },\n [onConfirm]\n );\n\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"p-4 pb-5\">\n <AlertDialogHeader className=\"gap-2\">\n <AlertDialogTitle className=\"inline-flex items-center gap-x-1\">\n <TriangleAlert size={20} />\n <p>{title}</p>\n </AlertDialogTitle>\n <AlertDialogDescription className={descriptionClassName}>{description}</AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>{cancelText}</AlertDialogCancel>\n <AlertDialogAction type=\"button\" className=\"min-h-9 w-full md:w-24\" onClick={handleConfirm}>\n {isLoading ? (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <div className=\"loader-spinner text-text-positive-weak\" />\n </div>\n ) : (\n submitText\n )}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n};\n"],"mappings":"idAmKA,MAAaA,GAA+C,CAC1D,OACA,YAAY,GACZ,QACA,cACA,aAAa,SACb,aAAa,UACb,uBACA,eACA,eACI,CACJ,IAAM,EAAgB,EACnB,GAAwB,CACvB,EAAE,gBAAgB,CAClB,EAAE,iBAAiB,CACnB,KAAa,EAEf,CAAC,EAAU,CACZ,CAED,OACE,EAAC,EAAA,CAAkB,OAAoB,wBACrC,EAAC,EAAA,CAAmB,UAAU,qBAC5B,EAAC,EAAA,CAAkB,UAAU,kBAC3B,EAAC,EAAA,CAAiB,UAAU,6CAC1B,EAAC,EAAA,CAAc,KAAM,GAAA,CAAM,CAC3B,EAAC,IAAA,CAAA,SAAG,EAAA,CAAU,CAAA,EACG,CACnB,EAAC,EAAA,CAAuB,UAAW,WAAuB,GAAqC,CAAA,EAC7E,CACpB,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAA,SAAmB,EAAA,CAA+B,CACnD,EAAC,EAAA,CAAkB,KAAK,SAAS,UAAU,yBAAyB,QAAS,WAC1E,EACC,EAAC,MAAA,CAAI,UAAU,6DACb,EAAC,MAAA,CAAI,UAAU,yCAAA,CAA2C,EACtD,CAEN,GAEgB,CAAA,CAAA,CACF,CAAA,EACD,EACT"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as Button } from "../../../button-
|
|
1
|
+
import { t as Button } from "../../../button-CRSezlCi.cjs";
|
|
2
2
|
import { Separator } from "../../../ui/separator.cjs";
|
|
3
3
|
import { TooltipContent } from "../../../ui/tooltip.cjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react2 from "react";
|
|
5
5
|
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
6
|
import { VariantProps } from "class-variance-authority";
|
|
7
7
|
|
|
@@ -50,7 +50,7 @@ declare function SidebarProvider({
|
|
|
50
50
|
open?: boolean;
|
|
51
51
|
/** Callback fired when the open state changes in controlled mode. */
|
|
52
52
|
onOpenChange?: (open: boolean) => void;
|
|
53
|
-
}):
|
|
53
|
+
}): react2.JSX.Element;
|
|
54
54
|
/**
|
|
55
55
|
* Responsive sidebar container that supports desktop icon-collapse and a mobile Sheet overlay.
|
|
56
56
|
*
|
|
@@ -77,7 +77,7 @@ declare function Sidebar({
|
|
|
77
77
|
variant?: 'sidebar' | 'floating' | 'inset';
|
|
78
78
|
/** Collapse behaviour — slides off-canvas, shrinks to icon strip, or stays fixed. Defaults to `'offcanvas'`. */
|
|
79
79
|
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
80
|
-
}):
|
|
80
|
+
}): react2.JSX.Element;
|
|
81
81
|
/**
|
|
82
82
|
* Icon button that toggles the detail-dialog sidebar open or collapsed.
|
|
83
83
|
*
|
|
@@ -92,62 +92,62 @@ declare function DetailDialogSidebarTrigger({
|
|
|
92
92
|
className,
|
|
93
93
|
onClick,
|
|
94
94
|
...props
|
|
95
|
-
}: React.ComponentProps<typeof Button>):
|
|
95
|
+
}: React.ComponentProps<typeof Button>): react2.JSX.Element;
|
|
96
96
|
declare function DetailDialogSidebarRail({
|
|
97
97
|
className,
|
|
98
98
|
...props
|
|
99
|
-
}: React.ComponentProps<'button'>):
|
|
99
|
+
}: React.ComponentProps<'button'>): react2.JSX.Element;
|
|
100
100
|
declare function SidebarInset({
|
|
101
101
|
className,
|
|
102
102
|
...props
|
|
103
|
-
}: React.ComponentProps<'main'>):
|
|
103
|
+
}: React.ComponentProps<'main'>): react2.JSX.Element;
|
|
104
104
|
declare function DetailDialogSidebarHeader({
|
|
105
105
|
className,
|
|
106
106
|
...props
|
|
107
|
-
}: React.ComponentProps<'div'>):
|
|
107
|
+
}: React.ComponentProps<'div'>): react2.JSX.Element;
|
|
108
108
|
declare function DetailDialogSidebarFooter({
|
|
109
109
|
className,
|
|
110
110
|
children,
|
|
111
111
|
...props
|
|
112
|
-
}: React.ComponentProps<'div'>):
|
|
112
|
+
}: React.ComponentProps<'div'>): react2.JSX.Element;
|
|
113
113
|
declare function DetailDialogSidebarSeparator({
|
|
114
114
|
className,
|
|
115
115
|
...props
|
|
116
|
-
}: React.ComponentProps<typeof Separator>):
|
|
116
|
+
}: React.ComponentProps<typeof Separator>): react2.JSX.Element;
|
|
117
117
|
declare function DetailDialogSidebarContent({
|
|
118
118
|
className,
|
|
119
119
|
...props
|
|
120
|
-
}: React.ComponentProps<'div'>):
|
|
120
|
+
}: React.ComponentProps<'div'>): react2.JSX.Element;
|
|
121
121
|
declare function DetailDialogSidebarGroup({
|
|
122
122
|
className,
|
|
123
123
|
...props
|
|
124
|
-
}: React.ComponentProps<'div'>):
|
|
124
|
+
}: React.ComponentProps<'div'>): react2.JSX.Element;
|
|
125
125
|
declare function DetailDialogSidebarGroupLabel({
|
|
126
126
|
className,
|
|
127
127
|
asChild,
|
|
128
128
|
...props
|
|
129
129
|
}: React.ComponentProps<'div'> & {
|
|
130
130
|
asChild?: boolean;
|
|
131
|
-
}):
|
|
131
|
+
}): react2.JSX.Element;
|
|
132
132
|
declare function DetailDialogSidebarGroupAction({
|
|
133
133
|
className,
|
|
134
134
|
asChild,
|
|
135
135
|
...props
|
|
136
136
|
}: React.ComponentProps<'button'> & {
|
|
137
137
|
asChild?: boolean;
|
|
138
|
-
}):
|
|
138
|
+
}): react2.JSX.Element;
|
|
139
139
|
declare function DetailDialogSidebarGroupContent({
|
|
140
140
|
className,
|
|
141
141
|
...props
|
|
142
|
-
}: React.ComponentProps<'div'>):
|
|
142
|
+
}: React.ComponentProps<'div'>): react2.JSX.Element;
|
|
143
143
|
declare function DetailDialogSidebarMenu({
|
|
144
144
|
className,
|
|
145
145
|
...props
|
|
146
|
-
}: React.ComponentProps<'ul'>):
|
|
146
|
+
}: React.ComponentProps<'ul'>): react2.JSX.Element;
|
|
147
147
|
declare function DetailDialogSidebarMenuItem({
|
|
148
148
|
className,
|
|
149
149
|
...props
|
|
150
|
-
}: React.ComponentProps<'li'>):
|
|
150
|
+
}: React.ComponentProps<'li'>): react2.JSX.Element;
|
|
151
151
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
152
152
|
variant?: "default" | "outline" | null | undefined;
|
|
153
153
|
size?: "sm" | "lg" | "default" | null | undefined;
|
|
@@ -164,7 +164,7 @@ declare function DetailDialogSidebarMenuButton({
|
|
|
164
164
|
asChild?: boolean;
|
|
165
165
|
isActive?: boolean;
|
|
166
166
|
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
167
|
-
} & VariantProps<typeof sidebarMenuButtonVariants>):
|
|
167
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): react2.JSX.Element;
|
|
168
168
|
declare function DetailDialogSidebarMenuAction({
|
|
169
169
|
className,
|
|
170
170
|
asChild,
|
|
@@ -173,26 +173,26 @@ declare function DetailDialogSidebarMenuAction({
|
|
|
173
173
|
}: React.ComponentProps<'button'> & {
|
|
174
174
|
asChild?: boolean;
|
|
175
175
|
showOnHover?: boolean;
|
|
176
|
-
}):
|
|
176
|
+
}): react2.JSX.Element;
|
|
177
177
|
declare function DetailDialogSidebarMenuBadge({
|
|
178
178
|
className,
|
|
179
179
|
...props
|
|
180
|
-
}: React.ComponentProps<'div'>):
|
|
180
|
+
}: React.ComponentProps<'div'>): react2.JSX.Element;
|
|
181
181
|
declare function DetailDialogSidebarMenuSkeleton({
|
|
182
182
|
className,
|
|
183
183
|
showIcon,
|
|
184
184
|
...props
|
|
185
185
|
}: React.ComponentProps<'div'> & {
|
|
186
186
|
showIcon?: boolean;
|
|
187
|
-
}):
|
|
187
|
+
}): react2.JSX.Element;
|
|
188
188
|
declare function DetailDialogSidebarMenuSub({
|
|
189
189
|
className,
|
|
190
190
|
...props
|
|
191
|
-
}: React.ComponentProps<'ul'>):
|
|
191
|
+
}: React.ComponentProps<'ul'>): react2.JSX.Element;
|
|
192
192
|
declare function DetailDialogSidebarMenuSubItem({
|
|
193
193
|
className,
|
|
194
194
|
...props
|
|
195
|
-
}: React.ComponentProps<'li'>):
|
|
195
|
+
}: React.ComponentProps<'li'>): react2.JSX.Element;
|
|
196
196
|
declare function DetailDialogSidebarMenuSubButton({
|
|
197
197
|
asChild,
|
|
198
198
|
size,
|
|
@@ -203,7 +203,7 @@ declare function DetailDialogSidebarMenuSubButton({
|
|
|
203
203
|
asChild?: boolean;
|
|
204
204
|
size?: 'sm' | 'md';
|
|
205
205
|
isActive?: boolean;
|
|
206
|
-
}):
|
|
206
|
+
}): react2.JSX.Element;
|
|
207
207
|
//#endregion
|
|
208
208
|
export { DetailDialogSidebarContent, DetailDialogSidebarFooter, DetailDialogSidebarGroup, DetailDialogSidebarGroupAction, DetailDialogSidebarGroupContent, DetailDialogSidebarGroupLabel, DetailDialogSidebarHeader, DetailDialogSidebarMenu, DetailDialogSidebarMenuAction, DetailDialogSidebarMenuBadge, DetailDialogSidebarMenuButton, DetailDialogSidebarMenuItem, DetailDialogSidebarMenuSkeleton, DetailDialogSidebarMenuSub, DetailDialogSidebarMenuSubButton, DetailDialogSidebarMenuSubItem, DetailDialogSidebarRail, DetailDialogSidebarSeparator, DetailDialogSidebarTrigger, Sidebar, SidebarInset, SidebarProvider, useSidebar };
|
|
209
209
|
//# sourceMappingURL=sidebar.d.cts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as Button } from "../../../button-
|
|
2
|
-
import { Separator } from "../../../ui/separator.
|
|
3
|
-
import { TooltipContent } from "../../../ui/tooltip.
|
|
4
|
-
import * as
|
|
1
|
+
import { t as Button } from "../../../button-DloFFxkz.js";
|
|
2
|
+
import { Separator } from "../../../ui/separator.js";
|
|
3
|
+
import { TooltipContent } from "../../../ui/tooltip.js";
|
|
4
|
+
import * as react3 from "react";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
6
|
-
import * as
|
|
6
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
7
7
|
|
|
8
8
|
//#region packages/components/dialogs/detail-dialog/components/sidebar.d.ts
|
|
9
9
|
type SidebarContextProps = {
|
|
@@ -50,7 +50,7 @@ declare function SidebarProvider({
|
|
|
50
50
|
open?: boolean;
|
|
51
51
|
/** Callback fired when the open state changes in controlled mode. */
|
|
52
52
|
onOpenChange?: (open: boolean) => void;
|
|
53
|
-
}):
|
|
53
|
+
}): react3.JSX.Element;
|
|
54
54
|
/**
|
|
55
55
|
* Responsive sidebar container that supports desktop icon-collapse and a mobile Sheet overlay.
|
|
56
56
|
*
|
|
@@ -77,7 +77,7 @@ declare function Sidebar({
|
|
|
77
77
|
variant?: 'sidebar' | 'floating' | 'inset';
|
|
78
78
|
/** Collapse behaviour — slides off-canvas, shrinks to icon strip, or stays fixed. Defaults to `'offcanvas'`. */
|
|
79
79
|
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
80
|
-
}):
|
|
80
|
+
}): react3.JSX.Element;
|
|
81
81
|
/**
|
|
82
82
|
* Icon button that toggles the detail-dialog sidebar open or collapsed.
|
|
83
83
|
*
|
|
@@ -92,66 +92,66 @@ declare function DetailDialogSidebarTrigger({
|
|
|
92
92
|
className,
|
|
93
93
|
onClick,
|
|
94
94
|
...props
|
|
95
|
-
}: React.ComponentProps<typeof Button>):
|
|
95
|
+
}: React.ComponentProps<typeof Button>): react3.JSX.Element;
|
|
96
96
|
declare function DetailDialogSidebarRail({
|
|
97
97
|
className,
|
|
98
98
|
...props
|
|
99
|
-
}: React.ComponentProps<'button'>):
|
|
99
|
+
}: React.ComponentProps<'button'>): react3.JSX.Element;
|
|
100
100
|
declare function SidebarInset({
|
|
101
101
|
className,
|
|
102
102
|
...props
|
|
103
|
-
}: React.ComponentProps<'main'>):
|
|
103
|
+
}: React.ComponentProps<'main'>): react3.JSX.Element;
|
|
104
104
|
declare function DetailDialogSidebarHeader({
|
|
105
105
|
className,
|
|
106
106
|
...props
|
|
107
|
-
}: React.ComponentProps<'div'>):
|
|
107
|
+
}: React.ComponentProps<'div'>): react3.JSX.Element;
|
|
108
108
|
declare function DetailDialogSidebarFooter({
|
|
109
109
|
className,
|
|
110
110
|
children,
|
|
111
111
|
...props
|
|
112
|
-
}: React.ComponentProps<'div'>):
|
|
112
|
+
}: React.ComponentProps<'div'>): react3.JSX.Element;
|
|
113
113
|
declare function DetailDialogSidebarSeparator({
|
|
114
114
|
className,
|
|
115
115
|
...props
|
|
116
|
-
}: React.ComponentProps<typeof Separator>):
|
|
116
|
+
}: React.ComponentProps<typeof Separator>): react3.JSX.Element;
|
|
117
117
|
declare function DetailDialogSidebarContent({
|
|
118
118
|
className,
|
|
119
119
|
...props
|
|
120
|
-
}: React.ComponentProps<'div'>):
|
|
120
|
+
}: React.ComponentProps<'div'>): react3.JSX.Element;
|
|
121
121
|
declare function DetailDialogSidebarGroup({
|
|
122
122
|
className,
|
|
123
123
|
...props
|
|
124
|
-
}: React.ComponentProps<'div'>):
|
|
124
|
+
}: React.ComponentProps<'div'>): react3.JSX.Element;
|
|
125
125
|
declare function DetailDialogSidebarGroupLabel({
|
|
126
126
|
className,
|
|
127
127
|
asChild,
|
|
128
128
|
...props
|
|
129
129
|
}: React.ComponentProps<'div'> & {
|
|
130
130
|
asChild?: boolean;
|
|
131
|
-
}):
|
|
131
|
+
}): react3.JSX.Element;
|
|
132
132
|
declare function DetailDialogSidebarGroupAction({
|
|
133
133
|
className,
|
|
134
134
|
asChild,
|
|
135
135
|
...props
|
|
136
136
|
}: React.ComponentProps<'button'> & {
|
|
137
137
|
asChild?: boolean;
|
|
138
|
-
}):
|
|
138
|
+
}): react3.JSX.Element;
|
|
139
139
|
declare function DetailDialogSidebarGroupContent({
|
|
140
140
|
className,
|
|
141
141
|
...props
|
|
142
|
-
}: React.ComponentProps<'div'>):
|
|
142
|
+
}: React.ComponentProps<'div'>): react3.JSX.Element;
|
|
143
143
|
declare function DetailDialogSidebarMenu({
|
|
144
144
|
className,
|
|
145
145
|
...props
|
|
146
|
-
}: React.ComponentProps<'ul'>):
|
|
146
|
+
}: React.ComponentProps<'ul'>): react3.JSX.Element;
|
|
147
147
|
declare function DetailDialogSidebarMenuItem({
|
|
148
148
|
className,
|
|
149
149
|
...props
|
|
150
|
-
}: React.ComponentProps<'li'>):
|
|
150
|
+
}: React.ComponentProps<'li'>): react3.JSX.Element;
|
|
151
151
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
152
152
|
variant?: "default" | "outline" | null | undefined;
|
|
153
153
|
size?: "sm" | "lg" | "default" | null | undefined;
|
|
154
|
-
} &
|
|
154
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
155
155
|
declare function DetailDialogSidebarMenuButton({
|
|
156
156
|
asChild,
|
|
157
157
|
isActive,
|
|
@@ -164,7 +164,7 @@ declare function DetailDialogSidebarMenuButton({
|
|
|
164
164
|
asChild?: boolean;
|
|
165
165
|
isActive?: boolean;
|
|
166
166
|
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
167
|
-
} & VariantProps<typeof sidebarMenuButtonVariants>):
|
|
167
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): react3.JSX.Element;
|
|
168
168
|
declare function DetailDialogSidebarMenuAction({
|
|
169
169
|
className,
|
|
170
170
|
asChild,
|
|
@@ -173,26 +173,26 @@ declare function DetailDialogSidebarMenuAction({
|
|
|
173
173
|
}: React.ComponentProps<'button'> & {
|
|
174
174
|
asChild?: boolean;
|
|
175
175
|
showOnHover?: boolean;
|
|
176
|
-
}):
|
|
176
|
+
}): react3.JSX.Element;
|
|
177
177
|
declare function DetailDialogSidebarMenuBadge({
|
|
178
178
|
className,
|
|
179
179
|
...props
|
|
180
|
-
}: React.ComponentProps<'div'>):
|
|
180
|
+
}: React.ComponentProps<'div'>): react3.JSX.Element;
|
|
181
181
|
declare function DetailDialogSidebarMenuSkeleton({
|
|
182
182
|
className,
|
|
183
183
|
showIcon,
|
|
184
184
|
...props
|
|
185
185
|
}: React.ComponentProps<'div'> & {
|
|
186
186
|
showIcon?: boolean;
|
|
187
|
-
}):
|
|
187
|
+
}): react3.JSX.Element;
|
|
188
188
|
declare function DetailDialogSidebarMenuSub({
|
|
189
189
|
className,
|
|
190
190
|
...props
|
|
191
|
-
}: React.ComponentProps<'ul'>):
|
|
191
|
+
}: React.ComponentProps<'ul'>): react3.JSX.Element;
|
|
192
192
|
declare function DetailDialogSidebarMenuSubItem({
|
|
193
193
|
className,
|
|
194
194
|
...props
|
|
195
|
-
}: React.ComponentProps<'li'>):
|
|
195
|
+
}: React.ComponentProps<'li'>): react3.JSX.Element;
|
|
196
196
|
declare function DetailDialogSidebarMenuSubButton({
|
|
197
197
|
asChild,
|
|
198
198
|
size,
|
|
@@ -203,7 +203,7 @@ declare function DetailDialogSidebarMenuSubButton({
|
|
|
203
203
|
asChild?: boolean;
|
|
204
204
|
size?: 'sm' | 'md';
|
|
205
205
|
isActive?: boolean;
|
|
206
|
-
}):
|
|
206
|
+
}): react3.JSX.Element;
|
|
207
207
|
//#endregion
|
|
208
208
|
export { DetailDialogSidebarContent, DetailDialogSidebarFooter, DetailDialogSidebarGroup, DetailDialogSidebarGroupAction, DetailDialogSidebarGroupContent, DetailDialogSidebarGroupLabel, DetailDialogSidebarHeader, DetailDialogSidebarMenu, DetailDialogSidebarMenuAction, DetailDialogSidebarMenuBadge, DetailDialogSidebarMenuButton, DetailDialogSidebarMenuItem, DetailDialogSidebarMenuSkeleton, DetailDialogSidebarMenuSub, DetailDialogSidebarMenuSubButton, DetailDialogSidebarMenuSubItem, DetailDialogSidebarRail, DetailDialogSidebarSeparator, DetailDialogSidebarTrigger, Sidebar, SidebarInset, SidebarProvider, useSidebar };
|
|
209
|
-
//# sourceMappingURL=sidebar.d.
|
|
209
|
+
//# sourceMappingURL=sidebar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import"../../../button.variants-CoSpd71B.js";import"../../../button-LMMbL-uH.js";import"../../../skeleton-DlRDNM97.js";import"../../../tooltip-CVIl6Hln.js";import"../../../separator-BM8hA4DP.js";import"../../../sheet-DGXXYgWB.js";import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,x,y as S}from"../../../sidebar-BDrsbzo5.js";export{v as DetailDialogSidebarContent,p as DetailDialogSidebarFooter,g as DetailDialogSidebarGroup,u as DetailDialogSidebarGroupAction,r as DetailDialogSidebarGroupContent,m as DetailDialogSidebarGroupLabel,_ as DetailDialogSidebarHeader,a as DetailDialogSidebarMenu,d as DetailDialogSidebarMenuAction,y as DetailDialogSidebarMenuBadge,o as DetailDialogSidebarMenuButton,s as DetailDialogSidebarMenuItem,h as DetailDialogSidebarMenuSkeleton,f as DetailDialogSidebarMenuSub,l as DetailDialogSidebarMenuSubButton,c as DetailDialogSidebarMenuSubItem,n as DetailDialogSidebarRail,b as DetailDialogSidebarSeparator,S as DetailDialogSidebarTrigger,i as Sidebar,x as SidebarInset,t as SidebarProvider,e as useSidebar};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import"../../button.variants-CoSpd71B.js";import"../../button-LMMbL-uH.js";import"../../skeleton-DlRDNM97.js";import{t as e}from"../../flex-CinRrgEy.js";import{t}from"../../date-BIqCFM1Z.js";import"../../tooltip-CVIl6Hln.js";import{Title as n}from"../../typography/title.js";import"../../separator-BM8hA4DP.js";import"../../sheet-DGXXYgWB.js";import{S as r,b as i,c as a,d as o,f as s,n as c,s as l,t as u,y as d}from"../../sidebar-BDrsbzo5.js";import{CalendarIcon as f,CatIcon as p,XIcon as m}from"lucide-react";import{useCallback as h}from"react";import{cn as g}from"@customafk/react-toolkit/utils";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{Dialog as y}from"radix-ui";const b=({open:b,isLoading:x,title:S,createdAt:C,onOpenChange:w,sidebar:T,children:E})=>{let{content:D,footer:O}=T||{},k=h(e=>{e.preventDefault(),e.stopPropagation()},[]);return _(y.Root,{"data-slot":`detail-dialog`,open:b,onOpenChange:w,children:v(y.Portal,{"data-slot":`detail-dialog-portal`,children:[_(y.Overlay,{"data-slot":`detail-dialog-overlay`,className:`fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`}),_(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:v(y.Content,{"data-slot":`dialog-content`,className:g(`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-80 data-[state=open]:zoom-in-80`,`relative z-50 grid`,`gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200`,`h-full max-h-dvh w-full max-w-svw`,`sm:rounded-lg`,`sm:max-w-lg`,`md:max-h-[calc(100dvh-2rem)]`,`md:max-w-[calc(100svw-2rem)]`),onInteractOutside:k,children:[v(r,{children:[v(i,{collapsible:`icon`,children:[_(l,{children:_(a,{children:_(s,{children:v(o,{size:`lg`,tabIndex:-1,children:[_(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:_(p,{size:16})}),v(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[_(`span`,{className:`truncate font-medium`,children:T?.title||`Detail Dialog`}),_(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),_(u,{children:D}),_(c,{children:O})]}),_(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:v(e,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:[v(`header`,{className:`flex w-full flex-0 items-start gap-x-2.5 border-b border-border-weak bg-card py-2.5 pr-12 pl-2`,children:[_(d,{}),v(e,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1 gap-0`,children:[_(n,{level:5,className:`line-clamp-1 truncate text-wrap`,children:S||`Detail Dialog`}),!!C&&v(e,{padding:`none`,className:`relative items-center text-text-positive-weak`,children:[_(f,{size:12}),_(t,{showTime:!0,showHoliday:!0,date:C,format:`full`})]})]})]}),x?_(e,{justify:`center`,className:`inset-shadow-sm w-full flex-1 bg-muted-muted`,children:_(`div`,{className:`loader`})}):_(`section`,{"data-slot":`detail-dialog-body`,className:`relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-white`,children:E})]})})]}),_(y.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:_(`button`,{className:`flex cursor-pointer items-center justify-center rounded-full p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60`,children:_(m,{size:24})})})]})})]})})};export{b as DetailDialog};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["DetailDialog: React.FC<React.PropsWithChildren<DetailDialogProps>>","DialogPrimitive"],"sources":["../../../packages/components/dialogs/detail-dialog/index.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback } from 'react';\n\nimport { CalendarIcon, CatIcon, XIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { DateDisplay } from '@/components/data-display/date';\nimport { Flex } from '@/components/layouts/flex';\nimport { Title } from '@/components/typography/title';\n\nimport {\n DetailDialogSidebarContent,\n DetailDialogSidebarFooter,\n DetailDialogSidebarHeader,\n DetailDialogSidebarMenu,\n DetailDialogSidebarMenuButton,\n DetailDialogSidebarMenuItem,\n DetailDialogSidebarTrigger,\n Sidebar,\n SidebarProvider,\n} from './components/sidebar';\n\ntype DetailDialogSidebar = {\n /** Title shown in the collapsible sidebar header. Defaults to `'Detail Dialog'`. */\n title?: string;\n /** Arbitrary content rendered inside the sidebar scrollable area. */\n content?: React.ReactNode;\n /** Arbitrary content rendered at the bottom of the sidebar footer. */\n footer?: React.ReactNode;\n};\n\nexport type DetailDialogProps = {\n /** Controls whether the dialog is open. */\n open?: boolean;\n /** When `true`, replaces the main content area with a centered loading spinner. */\n isLoading?: boolean;\n /** Primary title displayed in the dialog header. */\n title: string;\n /** ISO string, `Date` object, or Unix timestamp shown as a formatted creation date below the title. */\n createdAt?: string | Date | number | null;\n /** Optional sidebar configuration — title, body content, and footer content. */\n sidebar?: DetailDialogSidebar;\n /** Callback invoked when the dialog open state changes. */\n onOpenChange?: (open: boolean) => void;\n};\n\n/**\n * Full-screen detail dialog with a collapsible sidebar, a header with creation date, and a scrollable content area.\n *\n * @example\n * ```tsx\n * import { DetailDialog } from '@customafk/lunas-ui/dialogs/detail-dialog';\n *\n * <DetailDialog\n * open={open}\n * title=\"Order #1234\"\n * createdAt=\"2024-01-15T09:00:00Z\"\n * sidebar={{ title: 'Navigation', content: <nav>...</nav> }}\n * onOpenChange={setOpen}\n * >\n * <p>Detail content goes here.</p>\n * </DetailDialog>\n * ```\n */\nexport const DetailDialog: React.FC<React.PropsWithChildren<DetailDialogProps>> = ({ open, isLoading, title, createdAt, onOpenChange, sidebar, children }) => {\n const { content: SidebarContent, footer: SidebarFooter } = sidebar || {};\n\n const handleInteractOutside = useCallback<NonNullable<React.ComponentProps<typeof DialogPrimitive.Content>['onInteractOutside']>>(event => {\n event.preventDefault();\n event.stopPropagation();\n }, []);\n\n return (\n <DialogPrimitive.Root data-slot=\"detail-dialog\" open={open} onOpenChange={onOpenChange}>\n <DialogPrimitive.Portal data-slot=\"detail-dialog-portal\">\n <DialogPrimitive.Overlay\n data-slot=\"detail-dialog-overlay\"\n className=\"fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\"\n />\n <div className=\"fixed inset-0 z-50 flex items-center justify-center\">\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-80 data-[state=open]:zoom-in-80',\n 'relative z-50 grid',\n 'gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200',\n 'h-full max-h-dvh w-full max-w-svw',\n 'sm:rounded-lg',\n 'sm:max-w-lg',\n 'md:max-h-[calc(100dvh-2rem)]',\n 'md:max-w-[calc(100svw-2rem)]'\n )}\n onInteractOutside={handleInteractOutside}\n >\n <SidebarProvider>\n <Sidebar collapsible=\"icon\">\n <DetailDialogSidebarHeader>\n <DetailDialogSidebarMenu>\n <DetailDialogSidebarMenuItem>\n <DetailDialogSidebarMenuButton size=\"lg\" tabIndex={-1}>\n <div className=\"flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground\">\n <CatIcon size={16} />\n </div>\n <div className=\"grid flex-1 text-left text-sm leading-tight\">\n <span className=\"truncate font-medium\">{sidebar?.title || 'Detail Dialog'}</span>\n <span className=\"truncate text-xs\">Lunas Enterprise</span>\n </div>\n </DetailDialogSidebarMenuButton>\n </DetailDialogSidebarMenuItem>\n </DetailDialogSidebarMenu>\n </DetailDialogSidebarHeader>\n <DetailDialogSidebarContent>{SidebarContent}</DetailDialogSidebarContent>\n <DetailDialogSidebarFooter>{SidebarFooter}</DetailDialogSidebarFooter>\n </Sidebar>\n\n <main data-slot=\"detail-dialog-main\" className=\"relative h-full flex-1\">\n <Flex padding=\"none\" gap=\"none\" vertical align=\"stretch\" className=\"absolute inset-0 size-full\">\n <header className=\"flex w-full flex-0 items-start gap-x-2.5 border-b border-border-weak bg-card py-2.5 pr-12 pl-2\">\n <DetailDialogSidebarTrigger />\n <Flex vertical align=\"start\" padding=\"none\" width=\"null\" wrap={false} className=\"flex-1 gap-0\">\n <Title level={5} className=\"line-clamp-1 truncate text-wrap\">\n {title || 'Detail Dialog'}\n </Title>\n {!!createdAt && (\n <Flex padding=\"none\" className=\"relative items-center text-text-positive-weak\">\n <CalendarIcon size={12} />\n <DateDisplay showTime showHoliday date={createdAt} format=\"full\" />\n </Flex>\n )}\n </Flex>\n </header>\n {isLoading ? (\n <Flex justify=\"center\" className=\"inset-shadow-sm w-full flex-1 bg-muted-muted\">\n <div className=\"loader\" />\n </Flex>\n ) : (\n <section data-slot=\"detail-dialog-body\" className=\"relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-white\">\n {children}\n </section>\n )}\n </Flex>\n </main>\n </SidebarProvider>\n\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <button className=\"flex cursor-pointer items-center justify-center rounded-full p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60\">\n <XIcon size={24} />\n </button>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </div>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n};\n"],"mappings":"0rBAmEA,MAAaA,GAAsE,CAAE,OAAM,YAAW,QAAO,YAAW,eAAc,UAAS,cAAe,CAC5J,GAAM,CAAE,QAAS,EAAgB,OAAQ,GAAkB,GAAW,EAAE,CAElE,EAAwB,EAAoG,GAAS,CACzI,EAAM,gBAAgB,CACtB,EAAM,iBAAiB,EACtB,EAAE,CAAC,CAEN,OACE,EAACC,EAAgB,KAAA,CAAK,YAAU,gBAAsB,OAAoB,wBACxE,EAACA,EAAgB,OAAA,CAAO,YAAU,iCAChC,EAACA,EAAgB,QAAA,CACf,YAAU,wBACV,UAAU,0JACV,CACF,EAAC,MAAA,CAAI,UAAU,+DACb,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,UAAW,EACT,+DACA,6DACA,+DACA,qBACA,2GACA,oCACA,gBACA,cACA,+BACA,+BACD,CACD,kBAAmB,YAEnB,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAQ,YAAY,iBACnB,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAA8B,KAAK,KAAK,SAAU,aACjD,EAAC,MAAA,CAAI,UAAU,+HACb,EAAC,EAAA,CAAQ,KAAM,GAAA,CAAM,EACjB,CACN,EAAC,MAAA,CAAI,UAAU,wDACb,EAAC,OAAA,CAAK,UAAU,gCAAwB,GAAS,OAAS,iBAAuB,CACjF,EAAC,OAAA,CAAK,UAAU,4BAAmB,oBAAuB,CAAA,EACtD,CAAA,EACwB,CAAA,CACJ,CAAA,CACN,CAAA,CACA,CAC5B,EAAC,EAAA,CAAA,SAA4B,EAAA,CAA4C,CACzE,EAAC,EAAA,CAAA,SAA2B,EAAA,CAA0C,GAC9D,CAEV,EAAC,OAAA,CAAK,YAAU,qBAAqB,UAAU,kCAC7C,EAAC,EAAA,CAAK,QAAQ,OAAO,IAAI,OAAO,SAAA,GAAS,MAAM,UAAU,UAAU,uCACjE,EAAC,SAAA,CAAO,UAAU,2GAChB,EAAC,EAAA,EAAA,CAA6B,CAC9B,EAAC,EAAA,CAAK,SAAA,GAAS,MAAM,QAAQ,QAAQ,OAAO,MAAM,OAAO,KAAM,GAAO,UAAU,yBAC9E,EAAC,EAAA,CAAM,MAAO,EAAG,UAAU,2CACxB,GAAS,iBACJ,CACP,CAAC,CAAC,GACD,EAAC,EAAA,CAAK,QAAQ,OAAO,UAAU,0DAC7B,EAAC,EAAA,CAAa,KAAM,GAAA,CAAM,CAC1B,EAAC,EAAA,CAAY,SAAA,GAAS,YAAA,GAAY,KAAM,EAAW,OAAO,QAAS,CAAA,EAC9D,CAAA,EAEJ,CAAA,EACA,CACR,EACC,EAAC,EAAA,CAAK,QAAQ,SAAS,UAAU,wDAC/B,EAAC,MAAA,CAAI,UAAU,SAAA,CAAW,EACrB,CAEP,EAAC,UAAA,CAAQ,YAAU,qBAAqB,UAAU,sFAC/C,YACO,CAAA,EAEP,EACF,CAAA,CAAA,CACS,CAElB,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,SAAU,GAAI,QAAA,GAAQ,UAAU,kCAC9E,EAAC,SAAA,CAAO,UAAU,2QAChB,EAAC,EAAA,CAAM,KAAM,GAAA,CAAM,EACZ,EACa,CAAA,EACA,EACtB,CAAA,EACiB,EACJ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import"../button.variants-CoSpd71B.js";import"../heading-Bz-hSatD.js";import"../paragraph-Cc13ZI4d.js";import{AlertDialog as e,AlertDialogAction as t,AlertDialogContent as n,AlertDialogFooter as r,AlertDialogHeader as i,AlertDialogTitle as a}from"../ui/alert-dialog.js";import{AlertTriangleIcon as o}from"lucide-react";import{useCallback as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=({open:u,title:d,children:f,onOpenChange:p})=>{let m=s(()=>{p?.(!1)},[p]);return c(e,{open:u,onOpenChange:p,children:l(n,{className:`gap-8 p-4 sm:max-w-md`,children:[c(i,{children:l(`div`,{className:`flex flex-col items-center text-danger`,children:[c(o,{size:42}),c(a,{className:`text-xl font-medium`,children:d||`An error occurred`})]})}),f,c(r,{children:c(t,{className:`w-full sm:w-28`,onClick:m,children:`Close`})})]})})};export{u as ErrorDialog};
|
|
2
|
+
//# sourceMappingURL=error-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-dialog.js","names":["ErrorDialog: React.FC<React.PropsWithChildren<ErrorDialogProps>>"],"sources":["../../packages/components/dialogs/error-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback } from 'react';\n\nimport { AlertTriangleIcon } from 'lucide-react';\n\nimport { AlertDialog, AlertDialogAction, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from '../ui/alert-dialog';\n\nexport type ErrorDialogProps = {\n /** Controls whether the dialog is open. */\n open?: boolean;\n /** Title text displayed inside the dialog header. Defaults to `'An error occurred'`. */\n title?: string;\n /** Callback invoked when the dialog open state changes. */\n onOpenChange?: (open: boolean) => void;\n};\n\n/**\n * Displays a modal alert dialog for communicating error states to the user.\n *\n * @example\n * ```tsx\n * import { ErrorDialog } from '@customafk/lunas-ui/dialogs/error-dialog';\n *\n * <ErrorDialog open={hasError} title=\"Something went wrong\" onOpenChange={setHasError}>\n * <p>Please try again later.</p>\n * </ErrorDialog>\n * ```\n */\nexport const ErrorDialog: React.FC<React.PropsWithChildren<ErrorDialogProps>> = ({ open, title, children, onOpenChange }) => {\n const handleClose = useCallback(() => {\n onOpenChange?.(false);\n }, [onOpenChange]);\n\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"gap-8 p-4 sm:max-w-md\">\n <AlertDialogHeader>\n <div className=\"flex flex-col items-center text-danger\">\n <AlertTriangleIcon size={42} />\n <AlertDialogTitle className=\"text-xl font-medium\">{title || 'An error occurred'}</AlertDialogTitle>\n </div>\n </AlertDialogHeader>\n {children}\n <AlertDialogFooter>\n <AlertDialogAction className=\"w-full sm:w-28\" onClick={handleClose}>\n Close\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n};\n"],"mappings":"kaA6BA,MAAaA,GAAoE,CAAE,OAAM,QAAO,WAAU,kBAAmB,CAC3H,IAAM,EAAc,MAAkB,CACpC,IAAe,GAAM,EACpB,CAAC,EAAa,CAAC,CAElB,OACE,EAAC,EAAA,CAAkB,OAAoB,wBACrC,EAAC,EAAA,CAAmB,UAAU,kCAC5B,EAAC,EAAA,CAAA,SACC,EAAC,MAAA,CAAI,UAAU,mDACb,EAAC,EAAA,CAAkB,KAAM,GAAA,CAAM,CAC/B,EAAC,EAAA,CAAiB,UAAU,+BAAuB,GAAS,qBAAuC,CAAA,EAC/F,CAAA,CACY,CACnB,EACD,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAkB,UAAU,iBAAiB,QAAS,WAAa,SAEhD,CAAA,CACF,GACD,EACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import"../heading-Bz-hSatD.js";import"../paragraph-Cc13ZI4d.js";import"../close-C0PdZGxr.js";import{l as e,r as t,t as n}from"../dialog-CmutQ3rp.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";const a=({open:a,onOpenChange:o})=>r(n,{open:a,onOpenChange:o,children:i(t,{showCloseButton:!1,className:`pointer-events-none border-none bg-transparent shadow-none outline-none [&>div]:bg-transparent`,children:[r(e,{}),r(`div`,{className:`flex items-center justify-center`,children:r(`div`,{className:`loader opacity-60`})})]})});export{a as LoadingDialog};
|
|
2
|
+
//# sourceMappingURL=loading-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading-dialog.js","names":["LoadingDialog: React.FC<LoadingDialogProps>"],"sources":["../../packages/components/dialogs/loading-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { Dialog, DialogContent, DialogTitle } from '../ui/dialog';\n\nexport type LoadingDialogProps = {\n /** Controls whether the dialog is open. */\n open?: boolean;\n /** Callback invoked when the dialog open state changes. */\n onOpenChange?: (open: boolean) => void;\n};\n\n/**\n * Displays a transparent, pointer-events-disabled modal overlay with a centered loading spinner.\n *\n * @example\n * ```tsx\n * import { LoadingDialog } from '@customafk/lunas-ui/dialogs/loading-dialog';\n *\n * <LoadingDialog open={isLoading} onOpenChange={setIsLoading} />\n * ```\n */\nexport const LoadingDialog: React.FC<LoadingDialogProps> = ({ open, onOpenChange }) => {\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent showCloseButton={false} className=\"pointer-events-none border-none bg-transparent shadow-none outline-none [&>div]:bg-transparent\">\n <DialogTitle />\n <div className=\"flex items-center justify-center\">\n <div className=\"loader opacity-60\" />\n </div>\n </DialogContent>\n </Dialog>\n );\n};\n"],"mappings":"oNAqBA,MAAaA,GAA+C,CAAE,OAAM,kBAEhE,EAAC,EAAA,CAAa,OAAoB,wBAChC,EAAC,EAAA,CAAc,gBAAiB,GAAO,UAAU,2GAC/C,EAAC,EAAA,EAAA,CAAc,CACf,EAAC,MAAA,CAAI,UAAU,4CACb,EAAC,MAAA,CAAI,UAAU,oBAAA,CAAsB,EACjC,CAAA,EACQ,EACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import*as e from"react";function t(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function n(...e){return n=>{let r=!1,i=e.map(e=>{let i=t(e,n);return!r&&typeof i==`function`&&(r=!0),i});if(r)return()=>{for(let n=0;n<i.length;n++){let r=i[n];typeof r==`function`?r():t(e[n],null)}}}}function r(...t){return e.useCallback(n(...t),t)}function i(t){let n=e.forwardRef((n,i)=>{let{children:a,...o}=n,s=null,c=!1,p=[];m(a)&&typeof v==`function`&&(a=v(a._payload)),e.Children.forEach(a,e=>{if(f(e)){c=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;m(n)&&typeof v==`function`&&(n=v(n._payload)),s=l(t,n),p.push(s?.props?.children)}else p.push(e)}),s?s=e.cloneElement(s,void 0,p):!c&&e.Children.count(a)===1&&e.isValidElement(a)&&(s=a);let h=s?d(s):void 0,y=r(i,h);if(!s){if(a||a===0)throw Error(c?_(t):g(t));return a}let b=u(o,s.props??{});return s.type!==e.Fragment&&(b.ref=i?y:h),e.cloneElement(s,b)});return n.displayName=`${t}.Slot`,n}var a=i(`Slot`),o=Symbol.for(`radix.slottable`);function s(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=o,t}var c=s(`Slottable`),l=(t,n)=>{if(`child`in t.props){let n=t.props.child;return e.isValidElement(n)?e.cloneElement(n,void 0,t.props.children(n.props.children)):null}return e.isValidElement(n)?n:null};function u(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function d(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function f(t){return e.isValidElement(t)&&typeof t.type==`function`&&`__radixId`in t.type&&t.type.__radixId===o}var p=Symbol.for(`react.lazy`);function m(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===p&&`_payload`in e&&h(e._payload)}function h(e){return typeof e==`object`&&!!e&&`then`in e}var g=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,_=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,v=e.use;export{c as n,a as t};
|
|
2
|
-
//# sourceMappingURL=dist-
|
|
2
|
+
//# sourceMappingURL=dist-EPxjIRJp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dist-EPxjIRJp.js","names":["use"],"sources":["../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n let slottableElement = null;\n let hasSlottable = false;\n const newChildren = [];\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n React.Children.forEach(children, (maybeSlottable) => {\n if (isSlottable(maybeSlottable)) {\n hasSlottable = true;\n const slottable = maybeSlottable;\n let child = \"child\" in slottable.props ? slottable.props.child : slottable.props.children;\n if (isLazyComponent(child) && typeof use === \"function\") {\n child = use(child._payload);\n }\n slottableElement = getSlottableElementFromSlottable(slottable, child);\n newChildren.push(slottableElement?.props?.children);\n } else {\n newChildren.push(maybeSlottable);\n }\n });\n if (slottableElement) {\n slottableElement = React.cloneElement(slottableElement, void 0, newChildren);\n } else if (\n // A `Slottable` was found but it didn't resolve to a single element (e.g.\n // it wrapped multiple elements, text, or a render-prop `child` that\n // wasn't an element). Don't fall back to treating the `Slottable` wrapper\n // itself as the slot target — throw a descriptive error below instead.\n !hasSlottable && React.Children.count(children) === 1 && React.isValidElement(children)\n ) {\n slottableElement = children;\n }\n const slottableElementRef = slottableElement ? getElementRef(slottableElement) : void 0;\n const composedRef = useComposedRefs(forwardedRef, slottableElementRef);\n if (!slottableElement) {\n if (children || children === 0) {\n throw new Error(\n hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName)\n );\n }\n return children;\n }\n const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});\n if (slottableElement.type !== React.Fragment) {\n mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;\n }\n return React.cloneElement(slottableElement, mergedProps);\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\nvar SLOTTABLE_IDENTIFIER = Symbol.for(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = (props) => \"child\" in props ? props.children(props.child) : props.children;\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nvar getSlottableElementFromSlottable = (slottable, child) => {\n if (\"child\" in slottable.props) {\n const child2 = slottable.props.child;\n if (!React.isValidElement(child2)) return null;\n return React.cloneElement(child2, void 0, slottable.props.children(child2.props.children));\n }\n return React.isValidElement(child) ? child : null;\n};\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\nvar createSlotError = (ownerName) => {\n return `${ownerName} failed to slot onto its children. Expected a single React element child or \\`Slottable\\`.`;\n};\nvar createSlottableError = (ownerName) => {\n return `${ownerName} failed to slot onto its \\`Slottable\\`. Expected \\`Slottable\\` to receive a single React element child.`;\n};\nvar use = React[\" use \".trim().toString()];\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"x_google_ignoreList":[0,1],"mappings":"wBAEA,SAAS,EAAO,EAAK,EAAO,CAC1B,GAAI,OAAO,GAAQ,WACjB,OAAO,EAAI,EAAM,CACR,GAAQ,OACjB,EAAI,QAAU,GAGlB,SAAS,EAAY,GAAG,EAAM,CAC5B,MAAQ,IAAS,CACf,IAAI,EAAa,GACX,EAAW,EAAK,IAAK,GAAQ,CACjC,IAAM,EAAU,EAAO,EAAK,EAAK,CAIjC,MAHI,CAAC,GAAc,OAAO,GAAW,aACnC,EAAa,IAER,GACP,CACF,GAAI,EACF,UAAa,CACX,IAAK,IAAI,EAAI,EAAG,EAAI,EAAS,OAAQ,IAAK,CACxC,IAAM,EAAU,EAAS,GACrB,OAAO,GAAW,WACpB,GAAS,CAET,EAAO,EAAK,GAAI,KAAK,IAOjC,SAAS,EAAgB,GAAG,EAAM,CAChC,OAAO,EAAM,YAAY,EAAY,GAAG,EAAK,CAAE,EAAK,CC9BtD,SAAS,EAAW,EAAW,CAC7B,IAAM,EAAQ,EAAM,YAAY,EAAO,IAAiB,CACtD,GAAI,CAAE,WAAU,GAAG,GAAc,EAC7B,EAAmB,KACnB,EAAe,GACb,EAAc,EAAE,CAClB,EAAgB,EAAS,EAAI,OAAOA,GAAQ,aAC9C,EAAWA,EAAI,EAAS,SAAS,EAEnC,EAAM,SAAS,QAAQ,EAAW,GAAmB,CACnD,GAAI,EAAY,EAAe,CAAE,CAC/B,EAAe,GACf,IAAM,EAAY,EACd,EAAQ,UAAW,EAAU,MAAQ,EAAU,MAAM,MAAQ,EAAU,MAAM,SAC7E,EAAgB,EAAM,EAAI,OAAOA,GAAQ,aAC3C,EAAQA,EAAI,EAAM,SAAS,EAE7B,EAAmB,EAAiC,EAAW,EAAM,CACrE,EAAY,KAAK,GAAkB,OAAO,SAAS,MAEnD,EAAY,KAAK,EAAe,EAElC,CACE,EACF,EAAmB,EAAM,aAAa,EAAkB,IAAK,GAAG,EAAY,CAM5E,CAAC,GAAgB,EAAM,SAAS,MAAM,EAAS,GAAK,GAAK,EAAM,eAAe,EAAS,GAEvF,EAAmB,GAErB,IAAM,EAAsB,EAAmB,EAAc,EAAiB,CAAG,IAAK,GAChF,EAAc,EAAgB,EAAc,EAAoB,CACtE,GAAI,CAAC,EAAkB,CACrB,GAAI,GAAY,IAAa,EAC3B,MAAU,MACR,EAAe,EAAqB,EAAU,CAAG,EAAgB,EAAU,CAC5E,CAEH,OAAO,EAET,IAAM,EAAc,EAAW,EAAW,EAAiB,OAAS,EAAE,CAAC,CAIvE,OAHI,EAAiB,OAAS,EAAM,WAClC,EAAY,IAAM,EAAe,EAAc,GAE1C,EAAM,aAAa,EAAkB,EAAY,EACxD,CAEF,MADA,GAAM,YAAc,GAAG,EAAU,OAC1B,EAET,IAAI,EAAuB,EAAW,OAAO,CACzC,EAAuB,OAAO,IAAI,kBAAkB,CAExD,SAAS,EAAgB,EAAW,CAClC,IAAM,EAAc,GAAU,UAAW,EAAQ,EAAM,SAAS,EAAM,MAAM,CAAG,EAAM,SAGrF,MAFA,GAAW,YAAc,GAAG,EAAU,YACtC,EAAW,UAAY,EAChB,EAET,IAAI,EAA4B,EAAgB,YAAY,CACxD,GAAoC,EAAW,IAAU,CAC3D,GAAI,UAAW,EAAU,MAAO,CAC9B,IAAM,EAAS,EAAU,MAAM,MAE/B,OADK,EAAM,eAAe,EAAO,CAC1B,EAAM,aAAa,EAAQ,IAAK,GAAG,EAAU,MAAM,SAAS,EAAO,MAAM,SAAS,CAAC,CADhD,KAG5C,OAAO,EAAM,eAAe,EAAM,CAAG,EAAQ,MAE/C,SAAS,EAAW,EAAW,EAAY,CACzC,IAAM,EAAgB,CAAE,GAAG,EAAY,CACvC,IAAK,IAAM,KAAY,EAAY,CACjC,IAAM,EAAgB,EAAU,GAC1B,EAAiB,EAAW,GAChB,WAAW,KAAK,EAAS,CAErC,GAAiB,EACnB,EAAc,IAAa,GAAG,IAAS,CACrC,IAAM,EAAS,EAAe,GAAG,EAAK,CAEtC,OADA,EAAc,GAAG,EAAK,CACf,GAEA,IACT,EAAc,GAAY,GAEnB,IAAa,QACtB,EAAc,GAAY,CAAE,GAAG,EAAe,GAAG,EAAgB,CACxD,IAAa,cACtB,EAAc,GAAY,CAAC,EAAe,EAAe,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI,EAGvF,MAAO,CAAE,GAAG,EAAW,GAAG,EAAe,CAE3C,SAAS,EAAc,EAAS,CAC9B,IAAI,EAAS,OAAO,yBAAyB,EAAQ,MAAO,MAAM,EAAE,IAChE,EAAU,GAAU,mBAAoB,GAAU,EAAO,eAS7D,OARI,EACK,EAAQ,KAEjB,EAAS,OAAO,yBAAyB,EAAS,MAAM,EAAE,IAC1D,EAAU,GAAU,mBAAoB,GAAU,EAAO,eACrD,EACK,EAAQ,MAAM,IAEhB,EAAQ,MAAM,KAAO,EAAQ,KAEtC,SAAS,EAAY,EAAO,CAC1B,OAAO,EAAM,eAAe,EAAM,EAAI,OAAO,EAAM,MAAS,YAAc,cAAe,EAAM,MAAQ,EAAM,KAAK,YAAc,EAElI,IAAI,EAAkB,OAAO,IAAI,aAAa,CAC9C,SAAS,EAAgB,EAAS,CAChC,OAA0B,OAAO,GAAY,YAAtC,GAAkD,aAAc,GAAW,EAAQ,WAAa,GAAmB,aAAc,GAAW,EAAc,EAAQ,SAAS,CAEpL,SAAS,EAAc,EAAO,CAC5B,OAAO,OAAO,GAAU,YAAY,GAAkB,SAAU,EAElE,IAAI,EAAmB,GACd,GAAG,EAAU,4FAElB,EAAwB,GACnB,GAAG,EAAU,yGAElBA,EAAM,EAAM"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{cn as e}from"@customafk/react-toolkit/utils";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{Drawer as r}from"vaul";function i({...e}){return t(r.Root,{"data-slot":`drawer`,...e})}function a({...e}){return t(r.Trigger,{"data-slot":`drawer-trigger`,...e})}function o({...e}){return t(r.Portal,{"data-slot":`drawer-portal`,...e})}function s({...e}){return t(r.Close,{"data-slot":`drawer-close`,...e})}function c({className:n,...i}){return t(r.Overlay,{"data-slot":`drawer-overlay`,className:e(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=open]:fade-in-0`,`data-[state=closed]:fade-out-0`,n),...i})}function l({className:i,children:a,...s}){return n(o,{"data-slot":`drawer-portal`,children:[t(c,{}),n(r.Content,{"data-slot":`drawer-content`,className:e(`group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col`,`data-[vaul-drawer-direction=top]:inset-x-0`,`data-[vaul-drawer-direction=top]:top-0`,`data-[vaul-drawer-direction=top]:mb-24`,`data-[vaul-drawer-direction=top]:max-h-[80vh]`,`data-[vaul-drawer-direction=top]:rounded-b-lg`,`data-[vaul-drawer-direction=bottom]:inset-x-0`,`data-[vaul-drawer-direction=bottom]:bottom-0`,`data-[vaul-drawer-direction=bottom]:mt-24`,`data-[vaul-drawer-direction=bottom]:max-h-[80vh]`,`data-[vaul-drawer-direction=bottom]:rounded-t-lg`,`data-[vaul-drawer-direction=right]:inset-y-0`,`data-[vaul-drawer-direction=right]:right-0`,`data-[vaul-drawer-direction=right]:w-3/4`,`data-[vaul-drawer-direction=right]:sm:max-w-sm`,`data-[vaul-drawer-direction=left]:inset-y-0`,`data-[vaul-drawer-direction=left]:left-0`,`data-[vaul-drawer-direction=left]:w-3/4`,`data-[vaul-drawer-direction=left]:sm:max-w-sm`,i),...s,children:[t(`div`,{className:`bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block`}),a]})]})}function u({className:n,...r}){return t(`div`,{"data-slot":`drawer-header`,className:e(`flex flex-col gap-0.5 p-4`,`md:gap-1.5 md:text-left`,`group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center`,`group-data-[vaul-drawer-direction=top]/drawer-content:text-center`,n),...r})}function d({className:n,...r}){return t(`div`,{"data-slot":`drawer-footer`,className:e(`mt-auto flex flex-col gap-2 p-4`,n),...r})}function f({className:n,...i}){return t(r.Title,{"data-slot":`drawer-title`,className:e(`text-text-positive font-semibold`,n),...i})}function p({className:n,...i}){return t(r.Description,{"data-slot":`drawer-description`,className:e(`text-text-positive-weak text-sm`,n),...i})}export{d as a,o as c,p as i,f as l,s as n,u as o,l as r,c as s,i as t,a as u};
|
|
2
|
-
//# sourceMappingURL=drawer-
|
|
2
|
+
//# sourceMappingURL=drawer-B3qXaN5p.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer-B3qXaN5p.js","names":["Drawer","DrawerPrimitive"],"sources":["../packages/components/ui/drawer.tsx"],"sourcesContent":["'use client';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Drawer as DrawerPrimitive } from 'vaul';\n\n/**\n * Root provider for the Drawer — a vaul-powered slide-in panel supporting top, bottom, left, and right directions.\n *\n * @example\n * ```tsx\n * import { Drawer, DrawerTrigger, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription } from '@customafk/lunas-ui/ui/drawer';\n *\n * <Drawer>\n * <DrawerTrigger>Open Drawer</DrawerTrigger>\n * <DrawerContent>\n * <DrawerHeader>\n * <DrawerTitle>Confirm action</DrawerTitle>\n * <DrawerDescription>This action cannot be undone.</DrawerDescription>\n * </DrawerHeader>\n * </DrawerContent>\n * </Drawer>\n * ```\n */\nfunction Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />;\n}\n\n/** Element that opens the Drawer when activated. */\nfunction DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\n/** Portals Drawer content outside the current DOM tree. */\nfunction DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />;\n}\n\n/** Button that programmatically closes the Drawer. */\nfunction DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\n/** Dimmed backdrop rendered behind the Drawer panel. */\nfunction DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=open]:fade-in-0',\n 'data-[state=closed]:fade-out-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/** The main Drawer panel; automatically positions itself based on the direction set on the root. */\nfunction DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col',\n\n 'data-[vaul-drawer-direction=top]:inset-x-0',\n 'data-[vaul-drawer-direction=top]:top-0',\n 'data-[vaul-drawer-direction=top]:mb-24',\n 'data-[vaul-drawer-direction=top]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=top]:rounded-b-lg',\n\n 'data-[vaul-drawer-direction=bottom]:inset-x-0',\n 'data-[vaul-drawer-direction=bottom]:bottom-0',\n 'data-[vaul-drawer-direction=bottom]:mt-24',\n 'data-[vaul-drawer-direction=bottom]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=bottom]:rounded-t-lg',\n\n 'data-[vaul-drawer-direction=right]:inset-y-0',\n 'data-[vaul-drawer-direction=right]:right-0',\n 'data-[vaul-drawer-direction=right]:w-3/4',\n 'data-[vaul-drawer-direction=right]:sm:max-w-sm',\n\n 'data-[vaul-drawer-direction=left]:inset-y-0',\n 'data-[vaul-drawer-direction=left]:left-0',\n 'data-[vaul-drawer-direction=left]:w-3/4',\n 'data-[vaul-drawer-direction=left]:sm:max-w-sm',\n className\n )}\n {...props}\n >\n <div className=\"bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n );\n}\n\n/** Padded header section at the top of the Drawer for the title and description. */\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n 'flex flex-col gap-0.5 p-4',\n 'md:gap-1.5 md:text-left',\n 'group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center',\n 'group-data-[vaul-drawer-direction=top]/drawer-content:text-center',\n className\n )}\n {...props}\n />\n );\n}\n\n/** Footer section pinned to the bottom of the Drawer, typically used for action buttons. */\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"drawer-footer\" className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />;\n}\n\n/** Accessible title element for the Drawer, announced by screen readers on open. */\nfunction DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return <DrawerPrimitive.Title data-slot=\"drawer-title\" className={cn('text-text-positive font-semibold', className)} {...props} />;\n}\n\n/** Accessible description element for the Drawer, providing supplemental context to the title. */\nfunction DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return <DrawerPrimitive.Description data-slot=\"drawer-description\" className={cn('text-text-positive-weak text-sm', className)} {...props} />;\n}\n\nexport { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };\n"],"mappings":"oIAuBA,SAASA,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAACC,EAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,GAAS,CAI/D,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAACA,EAAgB,QAAA,CAAQ,YAAU,iBAAiB,GAAI,GAAS,CAI1E,SAAS,EAAa,CAAE,GAAG,GAA8D,CACvF,OAAO,EAACA,EAAgB,OAAA,CAAO,YAAU,gBAAgB,GAAI,GAAS,CAIxE,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAItE,SAAS,EAAc,CAAE,YAAW,GAAG,GAA+D,CACpG,OACE,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,UAAW,EACT,iCACA,+BACA,kCACA,8BACA,iCACA,EACD,CACD,GAAI,GACJ,CAKN,SAAS,EAAc,CAAE,YAAW,WAAU,GAAG,GAA+D,CAC9G,OACE,EAAC,EAAA,CAAa,YAAU,0BACtB,EAAC,EAAA,EAAA,CAAgB,CACjB,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,UAAW,EACT,iFAEA,6CACA,yCACA,yCACA,gDACA,gDAEA,gDACA,+CACA,4CACA,mDACA,mDAEA,+CACA,6CACA,2CACA,iDAEA,8CACA,2CACA,0CACA,gDACA,EACD,CACD,GAAI,YAEJ,EAAC,MAAA,CAAI,UAAU,mIAAA,CAAqI,CACnJ,EAAA,EACuB,CAAA,EACb,CAKnB,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OACE,EAAC,MAAA,CACC,YAAU,gBACV,UAAW,EACT,4BACA,0BACA,uEACA,oEACA,EACD,CACD,GAAI,GACJ,CAKN,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAC,MAAA,CAAI,YAAU,gBAAgB,UAAW,EAAG,kCAAmC,EAAU,CAAE,GAAI,GAAS,CAIlH,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,UAAW,EAAG,mCAAoC,EAAU,CAAE,GAAI,GAAS,CAIpI,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OAAO,EAACA,EAAgB,YAAA,CAAY,YAAU,qBAAqB,UAAW,EAAG,kCAAmC,EAAU,CAAE,GAAI,GAAS"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{CheckIcon as e,ChevronRightIcon as t,CircleIcon as n}from"lucide-react";import{cn as r}from"@customafk/react-toolkit/utils";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{DropdownMenu as o}from"radix-ui";function s({...e}){return i(o.Root,{"data-slot":`dropdown-menu`,...e})}function c({...e}){return i(o.Portal,{"data-slot":`dropdown-menu-portal`,...e})}function l({...e}){return i(o.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function u({className:e,sideOffset:t=4,align:n=`start`,...a}){return i(o.Portal,{children:i(o.Content,{"data-slot":`dropdown-menu-content`,sideOffset:t,align:n,className:r(`bg-popover text-text-positive`,`z-50 min-w-32`,`overflow-y-auto overflow-x-hidden`,`rounded-md p-1.5 shadow-dropdown`,`max-h-(--radix-dropdown-menu-content-available-height)`,`origin-(--radix-dropdown-menu-content-transform-origin)`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,e),...a})})}function d({...e}){return i(o.Group,{"data-slot":`dropdown-menu-group`,...e})}function f({className:e,inset:t,variant:n=`default`,...a}){return i(o.Item,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:r(`relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-colors`,`focus:bg-muted-muted focus:text-text-positive-strong`,`data-inset:pl-8`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`data-[variant=destructive]:text-danger`,`data-[variant=destructive]:focus:bg-danger-muted data-[variant=destructive]:focus:text-danger-strong`,`data-[variant=destructive]:*:[svg]:text-danger!`,`[&_svg]:pointer-events-none [&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,`[&_svg:not([class*='text-'])]:text-text-positive-weak`,e),...a})}function p({className:t,children:n,checked:s,...c}){return a(o.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:r(`relative flex cursor-pointer select-none items-center gap-2 rounded-md py-2.5 pr-2 pl-8 text-sm outline-hidden transition-colors`,`focus:bg-muted-muted focus:text-text-positive-strong`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,t),checked:s,...c,children:[i(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:i(o.ItemIndicator,{children:i(e,{size:16})})}),n]})}function m({...e}){return i(o.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function h({className:e,children:t,...s}){return a(o.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:r(`relative flex cursor-pointer select-none items-center gap-2 rounded-md py-2.5 pr-2 pl-8 text-sm outline-hidden transition-colors`,`focus:bg-muted-muted focus:text-text-positive-strong`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,e),...s,children:[i(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:i(o.ItemIndicator,{children:i(n,{className:`size-2 fill-current`})})}),t]})}function g({className:e,inset:t,...n}){return i(o.Label,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:r(`px-2 py-1.5 font-medium text-sm text-text-positive-weak data-inset:pl-8`,e),...n})}function _({className:e,...t}){return i(o.Separator,{"data-slot":`dropdown-menu-separator`,className:r(`-mx-1 my-1 h-px bg-border-weak`,e),...t})}function v({className:e,...t}){return i(`span`,{"data-slot":`dropdown-menu-shortcut`,className:r(`ml-auto text-xs text-text-positive-muted tracking-widest`,e),...t})}function y({...e}){return i(o.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function b({className:e,inset:n,children:s,...c}){return a(o.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":n,className:r(`flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-colors`,`focus:bg-muted-muted focus:text-text-positive-strong`,`data-[state=open]:bg-muted-muted data-[state=open]:text-text-positive-strong`,`data-inset:pl-8`,`[&_svg]:pointer-events-none [&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,e),...c,children:[s,i(t,{className:`ml-auto size-4`})]})}function x({className:e,...t}){return i(o.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:r(`bg-popover text-text-positive`,`z-50 min-w-32`,`overflow-y-auto overflow-x-hidden`,`origin-(--radix-dropdown-menu-content-transform-origin) rounded-md p-1.5 shadow-dropdown`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,e),...t})}export{f as a,m as c,v as d,y as f,l as h,d as i,h as l,b as m,p as n,g as o,x as p,u as r,c as s,s as t,_ as u};
|
|
2
|
-
//# sourceMappingURL=dropdown-menu-
|
|
2
|
+
//# sourceMappingURL=dropdown-menu-DeHCVyby.js.map
|