@pixpilot/formily-shadcn 0.35.1 → 0.36.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.
- package/dist/components/DatePicker.d.cts +3 -3
- package/dist/components/FormGrid.d.ts +2 -2
- package/dist/components/IconPicker.d.cts +3 -3
- package/dist/components/IconToggle.d.cts +2 -2
- package/dist/components/Input.d.cts +3 -3
- package/dist/components/Radio.d.ts +2 -2
- package/dist/components/Separator.d.cts +2 -2
- package/dist/components/Switch.d.cts +2 -2
- package/dist/components/TagsInputInline.d.cts +2 -2
- package/dist/components/Textarea.d.cts +2 -2
- package/dist/components/array-tags/ArrayTags.cjs +76 -0
- package/dist/components/array-tags/ArrayTags.d.cts +57 -0
- package/dist/components/array-tags/ArrayTags.d.ts +57 -0
- package/dist/components/array-tags/ArrayTags.js +71 -0
- package/dist/components/array-tags/index.cjs +1 -0
- package/dist/components/array-tags/index.d.cts +1 -0
- package/dist/components/array-tags/index.d.ts +1 -0
- package/dist/components/array-tags/index.js +1 -0
- package/dist/components/form-item/ConnectedFormItem.d.cts +4 -4
- package/dist/components/form-item/ConnectedFormItem.d.ts +4 -4
- package/dist/components/schema-field/schema-field-basics.cjs +6 -0
- package/dist/components/schema-field/schema-field-basics.d.cts +270 -254
- package/dist/components/schema-field/schema-field-basics.d.ts +271 -255
- package/dist/components/schema-field/schema-field-basics.js +6 -0
- package/dist/components/schema-field/schema-field-extended.d.cts +25 -9
- package/dist/components/schema-field/schema-field-extended.d.ts +566 -550
- package/dist/components/schema-field/schema-field.d.cts +347 -331
- package/dist/components/schema-field/schema-field.d.ts +348 -332
- package/dist/components/slider/Slider.d.cts +3 -3
- package/dist/components/slider/Slider.d.ts +3 -3
- package/dist/components/slider/SliderInput.d.cts +3 -3
- package/dist/components/slider/SliderInput.d.ts +3 -3
- package/dist/components/slider/SliderSelect.d.cts +2 -2
- package/dist/components/slider/SliderSelect.d.ts +3 -3
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/package.json +3 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react6 from "react";
|
|
2
2
|
import { DatePickerProps } from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/DatePicker.d.ts
|
|
5
|
-
declare const DatePicker:
|
|
5
|
+
declare const DatePicker: react6.ForwardRefExoticComponent<Partial<{
|
|
6
6
|
value?: Date;
|
|
7
7
|
onChange?: (date: Date | undefined) => void;
|
|
8
8
|
placeholder?: string;
|
|
9
|
-
} & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> &
|
|
9
|
+
} & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> & react6.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { DatePicker };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
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):
|
|
10
|
+
}: IFormGridProps): react_jsx_runtime2.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { FormGrid };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
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:
|
|
11
|
+
declare const IconPicker: react8.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
|
|
12
12
|
providers?: IconProviderProps[];
|
|
13
|
-
}> &
|
|
13
|
+
}> & react8.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { IconPicker };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react10 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:
|
|
9
|
+
declare const IconToggle: react10.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui0.IconToggleProps, "ref"> & react10.RefAttributes<HTMLButtonElement>>, "ref"> & react10.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { IconToggle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react2 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:
|
|
9
|
+
declare const Input: react2.ForwardRefExoticComponent<Omit<Partial<react2.ClassAttributes<HTMLInputElement> & react2.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"> &
|
|
15
|
+
}>, "ref"> & react2.RefAttributes<unknown>>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { Input };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime1 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):
|
|
18
|
+
declare function Radio(props: RadioProps): react_jsx_runtime1.JSX.Element;
|
|
19
19
|
declare namespace Radio {
|
|
20
20
|
var displayName: string;
|
|
21
21
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react15 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:
|
|
9
|
+
declare const Separator: react15.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react15.RefAttributes<HTMLDivElement>>, "ref"> & react15.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Separator };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
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:
|
|
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
|
|
1
|
+
import * as react13 from "react";
|
|
2
2
|
import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/TagsInputInline.d.ts
|
|
@@ -10,6 +10,6 @@ import * as _pixpilot_shadcn_ui0 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:
|
|
13
|
+
declare const TagsInputInLine: react13.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.TagsInputProps> & react13.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { TagsInputInLine };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
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:
|
|
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 };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __formily_react = require("@formily/react");
|
|
3
|
+
__formily_react = require_rolldown_runtime.__toESM(__formily_react);
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
+
let __pixpilot_shadcn_ui = require("@pixpilot/shadcn-ui");
|
|
7
|
+
__pixpilot_shadcn_ui = require_rolldown_runtime.__toESM(__pixpilot_shadcn_ui);
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
10
|
+
|
|
11
|
+
//#region src/components/array-tags/ArrayTags.tsx
|
|
12
|
+
/**
|
|
13
|
+
* ArrayTags component - A simple array field for strings/numbers using TagsInput
|
|
14
|
+
*
|
|
15
|
+
* This component provides a tag-based interface for managing simple arrays
|
|
16
|
+
* of primitive values (strings or numbers), unlike other array fields that
|
|
17
|
+
* handle complex object arrays.
|
|
18
|
+
*
|
|
19
|
+
* Features:
|
|
20
|
+
* - Inline tag editing
|
|
21
|
+
* - Keyboard navigation
|
|
22
|
+
* - Paste support with delimiter parsing
|
|
23
|
+
* - Validation support
|
|
24
|
+
* - Max tags limit
|
|
25
|
+
* - Duplicate prevention
|
|
26
|
+
*
|
|
27
|
+
* Example usage:
|
|
28
|
+
* ```tsx
|
|
29
|
+
* const schema = {
|
|
30
|
+
* type: 'object',
|
|
31
|
+
* properties: {
|
|
32
|
+
* tags: {
|
|
33
|
+
* type: 'array',
|
|
34
|
+
* title: 'Tags',
|
|
35
|
+
* 'x-decorator': 'FormItem',
|
|
36
|
+
* 'x-component': 'ArrayTags',
|
|
37
|
+
* 'x-component-props': {
|
|
38
|
+
* placeholder: 'Add tags...',
|
|
39
|
+
* maxTags: 10,
|
|
40
|
+
* },
|
|
41
|
+
* },
|
|
42
|
+
* },
|
|
43
|
+
* };
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
const ArrayTags = (0, __formily_react.observer)((props) => {
|
|
47
|
+
const field = (0, __formily_react.useField)();
|
|
48
|
+
const { placeholder = "Add items...", emptyText = "No options found.", className, disabled, readOnly, maxTags, allowDuplicates = false, editable = false, delimiter = ",", addOnPaste = true, addOnTab = true, onValidate, value, onChange } = props;
|
|
49
|
+
const effectiveValue = value ?? field.value ?? [];
|
|
50
|
+
const effectiveDisabled = disabled ?? field.disabled ?? false;
|
|
51
|
+
const effectiveReadOnly = readOnly ?? field.readOnly ?? false;
|
|
52
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.TagsInput, {
|
|
53
|
+
value: effectiveValue,
|
|
54
|
+
onChange: react.default.useCallback((newValue) => {
|
|
55
|
+
if (onChange) onChange(newValue);
|
|
56
|
+
else field.setValue(newValue);
|
|
57
|
+
}, [field, onChange]),
|
|
58
|
+
placeholder,
|
|
59
|
+
emptyText,
|
|
60
|
+
className,
|
|
61
|
+
disabled: effectiveDisabled,
|
|
62
|
+
readOnly: effectiveReadOnly,
|
|
63
|
+
maxTags,
|
|
64
|
+
allowDuplicates,
|
|
65
|
+
editable,
|
|
66
|
+
delimiter,
|
|
67
|
+
addOnPaste,
|
|
68
|
+
addOnTab,
|
|
69
|
+
onValidate,
|
|
70
|
+
freeSolo: true
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
ArrayTags.displayName = "ArrayTags";
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
exports.ArrayTags = ArrayTags;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as _formily_react0 from "@formily/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/array-tags/ArrayTags.d.ts
|
|
5
|
+
interface ArrayTagsProps {
|
|
6
|
+
value?: Array<string | number>;
|
|
7
|
+
onChange?: (value: Array<string | number>) => void;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
emptyText?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
maxTags?: number;
|
|
14
|
+
allowDuplicates?: boolean;
|
|
15
|
+
editable?: boolean;
|
|
16
|
+
delimiter?: string;
|
|
17
|
+
addOnPaste?: boolean;
|
|
18
|
+
addOnTab?: boolean;
|
|
19
|
+
onValidate?: (value: string) => boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* ArrayTags component - A simple array field for strings/numbers using TagsInput
|
|
23
|
+
*
|
|
24
|
+
* This component provides a tag-based interface for managing simple arrays
|
|
25
|
+
* of primitive values (strings or numbers), unlike other array fields that
|
|
26
|
+
* handle complex object arrays.
|
|
27
|
+
*
|
|
28
|
+
* Features:
|
|
29
|
+
* - Inline tag editing
|
|
30
|
+
* - Keyboard navigation
|
|
31
|
+
* - Paste support with delimiter parsing
|
|
32
|
+
* - Validation support
|
|
33
|
+
* - Max tags limit
|
|
34
|
+
* - Duplicate prevention
|
|
35
|
+
*
|
|
36
|
+
* Example usage:
|
|
37
|
+
* ```tsx
|
|
38
|
+
* const schema = {
|
|
39
|
+
* type: 'object',
|
|
40
|
+
* properties: {
|
|
41
|
+
* tags: {
|
|
42
|
+
* type: 'array',
|
|
43
|
+
* title: 'Tags',
|
|
44
|
+
* 'x-decorator': 'FormItem',
|
|
45
|
+
* 'x-component': 'ArrayTags',
|
|
46
|
+
* 'x-component-props': {
|
|
47
|
+
* placeholder: 'Add tags...',
|
|
48
|
+
* maxTags: 10,
|
|
49
|
+
* },
|
|
50
|
+
* },
|
|
51
|
+
* },
|
|
52
|
+
* };
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
declare const ArrayTags: React.MemoExoticComponent<_formily_react0.ReactFC<ArrayTagsProps>>;
|
|
56
|
+
//#endregion
|
|
57
|
+
export { ArrayTags, ArrayTagsProps };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as _formily_react0 from "@formily/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/array-tags/ArrayTags.d.ts
|
|
5
|
+
interface ArrayTagsProps {
|
|
6
|
+
value?: Array<string | number>;
|
|
7
|
+
onChange?: (value: Array<string | number>) => void;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
emptyText?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
maxTags?: number;
|
|
14
|
+
allowDuplicates?: boolean;
|
|
15
|
+
editable?: boolean;
|
|
16
|
+
delimiter?: string;
|
|
17
|
+
addOnPaste?: boolean;
|
|
18
|
+
addOnTab?: boolean;
|
|
19
|
+
onValidate?: (value: string) => boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* ArrayTags component - A simple array field for strings/numbers using TagsInput
|
|
23
|
+
*
|
|
24
|
+
* This component provides a tag-based interface for managing simple arrays
|
|
25
|
+
* of primitive values (strings or numbers), unlike other array fields that
|
|
26
|
+
* handle complex object arrays.
|
|
27
|
+
*
|
|
28
|
+
* Features:
|
|
29
|
+
* - Inline tag editing
|
|
30
|
+
* - Keyboard navigation
|
|
31
|
+
* - Paste support with delimiter parsing
|
|
32
|
+
* - Validation support
|
|
33
|
+
* - Max tags limit
|
|
34
|
+
* - Duplicate prevention
|
|
35
|
+
*
|
|
36
|
+
* Example usage:
|
|
37
|
+
* ```tsx
|
|
38
|
+
* const schema = {
|
|
39
|
+
* type: 'object',
|
|
40
|
+
* properties: {
|
|
41
|
+
* tags: {
|
|
42
|
+
* type: 'array',
|
|
43
|
+
* title: 'Tags',
|
|
44
|
+
* 'x-decorator': 'FormItem',
|
|
45
|
+
* 'x-component': 'ArrayTags',
|
|
46
|
+
* 'x-component-props': {
|
|
47
|
+
* placeholder: 'Add tags...',
|
|
48
|
+
* maxTags: 10,
|
|
49
|
+
* },
|
|
50
|
+
* },
|
|
51
|
+
* },
|
|
52
|
+
* };
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
declare const ArrayTags: React.MemoExoticComponent<_formily_react0.ReactFC<ArrayTagsProps>>;
|
|
56
|
+
//#endregion
|
|
57
|
+
export { ArrayTags, ArrayTagsProps };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { observer, useField } from "@formily/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { TagsInput } from "@pixpilot/shadcn-ui";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/array-tags/ArrayTags.tsx
|
|
7
|
+
/**
|
|
8
|
+
* ArrayTags component - A simple array field for strings/numbers using TagsInput
|
|
9
|
+
*
|
|
10
|
+
* This component provides a tag-based interface for managing simple arrays
|
|
11
|
+
* of primitive values (strings or numbers), unlike other array fields that
|
|
12
|
+
* handle complex object arrays.
|
|
13
|
+
*
|
|
14
|
+
* Features:
|
|
15
|
+
* - Inline tag editing
|
|
16
|
+
* - Keyboard navigation
|
|
17
|
+
* - Paste support with delimiter parsing
|
|
18
|
+
* - Validation support
|
|
19
|
+
* - Max tags limit
|
|
20
|
+
* - Duplicate prevention
|
|
21
|
+
*
|
|
22
|
+
* Example usage:
|
|
23
|
+
* ```tsx
|
|
24
|
+
* const schema = {
|
|
25
|
+
* type: 'object',
|
|
26
|
+
* properties: {
|
|
27
|
+
* tags: {
|
|
28
|
+
* type: 'array',
|
|
29
|
+
* title: 'Tags',
|
|
30
|
+
* 'x-decorator': 'FormItem',
|
|
31
|
+
* 'x-component': 'ArrayTags',
|
|
32
|
+
* 'x-component-props': {
|
|
33
|
+
* placeholder: 'Add tags...',
|
|
34
|
+
* maxTags: 10,
|
|
35
|
+
* },
|
|
36
|
+
* },
|
|
37
|
+
* },
|
|
38
|
+
* };
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
const ArrayTags = observer((props) => {
|
|
42
|
+
const field = useField();
|
|
43
|
+
const { placeholder = "Add items...", emptyText = "No options found.", className, disabled, readOnly, maxTags, allowDuplicates = false, editable = false, delimiter = ",", addOnPaste = true, addOnTab = true, onValidate, value, onChange } = props;
|
|
44
|
+
const effectiveValue = value ?? field.value ?? [];
|
|
45
|
+
const effectiveDisabled = disabled ?? field.disabled ?? false;
|
|
46
|
+
const effectiveReadOnly = readOnly ?? field.readOnly ?? false;
|
|
47
|
+
return /* @__PURE__ */ jsx(TagsInput, {
|
|
48
|
+
value: effectiveValue,
|
|
49
|
+
onChange: React.useCallback((newValue) => {
|
|
50
|
+
if (onChange) onChange(newValue);
|
|
51
|
+
else field.setValue(newValue);
|
|
52
|
+
}, [field, onChange]),
|
|
53
|
+
placeholder,
|
|
54
|
+
emptyText,
|
|
55
|
+
className,
|
|
56
|
+
disabled: effectiveDisabled,
|
|
57
|
+
readOnly: effectiveReadOnly,
|
|
58
|
+
maxTags,
|
|
59
|
+
allowDuplicates,
|
|
60
|
+
editable,
|
|
61
|
+
delimiter,
|
|
62
|
+
addOnPaste,
|
|
63
|
+
addOnTab,
|
|
64
|
+
onValidate,
|
|
65
|
+
freeSolo: true
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
ArrayTags.displayName = "ArrayTags";
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
export { ArrayTags };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const require_ArrayTags = require('./ArrayTags.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { ArrayTags, ArrayTagsProps } from "./ArrayTags.cjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { ArrayTags, ArrayTagsProps } from "./ArrayTags.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { ArrayTags } from "./ArrayTags.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FormItemProps } from "./form-item-types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react1656 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/form-item/ConnectedFormItem.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* FormItem component connected to Formily field state.
|
|
7
7
|
* Automatically maps field validation state to component props.
|
|
8
8
|
*/
|
|
9
|
-
declare const FormItem:
|
|
10
|
-
children?:
|
|
11
|
-
}>, "ref"> &
|
|
9
|
+
declare const FormItem: react1656.ForwardRefExoticComponent<Omit<Partial<FormItemProps & {
|
|
10
|
+
children?: react1656.ReactNode | undefined;
|
|
11
|
+
}>, "ref"> & react1656.RefAttributes<unknown>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { FormItem };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FormItemProps } from "./form-item-types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react1656 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/form-item/ConnectedFormItem.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* FormItem component connected to Formily field state.
|
|
7
7
|
* Automatically maps field validation state to component props.
|
|
8
8
|
*/
|
|
9
|
-
declare const FormItem:
|
|
10
|
-
children?:
|
|
11
|
-
}>, "ref"> &
|
|
9
|
+
declare const FormItem: react1656.ForwardRefExoticComponent<Omit<Partial<FormItemProps & {
|
|
10
|
+
children?: react1656.ReactNode | undefined;
|
|
11
|
+
}>, "ref"> & react1656.RefAttributes<unknown>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { FormItem };
|
|
@@ -8,6 +8,8 @@ const require_ArrayDialog = require('../array-dialog/ArrayDialog.cjs');
|
|
|
8
8
|
require('../array-dialog/index.cjs');
|
|
9
9
|
const require_ArrayPopover = require('../array-popover/ArrayPopover.cjs');
|
|
10
10
|
require('../array-popover/index.cjs');
|
|
11
|
+
const require_ArrayTags = require('../array-tags/ArrayTags.cjs');
|
|
12
|
+
require('../array-tags/index.cjs');
|
|
11
13
|
const require_Checkbox = require('../Checkbox.cjs');
|
|
12
14
|
const require_Column = require('../Column.cjs');
|
|
13
15
|
const require_DatePicker = require('../DatePicker.cjs');
|
|
@@ -51,6 +53,10 @@ const basicComponentRegistry = {
|
|
|
51
53
|
component: require_ArrayPopover.ArrayPopover,
|
|
52
54
|
decorator: "FormItem"
|
|
53
55
|
},
|
|
56
|
+
ArrayTags: {
|
|
57
|
+
component: require_ArrayTags.ArrayTags,
|
|
58
|
+
decorator: "FormItem"
|
|
59
|
+
},
|
|
54
60
|
Checkbox: {
|
|
55
61
|
component: require_Checkbox.Checkbox,
|
|
56
62
|
decorator: "FormItem"
|