@pixpilot/formily-shadcn 0.30.4 → 0.31.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/array-dialog/edit-dialog.cjs +9 -9
- package/dist/components/array-dialog/edit-dialog.js +2 -2
- package/dist/components/checkbox.d.cts +2 -2
- package/dist/components/date-picker.d.cts +3 -3
- package/dist/components/file-upload/file-upload-inline.d.ts +8 -8
- package/dist/components/file-upload/file-upload.d.ts +8 -8
- package/dist/components/number/number-input.d.ts +3 -3
- package/dist/components/radio.d.cts +2 -2
- package/dist/components/row.d.cts +2 -2
- package/dist/components/schema-field/schema-field-basics.d.ts +259 -259
- package/dist/components/schema-field/schema-field-extended.d.cts +9 -9
- package/dist/components/schema-field/schema-field-extended.d.ts +555 -555
- package/dist/components/schema-field/schema-field.d.cts +9 -9
- package/dist/components/schema-field/schema-field.d.ts +336 -336
- package/dist/components/slider/slider-input.d.ts +3 -3
- package/dist/components/slider/slider-select.d.ts +3 -3
- package/dist/components/slider/slider.d.ts +3 -3
- package/dist/components/switch.d.cts +2 -2
- package/dist/components/tags-input-inline.d.cts +2 -2
- package/package.json +5 -5
|
@@ -3,10 +3,10 @@ const require_get_x_component_props = require('../../utils/get-x-component-props
|
|
|
3
3
|
require('../../utils/index.cjs');
|
|
4
4
|
let __formily_react = require("@formily/react");
|
|
5
5
|
__formily_react = require_rolldown_runtime.__toESM(__formily_react);
|
|
6
|
+
let __pixpilot_shadcn_ui = require("@pixpilot/shadcn-ui");
|
|
7
|
+
__pixpilot_shadcn_ui = require_rolldown_runtime.__toESM(__pixpilot_shadcn_ui);
|
|
6
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
9
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
-
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
9
|
-
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
10
10
|
|
|
11
11
|
//#region src/components/array-dialog/edit-dialog.tsx
|
|
12
12
|
/**
|
|
@@ -27,29 +27,29 @@ const EditDialog = (0, __formily_react.observer)(({ schema, onSave, onCancel, ac
|
|
|
27
27
|
onCancel(itemIndex);
|
|
28
28
|
};
|
|
29
29
|
const { className: itemWrapperClassName,...itemWrapperRestProps } = require_get_x_component_props.getXComponentProps(schema);
|
|
30
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
30
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.Dialog, {
|
|
31
31
|
open,
|
|
32
32
|
onOpenChange: (isOpen) => {
|
|
33
33
|
if (!isOpen) handleCancelClick();
|
|
34
34
|
},
|
|
35
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
35
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn_ui.DialogContent, {
|
|
36
36
|
className: "sm:max-w-[525px]",
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
39
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
38
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn_ui.DialogHeader, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.DialogTitle, { children: isNew ? "Add New Item" : `Edit Item #${(itemIndex ?? 0) + 1}` }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.DialogDescription, { children: isNew ? "Fill in the details for the new item. Click save when you're done." : "Make changes to the item. Click save when you're done." })] }),
|
|
39
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.DialogBody, {
|
|
40
40
|
...itemWrapperRestProps,
|
|
41
|
-
className: (0,
|
|
41
|
+
className: (0, __pixpilot_shadcn_ui.cn)("grid gap-4 py-4", itemWrapperClassName),
|
|
42
42
|
children: itemIndex != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__formily_react.RecursionField, {
|
|
43
43
|
schema,
|
|
44
44
|
name: itemIndex
|
|
45
45
|
})
|
|
46
46
|
}),
|
|
47
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
47
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn_ui.DialogFooter, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.Button, {
|
|
48
48
|
type: "button",
|
|
49
49
|
variant: "outline",
|
|
50
50
|
onClick: handleCancelClick,
|
|
51
51
|
children: "Cancel"
|
|
52
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
52
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.Button, {
|
|
53
53
|
type: "button",
|
|
54
54
|
onClick: handleSaveClick,
|
|
55
55
|
children: "Save Changes"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getXComponentProps } from "../../utils/get-x-component-props.js";
|
|
2
2
|
import "../../utils/index.js";
|
|
3
3
|
import { RecursionField, observer } from "@formily/react";
|
|
4
|
+
import { Button, Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, cn } from "@pixpilot/shadcn-ui";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, cn } from "@pixpilot/shadcn";
|
|
6
6
|
|
|
7
7
|
//#region src/components/array-dialog/edit-dialog.tsx
|
|
8
8
|
/**
|
|
@@ -32,7 +32,7 @@ const EditDialog = observer(({ schema, onSave, onCancel, activeItemManager }) =>
|
|
|
32
32
|
className: "sm:max-w-[525px]",
|
|
33
33
|
children: [
|
|
34
34
|
/* @__PURE__ */ jsxs(DialogHeader, { children: [/* @__PURE__ */ jsx(DialogTitle, { children: isNew ? "Add New Item" : `Edit Item #${(itemIndex ?? 0) + 1}` }), /* @__PURE__ */ jsx(DialogDescription, { children: isNew ? "Fill in the details for the new item. Click save when you're done." : "Make changes to the item. Click save when you're done." })] }),
|
|
35
|
-
/* @__PURE__ */ jsx(
|
|
35
|
+
/* @__PURE__ */ jsx(DialogBody, {
|
|
36
36
|
...itemWrapperRestProps,
|
|
37
37
|
className: cn("grid gap-4 py-4", itemWrapperClassName),
|
|
38
38
|
children: itemIndex != null && /* @__PURE__ */ jsx(RecursionField, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react0 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:
|
|
9
|
+
declare const Checkbox: react0.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_checkbox0.CheckboxProps & react0.RefAttributes<HTMLButtonElement>>, "ref"> & react0.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Checkbox };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react2 from "react";
|
|
2
2
|
import { DatePickerProps } from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/date-picker.d.ts
|
|
5
|
-
declare const DatePicker:
|
|
5
|
+
declare const DatePicker: react2.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">> & react2.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 _pixpilot_shadcn_ui1 from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/file-upload/file-upload-inline.d.ts
|
|
5
5
|
|
|
@@ -7,14 +7,14 @@ import * as _pixpilot_shadcn_ui9 from "@pixpilot/shadcn-ui";
|
|
|
7
7
|
* Formily-connected FileUploadInline component
|
|
8
8
|
* Automatically connects shadcn FileUploadInline to Formily field state
|
|
9
9
|
*/
|
|
10
|
-
declare const FileUploadInline$1: React.ForwardRefExoticComponent<(Omit<Partial<
|
|
10
|
+
declare const FileUploadInline$1: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui1.FileUploadInlineBaseProps & {
|
|
11
11
|
multiple: true;
|
|
12
|
-
value?:
|
|
13
|
-
onChange?:
|
|
14
|
-
} &
|
|
12
|
+
value?: _pixpilot_shadcn_ui1.FileMetadata[];
|
|
13
|
+
onChange?: _pixpilot_shadcn_ui1.OnChangeMultipleFiles;
|
|
14
|
+
} & _pixpilot_shadcn_ui1.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui1.FileUploadInlineBaseProps & {
|
|
15
15
|
multiple?: false;
|
|
16
|
-
value?:
|
|
17
|
-
onChange?:
|
|
18
|
-
} &
|
|
16
|
+
value?: _pixpilot_shadcn_ui1.FileMetadata | null;
|
|
17
|
+
onChange?: _pixpilot_shadcn_ui1.OnChangeSingleFile;
|
|
18
|
+
} & _pixpilot_shadcn_ui1.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { FileUploadInline$1 as FileUploadInline };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _pixpilot_shadcn_ui9 from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/file-upload/file-upload.d.ts
|
|
5
5
|
|
|
@@ -7,14 +7,14 @@ import * as _pixpilot_shadcn_ui1 from "@pixpilot/shadcn-ui";
|
|
|
7
7
|
* Formily-connected FileUploadInline component
|
|
8
8
|
* Automatically connects shadcn FileUploadInline to Formily field state
|
|
9
9
|
*/
|
|
10
|
-
declare const FileUpload$1: React.ForwardRefExoticComponent<(Omit<Partial<
|
|
10
|
+
declare const FileUpload$1: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui9.FileUploadInlineBaseProps & {
|
|
11
11
|
multiple: true;
|
|
12
|
-
value?:
|
|
13
|
-
onChange?:
|
|
14
|
-
} &
|
|
12
|
+
value?: _pixpilot_shadcn_ui9.FileMetadata[];
|
|
13
|
+
onChange?: _pixpilot_shadcn_ui9.OnChangeMultipleFiles;
|
|
14
|
+
} & _pixpilot_shadcn_ui9.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui9.FileUploadInlineBaseProps & {
|
|
15
15
|
multiple?: false;
|
|
16
|
-
value?:
|
|
17
|
-
onChange?:
|
|
18
|
-
} &
|
|
16
|
+
value?: _pixpilot_shadcn_ui9.FileMetadata | null;
|
|
17
|
+
onChange?: _pixpilot_shadcn_ui9.OnChangeSingleFile;
|
|
18
|
+
} & _pixpilot_shadcn_ui9.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { FileUpload$1 as FileUpload };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react25 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/number/number-input.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Formily-connected Number Input component
|
|
6
6
|
*/
|
|
7
|
-
declare const NumberInput:
|
|
7
|
+
declare const NumberInput: react25.ForwardRefExoticComponent<Omit<Partial<react25.ClassAttributes<HTMLInputElement> & react25.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"> &
|
|
13
|
+
}>, "ref"> & react25.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { NumberInput };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 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_runtime3.JSX.Element;
|
|
19
19
|
declare namespace Radio {
|
|
20
20
|
var displayName: string;
|
|
21
21
|
}
|
|
@@ -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/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_runtime2.JSX.Element;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { Row };
|