@pixpilot/formily-shadcn 0.3.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.
@@ -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{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
+ 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{Hidden as f}from"./hidden.js";import{NumberInput as p}from"./number-input.js";import{ObjectContainer as m}from"./object-container.js";import{ConnectedRadio as h}from"./radio.js";import{Row as g}from"./row.js";import{Select as _}from"./select.js";import{Separator as v}from"./separator.js";import{Slider as y}from"./slider.js";import{Switch as b}from"./switch.js";import{Textarea as x}from"./textarea.js";import{createSchemaField as S}from"@formily/react";import{TagsInput as C}from"@pixpilot/shadcn-ui";const w=S({components:{FormItem:c,FormGrid:s,Row:g,Column:r,Input:l,Textarea:x,Checkbox:n,Radio:h,Select:_,NumberInput:p,DatePicker:a,Combobox:i,TagsInput:C,FileUploadInline:o,Separator:v,Slider:y,Switch:b,ArrayCards:e,ArrayDialog:u,ArrayCollapse:t,ArrayPopover:d,ObjectContainer:m,Hidden:f}});var T=w;export{w as SchemaField,T as default};
@@ -1,4 +1,4 @@
1
- import * as react345 from "react";
1
+ import * as react363 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: react345.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator8.SeparatorProps & react345.RefAttributes<HTMLDivElement>>, "ref"> & react345.RefAttributes<unknown>>;
9
+ declare const Separator: react363.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator8.SeparatorProps & react363.RefAttributes<HTMLDivElement>>, "ref"> & react363.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Separator };
@@ -1,11 +1,11 @@
1
- import * as react349 from "react";
2
- import * as _radix_ui_react_separator8 from "@radix-ui/react-separator";
1
+ import * as react12 from "react";
2
+ import * as _radix_ui_react_separator0 from "@radix-ui/react-separator";
3
3
 
4
4
  //#region src/components/separator.d.ts
5
5
  /**
6
6
  * Formily-connected Separator component
7
7
  * A visual divider for content sections
8
8
  */
9
- declare const Separator: react349.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator8.SeparatorProps & react349.RefAttributes<HTMLDivElement>>, "ref"> & react349.RefAttributes<unknown>>;
9
+ declare const Separator: react12.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react12.RefAttributes<HTMLDivElement>>, "ref"> & react12.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Separator };
@@ -1,4 +1,4 @@
1
- import * as react348 from "react";
1
+ import * as react366 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: react348.ForwardRefExoticComponent<Omit<Partial<SliderProps>, "ref"> & react348.RefAttributes<unknown>>;
10
+ declare const Slider: react366.ForwardRefExoticComponent<Omit<Partial<SliderProps>, "ref"> & react366.RefAttributes<unknown>>;
11
11
  //#endregion
12
12
  export { Slider };
@@ -1,4 +1,4 @@
1
- import * as react352 from "react";
1
+ import * as react369 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: react352.ForwardRefExoticComponent<Omit<Partial<SliderProps>, "ref"> & react352.RefAttributes<unknown>>;
10
+ declare const Slider$1: react369.ForwardRefExoticComponent<Omit<Partial<SliderProps>, "ref"> & react369.RefAttributes<unknown>>;
11
11
  //#endregion
12
12
  export { Slider$1 as Slider };
@@ -1,4 +1,4 @@
1
- import * as react350 from "react";
1
+ import * as react368 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: react350.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch8.SwitchProps & react350.RefAttributes<HTMLButtonElement>>, "ref"> & react350.RefAttributes<unknown>>;
9
+ declare const Switch: react368.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch8.SwitchProps & react368.RefAttributes<HTMLButtonElement>>, "ref"> & react368.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Switch };
@@ -1,4 +1,4 @@
1
- import * as react354 from "react";
1
+ import * as react366 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: react354.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch8.SwitchProps & react354.RefAttributes<HTMLButtonElement>>, "ref"> & react354.RefAttributes<unknown>>;
9
+ declare const Switch: react366.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch8.SwitchProps & react366.RefAttributes<HTMLButtonElement>>, "ref"> & react366.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Switch };
@@ -1,4 +1,4 @@
1
- import * as react353 from "react";
1
+ import * as react371 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: react353.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui17.TagsInputProps> & react353.RefAttributes<unknown>>;
13
+ declare const TagsInputInLine: react371.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui17.TagsInputProps> & react371.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { TagsInputInLine };
@@ -1,4 +1,4 @@
1
- import * as react357 from "react";
1
+ import * as react371 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: react357.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui17.TagsInputProps> & react357.RefAttributes<unknown>>;
13
+ declare const TagsInputInLine: react371.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui17.TagsInputProps> & react371.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { TagsInputInLine };
@@ -1,9 +1,9 @@
1
- import * as react355 from "react";
1
+ import * as react373 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: react355.ForwardRefExoticComponent<Omit<Partial<react355.ClassAttributes<HTMLTextAreaElement> & react355.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react355.RefAttributes<unknown>>;
7
+ declare const Textarea: react373.ForwardRefExoticComponent<Omit<Partial<react373.ClassAttributes<HTMLTextAreaElement> & react373.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react373.RefAttributes<unknown>>;
8
8
  //#endregion
9
9
  export { Textarea };
@@ -1,9 +1,9 @@
1
- import * as react0 from "react";
1
+ import * as react373 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: react0.ForwardRefExoticComponent<Omit<Partial<react0.ClassAttributes<HTMLTextAreaElement> & react0.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react0.RefAttributes<unknown>>;
7
+ declare const Textarea: react373.ForwardRefExoticComponent<Omit<Partial<react373.ClassAttributes<HTMLTextAreaElement> & react373.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react373.RefAttributes<unknown>>;
8
8
  //#endregion
9
9
  export { Textarea };
@@ -1 +1 @@
1
- const e=require(`./use-label.cjs`);
1
+ const e=require(`./use-description.cjs`),t=require(`./use-label.cjs`);
@@ -1 +1 @@
1
- import{useLabel as e}from"./use-label.js";
1
+ import{useDescription as e}from"./use-description.js";import{useLabel as t}from"./use-label.js";
@@ -0,0 +1 @@
1
+ const e=require(`../_virtual/rolldown_runtime.cjs`);let t=require(`@formily/react`);t=e.__toESM(t);function n(e){let n=(0,t.useFieldSchema)().description;return e??n??null}exports.useDescription=n;
@@ -0,0 +1 @@
1
+ import{useFieldSchema as e}from"@formily/react";function t(t){let n=e().description;return t??n??null}export{t as useDescription};
@@ -1 +1 @@
1
- const e=require(`./create-panel-state-manager.cjs`),t=require(`./for-each-schema.cjs`),n=require(`./get-array-item-info.cjs`),r=require(`./get-default-value.cjs`),i=require(`./has-array-item-errors.cjs`),a=require(`./has-error.cjs`),o=require(`./transform-schema.cjs`),s=require(`./validate-array-item-fields.cjs`);require(`./use-array-item-editor.cjs`);
1
+ const e=require(`./has-error.cjs`),t=require(`./validate-array-item-fields.cjs`),n=require(`./create-panel-state-manager.cjs`),r=require(`./for-each-schema.cjs`),i=require(`./get-array-item-info.cjs`),a=require(`./get-default-value.cjs`),o=require(`./has-array-item-errors.cjs`),s=require(`./transform-schema.cjs`);require(`./use-array-item-editor.cjs`);
@@ -1 +1 @@
1
- import{createPanelStateManager as e}from"./create-panel-state-manager.js";import{forEachSchema as t}from"./for-each-schema.js";import{getArrayItemInfo as n}from"./get-array-item-info.js";import{getDefaultValue as r,getSchemaDefaultValue as i}from"./get-default-value.js";import{hasArrayItemErrors as a}from"./has-array-item-errors.js";import{fieldsHasError as o,filedHasError as s}from"./has-error.js";import{transformSchema as c}from"./transform-schema.js";import{validateArrayItemFields as l}from"./validate-array-item-fields.js";import"./use-array-item-editor.js";
1
+ import{fieldsHasError as e,filedHasError as t}from"./has-error.js";import{validateArrayItemFields as n}from"./validate-array-item-fields.js";import{createPanelStateManager as r}from"./create-panel-state-manager.js";import{forEachSchema as i}from"./for-each-schema.js";import{getArrayItemInfo as a}from"./get-array-item-info.js";import{getDefaultValue as o,getSchemaDefaultValue as s}from"./get-default-value.js";import{hasArrayItemErrors as c}from"./has-array-item-errors.js";import{transformSchema as l}from"./transform-schema.js";import"./use-array-item-editor.js";
@@ -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`},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
+ 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`],[`Hidden`].includes(e[`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`},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};
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`],[`Hidden`].includes(e[`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.3.0",
4
+ "version": "0.4.0",
5
5
  "description": "Formily integration for shadcn/ui components",
6
6
  "author": "m.doaie <m.doaie@hotmail.com>",
7
7
  "license": "MIT",
@@ -51,9 +51,9 @@
51
51
  "tsdown": "^0.15.8",
52
52
  "typescript": "^5.9.3",
53
53
  "@internal/eslint-config": "0.3.0",
54
- "@internal/prettier-config": "0.0.1",
55
54
  "@internal/tsconfig": "0.1.0",
56
55
  "@internal/tsdown-config": "0.1.0",
56
+ "@internal/prettier-config": "0.0.1",
57
57
  "@internal/vitest-config": "0.1.0"
58
58
  },
59
59
  "prettier": "@internal/prettier-config",