@pixpilot/formily-shadcn 0.21.10 → 0.22.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/date-picker.d.cts +3 -3
- package/dist/components/date-picker.d.ts +3 -3
- package/dist/components/file-upload/file-upload.d.cts +8 -8
- package/dist/components/form.d.cts +2 -2
- package/dist/components/icon-picker.d.cts +3 -3
- package/dist/components/icon-picker.d.ts +3 -3
- package/dist/components/input.d.cts +3 -3
- package/dist/components/input.d.ts +3 -3
- package/dist/components/number/number-input.d.ts +3 -3
- package/dist/components/object-container.cjs +5 -4
- package/dist/components/object-container.d.cts +12 -6
- package/dist/components/object-container.d.ts +12 -6
- package/dist/components/object-container.js +5 -4
- package/dist/components/radio.d.cts +2 -2
- package/dist/components/schema-field/schema-field-basics.d.cts +233 -233
- package/dist/components/schema-field/schema-field-basics.d.ts +248 -248
- package/dist/components/schema-field/schema-field-extended.d.cts +274 -274
- package/dist/components/schema-field/schema-field-extended.d.ts +545 -545
- package/dist/components/schema-field/schema-field.d.cts +319 -319
- package/dist/components/schema-field/schema-field.d.ts +319 -319
- package/dist/components/separator.d.ts +2 -2
- package/dist/components/slider/slider-input.d.ts +3 -3
- package/dist/components/slider/slider-select.d.cts +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.ts +2 -2
- package/dist/components/tags-input-inline.d.cts +2 -2
- package/dist/components/textarea.d.cts +2 -2
- package/dist/components/textarea.d.ts +2 -2
- package/package.json +1 -1
|
@@ -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, "
|
|
9
|
+
} & Omit<DatePickerProps, "selected" | "onSelect" | "mode">> & react2.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { DatePicker };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react0 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$1:
|
|
5
|
+
declare const DatePicker$1: react0.ForwardRefExoticComponent<Partial<{
|
|
6
6
|
value?: Date;
|
|
7
7
|
onChange?: (date: Date | undefined) => void;
|
|
8
8
|
placeholder?: string;
|
|
9
|
-
} & Omit<DatePickerProps, "
|
|
9
|
+
} & Omit<DatePickerProps, "selected" | "onSelect" | "mode">> & react0.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 _pixpilot_shadcn_ui8 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_ui294 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: React.ForwardRefExoticComponent<(Omit<Partial<
|
|
10
|
+
declare const FileUpload: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui8.FileUploadInlineBaseProps & {
|
|
11
11
|
multiple: true;
|
|
12
|
-
value?:
|
|
13
|
-
onChange?:
|
|
14
|
-
} &
|
|
12
|
+
value?: _pixpilot_shadcn_ui8.FileMetadata[];
|
|
13
|
+
onChange?: _pixpilot_shadcn_ui8.OnChangeMultipleFiles;
|
|
14
|
+
} & _pixpilot_shadcn_ui8.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui8.FileUploadInlineBaseProps & {
|
|
15
15
|
multiple?: false;
|
|
16
|
-
value?:
|
|
17
|
-
onChange?:
|
|
18
|
-
} &
|
|
16
|
+
value?: _pixpilot_shadcn_ui8.FileMetadata | null;
|
|
17
|
+
onChange?: _pixpilot_shadcn_ui8.OnChangeSingleFile;
|
|
18
|
+
} & _pixpilot_shadcn_ui8.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { FileUpload };
|
|
@@ -2,7 +2,7 @@ import { FormContextStates } from "./context/form-context.cjs";
|
|
|
2
2
|
import "./context/index.cjs";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Form } from "@formily/core";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/form.d.ts
|
|
8
8
|
interface IFormProps extends FormContextStates {
|
|
@@ -25,6 +25,6 @@ declare function Form$1({
|
|
|
25
25
|
onAutoSubmit,
|
|
26
26
|
layout,
|
|
27
27
|
settings
|
|
28
|
-
}: IFormProps):
|
|
28
|
+
}: IFormProps): react_jsx_runtime0.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Form$1 as Form };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react4 from "react";
|
|
2
2
|
import { IconPickerProps, IconProviderProps } from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/icon-picker.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: react4.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
|
|
12
12
|
providers?: IconProviderProps[];
|
|
13
|
-
}> &
|
|
13
|
+
}> & react4.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/icon-picker.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,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react6 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/input.d.ts
|
|
4
4
|
|
|
@@ -6,12 +6,12 @@ import * as react2 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: react6.ForwardRefExoticComponent<Omit<Partial<react6.ClassAttributes<HTMLInputElement> & react6.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"> & react6.RefAttributes<unknown>>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { Input };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react4 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/input.d.ts
|
|
4
4
|
|
|
@@ -6,12 +6,12 @@ import * as react6 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: react4.ForwardRefExoticComponent<Omit<Partial<react4.ClassAttributes<HTMLInputElement> & react4.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"> & react4.RefAttributes<unknown>>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { Input };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react22 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: react22.ForwardRefExoticComponent<Omit<Partial<react22.ClassAttributes<HTMLInputElement> & react22.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"> & react22.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { NumberInput };
|
|
@@ -35,9 +35,10 @@ const cardPaddingConfig = {
|
|
|
35
35
|
},
|
|
36
36
|
responsive: "py-5 md:py-6 lg:py-7"
|
|
37
37
|
};
|
|
38
|
-
const ObjectContainer = ({ className, children, label, description, slotProps,...rest }) => {
|
|
38
|
+
const ObjectContainer = ({ className, children, label, description, variant = "grouped", slotProps,...rest }) => {
|
|
39
39
|
const effectiveLabel = require_use_label.useLabel(label);
|
|
40
40
|
const desc = require_use_description.useDescription(description);
|
|
41
|
+
const isFlat = variant === "flat";
|
|
41
42
|
const { layout } = require_use_form_context.useFormContext();
|
|
42
43
|
const { objectContainer, density } = layout || {};
|
|
43
44
|
const gapClass = require_resolve_responsive_space.resolveResponsiveGapClass({ density });
|
|
@@ -72,10 +73,10 @@ const ObjectContainer = ({ className, children, label, description, slotProps,..
|
|
|
72
73
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Card, {
|
|
73
74
|
...mergedCardProps,
|
|
74
75
|
...rest,
|
|
75
|
-
className: (0, __pixpilot_shadcn.cn)("form-object-card", "bg-transparent", gapClass, cardPaddingClass, className, mergedCardProps.className),
|
|
76
|
+
className: (0, __pixpilot_shadcn.cn)("form-object-card", "bg-transparent", gapClass, cardPaddingClass, isFlat && "border-0 shadow-none !py-0", className, mergedCardProps.className),
|
|
76
77
|
children: [(effectiveLabel != null || desc != null) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.CardHeader, {
|
|
77
78
|
...mergedHeaderProps,
|
|
78
|
-
className: (0, __pixpilot_shadcn.cn)("form-object-header", headerGapClass, mergedHeaderProps.className),
|
|
79
|
+
className: (0, __pixpilot_shadcn.cn)("form-object-header", headerGapClass, mergedHeaderProps.className, isFlat && "px-0"),
|
|
79
80
|
children: [effectiveLabel != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.CardTitle, {
|
|
80
81
|
...mergedTitleProps,
|
|
81
82
|
className: (0, __pixpilot_shadcn.cn)("form-object-title", mergedTitleProps.className),
|
|
@@ -88,7 +89,7 @@ const ObjectContainer = ({ className, children, label, description, slotProps,..
|
|
|
88
89
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_form_items_container.FormItemContainer, {
|
|
89
90
|
...mergedContentProps,
|
|
90
91
|
as: __pixpilot_shadcn.CardContent,
|
|
91
|
-
className: (0, __pixpilot_shadcn.cn)("form-object-content", mergedContentProps.className),
|
|
92
|
+
className: (0, __pixpilot_shadcn.cn)("form-object-content", mergedContentProps.className, isFlat && "px-0"),
|
|
92
93
|
children
|
|
93
94
|
})]
|
|
94
95
|
});
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { SyncReactNode } from "../types/react.cjs";
|
|
2
|
-
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@pixpilot/shadcn";
|
|
3
2
|
|
|
4
3
|
//#region src/components/object-container.d.ts
|
|
4
|
+
type ObjectContainerVariant = 'grouped' | 'flat';
|
|
5
5
|
interface ObjectContainerProps extends React.ComponentProps<'div'> {
|
|
6
6
|
label?: SyncReactNode;
|
|
7
7
|
description?: SyncReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Visual style variant.
|
|
10
|
+
* - `grouped`: Card has padding, creating a visually distinct group (default)
|
|
11
|
+
* - `flat`: No horizontal padding - fields align flush with surrounding form
|
|
12
|
+
*/
|
|
13
|
+
variant?: ObjectContainerVariant;
|
|
8
14
|
slotProps?: {
|
|
9
|
-
card?: React.ComponentProps<
|
|
10
|
-
header?: React.ComponentProps<
|
|
11
|
-
title?: React.ComponentProps<
|
|
12
|
-
description?: React.ComponentProps<
|
|
13
|
-
content?: React.ComponentProps<
|
|
15
|
+
card?: React.ComponentProps<'div'>;
|
|
16
|
+
header?: React.ComponentProps<'div'>;
|
|
17
|
+
title?: React.ComponentProps<'div'>;
|
|
18
|
+
description?: React.ComponentProps<'div'>;
|
|
19
|
+
content?: React.ComponentProps<'div'>;
|
|
14
20
|
};
|
|
15
21
|
}
|
|
16
22
|
//#endregion
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { SyncReactNode } from "../types/react.js";
|
|
2
|
-
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@pixpilot/shadcn";
|
|
3
2
|
|
|
4
3
|
//#region src/components/object-container.d.ts
|
|
4
|
+
type ObjectContainerVariant = 'grouped' | 'flat';
|
|
5
5
|
interface ObjectContainerProps extends React.ComponentProps<'div'> {
|
|
6
6
|
label?: SyncReactNode;
|
|
7
7
|
description?: SyncReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Visual style variant.
|
|
10
|
+
* - `grouped`: Card has padding, creating a visually distinct group (default)
|
|
11
|
+
* - `flat`: No horizontal padding - fields align flush with surrounding form
|
|
12
|
+
*/
|
|
13
|
+
variant?: ObjectContainerVariant;
|
|
8
14
|
slotProps?: {
|
|
9
|
-
card?: React.ComponentProps<
|
|
10
|
-
header?: React.ComponentProps<
|
|
11
|
-
title?: React.ComponentProps<
|
|
12
|
-
description?: React.ComponentProps<
|
|
13
|
-
content?: React.ComponentProps<
|
|
15
|
+
card?: React.ComponentProps<'div'>;
|
|
16
|
+
header?: React.ComponentProps<'div'>;
|
|
17
|
+
title?: React.ComponentProps<'div'>;
|
|
18
|
+
description?: React.ComponentProps<'div'>;
|
|
19
|
+
content?: React.ComponentProps<'div'>;
|
|
14
20
|
};
|
|
15
21
|
}
|
|
16
22
|
//#endregion
|
|
@@ -32,9 +32,10 @@ const cardPaddingConfig = {
|
|
|
32
32
|
},
|
|
33
33
|
responsive: "py-5 md:py-6 lg:py-7"
|
|
34
34
|
};
|
|
35
|
-
const ObjectContainer = ({ className, children, label, description, slotProps,...rest }) => {
|
|
35
|
+
const ObjectContainer = ({ className, children, label, description, variant = "grouped", slotProps,...rest }) => {
|
|
36
36
|
const effectiveLabel = useLabel(label);
|
|
37
37
|
const desc = useDescription(description);
|
|
38
|
+
const isFlat = variant === "flat";
|
|
38
39
|
const { layout } = useFormContext();
|
|
39
40
|
const { objectContainer, density } = layout || {};
|
|
40
41
|
const gapClass = resolveResponsiveGapClass({ density });
|
|
@@ -69,10 +70,10 @@ const ObjectContainer = ({ className, children, label, description, slotProps,..
|
|
|
69
70
|
return /* @__PURE__ */ jsxs(Card, {
|
|
70
71
|
...mergedCardProps,
|
|
71
72
|
...rest,
|
|
72
|
-
className: cn("form-object-card", "bg-transparent", gapClass, cardPaddingClass, className, mergedCardProps.className),
|
|
73
|
+
className: cn("form-object-card", "bg-transparent", gapClass, cardPaddingClass, isFlat && "border-0 shadow-none !py-0", className, mergedCardProps.className),
|
|
73
74
|
children: [(effectiveLabel != null || desc != null) && /* @__PURE__ */ jsxs(CardHeader, {
|
|
74
75
|
...mergedHeaderProps,
|
|
75
|
-
className: cn("form-object-header", headerGapClass, mergedHeaderProps.className),
|
|
76
|
+
className: cn("form-object-header", headerGapClass, mergedHeaderProps.className, isFlat && "px-0"),
|
|
76
77
|
children: [effectiveLabel != null && /* @__PURE__ */ jsx(CardTitle, {
|
|
77
78
|
...mergedTitleProps,
|
|
78
79
|
className: cn("form-object-title", mergedTitleProps.className),
|
|
@@ -85,7 +86,7 @@ const ObjectContainer = ({ className, children, label, description, slotProps,..
|
|
|
85
86
|
}), /* @__PURE__ */ jsx(FormItemContainer, {
|
|
86
87
|
...mergedContentProps,
|
|
87
88
|
as: CardContent,
|
|
88
|
-
className: cn("form-object-content", mergedContentProps.className),
|
|
89
|
+
className: cn("form-object-content", mergedContentProps.className, isFlat && "px-0"),
|
|
89
90
|
children
|
|
90
91
|
})]
|
|
91
92
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 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_runtime2.JSX.Element;
|
|
19
19
|
declare namespace Radio {
|
|
20
20
|
var displayName: string;
|
|
21
21
|
}
|