@customafk/lunas-ui 0.2.84 → 0.2.85
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/LoginPage-DGgThT3s.mjs +2 -0
- package/dist/LoginPage-DGgThT3s.mjs.map +1 -0
- package/dist/LoginPage-DPUdRD0r.cjs +2 -0
- package/dist/LoginPage-DPUdRD0r.cjs.map +1 -0
- package/dist/{action-submit-tpgKvZ47.cjs → action-submit-B2qFdfi6.cjs} +2 -2
- package/dist/{action-submit-tpgKvZ47.cjs.map → action-submit-B2qFdfi6.cjs.map} +1 -1
- package/dist/{action-submit-BHY2dndL.mjs → action-submit-DyNvI-F2.mjs} +2 -2
- package/dist/{action-submit-BHY2dndL.mjs.map → action-submit-DyNvI-F2.mjs.map} +1 -1
- package/dist/{actions-form-PByL8_M5.mjs → actions-form-CB0lZlE6.mjs} +2 -2
- package/dist/{actions-form-PByL8_M5.mjs.map → actions-form-CB0lZlE6.mjs.map} +1 -1
- package/dist/{actions-form-X46W7FVa.cjs → actions-form-DnlpVrgF.cjs} +2 -2
- package/dist/{actions-form-X46W7FVa.cjs.map → actions-form-DnlpVrgF.cjs.map} +1 -1
- package/dist/{button-BGW-LZ3i.d.cts → button-BnoPktln.d.cts} +2 -2
- package/dist/{button-BGW-LZ3i.d.mts → button-BnoPktln.d.mts} +2 -2
- package/dist/{calendar-BNTvKnwd.d.cts → calendar-BkV5hTX2.d.mts} +2 -2
- package/dist/{calendar-DbaIaWr0.d.mts → calendar-iDMPT1kI.d.cts} +2 -2
- package/dist/{carousel-Bw-VhPR3.d.mts → carousel-D7VXWJ3S.d.mts} +2 -2
- package/dist/{carousel-DRqMTyKS.d.cts → carousel-bBvM31sh.d.cts} +2 -2
- package/dist/{checkbox-field-BG35eKvM.cjs → checkbox-field-CFPHAcwN.cjs} +2 -2
- package/dist/{checkbox-field-BG35eKvM.cjs.map → checkbox-field-CFPHAcwN.cjs.map} +1 -1
- package/dist/{checkbox-field-C-NyMjEm.mjs → checkbox-field-DodKeFS_.mjs} +2 -2
- package/dist/{checkbox-field-C-NyMjEm.mjs.map → checkbox-field-DodKeFS_.mjs.map} +1 -1
- package/dist/{combobox-field-ROYquFD8.cjs → combobox-field-D7cZ8fhZ.cjs} +2 -2
- package/dist/{combobox-field-ROYquFD8.cjs.map → combobox-field-D7cZ8fhZ.cjs.map} +1 -1
- package/dist/{combobox-field-Cx0A-CD4.mjs → combobox-field-ebIvbhJn.mjs} +2 -2
- package/dist/{combobox-field-Cx0A-CD4.mjs.map → combobox-field-ebIvbhJn.mjs.map} +1 -1
- package/dist/{date-field-zoPch5tC.mjs → date-field-CNkxebta.mjs} +2 -2
- package/dist/{date-field-zoPch5tC.mjs.map → date-field-CNkxebta.mjs.map} +1 -1
- package/dist/{date-field-46UtGmEV.cjs → date-field-Dm367ro9.cjs} +2 -2
- package/dist/{date-field-46UtGmEV.cjs.map → date-field-Dm367ro9.cjs.map} +1 -1
- package/dist/{dialog-form-X9MxC8pq.cjs → dialog-form-D9Bifsx6.cjs} +2 -2
- package/dist/{dialog-form-X9MxC8pq.cjs.map → dialog-form-D9Bifsx6.cjs.map} +1 -1
- package/dist/{dialog-form-BRV1niqF.mjs → dialog-form-zK6Gk9Gk.mjs} +2 -2
- package/dist/{dialog-form-BRV1niqF.mjs.map → dialog-form-zK6Gk9Gk.mjs.map} +1 -1
- package/dist/dialogs/detail-dialog/components/sidebar.d.cts +1 -1
- package/dist/dialogs/detail-dialog/components/sidebar.d.mts +1 -1
- package/dist/{email-field-CPEVNvn8.mjs → email-field-BVl7u9pR.mjs} +2 -2
- package/dist/{email-field-CPEVNvn8.mjs.map → email-field-BVl7u9pR.mjs.map} +1 -1
- package/dist/{email-field-0UjeYtnM.cjs → email-field-CqXXRG3w.cjs} +2 -2
- package/dist/{email-field-0UjeYtnM.cjs.map → email-field-CqXXRG3w.cjs.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/{flex-D7IE_cdR.d.cts → flex-D6RCsrv1.d.cts} +4 -4
- package/dist/{flex-D7IE_cdR.d.mts → flex-D6RCsrv1.d.mts} +4 -4
- package/dist/{group-field-Cs0uWHg0.mjs → group-field-8nINgAeO.mjs} +2 -2
- package/dist/{group-field-Cs0uWHg0.mjs.map → group-field-8nINgAeO.mjs.map} +1 -1
- package/dist/{group-field-DJXL9sRy.cjs → group-field-DfGPDLyp.cjs} +2 -2
- package/dist/{group-field-DJXL9sRy.cjs.map → group-field-DfGPDLyp.cjs.map} +1 -1
- package/dist/index-6_zytlWu.d.cts +70 -0
- package/dist/index-6_zytlWu.d.mts +70 -0
- package/dist/{index-DJY2uC2H.d.mts → index-BCBEYTyA.d.mts} +10 -10
- package/dist/{index-UZik7mgS.d.cts → index-CQPyC0Q2.d.cts} +10 -10
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.mts +11 -11
- package/dist/index.mjs +1 -1
- package/dist/{input-D73TrUof.d.cts → input-DxNK7Wo6.d.cts} +2 -2
- package/dist/{input-D73TrUof.d.mts → input-DxNK7Wo6.d.mts} +2 -2
- package/dist/layouts/flex.d.cts +1 -1
- package/dist/layouts/flex.d.mts +1 -1
- package/dist/{number-field-CMskIrWP.cjs → number-field-BjGl_IiN.cjs} +2 -2
- package/dist/{number-field-CMskIrWP.cjs.map → number-field-BjGl_IiN.cjs.map} +1 -1
- package/dist/{number-field-DSGwWg7y.mjs → number-field-CVemIwIg.mjs} +2 -2
- package/dist/{number-field-DSGwWg7y.mjs.map → number-field-CVemIwIg.mjs.map} +1 -1
- package/dist/pages/LoginPage/index.cjs +1 -0
- package/dist/pages/LoginPage/index.d.cts +2 -0
- package/dist/pages/LoginPage/index.d.mts +2 -0
- package/dist/pages/LoginPage/index.mjs +1 -0
- package/dist/{pagination-DDcO-TPf.d.cts → pagination-BRw-yZBY.d.cts} +2 -2
- package/dist/{pagination-DWg3Xv34.d.mts → pagination-BlLiOvY9.d.mts} +2 -2
- package/dist/{paragraph--8GcgnQL.d.cts → paragraph-CRo5eC7H.d.mts} +3 -3
- package/dist/{paragraph-BOa0VlGX.d.mts → paragraph-CkCNIsvz.d.cts} +3 -3
- package/dist/{password-field-BxJqTPhN.cjs → password-field-Be0Ltlxh.cjs} +2 -2
- package/dist/{password-field-BxJqTPhN.cjs.map → password-field-Be0Ltlxh.cjs.map} +1 -1
- package/dist/{password-field-DsmwNZep.mjs → password-field-BxYaT8lO.mjs} +2 -2
- package/dist/{password-field-DsmwNZep.mjs.map → password-field-BxYaT8lO.mjs.map} +1 -1
- package/dist/{popover-form-CdXVFl0t.cjs → popover-form-Ba_Nw79b.cjs} +2 -2
- package/dist/{popover-form-CdXVFl0t.cjs.map → popover-form-Ba_Nw79b.cjs.map} +1 -1
- package/dist/{popover-form-BUc5ivCF.mjs → popover-form-C9mNInr2.mjs} +2 -2
- package/dist/{popover-form-BUc5ivCF.mjs.map → popover-form-C9mNInr2.mjs.map} +1 -1
- package/dist/{radio-group-field-gHNAwrdr.cjs → radio-group-field-BCJWamjd.cjs} +2 -2
- package/dist/{radio-group-field-gHNAwrdr.cjs.map → radio-group-field-BCJWamjd.cjs.map} +1 -1
- package/dist/{radio-group-field-CmCo87tm.mjs → radio-group-field-DYqU_6hW.mjs} +2 -2
- package/dist/{radio-group-field-CmCo87tm.mjs.map → radio-group-field-DYqU_6hW.mjs.map} +1 -1
- package/dist/{resizable-C6JLqxF3.d.cts → resizable-DTnfCua-.d.cts} +2 -2
- package/dist/{resizable-C6JLqxF3.d.mts → resizable-DTnfCua-.d.mts} +2 -2
- package/dist/{search-input-DEvYI6Rm.d.mts → search-input-C8feOKe2.d.cts} +2 -2
- package/dist/{search-input-h_3MoMqK.d.cts → search-input-CoqwakbI.d.mts} +2 -2
- package/dist/{select-field-8PfksL_U.mjs → select-field-D7Ny2Qne.mjs} +2 -2
- package/dist/{select-field-8PfksL_U.mjs.map → select-field-D7Ny2Qne.mjs.map} +1 -1
- package/dist/{select-field-Ce53hZ3J.cjs → select-field-UWnBMAzL.cjs} +2 -2
- package/dist/{select-field-Ce53hZ3J.cjs.map → select-field-UWnBMAzL.cjs.map} +1 -1
- package/dist/{simple-array-field-BAR4MjDR.cjs → simple-array-field-BSMxRilE.cjs} +2 -2
- package/dist/{simple-array-field-BAR4MjDR.cjs.map → simple-array-field-BSMxRilE.cjs.map} +1 -1
- package/dist/{simple-array-field-C0kpO1cq.mjs → simple-array-field-DJXa_vST.mjs} +2 -2
- package/dist/{simple-array-field-C0kpO1cq.mjs.map → simple-array-field-DJXa_vST.mjs.map} +1 -1
- package/dist/{simple-boolean-field-Bdc4wuUU.mjs → simple-boolean-field-CVNT8NBk.mjs} +2 -2
- package/dist/{simple-boolean-field-Bdc4wuUU.mjs.map → simple-boolean-field-CVNT8NBk.mjs.map} +1 -1
- package/dist/{simple-boolean-field-36jmOxCR.cjs → simple-boolean-field-CxAyVQ1w.cjs} +2 -2
- package/dist/{simple-boolean-field-36jmOxCR.cjs.map → simple-boolean-field-CxAyVQ1w.cjs.map} +1 -1
- package/dist/{simple-combobox-field-BPDtPj1W.cjs → simple-combobox-field-BP4IeDkA.cjs} +2 -2
- package/dist/{simple-combobox-field-BPDtPj1W.cjs.map → simple-combobox-field-BP4IeDkA.cjs.map} +1 -1
- package/dist/{simple-combobox-field-CR5Q6Nsd.mjs → simple-combobox-field-BnAUDfQU.mjs} +2 -2
- package/dist/{simple-combobox-field-CR5Q6Nsd.mjs.map → simple-combobox-field-BnAUDfQU.mjs.map} +1 -1
- package/dist/{simple-date-field-DkhG2o7I.mjs → simple-date-field-DIa6UBF2.mjs} +2 -2
- package/dist/{simple-date-field-DkhG2o7I.mjs.map → simple-date-field-DIa6UBF2.mjs.map} +1 -1
- package/dist/{simple-date-field-DUPnGa5d.cjs → simple-date-field-NSawlSff.cjs} +2 -2
- package/dist/{simple-date-field-DUPnGa5d.cjs.map → simple-date-field-NSawlSff.cjs.map} +1 -1
- package/dist/{simple-email-field-BTYqiFp8.cjs → simple-email-field-2Abh3qZw.cjs} +2 -2
- package/dist/{simple-email-field-BTYqiFp8.cjs.map → simple-email-field-2Abh3qZw.cjs.map} +1 -1
- package/dist/{simple-email-field-CpxklyKr.mjs → simple-email-field-CKDQgzh5.mjs} +2 -2
- package/dist/{simple-email-field-CpxklyKr.mjs.map → simple-email-field-CKDQgzh5.mjs.map} +1 -1
- package/dist/{simple-number-field-CTFyTMgw.cjs → simple-number-field-BjEYE54F.cjs} +2 -2
- package/dist/{simple-number-field-CTFyTMgw.cjs.map → simple-number-field-BjEYE54F.cjs.map} +1 -1
- package/dist/{simple-number-field-DuCvwUG9.mjs → simple-number-field-SDbxL6L7.mjs} +2 -2
- package/dist/{simple-number-field-DuCvwUG9.mjs.map → simple-number-field-SDbxL6L7.mjs.map} +1 -1
- package/dist/{simple-password-field-BaeUvVB1.cjs → simple-password-field-Cjp6yzWd.cjs} +2 -2
- package/dist/{simple-password-field-BaeUvVB1.cjs.map → simple-password-field-Cjp6yzWd.cjs.map} +1 -1
- package/dist/{simple-password-field-Cu_JvDEE.mjs → simple-password-field-Cnj-hf5g.mjs} +2 -2
- package/dist/{simple-password-field-Cu_JvDEE.mjs.map → simple-password-field-Cnj-hf5g.mjs.map} +1 -1
- package/dist/{simple-radio-group-field-RJ_cEsxK.mjs → simple-radio-group-field-4-eWSXY7.mjs} +2 -2
- package/dist/{simple-radio-group-field-RJ_cEsxK.mjs.map → simple-radio-group-field-4-eWSXY7.mjs.map} +1 -1
- package/dist/{simple-radio-group-field-DiU4eQ_c.cjs → simple-radio-group-field-CuA0Q-XI.cjs} +2 -2
- package/dist/{simple-radio-group-field-DiU4eQ_c.cjs.map → simple-radio-group-field-CuA0Q-XI.cjs.map} +1 -1
- package/dist/{simple-select-field-B3uEUqvQ.mjs → simple-select-field-C0ecQx68.mjs} +2 -2
- package/dist/{simple-select-field-B3uEUqvQ.mjs.map → simple-select-field-C0ecQx68.mjs.map} +1 -1
- package/dist/{simple-select-field-C8vmeHbL.cjs → simple-select-field-CXYJcRY2.cjs} +2 -2
- package/dist/{simple-select-field-C8vmeHbL.cjs.map → simple-select-field-CXYJcRY2.cjs.map} +1 -1
- package/dist/{simple-text-field-BEoQmd1b.mjs → simple-text-field-DJl5SIGn.mjs} +2 -2
- package/dist/{simple-text-field-BEoQmd1b.mjs.map → simple-text-field-DJl5SIGn.mjs.map} +1 -1
- package/dist/{simple-text-field-zFJt_99J.cjs → simple-text-field-DPXqNCXh.cjs} +2 -2
- package/dist/{simple-text-field-zFJt_99J.cjs.map → simple-text-field-DPXqNCXh.cjs.map} +1 -1
- package/dist/{simple-textarea-field-CzpApMiv.mjs → simple-textarea-field-BcHdUMTK.mjs} +2 -2
- package/dist/{simple-textarea-field-CzpApMiv.mjs.map → simple-textarea-field-BcHdUMTK.mjs.map} +1 -1
- package/dist/{simple-textarea-field-DyQZEDTe.cjs → simple-textarea-field-ZpXPwYz-.cjs} +2 -2
- package/dist/{simple-textarea-field-DyQZEDTe.cjs.map → simple-textarea-field-ZpXPwYz-.cjs.map} +1 -1
- package/dist/{switch-field-CsI6eXJu.cjs → switch-field-CCDuDdpf.cjs} +2 -2
- package/dist/{switch-field-CsI6eXJu.cjs.map → switch-field-CCDuDdpf.cjs.map} +1 -1
- package/dist/{switch-field-D2SWDM1l.mjs → switch-field-DBGFsmEZ.mjs} +2 -2
- package/dist/{switch-field-D2SWDM1l.mjs.map → switch-field-DBGFsmEZ.mjs.map} +1 -1
- package/dist/{tanstack-form-Do6xL2kv.mjs → tanstack-form-BhKAn9I0.mjs} +2 -2
- package/dist/{tanstack-form-Do6xL2kv.mjs.map → tanstack-form-BhKAn9I0.mjs.map} +1 -1
- package/dist/{tanstack-form-BiOihtxs.cjs → tanstack-form-DCB2addt.cjs} +2 -2
- package/dist/{tanstack-form-BiOihtxs.cjs.map → tanstack-form-DCB2addt.cjs.map} +1 -1
- package/dist/{text-field-wes_PQEd.mjs → text-field-Bx_vnc4O.mjs} +2 -2
- package/dist/{text-field-wes_PQEd.mjs.map → text-field-Bx_vnc4O.mjs.map} +1 -1
- package/dist/{text-field-D9CYYDKM.cjs → text-field-DMZZ6CND.cjs} +2 -2
- package/dist/{text-field-D9CYYDKM.cjs.map → text-field-DMZZ6CND.cjs.map} +1 -1
- package/dist/{textarea-field-CRf0M2Eb.cjs → textarea-field-BmImMdg-.cjs} +2 -2
- package/dist/{textarea-field-CRf0M2Eb.cjs.map → textarea-field-BmImMdg-.cjs.map} +1 -1
- package/dist/{textarea-field-BiNmDHgL.mjs → textarea-field-Cim3l0y8.mjs} +2 -2
- package/dist/{textarea-field-BiNmDHgL.mjs.map → textarea-field-Cim3l0y8.mjs.map} +1 -1
- package/dist/{title-field-C4BmSDR2.mjs → title-field-2dABwspv.mjs} +2 -2
- package/dist/{title-field-C4BmSDR2.mjs.map → title-field-2dABwspv.mjs.map} +1 -1
- package/dist/{title-field-B9LLoqIi.cjs → title-field-CFnSgTGH.cjs} +2 -2
- package/dist/{title-field-B9LLoqIi.cjs.map → title-field-CFnSgTGH.cjs.map} +1 -1
- package/dist/typography/paragraph.d.cts +1 -1
- package/dist/typography/paragraph.d.mts +1 -1
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.mts +1 -1
- package/dist/ui/calendar.d.cts +1 -1
- package/dist/ui/calendar.d.mts +1 -1
- package/dist/ui/carousel.d.cts +1 -1
- package/dist/ui/carousel.d.mts +1 -1
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.mts +1 -1
- package/dist/ui/inputs/search-input.d.cts +1 -1
- package/dist/ui/inputs/search-input.d.mts +1 -1
- package/dist/ui/pagination.d.cts +1 -1
- package/dist/ui/pagination.d.mts +1 -1
- package/dist/ui/resizable.d.cts +1 -1
- package/dist/ui/resizable.d.mts +1 -1
- package/package.json +3 -3
- package/dist/LoginPage-DDljzV6A.d.cts +0 -43
- package/dist/LoginPage-DDljzV6A.d.mts +0 -43
- package/dist/pages/LoginPage.cjs +0 -2
- package/dist/pages/LoginPage.cjs.map +0 -1
- package/dist/pages/LoginPage.d.cts +0 -2
- package/dist/pages/LoginPage.d.mts +0 -2
- package/dist/pages/LoginPage.mjs +0 -2
- package/dist/pages/LoginPage.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tanstack-form-Do6xL2kv.mjs","names":["Label","LabelPrimitive","FieldGroup","Field","FieldContent","FieldContentMain","FieldLabel","Label","Tooltip","FieldSeparator","Separator","FieldError","FieldGroup","Field","FieldContent","FieldLabel","FieldError","FieldSeparator","Impl"],"sources":["../packages/components/features/tanstack-form/components/form-context.ts","../packages/components/features/tanstack-form/components/ui/label.tsx","../packages/components/features/tanstack-form/components/ui/field.tsx","../packages/components/features/tanstack-form/components/fields/text-editor-field.tsx","../packages/components/features/tanstack-form/tanstack-form.tsx"],"sourcesContent":["'use client';\n\nimport { createFormHookContexts } from '@tanstack/react-form';\n\n/**\n * Shared field/form contexts, split out from `tanstack-form.tsx` so that field and form\n * components can depend on them directly instead of importing back through the file that\n * lazy-loads those same components (which would reintroduce a circular import).\n */\nexport const { fieldContext, formContext, useFieldContext: useTanStackFieldContext, useFormContext: useTanStackFormContext } = createFormHookContexts();\n","'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","'use client';\n\nimport { memo, useCallback } from 'react';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { TextEditor } from '@/components/features/text-editor';\n\nimport type { TextEditorFieldProps as Props } from '../../types';\nimport { useTanStackFieldContext } from '../form-context';\nimport { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldNote, FieldSeparator, FieldTooltip } from '../ui/field';\n\nexport const TextEditorField: React.FC<Props> = memo(\n ({\n label,\n description,\n placeholder,\n tooltip,\n helperText,\n showErrorMessage = true,\n required = false,\n maxLength,\n showCharacterCount,\n enableLink,\n enableBubbleMenu,\n enableTaskList,\n enableHighlight,\n enableColor,\n enableImage,\n enableTable,\n enableSlashCommand,\n onImageUpload,\n variant,\n size,\n }) => {\n const { form, state, 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\n const onChange = useCallback(\n (html: string) => {\n if (isSubmitting) return;\n handleChange(html || null);\n },\n [isSubmitting, handleChange]\n );\n\n return (\n <FieldGroup className=\"gap-y-4 px-4\">\n <Field orientation=\"vertical\" data-invalid={_invalid}>\n <FieldContent>\n <FieldLabel aria-required={_isEmpty}>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n </FieldContent>\n <TextEditor\n value={state.value ?? ''}\n placeholder={placeholder}\n readOnly={isSubmitting}\n onChange={onChange}\n maxLength={maxLength}\n showCharacterCount={showCharacterCount}\n enableLink={enableLink}\n enableBubbleMenu={enableBubbleMenu}\n enableTaskList={enableTaskList}\n enableHighlight={enableHighlight}\n enableColor={enableColor}\n enableImage={enableImage}\n enableTable={enableTable}\n enableSlashCommand={enableSlashCommand}\n onImageUpload={onImageUpload}\n variant={variant}\n size={size}\n />\n {state.meta.isDirty && showErrorMessage && !!state.meta.errors.length && <FieldError errors={state.meta.errors} />}\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n }\n);\nTextEditorField.displayName = 'TextEditorField';\n","'use client';\n\nimport type { ComponentProps, ComponentType } from 'react';\nimport { lazy, Suspense } from 'react';\n\nimport { createFormHook } from '@tanstack/react-form';\n\nimport { Skeleton } from '@/components/ui/skeleton';\n\nimport type { ArrayCol as ArrayColType, ArrayHeaderRow as ArrayHeaderRowType, SimpleArrayFieldProps } from './components/atoms/simple-array-field';\nimport type { SimpleBooleanField as SimpleBooleanFieldType } from './components/atoms/simple-boolean-field';\nimport type { SimpleComboboxField as SimpleComboboxFieldType } from './components/atoms/simple-combobox-field';\nimport type { SimpleDateField as SimpleDateFieldType } from './components/atoms/simple-date-field';\nimport type { SimpleEmailField as SimpleEmailFieldType } from './components/atoms/simple-email-field';\nimport type { SimpleNumberField as SimpleNumberFieldType } from './components/atoms/simple-number-field';\nimport type { SimplePasswordField as SimplePasswordFieldType } from './components/atoms/simple-password-field';\nimport type { SimpleRadioGroupField as SimpleRadioGroupFieldType } from './components/atoms/simple-radio-group-field';\nimport type { SimpleSelectField as SimpleSelectFieldType } from './components/atoms/simple-select-field';\nimport type { SimpleTextField as SimpleTextFieldType } from './components/atoms/simple-text-field';\nimport type { SimpleTextareaField as SimpleTextareaFieldType } from './components/atoms/simple-textarea-field';\nimport type { CheckboxField as CheckboxFieldType } from './components/fields/checkbox-field';\nimport type { ComboboxField as ComboboxFieldType } from './components/fields/combobox-field';\nimport type { DateField as DateFieldType } from './components/fields/date-field';\nimport type { EmailField as EmailFieldType } from './components/fields/email-field';\nimport type { NumberField as NumberFieldType } from './components/fields/number-field';\nimport type { PasswordField as PasswordFieldType } from './components/fields/password-field';\nimport type { RadioGroupField as RadioGroupFieldType } from './components/fields/radio-group-field';\nimport type { SelectField as SelectFieldType } from './components/fields/select-field';\nimport type { SwitchField as SwitchFieldType } from './components/fields/switch-field';\nimport { TextEditorField } from './components/fields/text-editor-field';\nimport type { TextField as TextFieldType } from './components/fields/text-field';\nimport type { TextareaField as TextareaFieldType } from './components/fields/textarea-field';\nimport { fieldContext, formContext, useTanStackFieldContext, useTanStackFormContext } from './components/form-context';\nimport type { TanStackActionSubmit as TanStackActionSubmitType } from './components/forms/action-submit';\nimport type { TanStackActionsForm as TanStackActionsFormType } from './components/forms/actions-form';\nimport type { TanStackCardForm as TanStackCardFormType } from './components/forms/card-form';\nimport type { TanStackContainerForm as TanStackContainerFormType } from './components/forms/container-form';\nimport type { TanStackDialogForm as TanStackDialogFormType } from './components/forms/dialog-form';\nimport type { TanStackFieldGroup as TanStackFieldGroupType } from './components/forms/group-field';\nimport type { TanStackPopoverForm as TanStackPopoverFormType } from './components/forms/popover-form';\nimport type { TanStackSectionForm as TanStackSectionFormType } from './components/forms/section-form';\nimport type { TanStackTitleField as TanStackTitleFieldType } from './components/forms/title-field';\nimport type {\n FieldContentMain as FieldContentMainType,\n FieldContent as FieldContentType,\n FieldError as FieldErrorType,\n FieldGroup as FieldGroupType,\n FieldLabel as FieldLabelType,\n FieldSeparator as FieldSeparatorType,\n Field as FieldType,\n} from './components/ui/field';\n\n/** Input-shaped pulse placeholder shown while a lazy field/form chunk is still loading. */\nfunction FieldSkeleton() {\n return <Skeleton data-slot=\"tanstack-field-skeleton\" className=\"h-9 w-full rounded\" />;\n}\n\n/**\n * Wraps a `lazy()`-loaded component in its own `Suspense` boundary so it can be dropped\n * anywhere (inside or outside our own form containers) without callers needing to set up\n * Suspense themselves. Keeps this file itself small — the heavy per-field-type\n * implementations (Radix Select/Combobox/date-picker, the rich text editor, etc.) only load\n * when a form actually renders that field type.\n */\nfunction lazyField<P extends object>(loader: () => Promise<{ default: ComponentType<P> }>): ComponentType<P> {\n const LazyComponent = lazy(loader);\n return (props: P) => (\n <Suspense fallback={<FieldSkeleton />}>\n <LazyComponent {...props} />\n </Suspense>\n );\n}\n\n// ─── Rich field components (lazy) ─────────────────────────────────────────────\n\nconst TextField = lazyField<ComponentProps<typeof TextFieldType>>(() => import('./components/fields/text-field').then(m => ({ default: m.TextField })));\nconst TextareaField = lazyField<ComponentProps<typeof TextareaFieldType>>(() =>\n import('./components/fields/textarea-field').then(m => ({ default: m.TextareaField }))\n);\nconst NumberField = lazyField<ComponentProps<typeof NumberFieldType>>(() => import('./components/fields/number-field').then(m => ({ default: m.NumberField })));\nconst EmailField = lazyField<ComponentProps<typeof EmailFieldType>>(() => import('./components/fields/email-field').then(m => ({ default: m.EmailField })));\nconst PasswordField = lazyField<ComponentProps<typeof PasswordFieldType>>(() =>\n import('./components/fields/password-field').then(m => ({ default: m.PasswordField }))\n);\nconst SelectField = lazyField<ComponentProps<typeof SelectFieldType>>(() => import('./components/fields/select-field').then(m => ({ default: m.SelectField })));\nconst ComboboxField = lazyField<ComponentProps<typeof ComboboxFieldType>>(() =>\n import('./components/fields/combobox-field').then(m => ({ default: m.ComboboxField }))\n);\nconst DateField = lazyField<ComponentProps<typeof DateFieldType>>(() => import('./components/fields/date-field').then(m => ({ default: m.DateField })));\nconst SwitchField = lazyField<ComponentProps<typeof SwitchFieldType>>(() => import('./components/fields/switch-field').then(m => ({ default: m.SwitchField })));\nconst RadioGroupField = lazyField<ComponentProps<typeof RadioGroupFieldType>>(() =>\n import('./components/fields/radio-group-field').then(m => ({ default: m.RadioGroupField }))\n);\nconst CheckboxField = lazyField<ComponentProps<typeof CheckboxFieldType>>(() =>\n import('./components/fields/checkbox-field').then(m => ({ default: m.CheckboxField }))\n);\n\n// ─── Simple (minimal) field components (lazy) ─────────────────────────────────\n\nconst SimpleTextField = lazyField<ComponentProps<typeof SimpleTextFieldType>>(() =>\n import('./components/atoms/simple-text-field').then(m => ({ default: m.SimpleTextField }))\n);\nconst SimpleEmailField = lazyField<ComponentProps<typeof SimpleEmailFieldType>>(() =>\n import('./components/atoms/simple-email-field').then(m => ({ default: m.SimpleEmailField }))\n);\nconst SimplePasswordField = lazyField<ComponentProps<typeof SimplePasswordFieldType>>(() =>\n import('./components/atoms/simple-password-field').then(m => ({ default: m.SimplePasswordField }))\n);\nconst SimpleTextareaField = lazyField<ComponentProps<typeof SimpleTextareaFieldType>>(() =>\n import('./components/atoms/simple-textarea-field').then(m => ({ default: m.SimpleTextareaField }))\n);\nconst SimpleNumberField = lazyField<ComponentProps<typeof SimpleNumberFieldType>>(() =>\n import('./components/atoms/simple-number-field').then(m => ({ default: m.SimpleNumberField }))\n);\nconst SimpleSelectField = lazyField<ComponentProps<typeof SimpleSelectFieldType>>(() =>\n import('./components/atoms/simple-select-field').then(m => ({ default: m.SimpleSelectField }))\n);\nconst LazySimpleArrayField = lazy(() =>\n import('./components/atoms/simple-array-field').then(m => ({ default: m.SimpleArrayField as ComponentType<SimpleArrayFieldProps<unknown>> }))\n);\n\n/** Kept as its own generic wrapper (instead of `lazyField`) so callers can still write `<SimpleArrayField<Row> />`. */\nfunction SimpleArrayField<T>(props: SimpleArrayFieldProps<T>) {\n const Impl = LazySimpleArrayField as ComponentType<SimpleArrayFieldProps<T>>;\n return (\n <Suspense fallback={<FieldSkeleton />}>\n <Impl {...props} />\n </Suspense>\n );\n}\n\nconst SimpleBooleanField = lazyField<ComponentProps<typeof SimpleBooleanFieldType>>(() =>\n import('./components/atoms/simple-boolean-field').then(m => ({ default: m.SimpleBooleanField }))\n);\nconst SimpleComboboxField = lazyField<ComponentProps<typeof SimpleComboboxFieldType>>(() =>\n import('./components/atoms/simple-combobox-field').then(m => ({ default: m.SimpleComboboxField }))\n);\nconst SimpleDateField = lazyField<ComponentProps<typeof SimpleDateFieldType>>(() =>\n import('./components/atoms/simple-date-field').then(m => ({ default: m.SimpleDateField }))\n);\nconst SimpleRadioGroupField = lazyField<ComponentProps<typeof SimpleRadioGroupFieldType>>(() =>\n import('./components/atoms/simple-radio-group-field').then(m => ({ default: m.SimpleRadioGroupField }))\n);\n\n// ─── Array field layout helpers (lazy, co-located with SimpleArrayField) ──────\n\nconst ArrayCol = lazyField<ComponentProps<typeof ArrayColType>>(() => import('./components/atoms/simple-array-field').then(m => ({ default: m.ArrayCol })));\nconst ArrayHeaderRow = lazyField<ComponentProps<typeof ArrayHeaderRowType>>(() =>\n import('./components/atoms/simple-array-field').then(m => ({ default: m.ArrayHeaderRow }))\n);\n\n// ─── Form containers (lazy) ───────────────────────────────────────────────────\n\nconst TanStackDialogForm = lazyField<ComponentProps<typeof TanStackDialogFormType>>(() =>\n import('./components/forms/dialog-form').then(m => ({ default: m.TanStackDialogForm }))\n);\nconst TanStackPopoverForm = lazyField<ComponentProps<typeof TanStackPopoverFormType>>(() =>\n import('./components/forms/popover-form').then(m => ({ default: m.TanStackPopoverForm }))\n);\nconst TanStackContainerForm = lazyField<ComponentProps<typeof TanStackContainerFormType>>(() =>\n import('./components/forms/container-form').then(m => ({ default: m.TanStackContainerForm }))\n);\nconst TanStackSectionForm = lazyField<ComponentProps<typeof TanStackSectionFormType>>(() =>\n import('./components/forms/section-form').then(m => ({ default: m.TanStackSectionForm }))\n);\nconst TanStackCardForm = lazyField<ComponentProps<typeof TanStackCardFormType>>(() =>\n import('./components/forms/card-form').then(m => ({ default: m.TanStackCardForm }))\n);\nconst TanStackFieldGroup = lazyField<ComponentProps<typeof TanStackFieldGroupType>>(() =>\n import('./components/forms/group-field').then(m => ({ default: m.TanStackFieldGroup }))\n);\nconst TanStackTitleField = lazyField<ComponentProps<typeof TanStackTitleFieldType>>(() =>\n import('./components/forms/title-field').then(m => ({ default: m.TanStackTitleField }))\n);\nconst TanStackActionsForm = lazyField<ComponentProps<typeof TanStackActionsFormType>>(() =>\n import('./components/forms/actions-form').then(m => ({ default: m.TanStackActionsForm }))\n);\nconst TanStackActionSubmit = lazyField<ComponentProps<typeof TanStackActionSubmitType>>(() =>\n import('./components/forms/action-submit').then(m => ({ default: m.TanStackActionSubmit }))\n);\n\n// ─── Field UI primitives (lazy) ───────────────────────────────────────────────\n\nconst FieldGroup = lazyField<ComponentProps<typeof FieldGroupType>>(() => import('./components/ui/field').then(m => ({ default: m.FieldGroup })));\nconst Field = lazyField<ComponentProps<typeof FieldType>>(() => import('./components/ui/field').then(m => ({ default: m.Field })));\nconst FieldContent = lazyField<ComponentProps<typeof FieldContentType>>(() => import('./components/ui/field').then(m => ({ default: m.FieldContent })));\nconst FieldLabel = lazyField<ComponentProps<typeof FieldLabelType>>(() => import('./components/ui/field').then(m => ({ default: m.FieldLabel })));\nconst FieldContentMain = lazyField<ComponentProps<typeof FieldContentMainType>>(() =>\n import('./components/ui/field').then(m => ({ default: m.FieldContentMain }))\n);\nconst FieldSeparator = lazyField<ComponentProps<typeof FieldSeparatorType>>(() => import('./components/ui/field').then(m => ({ default: m.FieldSeparator })));\nconst FieldError = lazyField<ComponentProps<typeof FieldErrorType>>(() => import('./components/ui/field').then(m => ({ default: m.FieldError })));\n\n/**\n * Factory result from {@link createFormHook} pre-wired with all Lunas UI field and form components.\n *\n * ### `useTanStackForm`\n * Pre-configured TanStack Form hook that returns a type-safe form instance bound to all Lunas UI\n * field and form components.\n *\n * @example\n * import { useTanStackForm } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * const form = useTanStackForm({\n * defaultValues: { name: '', email: '' },\n * onSubmit: async ({ value }) => console.log(value),\n * });\n *\n * return (\n * <form.Provider>\n * <form.AppForm>\n * <form.AppField name=\"name\" children={(field) => <field.TextField label=\"Name\" />} />\n * <form.Subscribe selector={(s) => s.canSubmit}>\n * {(canSubmit) => <form.TanStackActionSubmit disabled={!canSubmit} />}\n * </form.Subscribe>\n * </form.AppForm>\n * </form.Provider>\n * );\n *\n * ### `withTanStackForm`\n * Higher-order component that wraps a sub-form component with access to the parent\n * `useTanStackForm` form context, enabling isolated field groups that still participate in the\n * top-level form state.\n *\n * @example\n * import { withTanStackForm } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * const AddressFields = withTanStackForm(\n * { street: '', city: '' } as const,\n * ({ form }) => (\n * <>\n * <form.AppField name=\"street\" children={(f) => <f.TextField label=\"Street\" />} />\n * <form.AppField name=\"city\" children={(f) => <f.TextField label=\"City\" />} />\n * </>\n * ),\n * );\n *\n * ### `withTanStackFieldGroup`\n * Higher-order component that creates a reusable field-group component sharing the enclosing\n * `useTanStackForm` context without requiring additional form providers.\n *\n * @example\n * import { withTanStackFieldGroup } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * const ContactGroup = withTanStackFieldGroup(({ form }) => (\n * <form.AppField name=\"phone\" children={(f) => <f.TextField label=\"Phone\" />} />\n * ));\n */\nconst {\n useAppForm: useTanStackForm,\n withForm: withTanStackForm,\n withFieldGroup: withTanStackFieldGroup,\n} = createFormHook({\n fieldContext,\n formContext,\n\n fieldComponents: {\n TextField,\n TextareaField,\n TextEditorField,\n NumberField,\n EmailField,\n PasswordField,\n\n SelectField,\n ComboboxField,\n DateField,\n SwitchField,\n RadioGroupField,\n CheckboxField,\n\n SimpleTextField,\n SimpleEmailField,\n SimplePasswordField,\n SimpleTextareaField,\n SimpleNumberField,\n SimpleSelectField,\n SimpleArrayField,\n SimpleBooleanField,\n SimpleComboboxField,\n SimpleDateField,\n SimpleRadioGroupField,\n\n FieldGroup,\n Field,\n FieldContent,\n FieldLabel,\n FieldContentMain,\n FieldSeparator,\n FieldError,\n },\n formComponents: {\n TanStackDialogForm,\n TanStackPopoverForm,\n TanStackContainerForm,\n TanStackSectionForm,\n TanStackCardForm,\n TanStackFieldGroup,\n TanStackTitleField,\n\n TanStackActionsForm,\n TanStackActionSubmit,\n\n ArrayCol,\n ArrayHeaderRow,\n },\n});\n\nexport {\n // Array helpers\n ArrayCol,\n ArrayHeaderRow,\n CheckboxField,\n ComboboxField,\n DateField,\n EmailField,\n Field,\n FieldContent,\n FieldContentMain,\n FieldError,\n // Field UI primitives\n FieldGroup,\n FieldLabel,\n FieldSeparator,\n NumberField,\n PasswordField,\n RadioGroupField,\n SelectField,\n SimpleArrayField,\n SimpleBooleanField,\n SimpleComboboxField,\n SimpleDateField,\n SimpleEmailField,\n SimpleNumberField,\n SimplePasswordField,\n SimpleRadioGroupField,\n SimpleSelectField,\n SimpleTextareaField,\n // Simple (minimal) field components\n SimpleTextField,\n SwitchField,\n TanStackActionSubmit,\n // Form actions\n TanStackActionsForm,\n TanStackCardForm,\n TanStackContainerForm,\n // Form containers\n TanStackDialogForm,\n TanStackFieldGroup,\n TanStackPopoverForm,\n TanStackSectionForm,\n TanStackTitleField,\n TextareaField,\n TextEditorField,\n // Rich field components\n TextField,\n useTanStackFieldContext,\n // Hooks & HOCs\n useTanStackForm,\n useTanStackFormContext,\n withTanStackFieldGroup,\n withTanStackForm,\n};\n"],"mappings":"0xBASA,KAAa,CAAE,eAAc,cAAa,gBAAiB,EAAyB,eAAgB,GAA2B,EAAuB,ECKtJ,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,EAbN,SAAA,CAeE,EAAC,OAAD,CAAM,UAAU,0BAA2B,UAAe,CAAA,EAC1D,EAAC,OAAD,CACE,YAAU,qBACV,UAAU,4GACX,SAAA,UAEK,CAAA,CACa,GAEzB,sPC1BA,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,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ACA,cACA,oBACA,kBACA,aACF,EACA,eAAgB,CACd,sBACA,uBACA,yBACA,uBACA,oBACA,sBACA,sBAEA,uBACA,wBAEA,YACA,iBACF,CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"tanstack-form-BhKAn9I0.mjs","names":["Label","LabelPrimitive","FieldGroup","Field","FieldContent","FieldContentMain","FieldLabel","Label","Tooltip","FieldSeparator","Separator","FieldError","FieldGroup","Field","FieldContent","FieldLabel","FieldError","FieldSeparator","Impl"],"sources":["../packages/components/features/tanstack-form/components/form-context.ts","../packages/components/features/tanstack-form/components/ui/label.tsx","../packages/components/features/tanstack-form/components/ui/field.tsx","../packages/components/features/tanstack-form/components/fields/text-editor-field.tsx","../packages/components/features/tanstack-form/tanstack-form.tsx"],"sourcesContent":["'use client';\n\nimport { createFormHookContexts } from '@tanstack/react-form';\n\n/**\n * Shared field/form contexts, split out from `tanstack-form.tsx` so that field and form\n * components can depend on them directly instead of importing back through the file that\n * lazy-loads those same components (which would reintroduce a circular import).\n */\nexport const { fieldContext, formContext, useFieldContext: useTanStackFieldContext, useFormContext: useTanStackFormContext } = createFormHookContexts();\n","'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","'use client';\n\nimport { memo, useCallback } from 'react';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { TextEditor } from '@/components/features/text-editor';\n\nimport type { TextEditorFieldProps as Props } from '../../types';\nimport { useTanStackFieldContext } from '../form-context';\nimport { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldNote, FieldSeparator, FieldTooltip } from '../ui/field';\n\nexport const TextEditorField: React.FC<Props> = memo(\n ({\n label,\n description,\n placeholder,\n tooltip,\n helperText,\n showErrorMessage = true,\n required = false,\n maxLength,\n showCharacterCount,\n enableLink,\n enableBubbleMenu,\n enableTaskList,\n enableHighlight,\n enableColor,\n enableImage,\n enableTable,\n enableSlashCommand,\n onImageUpload,\n variant,\n size,\n }) => {\n const { form, state, 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\n const onChange = useCallback(\n (html: string) => {\n if (isSubmitting) return;\n handleChange(html || null);\n },\n [isSubmitting, handleChange]\n );\n\n return (\n <FieldGroup className=\"gap-y-4 px-4\">\n <Field orientation=\"vertical\" data-invalid={_invalid}>\n <FieldContent>\n <FieldLabel aria-required={_isEmpty}>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n </FieldContent>\n <TextEditor\n value={state.value ?? ''}\n placeholder={placeholder}\n readOnly={isSubmitting}\n onChange={onChange}\n maxLength={maxLength}\n showCharacterCount={showCharacterCount}\n enableLink={enableLink}\n enableBubbleMenu={enableBubbleMenu}\n enableTaskList={enableTaskList}\n enableHighlight={enableHighlight}\n enableColor={enableColor}\n enableImage={enableImage}\n enableTable={enableTable}\n enableSlashCommand={enableSlashCommand}\n onImageUpload={onImageUpload}\n variant={variant}\n size={size}\n />\n {state.meta.isDirty && showErrorMessage && !!state.meta.errors.length && <FieldError errors={state.meta.errors} />}\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n }\n);\nTextEditorField.displayName = 'TextEditorField';\n","'use client';\n\nimport type { ComponentProps, ComponentType } from 'react';\nimport { lazy, Suspense } from 'react';\n\nimport { createFormHook } from '@tanstack/react-form';\n\nimport { Skeleton } from '@/components/ui/skeleton';\n\nimport type { ArrayCol as ArrayColType, ArrayHeaderRow as ArrayHeaderRowType, SimpleArrayFieldProps } from './components/atoms/simple-array-field';\nimport type { SimpleBooleanField as SimpleBooleanFieldType } from './components/atoms/simple-boolean-field';\nimport type { SimpleComboboxField as SimpleComboboxFieldType } from './components/atoms/simple-combobox-field';\nimport type { SimpleDateField as SimpleDateFieldType } from './components/atoms/simple-date-field';\nimport type { SimpleEmailField as SimpleEmailFieldType } from './components/atoms/simple-email-field';\nimport type { SimpleNumberField as SimpleNumberFieldType } from './components/atoms/simple-number-field';\nimport type { SimplePasswordField as SimplePasswordFieldType } from './components/atoms/simple-password-field';\nimport type { SimpleRadioGroupField as SimpleRadioGroupFieldType } from './components/atoms/simple-radio-group-field';\nimport type { SimpleSelectField as SimpleSelectFieldType } from './components/atoms/simple-select-field';\nimport type { SimpleTextField as SimpleTextFieldType } from './components/atoms/simple-text-field';\nimport type { SimpleTextareaField as SimpleTextareaFieldType } from './components/atoms/simple-textarea-field';\nimport type { CheckboxField as CheckboxFieldType } from './components/fields/checkbox-field';\nimport type { ComboboxField as ComboboxFieldType } from './components/fields/combobox-field';\nimport type { DateField as DateFieldType } from './components/fields/date-field';\nimport type { EmailField as EmailFieldType } from './components/fields/email-field';\nimport type { NumberField as NumberFieldType } from './components/fields/number-field';\nimport type { PasswordField as PasswordFieldType } from './components/fields/password-field';\nimport type { RadioGroupField as RadioGroupFieldType } from './components/fields/radio-group-field';\nimport type { SelectField as SelectFieldType } from './components/fields/select-field';\nimport type { SwitchField as SwitchFieldType } from './components/fields/switch-field';\nimport { TextEditorField } from './components/fields/text-editor-field';\nimport type { TextField as TextFieldType } from './components/fields/text-field';\nimport type { TextareaField as TextareaFieldType } from './components/fields/textarea-field';\nimport { fieldContext, formContext, useTanStackFieldContext, useTanStackFormContext } from './components/form-context';\nimport type { TanStackActionSubmit as TanStackActionSubmitType } from './components/forms/action-submit';\nimport type { TanStackActionsForm as TanStackActionsFormType } from './components/forms/actions-form';\nimport type { TanStackCardForm as TanStackCardFormType } from './components/forms/card-form';\nimport type { TanStackContainerForm as TanStackContainerFormType } from './components/forms/container-form';\nimport type { TanStackDialogForm as TanStackDialogFormType } from './components/forms/dialog-form';\nimport type { TanStackFieldGroup as TanStackFieldGroupType } from './components/forms/group-field';\nimport type { TanStackPopoverForm as TanStackPopoverFormType } from './components/forms/popover-form';\nimport type { TanStackSectionForm as TanStackSectionFormType } from './components/forms/section-form';\nimport type { TanStackTitleField as TanStackTitleFieldType } from './components/forms/title-field';\nimport type {\n FieldContentMain as FieldContentMainType,\n FieldContent as FieldContentType,\n FieldError as FieldErrorType,\n FieldGroup as FieldGroupType,\n FieldLabel as FieldLabelType,\n FieldSeparator as FieldSeparatorType,\n Field as FieldType,\n} from './components/ui/field';\n\n/** Input-shaped pulse placeholder shown while a lazy field/form chunk is still loading. */\nfunction FieldSkeleton() {\n return <Skeleton data-slot=\"tanstack-field-skeleton\" className=\"h-9 w-full rounded\" />;\n}\n\n/**\n * Wraps a `lazy()`-loaded component in its own `Suspense` boundary so it can be dropped\n * anywhere (inside or outside our own form containers) without callers needing to set up\n * Suspense themselves. Keeps this file itself small — the heavy per-field-type\n * implementations (Radix Select/Combobox/date-picker, the rich text editor, etc.) only load\n * when a form actually renders that field type.\n */\nfunction lazyField<P extends object>(loader: () => Promise<{ default: ComponentType<P> }>): ComponentType<P> {\n const LazyComponent = lazy(loader);\n return (props: P) => (\n <Suspense fallback={<FieldSkeleton />}>\n <LazyComponent {...props} />\n </Suspense>\n );\n}\n\n// ─── Rich field components (lazy) ─────────────────────────────────────────────\n\nconst TextField = lazyField<ComponentProps<typeof TextFieldType>>(() => import('./components/fields/text-field').then(m => ({ default: m.TextField })));\nconst TextareaField = lazyField<ComponentProps<typeof TextareaFieldType>>(() =>\n import('./components/fields/textarea-field').then(m => ({ default: m.TextareaField }))\n);\nconst NumberField = lazyField<ComponentProps<typeof NumberFieldType>>(() => import('./components/fields/number-field').then(m => ({ default: m.NumberField })));\nconst EmailField = lazyField<ComponentProps<typeof EmailFieldType>>(() => import('./components/fields/email-field').then(m => ({ default: m.EmailField })));\nconst PasswordField = lazyField<ComponentProps<typeof PasswordFieldType>>(() =>\n import('./components/fields/password-field').then(m => ({ default: m.PasswordField }))\n);\nconst SelectField = lazyField<ComponentProps<typeof SelectFieldType>>(() => import('./components/fields/select-field').then(m => ({ default: m.SelectField })));\nconst ComboboxField = lazyField<ComponentProps<typeof ComboboxFieldType>>(() =>\n import('./components/fields/combobox-field').then(m => ({ default: m.ComboboxField }))\n);\nconst DateField = lazyField<ComponentProps<typeof DateFieldType>>(() => import('./components/fields/date-field').then(m => ({ default: m.DateField })));\nconst SwitchField = lazyField<ComponentProps<typeof SwitchFieldType>>(() => import('./components/fields/switch-field').then(m => ({ default: m.SwitchField })));\nconst RadioGroupField = lazyField<ComponentProps<typeof RadioGroupFieldType>>(() =>\n import('./components/fields/radio-group-field').then(m => ({ default: m.RadioGroupField }))\n);\nconst CheckboxField = lazyField<ComponentProps<typeof CheckboxFieldType>>(() =>\n import('./components/fields/checkbox-field').then(m => ({ default: m.CheckboxField }))\n);\n\n// ─── Simple (minimal) field components (lazy) ─────────────────────────────────\n\nconst SimpleTextField = lazyField<ComponentProps<typeof SimpleTextFieldType>>(() =>\n import('./components/atoms/simple-text-field').then(m => ({ default: m.SimpleTextField }))\n);\nconst SimpleEmailField = lazyField<ComponentProps<typeof SimpleEmailFieldType>>(() =>\n import('./components/atoms/simple-email-field').then(m => ({ default: m.SimpleEmailField }))\n);\nconst SimplePasswordField = lazyField<ComponentProps<typeof SimplePasswordFieldType>>(() =>\n import('./components/atoms/simple-password-field').then(m => ({ default: m.SimplePasswordField }))\n);\nconst SimpleTextareaField = lazyField<ComponentProps<typeof SimpleTextareaFieldType>>(() =>\n import('./components/atoms/simple-textarea-field').then(m => ({ default: m.SimpleTextareaField }))\n);\nconst SimpleNumberField = lazyField<ComponentProps<typeof SimpleNumberFieldType>>(() =>\n import('./components/atoms/simple-number-field').then(m => ({ default: m.SimpleNumberField }))\n);\nconst SimpleSelectField = lazyField<ComponentProps<typeof SimpleSelectFieldType>>(() =>\n import('./components/atoms/simple-select-field').then(m => ({ default: m.SimpleSelectField }))\n);\nconst LazySimpleArrayField = lazy(() =>\n import('./components/atoms/simple-array-field').then(m => ({ default: m.SimpleArrayField as ComponentType<SimpleArrayFieldProps<unknown>> }))\n);\n\n/** Kept as its own generic wrapper (instead of `lazyField`) so callers can still write `<SimpleArrayField<Row> />`. */\nfunction SimpleArrayField<T>(props: SimpleArrayFieldProps<T>) {\n const Impl = LazySimpleArrayField as ComponentType<SimpleArrayFieldProps<T>>;\n return (\n <Suspense fallback={<FieldSkeleton />}>\n <Impl {...props} />\n </Suspense>\n );\n}\n\nconst SimpleBooleanField = lazyField<ComponentProps<typeof SimpleBooleanFieldType>>(() =>\n import('./components/atoms/simple-boolean-field').then(m => ({ default: m.SimpleBooleanField }))\n);\nconst SimpleComboboxField = lazyField<ComponentProps<typeof SimpleComboboxFieldType>>(() =>\n import('./components/atoms/simple-combobox-field').then(m => ({ default: m.SimpleComboboxField }))\n);\nconst SimpleDateField = lazyField<ComponentProps<typeof SimpleDateFieldType>>(() =>\n import('./components/atoms/simple-date-field').then(m => ({ default: m.SimpleDateField }))\n);\nconst SimpleRadioGroupField = lazyField<ComponentProps<typeof SimpleRadioGroupFieldType>>(() =>\n import('./components/atoms/simple-radio-group-field').then(m => ({ default: m.SimpleRadioGroupField }))\n);\n\n// ─── Array field layout helpers (lazy, co-located with SimpleArrayField) ──────\n\nconst ArrayCol = lazyField<ComponentProps<typeof ArrayColType>>(() => import('./components/atoms/simple-array-field').then(m => ({ default: m.ArrayCol })));\nconst ArrayHeaderRow = lazyField<ComponentProps<typeof ArrayHeaderRowType>>(() =>\n import('./components/atoms/simple-array-field').then(m => ({ default: m.ArrayHeaderRow }))\n);\n\n// ─── Form containers (lazy) ───────────────────────────────────────────────────\n\nconst TanStackDialogForm = lazyField<ComponentProps<typeof TanStackDialogFormType>>(() =>\n import('./components/forms/dialog-form').then(m => ({ default: m.TanStackDialogForm }))\n);\nconst TanStackPopoverForm = lazyField<ComponentProps<typeof TanStackPopoverFormType>>(() =>\n import('./components/forms/popover-form').then(m => ({ default: m.TanStackPopoverForm }))\n);\nconst TanStackContainerForm = lazyField<ComponentProps<typeof TanStackContainerFormType>>(() =>\n import('./components/forms/container-form').then(m => ({ default: m.TanStackContainerForm }))\n);\nconst TanStackSectionForm = lazyField<ComponentProps<typeof TanStackSectionFormType>>(() =>\n import('./components/forms/section-form').then(m => ({ default: m.TanStackSectionForm }))\n);\nconst TanStackCardForm = lazyField<ComponentProps<typeof TanStackCardFormType>>(() =>\n import('./components/forms/card-form').then(m => ({ default: m.TanStackCardForm }))\n);\nconst TanStackFieldGroup = lazyField<ComponentProps<typeof TanStackFieldGroupType>>(() =>\n import('./components/forms/group-field').then(m => ({ default: m.TanStackFieldGroup }))\n);\nconst TanStackTitleField = lazyField<ComponentProps<typeof TanStackTitleFieldType>>(() =>\n import('./components/forms/title-field').then(m => ({ default: m.TanStackTitleField }))\n);\nconst TanStackActionsForm = lazyField<ComponentProps<typeof TanStackActionsFormType>>(() =>\n import('./components/forms/actions-form').then(m => ({ default: m.TanStackActionsForm }))\n);\nconst TanStackActionSubmit = lazyField<ComponentProps<typeof TanStackActionSubmitType>>(() =>\n import('./components/forms/action-submit').then(m => ({ default: m.TanStackActionSubmit }))\n);\n\n// ─── Field UI primitives (lazy) ───────────────────────────────────────────────\n\nconst FieldGroup = lazyField<ComponentProps<typeof FieldGroupType>>(() => import('./components/ui/field').then(m => ({ default: m.FieldGroup })));\nconst Field = lazyField<ComponentProps<typeof FieldType>>(() => import('./components/ui/field').then(m => ({ default: m.Field })));\nconst FieldContent = lazyField<ComponentProps<typeof FieldContentType>>(() => import('./components/ui/field').then(m => ({ default: m.FieldContent })));\nconst FieldLabel = lazyField<ComponentProps<typeof FieldLabelType>>(() => import('./components/ui/field').then(m => ({ default: m.FieldLabel })));\nconst FieldContentMain = lazyField<ComponentProps<typeof FieldContentMainType>>(() =>\n import('./components/ui/field').then(m => ({ default: m.FieldContentMain }))\n);\nconst FieldSeparator = lazyField<ComponentProps<typeof FieldSeparatorType>>(() => import('./components/ui/field').then(m => ({ default: m.FieldSeparator })));\nconst FieldError = lazyField<ComponentProps<typeof FieldErrorType>>(() => import('./components/ui/field').then(m => ({ default: m.FieldError })));\n\n/**\n * Factory result from {@link createFormHook} pre-wired with all Lunas UI field and form components.\n *\n * ### `useTanStackForm`\n * Pre-configured TanStack Form hook that returns a type-safe form instance bound to all Lunas UI\n * field and form components.\n *\n * @example\n * import { useTanStackForm } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * const form = useTanStackForm({\n * defaultValues: { name: '', email: '' },\n * onSubmit: async ({ value }) => console.log(value),\n * });\n *\n * return (\n * <form.Provider>\n * <form.AppForm>\n * <form.AppField name=\"name\" children={(field) => <field.TextField label=\"Name\" />} />\n * <form.Subscribe selector={(s) => s.canSubmit}>\n * {(canSubmit) => <form.TanStackActionSubmit disabled={!canSubmit} />}\n * </form.Subscribe>\n * </form.AppForm>\n * </form.Provider>\n * );\n *\n * ### `withTanStackForm`\n * Higher-order component that wraps a sub-form component with access to the parent\n * `useTanStackForm` form context, enabling isolated field groups that still participate in the\n * top-level form state.\n *\n * @example\n * import { withTanStackForm } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * const AddressFields = withTanStackForm(\n * { street: '', city: '' } as const,\n * ({ form }) => (\n * <>\n * <form.AppField name=\"street\" children={(f) => <f.TextField label=\"Street\" />} />\n * <form.AppField name=\"city\" children={(f) => <f.TextField label=\"City\" />} />\n * </>\n * ),\n * );\n *\n * ### `withTanStackFieldGroup`\n * Higher-order component that creates a reusable field-group component sharing the enclosing\n * `useTanStackForm` context without requiring additional form providers.\n *\n * @example\n * import { withTanStackFieldGroup } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * const ContactGroup = withTanStackFieldGroup(({ form }) => (\n * <form.AppField name=\"phone\" children={(f) => <f.TextField label=\"Phone\" />} />\n * ));\n */\nconst {\n useAppForm: useTanStackForm,\n withForm: withTanStackForm,\n withFieldGroup: withTanStackFieldGroup,\n} = createFormHook({\n fieldContext,\n formContext,\n\n fieldComponents: {\n TextField,\n TextareaField,\n TextEditorField,\n NumberField,\n EmailField,\n PasswordField,\n\n SelectField,\n ComboboxField,\n DateField,\n SwitchField,\n RadioGroupField,\n CheckboxField,\n\n SimpleTextField,\n SimpleEmailField,\n SimplePasswordField,\n SimpleTextareaField,\n SimpleNumberField,\n SimpleSelectField,\n SimpleArrayField,\n SimpleBooleanField,\n SimpleComboboxField,\n SimpleDateField,\n SimpleRadioGroupField,\n\n FieldGroup,\n Field,\n FieldContent,\n FieldLabel,\n FieldContentMain,\n FieldSeparator,\n FieldError,\n },\n formComponents: {\n TanStackDialogForm,\n TanStackPopoverForm,\n TanStackContainerForm,\n TanStackSectionForm,\n TanStackCardForm,\n TanStackFieldGroup,\n TanStackTitleField,\n\n TanStackActionsForm,\n TanStackActionSubmit,\n\n ArrayCol,\n ArrayHeaderRow,\n },\n});\n\nexport {\n // Array helpers\n ArrayCol,\n ArrayHeaderRow,\n CheckboxField,\n ComboboxField,\n DateField,\n EmailField,\n Field,\n FieldContent,\n FieldContentMain,\n FieldError,\n // Field UI primitives\n FieldGroup,\n FieldLabel,\n FieldSeparator,\n NumberField,\n PasswordField,\n RadioGroupField,\n SelectField,\n SimpleArrayField,\n SimpleBooleanField,\n SimpleComboboxField,\n SimpleDateField,\n SimpleEmailField,\n SimpleNumberField,\n SimplePasswordField,\n SimpleRadioGroupField,\n SimpleSelectField,\n SimpleTextareaField,\n // Simple (minimal) field components\n SimpleTextField,\n SwitchField,\n TanStackActionSubmit,\n // Form actions\n TanStackActionsForm,\n TanStackCardForm,\n TanStackContainerForm,\n // Form containers\n TanStackDialogForm,\n TanStackFieldGroup,\n TanStackPopoverForm,\n TanStackSectionForm,\n TanStackTitleField,\n TextareaField,\n TextEditorField,\n // Rich field components\n TextField,\n useTanStackFieldContext,\n // Hooks & HOCs\n useTanStackForm,\n useTanStackFormContext,\n withTanStackFieldGroup,\n withTanStackForm,\n};\n"],"mappings":"0xBASA,KAAa,CAAE,eAAc,cAAa,gBAAiB,EAAyB,eAAgB,GAA2B,EAAuB,ECKtJ,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,EAbN,SAAA,CAeE,EAAC,OAAD,CAAM,UAAU,0BAA2B,UAAe,CAAA,EAC1D,EAAC,OAAD,CACE,YAAU,qBACV,UAAU,4GACX,SAAA,UAEK,CAAA,CACa,GAEzB,sPC1BA,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,MAAMC,EA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,uBACA,wBAEA,YACA,iBACF,CACF,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime-DWNI8pZO.cjs"),t=require("./ui/skeleton.cjs"),n=require("./ui/tooltip.cjs"),r=require("./text-editor-DWZf3yrW.cjs"),i=require("./ui/separator.cjs");let a=require("lucide-react"),o=require("react"),s=require("@customafk/react-toolkit/utils"),c=require("class-variance-authority"),l=require("react/jsx-runtime"),u=require("radix-ui"),d=require("@tanstack/react-form");const{fieldContext:f,formContext:p,useFieldContext:m,useFormContext:h}=(0,d.createFormHookContexts)();function g({className:e,children:t,...n}){return(0,l.jsxs)(u.Label.Root,{"data-slot":`label`,className:(0,s.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,l.jsx)(`span`,{className:`flex items-center gap-1`,children:t}),(0,l.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`})]})}var _=e.t({Field:()=>S,FieldContent:()=>C,FieldContentMain:()=>w,FieldDescription:()=>D,FieldError:()=>j,FieldGroup:()=>x,FieldLabel:()=>T,FieldLegend:()=>b,FieldNote:()=>O,FieldSeparator:()=>A,FieldSet:()=>y,FieldTitle:()=>E,FieldTooltip:()=>k});const v=(0,c.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`}}),y=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(`fieldset`,{"data-slot":`field-set`,className:(0,s.cn)(`flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));y.displayName=`FieldSet`;const b=(0,o.memo)(({className:e,variant:t=`legend`,...n})=>(0,l.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:(0,s.cn)(`mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n}));b.displayName=`FieldLegend`;const x=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(`div`,{"data-slot":`field-group`,className:(0,s.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}));x.displayName=`FieldGroup`;const S=(0,o.memo)(({className:e,orientation:t=`vertical`,...n})=>(0,l.jsx)(`div`,{"data-slot":`field`,"data-orientation":t,className:(0,s.cn)(v({orientation:t}),e),...n}));S.displayName=`Field`;const C=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(`div`,{"data-slot":`field-content`,className:(0,s.cn)(`group/field-content flex flex-col gap-1.5 leading-snug`,e),...t}));C.displayName=`FieldContent`;const w=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(`div`,{"data-slot":`field-content-main`,className:(0,s.cn)(`relative`,e),...t}));w.displayName=`FieldContentMain`;const T=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(g,{"data-slot":`field-label`,className:(0,s.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}));T.displayName=`FieldLabel`;const E=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(`div`,{"data-slot":`field-label`,className:(0,s.cn)(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));E.displayName=`FieldTitle`;const D=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(`p`,{"data-slot":`field-description`,className:(0,s.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}));D.displayName=`FieldDescription`;const O=(0,o.memo)(({isShow:e=!0,className:t,children:n,...r})=>e===!1?null:(0,l.jsxs)(`div`,{"data-slot":`field-note`,className:(0,s.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),...r,children:[(0,l.jsx)(a.InfoIcon,{size:12,className:`mt-0.5 shrink-0 text-primary/70`}),(0,l.jsx)(`span`,{children:n})]}));O.displayName=`FieldNote`;const k=(0,o.memo)(({tooltip:e})=>(0,l.jsxs)(n.Tooltip,{children:[(0,l.jsx)(n.TooltipTrigger,{asChild:!0,children:(0,l.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,l.jsx)(a.HelpCircleIcon,{size:13,"aria-hidden":`true`}),(0,l.jsx)(`span`,{className:`sr-only`,children:`Thêm thông tin`})]})}),(0,l.jsx)(n.TooltipContent,{side:`top`,className:`max-w-xs text-balance`,children:e})]}));k.displayName=`FieldTooltip`;const A=(0,o.memo)(({children:e,className:t,...n})=>(0,l.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:(0,s.cn)(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,t),...n,children:[(0,l.jsx)(i.Separator,{className:`absolute inset-0 top-1/2`}),e&&(0,l.jsx)(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));A.displayName=`FieldSeparator`;const j=(0,o.memo)(({className:e,children:t,errors:n,requiredMessage:r=`Trường này là bắt buộc`,...i})=>{let a=(0,o.useMemo)(()=>{let e=e=>e.code===`invalid_type`?r:e.message;return t||(n?n?.length===1&&n[0]?.message?(0,l.jsx)(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:(0,l.jsx)(`p`,{children:e(n[0])})}):(0,l.jsx)(`ul`,{className:`flex list-none flex-col`,children:n.map(t=>typeof t==`string`?(0,l.jsx)(`li`,{children:t},t):t?.message?(0,l.jsx)(`li`,{children:e(t)},t.code??t.message):null)}):null)},[t,n,r]);return a?(0,l.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:(0,s.cn)(`w-full font-medium text-danger-strong text-xs`,e),...i,children:a}):null});j.displayName=`FieldError`;const M=(0,o.memo)(({label:e,description:t,placeholder:n,tooltip:i,helperText:a,showErrorMessage:s=!0,required:c=!1,maxLength:u,showCharacterCount:f,enableLink:p,enableBubbleMenu:h,enableTaskList:g,enableHighlight:_,enableColor:v,enableImage:y,enableTable:b,enableSlashCommand:w,onImageUpload:E,variant:M,size:N})=>{let{form:P,state:F,handleChange:I}=m(),L=(0,d.useStore)(P.store,({isSubmitting:e})=>e),R=F.meta.isDirty&&F.meta.isTouched&&!F.meta.isValid,z=c&&F.value===null,B=(0,o.useCallback)(e=>{L||I(e||null)},[L,I]);return(0,l.jsxs)(x,{className:`gap-y-4 px-4`,children:[(0,l.jsxs)(S,{orientation:`vertical`,"data-invalid":R,children:[(0,l.jsxs)(C,{children:[(0,l.jsxs)(T,{"aria-required":z,children:[e,i&&(0,l.jsx)(k,{tooltip:i})]}),(0,l.jsx)(D,{children:t})]}),(0,l.jsx)(r.t,{value:F.value??``,placeholder:n,readOnly:L,onChange:B,maxLength:u,showCharacterCount:f,enableLink:p,enableBubbleMenu:h,enableTaskList:g,enableHighlight:_,enableColor:v,enableImage:y,enableTable:b,enableSlashCommand:w,onImageUpload:E,variant:M,size:N}),F.meta.isDirty&&s&&!!F.meta.errors.length&&(0,l.jsx)(j,{errors:F.meta.errors}),(0,l.jsx)(O,{isShow:!!a,children:a})]}),(0,l.jsx)(A,{})]})});M.displayName=`TextEditorField`;function N(){return(0,l.jsx)(t.Skeleton,{"data-slot":`tanstack-field-skeleton`,className:`h-9 w-full rounded`})}function P(e){let t=(0,o.lazy)(e);return e=>(0,l.jsx)(o.Suspense,{fallback:(0,l.jsx)(N,{}),children:(0,l.jsx)(t,{...e})})}const F=P(()=>Promise.resolve().then(()=>require("./text-field-D9CYYDKM.cjs")).then(e=>({default:e.TextField}))),I=P(()=>Promise.resolve().then(()=>require("./textarea-field-CRf0M2Eb.cjs")).then(e=>({default:e.TextareaField}))),L=P(()=>Promise.resolve().then(()=>require("./number-field-CMskIrWP.cjs")).then(e=>({default:e.NumberField}))),R=P(()=>Promise.resolve().then(()=>require("./email-field-0UjeYtnM.cjs")).then(e=>({default:e.EmailField}))),z=P(()=>Promise.resolve().then(()=>require("./password-field-BxJqTPhN.cjs")).then(e=>({default:e.PasswordField}))),B=P(()=>Promise.resolve().then(()=>require("./select-field-Ce53hZ3J.cjs")).then(e=>({default:e.SelectField}))),V=P(()=>Promise.resolve().then(()=>require("./combobox-field-ROYquFD8.cjs")).then(e=>({default:e.ComboboxField}))),H=P(()=>Promise.resolve().then(()=>require("./date-field-46UtGmEV.cjs")).then(e=>({default:e.DateField}))),U=P(()=>Promise.resolve().then(()=>require("./switch-field-CsI6eXJu.cjs")).then(e=>({default:e.SwitchField}))),W=P(()=>Promise.resolve().then(()=>require("./radio-group-field-gHNAwrdr.cjs")).then(e=>({default:e.RadioGroupField}))),G=P(()=>Promise.resolve().then(()=>require("./checkbox-field-BG35eKvM.cjs")).then(e=>({default:e.CheckboxField}))),K=P(()=>Promise.resolve().then(()=>require("./simple-text-field-zFJt_99J.cjs")).then(e=>({default:e.SimpleTextField}))),q=P(()=>Promise.resolve().then(()=>require("./simple-email-field-BTYqiFp8.cjs")).then(e=>({default:e.SimpleEmailField}))),J=P(()=>Promise.resolve().then(()=>require("./simple-password-field-BaeUvVB1.cjs")).then(e=>({default:e.SimplePasswordField}))),Y=P(()=>Promise.resolve().then(()=>require("./simple-textarea-field-DyQZEDTe.cjs")).then(e=>({default:e.SimpleTextareaField}))),X=P(()=>Promise.resolve().then(()=>require("./simple-number-field-CTFyTMgw.cjs")).then(e=>({default:e.SimpleNumberField}))),Z=P(()=>Promise.resolve().then(()=>require("./simple-select-field-C8vmeHbL.cjs")).then(e=>({default:e.SimpleSelectField}))),ee=(0,o.lazy)(()=>Promise.resolve().then(()=>require("./simple-array-field-BAR4MjDR.cjs")).then(e=>({default:e.SimpleArrayField})));function Q(e){return(0,l.jsx)(o.Suspense,{fallback:(0,l.jsx)(N,{}),children:(0,l.jsx)(ee,{...e})})}const te=P(()=>Promise.resolve().then(()=>require("./simple-boolean-field-36jmOxCR.cjs")).then(e=>({default:e.SimpleBooleanField}))),$=P(()=>Promise.resolve().then(()=>require("./simple-combobox-field-BPDtPj1W.cjs")).then(e=>({default:e.SimpleComboboxField}))),ne=P(()=>Promise.resolve().then(()=>require("./simple-date-field-DUPnGa5d.cjs")).then(e=>({default:e.SimpleDateField}))),re=P(()=>Promise.resolve().then(()=>require("./simple-radio-group-field-DiU4eQ_c.cjs")).then(e=>({default:e.SimpleRadioGroupField}))),ie=P(()=>Promise.resolve().then(()=>require("./simple-array-field-BAR4MjDR.cjs")).then(e=>({default:e.ArrayCol}))),ae=P(()=>Promise.resolve().then(()=>require("./simple-array-field-BAR4MjDR.cjs")).then(e=>({default:e.ArrayHeaderRow}))),oe=P(()=>Promise.resolve().then(()=>require("./dialog-form-X9MxC8pq.cjs")).then(e=>({default:e.TanStackDialogForm}))),se=P(()=>Promise.resolve().then(()=>require("./popover-form-CdXVFl0t.cjs")).then(e=>({default:e.TanStackPopoverForm}))),ce=P(()=>Promise.resolve().then(()=>require("./container-form-D8QNEn8M.cjs")).then(e=>({default:e.TanStackContainerForm}))),le=P(()=>Promise.resolve().then(()=>require("./section-form-C_pHiBEW.cjs")).then(e=>({default:e.TanStackSectionForm}))),ue=P(()=>Promise.resolve().then(()=>require("./card-form-BR5kDTzB.cjs")).then(e=>({default:e.TanStackCardForm}))),de=P(()=>Promise.resolve().then(()=>require("./group-field-DJXL9sRy.cjs")).then(e=>({default:e.TanStackFieldGroup}))),fe=P(()=>Promise.resolve().then(()=>require("./title-field-B9LLoqIi.cjs")).then(e=>({default:e.TanStackTitleField}))),pe=P(()=>Promise.resolve().then(()=>require("./actions-form-X46W7FVa.cjs")).then(e=>({default:e.TanStackActionsForm}))),me=P(()=>Promise.resolve().then(()=>require("./action-submit-tpgKvZ47.cjs")).then(e=>({default:e.TanStackActionSubmit}))),he=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.FieldGroup}))),ge=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.Field}))),_e=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.FieldContent}))),ve=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.FieldLabel}))),ye=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.FieldContentMain}))),be=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.FieldSeparator}))),xe=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.FieldError}))),{useAppForm:Se,withForm:Ce,withFieldGroup:we}=(0,d.createFormHook)({fieldContext:f,formContext:p,fieldComponents:{TextField:F,TextareaField:I,TextEditorField:M,NumberField:L,EmailField:R,PasswordField:z,SelectField:B,ComboboxField:V,DateField:H,SwitchField:U,RadioGroupField:W,CheckboxField:G,SimpleTextField:K,SimpleEmailField:q,SimplePasswordField:J,SimpleTextareaField:Y,SimpleNumberField:X,SimpleSelectField:Z,SimpleArrayField:Q,SimpleBooleanField:te,SimpleComboboxField:$,SimpleDateField:ne,SimpleRadioGroupField:re,FieldGroup:he,Field:ge,FieldContent:_e,FieldLabel:ve,FieldContentMain:ye,FieldSeparator:be,FieldError:xe},formComponents:{TanStackDialogForm:oe,TanStackPopoverForm:se,TanStackContainerForm:ce,TanStackSectionForm:le,TanStackCardForm:ue,TanStackFieldGroup:de,TanStackTitleField:fe,TanStackActionsForm:pe,TanStackActionSubmit:me,ArrayCol:ie,ArrayHeaderRow:ae}});Object.defineProperty(exports,"$",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,"G",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,"J",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"K",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"Q",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"W",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"X",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"Y",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"Z",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,"et",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"it",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,"nt",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,"q",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"rt",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,"tt",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return F}});
|
|
2
|
-
//# sourceMappingURL=tanstack-form-
|
|
1
|
+
const e=require("./rolldown-runtime-DWNI8pZO.cjs"),t=require("./ui/skeleton.cjs"),n=require("./ui/tooltip.cjs"),r=require("./text-editor-DWZf3yrW.cjs"),i=require("./ui/separator.cjs");let a=require("lucide-react"),o=require("react"),s=require("@customafk/react-toolkit/utils"),c=require("class-variance-authority"),l=require("react/jsx-runtime"),u=require("radix-ui"),d=require("@tanstack/react-form");const{fieldContext:f,formContext:p,useFieldContext:m,useFormContext:h}=(0,d.createFormHookContexts)();function g({className:e,children:t,...n}){return(0,l.jsxs)(u.Label.Root,{"data-slot":`label`,className:(0,s.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,l.jsx)(`span`,{className:`flex items-center gap-1`,children:t}),(0,l.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`})]})}var _=e.t({Field:()=>S,FieldContent:()=>C,FieldContentMain:()=>w,FieldDescription:()=>D,FieldError:()=>j,FieldGroup:()=>x,FieldLabel:()=>T,FieldLegend:()=>b,FieldNote:()=>O,FieldSeparator:()=>A,FieldSet:()=>y,FieldTitle:()=>E,FieldTooltip:()=>k});const v=(0,c.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`}}),y=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(`fieldset`,{"data-slot":`field-set`,className:(0,s.cn)(`flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));y.displayName=`FieldSet`;const b=(0,o.memo)(({className:e,variant:t=`legend`,...n})=>(0,l.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:(0,s.cn)(`mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n}));b.displayName=`FieldLegend`;const x=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(`div`,{"data-slot":`field-group`,className:(0,s.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}));x.displayName=`FieldGroup`;const S=(0,o.memo)(({className:e,orientation:t=`vertical`,...n})=>(0,l.jsx)(`div`,{"data-slot":`field`,"data-orientation":t,className:(0,s.cn)(v({orientation:t}),e),...n}));S.displayName=`Field`;const C=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(`div`,{"data-slot":`field-content`,className:(0,s.cn)(`group/field-content flex flex-col gap-1.5 leading-snug`,e),...t}));C.displayName=`FieldContent`;const w=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(`div`,{"data-slot":`field-content-main`,className:(0,s.cn)(`relative`,e),...t}));w.displayName=`FieldContentMain`;const T=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(g,{"data-slot":`field-label`,className:(0,s.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}));T.displayName=`FieldLabel`;const E=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(`div`,{"data-slot":`field-label`,className:(0,s.cn)(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));E.displayName=`FieldTitle`;const D=(0,o.memo)(({className:e,...t})=>(0,l.jsx)(`p`,{"data-slot":`field-description`,className:(0,s.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}));D.displayName=`FieldDescription`;const O=(0,o.memo)(({isShow:e=!0,className:t,children:n,...r})=>e===!1?null:(0,l.jsxs)(`div`,{"data-slot":`field-note`,className:(0,s.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),...r,children:[(0,l.jsx)(a.InfoIcon,{size:12,className:`mt-0.5 shrink-0 text-primary/70`}),(0,l.jsx)(`span`,{children:n})]}));O.displayName=`FieldNote`;const k=(0,o.memo)(({tooltip:e})=>(0,l.jsxs)(n.Tooltip,{children:[(0,l.jsx)(n.TooltipTrigger,{asChild:!0,children:(0,l.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,l.jsx)(a.HelpCircleIcon,{size:13,"aria-hidden":`true`}),(0,l.jsx)(`span`,{className:`sr-only`,children:`Thêm thông tin`})]})}),(0,l.jsx)(n.TooltipContent,{side:`top`,className:`max-w-xs text-balance`,children:e})]}));k.displayName=`FieldTooltip`;const A=(0,o.memo)(({children:e,className:t,...n})=>(0,l.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:(0,s.cn)(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,t),...n,children:[(0,l.jsx)(i.Separator,{className:`absolute inset-0 top-1/2`}),e&&(0,l.jsx)(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));A.displayName=`FieldSeparator`;const j=(0,o.memo)(({className:e,children:t,errors:n,requiredMessage:r=`Trường này là bắt buộc`,...i})=>{let a=(0,o.useMemo)(()=>{let e=e=>e.code===`invalid_type`?r:e.message;return t||(n?n?.length===1&&n[0]?.message?(0,l.jsx)(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:(0,l.jsx)(`p`,{children:e(n[0])})}):(0,l.jsx)(`ul`,{className:`flex list-none flex-col`,children:n.map(t=>typeof t==`string`?(0,l.jsx)(`li`,{children:t},t):t?.message?(0,l.jsx)(`li`,{children:e(t)},t.code??t.message):null)}):null)},[t,n,r]);return a?(0,l.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:(0,s.cn)(`w-full font-medium text-danger-strong text-xs`,e),...i,children:a}):null});j.displayName=`FieldError`;const M=(0,o.memo)(({label:e,description:t,placeholder:n,tooltip:i,helperText:a,showErrorMessage:s=!0,required:c=!1,maxLength:u,showCharacterCount:f,enableLink:p,enableBubbleMenu:h,enableTaskList:g,enableHighlight:_,enableColor:v,enableImage:y,enableTable:b,enableSlashCommand:w,onImageUpload:E,variant:M,size:N})=>{let{form:P,state:F,handleChange:I}=m(),L=(0,d.useStore)(P.store,({isSubmitting:e})=>e),R=F.meta.isDirty&&F.meta.isTouched&&!F.meta.isValid,z=c&&F.value===null,B=(0,o.useCallback)(e=>{L||I(e||null)},[L,I]);return(0,l.jsxs)(x,{className:`gap-y-4 px-4`,children:[(0,l.jsxs)(S,{orientation:`vertical`,"data-invalid":R,children:[(0,l.jsxs)(C,{children:[(0,l.jsxs)(T,{"aria-required":z,children:[e,i&&(0,l.jsx)(k,{tooltip:i})]}),(0,l.jsx)(D,{children:t})]}),(0,l.jsx)(r.t,{value:F.value??``,placeholder:n,readOnly:L,onChange:B,maxLength:u,showCharacterCount:f,enableLink:p,enableBubbleMenu:h,enableTaskList:g,enableHighlight:_,enableColor:v,enableImage:y,enableTable:b,enableSlashCommand:w,onImageUpload:E,variant:M,size:N}),F.meta.isDirty&&s&&!!F.meta.errors.length&&(0,l.jsx)(j,{errors:F.meta.errors}),(0,l.jsx)(O,{isShow:!!a,children:a})]}),(0,l.jsx)(A,{})]})});M.displayName=`TextEditorField`;function N(){return(0,l.jsx)(t.Skeleton,{"data-slot":`tanstack-field-skeleton`,className:`h-9 w-full rounded`})}function P(e){let t=(0,o.lazy)(e);return e=>(0,l.jsx)(o.Suspense,{fallback:(0,l.jsx)(N,{}),children:(0,l.jsx)(t,{...e})})}const F=P(()=>Promise.resolve().then(()=>require("./text-field-DMZZ6CND.cjs")).then(e=>({default:e.TextField}))),I=P(()=>Promise.resolve().then(()=>require("./textarea-field-BmImMdg-.cjs")).then(e=>({default:e.TextareaField}))),L=P(()=>Promise.resolve().then(()=>require("./number-field-BjGl_IiN.cjs")).then(e=>({default:e.NumberField}))),R=P(()=>Promise.resolve().then(()=>require("./email-field-CqXXRG3w.cjs")).then(e=>({default:e.EmailField}))),z=P(()=>Promise.resolve().then(()=>require("./password-field-Be0Ltlxh.cjs")).then(e=>({default:e.PasswordField}))),B=P(()=>Promise.resolve().then(()=>require("./select-field-UWnBMAzL.cjs")).then(e=>({default:e.SelectField}))),V=P(()=>Promise.resolve().then(()=>require("./combobox-field-D7cZ8fhZ.cjs")).then(e=>({default:e.ComboboxField}))),H=P(()=>Promise.resolve().then(()=>require("./date-field-Dm367ro9.cjs")).then(e=>({default:e.DateField}))),U=P(()=>Promise.resolve().then(()=>require("./switch-field-CCDuDdpf.cjs")).then(e=>({default:e.SwitchField}))),W=P(()=>Promise.resolve().then(()=>require("./radio-group-field-BCJWamjd.cjs")).then(e=>({default:e.RadioGroupField}))),G=P(()=>Promise.resolve().then(()=>require("./checkbox-field-CFPHAcwN.cjs")).then(e=>({default:e.CheckboxField}))),K=P(()=>Promise.resolve().then(()=>require("./simple-text-field-DPXqNCXh.cjs")).then(e=>({default:e.SimpleTextField}))),q=P(()=>Promise.resolve().then(()=>require("./simple-email-field-2Abh3qZw.cjs")).then(e=>({default:e.SimpleEmailField}))),J=P(()=>Promise.resolve().then(()=>require("./simple-password-field-Cjp6yzWd.cjs")).then(e=>({default:e.SimplePasswordField}))),Y=P(()=>Promise.resolve().then(()=>require("./simple-textarea-field-ZpXPwYz-.cjs")).then(e=>({default:e.SimpleTextareaField}))),X=P(()=>Promise.resolve().then(()=>require("./simple-number-field-BjEYE54F.cjs")).then(e=>({default:e.SimpleNumberField}))),Z=P(()=>Promise.resolve().then(()=>require("./simple-select-field-CXYJcRY2.cjs")).then(e=>({default:e.SimpleSelectField}))),ee=(0,o.lazy)(()=>Promise.resolve().then(()=>require("./simple-array-field-BSMxRilE.cjs")).then(e=>({default:e.SimpleArrayField})));function Q(e){return(0,l.jsx)(o.Suspense,{fallback:(0,l.jsx)(N,{}),children:(0,l.jsx)(ee,{...e})})}const te=P(()=>Promise.resolve().then(()=>require("./simple-boolean-field-CxAyVQ1w.cjs")).then(e=>({default:e.SimpleBooleanField}))),$=P(()=>Promise.resolve().then(()=>require("./simple-combobox-field-BP4IeDkA.cjs")).then(e=>({default:e.SimpleComboboxField}))),ne=P(()=>Promise.resolve().then(()=>require("./simple-date-field-NSawlSff.cjs")).then(e=>({default:e.SimpleDateField}))),re=P(()=>Promise.resolve().then(()=>require("./simple-radio-group-field-CuA0Q-XI.cjs")).then(e=>({default:e.SimpleRadioGroupField}))),ie=P(()=>Promise.resolve().then(()=>require("./simple-array-field-BSMxRilE.cjs")).then(e=>({default:e.ArrayCol}))),ae=P(()=>Promise.resolve().then(()=>require("./simple-array-field-BSMxRilE.cjs")).then(e=>({default:e.ArrayHeaderRow}))),oe=P(()=>Promise.resolve().then(()=>require("./dialog-form-D9Bifsx6.cjs")).then(e=>({default:e.TanStackDialogForm}))),se=P(()=>Promise.resolve().then(()=>require("./popover-form-Ba_Nw79b.cjs")).then(e=>({default:e.TanStackPopoverForm}))),ce=P(()=>Promise.resolve().then(()=>require("./container-form-D8QNEn8M.cjs")).then(e=>({default:e.TanStackContainerForm}))),le=P(()=>Promise.resolve().then(()=>require("./section-form-C_pHiBEW.cjs")).then(e=>({default:e.TanStackSectionForm}))),ue=P(()=>Promise.resolve().then(()=>require("./card-form-BR5kDTzB.cjs")).then(e=>({default:e.TanStackCardForm}))),de=P(()=>Promise.resolve().then(()=>require("./group-field-DfGPDLyp.cjs")).then(e=>({default:e.TanStackFieldGroup}))),fe=P(()=>Promise.resolve().then(()=>require("./title-field-CFnSgTGH.cjs")).then(e=>({default:e.TanStackTitleField}))),pe=P(()=>Promise.resolve().then(()=>require("./actions-form-DnlpVrgF.cjs")).then(e=>({default:e.TanStackActionsForm}))),me=P(()=>Promise.resolve().then(()=>require("./action-submit-B2qFdfi6.cjs")).then(e=>({default:e.TanStackActionSubmit}))),he=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.FieldGroup}))),ge=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.Field}))),_e=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.FieldContent}))),ve=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.FieldLabel}))),ye=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.FieldContentMain}))),be=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.FieldSeparator}))),xe=P(()=>Promise.resolve().then(()=>_).then(e=>({default:e.FieldError}))),{useAppForm:Se,withForm:Ce,withFieldGroup:we}=(0,d.createFormHook)({fieldContext:f,formContext:p,fieldComponents:{TextField:F,TextareaField:I,TextEditorField:M,NumberField:L,EmailField:R,PasswordField:z,SelectField:B,ComboboxField:V,DateField:H,SwitchField:U,RadioGroupField:W,CheckboxField:G,SimpleTextField:K,SimpleEmailField:q,SimplePasswordField:J,SimpleTextareaField:Y,SimpleNumberField:X,SimpleSelectField:Z,SimpleArrayField:Q,SimpleBooleanField:te,SimpleComboboxField:$,SimpleDateField:ne,SimpleRadioGroupField:re,FieldGroup:he,Field:ge,FieldContent:_e,FieldLabel:ve,FieldContentMain:ye,FieldSeparator:be,FieldError:xe},formComponents:{TanStackDialogForm:oe,TanStackPopoverForm:se,TanStackContainerForm:ce,TanStackSectionForm:le,TanStackCardForm:ue,TanStackFieldGroup:de,TanStackTitleField:fe,TanStackActionsForm:pe,TanStackActionSubmit:me,ArrayCol:ie,ArrayHeaderRow:ae}});Object.defineProperty(exports,"$",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,"G",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,"J",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"K",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"Q",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"W",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"X",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"Y",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"Z",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,"et",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"it",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,"nt",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,"q",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"rt",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,"tt",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return F}});
|
|
2
|
+
//# sourceMappingURL=tanstack-form-DCB2addt.cjs.map
|