@pixpilot/formily-shadcn 0.1.4 → 0.3.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.ts +2 -2
- package/dist/components/date-picker.d.ts +3 -3
- 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.ts +2 -2
- 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/schema-field.cjs +1 -1
- package/dist/components/schema-field.d.cts +19 -9
- package/dist/components/schema-field.d.ts +191 -181
- package/dist/components/schema-field.js +1 -1
- package/dist/components/separator.d.cts +2 -2
- package/dist/components/separator.d.ts +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 +2 -2
- package/dist/components/tags-input-inline.d.cts +2 -2
- package/dist/components/tags-input-inline.d.ts +2 -2
- 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-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/transform-schema.cjs +1 -1
- package/dist/utils/transform-schema.js +1 -1
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArrayCards as e}from"./array-cards/array-cards.js";import"./array-cards/index.js";import{ArrayCollapse as t}from"./array-collapse/array-collapse.js";import"./array-collapse/index.js";import{Checkbox as n}from"./checkbox.js";import{Column as r}from"./column.js";import{Combobox as i}from"./combobox.js";import{DatePicker as a}from"./date-picker.js";import{FileUploadInline as o}from"./file-upload-inline.js";import{FormGrid as s}from"./form-grid.js";import{FormItem as c}from"./form-item.js";import{Input as l}from"./input.js";import{ArrayDialog as u}from"./array-dialog/array-dialog.js";import"./array-dialog/index.js";import{ArrayPopover as d}from"./array-popover/array-popover.js";import"./array-popover/index.js";import{NumberInput as f}from"./number-input.js";import{
|
|
1
|
+
import{ArrayCards as e}from"./array-cards/array-cards.js";import"./array-cards/index.js";import{ArrayCollapse as t}from"./array-collapse/array-collapse.js";import"./array-collapse/index.js";import{Checkbox as n}from"./checkbox.js";import{Column as r}from"./column.js";import{Combobox as i}from"./combobox.js";import{DatePicker as a}from"./date-picker.js";import{FileUploadInline as o}from"./file-upload-inline.js";import{FormGrid as s}from"./form-grid.js";import{FormItem as c}from"./form-item.js";import{Input as l}from"./input.js";import{ArrayDialog as u}from"./array-dialog/array-dialog.js";import"./array-dialog/index.js";import{ArrayPopover as d}from"./array-popover/array-popover.js";import"./array-popover/index.js";import{NumberInput as f}from"./number-input.js";import{ObjectContainer as p}from"./object-container.js";import{ConnectedRadio as m}from"./radio.js";import{Row as h}from"./row.js";import{Select as g}from"./select.js";import{Separator as _}from"./separator.js";import{Slider as v}from"./slider.js";import{Switch as y}from"./switch.js";import{Textarea as b}from"./textarea.js";import{createSchemaField as x}from"@formily/react";import{TagsInput as S}from"@pixpilot/shadcn-ui";const C=x({components:{FormItem:c,FormGrid:s,Row:h,Column:r,Input:l,Textarea:b,Checkbox:n,Radio:m,Select:g,NumberInput:f,DatePicker:a,Combobox:i,TagsInput:S,FileUploadInline:o,Separator:_,Slider:v,Switch:y,ArrayCards:e,ArrayDialog:u,ArrayCollapse:t,ArrayPopover:d,ObjectContainer:p}});var w=C;export{C as SchemaField,w as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react345 from "react";
|
|
2
2
|
import * as _radix_ui_react_separator8 from "@radix-ui/react-separator";
|
|
3
3
|
|
|
4
4
|
//#region src/components/separator.d.ts
|
|
@@ -6,6 +6,6 @@ import * as _radix_ui_react_separator8 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: react345.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator8.SeparatorProps & react345.RefAttributes<HTMLDivElement>>, "ref"> & react345.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Separator };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react349 from "react";
|
|
2
2
|
import * as _radix_ui_react_separator8 from "@radix-ui/react-separator";
|
|
3
3
|
|
|
4
4
|
//#region src/components/separator.d.ts
|
|
@@ -6,6 +6,6 @@ import * as _radix_ui_react_separator8 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: react349.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator8.SeparatorProps & react349.RefAttributes<HTMLDivElement>>, "ref"> & react349.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Separator };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react348 from "react";
|
|
2
2
|
import { SliderProps } from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/slider.d.ts
|
|
@@ -7,6 +7,6 @@ import { SliderProps } from "@pixpilot/shadcn-ui";
|
|
|
7
7
|
* Formily-connected Slider component
|
|
8
8
|
* Range input for selecting numeric values
|
|
9
9
|
*/
|
|
10
|
-
declare const Slider:
|
|
10
|
+
declare const Slider: react348.ForwardRefExoticComponent<Omit<Partial<SliderProps>, "ref"> & react348.RefAttributes<unknown>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Slider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react352 from "react";
|
|
2
2
|
import { SliderProps } from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/slider.d.ts
|
|
@@ -7,6 +7,6 @@ import { SliderProps } from "@pixpilot/shadcn-ui";
|
|
|
7
7
|
* Formily-connected Slider component
|
|
8
8
|
* Range input for selecting numeric values
|
|
9
9
|
*/
|
|
10
|
-
declare const Slider$1:
|
|
10
|
+
declare const Slider$1: react352.ForwardRefExoticComponent<Omit<Partial<SliderProps>, "ref"> & react352.RefAttributes<unknown>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Slider$1 as Slider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react350 from "react";
|
|
2
2
|
import * as _radix_ui_react_switch8 from "@radix-ui/react-switch";
|
|
3
3
|
|
|
4
4
|
//#region src/components/switch.d.ts
|
|
@@ -6,6 +6,6 @@ import * as _radix_ui_react_switch8 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: react350.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch8.SwitchProps & react350.RefAttributes<HTMLButtonElement>>, "ref"> & react350.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Switch };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react354 from "react";
|
|
2
2
|
import * as _radix_ui_react_switch8 from "@radix-ui/react-switch";
|
|
3
3
|
|
|
4
4
|
//#region src/components/switch.d.ts
|
|
@@ -6,6 +6,6 @@ import * as _radix_ui_react_switch8 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: react354.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch8.SwitchProps & react354.RefAttributes<HTMLButtonElement>>, "ref"> & react354.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Switch };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react353 from "react";
|
|
2
2
|
import * as _pixpilot_shadcn_ui17 from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/tags-input-inline.d.ts
|
|
@@ -10,6 +10,6 @@ import * as _pixpilot_shadcn_ui17 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: react353.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui17.TagsInputProps> & react353.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { TagsInputInLine };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react357 from "react";
|
|
2
2
|
import * as _pixpilot_shadcn_ui17 from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/tags-input-inline.d.ts
|
|
@@ -10,6 +10,6 @@ import * as _pixpilot_shadcn_ui17 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: react357.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui17.TagsInputProps> & react357.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { TagsInputInLine };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react355 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: react355.ForwardRefExoticComponent<Omit<Partial<react355.ClassAttributes<HTMLTextAreaElement> & react355.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react355.RefAttributes<unknown>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Textarea };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react0 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: react0.ForwardRefExoticComponent<Omit<Partial<react0.ClassAttributes<HTMLTextAreaElement> & react0.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react0.RefAttributes<unknown>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Textarea };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./use-label.cjs`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useLabel as e}from"./use-label.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`);let t=require(`@formily/react`);t=e.__toESM(t);let n=require(`@pixpilot/string`);n=e.__toESM(n);function r(e){let r=(0,t.useFieldSchema)(),i=r.name,a=r.title;return e??(a==null?i==null?null:typeof i==`string`?(0,n.toCapitalCase)(i):i:typeof a==`string`?(0,n.toCapitalCase)(a):a)}exports.useLabel=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useFieldSchema as e}from"@formily/react";import{toCapitalCase as t}from"@pixpilot/string";function n(n){let r=e(),i=r.name,a=r.title;return n??(a==null?i==null?null:typeof i==`string`?t(i):i:typeof a==`string`?t(a):a)}export{n as useLabel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../_virtual/rolldown_runtime.cjs`);let t=require(`json-schema-traverse`);t=e.__toESM(t);const n={string:{"x-component":`Input`,"x-decorator":`FormItem`},number:{"x-component":`NumberInput`,"x-decorator":`FormItem`},integer:{"x-component":`NumberInput`,"x-decorator":`FormItem`},boolean:{"x-component":`Checkbox`,"x-decorator":`FormItem`},array:{"x-component":`ArrayCards`,"x-decorator":`FormItem`}};function r(e){return(0,t.default)(e,{allKeys:!0,cb:e=>{let{type:t}=e;if(typeof t==`string`&&t in n){let r=n[t];e[`x-component`]=r[`x-component`],e[`x-decorator`]=r[`x-decorator`]}}}),e}exports.transformSchema=r;
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`);let t=require(`json-schema-traverse`);t=e.__toESM(t);const n={string:{"x-component":`Input`,"x-decorator":`FormItem`},number:{"x-component":`NumberInput`,"x-decorator":`FormItem`},integer:{"x-component":`NumberInput`,"x-decorator":`FormItem`},boolean:{"x-component":`Checkbox`,"x-decorator":`FormItem`},array:{"x-component":`ArrayCards`,"x-decorator":`FormItem`},object:{"x-component":`ObjectContainer`}};function r(e){return(0,t.default)(e,{allKeys:!0,cb:e=>{let{type:t}=e;if(typeof t==`string`&&t in n){let r=n[t];e[`x-component`]=r[`x-component`],e[`x-decorator`]=r[`x-decorator`]}}}),e}exports.transformSchema=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"json-schema-traverse";const t={string:{"x-component":`Input`,"x-decorator":`FormItem`},number:{"x-component":`NumberInput`,"x-decorator":`FormItem`},integer:{"x-component":`NumberInput`,"x-decorator":`FormItem`},boolean:{"x-component":`Checkbox`,"x-decorator":`FormItem`},array:{"x-component":`ArrayCards`,"x-decorator":`FormItem`}};function n(n){return e(n,{allKeys:!0,cb:e=>{let{type:n}=e;if(typeof n==`string`&&n in t){let r=t[n];e[`x-component`]=r[`x-component`],e[`x-decorator`]=r[`x-decorator`]}}}),n}export{n as transformSchema};
|
|
1
|
+
import e from"json-schema-traverse";const t={string:{"x-component":`Input`,"x-decorator":`FormItem`},number:{"x-component":`NumberInput`,"x-decorator":`FormItem`},integer:{"x-component":`NumberInput`,"x-decorator":`FormItem`},boolean:{"x-component":`Checkbox`,"x-decorator":`FormItem`},array:{"x-component":`ArrayCards`,"x-decorator":`FormItem`},object:{"x-component":`ObjectContainer`}};function n(n){return e(n,{allKeys:!0,cb:e=>{let{type:n}=e;if(typeof n==`string`&&n in t){let r=t[n];e[`x-component`]=r[`x-component`],e[`x-decorator`]=r[`x-decorator`]}}}),n}export{n as transformSchema};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixpilot/formily-shadcn",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"description": "Formily integration for shadcn/ui components",
|
|
6
6
|
"author": "m.doaie <m.doaie@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"@formily/react": "^2.3.7",
|
|
33
33
|
"@formily/reactive": "^2.3.7",
|
|
34
34
|
"@formily/shared": "^2.3.7",
|
|
35
|
+
"@pixpilot/string": "^2.3.0",
|
|
35
36
|
"json-schema-traverse": "^1.0.0",
|
|
36
37
|
"lucide-react": "^0.554.0",
|
|
37
38
|
"pretty-bytes": "^7.1.0",
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@storybook/react": "^10.0.8",
|
|
44
|
+
"@testing-library/react": "^16.3.0",
|
|
43
45
|
"@types/node": "^22.18.11",
|
|
44
46
|
"@types/react": "^19.2.6",
|
|
45
47
|
"@types/react-dom": "^19.2.3",
|
|
@@ -48,8 +50,8 @@
|
|
|
48
50
|
"react-dom": "19.2.0",
|
|
49
51
|
"tsdown": "^0.15.8",
|
|
50
52
|
"typescript": "^5.9.3",
|
|
51
|
-
"@internal/prettier-config": "0.0.1",
|
|
52
53
|
"@internal/eslint-config": "0.3.0",
|
|
54
|
+
"@internal/prettier-config": "0.0.1",
|
|
53
55
|
"@internal/tsconfig": "0.1.0",
|
|
54
56
|
"@internal/tsdown-config": "0.1.0",
|
|
55
57
|
"@internal/vitest-config": "0.1.0"
|