@customafk/lunas-ui 0.2.39 → 0.2.41
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-CNFuxKp7.d.cts → alert-BVsYpWFX.d.cts} +5 -5
- package/dist/{alert-BzBDfGk2.js → alert-D5VmhFT9.js} +2 -2
- package/dist/{alert-BzBDfGk2.js.map → alert-D5VmhFT9.js.map} +1 -1
- package/dist/{alert-DOpQdSIC.d.ts → alert-DXmXDeGs.d.ts} +7 -7
- package/dist/{alert-B2PaDJp6.cjs → alert-JwECRZfz.cjs} +2 -2
- package/dist/{alert-B2PaDJp6.cjs.map → alert-JwECRZfz.cjs.map} +1 -1
- package/dist/{button-IMi0bEY_.d.cts → button-BBfGvggN.d.ts} +4 -4
- package/dist/{button-D4YMSwqK.d.ts → button-BEjRVw6s.d.cts} +5 -5
- package/dist/{button.variants-CoSpd71B.js → button.variants-BruXd4VM.js} +1 -1
- package/dist/{button.variants-CoSpd71B.js.map → button.variants-BruXd4VM.js.map} +1 -1
- package/dist/{button.variants-4kw6plrv.cjs → button.variants-DgVFNsVc.cjs} +2 -2
- package/dist/{button.variants-4kw6plrv.cjs.map → button.variants-DgVFNsVc.cjs.map} +1 -1
- package/dist/cards/grid-product-card.cjs +1 -1
- package/dist/cards/grid-product-card.cjs.map +1 -1
- package/dist/cards/grid-product-card.js +1 -1
- package/dist/cards/grid-product-card.js.map +1 -1
- package/dist/cards/product-card.cjs +1 -1
- package/dist/cards/product-card.cjs.map +1 -1
- package/dist/cards/product-card.js +1 -1
- package/dist/cards/product-card.js.map +1 -1
- package/dist/cards/simple-card.cjs +1 -1
- package/dist/cards/simple-card.d.ts +2 -2
- package/dist/cards/simple-card.js +1 -1
- package/dist/chunk-Bmb41Sf3.cjs +1 -0
- package/dist/{close-Dlo1bI8x.cjs → close-Dflkky9q.cjs} +2 -2
- package/dist/{close-Dlo1bI8x.cjs.map → close-Dflkky9q.cjs.map} +1 -1
- package/dist/{close-C0PdZGxr.js → close-DrkwaVXK.js} +1 -1
- package/dist/{close-C0PdZGxr.js.map → close-DrkwaVXK.js.map} +1 -1
- package/dist/cms-layout-B8maJRLp.cjs +2 -0
- package/dist/{cms-layout-BCH4NroR.cjs.map → cms-layout-B8maJRLp.cjs.map} +1 -1
- package/dist/cms-layout-CLeGdpMb.js +2 -0
- package/dist/{cms-layout-tPwrgJZc.js.map → cms-layout-CLeGdpMb.js.map} +1 -1
- package/dist/data-display/country.cjs +1 -1
- package/dist/data-display/country.cjs.map +1 -1
- package/dist/data-display/country.d.cts +1 -1
- package/dist/data-display/country.d.ts +1 -1
- package/dist/data-display/country.js +1 -1
- package/dist/data-display/country.js.map +1 -1
- package/dist/data-display/data-list.cjs +1 -1
- package/dist/data-display/date-tooltip.cjs +1 -1
- package/dist/data-display/date-tooltip.cjs.map +1 -1
- package/dist/data-display/date-tooltip.js +1 -1
- package/dist/data-display/date-tooltip.js.map +1 -1
- package/dist/data-display/date.cjs +2 -1
- package/dist/data-display/date.cjs.map +1 -0
- package/dist/data-display/date.js +2 -1
- package/dist/data-display/date.js.map +1 -0
- package/dist/data-display/empty.cjs +1 -1
- package/dist/data-display/name.cjs +1 -1
- package/dist/data-display/name.cjs.map +1 -1
- package/dist/data-display/name.js +1 -1
- package/dist/data-display/name.js.map +1 -1
- package/dist/data-display/phone-number.cjs +1 -1
- package/dist/data-display/phone-number.cjs.map +1 -1
- package/dist/data-display/phone-number.js +1 -1
- package/dist/data-display/phone-number.js.map +1 -1
- package/dist/data-display/role-badge.cjs +1 -1
- package/dist/data-display/role-badge.cjs.map +1 -1
- package/dist/data-display/role-badge.d.cts +1 -1
- package/dist/data-display/role-badge.d.ts +1 -1
- package/dist/data-display/role-badge.js +1 -1
- package/dist/data-display/role-badge.js.map +1 -1
- package/dist/data-display/statistic.cjs +2 -1
- package/dist/data-display/statistic.cjs.map +1 -0
- package/dist/data-display/statistic.d.cts +3 -3
- package/dist/data-display/statistic.d.ts +3 -3
- package/dist/data-display/statistic.js +2 -1
- package/dist/data-display/statistic.js.map +1 -0
- package/dist/data-display/user.cjs +2 -1
- package/dist/data-display/user.cjs.map +1 -0
- package/dist/data-display/user.js +2 -1
- package/dist/data-display/user.js.map +1 -0
- package/dist/dialogs/confirm-dialog.cjs +1 -1
- package/dist/dialogs/confirm-dialog.js +1 -1
- package/dist/dialogs/detail-dialog/components/sidebar.cjs +1 -1
- package/dist/dialogs/detail-dialog/components/sidebar.d.cts +26 -26
- package/dist/dialogs/detail-dialog/components/sidebar.d.ts +6 -6
- package/dist/dialogs/detail-dialog/components/sidebar.js +1 -1
- package/dist/dialogs/detail-dialog/index.cjs +1 -1
- package/dist/dialogs/detail-dialog/index.cjs.map +1 -1
- package/dist/dialogs/detail-dialog/index.js +1 -1
- package/dist/dialogs/detail-dialog/index.js.map +1 -1
- package/dist/dialogs/error-dialog.cjs +1 -1
- package/dist/dialogs/error-dialog.js +1 -1
- package/dist/dialogs/loading-dialog.cjs +1 -1
- package/dist/dialogs/loading-dialog.cjs.map +1 -1
- package/dist/dialogs/loading-dialog.js +1 -1
- package/dist/dialogs/loading-dialog.js.map +1 -1
- package/dist/features/descriptions/index.cjs +1 -1
- package/dist/features/descriptions/index.cjs.map +1 -1
- package/dist/features/descriptions/index.d.cts +3 -3
- package/dist/features/descriptions/index.d.ts +6 -6
- package/dist/features/descriptions/index.js +1 -1
- package/dist/features/descriptions/index.js.map +1 -1
- package/dist/features/search-modal/index.cjs +1 -1
- package/dist/features/search-modal/index.d.cts +2 -2
- package/dist/features/search-modal/index.d.ts +2 -2
- package/dist/features/search-modal/index.js +1 -1
- package/dist/features/tables/index.cjs +1 -1
- package/dist/features/tables/index.d.cts +1 -1
- package/dist/features/tables/index.d.ts +1 -2
- package/dist/features/tables/index.js +1 -1
- package/dist/features/tanstack-form/index.cjs +1 -1
- package/dist/features/tanstack-form/index.d.cts +1 -1
- package/dist/features/tanstack-form/index.d.ts +1 -1
- package/dist/features/tanstack-form/index.js +1 -1
- package/dist/features/text-editor/index.cjs +1 -1
- package/dist/features/text-editor/index.d.cts +1 -1
- package/dist/features/text-editor/index.d.ts +1 -1
- package/dist/features/text-editor/index.js +1 -1
- package/dist/field-0gaEKxov.cjs +2 -0
- package/dist/{field-BrlETeXX.cjs.map → field-0gaEKxov.cjs.map} +1 -1
- package/dist/field-DG-kX3HU.js +2 -0
- package/dist/{field-DpoKF1nY.js.map → field-DG-kX3HU.js.map} +1 -1
- package/dist/{flex-DmWmOBn5.cjs → flex-BAfCk_in.cjs} +2 -2
- package/dist/{flex-DmWmOBn5.cjs.map → flex-BAfCk_in.cjs.map} +1 -1
- package/dist/{flex-CinRrgEy.js → flex-D_XtSjf4.js} +2 -2
- package/dist/{flex-CinRrgEy.js.map → flex-D_XtSjf4.js.map} +1 -1
- package/dist/{heading-tGTqk3pA.cjs → heading-BX7ZVnVg.cjs} +2 -2
- package/dist/{heading-tGTqk3pA.cjs.map → heading-BX7ZVnVg.cjs.map} +1 -1
- package/dist/{heading-Bz-hSatD.js → heading-Bw3eo6IT.js} +1 -1
- package/dist/{heading-Bz-hSatD.js.map → heading-Bw3eo6IT.js.map} +1 -1
- package/dist/{index-C1WfBa-T.d.ts → index--eHW_BCk.d.ts} +7 -7
- package/dist/{index-BlQGXGqt.d.ts → index-C257sc-c.d.ts} +1 -1
- package/dist/{index-gSP59hja.d.cts → index-C4ZFmaZm.d.cts} +324 -324
- package/dist/{index-BxoQxUnW.d.cts → index-DWEpRM8i.d.cts} +3 -3
- package/dist/{index-BDMEeMn4.d.ts → index-DnQeeNHV.d.ts} +31 -31
- package/dist/{index-Du_HLRsN.d.cts → index-_MFRCXuJ.d.cts} +3 -3
- package/dist/{index-KO98y6L0.d.cts → index-rNI5ia8r.d.cts} +1 -1
- package/dist/{index-BiAWxLAj.d.ts → index-rZ2RtGJp.d.ts} +325 -325
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +1 -1
- package/dist/layouts/cms-layout/index.cjs +1 -1
- package/dist/layouts/cms-layout/index.d.cts +1 -1
- package/dist/layouts/cms-layout/index.d.ts +1 -1
- package/dist/layouts/cms-layout/index.js +1 -1
- package/dist/layouts/flex.cjs +1 -1
- package/dist/layouts/flex.d.cts +5 -5
- package/dist/layouts/flex.d.ts +5 -5
- package/dist/layouts/flex.js +1 -1
- package/dist/layouts/grid.cjs +1 -1
- package/dist/layouts/payment-layout/index.cjs +1 -1
- package/dist/layouts/payment-layout/index.js +1 -1
- package/dist/pages/FeatureDeveloping.cjs +1 -1
- package/dist/pages/FeatureDeveloping.cjs.map +1 -1
- package/dist/pages/FeatureDeveloping.d.cts +2 -2
- package/dist/pages/FeatureDeveloping.d.ts +2 -2
- package/dist/pages/FeatureDeveloping.js +1 -1
- package/dist/pages/FeatureDeveloping.js.map +1 -1
- package/dist/pages/FeatureFixing.cjs +1 -1
- package/dist/pages/FeatureFixing.cjs.map +1 -1
- package/dist/pages/FeatureFixing.d.cts +2 -2
- package/dist/pages/FeatureFixing.d.ts +2 -2
- package/dist/pages/FeatureFixing.js +1 -1
- package/dist/pages/FeatureFixing.js.map +1 -1
- package/dist/pages/LoginPage.cjs +1 -1
- package/dist/pages/LoginPage.cjs.map +1 -1
- package/dist/pages/LoginPage.d.cts +2 -2
- package/dist/pages/LoginPage.d.ts +2 -2
- package/dist/pages/LoginPage.js +1 -1
- package/dist/pages/LoginPage.js.map +1 -1
- package/dist/pages/NotAuthorized.cjs +1 -1
- package/dist/pages/NotAuthorized.cjs.map +1 -1
- package/dist/pages/NotAuthorized.d.cts +2 -2
- package/dist/pages/NotAuthorized.d.ts +2 -2
- package/dist/pages/NotAuthorized.js +1 -1
- package/dist/pages/NotAuthorized.js.map +1 -1
- package/dist/pages/NotFound.cjs +1 -1
- package/dist/pages/NotFound.cjs.map +1 -1
- package/dist/pages/NotFound.d.cts +2 -2
- package/dist/pages/NotFound.d.ts +2 -2
- package/dist/pages/NotFound.js +1 -1
- package/dist/pages/NotFound.js.map +1 -1
- package/dist/pages/RegisterPage.cjs +1 -1
- package/dist/pages/RegisterPage.cjs.map +1 -1
- package/dist/pages/RegisterPage.d.cts +2 -2
- package/dist/pages/RegisterPage.d.ts +2 -2
- package/dist/pages/RegisterPage.js +1 -1
- package/dist/pages/RegisterPage.js.map +1 -1
- package/dist/pages/VerifyEmailPage.cjs +1 -1
- package/dist/pages/VerifyEmailPage.cjs.map +1 -1
- package/dist/pages/VerifyEmailPage.d.cts +2 -2
- package/dist/pages/VerifyEmailPage.d.ts +2 -2
- package/dist/pages/VerifyEmailPage.js +1 -1
- package/dist/pages/VerifyEmailPage.js.map +1 -1
- package/dist/{paragraph-DvTZvbzw.cjs → paragraph-D0x3Jc6W.cjs} +2 -2
- package/dist/{paragraph-DvTZvbzw.cjs.map → paragraph-D0x3Jc6W.cjs.map} +1 -1
- package/dist/{paragraph-Cc13ZI4d.js → paragraph-ESjXXqHU.js} +1 -1
- package/dist/{paragraph-Cc13ZI4d.js.map → paragraph-ESjXXqHU.js.map} +1 -1
- package/dist/payment-layout-CksJbGsl.js +2 -0
- package/dist/{payment-layout-giaGvs8T.js.map → payment-layout-CksJbGsl.js.map} +1 -1
- package/dist/payment-layout-O7TNw2Cr.cjs +2 -0
- package/dist/{payment-layout-DyILfyVG.cjs.map → payment-layout-O7TNw2Cr.cjs.map} +1 -1
- package/dist/search-modal-Db8Xp2L4.cjs +2 -0
- package/dist/{search-modal-B-pzGcfP.cjs.map → search-modal-Db8Xp2L4.cjs.map} +1 -1
- package/dist/search-modal-DdonKbwA.js +2 -0
- package/dist/{search-modal-b2AE5WEW.js.map → search-modal-DdonKbwA.js.map} +1 -1
- package/dist/sidebar-BCuXtop_.js +2 -0
- package/dist/sidebar-BCuXtop_.js.map +1 -0
- package/dist/sidebar-CQZlWCK4.cjs +2 -0
- package/dist/{sidebar-D5J2gcTw.cjs.map → sidebar-CQZlWCK4.cjs.map} +1 -1
- package/dist/{skeleton-DlRDNM97.js → skeleton-DAcbjBGp.js} +1 -1
- package/dist/{skeleton-DlRDNM97.js.map → skeleton-DAcbjBGp.js.map} +1 -1
- package/dist/{skeleton-CX1USu1w.cjs → skeleton-oQFT4xR2.cjs} +2 -2
- package/dist/{skeleton-CX1USu1w.cjs.map → skeleton-oQFT4xR2.cjs.map} +1 -1
- package/dist/systems/google.cjs +1 -1
- package/dist/systems/google.js +1 -1
- package/dist/tables-DbwtCMRI.js +4 -0
- package/dist/{tables-DWQytYNm.js.map → tables-DbwtCMRI.js.map} +1 -1
- package/dist/tables-DgZbLZQP.cjs +4 -0
- package/dist/{tables-CPKHe3k-.cjs.map → tables-DgZbLZQP.cjs.map} +1 -1
- package/dist/tanstack-form-C3SGhsmN.cjs +2 -0
- package/dist/tanstack-form-C3SGhsmN.cjs.map +1 -0
- package/dist/tanstack-form-Ds_Zjt20.js +2 -0
- package/dist/tanstack-form-Ds_Zjt20.js.map +1 -0
- package/dist/text-editor-DhTxCxvH.cjs +2 -0
- package/dist/{text-editor-CvJN3nSL.cjs.map → text-editor-DhTxCxvH.cjs.map} +1 -1
- package/dist/text-editor-DwisU9_U.js +2 -0
- package/dist/{text-editor-WbS7pJJs.js.map → text-editor-DwisU9_U.js.map} +1 -1
- package/dist/typography/paragraph.cjs +1 -1
- package/dist/typography/paragraph.d.cts +4 -4
- package/dist/typography/paragraph.d.ts +3 -3
- package/dist/typography/paragraph.js +1 -1
- package/dist/typography/title.cjs +1 -1
- package/dist/ui/alert-dialog.cjs +1 -1
- package/dist/ui/alert-dialog.d.cts +12 -12
- package/dist/ui/alert-dialog.d.ts +12 -12
- package/dist/ui/alert-dialog.js +1 -1
- package/dist/ui/alert.cjs +1 -1
- package/dist/ui/alert.d.cts +1 -1
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/alert.js +1 -1
- package/dist/ui/aspect-ratio.cjs +1 -1
- package/dist/ui/aspect-ratio.d.cts +2 -2
- package/dist/ui/aspect-ratio.d.ts +2 -2
- package/dist/ui/avatar.cjs +2 -1
- package/dist/ui/avatar.cjs.map +1 -0
- package/dist/ui/avatar.d.cts +4 -4
- package/dist/ui/avatar.d.ts +4 -4
- package/dist/ui/avatar.js +2 -1
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge.cjs +2 -1
- package/dist/ui/badge.cjs.map +1 -0
- package/dist/ui/badge.d.cts +42 -2
- package/dist/ui/badge.d.ts +42 -2
- package/dist/ui/badge.js +2 -1
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/breadcrumb.cjs +1 -1
- package/dist/ui/breadcrumb.cjs.map +1 -1
- package/dist/ui/breadcrumb.d.cts +8 -8
- package/dist/ui/breadcrumb.d.ts +8 -8
- package/dist/ui/breadcrumb.js +1 -1
- package/dist/ui/breadcrumb.js.map +1 -1
- package/dist/ui/button-group.cjs +1 -1
- package/dist/ui/button-group.cjs.map +1 -1
- package/dist/ui/button-group.d.cts +7 -7
- package/dist/ui/button-group.d.ts +7 -7
- package/dist/ui/button-group.js +1 -1
- package/dist/ui/button-group.js.map +1 -1
- package/dist/ui/button.cjs +2 -1
- package/dist/ui/button.cjs.map +1 -0
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/button.js +2 -1
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/buttons/add-new.cjs +1 -1
- package/dist/ui/buttons/add-new.cjs.map +1 -1
- package/dist/ui/buttons/add-new.js +1 -1
- package/dist/ui/buttons/add-new.js.map +1 -1
- package/dist/ui/buttons/edit.cjs +1 -1
- package/dist/ui/buttons/edit.cjs.map +1 -1
- package/dist/ui/buttons/edit.js +1 -1
- package/dist/ui/buttons/edit.js.map +1 -1
- package/dist/ui/buttons/refresh.cjs +1 -1
- package/dist/ui/buttons/refresh.cjs.map +1 -1
- package/dist/ui/buttons/refresh.js +1 -1
- package/dist/ui/buttons/refresh.js.map +1 -1
- package/dist/ui/buttons/trash.cjs +1 -1
- package/dist/ui/buttons/trash.cjs.map +1 -1
- package/dist/ui/buttons/trash.js +1 -1
- package/dist/ui/buttons/trash.js.map +1 -1
- package/dist/ui/buttons/upload-image.cjs +1 -1
- package/dist/ui/buttons/upload-image.cjs.map +1 -1
- package/dist/ui/buttons/upload-image.js +1 -1
- package/dist/ui/buttons/upload-image.js.map +1 -1
- package/dist/ui/calendar.cjs +2 -1
- package/dist/ui/calendar.cjs.map +1 -0
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/calendar.d.ts +4 -4
- package/dist/ui/calendar.js +2 -1
- package/dist/ui/calendar.js.map +1 -0
- package/dist/ui/card.cjs +1 -1
- package/dist/ui/card.d.cts +8 -8
- package/dist/ui/card.d.ts +8 -8
- package/dist/ui/card.js +1 -1
- package/dist/ui/carousel.cjs +1 -1
- package/dist/ui/carousel.cjs.map +1 -1
- package/dist/ui/carousel.d.cts +7 -7
- package/dist/ui/carousel.d.ts +7 -7
- package/dist/ui/carousel.js +1 -1
- package/dist/ui/carousel.js.map +1 -1
- package/dist/ui/checkbox.cjs +2 -1
- package/dist/ui/checkbox.cjs.map +1 -0
- package/dist/ui/checkbox.d.cts +2 -2
- package/dist/ui/checkbox.d.ts +2 -2
- package/dist/ui/checkbox.js +2 -1
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/collapsible.cjs +1 -1
- package/dist/ui/collapsible.d.cts +4 -4
- package/dist/ui/collapsible.d.ts +4 -4
- package/dist/ui/command.cjs +2 -1
- package/dist/ui/command.cjs.map +1 -0
- package/dist/ui/command.d.cts +11 -11
- package/dist/ui/command.d.ts +11 -11
- package/dist/ui/command.js +2 -1
- package/dist/ui/command.js.map +1 -0
- package/dist/ui/context-menu.cjs +1 -1
- package/dist/ui/context-menu.d.cts +16 -16
- package/dist/ui/context-menu.d.ts +16 -16
- package/dist/ui/dialog.cjs +2 -1
- package/dist/ui/dialog.cjs.map +1 -0
- package/dist/ui/dialog.d.cts +90 -2
- package/dist/ui/dialog.d.ts +90 -2
- package/dist/ui/dialog.js +2 -1
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/drawer.cjs +2 -1
- package/dist/ui/drawer.cjs.map +1 -0
- package/dist/ui/drawer.d.cts +11 -11
- package/dist/ui/drawer.d.ts +11 -11
- package/dist/ui/drawer.js +2 -1
- package/dist/ui/drawer.js.map +1 -0
- package/dist/ui/dropdown-menu.cjs +2 -1
- package/dist/ui/dropdown-menu.cjs.map +1 -0
- package/dist/ui/dropdown-menu.d.cts +16 -16
- package/dist/ui/dropdown-menu.d.ts +16 -16
- package/dist/ui/dropdown-menu.js +2 -1
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/empty.cjs +1 -1
- package/dist/ui/empty.d.cts +9 -9
- package/dist/ui/empty.d.ts +7 -7
- package/dist/ui/field.cjs +1 -1
- package/dist/ui/field.d.cts +22 -22
- package/dist/ui/field.d.ts +22 -22
- package/dist/ui/field.js +1 -1
- package/dist/ui/file-uploader.cjs +2 -2
- package/dist/ui/file-uploader.cjs.map +1 -1
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/file-uploader.d.ts +2 -2
- package/dist/ui/file-uploader.js +2 -2
- package/dist/ui/file-uploader.js.map +1 -1
- package/dist/ui/form.cjs +1 -1
- package/dist/ui/form.cjs.map +1 -1
- package/dist/ui/form.d.cts +10 -10
- package/dist/ui/form.d.ts +10 -10
- package/dist/ui/form.js +1 -1
- package/dist/ui/form.js.map +1 -1
- package/dist/ui/hover-card.cjs +1 -1
- package/dist/ui/hover-card.d.cts +4 -4
- package/dist/ui/hover-card.d.ts +4 -4
- package/dist/ui/image.cjs +2 -1
- package/dist/ui/image.cjs.map +1 -0
- package/dist/ui/image.js +2 -1
- package/dist/ui/image.js.map +1 -0
- package/dist/ui/input-otp.cjs +1 -1
- package/dist/ui/input-otp.d.cts +5 -5
- package/dist/ui/input-otp.d.ts +5 -5
- package/dist/ui/input-otp.js +1 -1
- package/dist/ui/input.cjs +2 -1
- package/dist/ui/input.cjs.map +1 -0
- package/dist/ui/input.d.cts +44 -2
- package/dist/ui/input.d.ts +44 -2
- package/dist/ui/input.js +2 -1
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/inputs/search-input.cjs +1 -1
- package/dist/ui/inputs/search-input.cjs.map +1 -1
- package/dist/ui/inputs/search-input.d.cts +3 -3
- package/dist/ui/inputs/search-input.d.ts +3 -3
- package/dist/ui/inputs/search-input.js +1 -1
- package/dist/ui/inputs/search-input.js.map +1 -1
- package/dist/ui/item.cjs +1 -1
- package/dist/ui/item.cjs.map +1 -1
- package/dist/ui/item.d.cts +15 -15
- package/dist/ui/item.d.ts +12 -12
- package/dist/ui/item.js +1 -1
- package/dist/ui/item.js.map +1 -1
- package/dist/ui/label.cjs +2 -1
- package/dist/ui/label.cjs.map +1 -0
- package/dist/ui/label.d.cts +2 -2
- package/dist/ui/label.d.ts +2 -2
- package/dist/ui/label.js +2 -1
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/menubar.cjs +1 -1
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/menubar.d.ts +17 -17
- package/dist/ui/multi-select.cjs +1 -1
- package/dist/ui/multi-select.cjs.map +1 -1
- package/dist/ui/multi-select.d.cts +3 -3
- package/dist/ui/multi-select.d.ts +6 -7
- package/dist/ui/multi-select.js +1 -1
- package/dist/ui/multi-select.js.map +1 -1
- package/dist/ui/navigation-menu.cjs +1 -1
- package/dist/ui/navigation-menu.d.cts +11 -11
- package/dist/ui/navigation-menu.d.ts +11 -11
- package/dist/ui/pagination.cjs +1 -1
- package/dist/ui/pagination.d.cts +9 -9
- package/dist/ui/pagination.d.ts +9 -9
- package/dist/ui/pagination.js +1 -1
- package/dist/ui/popover.cjs +2 -1
- package/dist/ui/popover.cjs.map +1 -0
- package/dist/ui/popover.d.cts +6 -6
- package/dist/ui/popover.d.ts +6 -6
- package/dist/ui/popover.js +2 -1
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/progress.cjs +2 -1
- package/dist/ui/progress.cjs.map +1 -0
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/progress.d.ts +2 -2
- package/dist/ui/progress.js +2 -1
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/radio-group.cjs +2 -1
- package/dist/ui/radio-group.cjs.map +1 -0
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/radio-group.d.ts +3 -3
- package/dist/ui/radio-group.js +2 -1
- package/dist/ui/radio-group.js.map +1 -0
- package/dist/ui/resizable.cjs +2 -1
- package/dist/ui/resizable.cjs.map +1 -0
- package/dist/ui/resizable.d.cts +9 -9
- package/dist/ui/resizable.d.ts +9 -9
- package/dist/ui/resizable.js +2 -1
- package/dist/ui/resizable.js.map +1 -0
- package/dist/ui/scroll-area.cjs +1 -1
- package/dist/ui/scroll-area.d.cts +5 -5
- package/dist/ui/scroll-area.d.ts +5 -5
- package/dist/ui/scroll-area.js +1 -1
- package/dist/ui/select.cjs +2 -1
- package/dist/ui/select.cjs.map +1 -0
- package/dist/ui/select.d.cts +9 -9
- package/dist/ui/select.d.ts +9 -9
- package/dist/ui/select.js +2 -1
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.cjs +2 -1
- package/dist/ui/separator.cjs.map +1 -0
- package/dist/ui/separator.d.cts +2 -2
- package/dist/ui/separator.d.ts +2 -2
- package/dist/ui/separator.js +2 -1
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/sheet.cjs +2 -1
- package/dist/ui/sheet.cjs.map +1 -0
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/sheet.d.ts +9 -9
- package/dist/ui/sheet.js +2 -1
- package/dist/ui/sheet.js.map +1 -0
- package/dist/ui/skeleton.cjs +1 -1
- package/dist/ui/skeleton.d.cts +2 -2
- package/dist/ui/skeleton.d.ts +2 -2
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.cjs +1 -1
- package/dist/ui/slider.d.cts +2 -2
- package/dist/ui/slider.d.ts +2 -2
- package/dist/ui/slider.js +1 -1
- package/dist/ui/sonner.cjs +1 -1
- package/dist/ui/sonner.d.cts +2 -2
- package/dist/ui/sonner.d.ts +2 -2
- package/dist/ui/spinner.cjs +2 -1
- package/dist/ui/spinner.cjs.map +1 -0
- package/dist/ui/spinner.d.cts +2 -2
- package/dist/ui/spinner.d.ts +2 -2
- package/dist/ui/spinner.js +2 -1
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/switch.cjs +2 -1
- package/dist/ui/switch.cjs.map +1 -0
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/switch.d.ts +2 -2
- package/dist/ui/switch.js +2 -1
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.cjs +1 -1
- package/dist/ui/table.d.cts +17 -17
- package/dist/ui/table.d.ts +17 -17
- package/dist/ui/table.js +1 -1
- package/dist/ui/tabs.cjs +1 -1
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/tabs.d.ts +5 -5
- package/dist/ui/textarea.cjs +2 -1
- package/dist/ui/textarea.cjs.map +1 -0
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/textarea.js +2 -1
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/toggle-group.cjs +1 -1
- package/dist/ui/toggle-group.cjs.map +1 -1
- package/dist/ui/toggle-group.d.cts +4 -4
- package/dist/ui/toggle-group.d.ts +4 -4
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle-group.js.map +1 -1
- package/dist/ui/toggle.cjs +1 -1
- package/dist/ui/toggle.d.cts +2 -2
- package/dist/ui/toggle.d.ts +3 -3
- package/dist/ui/tooltip.cjs +2 -1
- package/dist/ui/tooltip.cjs.map +1 -0
- package/dist/ui/tooltip.d.cts +5 -5
- package/dist/ui/tooltip.d.ts +5 -5
- package/dist/ui/tooltip.js +2 -1
- package/dist/ui/tooltip.js.map +1 -0
- package/package.json +97 -97
- package/dist/avatar-Hpj8lmux.js +0 -2
- package/dist/avatar-Hpj8lmux.js.map +0 -1
- package/dist/avatar-TyOphzGo.cjs +0 -2
- package/dist/avatar-TyOphzGo.cjs.map +0 -1
- package/dist/badge-CRpRXSuO.js +0 -2
- package/dist/badge-CRpRXSuO.js.map +0 -1
- package/dist/badge-D4c9IlYD.d.cts +0 -42
- package/dist/badge-DowUoI6w.d.ts +0 -42
- package/dist/badge-KW7xu5Ca.cjs +0 -2
- package/dist/badge-KW7xu5Ca.cjs.map +0 -1
- package/dist/button-C--DAN1D.cjs +0 -2
- package/dist/button-C--DAN1D.cjs.map +0 -1
- package/dist/button-LMMbL-uH.js +0 -2
- package/dist/button-LMMbL-uH.js.map +0 -1
- package/dist/calendar-4weBDnXz.cjs +0 -2
- package/dist/calendar-4weBDnXz.cjs.map +0 -1
- package/dist/calendar-DzPt7b6k.js +0 -2
- package/dist/calendar-DzPt7b6k.js.map +0 -1
- package/dist/checkbox-DLGDoU-1.js +0 -2
- package/dist/checkbox-DLGDoU-1.js.map +0 -1
- package/dist/checkbox-Dsq-MSbH.cjs +0 -2
- package/dist/checkbox-Dsq-MSbH.cjs.map +0 -1
- package/dist/chunk-350yNsax.cjs +0 -1
- package/dist/cms-layout-BCH4NroR.cjs +0 -2
- package/dist/cms-layout-tPwrgJZc.js +0 -2
- package/dist/command-2gUejA6g.js +0 -2
- package/dist/command-2gUejA6g.js.map +0 -1
- package/dist/command-CsP8a1Un.cjs +0 -2
- package/dist/command-CsP8a1Un.cjs.map +0 -1
- package/dist/date-BIqCFM1Z.js +0 -2
- package/dist/date-BIqCFM1Z.js.map +0 -1
- package/dist/date-D4NVl6C9.cjs +0 -2
- package/dist/date-D4NVl6C9.cjs.map +0 -1
- package/dist/dialog-AcOtFuF4.d.ts +0 -90
- package/dist/dialog-BLjShZci.d.cts +0 -90
- package/dist/dialog-BigPrWIj.cjs +0 -2
- package/dist/dialog-BigPrWIj.cjs.map +0 -1
- package/dist/dialog-CmutQ3rp.js +0 -2
- package/dist/dialog-CmutQ3rp.js.map +0 -1
- package/dist/dist-Cx5ufCdr.cjs +0 -2
- package/dist/dist-Cx5ufCdr.cjs.map +0 -1
- package/dist/dist-EPxjIRJp.js +0 -2
- package/dist/dist-EPxjIRJp.js.map +0 -1
- package/dist/drawer-B3qXaN5p.js +0 -2
- package/dist/drawer-B3qXaN5p.js.map +0 -1
- package/dist/drawer-BB8BZzDG.cjs +0 -2
- package/dist/drawer-BB8BZzDG.cjs.map +0 -1
- package/dist/dropdown-menu-CVh520yG.cjs +0 -2
- package/dist/dropdown-menu-CVh520yG.cjs.map +0 -1
- package/dist/dropdown-menu-DeHCVyby.js +0 -2
- package/dist/dropdown-menu-DeHCVyby.js.map +0 -1
- package/dist/field-BrlETeXX.cjs +0 -2
- package/dist/field-DpoKF1nY.js +0 -2
- package/dist/image-BpTuF_1w.js +0 -2
- package/dist/image-BpTuF_1w.js.map +0 -1
- package/dist/image-W_Yb0xTB.cjs +0 -2
- package/dist/image-W_Yb0xTB.cjs.map +0 -1
- package/dist/input-Aa-GQW2V.d.cts +0 -44
- package/dist/input-B1Wc5jsb.d.ts +0 -44
- package/dist/input-DAfP6LZ7.js +0 -2
- package/dist/input-DAfP6LZ7.js.map +0 -1
- package/dist/input-WJ0DLHTR.cjs +0 -2
- package/dist/input-WJ0DLHTR.cjs.map +0 -1
- package/dist/label-B8cAG2kc.js +0 -2
- package/dist/label-B8cAG2kc.js.map +0 -1
- package/dist/label-CC6fXVbC.cjs +0 -2
- package/dist/label-CC6fXVbC.cjs.map +0 -1
- package/dist/payment-layout-DyILfyVG.cjs +0 -2
- package/dist/payment-layout-giaGvs8T.js +0 -2
- package/dist/popover-6233wU1s.js +0 -2
- package/dist/popover-6233wU1s.js.map +0 -1
- package/dist/popover-DBsC8Ltp.cjs +0 -2
- package/dist/popover-DBsC8Ltp.cjs.map +0 -1
- package/dist/progress-AYknlEgK.js +0 -2
- package/dist/progress-AYknlEgK.js.map +0 -1
- package/dist/progress-gvBqNiHp.cjs +0 -2
- package/dist/progress-gvBqNiHp.cjs.map +0 -1
- package/dist/radio-group-ImoBjpqZ.js +0 -2
- package/dist/radio-group-ImoBjpqZ.js.map +0 -1
- package/dist/radio-group-_TdMkv8w.cjs +0 -2
- package/dist/radio-group-_TdMkv8w.cjs.map +0 -1
- package/dist/resizable-C-M-mu6b.js +0 -2
- package/dist/resizable-C-M-mu6b.js.map +0 -1
- package/dist/resizable-sgpaHAb8.cjs +0 -2
- package/dist/resizable-sgpaHAb8.cjs.map +0 -1
- package/dist/search-modal-B-pzGcfP.cjs +0 -2
- package/dist/search-modal-b2AE5WEW.js +0 -2
- package/dist/select-CWLQHh8x.cjs +0 -2
- package/dist/select-CWLQHh8x.cjs.map +0 -1
- package/dist/select-CryLzZA0.js +0 -2
- package/dist/select-CryLzZA0.js.map +0 -1
- package/dist/separator-BM8hA4DP.js +0 -2
- package/dist/separator-BM8hA4DP.js.map +0 -1
- package/dist/separator-KuymG9g0.cjs +0 -2
- package/dist/separator-KuymG9g0.cjs.map +0 -1
- package/dist/sheet-CvKSi0UC.cjs +0 -2
- package/dist/sheet-CvKSi0UC.cjs.map +0 -1
- package/dist/sheet-DGXXYgWB.js +0 -2
- package/dist/sheet-DGXXYgWB.js.map +0 -1
- package/dist/sidebar-BDrsbzo5.js +0 -2
- package/dist/sidebar-BDrsbzo5.js.map +0 -1
- package/dist/sidebar-D5J2gcTw.cjs +0 -2
- package/dist/spinner-C1eamx3w.js +0 -2
- package/dist/spinner-C1eamx3w.js.map +0 -1
- package/dist/spinner-CFxorYEt.cjs +0 -2
- package/dist/spinner-CFxorYEt.cjs.map +0 -1
- package/dist/statistic-CYMqAYNc.js +0 -2
- package/dist/statistic-CYMqAYNc.js.map +0 -1
- package/dist/statistic-DDXilD7q.cjs +0 -2
- package/dist/statistic-DDXilD7q.cjs.map +0 -1
- package/dist/switch-BLHmdRq2.js +0 -2
- package/dist/switch-BLHmdRq2.js.map +0 -1
- package/dist/switch-DVfOV7wP.cjs +0 -2
- package/dist/switch-DVfOV7wP.cjs.map +0 -1
- package/dist/tables-CPKHe3k-.cjs +0 -4
- package/dist/tables-DWQytYNm.js +0 -4
- package/dist/tanstack-form-DatI41wz.cjs +0 -12
- package/dist/tanstack-form-DatI41wz.cjs.map +0 -1
- package/dist/tanstack-form-YVdm9V01.js +0 -12
- package/dist/tanstack-form-YVdm9V01.js.map +0 -1
- package/dist/text-editor-CvJN3nSL.cjs +0 -2
- package/dist/text-editor-WbS7pJJs.js +0 -2
- package/dist/textarea-Bp6VvhiA.js +0 -2
- package/dist/textarea-Bp6VvhiA.js.map +0 -1
- package/dist/textarea-Cc9CF8wD.cjs +0 -2
- package/dist/textarea-Cc9CF8wD.cjs.map +0 -1
- package/dist/tooltip-CBdoIzoM.cjs +0 -2
- package/dist/tooltip-CBdoIzoM.cjs.map +0 -1
- package/dist/tooltip-CVIl6Hln.js +0 -2
- package/dist/tooltip-CVIl6Hln.js.map +0 -1
- package/dist/types-BD1t0Bj8.cjs +0 -2
- package/dist/types-BD1t0Bj8.cjs.map +0 -1
- package/dist/types-BVSfF-1o.d.ts +0 -24
- package/dist/types-BZqffRVJ.js +0 -2
- package/dist/types-BZqffRVJ.js.map +0 -1
- package/dist/types-Cc_mLRAn.d.cts +0 -24
- package/dist/user-BSpgswEC.js +0 -2
- package/dist/user-BSpgswEC.js.map +0 -1
- package/dist/user-ii4FBhO1.cjs +0 -2
- package/dist/user-ii4FBhO1.cjs.map +0 -1
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const e=require(`./chunk-350yNsax.cjs`),t=require(`./button-C--DAN1D.cjs`),n=require(`./tooltip-CBdoIzoM.cjs`),r=require(`./separator-KuymG9g0.cjs`),i=require(`./close-Dlo1bI8x.cjs`),a=require(`./dialog-BigPrWIj.cjs`),o=require(`./command-CsP8a1Un.cjs`),s=require(`./checkbox-Dsq-MSbH.cjs`),c=require(`./input-WJ0DLHTR.cjs`),l=require(`./label-CC6fXVbC.cjs`),u=require(`./popover-DBsC8Ltp.cjs`),d=require(`./select-CWLQHh8x.cjs`),f=require(`./switch-DVfOV7wP.cjs`),p=require(`./drawer-BB8BZzDG.cjs`),m=require(`./calendar-4weBDnXz.cjs`),h=require(`./radio-group-_TdMkv8w.cjs`),g=require(`./textarea-Cc9CF8wD.cjs`),_=require(`./text-editor-CvJN3nSL.cjs`);let v=require(`lucide-react`),y=require(`react`),b=require(`@customafk/react-toolkit/utils`),x=require(`class-variance-authority`),S=require(`react/jsx-runtime`),C=require(`@customafk/react-toolkit/date-fns`),w=require(`radix-ui`),T=require(`@customafk/react-toolkit/hooks/useMobile`),E=require(`@tanstack/react-form`);function D({width:e,className:t,children:n}){let r=e?{width:typeof e==`number`?`${e}px`:e,flexShrink:0}:{flex:1,minWidth:0};return(0,S.jsx)(`div`,{"data-slot":`array-col`,style:r,className:t,children:n})}function O({className:e,children:t}){return(0,S.jsxs)(`div`,{"data-slot":`array-header-row`,className:(0,b.cn)(`mb-1 flex items-center gap-2 px-1 text-xs font-medium text-text-positive-weak`,e),children:[t,(0,S.jsx)(`div`,{className:`min-w-8 w-8 shrink-0`})]})}function k({defaultRow:e,children:n,addLabel:r=`Thêm hàng`,className:i}){let a=Q(),o=a.state.value??[],s=(0,y.useCallback)(()=>{a.pushValue({...e})},[a,e]),c=(0,y.useCallback)(e=>{a.removeValue(e)},[a]);return(0,S.jsxs)(`div`,{"data-slot":`simple-array-field`,className:(0,b.cn)(`flex flex-col gap-2`,i),children:[o.map((e,r)=>(0,S.jsxs)(`div`,{className:`flex items-start gap-2`,children:[n(r),(0,S.jsx)(t.t,{type:`button`,size:`icon`,variant:`ghost`,color:`danger`,className:`min-w-8`,onClick:()=>c(r),children:(0,S.jsx)(v.Trash2Icon,{size:14})})]},r)),(0,S.jsx)(`div`,{children:(0,S.jsxs)(t.t,{type:`button`,variant:`outline`,color:`muted`,size:`xs`,onClick:s,children:[(0,S.jsx)(v.PlusIcon,{size:13}),r]})})]})}
|
|
2
|
-
/**
|
|
3
|
-
* @license React
|
|
4
|
-
* use-sync-external-store-shim.production.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/
|
|
11
|
-
var A=e.t((e=>{var t=require(`react`);function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),j=e.t((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}function n(e,t){d||a.startTransition===void 0||(d=!0,console.error(`You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.`));var n=t();if(!f){var i=t();o(n,i)||(console.error(`The result of getSnapshot should be cached to avoid an infinite loop`),f=!0)}i=s({inst:{value:n,getSnapshot:t}});var p=i[0].inst,m=i[1];return l(function(){p.value=n,p.getSnapshot=t,r(p)&&m({inst:p})},[e,n,t]),c(function(){return r(p)&&m({inst:p}),e(function(){r(p)&&m({inst:p})})},[e]),u(n),n}function r(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch{return!0}}function i(e,t){return t()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=require(`react`),o=typeof Object.is==`function`?Object.is:t,s=a.useState,c=a.useEffect,l=a.useLayoutEffect,u=a.useDebugValue,d=!1,f=!1,p=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?i:n;e.useSyncExternalStore=a.useSyncExternalStore===void 0?p:a.useSyncExternalStore,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),M=e.t(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=A():t.exports=j()})),N=e.t((e=>{var t=require(`react`),n=M();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),P=e.t((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=require(`react`),r=M(),i=typeof Object.is==`function`?Object.is:t,a=r.useSyncExternalStore,o=n.useRef,s=n.useEffect,c=n.useMemo,l=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),F=e.t(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=N():t.exports=P()})),I=F();function L(e,t){return e===t}function R(e,t=e=>e,n){let r=n?.compare??L,i=(0,y.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,y.useCallback)(()=>e.get(),[e]);return(0,I.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function z({className:e,children:t,...n}){return(0,S.jsxs)(w.Label.Root,{"data-slot":`label`,className:(0,b.cn)(`text-text-positive`,`flex w-full items-center justify-between`,`select-none font-medium text-sm/6 leading-none`,`group-data-[disabled=true]:pointer-events-none`,`group-data-[disabled=true]:opacity-50`,`peer-disabled:cursor-not-allowed`,`peer-disabled:opacity-50`,`aria-required:*:data-[slot=required-indicator]:inline-block`,e),...n,children:[(0,S.jsx)(`span`,{className:`flex items-center gap-1`,children:t}),(0,S.jsx)(`span`,{"data-slot":`required-indicator`,className:`hidden shrink-0 rounded-lg bg-danger-strong px-1.5 py-1 font-semibold text-[11px] leading-none text-white`,children:`Bắt buộc`})]})}const ee=(0,x.cva)(`group/field flex w-full gap-2 data-[invalid=true]:text-danger *:data-[slot=field-content]:gap-0`,{variants:{orientation:{vertical:[`flex-col *:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center gap-4`,`*:data-[slot=field-content]:basis-1/2`,`*:data-[slot=field-content-main]:flex-1`,`*:data-[slot=field-label]:flex-auto`,`has-[>[data-slot=field-content]]:items-start`,`has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col *:w-full [&>.sr-only]:w-auto`,`@md/field-group:flex-row`,`@md/field-group:items-center`,`@md/field-group:gap-4`,`@md/field-group:*:w-auto`,`@md/field-group:*:data-[slot=field-content]:basis-1/2`,`@md/field-group:*:data-[slot=field-content-main]:basis-1/2`,`@md/field-group:*:data-[slot=field-label]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start`,`@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}}),te=(0,y.memo)(({className:e,...t})=>(0,S.jsx)(`fieldset`,{"data-slot":`field-set`,className:(0,b.cn)(`flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));te.displayName=`FieldSet`;const B=(0,y.memo)(({className:e,variant:t=`legend`,...n})=>(0,S.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:(0,b.cn)(`mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n}));B.displayName=`FieldLegend`;const V=(0,y.memo)(({className:e,...t})=>(0,S.jsx)(`div`,{"data-slot":`field-group`,className:(0,b.cn)(`group/field-group @container/field-group`,`flex flex-col gap-7 pt-4`,`data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t}));V.displayName=`FieldGroup`;const H=(0,y.memo)(({className:e,orientation:t=`vertical`,...n})=>(0,S.jsx)(`div`,{"data-slot":`field`,"data-orientation":t,className:(0,b.cn)(ee({orientation:t}),e),...n}));H.displayName=`Field`;const U=(0,y.memo)(({className:e,...t})=>(0,S.jsx)(`div`,{"data-slot":`field-content`,className:(0,b.cn)(`group/field-content flex flex-col gap-1.5 leading-snug`,e),...t}));U.displayName=`FieldContent`;const W=(0,y.memo)(({className:e,...t})=>(0,S.jsx)(`div`,{"data-slot":`field-content-main`,className:(0,b.cn)(`relative`,e),...t}));W.displayName=`FieldContentMain`;const G=(0,y.memo)(({className:e,...t})=>(0,S.jsx)(z,{"data-slot":`field-label`,className:(0,b.cn)(`group/field-label peer/field-label min-h-6 gap-1 font-medium leading-snug`,`has-[>[data-slot=field]]:w-full`,`has-[>[data-slot=field]]:flex-col`,`has-[>[data-slot=field]]:rounded-md`,`has-[>[data-slot=field]]:border`,`has-[>[data-slot=field]]:border-border`,`has-data-[state=checked]:border-primary`,`*:data-[slot=field]:p-4 group-data-[disabled=true]/field:opacity-50`,e),...t}));G.displayName=`FieldLabel`;const K=(0,y.memo)(({className:e,...t})=>(0,S.jsx)(`div`,{"data-slot":`field-label`,className:(0,b.cn)(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));K.displayName=`FieldTitle`;const q=(0,y.memo)(({className:e,...t})=>(0,S.jsx)(`p`,{"data-slot":`field-description`,className:(0,b.cn)(`nth-last-2:-mt-1 font-normal text-text-positive-weak text-xs leading-normal last:mt-0 [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4 [[data-variant=legend]+&]:-mt-1.5`,e),...t}));q.displayName=`FieldDescription`;const J=(0,y.memo)(({isShow:e=!0,className:t,children:n,...r})=>e===!1?null:(0,S.jsxs)(`div`,{"data-slot":`field-note`,className:(0,b.cn)(`flex items-start gap-1.5 rounded border border-primary-muted/60 bg-primary-bg-subtle/80 px-2.5 py-2 text-text-positive-weak text-xs`,t),...r,children:[(0,S.jsx)(v.InfoIcon,{size:12,className:`mt-0.5 shrink-0 text-primary/70`}),(0,S.jsx)(`span`,{children:n})]}));J.displayName=`FieldNote`;const Y=(0,y.memo)(({tooltip:e})=>(0,S.jsxs)(n.t,{children:[(0,S.jsx)(n.i,{asChild:!0,children:(0,S.jsxs)(`button`,{type:`button`,tabIndex:-1,className:`inline-flex cursor-default items-center text-text-positive-weak/70 hover:text-text-positive focus:outline-none`,children:[(0,S.jsx)(v.HelpCircleIcon,{size:13,"aria-hidden":`true`}),(0,S.jsx)(`span`,{className:`sr-only`,children:`Thêm thông tin`})]})}),(0,S.jsx)(n.n,{side:`top`,className:`max-w-xs text-balance`,children:e})]}));Y.displayName=`FieldTooltip`;const X=(0,y.memo)(({children:e,className:t,...n})=>(0,S.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:(0,b.cn)(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,t),...n,children:[(0,S.jsx)(r.t,{className:`absolute inset-0 top-1/2`}),e&&(0,S.jsx)(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));X.displayName=`FieldSeparator`;const Z=(0,y.memo)(({className:e,children:t,errors:n,requiredMessage:r=`Trường này là bắt buộc`,...i})=>{let a=(0,y.useMemo)(()=>{let e=e=>e.code===`invalid_type`?r:e.message;return t||(n?n?.length===1&&n[0]?.message?(0,S.jsx)(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:(0,S.jsx)(`p`,{children:e(n[0])})}):(0,S.jsx)(`ul`,{className:`flex list-none flex-col`,children:n.map(t=>typeof t==`string`?(0,S.jsx)(`li`,{children:t},t):t?.message?(0,S.jsx)(`li`,{children:e(t)},t.code??t.message):null)}):null)},[t,n,r]);return a?(0,S.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:(0,b.cn)(`w-full font-medium text-danger-strong text-xs`,e),...i,children:a}):null});Z.displayName=`FieldError`;const ne=({label:e,required:t,disabled:n,variant:r=`checkbox`})=>{let i=(0,y.useId)(),{form:a,name:o,state:c,handleBlur:u,handleChange:d}=Q(),p=R(a.store,({isSubmitting:e})=>e),m=c.meta.isTouched&&!c.meta.isValid,h=c.value??!1,g=n||p,_=(0,y.useCallback)(e=>{p||d(e)},[p,d]);return(0,S.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2 h-9`,children:[r===`switch`?(0,S.jsx)(f.t,{id:i,name:o,checked:h,disabled:g,"aria-invalid":m,onBlur:u,onCheckedChange:_}):(0,S.jsx)(s.t,{id:i,name:o,checked:h,disabled:g,"aria-invalid":m,onBlur:u,onCheckedChange:_}),e&&(0,S.jsxs)(l.t,{htmlFor:i,className:`cursor-pointer`,children:[e,t&&(0,S.jsx)(`span`,{className:`text-danger-strong`,children:`*`})]})]}),m&&(0,S.jsx)(Z,{errors:c.meta.errors})]})},re=({label:e,placeholder:n,required:r,disabled:i,options:a})=>{let s=(0,y.useId)(),{form:c,name:d,state:f,handleBlur:m,handleChange:h}=Q(),g=R(c.store,({isSubmitting:e})=>e),_=(0,T.useIsMobile)(),[v,x]=(0,y.useState)(!1),C=f.meta.isTouched&&!f.meta.isValid,w=i||g,E=a.find(({value:e})=>e===f.value)?.label,D=(0,S.jsxs)(o.t,{children:[(0,S.jsx)(o.a,{placeholder:n??`Tìm kiếm…`}),(0,S.jsxs)(o.s,{children:[(0,S.jsx)(o.r,{children:`Không tìm thấy kết quả.`}),(0,S.jsx)(o.i,{children:a.map(e=>(0,S.jsx)(o.o,{value:e.label,onSelect:()=>{h(e.value===f.value?null:e.value),x(!1)},children:e.label},e.value))})]})]});return _?(0,S.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e&&(0,S.jsxs)(l.t,{htmlFor:s,children:[e,r&&(0,S.jsx)(`span`,{className:`text-danger-strong`,children:`*`})]}),(0,S.jsx)(t.t,{id:s,type:`button`,variant:`outline`,color:`muted`,disabled:w,"aria-invalid":C,className:(0,b.cn)(`w-full justify-start font-normal outline-1 outline-border -outline-offset-1`,!f.value&&`text-text-positive-muted`,C&&`outline-danger bg-danger-bg-subtle`),onBlur:m,onClick:()=>x(!0),children:E??(0,S.jsx)(`span`,{className:`text-text-positive-muted`,children:n})}),(0,S.jsx)(p.t,{open:v,onOpenChange:x,direction:`bottom`,children:(0,S.jsxs)(p.r,{children:[(0,S.jsx)(p.o,{children:(0,S.jsx)(p.l,{children:e??n??`Tìm kiếm…`})}),(0,S.jsx)(`div`,{className:`overflow-y-auto pb-safe-bottom`,children:D})]})}),C&&(0,S.jsx)(Z,{errors:f.meta.errors})]}):(0,S.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e&&(0,S.jsxs)(l.t,{htmlFor:s,children:[e,r&&(0,S.jsx)(`span`,{className:`text-danger-strong`,children:`*`})]}),(0,S.jsxs)(u.t,{children:[(0,S.jsx)(u.a,{asChild:!0,children:(0,S.jsx)(t.t,{id:s,variant:`outline`,color:`muted`,size:`lg`,disabled:w,"aria-invalid":C,className:(0,b.cn)(`flex w-full items-center justify-start rounded outline-border font-normal`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:outline-1 data-[state=open]:outline-primary-strong data-[state=open]:ring-4 data-[state=open]:ring-primary-weak`,!f.value&&`text-text-positive-muted`),children:E??(0,S.jsx)(`span`,{className:`text-text-positive-muted`,children:n})})}),(0,S.jsx)(u.i,{align:`start`,side:`bottom`,className:`w-[--radix-popover-trigger-width] p-0 rounded`,onBlur:m,children:D})]}),C&&(0,S.jsx)(Z,{errors:f.meta.errors})]})},ie=({label:e,placeholder:n,required:r,disabled:i,minDate:a,maxDate:o})=>{let s=(0,y.useId)(),{form:c,name:d,state:f,handleBlur:p,handleChange:h}=Q(),g=R(c.store,({isSubmitting:e})=>e),_=f.meta.isTouched&&!f.meta.isValid;return(0,S.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e&&(0,S.jsxs)(l.t,{htmlFor:s,children:[e,r&&(0,S.jsx)(`span`,{className:`text-danger-strong`,children:`*`})]}),(0,S.jsxs)(u.t,{children:[(0,S.jsx)(u.a,{asChild:!0,children:(0,S.jsxs)(t.t,{id:s,variant:`outline`,color:`muted`,size:`lg`,disabled:i||g,"aria-invalid":_,className:(0,b.cn)(`flex w-full items-center justify-between rounded outline-border font-normal`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:outline-1 data-[state=open]:outline-primary-strong data-[state=open]:ring-4 data-[state=open]:ring-primary-weak`,f.value===null&&`text-text-positive-muted`),children:[(0,S.jsx)(`span`,{children:f.value?(0,C.format)(f.value,`PPP`):n??`Select date`}),(0,S.jsx)(v.CalendarDaysIcon,{strokeWidth:1})]})}),(0,S.jsx)(u.i,{align:`start`,side:`bottom`,className:`w-fit p-0 rounded`,onBlur:p,children:(0,S.jsx)(m.t,{mode:`single`,selected:f.value??void 0,hidden:{before:a??new Date(1900,0,1),after:o??new Date(2100,11,31)},onSelect:e=>{e&&h(e)}})})]}),_&&(0,S.jsx)(Z,{errors:f.meta.errors})]})},ae=({label:e,required:t,disabled:n,options:r,orientation:i=`vertical`})=>{let{form:a,name:o,state:s,handleBlur:c,handleChange:u}=Q(),d=R(a.store,({isSubmitting:e})=>e),f=s.meta.isTouched&&!s.meta.isValid,p=n||d;return(0,S.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e&&(0,S.jsxs)(l.t,{children:[e,t&&(0,S.jsx)(`span`,{className:`text-danger-strong`,children:`*`})]}),(0,S.jsx)(h.t,{name:o,value:s.value??``,disabled:p,"aria-invalid":f,className:i===`horizontal`?`flex flex-row flex-wrap gap-x-4 gap-y-2`:`flex flex-col gap-2`,onValueChange:u,onBlur:c,children:r.map(e=>(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsx)(h.n,{id:`${o}-${e.value}`,value:e.value}),(0,S.jsx)(l.t,{htmlFor:`${o}-${e.value}`,className:`cursor-pointer font-normal`,children:e.label})]},e.value))}),f&&(0,S.jsx)(Z,{errors:s.meta.errors})]})},oe=({label:e,placeholder:t,required:n,maxLength:r,disabled:i})=>{let a=(0,y.useId)(),{form:o,name:s,state:u,handleBlur:d,handleChange:f}=Q(),p=R(o.store,({isSubmitting:e})=>e),m=u.meta.isTouched&&!u.meta.isValid,h=(0,y.useCallback)(({target:{value:e}})=>{p||r&&e.length>r||f(e||null)},[p,r,f]);return(0,S.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e&&(0,S.jsxs)(l.t,{htmlFor:a,children:[e,n&&(0,S.jsx)(`span`,{className:`text-danger-strong`,children:`*`})]}),(0,S.jsxs)(`div`,{className:`relative`,children:[(0,S.jsx)(c.t,{id:a,name:s,type:`email`,value:u.value??``,"aria-invalid":m,autoComplete:`email`,placeholder:t,disabled:i||p,className:(0,b.cn)(`pl-9`),onBlur:d,onChange:h}),(0,S.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 left-0 flex size-9 items-center justify-center text-muted`,children:(0,S.jsx)(v.AtSignIcon,{size:14})})]}),m&&(0,S.jsx)(Z,{errors:u.meta.errors})]})},se=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,ce=e=>Number(e).toLocaleString(),le=(e,t,n)=>{if(n===`none`)return e;let r=10**t,i=e*r;switch(n){case`up`:return Math.ceil(i)/r;case`down`:return Math.floor(i)/r;case`nearest`:return i%1<.1?Math.floor(i)/r:i%1>=.59?Math.ceil(i)/r:(Math.floor(i)+.5)/r;default:return e}},ue=({disabled:e=!1,readOnly:t=!1,allowNegative:n=!1,numberAfterDecimalPoint:r=2,roundingRule:i=`none`,value:a=null,unitText:o,decimal:s,placeholder:l,precision:u,wrapperClassName:d,className:f,onChange:p,onValueChange:m,onFocus:h,onBlur:g,..._})=>{let v=(0,y.useRef)(null),x=(0,y.useRef)(null),[C,w]=(0,y.useState)(a?.toString()??null),T=(0,y.useMemo)(()=>s?.[1]??r,[s,r]),E=(0,y.useMemo)(()=>s&&s[0]-s[1],[s]),D=(0,y.useMemo)(()=>se(n),[n]),O=(0,y.useCallback)(e=>{if(!T||e===`-`)return!0;let[t,n=``]=e.split(`.`),r=t.startsWith(`-`)?t.length-1:t.length;return n.length<=T&&r<=(E??1/0)},[T,E]),k=(0,y.useCallback)(e=>{if(e===`0`)return`0`;if(!Number(e))return null;let[t,n=``]=le(parseFloat(e),Math.min(T-1,u||0),i).toString().split(`.`),r=ce(t);return n?`${r}.${n}`:r},[T,u,i]),A=(0,y.useCallback)(e=>{let t=e===`0`,n=e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e);if(t){m?.(0),w(e);return}if(n){w(()=>(m?.(0),e));return}},[m]),j=(0,y.useCallback)(e=>{p?.(e);let{value:t}=e.target;if(t===``||t===void 0){m?.(null),w(null);return}A(t),!(!D.test(t)||!O(t))&&(m?.(parseFloat(t)||0),w(t))},[O,p,m,A,D]),M=(0,y.useCallback)(e=>{t||(h?.(e),w(e=>typeof e==`string`?e.replace(/,/g,``):null))},[t,h]),N=(0,y.useCallback)(e=>{t||(g?.(e),w(e=>e===null?null:e===`0`||e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e)?`0`:typeof e==`string`?k(e):null))},[t,k,g]);return(0,y.useEffect)(()=>{let e=document.activeElement===x.current;if(a==null||!D.test(a.toString())||!O(a.toString())){w(null);return}w(t=>e?t:k(a.toString()))},[k,a,O,D]),(0,y.useEffect)(()=>{if(!v.current||!x.current||!o)return;let e=v.current.offsetWidth;x.current.style.setProperty(`padding-right`,`${(e+10)/16}rem`)},[o]),(0,S.jsxs)(`div`,{className:(0,b.cn)(`relative`,d),children:[(0,S.jsx)(c.t,{..._,ref:x,value:C||(t?`0`:``),placeholder:l,disabled:e,readOnly:t,className:(0,b.cn)(`text-end font-number text-sm slashed-zero lining-nums tabular-nums`,t&&`bg-muted text-muted-foreground`,f),onChange:j,onFocus:M,onBlur:N}),o&&(0,S.jsx)(`span`,{ref:v,className:`-translate-y-1/2 pointer-events-none absolute top-1/2 right-2 text-muted-foreground text-sm`,children:o})]})},de=({label:e,placeholder:t,required:n,unit:r,allowNegative:i,disabled:a})=>{let o=(0,y.useId)(),{form:s,state:c,handleBlur:u,handleChange:d}=Q(),f=R(s.store,({isSubmitting:e})=>e),p=c.meta.isTouched&&!c.meta.isValid,m=(0,y.useCallback)(e=>{f||d(e)},[f,d]);return(0,S.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e&&(0,S.jsxs)(l.t,{htmlFor:o,children:[e,n&&(0,S.jsx)(`span`,{className:`text-danger-strong`,children:`*`})]}),(0,S.jsx)(ue,{id:o,value:c.value,placeholder:t,unitText:r,allowNegative:i,disabled:a||f,onBlur:u,onValueChange:m}),p&&(0,S.jsx)(Z,{errors:c.meta.errors})]})},fe=({label:e,placeholder:t,required:n,disabled:r})=>{let i=(0,y.useId)(),{form:a,name:o,state:s,handleBlur:u,handleChange:d}=Q(),f=R(a.store,({isSubmitting:e})=>e),[p,m]=(0,y.useState)(!1),h=s.meta.isTouched&&!s.meta.isValid,g=(0,y.useCallback)(()=>m(e=>!e),[]),_=(0,y.useCallback)(({target:{value:e}})=>{f||d(e||null)},[f,d]);return(0,S.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e&&(0,S.jsxs)(l.t,{htmlFor:i,children:[e,n&&(0,S.jsx)(`span`,{className:`text-danger-strong`,children:`*`})]}),(0,S.jsxs)(`div`,{className:`relative`,children:[(0,S.jsx)(c.t,{id:i,name:o,type:p?`text`:`password`,value:s.value??``,"aria-invalid":h,autoComplete:`current-password`,placeholder:t,disabled:r||f,className:`pr-9`,onBlur:u,onChange:_}),(0,S.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":p?`Ẩn mật khẩu`:`Hiện mật khẩu`,"aria-pressed":p,"aria-controls":i,className:`absolute inset-y-0 right-0 flex size-9 items-center justify-center text-muted outline-none transition-colors hover:text-text-positive focus-visible:text-text-positive disabled:pointer-events-none disabled:opacity-50`,disabled:r||f,onClick:g,children:p?(0,S.jsx)(v.EyeOffIcon,{size:16,"aria-hidden":`true`}):(0,S.jsx)(v.EyeIcon,{size:16,"aria-hidden":`true`})})]}),h&&(0,S.jsx)(Z,{errors:s.meta.errors})]})},pe=({label:e,placeholder:n,required:r,options:i})=>{let a=(0,y.useId)(),{state:o,handleBlur:s,handleChange:c}=Q(),u=(0,T.useIsMobile)(),[f,m]=(0,y.useState)(!1),h=o.meta.isTouched&&!o.meta.isValid,g=i.find(e=>e.value===o.value)?.label;return u?(0,S.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e&&(0,S.jsxs)(l.t,{htmlFor:a,children:[e,r&&(0,S.jsx)(`span`,{className:`text-danger-strong`,children:`*`})]}),(0,S.jsx)(t.t,{id:a,type:`button`,variant:`outline`,color:`muted`,className:(0,b.cn)(`w-full justify-start font-normal outline-1 outline-border -outline-offset-1`,!o.value&&`text-text-positive-muted`,h&&`outline-danger bg-danger-bg-subtle`),"aria-invalid":h,onBlur:s,onClick:()=>m(!0),children:g??(0,S.jsx)(`span`,{className:`text-text-positive-muted`,children:n})}),(0,S.jsx)(p.t,{open:f,onOpenChange:m,direction:`bottom`,children:(0,S.jsxs)(p.r,{children:[(0,S.jsx)(p.o,{children:(0,S.jsx)(p.l,{children:e??n??`Select an option`})}),(0,S.jsx)(`div`,{className:`flex flex-col overflow-y-auto pb-safe-bottom`,children:i.length>0?i.map(e=>(0,S.jsx)(p.n,{asChild:!0,children:(0,S.jsx)(`button`,{type:`button`,className:(0,b.cn)(`flex w-full items-center px-4 py-3 text-left text-sm transition-colors`,`hover:bg-muted-muted active:bg-muted-muted`,o.value===e.value&&`bg-primary-bg-subtle font-medium text-primary`),onClick:()=>{c(e.value),m(!1)},children:e.label})},e.value)):(0,S.jsxs)(`div`,{className:`flex items-center justify-center gap-x-2 px-4 py-8 text-center text-sm text-text-positive-weak`,children:[(0,S.jsx)(v.PackagePlusIcon,{strokeWidth:1}),`No options available`]})})]})}),h&&(0,S.jsx)(Z,{errors:o.meta.errors})]}):(0,S.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e&&(0,S.jsxs)(l.t,{htmlFor:a,children:[e,r&&(0,S.jsx)(`span`,{className:`text-danger-strong`,children:`*`})]}),(0,S.jsxs)(d.t,{value:o.value??``,onValueChange:c,children:[(0,S.jsx)(d.s,{id:a,"aria-invalid":h?`true`:void 0,onBlur:s,children:(0,S.jsx)(d.c,{placeholder:n})}),(0,S.jsx)(d.n,{children:i.length>0?i.map(e=>(0,S.jsx)(d.i,{value:e.value,children:e.label},e.value)):(0,S.jsxs)(`div`,{className:`flex items-center justify-center gap-x-2 rounded border border-border bg-muted-muted px-4 py-6.5 text-center text-sm text-text-positive-weak`,children:[(0,S.jsx)(v.PackagePlusIcon,{strokeWidth:1}),`No options available`]})})]}),h&&(0,S.jsx)(Z,{errors:o.meta.errors})]})},me=({label:e,placeholder:t,required:n,maxLength:r,rows:i,disabled:a})=>{let o=(0,y.useId)(),{form:s,name:c,state:u,handleBlur:d,handleChange:f}=Q(),p=R(s.store,({isSubmitting:e})=>e),m=u.meta.isTouched&&!u.meta.isValid,h=(0,y.useCallback)(({target:{value:e}})=>{p||r&&e.length>r||f(e||null)},[p,r,f]);return(0,S.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e&&(0,S.jsxs)(l.t,{htmlFor:o,children:[e,n&&(0,S.jsx)(`span`,{className:`text-danger-strong`,children:`*`})]}),(0,S.jsx)(g.t,{id:o,name:c,value:u.value??``,"aria-invalid":m,placeholder:t,rows:i,disabled:a||p,onBlur:d,onChange:h}),m&&(0,S.jsx)(Z,{errors:u.meta.errors})]})},he=({label:e,placeholder:t,required:n,maxLength:r,disabled:i})=>{let a=(0,y.useId)(),{form:o,name:s,state:u,handleBlur:d,handleChange:f}=Q(),p=R(o.store,({isSubmitting:e})=>e),m=u.meta.isTouched&&!u.meta.isValid,h=(0,y.useCallback)(({target:{value:e}})=>{p||r&&e.length>r||f(e||null)},[p,r,f]);return(0,S.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e&&(0,S.jsxs)(l.t,{htmlFor:a,children:[e,n&&(0,S.jsx)(`span`,{className:`text-danger-strong`,children:`*`})]}),(0,S.jsx)(c.t,{id:a,name:s,value:u.value??``,"aria-invalid":m,placeholder:t,autoComplete:`off`,disabled:i||p,onBlur:d,onChange:h}),m&&(0,S.jsx)(Z,{errors:u.meta.errors})]})},ge=({label:e,description:t,options:n,tooltip:r,helperText:i,orientation:a})=>{let o=Q(),c=R(o.form.store,({isSubmitting:e})=>e);return(0,S.jsxs)(V,{className:`gap-y-4 px-4`,children:[(0,S.jsxs)(H,{orientation:a,children:[(0,S.jsxs)(U,{children:[(0,S.jsxs)(G,{children:[e,r&&(0,S.jsx)(Y,{tooltip:r})]}),(0,S.jsx)(q,{children:t}),(0,S.jsx)(J,{isShow:!!i,children:i})]}),(0,S.jsx)(W,{children:(0,S.jsx)(V,{className:`flex flex-col gap-y-2`,children:n.map(e=>(0,S.jsxs)(H,{orientation:`horizontal`,children:[(0,S.jsx)(s.t,{id:`${o.name}-${e.value}`,name:o.name,checked:o.state.value?.includes(e.value)??!1,disabled:c,onCheckedChange:t=>{if(t&&o.state.value!==null)o.pushValue(e.value);else if(t&&o.state.value===null)o.setValue([e.value]);else if(!t&&o.state.value!==null){let t=o.state.value.indexOf(e.value);t>-1&&o.removeValue(t)}else o.setValue(null)}}),(0,S.jsx)(G,{htmlFor:`${o.name}-${e.value}`,className:`text-text-positive`,children:e.label})]},e.value))})})]}),(0,S.jsx)(X,{})]})},_e=(0,y.memo)(({label:e,description:n,placeholder:r,tooltip:i,helperText:s,orientation:c=`responsive`,options:l,required:d=!1,disabled:f=!1,clearable:p=!1,showErrorMessage:m=!0})=>{let h=(0,y.useId)(),g=Q(),_=(0,T.useIsMobile)(),[x,C]=(0,y.useState)(!1),[E,D]=(0,y.useState)(!1),O=R(g.form.store,({isSubmitting:e})=>e),k=f||O,A=g.state.meta.isDirty||g.state.meta.isTouched,j=A&&!g.state.meta.isValid,M=d&&g.state.value===null,N=p&&!!g.state.value&&!k,P=l.find(({value:e})=>e===g.state.value)?.label,F=()=>{g.handleChange(null),g.handleBlur()},I=e=>(0,S.jsx)(t.t,{variant:`outline`,color:`muted`,size:`lg`,disabled:k,"aria-invalid":j?!0:void 0,"aria-describedby":h,className:(0,b.cn)(`flex w-full items-center justify-start rounded outline-border`,`hover:bg-transparent`,`focus-visible:outline-1 focus-visible:outline-primary-strong focus-visible:ring-4 focus-visible:ring-primary-weak`,`data-[state=open]:text-text-positive-muted data-[state=open]:outline-1 data-[state=open]:outline-primary-strong data-[state=open]:ring-4 data-[state=open]:ring-primary-weak`,N&&`pr-8`,!g.state.value&&`text-text-positive-muted`,j&&`outline-danger bg-danger-bg-subtle ring-4 ring-danger-weak`),onClick:e,children:P?(0,S.jsx)(`p`,{className:`flex min-w-0 flex-1 items-center gap-2 truncate text-start`,children:P}):(0,S.jsx)(`p`,{className:`flex-1 text-start text-text-positive-muted`,children:r})}),L=e=>(0,S.jsxs)(o.t,{className:`border-none`,children:[(0,S.jsx)(o.a,{placeholder:r??`Tìm kiếm…`}),(0,S.jsxs)(o.s,{children:[(0,S.jsx)(o.r,{className:`flex min-h-30 items-center justify-center text-sm text-text-positive-weak`,children:`Không tìm thấy kết quả nào phù hợp.`}),(0,S.jsx)(o.i,{className:`max-h-60 overflow-y-auto`,children:l.map(({value:t,label:n})=>(0,S.jsx)(o.o,{value:n,onSelect:()=>e(t),children:n},t))})]})]});return(0,S.jsxs)(V,{className:`gap-y-4 px-4`,children:[(0,S.jsxs)(H,{orientation:c,"data-invalid":j,children:[(0,S.jsxs)(U,{children:[(0,S.jsxs)(G,{"aria-required":M,htmlFor:g.name,children:[e,i&&(0,S.jsx)(Y,{tooltip:i})]}),(0,S.jsx)(q,{children:n})]}),(0,S.jsx)(W,{className:`flex justify-end`,children:(0,S.jsxs)(`div`,{className:`flex w-full flex-col`,children:[(0,S.jsxs)(`div`,{className:`relative`,children:[_?(0,S.jsxs)(S.Fragment,{children:[I(()=>C(!0)),(0,S.jsx)(a.t,{open:x,onOpenChange:e=>{C(e),e||g.handleBlur()},children:(0,S.jsxs)(a.c,{children:[(0,S.jsx)(a.s,{}),(0,S.jsxs)(w.Dialog.Content,{onOpenAutoFocus:e=>e.preventDefault(),className:(0,b.cn)(`fixed inset-x-0 bottom-0 z-50`,`flex flex-col bg-background rounded-t-2xl outline-none`,`max-h-[80dvh] shadow-[0_-4px_24px_rgba(0,0,0,0.08)]`,`data-[state=open]:animate-in data-[state=open]:slide-in-from-bottom data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=closed]:fade-out-0`,`duration-300`),children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-border shrink-0`,children:[(0,S.jsx)(`span`,{className:`font-semibold text-sm text-text-positive`,children:e}),(0,S.jsx)(a.n,{asChild:!0,children:(0,S.jsx)(`button`,{type:`button`,"aria-label":`Đóng`,className:`flex size-7 items-center justify-center rounded-md text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive`,children:(0,S.jsx)(v.XIcon,{size:16})})})]}),(0,S.jsxs)(`div`,{className:`flex flex-col overflow-y-auto`,children:[N&&(0,S.jsx)(a.n,{asChild:!0,children:(0,S.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-x-2 px-4 py-3 text-left text-sm text-danger-strong transition-colors hover:bg-danger-bg-subtle`,onClick:F,children:[(0,S.jsx)(v.XIcon,{size:14}),`Xóa lựa chọn`]})}),L(e=>{g.handleChange(e),C(!1),g.handleBlur()})]}),(0,S.jsx)(`div`,{className:`shrink-0 h-safe-bottom`})]})]})})]}):(0,S.jsxs)(u.t,{open:E,onOpenChange:e=>{D(e),e||g.handleBlur()},children:[(0,S.jsx)(u.a,{asChild:!0,children:I()}),(0,S.jsx)(u.i,{align:`end`,side:`bottom`,className:`flex w-fit rounded p-0`,children:L(e=>{g.handleChange(e),D(!1),g.handleBlur()})})]}),N&&(0,S.jsx)(`button`,{type:`button`,"aria-label":`Xóa lựa chọn`,className:`absolute right-2 top-1/2 -translate-y-1/2 flex size-4 cursor-pointer items-center justify-center rounded-md text-text-positive-weak outline-none transition-[color,transform] hover:text-text-positive focus-visible:text-primary-strong focus-visible:[&>svg]:scale-125 [&>svg]:size-3.5 [&>svg]:transition-transform`,onClick:F,children:(0,S.jsx)(v.XIcon,{"aria-hidden":`true`})})]}),A&&m&&(0,S.jsx)(Z,{id:h,className:`mt-1`,errors:g.state.meta.errors}),(0,S.jsx)(J,{isShow:!!s,children:s})]})})]}),(0,S.jsx)(X,{})]})});_e.displayName=`ComboboxField`;const ve=(0,y.memo)(({label:e,description:n,placeholder:r,orientation:i=`responsive`,tooltip:a,helperText:o,showErrorMessage:s=!0,required:c=!1,disabled:l=!1,minDate:d,maxDate:f})=>{let p=(0,y.useId)(),h=Q(),[g,_]=(0,y.useState)(!1),x=R(h.form.store,({isSubmitting:e})=>e),w=l||x,T=h.state.meta.isDirty||h.state.meta.isTouched,E=T&&!h.state.meta.isValid,D=c&&h.state.value===null,O=e=>{h.handleChange(e),_(!1)};return(0,S.jsxs)(V,{className:`px-4`,children:[(0,S.jsxs)(H,{orientation:i,"data-invalid":E,children:[(0,S.jsxs)(U,{children:[(0,S.jsxs)(G,{htmlFor:h.name,"aria-required":D,children:[e,a&&(0,S.jsx)(Y,{tooltip:a})]}),(0,S.jsx)(q,{children:n})]}),(0,S.jsx)(W,{className:`flex flex-col space-y-1`,children:(0,S.jsxs)(`div`,{className:`flex w-full flex-col`,children:[(0,S.jsxs)(u.t,{open:g,onOpenChange:e=>{_(e),e||h.handleBlur()},children:[(0,S.jsx)(u.a,{asChild:!0,children:(0,S.jsxs)(t.t,{variant:`outline`,color:`muted`,size:`lg`,disabled:w,"aria-invalid":E?!0:void 0,"aria-describedby":p,className:(0,b.cn)(`flex items-center justify-between rounded font-normal outline-border`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:outline-1 data-[state=open]:outline-primary-strong data-[state=open]:ring-4 data-[state=open]:ring-primary-weak`,h.state.value===null&&`text-text-positive-muted`,E&&`outline-danger bg-danger-bg-subtle ring-4 ring-danger-weak`),children:[(0,S.jsx)(`p`,{children:h.state.value===null?r??`Select date`:(0,C.format)(h.state.value,`PPPP`)}),(0,S.jsx)(v.CalendarDaysIcon,{strokeWidth:1})]})}),(0,S.jsxs)(u.i,{align:`start`,side:`bottom`,className:`flex w-fit min-w-0 overflow-y-auto rounded p-0`,children:[(0,S.jsxs)(`div`,{className:`flex h-full flex-col space-y-2 border-r border-r-border p-2 [&>button]:justify-start [&>button]:text-sm`,children:[(0,S.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>O((0,C.endOfToday)()),children:`Hôm nay`}),(0,S.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>O((0,C.endOfTomorrow)()),children:`Ngày mai`}),(0,S.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>O((0,C.endOfYesterday)()),children:`Hôm qua`}),(0,S.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>O((0,C.subDays)((0,C.endOfToday)(),3)),children:`3 ngày qua`}),(0,S.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>O((0,C.subDays)((0,C.endOfToday)(),7)),children:`7 ngày qua`}),(0,S.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>O((0,C.subDays)((0,C.endOfToday)(),30)),children:`30 ngày qua`}),(0,S.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>O((0,C.startOfMonth)((0,C.endOfToday)())),children:`Tháng này`}),(0,S.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>O((0,C.lastDayOfMonth)((0,C.endOfToday)())),children:`Tháng trước`})]}),(0,S.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,S.jsx)(`div`,{className:`min-w-73 border-b border-b-border p-2`,children:(0,S.jsx)(m.t,{mode:`single`,selected:h.state.value??void 0,hidden:{before:d??new Date(1900,0,1),after:f??new Date(2100,11,31)},onSelect:e=>{e&&O(e)}})})})]})]}),T&&s&&(0,S.jsx)(Z,{id:p,className:`mt-1`,errors:h.state.meta.errors}),(0,S.jsx)(J,{isShow:!!o,children:o})]})})]}),(0,S.jsx)(X,{})]})});ve.displayName=`DateField`;const ye=({label:e,description:t,placeholder:n,tooltip:r,helperText:i,orientation:a=`responsive`,showErrorMessage:o=!0,required:s=!1,maxLength:l})=>{let{form:u,name:d,state:f,handleBlur:p,handleChange:m}=Q(),h=R(u.store,({isSubmitting:e})=>e),g=f.meta.isDirty&&f.meta.isTouched&&!f.meta.isValid,_=s&&f.value===null,x=!h&&!!f.value,C=(0,y.useCallback)(({target:{value:e}})=>{h||l&&e.length>l||m(e||null)},[h,l,m]),w=(0,y.useCallback)(()=>{h||m(null)},[h,m]);return(0,S.jsxs)(V,{className:`gap-y-4 px-4`,children:[(0,S.jsxs)(H,{"data-invalid":g,orientation:a,children:[(0,S.jsxs)(U,{children:[(0,S.jsxs)(G,{htmlFor:d,"aria-required":_,children:[e,r&&(0,S.jsx)(Y,{tooltip:r})]}),(0,S.jsx)(q,{children:t})]}),(0,S.jsxs)(W,{children:[(0,S.jsx)(c.t,{id:d,name:d,value:f.value===null?``:f.value,"aria-invalid":g,autoComplete:`email`,placeholder:n,className:(0,b.cn)(`pl-9`,x&&`pr-9`,h&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:p,onChange:C}),(0,S.jsx)(`div`,{className:`absolute top-0 left-0 flex size-9 items-center justify-center text-muted`,children:(0,S.jsx)(v.AtSignIcon,{size:14})}),x&&(0,S.jsx)(`button`,{type:`button`,"aria-label":`Xóa`,className:`absolute inset-e-0 inset-y-0 top-3 flex h-fit w-8 cursor-pointer items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:text-text-positive-strong`,onClick:w,children:(0,S.jsx)(v.XIcon,{size:14,"aria-hidden":`true`})}),(0,S.jsx)(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:o&&f.meta.isDirty&&(0,S.jsx)(Z,{errors:f.meta.errors})}),(0,S.jsx)(J,{isShow:!!i,children:i})]})]}),(0,S.jsx)(X,{})]})},be=(0,y.memo)(({label:e,description:t,placeholder:n,tooltip:r,helperText:i,orientation:a=`responsive`,showErrorMessage:o=!0,rounding:s,decimalPlaces:c,precision:l,unit:u,required:d=!1,disabled:f=!1,allowNegative:p})=>{let m=(0,y.useId)(),h=(0,y.useId)(),g=Q(),_=R(g.form.store,({isSubmitting:e})=>e),x=f||_,C=g.state.meta.isDirty||g.state.meta.isTouched,w=C&&!g.state.meta.isValid,T=d&&g.state.value===null,E=!!g.state.meta.errors.length,D=(0,y.useCallback)(e=>{x||g.handleChange(e)},[x,g.handleChange]);return(0,S.jsxs)(V,{className:`gap-y-4 px-4`,children:[(0,S.jsxs)(H,{orientation:a,"data-invalid":w,children:[(0,S.jsxs)(U,{children:[(0,S.jsxs)(G,{htmlFor:m,"aria-required":T,children:[e,r&&(0,S.jsx)(Y,{tooltip:r})]}),(0,S.jsx)(q,{children:t})]}),(0,S.jsxs)(W,{children:[(0,S.jsxs)(`div`,{className:`relative w-full`,children:[(0,S.jsx)(ue,{id:m,value:g.state.value,"aria-invalid":w,"aria-describedby":h,placeholder:n,disabled:x,roundingRule:s,numberAfterDecimalPoint:c,precision:l,unitText:u,allowNegative:p,className:(0,b.cn)(x&&`pointer-events-none opacity-60`),onBlur:g.handleBlur,onValueChange:D}),_&&(0,S.jsx)(`div`,{className:`pointer-events-none absolute inset-s-2 inset-y-0 top-2.5 [&>svg]:size-3.5`,children:(0,S.jsx)(v.Loader2Icon,{className:`animate-spin text-primary-strong`})}),!_&&C&&o&&E&&(0,S.jsx)(`div`,{className:`pointer-events-none absolute inset-s-2 inset-y-0 top-2.75 text-danger-strong [&>svg]:size-3.5`,children:(0,S.jsx)(v.BanIcon,{})}),(0,S.jsx)(`div`,{className:`mt-1 flex w-full items-start justify-between gap-x-2`,children:C&&o?(0,S.jsx)(Z,{id:h,className:`flex-1`,errors:g.state.meta.errors}):(0,S.jsx)(`div`,{})})]}),(0,S.jsx)(J,{isShow:!!i,children:i})]})]}),(0,S.jsx)(X,{})]})});be.displayName=`NumberField`;const xe=({label:e,description:t,placeholder:n,orientation:r=`responsive`,tooltip:i,helperText:a,showErrorMessage:o=!0})=>{let s=(0,y.useId)(),{form:l,name:u,state:d,handleBlur:f,handleChange:p}=Q(),m=R(l.store,({isSubmitting:e})=>e),[h,g]=(0,y.useState)(!1),_=d.meta.isDirty&&d.meta.isTouched&&!d.meta.isValid,b=(0,y.useCallback)(()=>g(e=>!e),[]),x=(0,y.useCallback)(({target:{value:e}})=>{m||p(e||null)},[m,p]);return(0,S.jsxs)(V,{className:`gap-y-4 px-4`,children:[(0,S.jsxs)(H,{"data-invalid":_,orientation:r,children:[(0,S.jsxs)(U,{children:[(0,S.jsxs)(G,{htmlFor:s,children:[e,i&&(0,S.jsx)(Y,{tooltip:i})]}),(0,S.jsx)(q,{children:t})]}),(0,S.jsxs)(W,{children:[(0,S.jsx)(c.t,{id:s,name:u,type:h?`text`:`password`,placeholder:n,value:d.value??``,"aria-invalid":_,autoComplete:`new-password`,onBlur:f,onChange:x}),(0,S.jsx)(`button`,{className:`absolute inset-e-0 inset-y-0 flex size-9 items-center justify-center rounded-e-md text-muted outline-none transition-[color,box-shadow] focus:z-10 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:b,"aria-label":h?`Ẩn mật khẩu`:`Hiện mật khẩu`,"aria-pressed":h,"aria-controls":s,children:h?(0,S.jsx)(v.EyeOffIcon,{size:16,"aria-hidden":`true`}):(0,S.jsx)(v.EyeIcon,{size:16,"aria-hidden":`true`})}),(0,S.jsx)(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:o&&d.meta.isDirty&&(0,S.jsx)(Z,{errors:d.meta.errors})}),(0,S.jsx)(J,{isShow:!!a,children:a})]})]}),(0,S.jsx)(X,{})]})},Se=({label:e,description:t,orientation:n,options:r,tooltip:i,helperText:a})=>{let o=Q(),s=R(o.form.store,({isSubmitting:e})=>e);return(0,S.jsxs)(V,{className:`px-4`,children:[(0,S.jsxs)(H,{orientation:n,className:`flex-col gap-2`,children:[(0,S.jsxs)(U,{children:[(0,S.jsxs)(G,{children:[e,i&&(0,S.jsx)(Y,{tooltip:i})]}),(0,S.jsx)(q,{children:t}),(0,S.jsx)(J,{isShow:!!a,children:a})]}),(0,S.jsx)(W,{children:(0,S.jsx)(h.t,{value:o.state.value??``,className:`w-full`,onValueChange:o.handleChange,children:r.map(e=>(0,S.jsx)(G,{className:(0,b.cn)(`h-fit`,o.state.value===e.value&&`border-primary-weak! bg-primary-bg-subtle`,s&&`pointer-events-none bg-muted-muted opacity-60`,o.state.value===e.value&&s&&`border-border-strong!`),children:(0,S.jsxs)(H,{orientation:`horizontal`,className:`items-start gap-3 rounded p-2!`,children:[(0,S.jsx)(h.n,{value:e.value,className:`mt-0.5 shrink-0`}),(0,S.jsxs)(U,{className:`gap-0.5!`,children:[(0,S.jsx)(K,{children:e.label}),(0,S.jsx)(q,{className:`text-xs`,children:e.description})]})]})},e.value))})})]}),(0,S.jsx)(X,{})]})},Ce=(0,y.memo)(({label:e,description:t,placeholder:n,orientation:r=`responsive`,tooltip:i,options:o,helperText:s,clearable:c=!1,required:l=!1,disabled:u=!1,showErrorMessage:f=!0})=>{let p=(0,y.useId)(),m=Q(),h=(0,T.useIsMobile)(),[g,_]=(0,y.useState)(!1),x=R(m.form.store,({isSubmitting:e})=>e),C=u||x,E=m.state.meta.isDirty||m.state.meta.isTouched,D=E&&!m.state.meta.isValid,O=l&&m.state.value===null,k=c&&!!m.state.value&&!C,A=o.find(e=>e.value===m.state.value)?.label,j=()=>{m.handleChange(null),m.handleBlur()};return(0,S.jsxs)(V,{className:`gap-y-4 px-4`,children:[(0,S.jsxs)(H,{orientation:r,"data-invalid":D,children:[(0,S.jsxs)(U,{children:[(0,S.jsxs)(G,{htmlFor:m.name,"aria-required":O,children:[e,i&&(0,S.jsx)(Y,{tooltip:i})]}),(0,S.jsx)(q,{children:t})]}),(0,S.jsxs)(W,{className:`flex flex-col`,children:[h?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`button`,{id:m.name,type:`button`,disabled:C,"aria-invalid":D?`true`:void 0,"aria-describedby":p,onBlur:m.handleBlur,onClick:()=>_(!0),className:(0,b.cn)(`flex w-full items-center justify-between`,`outline-1 outline-border -outline-offset-1`,`gap-2 rounded bg-transparent px-3 py-2`,`shadow-input transition-all cursor-pointer whitespace-nowrap text-sm`,`focus-visible:outline-primary-strong focus-visible:ring-4 focus-visible:ring-primary-weak`,`disabled:cursor-not-allowed disabled:opacity-50`,D&&`outline-danger bg-danger-bg-subtle ring-danger-weak`,!m.state.value&&`text-text-positive-muted`),children:[(0,S.jsx)(`span`,{className:`line-clamp-1`,children:A??n}),(0,S.jsx)(v.ChevronDownIcon,{size:16,className:`shrink-0 opacity-50`})]}),(0,S.jsx)(a.t,{open:g,onOpenChange:e=>{_(e),e||m.handleBlur()},children:(0,S.jsxs)(a.c,{children:[(0,S.jsx)(a.s,{}),(0,S.jsxs)(w.Dialog.Content,{onOpenAutoFocus:e=>e.preventDefault(),className:(0,b.cn)(`fixed inset-x-0 bottom-0 z-50`,`flex flex-col bg-background rounded-t-2xl outline-none`,`max-h-[80dvh] shadow-[0_-4px_24px_rgba(0,0,0,0.08)]`,`data-[state=open]:animate-in data-[state=open]:slide-in-from-bottom data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=closed]:fade-out-0`,`duration-300`),children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-border shrink-0`,children:[(0,S.jsx)(`span`,{className:`font-semibold text-sm text-text-positive`,children:e??n??`Chọn một tùy chọn`}),(0,S.jsx)(a.n,{asChild:!0,children:(0,S.jsx)(`button`,{type:`button`,"aria-label":`Đóng`,className:`flex size-7 items-center justify-center rounded-md text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive`,children:(0,S.jsx)(v.XIcon,{size:16})})})]}),(0,S.jsxs)(`div`,{className:`flex flex-col overflow-y-auto`,children:[k&&(0,S.jsx)(a.n,{asChild:!0,children:(0,S.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-x-2 px-4 py-3 text-left text-sm text-danger-strong transition-colors hover:bg-danger-bg-subtle`,onClick:j,children:[(0,S.jsx)(v.XIcon,{size:14}),`Xóa lựa chọn`]})}),o.length>0?o.map(e=>(0,S.jsx)(a.n,{asChild:!0,children:(0,S.jsx)(`button`,{type:`button`,className:(0,b.cn)(`flex w-full items-center px-4 py-3 text-left text-sm transition-colors`,`hover:bg-muted-muted active:bg-muted-muted`,m.state.value===e.value&&`bg-primary-bg-subtle font-medium text-primary`),onClick:()=>{m.handleChange(e.value),m.handleBlur()},children:e.label})},e.value)):(0,S.jsxs)(`div`,{className:`flex items-center justify-center gap-x-2 px-4 py-8 text-center text-sm text-text-positive-weak`,children:[(0,S.jsx)(v.PackagePlusIcon,{strokeWidth:1}),`Không có tùy chọn`]})]}),(0,S.jsx)(`div`,{className:`shrink-0 h-safe-bottom`})]})]})})]}):(0,S.jsxs)(`div`,{className:`relative`,children:[(0,S.jsxs)(d.t,{value:m.state.value??``,disabled:C,onValueChange:m.handleChange,children:[(0,S.jsx)(d.s,{"aria-invalid":D?`true`:void 0,"aria-describedby":p,onBlur:m.handleBlur,children:(0,S.jsx)(d.c,{placeholder:n})}),(0,S.jsx)(d.n,{children:o.length>0?o.map(e=>(0,S.jsx)(d.i,{value:e.value,children:e.label},e.value)):(0,S.jsxs)(`div`,{className:`flex items-center justify-center gap-x-2 rounded border border-border bg-muted-muted px-4 py-6.5 text-center text-sm text-text-positive-weak`,children:[(0,S.jsx)(v.PackagePlusIcon,{strokeWidth:1}),`No options available`]})})]}),k&&(0,S.jsx)(`button`,{type:`button`,"aria-label":`Xóa lựa chọn`,className:`absolute right-7 top-1/2 -translate-y-1/2 flex size-4 cursor-pointer items-center justify-center rounded-md text-text-positive-weak outline-none transition-[color,transform] hover:text-text-positive focus-visible:text-primary-strong focus-visible:[&>svg]:scale-125 [&>svg]:size-3.5 [&>svg]:transition-transform`,onClick:j,children:(0,S.jsx)(v.XIcon,{"aria-hidden":`true`})})]}),E&&f&&(0,S.jsx)(Z,{id:p,className:`mt-1`,errors:m.state.meta.errors}),(0,S.jsx)(J,{isShow:!!s,children:s})]})]}),(0,S.jsx)(X,{})]})});Ce.displayName=`SelectField`;function we({className:e,...t}){return(0,S.jsx)(w.Switch.Root,{"data-slot":`switch`,className:(0,b.cn)(`peer`,`w-8 shrink-0 cursor-pointer items-center rounded-full shadow-xs transition-all`,`inline-flex h-5`,`focus-visible:border-primary-strong`,`focus-visible:ring-primary-weak`,`focus-visible:ring-4`,`disabled:cursor-not-allowed`,`disabled:opacity-50`,`-outline-offset-1 inset-shadow-2xs outline-1`,`data-[state=checked]:bg-primary`,`data-[state=checked]:outline-primary-strong`,`data-[state=unchecked]:bg-muted-weak`,`data-[state=unchecked]:outline-border`,`data-[state=unchecked]:[&_span]:size-4`,`data-[state=unchecked]:[&_span]:translate-x-0.5`,`data-[state=unchecked]:[&_span]:rtl:-translate-x-0.5`,e),...t,children:(0,S.jsx)(w.Switch.Thumb,{"data-slot":`switch-thumb`,className:(0,b.cn)(`block size-4 bg-card shadow-xs`,`pointer-events-none rounded-full ring-0 transition-transform`,`data-[state=checked]:translate-x-[calc(100%-3px)]`,`data-[state=unchecked]:translate-x-0`)})})}const Te=({label:e,description:t,helperText:n})=>{let r=Q();return(0,S.jsxs)(V,{className:`gap-y-4 px-4`,children:[(0,S.jsxs)(H,{orientation:`vertical`,className:`relative justify-between gap-y-1`,children:[(0,S.jsxs)(U,{children:[(0,S.jsx)(K,{className:`cursor-pointer`,children:(0,S.jsx)(`label`,{htmlFor:r.name,children:e})}),(0,S.jsx)(q,{children:t}),(0,S.jsx)(we,{id:r.name,checked:r.state.value??!1,className:`absolute top-1 right-1`,onBlur:r.handleBlur,onCheckedChange:r.handleChange})]}),(0,S.jsx)(J,{isShow:!!n,children:n})]}),(0,S.jsx)(X,{})]})},Ee=.8,De=14,Oe=e=>{e.key===`Enter`&&e.preventDefault()},ke=(0,y.memo)(({label:e,description:t,placeholder:n,tooltip:r,helperText:i,counter:a=!1,orientation:o=`responsive`,showClearButton:s=!1,showErrorMessage:l=!0,required:u=!1,disabled:d=!1,maxLength:f})=>{let p=(0,y.useId)(),m=(0,y.useId)(),h=(0,y.useRef)(null),{form:g,name:_,state:x,handleBlur:C,handleChange:w}=Q(),T=R(g.store,({isSubmitting:e})=>e),E=d||T,D=x.meta.isDirty||x.meta.isTouched,O=D&&!x.meta.isValid,k=u&&x.value===null,A=x.meta.errors.length>0,j=s&&!E&&!!x.value,M=a?x.value?.length??0:0,N=a&&!!f&&M>=f*.8,P=a&&!!f&&M>=f,F=a?f?`${M} / ${f} ký tự`:`${M} ký tự`:null,I=a||D&&l,L=(0,y.useCallback)(({target:{value:e}})=>{a&&f&&e.length>f||w(e||null)},[a,f,w]),z=(0,y.useCallback)(()=>{w(null),h.current?.focus()},[w]);return(0,S.jsxs)(V,{className:`gap-y-4 px-4`,children:[(0,S.jsxs)(H,{orientation:o,"data-invalid":O,children:[(0,S.jsxs)(U,{children:[(0,S.jsxs)(G,{"aria-required":k,htmlFor:p,children:[e,r&&(0,S.jsx)(Y,{tooltip:r})]}),t&&(0,S.jsx)(q,{children:t})]}),(0,S.jsxs)(W,{children:[(0,S.jsx)(c.t,{ref:h,id:p,name:_,value:x.value??``,"aria-invalid":O,"aria-describedby":m,autoComplete:`off`,placeholder:n,autoCapitalize:`none`,autoCorrect:`off`,disabled:E,className:(0,b.cn)(`pr-6`,E&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:C,onChange:L,onKeyDown:Oe}),j&&(0,S.jsx)(`button`,{type:`button`,"aria-label":`Xóa`,className:`absolute inset-e-1 top-2.5 flex size-4 cursor-pointer items-center justify-center rounded-md text-text-positive-weak outline-none transition-[color,transform] hover:text-text-positive focus-visible:text-primary-strong focus-visible:[&>svg]:scale-125 [&>svg]:size-3.5 [&>svg]:transition-transform`,onClick:z,children:(0,S.jsx)(v.XIcon,{"aria-hidden":`true`})}),T&&(0,S.jsx)(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-muted-weak`,children:(0,S.jsx)(v.Loader2Icon,{size:14,className:`animate-spin text-primary-strong`})}),!j&&D&&l&&A&&(0,S.jsx)(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-danger-strong`,children:(0,S.jsx)(v.BanIcon,{"aria-hidden":`true`,size:14})}),I&&(0,S.jsxs)(`div`,{className:`my-1 flex w-full items-start justify-between gap-x-2`,children:[D&&l?(0,S.jsx)(Z,{id:m,className:`flex-1`,errors:x.meta.errors}):(0,S.jsx)(`div`,{}),a&&(0,S.jsx)(`p`,{className:(0,b.cn)(`h-4 flex-0 text-nowrap text-end text-xs tabular-nums transition-colors`,P?`font-medium text-danger-strong`:N?`text-warning-strong`:`text-text-positive-weak`),children:F})]}),(0,S.jsx)(J,{isShow:!!i,children:i})]})]}),(0,S.jsx)(X,{})]})});ke.displayName=`TextField`;const Ae=(0,y.memo)(({label:e,description:t,placeholder:n,tooltip:r,helperText:i,counter:a=!1,orientation:o=`responsive`,showErrorMessage:s=!0,required:c=!1,disabled:l=!1,maxLength:u})=>{let d=(0,y.useId)(),f=(0,y.useId)(),[p,m]=(0,y.useState)(!1),h=(0,y.useRef)(null),{form:_,state:x,name:C,handleBlur:w,handleChange:T}=Q(),E=R(_.store,({isSubmitting:e})=>e),D=l||E,O=x.value?.length??0,k=(0,y.useMemo)(()=>a?u?`${O} / ${u} ký tự`:`${O} ký tự`:``,[O,a,u]),A=!!u&&O>=u*.8,j=!!u&&O>=u,M=x.meta.isDirty||x.meta.isTouched,N=M&&!x.meta.isValid,P=c&&x.value===null,F=!!x.meta.errors.length,I=!!x.value&&!D,L=(0,y.useMemo)(()=>(0,b.cn)(`h-4 flex-0 text-nowrap text-end text-xs tabular-nums transition-colors`,j?`font-medium text-danger-strong`:A?`text-warning-strong`:`text-text-positive-weak`),[j,A]),z=(0,y.useCallback)(({target:{value:e}})=>{D||a&&u&&e.length>u||T(e||null)},[D,a,u,T]),ee=(0,y.useCallback)(async()=>{x.value&&(await navigator.clipboard.writeText(x.value),h.current!==null&&clearTimeout(h.current),m(!0),h.current=setTimeout(()=>m(!1),1500))},[x.value]);return(0,y.useEffect)(()=>()=>{h.current!==null&&clearTimeout(h.current)},[]),(0,S.jsxs)(V,{className:`gap-y-4 px-4`,children:[(0,S.jsxs)(H,{orientation:o,"data-invalid":N,children:[(0,S.jsxs)(U,{children:[(0,S.jsxs)(G,{"aria-required":P,htmlFor:d,children:[e,r&&(0,S.jsx)(Y,{tooltip:r})]}),(0,S.jsx)(q,{children:t})]}),(0,S.jsxs)(W,{children:[(0,S.jsx)(g.t,{id:d,name:C,value:x.value??``,"aria-invalid":N,"aria-describedby":f,autoCapitalize:`none`,autoComplete:`off`,autoCorrect:`off`,placeholder:n,disabled:D,className:(0,b.cn)(D&&`pointer-events-none bg-muted-muted opacity-60`),onChange:z,onBlur:w}),I&&(0,S.jsx)(`button`,{type:`button`,"aria-label":`Sao chép`,className:`absolute inset-e-1 top-2 flex size-4 cursor-pointer items-center justify-center rounded-md outline-none transition-[color,transform] focus-visible:[&>svg]:scale-125 [&>svg]:size-3.5 [&>svg]:transition-transform`,onClick:ee,children:p?(0,S.jsx)(v.CheckIcon,{"aria-hidden":`true`,className:`text-success-strong`}):(0,S.jsx)(v.CopyIcon,{"aria-hidden":`true`,className:`text-text-positive-weak transition-colors hover:text-text-positive focus-visible:text-primary-strong`})}),E&&(0,S.jsx)(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-muted-weak`,children:(0,S.jsx)(v.Loader2Icon,{size:14,className:`animate-spin text-primary-strong`})}),!I&&M&&s&&F&&(0,S.jsx)(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-danger-strong`,children:(0,S.jsx)(v.BanIcon,{size:14})}),(0,S.jsxs)(`div`,{className:`my-1 flex w-full items-start justify-between gap-x-2`,children:[M&&s?(0,S.jsx)(Z,{id:f,className:`flex-1`,errors:x.meta.errors}):(0,S.jsx)(`div`,{}),!!a&&(0,S.jsx)(`p`,{className:L,children:k})]}),(0,S.jsx)(J,{isShow:!!i,children:i})]})]}),(0,S.jsx)(X,{})]})});Ae.displayName=`TextareaField`;const je=(0,y.memo)(({label:e,description:t,placeholder:n,tooltip:r,helperText:i,showErrorMessage:a=!0,required:o=!1})=>{let{form:s,state:c,handleChange:l}=Q(),u=R(s.store,({isSubmitting:e})=>e),d=c.meta.isDirty&&c.meta.isTouched&&!c.meta.isValid,f=o&&c.value===null,p=(0,y.useCallback)(e=>{u||l(e||null)},[u,l]);return(0,S.jsxs)(V,{className:`gap-y-4 px-4`,children:[(0,S.jsxs)(H,{orientation:`vertical`,"data-invalid":d,children:[(0,S.jsxs)(U,{children:[(0,S.jsxs)(G,{"aria-required":f,children:[e,r&&(0,S.jsx)(Y,{tooltip:r})]}),(0,S.jsx)(q,{children:t})]}),(0,S.jsx)(_.t,{value:c.value??``,placeholder:n,readOnly:u,onChange:p}),c.meta.isDirty&&a&&!!c.meta.errors.length&&(0,S.jsx)(Z,{errors:c.meta.errors}),(0,S.jsx)(J,{isShow:!!i,children:i})]}),(0,S.jsx)(X,{})]})});je.displayName=`TextEditorField`;const Me=({label:e,className:n})=>{let r=$(),i=(0,y.useCallback)(async()=>{await r.handleSubmit({submitAction:`submit`}),r.state.isSubmitSuccessful&&r.reset()},[r]);return(0,S.jsx)(r.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:r,isSubmitting:a})=>(0,S.jsx)(t.t,{type:`button`,size:`md`,disabled:r,isLoading:a,className:(0,b.cn)(`min-h-8 min-w-32`,n),onClick:i,children:e??`Xác nhận`})})},Ne=({type:e=`create`})=>{let n=$();return(0,S.jsxs)(`div`,{className:`flex h-8 items-center justify-between`,children:[(0,S.jsx)(n.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>(0,S.jsx)(t.t,{color:`muted`,variant:`outline`,type:`button`,size:`md`,disabled:e,className:`h-full min-w-32`,onClick:()=>n.reset(),children:`Hủy bỏ`})}),e===`create`&&(0,S.jsx)(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:e,isSubmitting:r})=>(0,S.jsxs)(t.t,{type:`submit`,size:`md`,disabled:e,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`create`}),n.state.isSubmitSuccessful&&n.reset()},children:[(0,S.jsx)(v.PlusIcon,{}),`Thêm mới`]})}),e===`update`&&(0,S.jsx)(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:e,isSubmitting:r})=>(0,S.jsxs)(t.t,{type:`submit`,size:`md`,disabled:e,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`update`}),n.state.isSubmitSuccessful&&n.reset()},children:[(0,S.jsx)(v.ArrowDownToLine,{}),`Cập nhật`]})})]})};function Pe({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,S.jsx)(w.Separator.Root,{"data-slot":`separator`,decorative:n,orientation:t,className:(0,b.cn)(`shrink-0 bg-border-weak`,`data-[orientation=horizontal]:h-px`,`data-[orientation=horizontal]:w-full`,`data-[orientation=vertical]:h-full`,`data-[orientation=vertical]:w-px`,e),...r})}const Fe=({title:e,description:n,onDelete:r,children:i})=>(0,S.jsxs)(`section`,{"data-slot":`card-form`,className:`relative flex flex-col rounded-md bg-card pb-4 shadow-card ring-1 ring-border`,children:[(0,S.jsxs)(`div`,{"data-slot":`card-form-header`,className:`flex flex-col space-y-0.5 px-4 py-3`,children:[(0,S.jsx)(`p`,{className:`font-semibold text-base tracking-tight`,children:e}),!!n&&(0,S.jsx)(`p`,{className:`text-text-positive-weak text-sm`,children:n})]}),(0,S.jsx)(Pe,{}),(0,S.jsx)(`div`,{"data-slot":`card-form-main`,className:`flex flex-col py-4`,children:i}),!!r&&(0,S.jsxs)(t.t,{color:`danger`,variant:`ghost`,size:`sm`,className:`absolute top-2.5 right-3`,onClick:e=>{r?.(),e.preventDefault(),e.stopPropagation()},children:[(0,S.jsx)(v.Trash2Icon,{}),`Remove`]})]}),Ie=({children:e})=>(0,S.jsx)(`div`,{"data-slot":`section-form`,className:`flex flex-col space-y-4`,children:e}),Le=({disabled:e,className:n,onClick:r,children:i})=>(0,S.jsx)(t.t,{type:`button`,variant:`outline`,color:`muted`,disabled:e,className:(0,b.cn)(`min-w-40`,n),onClick:r,children:i??`Huỷ`}),Re=({isSubmitting:e,submitText:n=`Xác nhận`,disabled:r,className:i,onClick:a})=>(0,S.jsx)(t.t,{type:`button`,isLoading:e,disabled:r||e,className:(0,b.cn)(`min-w-40`,i),onClick:a,children:n}),ze=({title:e,submitText:t,width:n,maxWidth:i,className:o,open:s,onOpenChange:c,children:l})=>{let u=$(),d=(0,y.useCallback)(e=>{e||u.reset(),c?.(e)},[u.reset,c]);return(0,S.jsx)(a.t,{open:s,onOpenChange:d,children:(0,S.jsxs)(a.c,{"data-slot":`dialog-portal`,children:[(0,S.jsx)(a.s,{}),(0,S.jsxs)(a.r,{style:{"--width":n,"--max-width":i},className:(0,b.cn)(`flex size-full max-h-dvh max-w-dvw flex-col gap-0 overflow-y-auto rounded-none p-0 shadow-dialog sm:h-auto sm:max-h-[85dvh] sm:max-w-5xl sm:rounded-md`,n&&`sm:w-(--width)`,i&&`sm:max-w-(--max-width)`,o),onOpenAutoFocus:e=>{e.preventDefault()},children:[(0,S.jsx)(`div`,{"data-slot":`dialog-header`,className:`flex items-center justify-center gap-2 px-6 py-5 text-center sm:text-left`,children:(0,S.jsx)(a.l,{"data-slot":`dialog-title`,className:`font-semibold text-lg tracking-tight`,children:e})}),(0,S.jsx)(r.t,{}),(0,S.jsx)(`div`,{"data-slot":`dialog-content`,className:`relative flex flex-col overflow-y-auto p-0 pt-4 max-sm:flex-1 sm:p-4`,children:l}),(0,S.jsx)(r.t,{}),(0,S.jsxs)(`div`,{"data-slot":`dialog-footer`,className:`flex flex-col-reverse items-center justify-end gap-2 px-6 py-4 sm:flex-row max-sm:[&>button]:w-full`,children:[(0,S.jsx)(u.Subscribe,{selector:e=>({disabled:e.isSubmitting}),children:({disabled:e})=>(0,S.jsx)(Le,{disabled:e,onClick:()=>{u.reset(),d(!1)}})}),(0,S.jsx)(u.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:n})=>(0,S.jsx)(Re,{isSubmitting:e,disabled:n,submitText:t,onClick:()=>u.handleSubmit()})})]})]})]})})},Be=({label:e,description:t,helperText:n,orientation:r=`responsive`,children:i})=>(0,S.jsxs)(V,{className:`gap-y-4 px-4`,children:[(0,S.jsxs)(H,{orientation:r,children:[(0,S.jsxs)(U,{children:[(0,S.jsx)(G,{children:e}),(0,S.jsx)(q,{children:t})]}),(0,S.jsxs)(W,{children:[i,(0,S.jsx)(J,{isShow:!!n,children:n})]})]}),(0,S.jsx)(X,{})]}),Ve=({title:e,open:t,contentClassName:n,onOpenChange:r,children:a})=>{let o=$();return(0,S.jsx)(w.Dialog.Root,{"data-slot":`dialog`,open:t,onOpenChange:r,children:(0,S.jsxs)(w.Dialog.Portal,{"data-slot":`dialog-portal`,children:[(0,S.jsx)(w.Dialog.Overlay,{"data-slot":`dialog-overlay`,className:(0,b.cn)(`fixed inset-0 z-40 bg-black/40 backdrop-blur-sm`,`data-[state=open]:animate-in data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:fade-out`)}),(0,S.jsx)(w.Dialog.Content,{"data-slot":`dialog-content`,className:(0,b.cn)(`fixed top-4 right-4 z-50 h-[calc(100dvh-2rem)] min-w-sm max-w-xl rounded-md bg-background shadow-lg ring-1 ring-border`,`duration-300`,`data-[state=open]:animate-in data-[state=open]:slide-in-from-right data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=closed]:fade-out`),children:(0,S.jsxs)(`section`,{className:`relative flex size-full flex-col`,children:[(0,S.jsx)(`header`,{className:`flex h-14 shrink-0 items-center border-b border-border px-5`,children:(0,S.jsx)(`h2`,{className:`font-semibold text-base tracking-tight text-text-positive`,children:e})}),(0,S.jsx)(`div`,{className:(0,b.cn)(`flex flex-1 flex-col overflow-y-auto py-4`,n),children:a}),(0,S.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3`,children:[(0,S.jsx)(o.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:t})=>(0,S.jsx)(Re,{isSubmitting:e,disabled:t,className:`w-full`,onClick:()=>o.handleSubmit()})}),(0,S.jsx)(o.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>(0,S.jsx)(Le,{disabled:e,className:`w-full`,onClick:()=>{o.reset(),r?.(!1)}})})]}),(0,S.jsx)(w.Dialog.Close,{asChild:!0,children:(0,S.jsx)(i.t,{className:`absolute top-2.5 right-3`})})]})})]})})},He=({children:e})=>(0,S.jsx)(`header`,{"data-slot":`section-header`,className:`flex items-center px-4 py-3 font-semibold text-base text-text-positive tracking-tight`,children:e}),Ue=({children:e})=>(0,S.jsx)(`main`,{"data-slot":`section-main`,className:`relative flex flex-col py-4`,children:e}),We=({title:e,children:t})=>(0,S.jsxs)(`section`,{"data-slot":`section-form`,className:`flex flex-col rounded-md bg-background shadow-card ring-1 ring-border`,children:[(0,S.jsx)(He,{children:e}),(0,S.jsx)(Pe,{}),(0,S.jsx)(Ue,{children:t})]}),Ge=({title:e,description:t,helperText:n})=>(0,S.jsxs)(V,{className:`gap-y-4 px-4`,children:[(0,S.jsxs)(H,{className:`gap-0`,children:[(0,S.jsxs)(U,{children:[(0,S.jsx)(B,{className:`mb-1`,children:e}),(0,S.jsx)(q,{children:t})]}),(0,S.jsx)(J,{isShow:!!n,children:n})]}),(0,S.jsx)(X,{})]}),{fieldContext:Ke,formContext:qe,useFieldContext:Q,useFormContext:$}=(0,E.createFormHookContexts)(),{useAppForm:Je,withForm:Ye,withFieldGroup:Xe}=(0,E.createFormHook)({fieldContext:Ke,formContext:qe,fieldComponents:{TextField:ke,TextareaField:Ae,TextEditorField:je,NumberField:be,EmailField:ye,PasswordField:xe,SelectField:Ce,ComboboxField:_e,DateField:ve,SwitchField:Te,RadioGroupField:Se,CheckboxField:ge,SimpleTextField:he,SimpleEmailField:oe,SimplePasswordField:fe,SimpleTextareaField:me,SimpleNumberField:de,SimpleSelectField:pe,SimpleArrayField:k,SimpleBooleanField:ne,SimpleComboboxField:re,SimpleDateField:ie,SimpleRadioGroupField:ae,FieldGroup:V,Field:H,FieldContent:U,FieldLabel:G,FieldContentMain:W,FieldSeparator:X,FieldError:Z},formComponents:{TanStackDialogForm:ze,TanStackPopoverForm:Ve,TanStackContainerForm:Ie,TanStackSectionForm:We,TanStackCardForm:Fe,TanStackFieldGroup:Be,TanStackTitleField:Ge,TanStackActionsForm:Ne,TanStackActionSubmit:Me,ArrayCol:D,ArrayHeaderRow:O}});Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return H}});
|
|
12
|
-
//# sourceMappingURL=tanstack-form-DatI41wz.cjs.map
|