@pixpilot/formily-shadcn 1.10.4 → 1.10.6

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,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 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 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 react19 from "react";
1
+ import * as react21 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: react21.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react21.RefAttributes<HTMLButtonElement>>, "ref"> & react21.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Switch };
@@ -1,4 +1,4 @@
1
- import * as react19 from "react";
1
+ import * as react21 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: react21.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react21.RefAttributes<HTMLButtonElement>>, "ref"> & react21.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Switch };
@@ -1,4 +1,4 @@
1
- import * as react22 from "react";
1
+ import * as react19 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: react22.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui1.TagsInputProps> & react22.RefAttributes<unknown>>;
13
+ declare const TagsInputInLine: react19.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui1.TagsInputProps> & react19.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { TagsInputInLine };
@@ -1,4 +1,4 @@
1
- import * as react22 from "react";
1
+ import * as react19 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: react22.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui1.TagsInputProps> & react22.RefAttributes<unknown>>;
13
+ declare const TagsInputInLine: react19.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui1.TagsInputProps> & react19.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { TagsInputInLine };
@@ -1,9 +1,9 @@
1
- import * as react24 from "react";
1
+ import * as react27 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: react27.ForwardRefExoticComponent<Omit<Partial<react27.ClassAttributes<HTMLTextAreaElement> & react27.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react27.RefAttributes<unknown>>;
8
8
  //#endregion
9
9
  export { Textarea };
@@ -1,4 +1,4 @@
1
- import * as react28 from "react";
1
+ import * as react24 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$1: react28.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui2.ToggleButtonProps, "ref"> & react28.RefAttributes<HTMLButtonElement>>, "ref"> & react28.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 };
@@ -1,4 +1,4 @@
1
- import * as _formily_react0 from "@formily/react";
1
+ import * as _formily_react102 from "@formily/react";
2
2
  import React from "react";
3
3
  import { TagsInputProps } from "@pixpilot/shadcn-ui";
4
4
 
@@ -54,6 +54,6 @@ interface ArrayTagsProps extends TagsInputProps {
54
54
  * };
55
55
  * ```
56
56
  */
57
- declare const ArrayTags: React.MemoExoticComponent<_formily_react0.ReactFC<ArrayTagsProps>>;
57
+ declare const ArrayTags: React.MemoExoticComponent<_formily_react102.ReactFC<ArrayTagsProps>>;
58
58
  //#endregion
59
59
  export { ArrayTags, ArrayTagsProps };
@@ -1,4 +1,4 @@
1
- import * as _formily_react0 from "@formily/react";
1
+ import * as _formily_react101 from "@formily/react";
2
2
  import React from "react";
3
3
  import { ToggleGroupProps } from "@pixpilot/shadcn-ui";
4
4
 
@@ -60,6 +60,6 @@ interface ArrayToggleGroupProps extends Omit<ToggleGroupProps, 'value' | 'onChan
60
60
  * };
61
61
  * ```
62
62
  */
63
- declare const ArrayToggleGroup: React.MemoExoticComponent<_formily_react0.ReactFC<Omit<ArrayToggleGroupProps, "ref">>>;
63
+ declare const ArrayToggleGroup: React.MemoExoticComponent<_formily_react101.ReactFC<Omit<ArrayToggleGroupProps, "ref">>>;
64
64
  //#endregion
65
65
  export { ArrayToggleGroup, ArrayToggleGroupProps };
@@ -44,8 +44,13 @@ function mapUploadProps(props, field, options) {
44
44
  ...restProps,
45
45
  value,
46
46
  onChange: (newValue) => {
47
- if (newValue === null) field.setValue(null);
48
- else if (Array.isArray(newValue)) {
47
+ if (newValue === null) {
48
+ field.setValue(null);
49
+ if (isSingle) field.setFeedback({
50
+ type: "warning",
51
+ messages: []
52
+ });
53
+ } else if (Array.isArray(newValue)) {
49
54
  const currentLen = currentMultipleFiles.length;
50
55
  if (newValue.length <= currentLen) field.setValue(newValue);
51
56
  }
@@ -43,8 +43,13 @@ function mapUploadProps(props, field, options) {
43
43
  ...restProps,
44
44
  value,
45
45
  onChange: (newValue) => {
46
- if (newValue === null) field.setValue(null);
47
- else if (Array.isArray(newValue)) {
46
+ if (newValue === null) {
47
+ field.setValue(null);
48
+ if (isSingle) field.setFeedback({
49
+ type: "warning",
50
+ messages: []
51
+ });
52
+ } else if (Array.isArray(newValue)) {
48
53
  const currentLen = currentMultipleFiles.length;
49
54
  if (newValue.length <= currentLen) field.setValue(newValue);
50
55
  }
@@ -1,15 +1,15 @@
1
- import * as react33 from "react";
1
+ import * as react31 from "react";
2
2
 
3
3
  //#region src/components/number/NumberInput.d.ts
4
4
  /**
5
5
  * Formily-connected Number Input component
6
6
  */
7
- declare const NumberInput: react33.ForwardRefExoticComponent<Omit<Partial<react33.ClassAttributes<HTMLInputElement> & react33.InputHTMLAttributes<HTMLInputElement> & {
7
+ declare const NumberInput: react31.ForwardRefExoticComponent<Omit<Partial<react31.ClassAttributes<HTMLInputElement> & react31.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"> & react33.RefAttributes<unknown>>;
13
+ }>, "ref"> & react31.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { NumberInput };