@pixpilot/formily-shadcn 0.9.0 → 0.10.0

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 (87) hide show
  1. package/README.md +75 -0
  2. package/dist/components/array-base/components/addition.cjs +2 -2
  3. package/dist/components/array-base/components/addition.d.cts +3 -2
  4. package/dist/components/array-base/components/addition.d.ts +3 -2
  5. package/dist/components/array-base/components/addition.js +2 -2
  6. package/dist/components/array-base/components/array-item-label.cjs +1 -1
  7. package/dist/components/array-base/components/array-item-label.js +1 -1
  8. package/dist/components/array-base/types.d.cts +2 -2
  9. package/dist/components/array-base/types.d.ts +2 -2
  10. package/dist/components/checkbox.d.cts +2 -2
  11. package/dist/components/checkbox.d.ts +2 -2
  12. package/dist/components/context/form-context.d.cts +20 -16
  13. package/dist/components/context/form-context.d.ts +20 -16
  14. package/dist/components/context/index.d.cts +1 -1
  15. package/dist/components/context/index.d.ts +1 -1
  16. package/dist/components/date-picker.d.cts +4 -10
  17. package/dist/components/date-picker.d.ts +5 -11
  18. package/dist/components/file-upload/file-upload-inline.d.cts +8 -8
  19. package/dist/components/file-upload/file-upload.d.cts +8 -8
  20. package/dist/components/file-upload/use-file-upload-feedback.cjs +2 -2
  21. package/dist/components/file-upload/use-file-upload-feedback.js +2 -2
  22. package/dist/components/form-items-container.cjs +2 -5
  23. package/dist/components/form-items-container.js +2 -5
  24. package/dist/components/form.cjs +3 -5
  25. package/dist/components/form.d.cts +1 -2
  26. package/dist/components/form.d.ts +1 -2
  27. package/dist/components/form.js +3 -5
  28. package/dist/components/icon-picker.cjs +2 -2
  29. package/dist/components/icon-picker.d.ts +3 -3
  30. package/dist/components/icon-picker.js +2 -2
  31. package/dist/components/input.d.cts +2 -2
  32. package/dist/components/json-schema-form-renderer.cjs +34 -7
  33. package/dist/components/json-schema-form-renderer.d.cts +8 -3
  34. package/dist/components/json-schema-form-renderer.d.ts +8 -3
  35. package/dist/components/json-schema-form-renderer.js +32 -7
  36. package/dist/components/number-input.d.cts +2 -2
  37. package/dist/components/number-input.d.ts +2 -2
  38. package/dist/components/object-container.cjs +33 -7
  39. package/dist/components/object-container.js +34 -8
  40. package/dist/components/radio.d.cts +2 -2
  41. package/dist/components/radio.d.ts +2 -2
  42. package/dist/components/rich-text-editor.cjs +1 -1
  43. package/dist/components/rich-text-editor.js +1 -1
  44. package/dist/components/schema-field/index.d.cts +1 -1
  45. package/dist/components/schema-field/index.d.ts +1 -1
  46. package/dist/components/schema-field/index.js +1 -1
  47. package/dist/components/schema-field/schema-field-basics.cjs +4 -4
  48. package/dist/components/schema-field/schema-field-basics.d.cts +209 -269
  49. package/dist/components/schema-field/schema-field-basics.d.ts +209 -269
  50. package/dist/components/schema-field/schema-field-basics.js +3 -3
  51. package/dist/components/schema-field/schema-field-extended.d.cts +427 -488
  52. package/dist/components/schema-field/schema-field-extended.d.ts +427 -488
  53. package/dist/components/schema-field/schema-field.cjs +1 -1
  54. package/dist/components/schema-field/schema-field.d.cts +236 -297
  55. package/dist/components/schema-field/schema-field.d.ts +236 -297
  56. package/dist/components/schema-field/schema-field.js +2 -2
  57. package/dist/components/separator.d.cts +2 -2
  58. package/dist/components/separator.d.ts +2 -2
  59. package/dist/components/slider.d.cts +2 -2
  60. package/dist/components/slider.d.ts +2 -2
  61. package/dist/components/switch.d.cts +2 -2
  62. package/dist/components/tags-input-inline.d.cts +2 -2
  63. package/dist/components/textarea.d.cts +2 -2
  64. package/dist/components/textarea.d.ts +2 -2
  65. package/dist/hooks/index.js +1 -1
  66. package/dist/hooks/use-form-context.cjs +5 -0
  67. package/dist/hooks/use-form-context.js +5 -1
  68. package/dist/hooks/use-label.cjs +9 -2
  69. package/dist/hooks/use-label.js +9 -2
  70. package/dist/index.cjs +1 -1
  71. package/dist/index.d.cts +2 -2
  72. package/dist/index.d.ts +2 -2
  73. package/dist/index.js +2 -2
  74. package/dist/types/form.d.cts +0 -6
  75. package/dist/types/form.d.ts +0 -6
  76. package/dist/utils/extract-fields-decorators.cjs +37 -0
  77. package/dist/utils/extract-fields-decorators.js +36 -0
  78. package/dist/utils/index.cjs +2 -0
  79. package/dist/utils/index.js +3 -1
  80. package/dist/utils/resolve-responsive-space.cjs +45 -89
  81. package/dist/utils/resolve-responsive-space.js +42 -83
  82. package/dist/utils/transform-schema.cjs +9 -2
  83. package/dist/utils/transform-schema.js +9 -2
  84. package/dist/utils/validate-schema-components.cjs +45 -0
  85. package/dist/utils/validate-schema-components.js +43 -0
  86. package/package.json +4 -3
  87. package/dist/_virtual/rolldown_runtime.js +0 -24
package/README.md CHANGED
@@ -161,3 +161,78 @@ const form = createForm({
161
161
  effects: () => {},
162
162
  });
163
163
  ```
164
+
165
+ ### Form Configuration
166
+
167
+ #### useFieldNameAsLabel
168
+
169
+ The `useFieldNameAsLabel` option controls whether field names are automatically converted to labels when no explicit label is provided.
170
+
171
+ **Default Behavior:**
172
+
173
+ - **`JsonSchemaFormRenderer`** - Sets `useFieldNameAsLabel: true` by default. Field names are automatically capitalized and used as labels if no `title` is provided in the schema.
174
+ - **`Form` component** - Must be explicitly configured. Users need to set `useFieldNameAsLabel: true` in the `config` prop to enable this behavior.
175
+
176
+ **Example with JsonSchemaFormRenderer (enabled by default):**
177
+
178
+ ```tsx
179
+ import { JsonSchemaFormRenderer } from '@pixpilot/formily-shadcn';
180
+
181
+ const schema = {
182
+ type: 'object',
183
+ properties: {
184
+ userName: {
185
+ type: 'string',
186
+ 'x-decorator': 'FormItem',
187
+ 'x-component': 'Input',
188
+ // No title provided - will use "User Name" as label
189
+ },
190
+ },
191
+ };
192
+
193
+ export function MyForm() {
194
+ return <JsonSchemaFormRenderer schema={schema} />;
195
+ }
196
+ ```
197
+
198
+ **Example with Form component (requires explicit configuration):**
199
+
200
+ ```tsx
201
+ import { createForm, Form, SchemaField } from '@pixpilot/formily-shadcn';
202
+
203
+ const form = createForm();
204
+
205
+ const schema = {
206
+ type: 'object',
207
+ properties: {
208
+ userName: {
209
+ type: 'string',
210
+ 'x-decorator': 'FormItem',
211
+ 'x-component': 'Input',
212
+ // No title provided - will use "User Name" as label only if config is set
213
+ },
214
+ },
215
+ };
216
+
217
+ export function MyForm() {
218
+ return (
219
+ <Form
220
+ form={form}
221
+ config={{
222
+ label: {
223
+ useFieldNameAsLabel: true, // Must be explicitly set
224
+ },
225
+ }}
226
+ >
227
+ <SchemaField schema={schema} />
228
+ </Form>
229
+ );
230
+ }
231
+ ```
232
+
233
+ The label resolution priority is:
234
+
235
+ 1. Explicit `label` prop (if provided and not `false`)
236
+ 2. Schema `title` field
237
+ 3. Field `name` capitalized (only if `useFieldNameAsLabel: true`)
238
+ 4. No label
@@ -14,7 +14,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
14
14
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
15
15
 
16
16
  //#region src/components/array-base/components/addition.tsx
17
- const ArrayAddition = react.default.forwardRef((props, ref) => {
17
+ function ArrayAddition({ ref,...props }) {
18
18
  const { fullWidth = true } = props;
19
19
  const self = (0, __formily_react.useField)();
20
20
  const array = require_array_context.useArray();
@@ -44,7 +44,7 @@ const ArrayAddition = react.default.forwardRef((props, ref) => {
44
44
  },
45
45
  children: [props.icon !== void 0 ? props.icon : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.PlusIcon, { className: "mr-2 size-4" }), props.title ?? self.title ?? props.children ?? "Add Item"]
46
46
  });
47
- });
47
+ }
48
48
  ArrayAddition.displayName = "ArrayAddition";
49
49
 
50
50
  //#endregion
@@ -1,8 +1,9 @@
1
1
  import React from "react";
2
- import { Button } from "@pixpilot/shadcn-ui";
2
+ import { ButtonProps } from "@pixpilot/shadcn-ui";
3
+ import "react/jsx-runtime";
3
4
 
4
5
  //#region src/components/array-base/components/addition.d.ts
5
- interface IArrayBaseAdditionProps extends React.ComponentProps<typeof Button> {
6
+ interface IArrayBaseAdditionProps extends ButtonProps {
6
7
  title?: string;
7
8
  method?: 'push' | 'unshift';
8
9
  defaultValue?: any;
@@ -1,8 +1,9 @@
1
1
  import React from "react";
2
- import { Button } from "@pixpilot/shadcn-ui";
2
+ import { ButtonProps } from "@pixpilot/shadcn-ui";
3
+ import "react/jsx-runtime";
3
4
 
4
5
  //#region src/components/array-base/components/addition.d.ts
5
- interface IArrayBaseAdditionProps extends React.ComponentProps<typeof Button> {
6
+ interface IArrayBaseAdditionProps extends ButtonProps {
6
7
  title?: string;
7
8
  method?: 'push' | 'unshift';
8
9
  defaultValue?: any;
@@ -8,7 +8,7 @@ import { PlusIcon } from "lucide-react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
 
10
10
  //#region src/components/array-base/components/addition.tsx
11
- const ArrayAddition = React.forwardRef((props, ref) => {
11
+ function ArrayAddition({ ref,...props }) {
12
12
  const { fullWidth = true } = props;
13
13
  const self = useField();
14
14
  const array = useArray();
@@ -38,7 +38,7 @@ const ArrayAddition = React.forwardRef((props, ref) => {
38
38
  },
39
39
  children: [props.icon !== void 0 ? props.icon : /* @__PURE__ */ jsx(PlusIcon, { className: "mr-2 size-4" }), props.title ?? self.title ?? props.children ?? "Add Item"]
40
40
  });
41
- });
41
+ }
42
42
  ArrayAddition.displayName = "ArrayAddition";
43
43
 
44
44
  //#endregion
@@ -11,7 +11,7 @@ const ArrayItemLabel = () => {
11
11
  const label = require_use_label.useLabel();
12
12
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
13
13
  className: "font-medium",
14
- children: [label, typeof label === "string" ? ` ${(index ?? 0) + 1}` : ""]
14
+ children: [label, typeof label === "string" || label == null ? ` ${(index ?? 0) + 1}` : ""]
15
15
  });
16
16
  };
17
17
 
@@ -9,7 +9,7 @@ const ArrayItemLabel = () => {
9
9
  const label = useLabel();
10
10
  return /* @__PURE__ */ jsxs("span", {
11
11
  className: "font-medium",
12
- children: [label, typeof label === "string" ? ` ${(index ?? 0) + 1}` : ""]
12
+ children: [label, typeof label === "string" || label == null ? ` ${(index ?? 0) + 1}` : ""]
13
13
  });
14
14
  };
15
15
 
@@ -1,6 +1,6 @@
1
1
  import { ArrayBaseComponents, ArrayOperationTypes } from "./components/types.cjs";
2
2
  import { IArrayBaseContext } from "./array-context.cjs";
3
- import { Button } from "@pixpilot/shadcn-ui";
3
+ import { ButtonProps } from "@pixpilot/shadcn-ui";
4
4
 
5
5
  //#region src/components/array-base/types.d.ts
6
6
  interface ArrayBaseMixins extends ArrayBaseComponents {
@@ -17,7 +17,7 @@ interface IArrayBaseProps {
17
17
  onEdit?: (index: number) => void;
18
18
  onCopy?: (index: number) => void;
19
19
  }
20
- interface IArrayBaseOperationProps extends React.ComponentProps<typeof Button> {
20
+ interface IArrayBaseOperationProps extends ButtonProps {
21
21
  title?: string;
22
22
  index?: number;
23
23
  icon?: React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  import { ArrayBaseComponents, ArrayOperationTypes } from "./components/types.js";
2
2
  import { IArrayBaseContext } from "./array-context.js";
3
- import { Button } from "@pixpilot/shadcn-ui";
3
+ import { ButtonProps } from "@pixpilot/shadcn-ui";
4
4
 
5
5
  //#region src/components/array-base/types.d.ts
6
6
  interface ArrayBaseMixins extends ArrayBaseComponents {
@@ -17,7 +17,7 @@ interface IArrayBaseProps {
17
17
  onEdit?: (index: number) => void;
18
18
  onCopy?: (index: number) => void;
19
19
  }
20
- interface IArrayBaseOperationProps extends React.ComponentProps<typeof Button> {
20
+ interface IArrayBaseOperationProps extends ButtonProps {
21
21
  title?: string;
22
22
  index?: number;
23
23
  icon?: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import * as react0 from "react";
1
+ import * as react1 from "react";
2
2
  import * as _radix_ui_react_checkbox0 from "@radix-ui/react-checkbox";
3
3
 
4
4
  //#region src/components/checkbox.d.ts
@@ -6,6 +6,6 @@ import * as _radix_ui_react_checkbox0 from "@radix-ui/react-checkbox";
6
6
  * Formily-connected Checkbox component
7
7
  * Maps Formily field checked state to shadcn Checkbox
8
8
  */
9
- declare const Checkbox: react0.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_checkbox0.CheckboxProps & react0.RefAttributes<HTMLButtonElement>>, "ref"> & react0.RefAttributes<unknown>>;
9
+ declare const Checkbox: react1.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_checkbox0.CheckboxProps & react1.RefAttributes<HTMLButtonElement>>, "ref"> & react1.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Checkbox };
@@ -1,4 +1,4 @@
1
- import * as react3 from "react";
1
+ import * as react0 from "react";
2
2
  import * as _radix_ui_react_checkbox0 from "@radix-ui/react-checkbox";
3
3
 
4
4
  //#region src/components/checkbox.d.ts
@@ -6,6 +6,6 @@ import * as _radix_ui_react_checkbox0 from "@radix-ui/react-checkbox";
6
6
  * Formily-connected Checkbox component
7
7
  * Maps Formily field checked state to shadcn Checkbox
8
8
  */
9
- declare const Checkbox: react3.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_checkbox0.CheckboxProps & react3.RefAttributes<HTMLButtonElement>>, "ref"> & react3.RefAttributes<unknown>>;
9
+ declare const Checkbox: react0.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_checkbox0.CheckboxProps & react0.RefAttributes<HTMLButtonElement>>, "ref"> & react0.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Checkbox };
@@ -7,6 +7,24 @@ interface FomFileUpload {
7
7
  onUpload?: (files: File[], options: FileUploadProgressCallBacks) => void;
8
8
  maxSize?: number;
9
9
  }
10
+ interface FormConfigProps {
11
+ label?: {
12
+ useFieldNameAsLabel?: boolean;
13
+ };
14
+ iconPicker?: {
15
+ /**
16
+ * Icon providers - can be static providers or async loader functions
17
+ * Users can provide either IconProvider[] or AsyncIconProvider[]
18
+ */
19
+ providers: IconProvider[];
20
+ /**
21
+ * Optional callback when providers are loaded
22
+ */
23
+ onProvidersLoaded?: (providers: IconProvider[]) => void;
24
+ };
25
+ fileUpload?: FomFileUpload;
26
+ richTextEditor?: RichTextEditorProps;
27
+ }
10
28
  interface FormContextStates extends FormSpace {
11
29
  itemProps?: {
12
30
  className?: string;
@@ -14,21 +32,7 @@ interface FormContextStates extends FormSpace {
14
32
  objectContainerProps?: {
15
33
  className?: string;
16
34
  };
17
- config?: {
18
- iconPicker?: {
19
- /**
20
- * Icon providers - can be static providers or async loader functions
21
- * Users can provide either IconProvider[] or AsyncIconProvider[]
22
- */
23
- providers: IconProvider[];
24
- /**
25
- * Optional callback when providers are loaded
26
- */
27
- onProvidersLoaded?: (providers: IconProvider[]) => void;
28
- };
29
- fileUpload?: FomFileUpload;
30
- richTextEditor?: RichTextEditorProps;
31
- };
35
+ settings?: FormConfigProps;
32
36
  }
33
37
  //#endregion
34
- export { FomFileUpload, FormContextStates };
38
+ export { FomFileUpload, FormConfigProps, FormContextStates };
@@ -7,6 +7,24 @@ interface FomFileUpload {
7
7
  onUpload?: (files: File[], options: FileUploadProgressCallBacks) => void;
8
8
  maxSize?: number;
9
9
  }
10
+ interface FormConfigProps {
11
+ label?: {
12
+ useFieldNameAsLabel?: boolean;
13
+ };
14
+ iconPicker?: {
15
+ /**
16
+ * Icon providers - can be static providers or async loader functions
17
+ * Users can provide either IconProvider[] or AsyncIconProvider[]
18
+ */
19
+ providers: IconProvider[];
20
+ /**
21
+ * Optional callback when providers are loaded
22
+ */
23
+ onProvidersLoaded?: (providers: IconProvider[]) => void;
24
+ };
25
+ fileUpload?: FomFileUpload;
26
+ richTextEditor?: RichTextEditorProps;
27
+ }
10
28
  interface FormContextStates extends FormSpace {
11
29
  itemProps?: {
12
30
  className?: string;
@@ -14,21 +32,7 @@ interface FormContextStates extends FormSpace {
14
32
  objectContainerProps?: {
15
33
  className?: string;
16
34
  };
17
- config?: {
18
- iconPicker?: {
19
- /**
20
- * Icon providers - can be static providers or async loader functions
21
- * Users can provide either IconProvider[] or AsyncIconProvider[]
22
- */
23
- providers: IconProvider[];
24
- /**
25
- * Optional callback when providers are loaded
26
- */
27
- onProvidersLoaded?: (providers: IconProvider[]) => void;
28
- };
29
- fileUpload?: FomFileUpload;
30
- richTextEditor?: RichTextEditorProps;
31
- };
35
+ settings?: FormConfigProps;
32
36
  }
33
37
  //#endregion
34
- export { FomFileUpload, FormContextStates };
38
+ export { FomFileUpload, FormConfigProps, FormContextStates };
@@ -1,2 +1,2 @@
1
- import { FomFileUpload, FormContextStates } from "./form-context.cjs";
1
+ import { FomFileUpload, FormConfigProps, FormContextStates } from "./form-context.cjs";
2
2
  import "./context.cjs";
@@ -1,2 +1,2 @@
1
- import { FomFileUpload, FormContextStates } from "./form-context.js";
1
+ import { FomFileUpload, FormConfigProps, FormContextStates } from "./form-context.js";
2
2
  import "./context.js";
@@ -1,17 +1,11 @@
1
- import * as react2 from "react";
2
- import * as react_day_picker0 from "react-day-picker";
1
+ import * as react0 from "react";
2
+ import { DatePickerProps } from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/date-picker.d.ts
5
- declare const DatePicker: react2.ForwardRefExoticComponent<Partial<{
5
+ declare const DatePicker: react0.ForwardRefExoticComponent<Partial<{
6
6
  value?: Date;
7
7
  onChange?: (date: Date | undefined) => void;
8
8
  placeholder?: string;
9
- } & Omit<{
10
- value?: Date;
11
- onChange?: (date: Date | undefined) => void;
12
- placeholder?: string;
13
- } & Omit<react_day_picker0.DayPickerProps & {
14
- buttonVariant?: React.ComponentProps<typeof void 0>["variant"];
15
- }, "onSelect" | "selected" | "mode">, "onSelect" | "selected" | "mode">> & react2.RefAttributes<unknown>>;
9
+ } & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> & react0.RefAttributes<unknown>>;
16
10
  //#endregion
17
11
  export { DatePicker };
@@ -1,17 +1,11 @@
1
- import * as react6 from "react";
2
- import * as react_day_picker0 from "react-day-picker";
1
+ import * as react2 from "react";
2
+ import { DatePickerProps } from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/date-picker.d.ts
5
- declare const DatePicker: react6.ForwardRefExoticComponent<Partial<{
5
+ declare const DatePicker$1: react2.ForwardRefExoticComponent<Partial<{
6
6
  value?: Date;
7
7
  onChange?: (date: Date | undefined) => void;
8
8
  placeholder?: string;
9
- } & Omit<{
10
- value?: Date;
11
- onChange?: (date: Date | undefined) => void;
12
- placeholder?: string;
13
- } & Omit<react_day_picker0.DayPickerProps & {
14
- buttonVariant?: React.ComponentProps<typeof void 0>["variant"];
15
- }, "onSelect" | "selected" | "mode">, "onSelect" | "selected" | "mode">> & react6.RefAttributes<unknown>>;
9
+ } & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> & react2.RefAttributes<unknown>>;
16
10
  //#endregion
17
- export { DatePicker };
11
+ export { DatePicker$1 as DatePicker };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
2
+ import * as _pixpilot_shadcn_ui8 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/file-upload/file-upload-inline.d.ts
5
5
 
@@ -7,14 +7,14 @@ import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
7
7
  * Formily-connected FileUploadInline component
8
8
  * Automatically connects shadcn FileUploadInline to Formily field state
9
9
  */
10
- declare const FileUploadInline: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui0.FileUploadInlineBaseProps & {
10
+ declare const FileUploadInline: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui8.FileUploadInlineBaseProps & {
11
11
  multiple: true;
12
- value?: _pixpilot_shadcn_ui0.FileMetadata[];
13
- onChange?: _pixpilot_shadcn_ui0.OnChangeMultipleFiles;
14
- } & _pixpilot_shadcn_ui0.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui0.FileUploadInlineBaseProps & {
12
+ value?: _pixpilot_shadcn_ui8.FileMetadata[];
13
+ onChange?: _pixpilot_shadcn_ui8.OnChangeMultipleFiles;
14
+ } & _pixpilot_shadcn_ui8.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui8.FileUploadInlineBaseProps & {
15
15
  multiple?: false;
16
- value?: _pixpilot_shadcn_ui0.FileMetadata | null;
17
- onChange?: _pixpilot_shadcn_ui0.OnChangeSingleFile;
18
- } & _pixpilot_shadcn_ui0.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
16
+ value?: _pixpilot_shadcn_ui8.FileMetadata | null;
17
+ onChange?: _pixpilot_shadcn_ui8.OnChangeSingleFile;
18
+ } & _pixpilot_shadcn_ui8.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
19
19
  //#endregion
20
20
  export { FileUploadInline };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as _pixpilot_shadcn_ui8 from "@pixpilot/shadcn-ui";
2
+ import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/file-upload/file-upload.d.ts
5
5
 
@@ -7,14 +7,14 @@ import * as _pixpilot_shadcn_ui8 from "@pixpilot/shadcn-ui";
7
7
  * Formily-connected FileUploadInline component
8
8
  * Automatically connects shadcn FileUploadInline to Formily field state
9
9
  */
10
- declare const FileUpload: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui8.FileUploadInlineBaseProps & {
10
+ declare const FileUpload: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui0.FileUploadInlineBaseProps & {
11
11
  multiple: true;
12
- value?: _pixpilot_shadcn_ui8.FileMetadata[];
13
- onChange?: _pixpilot_shadcn_ui8.OnChangeMultipleFiles;
14
- } & _pixpilot_shadcn_ui8.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui8.FileUploadInlineBaseProps & {
12
+ value?: _pixpilot_shadcn_ui0.FileMetadata[];
13
+ onChange?: _pixpilot_shadcn_ui0.OnChangeMultipleFiles;
14
+ } & _pixpilot_shadcn_ui0.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui0.FileUploadInlineBaseProps & {
15
15
  multiple?: false;
16
- value?: _pixpilot_shadcn_ui8.FileMetadata | null;
17
- onChange?: _pixpilot_shadcn_ui8.OnChangeSingleFile;
18
- } & _pixpilot_shadcn_ui8.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
16
+ value?: _pixpilot_shadcn_ui0.FileMetadata | null;
17
+ onChange?: _pixpilot_shadcn_ui0.OnChangeSingleFile;
18
+ } & _pixpilot_shadcn_ui0.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
19
19
  //#endregion
20
20
  export { FileUpload };
@@ -11,9 +11,9 @@ pretty_bytes = require_rolldown_runtime.__toESM(pretty_bytes);
11
11
  //#region src/components/file-upload/use-file-upload-feedback.ts
12
12
  function useFileUploadFeedback(props) {
13
13
  const { onUpload: onUploadProp, maxSize: maxSizeProp, onFilesReject, onFileValidate } = props;
14
- const { config } = require_use_form_context.useFormContext();
14
+ const { settings } = require_use_form_context.useFormContext();
15
15
  const field = (0, __formily_react.useField)();
16
- const { fileUpload } = config || {};
16
+ const { fileUpload } = settings || {};
17
17
  const onUpload = onUploadProp ?? fileUpload?.onUpload;
18
18
  const maxSize = maxSizeProp ?? fileUpload?.maxSize;
19
19
  if (onUpload == null) {
@@ -7,9 +7,9 @@ import prettyBytes from "pretty-bytes";
7
7
  //#region src/components/file-upload/use-file-upload-feedback.ts
8
8
  function useFileUploadFeedback(props) {
9
9
  const { onUpload: onUploadProp, maxSize: maxSizeProp, onFilesReject, onFileValidate } = props;
10
- const { config } = useFormContext();
10
+ const { settings } = useFormContext();
11
11
  const field = useField();
12
- const { fileUpload } = config || {};
12
+ const { fileUpload } = settings || {};
13
13
  const onUpload = onUploadProp ?? fileUpload?.onUpload;
14
14
  const maxSize = maxSizeProp ?? fileUpload?.maxSize;
15
15
  if (onUpload == null) throw new Error("onUpload prop required for FileUploadInline. Provide handler on form or field props.");
@@ -12,11 +12,8 @@ __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
12
12
  //#region src/components/form-items-container.tsx
13
13
  const FormItemContainer = (props) => {
14
14
  const { as: Component = "div", className,...rest } = props;
15
- const { density, responsive } = require_use_form_context.useFormContext();
16
- const spaceClass = require_resolve_responsive_space.resolveResponsiveSpaceClass({
17
- density,
18
- responsive
19
- });
15
+ const { density } = require_use_form_context.useFormContext();
16
+ const spaceClass = require_resolve_responsive_space.resolveResponsiveSpaceClass({ density });
20
17
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, {
21
18
  ...rest,
22
19
  className: (0, __pixpilot_shadcn.cn)(spaceClass, className)
@@ -8,11 +8,8 @@ import { cn } from "@pixpilot/shadcn";
8
8
  //#region src/components/form-items-container.tsx
9
9
  const FormItemContainer = (props) => {
10
10
  const { as: Component = "div", className,...rest } = props;
11
- const { density, responsive } = useFormContext();
12
- const spaceClass = resolveResponsiveSpaceClass({
13
- density,
14
- responsive
15
- });
11
+ const { density } = useFormContext();
12
+ const spaceClass = resolveResponsiveSpaceClass({ density });
16
13
  return /* @__PURE__ */ jsx(Component, {
17
14
  ...rest,
18
15
  className: cn(spaceClass, className)
@@ -15,7 +15,7 @@ __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
15
15
  /**
16
16
  * Form component - wraps FormProvider and provides form context
17
17
  */
18
- function Form({ form, className, style, children, onSubmit, onAutoSubmit, itemProps, objectContainerProps, density, responsive, config }) {
18
+ function Form({ form, className, style, children, onSubmit, onAutoSubmit, itemProps, objectContainerProps, density, settings }) {
19
19
  const handleSubmit = (e) => {
20
20
  e.preventDefault();
21
21
  form.submit((values) => {
@@ -29,15 +29,13 @@ function Form({ form, className, style, children, onSubmit, onAutoSubmit, itemPr
29
29
  itemProps,
30
30
  objectContainerProps,
31
31
  density,
32
- responsive,
33
- config
32
+ settings
34
33
  };
35
34
  }, [
36
35
  itemProps,
37
36
  objectContainerProps,
38
37
  density,
39
- responsive,
40
- config
38
+ settings
41
39
  ]),
42
40
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__formily_react.FormProvider, {
43
41
  form,
@@ -26,8 +26,7 @@ declare function Form$1({
26
26
  itemProps,
27
27
  objectContainerProps,
28
28
  density,
29
- responsive,
30
- config
29
+ settings
31
30
  }: IFormProps): react_jsx_runtime0.JSX.Element;
32
31
  //#endregion
33
32
  export { Form$1 as Form };
@@ -26,8 +26,7 @@ declare function Form$1({
26
26
  itemProps,
27
27
  objectContainerProps,
28
28
  density,
29
- responsive,
30
- config
29
+ settings
31
30
  }: IFormProps): react_jsx_runtime0.JSX.Element;
32
31
  //#endregion
33
32
  export { Form$1 as Form };
@@ -10,7 +10,7 @@ import { cn } from "@pixpilot/shadcn";
10
10
  /**
11
11
  * Form component - wraps FormProvider and provides form context
12
12
  */
13
- function Form({ form, className, style, children, onSubmit, onAutoSubmit, itemProps, objectContainerProps, density, responsive, config }) {
13
+ function Form({ form, className, style, children, onSubmit, onAutoSubmit, itemProps, objectContainerProps, density, settings }) {
14
14
  const handleSubmit = (e) => {
15
15
  e.preventDefault();
16
16
  form.submit((values) => {
@@ -24,15 +24,13 @@ function Form({ form, className, style, children, onSubmit, onAutoSubmit, itemPr
24
24
  itemProps,
25
25
  objectContainerProps,
26
26
  density,
27
- responsive,
28
- config
27
+ settings
29
28
  };
30
29
  }, [
31
30
  itemProps,
32
31
  objectContainerProps,
33
32
  density,
34
- responsive,
35
- config
33
+ settings
36
34
  ]),
37
35
  children: /* @__PURE__ */ jsx(FormProvider, {
38
36
  form,
@@ -11,8 +11,8 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
11
11
  //#region src/components/icon-picker.tsx
12
12
  const IconPickerBase = (props) => {
13
13
  const { providers: propProviders,...restProps } = props;
14
- const { config } = require_use_form_context.useFormContext();
15
- const { iconPicker } = config || {};
14
+ const { settings } = require_use_form_context.useFormContext();
15
+ const { iconPicker } = settings || {};
16
16
  const { providers: contextProviders = [] } = iconPicker || {};
17
17
  const providersToLoad = propProviders !== void 0 ? propProviders : contextProviders;
18
18
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.IconPicker, {
@@ -1,4 +1,4 @@
1
- import * as react8 from "react";
1
+ import * as react4 from "react";
2
2
  import { IconPickerProps, IconProviderProps } from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/icon-picker.d.ts
@@ -8,8 +8,8 @@ import { IconPickerProps, IconProviderProps } from "@pixpilot/shadcn-ui";
8
8
  * Automatically connects to Formily field state
9
9
  * Supports both static and async icon providers
10
10
  */
11
- declare const IconPicker$1: react8.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
11
+ declare const IconPicker$1: react4.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
12
12
  providers?: IconProviderProps[];
13
- }> & react8.RefAttributes<unknown>>;
13
+ }> & react4.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { IconPicker$1 as IconPicker };
@@ -7,8 +7,8 @@ import { jsx } from "react/jsx-runtime";
7
7
  //#region src/components/icon-picker.tsx
8
8
  const IconPickerBase = (props) => {
9
9
  const { providers: propProviders,...restProps } = props;
10
- const { config } = useFormContext();
11
- const { iconPicker } = config || {};
10
+ const { settings } = useFormContext();
11
+ const { iconPicker } = settings || {};
12
12
  const { providers: contextProviders = [] } = iconPicker || {};
13
13
  const providersToLoad = propProviders !== void 0 ? propProviders : contextProviders;
14
14
  return /* @__PURE__ */ jsx(IconPicker, {
@@ -1,4 +1,4 @@
1
- import * as react6 from "react";
1
+ import * as react10 from "react";
2
2
 
3
3
  //#region src/components/input.d.ts
4
4
 
@@ -6,6 +6,6 @@ import * as react6 from "react";
6
6
  * Formily-connected Input component
7
7
  * Automatically connects shadcn Input to Formily field state
8
8
  */
9
- declare const Input: react6.ForwardRefExoticComponent<Omit<Partial<react6.ClassAttributes<HTMLInputElement> & react6.InputHTMLAttributes<HTMLInputElement>>, "ref"> & react6.RefAttributes<unknown>>;
9
+ declare const Input: react10.ForwardRefExoticComponent<Omit<Partial<react10.ClassAttributes<HTMLInputElement> & react10.InputHTMLAttributes<HTMLInputElement>>, "ref"> & react10.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Input };