@pixpilot/formily-shadcn 1.2.0 → 1.3.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.
@@ -1,4 +1,4 @@
1
- import * as react6 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: react6.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_checkbox0.CheckboxProps & react6.RefAttributes<HTMLButtonElement>>, "ref"> & react6.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_runtime4 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime1 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_runtime4.JSX.Element;
39
+ }: IColumnProps): react_jsx_runtime1.JSX.Element;
40
40
  //#endregion
41
41
  export { Column };
@@ -1,7 +1,7 @@
1
1
  import { FormContextStates } from "./context/form-context.js";
2
2
  import "./context/index.js";
3
3
  import React from "react";
4
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
5
5
  import { Form } from "@formily/core";
6
6
 
7
7
  //#region src/components/Form.d.ts
@@ -25,6 +25,6 @@ declare function Form$1({
25
25
  onAutoSubmit,
26
26
  layout,
27
27
  settings
28
- }: IFormProps): react_jsx_runtime0.JSX.Element;
28
+ }: IFormProps): react_jsx_runtime1.JSX.Element;
29
29
  //#endregion
30
30
  export { Form$1 as Form };
@@ -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/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_runtime1.JSX.Element;
10
+ }: IFormGridProps): react_jsx_runtime0.JSX.Element;
11
11
  //#endregion
12
12
  export { FormGrid };
@@ -1,4 +1,4 @@
1
- import * as react4 from "react";
1
+ import * as react8 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: react4.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
11
+ declare const IconPicker$1: react8.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
12
12
  providers?: IconProviderProps[];
13
- }> & react4.RefAttributes<unknown>>;
13
+ }> & react8.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { IconPicker$1 as IconPicker };
@@ -1,4 +1,4 @@
1
- import * as react1 from "react";
1
+ import * as react6 from "react";
2
2
  import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/IconToggle.d.ts
@@ -6,6 +6,6 @@ import * as _pixpilot_shadcn_ui0 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 IconToggle: react1.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui0.IconToggleProps, "ref"> & react1.RefAttributes<HTMLButtonElement>>, "ref"> & react1.RefAttributes<unknown>>;
9
+ declare const IconToggle: react6.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui0.IconToggleProps, "ref"> & react6.RefAttributes<HTMLButtonElement>>, "ref"> & react6.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { IconToggle };
@@ -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,4 +1,4 @@
1
- import * as react16 from "react";
1
+ import * as react13 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: react16.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.RatingProps & {
10
- children?: react16.ReactNode | undefined;
11
- }> & react16.RefAttributes<unknown>>;
9
+ declare const Rating: react13.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.RatingProps & {
10
+ children?: react13.ReactNode | undefined;
11
+ }> & react13.RefAttributes<unknown>>;
12
12
  //#endregion
13
13
  export { Rating };
@@ -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_runtime3 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_runtime1.JSX.Element;
39
+ }: IRowProps): react_jsx_runtime3.JSX.Element;
40
40
  //#endregion
41
41
  export { Row };
@@ -1,4 +1,4 @@
1
- import * as react13 from "react";
1
+ import * as react16 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: react13.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react13.RefAttributes<HTMLDivElement>>, "ref"> & react13.RefAttributes<unknown>>;
9
+ declare const Separator: react16.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react16.RefAttributes<HTMLDivElement>>, "ref"> & react16.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Separator };
@@ -1,5 +1,5 @@
1
- import * as react22 from "react";
2
- import * as _pixpilot_shadcn_ui1 from "@pixpilot/shadcn-ui";
1
+ import * as react29 from "react";
2
+ import * as _pixpilot_shadcn_ui2 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/TagsInputInline.d.ts
5
5
 
@@ -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: react22.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui1.TagsInputProps> & react22.RefAttributes<unknown>>;
13
+ declare const TagsInputInLine: react29.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui2.TagsInputProps> & react29.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { TagsInputInLine };
@@ -1,9 +1,9 @@
1
- import * as react24 from "react";
1
+ import * as react22 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: react24.ForwardRefExoticComponent<Omit<Partial<react24.ClassAttributes<HTMLTextAreaElement> & react24.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react24.RefAttributes<unknown>>;
7
+ declare const Textarea: react22.ForwardRefExoticComponent<Omit<Partial<react22.ClassAttributes<HTMLTextAreaElement> & react22.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react22.RefAttributes<unknown>>;
8
8
  //#endregion
9
9
  export { Textarea };
@@ -1,11 +1,11 @@
1
- import * as react28 from "react";
2
- import * as _pixpilot_shadcn_ui2 from "@pixpilot/shadcn-ui";
1
+ import * as react26 from "react";
2
+ import * as _pixpilot_shadcn_ui1 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: react28.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui2.ToggleButtonProps, "ref"> & react28.RefAttributes<HTMLButtonElement>>, "ref"> & react28.RefAttributes<unknown>>;
9
+ declare const ToggleButton$1: react26.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui1.ToggleButtonProps, "ref"> & react26.RefAttributes<HTMLButtonElement>>, "ref"> & react26.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { ToggleButton$1 as ToggleButton };
@@ -40,10 +40,10 @@ function ToggleGroupBase({ options, value, defaultValue, onValueChange, allowEmp
40
40
  return map;
41
41
  }, [options]);
42
42
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.ToggleGroup, {
43
+ type: "single",
43
44
  ...props,
44
45
  className: (0, __pixpilot_shadcn_ui.cn)({ "w-full": fullWidth }, props.className),
45
46
  ref,
46
- type: "single",
47
47
  value: valueString,
48
48
  defaultValue: defaultValueString,
49
49
  variant: toVariant(variant),
@@ -56,13 +56,14 @@ function ToggleGroupBase({ options, value, defaultValue, onValueChange, allowEmp
56
56
  }
57
57
  onValueChange?.(valueByString.get(nextValue) ?? nextValue);
58
58
  },
59
- children: options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.ToggleGroupItem, {
59
+ children: options.map((option) => /* @__PURE__ */ (0, react.createElement)(__pixpilot_shadcn_ui.ToggleGroupItem, {
60
+ ...slots?.item,
61
+ key: String(option.value),
60
62
  value: String(option.value),
61
63
  "aria-label": String(option.value),
62
64
  disabled: option.disabled,
63
- className: (0, __pixpilot_shadcn_ui.cn)({ "flex-1": fullWidth }, slots?.item?.className),
64
- children: option.label
65
- }, String(option.value)))
65
+ className: (0, __pixpilot_shadcn_ui.cn)({ "flex-1": fullWidth }, slots?.item?.className)
66
+ }, option.label))
66
67
  });
67
68
  }
68
69
  /**
@@ -1,6 +1,7 @@
1
1
  import { resolveFieldOptions } from "../utils/resolve-field-options.js";
2
2
  import { connect, mapProps } from "@formily/react";
3
3
  import * as React$1 from "react";
4
+ import { createElement } from "react";
4
5
  import { ToggleGroup, ToggleGroupItem, cn } from "@pixpilot/shadcn-ui";
5
6
  import { jsx } from "react/jsx-runtime";
6
7
 
@@ -35,10 +36,10 @@ function ToggleGroupBase({ options, value, defaultValue, onValueChange, allowEmp
35
36
  return map;
36
37
  }, [options]);
37
38
  return /* @__PURE__ */ jsx(ToggleGroup, {
39
+ type: "single",
38
40
  ...props,
39
41
  className: cn({ "w-full": fullWidth }, props.className),
40
42
  ref,
41
- type: "single",
42
43
  value: valueString,
43
44
  defaultValue: defaultValueString,
44
45
  variant: toVariant(variant),
@@ -51,13 +52,14 @@ function ToggleGroupBase({ options, value, defaultValue, onValueChange, allowEmp
51
52
  }
52
53
  onValueChange?.(valueByString.get(nextValue) ?? nextValue);
53
54
  },
54
- children: options.map((option) => /* @__PURE__ */ jsx(ToggleGroupItem, {
55
+ children: options.map((option) => /* @__PURE__ */ createElement(ToggleGroupItem, {
56
+ ...slots?.item,
57
+ key: String(option.value),
55
58
  value: String(option.value),
56
59
  "aria-label": String(option.value),
57
60
  disabled: option.disabled,
58
- className: cn({ "flex-1": fullWidth }, slots?.item?.className),
59
- children: option.label
60
- }, String(option.value)))
61
+ className: cn({ "flex-1": fullWidth }, slots?.item?.className)
62
+ }, option.label))
61
63
  });
62
64
  }
63
65
  /**