@pixpilot/formily-shadcn 1.0.2 → 1.0.4
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/DatePicker.d.ts +3 -3
- package/dist/components/FormGrid.d.cts +2 -2
- package/dist/components/IconPicker.d.cts +3 -3
- package/dist/components/IconPicker.d.ts +3 -3
- package/dist/components/IconToggle.d.cts +3 -3
- package/dist/components/IconToggle.d.ts +2 -2
- package/dist/components/Input.d.cts +3 -3
- package/dist/components/Input.d.ts +3 -3
- package/dist/components/Radio.d.cts +2 -2
- package/dist/components/Rating.d.cts +4 -4
- package/dist/components/Separator.d.cts +2 -2
- package/dist/components/Switch.d.ts +2 -2
- package/dist/components/TagsInputInline.d.ts +2 -2
- package/dist/components/ToggleButton.d.cts +3 -3
- package/dist/components/form-item/ConnectedFormItem.cjs +1 -1
- package/dist/components/form-item/ConnectedFormItem.js +1 -1
- package/dist/components/form-item/FormItemLabel.cjs +7 -2
- package/dist/components/form-item/FormItemLabel.js +7 -2
- package/dist/components/schema-field/schema-field-basics.d.cts +288 -288
- package/dist/components/schema-field/schema-field-extended.d.cts +618 -618
- package/dist/components/schema-field/schema-field.d.cts +398 -398
- 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 +3 -3
- package/dist/components/slider/SliderSelect.d.ts +3 -3
- package/package.json +2 -2
|
@@ -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,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$1:
|
|
5
|
+
declare const DatePicker$1: 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 as 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 react11 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: react11.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
|
|
12
12
|
providers?: IconProviderProps[];
|
|
13
|
-
}> &
|
|
13
|
+
}> & react11.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { IconPicker };
|
|
@@ -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$1:
|
|
11
|
+
declare const IconPicker$1: react8.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
|
|
12
12
|
providers?: IconProviderProps[];
|
|
13
|
-
}> &
|
|
13
|
+
}> & react8.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { IconPicker$1 as IconPicker };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react28 from "react";
|
|
2
|
+
import * as _pixpilot_shadcn_ui2 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:
|
|
9
|
+
declare const IconToggle: react28.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui2.IconToggleProps, "ref"> & react28.RefAttributes<HTMLButtonElement>>, "ref"> & react28.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { IconToggle };
|
|
@@ -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$1:
|
|
9
|
+
declare const IconToggle$1: 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 as 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,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 react8 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:
|
|
10
|
-
children?:
|
|
11
|
-
}> &
|
|
9
|
+
declare const Rating: react8.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.RatingProps & {
|
|
10
|
+
children?: react8.ReactNode | undefined;
|
|
11
|
+
}> & react8.RefAttributes<unknown>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { Rating };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react13 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: react13.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react13.RefAttributes<HTMLDivElement>>, "ref"> & react13.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Separator };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
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:
|
|
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
|
|
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:
|
|
13
|
+
declare const TagsInputInLine: react19.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui1.TagsInputProps> & react19.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { TagsInputInLine };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react16 from "react";
|
|
2
|
+
import * as _pixpilot_shadcn_ui0 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:
|
|
9
|
+
declare const ToggleButton: react16.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui0.ToggleButtonProps, "ref"> & react16.RefAttributes<HTMLButtonElement>>, "ref"> & react16.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { ToggleButton };
|
|
@@ -31,9 +31,9 @@ const FormItem = (0, __formily_react.connect)(require_BaseFormItem.BaseFormItem,
|
|
|
31
31
|
if (field.selfSuccesses?.length) return field.selfSuccesses.join(", ");
|
|
32
32
|
};
|
|
33
33
|
const takeAsterisk = () => {
|
|
34
|
+
if ("asterisk" in props) return Boolean(props.asterisk);
|
|
34
35
|
if (schema.parent && Array.isArray(schema.parent.required) && schema.parent.required.includes(schema.name)) return true;
|
|
35
36
|
if (field.required && field.pattern !== "readPretty") return true;
|
|
36
|
-
if ("asterisk" in props) return Boolean(props.asterisk);
|
|
37
37
|
return false;
|
|
38
38
|
};
|
|
39
39
|
return {
|
|
@@ -28,9 +28,9 @@ const FormItem = connect(BaseFormItem, mapProps((props, field) => {
|
|
|
28
28
|
if (field.selfSuccesses?.length) return field.selfSuccesses.join(", ");
|
|
29
29
|
};
|
|
30
30
|
const takeAsterisk = () => {
|
|
31
|
+
if ("asterisk" in props) return Boolean(props.asterisk);
|
|
31
32
|
if (schema.parent && Array.isArray(schema.parent.required) && schema.parent.required.includes(schema.name)) return true;
|
|
32
33
|
if (field.required && field.pattern !== "readPretty") return true;
|
|
33
|
-
if ("asterisk" in props) return Boolean(props.asterisk);
|
|
34
34
|
return false;
|
|
35
35
|
};
|
|
36
36
|
return {
|
|
@@ -10,14 +10,19 @@ function FormItemLabel({ id, label, asterisk, error, shrink, labelProps, descrip
|
|
|
10
10
|
const { className, placement: _placement,...restLabelProps } = labelProps ?? {};
|
|
11
11
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
12
12
|
htmlFor: id,
|
|
13
|
-
"data-slot": "form-label",
|
|
13
|
+
"data-slot": "form-item-label",
|
|
14
14
|
"data-error": Boolean(error),
|
|
15
15
|
...restLabelProps,
|
|
16
16
|
className: (0, __pixpilot_shadcn.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", error && "text-destructive", shrink && "shrink-0", className),
|
|
17
17
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
18
|
+
"data-slot": "form-item-label-text-container",
|
|
18
19
|
className: "inline-flex items-center gap-1",
|
|
19
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
20
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21
|
+
"data-slot": "form-item-label-text",
|
|
22
|
+
children: label
|
|
23
|
+
}), descriptionInPopover && description != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FormItemDescriptionPopover.FormItemDescriptionPopover, { description })]
|
|
20
24
|
}), asterisk && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
25
|
+
"data-slot": "form-item-label-asterisk",
|
|
21
26
|
className: "text-destructive ml-1",
|
|
22
27
|
"aria-label": "required",
|
|
23
28
|
children: "*"
|
|
@@ -7,14 +7,19 @@ function FormItemLabel({ id, label, asterisk, error, shrink, labelProps, descrip
|
|
|
7
7
|
const { className, placement: _placement,...restLabelProps } = labelProps ?? {};
|
|
8
8
|
return /* @__PURE__ */ jsxs("label", {
|
|
9
9
|
htmlFor: id,
|
|
10
|
-
"data-slot": "form-label",
|
|
10
|
+
"data-slot": "form-item-label",
|
|
11
11
|
"data-error": Boolean(error),
|
|
12
12
|
...restLabelProps,
|
|
13
13
|
className: cn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", error && "text-destructive", shrink && "shrink-0", className),
|
|
14
14
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
15
|
+
"data-slot": "form-item-label-text-container",
|
|
15
16
|
className: "inline-flex items-center gap-1",
|
|
16
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
17
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
18
|
+
"data-slot": "form-item-label-text",
|
|
19
|
+
children: label
|
|
20
|
+
}), descriptionInPopover && description != null && /* @__PURE__ */ jsx(FormItemDescriptionPopover, { description })]
|
|
17
21
|
}), asterisk && /* @__PURE__ */ jsx("span", {
|
|
22
|
+
"data-slot": "form-item-label-asterisk",
|
|
18
23
|
className: "text-destructive ml-1",
|
|
19
24
|
"aria-label": "required",
|
|
20
25
|
children: "*"
|