@pixpilot/formily-shadcn 0.21.10 → 0.22.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 (32) hide show
  1. package/dist/components/array-base/components/empty.cjs +1 -1
  2. package/dist/components/array-base/components/empty.js +1 -1
  3. package/dist/components/checkbox.d.ts +2 -2
  4. package/dist/components/date-picker.d.cts +3 -3
  5. package/dist/components/date-picker.d.ts +3 -3
  6. package/dist/components/file-upload/file-upload.d.cts +8 -8
  7. package/dist/components/form-grid.d.cts +2 -2
  8. package/dist/components/form.d.cts +2 -2
  9. package/dist/components/icon-picker.d.cts +3 -3
  10. package/dist/components/icon-picker.d.ts +3 -3
  11. package/dist/components/input.d.cts +3 -3
  12. package/dist/components/input.d.ts +3 -3
  13. package/dist/components/number/number-input.d.ts +3 -3
  14. package/dist/components/object-container.cjs +5 -4
  15. package/dist/components/object-container.d.cts +12 -6
  16. package/dist/components/object-container.d.ts +12 -6
  17. package/dist/components/object-container.js +5 -4
  18. package/dist/components/radio.d.cts +2 -2
  19. package/dist/components/schema-field/schema-field-basics.d.cts +233 -233
  20. package/dist/components/schema-field/schema-field-basics.d.ts +232 -232
  21. package/dist/components/schema-field/schema-field-extended.d.cts +265 -265
  22. package/dist/components/schema-field/schema-field-extended.d.ts +397 -397
  23. package/dist/components/schema-field/schema-field.d.cts +310 -310
  24. package/dist/components/schema-field/schema-field.d.ts +309 -309
  25. package/dist/components/slider/slider-input.d.ts +3 -3
  26. package/dist/components/slider/slider-select.d.cts +3 -3
  27. package/dist/components/slider/slider-select.d.ts +3 -3
  28. package/dist/components/slider/slider.d.ts +3 -3
  29. package/dist/components/switch.d.ts +2 -2
  30. package/dist/components/tags-input-inline.d.ts +2 -2
  31. package/dist/components/textarea.d.ts +2 -2
  32. package/package.json +4 -4
@@ -11,7 +11,7 @@ function ArrayEmpty({ ref,...props }) {
11
11
  ref,
12
12
  className: "py-4 text-center text-sm text-foreground/50",
13
13
  ...rest,
14
- children: children ?? title ?? "No Data"
14
+ children: children ?? title ?? "No items"
15
15
  });
16
16
  }
17
17
 
@@ -8,7 +8,7 @@ function ArrayEmpty({ ref,...props }) {
8
8
  ref,
9
9
  className: "py-4 text-center text-sm text-foreground/50",
10
10
  ...rest,
11
- children: children ?? title ?? "No Data"
11
+ children: children ?? title ?? "No items"
12
12
  });
13
13
  }
14
14
 
@@ -1,4 +1,4 @@
1
- import * as react1 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: react1.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_checkbox0.CheckboxProps & react1.RefAttributes<HTMLButtonElement>>, "ref"> & react1.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 };
@@ -1,11 +1,11 @@
1
- import * as react8 from "react";
1
+ import * as react2 from "react";
2
2
  import { DatePickerProps } from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/date-picker.d.ts
5
- declare const DatePicker: react8.ForwardRefExoticComponent<Partial<{
5
+ declare const DatePicker: react2.ForwardRefExoticComponent<Partial<{
6
6
  value?: Date;
7
7
  onChange?: (date: Date | undefined) => void;
8
8
  placeholder?: string;
9
- } & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> & react8.RefAttributes<unknown>>;
9
+ } & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> & react2.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { DatePicker };
@@ -1,11 +1,11 @@
1
- import * as react4 from "react";
1
+ import * as react2 from "react";
2
2
  import { DatePickerProps } from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/date-picker.d.ts
5
- declare const DatePicker$1: react4.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<DatePickerProps, "onSelect" | "selected" | "mode">> & react4.RefAttributes<unknown>>;
9
+ } & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> & react2.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { DatePicker$1 as DatePicker };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as _pixpilot_shadcn_ui294 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.d.ts
5
5
 
@@ -7,14 +7,14 @@ import * as _pixpilot_shadcn_ui294 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_ui294.FileUploadInlineBaseProps & {
10
+ declare const FileUpload: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui8.FileUploadInlineBaseProps & {
11
11
  multiple: true;
12
- value?: _pixpilot_shadcn_ui294.FileMetadata[];
13
- onChange?: _pixpilot_shadcn_ui294.OnChangeMultipleFiles;
14
- } & _pixpilot_shadcn_ui294.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui294.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_ui294.FileMetadata | null;
17
- onChange?: _pixpilot_shadcn_ui294.OnChangeSingleFile;
18
- } & _pixpilot_shadcn_ui294.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 { FileUpload };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime1 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/form-grid.d.ts
5
5
  interface IFormGridProps extends React.HTMLAttributes<HTMLDivElement> {}
@@ -7,6 +7,6 @@ declare function FormGrid({
7
7
  className,
8
8
  children,
9
9
  ...rest
10
- }: IFormGridProps): react_jsx_runtime1.JSX.Element;
10
+ }: IFormGridProps): react_jsx_runtime0.JSX.Element;
11
11
  //#endregion
12
12
  export { FormGrid };
@@ -2,7 +2,7 @@ import { FormContextStates } from "./context/form-context.cjs";
2
2
  import "./context/index.cjs";
3
3
  import React from "react";
4
4
  import { Form } from "@formily/core";
5
- import * as react_jsx_runtime2 from "react/jsx-runtime";
5
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/form.d.ts
8
8
  interface IFormProps extends FormContextStates {
@@ -25,6 +25,6 @@ declare function Form$1({
25
25
  onAutoSubmit,
26
26
  layout,
27
27
  settings
28
- }: IFormProps): react_jsx_runtime2.JSX.Element;
28
+ }: IFormProps): react_jsx_runtime1.JSX.Element;
29
29
  //#endregion
30
30
  export { Form$1 as Form };
@@ -1,4 +1,4 @@
1
- import * as react6 from "react";
1
+ import * as react8 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: react6.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
11
+ declare const IconPicker: react8.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
12
12
  providers?: IconProviderProps[];
13
- }> & react6.RefAttributes<unknown>>;
13
+ }> & react8.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { IconPicker };
@@ -1,4 +1,4 @@
1
- import * as react0 from "react";
1
+ import * as react8 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: react0.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
11
+ declare const IconPicker$1: react8.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
12
12
  providers?: IconProviderProps[];
13
- }> & react0.RefAttributes<unknown>>;
13
+ }> & react8.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { IconPicker$1 as IconPicker };
@@ -1,4 +1,4 @@
1
- import * as react2 from "react";
1
+ import * as react4 from "react";
2
2
 
3
3
  //#region src/components/input.d.ts
4
4
 
@@ -6,12 +6,12 @@ import * as react2 from "react";
6
6
  * Formily-connected Input component
7
7
  * Automatically connects shadcn Input to Formily field state
8
8
  */
9
- declare const Input: react2.ForwardRefExoticComponent<Omit<Partial<react2.ClassAttributes<HTMLInputElement> & react2.InputHTMLAttributes<HTMLInputElement> & {
9
+ declare const Input: react4.ForwardRefExoticComponent<Omit<Partial<react4.ClassAttributes<HTMLInputElement> & react4.InputHTMLAttributes<HTMLInputElement> & {
10
10
  prefix?: React.ReactNode;
11
11
  suffix?: React.ReactNode;
12
12
  groupClassName?: string;
13
13
  prefixClassName?: string;
14
14
  suffixClassName?: string;
15
- }>, "ref"> & react2.RefAttributes<unknown>>;
15
+ }>, "ref"> & react4.RefAttributes<unknown>>;
16
16
  //#endregion
17
17
  export { Input };
@@ -1,4 +1,4 @@
1
- import * as react6 from "react";
1
+ import * as react4 from "react";
2
2
 
3
3
  //#region src/components/input.d.ts
4
4
 
@@ -6,12 +6,12 @@ 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> & {
9
+ declare const Input: react4.ForwardRefExoticComponent<Omit<Partial<react4.ClassAttributes<HTMLInputElement> & react4.InputHTMLAttributes<HTMLInputElement> & {
10
10
  prefix?: React.ReactNode;
11
11
  suffix?: React.ReactNode;
12
12
  groupClassName?: string;
13
13
  prefixClassName?: string;
14
14
  suffixClassName?: string;
15
- }>, "ref"> & react6.RefAttributes<unknown>>;
15
+ }>, "ref"> & react4.RefAttributes<unknown>>;
16
16
  //#endregion
17
17
  export { Input };
@@ -1,15 +1,15 @@
1
- import * as react1509 from "react";
1
+ import * as react24 from "react";
2
2
 
3
3
  //#region src/components/number/number-input.d.ts
4
4
  /**
5
5
  * Formily-connected Number Input component
6
6
  */
7
- declare const NumberInput: react1509.ForwardRefExoticComponent<Omit<Partial<react1509.ClassAttributes<HTMLInputElement> & react1509.InputHTMLAttributes<HTMLInputElement> & {
7
+ declare const NumberInput: react24.ForwardRefExoticComponent<Omit<Partial<react24.ClassAttributes<HTMLInputElement> & react24.InputHTMLAttributes<HTMLInputElement> & {
8
8
  prefix?: React.ReactNode;
9
9
  suffix?: React.ReactNode;
10
10
  groupClassName?: string;
11
11
  prefixClassName?: string;
12
12
  suffixClassName?: string;
13
- }>, "ref"> & react1509.RefAttributes<unknown>>;
13
+ }>, "ref"> & react24.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { NumberInput };
@@ -35,9 +35,10 @@ const cardPaddingConfig = {
35
35
  },
36
36
  responsive: "py-5 md:py-6 lg:py-7"
37
37
  };
38
- const ObjectContainer = ({ className, children, label, description, slotProps,...rest }) => {
38
+ const ObjectContainer = ({ className, children, label, description, variant = "grouped", slotProps,...rest }) => {
39
39
  const effectiveLabel = require_use_label.useLabel(label);
40
40
  const desc = require_use_description.useDescription(description);
41
+ const isFlat = variant === "flat";
41
42
  const { layout } = require_use_form_context.useFormContext();
42
43
  const { objectContainer, density } = layout || {};
43
44
  const gapClass = require_resolve_responsive_space.resolveResponsiveGapClass({ density });
@@ -72,10 +73,10 @@ const ObjectContainer = ({ className, children, label, description, slotProps,..
72
73
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Card, {
73
74
  ...mergedCardProps,
74
75
  ...rest,
75
- className: (0, __pixpilot_shadcn.cn)("form-object-card", "bg-transparent", gapClass, cardPaddingClass, className, mergedCardProps.className),
76
+ className: (0, __pixpilot_shadcn.cn)("form-object-card", "bg-transparent", gapClass, cardPaddingClass, isFlat && "border-0 shadow-none !py-0", className, mergedCardProps.className),
76
77
  children: [(effectiveLabel != null || desc != null) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.CardHeader, {
77
78
  ...mergedHeaderProps,
78
- className: (0, __pixpilot_shadcn.cn)("form-object-header", headerGapClass, mergedHeaderProps.className),
79
+ className: (0, __pixpilot_shadcn.cn)("form-object-header", headerGapClass, mergedHeaderProps.className, isFlat && "px-0"),
79
80
  children: [effectiveLabel != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.CardTitle, {
80
81
  ...mergedTitleProps,
81
82
  className: (0, __pixpilot_shadcn.cn)("form-object-title", mergedTitleProps.className),
@@ -88,7 +89,7 @@ const ObjectContainer = ({ className, children, label, description, slotProps,..
88
89
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_form_items_container.FormItemContainer, {
89
90
  ...mergedContentProps,
90
91
  as: __pixpilot_shadcn.CardContent,
91
- className: (0, __pixpilot_shadcn.cn)("form-object-content", mergedContentProps.className),
92
+ className: (0, __pixpilot_shadcn.cn)("form-object-content", mergedContentProps.className, isFlat && "px-0"),
92
93
  children
93
94
  })]
94
95
  });
@@ -1,16 +1,22 @@
1
1
  import { SyncReactNode } from "../types/react.cjs";
2
- import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@pixpilot/shadcn";
3
2
 
4
3
  //#region src/components/object-container.d.ts
4
+ type ObjectContainerVariant = 'grouped' | 'flat';
5
5
  interface ObjectContainerProps extends React.ComponentProps<'div'> {
6
6
  label?: SyncReactNode;
7
7
  description?: SyncReactNode;
8
+ /**
9
+ * Visual style variant.
10
+ * - `grouped`: Card has padding, creating a visually distinct group (default)
11
+ * - `flat`: No horizontal padding - fields align flush with surrounding form
12
+ */
13
+ variant?: ObjectContainerVariant;
8
14
  slotProps?: {
9
- card?: React.ComponentProps<typeof Card>;
10
- header?: React.ComponentProps<typeof CardHeader>;
11
- title?: React.ComponentProps<typeof CardTitle>;
12
- description?: React.ComponentProps<typeof CardDescription>;
13
- content?: React.ComponentProps<typeof CardContent>;
15
+ card?: React.ComponentProps<'div'>;
16
+ header?: React.ComponentProps<'div'>;
17
+ title?: React.ComponentProps<'div'>;
18
+ description?: React.ComponentProps<'div'>;
19
+ content?: React.ComponentProps<'div'>;
14
20
  };
15
21
  }
16
22
  //#endregion
@@ -1,16 +1,22 @@
1
1
  import { SyncReactNode } from "../types/react.js";
2
- import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@pixpilot/shadcn";
3
2
 
4
3
  //#region src/components/object-container.d.ts
4
+ type ObjectContainerVariant = 'grouped' | 'flat';
5
5
  interface ObjectContainerProps extends React.ComponentProps<'div'> {
6
6
  label?: SyncReactNode;
7
7
  description?: SyncReactNode;
8
+ /**
9
+ * Visual style variant.
10
+ * - `grouped`: Card has padding, creating a visually distinct group (default)
11
+ * - `flat`: No horizontal padding - fields align flush with surrounding form
12
+ */
13
+ variant?: ObjectContainerVariant;
8
14
  slotProps?: {
9
- card?: React.ComponentProps<typeof Card>;
10
- header?: React.ComponentProps<typeof CardHeader>;
11
- title?: React.ComponentProps<typeof CardTitle>;
12
- description?: React.ComponentProps<typeof CardDescription>;
13
- content?: React.ComponentProps<typeof CardContent>;
15
+ card?: React.ComponentProps<'div'>;
16
+ header?: React.ComponentProps<'div'>;
17
+ title?: React.ComponentProps<'div'>;
18
+ description?: React.ComponentProps<'div'>;
19
+ content?: React.ComponentProps<'div'>;
14
20
  };
15
21
  }
16
22
  //#endregion
@@ -32,9 +32,10 @@ const cardPaddingConfig = {
32
32
  },
33
33
  responsive: "py-5 md:py-6 lg:py-7"
34
34
  };
35
- const ObjectContainer = ({ className, children, label, description, slotProps,...rest }) => {
35
+ const ObjectContainer = ({ className, children, label, description, variant = "grouped", slotProps,...rest }) => {
36
36
  const effectiveLabel = useLabel(label);
37
37
  const desc = useDescription(description);
38
+ const isFlat = variant === "flat";
38
39
  const { layout } = useFormContext();
39
40
  const { objectContainer, density } = layout || {};
40
41
  const gapClass = resolveResponsiveGapClass({ density });
@@ -69,10 +70,10 @@ const ObjectContainer = ({ className, children, label, description, slotProps,..
69
70
  return /* @__PURE__ */ jsxs(Card, {
70
71
  ...mergedCardProps,
71
72
  ...rest,
72
- className: cn("form-object-card", "bg-transparent", gapClass, cardPaddingClass, className, mergedCardProps.className),
73
+ className: cn("form-object-card", "bg-transparent", gapClass, cardPaddingClass, isFlat && "border-0 shadow-none !py-0", className, mergedCardProps.className),
73
74
  children: [(effectiveLabel != null || desc != null) && /* @__PURE__ */ jsxs(CardHeader, {
74
75
  ...mergedHeaderProps,
75
- className: cn("form-object-header", headerGapClass, mergedHeaderProps.className),
76
+ className: cn("form-object-header", headerGapClass, mergedHeaderProps.className, isFlat && "px-0"),
76
77
  children: [effectiveLabel != null && /* @__PURE__ */ jsx(CardTitle, {
77
78
  ...mergedTitleProps,
78
79
  className: cn("form-object-title", mergedTitleProps.className),
@@ -85,7 +86,7 @@ const ObjectContainer = ({ className, children, label, description, slotProps,..
85
86
  }), /* @__PURE__ */ jsx(FormItemContainer, {
86
87
  ...mergedContentProps,
87
88
  as: CardContent,
88
- className: cn("form-object-content", mergedContentProps.className),
89
+ className: cn("form-object-content", mergedContentProps.className, isFlat && "px-0"),
89
90
  children
90
91
  })]
91
92
  });
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
3
  import { RadioGroup } from "@pixpilot/shadcn";
4
4
 
5
5
  //#region src/components/radio.d.ts
@@ -15,7 +15,7 @@ type RadioProps = {
15
15
  /**
16
16
  * Radio component with options rendering
17
17
  */
18
- declare function Radio(props: RadioProps): react_jsx_runtime0.JSX.Element;
18
+ declare function Radio(props: RadioProps): react_jsx_runtime2.JSX.Element;
19
19
  declare namespace Radio {
20
20
  var displayName: string;
21
21
  }