@pixpilot/formily-shadcn 0.2.0 → 0.4.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/checkbox.d.cts +2 -2
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/column.d.ts +2 -2
- package/dist/components/date-picker.d.cts +3 -3
- package/dist/components/date-picker.d.ts +3 -3
- package/dist/components/form-grid.d.cts +2 -2
- package/dist/components/form-grid.d.ts +2 -2
- package/dist/components/form-item.cjs +3 -3
- package/dist/components/form-item.d.cts +4 -3
- package/dist/components/form-item.d.ts +4 -3
- package/dist/components/form-item.js +3 -3
- package/dist/components/form.d.cts +2 -2
- package/dist/components/hidden.cjs +1 -0
- package/dist/components/hidden.js +1 -0
- package/dist/components/input.d.ts +2 -2
- package/dist/components/number-input.d.ts +2 -2
- package/dist/components/object-container.cjs +1 -0
- package/dist/components/object-container.d.cts +9 -0
- package/dist/components/object-container.d.ts +9 -0
- package/dist/components/object-container.js +1 -0
- package/dist/components/radio.d.cts +2 -2
- package/dist/components/row.d.cts +2 -2
- package/dist/components/row.d.ts +2 -2
- package/dist/components/schema-field.cjs +1 -1
- package/dist/components/schema-field.d.cts +64 -18
- package/dist/components/schema-field.d.ts +227 -181
- package/dist/components/schema-field.js +1 -1
- package/dist/components/separator.d.cts +2 -2
- package/dist/components/slider.d.cts +2 -2
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/switch.d.cts +2 -2
- package/dist/components/switch.d.ts +3 -3
- package/dist/components/tags-input-inline.d.cts +2 -2
- package/dist/components/tags-input-inline.d.ts +3 -3
- package/dist/components/textarea.d.cts +2 -2
- package/dist/components/textarea.d.ts +2 -2
- package/dist/hooks/index.cjs +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/use-description.cjs +1 -0
- package/dist/hooks/use-description.js +1 -0
- package/dist/hooks/use-label.cjs +1 -0
- package/dist/hooks/use-label.js +1 -0
- package/dist/types/react.d.cts +4 -0
- package/dist/types/react.d.ts +4 -0
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/transform-schema.cjs +1 -1
- package/dist/utils/transform-schema.js +1 -1
- package/package.json +3 -2
|
@@ -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,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,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 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_runtime3.JSX.Element;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { Column };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react2 from "react";
|
|
2
2
|
import * as react_day_picker0 from "react-day-picker";
|
|
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;
|
|
@@ -12,6 +12,6 @@ declare const DatePicker: react0.ForwardRefExoticComponent<Partial<{
|
|
|
12
12
|
placeholder?: string;
|
|
13
13
|
} & Omit<react_day_picker0.DayPickerProps & {
|
|
14
14
|
buttonVariant?: React.ComponentProps<typeof void 0>["variant"];
|
|
15
|
-
}, "
|
|
15
|
+
}, "onSelect" | "selected" | "mode">, "onSelect" | "selected" | "mode">> & react2.RefAttributes<unknown>>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { DatePicker };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react10 from "react";
|
|
2
2
|
import * as react_day_picker0 from "react-day-picker";
|
|
3
3
|
|
|
4
4
|
//#region src/components/date-picker.d.ts
|
|
5
|
-
declare const DatePicker:
|
|
5
|
+
declare const DatePicker: react10.ForwardRefExoticComponent<Partial<{
|
|
6
6
|
value?: Date;
|
|
7
7
|
onChange?: (date: Date | undefined) => void;
|
|
8
8
|
placeholder?: string;
|
|
@@ -12,6 +12,6 @@ declare const DatePicker: react0.ForwardRefExoticComponent<Partial<{
|
|
|
12
12
|
placeholder?: string;
|
|
13
13
|
} & Omit<react_day_picker0.DayPickerProps & {
|
|
14
14
|
buttonVariant?: React.ComponentProps<typeof void 0>["variant"];
|
|
15
|
-
}, "
|
|
15
|
+
}, "onSelect" | "selected" | "mode">, "onSelect" | "selected" | "mode">> & react10.RefAttributes<unknown>>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { DatePicker };
|
|
@@ -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/form-grid.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_runtime1.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_runtime1 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/form-grid.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_runtime1.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { FormGrid };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const e=require(`../_virtual/rolldown_runtime.cjs`)
|
|
2
|
-
`).map((e,t)=>(0,
|
|
3
|
-
`).length-1&&(0,
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../hooks/use-label.cjs`);require(`../hooks/index.cjs`);let n=require(`@formily/react`);n=e.__toESM(n);let r=require(`react`);r=e.__toESM(r);let i=require(`react/jsx-runtime`);i=e.__toESM(i);let a=require(`@pixpilot/shadcn`);a=e.__toESM(a);let o=require(`@formily/core`);o=e.__toESM(o);const s=({className:e,children:o,label:s,description:c,asterisk:l,feedbackStatus:u,feedbackText:d,labelPlacement:f=`top`,...p})=>{let m=(0,n.useField)(),h=m?.componentProps??{},g=t.useLabel(s),_=h.labelPlacement??f,v=m?.componentProps?.id??`form-${m?.address?.toString()?.replace(/\./gu,`-`)}`,y=r.default.useId(),b=r.default.useId(),x=[c==null?void 0:y,d==null?void 0:b].filter(Boolean).join(` `),S=g!=null&&(0,i.jsxs)(`label`,{htmlFor:v,"data-slot":`form-label`,"data-error":u===`error`,className:(0,a.cn)(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,u===`error`&&`text-destructive`,(_===`end`||_===`start`)&&`shrink-0`),children:[g,l&&(0,i.jsx)(`span`,{className:`text-destructive ml-1`,"aria-label":`required`,children:`*`})]}),C=(0,i.jsx)(`div`,{className:`relative`,children:r.default.isValidElement(o)?r.default.cloneElement(o,{id:v,"aria-describedby":x||void 0,"aria-invalid":u===`error`?`true`:void 0}):o}),w=(0,i.jsxs)(i.Fragment,{children:[_===`top`&&S,c!=null&&_===`top`&&(0,i.jsx)(`p`,{id:y,className:`text-muted-foreground text-[0.8rem]`,children:c}),(_===`start`||_===`end`)&&(0,i.jsxs)(`div`,{className:(0,a.cn)(`flex items-center gap-2`,_===`start`&&`flex-row`),children:[_===`start`&&S,C,_===`end`&&S]}),_===`top`&&C,c!=null&&(_===`start`||_===`end`)&&(0,i.jsx)(`p`,{id:y,className:`text-muted-foreground text-[0.8rem]`,children:c})]});return(0,i.jsxs)(`div`,{"data-slot":`form-item`,className:(0,a.cn)(`flex flex-col gap-2`,e),...p,children:[w,!!d&&(0,i.jsx)(`p`,{id:b,className:(0,a.cn)(`text-[0.8rem]`,u===`error`&&`text-destructive font-medium`,u===`warning`&&`text-amber-600`,u===`success`&&`text-green-600`),children:typeof d==`string`?d.split(`
|
|
2
|
+
`).map((e,t)=>(0,i.jsxs)(r.default.Fragment,{children:[e,t<d.split(`
|
|
3
|
+
`).length-1&&(0,i.jsx)(`br`,{})]},t)):d})]})},c=(0,n.connect)(s,(0,n.mapProps)((e,t)=>(0,o.isVoidField)(t)?{label:t.title??e.label,description:e.description??t.description,asterisk:e.asterisk}:{label:e.label??t.title,description:e.description??t.description,feedbackStatus:(()=>{if(!t.validating){if(t.selfErrors?.length)return`error`;if(t.selfWarnings?.length)return`warning`;if(t.selfSuccesses?.length)return`success`}})(),feedbackText:(()=>{if(!t.validating){if(e.feedbackText!=null)return e.feedbackText;if(t.selfErrors?.length)return t.selfErrors.join(`, `);if(t.selfWarnings?.length)return t.selfWarnings.join(`, `);if(t.selfSuccesses?.length)return t.selfSuccesses.join(`, `)}})(),asterisk:(()=>t.required&&t.pattern!==`readPretty`?!0:`asterisk`in e?!!e.asterisk:!1)()}));exports.FormItem=c;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { SyncReactNode } from "../types/react.cjs";
|
|
1
2
|
import React from "react";
|
|
2
3
|
|
|
3
4
|
//#region src/components/form-item.d.ts
|
|
4
5
|
type LabelPlacement = 'top' | 'bottom' | 'start' | 'end';
|
|
5
6
|
interface FormItemProps extends React.ComponentProps<'div'> {
|
|
6
|
-
label?:
|
|
7
|
-
description?:
|
|
7
|
+
label?: SyncReactNode;
|
|
8
|
+
description?: SyncReactNode;
|
|
8
9
|
asterisk?: boolean;
|
|
9
10
|
feedbackStatus?: 'error' | 'warning' | 'success';
|
|
10
|
-
feedbackText?:
|
|
11
|
+
feedbackText?: SyncReactNode;
|
|
11
12
|
labelPlacement?: LabelPlacement;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { SyncReactNode } from "../types/react.js";
|
|
1
2
|
import React from "react";
|
|
2
3
|
|
|
3
4
|
//#region src/components/form-item.d.ts
|
|
4
5
|
type LabelPlacement = 'top' | 'bottom' | 'start' | 'end';
|
|
5
6
|
interface FormItemProps extends React.ComponentProps<'div'> {
|
|
6
|
-
label?:
|
|
7
|
-
description?:
|
|
7
|
+
label?: SyncReactNode;
|
|
8
|
+
description?: SyncReactNode;
|
|
8
9
|
asterisk?: boolean;
|
|
9
10
|
feedbackStatus?: 'error' | 'warning' | 'success';
|
|
10
|
-
feedbackText?:
|
|
11
|
+
feedbackText?: SyncReactNode;
|
|
11
12
|
labelPlacement?: LabelPlacement;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`).map((e,t)=>s(i.Fragment,{children:[e,t<
|
|
3
|
-
`).length-1&&o(`br`,{})]},t)):
|
|
1
|
+
import{useLabel as e}from"../hooks/use-label.js";import"../hooks/index.js";import{connect as t,mapProps as n,useField as r}from"@formily/react";import i from"react";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";import{cn as c}from"@pixpilot/shadcn";import{isVoidField as l}from"@formily/core";const u=t(({className:t,children:n,label:l,description:u,asterisk:d,feedbackStatus:f,feedbackText:p,labelPlacement:m=`top`,...h})=>{let g=r(),_=g?.componentProps??{},v=e(l),y=_.labelPlacement??m,b=g?.componentProps?.id??`form-${g?.address?.toString()?.replace(/\./gu,`-`)}`,x=i.useId(),S=i.useId(),C=[u==null?void 0:x,p==null?void 0:S].filter(Boolean).join(` `),w=v!=null&&s(`label`,{htmlFor:b,"data-slot":`form-label`,"data-error":f===`error`,className:c(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,f===`error`&&`text-destructive`,(y===`end`||y===`start`)&&`shrink-0`),children:[v,d&&o(`span`,{className:`text-destructive ml-1`,"aria-label":`required`,children:`*`})]}),T=o(`div`,{className:`relative`,children:i.isValidElement(n)?i.cloneElement(n,{id:b,"aria-describedby":C||void 0,"aria-invalid":f===`error`?`true`:void 0}):n}),E=s(a,{children:[y===`top`&&w,u!=null&&y===`top`&&o(`p`,{id:x,className:`text-muted-foreground text-[0.8rem]`,children:u}),(y===`start`||y===`end`)&&s(`div`,{className:c(`flex items-center gap-2`,y===`start`&&`flex-row`),children:[y===`start`&&w,T,y===`end`&&w]}),y===`top`&&T,u!=null&&(y===`start`||y===`end`)&&o(`p`,{id:x,className:`text-muted-foreground text-[0.8rem]`,children:u})]});return s(`div`,{"data-slot":`form-item`,className:c(`flex flex-col gap-2`,t),...h,children:[E,!!p&&o(`p`,{id:S,className:c(`text-[0.8rem]`,f===`error`&&`text-destructive font-medium`,f===`warning`&&`text-amber-600`,f===`success`&&`text-green-600`),children:typeof p==`string`?p.split(`
|
|
2
|
+
`).map((e,t)=>s(i.Fragment,{children:[e,t<p.split(`
|
|
3
|
+
`).length-1&&o(`br`,{})]},t)):p})]})},n((e,t)=>l(t)?{label:t.title??e.label,description:e.description??t.description,asterisk:e.asterisk}:{label:e.label??t.title,description:e.description??t.description,feedbackStatus:(()=>{if(!t.validating){if(t.selfErrors?.length)return`error`;if(t.selfWarnings?.length)return`warning`;if(t.selfSuccesses?.length)return`success`}})(),feedbackText:(()=>{if(!t.validating){if(e.feedbackText!=null)return e.feedbackText;if(t.selfErrors?.length)return t.selfErrors.join(`, `);if(t.selfWarnings?.length)return t.selfWarnings.join(`, `);if(t.selfSuccesses?.length)return t.selfSuccesses.join(`, `)}})(),asterisk:(()=>t.required&&t.pattern!==`readPretty`?!0:`asterisk`in e?!!e.asterisk:!1)()}));export{u as FormItem};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Form } from "@formily/core";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/form.d.ts
|
|
6
6
|
interface IFormProps {
|
|
@@ -21,6 +21,6 @@ declare function Form$1({
|
|
|
21
21
|
children,
|
|
22
22
|
onSubmit,
|
|
23
23
|
onAutoSubmit
|
|
24
|
-
}: IFormProps):
|
|
24
|
+
}: IFormProps): react_jsx_runtime0.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { Form$1 as Form };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`);let t=require(`@formily/react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n);const r=e=>(0,n.jsx)(`input`,{type:`hidden`,value:e.value}),i=(0,t.connect)(r,(0,t.mapProps)((e,t)=>({...e,value:t.value??``})));exports.Hidden=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{connect as e,mapProps as t}from"@formily/react";import{jsx as n}from"react/jsx-runtime";const r=e(e=>n(`input`,{type:`hidden`,value:e.value}),t((e,t)=>({...e,value:t.value??``})));export{r as Hidden};
|
|
@@ -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,6 +6,6 @@ import * as react8 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>>, "ref"> & react2.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Input };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react6 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/number-input.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Formily-connected Number Input component
|
|
6
6
|
*/
|
|
7
|
-
declare const NumberInput:
|
|
7
|
+
declare const NumberInput: react6.ForwardRefExoticComponent<Omit<Partial<react6.ClassAttributes<HTMLInputElement> & react6.InputHTMLAttributes<HTMLInputElement>>, "ref"> & react6.RefAttributes<unknown>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { NumberInput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../hooks/use-description.cjs`),n=require(`../hooks/use-label.cjs`);require(`../hooks/index.cjs`);let r=require(`react/jsx-runtime`);r=e.__toESM(r);let i=require(`@pixpilot/shadcn`);i=e.__toESM(i);const a=({className:e,children:a,label:o,description:s,...c})=>{let l=n.useLabel(o),u=t.useDescription(s);return(0,r.jsxs)(i.Card,{...c,className:(0,i.cn)(`w-full max-w-sm`,e),children:[(l!=null||u!=null)&&(0,r.jsxs)(i.CardHeader,{children:[l!=null&&(0,r.jsx)(i.CardTitle,{children:l}),u!=null&&(0,r.jsx)(i.CardDescription,{children:u})]}),(0,r.jsx)(i.CardContent,{children:a})]})};exports.ObjectContainer=a;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SyncReactNode } from "../types/react.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/components/object-container.d.ts
|
|
4
|
+
interface ObjectContainerProps extends React.ComponentProps<'div'> {
|
|
5
|
+
label?: SyncReactNode;
|
|
6
|
+
description?: SyncReactNode;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ObjectContainerProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SyncReactNode } from "../types/react.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/object-container.d.ts
|
|
4
|
+
interface ObjectContainerProps extends React.ComponentProps<'div'> {
|
|
5
|
+
label?: SyncReactNode;
|
|
6
|
+
description?: SyncReactNode;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ObjectContainerProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useDescription as e}from"../hooks/use-description.js";import{useLabel as t}from"../hooks/use-label.js";import"../hooks/index.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{Card as i,CardContent as a,CardDescription as o,CardHeader as s,CardTitle as c,cn as l}from"@pixpilot/shadcn";const u=({className:u,children:d,label:f,description:p,...m})=>{let h=t(f),g=e(p);return r(i,{...m,className:l(`w-full max-w-sm`,u),children:[(h!=null||g!=null)&&r(s,{children:[h!=null&&n(c,{children:h}),g!=null&&n(o,{children:g})]}),n(a,{children:d})]})};export{u as ObjectContainer};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, 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
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 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_runtime3.JSX.Element;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { Row };
|
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_runtime0 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_runtime0.JSX.Element;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { Row };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`./array-cards/array-cards.cjs`);require(`./array-cards/index.cjs`);const n=require(`./array-collapse/array-collapse.cjs`);require(`./array-collapse/index.cjs`);const r=require(`./checkbox.cjs`),i=require(`./column.cjs`),a=require(`./combobox.cjs`),o=require(`./date-picker.cjs`),s=require(`./file-upload-inline.cjs`),c=require(`./form-grid.cjs`),l=require(`./form-item.cjs`),u=require(`./input.cjs`),d=require(`./array-dialog/array-dialog.cjs`);require(`./array-dialog/index.cjs`);const f=require(`./array-popover/array-popover.cjs`);require(`./array-popover/index.cjs`);const p=require(`./number-input.cjs`),
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`./array-cards/array-cards.cjs`);require(`./array-cards/index.cjs`);const n=require(`./array-collapse/array-collapse.cjs`);require(`./array-collapse/index.cjs`);const r=require(`./checkbox.cjs`),i=require(`./column.cjs`),a=require(`./combobox.cjs`),o=require(`./date-picker.cjs`),s=require(`./file-upload-inline.cjs`),c=require(`./form-grid.cjs`),l=require(`./form-item.cjs`),u=require(`./input.cjs`),d=require(`./array-dialog/array-dialog.cjs`);require(`./array-dialog/index.cjs`);const f=require(`./array-popover/array-popover.cjs`);require(`./array-popover/index.cjs`);const p=require(`./hidden.cjs`),m=require(`./number-input.cjs`),h=require(`./object-container.cjs`),g=require(`./radio.cjs`),_=require(`./row.cjs`),v=require(`./select.cjs`),y=require(`./separator.cjs`),b=require(`./slider.cjs`),x=require(`./switch.cjs`),S=require(`./textarea.cjs`);let C=require(`@formily/react`);C=e.__toESM(C);let w=require(`@pixpilot/shadcn-ui`);w=e.__toESM(w);const T=(0,C.createSchemaField)({components:{FormItem:l.FormItem,FormGrid:c.FormGrid,Row:_.Row,Column:i.Column,Input:u.Input,Textarea:S.Textarea,Checkbox:r.Checkbox,Radio:g.ConnectedRadio,Select:v.Select,NumberInput:m.NumberInput,DatePicker:o.DatePicker,Combobox:a.Combobox,TagsInput:w.TagsInput,FileUploadInline:s.FileUploadInline,Separator:y.Separator,Slider:b.Slider,Switch:x.Switch,ArrayCards:t.ArrayCards,ArrayDialog:d.ArrayDialog,ArrayCollapse:n.ArrayCollapse,ArrayPopover:f.ArrayPopover,ObjectContainer:h.ObjectContainer,Hidden:p.Hidden}});var E=T;exports.SchemaField=T,exports.default=E;
|