@datum-cloud/datum-ui 0.4.0 → 0.6.0-alpha.b817c77

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 (195) hide show
  1. package/README.md +78 -39
  2. package/dist/adapter-context-B7L2ucTr.mjs +25 -0
  3. package/dist/alert/index.mjs +2 -3
  4. package/dist/{alert-BC2Mccfo.mjs → alert-BDj6od5I.mjs} +2 -4
  5. package/dist/app-navigation/index.mjs +4 -12
  6. package/dist/{app-navigation-DsCKgfPe.mjs → app-navigation-84ro28PU.mjs} +5 -8
  7. package/dist/autocomplete/index.mjs +2 -7
  8. package/dist/{autocomplete-DRB_kSVx.mjs → autocomplete-V5-qslzS.mjs} +5 -7
  9. package/dist/avatar/index.mjs +2 -4
  10. package/dist/{avatar-DyLq0xkt.mjs → avatar-BtKVcvO4.mjs} +2 -4
  11. package/dist/avatar-stack/index.mjs +2 -6
  12. package/dist/{avatar-stack-BT0dBswq.mjs → avatar-stack-oVr8tsU7.mjs} +4 -6
  13. package/dist/badge/index.mjs +2 -3
  14. package/dist/{badge-BgFj4Nsc.mjs → badge-DJR33ftJ.mjs} +2 -4
  15. package/dist/breadcrumb/index.mjs +2 -4
  16. package/dist/{breadcrumb-CJNaYyk1.mjs → breadcrumb-B-9G347O.mjs} +2 -4
  17. package/dist/button/index.mjs +3 -4
  18. package/dist/{button-0N61fmAR.mjs → button-BllvE9Lm.mjs} +3 -5
  19. package/dist/{button-D6AORsOz.mjs → button-D3RrsMfQ.mjs} +2 -4
  20. package/dist/{link-button-Cby0p4LW.mjs → button-fO8nazJE.mjs} +3 -5
  21. package/dist/button-group/index.mjs +2 -5
  22. package/dist/{button-group-BDk8btAy.mjs → button-group-CYPka2zz.mjs} +3 -5
  23. package/dist/calendar/index.mjs +2 -5
  24. package/dist/{calendar-BtfraIvX.mjs → calendar-DEkCw7I1.mjs} +4 -6
  25. package/dist/{calendar-date-picker-B9mxJM7f.mjs → calendar-date-picker-DWK94_DC.mjs} +6 -8
  26. package/dist/card/index.mjs +2 -4
  27. package/dist/{card-BiHXFt4s.mjs → card-DKG1Cwlj.mjs} +3 -6
  28. package/dist/chart/index.mjs +2 -4
  29. package/dist/{chart-CL0i-xIt.mjs → chart-CUa21ynK.mjs} +2 -4
  30. package/dist/checkbox/index.mjs +2 -4
  31. package/dist/{checkbox-CQrjygFt.mjs → checkbox-I5BvrMPe.mjs} +3 -6
  32. package/dist/{close.icon-D2r5q3bj.mjs → close.icon-HCfS4Y-N.mjs} +2 -4
  33. package/dist/{cn-DWCc1QRE.mjs → cn-D2KYQ917.mjs} +1 -3
  34. package/dist/code-editor/index.mjs +2 -0
  35. package/dist/{col-C9PDhvm5.mjs → col-YBbQ5wlb.mjs} +2 -7
  36. package/dist/collapsible/index.mjs +2 -3
  37. package/dist/{collapsible-Dw71o2um.mjs → collapsible-CUphkSBt.mjs} +1 -3
  38. package/dist/command/index.mjs +2 -5
  39. package/dist/{command-DVroicgn.mjs → command-DqHWukGK.mjs} +3 -5
  40. package/dist/components/features/code-editor/code-editor-tabs.d.ts +63 -0
  41. package/dist/components/features/code-editor/code-editor-tabs.d.ts.map +1 -0
  42. package/dist/components/features/code-editor/code-editor.d.ts +58 -0
  43. package/dist/components/features/code-editor/code-editor.d.ts.map +1 -0
  44. package/dist/components/features/code-editor/index.d.ts +6 -0
  45. package/dist/components/features/code-editor/index.d.ts.map +1 -0
  46. package/dist/components/features/code-editor/lib/editor.d.ts +7 -0
  47. package/dist/components/features/code-editor/lib/editor.d.ts.map +1 -0
  48. package/dist/components/features/code-editor/types.d.ts +98 -0
  49. package/dist/components/features/code-editor/types.d.ts.map +1 -0
  50. package/dist/components/features/form/adapter-context.d.ts +17 -0
  51. package/dist/components/features/form/adapter-context.d.ts.map +1 -0
  52. package/dist/components/features/form/adapter-types.d.ts +100 -0
  53. package/dist/components/features/form/adapter-types.d.ts.map +1 -0
  54. package/dist/components/features/form/adapters/conform/conform-adapter.d.ts +9 -0
  55. package/dist/components/features/form/adapters/conform/conform-adapter.d.ts.map +1 -0
  56. package/dist/components/features/form/adapters/conform/conform-provider.d.ts +22 -0
  57. package/dist/components/features/form/adapters/conform/conform-provider.d.ts.map +1 -0
  58. package/dist/components/features/form/adapters/conform/index.d.ts +3 -0
  59. package/dist/components/features/form/adapters/conform/index.d.ts.map +1 -0
  60. package/dist/components/features/form/adapters/rhf/index.d.ts +3 -0
  61. package/dist/components/features/form/adapters/rhf/index.d.ts.map +1 -0
  62. package/dist/components/features/form/adapters/rhf/rhf-adapter.d.ts +10 -0
  63. package/dist/components/features/form/adapters/rhf/rhf-adapter.d.ts.map +1 -0
  64. package/dist/components/features/form/adapters/rhf/rhf-provider.d.ts +22 -0
  65. package/dist/components/features/form/adapters/rhf/rhf-provider.d.ts.map +1 -0
  66. package/dist/components/features/form/components/form-autocomplete.d.ts.map +1 -1
  67. package/dist/components/features/form/components/form-checkbox.d.ts.map +1 -1
  68. package/dist/components/features/form/components/form-copy-box.d.ts.map +1 -1
  69. package/dist/components/features/form/components/form-field-array.d.ts +5 -17
  70. package/dist/components/features/form/components/form-field-array.d.ts.map +1 -1
  71. package/dist/components/features/form/components/form-field.d.ts +7 -21
  72. package/dist/components/features/form/components/form-field.d.ts.map +1 -1
  73. package/dist/components/features/form/components/form-input-group.d.ts +4 -4
  74. package/dist/components/features/form/components/form-input-group.d.ts.map +1 -1
  75. package/dist/components/features/form/components/form-input.d.ts.map +1 -1
  76. package/dist/components/features/form/components/form-radio-group.d.ts.map +1 -1
  77. package/dist/components/features/form/components/form-root.d.ts +5 -25
  78. package/dist/components/features/form/components/form-root.d.ts.map +1 -1
  79. package/dist/components/features/form/components/form-select.d.ts.map +1 -1
  80. package/dist/components/features/form/components/form-switch.d.ts.map +1 -1
  81. package/dist/components/features/form/components/form-textarea.d.ts.map +1 -1
  82. package/dist/components/features/form/components/stepper/form-stepper.d.ts.map +1 -1
  83. package/dist/components/features/form/context/form-context.d.ts +2 -2
  84. package/dist/components/features/form/context/form-context.d.ts.map +1 -1
  85. package/dist/components/features/form/hooks/use-field.d.ts +12 -18
  86. package/dist/components/features/form/hooks/use-field.d.ts.map +1 -1
  87. package/dist/components/features/form/hooks/use-watch.d.ts +9 -20
  88. package/dist/components/features/form/hooks/use-watch.d.ts.map +1 -1
  89. package/dist/components/features/form/index.d.ts +33 -27
  90. package/dist/components/features/form/index.d.ts.map +1 -1
  91. package/dist/components/features/form/types/index.d.ts +32 -32
  92. package/dist/components/features/form/types/index.d.ts.map +1 -1
  93. package/dist/components/features/form/utils/get-field-constraints.d.ts +11 -0
  94. package/dist/components/features/form/utils/get-field-constraints.d.ts.map +1 -0
  95. package/dist/components/features/index.d.ts +1 -0
  96. package/dist/components/features/index.d.ts.map +1 -1
  97. package/dist/components/toast.d.ts +2 -0
  98. package/dist/components/toast.d.ts.map +1 -0
  99. package/dist/data-table/index.mjs +21 -51
  100. package/dist/date-picker/index.mjs +3 -10
  101. package/dist/dialog/index.mjs +2 -5
  102. package/dist/{dialog-B0B3Kbfk.mjs → dialog-Bm2H9lrx.mjs} +4 -6
  103. package/dist/{dialog-DdrHeboM.mjs → dialog-DASRaFxD.mjs} +2 -4
  104. package/dist/dropdown/index.mjs +2 -3
  105. package/dist/{dropdown-Cdx7rOKv.mjs → dropdown-DZiAt-jS.mjs} +3 -5
  106. package/dist/{dropdown-menu-CdShrDz_.mjs → dropdown-menu-lALvDnab.mjs} +5 -7
  107. package/dist/dropzone/index.mjs +2 -5
  108. package/dist/{dropzone-B6kSN3DY.mjs → dropzone-ogtpQ4fy.mjs} +5 -8
  109. package/dist/empty-content/index.mjs +2 -3
  110. package/dist/{empty-content-B1lwLr40.mjs → empty-content-C63GPJ5d.mjs} +3 -9
  111. package/dist/form/adapters/conform/index.mjs +237 -0
  112. package/dist/form/adapters/rhf/index.mjs +181 -0
  113. package/dist/form/index.mjs +3 -146
  114. package/dist/{use-stepper-DigoyHhX.mjs → form-BE1xBne4.mjs} +447 -601
  115. package/dist/get-field-constraints-BPMW8VvY.mjs +48 -0
  116. package/dist/grid/index.mjs +2 -3
  117. package/dist/hooks/index.mjs +3 -4
  118. package/dist/{use-debounce-MnfjH51L.mjs → hooks-DYjN7lvC.mjs} +1 -3
  119. package/dist/hover-card/index.mjs +2 -4
  120. package/dist/{hover-card-CEIauuie.mjs → hover-card-DDWWD5Hx.mjs} +2 -4
  121. package/dist/{icon-wrapper-BBK4z4tj.mjs → icon-wrapper-DuLp3RM1.mjs} +1 -3
  122. package/dist/icons/index.mjs +4 -5
  123. package/dist/index.mjs +66 -71
  124. package/dist/input/index.mjs +2 -5
  125. package/dist/{input-DEMoi_8F.mjs → input-DOmNpcQJ.mjs} +2 -4
  126. package/dist/{input-CYFN0Ap2.mjs → input-FKGqZypx.mjs} +3 -5
  127. package/dist/input-group/index.mjs +2 -7
  128. package/dist/{input-group-DJgYpOlq.mjs → input-group-DDtz-RT7.mjs} +5 -7
  129. package/dist/input-number/index.mjs +2 -6
  130. package/dist/{input-number-Cuy9CCg_.mjs → input-number-DEjXG2I6.mjs} +4 -6
  131. package/dist/input-with-addons/index.mjs +28 -3
  132. package/dist/label/index.mjs +2 -4
  133. package/dist/{label-mOg07fuQ.mjs → label-cnAhY-ej.mjs} +3 -6
  134. package/dist/loader-overlay/index.mjs +2 -3
  135. package/dist/{loader-overlay-8IWX_1Ga.mjs → loader-overlay-BTFdkp7W.mjs} +3 -5
  136. package/dist/map/index.mjs +2 -14
  137. package/dist/{map-CaI1EshG.mjs → map-Cw7u8r6E.mjs} +10 -14
  138. package/dist/{map-leaflet-imports-J7w1V7mh.mjs → map-leaflet-imports-D6nTEOIh.mjs} +1 -2
  139. package/dist/more-actions/index.mjs +2 -5
  140. package/dist/{more-actions-BO5ikUxY.mjs → more-actions-BNQ2yfWZ.mjs} +5 -7
  141. package/dist/nprogress/index.mjs +1 -3
  142. package/dist/page-title/index.mjs +2 -3
  143. package/dist/{page-title-DWteBy1E.mjs → page-title-CNiRNZ7p.mjs} +2 -4
  144. package/dist/popover/index.mjs +2 -4
  145. package/dist/{popover-ugw5MpuT.mjs → popover-FJAcbYoH.mjs} +2 -4
  146. package/dist/radio-group/index.mjs +2 -4
  147. package/dist/{radio-group-_gMymwnb.mjs → radio-group-CiITR0LO.mjs} +3 -6
  148. package/dist/select/index.mjs +2 -4
  149. package/dist/{select-BZOKWjlH.mjs → select-CiLR_DiQ.mjs} +3 -6
  150. package/dist/separator/index.mjs +2 -4
  151. package/dist/{separator-BzyALya2.mjs → separator-DXVTncCK.mjs} +2 -4
  152. package/dist/sheet/index.mjs +3 -5
  153. package/dist/{sheet-BX6lae56.mjs → sheet-BzXksqYY.mjs} +4 -6
  154. package/dist/{sheet-DAcFjaGw.mjs → sheet-Di3b-oPu.mjs} +2 -4
  155. package/dist/sidebar/index.mjs +2 -10
  156. package/dist/{sidebar-B3EV33mG.mjs → sidebar-BnhnjvfO.mjs} +10 -14
  157. package/dist/skeleton/index.mjs +2 -5
  158. package/dist/{skeleton-2vQ0vFQk.mjs → skeleton-BKl4mfJt.mjs} +2 -4
  159. package/dist/{skeleton-BgOwIgE0.mjs → skeleton-D1MUhAVo.mjs} +3 -5
  160. package/dist/spinner/index.mjs +2 -4
  161. package/dist/{spinner-osyXAlhr.mjs → spinner-OyOf9-Yu.mjs} +2 -4
  162. package/dist/{spinner.icon-C0MbtgqX.mjs → spinner.icon-C-vjSM6o.mjs} +2 -4
  163. package/dist/stepper/index.mjs +321 -5
  164. package/dist/switch/index.mjs +2 -4
  165. package/dist/{switch-C60FpEal.mjs → switch-DQJQhPIQ.mjs} +3 -6
  166. package/dist/table/index.mjs +2 -4
  167. package/dist/{table-Cl3UzIhI.mjs → table-Cdsh-39-.mjs} +2 -4
  168. package/dist/tabs/index.mjs +50 -3
  169. package/dist/tag-input/index.mjs +2 -5
  170. package/dist/{tag-input-DR2gukhL.mjs → tag-input-BKed-cul.mjs} +5 -7
  171. package/dist/task-queue/index.mjs +2 -7
  172. package/dist/{task-queue-dropdown-C9KHKbGh.mjs → task-queue-dropdown-Di_Wjspz.mjs} +10 -30
  173. package/dist/textarea/index.mjs +2 -5
  174. package/dist/{textarea-CVo38n3S.mjs → textarea-94vq_G_S.mjs} +2 -4
  175. package/dist/{textarea-CZF5n57i.mjs → textarea-BwD-MmTV.mjs} +3 -5
  176. package/dist/theme/index.mjs +2 -3
  177. package/dist/{theme.provider-TUHlMsjM.mjs → themes-DG1md8FI.mjs} +1 -6
  178. package/dist/{to-api-format-naIpF-NI.mjs → to-api-format-Cq4prffn.mjs} +9 -18
  179. package/dist/toast/index.mjs +3 -3
  180. package/dist/{use-toast-By9HuFwP.mjs → toast-BWnN5fax.mjs} +5 -42
  181. package/dist/toast-DpxlFNNx.mjs +37 -0
  182. package/dist/tooltip/index.mjs +2 -4
  183. package/dist/{tooltip-CuX2jQA9.mjs → tooltip-Cruvl5F6.mjs} +3 -6
  184. package/dist/types-BZNk3q65.mjs +357 -0
  185. package/dist/typography/index.mjs +2 -3
  186. package/dist/{typography-Iap9fU5P.mjs → typography-ClB8k55E.mjs} +2 -4
  187. package/dist/{use-copy-to-clipboard-n29wJwvW.mjs → use-copy-to-clipboard-BGdTmkFV.mjs} +2 -4
  188. package/dist/utils/index.mjs +2 -3
  189. package/dist/{utils-DJboNGQM.mjs → utils-C8KwMfT_.mjs} +1 -3
  190. package/dist/visually-hidden/index.mjs +2 -3
  191. package/dist/{visuallyhidden-BJsQCmg-.mjs → visuallyhidden-BLUsJpYH.mjs} +1 -3
  192. package/package.json +44 -3
  193. package/dist/input-with-addons-B8rzNhpq.mjs +0 -30
  194. package/dist/stepper-BMsn7I78.mjs +0 -323
  195. package/dist/tabs-DJU7JA3h.mjs +0 -52
@@ -1,8 +1,7 @@
1
- import { t as cn } from "./cn-DWCc1QRE.mjs";
2
- import { t as cn$1 } from "./utils-DJboNGQM.mjs";
1
+ import { t as cn } from "./cn-D2KYQ917.mjs";
2
+ import { t as cn$1 } from "./utils-C8KwMfT_.mjs";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
-
6
5
  //#region ../shadcn/ui/card.tsx
7
6
  const CardTitle = ({ className, ...props }) => {
8
7
  return /* @__PURE__ */ jsx("div", {
@@ -25,7 +24,6 @@ const CardContent = ({ className, ...props }) => {
25
24
  ...props
26
25
  });
27
26
  };
28
-
29
27
  //#endregion
30
28
  //#region src/components/base/card/card.tsx
31
29
  /**
@@ -58,6 +56,5 @@ function CardFooter({ className, ...props }) {
58
56
  ...props
59
57
  });
60
58
  }
61
-
62
59
  //#endregion
63
- export { CardDescription as a, CardContent as i, CardFooter as n, CardTitle as o, CardHeader as r, Card as t };
60
+ export { CardDescription as a, CardContent as i, CardFooter as n, CardTitle as o, CardHeader as r, Card as t };
@@ -1,4 +1,2 @@
1
- import "../utils-DJboNGQM.mjs";
2
- import { a as ChartTooltip, i as ChartStyle, n as ChartLegend, o as ChartTooltipContent, r as ChartLegendContent, t as ChartContainer } from "../chart-CL0i-xIt.mjs";
3
-
4
- export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
1
+ import { a as ChartTooltip, i as ChartStyle, n as ChartLegend, o as ChartTooltipContent, r as ChartLegendContent, t as ChartContainer } from "../chart-CUa21ynK.mjs";
2
+ export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
@@ -1,8 +1,7 @@
1
- import { t as cn } from "./utils-DJboNGQM.mjs";
1
+ import { t as cn } from "./utils-C8KwMfT_.mjs";
2
2
  import * as React$1 from "react";
3
3
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
4
4
  import * as RechartsPrimitive from "recharts";
5
-
6
5
  //#region ../shadcn/ui/chart.tsx
7
6
  const THEMES = {
8
7
  light: "",
@@ -138,6 +137,5 @@ function getPayloadConfigFromPayload(config, payload, key) {
138
137
  else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") configLabelKey = payloadPayload[key];
139
138
  return configLabelKey in config ? config[configLabelKey] : config[key];
140
139
  }
141
-
142
140
  //#endregion
143
- export { ChartTooltip as a, ChartStyle as i, ChartLegend as n, ChartTooltipContent as o, ChartLegendContent as r, ChartContainer as t };
141
+ export { ChartTooltip as a, ChartStyle as i, ChartLegend as n, ChartTooltipContent as o, ChartLegendContent as r, ChartContainer as t };
@@ -1,4 +1,2 @@
1
- import "../utils-DJboNGQM.mjs";
2
- import { t as Checkbox } from "../checkbox-CQrjygFt.mjs";
3
-
4
- export { Checkbox };
1
+ import { t as Checkbox } from "../checkbox-I5BvrMPe.mjs";
2
+ export { Checkbox };
@@ -1,10 +1,9 @@
1
- import { t as cn } from "./cn-DWCc1QRE.mjs";
2
- import { t as cn$1 } from "./utils-DJboNGQM.mjs";
1
+ import { t as cn } from "./cn-D2KYQ917.mjs";
2
+ import { t as cn$1 } from "./utils-C8KwMfT_.mjs";
3
3
  import { CheckIcon } from "lucide-react";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
7
-
8
7
  //#region ../shadcn/ui/checkbox.tsx
9
8
  function Checkbox$1({ className, ...props }) {
10
9
  return /* @__PURE__ */ jsx(CheckboxPrimitive.Root, {
@@ -18,7 +17,6 @@ function Checkbox$1({ className, ...props }) {
18
17
  })
19
18
  });
20
19
  }
21
-
22
20
  //#endregion
23
21
  //#region src/components/base/checkbox/checkbox.tsx
24
22
  function Checkbox({ ref, className, ...props }) {
@@ -29,6 +27,5 @@ function Checkbox({ ref, className, ...props }) {
29
27
  });
30
28
  }
31
29
  Checkbox.displayName = "Checkbox";
32
-
33
30
  //#endregion
34
- export { Checkbox as t };
31
+ export { Checkbox as t };
@@ -1,6 +1,5 @@
1
- import { t as cn } from "./cn-DWCc1QRE.mjs";
1
+ import { t as cn } from "./cn-D2KYQ917.mjs";
2
2
  import { jsx } from "react/jsx-runtime";
3
-
4
3
  //#region src/components/icons/close.icon.tsx
5
4
  function CloseIcon({ className, fill = "fill-foreground" }) {
6
5
  return /* @__PURE__ */ jsx("svg", {
@@ -17,6 +16,5 @@ function CloseIcon({ className, fill = "fill-foreground" }) {
17
16
  })
18
17
  });
19
18
  }
20
-
21
19
  //#endregion
22
- export { CloseIcon as t };
20
+ export { CloseIcon as t };
@@ -1,10 +1,8 @@
1
1
  import { clsx } from "clsx";
2
2
  import { twMerge } from "tailwind-merge";
3
-
4
3
  //#region src/utils/cn.ts
5
4
  function cn(...inputs) {
6
5
  return twMerge(clsx(inputs));
7
6
  }
8
-
9
7
  //#endregion
10
- export { cn as t };
8
+ export { cn as t };
@@ -0,0 +1,2 @@
1
+ import { a as formatJson, c as isValidYaml, d as CodeEditor, i as CodeEditorTabs, l as jsonToYaml, n as jsonSchema, o as formatYaml, r as yamlSchema, s as isValidJson, t as createCodeEditorSchema, u as yamlToJson } from "../types-BZNk3q65.mjs";
2
+ export { CodeEditor, CodeEditorTabs, createCodeEditorSchema, formatJson, formatYaml, isValidJson, isValidYaml, jsonSchema, jsonToYaml, yamlSchema, yamlToJson };
@@ -1,7 +1,6 @@
1
- import { t as cn } from "./cn-DWCc1QRE.mjs";
1
+ import { t as cn } from "./cn-D2KYQ917.mjs";
2
2
  import React, { use, useEffect, useState } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
-
5
4
  //#region src/components/features/grid/constants/grid.constants.ts
6
5
  const GRID_BREAKPOINTS = {
7
6
  xs: 480,
@@ -29,7 +28,6 @@ const RESPONSIVE_MAP = {
29
28
  xl: "(min-width: 1200px)",
30
29
  xxl: "(min-width: 1600px)"
31
30
  };
32
-
33
31
  //#endregion
34
32
  //#region src/components/features/grid/utils/responsive.ts
35
33
  function registerMediaQuery(query, callback) {
@@ -68,7 +66,6 @@ function getResponsiveValue(value, screens) {
68
66
  }
69
67
  return value;
70
68
  }
71
-
72
69
  //#endregion
73
70
  //#region src/components/features/grid/components/row.tsx
74
71
  const RowContext = React.createContext(null);
@@ -130,7 +127,6 @@ const Row = ({ type, align, justify, className, style, children, gutter = 0, pre
130
127
  })
131
128
  });
132
129
  };
133
-
134
130
  //#endregion
135
131
  //#region src/components/features/grid/components/col.tsx
136
132
  const Col = ({ span, order, offset, push, pull, className, prefixCls = GRID_PREFIX, style, children, ...rest }) => {
@@ -179,6 +175,5 @@ const Col = ({ span, order, offset, push, pull, className, prefixCls = GRID_PREF
179
175
  children
180
176
  });
181
177
  };
182
-
183
178
  //#endregion
184
- export { getResponsiveValue as a, GRID_COLUMNS as c, RESPONSIVE_MAP as d, getGutter as i, GRID_PREFIX as l, Row as n, registerMediaQuery as o, RowContext as r, GRID_BREAKPOINTS as s, Col as t, RESPONSIVE_ARRAY as u };
179
+ export { getResponsiveValue as a, GRID_COLUMNS as c, RESPONSIVE_MAP as d, getGutter as i, GRID_PREFIX as l, Row as n, registerMediaQuery as o, RowContext as r, GRID_BREAKPOINTS as s, Col as t, RESPONSIVE_ARRAY as u };
@@ -1,3 +1,2 @@
1
- import { n as CollapsibleContent, r as CollapsibleTrigger, t as Collapsible } from "../collapsible-Dw71o2um.mjs";
2
-
3
- export { Collapsible, CollapsibleContent, CollapsibleTrigger };
1
+ import { n as CollapsibleContent, r as CollapsibleTrigger, t as Collapsible } from "../collapsible-CUphkSBt.mjs";
2
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -1,9 +1,7 @@
1
1
  import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2
-
3
2
  //#region ../shadcn/ui/collapsible.tsx
4
3
  const Collapsible = CollapsiblePrimitive.Root;
5
4
  const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
6
5
  const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
7
-
8
6
  //#endregion
9
- export { CollapsibleContent as n, CollapsibleTrigger as r, Collapsible as t };
7
+ export { CollapsibleContent as n, CollapsibleTrigger as r, Collapsible as t };
@@ -1,5 +1,2 @@
1
- import "../utils-DJboNGQM.mjs";
2
- import "../dialog-DdrHeboM.mjs";
3
- import { a as CommandInput, c as CommandSeparator, i as CommandGroup, l as CommandShortcut, n as CommandDialog, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "../command-DVroicgn.mjs";
4
-
5
- export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
1
+ import { a as CommandInput, c as CommandSeparator, i as CommandGroup, l as CommandShortcut, n as CommandDialog, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "../command-DqHWukGK.mjs";
2
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
@@ -1,10 +1,9 @@
1
- import { t as cn } from "./utils-DJboNGQM.mjs";
2
- import { i as DialogDescription, l as DialogTitle, o as DialogHeader, r as DialogContent, t as Dialog } from "./dialog-DdrHeboM.mjs";
1
+ import { t as cn } from "./utils-C8KwMfT_.mjs";
2
+ import { i as DialogDescription, l as DialogTitle, o as DialogHeader, r as DialogContent, t as Dialog } from "./dialog-DASRaFxD.mjs";
3
3
  import { SearchIcon } from "lucide-react";
4
4
  import "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { Command } from "cmdk";
7
-
8
7
  //#region ../shadcn/ui/command.tsx
9
8
  const Command$1 = ({ className, ...props }) => {
10
9
  return /* @__PURE__ */ jsx(Command, {
@@ -81,6 +80,5 @@ const CommandShortcut = ({ className, ...props }) => {
81
80
  ...props
82
81
  });
83
82
  };
84
-
85
83
  //#endregion
86
- export { CommandInput as a, CommandSeparator as c, CommandGroup as i, CommandShortcut as l, CommandDialog as n, CommandItem as o, CommandEmpty as r, CommandList as s, Command$1 as t };
84
+ export { CommandInput as a, CommandSeparator as c, CommandGroup as i, CommandShortcut as l, CommandDialog as n, CommandItem as o, CommandEmpty as r, CommandList as s, Command$1 as t };
@@ -0,0 +1,63 @@
1
+ import type { CodeEditorTabsProps } from './types';
2
+ /**
3
+ * CodeEditorTabs - Dual-format code editor with JSON ↔ YAML conversion
4
+ *
5
+ * A tabbed interface that provides JSON and YAML editing with automatic
6
+ * bidirectional conversion and validation. Prevents tab switching when
7
+ * content has syntax errors and shows error toasts for conversion failures.
8
+ *
9
+ * Features:
10
+ * - Dual-format editing (JSON ↔ YAML)
11
+ * - Automatic bidirectional conversion
12
+ * - Real-time validation before conversion
13
+ * - Error toasts for conversion failures
14
+ * - Maintains sync between both formats
15
+ * - Hidden format field for form submission
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * import { CodeEditorTabs } from '@datum-cloud/datum-ui/code-editor'
20
+ *
21
+ * // Basic usage
22
+ * <CodeEditorTabs
23
+ * value={config}
24
+ * format="yaml"
25
+ * onChange={(value, format) => {
26
+ * setConfig(value)
27
+ * setFormat(format)
28
+ * }}
29
+ * name="configuration"
30
+ * minHeight="500px"
31
+ * />
32
+ *
33
+ * // With React Hook Form
34
+ * const { watch, setValue } = useForm()
35
+ *
36
+ * <CodeEditorTabs
37
+ * value={watch('config')}
38
+ * onChange={(value) => setValue('config', value)}
39
+ * name="config"
40
+ * />
41
+ *
42
+ * // With format change handler
43
+ * <CodeEditorTabs
44
+ * value={data}
45
+ * format={currentFormat}
46
+ * onChange={(value, format) => console.log({ value, format })}
47
+ * onFormatChange={(format) => setCurrentFormat(format)}
48
+ * />
49
+ * ```
50
+ *
51
+ * @param props - Component props
52
+ * @param props.value - Editor content
53
+ * @param props.onChange - Content and format change callback
54
+ * @param props.format - Active format ('json' or 'yaml', default: 'yaml')
55
+ * @param props.onFormatChange - Format change callback
56
+ * @param props.error - Error message to display below the editor
57
+ * @param props.id - Input element ID for form integration
58
+ * @param props.name - Input element name for form submission (default: 'code-editor')
59
+ * @param props.minHeight - Minimum editor height (default: '300px')
60
+ * @returns Rendered tabbed editor with JSON/YAML conversion
61
+ */
62
+ export declare function CodeEditorTabs({ value, onChange, format, onFormatChange, error, id, name, minHeight, }: CodeEditorTabsProps): import("react/jsx-runtime").JSX.Element;
63
+ //# sourceMappingURL=code-editor-tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-editor-tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/features/code-editor/code-editor-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAkB,MAAM,SAAS,CAAA;AAOlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,MAAe,EACf,cAAc,EACd,KAAK,EACL,EAAE,EACF,IAAoB,EACpB,SAAmB,GACpB,EAAE,mBAAmB,2CA6GrB"}
@@ -0,0 +1,58 @@
1
+ import type { CodeEditorProps } from './types';
2
+ /**
3
+ * CodeEditor - Monaco-based code editor component
4
+ *
5
+ * A Monaco Editor wrapper with single language support, theme integration,
6
+ * and form compatibility. Provides a VS Code-like editing experience with
7
+ * automatic formatting, responsive layout, and error state handling.
8
+ *
9
+ * Features:
10
+ * - Monaco Editor with VS Code experience
11
+ * - Theme-aware (automatic light/dark mode)
12
+ * - Form-compatible (hidden input for React Hook Form)
13
+ * - Responsive layout with automatic resizing
14
+ * - Read-only mode support
15
+ * - Custom error state styling
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * import { CodeEditor } from '@datum-cloud/datum-ui/code-editor'
20
+ *
21
+ * // Basic usage
22
+ * <CodeEditor
23
+ * value={code}
24
+ * onChange={(newValue) => setCode(newValue)}
25
+ * language="yaml"
26
+ * minHeight="400px"
27
+ * />
28
+ *
29
+ * // With error state
30
+ * <CodeEditor
31
+ * value={invalidJson}
32
+ * onChange={handleChange}
33
+ * language="json"
34
+ * error="Invalid JSON format"
35
+ * />
36
+ *
37
+ * // Read-only mode
38
+ * <CodeEditor
39
+ * value={config}
40
+ * language="yaml"
41
+ * readOnly={true}
42
+ * />
43
+ * ```
44
+ *
45
+ * @param props - Component props
46
+ * @param props.value - Editor content
47
+ * @param props.onChange - Content change callback
48
+ * @param props.language - Syntax highlighting language
49
+ * @param props.id - Input element ID for form integration
50
+ * @param props.name - Input element name for form submission (default: 'code-editor')
51
+ * @param props.error - Error message to display below the editor
52
+ * @param props.className - Additional CSS classes
53
+ * @param props.readOnly - Read-only mode (default: false)
54
+ * @param props.minHeight - Minimum editor height (default: '200px')
55
+ * @returns Rendered Monaco editor with form integration
56
+ */
57
+ export declare function CodeEditor({ value, onChange, language, id, name, error, className, readOnly, minHeight, }: CodeEditorProps): import("react/jsx-runtime").JSX.Element;
58
+ //# sourceMappingURL=code-editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-editor.d.ts","sourceRoot":"","sources":["../../../../src/components/features/code-editor/code-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,EAAE,EACF,IAAoB,EACpB,KAAK,EACL,SAAS,EACT,QAAgB,EAChB,SAAmB,GACpB,EAAE,eAAe,2CAiDjB"}
@@ -0,0 +1,6 @@
1
+ export { CodeEditor } from './code-editor';
2
+ export { CodeEditorTabs } from './code-editor-tabs';
3
+ export { formatJson, formatYaml, isValidJson, isValidYaml, jsonToYaml, yamlToJson } from './lib/editor';
4
+ export { createCodeEditorSchema, jsonSchema, yamlSchema } from './types';
5
+ export type { CodeEditorProps, CodeEditorTabsProps, EditorLanguage } from './types';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/features/code-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACvG,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACxE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,7 @@
1
+ export declare function isValidJson(jsonStr: string): boolean;
2
+ export declare function isValidYaml(yamlStr: string): boolean;
3
+ export declare function formatJson(jsonStr: string): string;
4
+ export declare function formatYaml(yamlStr: string): string;
5
+ export declare function jsonToYaml(jsonStr: string): string;
6
+ export declare function yamlToJson(yamlStr: string): string;
7
+ //# sourceMappingURL=editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/code-editor/lib/editor.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQpD;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQpD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAQlD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAYlD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAYlD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAQlD"}
@@ -0,0 +1,98 @@
1
+ import { z } from 'zod';
2
+ export type EditorLanguage = 'json' | 'yaml' | 'typescript' | 'javascript' | 'python' | 'sql' | 'html' | 'css' | 'markdown';
3
+ /**
4
+ * Props for the CodeEditor component.
5
+ *
6
+ * Base Monaco Editor wrapper with single language support, theme integration,
7
+ * and form compatibility.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * import { CodeEditor } from '@datum-cloud/datum-ui/code-editor'
12
+ *
13
+ * <CodeEditor
14
+ * value={code}
15
+ * onChange={(newValue) => setCode(newValue)}
16
+ * language="yaml"
17
+ * minHeight="400px"
18
+ * />
19
+ * ```
20
+ */
21
+ export interface CodeEditorProps {
22
+ /** Editor content */
23
+ value: string;
24
+ /** Content change callback */
25
+ onChange?: (value: string) => void;
26
+ /** Syntax highlighting language */
27
+ language: EditorLanguage;
28
+ /** Input element ID for form integration */
29
+ id?: string;
30
+ /** Input element name for form submission (default: 'code-editor') */
31
+ name?: string;
32
+ /** Error message to display below the editor */
33
+ error?: string;
34
+ /** Additional CSS classes */
35
+ className?: string;
36
+ /** Read-only mode (default: false) */
37
+ readOnly?: boolean;
38
+ /** Minimum editor height (default: '200px') */
39
+ minHeight?: string;
40
+ }
41
+ /**
42
+ * Props for the CodeEditorTabs component.
43
+ *
44
+ * Tabbed interface with JSON ↔ YAML conversion, validation, and automatic
45
+ * bidirectional synchronization.
46
+ *
47
+ * @example
48
+ * ```tsx
49
+ * import { CodeEditorTabs } from '@datum-cloud/datum-ui/code-editor'
50
+ *
51
+ * <CodeEditorTabs
52
+ * value={config}
53
+ * format="yaml"
54
+ * onChange={(value, format) => {
55
+ * setConfig(value)
56
+ * setFormat(format)
57
+ * }}
58
+ * onFormatChange={(format) => setFormat(format)}
59
+ * name="configuration"
60
+ * minHeight="500px"
61
+ * />
62
+ * ```
63
+ */
64
+ export interface CodeEditorTabsProps {
65
+ /** Editor content */
66
+ value: string;
67
+ /** Content and format change callback */
68
+ onChange?: (value: string, format: EditorLanguage) => void;
69
+ /** Active format ('json' or 'yaml', default: 'yaml') */
70
+ format?: EditorLanguage;
71
+ /** Format change callback */
72
+ onFormatChange?: (format: EditorLanguage) => void;
73
+ /** Error message to display below the editor */
74
+ error?: string;
75
+ /** Input element ID for form integration */
76
+ id?: string;
77
+ /** Input element name for form submission (default: 'code-editor') */
78
+ name?: string;
79
+ /** Minimum editor height (default: '300px') */
80
+ minHeight?: string;
81
+ }
82
+ export declare const jsonSchema: z.ZodObject<{
83
+ jsonContent: z.ZodString;
84
+ }, z.core.$strip>;
85
+ export declare const yamlSchema: z.ZodObject<{
86
+ yamlContent: z.ZodString;
87
+ }, z.core.$strip>;
88
+ export declare function createCodeEditorSchema(name?: string): z.ZodObject<{
89
+ [x: string]: z.ZodString | z.ZodEnum<{
90
+ json: "json";
91
+ yaml: "yaml";
92
+ }>;
93
+ format: z.ZodEnum<{
94
+ json: "json";
95
+ yaml: "yaml";
96
+ }>;
97
+ }, z.core.$strip>;
98
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/features/code-editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,UAAU,CAAA;AAE3H;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,mCAAmC;IACnC,QAAQ,EAAE,cAAc,CAAA;IACxB,4CAA4C;IAC5C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,yCAAyC;IACzC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,KAAK,IAAI,CAAA;IAC1D,wDAAwD;IACxD,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,6BAA6B;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAA;IACjD,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4CAA4C;IAC5C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,UAAU;;iBAKrB,CAAA;AAEF,eAAO,MAAM,UAAU;;iBAKrB,CAAA;AAEF,wBAAgB,sBAAsB,CAAC,IAAI,SAAgB;;;;;;;;;kBAuB1D"}
@@ -0,0 +1,17 @@
1
+ import type { FormAdapter } from './adapter-types';
2
+ import * as React from 'react';
3
+ /**
4
+ * Read the current form adapter from context.
5
+ * Throws with a helpful error if no adapter is found.
6
+ */
7
+ export declare function useAdapter(): FormAdapter;
8
+ export interface FormAdapterProviderProps {
9
+ adapter: FormAdapter;
10
+ children: React.ReactNode;
11
+ }
12
+ /**
13
+ * Internal provider used by adapter packages (ConformAdapter, RHFAdapter).
14
+ * Consumers don't use this directly.
15
+ */
16
+ export declare function FormAdapterProvider({ adapter, children }: FormAdapterProviderProps): import("react/jsx-runtime").JSX.Element;
17
+ //# sourceMappingURL=adapter-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter-context.d.ts","sourceRoot":"","sources":["../../../../src/components/features/form/adapter-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B;;;GAGG;AACH,wBAAgB,UAAU,IAAI,WAAW,CAgBxC;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,WAAW,CAAA;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,wBAAwB,2CAElF"}
@@ -0,0 +1,100 @@
1
+ import type { z } from 'zod';
2
+ export interface NormalizedFieldMeta {
3
+ /** Unique field ID for accessibility */
4
+ id: string;
5
+ /** Validation errors for this field */
6
+ errors: string[];
7
+ /** Whether the field is required (derived from schema) */
8
+ required: boolean;
9
+ }
10
+ export interface NormalizedFieldState extends NormalizedFieldMeta {
11
+ /** Field name (supports dot-notation paths) */
12
+ name: string;
13
+ /** Current field value (native JS type: string, boolean, number, etc.) */
14
+ value: unknown;
15
+ /** Update the field value */
16
+ change: (value: unknown) => void;
17
+ /** Mark field as blurred (triggers validation in onBlur mode) */
18
+ blur: () => void;
19
+ /** Focus the field */
20
+ focus: () => void;
21
+ /**
22
+ * Optional props object for uncontrolled inputs (Conform uses hidden inputs).
23
+ * When present, spread onto native `<input>` elements instead of using value/change.
24
+ * When absent, components fall back to controlled mode (value + change).
25
+ */
26
+ inputProps?: Record<string, unknown>;
27
+ }
28
+ export interface NormalizedFieldArray {
29
+ /** Array of field items with id, key, and name prefix */
30
+ items: Array<{
31
+ id: string;
32
+ key: string;
33
+ name: string;
34
+ }>;
35
+ /** Append a new item to the array */
36
+ append: (defaultValue?: Record<string, unknown>) => void;
37
+ /** Remove an item at the given index */
38
+ remove: (index: number) => void;
39
+ /** Move an item from one index to another */
40
+ move: (from: number, to: number) => void;
41
+ }
42
+ export interface NormalizedFormInstance {
43
+ /** Form ID */
44
+ id: string;
45
+ /** Field metadata keyed by field name */
46
+ fields: Record<string, NormalizedFieldMeta>;
47
+ /** Props to spread on the <form> element (id, onSubmit, noValidate, etc.) */
48
+ formProps: Record<string, unknown>;
49
+ /** Programmatically submit the form */
50
+ submit: () => void;
51
+ /** Reset the form to default values */
52
+ reset: () => void;
53
+ /** Get all current form values (for stepper prev() save-without-validate) */
54
+ getValues: () => Record<string, unknown>;
55
+ /** The raw underlying library instance (opaque - never read by shared components) */
56
+ raw: unknown;
57
+ }
58
+ export interface CreateFormProps {
59
+ /** Zod schema for validation */
60
+ schema: z.ZodType;
61
+ /** Default values for form fields */
62
+ defaultValues?: Record<string, unknown>;
63
+ /** Validation mode */
64
+ mode: 'onBlur' | 'onChange' | 'onSubmit';
65
+ /** Form ID */
66
+ id?: string;
67
+ /**
68
+ * Submit handler called with validated data.
69
+ * When absent, the form submits natively (server-side / framework integration).
70
+ */
71
+ onSubmit?: (data: Record<string, unknown>) => void | Promise<void>;
72
+ /** Form ref callback for programmatic submit via requestSubmit */
73
+ formRef?: React.RefObject<HTMLFormElement | null>;
74
+ }
75
+ export interface FormAdapter {
76
+ /** Display name for error messages (e.g., "Conform", "React Hook Form") */
77
+ name: string;
78
+ /** Create a new form instance. Called once per Form.Root mount. */
79
+ useCreateForm: (props: CreateFormProps) => NormalizedFormInstance;
80
+ /**
81
+ * Resolve a field by dot-notation path and return its normalized state.
82
+ * Must be called within the adapter's FormProvider.
83
+ */
84
+ useField: (name: string) => NormalizedFieldState;
85
+ /** Watch a single field's value reactively. */
86
+ useWatch: (name: string) => unknown;
87
+ /** Watch multiple fields' values reactively. */
88
+ useWatchAll: (names: string[]) => Record<string, unknown>;
89
+ /** Get field array helpers for a given array field name. */
90
+ useFieldArray: (name: string) => NormalizedFieldArray;
91
+ /**
92
+ * Provider component that wraps the form element.
93
+ * Provides library-specific context (e.g., ConformFormProvider, RHF FormProvider).
94
+ */
95
+ FormProvider: React.ComponentType<{
96
+ instance: NormalizedFormInstance;
97
+ children: React.ReactNode;
98
+ }>;
99
+ }
100
+ //# sourceMappingURL=adapter-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter-types.d.ts","sourceRoot":"","sources":["../../../../src/components/features/form/adapter-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAM5B,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,uCAAuC;IACvC,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,0DAA0D;IAC1D,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAA;IACZ,0EAA0E;IAC1E,KAAK,EAAE,OAAO,CAAA;IACd,6BAA6B;IAC7B,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAChC,iEAAiE;IACjE,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,sBAAsB;IACtB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACrC;AAED,MAAM,WAAW,oBAAoB;IACnC,yDAAyD;IACzD,KAAK,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACvD,qCAAqC;IACrC,MAAM,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IACxD,wCAAwC;IACxC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,6CAA6C;IAC7C,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACzC;AAED,MAAM,WAAW,sBAAsB;IACrC,cAAc;IACd,EAAE,EAAE,MAAM,CAAA;IACV,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;IAC3C,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,uCAAuC;IACvC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,uCAAuC;IACvC,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,6EAA6E;IAC7E,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,qFAAqF;IACrF,GAAG,EAAE,OAAO,CAAA;CACb;AAMD,MAAM,WAAW,eAAe;IAC9B,gCAAgC;IAChC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAA;IACjB,qCAAqC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACvC,sBAAsB;IACtB,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAA;IACxC,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAClE,kEAAkE;IAClE,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC,CAAA;CAClD;AAMD,MAAM,WAAW,WAAW;IAC1B,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAA;IAEZ,mEAAmE;IACnE,aAAa,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,sBAAsB,CAAA;IAEjE;;;OAGG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,oBAAoB,CAAA;IAEhD,+CAA+C;IAC/C,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;IAEnC,gDAAgD;IAChD,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAEzD,4DAA4D;IAC5D,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,oBAAoB,CAAA;IAErD;;;OAGG;IACH,YAAY,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,QAAQ,EAAE,sBAAsB,CAAC;QAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,CAAC,CAAA;CACnG"}
@@ -0,0 +1,9 @@
1
+ import type { FormAdapter } from '../../adapter-types';
2
+ /**
3
+ * Conform.js adapter implementing the `FormAdapter` interface.
4
+ *
5
+ * Maps Conform's `useForm` / `useInputControl` / `useFormMetadata` APIs
6
+ * to the normalized form adapter contract.
7
+ */
8
+ export declare const conformAdapter: FormAdapter;
9
+ //# sourceMappingURL=conform-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conform-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/components/features/form/adapters/conform/conform-adapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EAKZ,MAAM,qBAAqB,CAAA;AAwT5B;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,WAQ5B,CAAA"}
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface ConformAdapterProps {
3
+ children: ReactNode;
4
+ }
5
+ /**
6
+ * Wrap your application with this provider to use Conform.js as the form backend.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * import { ConformAdapter } from '@datum-cloud/datum-ui/form/adapters/conform'
11
+ *
12
+ * function App() {
13
+ * return (
14
+ * <ConformAdapter>
15
+ * <MyApp />
16
+ * </ConformAdapter>
17
+ * )
18
+ * }
19
+ * ```
20
+ */
21
+ export declare function ConformAdapter({ children }: ConformAdapterProps): import("react/jsx-runtime").JSX.Element;
22
+ //# sourceMappingURL=conform-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conform-provider.d.ts","sourceRoot":"","sources":["../../../../../../src/components/features/form/adapters/conform/conform-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,2CAM/D"}