@customafk/lunas-ui 0.2.72 → 0.2.74
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/{action-submit-C19tPHgf.cjs → action-submit-DI590CG3.cjs} +2 -2
- package/dist/{action-submit-C19tPHgf.cjs.map → action-submit-DI590CG3.cjs.map} +1 -1
- package/dist/{action-submit-cOfq0OSY.mjs → action-submit-ScN29AQ1.mjs} +2 -2
- package/dist/{action-submit-cOfq0OSY.mjs.map → action-submit-ScN29AQ1.mjs.map} +1 -1
- package/dist/{actions-form-3ItwYOFj.cjs → actions-form-CNW4nhAP.cjs} +2 -2
- package/dist/{actions-form-3ItwYOFj.cjs.map → actions-form-CNW4nhAP.cjs.map} +1 -1
- package/dist/{actions-form-DxbT1lip.mjs → actions-form-f8sejItb.mjs} +2 -2
- package/dist/{actions-form-DxbT1lip.mjs.map → actions-form-f8sejItb.mjs.map} +1 -1
- package/dist/{button-Bk4Y6_9I.d.cts → button-CKRN3ZQT.d.cts} +2 -2
- package/dist/{button-Bk4Y6_9I.d.mts → button-CKRN3ZQT.d.mts} +2 -2
- package/dist/{calendar-DPKt7D3w.d.mts → calendar-CIhMEz65.d.mts} +2 -2
- package/dist/{calendar-stv2bJv0.d.cts → calendar-DJdVw-yD.d.cts} +2 -2
- package/dist/{carousel-CV3IZ96x.d.mts → carousel-BniJSLfd.d.mts} +2 -2
- package/dist/{carousel-c2XuzmYN.d.cts → carousel-D4--8HfP.d.cts} +2 -2
- package/dist/{checkbox-field-BRqU_dYY.cjs → checkbox-field-Ck_VADFe.cjs} +2 -2
- package/dist/{checkbox-field-BRqU_dYY.cjs.map → checkbox-field-Ck_VADFe.cjs.map} +1 -1
- package/dist/{checkbox-field-BAQN-Yno.mjs → checkbox-field-Csro0Nla.mjs} +2 -2
- package/dist/{checkbox-field-BAQN-Yno.mjs.map → checkbox-field-Csro0Nla.mjs.map} +1 -1
- package/dist/{combobox-field-yvQPJSFC.mjs → combobox-field-BMfA_taQ.mjs} +2 -2
- package/dist/{combobox-field-yvQPJSFC.mjs.map → combobox-field-BMfA_taQ.mjs.map} +1 -1
- package/dist/{combobox-field-DnCpN--a.cjs → combobox-field-Bxrct4lA.cjs} +2 -2
- package/dist/{combobox-field-DnCpN--a.cjs.map → combobox-field-Bxrct4lA.cjs.map} +1 -1
- package/dist/{date-field-DLsJBYw8.cjs → date-field-Ba6O0uV3.cjs} +2 -2
- package/dist/{date-field-DLsJBYw8.cjs.map → date-field-Ba6O0uV3.cjs.map} +1 -1
- package/dist/{date-field-O67C78Kw.mjs → date-field-DUx13OiJ.mjs} +2 -2
- package/dist/{date-field-O67C78Kw.mjs.map → date-field-DUx13OiJ.mjs.map} +1 -1
- package/dist/{dialog-form-ClTCyJDD.cjs → dialog-form-B_kgYxZg.cjs} +2 -2
- package/dist/{dialog-form-ClTCyJDD.cjs.map → dialog-form-B_kgYxZg.cjs.map} +1 -1
- package/dist/{dialog-form-BxlLrEeZ.mjs → dialog-form-SyBJUlDB.mjs} +2 -2
- package/dist/{dialog-form-BxlLrEeZ.mjs.map → dialog-form-SyBJUlDB.mjs.map} +1 -1
- package/dist/dialogs/detail-dialog/components/sidebar.d.cts +2 -2
- package/dist/dialogs/detail-dialog/components/sidebar.d.mts +2 -2
- package/dist/{email-field-DqEDxkp7.mjs → email-field-BGYZUVl0.mjs} +2 -2
- package/dist/{email-field-DqEDxkp7.mjs.map → email-field-BGYZUVl0.mjs.map} +1 -1
- package/dist/{email-field-DZzkfVj5.cjs → email-field-CO_BZHod.cjs} +2 -2
- package/dist/{email-field-DZzkfVj5.cjs.map → email-field-CO_BZHod.cjs.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 +1 -1
- package/dist/features/descriptions/index.d.mts +1 -1
- package/dist/features/descriptions/index.mjs +1 -1
- package/dist/features/descriptions/index.mjs.map +1 -1
- package/dist/features/tables/index.d.cts +1 -1
- package/dist/features/tables/index.d.mts +1 -1
- package/dist/features/tanstack-form/index.cjs +1 -1
- package/dist/features/tanstack-form/index.mjs +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.mts +1 -1
- package/dist/features/text-editor/index.mjs +1 -1
- package/dist/{flex-DGVZd6c6.d.cts → flex-bw7U4hXn.d.cts} +4 -4
- package/dist/{flex-DGVZd6c6.d.mts → flex-bw7U4hXn.d.mts} +4 -4
- package/dist/{index-fZChR7MS.d.cts → index-CS7oydGk.d.cts} +6 -1
- package/dist/{index-D9bKlLiM.d.cts → index-DOaKN0wJ.d.cts} +22 -2
- package/dist/{index-D9bKlLiM.d.mts → index-DOaKN0wJ.d.mts} +22 -2
- package/dist/{index-C2HFO3a9.d.mts → index-DmvXR2Cn.d.mts} +6 -1
- package/dist/{index-By6nfR2q.d.cts → index-FEMPGfwO.d.cts} +2 -2
- package/dist/{index-5R8gTzkQ.d.mts → index-_GTjwUdG.d.mts} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.mts +13 -13
- package/dist/index.mjs +1 -1
- package/dist/{input-BQJV7ryj.d.cts → input-BieGEIDf.d.cts} +2 -2
- package/dist/{input-BQJV7ryj.d.mts → input-BieGEIDf.d.mts} +2 -2
- package/dist/{item-DTR2f2CX.d.cts → item-B2JsbfYJ.d.cts} +2 -2
- package/dist/{item-cIhkI3ZI.d.mts → item-DCYlZYdc.d.mts} +2 -2
- package/dist/layouts/flex.d.cts +1 -1
- package/dist/layouts/flex.d.mts +1 -1
- package/dist/{number-field-Cx-1U_Np.mjs → number-field-B89VeU2r.mjs} +2 -2
- package/dist/{number-field-Cx-1U_Np.mjs.map → number-field-B89VeU2r.mjs.map} +1 -1
- package/dist/{number-field-BTLobx1F.cjs → number-field-C7iEv5GJ.cjs} +2 -2
- package/dist/{number-field-BTLobx1F.cjs.map → number-field-C7iEv5GJ.cjs.map} +1 -1
- package/dist/{pagination-B2fyP0J2.d.cts → pagination-B03e1b6x.d.mts} +2 -2
- package/dist/{pagination-DY0PBCnI.d.mts → pagination-Dw23nKW-.d.cts} +2 -2
- package/dist/{password-field-CuBcb4mi.cjs → password-field-9RZ84TNz.cjs} +2 -2
- package/dist/{password-field-CuBcb4mi.cjs.map → password-field-9RZ84TNz.cjs.map} +1 -1
- package/dist/{password-field-CGPjZ5hZ.mjs → password-field-pqUgUcgf.mjs} +2 -2
- package/dist/{password-field-CGPjZ5hZ.mjs.map → password-field-pqUgUcgf.mjs.map} +1 -1
- package/dist/{popover-form-DVJUQ3_T.mjs → popover-form-BmOqFjQM.mjs} +2 -2
- package/dist/{popover-form-DVJUQ3_T.mjs.map → popover-form-BmOqFjQM.mjs.map} +1 -1
- package/dist/{popover-form-DzvgWQ2Q.cjs → popover-form-CLr6xIl5.cjs} +2 -2
- package/dist/{popover-form-DzvgWQ2Q.cjs.map → popover-form-CLr6xIl5.cjs.map} +1 -1
- package/dist/{radio-group-field-GiEbZRkS.cjs → radio-group-field-Bm2nkk1W.cjs} +2 -2
- package/dist/{radio-group-field-GiEbZRkS.cjs.map → radio-group-field-Bm2nkk1W.cjs.map} +1 -1
- package/dist/{radio-group-field-C45y9BQt.mjs → radio-group-field-DsUi8uCy.mjs} +2 -2
- package/dist/{radio-group-field-C45y9BQt.mjs.map → radio-group-field-DsUi8uCy.mjs.map} +1 -1
- package/dist/{search-input-CE9lDDeD.d.cts → search-input-Bq4enQzR.d.cts} +2 -2
- package/dist/{search-input-D2rEfTmY.d.mts → search-input-D51_mAY-.d.mts} +2 -2
- package/dist/{select-field-Cd63KvgR.cjs → select-field-F9eikYws.cjs} +2 -2
- package/dist/{select-field-Cd63KvgR.cjs.map → select-field-F9eikYws.cjs.map} +1 -1
- package/dist/{select-field-y3Zttb4j.mjs → select-field-ikKFoatc.mjs} +2 -2
- package/dist/{select-field-y3Zttb4j.mjs.map → select-field-ikKFoatc.mjs.map} +1 -1
- package/dist/{simple-array-field-BODzA766.cjs → simple-array-field-Bm_5b8pE.cjs} +2 -2
- package/dist/{simple-array-field-BODzA766.cjs.map → simple-array-field-Bm_5b8pE.cjs.map} +1 -1
- package/dist/{simple-array-field-DI_56dVs.mjs → simple-array-field-CeqZJfVs.mjs} +2 -2
- package/dist/{simple-array-field-DI_56dVs.mjs.map → simple-array-field-CeqZJfVs.mjs.map} +1 -1
- package/dist/{simple-boolean-field-BjnIh9Mq.cjs → simple-boolean-field-BeL9WjD5.cjs} +2 -2
- package/dist/{simple-boolean-field-BjnIh9Mq.cjs.map → simple-boolean-field-BeL9WjD5.cjs.map} +1 -1
- package/dist/{simple-boolean-field-oP5yJDQL.mjs → simple-boolean-field-DZ0J-Pk0.mjs} +2 -2
- package/dist/{simple-boolean-field-oP5yJDQL.mjs.map → simple-boolean-field-DZ0J-Pk0.mjs.map} +1 -1
- package/dist/{simple-combobox-field-Bd-xk5kC.mjs → simple-combobox-field-BQXmNATZ.mjs} +2 -2
- package/dist/{simple-combobox-field-Bd-xk5kC.mjs.map → simple-combobox-field-BQXmNATZ.mjs.map} +1 -1
- package/dist/{simple-combobox-field-Dgicw0VN.cjs → simple-combobox-field-CeV40wnv.cjs} +2 -2
- package/dist/{simple-combobox-field-Dgicw0VN.cjs.map → simple-combobox-field-CeV40wnv.cjs.map} +1 -1
- package/dist/{simple-date-field-hORsbXHE.cjs → simple-date-field-CrH-92i4.cjs} +2 -2
- package/dist/{simple-date-field-hORsbXHE.cjs.map → simple-date-field-CrH-92i4.cjs.map} +1 -1
- package/dist/{simple-date-field-DE5Z-Zkc.mjs → simple-date-field-D9ymav2L.mjs} +2 -2
- package/dist/{simple-date-field-DE5Z-Zkc.mjs.map → simple-date-field-D9ymav2L.mjs.map} +1 -1
- package/dist/{simple-email-field-CFbpYis_.mjs → simple-email-field-8IiVOYa-.mjs} +2 -2
- package/dist/{simple-email-field-CFbpYis_.mjs.map → simple-email-field-8IiVOYa-.mjs.map} +1 -1
- package/dist/{simple-email-field-DpuMlzxg.cjs → simple-email-field-CsMmMSvS.cjs} +2 -2
- package/dist/{simple-email-field-DpuMlzxg.cjs.map → simple-email-field-CsMmMSvS.cjs.map} +1 -1
- package/dist/{simple-number-field-BY0b4BJp.mjs → simple-number-field-C6hE1Qlj.mjs} +2 -2
- package/dist/{simple-number-field-BY0b4BJp.mjs.map → simple-number-field-C6hE1Qlj.mjs.map} +1 -1
- package/dist/{simple-number-field-C4y4rQcw.cjs → simple-number-field-CrU2A2yp.cjs} +2 -2
- package/dist/{simple-number-field-C4y4rQcw.cjs.map → simple-number-field-CrU2A2yp.cjs.map} +1 -1
- package/dist/{simple-password-field-CA0FuETK.mjs → simple-password-field-CabyA9Y7.mjs} +2 -2
- package/dist/{simple-password-field-CA0FuETK.mjs.map → simple-password-field-CabyA9Y7.mjs.map} +1 -1
- package/dist/{simple-password-field-BUzKJ0fu.cjs → simple-password-field-DWmUR_5_.cjs} +2 -2
- package/dist/{simple-password-field-BUzKJ0fu.cjs.map → simple-password-field-DWmUR_5_.cjs.map} +1 -1
- package/dist/{simple-radio-group-field-BM7HBTSs.mjs → simple-radio-group-field-BNFgrTSb.mjs} +2 -2
- package/dist/{simple-radio-group-field-BM7HBTSs.mjs.map → simple-radio-group-field-BNFgrTSb.mjs.map} +1 -1
- package/dist/{simple-radio-group-field-CCxUaYom.cjs → simple-radio-group-field-CpTX_Xoy.cjs} +2 -2
- package/dist/{simple-radio-group-field-CCxUaYom.cjs.map → simple-radio-group-field-CpTX_Xoy.cjs.map} +1 -1
- package/dist/{simple-select-field-CeTVQwmP.mjs → simple-select-field-CiUfRHCo.mjs} +2 -2
- package/dist/{simple-select-field-CeTVQwmP.mjs.map → simple-select-field-CiUfRHCo.mjs.map} +1 -1
- package/dist/{simple-select-field-CzN4Xb7n.cjs → simple-select-field-VibM3I3D.cjs} +2 -2
- package/dist/{simple-select-field-CzN4Xb7n.cjs.map → simple-select-field-VibM3I3D.cjs.map} +1 -1
- package/dist/{simple-text-field-CDsgWUFD.mjs → simple-text-field-Cmmmci4R.mjs} +2 -2
- package/dist/{simple-text-field-CDsgWUFD.mjs.map → simple-text-field-Cmmmci4R.mjs.map} +1 -1
- package/dist/{simple-text-field-DGZL0gML.cjs → simple-text-field-DRlcBB-3.cjs} +2 -2
- package/dist/{simple-text-field-DGZL0gML.cjs.map → simple-text-field-DRlcBB-3.cjs.map} +1 -1
- package/dist/{simple-textarea-field-vGYOegPj.cjs → simple-textarea-field-B0fOG7nh.cjs} +2 -2
- package/dist/{simple-textarea-field-vGYOegPj.cjs.map → simple-textarea-field-B0fOG7nh.cjs.map} +1 -1
- package/dist/{simple-textarea-field-BiuHXtqj.mjs → simple-textarea-field-BDqw8ewE.mjs} +2 -2
- package/dist/{simple-textarea-field-BiuHXtqj.mjs.map → simple-textarea-field-BDqw8ewE.mjs.map} +1 -1
- package/dist/{switch-field-BVgtm94W.mjs → switch-field-BDVIJ21m.mjs} +2 -2
- package/dist/{switch-field-BVgtm94W.mjs.map → switch-field-BDVIJ21m.mjs.map} +1 -1
- package/dist/{switch-field-DPB3JDT3.cjs → switch-field-D6CCxaEX.cjs} +2 -2
- package/dist/{switch-field-DPB3JDT3.cjs.map → switch-field-D6CCxaEX.cjs.map} +1 -1
- package/dist/{tanstack-form-CKAWexet.mjs → tanstack-form-AGwPfwiM.mjs} +2 -2
- package/dist/{tanstack-form-CKAWexet.mjs.map → tanstack-form-AGwPfwiM.mjs.map} +1 -1
- package/dist/{tanstack-form-CX3lC3mC.cjs → tanstack-form-Bae0TOEr.cjs} +2 -2
- package/dist/{tanstack-form-CX3lC3mC.cjs.map → tanstack-form-Bae0TOEr.cjs.map} +1 -1
- package/dist/text-editor-BQtIXOpM.mjs +2 -0
- package/dist/text-editor-BQtIXOpM.mjs.map +1 -0
- package/dist/text-editor-DJYQXXtP.cjs +2 -0
- package/dist/text-editor-DJYQXXtP.cjs.map +1 -0
- package/dist/{text-editor-field-qa3t2GBg.mjs → text-editor-field-C2KDtfZV.mjs} +2 -2
- package/dist/{text-editor-field-qa3t2GBg.mjs.map → text-editor-field-C2KDtfZV.mjs.map} +1 -1
- package/dist/{text-editor-field-Ddvgdo_p.cjs → text-editor-field-DF8lkOc_.cjs} +2 -2
- package/dist/{text-editor-field-Ddvgdo_p.cjs.map → text-editor-field-DF8lkOc_.cjs.map} +1 -1
- package/dist/{text-field-Cwu0xuXt.cjs → text-field-B1n5Xd-k.cjs} +2 -2
- package/dist/{text-field-Cwu0xuXt.cjs.map → text-field-B1n5Xd-k.cjs.map} +1 -1
- package/dist/{text-field-CBUTZKGH.mjs → text-field-BJciq-S8.mjs} +2 -2
- package/dist/{text-field-CBUTZKGH.mjs.map → text-field-BJciq-S8.mjs.map} +1 -1
- package/dist/{textarea-field-Ctj5o5my.mjs → textarea-field-BjdX2Qjt.mjs} +2 -2
- package/dist/{textarea-field-Ctj5o5my.mjs.map → textarea-field-BjdX2Qjt.mjs.map} +1 -1
- package/dist/{textarea-field-jOqHJcAL.cjs → textarea-field-Bm7bsyjB.cjs} +2 -2
- package/dist/{textarea-field-jOqHJcAL.cjs.map → textarea-field-Bm7bsyjB.cjs.map} +1 -1
- package/dist/{toggle-Bh4EazxT.d.cts → toggle-Bk5Lvs5n.d.cts} +2 -2
- package/dist/{toggle-Bh4EazxT.d.mts → toggle-Bk5Lvs5n.d.mts} +2 -2
- package/dist/{toggle-group-BpqkL1ds.d.cts → toggle-group-7ZP2e-K1.d.mts} +2 -2
- package/dist/{toggle-group-DzNE38v5.d.mts → toggle-group-B0pu4YV-.d.cts} +2 -2
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.mts +1 -1
- package/dist/ui/calendar.d.cts +1 -1
- package/dist/ui/calendar.d.mts +1 -1
- package/dist/ui/carousel.d.cts +1 -1
- package/dist/ui/carousel.d.mts +1 -1
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.mts +1 -1
- package/dist/ui/inputs/search-input.d.cts +1 -1
- package/dist/ui/inputs/search-input.d.mts +1 -1
- package/dist/ui/item.d.cts +1 -1
- package/dist/ui/item.d.mts +1 -1
- package/dist/ui/pagination.d.cts +1 -1
- package/dist/ui/pagination.d.mts +1 -1
- package/dist/ui/status.d.cts +1 -1
- package/dist/ui/status.d.mts +1 -1
- package/dist/ui/toggle-group.d.cts +1 -1
- package/dist/ui/toggle-group.d.mts +1 -1
- package/dist/ui/toggle.d.cts +1 -1
- package/dist/ui/toggle.d.mts +1 -1
- package/package.json +1 -1
- package/dist/text-editor-BYE2-G5K.mjs +0 -2
- package/dist/text-editor-BYE2-G5K.mjs.map +0 -1
- package/dist/text-editor-CfQk5dIx.cjs +0 -2
- package/dist/text-editor-CfQk5dIx.cjs.map +0 -1
|
@@ -3,7 +3,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
//#region packages/components/ui/input.d.ts
|
|
4
4
|
/** CVA variant definitions for the `Input` component — controls sizing and visual style. */
|
|
5
5
|
declare const inputVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "soft" | "outline" | "ghost" | "none" | "subtle" | null | undefined;
|
|
7
7
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
type InputVariantProps = VariantProps<typeof inputVariants>;
|
|
@@ -36,4 +36,4 @@ declare function Input({
|
|
|
36
36
|
}): import("react").JSX.Element;
|
|
37
37
|
//#endregion
|
|
38
38
|
export { InputVariantProps as n, inputVariants as r, Input as t };
|
|
39
|
-
//# sourceMappingURL=input-
|
|
39
|
+
//# sourceMappingURL=input-BieGEIDf.d.cts.map
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
//#region packages/components/ui/input.d.ts
|
|
4
4
|
/** CVA variant definitions for the `Input` component — controls sizing and visual style. */
|
|
5
5
|
declare const inputVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "soft" | "outline" | "ghost" | "none" | "subtle" | null | undefined;
|
|
7
7
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
type InputVariantProps = VariantProps<typeof inputVariants>;
|
|
@@ -36,4 +36,4 @@ declare function Input({
|
|
|
36
36
|
}): import("react").JSX.Element;
|
|
37
37
|
//#endregion
|
|
38
38
|
export { InputVariantProps as n, inputVariants as r, Input as t };
|
|
39
|
-
//# sourceMappingURL=input-
|
|
39
|
+
//# sourceMappingURL=input-BieGEIDf.d.mts.map
|
|
@@ -33,7 +33,7 @@ declare function ItemSeparator({
|
|
|
33
33
|
}: React.ComponentProps<typeof Separator>): import("react").JSX.Element;
|
|
34
34
|
declare const itemVariants: (props?: ({
|
|
35
35
|
variant?: "default" | "muted" | "outline" | null | undefined;
|
|
36
|
-
size?: "
|
|
36
|
+
size?: "default" | "sm" | null | undefined;
|
|
37
37
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
38
38
|
/**
|
|
39
39
|
* The primary row container inside an ItemGroup.
|
|
@@ -96,4 +96,4 @@ declare function ItemFooter({
|
|
|
96
96
|
}: React.ComponentProps<'div'>): import("react").JSX.Element;
|
|
97
97
|
//#endregion
|
|
98
98
|
export { ItemFooter as a, ItemMedia as c, ItemDescription as i, ItemSeparator as l, ItemActions as n, ItemGroup as o, ItemContent as r, ItemHeader as s, Item as t, ItemTitle as u };
|
|
99
|
-
//# sourceMappingURL=item-
|
|
99
|
+
//# sourceMappingURL=item-B2JsbfYJ.d.cts.map
|
|
@@ -33,7 +33,7 @@ declare function ItemSeparator({
|
|
|
33
33
|
}: React.ComponentProps<typeof Separator>): import("react").JSX.Element;
|
|
34
34
|
declare const itemVariants: (props?: ({
|
|
35
35
|
variant?: "default" | "muted" | "outline" | null | undefined;
|
|
36
|
-
size?: "
|
|
36
|
+
size?: "default" | "sm" | null | undefined;
|
|
37
37
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
38
38
|
/**
|
|
39
39
|
* The primary row container inside an ItemGroup.
|
|
@@ -96,4 +96,4 @@ declare function ItemFooter({
|
|
|
96
96
|
}: React.ComponentProps<'div'>): import("react").JSX.Element;
|
|
97
97
|
//#endregion
|
|
98
98
|
export { ItemFooter as a, ItemMedia as c, ItemDescription as i, ItemSeparator as l, ItemActions as n, ItemGroup as o, ItemContent as r, ItemHeader as s, Item as t, ItemTitle as u };
|
|
99
|
-
//# sourceMappingURL=item-
|
|
99
|
+
//# sourceMappingURL=item-DCYlZYdc.d.mts.map
|
package/dist/layouts/flex.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Flex } from "../flex-
|
|
1
|
+
import { t as Flex } from "../flex-bw7U4hXn.cjs";
|
|
2
2
|
export { Flex };
|
package/dist/layouts/flex.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Flex } from "../flex-
|
|
1
|
+
import { t as Flex } from "../flex-bw7U4hXn.mjs";
|
|
2
2
|
export { Flex };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as e}from"./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=number-field-
|
|
1
|
+
import{G as e}from"./tanstack-form-AGwPfwiM.mjs";import{Field as t,FieldContent as n,FieldContentMain as r,FieldDescription as i,FieldError as a,FieldGroup as o,FieldLabel as s,FieldNote as c,FieldSeparator as l,FieldTooltip as u}from"./field-V2DoD8qL.mjs";import{t as d}from"./number-input-CqkegUWs.mjs";import{BanIcon as f,Loader2Icon as p}from"lucide-react";import{memo as m,useCallback as h,useId as g}from"react";import{cn as _}from"@customafk/react-toolkit/utils";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{useStore as b}from"@tanstack/react-form";const x=m(({label:m,description:x,placeholder:S,tooltip:C,helperText:w,orientation:T=`responsive`,showErrorMessage:E=!0,rounding:D,decimalPlaces:O,precision:k,unit:A,required:j=!1,disabled:M=!1,allowNegative:N})=>{let P=g(),F=g(),I=e(),L=b(I.form.store,({isSubmitting:e})=>e),R=M||L,z=I.state.meta.isDirty||I.state.meta.isTouched,B=z&&!I.state.meta.isValid,V=j&&I.state.value===null,H=!!I.state.meta.errors.length,U=h(e=>{R||I.handleChange(e)},[R,I.handleChange]);return y(o,{className:`gap-y-4 px-4`,children:[y(t,{orientation:T,"data-invalid":B,children:[y(n,{children:[y(s,{htmlFor:P,"aria-required":V,children:[m,C&&v(u,{tooltip:C})]}),v(i,{children:x})]}),y(r,{children:[y(`div`,{className:`relative w-full`,children:[v(d,{id:P,value:I.state.value,"aria-invalid":B,"aria-describedby":F,placeholder:S,disabled:R,roundingRule:D,numberAfterDecimalPoint:O,precision:k,unitText:A,allowNegative:N,className:_(R&&`pointer-events-none opacity-60`),onBlur:I.handleBlur,onValueChange:U}),L&&v(`div`,{className:`pointer-events-none absolute inset-s-2 inset-y-0 top-2.5 [&>svg]:size-3.5`,children:v(p,{className:`animate-spin text-primary-strong`})}),!L&&z&&E&&H&&v(`div`,{className:`pointer-events-none absolute inset-s-2 inset-y-0 top-2.75 text-danger-strong [&>svg]:size-3.5`,children:v(f,{})}),v(`div`,{className:`mt-1 flex w-full items-start justify-between gap-x-2`,children:z&&E?v(a,{id:F,className:`flex-1`,errors:I.state.meta.errors}):v(`div`,{})})]}),v(c,{isShow:!!w,children:w})]})]}),v(l,{})]})});x.displayName=`NumberField`;export{x as NumberField};
|
|
2
|
+
//# sourceMappingURL=number-field-B89VeU2r.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field-
|
|
1
|
+
{"version":3,"file":"number-field-B89VeU2r.mjs","names":[],"sources":["../packages/components/features/tanstack-form/components/fields/number-field.tsx"],"sourcesContent":["'use client';\n\nimport { memo, useCallback, useId } from 'react';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { BanIcon, Loader2Icon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { NumberInput } from '@/components/ui/inputs/number-input';\n\nimport { useTanStackFieldContext } from '../form-context';\nimport {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n FieldTooltip,\n} from '../ui/field';\n\nimport type { NumberFieldProps } from '../../types';\n\n/**\n * A TanStack Form-connected numeric input field supporting rounding rules,\n * decimal precision, unit labels, and submission-state feedback.\n *\n * @example\n * import { NumberField } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <form.Field name=\"quantity\">\n * {() => (\n * <NumberField\n * label=\"Quantity\"\n * placeholder=\"0\"\n * unit=\"pcs\"\n * decimalPlaces={2}\n * required\n * />\n * )}\n * </form.Field>\n */\nexport const NumberField = memo<NumberFieldProps>(\n ({\n label,\n description,\n placeholder,\n tooltip,\n helperText,\n orientation = 'responsive',\n showErrorMessage = true,\n rounding,\n decimalPlaces,\n precision,\n unit,\n required = false,\n disabled = false,\n allowNegative,\n }) => {\n const id = useId();\n const errorId = useId();\n\n const field = useTanStackFieldContext<number | null>();\n\n const isSubmitting = useStore(field.form.store, ({ isSubmitting }) => isSubmitting);\n const isDisabled = disabled || isSubmitting;\n\n const _touched = field.state.meta.isDirty || field.state.meta.isTouched;\n const _invalid = _touched && !field.state.meta.isValid;\n const _isEmpty = required && field.state.value === null;\n const _hasErrors = !!field.state.meta.errors.length;\n\n const onValueChange = useCallback(\n (value: number | null) => {\n if (isDisabled) return;\n field.handleChange(value);\n },\n [isDisabled, field.handleChange]\n );\n\n return (\n <FieldGroup className=\"gap-y-4 px-4\">\n <Field orientation={orientation} data-invalid={_invalid}>\n <FieldContent>\n <FieldLabel htmlFor={id} aria-required={_isEmpty}>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n </FieldContent>\n\n <FieldContentMain>\n <div className=\"relative w-full\">\n <NumberInput\n id={id}\n value={field.state.value}\n aria-invalid={_invalid}\n aria-describedby={errorId}\n placeholder={placeholder}\n disabled={isDisabled}\n roundingRule={rounding}\n numberAfterDecimalPoint={decimalPlaces}\n precision={precision}\n unitText={unit}\n allowNegative={allowNegative}\n className={cn(isDisabled && 'pointer-events-none opacity-60')}\n onBlur={field.handleBlur}\n onValueChange={onValueChange}\n />\n {isSubmitting && (\n <div className=\"pointer-events-none absolute inset-s-2 inset-y-0 top-2.5 [&>svg]:size-3.5\">\n <Loader2Icon className=\"animate-spin text-primary-strong\" />\n </div>\n )}\n {!isSubmitting && _touched && showErrorMessage && _hasErrors && (\n <div className=\"pointer-events-none absolute inset-s-2 inset-y-0 top-2.75 text-danger-strong [&>svg]:size-3.5\">\n <BanIcon />\n </div>\n )}\n <div className=\"mt-1 flex w-full items-start justify-between gap-x-2\">\n {_touched && showErrorMessage ? <FieldError id={errorId} className=\"flex-1\" errors={field.state.meta.errors} /> : <div />}\n </div>\n </div>\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n }\n);\n\nNumberField.displayName = 'NumberField';\n"],"mappings":"wjBA+CA,MAAa,EAAc,GACxB,CACC,QACA,cACA,cACA,UACA,aACA,cAAc,aACd,mBAAmB,GACnB,WACA,gBACA,YACA,OACA,WAAW,GACX,WAAW,GACX,mBACI,CACJ,IAAM,EAAK,EAAM,EACX,EAAU,EAAM,EAEhB,EAAQ,EAAuC,EAE/C,EAAe,EAAS,EAAM,KAAK,OAAQ,CAAE,kBAAmB,CAAY,EAC5E,EAAa,GAAY,EAEzB,EAAW,EAAM,MAAM,KAAK,SAAW,EAAM,MAAM,KAAK,UACxD,EAAW,GAAY,CAAC,EAAM,MAAM,KAAK,QACzC,EAAW,GAAY,EAAM,MAAM,QAAU,KAC7C,EAAa,CAAC,CAAC,EAAM,MAAM,KAAK,OAAO,OAEvC,EAAgB,EACnB,GAAyB,CACpB,GACJ,EAAM,aAAa,CAAK,CAC1B,EACA,CAAC,EAAY,EAAM,YAAY,CACjC,EAEA,OACE,EAAC,EAAD,CAAY,UAAU,wBAAtB,CACE,EAAC,EAAD,CAAoB,cAAa,eAAc,WAA/C,CACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAY,QAAS,EAAI,gBAAe,WAAxC,CACG,EACA,GAAW,EAAC,EAAD,CAAuB,SAAU,CAAA,CACnC,IACZ,EAAC,EAAD,CAAA,SAAmB,CAA8B,CAAA,CACrC,CAAA,CAAA,EAEd,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,MAAD,CAAK,UAAU,2BAAf,CACE,EAAC,EAAD,CACM,KACJ,MAAO,EAAM,MAAM,MACnB,eAAc,EACd,mBAAkB,EACL,cACb,SAAU,EACV,aAAc,EACd,wBAAyB,EACd,YACX,SAAU,EACK,gBACf,UAAW,EAAG,GAAc,gCAAgC,EAC5D,OAAQ,EAAM,WACC,eAChB,CAAA,EACA,GACC,EAAC,MAAD,CAAK,UAAU,qFACb,EAAC,EAAD,CAAa,UAAU,kCAAoC,CAAA,CACxD,CAAA,EAEN,CAAC,GAAgB,GAAY,GAAoB,GAChD,EAAC,MAAD,CAAK,UAAU,yGACb,EAAC,EAAD,CAAU,CAAA,CACP,CAAA,EAEP,EAAC,MAAD,CAAK,UAAU,gEACZ,GAAY,EAAmB,EAAC,EAAD,CAAY,GAAI,EAAS,UAAU,SAAS,OAAQ,EAAM,MAAM,KAAK,MAAS,CAAA,EAAI,EAAC,MAAD,CAAM,CAAA,CACrH,CAAA,CACF,IACL,EAAC,EAAD,CAAW,OAAQ,CAAC,CAAC,WAAa,CAAsB,CAAA,CACxC,CAAA,CAAA,CACb,IACP,EAAC,EAAD,CAAiB,CAAA,CACP,GAEhB,CACF,EAEA,EAAY,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=number-field-
|
|
1
|
+
const e=require("./tanstack-form-Bae0TOEr.cjs"),t=require("./field-BSLi-P0Q.cjs"),n=require("./number-input-kTh9zzr7.cjs");let r=require("lucide-react"),i=require("react"),a=require("@customafk/react-toolkit/utils"),o=require("react/jsx-runtime"),s=require("@tanstack/react-form");const c=(0,i.memo)(({label:c,description:l,placeholder:u,tooltip:d,helperText:f,orientation:p=`responsive`,showErrorMessage:m=!0,rounding:h,decimalPlaces:g,precision:_,unit:v,required:y=!1,disabled:b=!1,allowNegative:x})=>{let S=(0,i.useId)(),C=(0,i.useId)(),w=e.G(),T=(0,s.useStore)(w.form.store,({isSubmitting:e})=>e),E=b||T,D=w.state.meta.isDirty||w.state.meta.isTouched,O=D&&!w.state.meta.isValid,k=y&&w.state.value===null,A=!!w.state.meta.errors.length,j=(0,i.useCallback)(e=>{E||w.handleChange(e)},[E,w.handleChange]);return(0,o.jsxs)(t.FieldGroup,{className:`gap-y-4 px-4`,children:[(0,o.jsxs)(t.Field,{orientation:p,"data-invalid":O,children:[(0,o.jsxs)(t.FieldContent,{children:[(0,o.jsxs)(t.FieldLabel,{htmlFor:S,"aria-required":k,children:[c,d&&(0,o.jsx)(t.FieldTooltip,{tooltip:d})]}),(0,o.jsx)(t.FieldDescription,{children:l})]}),(0,o.jsxs)(t.FieldContentMain,{children:[(0,o.jsxs)(`div`,{className:`relative w-full`,children:[(0,o.jsx)(n.t,{id:S,value:w.state.value,"aria-invalid":O,"aria-describedby":C,placeholder:u,disabled:E,roundingRule:h,numberAfterDecimalPoint:g,precision:_,unitText:v,allowNegative:x,className:(0,a.cn)(E&&`pointer-events-none opacity-60`),onBlur:w.handleBlur,onValueChange:j}),T&&(0,o.jsx)(`div`,{className:`pointer-events-none absolute inset-s-2 inset-y-0 top-2.5 [&>svg]:size-3.5`,children:(0,o.jsx)(r.Loader2Icon,{className:`animate-spin text-primary-strong`})}),!T&&D&&m&&A&&(0,o.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,o.jsx)(r.BanIcon,{})}),(0,o.jsx)(`div`,{className:`mt-1 flex w-full items-start justify-between gap-x-2`,children:D&&m?(0,o.jsx)(t.FieldError,{id:C,className:`flex-1`,errors:w.state.meta.errors}):(0,o.jsx)(`div`,{})})]}),(0,o.jsx)(t.FieldNote,{isShow:!!f,children:f})]})]}),(0,o.jsx)(t.FieldSeparator,{})]})});c.displayName=`NumberField`,exports.NumberField=c;
|
|
2
|
+
//# sourceMappingURL=number-field-C7iEv5GJ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field-
|
|
1
|
+
{"version":3,"file":"number-field-C7iEv5GJ.cjs","names":["useTanStackFieldContext","FieldGroup","Field","FieldContent","FieldLabel","FieldTooltip","FieldDescription","FieldContentMain","NumberInput","Loader2Icon","BanIcon","FieldError","FieldNote","FieldSeparator"],"sources":["../packages/components/features/tanstack-form/components/fields/number-field.tsx"],"sourcesContent":["'use client';\n\nimport { memo, useCallback, useId } from 'react';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { BanIcon, Loader2Icon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { NumberInput } from '@/components/ui/inputs/number-input';\n\nimport { useTanStackFieldContext } from '../form-context';\nimport {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n FieldTooltip,\n} from '../ui/field';\n\nimport type { NumberFieldProps } from '../../types';\n\n/**\n * A TanStack Form-connected numeric input field supporting rounding rules,\n * decimal precision, unit labels, and submission-state feedback.\n *\n * @example\n * import { NumberField } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <form.Field name=\"quantity\">\n * {() => (\n * <NumberField\n * label=\"Quantity\"\n * placeholder=\"0\"\n * unit=\"pcs\"\n * decimalPlaces={2}\n * required\n * />\n * )}\n * </form.Field>\n */\nexport const NumberField = memo<NumberFieldProps>(\n ({\n label,\n description,\n placeholder,\n tooltip,\n helperText,\n orientation = 'responsive',\n showErrorMessage = true,\n rounding,\n decimalPlaces,\n precision,\n unit,\n required = false,\n disabled = false,\n allowNegative,\n }) => {\n const id = useId();\n const errorId = useId();\n\n const field = useTanStackFieldContext<number | null>();\n\n const isSubmitting = useStore(field.form.store, ({ isSubmitting }) => isSubmitting);\n const isDisabled = disabled || isSubmitting;\n\n const _touched = field.state.meta.isDirty || field.state.meta.isTouched;\n const _invalid = _touched && !field.state.meta.isValid;\n const _isEmpty = required && field.state.value === null;\n const _hasErrors = !!field.state.meta.errors.length;\n\n const onValueChange = useCallback(\n (value: number | null) => {\n if (isDisabled) return;\n field.handleChange(value);\n },\n [isDisabled, field.handleChange]\n );\n\n return (\n <FieldGroup className=\"gap-y-4 px-4\">\n <Field orientation={orientation} data-invalid={_invalid}>\n <FieldContent>\n <FieldLabel htmlFor={id} aria-required={_isEmpty}>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n </FieldContent>\n\n <FieldContentMain>\n <div className=\"relative w-full\">\n <NumberInput\n id={id}\n value={field.state.value}\n aria-invalid={_invalid}\n aria-describedby={errorId}\n placeholder={placeholder}\n disabled={isDisabled}\n roundingRule={rounding}\n numberAfterDecimalPoint={decimalPlaces}\n precision={precision}\n unitText={unit}\n allowNegative={allowNegative}\n className={cn(isDisabled && 'pointer-events-none opacity-60')}\n onBlur={field.handleBlur}\n onValueChange={onValueChange}\n />\n {isSubmitting && (\n <div className=\"pointer-events-none absolute inset-s-2 inset-y-0 top-2.5 [&>svg]:size-3.5\">\n <Loader2Icon className=\"animate-spin text-primary-strong\" />\n </div>\n )}\n {!isSubmitting && _touched && showErrorMessage && _hasErrors && (\n <div className=\"pointer-events-none absolute inset-s-2 inset-y-0 top-2.75 text-danger-strong [&>svg]:size-3.5\">\n <BanIcon />\n </div>\n )}\n <div className=\"mt-1 flex w-full items-start justify-between gap-x-2\">\n {_touched && showErrorMessage ? <FieldError id={errorId} className=\"flex-1\" errors={field.state.meta.errors} /> : <div />}\n </div>\n </div>\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n }\n);\n\nNumberField.displayName = 'NumberField';\n"],"mappings":"yRA+CA,MAAa,GAAA,EAAA,EAAA,KAAA,EACV,CACC,QACA,cACA,cACA,UACA,aACA,cAAc,aACd,mBAAmB,GACnB,WACA,gBACA,YACA,OACA,WAAW,GACX,WAAW,GACX,mBACI,CACJ,IAAM,GAAA,EAAA,EAAA,MAAA,CAAW,EACX,GAAA,EAAA,EAAA,MAAA,CAAgB,EAEhB,EAAQA,EAAAA,EAAuC,EAE/C,GAAA,EAAA,EAAA,SAAA,CAAwB,EAAM,KAAK,OAAQ,CAAE,kBAAmB,CAAY,EAC5E,EAAa,GAAY,EAEzB,EAAW,EAAM,MAAM,KAAK,SAAW,EAAM,MAAM,KAAK,UACxD,EAAW,GAAY,CAAC,EAAM,MAAM,KAAK,QACzC,EAAW,GAAY,EAAM,MAAM,QAAU,KAC7C,EAAa,CAAC,CAAC,EAAM,MAAM,KAAK,OAAO,OAEvC,GAAA,EAAA,EAAA,YAAA,CACH,GAAyB,CACpB,GACJ,EAAM,aAAa,CAAK,CAC1B,EACA,CAAC,EAAY,EAAM,YAAY,CACjC,EAEA,OACE,EAAA,EAAA,KAAA,CAACC,EAAAA,WAAD,CAAY,UAAU,wBAAtB,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,MAAD,CAAoB,cAAa,eAAc,WAA/C,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,aAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,WAAD,CAAY,QAAS,EAAI,gBAAe,WAAxC,CACG,EACA,IAAW,EAAA,EAAA,IAAA,CAACC,EAAAA,aAAD,CAAuB,SAAU,CAAA,CACnC,KACZ,EAAA,EAAA,IAAA,CAACC,EAAAA,iBAAD,CAAA,SAAmB,CAA8B,CAAA,CACrC,CAAA,CAAA,GAEd,EAAA,EAAA,KAAA,CAACC,EAAAA,iBAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,2BAAf,EACE,EAAA,EAAA,IAAA,CAACC,EAAAA,EAAD,CACM,KACJ,MAAO,EAAM,MAAM,MACnB,eAAc,EACd,mBAAkB,EACL,cACb,SAAU,EACV,aAAc,EACd,wBAAyB,EACd,YACX,SAAU,EACK,gBACf,WAAA,EAAA,EAAA,GAAA,CAAc,GAAc,gCAAgC,EAC5D,OAAQ,EAAM,WACC,eAChB,CAAA,EACA,IACC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,sFACb,EAAA,EAAA,IAAA,CAACC,EAAAA,YAAD,CAAa,UAAU,kCAAoC,CAAA,CACxD,CAAA,EAEN,CAAC,GAAgB,GAAY,GAAoB,IAChD,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,0GACb,EAAA,EAAA,IAAA,CAACC,EAAAA,QAAD,CAAU,CAAA,CACP,CAAA,GAEP,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,gEACZ,GAAY,GAAmB,EAAA,EAAA,IAAA,CAACC,EAAAA,WAAD,CAAY,GAAI,EAAS,UAAU,SAAS,OAAQ,EAAM,MAAM,KAAK,MAAS,CAAA,GAAI,EAAA,EAAA,IAAA,CAAC,MAAD,CAAM,CAAA,CACrH,CAAA,CACF,KACL,EAAA,EAAA,IAAA,CAACC,EAAAA,UAAD,CAAW,OAAQ,CAAC,CAAC,WAAa,CAAsB,CAAA,CACxC,CAAA,CAAA,CACb,KACP,EAAA,EAAA,IAAA,CAACC,EAAAA,eAAD,CAAiB,CAAA,CACP,GAEhB,CACF,EAEA,EAAY,YAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Button } from "./button-
|
|
1
|
+
import { t as Button } from "./button-CKRN3ZQT.mjs";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/ui/pagination.d.ts
|
|
4
4
|
/**
|
|
@@ -61,4 +61,4 @@ declare function PaginationEllipsis({
|
|
|
61
61
|
}: React.ComponentProps<'span'>): import("react").JSX.Element;
|
|
62
62
|
//#endregion
|
|
63
63
|
export { PaginationLink as a, PaginationItem as i, PaginationContent as n, PaginationNext as o, PaginationEllipsis as r, PaginationPrevious as s, Pagination as t };
|
|
64
|
-
//# sourceMappingURL=pagination-
|
|
64
|
+
//# sourceMappingURL=pagination-B03e1b6x.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Button } from "./button-
|
|
1
|
+
import { t as Button } from "./button-CKRN3ZQT.cjs";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/ui/pagination.d.ts
|
|
4
4
|
/**
|
|
@@ -61,4 +61,4 @@ declare function PaginationEllipsis({
|
|
|
61
61
|
}: React.ComponentProps<'span'>): import("react").JSX.Element;
|
|
62
62
|
//#endregion
|
|
63
63
|
export { PaginationLink as a, PaginationItem as i, PaginationContent as n, PaginationNext as o, PaginationEllipsis as r, PaginationPrevious as s, Pagination as t };
|
|
64
|
-
//# sourceMappingURL=pagination-
|
|
64
|
+
//# sourceMappingURL=pagination-Dw23nKW-.d.cts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=password-field-
|
|
1
|
+
const e=require("./tanstack-form-Bae0TOEr.cjs"),t=require("./ui/input.cjs"),n=require("./field-BSLi-P0Q.cjs");let r=require("lucide-react"),i=require("react"),a=require("react/jsx-runtime"),o=require("@tanstack/react-form");const s=({label:s,description:c,placeholder:l,orientation:u=`responsive`,tooltip:d,helperText:f,showErrorMessage:p=!0})=>{let m=(0,i.useId)(),{form:h,name:g,state:_,handleBlur:v,handleChange:y}=e.G(),b=(0,o.useStore)(h.store,({isSubmitting:e})=>e),[x,S]=(0,i.useState)(!1),C=_.meta.isDirty&&_.meta.isTouched&&!_.meta.isValid,w=(0,i.useCallback)(()=>S(e=>!e),[]),T=(0,i.useCallback)(({target:{value:e}})=>{b||y(e||null)},[b,y]);return(0,a.jsxs)(n.FieldGroup,{className:`gap-y-4 px-4`,children:[(0,a.jsxs)(n.Field,{"data-invalid":C,orientation:u,children:[(0,a.jsxs)(n.FieldContent,{children:[(0,a.jsxs)(n.FieldLabel,{htmlFor:m,children:[s,d&&(0,a.jsx)(n.FieldTooltip,{tooltip:d})]}),(0,a.jsx)(n.FieldDescription,{children:c})]}),(0,a.jsxs)(n.FieldContentMain,{children:[(0,a.jsx)(t.Input,{id:m,name:g,type:x?`text`:`password`,placeholder:l,value:_.value??``,"aria-invalid":C,autoComplete:`new-password`,onBlur:v,onChange:T}),(0,a.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:w,"aria-label":x?`Ẩn mật khẩu`:`Hiện mật khẩu`,"aria-pressed":x,"aria-controls":m,children:x?(0,a.jsx)(r.EyeOffIcon,{size:16,"aria-hidden":`true`}):(0,a.jsx)(r.EyeIcon,{size:16,"aria-hidden":`true`})}),(0,a.jsx)(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:p&&_.meta.isDirty&&(0,a.jsx)(n.FieldError,{errors:_.meta.errors})}),(0,a.jsx)(n.FieldNote,{isShow:!!f,children:f})]})]}),(0,a.jsx)(n.FieldSeparator,{})]})};exports.PasswordField=s;
|
|
2
|
+
//# sourceMappingURL=password-field-9RZ84TNz.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-field-
|
|
1
|
+
{"version":3,"file":"password-field-9RZ84TNz.cjs","names":["useTanStackFieldContext","FieldGroup","Field","FieldContent","FieldLabel","FieldTooltip","FieldDescription","FieldContentMain","Input","EyeOffIcon","EyeIcon","FieldError","FieldNote","FieldSeparator"],"sources":["../packages/components/features/tanstack-form/components/fields/password-field.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useId, useState } from 'react';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react';\n\nimport { Input } from '@/components/ui/input';\n\nimport { useTanStackFieldContext } from '../form-context';\nimport {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n FieldTooltip,\n} from '../ui/field';\n\nimport type { PasswordFieldProps as Props } from '../../types';\n\n/**\n * A TanStack Form-connected password input field with a show/hide toggle button\n * and inline validation error display.\n *\n * @example\n * import { PasswordField } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <form.Field name=\"password\">\n * {() => (\n * <PasswordField\n * label=\"Password\"\n * placeholder=\"Enter your password\"\n * helperText=\"Must be at least 8 characters\"\n * />\n * )}\n * </form.Field>\n */\nexport const PasswordField: React.FC<Props> = ({\n label,\n description,\n placeholder,\n orientation = 'responsive',\n tooltip,\n helperText,\n showErrorMessage = true,\n}) => {\n const id = useId();\n const { form, name, state, handleBlur, handleChange } = useTanStackFieldContext<string | null>();\n\n const isSubmitting = useStore(form.store, ({ isSubmitting }) => isSubmitting);\n\n const [isVisible, setIsVisible] = useState<boolean>(false);\n\n const _invalid = state.meta.isDirty && state.meta.isTouched && !state.meta.isValid;\n\n const toggleVisibility = useCallback(() => setIsVisible(prev => !prev), []);\n\n const onChange = useCallback<React.ChangeEventHandler<HTMLInputElement>>(\n ({ target: { value } }) => {\n if (isSubmitting) return;\n handleChange(value || null);\n },\n [isSubmitting, handleChange]\n );\n\n return (\n <FieldGroup className=\"gap-y-4 px-4\">\n <Field data-invalid={_invalid} orientation={orientation}>\n <FieldContent>\n <FieldLabel htmlFor={id}>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n </FieldContent>\n <FieldContentMain>\n <Input\n id={id}\n name={name}\n type={isVisible ? 'text' : 'password'}\n placeholder={placeholder}\n value={state.value ?? ''}\n aria-invalid={_invalid}\n autoComplete=\"new-password\"\n onBlur={handleBlur}\n onChange={onChange}\n />\n\n <button\n 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\"\n type=\"button\"\n onClick={toggleVisibility}\n aria-label={isVisible ? 'Ẩn mật khẩu' : 'Hiện mật khẩu'}\n aria-pressed={isVisible}\n aria-controls={id}\n >\n {isVisible ? <EyeOffIcon size={16} aria-hidden=\"true\" /> : <EyeIcon size={16} aria-hidden=\"true\" />}\n </button>\n\n <div className=\"mt-1 flex w-full items-start justify-start\">\n {showErrorMessage && state.meta.isDirty && <FieldError errors={state.meta.errors} />}\n </div>\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n};\n"],"mappings":"gOA2CA,MAAa,GAAkC,CAC7C,QACA,cACA,cACA,cAAc,aACd,UACA,aACA,mBAAmB,MACf,CACJ,IAAM,GAAA,EAAA,EAAA,MAAA,CAAW,EACX,CAAE,OAAM,OAAM,QAAO,aAAY,gBAAiBA,EAAAA,EAAuC,EAEzF,GAAA,EAAA,EAAA,SAAA,CAAwB,EAAK,OAAQ,CAAE,kBAAmB,CAAY,EAEtE,CAAC,EAAW,IAAA,EAAA,EAAA,SAAA,CAAkC,EAAK,EAEnD,EAAW,EAAM,KAAK,SAAW,EAAM,KAAK,WAAa,CAAC,EAAM,KAAK,QAErE,GAAA,EAAA,EAAA,YAAA,KAAqC,EAAa,GAAQ,CAAC,CAAI,EAAG,CAAC,CAAC,EAEpE,GAAA,EAAA,EAAA,YAAA,EACH,CAAE,OAAQ,CAAE,YAAc,CACrB,GACJ,EAAa,GAAS,IAAI,CAC5B,EACA,CAAC,EAAc,CAAY,CAC7B,EAEA,OACE,EAAA,EAAA,KAAA,CAACC,EAAAA,WAAD,CAAY,UAAU,wBAAtB,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,MAAD,CAAO,eAAc,EAAuB,uBAA5C,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,aAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,WAAD,CAAY,QAAS,WAArB,CACG,EACA,IAAW,EAAA,EAAA,IAAA,CAACC,EAAAA,aAAD,CAAuB,SAAU,CAAA,CACnC,KACZ,EAAA,EAAA,IAAA,CAACC,EAAAA,iBAAD,CAAA,SAAmB,CAA8B,CAAA,CACrC,CAAA,CAAA,GACd,EAAA,EAAA,KAAA,CAACC,EAAAA,iBAAD,CAAA,SAAA,EACE,EAAA,EAAA,IAAA,CAACC,EAAAA,MAAD,CACM,KACE,OACN,KAAM,EAAY,OAAS,WACd,cACb,MAAO,EAAM,OAAS,GACtB,eAAc,EACd,aAAa,eACb,OAAQ,EACE,UACX,CAAA,GAED,EAAA,EAAA,IAAA,CAAC,SAAD,CACE,UAAU,kOACV,KAAK,SACL,QAAS,EACT,aAAY,EAAY,cAAgB,gBACxC,eAAc,EACd,gBAAe,WAEd,GAAY,EAAA,EAAA,IAAA,CAACC,EAAAA,WAAD,CAAY,KAAM,GAAI,cAAY,MAAQ,CAAA,GAAI,EAAA,EAAA,IAAA,CAACC,EAAAA,QAAD,CAAS,KAAM,GAAI,cAAY,MAAQ,CAAA,CAC5F,CAAA,GAER,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,sDACZ,GAAoB,EAAM,KAAK,UAAW,EAAA,EAAA,IAAA,CAACC,EAAAA,WAAD,CAAY,OAAQ,EAAM,KAAK,MAAS,CAAA,CAChF,CAAA,GACL,EAAA,EAAA,IAAA,CAACC,EAAAA,UAAD,CAAW,OAAQ,CAAC,CAAC,WAAa,CAAsB,CAAA,CACxC,CAAA,CAAA,CACb,KACP,EAAA,EAAA,IAAA,CAACC,EAAAA,eAAD,CAAiB,CAAA,CACP,GAEhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as e}from"./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=password-field-
|
|
1
|
+
import{G as e}from"./tanstack-form-AGwPfwiM.mjs";import{Input as t}from"./ui/input.mjs";import{Field as n,FieldContent as r,FieldContentMain as i,FieldDescription as a,FieldError as o,FieldGroup as s,FieldLabel as c,FieldNote as l,FieldSeparator as u,FieldTooltip as d}from"./field-V2DoD8qL.mjs";import{EyeIcon as f,EyeOffIcon as p}from"lucide-react";import{useCallback as m,useId as h,useState as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{useStore as y}from"@tanstack/react-form";const b=({label:b,description:x,placeholder:S,orientation:C=`responsive`,tooltip:w,helperText:T,showErrorMessage:E=!0})=>{let D=h(),{form:O,name:k,state:A,handleBlur:j,handleChange:M}=e(),N=y(O.store,({isSubmitting:e})=>e),[P,F]=g(!1),I=A.meta.isDirty&&A.meta.isTouched&&!A.meta.isValid,L=m(()=>F(e=>!e),[]),R=m(({target:{value:e}})=>{N||M(e||null)},[N,M]);return v(s,{className:`gap-y-4 px-4`,children:[v(n,{"data-invalid":I,orientation:C,children:[v(r,{children:[v(c,{htmlFor:D,children:[b,w&&_(d,{tooltip:w})]}),_(a,{children:x})]}),v(i,{children:[_(t,{id:D,name:k,type:P?`text`:`password`,placeholder:S,value:A.value??``,"aria-invalid":I,autoComplete:`new-password`,onBlur:j,onChange:R}),_(`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:L,"aria-label":P?`Ẩn mật khẩu`:`Hiện mật khẩu`,"aria-pressed":P,"aria-controls":D,children:_(P?p:f,{size:16,"aria-hidden":`true`})}),_(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:E&&A.meta.isDirty&&_(o,{errors:A.meta.errors})}),_(l,{isShow:!!T,children:T})]})]}),_(u,{})]})};export{b as PasswordField};
|
|
2
|
+
//# sourceMappingURL=password-field-pqUgUcgf.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-field-
|
|
1
|
+
{"version":3,"file":"password-field-pqUgUcgf.mjs","names":[],"sources":["../packages/components/features/tanstack-form/components/fields/password-field.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useId, useState } from 'react';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react';\n\nimport { Input } from '@/components/ui/input';\n\nimport { useTanStackFieldContext } from '../form-context';\nimport {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n FieldTooltip,\n} from '../ui/field';\n\nimport type { PasswordFieldProps as Props } from '../../types';\n\n/**\n * A TanStack Form-connected password input field with a show/hide toggle button\n * and inline validation error display.\n *\n * @example\n * import { PasswordField } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <form.Field name=\"password\">\n * {() => (\n * <PasswordField\n * label=\"Password\"\n * placeholder=\"Enter your password\"\n * helperText=\"Must be at least 8 characters\"\n * />\n * )}\n * </form.Field>\n */\nexport const PasswordField: React.FC<Props> = ({\n label,\n description,\n placeholder,\n orientation = 'responsive',\n tooltip,\n helperText,\n showErrorMessage = true,\n}) => {\n const id = useId();\n const { form, name, state, handleBlur, handleChange } = useTanStackFieldContext<string | null>();\n\n const isSubmitting = useStore(form.store, ({ isSubmitting }) => isSubmitting);\n\n const [isVisible, setIsVisible] = useState<boolean>(false);\n\n const _invalid = state.meta.isDirty && state.meta.isTouched && !state.meta.isValid;\n\n const toggleVisibility = useCallback(() => setIsVisible(prev => !prev), []);\n\n const onChange = useCallback<React.ChangeEventHandler<HTMLInputElement>>(\n ({ target: { value } }) => {\n if (isSubmitting) return;\n handleChange(value || null);\n },\n [isSubmitting, handleChange]\n );\n\n return (\n <FieldGroup className=\"gap-y-4 px-4\">\n <Field data-invalid={_invalid} orientation={orientation}>\n <FieldContent>\n <FieldLabel htmlFor={id}>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n </FieldContent>\n <FieldContentMain>\n <Input\n id={id}\n name={name}\n type={isVisible ? 'text' : 'password'}\n placeholder={placeholder}\n value={state.value ?? ''}\n aria-invalid={_invalid}\n autoComplete=\"new-password\"\n onBlur={handleBlur}\n onChange={onChange}\n />\n\n <button\n 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\"\n type=\"button\"\n onClick={toggleVisibility}\n aria-label={isVisible ? 'Ẩn mật khẩu' : 'Hiện mật khẩu'}\n aria-pressed={isVisible}\n aria-controls={id}\n >\n {isVisible ? <EyeOffIcon size={16} aria-hidden=\"true\" /> : <EyeIcon size={16} aria-hidden=\"true\" />}\n </button>\n\n <div className=\"mt-1 flex w-full items-start justify-start\">\n {showErrorMessage && state.meta.isDirty && <FieldError errors={state.meta.errors} />}\n </div>\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n};\n"],"mappings":"8fA2CA,MAAa,GAAkC,CAC7C,QACA,cACA,cACA,cAAc,aACd,UACA,aACA,mBAAmB,MACf,CACJ,IAAM,EAAK,EAAM,EACX,CAAE,OAAM,OAAM,QAAO,aAAY,gBAAiB,EAAuC,EAEzF,EAAe,EAAS,EAAK,OAAQ,CAAE,kBAAmB,CAAY,EAEtE,CAAC,EAAW,GAAgB,EAAkB,EAAK,EAEnD,EAAW,EAAM,KAAK,SAAW,EAAM,KAAK,WAAa,CAAC,EAAM,KAAK,QAErE,EAAmB,MAAkB,EAAa,GAAQ,CAAC,CAAI,EAAG,CAAC,CAAC,EAEpE,EAAW,GACd,CAAE,OAAQ,CAAE,YAAc,CACrB,GACJ,EAAa,GAAS,IAAI,CAC5B,EACA,CAAC,EAAc,CAAY,CAC7B,EAEA,OACE,EAAC,EAAD,CAAY,UAAU,wBAAtB,CACE,EAAC,EAAD,CAAO,eAAc,EAAuB,uBAA5C,CACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAY,QAAS,WAArB,CACG,EACA,GAAW,EAAC,EAAD,CAAuB,SAAU,CAAA,CACnC,IACZ,EAAC,EAAD,CAAA,SAAmB,CAA8B,CAAA,CACrC,CAAA,CAAA,EACd,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CACM,KACE,OACN,KAAM,EAAY,OAAS,WACd,cACb,MAAO,EAAM,OAAS,GACtB,eAAc,EACd,aAAa,eACb,OAAQ,EACE,UACX,CAAA,EAED,EAAC,SAAD,CACE,UAAU,kOACV,KAAK,SACL,QAAS,EACT,aAAY,EAAY,cAAgB,gBACxC,eAAc,EACd,gBAAe,WAEF,EAAZ,EAAa,EAA8C,EAA/C,CAAY,KAAM,GAAI,cAAY,MAAQ,CAA2C,CAC5F,CAAA,EAER,EAAC,MAAD,CAAK,UAAU,sDACZ,GAAoB,EAAM,KAAK,SAAW,EAAC,EAAD,CAAY,OAAQ,EAAM,KAAK,MAAS,CAAA,CAChF,CAAA,EACL,EAAC,EAAD,CAAW,OAAQ,CAAC,CAAC,WAAa,CAAsB,CAAA,CACxC,CAAA,CAAA,CACb,IACP,EAAC,EAAD,CAAiB,CAAA,CACP,GAEhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./close-DYJZ8fkh.mjs";import{K as t}from"./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=popover-form-
|
|
1
|
+
import{t as e}from"./close-DYJZ8fkh.mjs";import{K as t}from"./tanstack-form-AGwPfwiM.mjs";import{n,t as r}from"./submit-button-CGBaPzE9.mjs";import{cn as i}from"@customafk/react-toolkit/utils";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{Dialog as s}from"radix-ui";const c=({title:c,open:l,contentClassName:u,onOpenChange:d,children:f})=>{let p=t();return a(s.Root,{"data-slot":`dialog`,open:l,onOpenChange:d,children:o(s.Portal,{"data-slot":`dialog-portal`,children:[a(s.Overlay,{"data-slot":`dialog-overlay`,className:i(`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`)}),a(s.Content,{"data-slot":`dialog-content`,className:i(`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:o(`section`,{className:`relative flex size-full flex-col`,children:[a(`header`,{className:`flex h-14 shrink-0 items-center border-b border-border px-5`,children:a(`h2`,{className:`font-semibold text-base tracking-tight text-text-positive`,children:c})}),a(`div`,{className:i(`flex flex-1 flex-col overflow-y-auto py-4`,u),children:f}),o(`div`,{className:`flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3`,children:[a(p.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:t})=>a(r,{isSubmitting:e,disabled:t,className:`w-full`,onClick:()=>p.handleSubmit()})}),a(p.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>a(n,{disabled:e,className:`w-full`,onClick:()=>{p.reset(),d?.(!1)}})})]}),a(s.Close,{asChild:!0,children:a(e,{className:`absolute top-2.5 right-3`})})]})})]})})};export{c as TanStackPopoverForm};
|
|
2
|
+
//# sourceMappingURL=popover-form-BmOqFjQM.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-form-
|
|
1
|
+
{"version":3,"file":"popover-form-BmOqFjQM.mjs","names":["DialogPrimitive"],"sources":["../packages/components/features/tanstack-form/components/forms/popover-form.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { CloseButton } from '@/components/ui/buttons/close';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { useTanStackFormContext } from '../form-context';\nimport { CancelButton } from '../ui/cancel-button';\nimport { SubmitButton } from '../ui/submit-button';\n\n/**\n * Renders a slide-in side-panel dialog that wraps a TanStack form with built-in submit and cancel actions.\n *\n * @example\n * import { TanStackPopoverForm } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <TanStackPopoverForm\n * title=\"Edit Profile\"\n * open={isOpen}\n * onOpenChange={setIsOpen}\n * >\n * <EmailField />\n * </TanStackPopoverForm>\n */\nexport const TanStackPopoverForm: React.FC<\n React.PropsWithChildren<{\n /** Heading text displayed in the panel header. */\n title: string;\n /** Controlled open state of the popover dialog. */\n open?: boolean;\n /** Additional CSS class names applied to the scrollable content area. */\n contentClassName?: string;\n /** Callback fired when the open state changes. */\n onOpenChange?: (open: boolean) => void;\n }>\n> = ({ title, open, contentClassName, onOpenChange, children }) => {\n const form = useTanStackFormContext();\n\n return (\n <DialogPrimitive.Root data-slot=\"dialog\" open={open} onOpenChange={onOpenChange}>\n <DialogPrimitive.Portal data-slot=\"dialog-portal\">\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-40 bg-black/40 backdrop-blur-sm',\n 'data-[state=open]:animate-in data-[state=open]:fade-in',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out'\n )}\n />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n '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',\n 'duration-300',\n 'data-[state=open]:animate-in data-[state=open]:slide-in-from-right data-[state=open]:fade-in',\n 'data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=closed]:fade-out'\n )}\n >\n <section className=\"relative flex size-full flex-col\">\n <header className=\"flex h-14 shrink-0 items-center border-b border-border px-5\">\n <h2 className=\"font-semibold text-base tracking-tight text-text-positive\">{title}</h2>\n </header>\n\n <div className={cn('flex flex-1 flex-col overflow-y-auto py-4', contentClassName)}>{children}</div>\n\n <div className=\"flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3\">\n <form.Subscribe\n selector={state => ({\n isSubmitting: state.isSubmitting,\n disabled: state.isPristine || !state.isValid || state.isValidating || state.isSubmitting || !state.canSubmit,\n })}\n children={({ isSubmitting, disabled }) => (\n <SubmitButton isSubmitting={isSubmitting} disabled={disabled} className=\"w-full\" onClick={() => form.handleSubmit()} />\n )}\n />\n <form.Subscribe\n selector={state => ({ disabled: state.isPristine || state.isSubmitting })}\n children={({ disabled }) => (\n <CancelButton\n disabled={disabled}\n className=\"w-full\"\n onClick={() => {\n form.reset();\n onOpenChange?.(false);\n }}\n />\n )}\n />\n </div>\n\n <DialogPrimitive.Close asChild>\n <CloseButton className=\"absolute top-2.5 right-3\" />\n </DialogPrimitive.Close>\n </section>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n};\n"],"mappings":"qRAyBA,MAAa,GAWR,CAAE,QAAO,OAAM,mBAAkB,eAAc,cAAe,CACjE,IAAM,EAAO,EAAuB,EAEpC,OACE,EAACA,EAAgB,KAAjB,CAAsB,YAAU,SAAe,OAAoB,wBACjE,EAACA,EAAgB,OAAjB,CAAwB,YAAU,yBAAlC,CACE,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,UAAW,EACT,kDACA,yDACA,8DACF,CACD,CAAA,EACD,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,UAAW,EACT,yHACA,eACA,+FACA,qGACF,WAEA,EAAC,UAAD,CAAS,UAAU,4CAAnB,CACE,EAAC,SAAD,CAAQ,UAAU,uEAChB,EAAC,KAAD,CAAI,UAAU,qEAA6D,CAAU,CAAA,CAC/E,CAAA,EAER,EAAC,MAAD,CAAK,UAAW,EAAG,4CAA6C,CAAgB,EAAI,UAAc,CAAA,EAElG,EAAC,MAAD,CAAK,UAAU,yEAAf,CACE,EAAC,EAAK,UAAN,CACE,SAAU,IAAU,CAClB,aAAc,EAAM,aACpB,SAAU,EAAM,YAAc,CAAC,EAAM,SAAW,EAAM,cAAgB,EAAM,cAAgB,CAAC,EAAM,SACrG,GACA,UAAW,CAAE,eAAc,cACzB,EAAC,EAAD,CAA4B,eAAwB,WAAU,UAAU,SAAS,YAAe,EAAK,aAAa,CAAI,CAAA,CAEzH,CAAA,EACD,EAAC,EAAK,UAAN,CACE,SAAU,IAAU,CAAE,SAAU,EAAM,YAAc,EAAM,YAAa,GACvE,UAAW,CAAE,cACX,EAAC,EAAD,CACY,WACV,UAAU,SACV,YAAe,CACb,EAAK,MAAM,EACX,IAAe,EAAK,CACtB,CACD,CAAA,CAEJ,CAAA,CACE,IAEL,EAACA,EAAgB,MAAjB,CAAuB,QAAA,YACrB,EAAC,EAAD,CAAa,UAAU,0BAA4B,CAAA,CAC9B,CAAA,CAChB,GACc,CAAA,CACH,GACJ,CAAA,CAE1B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./close-BYHgEZvZ.cjs"),t=require("./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=popover-form-
|
|
1
|
+
const e=require("./close-BYHgEZvZ.cjs"),t=require("./tanstack-form-Bae0TOEr.cjs"),n=require("./submit-button-CvINfld5.cjs");let r=require("@customafk/react-toolkit/utils"),i=require("react/jsx-runtime"),a=require("radix-ui");const o=({title:o,open:s,contentClassName:c,onOpenChange:l,children:u})=>{let d=t.K();return(0,i.jsx)(a.Dialog.Root,{"data-slot":`dialog`,open:s,onOpenChange:l,children:(0,i.jsxs)(a.Dialog.Portal,{"data-slot":`dialog-portal`,children:[(0,i.jsx)(a.Dialog.Overlay,{"data-slot":`dialog-overlay`,className:(0,r.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,i.jsx)(a.Dialog.Content,{"data-slot":`dialog-content`,className:(0,r.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,i.jsxs)(`section`,{className:`relative flex size-full flex-col`,children:[(0,i.jsx)(`header`,{className:`flex h-14 shrink-0 items-center border-b border-border px-5`,children:(0,i.jsx)(`h2`,{className:`font-semibold text-base tracking-tight text-text-positive`,children:o})}),(0,i.jsx)(`div`,{className:(0,r.cn)(`flex flex-1 flex-col overflow-y-auto py-4`,c),children:u}),(0,i.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3`,children:[(0,i.jsx)(d.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:t})=>(0,i.jsx)(n.t,{isSubmitting:e,disabled:t,className:`w-full`,onClick:()=>d.handleSubmit()})}),(0,i.jsx)(d.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>(0,i.jsx)(n.n,{disabled:e,className:`w-full`,onClick:()=>{d.reset(),l?.(!1)}})})]}),(0,i.jsx)(a.Dialog.Close,{asChild:!0,children:(0,i.jsx)(e.t,{className:`absolute top-2.5 right-3`})})]})})]})})};exports.TanStackPopoverForm=o;
|
|
2
|
+
//# sourceMappingURL=popover-form-CLr6xIl5.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-form-
|
|
1
|
+
{"version":3,"file":"popover-form-CLr6xIl5.cjs","names":["useTanStackFormContext","DialogPrimitive","SubmitButton","CancelButton","CloseButton"],"sources":["../packages/components/features/tanstack-form/components/forms/popover-form.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { CloseButton } from '@/components/ui/buttons/close';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { useTanStackFormContext } from '../form-context';\nimport { CancelButton } from '../ui/cancel-button';\nimport { SubmitButton } from '../ui/submit-button';\n\n/**\n * Renders a slide-in side-panel dialog that wraps a TanStack form with built-in submit and cancel actions.\n *\n * @example\n * import { TanStackPopoverForm } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <TanStackPopoverForm\n * title=\"Edit Profile\"\n * open={isOpen}\n * onOpenChange={setIsOpen}\n * >\n * <EmailField />\n * </TanStackPopoverForm>\n */\nexport const TanStackPopoverForm: React.FC<\n React.PropsWithChildren<{\n /** Heading text displayed in the panel header. */\n title: string;\n /** Controlled open state of the popover dialog. */\n open?: boolean;\n /** Additional CSS class names applied to the scrollable content area. */\n contentClassName?: string;\n /** Callback fired when the open state changes. */\n onOpenChange?: (open: boolean) => void;\n }>\n> = ({ title, open, contentClassName, onOpenChange, children }) => {\n const form = useTanStackFormContext();\n\n return (\n <DialogPrimitive.Root data-slot=\"dialog\" open={open} onOpenChange={onOpenChange}>\n <DialogPrimitive.Portal data-slot=\"dialog-portal\">\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-40 bg-black/40 backdrop-blur-sm',\n 'data-[state=open]:animate-in data-[state=open]:fade-in',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out'\n )}\n />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n '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',\n 'duration-300',\n 'data-[state=open]:animate-in data-[state=open]:slide-in-from-right data-[state=open]:fade-in',\n 'data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=closed]:fade-out'\n )}\n >\n <section className=\"relative flex size-full flex-col\">\n <header className=\"flex h-14 shrink-0 items-center border-b border-border px-5\">\n <h2 className=\"font-semibold text-base tracking-tight text-text-positive\">{title}</h2>\n </header>\n\n <div className={cn('flex flex-1 flex-col overflow-y-auto py-4', contentClassName)}>{children}</div>\n\n <div className=\"flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3\">\n <form.Subscribe\n selector={state => ({\n isSubmitting: state.isSubmitting,\n disabled: state.isPristine || !state.isValid || state.isValidating || state.isSubmitting || !state.canSubmit,\n })}\n children={({ isSubmitting, disabled }) => (\n <SubmitButton isSubmitting={isSubmitting} disabled={disabled} className=\"w-full\" onClick={() => form.handleSubmit()} />\n )}\n />\n <form.Subscribe\n selector={state => ({ disabled: state.isPristine || state.isSubmitting })}\n children={({ disabled }) => (\n <CancelButton\n disabled={disabled}\n className=\"w-full\"\n onClick={() => {\n form.reset();\n onOpenChange?.(false);\n }}\n />\n )}\n />\n </div>\n\n <DialogPrimitive.Close asChild>\n <CloseButton className=\"absolute top-2.5 right-3\" />\n </DialogPrimitive.Close>\n </section>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n};\n"],"mappings":"iOAyBA,MAAa,GAWR,CAAE,QAAO,OAAM,mBAAkB,eAAc,cAAe,CACjE,IAAM,EAAOA,EAAAA,EAAuB,EAEpC,OACE,EAAA,EAAA,IAAA,CAACC,EAAAA,OAAgB,KAAjB,CAAsB,YAAU,SAAe,OAAoB,yBACjE,EAAA,EAAA,KAAA,CAACA,EAAAA,OAAgB,OAAjB,CAAwB,YAAU,yBAAlC,EACE,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,QAAjB,CACE,YAAU,iBACV,WAAA,EAAA,EAAA,GAAA,CACE,kDACA,yDACA,8DACF,CACD,CAAA,GACD,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,QAAjB,CACE,YAAU,iBACV,WAAA,EAAA,EAAA,GAAA,CACE,yHACA,eACA,+FACA,qGACF,YAEA,EAAA,EAAA,KAAA,CAAC,UAAD,CAAS,UAAU,4CAAnB,EACE,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,UAAU,wEAChB,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,qEAA6D,CAAU,CAAA,CAC/E,CAAA,GAER,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,WAAA,EAAA,EAAA,GAAA,CAAc,4CAA6C,CAAgB,EAAI,UAAc,CAAA,GAElG,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,yEAAf,EACE,EAAA,EAAA,IAAA,CAAC,EAAK,UAAN,CACE,SAAU,IAAU,CAClB,aAAc,EAAM,aACpB,SAAU,EAAM,YAAc,CAAC,EAAM,SAAW,EAAM,cAAgB,EAAM,cAAgB,CAAC,EAAM,SACrG,GACA,UAAW,CAAE,eAAc,eACzB,EAAA,EAAA,IAAA,CAACC,EAAAA,EAAD,CAA4B,eAAwB,WAAU,UAAU,SAAS,YAAe,EAAK,aAAa,CAAI,CAAA,CAEzH,CAAA,GACD,EAAA,EAAA,IAAA,CAAC,EAAK,UAAN,CACE,SAAU,IAAU,CAAE,SAAU,EAAM,YAAc,EAAM,YAAa,GACvE,UAAW,CAAE,eACX,EAAA,EAAA,IAAA,CAACC,EAAAA,EAAD,CACY,WACV,UAAU,SACV,YAAe,CACb,EAAK,MAAM,EACX,IAAe,EAAK,CACtB,CACD,CAAA,CAEJ,CAAA,CACE,KAEL,EAAA,EAAA,IAAA,CAACF,EAAAA,OAAgB,MAAjB,CAAuB,QAAA,aACrB,EAAA,EAAA,IAAA,CAACG,EAAAA,EAAD,CAAa,UAAU,0BAA4B,CAAA,CAC9B,CAAA,CAChB,GACc,CAAA,CACH,GACJ,CAAA,CAE1B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=radio-group-field-
|
|
1
|
+
const e=require("./tanstack-form-Bae0TOEr.cjs"),t=require("./ui/radio-group.cjs"),n=require("./field-BSLi-P0Q.cjs");let r=require("@customafk/react-toolkit/utils"),i=require("react/jsx-runtime"),a=require("@tanstack/react-form");const o=({label:o,description:s,orientation:c,options:l,tooltip:u,helperText:d})=>{let f=e.G(),p=(0,a.useStore)(f.form.store,({isSubmitting:e})=>e);return(0,i.jsxs)(n.FieldGroup,{className:`px-4`,children:[(0,i.jsxs)(n.Field,{orientation:c,className:`flex-col gap-2`,children:[(0,i.jsxs)(n.FieldContent,{children:[(0,i.jsxs)(n.FieldLabel,{children:[o,u&&(0,i.jsx)(n.FieldTooltip,{tooltip:u})]}),(0,i.jsx)(n.FieldDescription,{children:s}),(0,i.jsx)(n.FieldNote,{isShow:!!d,children:d})]}),(0,i.jsx)(n.FieldContentMain,{children:(0,i.jsx)(t.RadioGroup,{value:f.state.value??``,className:`w-full`,onValueChange:f.handleChange,children:l.map(e=>(0,i.jsx)(n.FieldLabel,{className:(0,r.cn)(`h-fit`,f.state.value===e.value&&`border-primary-weak! bg-primary-bg-subtle`,p&&`pointer-events-none bg-muted-muted opacity-60`,f.state.value===e.value&&p&&`border-border-strong!`),children:(0,i.jsxs)(n.Field,{orientation:`horizontal`,className:`items-start gap-3 rounded p-2!`,children:[(0,i.jsx)(t.RadioGroupItem,{value:e.value,className:`mt-0.5 shrink-0`}),(0,i.jsxs)(n.FieldContent,{className:`gap-0.5!`,children:[(0,i.jsx)(n.FieldTitle,{children:e.label}),(0,i.jsx)(n.FieldDescription,{className:`text-xs`,children:e.description})]})]})},e.value))})})]}),(0,i.jsx)(n.FieldSeparator,{})]})};exports.RadioGroupField=o;
|
|
2
|
+
//# sourceMappingURL=radio-group-field-Bm2nkk1W.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group-field-
|
|
1
|
+
{"version":3,"file":"radio-group-field-Bm2nkk1W.cjs","names":["useTanStackFieldContext","FieldGroup","Field","FieldContent","FieldLabel","FieldTooltip","FieldDescription","FieldNote","FieldContentMain","RadioGroup","RadioGroupItem","FieldTitle","FieldSeparator"],"sources":["../packages/components/features/tanstack-form/components/fields/radio-group-field.tsx"],"sourcesContent":["'use client';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { useTanStackFieldContext } from '../form-context';\nimport {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n FieldTitle,\n FieldTooltip,\n} from '../ui/field';\nimport { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';\n\nimport type { RadioGroupFieldProps as Props } from '../../types';\n\nexport const RadioGroupField: React.FC<Props> = ({ label, description, orientation, options, tooltip, helperText }) => {\n const field = useTanStackFieldContext<string | null>();\n const isSubmitting = useStore(field.form.store, ({ isSubmitting }) => isSubmitting);\n\n return (\n <FieldGroup className=\"px-4\">\n <Field orientation={orientation} className=\"flex-col gap-2\">\n <FieldContent>\n <FieldLabel>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContent>\n\n <FieldContentMain>\n <RadioGroup value={field.state.value ?? ''} className=\"w-full\" onValueChange={field.handleChange}>\n {options.map(option => (\n <FieldLabel\n key={option.value}\n className={cn(\n 'h-fit',\n field.state.value === option.value && 'border-primary-weak! bg-primary-bg-subtle',\n isSubmitting && 'pointer-events-none bg-muted-muted opacity-60',\n field.state.value === option.value && isSubmitting && 'border-border-strong!'\n )}\n >\n <Field orientation=\"horizontal\" className=\"items-start gap-3 rounded p-2!\">\n <RadioGroupItem value={option.value} className=\"mt-0.5 shrink-0\" />\n <FieldContent className=\"gap-0.5!\">\n <FieldTitle>{option.label}</FieldTitle>\n <FieldDescription className=\"text-xs\">{option.description}</FieldDescription>\n </FieldContent>\n </Field>\n </FieldLabel>\n ))}\n </RadioGroup>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n};\n"],"mappings":"qOAuBA,MAAa,GAAoC,CAAE,QAAO,cAAa,cAAa,UAAS,UAAS,gBAAiB,CACrH,IAAM,EAAQA,EAAAA,EAAuC,EAC/C,GAAA,EAAA,EAAA,SAAA,CAAwB,EAAM,KAAK,OAAQ,CAAE,kBAAmB,CAAY,EAElF,OACE,EAAA,EAAA,KAAA,CAACC,EAAAA,WAAD,CAAY,UAAU,gBAAtB,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,MAAD,CAAoB,cAAa,UAAU,0BAA3C,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,aAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,WAAD,CAAA,SAAA,CACG,EACA,IAAW,EAAA,EAAA,IAAA,CAACC,EAAAA,aAAD,CAAuB,SAAU,CAAA,CACnC,CAAA,CAAA,GACZ,EAAA,EAAA,IAAA,CAACC,EAAAA,iBAAD,CAAA,SAAmB,CAA8B,CAAA,GACjD,EAAA,EAAA,IAAA,CAACC,EAAAA,UAAD,CAAW,OAAQ,CAAC,CAAC,WAAa,CAAsB,CAAA,CAC5C,CAAA,CAAA,GAEd,EAAA,EAAA,IAAA,CAACC,EAAAA,iBAAD,CAAA,UACE,EAAA,EAAA,IAAA,CAACC,EAAAA,WAAD,CAAY,MAAO,EAAM,MAAM,OAAS,GAAI,UAAU,SAAS,cAAe,EAAM,sBACjF,EAAQ,IAAI,IACX,EAAA,EAAA,IAAA,CAACL,EAAAA,WAAD,CAEE,WAAA,EAAA,EAAA,GAAA,CACE,QACA,EAAM,MAAM,QAAU,EAAO,OAAS,4CACtC,GAAgB,gDAChB,EAAM,MAAM,QAAU,EAAO,OAAS,GAAgB,uBACxD,YAEA,EAAA,EAAA,KAAA,CAACF,EAAAA,MAAD,CAAO,YAAY,aAAa,UAAU,0CAA1C,EACE,EAAA,EAAA,IAAA,CAACQ,EAAAA,eAAD,CAAgB,MAAO,EAAO,MAAO,UAAU,iBAAmB,CAAA,GAClE,EAAA,EAAA,KAAA,CAACP,EAAAA,aAAD,CAAc,UAAU,oBAAxB,EACE,EAAA,EAAA,IAAA,CAACQ,EAAAA,WAAD,CAAA,SAAa,EAAO,KAAkB,CAAA,GACtC,EAAA,EAAA,IAAA,CAACL,EAAAA,iBAAD,CAAkB,UAAU,mBAAW,EAAO,WAA8B,CAAA,CAChE,GACT,GACG,EAfL,EAAO,KAeF,CACb,CACS,CAAA,CACI,CAAA,CACb,KACP,EAAA,EAAA,IAAA,CAACM,EAAAA,eAAD,CAAiB,CAAA,CACP,GAEhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as e}from"./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=radio-group-field-
|
|
1
|
+
import{G as e}from"./tanstack-form-AGwPfwiM.mjs";import{RadioGroup as t,RadioGroupItem as n}from"./ui/radio-group.mjs";import{Field as r,FieldContent as i,FieldContentMain as a,FieldDescription as o,FieldGroup as s,FieldLabel as c,FieldNote as l,FieldSeparator as u,FieldTitle as d,FieldTooltip as f}from"./field-V2DoD8qL.mjs";import{cn as p}from"@customafk/react-toolkit/utils";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{useStore as g}from"@tanstack/react-form";const _=({label:_,description:v,orientation:y,options:b,tooltip:x,helperText:S})=>{let C=e(),w=g(C.form.store,({isSubmitting:e})=>e);return h(s,{className:`px-4`,children:[h(r,{orientation:y,className:`flex-col gap-2`,children:[h(i,{children:[h(c,{children:[_,x&&m(f,{tooltip:x})]}),m(o,{children:v}),m(l,{isShow:!!S,children:S})]}),m(a,{children:m(t,{value:C.state.value??``,className:`w-full`,onValueChange:C.handleChange,children:b.map(e=>m(c,{className:p(`h-fit`,C.state.value===e.value&&`border-primary-weak! bg-primary-bg-subtle`,w&&`pointer-events-none bg-muted-muted opacity-60`,C.state.value===e.value&&w&&`border-border-strong!`),children:h(r,{orientation:`horizontal`,className:`items-start gap-3 rounded p-2!`,children:[m(n,{value:e.value,className:`mt-0.5 shrink-0`}),h(i,{className:`gap-0.5!`,children:[m(d,{children:e.label}),m(o,{className:`text-xs`,children:e.description})]})]})},e.value))})})]}),m(u,{})]})};export{_ as RadioGroupField};
|
|
2
|
+
//# sourceMappingURL=radio-group-field-DsUi8uCy.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group-field-
|
|
1
|
+
{"version":3,"file":"radio-group-field-DsUi8uCy.mjs","names":[],"sources":["../packages/components/features/tanstack-form/components/fields/radio-group-field.tsx"],"sourcesContent":["'use client';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { useTanStackFieldContext } from '../form-context';\nimport {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n FieldTitle,\n FieldTooltip,\n} from '../ui/field';\nimport { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';\n\nimport type { RadioGroupFieldProps as Props } from '../../types';\n\nexport const RadioGroupField: React.FC<Props> = ({ label, description, orientation, options, tooltip, helperText }) => {\n const field = useTanStackFieldContext<string | null>();\n const isSubmitting = useStore(field.form.store, ({ isSubmitting }) => isSubmitting);\n\n return (\n <FieldGroup className=\"px-4\">\n <Field orientation={orientation} className=\"flex-col gap-2\">\n <FieldContent>\n <FieldLabel>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContent>\n\n <FieldContentMain>\n <RadioGroup value={field.state.value ?? ''} className=\"w-full\" onValueChange={field.handleChange}>\n {options.map(option => (\n <FieldLabel\n key={option.value}\n className={cn(\n 'h-fit',\n field.state.value === option.value && 'border-primary-weak! bg-primary-bg-subtle',\n isSubmitting && 'pointer-events-none bg-muted-muted opacity-60',\n field.state.value === option.value && isSubmitting && 'border-border-strong!'\n )}\n >\n <Field orientation=\"horizontal\" className=\"items-start gap-3 rounded p-2!\">\n <RadioGroupItem value={option.value} className=\"mt-0.5 shrink-0\" />\n <FieldContent className=\"gap-0.5!\">\n <FieldTitle>{option.label}</FieldTitle>\n <FieldDescription className=\"text-xs\">{option.description}</FieldDescription>\n </FieldContent>\n </Field>\n </FieldLabel>\n ))}\n </RadioGroup>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n};\n"],"mappings":"6dAuBA,MAAa,GAAoC,CAAE,QAAO,cAAa,cAAa,UAAS,UAAS,gBAAiB,CACrH,IAAM,EAAQ,EAAuC,EAC/C,EAAe,EAAS,EAAM,KAAK,OAAQ,CAAE,kBAAmB,CAAY,EAElF,OACE,EAAC,EAAD,CAAY,UAAU,gBAAtB,CACE,EAAC,EAAD,CAAoB,cAAa,UAAU,0BAA3C,CACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAA,SAAA,CACG,EACA,GAAW,EAAC,EAAD,CAAuB,SAAU,CAAA,CACnC,CAAA,CAAA,EACZ,EAAC,EAAD,CAAA,SAAmB,CAA8B,CAAA,EACjD,EAAC,EAAD,CAAW,OAAQ,CAAC,CAAC,WAAa,CAAsB,CAAA,CAC5C,CAAA,CAAA,EAEd,EAAC,EAAD,CAAA,SACE,EAAC,EAAD,CAAY,MAAO,EAAM,MAAM,OAAS,GAAI,UAAU,SAAS,cAAe,EAAM,sBACjF,EAAQ,IAAI,GACX,EAAC,EAAD,CAEE,UAAW,EACT,QACA,EAAM,MAAM,QAAU,EAAO,OAAS,4CACtC,GAAgB,gDAChB,EAAM,MAAM,QAAU,EAAO,OAAS,GAAgB,uBACxD,WAEA,EAAC,EAAD,CAAO,YAAY,aAAa,UAAU,0CAA1C,CACE,EAAC,EAAD,CAAgB,MAAO,EAAO,MAAO,UAAU,iBAAmB,CAAA,EAClE,EAAC,EAAD,CAAc,UAAU,oBAAxB,CACE,EAAC,EAAD,CAAA,SAAa,EAAO,KAAkB,CAAA,EACtC,EAAC,EAAD,CAAkB,UAAU,mBAAW,EAAO,WAA8B,CAAA,CAChE,GACT,GACG,EAfL,EAAO,KAeF,CACb,CACS,CAAA,CACI,CAAA,CACb,IACP,EAAC,EAAD,CAAiB,CAAA,CACP,GAEhB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Input } from "./input-
|
|
1
|
+
import { t as Input } from "./input-BieGEIDf.cjs";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/ui/inputs/search-input.d.ts
|
|
4
4
|
/**
|
|
@@ -24,4 +24,4 @@ declare const SearchInput: ({
|
|
|
24
24
|
}: Props) => import("react").JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { SearchInput as t };
|
|
27
|
-
//# sourceMappingURL=search-input-
|
|
27
|
+
//# sourceMappingURL=search-input-Bq4enQzR.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Input } from "./input-
|
|
1
|
+
import { t as Input } from "./input-BieGEIDf.mjs";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/ui/inputs/search-input.d.ts
|
|
4
4
|
/**
|
|
@@ -24,4 +24,4 @@ declare const SearchInput: ({
|
|
|
24
24
|
}: Props) => import("react").JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { SearchInput as t };
|
|
27
|
-
//# sourceMappingURL=search-input-
|
|
27
|
+
//# sourceMappingURL=search-input-D51_mAY-.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./ui/dialog.cjs"),t=require("./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=select-field-
|
|
1
|
+
const e=require("./ui/dialog.cjs"),t=require("./tanstack-form-Bae0TOEr.cjs"),n=require("./ui/select.cjs"),r=require("./field-BSLi-P0Q.cjs");let i=require("lucide-react"),a=require("react"),o=require("@customafk/react-toolkit/utils"),s=require("react/jsx-runtime"),c=require("radix-ui"),l=require("@customafk/react-toolkit/hooks/useMobile"),u=require("@tanstack/react-form");const d=(0,a.memo)(({label:d,description:f,placeholder:p,orientation:m=`responsive`,tooltip:h,options:g,helperText:_,clearable:v=!1,required:y=!1,disabled:b=!1,showErrorMessage:x=!0})=>{let S=(0,a.useId)(),C=t.G(),w=(0,l.useIsMobile)(),[T,E]=(0,a.useState)(!1),D=(0,u.useStore)(C.form.store,({isSubmitting:e})=>e),O=b||D,k=C.state.meta.isDirty||C.state.meta.isTouched,A=k&&!C.state.meta.isValid,j=y&&C.state.value===null,M=v&&!!C.state.value&&!O,N=g.find(e=>e.value===C.state.value)?.label,P=()=>{C.handleChange(null),C.handleBlur()};return(0,s.jsxs)(r.FieldGroup,{className:`gap-y-4 px-4`,children:[(0,s.jsxs)(r.Field,{orientation:m,"data-invalid":A,children:[(0,s.jsxs)(r.FieldContent,{children:[(0,s.jsxs)(r.FieldLabel,{htmlFor:C.name,"aria-required":j,children:[d,h&&(0,s.jsx)(r.FieldTooltip,{tooltip:h})]}),(0,s.jsx)(r.FieldDescription,{children:f})]}),(0,s.jsxs)(r.FieldContentMain,{className:`flex flex-col`,children:[w?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(`button`,{id:C.name,type:`button`,disabled:O,"aria-invalid":A?`true`:void 0,"aria-describedby":S,onBlur:C.handleBlur,onClick:()=>E(!0),className:(0,o.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`,A&&`outline-danger bg-danger-bg-subtle ring-danger-weak`,!C.state.value&&`text-text-positive-muted`),children:[(0,s.jsx)(`span`,{className:`line-clamp-1`,children:N??p}),(0,s.jsx)(i.ChevronDownIcon,{size:16,className:`shrink-0 opacity-50`})]}),(0,s.jsx)(e.Dialog,{open:T,onOpenChange:e=>{E(e),e||C.handleBlur()},children:(0,s.jsxs)(e.DialogPortal,{children:[(0,s.jsx)(e.DialogOverlay,{}),(0,s.jsxs)(c.Dialog.Content,{onOpenAutoFocus:e=>e.preventDefault(),className:(0,o.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:d??p??`Chọn một tùy chọn`}),(0,s.jsx)(e.DialogClose,{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)(i.XIcon,{size:16})})})]}),(0,s.jsxs)(`div`,{className:`flex flex-col overflow-y-auto`,children:[M&&(0,s.jsx)(e.DialogClose,{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:P,children:[(0,s.jsx)(i.XIcon,{size:14}),`Xóa lựa chọn`]})}),g.length>0?g.map(t=>(0,s.jsx)(e.DialogClose,{asChild:!0,children:(0,s.jsx)(`button`,{type:`button`,className:(0,o.cn)(`flex w-full items-center px-4 py-3 text-left text-sm transition-colors`,`hover:bg-muted-muted active:bg-muted-muted`,C.state.value===t.value&&`bg-primary-bg-subtle font-medium text-primary`),onClick:()=>{C.handleChange(t.value),C.handleBlur()},children:t.label})},t.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)(i.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)(n.Select,{value:C.state.value??``,disabled:O,onValueChange:C.handleChange,children:[(0,s.jsx)(n.SelectTrigger,{"aria-invalid":A?`true`:void 0,"aria-describedby":S,onBlur:C.handleBlur,children:(0,s.jsx)(n.SelectValue,{placeholder:p})}),(0,s.jsx)(n.SelectContent,{children:g.length>0?g.map(e=>(0,s.jsx)(n.SelectItem,{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)(i.PackagePlusIcon,{strokeWidth:1}),`No options available`]})})]}),M&&(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:P,children:(0,s.jsx)(i.XIcon,{"aria-hidden":`true`})})]}),k&&x&&(0,s.jsx)(r.FieldError,{id:S,className:`mt-1`,errors:C.state.meta.errors}),(0,s.jsx)(r.FieldNote,{isShow:!!_,children:_})]})]}),(0,s.jsx)(r.FieldSeparator,{})]})});d.displayName=`SelectField`,exports.SelectField=d;
|
|
2
|
+
//# sourceMappingURL=select-field-F9eikYws.cjs.map
|