@customafk/lunas-ui 0.2.70 → 0.2.72
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-Bzw30CUP.cjs → action-submit-C19tPHgf.cjs} +2 -2
- package/dist/{action-submit-Bzw30CUP.cjs.map → action-submit-C19tPHgf.cjs.map} +1 -1
- package/dist/{action-submit-DLv-V1JQ.mjs → action-submit-cOfq0OSY.mjs} +2 -2
- package/dist/{action-submit-DLv-V1JQ.mjs.map → action-submit-cOfq0OSY.mjs.map} +1 -1
- package/dist/{actions-form-CI1WhB90.cjs → actions-form-3ItwYOFj.cjs} +2 -2
- package/dist/{actions-form-CI1WhB90.cjs.map → actions-form-3ItwYOFj.cjs.map} +1 -1
- package/dist/{actions-form-CEBdF1N7.mjs → actions-form-DxbT1lip.mjs} +2 -2
- package/dist/{actions-form-CEBdF1N7.mjs.map → actions-form-DxbT1lip.mjs.map} +1 -1
- package/dist/{checkbox-field-B7Nh2_rB.mjs → checkbox-field-BAQN-Yno.mjs} +2 -2
- package/dist/{checkbox-field-B7Nh2_rB.mjs.map → checkbox-field-BAQN-Yno.mjs.map} +1 -1
- package/dist/{checkbox-field-CTCgnG0a.cjs → checkbox-field-BRqU_dYY.cjs} +2 -2
- package/dist/{checkbox-field-CTCgnG0a.cjs.map → checkbox-field-BRqU_dYY.cjs.map} +1 -1
- package/dist/combobox-field-DnCpN--a.cjs +2 -0
- package/dist/combobox-field-DnCpN--a.cjs.map +1 -0
- package/dist/combobox-field-yvQPJSFC.mjs +2 -0
- package/dist/combobox-field-yvQPJSFC.mjs.map +1 -0
- package/dist/date-field-DLsJBYw8.cjs +2 -0
- package/dist/date-field-DLsJBYw8.cjs.map +1 -0
- package/dist/date-field-O67C78Kw.mjs +2 -0
- package/dist/date-field-O67C78Kw.mjs.map +1 -0
- package/dist/{dialog-form-C6kJPVNp.mjs → dialog-form-BxlLrEeZ.mjs} +2 -2
- package/dist/{dialog-form-C6kJPVNp.mjs.map → dialog-form-BxlLrEeZ.mjs.map} +1 -1
- package/dist/{dialog-form-DalF7KGG.cjs → dialog-form-ClTCyJDD.cjs} +2 -2
- package/dist/{dialog-form-DalF7KGG.cjs.map → dialog-form-ClTCyJDD.cjs.map} +1 -1
- package/dist/{email-field-DH7kK--D.cjs → email-field-DZzkfVj5.cjs} +2 -2
- package/dist/{email-field-DH7kK--D.cjs.map → email-field-DZzkfVj5.cjs.map} +1 -1
- package/dist/{email-field-CadXKVIu.mjs → email-field-DqEDxkp7.mjs} +2 -2
- package/dist/{email-field-CadXKVIu.mjs.map → email-field-DqEDxkp7.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/{field-BV5twmKA.cjs → field-BSLi-P0Q.cjs} +2 -2
- package/dist/{field-BV5twmKA.cjs.map → field-BSLi-P0Q.cjs.map} +1 -1
- package/dist/{field-BKyUqvzh.mjs → field-V2DoD8qL.mjs} +2 -2
- package/dist/{field-BKyUqvzh.mjs.map → field-V2DoD8qL.mjs.map} +1 -1
- package/dist/{flex-CdJSaEfY.d.cts → flex-DGVZd6c6.d.cts} +4 -4
- package/dist/{flex-CdJSaEfY.d.mts → flex-DGVZd6c6.d.mts} +4 -4
- package/dist/{group-field-bviEXmo4.mjs → group-field-gejvx_Td.mjs} +2 -2
- package/dist/{group-field-bviEXmo4.mjs.map → group-field-gejvx_Td.mjs.map} +1 -1
- package/dist/{group-field-0kStiX8n.cjs → group-field-sVykO2JZ.cjs} +2 -2
- package/dist/{group-field-0kStiX8n.cjs.map → group-field-sVykO2JZ.cjs.map} +1 -1
- package/dist/{index-_GTjwUdG.d.mts → index-5R8gTzkQ.d.mts} +2 -2
- package/dist/{index-FEMPGfwO.d.cts → index-By6nfR2q.d.cts} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +1 -1
- package/dist/{input-BieGEIDf.d.cts → input-BQJV7ryj.d.cts} +2 -2
- package/dist/{input-BieGEIDf.d.mts → input-BQJV7ryj.d.mts} +2 -2
- package/dist/layouts/flex.d.cts +1 -1
- package/dist/layouts/flex.d.mts +1 -1
- package/dist/{number-field-CCzUIF-Q.cjs → number-field-BTLobx1F.cjs} +2 -2
- package/dist/{number-field-CCzUIF-Q.cjs.map → number-field-BTLobx1F.cjs.map} +1 -1
- package/dist/{number-field-BglMIz6D.mjs → number-field-Cx-1U_Np.mjs} +2 -2
- package/dist/{number-field-BglMIz6D.mjs.map → number-field-Cx-1U_Np.mjs.map} +1 -1
- package/dist/{password-field-7VRa9-nn.mjs → password-field-CGPjZ5hZ.mjs} +2 -2
- package/dist/{password-field-7VRa9-nn.mjs.map → password-field-CGPjZ5hZ.mjs.map} +1 -1
- package/dist/{password-field-_AoAB7nM.cjs → password-field-CuBcb4mi.cjs} +2 -2
- package/dist/{password-field-_AoAB7nM.cjs.map → password-field-CuBcb4mi.cjs.map} +1 -1
- package/dist/{popover-form-BLuCGa_z.mjs → popover-form-DVJUQ3_T.mjs} +2 -2
- package/dist/{popover-form-BLuCGa_z.mjs.map → popover-form-DVJUQ3_T.mjs.map} +1 -1
- package/dist/{popover-form-C701gLPP.cjs → popover-form-DzvgWQ2Q.cjs} +2 -2
- package/dist/{popover-form-C701gLPP.cjs.map → popover-form-DzvgWQ2Q.cjs.map} +1 -1
- package/dist/{radio-group-field-D570ZDQ1.mjs → radio-group-field-C45y9BQt.mjs} +2 -2
- package/dist/{radio-group-field-D570ZDQ1.mjs.map → radio-group-field-C45y9BQt.mjs.map} +1 -1
- package/dist/{radio-group-field-D7Q5UZNX.cjs → radio-group-field-GiEbZRkS.cjs} +2 -2
- package/dist/{radio-group-field-D7Q5UZNX.cjs.map → radio-group-field-GiEbZRkS.cjs.map} +1 -1
- package/dist/{resizable-koX293wy.d.cts → resizable-CAyWR1At.d.cts} +2 -2
- package/dist/{resizable-koX293wy.d.mts → resizable-CAyWR1At.d.mts} +2 -2
- package/dist/{search-input-Bq4enQzR.d.cts → search-input-CE9lDDeD.d.cts} +2 -2
- package/dist/{search-input-D51_mAY-.d.mts → search-input-D2rEfTmY.d.mts} +2 -2
- package/dist/{select-field-Dut7YMVy.cjs → select-field-Cd63KvgR.cjs} +2 -2
- package/dist/{select-field-Dut7YMVy.cjs.map → select-field-Cd63KvgR.cjs.map} +1 -1
- package/dist/{select-field-C5MjnCWH.mjs → select-field-y3Zttb4j.mjs} +2 -2
- package/dist/{select-field-C5MjnCWH.mjs.map → select-field-y3Zttb4j.mjs.map} +1 -1
- package/dist/{simple-array-field-CuwaS9sn.cjs → simple-array-field-BODzA766.cjs} +2 -2
- package/dist/{simple-array-field-CuwaS9sn.cjs.map → simple-array-field-BODzA766.cjs.map} +1 -1
- package/dist/{simple-array-field-Bj86iA_N.mjs → simple-array-field-DI_56dVs.mjs} +2 -2
- package/dist/{simple-array-field-Bj86iA_N.mjs.map → simple-array-field-DI_56dVs.mjs.map} +1 -1
- package/dist/{simple-boolean-field-dshsOUUK.cjs → simple-boolean-field-BjnIh9Mq.cjs} +2 -2
- package/dist/{simple-boolean-field-dshsOUUK.cjs.map → simple-boolean-field-BjnIh9Mq.cjs.map} +1 -1
- package/dist/{simple-boolean-field-BbfHAg60.mjs → simple-boolean-field-oP5yJDQL.mjs} +2 -2
- package/dist/{simple-boolean-field-BbfHAg60.mjs.map → simple-boolean-field-oP5yJDQL.mjs.map} +1 -1
- package/dist/{simple-combobox-field-poFNb-vB.mjs → simple-combobox-field-Bd-xk5kC.mjs} +2 -2
- package/dist/{simple-combobox-field-poFNb-vB.mjs.map → simple-combobox-field-Bd-xk5kC.mjs.map} +1 -1
- package/dist/{simple-combobox-field-CNbTlIg_.cjs → simple-combobox-field-Dgicw0VN.cjs} +2 -2
- package/dist/{simple-combobox-field-CNbTlIg_.cjs.map → simple-combobox-field-Dgicw0VN.cjs.map} +1 -1
- package/dist/{simple-date-field-BMADM_kf.mjs → simple-date-field-DE5Z-Zkc.mjs} +2 -2
- package/dist/{simple-date-field-BMADM_kf.mjs.map → simple-date-field-DE5Z-Zkc.mjs.map} +1 -1
- package/dist/{simple-date-field-B5RRZ_Uo.cjs → simple-date-field-hORsbXHE.cjs} +2 -2
- package/dist/{simple-date-field-B5RRZ_Uo.cjs.map → simple-date-field-hORsbXHE.cjs.map} +1 -1
- package/dist/{simple-email-field-B73GdTF_.mjs → simple-email-field-CFbpYis_.mjs} +2 -2
- package/dist/{simple-email-field-B73GdTF_.mjs.map → simple-email-field-CFbpYis_.mjs.map} +1 -1
- package/dist/{simple-email-field-dskmgGEz.cjs → simple-email-field-DpuMlzxg.cjs} +2 -2
- package/dist/{simple-email-field-dskmgGEz.cjs.map → simple-email-field-DpuMlzxg.cjs.map} +1 -1
- package/dist/{simple-number-field-ggLY5zA7.mjs → simple-number-field-BY0b4BJp.mjs} +2 -2
- package/dist/{simple-number-field-ggLY5zA7.mjs.map → simple-number-field-BY0b4BJp.mjs.map} +1 -1
- package/dist/{simple-number-field-RBxUxq_w.cjs → simple-number-field-C4y4rQcw.cjs} +2 -2
- package/dist/{simple-number-field-RBxUxq_w.cjs.map → simple-number-field-C4y4rQcw.cjs.map} +1 -1
- package/dist/{simple-password-field-BBpfmgoT.cjs → simple-password-field-BUzKJ0fu.cjs} +2 -2
- package/dist/{simple-password-field-BBpfmgoT.cjs.map → simple-password-field-BUzKJ0fu.cjs.map} +1 -1
- package/dist/{simple-password-field-CrGsdjSa.mjs → simple-password-field-CA0FuETK.mjs} +2 -2
- package/dist/{simple-password-field-CrGsdjSa.mjs.map → simple-password-field-CA0FuETK.mjs.map} +1 -1
- package/dist/{simple-radio-group-field-CZ5u-XiY.mjs → simple-radio-group-field-BM7HBTSs.mjs} +2 -2
- package/dist/{simple-radio-group-field-CZ5u-XiY.mjs.map → simple-radio-group-field-BM7HBTSs.mjs.map} +1 -1
- package/dist/{simple-radio-group-field-Dyc3SO9t.cjs → simple-radio-group-field-CCxUaYom.cjs} +2 -2
- package/dist/{simple-radio-group-field-Dyc3SO9t.cjs.map → simple-radio-group-field-CCxUaYom.cjs.map} +1 -1
- package/dist/{simple-select-field-CyFJthFb.mjs → simple-select-field-CeTVQwmP.mjs} +2 -2
- package/dist/{simple-select-field-CyFJthFb.mjs.map → simple-select-field-CeTVQwmP.mjs.map} +1 -1
- package/dist/{simple-select-field-CCmaLlAT.cjs → simple-select-field-CzN4Xb7n.cjs} +2 -2
- package/dist/{simple-select-field-CCmaLlAT.cjs.map → simple-select-field-CzN4Xb7n.cjs.map} +1 -1
- package/dist/{simple-text-field-DxZyRSy5.mjs → simple-text-field-CDsgWUFD.mjs} +2 -2
- package/dist/{simple-text-field-DxZyRSy5.mjs.map → simple-text-field-CDsgWUFD.mjs.map} +1 -1
- package/dist/{simple-text-field-DSX3rP7g.cjs → simple-text-field-DGZL0gML.cjs} +2 -2
- package/dist/{simple-text-field-DSX3rP7g.cjs.map → simple-text-field-DGZL0gML.cjs.map} +1 -1
- package/dist/{simple-textarea-field-BiaAbLgT.mjs → simple-textarea-field-BiuHXtqj.mjs} +2 -2
- package/dist/{simple-textarea-field-BiaAbLgT.mjs.map → simple-textarea-field-BiuHXtqj.mjs.map} +1 -1
- package/dist/{simple-textarea-field--FWXqgy7.cjs → simple-textarea-field-vGYOegPj.cjs} +2 -2
- package/dist/{simple-textarea-field--FWXqgy7.cjs.map → simple-textarea-field-vGYOegPj.cjs.map} +1 -1
- package/dist/{switch-field-aaA3hplb.mjs → switch-field-BVgtm94W.mjs} +2 -2
- package/dist/{switch-field-aaA3hplb.mjs.map → switch-field-BVgtm94W.mjs.map} +1 -1
- package/dist/{switch-field-BS8XStmz.cjs → switch-field-DPB3JDT3.cjs} +2 -2
- package/dist/{switch-field-BS8XStmz.cjs.map → switch-field-DPB3JDT3.cjs.map} +1 -1
- package/dist/tanstack-form-CKAWexet.mjs +2 -0
- package/dist/{tanstack-form-B6mzOylW.mjs.map → tanstack-form-CKAWexet.mjs.map} +1 -1
- package/dist/{tanstack-form-DU-ZKXxZ.cjs → tanstack-form-CX3lC3mC.cjs} +2 -2
- package/dist/{tanstack-form-DU-ZKXxZ.cjs.map → tanstack-form-CX3lC3mC.cjs.map} +1 -1
- package/dist/{text-editor-field-DG0c8wVs.cjs → text-editor-field-Ddvgdo_p.cjs} +2 -2
- package/dist/{text-editor-field-DG0c8wVs.cjs.map → text-editor-field-Ddvgdo_p.cjs.map} +1 -1
- package/dist/{text-editor-field-Dm2yxTUZ.mjs → text-editor-field-qa3t2GBg.mjs} +2 -2
- package/dist/{text-editor-field-Dm2yxTUZ.mjs.map → text-editor-field-qa3t2GBg.mjs.map} +1 -1
- package/dist/text-field-CBUTZKGH.mjs +2 -0
- package/dist/text-field-CBUTZKGH.mjs.map +1 -0
- package/dist/text-field-Cwu0xuXt.cjs +2 -0
- package/dist/text-field-Cwu0xuXt.cjs.map +1 -0
- package/dist/{textarea-field-f8E3HEkw.mjs → textarea-field-Ctj5o5my.mjs} +2 -2
- package/dist/{textarea-field-f8E3HEkw.mjs.map → textarea-field-Ctj5o5my.mjs.map} +1 -1
- package/dist/{textarea-field-DDPqESGM.cjs → textarea-field-jOqHJcAL.cjs} +2 -2
- package/dist/{textarea-field-DDPqESGM.cjs.map → textarea-field-jOqHJcAL.cjs.map} +1 -1
- package/dist/{title-field-CKxwzMOM.cjs → title-field-B2hM3S_S.cjs} +2 -2
- package/dist/{title-field-CKxwzMOM.cjs.map → title-field-B2hM3S_S.cjs.map} +1 -1
- package/dist/{title-field-84EnHPvl.mjs → title-field-oAqHRw59.mjs} +2 -2
- package/dist/{title-field-84EnHPvl.mjs.map → title-field-oAqHRw59.mjs.map} +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/resizable.d.cts +1 -1
- package/dist/ui/resizable.d.mts +1 -1
- package/dist/ui/status.cjs +2 -0
- package/dist/ui/status.cjs.map +1 -0
- package/dist/ui/status.d.cts +45 -0
- package/dist/ui/status.d.mts +45 -0
- package/dist/ui/status.mjs +2 -0
- package/dist/ui/status.mjs.map +1 -0
- package/package.json +5 -1
- package/dist/combobox-field-C9uneq5q.cjs +0 -2
- package/dist/combobox-field-C9uneq5q.cjs.map +0 -1
- package/dist/combobox-field-CLooFS0r.mjs +0 -2
- package/dist/combobox-field-CLooFS0r.mjs.map +0 -1
- package/dist/date-field-CJ7hYY8l.cjs +0 -2
- package/dist/date-field-CJ7hYY8l.cjs.map +0 -1
- package/dist/date-field-uYtNFRrJ.mjs +0 -2
- package/dist/date-field-uYtNFRrJ.mjs.map +0 -1
- package/dist/tanstack-form-B6mzOylW.mjs +0 -2
- package/dist/text-field-Dlbpos_A.mjs +0 -2
- package/dist/text-field-Dlbpos_A.mjs.map +0 -1
- package/dist/text-field-GIn2zAtc.cjs +0 -2
- package/dist/text-field-GIn2zAtc.cjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as e}from"./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=email-field-
|
|
1
|
+
import{G as e}from"./tanstack-form-CKAWexet.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{AtSignIcon as f,XIcon as p}from"lucide-react";import{useCallback as m}from"react";import{cn as h}from"@customafk/react-toolkit/utils";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{useStore as v}from"@tanstack/react-form";const y=({label:y,description:b,placeholder:x,tooltip:S,helperText:C,orientation:w=`responsive`,showErrorMessage:T=!0,required:E=!1,maxLength:D})=>{let{form:O,name:k,state:A,handleBlur:j,handleChange:M}=e(),N=v(O.store,({isSubmitting:e})=>e),P=A.meta.isDirty&&A.meta.isTouched&&!A.meta.isValid,F=E&&A.value===null,I=!N&&!!A.value,L=m(({target:{value:e}})=>{N||D&&e.length>D||M(e||null)},[N,D,M]),R=m(()=>{N||M(null)},[N,M]);return _(s,{className:`gap-y-4 px-4`,children:[_(n,{"data-invalid":P,orientation:w,children:[_(r,{children:[_(c,{htmlFor:k,"aria-required":F,children:[y,S&&g(d,{tooltip:S})]}),g(a,{children:b})]}),_(i,{children:[g(t,{id:k,name:k,value:A.value===null?``:A.value,"aria-invalid":P,autoComplete:`email`,placeholder:x,className:h(`pl-9`,I&&`pr-9`,N&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:j,onChange:L}),g(`div`,{className:`absolute top-0 left-0 flex size-9 items-center justify-center text-muted`,children:g(f,{size:14})}),I&&g(`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:R,children:g(p,{size:14,"aria-hidden":`true`})}),g(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:T&&A.meta.isDirty&&g(o,{errors:A.meta.errors})}),g(l,{isShow:!!C,children:C})]})]}),g(u,{})]})};export{y as EmailField};
|
|
2
|
+
//# sourceMappingURL=email-field-DqEDxkp7.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-field-
|
|
1
|
+
{"version":3,"file":"email-field-DqEDxkp7.mjs","names":[],"sources":["../packages/components/features/tanstack-form/components/fields/email-field.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback } from 'react';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { AtSignIcon, XIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Input } from '@/components/ui/input';\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';\nimport { useTanStackFieldContext } from '../form-context';\n\nimport type { EmailFieldProps as Props } from '../../types';\n\n/**\n * A TanStack Form-connected email input field with an at-sign prefix icon,\n * optional clear button, and inline validation error display.\n *\n * @example\n * import { EmailField } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <form.Field name=\"email\">\n * {() => (\n * <EmailField\n * label=\"Email address\"\n * placeholder=\"you@example.com\"\n * required\n * />\n * )}\n * </form.Field>\n */\nexport const EmailField: React.FC<Props> = ({\n label,\n description,\n placeholder,\n tooltip,\n helperText,\n orientation = 'responsive',\n showErrorMessage = true,\n required = false,\n maxLength,\n}) => {\n const { form, name, state, handleBlur, handleChange } = useTanStackFieldContext<string | null>();\n\n const isSubmitting = useStore(form.store, ({ isSubmitting }) => isSubmitting);\n\n const _invalid = state.meta.isDirty && state.meta.isTouched && !state.meta.isValid;\n const _isEmpty = required && state.value === null;\n const _showClear = !isSubmitting && !!state.value;\n\n const onChange = useCallback<React.ChangeEventHandler<HTMLInputElement>>(\n ({ target: { value } }) => {\n if (isSubmitting) return;\n if (maxLength && value.length > maxLength) return;\n handleChange(value || null);\n },\n [isSubmitting, maxLength, handleChange]\n );\n\n const onClear = useCallback(() => {\n if (isSubmitting) return;\n handleChange(null);\n }, [isSubmitting, handleChange]);\n\n return (\n <FieldGroup className=\"gap-y-4 px-4\">\n <Field data-invalid={_invalid} orientation={orientation}>\n <FieldContent>\n <FieldLabel htmlFor={name} aria-required={_isEmpty}>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n </FieldContent>\n <FieldContentMain>\n <Input\n id={name}\n name={name}\n value={state.value === null ? '' : state.value}\n aria-invalid={_invalid}\n autoComplete=\"email\"\n placeholder={placeholder}\n className={cn('pl-9', _showClear && 'pr-9', isSubmitting && 'pointer-events-none bg-muted-muted opacity-60')}\n onBlur={handleBlur}\n onChange={onChange}\n />\n <div className=\"absolute top-0 left-0 flex size-9 items-center justify-center text-muted\">\n <AtSignIcon size={14} />\n </div>\n\n {_showClear && (\n <button\n type=\"button\"\n aria-label=\"Xóa\"\n 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\"\n onClick={onClear}\n >\n <XIcon size={14} aria-hidden=\"true\" />\n </button>\n )}\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":"uhBA4CA,MAAa,GAA+B,CAC1C,QACA,cACA,cACA,UACA,aACA,cAAc,aACd,mBAAmB,GACnB,WAAW,GACX,eACI,CACJ,GAAM,CAAE,OAAM,OAAM,QAAO,aAAY,gBAAiB,EAAuC,EAEzF,EAAe,EAAS,EAAK,OAAQ,CAAE,kBAAmB,CAAY,EAEtE,EAAW,EAAM,KAAK,SAAW,EAAM,KAAK,WAAa,CAAC,EAAM,KAAK,QACrE,EAAW,GAAY,EAAM,QAAU,KACvC,EAAa,CAAC,GAAgB,CAAC,CAAC,EAAM,MAEtC,EAAW,GACd,CAAE,OAAQ,CAAE,YAAc,CACrB,GACA,GAAa,EAAM,OAAS,GAChC,EAAa,GAAS,IAAI,CAC5B,EACA,CAAC,EAAc,EAAW,CAAY,CACxC,EAEM,EAAU,MAAkB,CAC5B,GACJ,EAAa,IAAI,CACnB,EAAG,CAAC,EAAc,CAAY,CAAC,EAE/B,OACE,EAAC,EAAD,CAAY,UAAU,wBAAtB,CACE,EAAC,EAAD,CAAO,eAAc,EAAuB,uBAA5C,CACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAY,QAAS,EAAM,gBAAe,WAA1C,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,CACE,GAAI,EACE,OACN,MAAO,EAAM,QAAU,KAAO,GAAK,EAAM,MACzC,eAAc,EACd,aAAa,QACA,cACb,UAAW,EAAG,OAAQ,GAAc,OAAQ,GAAgB,+CAA+C,EAC3G,OAAQ,EACE,UACX,CAAA,EACD,EAAC,MAAD,CAAK,UAAU,oFACb,EAAC,EAAD,CAAY,KAAM,EAAK,CAAA,CACpB,CAAA,EAEJ,GACC,EAAC,SAAD,CACE,KAAK,SACL,aAAW,MACX,UAAU,wOACV,QAAS,WAET,EAAC,EAAD,CAAO,KAAM,GAAI,cAAY,MAAQ,CAAA,CAC/B,CAAA,EAGV,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 { $ as FilterType, A as UITableLoadMore, At as TUITableWrapper, B as UITableEmptyDisplay, C as UITableTooltipActions, Ct as TUITableHeadCellOption, D as UITableContainer, Dt as TUITableInnerWrapper, E as UITableProvider, Et as TUITableInnerTable, F as UITableHeadCellOption, G as ActiveFilter, H as UITableCellActions, I as UITableHeadCell, J as ColumnAggregationType, K as BooleanFilterValue, L as UITableHead, M as UITableInnerTable, Mt as TagFilterValue, N as UITableHeadRow, Nt as TextFilterValue, O as UITableWrapper, Ot as TUITableLoadMore, P as UITableHeadCellSelect, Pt as UITableEmpty, Q as FilterOption, R as UITableFooterRow, S as UITableTooltip, St as TUITableHeadCell, T as UITableUserDataDisplay, Tt as TUITableHeadRow, U as UITableCell, V as UITableCellSelect, W as UITableBody, X as DateRangeFilterValue, Y as CsvCell, Z as FilterDefinition, _ as UITableRemoveButton, _t as TUITableCellSelect, a as UITableCurrencyDisplay, at as TTableAnalysisContext, b as UITableSummaryBar, bt as TUITableFooter, c as UITableEditButton, ct as TTableFilterContext, d as UITableListDisplay, dt as TTableInnerWrapperContext, et as FilterValue, f as UITableMoreButton, ft as TTableRowContext, g as UITableProgressDisplay, gt as TUITableCellActions, h as UITablePhoneNumberDisplay, ht as TUITableCell, i as UITableBooleanDisplay, it as SummaryItem, j as UITableInnerWrapper, jt as TableProviderProps, k as UITableRow, kt as TUITableRow, l as UITableEmailDisplay, lt as TTableHeadRowContext, m as UITablePermalink, mt as TUITableBody, n as UITableAvatarNameDisplay, nt as RowData, o as UITableDateDisplay, ot as TTableBodyContext, p as UITableNameDisplay, pt as TTableSummaryContext, q as ColumnAggregation, r as UITableBadgeDisplay, rt as SingleTagFilterValue, s as UITableDescriptionDisplay, st as TTableContext, t as UITableAnalysisPanel, tt as NumberFilterValue, u as UITableFilter, ut as TTableInnerTableContext, v as UITableStatisticDisplay, vt as TUITableColumn, w as UITableTooltipFilter, wt as TUITableHeadCellSelect, x as UITableToggleButton, xt as TUITableHead, y as UITableStatusDisplay, yt as TUITableEmptyDisplay, z as UITableFooter } from "../../index-
|
|
1
|
+
import { $ as FilterType, A as UITableLoadMore, At as TUITableWrapper, B as UITableEmptyDisplay, C as UITableTooltipActions, Ct as TUITableHeadCellOption, D as UITableContainer, Dt as TUITableInnerWrapper, E as UITableProvider, Et as TUITableInnerTable, F as UITableHeadCellOption, G as ActiveFilter, H as UITableCellActions, I as UITableHeadCell, J as ColumnAggregationType, K as BooleanFilterValue, L as UITableHead, M as UITableInnerTable, Mt as TagFilterValue, N as UITableHeadRow, Nt as TextFilterValue, O as UITableWrapper, Ot as TUITableLoadMore, P as UITableHeadCellSelect, Pt as UITableEmpty, Q as FilterOption, R as UITableFooterRow, S as UITableTooltip, St as TUITableHeadCell, T as UITableUserDataDisplay, Tt as TUITableHeadRow, U as UITableCell, V as UITableCellSelect, W as UITableBody, X as DateRangeFilterValue, Y as CsvCell, Z as FilterDefinition, _ as UITableRemoveButton, _t as TUITableCellSelect, a as UITableCurrencyDisplay, at as TTableAnalysisContext, b as UITableSummaryBar, bt as TUITableFooter, c as UITableEditButton, ct as TTableFilterContext, d as UITableListDisplay, dt as TTableInnerWrapperContext, et as FilterValue, f as UITableMoreButton, ft as TTableRowContext, g as UITableProgressDisplay, gt as TUITableCellActions, h as UITablePhoneNumberDisplay, ht as TUITableCell, i as UITableBooleanDisplay, it as SummaryItem, j as UITableInnerWrapper, jt as TableProviderProps, k as UITableRow, kt as TUITableRow, l as UITableEmailDisplay, lt as TTableHeadRowContext, m as UITablePermalink, mt as TUITableBody, n as UITableAvatarNameDisplay, nt as RowData, o as UITableDateDisplay, ot as TTableBodyContext, p as UITableNameDisplay, pt as TTableSummaryContext, q as ColumnAggregation, r as UITableBadgeDisplay, rt as SingleTagFilterValue, s as UITableDescriptionDisplay, st as TTableContext, t as UITableAnalysisPanel, tt as NumberFilterValue, u as UITableFilter, ut as TTableInnerTableContext, v as UITableStatisticDisplay, vt as TUITableColumn, w as UITableTooltipFilter, wt as TUITableHeadCellSelect, x as UITableToggleButton, xt as TUITableHead, y as UITableStatusDisplay, yt as TUITableEmptyDisplay, z as UITableFooter } from "../../index-By6nfR2q.cjs";
|
|
2
2
|
export { ActiveFilter, BooleanFilterValue, ColumnAggregation, ColumnAggregationType, CsvCell, DateRangeFilterValue, FilterDefinition, FilterOption, FilterType, FilterValue, NumberFilterValue, RowData, SingleTagFilterValue, SummaryItem, TTableAnalysisContext, TTableBodyContext, TTableContext, TTableFilterContext, TTableHeadRowContext, TTableInnerTableContext, TTableInnerWrapperContext, TTableRowContext, TTableSummaryContext, TUITableBody, TUITableCell, TUITableCellActions, TUITableCellSelect, TUITableColumn, TUITableEmptyDisplay, TUITableFooter, TUITableHead, TUITableHeadCell, TUITableHeadCellOption, TUITableHeadCellSelect, TUITableHeadRow, TUITableInnerTable, TUITableInnerWrapper, TUITableLoadMore, TUITableRow, TUITableWrapper, TableProviderProps, TagFilterValue, TextFilterValue, UITableAnalysisPanel, UITableAvatarNameDisplay, UITableBadgeDisplay, UITableBody, UITableBooleanDisplay, UITableCell, UITableCellActions, UITableCellSelect, UITableContainer, UITableCurrencyDisplay, UITableDateDisplay, UITableDescriptionDisplay, UITableEditButton, UITableEmailDisplay, UITableEmpty, UITableEmptyDisplay, UITableFilter, UITableFooter, UITableFooterRow, UITableHead, UITableHeadCell, UITableHeadCellOption, UITableHeadCellSelect, UITableHeadRow, UITableInnerTable, UITableInnerWrapper, UITableListDisplay, UITableLoadMore, UITableMoreButton, UITableNameDisplay, UITablePermalink, UITablePhoneNumberDisplay, UITableProgressDisplay, UITableProvider, UITableRemoveButton, UITableRow, UITableStatisticDisplay, UITableStatusDisplay, UITableSummaryBar, UITableToggleButton, UITableTooltip, UITableTooltipActions, UITableTooltipFilter, UITableUserDataDisplay, UITableWrapper };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as FilterType, A as UITableLoadMore, At as TUITableWrapper, B as UITableEmptyDisplay, C as UITableTooltipActions, Ct as TUITableHeadCellOption, D as UITableContainer, Dt as TUITableInnerWrapper, E as UITableProvider, Et as TUITableInnerTable, F as UITableHeadCellOption, G as ActiveFilter, H as UITableCellActions, I as UITableHeadCell, J as ColumnAggregationType, K as BooleanFilterValue, L as UITableHead, M as UITableInnerTable, Mt as TagFilterValue, N as UITableHeadRow, Nt as TextFilterValue, O as UITableWrapper, Ot as TUITableLoadMore, P as UITableHeadCellSelect, Pt as UITableEmpty, Q as FilterOption, R as UITableFooterRow, S as UITableTooltip, St as TUITableHeadCell, T as UITableUserDataDisplay, Tt as TUITableHeadRow, U as UITableCell, V as UITableCellSelect, W as UITableBody, X as DateRangeFilterValue, Y as CsvCell, Z as FilterDefinition, _ as UITableRemoveButton, _t as TUITableCellSelect, a as UITableCurrencyDisplay, at as TTableAnalysisContext, b as UITableSummaryBar, bt as TUITableFooter, c as UITableEditButton, ct as TTableFilterContext, d as UITableListDisplay, dt as TTableInnerWrapperContext, et as FilterValue, f as UITableMoreButton, ft as TTableRowContext, g as UITableProgressDisplay, gt as TUITableCellActions, h as UITablePhoneNumberDisplay, ht as TUITableCell, i as UITableBooleanDisplay, it as SummaryItem, j as UITableInnerWrapper, jt as TableProviderProps, k as UITableRow, kt as TUITableRow, l as UITableEmailDisplay, lt as TTableHeadRowContext, m as UITablePermalink, mt as TUITableBody, n as UITableAvatarNameDisplay, nt as RowData, o as UITableDateDisplay, ot as TTableBodyContext, p as UITableNameDisplay, pt as TTableSummaryContext, q as ColumnAggregation, r as UITableBadgeDisplay, rt as SingleTagFilterValue, s as UITableDescriptionDisplay, st as TTableContext, t as UITableAnalysisPanel, tt as NumberFilterValue, u as UITableFilter, ut as TTableInnerTableContext, v as UITableStatisticDisplay, vt as TUITableColumn, w as UITableTooltipFilter, wt as TUITableHeadCellSelect, x as UITableToggleButton, xt as TUITableHead, y as UITableStatusDisplay, yt as TUITableEmptyDisplay, z as UITableFooter } from "../../index-
|
|
1
|
+
import { $ as FilterType, A as UITableLoadMore, At as TUITableWrapper, B as UITableEmptyDisplay, C as UITableTooltipActions, Ct as TUITableHeadCellOption, D as UITableContainer, Dt as TUITableInnerWrapper, E as UITableProvider, Et as TUITableInnerTable, F as UITableHeadCellOption, G as ActiveFilter, H as UITableCellActions, I as UITableHeadCell, J as ColumnAggregationType, K as BooleanFilterValue, L as UITableHead, M as UITableInnerTable, Mt as TagFilterValue, N as UITableHeadRow, Nt as TextFilterValue, O as UITableWrapper, Ot as TUITableLoadMore, P as UITableHeadCellSelect, Pt as UITableEmpty, Q as FilterOption, R as UITableFooterRow, S as UITableTooltip, St as TUITableHeadCell, T as UITableUserDataDisplay, Tt as TUITableHeadRow, U as UITableCell, V as UITableCellSelect, W as UITableBody, X as DateRangeFilterValue, Y as CsvCell, Z as FilterDefinition, _ as UITableRemoveButton, _t as TUITableCellSelect, a as UITableCurrencyDisplay, at as TTableAnalysisContext, b as UITableSummaryBar, bt as TUITableFooter, c as UITableEditButton, ct as TTableFilterContext, d as UITableListDisplay, dt as TTableInnerWrapperContext, et as FilterValue, f as UITableMoreButton, ft as TTableRowContext, g as UITableProgressDisplay, gt as TUITableCellActions, h as UITablePhoneNumberDisplay, ht as TUITableCell, i as UITableBooleanDisplay, it as SummaryItem, j as UITableInnerWrapper, jt as TableProviderProps, k as UITableRow, kt as TUITableRow, l as UITableEmailDisplay, lt as TTableHeadRowContext, m as UITablePermalink, mt as TUITableBody, n as UITableAvatarNameDisplay, nt as RowData, o as UITableDateDisplay, ot as TTableBodyContext, p as UITableNameDisplay, pt as TTableSummaryContext, q as ColumnAggregation, r as UITableBadgeDisplay, rt as SingleTagFilterValue, s as UITableDescriptionDisplay, st as TTableContext, t as UITableAnalysisPanel, tt as NumberFilterValue, u as UITableFilter, ut as TTableInnerTableContext, v as UITableStatisticDisplay, vt as TUITableColumn, w as UITableTooltipFilter, wt as TUITableHeadCellSelect, x as UITableToggleButton, xt as TUITableHead, y as UITableStatusDisplay, yt as TUITableEmptyDisplay, z as UITableFooter } from "../../index-5R8gTzkQ.mjs";
|
|
2
2
|
export { ActiveFilter, BooleanFilterValue, ColumnAggregation, ColumnAggregationType, CsvCell, DateRangeFilterValue, FilterDefinition, FilterOption, FilterType, FilterValue, NumberFilterValue, RowData, SingleTagFilterValue, SummaryItem, TTableAnalysisContext, TTableBodyContext, TTableContext, TTableFilterContext, TTableHeadRowContext, TTableInnerTableContext, TTableInnerWrapperContext, TTableRowContext, TTableSummaryContext, TUITableBody, TUITableCell, TUITableCellActions, TUITableCellSelect, TUITableColumn, TUITableEmptyDisplay, TUITableFooter, TUITableHead, TUITableHeadCell, TUITableHeadCellOption, TUITableHeadCellSelect, TUITableHeadRow, TUITableInnerTable, TUITableInnerWrapper, TUITableLoadMore, TUITableRow, TUITableWrapper, TableProviderProps, TagFilterValue, TextFilterValue, UITableAnalysisPanel, UITableAvatarNameDisplay, UITableBadgeDisplay, UITableBody, UITableBooleanDisplay, UITableCell, UITableCellActions, UITableCellSelect, UITableContainer, UITableCurrencyDisplay, UITableDateDisplay, UITableDescriptionDisplay, UITableEditButton, UITableEmailDisplay, UITableEmpty, UITableEmptyDisplay, UITableFilter, UITableFooter, UITableFooterRow, UITableHead, UITableHeadCell, UITableHeadCellOption, UITableHeadCellSelect, UITableHeadRow, UITableInnerTable, UITableInnerWrapper, UITableListDisplay, UITableLoadMore, UITableMoreButton, UITableNameDisplay, UITablePermalink, UITablePhoneNumberDisplay, UITableProgressDisplay, UITableProvider, UITableRemoveButton, UITableRow, UITableStatisticDisplay, UITableStatusDisplay, UITableSummaryBar, UITableToggleButton, UITableTooltip, UITableTooltipActions, UITableTooltipFilter, UITableUserDataDisplay, UITableWrapper };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../tanstack-form-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../tanstack-form-CX3lC3mC.cjs");exports.ArrayCol=e.t,exports.ArrayHeaderRow=e.n,exports.CheckboxField=e.r,exports.ComboboxField=e.i,exports.DateField=e.a,exports.EmailField=e.o,exports.Field=e.s,exports.FieldContent=e.c,exports.FieldContentMain=e.l,exports.FieldError=e.u,exports.FieldGroup=e.d,exports.FieldLabel=e.f,exports.FieldSeparator=e.p,exports.NumberField=e.m,exports.PasswordField=e.h,exports.RadioGroupField=e.g,exports.SelectField=e._,exports.SimpleArrayField=e.v,exports.SimpleBooleanField=e.y,exports.SimpleComboboxField=e.b,exports.SimpleDateField=e.x,exports.SimpleEmailField=e.S,exports.SimpleNumberField=e.C,exports.SimplePasswordField=e.w,exports.SimpleRadioGroupField=e.T,exports.SimpleSelectField=e.E,exports.SimpleTextField=e.D,exports.SimpleTextareaField=e.O,exports.SwitchField=e.k,exports.TanStackActionSubmit=e.A,exports.TanStackActionsForm=e.j,exports.TanStackCardForm=e.M,exports.TanStackContainerForm=e.N,exports.TanStackDialogForm=e.P,exports.TanStackFieldGroup=e.F,exports.TanStackPopoverForm=e.I,exports.TanStackSectionForm=e.L,exports.TanStackTitleField=e.R,exports.TextEditorField=e.z,exports.TextField=e.B,exports.TextareaField=e.V,exports.useTanStackFieldContext=e.G,exports.useTanStackForm=e.H,exports.useTanStackFormContext=e.K,exports.withTanStackFieldGroup=e.U,exports.withTanStackForm=e.W;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,B as t,C as n,D as r,E as i,F as a,G as o,H as s,I as c,K as l,L as u,M as d,N as f,O as p,P as m,R as h,S as g,T as _,U as v,V as y,W as b,_ as x,a as S,b as C,c as w,d as T,f as E,g as D,h as O,i as k,j as A,k as j,l as M,m as N,n as P,o as F,p as I,r as L,s as R,t as z,u as B,v as V,w as H,x as U,y as W,z as G}from"../../tanstack-form-
|
|
1
|
+
import{A as e,B as t,C as n,D as r,E as i,F as a,G as o,H as s,I as c,K as l,L as u,M as d,N as f,O as p,P as m,R as h,S as g,T as _,U as v,V as y,W as b,_ as x,a as S,b as C,c as w,d as T,f as E,g as D,h as O,i as k,j as A,k as j,l as M,m as N,n as P,o as F,p as I,r as L,s as R,t as z,u as B,v as V,w as H,x as U,y as W,z as G}from"../../tanstack-form-CKAWexet.mjs";export{z as ArrayCol,P as ArrayHeaderRow,L as CheckboxField,k as ComboboxField,S as DateField,F as EmailField,R as Field,w as FieldContent,M as FieldContentMain,B as FieldError,T as FieldGroup,E as FieldLabel,I as FieldSeparator,N as NumberField,O as PasswordField,D as RadioGroupField,x as SelectField,V as SimpleArrayField,W as SimpleBooleanField,C as SimpleComboboxField,U as SimpleDateField,g as SimpleEmailField,n as SimpleNumberField,H as SimplePasswordField,_ as SimpleRadioGroupField,i as SimpleSelectField,r as SimpleTextField,p as SimpleTextareaField,j as SwitchField,e as TanStackActionSubmit,A as TanStackActionsForm,d as TanStackCardForm,f as TanStackContainerForm,m as TanStackDialogForm,a as TanStackFieldGroup,c as TanStackPopoverForm,u as TanStackSectionForm,h as TanStackTitleField,G as TextEditorField,t as TextField,y as TextareaField,o as useTanStackFieldContext,s as useTanStackForm,l as useTanStackFormContext,v as withTanStackFieldGroup,b as withTanStackForm};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./ui/tooltip.cjs"),t=require("./ui/separator.cjs");let n=require("lucide-react"),r=require("react"),i=require("@customafk/react-toolkit/utils"),a=require("class-variance-authority"),o=require("react/jsx-runtime"),s=require("radix-ui");function c({className:e,children:t,...n}){return(0,o.jsxs)(s.Label.Root,{"data-slot":`label`,className:(0,i.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,o.jsx)(`span`,{className:`flex items-center gap-1`,children:t}),(0,o.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 l=(0,a.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`}}),u=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(`fieldset`,{"data-slot":`field-set`,className:(0,i.cn)(`flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));u.displayName=`FieldSet`;const d=(0,r.memo)(({className:e,variant:t=`legend`,...n})=>(0,o.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:(0,i.cn)(`mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n}));d.displayName=`FieldLegend`;const f=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(`div`,{"data-slot":`field-group`,className:(0,i.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}));f.displayName=`FieldGroup`;const p=(0,r.memo)(({className:e,orientation:t=`vertical`,...n})=>(0,o.jsx)(`div`,{"data-slot":`field`,"data-orientation":t,className:(0,i.cn)(l({orientation:t}),e),...n}));p.displayName=`Field`;const m=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(`div`,{"data-slot":`field-content`,className:(0,i.cn)(`group/field-content flex flex-col gap-1.5 leading-snug`,e),...t}));m.displayName=`FieldContent`;const h=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(`div`,{"data-slot":`field-content-main`,className:(0,i.cn)(`relative`,e),...t}));h.displayName=`FieldContentMain`;const g=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(c,{"data-slot":`field-label`,className:(0,i.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 _=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(`div`,{"data-slot":`field-label`,className:(0,i.cn)(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));_.displayName=`FieldTitle`;const v=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(`p`,{"data-slot":`field-description`,className:(0,i.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}));v.displayName=`FieldDescription`;const y=(0,r.memo)(({isShow:e=!0,className:t,children:r,...a})=>e===!1?null:(0,o.jsxs)(`div`,{"data-slot":`field-note`,className:(0,i.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),...a,children:[(0,o.jsx)(n.InfoIcon,{size:12,className:`mt-0.5 shrink-0 text-primary/70`}),(0,o.jsx)(`span`,{children:r})]}));y.displayName=`FieldNote`;const b=(0,r.memo)(({tooltip:t})=>(0,o.jsxs)(e.Tooltip,{children:[(0,o.jsx)(e.TooltipTrigger,{asChild:!0,children:(0,o.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,o.jsx)(n.HelpCircleIcon,{size:13,"aria-hidden":`true`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Thêm thông tin`})]})}),(0,o.jsx)(e.TooltipContent,{side:`top`,className:`max-w-xs text-balance`,children:t})]}));b.displayName=`FieldTooltip`;const x=(0,r.memo)(({children:e,className:n,...r})=>(0,o.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:(0,i.cn)(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,n),...r,children:[(0,o.jsx)(t.Separator,{className:`absolute inset-0 top-1/2`}),e&&(0,o.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 S=(0,r.memo)(({className:e,children:t,errors:n,requiredMessage:a=`Trường này là bắt buộc`,...s})=>{let c=(0,r.useMemo)(()=>{let e=e=>e.code===`invalid_type`?a:e.message;return t||(n?n?.length===1&&n[0]?.message?(0,o.jsx)(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:(0,o.jsx)(`p`,{children:e(n[0])})}):(0,o.jsx)(`ul`,{className:`flex list-none flex-col`,children:n.map(t=>typeof t==`string`?(0,o.jsx)(`li`,{children:t},t):t?.message?(0,o.jsx)(`li`,{children:e(t)},t.code??t.message):null)}):null)},[t,n,a]);return c?(0,o.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:(0,i.cn)(`w-full font-medium text-danger-strong text-xs`,e),...s,children:c}):null});S.displayName=`FieldError`,exports.Field=p,exports.FieldContent=m,exports.FieldContentMain=h,exports.FieldDescription=v,exports.FieldError=S,exports.FieldGroup=f,exports.FieldLabel=g,exports.FieldLegend=d,exports.FieldNote=y,exports.FieldSeparator=x,exports.FieldTitle=_,exports.FieldTooltip=b;
|
|
2
|
-
//# sourceMappingURL=field-
|
|
1
|
+
const e=require("./ui/tooltip.cjs"),t=require("./ui/separator.cjs");let n=require("lucide-react"),r=require("react"),i=require("@customafk/react-toolkit/utils"),a=require("class-variance-authority"),o=require("react/jsx-runtime"),s=require("radix-ui");function c({className:e,children:t,...n}){return(0,o.jsxs)(s.Label.Root,{"data-slot":`label`,className:(0,i.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,o.jsx)(`span`,{className:`flex items-center gap-1`,children:t}),(0,o.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 l=(0,a.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`}}),u=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(`fieldset`,{"data-slot":`field-set`,className:(0,i.cn)(`flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));u.displayName=`FieldSet`;const d=(0,r.memo)(({className:e,variant:t=`legend`,...n})=>(0,o.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:(0,i.cn)(`mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n}));d.displayName=`FieldLegend`;const f=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(`div`,{"data-slot":`field-group`,className:(0,i.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}));f.displayName=`FieldGroup`;const p=(0,r.memo)(({className:e,orientation:t=`vertical`,...n})=>(0,o.jsx)(`div`,{"data-slot":`field`,"data-orientation":t,className:(0,i.cn)(l({orientation:t}),e),...n}));p.displayName=`Field`;const m=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(`div`,{"data-slot":`field-content`,className:(0,i.cn)(`group/field-content flex flex-col gap-1.5 leading-snug`,e),...t}));m.displayName=`FieldContent`;const h=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(`div`,{"data-slot":`field-content-main`,className:(0,i.cn)(`relative`,e),...t}));h.displayName=`FieldContentMain`;const g=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(c,{"data-slot":`field-label`,className:(0,i.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 _=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(`div`,{"data-slot":`field-label`,className:(0,i.cn)(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));_.displayName=`FieldTitle`;const v=(0,r.memo)(({className:e,...t})=>(0,o.jsx)(`p`,{"data-slot":`field-description`,className:(0,i.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}));v.displayName=`FieldDescription`;const y=(0,r.memo)(({isShow:e=!0,className:t,children:r,...a})=>e===!1?null:(0,o.jsxs)(`div`,{"data-slot":`field-note`,className:(0,i.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 mt-1`,t),...a,children:[(0,o.jsx)(n.InfoIcon,{size:12,className:`mt-0.5 shrink-0 text-primary/70`}),(0,o.jsx)(`span`,{children:r})]}));y.displayName=`FieldNote`;const b=(0,r.memo)(({tooltip:t})=>(0,o.jsxs)(e.Tooltip,{children:[(0,o.jsx)(e.TooltipTrigger,{asChild:!0,children:(0,o.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,o.jsx)(n.HelpCircleIcon,{size:13,"aria-hidden":`true`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Thêm thông tin`})]})}),(0,o.jsx)(e.TooltipContent,{side:`top`,className:`max-w-xs text-balance`,children:t})]}));b.displayName=`FieldTooltip`;const x=(0,r.memo)(({children:e,className:n,...r})=>(0,o.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:(0,i.cn)(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,n),...r,children:[(0,o.jsx)(t.Separator,{className:`absolute inset-0 top-1/2`}),e&&(0,o.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 S=(0,r.memo)(({className:e,children:t,errors:n,requiredMessage:a=`Trường này là bắt buộc`,...s})=>{let c=(0,r.useMemo)(()=>{let e=e=>e.code===`invalid_type`?a:e.message;return t||(n?n?.length===1&&n[0]?.message?(0,o.jsx)(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:(0,o.jsx)(`p`,{children:e(n[0])})}):(0,o.jsx)(`ul`,{className:`flex list-none flex-col`,children:n.map(t=>typeof t==`string`?(0,o.jsx)(`li`,{children:t},t):t?.message?(0,o.jsx)(`li`,{children:e(t)},t.code??t.message):null)}):null)},[t,n,a]);return c?(0,o.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:(0,i.cn)(`w-full font-medium text-danger-strong text-xs`,e),...s,children:c}):null});S.displayName=`FieldError`,exports.Field=p,exports.FieldContent=m,exports.FieldContentMain=h,exports.FieldDescription=v,exports.FieldError=S,exports.FieldGroup=f,exports.FieldLabel=g,exports.FieldLegend=d,exports.FieldNote=y,exports.FieldSeparator=x,exports.FieldTitle=_,exports.FieldTooltip=b;
|
|
2
|
+
//# sourceMappingURL=field-BSLi-P0Q.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-BV5twmKA.cjs","names":["LabelPrimitive","InfoIcon","Tooltip","TooltipTrigger","HelpCircleIcon","TooltipContent","Separator"],"sources":["../packages/components/features/tanstack-form/components/ui/label.tsx","../packages/components/features/tanstack-form/components/ui/field.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Label as LabelPrimitive } from 'radix-ui';\n\n/**\n * Form field label that automatically renders a \"Required\" badge when the field is marked aria-required.\n *\n * @example\n * import { Label } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <Label htmlFor=\"email\">Email address</Label>\n */\nfunction Label({ className, children, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'text-text-positive',\n 'flex w-full items-center justify-between',\n 'select-none font-medium text-sm/6 leading-none',\n 'group-data-[disabled=true]:pointer-events-none',\n 'group-data-[disabled=true]:opacity-50',\n 'peer-disabled:cursor-not-allowed',\n 'peer-disabled:opacity-50',\n 'aria-required:*:data-[slot=required-indicator]:inline-block',\n className\n )}\n {...props}\n >\n <span className=\"flex items-center gap-1\">{children}</span>\n <span\n data-slot=\"required-indicator\"\n className=\"hidden shrink-0 rounded-lg bg-danger-strong px-1.5 py-1 font-semibold text-[11px] leading-none text-white\"\n >\n Bắt buộc\n </span>\n </LabelPrimitive.Root>\n );\n}\n\nexport { Label };\n","'use client';\n\nimport { memo, useMemo } from 'react';\n\nimport { HelpCircleIcon, InfoIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Separator } from '@/components/ui/separator';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Label } from './label';\n\nconst fieldVariants = cva('group/field flex w-full gap-2 data-[invalid=true]:text-danger *:data-[slot=field-content]:gap-0', {\n variants: {\n orientation: {\n vertical: ['flex-col *:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center gap-4',\n '*:data-[slot=field-content]:basis-1/2',\n '*:data-[slot=field-content-main]:flex-1',\n '*:data-[slot=field-label]:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start',\n 'has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full [&>.sr-only]:w-auto',\n '@md/field-group:flex-row',\n '@md/field-group:items-center',\n '@md/field-group:gap-4',\n '@md/field-group:*:w-auto',\n '@md/field-group:*:data-[slot=field-content]:basis-1/2',\n '@md/field-group:*:data-[slot=field-content-main]:basis-1/2',\n '@md/field-group:*:data-[slot=field-label]:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start',\n '@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\n/**\n * Outermost `<fieldset>` wrapper that stacks multiple `Field` rows with consistent vertical spacing.\n *\n * @example\n * import { FieldSet } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldSet>\n * <Field><FieldLabel>Name</FieldLabel><FieldContent><input /></FieldContent></Field>\n * </FieldSet>\n */\nconst FieldSet = memo(({ className, ...props }: React.ComponentProps<'fieldset'>) => {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn('flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3', className)}\n {...props}\n />\n );\n});\nFieldSet.displayName = 'FieldSet';\n\n/**\n * Props for {@link FieldLegend}.\n */\ntype FieldLegendProps = React.ComponentProps<'legend'> & {\n /**\n * Visual weight of the legend text.\n * - `'legend'` — larger base-size text (section heading).\n * - `'label'` — smaller label-size text (matches field label weight).\n * @default 'legend'\n */\n variant?: 'legend' | 'label';\n};\n\n/**\n * `<legend>` element for a `<fieldset>`, styled as either a section heading or a compact label.\n *\n * @example\n * import { FieldSet, FieldLegend } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldSet>\n * <FieldLegend variant=\"legend\">Personal details</FieldLegend>\n * </FieldSet>\n */\nconst FieldLegend = memo(({ className, variant = 'legend', ...props }: FieldLegendProps) => {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn('mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base', className)}\n {...props}\n />\n );\n});\nFieldLegend.displayName = 'FieldLegend';\n\n/**\n * Container `<div>` that groups a set of `Field` rows with container-query support for responsive layouts.\n *\n * @example\n * import { FieldGroup } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldGroup>\n * <Field>…</Field>\n * <Field>…</Field>\n * </FieldGroup>\n */\nconst FieldGroup = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group',\n 'flex flex-col gap-7 pt-4',\n 'data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4',\n className\n )}\n {...props}\n />\n );\n});\nFieldGroup.displayName = 'FieldGroup';\n\n/**\n * Single form field row that arranges label, input, and meta elements with configurable orientation.\n *\n * @example\n * import { Field } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <Field orientation=\"horizontal\">\n * <FieldLabel htmlFor=\"username\">Username</FieldLabel>\n * <FieldContent><input id=\"username\" /></FieldContent>\n * </Field>\n */\nconst Field = memo(({ className, orientation = 'vertical', ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) => {\n return <div data-slot=\"field\" data-orientation={orientation} className={cn(fieldVariants({ orientation }), className)} {...props} />;\n});\nField.displayName = 'Field';\n\n/**\n * Flex column wrapper that houses the primary input control together with description and error slots.\n *\n * @example\n * import { FieldContent } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldContent>\n * <input type=\"text\" />\n * <FieldDescription>Enter your full name.</FieldDescription>\n * </FieldContent>\n */\nconst FieldContent = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"field-content\" className={cn('group/field-content flex flex-col gap-1.5 leading-snug', className)} {...props} />;\n});\nFieldContent.displayName = 'FieldContent';\n\n/**\n * Positioned wrapper for the main input element that enables absolutely-placed adornments (icons, spinners).\n *\n * @example\n * import { FieldContentMain } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldContentMain>\n * <input type=\"text\" className=\"pr-8\" />\n * <SearchIcon className=\"absolute right-2 top-2\" />\n * </FieldContentMain>\n */\nconst FieldContentMain = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"field-content-main\" className={cn('relative', className)} {...props} />;\n});\nFieldContentMain.displayName = 'FieldContentMain';\n\n/**\n * Styled `<label>` element for a `Field`, extending the base `Label` with field-group-aware spacing and border states.\n *\n * @example\n * import { FieldLabel } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldLabel htmlFor=\"email\" aria-required>Email</FieldLabel>\n */\nconst FieldLabel = memo(({ className, ...props }: React.ComponentProps<typeof Label>) => {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label min-h-6 gap-1 font-medium leading-snug',\n 'has-[>[data-slot=field]]:w-full',\n 'has-[>[data-slot=field]]:flex-col',\n 'has-[>[data-slot=field]]:rounded-md',\n 'has-[>[data-slot=field]]:border',\n 'has-[>[data-slot=field]]:border-border',\n 'has-data-[state=checked]:border-primary',\n '*:data-[slot=field]:p-4 group-data-[disabled=true]/field:opacity-50',\n className\n )}\n {...props}\n />\n );\n});\nFieldLabel.displayName = 'FieldLabel';\n\n/**\n * Inline title element (non-`<label>`) for fields whose label cannot be a native `<label>`, such as custom checkbox groups.\n *\n * @example\n * import { FieldTitle } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldTitle>Notification preferences</FieldTitle>\n */\nconst FieldTitle = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-label\"\n className={cn('flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50', className)}\n {...props}\n />\n );\n});\nFieldTitle.displayName = 'FieldTitle';\n\n/**\n * Supplementary hint text rendered below the input to guide the user, with support for inline anchor links.\n *\n * @example\n * import { FieldDescription } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldDescription>Must be at least 8 characters.</FieldDescription>\n */\nconst FieldDescription = memo(({ className, ...props }: React.ComponentProps<'p'>) => {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n // biome-ignore lint/security/noSecrets: true\n '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',\n className\n )}\n {...props}\n />\n );\n});\nFieldDescription.displayName = 'FieldDescription';\n\n/**\n * Props for {@link FieldNote}.\n */\ntype FieldNoteProps = React.ComponentProps<'div'> & {\n /**\n * When `false` the note is not rendered at all; useful for conditional display without wrapper conditionals.\n * @default true\n */\n isShow?: boolean;\n};\n\n/**\n * Highlighted informational callout box with an info icon, shown below a field to surface contextual guidance.\n *\n * @example\n * import { FieldNote } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldNote isShow={isDraftMode}>Changes are saved automatically in draft mode.</FieldNote>\n */\nconst FieldNote = memo(({ isShow = true, className, children, ...props }: FieldNoteProps) => {\n if (isShow === false) return null;\n return (\n <div\n data-slot=\"field-note\"\n className={cn(\n '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',\n className\n )}\n {...props}\n >\n <InfoIcon size={12} className=\"mt-0.5 shrink-0 text-primary/70\" />\n <span>{children}</span>\n </div>\n );\n});\nFieldNote.displayName = 'FieldNote';\n\n/**\n * Props for {@link FieldTooltip}.\n */\ntype FieldTooltipProps = {\n /** Text content displayed inside the tooltip when the help icon is hovered or focused. */\n tooltip: string;\n};\n\n/**\n * Small help-circle icon button that reveals a tooltip with additional field context on hover or focus.\n *\n * @example\n * import { FieldTooltip } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldLabel>\n * Password <FieldTooltip tooltip=\"Use at least one uppercase letter and one number.\" />\n * </FieldLabel>\n */\nconst FieldTooltip = memo(({ tooltip }: FieldTooltipProps) => {\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n tabIndex={-1}\n className=\"inline-flex cursor-default items-center text-text-positive-weak/70 hover:text-text-positive focus:outline-none\"\n >\n <HelpCircleIcon size={13} aria-hidden=\"true\" />\n <span className=\"sr-only\">Thêm thông tin</span>\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"top\" className=\"max-w-xs text-balance\">\n {tooltip}\n </TooltipContent>\n </Tooltip>\n );\n});\nFieldTooltip.displayName = 'FieldTooltip';\n\n/**\n * Visual divider row that optionally displays a centered text label, used to separate logical sections within a `FieldGroup`.\n *\n * @example\n * import { FieldSeparator } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldSeparator>or</FieldSeparator>\n */\nconst FieldSeparator = memo(({ children, className, ...props }: React.PropsWithChildren<React.ComponentProps<'div'>>) => {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className)}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span className=\"relative mx-auto block w-fit bg-background px-2 text-text-positive-weak\" data-slot=\"field-separator-content\">\n {children}\n </span>\n )}\n </div>\n );\n});\nFieldSeparator.displayName = 'FieldSeparator';\n\n/**\n * Props for {@link FieldError}.\n */\ntype FieldErrorProps = React.ComponentProps<'div'> & {\n errors?: Array<{ code?: string; message?: string } | undefined>;\n requiredMessage?: string;\n};\n\nconst FieldError = memo(({ className, children, errors, requiredMessage = 'Trường này là bắt buộc', ...props }: FieldErrorProps) => {\n const content = useMemo(() => {\n const resolve = (error: { code?: string; message?: string }) => (error.code === 'invalid_type' ? requiredMessage : error.message);\n\n if (children) {\n return children;\n }\n\n if (!errors) {\n return null;\n }\n\n if (errors?.length === 1 && errors[0]?.message) {\n return (\n <div className=\"flex flex-row items-center justify-start gap-x-0.5\">\n <p>{resolve(errors[0])}</p>\n </div>\n );\n }\n\n return (\n <ul className=\"flex list-none flex-col\">\n {errors.map(error => {\n if (typeof error === 'string') return <li key={error}>{error}</li>;\n if (!error?.message) return null;\n return <li key={error.code ?? error.message}>{resolve(error)}</li>;\n })}\n </ul>\n );\n }, [children, errors, requiredMessage]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div role=\"alert\" data-slot=\"field-error\" className={cn('w-full font-medium text-danger-strong text-xs', className)} {...props}>\n {content}\n </div>\n );\n});\nFieldError.displayName = 'FieldError';\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldNote,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldContentMain,\n FieldTitle,\n FieldTooltip,\n};\n"],"mappings":"4PAcA,SAAS,EAAM,CAAE,YAAW,WAAU,GAAG,GAA2D,CAClG,OACE,EAAA,EAAA,KAAA,CAACA,EAAAA,MAAe,KAAhB,CACE,YAAU,QACV,WAAA,EAAA,EA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C,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,0EAA0E,YAAU,0BACjG,UACG,CAAA,CAEL,GAER,EACD,EAAe,YAAc,iBAU7B,MAAM,GAAA,EAAA,EAAA,KAAA,EAAmB,CAAE,YAAW,WAAU,SAAQ,kBAAkB,yBAA0B,GAAG,KAA6B,CAClI,IAAM,GAAA,EAAA,EAAA,QAAA,KAAwB,CAC5B,IAAM,EAAW,GAAgD,EAAM,OAAS,eAAiB,EAAkB,EAAM,QAkBzH,OAhBI,IAIC,EAID,GAAQ,SAAW,GAAK,EAAO,EAAE,EAAE,SAEnC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,+DACb,EAAA,EAAA,IAAA,CAAC,IAAD,CAAA,SAAI,EAAQ,EAAO,EAAE,CAAK,CAAA,CACvB,CAAA,GAKP,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,mCACX,EAAO,IAAI,GACN,OAAO,GAAU,UAAiB,EAAA,EAAA,IAAA,CAAC,KAAD,CAAA,SAAiB,CAAU,EAAlB,CAAkB,EAC5D,GAAO,SACL,EAAA,EAAA,IAAA,CAAC,KAAD,CAAA,SAAuC,EAAQ,CAAK,CAAM,EAAjD,EAAM,MAAQ,EAAM,OAA6B,EADrC,IAE7B,CACC,CAAA,EAlBG,KAoBX,EAAG,CAAC,EAAU,EAAQ,CAAe,CAAC,EAMtC,OAJK,GAKH,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,KAAK,QAAQ,YAAU,cAAc,WAAA,EAAA,EAAA,GAAA,CAAc,gDAAiD,CAAS,EAAG,GAAI,WACtH,CACE,CAAA,EANE,IAQX,CAAC,EACD,EAAW,YAAc"}
|
|
1
|
+
{"version":3,"file":"field-BSLi-P0Q.cjs","names":["LabelPrimitive","InfoIcon","Tooltip","TooltipTrigger","HelpCircleIcon","TooltipContent","Separator"],"sources":["../packages/components/features/tanstack-form/components/ui/label.tsx","../packages/components/features/tanstack-form/components/ui/field.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Label as LabelPrimitive } from 'radix-ui';\n\n/**\n * Form field label that automatically renders a \"Required\" badge when the field is marked aria-required.\n *\n * @example\n * import { Label } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <Label htmlFor=\"email\">Email address</Label>\n */\nfunction Label({ className, children, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'text-text-positive',\n 'flex w-full items-center justify-between',\n 'select-none font-medium text-sm/6 leading-none',\n 'group-data-[disabled=true]:pointer-events-none',\n 'group-data-[disabled=true]:opacity-50',\n 'peer-disabled:cursor-not-allowed',\n 'peer-disabled:opacity-50',\n 'aria-required:*:data-[slot=required-indicator]:inline-block',\n className\n )}\n {...props}\n >\n <span className=\"flex items-center gap-1\">{children}</span>\n <span\n data-slot=\"required-indicator\"\n className=\"hidden shrink-0 rounded-lg bg-danger-strong px-1.5 py-1 font-semibold text-[11px] leading-none text-white\"\n >\n Bắt buộc\n </span>\n </LabelPrimitive.Root>\n );\n}\n\nexport { Label };\n","'use client';\n\nimport { memo, useMemo } from 'react';\n\nimport { HelpCircleIcon, InfoIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Separator } from '@/components/ui/separator';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Label } from './label';\n\nconst fieldVariants = cva('group/field flex w-full gap-2 data-[invalid=true]:text-danger *:data-[slot=field-content]:gap-0', {\n variants: {\n orientation: {\n vertical: ['flex-col *:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center gap-4',\n '*:data-[slot=field-content]:basis-1/2',\n '*:data-[slot=field-content-main]:flex-1',\n '*:data-[slot=field-label]:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start',\n 'has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full [&>.sr-only]:w-auto',\n '@md/field-group:flex-row',\n '@md/field-group:items-center',\n '@md/field-group:gap-4',\n '@md/field-group:*:w-auto',\n '@md/field-group:*:data-[slot=field-content]:basis-1/2',\n '@md/field-group:*:data-[slot=field-content-main]:basis-1/2',\n '@md/field-group:*:data-[slot=field-label]:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start',\n '@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\n/**\n * Outermost `<fieldset>` wrapper that stacks multiple `Field` rows with consistent vertical spacing.\n *\n * @example\n * import { FieldSet } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldSet>\n * <Field><FieldLabel>Name</FieldLabel><FieldContent><input /></FieldContent></Field>\n * </FieldSet>\n */\nconst FieldSet = memo(({ className, ...props }: React.ComponentProps<'fieldset'>) => {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn('flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3', className)}\n {...props}\n />\n );\n});\nFieldSet.displayName = 'FieldSet';\n\n/**\n * Props for {@link FieldLegend}.\n */\ntype FieldLegendProps = React.ComponentProps<'legend'> & {\n /**\n * Visual weight of the legend text.\n * - `'legend'` — larger base-size text (section heading).\n * - `'label'` — smaller label-size text (matches field label weight).\n * @default 'legend'\n */\n variant?: 'legend' | 'label';\n};\n\n/**\n * `<legend>` element for a `<fieldset>`, styled as either a section heading or a compact label.\n *\n * @example\n * import { FieldSet, FieldLegend } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldSet>\n * <FieldLegend variant=\"legend\">Personal details</FieldLegend>\n * </FieldSet>\n */\nconst FieldLegend = memo(({ className, variant = 'legend', ...props }: FieldLegendProps) => {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn('mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base', className)}\n {...props}\n />\n );\n});\nFieldLegend.displayName = 'FieldLegend';\n\n/**\n * Container `<div>` that groups a set of `Field` rows with container-query support for responsive layouts.\n *\n * @example\n * import { FieldGroup } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldGroup>\n * <Field>…</Field>\n * <Field>…</Field>\n * </FieldGroup>\n */\nconst FieldGroup = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group',\n 'flex flex-col gap-7 pt-4',\n 'data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4',\n className\n )}\n {...props}\n />\n );\n});\nFieldGroup.displayName = 'FieldGroup';\n\n/**\n * Single form field row that arranges label, input, and meta elements with configurable orientation.\n *\n * @example\n * import { Field } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <Field orientation=\"horizontal\">\n * <FieldLabel htmlFor=\"username\">Username</FieldLabel>\n * <FieldContent><input id=\"username\" /></FieldContent>\n * </Field>\n */\nconst Field = memo(({ className, orientation = 'vertical', ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) => {\n return <div data-slot=\"field\" data-orientation={orientation} className={cn(fieldVariants({ orientation }), className)} {...props} />;\n});\nField.displayName = 'Field';\n\n/**\n * Flex column wrapper that houses the primary input control together with description and error slots.\n *\n * @example\n * import { FieldContent } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldContent>\n * <input type=\"text\" />\n * <FieldDescription>Enter your full name.</FieldDescription>\n * </FieldContent>\n */\nconst FieldContent = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"field-content\" className={cn('group/field-content flex flex-col gap-1.5 leading-snug', className)} {...props} />;\n});\nFieldContent.displayName = 'FieldContent';\n\n/**\n * Positioned wrapper for the main input element that enables absolutely-placed adornments (icons, spinners).\n *\n * @example\n * import { FieldContentMain } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldContentMain>\n * <input type=\"text\" className=\"pr-8\" />\n * <SearchIcon className=\"absolute right-2 top-2\" />\n * </FieldContentMain>\n */\nconst FieldContentMain = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"field-content-main\" className={cn('relative', className)} {...props} />;\n});\nFieldContentMain.displayName = 'FieldContentMain';\n\n/**\n * Styled `<label>` element for a `Field`, extending the base `Label` with field-group-aware spacing and border states.\n *\n * @example\n * import { FieldLabel } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldLabel htmlFor=\"email\" aria-required>Email</FieldLabel>\n */\nconst FieldLabel = memo(({ className, ...props }: React.ComponentProps<typeof Label>) => {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label min-h-6 gap-1 font-medium leading-snug',\n 'has-[>[data-slot=field]]:w-full',\n 'has-[>[data-slot=field]]:flex-col',\n 'has-[>[data-slot=field]]:rounded-md',\n 'has-[>[data-slot=field]]:border',\n 'has-[>[data-slot=field]]:border-border',\n 'has-data-[state=checked]:border-primary',\n '*:data-[slot=field]:p-4 group-data-[disabled=true]/field:opacity-50',\n className\n )}\n {...props}\n />\n );\n});\nFieldLabel.displayName = 'FieldLabel';\n\n/**\n * Inline title element (non-`<label>`) for fields whose label cannot be a native `<label>`, such as custom checkbox groups.\n *\n * @example\n * import { FieldTitle } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldTitle>Notification preferences</FieldTitle>\n */\nconst FieldTitle = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-label\"\n className={cn('flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50', className)}\n {...props}\n />\n );\n});\nFieldTitle.displayName = 'FieldTitle';\n\n/**\n * Supplementary hint text rendered below the input to guide the user, with support for inline anchor links.\n *\n * @example\n * import { FieldDescription } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldDescription>Must be at least 8 characters.</FieldDescription>\n */\nconst FieldDescription = memo(({ className, ...props }: React.ComponentProps<'p'>) => {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n // biome-ignore lint/security/noSecrets: true\n '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',\n className\n )}\n {...props}\n />\n );\n});\nFieldDescription.displayName = 'FieldDescription';\n\n/**\n * Props for {@link FieldNote}.\n */\ntype FieldNoteProps = React.ComponentProps<'div'> & {\n /**\n * When `false` the note is not rendered at all; useful for conditional display without wrapper conditionals.\n * @default true\n */\n isShow?: boolean;\n};\n\n/**\n * Highlighted informational callout box with an info icon, shown below a field to surface contextual guidance.\n *\n * @example\n * import { FieldNote } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldNote isShow={isDraftMode}>Changes are saved automatically in draft mode.</FieldNote>\n */\nconst FieldNote = memo(({ isShow = true, className, children, ...props }: FieldNoteProps) => {\n if (isShow === false) return null;\n return (\n <div\n data-slot=\"field-note\"\n className={cn(\n '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 mt-1',\n className\n )}\n {...props}\n >\n <InfoIcon size={12} className=\"mt-0.5 shrink-0 text-primary/70\" />\n <span>{children}</span>\n </div>\n );\n});\nFieldNote.displayName = 'FieldNote';\n\n/**\n * Props for {@link FieldTooltip}.\n */\ntype FieldTooltipProps = {\n /** Text content displayed inside the tooltip when the help icon is hovered or focused. */\n tooltip: string;\n};\n\n/**\n * Small help-circle icon button that reveals a tooltip with additional field context on hover or focus.\n *\n * @example\n * import { FieldTooltip } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldLabel>\n * Password <FieldTooltip tooltip=\"Use at least one uppercase letter and one number.\" />\n * </FieldLabel>\n */\nconst FieldTooltip = memo(({ tooltip }: FieldTooltipProps) => {\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n tabIndex={-1}\n className=\"inline-flex cursor-default items-center text-text-positive-weak/70 hover:text-text-positive focus:outline-none\"\n >\n <HelpCircleIcon size={13} aria-hidden=\"true\" />\n <span className=\"sr-only\">Thêm thông tin</span>\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"top\" className=\"max-w-xs text-balance\">\n {tooltip}\n </TooltipContent>\n </Tooltip>\n );\n});\nFieldTooltip.displayName = 'FieldTooltip';\n\n/**\n * Visual divider row that optionally displays a centered text label, used to separate logical sections within a `FieldGroup`.\n *\n * @example\n * import { FieldSeparator } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldSeparator>or</FieldSeparator>\n */\nconst FieldSeparator = memo(({ children, className, ...props }: React.PropsWithChildren<React.ComponentProps<'div'>>) => {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className)}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span className=\"relative mx-auto block w-fit bg-background px-2 text-text-positive-weak\" data-slot=\"field-separator-content\">\n {children}\n </span>\n )}\n </div>\n );\n});\nFieldSeparator.displayName = 'FieldSeparator';\n\n/**\n * Props for {@link FieldError}.\n */\ntype FieldErrorProps = React.ComponentProps<'div'> & {\n errors?: Array<{ code?: string; message?: string } | undefined>;\n requiredMessage?: string;\n};\n\nconst FieldError = memo(({ className, children, errors, requiredMessage = 'Trường này là bắt buộc', ...props }: FieldErrorProps) => {\n const content = useMemo(() => {\n const resolve = (error: { code?: string; message?: string }) => (error.code === 'invalid_type' ? requiredMessage : error.message);\n\n if (children) {\n return children;\n }\n\n if (!errors) {\n return null;\n }\n\n if (errors?.length === 1 && errors[0]?.message) {\n return (\n <div className=\"flex flex-row items-center justify-start gap-x-0.5\">\n <p>{resolve(errors[0])}</p>\n </div>\n );\n }\n\n return (\n <ul className=\"flex list-none flex-col\">\n {errors.map(error => {\n if (typeof error === 'string') return <li key={error}>{error}</li>;\n if (!error?.message) return null;\n return <li key={error.code ?? error.message}>{resolve(error)}</li>;\n })}\n </ul>\n );\n }, [children, errors, requiredMessage]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div role=\"alert\" data-slot=\"field-error\" className={cn('w-full font-medium text-danger-strong text-xs', className)} {...props}>\n {content}\n </div>\n );\n});\nFieldError.displayName = 'FieldError';\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldNote,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldContentMain,\n FieldTitle,\n FieldTooltip,\n};\n"],"mappings":"4PAcA,SAAS,EAAM,CAAE,YAAW,WAAU,GAAG,GAA2D,CAClG,OACE,EAAA,EAAA,KAAA,CAACA,EAAAA,MAAe,KAAhB,CACE,YAAU,QACV,WAAA,EAAA,EAAA,GAAA,CACE,qBACA,2CACA,iDACA,iDACA,wCACA,mCACA,2BACA,8DACA,CACF,EACA,GAAI,WAbN,EAeE,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,0BAA2B,UAAe,CAAA,GAC1D,EAAA,EAAA,IAAA,CAAC,OAAD,CACE,YAAU,qBACV,UAAU,qHACX,UAEK,CAAA,CACa,GAEzB,CC1BA,MAAM,GAAA,EAAA,EAAA,IAAA,CAAoB,kGAAmG,CAC3H,SAAU,CACR,YAAa,CACX,SAAU,CAAC,uCAAuC,EAClD,WAAY,CACV,8BACA,wCACA,0CACA,sCACA,+CACA,yEACF,EACA,WAAY,CACV,wCACA,2BACA,+BACA,wBACA,2BACA,wDACA,6DACA,sDACA,+DACA,yFACF,CACF,CACF,EACA,gBAAiB,CACf,YAAa,UACf,CACF,CAAC,EAYK,GAAA,EAAA,EAAA,KAAA,EAAiB,CAAE,YAAW,GAAG,MAEnC,EAAA,EAAA,IAAA,CAAC,WAAD,CACE,YAAU,YACV,WAAA,EAA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AiB,CAAU,EAAlB,CAAkB,EAC5D,GAAO,SACL,EAAA,EAAA,IAAA,CAAC,KAAD,CAAA,SAAuC,EAAQ,CAAK,CAAM,EAAjD,EAAM,MAAQ,EAAM,OAA6B,EADrC,IAE7B,CACC,CAAA,EAlBG,KAoBX,EAAG,CAAC,EAAU,EAAQ,CAAe,CAAC,EAMtC,OAJK,GAKH,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,KAAK,QAAQ,YAAU,cAAc,WAAA,EAAA,EAAA,GAAA,CAAc,gDAAiD,CAAS,EAAG,GAAI,WACtH,CACE,CAAA,EANE,IAQX,CAAC,EACD,EAAW,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Tooltip as e,TooltipContent as t,TooltipTrigger as n}from"./ui/tooltip.mjs";import{Separator as r}from"./ui/separator.mjs";import{HelpCircleIcon as i,InfoIcon as a}from"lucide-react";import{memo as o,useMemo as s}from"react";import{cn as c}from"@customafk/react-toolkit/utils";import{cva as l}from"class-variance-authority";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{Label as f}from"radix-ui";function p({className:e,children:t,...n}){return d(f.Root,{"data-slot":`label`,className:c(`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:[u(`span`,{className:`flex items-center gap-1`,children:t}),u(`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 m=l(`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`}}),h=o(({className:e,...t})=>u(`fieldset`,{"data-slot":`field-set`,className:c(`flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));h.displayName=`FieldSet`;const g=o(({className:e,variant:t=`legend`,...n})=>u(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:c(`mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n}));g.displayName=`FieldLegend`;const _=o(({className:e,...t})=>u(`div`,{"data-slot":`field-group`,className:c(`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}));_.displayName=`FieldGroup`;const v=o(({className:e,orientation:t=`vertical`,...n})=>u(`div`,{"data-slot":`field`,"data-orientation":t,className:c(m({orientation:t}),e),...n}));v.displayName=`Field`;const y=o(({className:e,...t})=>u(`div`,{"data-slot":`field-content`,className:c(`group/field-content flex flex-col gap-1.5 leading-snug`,e),...t}));y.displayName=`FieldContent`;const b=o(({className:e,...t})=>u(`div`,{"data-slot":`field-content-main`,className:c(`relative`,e),...t}));b.displayName=`FieldContentMain`;const x=o(({className:e,...t})=>u(p,{"data-slot":`field-label`,className:c(`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}));x.displayName=`FieldLabel`;const S=o(({className:e,...t})=>u(`div`,{"data-slot":`field-label`,className:c(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));S.displayName=`FieldTitle`;const C=o(({className:e,...t})=>u(`p`,{"data-slot":`field-description`,className:c(`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}));C.displayName=`FieldDescription`;const w=o(({isShow:e=!0,className:t,children:n,...r})=>e===!1?null:d(`div`,{"data-slot":`field-note`,className:c(`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:[u(a,{size:12,className:`mt-0.5 shrink-0 text-primary/70`}),u(`span`,{children:n})]}));w.displayName=`FieldNote`;const T=o(({tooltip:r})=>d(e,{children:[u(n,{asChild:!0,children:d(`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:[u(i,{size:13,"aria-hidden":`true`}),u(`span`,{className:`sr-only`,children:`Thêm thông tin`})]})}),u(t,{side:`top`,className:`max-w-xs text-balance`,children:r})]}));T.displayName=`FieldTooltip`;const E=o(({children:e,className:t,...n})=>d(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:c(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,t),...n,children:[u(r,{className:`absolute inset-0 top-1/2`}),e&&u(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));E.displayName=`FieldSeparator`;const D=o(({className:e,children:t,errors:n,requiredMessage:r=`Trường này là bắt buộc`,...i})=>{let a=s(()=>{let e=e=>e.code===`invalid_type`?r:e.message;return t||(n?n?.length===1&&n[0]?.message?u(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:u(`p`,{children:e(n[0])})}):u(`ul`,{className:`flex list-none flex-col`,children:n.map(t=>typeof t==`string`?u(`li`,{children:t},t):t?.message?u(`li`,{children:e(t)},t.code??t.message):null)}):null)},[t,n,r]);return a?u(`div`,{role:`alert`,"data-slot":`field-error`,className:c(`w-full font-medium text-danger-strong text-xs`,e),...i,children:a}):null});D.displayName=`FieldError`;export{v as Field,y as FieldContent,b as FieldContentMain,C as FieldDescription,D as FieldError,_ as FieldGroup,x as FieldLabel,g as FieldLegend,w as FieldNote,E as FieldSeparator,S as FieldTitle,T as FieldTooltip};
|
|
2
|
-
//# sourceMappingURL=field-
|
|
1
|
+
import{Tooltip as e,TooltipContent as t,TooltipTrigger as n}from"./ui/tooltip.mjs";import{Separator as r}from"./ui/separator.mjs";import{HelpCircleIcon as i,InfoIcon as a}from"lucide-react";import{memo as o,useMemo as s}from"react";import{cn as c}from"@customafk/react-toolkit/utils";import{cva as l}from"class-variance-authority";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{Label as f}from"radix-ui";function p({className:e,children:t,...n}){return d(f.Root,{"data-slot":`label`,className:c(`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:[u(`span`,{className:`flex items-center gap-1`,children:t}),u(`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 m=l(`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`}}),h=o(({className:e,...t})=>u(`fieldset`,{"data-slot":`field-set`,className:c(`flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));h.displayName=`FieldSet`;const g=o(({className:e,variant:t=`legend`,...n})=>u(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:c(`mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n}));g.displayName=`FieldLegend`;const _=o(({className:e,...t})=>u(`div`,{"data-slot":`field-group`,className:c(`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}));_.displayName=`FieldGroup`;const v=o(({className:e,orientation:t=`vertical`,...n})=>u(`div`,{"data-slot":`field`,"data-orientation":t,className:c(m({orientation:t}),e),...n}));v.displayName=`Field`;const y=o(({className:e,...t})=>u(`div`,{"data-slot":`field-content`,className:c(`group/field-content flex flex-col gap-1.5 leading-snug`,e),...t}));y.displayName=`FieldContent`;const b=o(({className:e,...t})=>u(`div`,{"data-slot":`field-content-main`,className:c(`relative`,e),...t}));b.displayName=`FieldContentMain`;const x=o(({className:e,...t})=>u(p,{"data-slot":`field-label`,className:c(`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}));x.displayName=`FieldLabel`;const S=o(({className:e,...t})=>u(`div`,{"data-slot":`field-label`,className:c(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));S.displayName=`FieldTitle`;const C=o(({className:e,...t})=>u(`p`,{"data-slot":`field-description`,className:c(`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}));C.displayName=`FieldDescription`;const w=o(({isShow:e=!0,className:t,children:n,...r})=>e===!1?null:d(`div`,{"data-slot":`field-note`,className:c(`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 mt-1`,t),...r,children:[u(a,{size:12,className:`mt-0.5 shrink-0 text-primary/70`}),u(`span`,{children:n})]}));w.displayName=`FieldNote`;const T=o(({tooltip:r})=>d(e,{children:[u(n,{asChild:!0,children:d(`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:[u(i,{size:13,"aria-hidden":`true`}),u(`span`,{className:`sr-only`,children:`Thêm thông tin`})]})}),u(t,{side:`top`,className:`max-w-xs text-balance`,children:r})]}));T.displayName=`FieldTooltip`;const E=o(({children:e,className:t,...n})=>d(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:c(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,t),...n,children:[u(r,{className:`absolute inset-0 top-1/2`}),e&&u(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));E.displayName=`FieldSeparator`;const D=o(({className:e,children:t,errors:n,requiredMessage:r=`Trường này là bắt buộc`,...i})=>{let a=s(()=>{let e=e=>e.code===`invalid_type`?r:e.message;return t||(n?n?.length===1&&n[0]?.message?u(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:u(`p`,{children:e(n[0])})}):u(`ul`,{className:`flex list-none flex-col`,children:n.map(t=>typeof t==`string`?u(`li`,{children:t},t):t?.message?u(`li`,{children:e(t)},t.code??t.message):null)}):null)},[t,n,r]);return a?u(`div`,{role:`alert`,"data-slot":`field-error`,className:c(`w-full font-medium text-danger-strong text-xs`,e),...i,children:a}):null});D.displayName=`FieldError`;export{v as Field,y as FieldContent,b as FieldContentMain,C as FieldDescription,D as FieldError,_ as FieldGroup,x as FieldLabel,g as FieldLegend,w as FieldNote,E as FieldSeparator,S as FieldTitle,T as FieldTooltip};
|
|
2
|
+
//# sourceMappingURL=field-V2DoD8qL.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-BKyUqvzh.mjs","names":["Label","LabelPrimitive","Label","Tooltip","Separator"],"sources":["../packages/components/features/tanstack-form/components/ui/label.tsx","../packages/components/features/tanstack-form/components/ui/field.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Label as LabelPrimitive } from 'radix-ui';\n\n/**\n * Form field label that automatically renders a \"Required\" badge when the field is marked aria-required.\n *\n * @example\n * import { Label } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <Label htmlFor=\"email\">Email address</Label>\n */\nfunction Label({ className, children, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'text-text-positive',\n 'flex w-full items-center justify-between',\n 'select-none font-medium text-sm/6 leading-none',\n 'group-data-[disabled=true]:pointer-events-none',\n 'group-data-[disabled=true]:opacity-50',\n 'peer-disabled:cursor-not-allowed',\n 'peer-disabled:opacity-50',\n 'aria-required:*:data-[slot=required-indicator]:inline-block',\n className\n )}\n {...props}\n >\n <span className=\"flex items-center gap-1\">{children}</span>\n <span\n data-slot=\"required-indicator\"\n className=\"hidden shrink-0 rounded-lg bg-danger-strong px-1.5 py-1 font-semibold text-[11px] leading-none text-white\"\n >\n Bắt buộc\n </span>\n </LabelPrimitive.Root>\n );\n}\n\nexport { Label };\n","'use client';\n\nimport { memo, useMemo } from 'react';\n\nimport { HelpCircleIcon, InfoIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Separator } from '@/components/ui/separator';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Label } from './label';\n\nconst fieldVariants = cva('group/field flex w-full gap-2 data-[invalid=true]:text-danger *:data-[slot=field-content]:gap-0', {\n variants: {\n orientation: {\n vertical: ['flex-col *:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center gap-4',\n '*:data-[slot=field-content]:basis-1/2',\n '*:data-[slot=field-content-main]:flex-1',\n '*:data-[slot=field-label]:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start',\n 'has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full [&>.sr-only]:w-auto',\n '@md/field-group:flex-row',\n '@md/field-group:items-center',\n '@md/field-group:gap-4',\n '@md/field-group:*:w-auto',\n '@md/field-group:*:data-[slot=field-content]:basis-1/2',\n '@md/field-group:*:data-[slot=field-content-main]:basis-1/2',\n '@md/field-group:*:data-[slot=field-label]:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start',\n '@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\n/**\n * Outermost `<fieldset>` wrapper that stacks multiple `Field` rows with consistent vertical spacing.\n *\n * @example\n * import { FieldSet } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldSet>\n * <Field><FieldLabel>Name</FieldLabel><FieldContent><input /></FieldContent></Field>\n * </FieldSet>\n */\nconst FieldSet = memo(({ className, ...props }: React.ComponentProps<'fieldset'>) => {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn('flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3', className)}\n {...props}\n />\n );\n});\nFieldSet.displayName = 'FieldSet';\n\n/**\n * Props for {@link FieldLegend}.\n */\ntype FieldLegendProps = React.ComponentProps<'legend'> & {\n /**\n * Visual weight of the legend text.\n * - `'legend'` — larger base-size text (section heading).\n * - `'label'` — smaller label-size text (matches field label weight).\n * @default 'legend'\n */\n variant?: 'legend' | 'label';\n};\n\n/**\n * `<legend>` element for a `<fieldset>`, styled as either a section heading or a compact label.\n *\n * @example\n * import { FieldSet, FieldLegend } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldSet>\n * <FieldLegend variant=\"legend\">Personal details</FieldLegend>\n * </FieldSet>\n */\nconst FieldLegend = memo(({ className, variant = 'legend', ...props }: FieldLegendProps) => {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn('mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base', className)}\n {...props}\n />\n );\n});\nFieldLegend.displayName = 'FieldLegend';\n\n/**\n * Container `<div>` that groups a set of `Field` rows with container-query support for responsive layouts.\n *\n * @example\n * import { FieldGroup } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldGroup>\n * <Field>…</Field>\n * <Field>…</Field>\n * </FieldGroup>\n */\nconst FieldGroup = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group',\n 'flex flex-col gap-7 pt-4',\n 'data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4',\n className\n )}\n {...props}\n />\n );\n});\nFieldGroup.displayName = 'FieldGroup';\n\n/**\n * Single form field row that arranges label, input, and meta elements with configurable orientation.\n *\n * @example\n * import { Field } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <Field orientation=\"horizontal\">\n * <FieldLabel htmlFor=\"username\">Username</FieldLabel>\n * <FieldContent><input id=\"username\" /></FieldContent>\n * </Field>\n */\nconst Field = memo(({ className, orientation = 'vertical', ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) => {\n return <div data-slot=\"field\" data-orientation={orientation} className={cn(fieldVariants({ orientation }), className)} {...props} />;\n});\nField.displayName = 'Field';\n\n/**\n * Flex column wrapper that houses the primary input control together with description and error slots.\n *\n * @example\n * import { FieldContent } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldContent>\n * <input type=\"text\" />\n * <FieldDescription>Enter your full name.</FieldDescription>\n * </FieldContent>\n */\nconst FieldContent = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"field-content\" className={cn('group/field-content flex flex-col gap-1.5 leading-snug', className)} {...props} />;\n});\nFieldContent.displayName = 'FieldContent';\n\n/**\n * Positioned wrapper for the main input element that enables absolutely-placed adornments (icons, spinners).\n *\n * @example\n * import { FieldContentMain } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldContentMain>\n * <input type=\"text\" className=\"pr-8\" />\n * <SearchIcon className=\"absolute right-2 top-2\" />\n * </FieldContentMain>\n */\nconst FieldContentMain = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"field-content-main\" className={cn('relative', className)} {...props} />;\n});\nFieldContentMain.displayName = 'FieldContentMain';\n\n/**\n * Styled `<label>` element for a `Field`, extending the base `Label` with field-group-aware spacing and border states.\n *\n * @example\n * import { FieldLabel } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldLabel htmlFor=\"email\" aria-required>Email</FieldLabel>\n */\nconst FieldLabel = memo(({ className, ...props }: React.ComponentProps<typeof Label>) => {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label min-h-6 gap-1 font-medium leading-snug',\n 'has-[>[data-slot=field]]:w-full',\n 'has-[>[data-slot=field]]:flex-col',\n 'has-[>[data-slot=field]]:rounded-md',\n 'has-[>[data-slot=field]]:border',\n 'has-[>[data-slot=field]]:border-border',\n 'has-data-[state=checked]:border-primary',\n '*:data-[slot=field]:p-4 group-data-[disabled=true]/field:opacity-50',\n className\n )}\n {...props}\n />\n );\n});\nFieldLabel.displayName = 'FieldLabel';\n\n/**\n * Inline title element (non-`<label>`) for fields whose label cannot be a native `<label>`, such as custom checkbox groups.\n *\n * @example\n * import { FieldTitle } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldTitle>Notification preferences</FieldTitle>\n */\nconst FieldTitle = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-label\"\n className={cn('flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50', className)}\n {...props}\n />\n );\n});\nFieldTitle.displayName = 'FieldTitle';\n\n/**\n * Supplementary hint text rendered below the input to guide the user, with support for inline anchor links.\n *\n * @example\n * import { FieldDescription } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldDescription>Must be at least 8 characters.</FieldDescription>\n */\nconst FieldDescription = memo(({ className, ...props }: React.ComponentProps<'p'>) => {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n // biome-ignore lint/security/noSecrets: true\n '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',\n className\n )}\n {...props}\n />\n );\n});\nFieldDescription.displayName = 'FieldDescription';\n\n/**\n * Props for {@link FieldNote}.\n */\ntype FieldNoteProps = React.ComponentProps<'div'> & {\n /**\n * When `false` the note is not rendered at all; useful for conditional display without wrapper conditionals.\n * @default true\n */\n isShow?: boolean;\n};\n\n/**\n * Highlighted informational callout box with an info icon, shown below a field to surface contextual guidance.\n *\n * @example\n * import { FieldNote } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldNote isShow={isDraftMode}>Changes are saved automatically in draft mode.</FieldNote>\n */\nconst FieldNote = memo(({ isShow = true, className, children, ...props }: FieldNoteProps) => {\n if (isShow === false) return null;\n return (\n <div\n data-slot=\"field-note\"\n className={cn(\n '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',\n className\n )}\n {...props}\n >\n <InfoIcon size={12} className=\"mt-0.5 shrink-0 text-primary/70\" />\n <span>{children}</span>\n </div>\n );\n});\nFieldNote.displayName = 'FieldNote';\n\n/**\n * Props for {@link FieldTooltip}.\n */\ntype FieldTooltipProps = {\n /** Text content displayed inside the tooltip when the help icon is hovered or focused. */\n tooltip: string;\n};\n\n/**\n * Small help-circle icon button that reveals a tooltip with additional field context on hover or focus.\n *\n * @example\n * import { FieldTooltip } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldLabel>\n * Password <FieldTooltip tooltip=\"Use at least one uppercase letter and one number.\" />\n * </FieldLabel>\n */\nconst FieldTooltip = memo(({ tooltip }: FieldTooltipProps) => {\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n tabIndex={-1}\n className=\"inline-flex cursor-default items-center text-text-positive-weak/70 hover:text-text-positive focus:outline-none\"\n >\n <HelpCircleIcon size={13} aria-hidden=\"true\" />\n <span className=\"sr-only\">Thêm thông tin</span>\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"top\" className=\"max-w-xs text-balance\">\n {tooltip}\n </TooltipContent>\n </Tooltip>\n );\n});\nFieldTooltip.displayName = 'FieldTooltip';\n\n/**\n * Visual divider row that optionally displays a centered text label, used to separate logical sections within a `FieldGroup`.\n *\n * @example\n * import { FieldSeparator } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldSeparator>or</FieldSeparator>\n */\nconst FieldSeparator = memo(({ children, className, ...props }: React.PropsWithChildren<React.ComponentProps<'div'>>) => {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className)}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span className=\"relative mx-auto block w-fit bg-background px-2 text-text-positive-weak\" data-slot=\"field-separator-content\">\n {children}\n </span>\n )}\n </div>\n );\n});\nFieldSeparator.displayName = 'FieldSeparator';\n\n/**\n * Props for {@link FieldError}.\n */\ntype FieldErrorProps = React.ComponentProps<'div'> & {\n errors?: Array<{ code?: string; message?: string } | undefined>;\n requiredMessage?: string;\n};\n\nconst FieldError = memo(({ className, children, errors, requiredMessage = 'Trường này là bắt buộc', ...props }: FieldErrorProps) => {\n const content = useMemo(() => {\n const resolve = (error: { code?: string; message?: string }) => (error.code === 'invalid_type' ? requiredMessage : error.message);\n\n if (children) {\n return children;\n }\n\n if (!errors) {\n return null;\n }\n\n if (errors?.length === 1 && errors[0]?.message) {\n return (\n <div className=\"flex flex-row items-center justify-start gap-x-0.5\">\n <p>{resolve(errors[0])}</p>\n </div>\n );\n }\n\n return (\n <ul className=\"flex list-none flex-col\">\n {errors.map(error => {\n if (typeof error === 'string') return <li key={error}>{error}</li>;\n if (!error?.message) return null;\n return <li key={error.code ?? error.message}>{resolve(error)}</li>;\n })}\n </ul>\n );\n }, [children, errors, requiredMessage]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div role=\"alert\" data-slot=\"field-error\" className={cn('w-full font-medium text-danger-strong text-xs', className)} {...props}>\n {content}\n </div>\n );\n});\nFieldError.displayName = 'FieldError';\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldNote,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldContentMain,\n FieldTitle,\n FieldTooltip,\n};\n"],"mappings":"8ZAcA,SAASA,EAAM,CAAE,YAAW,WAAU,GAAG,GAA2D,CAClG,OACE,EAACC,EAAe,KAAhB,CACE,YAAU,QACV,UAAW,EACT,qBACA,2CACA,iDACA,iDACA,wCACA,mCACA,2BACA,8DACA,CACF,EACA,GAAI,WAbN,CAeE,EAAC,OAAD,CAAM,UAAU,0BAA2B,UAAe,CAAA,EAC1D,EAAC,OAAD,CACE,YAAU,qBACV,UAAU,qHACX,UAEK,CAAA,CACa,GAEzB,CC1BA,MAAM,EAAgB,EAAI,kGAAmG,CAC3H,SAAU,CACR,YAAa,CACX,SAAU,CAAC,uCAAuC,EAClD,WAAY,CACV,8BACA,wCACA,0CACA,sCACA,+CACA,yEACF,EACA,WAAY,CACV,wCACA,2BACA,+BACA,wBACA,2BACA,wDACA,6DACA,sDACA,+DACA,yFACF,CACF,CACF,EACA,gBAAiB,CACf,YAAa,UACf,CACF,CAAC,EAYK,EAAW,GAAM,CAAE,YAAW,GAAG,KAEnC,EAAC,WAAD,CACE,YAAU,YACV,UAAW,EAAG,mGAAoG,CAAS,EAC3H,GAAI,CACL,CAAA,CAEJ,EACD,EAAS,YAAc,WAyBvB,MAAM,EAAc,GAAM,CAAE,YAAW,UAAU,SAAU,GAAG,KAE1D,EAAC,SAAD,CACE,YAAU,eACV,eAAc,EACd,UAAW,EAAG,gFAAiF,CAAS,EACxG,GAAI,CACL,CAAA,CAEJ,EACD,EAAY,YAAc,cAa1B,MAAM,EAAa,GAAM,CAAE,YAAW,GAAG,KAErC,EAAC,MAAD,CACE,YAAU,cACV,UAAW,EACT,2CACA,2BACA,mEACA,CACF,EACA,GAAI,CACL,CAAA,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SAAuC,EAAQ,CAAK,CAAM,EAAjD,EAAM,MAAQ,EAAM,OAA6B,EADrC,IAE7B,CACC,CAAA,EAlBG,KAoBX,EAAG,CAAC,EAAU,EAAQ,CAAe,CAAC,EAMtC,OAJK,EAKH,EAAC,MAAD,CAAK,KAAK,QAAQ,YAAU,cAAc,UAAW,EAAG,gDAAiD,CAAS,EAAG,GAAI,WACtH,CACE,CAAA,EANE,IAQX,CAAC,EACD,EAAW,YAAc"}
|
|
1
|
+
{"version":3,"file":"field-V2DoD8qL.mjs","names":["Label","LabelPrimitive","Label","Tooltip","Separator"],"sources":["../packages/components/features/tanstack-form/components/ui/label.tsx","../packages/components/features/tanstack-form/components/ui/field.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Label as LabelPrimitive } from 'radix-ui';\n\n/**\n * Form field label that automatically renders a \"Required\" badge when the field is marked aria-required.\n *\n * @example\n * import { Label } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <Label htmlFor=\"email\">Email address</Label>\n */\nfunction Label({ className, children, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'text-text-positive',\n 'flex w-full items-center justify-between',\n 'select-none font-medium text-sm/6 leading-none',\n 'group-data-[disabled=true]:pointer-events-none',\n 'group-data-[disabled=true]:opacity-50',\n 'peer-disabled:cursor-not-allowed',\n 'peer-disabled:opacity-50',\n 'aria-required:*:data-[slot=required-indicator]:inline-block',\n className\n )}\n {...props}\n >\n <span className=\"flex items-center gap-1\">{children}</span>\n <span\n data-slot=\"required-indicator\"\n className=\"hidden shrink-0 rounded-lg bg-danger-strong px-1.5 py-1 font-semibold text-[11px] leading-none text-white\"\n >\n Bắt buộc\n </span>\n </LabelPrimitive.Root>\n );\n}\n\nexport { Label };\n","'use client';\n\nimport { memo, useMemo } from 'react';\n\nimport { HelpCircleIcon, InfoIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Separator } from '@/components/ui/separator';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Label } from './label';\n\nconst fieldVariants = cva('group/field flex w-full gap-2 data-[invalid=true]:text-danger *:data-[slot=field-content]:gap-0', {\n variants: {\n orientation: {\n vertical: ['flex-col *:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center gap-4',\n '*:data-[slot=field-content]:basis-1/2',\n '*:data-[slot=field-content-main]:flex-1',\n '*:data-[slot=field-label]:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start',\n 'has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full [&>.sr-only]:w-auto',\n '@md/field-group:flex-row',\n '@md/field-group:items-center',\n '@md/field-group:gap-4',\n '@md/field-group:*:w-auto',\n '@md/field-group:*:data-[slot=field-content]:basis-1/2',\n '@md/field-group:*:data-[slot=field-content-main]:basis-1/2',\n '@md/field-group:*:data-[slot=field-label]:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start',\n '@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\n/**\n * Outermost `<fieldset>` wrapper that stacks multiple `Field` rows with consistent vertical spacing.\n *\n * @example\n * import { FieldSet } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldSet>\n * <Field><FieldLabel>Name</FieldLabel><FieldContent><input /></FieldContent></Field>\n * </FieldSet>\n */\nconst FieldSet = memo(({ className, ...props }: React.ComponentProps<'fieldset'>) => {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn('flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3', className)}\n {...props}\n />\n );\n});\nFieldSet.displayName = 'FieldSet';\n\n/**\n * Props for {@link FieldLegend}.\n */\ntype FieldLegendProps = React.ComponentProps<'legend'> & {\n /**\n * Visual weight of the legend text.\n * - `'legend'` — larger base-size text (section heading).\n * - `'label'` — smaller label-size text (matches field label weight).\n * @default 'legend'\n */\n variant?: 'legend' | 'label';\n};\n\n/**\n * `<legend>` element for a `<fieldset>`, styled as either a section heading or a compact label.\n *\n * @example\n * import { FieldSet, FieldLegend } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldSet>\n * <FieldLegend variant=\"legend\">Personal details</FieldLegend>\n * </FieldSet>\n */\nconst FieldLegend = memo(({ className, variant = 'legend', ...props }: FieldLegendProps) => {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn('mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base', className)}\n {...props}\n />\n );\n});\nFieldLegend.displayName = 'FieldLegend';\n\n/**\n * Container `<div>` that groups a set of `Field` rows with container-query support for responsive layouts.\n *\n * @example\n * import { FieldGroup } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldGroup>\n * <Field>…</Field>\n * <Field>…</Field>\n * </FieldGroup>\n */\nconst FieldGroup = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group',\n 'flex flex-col gap-7 pt-4',\n 'data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4',\n className\n )}\n {...props}\n />\n );\n});\nFieldGroup.displayName = 'FieldGroup';\n\n/**\n * Single form field row that arranges label, input, and meta elements with configurable orientation.\n *\n * @example\n * import { Field } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <Field orientation=\"horizontal\">\n * <FieldLabel htmlFor=\"username\">Username</FieldLabel>\n * <FieldContent><input id=\"username\" /></FieldContent>\n * </Field>\n */\nconst Field = memo(({ className, orientation = 'vertical', ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) => {\n return <div data-slot=\"field\" data-orientation={orientation} className={cn(fieldVariants({ orientation }), className)} {...props} />;\n});\nField.displayName = 'Field';\n\n/**\n * Flex column wrapper that houses the primary input control together with description and error slots.\n *\n * @example\n * import { FieldContent } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldContent>\n * <input type=\"text\" />\n * <FieldDescription>Enter your full name.</FieldDescription>\n * </FieldContent>\n */\nconst FieldContent = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"field-content\" className={cn('group/field-content flex flex-col gap-1.5 leading-snug', className)} {...props} />;\n});\nFieldContent.displayName = 'FieldContent';\n\n/**\n * Positioned wrapper for the main input element that enables absolutely-placed adornments (icons, spinners).\n *\n * @example\n * import { FieldContentMain } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldContentMain>\n * <input type=\"text\" className=\"pr-8\" />\n * <SearchIcon className=\"absolute right-2 top-2\" />\n * </FieldContentMain>\n */\nconst FieldContentMain = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"field-content-main\" className={cn('relative', className)} {...props} />;\n});\nFieldContentMain.displayName = 'FieldContentMain';\n\n/**\n * Styled `<label>` element for a `Field`, extending the base `Label` with field-group-aware spacing and border states.\n *\n * @example\n * import { FieldLabel } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldLabel htmlFor=\"email\" aria-required>Email</FieldLabel>\n */\nconst FieldLabel = memo(({ className, ...props }: React.ComponentProps<typeof Label>) => {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label min-h-6 gap-1 font-medium leading-snug',\n 'has-[>[data-slot=field]]:w-full',\n 'has-[>[data-slot=field]]:flex-col',\n 'has-[>[data-slot=field]]:rounded-md',\n 'has-[>[data-slot=field]]:border',\n 'has-[>[data-slot=field]]:border-border',\n 'has-data-[state=checked]:border-primary',\n '*:data-[slot=field]:p-4 group-data-[disabled=true]/field:opacity-50',\n className\n )}\n {...props}\n />\n );\n});\nFieldLabel.displayName = 'FieldLabel';\n\n/**\n * Inline title element (non-`<label>`) for fields whose label cannot be a native `<label>`, such as custom checkbox groups.\n *\n * @example\n * import { FieldTitle } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldTitle>Notification preferences</FieldTitle>\n */\nconst FieldTitle = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-label\"\n className={cn('flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50', className)}\n {...props}\n />\n );\n});\nFieldTitle.displayName = 'FieldTitle';\n\n/**\n * Supplementary hint text rendered below the input to guide the user, with support for inline anchor links.\n *\n * @example\n * import { FieldDescription } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldDescription>Must be at least 8 characters.</FieldDescription>\n */\nconst FieldDescription = memo(({ className, ...props }: React.ComponentProps<'p'>) => {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n // biome-ignore lint/security/noSecrets: true\n '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',\n className\n )}\n {...props}\n />\n );\n});\nFieldDescription.displayName = 'FieldDescription';\n\n/**\n * Props for {@link FieldNote}.\n */\ntype FieldNoteProps = React.ComponentProps<'div'> & {\n /**\n * When `false` the note is not rendered at all; useful for conditional display without wrapper conditionals.\n * @default true\n */\n isShow?: boolean;\n};\n\n/**\n * Highlighted informational callout box with an info icon, shown below a field to surface contextual guidance.\n *\n * @example\n * import { FieldNote } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldNote isShow={isDraftMode}>Changes are saved automatically in draft mode.</FieldNote>\n */\nconst FieldNote = memo(({ isShow = true, className, children, ...props }: FieldNoteProps) => {\n if (isShow === false) return null;\n return (\n <div\n data-slot=\"field-note\"\n className={cn(\n '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 mt-1',\n className\n )}\n {...props}\n >\n <InfoIcon size={12} className=\"mt-0.5 shrink-0 text-primary/70\" />\n <span>{children}</span>\n </div>\n );\n});\nFieldNote.displayName = 'FieldNote';\n\n/**\n * Props for {@link FieldTooltip}.\n */\ntype FieldTooltipProps = {\n /** Text content displayed inside the tooltip when the help icon is hovered or focused. */\n tooltip: string;\n};\n\n/**\n * Small help-circle icon button that reveals a tooltip with additional field context on hover or focus.\n *\n * @example\n * import { FieldTooltip } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldLabel>\n * Password <FieldTooltip tooltip=\"Use at least one uppercase letter and one number.\" />\n * </FieldLabel>\n */\nconst FieldTooltip = memo(({ tooltip }: FieldTooltipProps) => {\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n tabIndex={-1}\n className=\"inline-flex cursor-default items-center text-text-positive-weak/70 hover:text-text-positive focus:outline-none\"\n >\n <HelpCircleIcon size={13} aria-hidden=\"true\" />\n <span className=\"sr-only\">Thêm thông tin</span>\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"top\" className=\"max-w-xs text-balance\">\n {tooltip}\n </TooltipContent>\n </Tooltip>\n );\n});\nFieldTooltip.displayName = 'FieldTooltip';\n\n/**\n * Visual divider row that optionally displays a centered text label, used to separate logical sections within a `FieldGroup`.\n *\n * @example\n * import { FieldSeparator } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <FieldSeparator>or</FieldSeparator>\n */\nconst FieldSeparator = memo(({ children, className, ...props }: React.PropsWithChildren<React.ComponentProps<'div'>>) => {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className)}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span className=\"relative mx-auto block w-fit bg-background px-2 text-text-positive-weak\" data-slot=\"field-separator-content\">\n {children}\n </span>\n )}\n </div>\n );\n});\nFieldSeparator.displayName = 'FieldSeparator';\n\n/**\n * Props for {@link FieldError}.\n */\ntype FieldErrorProps = React.ComponentProps<'div'> & {\n errors?: Array<{ code?: string; message?: string } | undefined>;\n requiredMessage?: string;\n};\n\nconst FieldError = memo(({ className, children, errors, requiredMessage = 'Trường này là bắt buộc', ...props }: FieldErrorProps) => {\n const content = useMemo(() => {\n const resolve = (error: { code?: string; message?: string }) => (error.code === 'invalid_type' ? requiredMessage : error.message);\n\n if (children) {\n return children;\n }\n\n if (!errors) {\n return null;\n }\n\n if (errors?.length === 1 && errors[0]?.message) {\n return (\n <div className=\"flex flex-row items-center justify-start gap-x-0.5\">\n <p>{resolve(errors[0])}</p>\n </div>\n );\n }\n\n return (\n <ul className=\"flex list-none flex-col\">\n {errors.map(error => {\n if (typeof error === 'string') return <li key={error}>{error}</li>;\n if (!error?.message) return null;\n return <li key={error.code ?? error.message}>{resolve(error)}</li>;\n })}\n </ul>\n );\n }, [children, errors, requiredMessage]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div role=\"alert\" data-slot=\"field-error\" className={cn('w-full font-medium text-danger-strong text-xs', className)} {...props}>\n {content}\n </div>\n );\n});\nFieldError.displayName = 'FieldError';\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldNote,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldContentMain,\n FieldTitle,\n FieldTooltip,\n};\n"],"mappings":"8ZAcA,SAASA,EAAM,CAAE,YAAW,WAAU,GAAG,GAA2D,CAClG,OACE,EAACC,EAAe,KAAhB,CACE,YAAU,QACV,UAAW,EACT,qBACA,2CACA,iDACA,iDACA,wCACA,mCACA,2BACA,8DACA,CACF,EACA,GAAI,WAbN,CAeE,EAAC,OAAD,CAAM,UAAU,0BAA2B,UAAe,CAAA,EAC1D,EAAC,OAAD,CACE,YAAU,qBACV,UAAU,qHACX,UAEK,CAAA,CACa,GAEzB,CC1BA,MAAM,EAAgB,EAAI,kGAAmG,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AAC,EAChB,UAAW,EAAG,4EAA6E,CAAS,EACpG,GAAI,WAJN,CAME,EAACC,EAAD,CAAW,UAAU,0BAA4B,CAAA,EAChD,GACC,EAAC,OAAD,CAAM,UAAU,0EAA0E,YAAU,0BACjG,UACG,CAAA,CAEL,GAER,EACD,EAAe,YAAc,iBAU7B,MAAM,EAAa,GAAM,CAAE,YAAW,WAAU,SAAQ,kBAAkB,yBAA0B,GAAG,KAA6B,CAClI,IAAM,EAAU,MAAc,CAC5B,IAAM,EAAW,GAAgD,EAAM,OAAS,eAAiB,EAAkB,EAAM,QAkBzH,OAhBI,IAIC,EAID,GAAQ,SAAW,GAAK,EAAO,EAAE,EAAE,QAEnC,EAAC,MAAD,CAAK,UAAU,8DACb,EAAC,IAAD,CAAA,SAAI,EAAQ,EAAO,EAAE,CAAK,CAAA,CACvB,CAAA,EAKP,EAAC,KAAD,CAAI,UAAU,mCACX,EAAO,IAAI,GACN,OAAO,GAAU,SAAiB,EAAC,KAAD,CAAA,SAAiB,CAAU,EAAlB,CAAkB,EAC5D,GAAO,QACL,EAAC,KAAD,CAAA,SAAuC,EAAQ,CAAK,CAAM,EAAjD,EAAM,MAAQ,EAAM,OAA6B,EADrC,IAE7B,CACC,CAAA,EAlBG,KAoBX,EAAG,CAAC,EAAU,EAAQ,CAAe,CAAC,EAMtC,OAJK,EAKH,EAAC,MAAD,CAAK,KAAK,QAAQ,YAAU,cAAc,UAAW,EAAG,gDAAiD,CAAS,EAAG,GAAI,WACtH,CACE,CAAA,EANE,IAQX,CAAC,EACD,EAAW,YAAc"}
|
|
@@ -3,13 +3,13 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
//#region packages/components/layouts/flex.d.ts
|
|
4
4
|
declare const flexVariants: (props?: ({
|
|
5
5
|
vertical?: boolean | null | undefined;
|
|
6
|
-
width?: "
|
|
6
|
+
width?: "auto" | "full" | "fit" | "screen" | "min" | "max" | "null" | null | undefined;
|
|
7
7
|
wrap?: boolean | null | undefined;
|
|
8
8
|
margin?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
9
9
|
padding?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
10
10
|
gap?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
11
|
-
justify?: "
|
|
12
|
-
align?: "
|
|
11
|
+
justify?: "start" | "center" | "end" | "between" | "around" | "evenly" | "stretch" | null | undefined;
|
|
12
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
type Props = {
|
|
15
15
|
/** Additional Tailwind classes merged on top of the variant-generated classes. */className?: string;
|
|
@@ -111,4 +111,4 @@ declare const Flex: import("react").MemoExoticComponent<({
|
|
|
111
111
|
}: React.PropsWithChildren<Props>) => import("react").JSX.Element>;
|
|
112
112
|
//#endregion
|
|
113
113
|
export { Flex as t };
|
|
114
|
-
//# sourceMappingURL=flex-
|
|
114
|
+
//# sourceMappingURL=flex-DGVZd6c6.d.cts.map
|
|
@@ -3,13 +3,13 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
//#region packages/components/layouts/flex.d.ts
|
|
4
4
|
declare const flexVariants: (props?: ({
|
|
5
5
|
vertical?: boolean | null | undefined;
|
|
6
|
-
width?: "
|
|
6
|
+
width?: "auto" | "full" | "fit" | "screen" | "min" | "max" | "null" | null | undefined;
|
|
7
7
|
wrap?: boolean | null | undefined;
|
|
8
8
|
margin?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
9
9
|
padding?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
10
10
|
gap?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
11
|
-
justify?: "
|
|
12
|
-
align?: "
|
|
11
|
+
justify?: "start" | "center" | "end" | "between" | "around" | "evenly" | "stretch" | null | undefined;
|
|
12
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
type Props = {
|
|
15
15
|
/** Additional Tailwind classes merged on top of the variant-generated classes. */className?: string;
|
|
@@ -111,4 +111,4 @@ declare const Flex: import("react").MemoExoticComponent<({
|
|
|
111
111
|
}: React.PropsWithChildren<Props>) => import("react").JSX.Element>;
|
|
112
112
|
//#endregion
|
|
113
113
|
export { Flex as t };
|
|
114
|
-
//# sourceMappingURL=flex-
|
|
114
|
+
//# sourceMappingURL=flex-DGVZd6c6.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Field as e,FieldContent as t,FieldContentMain as n,FieldDescription as r,FieldGroup as i,FieldLabel as a,FieldNote as o,FieldSeparator as s}from"./field-
|
|
2
|
-
//# sourceMappingURL=group-field-
|
|
1
|
+
import{Field as e,FieldContent as t,FieldContentMain as n,FieldDescription as r,FieldGroup as i,FieldLabel as a,FieldNote as o,FieldSeparator as s}from"./field-V2DoD8qL.mjs";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=({label:u,description:d,helperText:f,orientation:p=`responsive`,children:m})=>l(i,{className:`gap-y-4 px-4`,children:[l(e,{orientation:p,children:[l(t,{children:[c(a,{children:u}),c(r,{children:d})]}),l(n,{children:[m,c(o,{isShow:!!f,children:f})]})]}),c(s,{})]});export{u as TanStackFieldGroup};
|
|
2
|
+
//# sourceMappingURL=group-field-gejvx_Td.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-field-
|
|
1
|
+
{"version":3,"file":"group-field-gejvx_Td.mjs","names":[],"sources":["../packages/components/features/tanstack-form/components/forms/group-field.tsx"],"sourcesContent":["import {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n} from '@/components/features/tanstack-form/components/ui/field';\n\n/**\n * Renders a labeled field group with an optional description, helper text, and a bottom separator.\n *\n * @example\n * import { TanStackFieldGroup } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <TanStackFieldGroup\n * label=\"Contact Details\"\n * description=\"Enter your contact information.\"\n * helperText=\"All fields are required.\"\n * orientation=\"horizontal\"\n * >\n * <EmailField />\n * </TanStackFieldGroup>\n */\nexport const TanStackFieldGroup: React.FC<\n React.PropsWithChildren<{\n /** Primary label displayed above the field content. */\n label: string;\n /** Secondary descriptive text shown beneath the label. */\n description?: string;\n /** Supplementary helper note rendered below the field content. */\n helperText?: string;\n /** Layout orientation of the label-to-content axis. Defaults to `'responsive'`. */\n orientation?: 'horizontal' | 'vertical' | 'responsive';\n }>\n> = ({\n label,\n description,\n helperText,\n\n orientation = 'responsive',\n children,\n}) => {\n return (\n <FieldGroup className=\"gap-y-4 px-4\">\n <Field orientation={orientation}>\n <FieldContent>\n <FieldLabel>{label}</FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n </FieldContent>\n <FieldContentMain>\n {children}\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n};\n"],"mappings":"gOA0BA,MAAa,GAWR,CACH,QACA,cACA,aAEA,cAAc,aACd,cAGE,EAAC,EAAD,CAAY,UAAU,wBAAtB,CACE,EAAC,EAAD,CAAoB,uBAApB,CACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAA,SAAa,CAAkB,CAAA,EAC/B,EAAC,EAAD,CAAA,SAAmB,CAA8B,CAAA,CACrC,CAAA,CAAA,EACd,EAAC,EAAD,CAAA,SAAA,CACG,EACD,EAAC,EAAD,CAAW,OAAQ,CAAC,CAAC,WAAa,CAAsB,CAAA,CACxC,CAAA,CAAA,CACb,IACP,EAAC,EAAD,CAAiB,CAAA,CACP"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./field-
|
|
2
|
-
//# sourceMappingURL=group-field-
|
|
1
|
+
const e=require("./field-BSLi-P0Q.cjs");let t=require("react/jsx-runtime");const n=({label:n,description:r,helperText:i,orientation:a=`responsive`,children:o})=>(0,t.jsxs)(e.FieldGroup,{className:`gap-y-4 px-4`,children:[(0,t.jsxs)(e.Field,{orientation:a,children:[(0,t.jsxs)(e.FieldContent,{children:[(0,t.jsx)(e.FieldLabel,{children:n}),(0,t.jsx)(e.FieldDescription,{children:r})]}),(0,t.jsxs)(e.FieldContentMain,{children:[o,(0,t.jsx)(e.FieldNote,{isShow:!!i,children:i})]})]}),(0,t.jsx)(e.FieldSeparator,{})]});exports.TanStackFieldGroup=n;
|
|
2
|
+
//# sourceMappingURL=group-field-sVykO2JZ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-field-
|
|
1
|
+
{"version":3,"file":"group-field-sVykO2JZ.cjs","names":["FieldGroup","Field","FieldContent","FieldLabel","FieldDescription","FieldContentMain","FieldNote","FieldSeparator"],"sources":["../packages/components/features/tanstack-form/components/forms/group-field.tsx"],"sourcesContent":["import {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n} from '@/components/features/tanstack-form/components/ui/field';\n\n/**\n * Renders a labeled field group with an optional description, helper text, and a bottom separator.\n *\n * @example\n * import { TanStackFieldGroup } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <TanStackFieldGroup\n * label=\"Contact Details\"\n * description=\"Enter your contact information.\"\n * helperText=\"All fields are required.\"\n * orientation=\"horizontal\"\n * >\n * <EmailField />\n * </TanStackFieldGroup>\n */\nexport const TanStackFieldGroup: React.FC<\n React.PropsWithChildren<{\n /** Primary label displayed above the field content. */\n label: string;\n /** Secondary descriptive text shown beneath the label. */\n description?: string;\n /** Supplementary helper note rendered below the field content. */\n helperText?: string;\n /** Layout orientation of the label-to-content axis. Defaults to `'responsive'`. */\n orientation?: 'horizontal' | 'vertical' | 'responsive';\n }>\n> = ({\n label,\n description,\n helperText,\n\n orientation = 'responsive',\n children,\n}) => {\n return (\n <FieldGroup className=\"gap-y-4 px-4\">\n <Field orientation={orientation}>\n <FieldContent>\n <FieldLabel>{label}</FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n </FieldContent>\n <FieldContentMain>\n {children}\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n};\n"],"mappings":"2EA0BA,MAAa,GAWR,CACH,QACA,cACA,aAEA,cAAc,aACd,eAGE,EAAA,EAAA,KAAA,CAACA,EAAAA,WAAD,CAAY,UAAU,wBAAtB,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,MAAD,CAAoB,uBAApB,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,aAAD,CAAA,SAAA,EACE,EAAA,EAAA,IAAA,CAACC,EAAAA,WAAD,CAAA,SAAa,CAAkB,CAAA,GAC/B,EAAA,EAAA,IAAA,CAACC,EAAAA,iBAAD,CAAA,SAAmB,CAA8B,CAAA,CACrC,CAAA,CAAA,GACd,EAAA,EAAA,KAAA,CAACC,EAAAA,iBAAD,CAAA,SAAA,CACG,GACD,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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as AnyEntity } from "./types-cKvPPVBe.mjs";
|
|
2
|
-
import { n as InputVariantProps } from "./input-
|
|
2
|
+
import { n as InputVariantProps } from "./input-BQJV7ryj.mjs";
|
|
3
3
|
import { ComponentType } from "react";
|
|
4
4
|
import { AccessorKeyColumnDef, CellContext, Column, ColumnPinningPosition, ColumnPinningState, Header, HeaderGroup, Row, RowSelectionState, Table } from "@tanstack/react-table";
|
|
5
5
|
|
|
@@ -575,4 +575,4 @@ declare const UITableTooltipActions: ComponentType<{
|
|
|
575
575
|
}>;
|
|
576
576
|
//#endregion
|
|
577
577
|
export { FilterType as $, UITableLoadMore as A, TUITableWrapper as At, UITableEmptyDisplay as B, UITableTooltipActions as C, TUITableHeadCellOption as Ct, UITableContainer as D, TUITableInnerWrapper as Dt, UITableProvider as E, TUITableInnerTable as Et, UITableHeadCellOption as F, ActiveFilter as G, UITableCellActions as H, UITableHeadCell as I, ColumnAggregationType as J, BooleanFilterValue as K, UITableHead as L, UITableInnerTable as M, TagFilterValue as Mt, UITableHeadRow as N, TextFilterValue as Nt, UITableWrapper as O, TUITableLoadMore as Ot, UITableHeadCellSelect as P, UITableEmpty as Pt, FilterOption as Q, UITableFooterRow as R, UITableTooltip as S, TUITableHeadCell as St, UITableUserDataDisplay as T, TUITableHeadRow as Tt, UITableCell as U, UITableCellSelect as V, UITableBody as W, DateRangeFilterValue as X, CsvCell as Y, FilterDefinition as Z, UITableRemoveButton as _, TUITableCellSelect as _t, UITableCurrencyDisplay as a, TTableAnalysisContext as at, UITableSummaryBar as b, TUITableFooter as bt, UITableEditButton as c, TTableFilterContext as ct, UITableListDisplay as d, TTableInnerWrapperContext as dt, FilterValue as et, UITableMoreButton as f, TTableRowContext as ft, UITableProgressDisplay as g, TUITableCellActions as gt, UITablePhoneNumberDisplay as h, TUITableCell as ht, UITableBooleanDisplay as i, SummaryItem as it, UITableInnerWrapper as j, TableProviderProps as jt, UITableRow as k, TUITableRow as kt, UITableEmailDisplay as l, TTableHeadRowContext as lt, UITablePermalink as m, TUITableBody as mt, UITableAvatarNameDisplay as n, RowData as nt, UITableDateDisplay as o, TTableBodyContext as ot, UITableNameDisplay as p, TTableSummaryContext as pt, ColumnAggregation as q, UITableBadgeDisplay as r, SingleTagFilterValue as rt, UITableDescriptionDisplay as s, TTableContext as st, UITableAnalysisPanel as t, NumberFilterValue as tt, UITableFilter as u, TTableInnerTableContext as ut, UITableStatisticDisplay as v, TUITableColumn as vt, UITableTooltipFilter as w, TUITableHeadCellSelect as wt, UITableToggleButton as x, TUITableHead as xt, UITableStatusDisplay as y, TUITableEmptyDisplay as yt, UITableFooter as z };
|
|
578
|
-
//# sourceMappingURL=index-
|
|
578
|
+
//# sourceMappingURL=index-5R8gTzkQ.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as AnyEntity } from "./types-cKvPPVBe.cjs";
|
|
2
|
-
import { n as InputVariantProps } from "./input-
|
|
2
|
+
import { n as InputVariantProps } from "./input-BQJV7ryj.cjs";
|
|
3
3
|
import { ComponentType } from "react";
|
|
4
4
|
import { AccessorKeyColumnDef, CellContext, Column, ColumnPinningPosition, ColumnPinningState, Header, HeaderGroup, Row, RowSelectionState, Table } from "@tanstack/react-table";
|
|
5
5
|
|
|
@@ -575,4 +575,4 @@ declare const UITableTooltipActions: ComponentType<{
|
|
|
575
575
|
}>;
|
|
576
576
|
//#endregion
|
|
577
577
|
export { FilterType as $, UITableLoadMore as A, TUITableWrapper as At, UITableEmptyDisplay as B, UITableTooltipActions as C, TUITableHeadCellOption as Ct, UITableContainer as D, TUITableInnerWrapper as Dt, UITableProvider as E, TUITableInnerTable as Et, UITableHeadCellOption as F, ActiveFilter as G, UITableCellActions as H, UITableHeadCell as I, ColumnAggregationType as J, BooleanFilterValue as K, UITableHead as L, UITableInnerTable as M, TagFilterValue as Mt, UITableHeadRow as N, TextFilterValue as Nt, UITableWrapper as O, TUITableLoadMore as Ot, UITableHeadCellSelect as P, UITableEmpty as Pt, FilterOption as Q, UITableFooterRow as R, UITableTooltip as S, TUITableHeadCell as St, UITableUserDataDisplay as T, TUITableHeadRow as Tt, UITableCell as U, UITableCellSelect as V, UITableBody as W, DateRangeFilterValue as X, CsvCell as Y, FilterDefinition as Z, UITableRemoveButton as _, TUITableCellSelect as _t, UITableCurrencyDisplay as a, TTableAnalysisContext as at, UITableSummaryBar as b, TUITableFooter as bt, UITableEditButton as c, TTableFilterContext as ct, UITableListDisplay as d, TTableInnerWrapperContext as dt, FilterValue as et, UITableMoreButton as f, TTableRowContext as ft, UITableProgressDisplay as g, TUITableCellActions as gt, UITablePhoneNumberDisplay as h, TUITableCell as ht, UITableBooleanDisplay as i, SummaryItem as it, UITableInnerWrapper as j, TableProviderProps as jt, UITableRow as k, TUITableRow as kt, UITableEmailDisplay as l, TTableHeadRowContext as lt, UITablePermalink as m, TUITableBody as mt, UITableAvatarNameDisplay as n, RowData as nt, UITableDateDisplay as o, TTableBodyContext as ot, UITableNameDisplay as p, TTableSummaryContext as pt, ColumnAggregation as q, UITableBadgeDisplay as r, SingleTagFilterValue as rt, UITableDescriptionDisplay as s, TTableContext as st, UITableAnalysisPanel as t, NumberFilterValue as tt, UITableFilter as u, TTableInnerTableContext as ut, UITableStatisticDisplay as v, TUITableColumn as vt, UITableTooltipFilter as w, TUITableHeadCellSelect as wt, UITableToggleButton as x, TUITableHead as xt, UITableStatusDisplay as y, TUITableEmptyDisplay as yt, UITableFooter as z };
|
|
578
|
-
//# sourceMappingURL=index-
|
|
578
|
+
//# sourceMappingURL=index-By6nfR2q.d.cts.map
|