@nccirtu/tablefy 0.8.4 → 0.9.1

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 (243) hide show
  1. package/README.md +224 -200
  2. package/dist/columns/forms/builders/actions-builder.d.ts +14 -0
  3. package/dist/columns/forms/builders/form-schema.d.ts +35 -0
  4. package/dist/columns/forms/builders/index.d.ts +5 -0
  5. package/dist/columns/forms/builders/section-builder.d.ts +16 -0
  6. package/dist/columns/forms/builders/tab-builder.d.ts +16 -0
  7. package/dist/columns/forms/builders/wizard-builder.d.ts +17 -0
  8. package/dist/columns/forms/components/field-renderer.d.ts +12 -0
  9. package/dist/columns/forms/components/form-actions.d.ts +9 -0
  10. package/dist/columns/forms/components/form-renderer.d.ts +14 -0
  11. package/dist/columns/forms/components/grid-layout.d.ts +7 -0
  12. package/dist/columns/forms/components/index.d.ts +9 -0
  13. package/dist/columns/forms/components/section-renderer.d.ts +14 -0
  14. package/dist/columns/forms/components/tab-renderer.d.ts +15 -0
  15. package/dist/columns/forms/components/wizard-renderer.d.ts +17 -0
  16. package/dist/columns/forms/fields/base-field.d.ts +24 -0
  17. package/dist/columns/forms/fields/checkbox-group.d.ts +12 -0
  18. package/dist/columns/forms/fields/checkbox.d.ts +9 -0
  19. package/dist/columns/forms/fields/date-picker.d.ts +15 -0
  20. package/dist/columns/forms/fields/file-upload.d.ts +17 -0
  21. package/dist/columns/forms/fields/hidden.d.ts +9 -0
  22. package/dist/columns/forms/fields/index.d.ts +12 -0
  23. package/dist/columns/forms/fields/radio-group.d.ts +14 -0
  24. package/dist/columns/forms/fields/repeater.d.ts +21 -0
  25. package/dist/columns/forms/fields/select.d.ts +16 -0
  26. package/dist/columns/forms/fields/text-input.d.ts +20 -0
  27. package/dist/columns/forms/fields/textarea.d.ts +14 -0
  28. package/dist/columns/forms/fields/toggle.d.ts +11 -0
  29. package/dist/columns/forms/index.d.ts +26 -0
  30. package/dist/columns/forms/types/actions.d.ts +11 -0
  31. package/dist/columns/forms/types/field.d.ts +98 -0
  32. package/dist/columns/forms/types/form.d.ts +37 -0
  33. package/dist/columns/forms/types/index.d.ts +4 -0
  34. package/dist/columns/forms/types/layout.d.ts +31 -0
  35. package/dist/columns/index.d.ts +2 -0
  36. package/dist/columns/inertia/index.d.ts +4 -0
  37. package/dist/columns/inertia/precognition.d.ts +6 -0
  38. package/dist/columns/inertia/types.d.ts +63 -0
  39. package/dist/columns/inertia/use-inertia-form.d.ts +2 -0
  40. package/dist/columns/inertia/use-server-table.d.ts +2 -0
  41. package/dist/forms/builders/actions-builder.d.ts +14 -0
  42. package/dist/forms/builders/empty-state.d.ts +46 -0
  43. package/dist/forms/builders/form-schema.d.ts +35 -0
  44. package/dist/forms/builders/index.d.ts +2 -0
  45. package/dist/forms/builders/section-builder.d.ts +16 -0
  46. package/dist/forms/builders/tab-builder.d.ts +16 -0
  47. package/dist/forms/builders/table-schema.d.ts +45 -0
  48. package/dist/forms/builders/wizard-builder.d.ts +17 -0
  49. package/dist/forms/columns/actions-column.d.ts +26 -0
  50. package/dist/forms/columns/avatar-group-column.d.ts +38 -0
  51. package/dist/forms/columns/badge-column.d.ts +29 -0
  52. package/dist/forms/columns/base-column.d.ts +21 -0
  53. package/dist/forms/columns/button-column.d.ts +14 -0
  54. package/dist/forms/columns/checkbox-column.d.ts +5 -0
  55. package/dist/forms/columns/date-column.d.ts +24 -0
  56. package/dist/forms/columns/dropdown-column.d.ts +17 -0
  57. package/dist/forms/columns/enum-column.d.ts +52 -0
  58. package/dist/forms/columns/icon-column.d.ts +58 -0
  59. package/dist/forms/columns/image-column.d.ts +21 -0
  60. package/dist/forms/columns/index.d.ts +18 -0
  61. package/dist/forms/columns/input-column.d.ts +27 -0
  62. package/dist/forms/columns/link-column.d.ts +27 -0
  63. package/dist/forms/columns/number-column.d.ts +23 -0
  64. package/dist/forms/columns/progress-column.d.ts +30 -0
  65. package/dist/forms/columns/select-column.d.ts +24 -0
  66. package/dist/forms/columns/text-column.d.ts +14 -0
  67. package/dist/forms/columns/types.d.ts +46 -0
  68. package/dist/forms/components/field-renderer.d.ts +12 -0
  69. package/dist/forms/components/form-actions.d.ts +9 -0
  70. package/dist/forms/components/form-renderer.d.ts +14 -0
  71. package/dist/forms/components/grid-layout.d.ts +7 -0
  72. package/dist/forms/components/index.d.ts +9 -0
  73. package/dist/forms/components/section-renderer.d.ts +14 -0
  74. package/dist/forms/components/tab-renderer.d.ts +15 -0
  75. package/dist/forms/components/wizard-renderer.d.ts +17 -0
  76. package/dist/forms/confirm/ConfirmProvider.d.ts +6 -0
  77. package/dist/forms/confirm/confirm.d.ts +3 -0
  78. package/dist/forms/confirm/index.d.ts +3 -0
  79. package/dist/forms/confirm/types.d.ts +10 -0
  80. package/dist/forms/fields/base-field.d.ts +24 -0
  81. package/dist/forms/fields/checkbox-group.d.ts +12 -0
  82. package/dist/forms/fields/checkbox.d.ts +9 -0
  83. package/dist/forms/fields/date-picker.d.ts +15 -0
  84. package/dist/forms/fields/file-upload.d.ts +17 -0
  85. package/dist/forms/fields/hidden.d.ts +9 -0
  86. package/dist/forms/fields/index.d.ts +12 -0
  87. package/dist/forms/fields/radio-group.d.ts +14 -0
  88. package/dist/forms/fields/repeater.d.ts +21 -0
  89. package/dist/forms/fields/select.d.ts +16 -0
  90. package/dist/forms/fields/text-input.d.ts +20 -0
  91. package/dist/forms/fields/textarea.d.ts +14 -0
  92. package/dist/forms/fields/toggle.d.ts +11 -0
  93. package/dist/forms/forms/builders/actions-builder.d.ts +14 -0
  94. package/dist/forms/forms/builders/form-schema.d.ts +35 -0
  95. package/dist/forms/forms/builders/index.d.ts +5 -0
  96. package/dist/forms/forms/builders/section-builder.d.ts +16 -0
  97. package/dist/forms/forms/builders/tab-builder.d.ts +16 -0
  98. package/dist/forms/forms/builders/wizard-builder.d.ts +17 -0
  99. package/dist/forms/forms/components/field-renderer.d.ts +12 -0
  100. package/dist/forms/forms/components/form-actions.d.ts +9 -0
  101. package/dist/forms/forms/components/form-renderer.d.ts +14 -0
  102. package/dist/forms/forms/components/grid-layout.d.ts +7 -0
  103. package/dist/forms/forms/components/index.d.ts +9 -0
  104. package/dist/forms/forms/components/section-renderer.d.ts +14 -0
  105. package/dist/forms/forms/components/tab-renderer.d.ts +15 -0
  106. package/dist/forms/forms/components/wizard-renderer.d.ts +17 -0
  107. package/dist/forms/forms/fields/base-field.d.ts +24 -0
  108. package/dist/forms/forms/fields/checkbox-group.d.ts +12 -0
  109. package/dist/forms/forms/fields/checkbox.d.ts +9 -0
  110. package/dist/forms/forms/fields/date-picker.d.ts +15 -0
  111. package/dist/forms/forms/fields/file-upload.d.ts +17 -0
  112. package/dist/forms/forms/fields/hidden.d.ts +9 -0
  113. package/dist/forms/forms/fields/index.d.ts +12 -0
  114. package/dist/forms/forms/fields/radio-group.d.ts +14 -0
  115. package/dist/forms/forms/fields/repeater.d.ts +21 -0
  116. package/dist/forms/forms/fields/select.d.ts +16 -0
  117. package/dist/forms/forms/fields/text-input.d.ts +20 -0
  118. package/dist/forms/forms/fields/textarea.d.ts +14 -0
  119. package/dist/forms/forms/fields/toggle.d.ts +11 -0
  120. package/dist/forms/forms/index.d.ts +26 -0
  121. package/dist/forms/forms/types/actions.d.ts +11 -0
  122. package/dist/forms/forms/types/field.d.ts +98 -0
  123. package/dist/forms/forms/types/form.d.ts +37 -0
  124. package/dist/forms/forms/types/index.d.ts +4 -0
  125. package/dist/forms/forms/types/layout.d.ts +31 -0
  126. package/dist/forms/index.d.ts +25 -0
  127. package/dist/forms/index.esm.js +1052 -0
  128. package/dist/forms/index.esm.js.map +1 -0
  129. package/dist/forms/index.js +1077 -0
  130. package/dist/forms/index.js.map +1 -0
  131. package/dist/forms/inertia/index.d.ts +4 -0
  132. package/dist/forms/inertia/precognition.d.ts +6 -0
  133. package/dist/forms/inertia/types.d.ts +63 -0
  134. package/dist/forms/inertia/use-inertia-form.d.ts +2 -0
  135. package/dist/forms/inertia/use-server-table.d.ts +2 -0
  136. package/dist/forms/tablefy/avatar-list.d.ts +15 -0
  137. package/dist/forms/tablefy/data-table-empty.d.ts +8 -0
  138. package/dist/forms/tablefy/data-table-header.d.ts +17 -0
  139. package/dist/forms/tablefy/data-table-pagination.d.ts +9 -0
  140. package/dist/forms/tablefy/data-table-schema.d.ts +1 -0
  141. package/dist/forms/tablefy/data-table.d.ts +13 -0
  142. package/dist/forms/tablefy/index.d.ts +6 -0
  143. package/dist/forms/types/actions.d.ts +21 -0
  144. package/dist/forms/types/empty-state.d.ts +18 -0
  145. package/dist/forms/types/field.d.ts +98 -0
  146. package/dist/forms/types/filters.d.ts +25 -0
  147. package/dist/forms/types/form.d.ts +37 -0
  148. package/dist/forms/types/index.d.ts +4 -0
  149. package/dist/forms/types/layout.d.ts +31 -0
  150. package/dist/forms/types/table.d.ts +42 -0
  151. package/dist/forms/utils.d.ts +1 -0
  152. package/dist/index.d.ts +2 -0
  153. package/dist/index.esm.js +1050 -9
  154. package/dist/index.esm.js.map +1 -1
  155. package/dist/index.js +1058 -0
  156. package/dist/index.js.map +1 -1
  157. package/dist/inertia/builders/empty-state.d.ts +46 -0
  158. package/dist/inertia/builders/index.d.ts +2 -0
  159. package/dist/inertia/builders/table-schema.d.ts +45 -0
  160. package/dist/inertia/columns/actions-column.d.ts +26 -0
  161. package/dist/inertia/columns/avatar-group-column.d.ts +38 -0
  162. package/dist/inertia/columns/badge-column.d.ts +29 -0
  163. package/dist/inertia/columns/base-column.d.ts +21 -0
  164. package/dist/inertia/columns/button-column.d.ts +14 -0
  165. package/dist/inertia/columns/checkbox-column.d.ts +5 -0
  166. package/dist/inertia/columns/date-column.d.ts +24 -0
  167. package/dist/inertia/columns/dropdown-column.d.ts +17 -0
  168. package/dist/inertia/columns/enum-column.d.ts +52 -0
  169. package/dist/inertia/columns/icon-column.d.ts +58 -0
  170. package/dist/inertia/columns/image-column.d.ts +21 -0
  171. package/dist/inertia/columns/index.d.ts +18 -0
  172. package/dist/inertia/columns/input-column.d.ts +27 -0
  173. package/dist/inertia/columns/link-column.d.ts +27 -0
  174. package/dist/inertia/columns/number-column.d.ts +23 -0
  175. package/dist/inertia/columns/progress-column.d.ts +30 -0
  176. package/dist/inertia/columns/select-column.d.ts +24 -0
  177. package/dist/inertia/columns/text-column.d.ts +14 -0
  178. package/dist/inertia/columns/types.d.ts +46 -0
  179. package/dist/inertia/confirm/ConfirmProvider.d.ts +6 -0
  180. package/dist/inertia/confirm/confirm.d.ts +3 -0
  181. package/dist/inertia/confirm/index.d.ts +3 -0
  182. package/dist/inertia/confirm/types.d.ts +10 -0
  183. package/dist/inertia/forms/builders/actions-builder.d.ts +14 -0
  184. package/dist/inertia/forms/builders/form-schema.d.ts +35 -0
  185. package/dist/inertia/forms/builders/index.d.ts +5 -0
  186. package/dist/inertia/forms/builders/section-builder.d.ts +16 -0
  187. package/dist/inertia/forms/builders/tab-builder.d.ts +16 -0
  188. package/dist/inertia/forms/builders/wizard-builder.d.ts +17 -0
  189. package/dist/inertia/forms/components/field-renderer.d.ts +12 -0
  190. package/dist/inertia/forms/components/form-actions.d.ts +9 -0
  191. package/dist/inertia/forms/components/form-renderer.d.ts +14 -0
  192. package/dist/inertia/forms/components/grid-layout.d.ts +7 -0
  193. package/dist/inertia/forms/components/index.d.ts +9 -0
  194. package/dist/inertia/forms/components/section-renderer.d.ts +14 -0
  195. package/dist/inertia/forms/components/tab-renderer.d.ts +15 -0
  196. package/dist/inertia/forms/components/wizard-renderer.d.ts +17 -0
  197. package/dist/inertia/forms/fields/base-field.d.ts +24 -0
  198. package/dist/inertia/forms/fields/checkbox-group.d.ts +12 -0
  199. package/dist/inertia/forms/fields/checkbox.d.ts +9 -0
  200. package/dist/inertia/forms/fields/date-picker.d.ts +15 -0
  201. package/dist/inertia/forms/fields/file-upload.d.ts +17 -0
  202. package/dist/inertia/forms/fields/hidden.d.ts +9 -0
  203. package/dist/inertia/forms/fields/index.d.ts +12 -0
  204. package/dist/inertia/forms/fields/radio-group.d.ts +14 -0
  205. package/dist/inertia/forms/fields/repeater.d.ts +21 -0
  206. package/dist/inertia/forms/fields/select.d.ts +16 -0
  207. package/dist/inertia/forms/fields/text-input.d.ts +20 -0
  208. package/dist/inertia/forms/fields/textarea.d.ts +14 -0
  209. package/dist/inertia/forms/fields/toggle.d.ts +11 -0
  210. package/dist/inertia/forms/index.d.ts +26 -0
  211. package/dist/inertia/forms/types/actions.d.ts +11 -0
  212. package/dist/inertia/forms/types/field.d.ts +98 -0
  213. package/dist/inertia/forms/types/form.d.ts +37 -0
  214. package/dist/inertia/forms/types/index.d.ts +4 -0
  215. package/dist/inertia/forms/types/layout.d.ts +31 -0
  216. package/dist/inertia/index.d.ts +4 -0
  217. package/dist/inertia/index.esm.js +149 -0
  218. package/dist/inertia/index.esm.js.map +1 -0
  219. package/dist/inertia/index.js +153 -0
  220. package/dist/inertia/index.js.map +1 -0
  221. package/dist/inertia/inertia/index.d.ts +4 -0
  222. package/dist/inertia/inertia/precognition.d.ts +6 -0
  223. package/dist/inertia/inertia/types.d.ts +63 -0
  224. package/dist/inertia/inertia/use-inertia-form.d.ts +2 -0
  225. package/dist/inertia/inertia/use-server-table.d.ts +2 -0
  226. package/dist/inertia/precognition.d.ts +6 -0
  227. package/dist/inertia/tablefy/avatar-list.d.ts +15 -0
  228. package/dist/inertia/tablefy/data-table-empty.d.ts +8 -0
  229. package/dist/inertia/tablefy/data-table-header.d.ts +17 -0
  230. package/dist/inertia/tablefy/data-table-pagination.d.ts +9 -0
  231. package/dist/inertia/tablefy/data-table-schema.d.ts +1 -0
  232. package/dist/inertia/tablefy/data-table.d.ts +13 -0
  233. package/dist/inertia/tablefy/index.d.ts +6 -0
  234. package/dist/inertia/types/actions.d.ts +21 -0
  235. package/dist/inertia/types/empty-state.d.ts +18 -0
  236. package/dist/inertia/types/filters.d.ts +25 -0
  237. package/dist/inertia/types/index.d.ts +4 -0
  238. package/dist/inertia/types/table.d.ts +42 -0
  239. package/dist/inertia/types.d.ts +63 -0
  240. package/dist/inertia/use-inertia-form.d.ts +2 -0
  241. package/dist/inertia/use-server-table.d.ts +2 -0
  242. package/dist/inertia/utils.d.ts +1 -0
  243. package/package.json +41 -14
package/dist/index.js CHANGED
@@ -15,6 +15,14 @@ var checkbox = require('@/components/ui/checkbox');
15
15
  var tooltip = require('@/components/ui/tooltip');
16
16
  var progress = require('@/components/ui/progress');
17
17
  var alertDialog = require('@/components/ui/alert-dialog');
18
+ var textarea = require('@/components/ui/textarea');
19
+ var _switch = require('@/components/ui/switch');
20
+ var radioGroup = require('@/components/ui/radio-group');
21
+ var label = require('@/components/ui/label');
22
+ var calendar = require('@/components/ui/calendar');
23
+ var popover = require('@/components/ui/popover');
24
+ var card = require('@/components/ui/card');
25
+ var tabs = require('@/components/ui/tabs');
18
26
 
19
27
  function DataTableHeader({ title, description, actions = [], search, searchValue = "", onSearchChange, table, selectedCount = 0, enableColumnVisibility = false, columnVisibilityLabel = "Spalten", className, }) {
20
28
  const normalActions = actions.filter((a) => !a.bulk && !a.hidden);
@@ -1859,27 +1867,1077 @@ function ConfirmProvider({ children }) {
1859
1867
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [children, jsxRuntime.jsx(alertDialog.AlertDialog, { open: !!currentRequest, onOpenChange: (open) => !open && handleCancel(), children: jsxRuntime.jsxs(alertDialog.AlertDialogContent, { className: "max-w-md", children: [jsxRuntime.jsxs(alertDialog.AlertDialogHeader, { children: [jsxRuntime.jsx(alertDialog.AlertDialogTitle, { className: "text-center", children: title || "Bestätigung erforderlich" }), description && (jsxRuntime.jsx(alertDialog.AlertDialogDescription, { className: "text-center", children: description }))] }), image && (jsxRuntime.jsx("div", { className: "flex justify-center py-4", children: jsxRuntime.jsx("img", { src: image, alt: "Confirmation", className: "h-24 w-24 object-contain" }) })), icon && !image && (jsxRuntime.jsx("div", { className: "flex justify-center py-4 text-6xl", children: icon })), jsxRuntime.jsxs(alertDialog.AlertDialogFooter, { className: "flex flex-row !justify-between w-full", children: [jsxRuntime.jsx(alertDialog.AlertDialogCancel, { onClick: handleCancel, className: "mt-0", children: cancelLabel || "Abbrechen" }), jsxRuntime.jsx(alertDialog.AlertDialogAction, { onClick: handleConfirm, variant: variant === "destructive" ? "destructive" : "default", children: confirmLabel || "Bestätigen" })] })] }) })] }));
1860
1868
  }
1861
1869
 
1870
+ class ActionsBuilder {
1871
+ actionsList = [];
1872
+ submit(opts = {}) {
1873
+ this.actionsList.push({
1874
+ type: "submit",
1875
+ label: opts.label || "Submit",
1876
+ variant: opts.variant || "default",
1877
+ ...opts,
1878
+ });
1879
+ return this;
1880
+ }
1881
+ cancel(opts = {}) {
1882
+ this.actionsList.push({
1883
+ type: "cancel",
1884
+ label: opts.label || "Cancel",
1885
+ variant: opts.variant || "outline",
1886
+ ...opts,
1887
+ });
1888
+ return this;
1889
+ }
1890
+ custom(opts) {
1891
+ this.actionsList.push({ ...opts, type: "custom" });
1892
+ return this;
1893
+ }
1894
+ build() {
1895
+ return [...this.actionsList];
1896
+ }
1897
+ }
1898
+
1899
+ /**
1900
+ * Form Schema Builder
1901
+ * Fluent API for building complete form configurations
1902
+ */
1903
+ class FormSchema {
1904
+ fieldBuilders = [];
1905
+ schemaConfig = {};
1906
+ static make() {
1907
+ return new FormSchema();
1908
+ }
1909
+ // --- Configuration ---
1910
+ title(title) {
1911
+ this.schemaConfig.title = title;
1912
+ return this;
1913
+ }
1914
+ description(description) {
1915
+ this.schemaConfig.description = description;
1916
+ return this;
1917
+ }
1918
+ columns(columns) {
1919
+ this.schemaConfig.columns = columns;
1920
+ return this;
1921
+ }
1922
+ bordered(bordered = true) {
1923
+ this.schemaConfig.bordered = bordered;
1924
+ return this;
1925
+ }
1926
+ spacing(spacing) {
1927
+ this.schemaConfig.spacing = spacing;
1928
+ return this;
1929
+ }
1930
+ disabled(disabled) {
1931
+ this.schemaConfig.disabled = disabled;
1932
+ return this;
1933
+ }
1934
+ // --- Fields ---
1935
+ fields(...builders) {
1936
+ this.fieldBuilders.push(...builders);
1937
+ return this;
1938
+ }
1939
+ // --- Layout ---
1940
+ sections(...sections) {
1941
+ this.schemaConfig.sections = sections.map((s) => s.build());
1942
+ return this;
1943
+ }
1944
+ tabs(...tabs) {
1945
+ this.schemaConfig.tabs = tabs.map((t) => t.build());
1946
+ return this;
1947
+ }
1948
+ wizard(...steps) {
1949
+ this.schemaConfig.wizardSteps = steps.map((s) => s.build());
1950
+ return this;
1951
+ }
1952
+ // --- Actions ---
1953
+ actions(fn) {
1954
+ const builder = new ActionsBuilder();
1955
+ this.schemaConfig.actions = fn(builder).build();
1956
+ return this;
1957
+ }
1958
+ actionsPosition(position) {
1959
+ this.schemaConfig.actionsPosition = position;
1960
+ return this;
1961
+ }
1962
+ // --- Build ---
1963
+ build() {
1964
+ const fields = this.fieldBuilders.map((b) => b.build());
1965
+ return {
1966
+ fields,
1967
+ config: {
1968
+ ...this.schemaConfig,
1969
+ fields,
1970
+ },
1971
+ };
1972
+ }
1973
+ }
1974
+
1975
+ class SectionBuilder {
1976
+ sectionConfig;
1977
+ constructor(title) {
1978
+ this.sectionConfig = {
1979
+ id: title.toLowerCase().replace(/\s+/g, "-"),
1980
+ title,
1981
+ fields: [],
1982
+ columns: 1,
1983
+ collapsible: false,
1984
+ collapsed: false,
1985
+ };
1986
+ }
1987
+ static make(title) {
1988
+ return new SectionBuilder(title);
1989
+ }
1990
+ id(id) {
1991
+ this.sectionConfig.id = id;
1992
+ return this;
1993
+ }
1994
+ description(description) {
1995
+ this.sectionConfig.description = description;
1996
+ return this;
1997
+ }
1998
+ fields(fields) {
1999
+ this.sectionConfig.fields = fields;
2000
+ return this;
2001
+ }
2002
+ columns(columns) {
2003
+ this.sectionConfig.columns = columns;
2004
+ return this;
2005
+ }
2006
+ collapsible(collapsible = true) {
2007
+ this.sectionConfig.collapsible = collapsible;
2008
+ return this;
2009
+ }
2010
+ collapsed(collapsed = true) {
2011
+ this.sectionConfig.collapsed = collapsed;
2012
+ this.sectionConfig.collapsible = true;
2013
+ return this;
2014
+ }
2015
+ icon(icon) {
2016
+ this.sectionConfig.icon = icon;
2017
+ return this;
2018
+ }
2019
+ hidden(fn) {
2020
+ this.sectionConfig.hidden = fn;
2021
+ return this;
2022
+ }
2023
+ build() {
2024
+ return { ...this.sectionConfig };
2025
+ }
2026
+ }
2027
+
2028
+ class TabBuilder {
2029
+ tabConfig;
2030
+ constructor(label) {
2031
+ this.tabConfig = {
2032
+ id: label.toLowerCase().replace(/\s+/g, "-"),
2033
+ label,
2034
+ };
2035
+ }
2036
+ static make(label) {
2037
+ return new TabBuilder(label);
2038
+ }
2039
+ id(id) {
2040
+ this.tabConfig.id = id;
2041
+ return this;
2042
+ }
2043
+ icon(icon) {
2044
+ this.tabConfig.icon = icon;
2045
+ return this;
2046
+ }
2047
+ fields(fields) {
2048
+ this.tabConfig.fields = fields;
2049
+ return this;
2050
+ }
2051
+ sections(...sections) {
2052
+ this.tabConfig.sections = sections.map((s) => s.build());
2053
+ return this;
2054
+ }
2055
+ badge(badge) {
2056
+ this.tabConfig.badge = badge;
2057
+ return this;
2058
+ }
2059
+ disabled(fn) {
2060
+ this.tabConfig.disabled = fn;
2061
+ return this;
2062
+ }
2063
+ build() {
2064
+ return { ...this.tabConfig };
2065
+ }
2066
+ }
2067
+
2068
+ class WizardStep {
2069
+ stepConfig;
2070
+ constructor(label) {
2071
+ this.stepConfig = {
2072
+ id: label.toLowerCase().replace(/\s+/g, "-"),
2073
+ label,
2074
+ };
2075
+ }
2076
+ static make(label) {
2077
+ return new WizardStep(label);
2078
+ }
2079
+ id(id) {
2080
+ this.stepConfig.id = id;
2081
+ return this;
2082
+ }
2083
+ description(description) {
2084
+ this.stepConfig.description = description;
2085
+ return this;
2086
+ }
2087
+ icon(icon) {
2088
+ this.stepConfig.icon = icon;
2089
+ return this;
2090
+ }
2091
+ fields(fields) {
2092
+ this.stepConfig.fields = fields;
2093
+ return this;
2094
+ }
2095
+ sections(...sections) {
2096
+ this.stepConfig.sections = sections.map((s) => s.build());
2097
+ return this;
2098
+ }
2099
+ canProceed(fn) {
2100
+ this.stepConfig.canProceed = fn;
2101
+ return this;
2102
+ }
2103
+ beforeNext(fn) {
2104
+ this.stepConfig.beforeNext = fn;
2105
+ return this;
2106
+ }
2107
+ build() {
2108
+ return { ...this.stepConfig };
2109
+ }
2110
+ }
2111
+
2112
+ class BaseField {
2113
+ config;
2114
+ constructor(name) {
2115
+ this.config = {
2116
+ name,
2117
+ required: false,
2118
+ disabled: false,
2119
+ readOnly: false,
2120
+ hidden: false,
2121
+ columnSpan: 1,
2122
+ rules: [],
2123
+ dependsOn: [],
2124
+ };
2125
+ }
2126
+ // --- Fluent API ---
2127
+ label(label) {
2128
+ this.config.label = label;
2129
+ return this;
2130
+ }
2131
+ placeholder(placeholder) {
2132
+ this.config.placeholder = placeholder;
2133
+ return this;
2134
+ }
2135
+ helperText(text) {
2136
+ this.config.helperText = text;
2137
+ return this;
2138
+ }
2139
+ required(required = true) {
2140
+ this.config.required = required;
2141
+ if (required &&
2142
+ !this.config.rules?.some((r) => r.type === "required")) {
2143
+ this.config.rules = [
2144
+ ...(this.config.rules || []),
2145
+ {
2146
+ type: "required",
2147
+ message: `${this.config.label || this.config.name} is required`,
2148
+ },
2149
+ ];
2150
+ }
2151
+ return this;
2152
+ }
2153
+ disabled(disabled = true) {
2154
+ this.config.disabled = disabled;
2155
+ return this;
2156
+ }
2157
+ readOnly(readOnly = true) {
2158
+ this.config.readOnly = readOnly;
2159
+ return this;
2160
+ }
2161
+ hidden(hidden = true) {
2162
+ this.config.hidden = hidden;
2163
+ return this;
2164
+ }
2165
+ default(value) {
2166
+ this.config.defaultValue = value;
2167
+ return this;
2168
+ }
2169
+ columnSpan(span) {
2170
+ this.config.columnSpan = span;
2171
+ return this;
2172
+ }
2173
+ className(className) {
2174
+ this.config.className = className;
2175
+ return this;
2176
+ }
2177
+ rules(rules) {
2178
+ this.config.rules = [...(this.config.rules || []), ...rules];
2179
+ return this;
2180
+ }
2181
+ zodSchema(schema) {
2182
+ this.config.zodSchema = schema;
2183
+ return this;
2184
+ }
2185
+ dependsOn(field, condition, effect = "show", effectValue) {
2186
+ this.config.dependsOn = [
2187
+ ...(this.config.dependsOn || []),
2188
+ { field, condition, effect, effectValue },
2189
+ ];
2190
+ return this;
2191
+ }
2192
+ reactive(reactive = true) {
2193
+ this.config.reactive = reactive;
2194
+ return this;
2195
+ }
2196
+ // --- Build ---
2197
+ build() {
2198
+ return {
2199
+ name: this.config.name,
2200
+ type: this.fieldType,
2201
+ config: { ...this.config },
2202
+ render: (props) => this.renderField(props),
2203
+ };
2204
+ }
2205
+ }
2206
+
2207
+ class TextInput extends BaseField {
2208
+ fieldType = "text";
2209
+ static make(name) {
2210
+ return new TextInput(name);
2211
+ }
2212
+ type(type) {
2213
+ this.config.type = type;
2214
+ return this;
2215
+ }
2216
+ email() {
2217
+ return this.type("email");
2218
+ }
2219
+ password() {
2220
+ return this.type("password");
2221
+ }
2222
+ number() {
2223
+ return this.type("number");
2224
+ }
2225
+ url() {
2226
+ return this.type("url");
2227
+ }
2228
+ tel() {
2229
+ return this.type("tel");
2230
+ }
2231
+ minLength(min) {
2232
+ this.config.minLength = min;
2233
+ this.config.rules = [
2234
+ ...(this.config.rules || []),
2235
+ {
2236
+ type: "min",
2237
+ value: min,
2238
+ message: `${this.config.label || this.config.name} must be at least ${min} characters`,
2239
+ },
2240
+ ];
2241
+ return this;
2242
+ }
2243
+ maxLength(max) {
2244
+ this.config.maxLength = max;
2245
+ this.config.rules = [
2246
+ ...(this.config.rules || []),
2247
+ {
2248
+ type: "max",
2249
+ value: max,
2250
+ message: `${this.config.label || this.config.name} must be at most ${max} characters`,
2251
+ },
2252
+ ];
2253
+ return this;
2254
+ }
2255
+ prefix(prefix) {
2256
+ this.config.prefix = prefix;
2257
+ return this;
2258
+ }
2259
+ suffix(suffix) {
2260
+ this.config.suffix = suffix;
2261
+ return this;
2262
+ }
2263
+ autocomplete(value) {
2264
+ this.config.autocomplete = value;
2265
+ return this;
2266
+ }
2267
+ renderField({ value, onChange, onBlur, error, disabled, }) {
2268
+ const { type, placeholder, maxLength, readOnly, autocomplete, className, prefix, suffix, } = this.config;
2269
+ const input$1 = (jsxRuntime.jsx(input.Input, { type: type || "text", value: value ?? "", onChange: (e) => onChange(type === "number" ? Number(e.target.value) : e.target.value), onBlur: onBlur, placeholder: placeholder, maxLength: maxLength, disabled: disabled, readOnly: readOnly, autoComplete: autocomplete, className: utils.cn(error && "border-destructive", className) }));
2270
+ if (prefix || suffix) {
2271
+ return (jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [prefix && (jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: prefix })), input$1, suffix && (jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: suffix }))] }));
2272
+ }
2273
+ return input$1;
2274
+ }
2275
+ }
2276
+
2277
+ class Textarea extends BaseField {
2278
+ fieldType = "textarea";
2279
+ constructor(name) {
2280
+ super(name);
2281
+ this.config.rows = 3;
2282
+ }
2283
+ static make(name) {
2284
+ return new Textarea(name);
2285
+ }
2286
+ rows(rows) {
2287
+ this.config.rows = rows;
2288
+ return this;
2289
+ }
2290
+ minLength(min) {
2291
+ this.config.minLength = min;
2292
+ this.config.rules = [
2293
+ ...(this.config.rules || []),
2294
+ {
2295
+ type: "min",
2296
+ value: min,
2297
+ message: `${this.config.label || this.config.name} must be at least ${min} characters`,
2298
+ },
2299
+ ];
2300
+ return this;
2301
+ }
2302
+ maxLength(max) {
2303
+ this.config.maxLength = max;
2304
+ this.config.rules = [
2305
+ ...(this.config.rules || []),
2306
+ {
2307
+ type: "max",
2308
+ value: max,
2309
+ message: `${this.config.label || this.config.name} must be at most ${max} characters`,
2310
+ },
2311
+ ];
2312
+ return this;
2313
+ }
2314
+ autoResize(autoResize = true) {
2315
+ this.config.autoResize = autoResize;
2316
+ return this;
2317
+ }
2318
+ renderField({ value, onChange, onBlur, error, disabled, }) {
2319
+ const { placeholder, rows, maxLength, readOnly, className } = this.config;
2320
+ return (jsxRuntime.jsx(textarea.Textarea, { value: value ?? "", onChange: (e) => onChange(e.target.value), onBlur: onBlur, placeholder: placeholder, rows: rows, maxLength: maxLength, disabled: disabled, readOnly: readOnly, className: utils.cn(error && "border-destructive", className) }));
2321
+ }
2322
+ }
2323
+
2324
+ class Select extends BaseField {
2325
+ fieldType = "select";
2326
+ constructor(name) {
2327
+ super(name);
2328
+ this.config.options = [];
2329
+ this.config.multiple = false;
2330
+ this.config.searchable = false;
2331
+ this.config.clearable = false;
2332
+ }
2333
+ static make(name) {
2334
+ return new Select(name);
2335
+ }
2336
+ options(options) {
2337
+ this.config.options = options;
2338
+ return this;
2339
+ }
2340
+ multiple(multiple = true) {
2341
+ this.config.multiple = multiple;
2342
+ return this;
2343
+ }
2344
+ searchable(searchable = true) {
2345
+ this.config.searchable = searchable;
2346
+ return this;
2347
+ }
2348
+ clearable(clearable = true) {
2349
+ this.config.clearable = clearable;
2350
+ return this;
2351
+ }
2352
+ maxItems(max) {
2353
+ this.config.maxItems = max;
2354
+ return this;
2355
+ }
2356
+ loadOptions(fn) {
2357
+ this.config.loadOptions = fn;
2358
+ return this;
2359
+ }
2360
+ renderField({ value, onChange, error, disabled, data, }) {
2361
+ const cfg = this.config;
2362
+ const resolvedOptions = typeof cfg.options === "function" ? cfg.options(data) : cfg.options;
2363
+ return (jsxRuntime.jsxs(select.Select, { value: value ?? "", onValueChange: onChange, disabled: disabled, children: [jsxRuntime.jsx(select.SelectTrigger, { className: utils.cn(error && "border-destructive", cfg.className), children: jsxRuntime.jsx(select.SelectValue, { placeholder: cfg.placeholder || "Select..." }) }), jsxRuntime.jsx(select.SelectContent, { children: resolvedOptions.map((opt) => (jsxRuntime.jsx(select.SelectItem, { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value))) })] }));
2364
+ }
2365
+ }
2366
+
2367
+ class Checkbox extends BaseField {
2368
+ fieldType = "checkbox";
2369
+ static make(name) {
2370
+ return new Checkbox(name);
2371
+ }
2372
+ renderField({ value, onChange, error, disabled, }) {
2373
+ const { className } = this.config;
2374
+ return (jsxRuntime.jsxs("div", { className: utils.cn("flex items-center space-x-2", className), children: [jsxRuntime.jsx(checkbox.Checkbox, { id: this.config.name, checked: !!value, onCheckedChange: (checked) => onChange(!!checked), disabled: disabled, className: utils.cn(error && "border-destructive") }), this.config.label && (jsxRuntime.jsx("label", { htmlFor: this.config.name, className: utils.cn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", error && "text-destructive"), children: this.config.label }))] }));
2375
+ }
2376
+ }
2377
+
2378
+ class Toggle extends BaseField {
2379
+ fieldType = "toggle";
2380
+ static make(name) {
2381
+ return new Toggle(name);
2382
+ }
2383
+ onLabel(label) {
2384
+ this.config.onLabel = label;
2385
+ return this;
2386
+ }
2387
+ offLabel(label) {
2388
+ this.config.offLabel = label;
2389
+ return this;
2390
+ }
2391
+ renderField({ value, onChange, error, disabled, }) {
2392
+ const { onLabel, offLabel, className } = this.config;
2393
+ const displayLabel = value ? onLabel : offLabel;
2394
+ return (jsxRuntime.jsxs("div", { className: utils.cn("flex items-center space-x-2", className), children: [jsxRuntime.jsx(_switch.Switch, { id: this.config.name, checked: !!value, onCheckedChange: (checked) => onChange(checked), disabled: disabled, className: utils.cn(error && "border-destructive") }), displayLabel && (jsxRuntime.jsx("label", { htmlFor: this.config.name, className: "text-sm text-muted-foreground", children: displayLabel }))] }));
2395
+ }
2396
+ }
2397
+
2398
+ class RadioGroup extends BaseField {
2399
+ fieldType = "radio-group";
2400
+ constructor(name) {
2401
+ super(name);
2402
+ this.config.options = [];
2403
+ this.config.orientation = "vertical";
2404
+ }
2405
+ static make(name) {
2406
+ return new RadioGroup(name);
2407
+ }
2408
+ options(options) {
2409
+ this.config.options = options;
2410
+ return this;
2411
+ }
2412
+ orientation(orientation) {
2413
+ this.config.orientation = orientation;
2414
+ return this;
2415
+ }
2416
+ horizontal() {
2417
+ return this.orientation("horizontal");
2418
+ }
2419
+ vertical() {
2420
+ return this.orientation("vertical");
2421
+ }
2422
+ renderField({ value, onChange, error, disabled, }) {
2423
+ const cfg = this.config;
2424
+ const isHorizontal = cfg.orientation === "horizontal";
2425
+ return (jsxRuntime.jsx(radioGroup.RadioGroup, { value: value ?? "", onValueChange: onChange, disabled: disabled, className: utils.cn(isHorizontal ? "flex flex-row gap-4" : "flex flex-col gap-2", cfg.className), children: cfg.options.map((opt) => (jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [jsxRuntime.jsx(radioGroup.RadioGroupItem, { value: opt.value, id: `${cfg.name}-${opt.value}`, disabled: opt.disabled, className: utils.cn(error && "border-destructive") }), jsxRuntime.jsx(label.Label, { htmlFor: `${cfg.name}-${opt.value}`, className: "text-sm font-normal", children: opt.label })] }, opt.value))) }));
2426
+ }
2427
+ }
2428
+
2429
+ class DatePicker extends BaseField {
2430
+ fieldType = "date-picker";
2431
+ constructor(name) {
2432
+ super(name);
2433
+ this.config.format = "PPP";
2434
+ this.config.includeTime = false;
2435
+ this.config.locale = "en-US";
2436
+ }
2437
+ static make(name) {
2438
+ return new DatePicker(name);
2439
+ }
2440
+ minDate(date) {
2441
+ this.config.minDate = date;
2442
+ return this;
2443
+ }
2444
+ maxDate(date) {
2445
+ this.config.maxDate = date;
2446
+ return this;
2447
+ }
2448
+ format(format) {
2449
+ this.config.format = format;
2450
+ return this;
2451
+ }
2452
+ includeTime(includeTime = true) {
2453
+ this.config.includeTime = includeTime;
2454
+ if (includeTime) {
2455
+ this.fieldType = "date-time-picker";
2456
+ }
2457
+ return this;
2458
+ }
2459
+ locale(locale) {
2460
+ this.config.locale = locale;
2461
+ return this;
2462
+ }
2463
+ renderField({ value, onChange, error, disabled, data, }) {
2464
+ const { placeholder, className, locale } = this.config;
2465
+ const resolvedMinDate = typeof this.config.minDate === "function"
2466
+ ? this.config.minDate(data)
2467
+ : this.config.minDate;
2468
+ const resolvedMaxDate = typeof this.config.maxDate === "function"
2469
+ ? this.config.maxDate(data)
2470
+ : this.config.maxDate;
2471
+ const dateValue = value ? new Date(value) : undefined;
2472
+ const formatDate = (date) => {
2473
+ return date.toLocaleDateString(locale || "en-US", {
2474
+ year: "numeric",
2475
+ month: "long",
2476
+ day: "numeric",
2477
+ });
2478
+ };
2479
+ return (jsxRuntime.jsxs(popover.Popover, { children: [jsxRuntime.jsx(popover.PopoverTrigger, { asChild: true, children: jsxRuntime.jsxs(button.Button, { variant: "outline", disabled: disabled, className: utils.cn("w-full justify-start text-left font-normal", !dateValue && "text-muted-foreground", error && "border-destructive", className), children: [jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "mr-2 h-4 w-4" }), dateValue ? formatDate(dateValue) : placeholder || "Pick a date"] }) }), jsxRuntime.jsx(popover.PopoverContent, { className: "w-auto p-0", align: "start", children: jsxRuntime.jsx(calendar.Calendar, { mode: "single", selected: dateValue, onSelect: (date) => onChange(date ? date.toISOString().split("T")[0] : ""), disabled: (date) => {
2480
+ if (resolvedMinDate && date < resolvedMinDate)
2481
+ return true;
2482
+ if (resolvedMaxDate && date > resolvedMaxDate)
2483
+ return true;
2484
+ return false;
2485
+ }, initialFocus: true }) })] }));
2486
+ }
2487
+ }
2488
+
2489
+ class Hidden extends BaseField {
2490
+ fieldType = "hidden";
2491
+ static make(name) {
2492
+ return new Hidden(name);
2493
+ }
2494
+ renderField({ value }) {
2495
+ return jsxRuntime.jsx("input", { type: "hidden", name: this.config.name, value: value ?? "" });
2496
+ }
2497
+ }
2498
+
2499
+ class FileUpload extends BaseField {
2500
+ fieldType = "file-upload";
2501
+ constructor(name) {
2502
+ super(name);
2503
+ this.config.multiple = false;
2504
+ this.config.preview = true;
2505
+ this.config.maxFiles = 1;
2506
+ }
2507
+ static make(name) {
2508
+ return new FileUpload(name);
2509
+ }
2510
+ accept(accept) {
2511
+ this.config.accept = accept;
2512
+ return this;
2513
+ }
2514
+ maxSize(bytes) {
2515
+ this.config.maxSize = bytes;
2516
+ return this;
2517
+ }
2518
+ multiple(multiple = true) {
2519
+ this.config.multiple = multiple;
2520
+ return this;
2521
+ }
2522
+ maxFiles(max) {
2523
+ this.config.maxFiles = max;
2524
+ return this;
2525
+ }
2526
+ preview(preview = true) {
2527
+ this.config.preview = preview;
2528
+ return this;
2529
+ }
2530
+ image() {
2531
+ return this.accept("image/*");
2532
+ }
2533
+ pdf() {
2534
+ return this.accept("application/pdf");
2535
+ }
2536
+ renderField({ value, onChange, error, disabled, }) {
2537
+ const cfg = this.config;
2538
+ const inputRef = react.useRef(null);
2539
+ const [dragOver, setDragOver] = react.useState(false);
2540
+ const files = Array.isArray(value) ? value : value ? [value] : [];
2541
+ const handleFiles = (fileList) => {
2542
+ if (!fileList)
2543
+ return;
2544
+ const newFiles = Array.from(fileList);
2545
+ if (cfg.maxSize) {
2546
+ const oversized = newFiles.find((f) => f.size > cfg.maxSize);
2547
+ if (oversized)
2548
+ return;
2549
+ }
2550
+ if (cfg.multiple) {
2551
+ const combined = [...files, ...newFiles].slice(0, cfg.maxFiles);
2552
+ onChange(combined);
2553
+ }
2554
+ else {
2555
+ onChange(newFiles[0] || null);
2556
+ }
2557
+ };
2558
+ const removeFile = (index) => {
2559
+ if (cfg.multiple) {
2560
+ const updated = files.filter((_, i) => i !== index);
2561
+ onChange(updated.length ? updated : null);
2562
+ }
2563
+ else {
2564
+ onChange(null);
2565
+ }
2566
+ };
2567
+ return (jsxRuntime.jsxs("div", { className: utils.cn("space-y-2", cfg.className), children: [jsxRuntime.jsxs("div", { className: utils.cn("flex flex-col items-center justify-center rounded-lg border-2 border-dashed p-6 transition-colors", dragOver
2568
+ ? "border-primary bg-primary/5"
2569
+ : "border-muted-foreground/25", error && "border-destructive", disabled && "cursor-not-allowed opacity-50"), onDragOver: (e) => {
2570
+ e.preventDefault();
2571
+ if (!disabled)
2572
+ setDragOver(true);
2573
+ }, onDragLeave: () => setDragOver(false), onDrop: (e) => {
2574
+ e.preventDefault();
2575
+ setDragOver(false);
2576
+ if (!disabled)
2577
+ handleFiles(e.dataTransfer.files);
2578
+ }, children: [jsxRuntime.jsx(lucideReact.Upload, { className: "mb-2 h-8 w-8 text-muted-foreground" }), jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: ["Drag & drop or", " ", jsxRuntime.jsx("button", { type: "button", className: "text-primary underline", onClick: () => inputRef.current?.click(), disabled: disabled, children: "browse" })] }), cfg.accept && (jsxRuntime.jsxs("p", { className: "mt-1 text-xs text-muted-foreground", children: ["Accepted: ", cfg.accept] })), jsxRuntime.jsx("input", { ref: inputRef, type: "file", accept: cfg.accept, multiple: cfg.multiple, onChange: (e) => handleFiles(e.target.files), className: "hidden", disabled: disabled })] }), files.length > 0 && (jsxRuntime.jsx("ul", { className: "space-y-1", children: files.map((file, index) => (jsxRuntime.jsxs("li", { className: "flex items-center justify-between rounded-md border px-3 py-2 text-sm", children: [jsxRuntime.jsxs("span", { className: "flex items-center gap-2 truncate", children: [jsxRuntime.jsx(lucideReact.File, { className: "h-4 w-4 text-muted-foreground" }), file.name] }), jsxRuntime.jsx(button.Button, { type: "button", variant: "ghost", size: "sm", className: "h-6 w-6 p-0", onClick: () => removeFile(index), disabled: disabled, children: jsxRuntime.jsx(lucideReact.X, { className: "h-3 w-3" }) })] }, index))) }))] }));
2579
+ }
2580
+ }
2581
+
2582
+ class CheckboxGroup extends BaseField {
2583
+ fieldType = "checkbox-group";
2584
+ constructor(name) {
2585
+ super(name);
2586
+ this.config.options = [];
2587
+ this.config.columns = 1;
2588
+ }
2589
+ static make(name) {
2590
+ return new CheckboxGroup(name);
2591
+ }
2592
+ options(options) {
2593
+ this.config.options = options;
2594
+ return this;
2595
+ }
2596
+ columns(columns) {
2597
+ this.config.columns = columns;
2598
+ return this;
2599
+ }
2600
+ renderField({ value, onChange, error, disabled, }) {
2601
+ const cfg = this.config;
2602
+ const selectedValues = Array.isArray(value) ? value : [];
2603
+ const gridColsClass = {
2604
+ 1: "grid-cols-1",
2605
+ 2: "grid-cols-2",
2606
+ 3: "grid-cols-3",
2607
+ 4: "grid-cols-4",
2608
+ };
2609
+ const handleToggle = (optionValue, checked) => {
2610
+ if (checked) {
2611
+ onChange([...selectedValues, optionValue]);
2612
+ }
2613
+ else {
2614
+ onChange(selectedValues.filter((v) => v !== optionValue));
2615
+ }
2616
+ };
2617
+ return (jsxRuntime.jsx("div", { className: utils.cn("grid gap-2", gridColsClass[cfg.columns || 1] || gridColsClass[1], cfg.className), children: cfg.options.map((opt) => (jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [jsxRuntime.jsx(checkbox.Checkbox, { id: `${cfg.name}-${opt.value}`, checked: selectedValues.includes(opt.value), onCheckedChange: (checked) => handleToggle(opt.value, !!checked), disabled: disabled || opt.disabled, className: utils.cn(error && "border-destructive") }), jsxRuntime.jsx(label.Label, { htmlFor: `${cfg.name}-${opt.value}`, className: "text-sm font-normal", children: opt.label })] }, opt.value))) }));
2618
+ }
2619
+ }
2620
+
2621
+ class Repeater extends BaseField {
2622
+ fieldType = "repeater";
2623
+ fieldBuilders = [];
2624
+ constructor(name) {
2625
+ super(name);
2626
+ this.config.minItems = 0;
2627
+ this.config.maxItems = Infinity;
2628
+ this.config.addLabel = "Add item";
2629
+ this.config.collapsible = false;
2630
+ this.config.orderable = false;
2631
+ }
2632
+ static make(name) {
2633
+ return new Repeater(name);
2634
+ }
2635
+ fields(...builders) {
2636
+ this.fieldBuilders = builders;
2637
+ this.config.fields = builders.map((b) => b.build());
2638
+ return this;
2639
+ }
2640
+ minItems(min) {
2641
+ this.config.minItems = min;
2642
+ return this;
2643
+ }
2644
+ maxItems(max) {
2645
+ this.config.maxItems = max;
2646
+ return this;
2647
+ }
2648
+ addLabel(label) {
2649
+ this.config.addLabel = label;
2650
+ return this;
2651
+ }
2652
+ collapsible(collapsible = true) {
2653
+ this.config.collapsible = collapsible;
2654
+ return this;
2655
+ }
2656
+ orderable(orderable = true) {
2657
+ this.config.orderable = orderable;
2658
+ return this;
2659
+ }
2660
+ renderField({ value, onChange, error, disabled, data, }) {
2661
+ const cfg = this.config;
2662
+ const items = Array.isArray(value) ? value : [];
2663
+ const builtFields = cfg.fields;
2664
+ const addItem = () => {
2665
+ if (items.length >= (cfg.maxItems || Infinity))
2666
+ return;
2667
+ const defaults = {};
2668
+ builtFields.forEach((f) => {
2669
+ defaults[f.name] = f.config.defaultValue ?? "";
2670
+ });
2671
+ onChange([...items, defaults]);
2672
+ };
2673
+ const removeItem = (index) => {
2674
+ if (items.length <= (cfg.minItems || 0))
2675
+ return;
2676
+ onChange(items.filter((_, i) => i !== index));
2677
+ };
2678
+ const updateItem = (index, fieldName, fieldValue) => {
2679
+ const updated = items.map((item, i) => i === index ? { ...item, [fieldName]: fieldValue } : item);
2680
+ onChange(updated);
2681
+ };
2682
+ const canAdd = items.length < (cfg.maxItems || Infinity);
2683
+ const canRemove = items.length > (cfg.minItems || 0);
2684
+ return (jsxRuntime.jsxs("div", { className: utils.cn("space-y-3", cfg.className), children: [items.map((item, index) => (jsxRuntime.jsx(card.Card, { children: jsxRuntime.jsxs(card.CardContent, { className: "flex items-start gap-3 pt-4", children: [cfg.orderable && (jsxRuntime.jsx(lucideReact.GripVertical, { className: "mt-2 h-5 w-5 cursor-grab text-muted-foreground" })), jsxRuntime.jsx("div", { className: "grid flex-1 gap-3", children: builtFields.map((field) => (jsxRuntime.jsxs("div", { className: "space-y-1", children: [field.config.label && (jsxRuntime.jsx("label", { className: "text-sm font-medium", children: field.config.label })), field.render({
2685
+ value: item[field.name],
2686
+ onChange: (v) => updateItem(index, field.name, v),
2687
+ disabled,
2688
+ data,
2689
+ })] }, field.name))) }), canRemove && (jsxRuntime.jsx(button.Button, { type: "button", variant: "ghost", size: "sm", className: "mt-1 h-8 w-8 p-0 text-destructive", onClick: () => removeItem(index), disabled: disabled, children: jsxRuntime.jsx(lucideReact.Trash2, { className: "h-4 w-4" }) }))] }) }, index))), canAdd && (jsxRuntime.jsxs(button.Button, { type: "button", variant: "outline", size: "sm", onClick: addItem, disabled: disabled, className: "w-full", children: [jsxRuntime.jsx(lucideReact.Plus, { className: "mr-2 h-4 w-4" }), cfg.addLabel] }))] }));
2690
+ }
2691
+ }
2692
+
2693
+ function FieldRenderer({ field, value, error, disabled, data, onChange, onBlur, }) {
2694
+ // Hidden fields render without wrapper
2695
+ if (field.type === "hidden") {
2696
+ return field.render({ value, onChange, onBlur, error, disabled, data });
2697
+ }
2698
+ // Checkbox and Toggle handle their own labels inline
2699
+ const skipLabel = field.type === "checkbox" || field.type === "toggle";
2700
+ return (jsxRuntime.jsxs("div", { className: utils.cn("space-y-2", field.config.columnSpan && field.config.columnSpan > 1
2701
+ ? `col-span-${field.config.columnSpan}`
2702
+ : undefined, field.config.className), children: [field.config.label && !skipLabel && (jsxRuntime.jsxs(label.Label, { htmlFor: field.name, className: utils.cn(error && "text-destructive"), children: [field.config.label, field.config.required && (jsxRuntime.jsx("span", { className: "text-destructive ml-1", children: "*" }))] })), field.render({
2703
+ value,
2704
+ onChange,
2705
+ onBlur,
2706
+ error,
2707
+ disabled,
2708
+ data,
2709
+ }), error && jsxRuntime.jsx("p", { className: "text-sm text-destructive", children: error }), !error && field.config.helperText && (jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: field.config.helperText }))] }));
2710
+ }
2711
+
2712
+ const gridColsClass = {
2713
+ 1: "grid-cols-1",
2714
+ 2: "grid-cols-1 sm:grid-cols-2",
2715
+ 3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
2716
+ 4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
2717
+ };
2718
+ function GridLayout({ columns = 1, children, className, }) {
2719
+ return (jsxRuntime.jsx("div", { className: utils.cn("grid gap-4", gridColsClass[columns] || gridColsClass[1], className), children: children }));
2720
+ }
2721
+
2722
+ const positionClass = {
2723
+ start: "justify-start",
2724
+ center: "justify-center",
2725
+ between: "justify-between",
2726
+ end: "justify-end",
2727
+ };
2728
+ function FormActions({ actions, position = "end", data, processing = false, }) {
2729
+ if (!actions.length)
2730
+ return null;
2731
+ return (jsxRuntime.jsx("div", { className: utils.cn("flex gap-2", positionClass[position]), children: actions.map((action, i) => {
2732
+ const isDisabled = typeof action.disabled === "function"
2733
+ ? action.disabled(data, processing)
2734
+ : action.disabled;
2735
+ if (action.type === "submit") {
2736
+ return (jsxRuntime.jsxs(button.Button, { type: "submit", variant: action.variant || "default", disabled: isDisabled || processing, children: [action.icon && jsxRuntime.jsx("span", { className: "mr-2", children: action.icon }), processing ? "Processing..." : action.label] }, i));
2737
+ }
2738
+ if (action.type === "cancel" && action.href) {
2739
+ return (jsxRuntime.jsx(button.Button, { type: "button", variant: action.variant || "outline", disabled: processing, asChild: true, children: jsxRuntime.jsxs("a", { href: action.href, children: [action.icon && jsxRuntime.jsx("span", { className: "mr-2", children: action.icon }), action.label] }) }, i));
2740
+ }
2741
+ return (jsxRuntime.jsxs(button.Button, { type: "button", variant: action.variant || "outline", onClick: action.onClick, disabled: isDisabled || (action.type === "cancel" && processing), children: [action.icon && jsxRuntime.jsx("span", { className: "mr-2", children: action.icon }), action.label] }, i));
2742
+ }) }));
2743
+ }
2744
+
2745
+ function SectionRenderer({ section, fields, data, errors, onChange, onBlur, isFieldVisible, isFieldDisabled, }) {
2746
+ const [isCollapsed, setIsCollapsed] = react.useState(section.collapsed ?? false);
2747
+ if (section.hidden && section.hidden(data))
2748
+ return null;
2749
+ const sectionFields = fields.filter((f) => section.fields.includes(f.name));
2750
+ return (jsxRuntime.jsxs(card.Card, { children: [jsxRuntime.jsxs(card.CardHeader, { className: utils.cn(section.collapsible && "cursor-pointer select-none"), onClick: section.collapsible ? () => setIsCollapsed(!isCollapsed) : undefined, children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [section.icon, jsxRuntime.jsx(card.CardTitle, { className: "text-lg", children: section.title })] }), section.collapsible && (jsxRuntime.jsx(button.Button, { variant: "ghost", size: "sm", className: "h-8 w-8 p-0", children: jsxRuntime.jsx(lucideReact.ChevronDown, { className: utils.cn("h-4 w-4 transition-transform", isCollapsed && "-rotate-90") }) }))] }), section.description && (jsxRuntime.jsx(card.CardDescription, { children: section.description }))] }), !isCollapsed && (jsxRuntime.jsx(card.CardContent, { children: jsxRuntime.jsx(GridLayout, { columns: section.columns, children: sectionFields.map((field) => {
2751
+ if (!isFieldVisible(field))
2752
+ return null;
2753
+ return (jsxRuntime.jsx(FieldRenderer, { field: field, value: data[field.name], error: errors[field.name], disabled: isFieldDisabled(field), data: data, onChange: (v) => onChange(field.name, v), onBlur: onBlur ? () => onBlur(field.name) : undefined }, field.name));
2754
+ }) }) }))] }));
2755
+ }
2756
+
2757
+ function TabRenderer({ tabs: tabs$1, fields, data, errors, onChange, onBlur, isFieldVisible, isFieldDisabled, columns, }) {
2758
+ const firstTab = tabs$1[0]?.id;
2759
+ return (jsxRuntime.jsxs(tabs.Tabs, { defaultValue: firstTab, children: [jsxRuntime.jsx(tabs.TabsList, { children: tabs$1.map((tab) => {
2760
+ const isDisabled = tab.disabled ? tab.disabled(data) : false;
2761
+ const badge = typeof tab.badge === "function" ? tab.badge(data) : tab.badge;
2762
+ return (jsxRuntime.jsx(tabs.TabsTrigger, { value: tab.id, disabled: isDisabled, children: jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [tab.icon, tab.label, badge !== undefined && badge !== null && (jsxRuntime.jsx("span", { className: "ml-1 rounded-full bg-muted px-2 py-0.5 text-xs", children: badge }))] }) }, tab.id));
2763
+ }) }), tabs$1.map((tab) => {
2764
+ const tabFields = tab.fields
2765
+ ? fields.filter((f) => tab.fields.includes(f.name))
2766
+ : [];
2767
+ return (jsxRuntime.jsx(tabs.TabsContent, { value: tab.id, className: "mt-4", children: tab.sections ? (jsxRuntime.jsx("div", { className: "space-y-4", children: tab.sections.map((section) => (jsxRuntime.jsx(SectionRenderer, { section: section, fields: fields, data: data, errors: errors, onChange: onChange, onBlur: onBlur, isFieldVisible: isFieldVisible, isFieldDisabled: isFieldDisabled }, section.id))) })) : (jsxRuntime.jsx(GridLayout, { columns: columns, children: tabFields.map((field) => {
2768
+ if (!isFieldVisible(field))
2769
+ return null;
2770
+ return (jsxRuntime.jsx(FieldRenderer, { field: field, value: data[field.name], error: errors[field.name], disabled: isFieldDisabled(field), data: data, onChange: (v) => onChange(field.name, v), onBlur: onBlur ? () => onBlur(field.name) : undefined }, field.name));
2771
+ }) })) }, tab.id));
2772
+ })] }));
2773
+ }
2774
+
2775
+ function WizardRenderer({ steps, fields, data, errors, onChange, onBlur, isFieldVisible, isFieldDisabled, columns, onSubmit, processing = false, }) {
2776
+ const [currentStep, setCurrentStep] = react.useState(0);
2777
+ const currentStepConfig = steps[currentStep];
2778
+ const isLastStep = currentStep === steps.length - 1;
2779
+ const isFirstStep = currentStep === 0;
2780
+ const canProceed = currentStepConfig?.canProceed
2781
+ ? currentStepConfig.canProceed(data)
2782
+ : true;
2783
+ const handleNext = react.useCallback(async () => {
2784
+ if (currentStepConfig?.beforeNext) {
2785
+ const canContinue = await currentStepConfig.beforeNext(data);
2786
+ if (!canContinue)
2787
+ return;
2788
+ }
2789
+ if (isLastStep) {
2790
+ onSubmit();
2791
+ }
2792
+ else {
2793
+ setCurrentStep((prev) => Math.min(prev + 1, steps.length - 1));
2794
+ }
2795
+ }, [currentStep, currentStepConfig, data, isLastStep, onSubmit, steps.length]);
2796
+ const handlePrevious = react.useCallback(() => {
2797
+ setCurrentStep((prev) => Math.max(prev - 1, 0));
2798
+ }, []);
2799
+ const stepFields = currentStepConfig?.fields
2800
+ ? fields.filter((f) => currentStepConfig.fields.includes(f.name))
2801
+ : [];
2802
+ return (jsxRuntime.jsxs("div", { className: "space-y-6", children: [jsxRuntime.jsx("nav", { "aria-label": "Progress", children: jsxRuntime.jsx("ol", { className: "flex items-center", children: steps.map((step, index) => (jsxRuntime.jsxs("li", { className: utils.cn("flex items-center", index < steps.length - 1 && "flex-1"), children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("div", { className: utils.cn("flex h-8 w-8 items-center justify-center rounded-full border-2 text-sm font-medium", index < currentStep &&
2803
+ "border-primary bg-primary text-primary-foreground", index === currentStep &&
2804
+ "border-primary text-primary", index > currentStep &&
2805
+ "border-muted-foreground/25 text-muted-foreground"), children: index < currentStep ? (jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" })) : (index + 1) }), jsxRuntime.jsxs("div", { className: "hidden sm:block", children: [jsxRuntime.jsx("p", { className: utils.cn("text-sm font-medium", index <= currentStep
2806
+ ? "text-foreground"
2807
+ : "text-muted-foreground"), children: step.label }), step.description && (jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: step.description }))] })] }), index < steps.length - 1 && (jsxRuntime.jsx("div", { className: utils.cn("mx-4 hidden h-0.5 flex-1 sm:block", index < currentStep ? "bg-primary" : "bg-muted") }))] }, step.id))) }) }), jsxRuntime.jsx("div", { children: currentStepConfig?.sections ? (jsxRuntime.jsx("div", { className: "space-y-4", children: currentStepConfig.sections.map((section) => (jsxRuntime.jsx(SectionRenderer, { section: section, fields: fields, data: data, errors: errors, onChange: onChange, onBlur: onBlur, isFieldVisible: isFieldVisible, isFieldDisabled: isFieldDisabled }, section.id))) })) : (jsxRuntime.jsx(GridLayout, { columns: columns, children: stepFields.map((field) => {
2808
+ if (!isFieldVisible(field))
2809
+ return null;
2810
+ return (jsxRuntime.jsx(FieldRenderer, { field: field, value: data[field.name], error: errors[field.name], disabled: isFieldDisabled(field), data: data, onChange: (v) => onChange(field.name, v), onBlur: onBlur ? () => onBlur(field.name) : undefined }, field.name));
2811
+ }) })) }), jsxRuntime.jsxs("div", { className: "flex justify-between", children: [jsxRuntime.jsx(button.Button, { type: "button", variant: "outline", onClick: handlePrevious, disabled: isFirstStep, children: "Previous" }), jsxRuntime.jsx(button.Button, { type: isLastStep ? "submit" : "button", onClick: handleNext, disabled: !canProceed || (isLastStep && processing), children: isLastStep
2812
+ ? processing
2813
+ ? "Processing..."
2814
+ : "Submit"
2815
+ : "Next" })] })] }));
2816
+ }
2817
+
2818
+ function FormRenderer({ schema, data, errors, onChange, onSubmit, processing = false, className, disabled = false, onBlur, }) {
2819
+ const { fields, config } = schema;
2820
+ const resolvedTitle = react.useMemo(() => {
2821
+ if (typeof config.title === "function")
2822
+ return config.title(data);
2823
+ return config.title;
2824
+ }, [config.title, data]);
2825
+ const resolvedDescription = react.useMemo(() => {
2826
+ if (typeof config.description === "function")
2827
+ return config.description(data);
2828
+ return config.description;
2829
+ }, [config.description, data]);
2830
+ const isFieldVisible = react.useCallback((field) => {
2831
+ if (typeof field.config.hidden === "function")
2832
+ return !field.config.hidden(data);
2833
+ if (typeof field.config.hidden === "boolean")
2834
+ return !field.config.hidden;
2835
+ for (const dep of field.config.dependsOn || []) {
2836
+ const depValue = data[dep.field];
2837
+ if (dep.effect === "show" && !dep.condition(depValue, data))
2838
+ return false;
2839
+ if (dep.effect === "hide" && dep.condition(depValue, data))
2840
+ return false;
2841
+ }
2842
+ return true;
2843
+ }, [data]);
2844
+ const isFieldDisabled = react.useCallback((field) => {
2845
+ if (disabled)
2846
+ return true;
2847
+ if (typeof config.disabled === "function" && config.disabled(data))
2848
+ return true;
2849
+ if (typeof config.disabled === "boolean" && config.disabled)
2850
+ return true;
2851
+ if (typeof field.config.disabled === "function")
2852
+ return field.config.disabled(data);
2853
+ if (typeof field.config.disabled === "boolean")
2854
+ return field.config.disabled;
2855
+ for (const dep of field.config.dependsOn || []) {
2856
+ const depValue = data[dep.field];
2857
+ if (dep.effect === "disable" && dep.condition(depValue, data))
2858
+ return true;
2859
+ if (dep.effect === "enable" &&
2860
+ !dep.condition(depValue, data))
2861
+ return true;
2862
+ }
2863
+ return false;
2864
+ }, [disabled, config.disabled, data]);
2865
+ const renderFieldsFlat = () => (jsxRuntime.jsx(GridLayout, { columns: config.columns, children: fields.map((field) => {
2866
+ if (!isFieldVisible(field))
2867
+ return null;
2868
+ return (jsxRuntime.jsx(FieldRenderer, { field: field, value: data[field.name], error: errors[field.name], disabled: isFieldDisabled(field), data: data, onChange: (v) => onChange(field.name, v), onBlur: onBlur ? () => onBlur(field.name) : undefined }, field.name));
2869
+ }) }));
2870
+ const renderContent = () => {
2871
+ // Wizard mode
2872
+ if (config.wizardSteps?.length) {
2873
+ return (jsxRuntime.jsx(WizardRenderer, { steps: config.wizardSteps, fields: fields, data: data, errors: errors, onChange: onChange, onBlur: onBlur, isFieldVisible: isFieldVisible, isFieldDisabled: isFieldDisabled, columns: config.columns, onSubmit: onSubmit, processing: processing }));
2874
+ }
2875
+ // Tabs mode
2876
+ if (config.tabs?.length) {
2877
+ return (jsxRuntime.jsx(TabRenderer, { tabs: config.tabs, fields: fields, data: data, errors: errors, onChange: onChange, onBlur: onBlur, isFieldVisible: isFieldVisible, isFieldDisabled: isFieldDisabled, columns: config.columns }));
2878
+ }
2879
+ // Sections mode
2880
+ if (config.sections?.length) {
2881
+ return (jsxRuntime.jsx("div", { className: "space-y-4", children: config.sections.map((section) => (jsxRuntime.jsx(SectionRenderer, { section: section, fields: fields, data: data, errors: errors, onChange: onChange, onBlur: onBlur, isFieldVisible: isFieldVisible, isFieldDisabled: isFieldDisabled }, section.id))) }));
2882
+ }
2883
+ // Flat mode (default)
2884
+ return renderFieldsFlat();
2885
+ };
2886
+ const spacingClass = {
2887
+ compact: "space-y-3",
2888
+ normal: "space-y-6",
2889
+ relaxed: "space-y-8",
2890
+ }[config.spacing || "normal"];
2891
+ // Wizard handles its own submit button
2892
+ const showActions = config.actions?.length && !config.wizardSteps?.length;
2893
+ const formBody = (jsxRuntime.jsxs("form", { onSubmit: (e) => {
2894
+ e.preventDefault();
2895
+ onSubmit();
2896
+ }, className: utils.cn(spacingClass, className), children: [(resolvedTitle || resolvedDescription) && (jsxRuntime.jsxs("div", { className: "space-y-1", children: [resolvedTitle && (jsxRuntime.jsx("h2", { className: "text-2xl font-semibold tracking-tight", children: resolvedTitle })), resolvedDescription && (jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: resolvedDescription }))] })), renderContent(), showActions && (jsxRuntime.jsx(FormActions, { actions: config.actions, position: config.actionsPosition, data: data, processing: processing }))] }));
2897
+ if (config.bordered) {
2898
+ return (jsxRuntime.jsx(card.Card, { children: jsxRuntime.jsx(card.CardContent, { className: "pt-6", children: formBody }) }));
2899
+ }
2900
+ return formBody;
2901
+ }
2902
+
2903
+ exports.ActionsBuilder = ActionsBuilder;
1862
2904
  exports.ActionsColumn = ActionsColumn;
1863
2905
  exports.AvatarGroupColumn = AvatarGroupColumn;
1864
2906
  exports.BadgeColumn = BadgeColumn;
1865
2907
  exports.ButtonColumn = ButtonColumn;
2908
+ exports.Checkbox = Checkbox;
1866
2909
  exports.CheckboxColumn = CheckboxColumn;
2910
+ exports.CheckboxGroup = CheckboxGroup;
1867
2911
  exports.ConfirmProvider = ConfirmProvider;
1868
2912
  exports.DataTable = DataTable;
1869
2913
  exports.DataTableSchema = DataTableSchema;
1870
2914
  exports.DateColumn = DateColumn;
2915
+ exports.DatePicker = DatePicker;
1871
2916
  exports.DropdownColumn = DropdownColumn;
1872
2917
  exports.EmptyStateBuilder = EmptyStateBuilder;
1873
2918
  exports.EnumColumn = EnumColumn;
2919
+ exports.FileUpload = FileUpload;
2920
+ exports.FormRenderer = FormRenderer;
2921
+ exports.FormSchema = FormSchema;
2922
+ exports.Hidden = Hidden;
1874
2923
  exports.IconColumn = IconColumn;
1875
2924
  exports.ImageColumn = ImageColumn;
1876
2925
  exports.InputColumn = InputColumn;
1877
2926
  exports.LinkColumn = LinkColumn;
1878
2927
  exports.NumberColumn = NumberColumn;
1879
2928
  exports.ProgressColumn = ProgressColumn;
2929
+ exports.RadioGroup = RadioGroup;
2930
+ exports.Repeater = Repeater;
2931
+ exports.SectionBuilder = SectionBuilder;
2932
+ exports.Select = Select;
1880
2933
  exports.SelectColumn = SelectColumn;
2934
+ exports.TabBuilder = TabBuilder;
1881
2935
  exports.TableSchema = TableSchema;
1882
2936
  exports.TextColumn = TextColumn;
2937
+ exports.TextInput = TextInput;
2938
+ exports.Textarea = Textarea;
2939
+ exports.Toggle = Toggle;
2940
+ exports.WizardStep = WizardStep;
1883
2941
  exports.actionsColumn = ActionsColumn;
1884
2942
  exports.avatarGroupColumn = AvatarGroupColumn;
1885
2943
  exports.badgeColumn = BadgeColumn;