@pixpilot/formily-shadcn 1.11.21 → 1.11.23

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,11 +1,11 @@
1
- import * as react2 from "react";
1
+ import * as react11 from "react";
2
2
  import { DatePickerProps } from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/DatePicker.d.ts
5
- declare const DatePicker: react2.ForwardRefExoticComponent<Partial<{
5
+ declare const DatePicker: react11.ForwardRefExoticComponent<Partial<{
6
6
  value?: Date;
7
7
  onChange?: (date: Date | undefined) => void;
8
8
  placeholder?: string;
9
- } & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> & react2.RefAttributes<unknown>>;
9
+ } & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> & react11.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { DatePicker };
@@ -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 react_jsx_runtime0 from "react/jsx-runtime";
5
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/Form.d.ts
8
8
  interface IFormProps extends FormContextStates {
@@ -27,6 +27,6 @@ declare function Form$1({
27
27
  onAutoSubmit,
28
28
  layout,
29
29
  settings
30
- }: IFormProps): react_jsx_runtime0.JSX.Element;
30
+ }: IFormProps): react_jsx_runtime1.JSX.Element;
31
31
  //#endregion
32
32
  export { Form$1 as Form };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime1 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/FormGrid.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): react_jsx_runtime1.JSX.Element;
10
+ }: IFormGridProps): react_jsx_runtime0.JSX.Element;
11
11
  //#endregion
12
12
  export { FormGrid };
@@ -1,4 +1,4 @@
1
- import * as react4 from "react";
1
+ import * as react6 from "react";
2
2
  import { IconPickerProps, IconProviderProps } from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/IconPicker.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: react4.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
11
+ declare const IconPicker: react6.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
12
12
  providers?: IconProviderProps[];
13
- }> & react4.RefAttributes<unknown>>;
13
+ }> & react6.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { IconPicker };
@@ -1,4 +1,4 @@
1
- import * as react6 from "react";
1
+ import * as react8 from "react";
2
2
  import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/IconToggle.d.ts
@@ -6,6 +6,6 @@ import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
6
6
  * Formily-connected IconToggle component
7
7
  * Toggle button with customizable icons for boolean values
8
8
  */
9
- declare const IconToggle: react6.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui0.IconToggleProps, "ref"> & react6.RefAttributes<HTMLButtonElement>>, "ref"> & react6.RefAttributes<unknown>>;
9
+ declare const IconToggle: react8.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui0.IconToggleProps, "ref"> & react8.RefAttributes<HTMLButtonElement>>, "ref"> & react8.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { IconToggle };
@@ -1,4 +1,4 @@
1
- import * as react9 from "react";
1
+ import * as react2 from "react";
2
2
 
3
3
  //#region src/components/Input.d.ts
4
4
 
@@ -6,12 +6,12 @@ import * as react9 from "react";
6
6
  * Formily-connected Input component
7
7
  * Automatically connects shadcn Input to Formily field state
8
8
  */
9
- declare const Input: react9.ForwardRefExoticComponent<Omit<Partial<react9.ClassAttributes<HTMLInputElement> & react9.InputHTMLAttributes<HTMLInputElement> & {
9
+ declare const Input: react2.ForwardRefExoticComponent<Omit<Partial<react2.ClassAttributes<HTMLInputElement> & react2.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"> & react9.RefAttributes<unknown>>;
15
+ }>, "ref"> & react2.RefAttributes<unknown>>;
16
16
  //#endregion
17
17
  export { Input };
@@ -1,4 +1,4 @@
1
- import * as react13 from "react";
1
+ import * as react16 from "react";
2
2
  import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/Rating.d.ts
@@ -6,8 +6,8 @@ import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
6
6
  * Formily-connected Rating component
7
7
  * Automatically connects shadcn-ui Rating to Formily field state
8
8
  */
9
- declare const Rating: react13.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.RatingProps & {
10
- children?: react13.ReactNode | undefined;
11
- }> & react13.RefAttributes<unknown>>;
9
+ declare const Rating: react16.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.RatingProps & {
10
+ children?: react16.ReactNode | undefined;
11
+ }> & react16.RefAttributes<unknown>>;
12
12
  //#endregion
13
13
  export { Rating };
@@ -1,4 +1,4 @@
1
- import * as react16 from "react";
1
+ import * as react28 from "react";
2
2
  import * as _radix_ui_react_separator0 from "@radix-ui/react-separator";
3
3
 
4
4
  //#region src/components/Separator.d.ts
@@ -6,6 +6,6 @@ import * as _radix_ui_react_separator0 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: react16.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react16.RefAttributes<HTMLDivElement>>, "ref"> & react16.RefAttributes<unknown>>;
9
+ declare const Separator: react28.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react28.RefAttributes<HTMLDivElement>>, "ref"> & react28.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Separator };
@@ -1,4 +1,4 @@
1
- import * as react19 from "react";
1
+ import * as react13 from "react";
2
2
  import * as _radix_ui_react_switch0 from "@radix-ui/react-switch";
3
3
 
4
4
  //#region src/components/Switch.d.ts
@@ -6,6 +6,6 @@ import * as _radix_ui_react_switch0 from "@radix-ui/react-switch";
6
6
  * Formily-connected Switch component
7
7
  * Toggle switch for boolean values
8
8
  */
9
- declare const Switch: react19.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react19.RefAttributes<HTMLButtonElement>>, "ref"> & react19.RefAttributes<unknown>>;
9
+ declare const Switch: react13.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react13.RefAttributes<HTMLButtonElement>>, "ref"> & react13.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Switch };
@@ -1,4 +1,4 @@
1
- import * as react22 from "react";
1
+ import * as react19 from "react";
2
2
  import * as _pixpilot_shadcn_ui1 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/TagsInputInline.d.ts
@@ -10,6 +10,6 @@ import * as _pixpilot_shadcn_ui1 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: react22.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui1.TagsInputProps> & react22.RefAttributes<unknown>>;
13
+ declare const TagsInputInLine: react19.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui1.TagsInputProps> & react19.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { TagsInputInLine };
@@ -1,9 +1,9 @@
1
- import * as react24 from "react";
1
+ import * as react21 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: react24.ForwardRefExoticComponent<Omit<Partial<react24.ClassAttributes<HTMLTextAreaElement> & react24.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react24.RefAttributes<unknown>>;
7
+ declare const Textarea: react21.ForwardRefExoticComponent<Omit<Partial<react21.ClassAttributes<HTMLTextAreaElement> & react21.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react21.RefAttributes<unknown>>;
8
8
  //#endregion
9
9
  export { Textarea };
@@ -1,4 +1,4 @@
1
- import * as react28 from "react";
1
+ import * as react25 from "react";
2
2
  import * as _pixpilot_shadcn_ui2 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/ToggleButton.d.ts
@@ -6,6 +6,6 @@ import * as _pixpilot_shadcn_ui2 from "@pixpilot/shadcn-ui";
6
6
  * Formily-connected IconToggle component
7
7
  * Toggle button with customizable icons for boolean values
8
8
  */
9
- declare const ToggleButton: react28.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui2.ToggleButtonProps, "ref"> & react28.RefAttributes<HTMLButtonElement>>, "ref"> & react28.RefAttributes<unknown>>;
9
+ declare const ToggleButton: react25.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui2.ToggleButtonProps, "ref"> & react25.RefAttributes<HTMLButtonElement>>, "ref"> & react25.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { ToggleButton };
@@ -8,6 +8,8 @@ let __formily_react = require("@formily/react");
8
8
  __formily_react = require_rolldown_runtime.__toESM(__formily_react);
9
9
  let react = require("react");
10
10
  react = require_rolldown_runtime.__toESM(react);
11
+ let __pixpilot_shadcn_ui = require("@pixpilot/shadcn-ui");
12
+ __pixpilot_shadcn_ui = require_rolldown_runtime.__toESM(__pixpilot_shadcn_ui);
11
13
  let react_jsx_runtime = require("react/jsx-runtime");
12
14
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
13
15
  let __pixpilot_shadcn = require("@pixpilot/shadcn");
@@ -34,14 +36,14 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
34
36
  const effectiveLabelPlacement = fieldLabelPlacement ?? propLabelPlacement ?? contextLabelPlacement ?? "top";
35
37
  const resolvedDescriptionPlacement = fieldComponentProps?.descriptionPlacement ?? fieldDecoratorProps?.descriptionPlacement ?? descriptionPlacement ?? contextDescriptionPlacement ?? resolveLegacyDescriptionPlacement(effectiveLabelPlacement);
36
38
  const id = field?.componentProps?.id ?? `form-${field?.address?.toString()?.replace(/\./gu, "-")}`;
37
- const descriptionId = react.default.useId();
38
- const feedbackId = react.default.useId();
39
+ const descriptionId = (0, __pixpilot_shadcn_ui.getId)(id, "description");
40
+ const feedbackId = (0, __pixpilot_shadcn_ui.getId)(id, "feedback");
39
41
  const descriptionRenderedInline = description != null && resolvedDescriptionPlacement !== "popover";
40
42
  const spacingConfig = require_spacing_config.getSpacingConfig(resolvedDescriptionPlacement, descriptionRenderedInline);
41
43
  const ariaDescribedBy = [descriptionRenderedInline ? descriptionId : void 0, feedbackText != null ? feedbackId : void 0].filter(Boolean).join(" ");
42
44
  const labelElement = effectiveLabel != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FormItemLabel.FormItemLabel, {
43
45
  "data-slot": "form-item-label",
44
- id,
46
+ id: (0, __pixpilot_shadcn_ui.getId)(id, "label"),
45
47
  label: effectiveLabel,
46
48
  asterisk,
47
49
  error: feedbackStatus === "error",
@@ -5,8 +5,9 @@ import { FormItemLabel } from "./FormItemLabel.js";
5
5
  import { getSpacingConfig } from "./spacing-config.js";
6
6
  import { useField } from "@formily/react";
7
7
  import React from "react";
8
+ import { getId } from "@pixpilot/shadcn-ui";
8
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
- import { cn } from "@pixpilot/shadcn";
10
+ import { cn as cn$1 } from "@pixpilot/shadcn";
10
11
 
11
12
  //#region src/components/form-item/BaseFormItem.tsx
12
13
  function resolveLegacyDescriptionPlacement(labelPlacement) {
@@ -29,14 +30,14 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
29
30
  const effectiveLabelPlacement = fieldLabelPlacement ?? propLabelPlacement ?? contextLabelPlacement ?? "top";
30
31
  const resolvedDescriptionPlacement = fieldComponentProps?.descriptionPlacement ?? fieldDecoratorProps?.descriptionPlacement ?? descriptionPlacement ?? contextDescriptionPlacement ?? resolveLegacyDescriptionPlacement(effectiveLabelPlacement);
31
32
  const id = field?.componentProps?.id ?? `form-${field?.address?.toString()?.replace(/\./gu, "-")}`;
32
- const descriptionId = React.useId();
33
- const feedbackId = React.useId();
33
+ const descriptionId = getId(id, "description");
34
+ const feedbackId = getId(id, "feedback");
34
35
  const descriptionRenderedInline = description != null && resolvedDescriptionPlacement !== "popover";
35
36
  const spacingConfig = getSpacingConfig(resolvedDescriptionPlacement, descriptionRenderedInline);
36
37
  const ariaDescribedBy = [descriptionRenderedInline ? descriptionId : void 0, feedbackText != null ? feedbackId : void 0].filter(Boolean).join(" ");
37
38
  const labelElement = effectiveLabel != null && /* @__PURE__ */ jsx(FormItemLabel, {
38
39
  "data-slot": "form-item-label",
39
- id,
40
+ id: getId(id, "label"),
40
41
  label: effectiveLabel,
41
42
  asterisk,
42
43
  error: feedbackStatus === "error",
@@ -45,7 +46,7 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
45
46
  ...fieldLabelProps,
46
47
  ...itemComponentsProps.label,
47
48
  ...slots?.label,
48
- className: cn(effectiveLabelPlacement === "top" ? spacingConfig.label : "mb-0", fieldLabelProps?.className, itemComponentsProps.label?.className, slots?.label?.className)
49
+ className: cn$1(effectiveLabelPlacement === "top" ? spacingConfig.label : "mb-0", fieldLabelProps?.className, itemComponentsProps.label?.className, slots?.label?.className)
49
50
  },
50
51
  description,
51
52
  descriptionInPopover: resolvedDescriptionPlacement === "popover" && description != null
@@ -54,7 +55,7 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
54
55
  "data-slot": "form-item-input",
55
56
  ...itemComponentsProps.inputWrapper,
56
57
  ...slots?.inputWrapper,
57
- className: cn("relative", itemComponentsProps.inputWrapper?.className, slots?.inputWrapper?.className),
58
+ className: cn$1("relative", itemComponentsProps.inputWrapper?.className, slots?.inputWrapper?.className),
58
59
  children: React.isValidElement(children) ? React.cloneElement(children, {
59
60
  id,
60
61
  "aria-describedby": ariaDescribedBy || void 0,
@@ -66,7 +67,7 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
66
67
  ...itemComponentsProps.description,
67
68
  ...slots?.description,
68
69
  id: descriptionId,
69
- className: cn("text-muted-foreground text-[0.8rem]", spacingConfig.description, itemComponentsProps.description?.className, slots?.description?.className),
70
+ className: cn$1("text-muted-foreground text-[0.8rem]", spacingConfig.description, itemComponentsProps.description?.className, slots?.description?.className),
70
71
  children: description
71
72
  }) : null;
72
73
  const contentElement = /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -74,7 +75,7 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
74
75
  resolvedDescriptionPlacement === "top" && descriptionElement,
75
76
  (effectiveLabelPlacement === "start" || effectiveLabelPlacement === "end") && /* @__PURE__ */ jsxs("div", {
76
77
  "data-slot": "form-item-content",
77
- className: cn("flex items-center gap-2", effectiveLabelPlacement === "start" && "flex-row"),
78
+ className: cn$1("flex items-center gap-2", effectiveLabelPlacement === "start" && "flex-row"),
78
79
  children: [
79
80
  effectiveLabelPlacement === "start" && labelElement,
80
81
  inputElement,
@@ -89,13 +90,13 @@ const BaseFormItem = ({ className, children, label, description, descriptionPlac
89
90
  ...itemComponentsProps.container,
90
91
  ...slots?.container,
91
92
  ...props,
92
- className: cn("flex flex-col ", className, itemComponentsProps.container?.className, slots?.container?.className),
93
+ className: cn$1("flex flex-col ", className, itemComponentsProps.container?.className, slots?.container?.className),
93
94
  children: [contentElement, Boolean(feedbackText) && /* @__PURE__ */ jsx("p", {
94
95
  "data-slot": "form-item-feedback",
95
96
  ...itemComponentsProps.error,
96
97
  ...slots?.error,
97
98
  id: feedbackId,
98
- className: cn("text-[0.8rem]", spacingConfig.feedback, feedbackStatus === "error" && "text-destructive font-medium", feedbackStatus === "warning" && "text-amber-600", feedbackStatus === "success" && "text-green-600", itemComponentsProps.error?.className, slots?.error?.className),
99
+ className: cn$1("text-[0.8rem]", spacingConfig.feedback, feedbackStatus === "error" && "text-destructive font-medium", feedbackStatus === "warning" && "text-amber-600", feedbackStatus === "success" && "text-green-600", itemComponentsProps.error?.className, slots?.error?.className),
99
100
  children: typeof feedbackText === "string" ? feedbackText.split("\n").map((line, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [line, index < feedbackText.split("\n").length - 1 && /* @__PURE__ */ jsx("br", {})] }, index)) : feedbackText
100
101
  })]
101
102
  });
@@ -1,15 +1,15 @@
1
- import * as react31 from "react";
1
+ import * as react33 from "react";
2
2
 
3
3
  //#region src/components/number/NumberInput.d.ts
4
4
  /**
5
5
  * Formily-connected Number Input component
6
6
  */
7
- declare const NumberInput: react31.ForwardRefExoticComponent<Omit<Partial<react31.ClassAttributes<HTMLInputElement> & react31.InputHTMLAttributes<HTMLInputElement> & {
7
+ declare const NumberInput: react33.ForwardRefExoticComponent<Omit<Partial<react33.ClassAttributes<HTMLInputElement> & react33.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"> & react31.RefAttributes<unknown>>;
13
+ }>, "ref"> & react33.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { NumberInput };