@customafk/lunas-ui 0.2.11 → 0.2.12

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.
Files changed (220) hide show
  1. package/dist/{alert-C1YY0oUh.d.mts → alert-Bi9GgWBf.d.cts} +7 -7
  2. package/dist/{alert-CI3ANQHC.d.cts → alert-DBdAWJoD.d.mts} +8 -8
  3. package/dist/{alert-DQHE-pdI.mjs → alert-DjfDTXIK.mjs} +1 -1
  4. package/dist/{alert-DQHE-pdI.mjs.map → alert-DjfDTXIK.mjs.map} +1 -1
  5. package/dist/{alert-BqJVf4wD.cjs → alert-kJbUcjIR.cjs} +1 -1
  6. package/dist/{alert-BqJVf4wD.cjs.map → alert-kJbUcjIR.cjs.map} +1 -1
  7. package/dist/{badge-DXeJVvRU.d.mts → badge-BrBsWjjy.d.mts} +7 -7
  8. package/dist/{badge-PKOZAtox.d.cts → badge-OocBN04L.d.cts} +5 -5
  9. package/dist/{button-BwvdZSJE.d.cts → button-Bg7LOzPN.d.cts} +5 -5
  10. package/dist/{button-BuQ09ya9.d.mts → button-CM0enIRc.d.mts} +7 -7
  11. package/dist/{calendar-B2V4Lv0T.cjs → calendar-BMXIBCsr.cjs} +1 -1
  12. package/dist/{calendar-B2V4Lv0T.cjs.map → calendar-BMXIBCsr.cjs.map} +1 -1
  13. package/dist/{calendar-Cw1G0sVL.mjs → calendar-WMJIKojX.mjs} +1 -1
  14. package/dist/{calendar-Cw1G0sVL.mjs.map → calendar-WMJIKojX.mjs.map} +1 -1
  15. package/dist/cards/simple-card.d.cts +2 -2
  16. package/dist/{cms-layout-r9TmK6hi.cjs → cms-layout-BLJpfFpE.cjs} +1 -1
  17. package/dist/{cms-layout-r9TmK6hi.cjs.map → cms-layout-BLJpfFpE.cjs.map} +1 -1
  18. package/dist/{cms-layout-Bp6rU_of.mjs → cms-layout-BYzUepEk.mjs} +1 -1
  19. package/dist/{cms-layout-Bp6rU_of.mjs.map → cms-layout-BYzUepEk.mjs.map} +1 -1
  20. package/dist/data-display/statistic.d.mts +4 -4
  21. package/dist/{dialog-CRVNgVZU.d.cts → dialog-BXi5bgG0.d.cts} +12 -12
  22. package/dist/{dialog-CiCeXhAu.d.mts → dialog-DLOes4WS.d.mts} +12 -12
  23. package/dist/dialogs/detail-dialog/components/sidebar.d.cts +27 -27
  24. package/dist/dialogs/detail-dialog/components/sidebar.d.mts +25 -25
  25. package/dist/features/descriptions/index.d.cts +1 -1
  26. package/dist/features/descriptions/index.d.mts +7 -7
  27. package/dist/features/search-modal/index.d.cts +2 -2
  28. package/dist/features/search-modal/index.d.mts +2 -2
  29. package/dist/features/tables/index.cjs +1 -1
  30. package/dist/features/tables/index.d.cts +90 -16
  31. package/dist/features/tables/index.d.mts +116 -42
  32. package/dist/features/tables/index.mjs +1 -1
  33. package/dist/features/tanstack-form/index.cjs +1 -1
  34. package/dist/features/tanstack-form/index.d.cts +1 -1
  35. package/dist/features/tanstack-form/index.d.mts +1 -1
  36. package/dist/features/tanstack-form/index.mjs +1 -1
  37. package/dist/{field-DfsTE4Ie.mjs → field-C5HOxxiX.mjs} +2 -2
  38. package/dist/{field-DfsTE4Ie.mjs.map → field-C5HOxxiX.mjs.map} +1 -1
  39. package/dist/{field-C51eJ6QN.cjs → field-D1wvj5Wj.cjs} +2 -2
  40. package/dist/{field-C51eJ6QN.cjs.map → field-D1wvj5Wj.cjs.map} +1 -1
  41. package/dist/{index-Dm0lp7bT.d.mts → index-CkmisxOx.d.cts} +282 -282
  42. package/dist/{index-C3SKVvaI.d.cts → index-Cyc9v5Az.d.mts} +46 -46
  43. package/dist/index.cjs +1 -1
  44. package/dist/index.d.cts +8 -8
  45. package/dist/index.d.mts +8 -8
  46. package/dist/index.mjs +1 -1
  47. package/dist/{input-BpZ_mAuD.d.cts → input-CvWCE7ft.d.mts} +5 -5
  48. package/dist/{input-CoHHwUwI.d.mts → input-D9N-kPNc.d.cts} +6 -6
  49. package/dist/{label-3vAlNtF9.mjs → label-COqDQDMy.mjs} +1 -1
  50. package/dist/{label-3vAlNtF9.mjs.map → label-COqDQDMy.mjs.map} +1 -1
  51. package/dist/{label-zyBJYydC.cjs → label-DYsRdKMt.cjs} +1 -1
  52. package/dist/{label-zyBJYydC.cjs.map → label-DYsRdKMt.cjs.map} +1 -1
  53. package/dist/layouts/cms-layout/index.cjs +1 -1
  54. package/dist/layouts/cms-layout/index.mjs +1 -1
  55. package/dist/layouts/flex.d.cts +4 -4
  56. package/dist/layouts/payment-layout/index.cjs +1 -1
  57. package/dist/layouts/payment-layout/index.mjs +1 -1
  58. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  59. package/dist/pages/FeatureDeveloping.d.mts +2 -2
  60. package/dist/pages/FeatureFixing.d.cts +2 -2
  61. package/dist/pages/FeatureFixing.d.mts +2 -2
  62. package/dist/pages/NotAuthorized.d.cts +2 -2
  63. package/dist/pages/NotAuthorized.d.mts +2 -2
  64. package/dist/pages/NotFound.d.mts +2 -2
  65. package/dist/{payment-layout-C9pP5HdT.cjs → payment-layout-C8_xrnVn.cjs} +1 -1
  66. package/dist/{payment-layout-C9pP5HdT.cjs.map → payment-layout-C8_xrnVn.cjs.map} +1 -1
  67. package/dist/{payment-layout-D-69gOPJ.mjs → payment-layout-CVBTGjMw.mjs} +1 -1
  68. package/dist/{payment-layout-D-69gOPJ.mjs.map → payment-layout-CVBTGjMw.mjs.map} +1 -1
  69. package/dist/{popover-CmoqhK17.cjs → popover-AEt-aSy3.cjs} +1 -1
  70. package/dist/{popover-CmoqhK17.cjs.map → popover-AEt-aSy3.cjs.map} +1 -1
  71. package/dist/{popover-BFJhuzW3.mjs → popover-OJXFbqJi.mjs} +1 -1
  72. package/dist/{popover-BFJhuzW3.mjs.map → popover-OJXFbqJi.mjs.map} +1 -1
  73. package/dist/{radio-group-D5OurBIG.mjs → radio-group-5ktXGXSv.mjs} +1 -1
  74. package/dist/{radio-group-D5OurBIG.mjs.map → radio-group-5ktXGXSv.mjs.map} +1 -1
  75. package/dist/{radio-group-DAv2EU3F.cjs → radio-group-C7FAAawm.cjs} +1 -1
  76. package/dist/{radio-group-DAv2EU3F.cjs.map → radio-group-C7FAAawm.cjs.map} +1 -1
  77. package/dist/{select-DRCKwnTV.mjs → select-DrHceSnf.mjs} +1 -1
  78. package/dist/{select-DRCKwnTV.mjs.map → select-DrHceSnf.mjs.map} +1 -1
  79. package/dist/{select-DfvSMRUq.cjs → select-DzylYFes.cjs} +1 -1
  80. package/dist/{select-DfvSMRUq.cjs.map → select-DzylYFes.cjs.map} +1 -1
  81. package/dist/tables-BQkO4mz6.cjs +4 -0
  82. package/dist/tables-BQkO4mz6.cjs.map +1 -0
  83. package/dist/tables-iT8uH25j.mjs +4 -0
  84. package/dist/tables-iT8uH25j.mjs.map +1 -0
  85. package/dist/{tanstack-form-Bb9JXuEq.cjs → tanstack-form-BUjk7DIz.cjs} +2 -2
  86. package/dist/{tanstack-form-Bb9JXuEq.cjs.map → tanstack-form-BUjk7DIz.cjs.map} +1 -1
  87. package/dist/{tanstack-form-BwyHENeF.mjs → tanstack-form-DtZdrifK.mjs} +2 -2
  88. package/dist/{tanstack-form-BwyHENeF.mjs.map → tanstack-form-DtZdrifK.mjs.map} +1 -1
  89. package/dist/{textarea-CvoBIPlJ.cjs → textarea-DZ86A_cm.cjs} +1 -1
  90. package/dist/{textarea-CvoBIPlJ.cjs.map → textarea-DZ86A_cm.cjs.map} +1 -1
  91. package/dist/{textarea-5RD9ToTV.mjs → textarea-Dd1fBf_4.mjs} +1 -1
  92. package/dist/{textarea-5RD9ToTV.mjs.map → textarea-Dd1fBf_4.mjs.map} +1 -1
  93. package/dist/typography/paragraph.d.cts +1 -1
  94. package/dist/typography/paragraph.d.mts +5 -5
  95. package/dist/typography/title.d.mts +2 -2
  96. package/dist/ui/alert-dialog.d.cts +12 -12
  97. package/dist/ui/alert-dialog.d.mts +12 -12
  98. package/dist/ui/alert.cjs +1 -1
  99. package/dist/ui/alert.d.cts +1 -1
  100. package/dist/ui/alert.d.mts +1 -1
  101. package/dist/ui/alert.mjs +1 -1
  102. package/dist/ui/aspect-ratio.d.cts +2 -2
  103. package/dist/ui/aspect-ratio.d.mts +2 -2
  104. package/dist/ui/avatar.d.cts +4 -4
  105. package/dist/ui/avatar.d.mts +4 -4
  106. package/dist/ui/badge.d.cts +1 -1
  107. package/dist/ui/badge.d.mts +1 -1
  108. package/dist/ui/breadcrumb.d.cts +8 -8
  109. package/dist/ui/breadcrumb.d.mts +8 -8
  110. package/dist/ui/button-group.d.cts +4 -4
  111. package/dist/ui/button-group.d.mts +4 -4
  112. package/dist/ui/button.d.cts +1 -1
  113. package/dist/ui/button.d.mts +1 -1
  114. package/dist/ui/calendar.cjs +1 -1
  115. package/dist/ui/calendar.d.cts +4 -4
  116. package/dist/ui/calendar.d.mts +4 -4
  117. package/dist/ui/calendar.mjs +1 -1
  118. package/dist/ui/card.d.cts +8 -8
  119. package/dist/ui/card.d.mts +8 -8
  120. package/dist/ui/carousel.d.cts +7 -7
  121. package/dist/ui/carousel.d.mts +7 -7
  122. package/dist/ui/checkbox.d.cts +2 -2
  123. package/dist/ui/checkbox.d.mts +2 -2
  124. package/dist/ui/collapsible.d.cts +4 -4
  125. package/dist/ui/collapsible.d.mts +4 -4
  126. package/dist/ui/command.d.cts +11 -11
  127. package/dist/ui/command.d.mts +11 -11
  128. package/dist/ui/context-menu.d.cts +16 -16
  129. package/dist/ui/context-menu.d.mts +16 -16
  130. package/dist/ui/dialog.d.cts +1 -1
  131. package/dist/ui/dialog.d.mts +1 -1
  132. package/dist/ui/drawer.d.cts +11 -11
  133. package/dist/ui/drawer.d.mts +11 -11
  134. package/dist/ui/dropdown-menu.d.cts +16 -16
  135. package/dist/ui/dropdown-menu.d.mts +16 -16
  136. package/dist/ui/empty.d.cts +7 -7
  137. package/dist/ui/empty.d.mts +9 -9
  138. package/dist/ui/field.cjs +1 -1
  139. package/dist/ui/field.d.mts +24 -24
  140. package/dist/ui/field.mjs +1 -1
  141. package/dist/ui/file-uploader.d.cts +2 -2
  142. package/dist/ui/file-uploader.d.mts +2 -2
  143. package/dist/ui/form.cjs +1 -1
  144. package/dist/ui/form.d.cts +7 -7
  145. package/dist/ui/form.d.mts +11 -11
  146. package/dist/ui/form.mjs +1 -1
  147. package/dist/ui/hover-card.d.cts +4 -4
  148. package/dist/ui/hover-card.d.mts +4 -4
  149. package/dist/ui/input-otp.d.cts +5 -5
  150. package/dist/ui/input-otp.d.mts +5 -5
  151. package/dist/ui/input.d.cts +1 -1
  152. package/dist/ui/input.d.mts +1 -1
  153. package/dist/ui/inputs/search-input.d.cts +3 -3
  154. package/dist/ui/inputs/search-input.d.mts +3 -3
  155. package/dist/ui/item.d.cts +12 -12
  156. package/dist/ui/item.d.mts +15 -15
  157. package/dist/ui/label.cjs +1 -1
  158. package/dist/ui/label.d.cts +2 -2
  159. package/dist/ui/label.d.mts +2 -2
  160. package/dist/ui/label.mjs +1 -1
  161. package/dist/ui/menubar.d.cts +17 -17
  162. package/dist/ui/menubar.d.mts +17 -17
  163. package/dist/ui/multi-select.d.mts +3 -3
  164. package/dist/ui/navigation-menu.d.cts +9 -9
  165. package/dist/ui/navigation-menu.d.mts +11 -11
  166. package/dist/ui/pagination.d.cts +9 -9
  167. package/dist/ui/pagination.d.mts +9 -9
  168. package/dist/ui/popover.cjs +1 -1
  169. package/dist/ui/popover.d.cts +6 -6
  170. package/dist/ui/popover.d.mts +6 -6
  171. package/dist/ui/popover.mjs +1 -1
  172. package/dist/ui/progress.d.cts +2 -2
  173. package/dist/ui/progress.d.mts +2 -2
  174. package/dist/ui/radio-group.cjs +1 -1
  175. package/dist/ui/radio-group.d.cts +3 -3
  176. package/dist/ui/radio-group.d.mts +3 -3
  177. package/dist/ui/radio-group.mjs +1 -1
  178. package/dist/ui/resizable.d.cts +1 -1
  179. package/dist/ui/resizable.d.mts +9 -9
  180. package/dist/ui/scroll-area.d.cts +3 -3
  181. package/dist/ui/scroll-area.d.mts +6 -6
  182. package/dist/ui/select.cjs +1 -1
  183. package/dist/ui/select.d.cts +9 -9
  184. package/dist/ui/select.d.mts +9 -9
  185. package/dist/ui/select.mjs +1 -1
  186. package/dist/ui/separator.d.cts +2 -2
  187. package/dist/ui/separator.d.mts +2 -2
  188. package/dist/ui/sheet.d.cts +9 -9
  189. package/dist/ui/sheet.d.mts +9 -9
  190. package/dist/ui/sidebar.d.cts +29 -29
  191. package/dist/ui/sidebar.d.mts +27 -27
  192. package/dist/ui/skeleton.d.cts +2 -2
  193. package/dist/ui/skeleton.d.mts +2 -2
  194. package/dist/ui/slider.d.cts +2 -2
  195. package/dist/ui/slider.d.mts +2 -2
  196. package/dist/ui/sonner.d.cts +2 -2
  197. package/dist/ui/sonner.d.mts +2 -2
  198. package/dist/ui/spinner.d.cts +2 -2
  199. package/dist/ui/spinner.d.mts +2 -2
  200. package/dist/ui/switch.d.cts +2 -2
  201. package/dist/ui/switch.d.mts +2 -2
  202. package/dist/ui/table.d.cts +9 -9
  203. package/dist/ui/table.d.mts +18 -18
  204. package/dist/ui/tabs.d.cts +5 -5
  205. package/dist/ui/tabs.d.mts +5 -5
  206. package/dist/ui/textarea.cjs +1 -1
  207. package/dist/ui/textarea.d.cts +2 -2
  208. package/dist/ui/textarea.d.mts +2 -2
  209. package/dist/ui/textarea.mjs +1 -1
  210. package/dist/ui/toggle-group.d.cts +3 -3
  211. package/dist/ui/toggle-group.d.mts +3 -3
  212. package/dist/ui/toggle.d.cts +5 -5
  213. package/dist/ui/toggle.d.mts +3 -3
  214. package/dist/ui/tooltip.d.cts +5 -5
  215. package/dist/ui/tooltip.d.mts +5 -5
  216. package/package.json +1 -1
  217. package/dist/tables-Chn2pQSc.cjs +0 -4
  218. package/dist/tables-Chn2pQSc.cjs.map +0 -1
  219. package/dist/tables-eLIhswqW.mjs +0 -4
  220. package/dist/tables-eLIhswqW.mjs.map +0 -1
@@ -1,2 +1,2 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./button-CwDT3m4m.cjs`),n=require(`./tooltip-itUmYz9k.cjs`),r=require(`./separator-BwZb12bh.cjs`),i=require(`./close-DXk_H3Gt.cjs`),a=require(`./dialog-o_68LQXd.cjs`),o=require(`./command-SHd-d_o0.cjs`),s=require(`./checkbox-Di7ACavC.cjs`),c=require(`./input-BMOYFJYM.cjs`),l=require(`./popover-CmoqhK17.cjs`),u=require(`./calendar-B2V4Lv0T.cjs`),d=require(`./radio-group-DAv2EU3F.cjs`),f=require(`./select-DfvSMRUq.cjs`),p=require(`./textarea-CvoBIPlJ.cjs`);let m=require(`lucide-react`),h=require(`react`),g=require(`react/jsx-runtime`),_=require(`@customafk/react-toolkit/utils`),v=require(`class-variance-authority`),y=require(`@customafk/react-toolkit/date-fns`),b=require(`radix-ui`),x=require(`@tanstack/react-form`);const S=(0,v.cva)([`flex w-fit items-center justify-center rounded-full font-bold text-text-negative-strong`],{variants:{color:{default:`bg-primary-strong`,secondary:`bg-secondary-strong`,success:`bg-success-strong`,info:`bg-info-strong`,warning:`bg-warning-strong`,danger:`border border-danger-strong bg-linear-to-b from-danger-strong/90 via-danger-strong to-danger-strong/90`},size:{xs:`px-1.5 py-0.5 text-xs`,sm:`px-2 py-0.75 text-xs`,md:`px-2.5 py-0.75 text-sm`,lg:`px-3 py-1 text-sm`}},defaultVariants:{color:`default`,size:`sm`}}),C=({label:e,color:t,size:n,className:r,children:i})=>(0,g.jsx)(`div`,{"data-slot":`required-indicator`,className:S({color:t,size:n,className:r}),children:e||i});function w({className:e,children:t,...n}){return(0,g.jsxs)(b.Label.Root,{"data-slot":`label`,className:(0,_.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,g.jsx)(`span`,{className:`flex items-center gap-1`,children:t}),(0,g.jsx)(C,{label:`Required`,color:`danger`,size:`xs`,className:`hidden shrink-0`})]})}const T=(0,v.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`,`*: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`}}),E=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(`fieldset`,{"data-slot":`field-set`,className:(0,_.cn)(`flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));E.displayName=`FieldSet`;const D=(0,h.memo)(({className:e,variant:t=`legend`,...n})=>(0,g.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:(0,_.cn)(`mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n}));D.displayName=`FieldLegend`;const O=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(`div`,{"data-slot":`field-group`,className:(0,_.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}));O.displayName=`FieldGroup`;const k=(0,h.memo)(({className:e,orientation:t=`vertical`,...n})=>(0,g.jsx)(`div`,{"data-slot":`field`,"data-orientation":t,className:(0,_.cn)(T({orientation:t}),e),...n}));k.displayName=`Field`;const A=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(`div`,{"data-slot":`field-content`,className:(0,_.cn)(`group/field-content flex flex-col gap-1.5 leading-snug`,e),...t}));A.displayName=`FieldContent`;const j=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(`div`,{"data-slot":`field-content-main`,className:(0,_.cn)(`relative`,e),...t}));j.displayName=`FieldContentMain`;const M=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(w,{"data-slot":`field-label`,className:(0,_.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}));M.displayName=`FieldLabel`;const N=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(`div`,{"data-slot":`field-label`,className:(0,_.cn)(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));N.displayName=`FieldTitle`;const P=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(`p`,{"data-slot":`field-description`,className:(0,_.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}));P.displayName=`FieldDescription`;const F=(0,h.memo)(({isShow:e=!0,className:t,children:n,...r})=>e===!1?null:(0,g.jsxs)(`div`,{"data-slot":`field-note`,className:(0,_.cn)(`flex items-start gap-1.5 rounded border border-primary-muted/60 bg-primary-bg-subtle/80 px-2.5 py-2 text-text-positive-weak text-xs`,t),...r,children:[(0,g.jsx)(m.InfoIcon,{size:12,className:`mt-0.5 shrink-0 text-primary/70`}),(0,g.jsx)(`span`,{children:n})]}));F.displayName=`FieldNote`;const I=(0,h.memo)(({tooltip:e})=>(0,g.jsxs)(n.t,{children:[(0,g.jsx)(n.i,{asChild:!0,children:(0,g.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,g.jsx)(m.HelpCircleIcon,{size:13,"aria-hidden":`true`}),(0,g.jsx)(`span`,{className:`sr-only`,children:`More information`})]})}),(0,g.jsx)(n.n,{side:`top`,className:`max-w-xs text-balance`,children:e})]}));I.displayName=`FieldTooltip`;const L=(0,h.memo)(({children:e,className:t,...n})=>(0,g.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:(0,_.cn)(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,t),...n,children:[(0,g.jsx)(r.t,{className:`absolute inset-0 top-1/2`}),e&&(0,g.jsx)(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));L.displayName=`FieldSeparator`;const R=(0,h.memo)(({className:e,children:t,errors:n,...r})=>{let i=(0,h.useMemo)(()=>t||(n?n?.length===1&&n[0]?.message?(0,g.jsx)(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:(0,g.jsx)(`p`,{children:n[0]?.code===`invalid_type`?`Invalid format`:n[0].message})}):(0,g.jsx)(`ul`,{className:`flex list-none flex-col`,children:n.map(e=>typeof e==`string`?(0,g.jsx)(`li`,{children:e},e):e?.message?(0,g.jsx)(`li`,{children:e.message},e.message):null)}):null),[t,n]);return i?(0,g.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:(0,_.cn)(`w-full font-medium text-danger-strong text-xs`,e),...r,children:i}):null});R.displayName=`FieldError`;const z=({label:e,description:t,options:n,tooltip:r,helperText:i,orientation:a})=>{let o=Q(),c=(0,x.useStore)(o.form.store,({isSubmitting:e})=>e);return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:a,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{children:[e,r&&(0,g.jsx)(I,{tooltip:r})]}),(0,g.jsx)(P,{children:t}),(0,g.jsx)(F,{isShow:!!i,children:i})]}),(0,g.jsx)(j,{children:(0,g.jsx)(O,{className:`flex flex-col gap-y-2`,children:n.map(e=>(0,g.jsxs)(k,{orientation:`horizontal`,children:[(0,g.jsx)(s.t,{id:`${o.name}-${e.value}`,name:o.name,checked:o.state.value?.includes(e.value)??!1,disabled:c,onCheckedChange:t=>{if(t&&o.state.value!==null)o.pushValue(e.value);else if(t&&o.state.value===null)o.setValue([e.value]);else if(!t&&o.state.value!==null){let t=o.state.value.indexOf(e.value);t>-1&&o.removeValue(t)}else o.setValue(null)}}),(0,g.jsx)(M,{htmlFor:`${o.name}-${e.value}`,className:`text-text-positive`,children:e.label})]},e.value))})})]}),(0,g.jsx)(L,{})]})},B=({label:e,description:n,placeholder:r,tooltip:i,orientation:a=`responsive`,options:s})=>{let c=Q(),u=(0,h.useMemo)(()=>c.state.meta.isTouched&&!c.state.meta.isValid,[c.state.meta.isTouched,c.state.meta.isValid]),d=(0,h.useMemo)(()=>c.state.meta.errors,[c.state.meta.errors]),f=s.find(({value:e})=>e===c.state.value)?.label;return(0,g.jsxs)(O,{className:`px-4`,children:[(0,g.jsxs)(k,{orientation:a,"data-invalid":u,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{htmlFor:c.name,children:[e,i&&(0,g.jsx)(I,{tooltip:i})]}),(0,g.jsx)(P,{children:n})]}),(0,g.jsx)(j,{className:`flex justify-end`,children:(0,g.jsxs)(`div`,{className:`flex w-full max-w-60 flex-col`,children:[(0,g.jsxs)(l.t,{children:[(0,g.jsx)(l.a,{asChild:!0,children:(0,g.jsx)(t.t,{variant:`outline`,color:`muted`,size:`lg`,className:(0,_.cn)(`flex items-center justify-start rounded outline-border`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:text-text-positive-muted data-[state=open]:outline-1 data-[state=open]:outline-primary-strong data-[state=open]:ring-4 data-[state=open]:ring-primary-weak`,!c.state.value&&`text-text-positive-muted`),children:f?(0,g.jsx)(`p`,{className:`flex min-w-0 flex-1 items-center gap-2 text-start`,children:f}):(0,g.jsx)(`p`,{className:`flex-1 text-start text-text-positive-muted`,children:r})})}),(0,g.jsx)(l.i,{align:`end`,side:`bottom`,className:`flex w-fit rounded p-0`,onBlur:c.handleBlur,children:(0,g.jsxs)(o.t,{className:`border-none`,children:[(0,g.jsx)(o.a,{placeholder:r??`Search…`}),(0,g.jsx)(o.s,{children:(0,g.jsx)(o.i,{className:`max-h-40 overflow-y-auto`,children:s.map(({value:e,label:t})=>(0,g.jsx)(o.o,{value:t,onSelect:()=>c.handleChange(e),children:t},e))})}),(0,g.jsx)(o.r,{children:`No results found.`})]})})]}),(0,g.jsx)(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:(0,g.jsx)(R,{errors:d})})]})})]}),(0,g.jsx)(L,{})]})},V=({label:e,description:n,placeholder:r,orientation:i=`responsive`,tooltip:a,helperText:o,minDate:s,maxDate:c,required:d})=>{let f=Q(),p=(0,h.useMemo)(()=>d?f.state.value===null:!1,[d,f.state.value]),v=(0,h.useMemo)(()=>f.state.meta.isTouched&&!f.state.meta.isValid,[f.state.meta.isTouched,f.state.meta.isValid]);return(0,g.jsxs)(O,{className:`px-4`,children:[(0,g.jsxs)(k,{orientation:i,"data-invalid":v,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{htmlFor:f.name,"aria-required":p,children:[e,a&&(0,g.jsx)(I,{tooltip:a})]}),(0,g.jsx)(P,{children:n})]}),(0,g.jsxs)(j,{className:`flex flex-col space-y-1`,children:[(0,g.jsx)(`div`,{className:`flex w-full flex-col`,children:(0,g.jsxs)(l.t,{children:[(0,g.jsx)(l.a,{asChild:!0,children:(0,g.jsxs)(t.t,{variant:`outline`,color:`muted`,size:`lg`,className:(0,_.cn)(`flex items-center justify-between rounded font-normal outline-border`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-4`,`data-[state=open]:ring-primary-weak`,f.state.value===null&&`text-text-positive-muted`),children:[(0,g.jsx)(`p`,{children:f.state.value===null?r||`Select date`:(0,y.format)(f.state.value,`PPPP`)}),(0,g.jsx)(m.CalendarDaysIcon,{strokeWidth:1})]})}),(0,g.jsxs)(l.i,{align:`start`,side:`bottom`,className:`flex w-fit min-w-0 overflow-y-auto rounded p-0`,onBlur:f.handleBlur,children:[(0,g.jsxs)(`div`,{className:`flex h-full flex-col space-y-2 border-r border-r-border p-2 [&>button]:justify-start [&>button]:text-sm`,children:[(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.endOfToday)())},children:`Today`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.endOfTomorrow)())},children:`Tomorrow`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.endOfYesterday)())},children:`Yesterday`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.subDays)((0,y.endOfToday)(),3))},children:`Last 3 Days`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.subDays)((0,y.endOfToday)(),7))},children:`Last 7 Days`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.subDays)((0,y.endOfToday)(),30))},children:`Last 30 Days`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.startOfMonth)((0,y.endOfToday)()))},children:`This Month`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.lastDayOfMonth)((0,y.endOfToday)()))},children:`Last Month`})]}),(0,g.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,g.jsx)(`div`,{className:`min-w-73 border-b border-b-border p-2`,children:(0,g.jsx)(u.t,{mode:`single`,selected:f.state.value??void 0,hidden:{before:s??new Date(1900,0,1),after:c??new Date(2100,11,31)},onSelect:e=>{e&&f.handleChange(e)}})})})]})]})}),(0,g.jsx)(F,{isShow:!!o,children:o})]})]}),(0,g.jsx)(L,{})]})},H=({label:e,description:t,placeholder:n,tooltip:r,helperText:i,orientation:a=`responsive`,showErrorMessage:o=!0,required:s=!1,maxLength:l})=>{let{form:u,name:d,state:f,handleBlur:p,handleChange:v}=Q(),y=(0,x.useStore)(u.store,({isSubmitting:e})=>e),b=f.meta.isDirty&&f.meta.isTouched&&!f.meta.isValid,S=s&&f.value===null,C=!y&&!!f.value,w=(0,h.useCallback)(({target:{value:e}})=>{y||l&&e.length>l||v(e||null)},[y,l,v]),T=(0,h.useCallback)(()=>{y||v(null)},[y,v]);return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{"data-invalid":b,orientation:a,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{htmlFor:d,"aria-required":S,children:[e,r&&(0,g.jsx)(I,{tooltip:r})]}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{children:[(0,g.jsx)(c.t,{id:d,name:d,value:f.value===null?``:f.value,"aria-invalid":b,autoComplete:`email`,placeholder:n,className:(0,_.cn)(`pl-9`,C&&`pr-9`,y&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:p,onChange:w}),(0,g.jsx)(`div`,{className:`absolute top-0 left-0 flex size-9 items-center justify-center text-muted`,children:(0,g.jsx)(m.AtSignIcon,{size:14})}),C&&(0,g.jsx)(`button`,{type:`button`,"aria-label":`Clear`,className:`absolute inset-e-0 inset-y-0 top-3 flex h-fit w-8 cursor-pointer items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:text-text-positive-strong`,onClick:T,children:(0,g.jsx)(m.XIcon,{size:14,"aria-hidden":`true`})}),(0,g.jsx)(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:o&&f.meta.isDirty&&(0,g.jsx)(R,{errors:f.meta.errors})}),(0,g.jsx)(F,{isShow:!!i,children:i})]})]}),(0,g.jsx)(L,{})]})},U=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,ee=e=>Number(e).toLocaleString(),te=(e,t,n)=>{if(n===`none`)return e;let r=10**t,i=e*r;switch(n){case`up`:return Math.ceil(i)/r;case`down`:return Math.floor(i)/r;case`nearest`:return i%1<.1?Math.floor(i)/r:i%1>=.59?Math.ceil(i)/r:(Math.floor(i)+.5)/r;default:return e}},ne=({disabled:e=!1,readOnly:t=!1,allowNegative:n=!1,numberAfterDecimalPoint:r=2,roundingRule:i=`none`,value:a=null,unitText:o,decimal:s,placeholder:l,precision:u,wrapperClassName:d,className:f,onChange:p,onValueChange:m,onFocus:v,onBlur:y,...b})=>{let x=(0,h.useRef)(null),S=(0,h.useRef)(null),[C,w]=(0,h.useState)(a?.toString()??null),T=(0,h.useMemo)(()=>s?.[1]??r,[s,r]),E=(0,h.useMemo)(()=>s&&s[0]-s[1],[s]),D=(0,h.useMemo)(()=>U(n),[n]),O=(0,h.useCallback)(e=>{if(!T||e===`-`)return!0;let[t,n=``]=e.split(`.`),r=t.startsWith(`-`)?t.length-1:t.length;return n.length<=T&&r<=(E??1/0)},[T,E]),k=(0,h.useCallback)(e=>{if(e===`0`)return`0`;if(!Number(e))return null;let[t,n=``]=te(parseFloat(e),Math.min(T-1,u||0),i).toString().split(`.`),r=ee(t);return n?`${r}.${n}`:r},[T,u,i]),A=(0,h.useCallback)(e=>{let t=e===`0`,n=e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e);if(t){m?.(0),w(e);return}if(n){w(()=>(m?.(0),e));return}},[m]),j=(0,h.useCallback)(e=>{p?.(e);let{value:t}=e.target;if(t===``||t===void 0){m?.(null),w(null);return}A(t),!(!D.test(t)||!O(t))&&(m?.(parseFloat(t)||0),w(t))},[O,p,m,A,D]),M=(0,h.useCallback)(e=>{t||(v?.(e),w(e=>typeof e==`string`?e.replace(/,/g,``):null))},[t,v]),N=(0,h.useCallback)(e=>{t||(y?.(e),w(e=>e===null?null:e===`0`||e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e)?`0`:typeof e==`string`?k(e):null))},[t,k,y]);return(0,h.useEffect)(()=>{let e=document.activeElement===S.current;if(a==null||!D.test(a.toString())||!O(a.toString())){w(null);return}w(t=>e?t:k(a.toString()))},[k,a,O,D]),(0,h.useEffect)(()=>{if(!x.current||!S.current||!o)return;let e=x.current.offsetWidth;S.current.style.setProperty(`padding-right`,`${(e+10)/16}rem`)},[o]),(0,g.jsxs)(`div`,{className:(0,_.cn)(`relative`,d),children:[(0,g.jsx)(c.t,{...b,ref:S,value:C||(t?`0`:``),placeholder:l,disabled:e,readOnly:t,className:(0,_.cn)(`text-end font-number text-sm slashed-zero lining-nums tabular-nums`,t&&`bg-muted text-muted-foreground`,f),onChange:j,onFocus:M,onBlur:N}),o&&(0,g.jsx)(`span`,{ref:x,className:`-translate-y-1/2 pointer-events-none absolute top-1/2 right-2 text-muted-foreground text-sm`,children:o})]})},re=({label:e,description:t,placeholder:n,tooltip:r,helperText:i,orientation:a=`responsive`,showErrorMessage:o=!0,rounding:s,decimalPlaces:c,percision:l,unit:u,required:d,allowNegative:f})=>{let p=Q(),v=(0,x.useStore)(p.form.store,({isSubmitting:e})=>e),y=p.state.meta.errors,b=d?p.state.value===null:!1,S=(0,h.useCallback)(e=>{v||p.handleChange(e)},[v,p.handleChange]);return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:a,"data-invalid":p.state.meta.isTouched&&!p.state.meta.isValid,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{htmlFor:p.name,"aria-required":b,children:[e,r&&(0,g.jsx)(I,{tooltip:r})]}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{children:[(0,g.jsxs)(`div`,{className:`relative w-full`,children:[(0,g.jsx)(ne,{id:p.name,value:p.state.value,"aria-invalid":p.state.meta.isTouched&&!p.state.meta.isValid&&p.state.meta.isDirty,placeholder:n,roundingRule:s,numberAfterDecimalPoint:c,precision:l,unitText:u,allowNegative:f,className:(0,_.cn)(v&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:p.handleBlur,onValueChange:S}),v&&(0,g.jsx)(`div`,{className:`absolute inset-s-2 inset-y-0 top-2.5 text-muted-weak [&>svg]:size-3.5`,children:(0,g.jsx)(m.Loader2Icon,{className:`animate-spin text-primary-strong`})}),p.state.meta.isDirty&&o&&!!y.length&&(0,g.jsx)(`div`,{className:`absolute inset-s-2 inset-y-0 top-2.75 text-danger-strong [&>svg]:size-3.5`,children:(0,g.jsx)(m.BanIcon,{})}),(0,g.jsx)(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:p.state.meta.isDirty&&o&&(0,g.jsx)(R,{errors:y})})]}),(0,g.jsx)(F,{isShow:!!i,children:i})]})]}),(0,g.jsx)(L,{})]})},ie=({label:e,description:t,placeholder:n,orientation:r=`responsive`,tooltip:i,helperText:a,showErrorMessage:o=!0})=>{let s=(0,h.useId)(),{form:l,name:u,state:d,handleBlur:f,handleChange:p}=Q(),_=(0,x.useStore)(l.store,({isSubmitting:e})=>e),[v,y]=(0,h.useState)(!1),b=d.meta.isDirty&&d.meta.isTouched&&!d.meta.isValid,S=(0,h.useCallback)(()=>y(e=>!e),[]),C=(0,h.useCallback)(({target:{value:e}})=>{_||p(e||null)},[_,p]);return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{"data-invalid":b,orientation:r,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{htmlFor:s,children:[e,i&&(0,g.jsx)(I,{tooltip:i})]}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{children:[(0,g.jsx)(c.t,{id:s,name:u,type:v?`text`:`password`,placeholder:n,value:d.value??``,"aria-invalid":b,autoComplete:`new-password`,onBlur:f,onChange:C}),(0,g.jsx)(`button`,{className:`absolute inset-e-0 inset-y-0 flex size-9 items-center justify-center rounded-e-md text-muted outline-none transition-[color,box-shadow] focus:z-10 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:S,"aria-label":v?`Hide password`:`Show password`,"aria-pressed":v,"aria-controls":s,children:v?(0,g.jsx)(m.EyeOffIcon,{size:16,"aria-hidden":`true`}):(0,g.jsx)(m.EyeIcon,{size:16,"aria-hidden":`true`})}),(0,g.jsx)(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:o&&d.meta.isDirty&&(0,g.jsx)(R,{errors:d.meta.errors})}),(0,g.jsx)(F,{isShow:!!a,children:a})]})]}),(0,g.jsx)(L,{})]})},ae=({label:e,description:t,orientation:n,options:r,tooltip:i,helperText:a})=>{let o=Q(),s=(0,x.useStore)(o.form.store,({isSubmitting:e})=>e);return(0,g.jsxs)(O,{className:`px-4`,children:[(0,g.jsxs)(k,{orientation:n,className:`flex-col gap-2`,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{children:[e,i&&(0,g.jsx)(I,{tooltip:i})]}),(0,g.jsx)(P,{children:t}),(0,g.jsx)(F,{isShow:!!a,children:a})]}),(0,g.jsx)(j,{children:(0,g.jsx)(d.t,{value:o.state.value??``,className:`w-full`,onValueChange:o.handleChange,children:r.map(e=>(0,g.jsx)(M,{className:(0,_.cn)(`h-fit`,o.state.value===e.value&&`border-primary-weak! bg-primary-bg-subtle`,s&&`pointer-events-none bg-muted-muted opacity-60`,o.state.value===e.value&&s&&`border-border-strong!`),children:(0,g.jsxs)(k,{orientation:`horizontal`,className:`items-start gap-3 rounded p-2!`,children:[(0,g.jsx)(d.n,{value:e.value,className:`mt-0.5 shrink-0`}),(0,g.jsxs)(A,{className:`gap-0.5!`,children:[(0,g.jsx)(N,{children:e.label}),(0,g.jsx)(P,{className:`text-xs`,children:e.description})]})]})},e.value))})})]}),(0,g.jsx)(L,{})]})},oe=({label:e,description:t,placeholder:n,orientation:r=`responsive`,tooltip:i,options:a,helperText:o,required:s=!1})=>{let c=Q(),l=c.state.meta.isTouched&&!c.state.meta.isValid,u=s&&c.state.value===null,d=c.state.meta.errors;return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:r,"data-invalid":l,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{htmlFor:c.name,"aria-required":u,children:[e,i&&(0,g.jsx)(I,{tooltip:i})]}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{className:`flex flex-col`,children:[(0,g.jsxs)(f.t,{value:c.state.value??``,onValueChange:c.handleChange,children:[(0,g.jsx)(f.s,{"aria-invalid":l?`true`:void 0,onBlur:c.handleBlur,children:(0,g.jsx)(f.c,{placeholder:n})}),(0,g.jsxs)(f.n,{children:[!!a.length&&a.map(e=>(0,g.jsx)(f.i,{value:e.value,children:e.label},e.value)),!a.length&&(0,g.jsxs)(`div`,{className:`flex items-center justify-center gap-x-2 rounded border border-border bg-muted-muted px-4 py-6.5 text-center text-sm text-text-positive-weak`,children:[(0,g.jsx)(m.PackagePlusIcon,{strokeWidth:1}),`No options available`]})]})]}),(0,g.jsx)(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:(0,g.jsx)(R,{errors:d})}),(0,g.jsx)(F,{isShow:!!o,children:o})]})]}),(0,g.jsx)(L,{})]})};function W({className:e,...t}){return(0,g.jsx)(b.Switch.Root,{"data-slot":`switch`,className:(0,_.cn)(`peer`,`w-8 shrink-0 cursor-pointer items-center rounded-full shadow-xs transition-all`,`inline-flex h-5`,`focus-visible:border-primary-strong`,`focus-visible:ring-primary-weak`,`focus-visible:ring-4`,`disabled:cursor-not-allowed`,`disabled:opacity-50`,`-outline-offset-1 inset-shadow-2xs outline-1`,`data-[state=checked]:bg-primary`,`data-[state=checked]:outline-primary-strong`,`data-[state=unchecked]:bg-muted-weak`,`data-[state=unchecked]:outline-border`,`data-[state=unchecked]:[&_span]:size-4`,`data-[state=unchecked]:[&_span]:translate-x-0.5`,`data-[state=unchecked]:[&_span]:rtl:-translate-x-0.5`,e),...t,children:(0,g.jsx)(b.Switch.Thumb,{"data-slot":`switch-thumb`,className:(0,_.cn)(`block size-4 bg-card shadow-xs`,`pointer-events-none rounded-full ring-0 transition-transform`,`data-[state=checked]:translate-x-[calc(100%-3px)]`,`data-[state=unchecked]:translate-x-0`)})})}const G=({label:e,description:t,helperText:n})=>{let r=Q();return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:`vertical`,className:`relative justify-between gap-y-1`,children:[(0,g.jsxs)(A,{children:[(0,g.jsx)(N,{className:`cursor-pointer`,children:(0,g.jsx)(`label`,{htmlFor:r.name,children:e})}),(0,g.jsx)(P,{children:t}),(0,g.jsx)(W,{id:r.name,checked:r.state.value??!1,className:`absolute top-1 right-1`,onBlur:r.handleBlur,onCheckedChange:r.handleChange})]}),(0,g.jsx)(F,{isShow:!!n,children:n})]}),(0,g.jsx)(L,{})]})},K=({label:e,description:t,placeholder:n,tooltip:r,helperText:i,counter:a=!1,orientation:o=`responsive`,showClearButton:s=!1,showErrorMessage:l=!0,required:u=!1,maxLength:d})=>{let f=(0,h.useId)(),p=(0,h.useRef)(null),{form:v,name:y,state:b,handleBlur:S,handleChange:C}=Q(),w=(0,x.useStore)(v.store,({isSubmitting:e})=>e),T=s&&!w&&!!b.value,E=b.value?b.value.length:0,D=(0,h.useMemo)(()=>{if(!a)return``;let e=`character${[0,1].includes(E)?``:`s`}`;return a&&d?`${E} / ${d} character${E?`s`:``}`:`${E} ${e}`},[E,a,d]),N=b.meta.isDirty&&b.meta.isTouched&&!b.meta.isValid,z=u&&b.value===null,B=d&&E>=d*.8,V=d&&E>=d,H=(0,h.useCallback)(({target:{value:e}})=>{w||a&&d&&e.length>d||C(e||null)},[w,a,d,C]),U=(0,h.useCallback)(()=>{w||(C(null),p.current?.focus())},[w,C]);return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:o,"data-invalid":N,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{"aria-required":z,htmlFor:f,children:[e,r&&(0,g.jsx)(I,{tooltip:r})]}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{children:[(0,g.jsx)(c.t,{ref:p,id:f,name:y,value:b.value??``,"aria-invalid":N,autoComplete:`off`,placeholder:n,autoCapitalize:`none`,autoCorrect:`off`,className:(0,_.cn)(`pr-6`,w&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:S,onChange:H}),T&&(0,g.jsx)(`button`,{type:`button`,"aria-label":`Clear`,className:`absolute inset-e-0 inset-y-0 top-3 flex h-fit w-8 cursor-pointer items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:text-text-positive-intense [&>svg]:size-3.5`,onClick:U,children:(0,g.jsx)(m.XIcon,{"aria-hidden":`true`})}),w&&(0,g.jsx)(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-muted-weak`,children:(0,g.jsx)(m.Loader2Icon,{size:14,className:`animate-spin text-primary-strong`})}),!T&&b.meta.isDirty&&l&&!!b.meta.errors.length&&(0,g.jsx)(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-danger-strong`,children:(0,g.jsx)(m.BanIcon,{"aria-hidden":`true`,size:14})}),(0,g.jsxs)(`div`,{className:`my-1 flex w-full items-start justify-between gap-x-2`,children:[b.meta.isDirty&&l?(0,g.jsx)(R,{className:`flex-1`,errors:b.meta.errors}):(0,g.jsx)(`div`,{}),!!a&&(0,g.jsx)(`p`,{className:(0,_.cn)(`h-4 flex-0 text-nowrap text-end text-xs tabular-nums transition-colors`,V?`font-medium text-danger-strong`:B?`text-warning-strong`:`text-text-positive-weak`),children:D})]}),(0,g.jsx)(F,{isShow:!!i,children:i})]})]}),(0,g.jsx)(L,{})]})},q=(0,h.memo)(({label:e,description:t,placeholder:n,tooltip:r,helperText:i,counter:a=!1,orientation:o=`responsive`,showErrorMessage:s=!0,required:c=!1,maxLength:l})=>{let u=(0,h.useId)(),{form:d,state:f,name:v,handleBlur:y,handleChange:b}=Q(),S=(0,x.useStore)(d.store,({isSubmitting:e})=>e),C=f.value?f.value.length:0,w=(0,h.useMemo)(()=>{if(!a)return``;let e=`character${[0,1].includes(C)?``:`s`}`;return a&&l?`${C} / ${l} character${C?`s`:``}`:`${C} ${e}`},[C,a,l]),T=f.meta.isDirty&&f.meta.isTouched&&!f.meta.isValid,E=c&&f.value===null,D=f.meta.errors,N=l&&C>=l*.8,z=l&&C>=l,B=(0,h.useCallback)(({target:{value:e}})=>{S||a&&l&&e.length>l||b(e||null)},[S,a,l,b]);return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:o,"data-invalid":T,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{"aria-required":E,htmlFor:u,children:[e,r&&(0,g.jsx)(I,{tooltip:r})]}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{children:[(0,g.jsx)(p.t,{id:u,name:v,value:f.value===null?``:f.value,"aria-invalid":T,autoCapitalize:`none`,autoComplete:`off`,placeholder:n,className:(0,_.cn)(S&&`pointer-events-none bg-muted-muted opacity-60`),onChange:B,onBlur:y}),S&&(0,g.jsx)(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-muted-weak`,children:(0,g.jsx)(m.Loader2Icon,{size:14,className:`animate-spin text-primary-strong`})}),f.meta.isDirty&&s&&!!D.length&&(0,g.jsx)(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-danger-strong`,children:(0,g.jsx)(m.BanIcon,{size:14})}),(0,g.jsxs)(`div`,{className:`my-1 flex w-full items-start justify-between gap-x-2`,children:[f.meta.isDirty&&s?(0,g.jsx)(R,{className:`flex-1`,errors:f.meta.errors}):(0,g.jsx)(`div`,{}),!!a&&(0,g.jsx)(`p`,{className:(0,_.cn)(`h-4 flex-0 text-nowrap text-end text-xs tabular-nums transition-colors`,z?`font-medium text-danger-strong`:N?`text-warning-strong`:`text-text-positive-weak`),children:w})]}),(0,g.jsx)(F,{isShow:!!i,children:i})]})]}),(0,g.jsx)(L,{})]})});q.displayName=`TextareaField`;const se=({label:e,className:n})=>{let r=$(),i=(0,h.useCallback)(async()=>{await r.handleSubmit({submitAction:`submit`}),r.state.isSubmitSuccessful&&r.reset()},[r]);return(0,g.jsx)(r.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:r,isSubmitting:a})=>(0,g.jsx)(t.t,{type:`button`,size:`md`,disabled:r,isLoading:a,className:(0,_.cn)(`min-h-8 min-w-32`,n),onClick:i,children:e??`Submit`})})},ce=({type:e=`create`})=>{let n=$();return(0,g.jsxs)(`div`,{className:`flex h-8 items-center justify-between`,children:[(0,g.jsx)(n.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>(0,g.jsx)(t.t,{color:`muted`,variant:`outline`,type:`button`,size:`md`,disabled:e,className:`h-full min-w-32`,onClick:()=>n.reset(),children:`Cancel`})}),e===`create`&&(0,g.jsx)(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:e,isSubmitting:r})=>(0,g.jsxs)(t.t,{type:`submit`,size:`md`,disabled:e,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`create`}),n.state.isSubmitSuccessful&&n.reset()},children:[(0,g.jsx)(m.PlusIcon,{}),`Add New`]})}),e===`update`&&(0,g.jsx)(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:e,isSubmitting:r})=>(0,g.jsxs)(t.t,{type:`submit`,size:`md`,disabled:e,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`update`}),n.state.isSubmitSuccessful&&n.reset()},children:[(0,g.jsx)(m.ArrowDownToLine,{}),`Update`]})})]})};function J({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,g.jsx)(b.Separator.Root,{"data-slot":`separator`,decorative:n,orientation:t,className:(0,_.cn)(`shrink-0 bg-border-weak`,`data-[orientation=horizontal]:h-px`,`data-[orientation=horizontal]:w-full`,`data-[orientation=vertical]:h-full`,`data-[orientation=vertical]:w-px`,e),...r})}const le=({title:e,description:n,onDelete:r,children:i})=>(0,g.jsxs)(`section`,{"data-slot":`card-form`,className:`relative flex flex-col rounded-md bg-card pb-4 shadow-card ring-1 ring-border`,children:[(0,g.jsxs)(`div`,{"data-slot":`card-form-header`,className:`flex flex-col space-y-0.5 px-4 py-3`,children:[(0,g.jsx)(`p`,{className:`font-semibold text-base tracking-tight`,children:e}),!!n&&(0,g.jsx)(`p`,{className:`text-text-positive-weak text-sm`,children:n})]}),(0,g.jsx)(J,{}),(0,g.jsx)(`div`,{"data-slot":`card-form-main`,className:`flex flex-col py-4`,children:i}),!!r&&(0,g.jsxs)(t.t,{color:`danger`,variant:`ghost`,size:`sm`,className:`absolute top-2.5 right-3`,onClick:e=>{r?.(),e.preventDefault(),e.stopPropagation()},children:[(0,g.jsx)(m.Trash2Icon,{}),`Remove`]})]}),ue=({children:e})=>(0,g.jsx)(`div`,{"data-slot":`section-form`,className:`flex flex-col space-y-4`,children:e}),Y=({disabled:e,className:n,onClick:r,children:i})=>(0,g.jsx)(t.t,{type:`button`,variant:`outline`,color:`muted`,disabled:e,className:(0,_.cn)(`min-w-40`,n),onClick:r,children:i??`Cancel`}),X=({isSubmitting:e,submitText:n=`Submit`,disabled:r,className:i,onClick:a})=>(0,g.jsx)(t.t,{type:`button`,isLoading:e,disabled:r||e,className:(0,_.cn)(`min-w-40`,i),onClick:a,children:n}),de=({title:e,submitText:t,open:n,onOpenChange:i,children:o})=>{let s=$(),c=(0,h.useCallback)(e=>{e||s.reset(),i?.(e)},[s.reset,i]);return(0,g.jsx)(a.t,{open:n,onOpenChange:c,children:(0,g.jsxs)(a.c,{"data-slot":`dialog-portal`,children:[(0,g.jsx)(a.s,{}),(0,g.jsxs)(a.r,{className:`flex size-full max-h-dvh max-w-dvw flex-col gap-0 overflow-y-auto p-0 shadow-dialog sm:h-auto sm:max-h-[85dvh] sm:max-w-2xl sm:rounded-md`,children:[(0,g.jsx)(`div`,{"data-slot":`dialog-header`,className:`flex items-center justify-center gap-2 px-6 py-5 text-center sm:text-left`,children:(0,g.jsx)(a.l,{"data-slot":`dialog-title`,className:`text-lg font-semibold tracking-tight`,children:e})}),(0,g.jsx)(r.t,{}),(0,g.jsx)(`div`,{"data-slot":`dialog-content`,className:`relative flex flex-col overflow-y-auto p-0 pt-4 max-sm:flex-1 sm:p-4`,children:o}),(0,g.jsx)(r.t,{}),(0,g.jsxs)(`div`,{"data-slot":`dialog-footer`,className:`flex flex-col-reverse items-center justify-end gap-2 px-6 py-4 sm:flex-row max-sm:[&>button]:w-full`,children:[(0,g.jsx)(s.Subscribe,{selector:e=>({disabled:e.isSubmitting}),children:({disabled:e})=>(0,g.jsx)(Y,{disabled:e,onClick:()=>{s.reset(),c(!1)}})}),(0,g.jsx)(s.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:n})=>(0,g.jsx)(X,{isSubmitting:e,disabled:n,submitText:t,onClick:()=>s.handleSubmit()})})]})]})]})})},fe=({label:e,description:t,helperText:n,orientation:r=`responsive`,children:i})=>(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:r,children:[(0,g.jsxs)(A,{children:[(0,g.jsx)(M,{children:e}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{children:[i,(0,g.jsx)(F,{isShow:!!n,children:n})]})]}),(0,g.jsx)(L,{})]}),pe=({title:e,open:t,contentClassName:n,onOpenChange:r,children:a})=>{let o=$();return(0,g.jsx)(b.Dialog.Root,{"data-slot":`dialog`,open:t,onOpenChange:r,children:(0,g.jsxs)(b.Dialog.Portal,{"data-slot":`dialog-portal`,children:[(0,g.jsx)(b.Dialog.Overlay,{"data-slot":`dialog-overlay`,className:(0,_.cn)(`fixed inset-0 z-40 bg-black/40 backdrop-blur-sm`,`data-[state=open]:animate-in data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:fade-out`)}),(0,g.jsx)(b.Dialog.Content,{"data-slot":`dialog-content`,className:(0,_.cn)(`fixed top-4 right-4 z-50 h-[calc(100dvh-2rem)] min-w-sm max-w-xl rounded-md bg-background shadow-lg ring-1 ring-border`,`duration-300`,`data-[state=open]:animate-in data-[state=open]:slide-in-from-right data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=closed]:fade-out`),children:(0,g.jsxs)(`section`,{className:`relative flex size-full flex-col`,children:[(0,g.jsx)(`header`,{className:`flex h-14 shrink-0 items-center border-b border-border px-5`,children:(0,g.jsx)(`h2`,{className:`font-semibold text-base tracking-tight text-text-positive`,children:e})}),(0,g.jsx)(`div`,{className:(0,_.cn)(`flex flex-1 flex-col overflow-y-auto py-4`,n),children:a}),(0,g.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3`,children:[(0,g.jsx)(o.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:t})=>(0,g.jsx)(X,{isSubmitting:e,disabled:t,className:`w-full`,onClick:()=>o.handleSubmit()})}),(0,g.jsx)(o.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>(0,g.jsx)(Y,{disabled:e,className:`w-full`,onClick:()=>{o.reset(),r?.(!1)}})})]}),(0,g.jsx)(b.Dialog.Close,{asChild:!0,children:(0,g.jsx)(i.t,{className:`absolute top-2.5 right-3`})})]})})]})})},me=({children:e})=>(0,g.jsx)(`header`,{"data-slot":`section-header`,className:`flex items-center px-4 py-3 font-semibold text-base text-text-positive tracking-tight`,children:e}),he=({children:e})=>(0,g.jsx)(`main`,{"data-slot":`section-main`,className:`relative flex flex-col py-4`,children:e}),ge=({title:e,children:t})=>(0,g.jsxs)(`section`,{"data-slot":`section-form`,className:`flex flex-col rounded-md bg-background shadow-card ring-1 ring-border`,children:[(0,g.jsx)(me,{children:e}),(0,g.jsx)(J,{}),(0,g.jsx)(he,{children:t})]}),_e=({title:e,description:t,helperText:n})=>(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{className:`gap-0`,children:[(0,g.jsxs)(A,{children:[(0,g.jsx)(D,{className:`mb-1`,children:e}),(0,g.jsx)(P,{children:t})]}),(0,g.jsx)(F,{isShow:!!n,children:n})]}),(0,g.jsx)(L,{})]}),{fieldContext:ve,formContext:Z,useFieldContext:Q,useFormContext:$}=(0,x.createFormHookContexts)(),{useAppForm:ye,withForm:be,withFieldGroup:xe}=(0,x.createFormHook)({fieldContext:ve,formContext:Z,fieldComponents:{TextField:K,TextareaField:q,NumberField:re,EmailField:H,PasswordField:ie,SelectField:oe,ComboboxField:B,DateField:V,SwitchField:G,RadioGroupField:ae,CheckboxField:z,FieldGroup:O,Field:k,FieldContent:A,FieldLabel:M,FieldContentMain:j,FieldSeparator:L,FieldError:R},formComponents:{TanStackDialogForm:de,TanStackPopoverForm:pe,TanStackContainerForm:ue,TanStackSectionForm:ge,TanStackCardForm:le,TanStackFieldGroup:fe,TanStackTitleField:_e,TanStackActionsForm:ce,TanStackActionSubmit:se}});Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return O}});
2
- //# sourceMappingURL=tanstack-form-Bb9JXuEq.cjs.map
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./button-CwDT3m4m.cjs`),n=require(`./tooltip-itUmYz9k.cjs`),r=require(`./separator-BwZb12bh.cjs`),i=require(`./close-DXk_H3Gt.cjs`),a=require(`./dialog-o_68LQXd.cjs`),o=require(`./command-SHd-d_o0.cjs`),s=require(`./checkbox-Di7ACavC.cjs`),c=require(`./input-BMOYFJYM.cjs`),l=require(`./popover-AEt-aSy3.cjs`),u=require(`./select-DzylYFes.cjs`),d=require(`./calendar-BMXIBCsr.cjs`),f=require(`./radio-group-C7FAAawm.cjs`),p=require(`./textarea-DZ86A_cm.cjs`);let m=require(`lucide-react`),h=require(`react`),g=require(`react/jsx-runtime`),_=require(`@customafk/react-toolkit/utils`),v=require(`class-variance-authority`),y=require(`@customafk/react-toolkit/date-fns`),b=require(`radix-ui`),x=require(`@tanstack/react-form`);const S=(0,v.cva)([`flex w-fit items-center justify-center rounded-full font-bold text-text-negative-strong`],{variants:{color:{default:`bg-primary-strong`,secondary:`bg-secondary-strong`,success:`bg-success-strong`,info:`bg-info-strong`,warning:`bg-warning-strong`,danger:`border border-danger-strong bg-linear-to-b from-danger-strong/90 via-danger-strong to-danger-strong/90`},size:{xs:`px-1.5 py-0.5 text-xs`,sm:`px-2 py-0.75 text-xs`,md:`px-2.5 py-0.75 text-sm`,lg:`px-3 py-1 text-sm`}},defaultVariants:{color:`default`,size:`sm`}}),C=({label:e,color:t,size:n,className:r,children:i})=>(0,g.jsx)(`div`,{"data-slot":`required-indicator`,className:S({color:t,size:n,className:r}),children:e||i});function w({className:e,children:t,...n}){return(0,g.jsxs)(b.Label.Root,{"data-slot":`label`,className:(0,_.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,g.jsx)(`span`,{className:`flex items-center gap-1`,children:t}),(0,g.jsx)(C,{label:`Required`,color:`danger`,size:`xs`,className:`hidden shrink-0`})]})}const T=(0,v.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`,`*: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`}}),E=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(`fieldset`,{"data-slot":`field-set`,className:(0,_.cn)(`flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));E.displayName=`FieldSet`;const D=(0,h.memo)(({className:e,variant:t=`legend`,...n})=>(0,g.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:(0,_.cn)(`mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n}));D.displayName=`FieldLegend`;const O=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(`div`,{"data-slot":`field-group`,className:(0,_.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}));O.displayName=`FieldGroup`;const k=(0,h.memo)(({className:e,orientation:t=`vertical`,...n})=>(0,g.jsx)(`div`,{"data-slot":`field`,"data-orientation":t,className:(0,_.cn)(T({orientation:t}),e),...n}));k.displayName=`Field`;const A=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(`div`,{"data-slot":`field-content`,className:(0,_.cn)(`group/field-content flex flex-col gap-1.5 leading-snug`,e),...t}));A.displayName=`FieldContent`;const j=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(`div`,{"data-slot":`field-content-main`,className:(0,_.cn)(`relative`,e),...t}));j.displayName=`FieldContentMain`;const M=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(w,{"data-slot":`field-label`,className:(0,_.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}));M.displayName=`FieldLabel`;const N=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(`div`,{"data-slot":`field-label`,className:(0,_.cn)(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));N.displayName=`FieldTitle`;const P=(0,h.memo)(({className:e,...t})=>(0,g.jsx)(`p`,{"data-slot":`field-description`,className:(0,_.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}));P.displayName=`FieldDescription`;const F=(0,h.memo)(({isShow:e=!0,className:t,children:n,...r})=>e===!1?null:(0,g.jsxs)(`div`,{"data-slot":`field-note`,className:(0,_.cn)(`flex items-start gap-1.5 rounded border border-primary-muted/60 bg-primary-bg-subtle/80 px-2.5 py-2 text-text-positive-weak text-xs`,t),...r,children:[(0,g.jsx)(m.InfoIcon,{size:12,className:`mt-0.5 shrink-0 text-primary/70`}),(0,g.jsx)(`span`,{children:n})]}));F.displayName=`FieldNote`;const I=(0,h.memo)(({tooltip:e})=>(0,g.jsxs)(n.t,{children:[(0,g.jsx)(n.i,{asChild:!0,children:(0,g.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,g.jsx)(m.HelpCircleIcon,{size:13,"aria-hidden":`true`}),(0,g.jsx)(`span`,{className:`sr-only`,children:`More information`})]})}),(0,g.jsx)(n.n,{side:`top`,className:`max-w-xs text-balance`,children:e})]}));I.displayName=`FieldTooltip`;const L=(0,h.memo)(({children:e,className:t,...n})=>(0,g.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:(0,_.cn)(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,t),...n,children:[(0,g.jsx)(r.t,{className:`absolute inset-0 top-1/2`}),e&&(0,g.jsx)(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));L.displayName=`FieldSeparator`;const R=(0,h.memo)(({className:e,children:t,errors:n,...r})=>{let i=(0,h.useMemo)(()=>t||(n?n?.length===1&&n[0]?.message?(0,g.jsx)(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:(0,g.jsx)(`p`,{children:n[0]?.code===`invalid_type`?`Invalid format`:n[0].message})}):(0,g.jsx)(`ul`,{className:`flex list-none flex-col`,children:n.map(e=>typeof e==`string`?(0,g.jsx)(`li`,{children:e},e):e?.message?(0,g.jsx)(`li`,{children:e.message},e.message):null)}):null),[t,n]);return i?(0,g.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:(0,_.cn)(`w-full font-medium text-danger-strong text-xs`,e),...r,children:i}):null});R.displayName=`FieldError`;const z=({label:e,description:t,options:n,tooltip:r,helperText:i,orientation:a})=>{let o=Q(),c=(0,x.useStore)(o.form.store,({isSubmitting:e})=>e);return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:a,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{children:[e,r&&(0,g.jsx)(I,{tooltip:r})]}),(0,g.jsx)(P,{children:t}),(0,g.jsx)(F,{isShow:!!i,children:i})]}),(0,g.jsx)(j,{children:(0,g.jsx)(O,{className:`flex flex-col gap-y-2`,children:n.map(e=>(0,g.jsxs)(k,{orientation:`horizontal`,children:[(0,g.jsx)(s.t,{id:`${o.name}-${e.value}`,name:o.name,checked:o.state.value?.includes(e.value)??!1,disabled:c,onCheckedChange:t=>{if(t&&o.state.value!==null)o.pushValue(e.value);else if(t&&o.state.value===null)o.setValue([e.value]);else if(!t&&o.state.value!==null){let t=o.state.value.indexOf(e.value);t>-1&&o.removeValue(t)}else o.setValue(null)}}),(0,g.jsx)(M,{htmlFor:`${o.name}-${e.value}`,className:`text-text-positive`,children:e.label})]},e.value))})})]}),(0,g.jsx)(L,{})]})},B=({label:e,description:n,placeholder:r,tooltip:i,orientation:a=`responsive`,options:s})=>{let c=Q(),u=(0,h.useMemo)(()=>c.state.meta.isTouched&&!c.state.meta.isValid,[c.state.meta.isTouched,c.state.meta.isValid]),d=(0,h.useMemo)(()=>c.state.meta.errors,[c.state.meta.errors]),f=s.find(({value:e})=>e===c.state.value)?.label;return(0,g.jsxs)(O,{className:`px-4`,children:[(0,g.jsxs)(k,{orientation:a,"data-invalid":u,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{htmlFor:c.name,children:[e,i&&(0,g.jsx)(I,{tooltip:i})]}),(0,g.jsx)(P,{children:n})]}),(0,g.jsx)(j,{className:`flex justify-end`,children:(0,g.jsxs)(`div`,{className:`flex w-full max-w-60 flex-col`,children:[(0,g.jsxs)(l.t,{children:[(0,g.jsx)(l.a,{asChild:!0,children:(0,g.jsx)(t.t,{variant:`outline`,color:`muted`,size:`lg`,className:(0,_.cn)(`flex items-center justify-start rounded outline-border`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:text-text-positive-muted data-[state=open]:outline-1 data-[state=open]:outline-primary-strong data-[state=open]:ring-4 data-[state=open]:ring-primary-weak`,!c.state.value&&`text-text-positive-muted`),children:f?(0,g.jsx)(`p`,{className:`flex min-w-0 flex-1 items-center gap-2 text-start`,children:f}):(0,g.jsx)(`p`,{className:`flex-1 text-start text-text-positive-muted`,children:r})})}),(0,g.jsx)(l.i,{align:`end`,side:`bottom`,className:`flex w-fit rounded p-0`,onBlur:c.handleBlur,children:(0,g.jsxs)(o.t,{className:`border-none`,children:[(0,g.jsx)(o.a,{placeholder:r??`Search…`}),(0,g.jsx)(o.s,{children:(0,g.jsx)(o.i,{className:`max-h-40 overflow-y-auto`,children:s.map(({value:e,label:t})=>(0,g.jsx)(o.o,{value:t,onSelect:()=>c.handleChange(e),children:t},e))})}),(0,g.jsx)(o.r,{children:`No results found.`})]})})]}),(0,g.jsx)(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:(0,g.jsx)(R,{errors:d})})]})})]}),(0,g.jsx)(L,{})]})},V=({label:e,description:n,placeholder:r,orientation:i=`responsive`,tooltip:a,helperText:o,minDate:s,maxDate:c,required:u})=>{let f=Q(),p=(0,h.useMemo)(()=>u?f.state.value===null:!1,[u,f.state.value]),v=(0,h.useMemo)(()=>f.state.meta.isTouched&&!f.state.meta.isValid,[f.state.meta.isTouched,f.state.meta.isValid]);return(0,g.jsxs)(O,{className:`px-4`,children:[(0,g.jsxs)(k,{orientation:i,"data-invalid":v,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{htmlFor:f.name,"aria-required":p,children:[e,a&&(0,g.jsx)(I,{tooltip:a})]}),(0,g.jsx)(P,{children:n})]}),(0,g.jsxs)(j,{className:`flex flex-col space-y-1`,children:[(0,g.jsx)(`div`,{className:`flex w-full flex-col`,children:(0,g.jsxs)(l.t,{children:[(0,g.jsx)(l.a,{asChild:!0,children:(0,g.jsxs)(t.t,{variant:`outline`,color:`muted`,size:`lg`,className:(0,_.cn)(`flex items-center justify-between rounded font-normal outline-border`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-4`,`data-[state=open]:ring-primary-weak`,f.state.value===null&&`text-text-positive-muted`),children:[(0,g.jsx)(`p`,{children:f.state.value===null?r||`Select date`:(0,y.format)(f.state.value,`PPPP`)}),(0,g.jsx)(m.CalendarDaysIcon,{strokeWidth:1})]})}),(0,g.jsxs)(l.i,{align:`start`,side:`bottom`,className:`flex w-fit min-w-0 overflow-y-auto rounded p-0`,onBlur:f.handleBlur,children:[(0,g.jsxs)(`div`,{className:`flex h-full flex-col space-y-2 border-r border-r-border p-2 [&>button]:justify-start [&>button]:text-sm`,children:[(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.endOfToday)())},children:`Today`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.endOfTomorrow)())},children:`Tomorrow`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.endOfYesterday)())},children:`Yesterday`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.subDays)((0,y.endOfToday)(),3))},children:`Last 3 Days`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.subDays)((0,y.endOfToday)(),7))},children:`Last 7 Days`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.subDays)((0,y.endOfToday)(),30))},children:`Last 30 Days`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.startOfMonth)((0,y.endOfToday)()))},children:`This Month`}),(0,g.jsx)(t.t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{f.handleChange((0,y.lastDayOfMonth)((0,y.endOfToday)()))},children:`Last Month`})]}),(0,g.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,g.jsx)(`div`,{className:`min-w-73 border-b border-b-border p-2`,children:(0,g.jsx)(d.t,{mode:`single`,selected:f.state.value??void 0,hidden:{before:s??new Date(1900,0,1),after:c??new Date(2100,11,31)},onSelect:e=>{e&&f.handleChange(e)}})})})]})]})}),(0,g.jsx)(F,{isShow:!!o,children:o})]})]}),(0,g.jsx)(L,{})]})},H=({label:e,description:t,placeholder:n,tooltip:r,helperText:i,orientation:a=`responsive`,showErrorMessage:o=!0,required:s=!1,maxLength:l})=>{let{form:u,name:d,state:f,handleBlur:p,handleChange:v}=Q(),y=(0,x.useStore)(u.store,({isSubmitting:e})=>e),b=f.meta.isDirty&&f.meta.isTouched&&!f.meta.isValid,S=s&&f.value===null,C=!y&&!!f.value,w=(0,h.useCallback)(({target:{value:e}})=>{y||l&&e.length>l||v(e||null)},[y,l,v]),T=(0,h.useCallback)(()=>{y||v(null)},[y,v]);return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{"data-invalid":b,orientation:a,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{htmlFor:d,"aria-required":S,children:[e,r&&(0,g.jsx)(I,{tooltip:r})]}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{children:[(0,g.jsx)(c.t,{id:d,name:d,value:f.value===null?``:f.value,"aria-invalid":b,autoComplete:`email`,placeholder:n,className:(0,_.cn)(`pl-9`,C&&`pr-9`,y&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:p,onChange:w}),(0,g.jsx)(`div`,{className:`absolute top-0 left-0 flex size-9 items-center justify-center text-muted`,children:(0,g.jsx)(m.AtSignIcon,{size:14})}),C&&(0,g.jsx)(`button`,{type:`button`,"aria-label":`Clear`,className:`absolute inset-e-0 inset-y-0 top-3 flex h-fit w-8 cursor-pointer items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:text-text-positive-strong`,onClick:T,children:(0,g.jsx)(m.XIcon,{size:14,"aria-hidden":`true`})}),(0,g.jsx)(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:o&&f.meta.isDirty&&(0,g.jsx)(R,{errors:f.meta.errors})}),(0,g.jsx)(F,{isShow:!!i,children:i})]})]}),(0,g.jsx)(L,{})]})},U=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,ee=e=>Number(e).toLocaleString(),te=(e,t,n)=>{if(n===`none`)return e;let r=10**t,i=e*r;switch(n){case`up`:return Math.ceil(i)/r;case`down`:return Math.floor(i)/r;case`nearest`:return i%1<.1?Math.floor(i)/r:i%1>=.59?Math.ceil(i)/r:(Math.floor(i)+.5)/r;default:return e}},ne=({disabled:e=!1,readOnly:t=!1,allowNegative:n=!1,numberAfterDecimalPoint:r=2,roundingRule:i=`none`,value:a=null,unitText:o,decimal:s,placeholder:l,precision:u,wrapperClassName:d,className:f,onChange:p,onValueChange:m,onFocus:v,onBlur:y,...b})=>{let x=(0,h.useRef)(null),S=(0,h.useRef)(null),[C,w]=(0,h.useState)(a?.toString()??null),T=(0,h.useMemo)(()=>s?.[1]??r,[s,r]),E=(0,h.useMemo)(()=>s&&s[0]-s[1],[s]),D=(0,h.useMemo)(()=>U(n),[n]),O=(0,h.useCallback)(e=>{if(!T||e===`-`)return!0;let[t,n=``]=e.split(`.`),r=t.startsWith(`-`)?t.length-1:t.length;return n.length<=T&&r<=(E??1/0)},[T,E]),k=(0,h.useCallback)(e=>{if(e===`0`)return`0`;if(!Number(e))return null;let[t,n=``]=te(parseFloat(e),Math.min(T-1,u||0),i).toString().split(`.`),r=ee(t);return n?`${r}.${n}`:r},[T,u,i]),A=(0,h.useCallback)(e=>{let t=e===`0`,n=e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e);if(t){m?.(0),w(e);return}if(n){w(()=>(m?.(0),e));return}},[m]),j=(0,h.useCallback)(e=>{p?.(e);let{value:t}=e.target;if(t===``||t===void 0){m?.(null),w(null);return}A(t),!(!D.test(t)||!O(t))&&(m?.(parseFloat(t)||0),w(t))},[O,p,m,A,D]),M=(0,h.useCallback)(e=>{t||(v?.(e),w(e=>typeof e==`string`?e.replace(/,/g,``):null))},[t,v]),N=(0,h.useCallback)(e=>{t||(y?.(e),w(e=>e===null?null:e===`0`||e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e)?`0`:typeof e==`string`?k(e):null))},[t,k,y]);return(0,h.useEffect)(()=>{let e=document.activeElement===S.current;if(a==null||!D.test(a.toString())||!O(a.toString())){w(null);return}w(t=>e?t:k(a.toString()))},[k,a,O,D]),(0,h.useEffect)(()=>{if(!x.current||!S.current||!o)return;let e=x.current.offsetWidth;S.current.style.setProperty(`padding-right`,`${(e+10)/16}rem`)},[o]),(0,g.jsxs)(`div`,{className:(0,_.cn)(`relative`,d),children:[(0,g.jsx)(c.t,{...b,ref:S,value:C||(t?`0`:``),placeholder:l,disabled:e,readOnly:t,className:(0,_.cn)(`text-end font-number text-sm slashed-zero lining-nums tabular-nums`,t&&`bg-muted text-muted-foreground`,f),onChange:j,onFocus:M,onBlur:N}),o&&(0,g.jsx)(`span`,{ref:x,className:`-translate-y-1/2 pointer-events-none absolute top-1/2 right-2 text-muted-foreground text-sm`,children:o})]})},re=({label:e,description:t,placeholder:n,tooltip:r,helperText:i,orientation:a=`responsive`,showErrorMessage:o=!0,rounding:s,decimalPlaces:c,percision:l,unit:u,required:d,allowNegative:f})=>{let p=Q(),v=(0,x.useStore)(p.form.store,({isSubmitting:e})=>e),y=p.state.meta.errors,b=d?p.state.value===null:!1,S=(0,h.useCallback)(e=>{v||p.handleChange(e)},[v,p.handleChange]);return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:a,"data-invalid":p.state.meta.isTouched&&!p.state.meta.isValid,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{htmlFor:p.name,"aria-required":b,children:[e,r&&(0,g.jsx)(I,{tooltip:r})]}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{children:[(0,g.jsxs)(`div`,{className:`relative w-full`,children:[(0,g.jsx)(ne,{id:p.name,value:p.state.value,"aria-invalid":p.state.meta.isTouched&&!p.state.meta.isValid&&p.state.meta.isDirty,placeholder:n,roundingRule:s,numberAfterDecimalPoint:c,precision:l,unitText:u,allowNegative:f,className:(0,_.cn)(v&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:p.handleBlur,onValueChange:S}),v&&(0,g.jsx)(`div`,{className:`absolute inset-s-2 inset-y-0 top-2.5 text-muted-weak [&>svg]:size-3.5`,children:(0,g.jsx)(m.Loader2Icon,{className:`animate-spin text-primary-strong`})}),p.state.meta.isDirty&&o&&!!y.length&&(0,g.jsx)(`div`,{className:`absolute inset-s-2 inset-y-0 top-2.75 text-danger-strong [&>svg]:size-3.5`,children:(0,g.jsx)(m.BanIcon,{})}),(0,g.jsx)(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:p.state.meta.isDirty&&o&&(0,g.jsx)(R,{errors:y})})]}),(0,g.jsx)(F,{isShow:!!i,children:i})]})]}),(0,g.jsx)(L,{})]})},ie=({label:e,description:t,placeholder:n,orientation:r=`responsive`,tooltip:i,helperText:a,showErrorMessage:o=!0})=>{let s=(0,h.useId)(),{form:l,name:u,state:d,handleBlur:f,handleChange:p}=Q(),_=(0,x.useStore)(l.store,({isSubmitting:e})=>e),[v,y]=(0,h.useState)(!1),b=d.meta.isDirty&&d.meta.isTouched&&!d.meta.isValid,S=(0,h.useCallback)(()=>y(e=>!e),[]),C=(0,h.useCallback)(({target:{value:e}})=>{_||p(e||null)},[_,p]);return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{"data-invalid":b,orientation:r,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{htmlFor:s,children:[e,i&&(0,g.jsx)(I,{tooltip:i})]}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{children:[(0,g.jsx)(c.t,{id:s,name:u,type:v?`text`:`password`,placeholder:n,value:d.value??``,"aria-invalid":b,autoComplete:`new-password`,onBlur:f,onChange:C}),(0,g.jsx)(`button`,{className:`absolute inset-e-0 inset-y-0 flex size-9 items-center justify-center rounded-e-md text-muted outline-none transition-[color,box-shadow] focus:z-10 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:S,"aria-label":v?`Hide password`:`Show password`,"aria-pressed":v,"aria-controls":s,children:v?(0,g.jsx)(m.EyeOffIcon,{size:16,"aria-hidden":`true`}):(0,g.jsx)(m.EyeIcon,{size:16,"aria-hidden":`true`})}),(0,g.jsx)(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:o&&d.meta.isDirty&&(0,g.jsx)(R,{errors:d.meta.errors})}),(0,g.jsx)(F,{isShow:!!a,children:a})]})]}),(0,g.jsx)(L,{})]})},ae=({label:e,description:t,orientation:n,options:r,tooltip:i,helperText:a})=>{let o=Q(),s=(0,x.useStore)(o.form.store,({isSubmitting:e})=>e);return(0,g.jsxs)(O,{className:`px-4`,children:[(0,g.jsxs)(k,{orientation:n,className:`flex-col gap-2`,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{children:[e,i&&(0,g.jsx)(I,{tooltip:i})]}),(0,g.jsx)(P,{children:t}),(0,g.jsx)(F,{isShow:!!a,children:a})]}),(0,g.jsx)(j,{children:(0,g.jsx)(f.t,{value:o.state.value??``,className:`w-full`,onValueChange:o.handleChange,children:r.map(e=>(0,g.jsx)(M,{className:(0,_.cn)(`h-fit`,o.state.value===e.value&&`border-primary-weak! bg-primary-bg-subtle`,s&&`pointer-events-none bg-muted-muted opacity-60`,o.state.value===e.value&&s&&`border-border-strong!`),children:(0,g.jsxs)(k,{orientation:`horizontal`,className:`items-start gap-3 rounded p-2!`,children:[(0,g.jsx)(f.n,{value:e.value,className:`mt-0.5 shrink-0`}),(0,g.jsxs)(A,{className:`gap-0.5!`,children:[(0,g.jsx)(N,{children:e.label}),(0,g.jsx)(P,{className:`text-xs`,children:e.description})]})]})},e.value))})})]}),(0,g.jsx)(L,{})]})},oe=({label:e,description:t,placeholder:n,orientation:r=`responsive`,tooltip:i,options:a,helperText:o,required:s=!1})=>{let c=Q(),l=c.state.meta.isTouched&&!c.state.meta.isValid,d=s&&c.state.value===null,f=c.state.meta.errors;return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:r,"data-invalid":l,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{htmlFor:c.name,"aria-required":d,children:[e,i&&(0,g.jsx)(I,{tooltip:i})]}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{className:`flex flex-col`,children:[(0,g.jsxs)(u.t,{value:c.state.value??``,onValueChange:c.handleChange,children:[(0,g.jsx)(u.s,{"aria-invalid":l?`true`:void 0,onBlur:c.handleBlur,children:(0,g.jsx)(u.c,{placeholder:n})}),(0,g.jsxs)(u.n,{children:[!!a.length&&a.map(e=>(0,g.jsx)(u.i,{value:e.value,children:e.label},e.value)),!a.length&&(0,g.jsxs)(`div`,{className:`flex items-center justify-center gap-x-2 rounded border border-border bg-muted-muted px-4 py-6.5 text-center text-sm text-text-positive-weak`,children:[(0,g.jsx)(m.PackagePlusIcon,{strokeWidth:1}),`No options available`]})]})]}),(0,g.jsx)(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:(0,g.jsx)(R,{errors:f})}),(0,g.jsx)(F,{isShow:!!o,children:o})]})]}),(0,g.jsx)(L,{})]})};function W({className:e,...t}){return(0,g.jsx)(b.Switch.Root,{"data-slot":`switch`,className:(0,_.cn)(`peer`,`w-8 shrink-0 cursor-pointer items-center rounded-full shadow-xs transition-all`,`inline-flex h-5`,`focus-visible:border-primary-strong`,`focus-visible:ring-primary-weak`,`focus-visible:ring-4`,`disabled:cursor-not-allowed`,`disabled:opacity-50`,`-outline-offset-1 inset-shadow-2xs outline-1`,`data-[state=checked]:bg-primary`,`data-[state=checked]:outline-primary-strong`,`data-[state=unchecked]:bg-muted-weak`,`data-[state=unchecked]:outline-border`,`data-[state=unchecked]:[&_span]:size-4`,`data-[state=unchecked]:[&_span]:translate-x-0.5`,`data-[state=unchecked]:[&_span]:rtl:-translate-x-0.5`,e),...t,children:(0,g.jsx)(b.Switch.Thumb,{"data-slot":`switch-thumb`,className:(0,_.cn)(`block size-4 bg-card shadow-xs`,`pointer-events-none rounded-full ring-0 transition-transform`,`data-[state=checked]:translate-x-[calc(100%-3px)]`,`data-[state=unchecked]:translate-x-0`)})})}const G=({label:e,description:t,helperText:n})=>{let r=Q();return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:`vertical`,className:`relative justify-between gap-y-1`,children:[(0,g.jsxs)(A,{children:[(0,g.jsx)(N,{className:`cursor-pointer`,children:(0,g.jsx)(`label`,{htmlFor:r.name,children:e})}),(0,g.jsx)(P,{children:t}),(0,g.jsx)(W,{id:r.name,checked:r.state.value??!1,className:`absolute top-1 right-1`,onBlur:r.handleBlur,onCheckedChange:r.handleChange})]}),(0,g.jsx)(F,{isShow:!!n,children:n})]}),(0,g.jsx)(L,{})]})},K=({label:e,description:t,placeholder:n,tooltip:r,helperText:i,counter:a=!1,orientation:o=`responsive`,showClearButton:s=!1,showErrorMessage:l=!0,required:u=!1,maxLength:d})=>{let f=(0,h.useId)(),p=(0,h.useRef)(null),{form:v,name:y,state:b,handleBlur:S,handleChange:C}=Q(),w=(0,x.useStore)(v.store,({isSubmitting:e})=>e),T=s&&!w&&!!b.value,E=b.value?b.value.length:0,D=(0,h.useMemo)(()=>{if(!a)return``;let e=`character${[0,1].includes(E)?``:`s`}`;return a&&d?`${E} / ${d} character${E?`s`:``}`:`${E} ${e}`},[E,a,d]),N=b.meta.isDirty&&b.meta.isTouched&&!b.meta.isValid,z=u&&b.value===null,B=d&&E>=d*.8,V=d&&E>=d,H=(0,h.useCallback)(({target:{value:e}})=>{w||a&&d&&e.length>d||C(e||null)},[w,a,d,C]),U=(0,h.useCallback)(()=>{w||(C(null),p.current?.focus())},[w,C]);return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:o,"data-invalid":N,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{"aria-required":z,htmlFor:f,children:[e,r&&(0,g.jsx)(I,{tooltip:r})]}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{children:[(0,g.jsx)(c.t,{ref:p,id:f,name:y,value:b.value??``,"aria-invalid":N,autoComplete:`off`,placeholder:n,autoCapitalize:`none`,autoCorrect:`off`,className:(0,_.cn)(`pr-6`,w&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:S,onChange:H}),T&&(0,g.jsx)(`button`,{type:`button`,"aria-label":`Clear`,className:`absolute inset-e-0 inset-y-0 top-3 flex h-fit w-8 cursor-pointer items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:text-text-positive-intense [&>svg]:size-3.5`,onClick:U,children:(0,g.jsx)(m.XIcon,{"aria-hidden":`true`})}),w&&(0,g.jsx)(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-muted-weak`,children:(0,g.jsx)(m.Loader2Icon,{size:14,className:`animate-spin text-primary-strong`})}),!T&&b.meta.isDirty&&l&&!!b.meta.errors.length&&(0,g.jsx)(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-danger-strong`,children:(0,g.jsx)(m.BanIcon,{"aria-hidden":`true`,size:14})}),(0,g.jsxs)(`div`,{className:`my-1 flex w-full items-start justify-between gap-x-2`,children:[b.meta.isDirty&&l?(0,g.jsx)(R,{className:`flex-1`,errors:b.meta.errors}):(0,g.jsx)(`div`,{}),!!a&&(0,g.jsx)(`p`,{className:(0,_.cn)(`h-4 flex-0 text-nowrap text-end text-xs tabular-nums transition-colors`,V?`font-medium text-danger-strong`:B?`text-warning-strong`:`text-text-positive-weak`),children:D})]}),(0,g.jsx)(F,{isShow:!!i,children:i})]})]}),(0,g.jsx)(L,{})]})},q=(0,h.memo)(({label:e,description:t,placeholder:n,tooltip:r,helperText:i,counter:a=!1,orientation:o=`responsive`,showErrorMessage:s=!0,required:c=!1,maxLength:l})=>{let u=(0,h.useId)(),{form:d,state:f,name:v,handleBlur:y,handleChange:b}=Q(),S=(0,x.useStore)(d.store,({isSubmitting:e})=>e),C=f.value?f.value.length:0,w=(0,h.useMemo)(()=>{if(!a)return``;let e=`character${[0,1].includes(C)?``:`s`}`;return a&&l?`${C} / ${l} character${C?`s`:``}`:`${C} ${e}`},[C,a,l]),T=f.meta.isDirty&&f.meta.isTouched&&!f.meta.isValid,E=c&&f.value===null,D=f.meta.errors,N=l&&C>=l*.8,z=l&&C>=l,B=(0,h.useCallback)(({target:{value:e}})=>{S||a&&l&&e.length>l||b(e||null)},[S,a,l,b]);return(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:o,"data-invalid":T,children:[(0,g.jsxs)(A,{children:[(0,g.jsxs)(M,{"aria-required":E,htmlFor:u,children:[e,r&&(0,g.jsx)(I,{tooltip:r})]}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{children:[(0,g.jsx)(p.t,{id:u,name:v,value:f.value===null?``:f.value,"aria-invalid":T,autoCapitalize:`none`,autoComplete:`off`,placeholder:n,className:(0,_.cn)(S&&`pointer-events-none bg-muted-muted opacity-60`),onChange:B,onBlur:y}),S&&(0,g.jsx)(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-muted-weak`,children:(0,g.jsx)(m.Loader2Icon,{size:14,className:`animate-spin text-primary-strong`})}),f.meta.isDirty&&s&&!!D.length&&(0,g.jsx)(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-danger-strong`,children:(0,g.jsx)(m.BanIcon,{size:14})}),(0,g.jsxs)(`div`,{className:`my-1 flex w-full items-start justify-between gap-x-2`,children:[f.meta.isDirty&&s?(0,g.jsx)(R,{className:`flex-1`,errors:f.meta.errors}):(0,g.jsx)(`div`,{}),!!a&&(0,g.jsx)(`p`,{className:(0,_.cn)(`h-4 flex-0 text-nowrap text-end text-xs tabular-nums transition-colors`,z?`font-medium text-danger-strong`:N?`text-warning-strong`:`text-text-positive-weak`),children:w})]}),(0,g.jsx)(F,{isShow:!!i,children:i})]})]}),(0,g.jsx)(L,{})]})});q.displayName=`TextareaField`;const se=({label:e,className:n})=>{let r=$(),i=(0,h.useCallback)(async()=>{await r.handleSubmit({submitAction:`submit`}),r.state.isSubmitSuccessful&&r.reset()},[r]);return(0,g.jsx)(r.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:r,isSubmitting:a})=>(0,g.jsx)(t.t,{type:`button`,size:`md`,disabled:r,isLoading:a,className:(0,_.cn)(`min-h-8 min-w-32`,n),onClick:i,children:e??`Submit`})})},ce=({type:e=`create`})=>{let n=$();return(0,g.jsxs)(`div`,{className:`flex h-8 items-center justify-between`,children:[(0,g.jsx)(n.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>(0,g.jsx)(t.t,{color:`muted`,variant:`outline`,type:`button`,size:`md`,disabled:e,className:`h-full min-w-32`,onClick:()=>n.reset(),children:`Cancel`})}),e===`create`&&(0,g.jsx)(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:e,isSubmitting:r})=>(0,g.jsxs)(t.t,{type:`submit`,size:`md`,disabled:e,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`create`}),n.state.isSubmitSuccessful&&n.reset()},children:[(0,g.jsx)(m.PlusIcon,{}),`Add New`]})}),e===`update`&&(0,g.jsx)(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:e,isSubmitting:r})=>(0,g.jsxs)(t.t,{type:`submit`,size:`md`,disabled:e,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`update`}),n.state.isSubmitSuccessful&&n.reset()},children:[(0,g.jsx)(m.ArrowDownToLine,{}),`Update`]})})]})};function J({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,g.jsx)(b.Separator.Root,{"data-slot":`separator`,decorative:n,orientation:t,className:(0,_.cn)(`shrink-0 bg-border-weak`,`data-[orientation=horizontal]:h-px`,`data-[orientation=horizontal]:w-full`,`data-[orientation=vertical]:h-full`,`data-[orientation=vertical]:w-px`,e),...r})}const le=({title:e,description:n,onDelete:r,children:i})=>(0,g.jsxs)(`section`,{"data-slot":`card-form`,className:`relative flex flex-col rounded-md bg-card pb-4 shadow-card ring-1 ring-border`,children:[(0,g.jsxs)(`div`,{"data-slot":`card-form-header`,className:`flex flex-col space-y-0.5 px-4 py-3`,children:[(0,g.jsx)(`p`,{className:`font-semibold text-base tracking-tight`,children:e}),!!n&&(0,g.jsx)(`p`,{className:`text-text-positive-weak text-sm`,children:n})]}),(0,g.jsx)(J,{}),(0,g.jsx)(`div`,{"data-slot":`card-form-main`,className:`flex flex-col py-4`,children:i}),!!r&&(0,g.jsxs)(t.t,{color:`danger`,variant:`ghost`,size:`sm`,className:`absolute top-2.5 right-3`,onClick:e=>{r?.(),e.preventDefault(),e.stopPropagation()},children:[(0,g.jsx)(m.Trash2Icon,{}),`Remove`]})]}),ue=({children:e})=>(0,g.jsx)(`div`,{"data-slot":`section-form`,className:`flex flex-col space-y-4`,children:e}),Y=({disabled:e,className:n,onClick:r,children:i})=>(0,g.jsx)(t.t,{type:`button`,variant:`outline`,color:`muted`,disabled:e,className:(0,_.cn)(`min-w-40`,n),onClick:r,children:i??`Cancel`}),X=({isSubmitting:e,submitText:n=`Submit`,disabled:r,className:i,onClick:a})=>(0,g.jsx)(t.t,{type:`button`,isLoading:e,disabled:r||e,className:(0,_.cn)(`min-w-40`,i),onClick:a,children:n}),de=({title:e,submitText:t,open:n,onOpenChange:i,children:o})=>{let s=$(),c=(0,h.useCallback)(e=>{e||s.reset(),i?.(e)},[s.reset,i]);return(0,g.jsx)(a.t,{open:n,onOpenChange:c,children:(0,g.jsxs)(a.c,{"data-slot":`dialog-portal`,children:[(0,g.jsx)(a.s,{}),(0,g.jsxs)(a.r,{className:`flex size-full max-h-dvh max-w-dvw flex-col gap-0 overflow-y-auto p-0 shadow-dialog sm:h-auto sm:max-h-[85dvh] sm:max-w-2xl sm:rounded-md`,children:[(0,g.jsx)(`div`,{"data-slot":`dialog-header`,className:`flex items-center justify-center gap-2 px-6 py-5 text-center sm:text-left`,children:(0,g.jsx)(a.l,{"data-slot":`dialog-title`,className:`text-lg font-semibold tracking-tight`,children:e})}),(0,g.jsx)(r.t,{}),(0,g.jsx)(`div`,{"data-slot":`dialog-content`,className:`relative flex flex-col overflow-y-auto p-0 pt-4 max-sm:flex-1 sm:p-4`,children:o}),(0,g.jsx)(r.t,{}),(0,g.jsxs)(`div`,{"data-slot":`dialog-footer`,className:`flex flex-col-reverse items-center justify-end gap-2 px-6 py-4 sm:flex-row max-sm:[&>button]:w-full`,children:[(0,g.jsx)(s.Subscribe,{selector:e=>({disabled:e.isSubmitting}),children:({disabled:e})=>(0,g.jsx)(Y,{disabled:e,onClick:()=>{s.reset(),c(!1)}})}),(0,g.jsx)(s.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:n})=>(0,g.jsx)(X,{isSubmitting:e,disabled:n,submitText:t,onClick:()=>s.handleSubmit()})})]})]})]})})},fe=({label:e,description:t,helperText:n,orientation:r=`responsive`,children:i})=>(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{orientation:r,children:[(0,g.jsxs)(A,{children:[(0,g.jsx)(M,{children:e}),(0,g.jsx)(P,{children:t})]}),(0,g.jsxs)(j,{children:[i,(0,g.jsx)(F,{isShow:!!n,children:n})]})]}),(0,g.jsx)(L,{})]}),pe=({title:e,open:t,contentClassName:n,onOpenChange:r,children:a})=>{let o=$();return(0,g.jsx)(b.Dialog.Root,{"data-slot":`dialog`,open:t,onOpenChange:r,children:(0,g.jsxs)(b.Dialog.Portal,{"data-slot":`dialog-portal`,children:[(0,g.jsx)(b.Dialog.Overlay,{"data-slot":`dialog-overlay`,className:(0,_.cn)(`fixed inset-0 z-40 bg-black/40 backdrop-blur-sm`,`data-[state=open]:animate-in data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:fade-out`)}),(0,g.jsx)(b.Dialog.Content,{"data-slot":`dialog-content`,className:(0,_.cn)(`fixed top-4 right-4 z-50 h-[calc(100dvh-2rem)] min-w-sm max-w-xl rounded-md bg-background shadow-lg ring-1 ring-border`,`duration-300`,`data-[state=open]:animate-in data-[state=open]:slide-in-from-right data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=closed]:fade-out`),children:(0,g.jsxs)(`section`,{className:`relative flex size-full flex-col`,children:[(0,g.jsx)(`header`,{className:`flex h-14 shrink-0 items-center border-b border-border px-5`,children:(0,g.jsx)(`h2`,{className:`font-semibold text-base tracking-tight text-text-positive`,children:e})}),(0,g.jsx)(`div`,{className:(0,_.cn)(`flex flex-1 flex-col overflow-y-auto py-4`,n),children:a}),(0,g.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3`,children:[(0,g.jsx)(o.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:t})=>(0,g.jsx)(X,{isSubmitting:e,disabled:t,className:`w-full`,onClick:()=>o.handleSubmit()})}),(0,g.jsx)(o.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>(0,g.jsx)(Y,{disabled:e,className:`w-full`,onClick:()=>{o.reset(),r?.(!1)}})})]}),(0,g.jsx)(b.Dialog.Close,{asChild:!0,children:(0,g.jsx)(i.t,{className:`absolute top-2.5 right-3`})})]})})]})})},me=({children:e})=>(0,g.jsx)(`header`,{"data-slot":`section-header`,className:`flex items-center px-4 py-3 font-semibold text-base text-text-positive tracking-tight`,children:e}),he=({children:e})=>(0,g.jsx)(`main`,{"data-slot":`section-main`,className:`relative flex flex-col py-4`,children:e}),ge=({title:e,children:t})=>(0,g.jsxs)(`section`,{"data-slot":`section-form`,className:`flex flex-col rounded-md bg-background shadow-card ring-1 ring-border`,children:[(0,g.jsx)(me,{children:e}),(0,g.jsx)(J,{}),(0,g.jsx)(he,{children:t})]}),_e=({title:e,description:t,helperText:n})=>(0,g.jsxs)(O,{className:`gap-y-4 px-4`,children:[(0,g.jsxs)(k,{className:`gap-0`,children:[(0,g.jsxs)(A,{children:[(0,g.jsx)(D,{className:`mb-1`,children:e}),(0,g.jsx)(P,{children:t})]}),(0,g.jsx)(F,{isShow:!!n,children:n})]}),(0,g.jsx)(L,{})]}),{fieldContext:ve,formContext:Z,useFieldContext:Q,useFormContext:$}=(0,x.createFormHookContexts)(),{useAppForm:ye,withForm:be,withFieldGroup:xe}=(0,x.createFormHook)({fieldContext:ve,formContext:Z,fieldComponents:{TextField:K,TextareaField:q,NumberField:re,EmailField:H,PasswordField:ie,SelectField:oe,ComboboxField:B,DateField:V,SwitchField:G,RadioGroupField:ae,CheckboxField:z,FieldGroup:O,Field:k,FieldContent:A,FieldLabel:M,FieldContentMain:j,FieldSeparator:L,FieldError:R},formComponents:{TanStackDialogForm:de,TanStackPopoverForm:pe,TanStackContainerForm:ue,TanStackSectionForm:ge,TanStackCardForm:le,TanStackFieldGroup:fe,TanStackTitleField:_e,TanStackActionsForm:ce,TanStackActionSubmit:se}});Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return O}});
2
+ //# sourceMappingURL=tanstack-form-BUjk7DIz.cjs.map