@pixpilot/formily-shadcn 1.11.21 → 1.11.22
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/Column.d.cts +2 -2
- package/dist/components/FormGrid.d.cts +2 -2
- package/dist/components/FormGrid.d.ts +2 -2
- package/dist/components/Row.d.ts +2 -2
- package/dist/components/Separator.d.ts +2 -2
- package/dist/components/Switch.d.cts +2 -2
- package/dist/components/Switch.d.ts +2 -2
- package/dist/components/TagsInputInline.d.cts +2 -2
- package/dist/components/TagsInputInline.d.ts +3 -3
- package/dist/components/Textarea.d.cts +2 -2
- package/dist/components/Textarea.d.ts +2 -2
- package/dist/components/ToggleButton.d.cts +2 -2
- package/dist/components/ToggleButton.d.ts +3 -3
- package/dist/components/form-item/BaseFormItem.cjs +5 -3
- package/dist/components/form-item/BaseFormItem.js +11 -10
- package/dist/components/schema-field/schema-field-basics.d.ts +288 -288
- package/dist/components/schema-field/schema-field-extended.d.cts +9 -9
- package/dist/components/schema-field/schema-field-extended.d.ts +501 -501
- package/dist/components/schema-field/schema-field.d.ts +413 -413
- package/dist/components/slider/Slider.d.ts +3 -3
- package/dist/components/slider/SliderInput.d.ts +3 -3
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
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):
|
|
39
|
+
}: IColumnProps): react_jsx_runtime1.JSX.Element;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { Column };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
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):
|
|
10
|
+
}: IFormGridProps): react_jsx_runtime0.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { FormGrid };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime4 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_runtime4.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { FormGrid };
|
package/dist/components/Row.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime1 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):
|
|
39
|
+
}: IRowProps): react_jsx_runtime1.JSX.Element;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { Row };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react19 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: react19.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react19.RefAttributes<HTMLDivElement>>, "ref"> & react19.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Separator };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react24 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: react24.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react24.RefAttributes<HTMLButtonElement>>, "ref"> & react24.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Switch };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react16 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: react16.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react16.RefAttributes<HTMLButtonElement>>, "ref"> & react16.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,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react25 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:
|
|
13
|
+
declare const TagsInputInLine: react25.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui2.TagsInputProps> & react25.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { TagsInputInLine };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
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:
|
|
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,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
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:
|
|
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
|
|
1
|
+
import * as react21 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:
|
|
9
|
+
declare const ToggleButton: react21.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui2.ToggleButtonProps, "ref"> & react21.RefAttributes<HTMLButtonElement>>, "ref"> & react21.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { ToggleButton };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react22 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:
|
|
9
|
+
declare const ToggleButton$1: react22.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui1.ToggleButtonProps, "ref"> & react22.RefAttributes<HTMLButtonElement>>, "ref"> & react22.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { ToggleButton$1 as ToggleButton };
|
|
@@ -8,6 +8,8 @@ let __formily_react = require("@formily/react");
|
|
|
8
8
|
__formily_react = require_rolldown_runtime.__toESM(__formily_react);
|
|
9
9
|
let react = require("react");
|
|
10
10
|
react = require_rolldown_runtime.__toESM(react);
|
|
11
|
+
let __pixpilot_shadcn_ui = require("@pixpilot/shadcn-ui");
|
|
12
|
+
__pixpilot_shadcn_ui = require_rolldown_runtime.__toESM(__pixpilot_shadcn_ui);
|
|
11
13
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
14
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
13
15
|
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
@@ -34,14 +36,14 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
|
|
|
34
36
|
const effectiveLabelPlacement = fieldLabelPlacement ?? propLabelPlacement ?? contextLabelPlacement ?? "top";
|
|
35
37
|
const resolvedDescriptionPlacement = fieldComponentProps?.descriptionPlacement ?? fieldDecoratorProps?.descriptionPlacement ?? descriptionPlacement ?? contextDescriptionPlacement ?? resolveLegacyDescriptionPlacement(effectiveLabelPlacement);
|
|
36
38
|
const id = field?.componentProps?.id ?? `form-${field?.address?.toString()?.replace(/\./gu, "-")}`;
|
|
37
|
-
const descriptionId =
|
|
38
|
-
const feedbackId =
|
|
39
|
+
const descriptionId = (0, __pixpilot_shadcn_ui.getId)(id, "description");
|
|
40
|
+
const feedbackId = (0, __pixpilot_shadcn_ui.getId)(id, "feedback");
|
|
39
41
|
const descriptionRenderedInline = description != null && resolvedDescriptionPlacement !== "popover";
|
|
40
42
|
const spacingConfig = require_spacing_config.getSpacingConfig(resolvedDescriptionPlacement, descriptionRenderedInline);
|
|
41
43
|
const ariaDescribedBy = [descriptionRenderedInline ? descriptionId : void 0, feedbackText != null ? feedbackId : void 0].filter(Boolean).join(" ");
|
|
42
44
|
const labelElement = effectiveLabel != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FormItemLabel.FormItemLabel, {
|
|
43
45
|
"data-slot": "form-item-label",
|
|
44
|
-
id,
|
|
46
|
+
id: (0, __pixpilot_shadcn_ui.getId)(id, "label"),
|
|
45
47
|
label: effectiveLabel,
|
|
46
48
|
asterisk,
|
|
47
49
|
error: feedbackStatus === "error",
|
|
@@ -5,8 +5,9 @@ import { FormItemLabel } from "./FormItemLabel.js";
|
|
|
5
5
|
import { getSpacingConfig } from "./spacing-config.js";
|
|
6
6
|
import { useField } from "@formily/react";
|
|
7
7
|
import React from "react";
|
|
8
|
+
import { getId } from "@pixpilot/shadcn-ui";
|
|
8
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { cn } from "@pixpilot/shadcn";
|
|
10
|
+
import { cn as cn$1 } from "@pixpilot/shadcn";
|
|
10
11
|
|
|
11
12
|
//#region src/components/form-item/BaseFormItem.tsx
|
|
12
13
|
function resolveLegacyDescriptionPlacement(labelPlacement) {
|
|
@@ -29,14 +30,14 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
|
|
|
29
30
|
const effectiveLabelPlacement = fieldLabelPlacement ?? propLabelPlacement ?? contextLabelPlacement ?? "top";
|
|
30
31
|
const resolvedDescriptionPlacement = fieldComponentProps?.descriptionPlacement ?? fieldDecoratorProps?.descriptionPlacement ?? descriptionPlacement ?? contextDescriptionPlacement ?? resolveLegacyDescriptionPlacement(effectiveLabelPlacement);
|
|
31
32
|
const id = field?.componentProps?.id ?? `form-${field?.address?.toString()?.replace(/\./gu, "-")}`;
|
|
32
|
-
const descriptionId =
|
|
33
|
-
const feedbackId =
|
|
33
|
+
const descriptionId = getId(id, "description");
|
|
34
|
+
const feedbackId = getId(id, "feedback");
|
|
34
35
|
const descriptionRenderedInline = description != null && resolvedDescriptionPlacement !== "popover";
|
|
35
36
|
const spacingConfig = getSpacingConfig(resolvedDescriptionPlacement, descriptionRenderedInline);
|
|
36
37
|
const ariaDescribedBy = [descriptionRenderedInline ? descriptionId : void 0, feedbackText != null ? feedbackId : void 0].filter(Boolean).join(" ");
|
|
37
38
|
const labelElement = effectiveLabel != null && /* @__PURE__ */ jsx(FormItemLabel, {
|
|
38
39
|
"data-slot": "form-item-label",
|
|
39
|
-
id,
|
|
40
|
+
id: getId(id, "label"),
|
|
40
41
|
label: effectiveLabel,
|
|
41
42
|
asterisk,
|
|
42
43
|
error: feedbackStatus === "error",
|
|
@@ -45,7 +46,7 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
|
|
|
45
46
|
...fieldLabelProps,
|
|
46
47
|
...itemComponentsProps.label,
|
|
47
48
|
...slots?.label,
|
|
48
|
-
className: cn(effectiveLabelPlacement === "top" ? spacingConfig.label : "mb-0", fieldLabelProps?.className, itemComponentsProps.label?.className, slots?.label?.className)
|
|
49
|
+
className: cn$1(effectiveLabelPlacement === "top" ? spacingConfig.label : "mb-0", fieldLabelProps?.className, itemComponentsProps.label?.className, slots?.label?.className)
|
|
49
50
|
},
|
|
50
51
|
description,
|
|
51
52
|
descriptionInPopover: resolvedDescriptionPlacement === "popover" && description != null
|
|
@@ -54,7 +55,7 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
|
|
|
54
55
|
"data-slot": "form-item-input",
|
|
55
56
|
...itemComponentsProps.inputWrapper,
|
|
56
57
|
...slots?.inputWrapper,
|
|
57
|
-
className: cn("relative", itemComponentsProps.inputWrapper?.className, slots?.inputWrapper?.className),
|
|
58
|
+
className: cn$1("relative", itemComponentsProps.inputWrapper?.className, slots?.inputWrapper?.className),
|
|
58
59
|
children: React.isValidElement(children) ? React.cloneElement(children, {
|
|
59
60
|
id,
|
|
60
61
|
"aria-describedby": ariaDescribedBy || void 0,
|
|
@@ -66,7 +67,7 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
|
|
|
66
67
|
...itemComponentsProps.description,
|
|
67
68
|
...slots?.description,
|
|
68
69
|
id: descriptionId,
|
|
69
|
-
className: cn("text-muted-foreground text-[0.8rem]", spacingConfig.description, itemComponentsProps.description?.className, slots?.description?.className),
|
|
70
|
+
className: cn$1("text-muted-foreground text-[0.8rem]", spacingConfig.description, itemComponentsProps.description?.className, slots?.description?.className),
|
|
70
71
|
children: description
|
|
71
72
|
}) : null;
|
|
72
73
|
const contentElement = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -74,7 +75,7 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
|
|
|
74
75
|
resolvedDescriptionPlacement === "top" && descriptionElement,
|
|
75
76
|
(effectiveLabelPlacement === "start" || effectiveLabelPlacement === "end") && /* @__PURE__ */ jsxs("div", {
|
|
76
77
|
"data-slot": "form-item-content",
|
|
77
|
-
className: cn("flex items-center gap-2", effectiveLabelPlacement === "start" && "flex-row"),
|
|
78
|
+
className: cn$1("flex items-center gap-2", effectiveLabelPlacement === "start" && "flex-row"),
|
|
78
79
|
children: [
|
|
79
80
|
effectiveLabelPlacement === "start" && labelElement,
|
|
80
81
|
inputElement,
|
|
@@ -89,13 +90,13 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
|
|
|
89
90
|
...itemComponentsProps.container,
|
|
90
91
|
...slots?.container,
|
|
91
92
|
...props,
|
|
92
|
-
className: cn("flex flex-col ", className, itemComponentsProps.container?.className, slots?.container?.className),
|
|
93
|
+
className: cn$1("flex flex-col ", className, itemComponentsProps.container?.className, slots?.container?.className),
|
|
93
94
|
children: [contentElement, Boolean(feedbackText) && /* @__PURE__ */ jsx("p", {
|
|
94
95
|
"data-slot": "form-item-feedback",
|
|
95
96
|
...itemComponentsProps.error,
|
|
96
97
|
...slots?.error,
|
|
97
98
|
id: feedbackId,
|
|
98
|
-
className: cn("text-[0.8rem]", spacingConfig.feedback, feedbackStatus === "error" && "text-destructive font-medium", feedbackStatus === "warning" && "text-amber-600", feedbackStatus === "success" && "text-green-600", itemComponentsProps.error?.className, slots?.error?.className),
|
|
99
|
+
className: cn$1("text-[0.8rem]", spacingConfig.feedback, feedbackStatus === "error" && "text-destructive font-medium", feedbackStatus === "warning" && "text-amber-600", feedbackStatus === "success" && "text-green-600", itemComponentsProps.error?.className, slots?.error?.className),
|
|
99
100
|
children: typeof feedbackText === "string" ? feedbackText.split("\n").map((line, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [line, index < feedbackText.split("\n").length - 1 && /* @__PURE__ */ jsx("br", {})] }, index)) : feedbackText
|
|
100
101
|
})]
|
|
101
102
|
});
|