@pixpilot/formily-shadcn 1.3.0 → 1.4.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 (42) hide show
  1. package/dist/components/Checkbox.d.cts +2 -2
  2. package/dist/components/Checkbox.d.ts +2 -2
  3. package/dist/components/Column.d.cts +2 -2
  4. package/dist/components/DatePicker.d.cts +3 -3
  5. package/dist/components/DatePicker.d.ts +3 -3
  6. package/dist/components/FormGrid.d.cts +2 -2
  7. package/dist/components/FormGrid.d.ts +2 -2
  8. package/dist/components/IconPicker.d.ts +3 -3
  9. package/dist/components/IconToggle.d.ts +3 -3
  10. package/dist/components/Input.d.cts +3 -3
  11. package/dist/components/Input.d.ts +3 -3
  12. package/dist/components/Radio.d.ts +2 -2
  13. package/dist/components/Rating.d.cts +4 -4
  14. package/dist/components/Rating.d.ts +4 -4
  15. package/dist/components/Row.d.ts +2 -2
  16. package/dist/components/Separator.d.cts +2 -2
  17. package/dist/components/Separator.d.ts +2 -2
  18. package/dist/components/Switch.d.cts +2 -2
  19. package/dist/components/Switch.d.ts +2 -2
  20. package/dist/components/TagsInputInline.d.cts +2 -2
  21. package/dist/components/TagsInputInline.d.ts +3 -3
  22. package/dist/components/Textarea.d.cts +2 -2
  23. package/dist/components/Textarea.d.ts +2 -2
  24. package/dist/components/ToggleButton.d.cts +2 -2
  25. package/dist/components/ToggleButton.d.ts +3 -3
  26. package/dist/components/ToggleGroup.cjs +42 -16
  27. package/dist/components/ToggleGroup.d.cts +4 -3
  28. package/dist/components/ToggleGroup.d.ts +4 -3
  29. package/dist/components/ToggleGroup.js +42 -16
  30. package/dist/components/form-item/BaseFormItem.cjs +5 -0
  31. package/dist/components/form-item/BaseFormItem.js +5 -0
  32. package/dist/components/number/NumberInput.d.ts +3 -3
  33. package/dist/components/schema-field/schema-field-basics.d.cts +11 -11
  34. package/dist/components/schema-field/schema-field-basics.d.ts +303 -303
  35. package/dist/components/schema-field/schema-field-extended.d.cts +11 -11
  36. package/dist/components/schema-field/schema-field-extended.d.ts +633 -633
  37. package/dist/components/schema-field/schema-field.d.cts +11 -11
  38. package/dist/components/schema-field/schema-field.d.ts +397 -397
  39. package/dist/components/slider/Slider.d.ts +3 -3
  40. package/dist/components/slider/SliderInput.d.ts +2 -2
  41. package/dist/components/slider/SliderSelect.d.ts +3 -3
  42. package/package.json +2 -2
@@ -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,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,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/Column.d.ts
5
5
  interface IColumnProps {
@@ -36,6 +36,6 @@ interface IColumnProps {
36
36
  declare function Column({
37
37
  className,
38
38
  children
39
- }: IColumnProps): react_jsx_runtime1.JSX.Element;
39
+ }: IColumnProps): react_jsx_runtime0.JSX.Element;
40
40
  //#endregion
41
41
  export { Column };
@@ -1,11 +1,11 @@
1
- import * as react0 from "react";
1
+ import * as react2 from "react";
2
2
  import { DatePickerProps } from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/DatePicker.d.ts
5
- declare const DatePicker: react0.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">> & react0.RefAttributes<unknown>>;
9
+ } & Omit<DatePickerProps, "selected" | "onSelect" | "mode">> & react2.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { DatePicker };
@@ -1,11 +1,11 @@
1
- import * as react2 from "react";
1
+ import * as react0 from "react";
2
2
  import { DatePickerProps } from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/DatePicker.d.ts
5
- declare const DatePicker$1: react2.ForwardRefExoticComponent<Partial<{
5
+ declare const DatePicker$1: react0.ForwardRefExoticComponent<Partial<{
6
6
  value?: Date;
7
7
  onChange?: (date: Date | undefined) => void;
8
8
  placeholder?: string;
9
- } & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> & react2.RefAttributes<unknown>>;
9
+ } & Omit<DatePickerProps, "selected" | "onSelect" | "mode">> & react0.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 react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/FormGrid.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_runtime0.JSX.Element;
10
+ }: IFormGridProps): react_jsx_runtime1.JSX.Element;
11
11
  //#endregion
12
12
  export { FormGrid };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/FormGrid.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_runtime0.JSX.Element;
10
+ }: IFormGridProps): react_jsx_runtime2.JSX.Element;
11
11
  //#endregion
12
12
  export { FormGrid };
@@ -1,4 +1,4 @@
1
- import * as react8 from "react";
1
+ import * as react13 from "react";
2
2
  import { IconPickerProps, IconProviderProps } from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/IconPicker.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: react13.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
12
12
  providers?: IconProviderProps[];
13
- }> & react8.RefAttributes<unknown>>;
13
+ }> & react13.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { IconPicker$1 as IconPicker };
@@ -1,11 +1,11 @@
1
- import * as react10 from "react";
2
- import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
1
+ import * as react21 from "react";
2
+ import * as _pixpilot_shadcn_ui1 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/IconToggle.d.ts
5
5
  /**
6
6
  * Formily-connected IconToggle component
7
7
  * Toggle button with customizable icons for boolean values
8
8
  */
9
- declare const IconToggle$1: react10.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui0.IconToggleProps, "ref"> & react10.RefAttributes<HTMLButtonElement>>, "ref"> & react10.RefAttributes<unknown>>;
9
+ declare const IconToggle$1: react21.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui1.IconToggleProps, "ref"> & react21.RefAttributes<HTMLButtonElement>>, "ref"> & react21.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { IconToggle$1 as IconToggle };
@@ -1,4 +1,4 @@
1
- import * as react9 from "react";
1
+ import * as react12 from "react";
2
2
 
3
3
  //#region src/components/Input.d.ts
4
4
 
@@ -6,12 +6,12 @@ import * as react9 from "react";
6
6
  * Formily-connected Input component
7
7
  * Automatically connects shadcn Input to Formily field state
8
8
  */
9
- declare const Input: react9.ForwardRefExoticComponent<Omit<Partial<react9.ClassAttributes<HTMLInputElement> & react9.InputHTMLAttributes<HTMLInputElement> & {
9
+ declare const Input: react12.ForwardRefExoticComponent<Omit<Partial<react12.ClassAttributes<HTMLInputElement> & react12.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"> & react9.RefAttributes<unknown>>;
15
+ }>, "ref"> & react12.RefAttributes<unknown>>;
16
16
  //#endregion
17
17
  export { Input };
@@ -1,4 +1,4 @@
1
- import * as react4 from "react";
1
+ import * as react27 from "react";
2
2
 
3
3
  //#region src/components/Input.d.ts
4
4
 
@@ -6,12 +6,12 @@ import * as react4 from "react";
6
6
  * Formily-connected Input component
7
7
  * Automatically connects shadcn Input to Formily field state
8
8
  */
9
- declare const Input: react4.ForwardRefExoticComponent<Omit<Partial<react4.ClassAttributes<HTMLInputElement> & react4.InputHTMLAttributes<HTMLInputElement> & {
9
+ declare const Input: react27.ForwardRefExoticComponent<Omit<Partial<react27.ClassAttributes<HTMLInputElement> & react27.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"> & react4.RefAttributes<unknown>>;
15
+ }>, "ref"> & react27.RefAttributes<unknown>>;
16
16
  //#endregion
17
17
  export { Input };
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- import * as react_jsx_runtime2 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime4 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_runtime2.JSX.Element;
18
+ declare function Radio(props: RadioProps): react_jsx_runtime4.JSX.Element;
19
19
  declare namespace Radio {
20
20
  var displayName: string;
21
21
  }
@@ -1,4 +1,4 @@
1
- import * as react13 from "react";
1
+ import * as react9 from "react";
2
2
  import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/Rating.d.ts
@@ -6,8 +6,8 @@ import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
6
6
  * Formily-connected Rating component
7
7
  * Automatically connects shadcn-ui Rating to Formily field state
8
8
  */
9
- declare const Rating: react13.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.RatingProps & {
10
- children?: react13.ReactNode | undefined;
11
- }> & react13.RefAttributes<unknown>>;
9
+ declare const Rating: react9.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.RatingProps & {
10
+ children?: react9.ReactNode | undefined;
11
+ }> & react9.RefAttributes<unknown>>;
12
12
  //#endregion
13
13
  export { Rating };
@@ -1,4 +1,4 @@
1
- import * as react13 from "react";
1
+ import * as react4 from "react";
2
2
  import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/Rating.d.ts
@@ -6,8 +6,8 @@ import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
6
6
  * Formily-connected Rating component
7
7
  * Automatically connects shadcn-ui Rating to Formily field state
8
8
  */
9
- declare const Rating$1: react13.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.RatingProps & {
10
- children?: react13.ReactNode | undefined;
11
- }> & react13.RefAttributes<unknown>>;
9
+ declare const Rating$1: react4.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.RatingProps & {
10
+ children?: react4.ReactNode | undefined;
11
+ }> & react4.RefAttributes<unknown>>;
12
12
  //#endregion
13
13
  export { Rating$1 as Rating };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/Row.d.ts
5
5
  interface IRowProps {
@@ -36,6 +36,6 @@ interface IRowProps {
36
36
  declare function Row({
37
37
  className,
38
38
  children
39
- }: IRowProps): react_jsx_runtime3.JSX.Element;
39
+ }: IRowProps): react_jsx_runtime0.JSX.Element;
40
40
  //#endregion
41
41
  export { Row };
@@ -1,4 +1,4 @@
1
- import * as react16 from "react";
1
+ import * as react25 from "react";
2
2
  import * as _radix_ui_react_separator0 from "@radix-ui/react-separator";
3
3
 
4
4
  //#region src/components/Separator.d.ts
@@ -6,6 +6,6 @@ import * as _radix_ui_react_separator0 from "@radix-ui/react-separator";
6
6
  * Formily-connected Separator component
7
7
  * A visual divider for content sections
8
8
  */
9
- declare const Separator: react16.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react16.RefAttributes<HTMLDivElement>>, "ref"> & react16.RefAttributes<unknown>>;
9
+ declare const Separator: react25.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react25.RefAttributes<HTMLDivElement>>, "ref"> & react25.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Separator };
@@ -1,4 +1,4 @@
1
- import * as react16 from "react";
1
+ import * as react7 from "react";
2
2
  import * as _radix_ui_react_separator0 from "@radix-ui/react-separator";
3
3
 
4
4
  //#region src/components/Separator.d.ts
@@ -6,6 +6,6 @@ import * as _radix_ui_react_separator0 from "@radix-ui/react-separator";
6
6
  * Formily-connected Separator component
7
7
  * A visual divider for content sections
8
8
  */
9
- declare const Separator: react16.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react16.RefAttributes<HTMLDivElement>>, "ref"> & react16.RefAttributes<unknown>>;
9
+ declare const Separator: react7.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react7.RefAttributes<HTMLDivElement>>, "ref"> & react7.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Separator };
@@ -1,4 +1,4 @@
1
- import * as react21 from "react";
1
+ import * as react22 from "react";
2
2
  import * as _radix_ui_react_switch0 from "@radix-ui/react-switch";
3
3
 
4
4
  //#region src/components/Switch.d.ts
@@ -6,6 +6,6 @@ import * as _radix_ui_react_switch0 from "@radix-ui/react-switch";
6
6
  * Formily-connected Switch component
7
7
  * Toggle switch for boolean values
8
8
  */
9
- declare const Switch: react21.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react21.RefAttributes<HTMLButtonElement>>, "ref"> & react21.RefAttributes<unknown>>;
9
+ declare const Switch: react22.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react22.RefAttributes<HTMLButtonElement>>, "ref"> & react22.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Switch };
@@ -1,4 +1,4 @@
1
- import * as react19 from "react";
1
+ import * as react10 from "react";
2
2
  import * as _radix_ui_react_switch0 from "@radix-ui/react-switch";
3
3
 
4
4
  //#region src/components/Switch.d.ts
@@ -6,6 +6,6 @@ import * as _radix_ui_react_switch0 from "@radix-ui/react-switch";
6
6
  * Formily-connected Switch component
7
7
  * Toggle switch for boolean values
8
8
  */
9
- declare const Switch: react19.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react19.RefAttributes<HTMLButtonElement>>, "ref"> & react19.RefAttributes<unknown>>;
9
+ declare const Switch: react10.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react10.RefAttributes<HTMLButtonElement>>, "ref"> & react10.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Switch };
@@ -1,4 +1,4 @@
1
- import * as react19 from "react";
1
+ import * as react16 from "react";
2
2
  import * as _pixpilot_shadcn_ui1 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/TagsInputInline.d.ts
@@ -10,6 +10,6 @@ import * as _pixpilot_shadcn_ui1 from "@pixpilot/shadcn-ui";
10
10
  * Based on DiceUI's tags-input for inline tag editing with keyboard navigation
11
11
  * and validation support.
12
12
  */
13
- declare const TagsInputInLine: react19.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui1.TagsInputProps> & react19.RefAttributes<unknown>>;
13
+ declare const TagsInputInLine: react16.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui1.TagsInputProps> & react16.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { TagsInputInLine };
@@ -1,5 +1,5 @@
1
- import * as react29 from "react";
2
- import * as _pixpilot_shadcn_ui2 from "@pixpilot/shadcn-ui";
1
+ import * as react15 from "react";
2
+ import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/TagsInputInline.d.ts
5
5
 
@@ -10,6 +10,6 @@ import * as _pixpilot_shadcn_ui2 from "@pixpilot/shadcn-ui";
10
10
  * Based on DiceUI's tags-input for inline tag editing with keyboard navigation
11
11
  * and validation support.
12
12
  */
13
- declare const TagsInputInLine: react29.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui2.TagsInputProps> & react29.RefAttributes<unknown>>;
13
+ declare const TagsInputInLine: react15.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.TagsInputProps> & react15.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { TagsInputInLine };
@@ -1,9 +1,9 @@
1
- import * as react27 from "react";
1
+ import * as react18 from "react";
2
2
 
3
3
  //#region src/components/Textarea.d.ts
4
4
  /**
5
5
  * Formily-connected Textarea component
6
6
  */
7
- declare const Textarea: react27.ForwardRefExoticComponent<Omit<Partial<react27.ClassAttributes<HTMLTextAreaElement> & react27.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react27.RefAttributes<unknown>>;
7
+ declare const Textarea: react18.ForwardRefExoticComponent<Omit<Partial<react18.ClassAttributes<HTMLTextAreaElement> & react18.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react18.RefAttributes<unknown>>;
8
8
  //#endregion
9
9
  export { Textarea };
@@ -1,9 +1,9 @@
1
- import * as react22 from "react";
1
+ import * as react17 from "react";
2
2
 
3
3
  //#region src/components/Textarea.d.ts
4
4
  /**
5
5
  * Formily-connected Textarea component
6
6
  */
7
- declare const Textarea: react22.ForwardRefExoticComponent<Omit<Partial<react22.ClassAttributes<HTMLTextAreaElement> & react22.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react22.RefAttributes<unknown>>;
7
+ declare const Textarea: react17.ForwardRefExoticComponent<Omit<Partial<react17.ClassAttributes<HTMLTextAreaElement> & react17.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react17.RefAttributes<unknown>>;
8
8
  //#endregion
9
9
  export { Textarea };
@@ -1,4 +1,4 @@
1
- import * as react24 from "react";
1
+ import * as react28 from "react";
2
2
  import * as _pixpilot_shadcn_ui2 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/ToggleButton.d.ts
@@ -6,6 +6,6 @@ import * as _pixpilot_shadcn_ui2 from "@pixpilot/shadcn-ui";
6
6
  * Formily-connected IconToggle component
7
7
  * Toggle button with customizable icons for boolean values
8
8
  */
9
- declare const ToggleButton: react24.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui2.ToggleButtonProps, "ref"> & react24.RefAttributes<HTMLButtonElement>>, "ref"> & react24.RefAttributes<unknown>>;
9
+ declare const ToggleButton: react28.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui2.ToggleButtonProps, "ref"> & react28.RefAttributes<HTMLButtonElement>>, "ref"> & react28.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { ToggleButton };
@@ -1,11 +1,11 @@
1
- import * as react26 from "react";
2
- import * as _pixpilot_shadcn_ui1 from "@pixpilot/shadcn-ui";
1
+ import * as react24 from "react";
2
+ import * as _pixpilot_shadcn_ui2 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/ToggleButton.d.ts
5
5
  /**
6
6
  * Formily-connected IconToggle component
7
7
  * Toggle button with customizable icons for boolean values
8
8
  */
9
- declare const ToggleButton$1: react26.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui1.ToggleButtonProps, "ref"> & react26.RefAttributes<HTMLButtonElement>>, "ref"> & react26.RefAttributes<unknown>>;
9
+ declare const ToggleButton$1: react24.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui2.ToggleButtonProps, "ref"> & react24.RefAttributes<HTMLButtonElement>>, "ref"> & react24.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { ToggleButton$1 as ToggleButton };
@@ -31,23 +31,53 @@ function coerceOptions(options) {
31
31
  };
32
32
  }).filter((v) => v !== null);
33
33
  }
34
- function ToggleGroupBase({ options, value, defaultValue, onValueChange, allowEmptySelection = false, variant = "outline", size, fullWidth = true, slots, ref,...props }) {
35
- const valueString = value === void 0 ? void 0 : String(value);
36
- const defaultValueString = defaultValue === void 0 ? void 0 : String(defaultValue);
34
+ function ToggleGroupBase({ type = "single", options, value, defaultValue, onValueChange, allowEmptySelection = false, variant = "outline", size, fullWidth = true, slots, ref,...props }) {
37
35
  const valueByString = react.useMemo(() => {
38
36
  const map = /* @__PURE__ */ new Map();
39
37
  for (const option of options) map.set(String(option.value), option.value);
40
38
  return map;
41
39
  }, [options]);
42
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.ToggleGroup, {
43
- type: "single",
40
+ const sharedProps = {
44
41
  ...props,
45
42
  className: (0, __pixpilot_shadcn_ui.cn)({ "w-full": fullWidth }, props.className),
46
43
  ref,
44
+ variant: toVariant(variant),
45
+ size: toSize(size)
46
+ };
47
+ const itemNodes = options.map((option) => /* @__PURE__ */ (0, react.createElement)(__pixpilot_shadcn_ui.ToggleGroupItem, {
48
+ ...slots?.item,
49
+ key: String(option.value),
50
+ value: String(option.value),
51
+ "aria-label": String(option.value),
52
+ disabled: option.disabled,
53
+ className: (0, __pixpilot_shadcn_ui.cn)({ "flex-1": fullWidth }, slots?.item?.className)
54
+ }, option.label));
55
+ if (type === "multiple") {
56
+ let valueStrings;
57
+ if (Array.isArray(value)) valueStrings = value.map(String);
58
+ else if (value !== void 0) valueStrings = [String(value)];
59
+ let defaultValueStrings;
60
+ if (Array.isArray(defaultValue)) defaultValueStrings = defaultValue.map(String);
61
+ else if (defaultValue !== void 0) defaultValueStrings = [String(defaultValue)];
62
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.ToggleGroup, {
63
+ type: "multiple",
64
+ ...sharedProps,
65
+ value: valueStrings,
66
+ defaultValue: defaultValueStrings,
67
+ onValueChange: (nextValues) => {
68
+ const mapped = nextValues.map((v) => valueByString.get(v) ?? v);
69
+ onValueChange?.(mapped);
70
+ },
71
+ children: itemNodes
72
+ });
73
+ }
74
+ const valueString = value === void 0 || Array.isArray(value) ? void 0 : String(value);
75
+ const defaultValueString = defaultValue === void 0 || Array.isArray(defaultValue) ? void 0 : String(defaultValue);
76
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.ToggleGroup, {
77
+ type: "single",
78
+ ...sharedProps,
47
79
  value: valueString,
48
80
  defaultValue: defaultValueString,
49
- variant: toVariant(variant),
50
- size: toSize(size),
51
81
  onValueChange: (nextValue) => {
52
82
  if (nextValue === "") {
53
83
  if (allowEmptySelection !== true) return;
@@ -56,14 +86,7 @@ function ToggleGroupBase({ options, value, defaultValue, onValueChange, allowEmp
56
86
  }
57
87
  onValueChange?.(valueByString.get(nextValue) ?? nextValue);
58
88
  },
59
- children: options.map((option) => /* @__PURE__ */ (0, react.createElement)(__pixpilot_shadcn_ui.ToggleGroupItem, {
60
- ...slots?.item,
61
- key: String(option.value),
62
- value: String(option.value),
63
- "aria-label": String(option.value),
64
- disabled: option.disabled,
65
- className: (0, __pixpilot_shadcn_ui.cn)({ "flex-1": fullWidth }, slots?.item?.className)
66
- }, option.label))
89
+ children: itemNodes
67
90
  });
68
91
  }
69
92
  /**
@@ -105,7 +128,10 @@ const ToggleGroup = (0, __formily_react.connect)(ToggleGroupBase, (0, __formily_
105
128
  field,
106
129
  options: props.options
107
130
  }));
108
- const value = isToggleGroupValue(fieldValue) ? fieldValue : void 0;
131
+ const isMultiple = toggleGroupProps.type === "multiple";
132
+ let value;
133
+ if (isMultiple) value = Array.isArray(fieldValue) ? fieldValue.filter(isToggleGroupValue) : [];
134
+ else if (isToggleGroupValue(fieldValue)) value = fieldValue;
109
135
  return {
110
136
  ...toggleGroupProps,
111
137
  options: resolvedOptions,
@@ -12,10 +12,11 @@ interface ToggleGroupOption {
12
12
  disabled?: boolean;
13
13
  }
14
14
  interface ToggleGroupBaseProps extends Omit<ToggleGroupProps, 'type' | 'value' | 'defaultValue' | 'onValueChange' | 'children' | 'variant' | 'size'> {
15
+ type?: 'single' | 'multiple';
15
16
  options: readonly ToggleGroupOption[];
16
- value?: ToggleGroupValue;
17
- defaultValue?: ToggleGroupValue;
18
- onValueChange?: (value: ToggleGroupValue | undefined) => void;
17
+ value?: ToggleGroupValue | ToggleGroupValue[];
18
+ defaultValue?: ToggleGroupValue | ToggleGroupValue[];
19
+ onValueChange?: (value: ToggleGroupValue | undefined | ToggleGroupValue[]) => void;
19
20
  allowEmptySelection?: boolean;
20
21
  variant?: ToggleGroupVariant;
21
22
  size?: ToggleGroupSize;
@@ -12,10 +12,11 @@ interface ToggleGroupOption {
12
12
  disabled?: boolean;
13
13
  }
14
14
  interface ToggleGroupBaseProps extends Omit<ToggleGroupProps, 'type' | 'value' | 'defaultValue' | 'onValueChange' | 'children' | 'variant' | 'size'> {
15
+ type?: 'single' | 'multiple';
15
16
  options: readonly ToggleGroupOption[];
16
- value?: ToggleGroupValue;
17
- defaultValue?: ToggleGroupValue;
18
- onValueChange?: (value: ToggleGroupValue | undefined) => void;
17
+ value?: ToggleGroupValue | ToggleGroupValue[];
18
+ defaultValue?: ToggleGroupValue | ToggleGroupValue[];
19
+ onValueChange?: (value: ToggleGroupValue | undefined | ToggleGroupValue[]) => void;
19
20
  allowEmptySelection?: boolean;
20
21
  variant?: ToggleGroupVariant;
21
22
  size?: ToggleGroupSize;
@@ -27,23 +27,53 @@ function coerceOptions(options) {
27
27
  };
28
28
  }).filter((v) => v !== null);
29
29
  }
30
- function ToggleGroupBase({ options, value, defaultValue, onValueChange, allowEmptySelection = false, variant = "outline", size, fullWidth = true, slots, ref,...props }) {
31
- const valueString = value === void 0 ? void 0 : String(value);
32
- const defaultValueString = defaultValue === void 0 ? void 0 : String(defaultValue);
30
+ function ToggleGroupBase({ type = "single", options, value, defaultValue, onValueChange, allowEmptySelection = false, variant = "outline", size, fullWidth = true, slots, ref,...props }) {
33
31
  const valueByString = React$1.useMemo(() => {
34
32
  const map = /* @__PURE__ */ new Map();
35
33
  for (const option of options) map.set(String(option.value), option.value);
36
34
  return map;
37
35
  }, [options]);
38
- return /* @__PURE__ */ jsx(ToggleGroup, {
39
- type: "single",
36
+ const sharedProps = {
40
37
  ...props,
41
38
  className: cn({ "w-full": fullWidth }, props.className),
42
39
  ref,
40
+ variant: toVariant(variant),
41
+ size: toSize(size)
42
+ };
43
+ const itemNodes = options.map((option) => /* @__PURE__ */ createElement(ToggleGroupItem, {
44
+ ...slots?.item,
45
+ key: String(option.value),
46
+ value: String(option.value),
47
+ "aria-label": String(option.value),
48
+ disabled: option.disabled,
49
+ className: cn({ "flex-1": fullWidth }, slots?.item?.className)
50
+ }, option.label));
51
+ if (type === "multiple") {
52
+ let valueStrings;
53
+ if (Array.isArray(value)) valueStrings = value.map(String);
54
+ else if (value !== void 0) valueStrings = [String(value)];
55
+ let defaultValueStrings;
56
+ if (Array.isArray(defaultValue)) defaultValueStrings = defaultValue.map(String);
57
+ else if (defaultValue !== void 0) defaultValueStrings = [String(defaultValue)];
58
+ return /* @__PURE__ */ jsx(ToggleGroup, {
59
+ type: "multiple",
60
+ ...sharedProps,
61
+ value: valueStrings,
62
+ defaultValue: defaultValueStrings,
63
+ onValueChange: (nextValues) => {
64
+ const mapped = nextValues.map((v) => valueByString.get(v) ?? v);
65
+ onValueChange?.(mapped);
66
+ },
67
+ children: itemNodes
68
+ });
69
+ }
70
+ const valueString = value === void 0 || Array.isArray(value) ? void 0 : String(value);
71
+ const defaultValueString = defaultValue === void 0 || Array.isArray(defaultValue) ? void 0 : String(defaultValue);
72
+ return /* @__PURE__ */ jsx(ToggleGroup, {
73
+ type: "single",
74
+ ...sharedProps,
43
75
  value: valueString,
44
76
  defaultValue: defaultValueString,
45
- variant: toVariant(variant),
46
- size: toSize(size),
47
77
  onValueChange: (nextValue) => {
48
78
  if (nextValue === "") {
49
79
  if (allowEmptySelection !== true) return;
@@ -52,14 +82,7 @@ function ToggleGroupBase({ options, value, defaultValue, onValueChange, allowEmp
52
82
  }
53
83
  onValueChange?.(valueByString.get(nextValue) ?? nextValue);
54
84
  },
55
- children: options.map((option) => /* @__PURE__ */ createElement(ToggleGroupItem, {
56
- ...slots?.item,
57
- key: String(option.value),
58
- value: String(option.value),
59
- "aria-label": String(option.value),
60
- disabled: option.disabled,
61
- className: cn({ "flex-1": fullWidth }, slots?.item?.className)
62
- }, option.label))
85
+ children: itemNodes
63
86
  });
64
87
  }
65
88
  /**
@@ -101,7 +124,10 @@ const ToggleGroup$1 = connect(ToggleGroupBase, mapProps({
101
124
  field,
102
125
  options: props.options
103
126
  }));
104
- const value = isToggleGroupValue(fieldValue) ? fieldValue : void 0;
127
+ const isMultiple = toggleGroupProps.type === "multiple";
128
+ let value;
129
+ if (isMultiple) value = Array.isArray(fieldValue) ? fieldValue.filter(isToggleGroupValue) : [];
130
+ else if (isToggleGroupValue(fieldValue)) value = fieldValue;
105
131
  return {
106
132
  ...toggleGroupProps,
107
133
  options: resolvedOptions,