@rockshin/tao-ui 0.0.57 → 0.0.59

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.
Files changed (109) hide show
  1. package/dist/components/affix/affix.js +38 -4
  2. package/dist/components/app/app-modals.js +11 -6
  3. package/dist/components/app/app-notices.js +112 -47
  4. package/dist/components/auto-complete/auto-complete.js +9 -2
  5. package/dist/components/avatar/avatar.js +1 -1
  6. package/dist/components/badge/badge.js +2 -2
  7. package/dist/components/breadcrumb/breadcrumb.js +5 -1
  8. package/dist/components/calendar/calendar.js +24 -17
  9. package/dist/components/carousel/carousel.js +35 -16
  10. package/dist/components/cascader/cascader.js +17 -12
  11. package/dist/components/checkbox/checkbox.d.ts +3 -1
  12. package/dist/components/checkbox/checkbox.js +65 -58
  13. package/dist/components/collapse/collapse-panels.js +68 -67
  14. package/dist/components/color-picker/color-picker.js +383 -360
  15. package/dist/components/date-picker/calendar/calendar-grid.d.ts +5 -3
  16. package/dist/components/date-picker/calendar/calendar-grid.js +9 -4
  17. package/dist/components/date-picker/calendar/month-grid.d.ts +2 -1
  18. package/dist/components/date-picker/calendar/month-grid.js +61 -45
  19. package/dist/components/date-picker/calendar/time-panel.d.ts +8 -1
  20. package/dist/components/date-picker/calendar/time-panel.js +89 -88
  21. package/dist/components/date-picker/calendar/year-grid.d.ts +2 -1
  22. package/dist/components/date-picker/calendar/year-grid.js +60 -44
  23. package/dist/components/date-picker/date-localization.js +12 -14
  24. package/dist/components/date-picker/date-picker.css +9 -0
  25. package/dist/components/date-picker/date-picker.js +22 -13
  26. package/dist/components/date-picker/range-picker.d.ts +2 -0
  27. package/dist/components/date-picker/range-picker.js +127 -70
  28. package/dist/components/date-picker/types.js +1 -1
  29. package/dist/components/divider/divider.js +1 -1
  30. package/dist/components/drawer/drawer.d.ts +1 -1
  31. package/dist/components/drawer/drawer.js +4 -3
  32. package/dist/components/dropdown/dropdown.js +11 -9
  33. package/dist/components/float-button/float-button.js +11 -9
  34. package/dist/components/form/form-item.d.ts +1 -1
  35. package/dist/components/form/form-item.js +160 -120
  36. package/dist/components/form-field/form-field-view.d.ts +2 -1
  37. package/dist/components/form-field/form-field-view.js +173 -108
  38. package/dist/components/image/image.js +135 -143
  39. package/dist/components/input/input-shared.js +3 -2
  40. package/dist/components/input/otp.js +120 -110
  41. package/dist/components/input/password.js +55 -61
  42. package/dist/components/input/search.js +13 -7
  43. package/dist/components/list/list.js +106 -105
  44. package/dist/components/masonry/masonry.js +1 -1
  45. package/dist/components/mentions/mentions.js +1 -0
  46. package/dist/components/menu/menu-render.js +1 -0
  47. package/dist/components/modal/confirm-dialog.js +11 -4
  48. package/dist/components/modal/modal.js +320 -315
  49. package/dist/components/pagination/pagination.d.ts +3 -0
  50. package/dist/components/pagination/pagination.js +5 -0
  51. package/dist/components/popover/popover.js +325 -289
  52. package/dist/components/qr-code/qr-code.js +157 -150
  53. package/dist/components/radio/radio.d.ts +3 -1
  54. package/dist/components/radio/radio.js +73 -64
  55. package/dist/components/rate/rate.js +83 -72
  56. package/dist/components/scroll-area/scroll-area.css +1 -1
  57. package/dist/components/scroll-area/scroll-area.js +294 -222
  58. package/dist/components/select/mobile-select.js +6 -3
  59. package/dist/components/select/select-model.js +2 -2
  60. package/dist/components/select/select.js +78 -39
  61. package/dist/components/select/use-select-selection.d.ts +1 -1
  62. package/dist/components/select/use-select-selection.js +91 -84
  63. package/dist/components/slider/slider.d.ts +2 -2
  64. package/dist/components/slider/slider.js +13 -2
  65. package/dist/components/sonner/sonner.js +2 -2
  66. package/dist/components/splitter/splitter.css +1 -0
  67. package/dist/components/splitter/splitter.js +152 -126
  68. package/dist/components/statistic/statistic.js +84 -78
  69. package/dist/components/steps/steps.js +1 -1
  70. package/dist/components/switch/switch.js +45 -39
  71. package/dist/components/table/table.js +5 -1
  72. package/dist/components/table/use-table-data.js +2 -2
  73. package/dist/components/time-picker/time-picker.js +31 -1
  74. package/dist/components/tooltip/tooltip.js +237 -99
  75. package/dist/components/tree/tree.js +31 -3
  76. package/dist/components/tree-select/tree-select.js +1 -1
  77. package/dist/components/upload/upload.js +69 -42
  78. package/dist/locales/ar-EG.js +2 -0
  79. package/dist/locales/de-DE.js +2 -0
  80. package/dist/locales/en-US.js +2 -0
  81. package/dist/locales/es-ES.js +2 -0
  82. package/dist/locales/fr-FR.js +2 -0
  83. package/dist/locales/hi-IN.js +2 -0
  84. package/dist/locales/id-ID.js +2 -0
  85. package/dist/locales/it-IT.js +2 -0
  86. package/dist/locales/ja-JP.js +2 -0
  87. package/dist/locales/ko-KR.js +2 -0
  88. package/dist/locales/pt-BR.js +2 -0
  89. package/dist/locales/ru-RU.js +2 -0
  90. package/dist/locales/th-TH.js +2 -0
  91. package/dist/locales/tr-TR.js +2 -0
  92. package/dist/locales/types.d.ts +2 -0
  93. package/dist/locales/vi-VN.js +2 -0
  94. package/dist/locales/zh-CN.js +2 -0
  95. package/dist/locales/zh-TW.js +2 -0
  96. package/dist/number-input/cursor.js +20 -8
  97. package/dist/number-input/format.js +13 -5
  98. package/dist/number-input/use-number-input.js +166 -318
  99. package/dist/number-input/validate.d.ts +1 -0
  100. package/dist/number-input/validate.js +1 -1
  101. package/dist/provider/tao-provider.d.ts +2 -2
  102. package/dist/provider/tao-provider.js +49 -49
  103. package/dist/utils/composed-parent.d.ts +1 -0
  104. package/dist/utils/composed-parent.js +7 -0
  105. package/dist/utils/portal.d.ts +5 -0
  106. package/dist/utils/portal.js +7 -1
  107. package/dist/utils/refs.d.ts +3 -1
  108. package/dist/utils/refs.js +25 -1
  109. package/package.json +1 -1
@@ -3,6 +3,7 @@ import { c } from "react-compiler-runtime";
3
3
  import { useCallback, useEffect, useRef } from "react";
4
4
  import { TaoPortalScope, useTaoConfig, useTaoDirection } from "../../provider/tao-provider.js";
5
5
  import { asTriggerChild, useControlledOpen } from "../../utils/overlay.js";
6
+ import { useCommittedRef } from "../../utils/refs.js";
6
7
  import { cx } from "../../utils/semantic.js";
7
8
  import { Button } from "../button/button.js";
8
9
  import { ContextMenu } from "../context-menu/context-menu.js";
@@ -97,8 +98,7 @@ function Dropdown(props) {
97
98
  }, [
98
99
  updateOpen
99
100
  ]);
100
- const latestSetOpen = useRef(setOpen);
101
- latestSetOpen.current = setOpen;
101
+ const latestSetOpen = useCommittedRef(setOpen);
102
102
  useEffect(()=>{
103
103
  if (resolvedDisabled && realOpen && null == open) setOpen(false);
104
104
  }, [
@@ -107,18 +107,20 @@ function Dropdown(props) {
107
107
  resolvedDisabled,
108
108
  setOpen
109
109
  ]);
110
- const openOnHover = useCallback(()=>{
110
+ const openOnHover = useCallback((event)=>{
111
+ if ('touch' === event.pointerType) return;
111
112
  clearTimeout(closeTimer.current);
112
113
  if (!realOpen) setOpen(true);
113
114
  }, [
114
115
  realOpen,
115
116
  setOpen
116
117
  ]);
117
- const closeOnHover = useCallback(()=>{
118
- if (!realOpen) return;
118
+ const closeOnHover = useCallback((event_0)=>{
119
+ if (!realOpen || 'touch' === event_0.pointerType) return;
119
120
  clearTimeout(closeTimer.current);
120
121
  closeTimer.current = setTimeout(()=>latestSetOpen.current(false), 120);
121
122
  }, [
123
+ latestSetOpen,
122
124
  realOpen
123
125
  ]);
124
126
  const { content, selectedKeys, commitSelection } = useMenuController(menu, DD, {
@@ -160,8 +162,8 @@ function Dropdown(props) {
160
162
  disabled: resolvedDisabled,
161
163
  "data-tao-dropdown-trigger": "",
162
164
  ...hoverProps,
163
- onPointerDown: (event)=>{
164
- if (!clickMode) event.preventDefault();
165
+ onPointerDown: (event_1)=>{
166
+ if (!clickMode && 'touch' !== event_1.pointerType) event_1.preventDefault();
165
167
  },
166
168
  children: triggerChild
167
169
  }),
@@ -181,8 +183,8 @@ function Dropdown(props) {
181
183
  side: side,
182
184
  align: align,
183
185
  sideOffset: 4,
184
- onCloseAutoFocus: (event_0)=>{
185
- if (latestVisible.current) event_0.preventDefault();
186
+ onCloseAutoFocus: (event_2)=>{
187
+ if (latestVisible.current) event_2.preventDefault();
186
188
  },
187
189
  ...hoverProps,
188
190
  children: [
@@ -49,11 +49,15 @@ const FloatButtonRoot = /*#__PURE__*/ forwardRef((props, ref)=>{
49
49
  const slots = 'function' == typeof styles ? styles({
50
50
  props: merged
51
51
  }) : styles;
52
- const Tag = href ? 'a' : 'button';
52
+ const isLink = null != href;
53
+ const Tag = isLink ? 'a' : 'button';
53
54
  const node = useRef(null);
54
55
  useImperativeHandle(ref, ()=>node.current);
55
56
  const hasLabel = null != label && 'boolean' != typeof label;
56
57
  const glyph = icon ?? (hasLabel ? null : /*#__PURE__*/ jsx(ActionIcon, {}));
58
+ const tooltipProps = !tooltip || 'object' != typeof tooltip || Array.isArray(tooltip) || '$$typeof' in tooltip ? {
59
+ title: tooltip
60
+ } : tooltip;
57
61
  const button = /*#__PURE__*/ jsxs(Tag, {
58
62
  ...rest,
59
63
  ref: (element)=>{
@@ -61,11 +65,11 @@ const FloatButtonRoot = /*#__PURE__*/ forwardRef((props, ref)=>{
61
65
  },
62
66
  href: disabled ? void 0 : href,
63
67
  target: target,
64
- type: href ? void 0 : htmlType,
65
- disabled: href ? void 0 : disabled,
66
- "aria-disabled": href && disabled || void 0,
67
- tabIndex: href && disabled ? -1 : rest.tabIndex,
68
- "aria-label": props['aria-label'] ?? (hasLabel ? void 0 : 'string' == typeof tooltip ? tooltip : 'Action'),
68
+ type: isLink ? void 0 : htmlType,
69
+ disabled: isLink ? void 0 : disabled,
70
+ "aria-disabled": isLink && disabled || void 0,
71
+ tabIndex: isLink && disabled ? -1 : rest.tabIndex,
72
+ "aria-label": props['aria-label'] ?? (hasLabel ? void 0 : 'string' == typeof tooltipProps.title ? tooltipProps.title : 'Action'),
69
73
  "data-tao-float-button": "",
70
74
  "data-tao-type": type,
71
75
  "data-tao-shape": actualShape,
@@ -80,6 +84,7 @@ const FloatButtonRoot = /*#__PURE__*/ forwardRef((props, ref)=>{
80
84
  if (disabled) return void event.preventDefault();
81
85
  rest.onClick?.(event);
82
86
  },
87
+ onAuxClick: disabled ? (event_0)=>event_0.preventDefault() : rest.onAuxClick,
83
88
  children: [
84
89
  null !== glyph && /*#__PURE__*/ jsx("span", {
85
90
  "data-tao-float-button-icon": "",
@@ -107,9 +112,6 @@ const FloatButtonRoot = /*#__PURE__*/ forwardRef((props, ref)=>{
107
112
  })
108
113
  ]
109
114
  });
110
- const tooltipProps = !tooltip || 'object' != typeof tooltip || Array.isArray(tooltip) || '$$typeof' in tooltip ? {
111
- title: tooltip
112
- } : tooltip;
113
115
  return null == tooltip ? button : /*#__PURE__*/ jsx(Tooltip, {
114
116
  ...tooltipProps,
115
117
  children: button
@@ -53,4 +53,4 @@ export interface FormItemProps<Values = Record<string, unknown>> {
53
53
  * With no `name`, `dependencies`, or `shouldUpdate`, it is purely
54
54
  * presentational — equivalent to FormField with `help`/`validateStatus`.
55
55
  */
56
- export declare function FormItem<Values = Record<string, unknown>>({ name, label, required, rules, help, extra, validateStatus, initialValue, valuePropName, getValueFromEvent, trigger, validateTrigger, noStyle, dependencies, shouldUpdate, normalize, preserve, messageVariables, validateFirst, htmlFor, className, style, classNames, styles, children, }: FormItemProps<Values>): ReactNode;
56
+ export declare function FormItem<Values = Record<string, unknown>>({ name, label, required, rules, help, extra, validateStatus, initialValue, valuePropName, getValueFromEvent, trigger, validateTrigger, noStyle, dependencies, shouldUpdate, normalize, preserve, messageVariables, validateFirst, htmlFor, className, style, classNames, styles, children, ...shellProps }: FormItemProps<Values>): ReactNode;
@@ -1,76 +1,133 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
3
  import { Field } from "@rc-component/form";
4
- import { Fragment, cloneElement, isValidElement } from "react";
4
+ import { Fragment, cloneElement, createContext, isValidElement, useContext, useId, useState } from "react";
5
5
  import { FormFieldView } from "../form-field/form-field-view.js";
6
6
  import { FieldControl } from "./field-control.js";
7
7
  import { useFormLayout } from "./form-context.js";
8
+ const NoStyleFeedbackContext = /*#__PURE__*/ createContext(null);
8
9
  function FormItem(t0) {
9
- const $ = c(42);
10
- const { name, label, required, rules, help, extra, validateStatus, initialValue, valuePropName, getValueFromEvent, trigger, validateTrigger, noStyle, dependencies, shouldUpdate, normalize, preserve, messageVariables, validateFirst, htmlFor, className, style, classNames, styles, children } = t0;
10
+ const $ = c(29);
11
+ const { name, label, required, rules, help, extra, validateStatus, initialValue, valuePropName, getValueFromEvent, trigger, validateTrigger, noStyle, dependencies, shouldUpdate, normalize, preserve, messageVariables, validateFirst, htmlFor, className, style, classNames, styles, children, ...shellProps } = t0;
11
12
  const { layout, form: formInstance } = useFormLayout();
13
+ const parentFeedback = useContext(NoStyleFeedbackContext);
14
+ const feedbackId = `${useId()}-nostyle-error`;
12
15
  let t1;
13
- if ($[0] !== children || $[1] !== className || $[2] !== classNames || $[3] !== extra || $[4] !== formInstance || $[5] !== help || $[6] !== htmlFor || $[7] !== label || $[8] !== layout || $[9] !== name || $[10] !== noStyle || $[11] !== required || $[12] !== rules || $[13] !== style || $[14] !== styles || $[15] !== trigger || $[16] !== validateStatus || $[17] !== valuePropName) {
14
- t1 = (content, meta, control)=>{
15
- const requiredMark = required ?? rules?.some((rule)=>"function" == typeof rule ? !!(formInstance && rule(formInstance).required) : !!rule?.required) ?? false;
16
- const status = validateStatus ?? (meta?.errors.length ? "error" : meta?.warnings.length ? "warning" : void 0);
17
- const message = help ?? meta?.errors[0] ?? meta?.warnings[0];
18
- const showAsStatus = null != message && null != status;
19
- const errorSlot = showAsStatus ? message : void 0;
20
- const descriptionSlot = showAsStatus ? void 0 : message;
21
- let controlProps = control ?? void 0;
22
- const valueProp = valuePropName ?? "value";
23
- const element = /*#__PURE__*/ isValidElement(content) && content.type !== Fragment ? content : void 0;
24
- if (status && element && "string" != typeof element.type && null == element.props.status && null == element.props.error) controlProps = {
16
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
17
+ t1 = {};
18
+ $[0] = t1;
19
+ } else t1 = $[0];
20
+ const [nestedErrors, setNestedErrors] = useState(t1);
21
+ let t2;
22
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
23
+ t2 = (id, errors)=>{
24
+ setNestedErrors((current)=>{
25
+ if (!errors.length && !current[id]) return current;
26
+ if (errors.length) return {
27
+ ...current,
28
+ [id]: errors
29
+ };
30
+ const next = {
31
+ ...current
32
+ };
33
+ delete next[id];
34
+ return next;
35
+ });
36
+ };
37
+ $[1] = t2;
38
+ } else t2 = $[1];
39
+ const report = t2;
40
+ const t3 = null == help;
41
+ let t4;
42
+ if ($[2] !== t3) {
43
+ t4 = {
44
+ visible: t3,
45
+ report
46
+ };
47
+ $[2] = t3;
48
+ $[3] = t4;
49
+ } else t4 = $[3];
50
+ const feedback = t4;
51
+ const renderShell = (content, meta, control)=>{
52
+ const requiredMark = required ?? rules?.some((rule)=>{
53
+ const entity = "function" == typeof rule ? formInstance && rule(formInstance) : rule;
54
+ return !!entity?.required && !entity.warningOnly;
55
+ }) ?? false;
56
+ const status = validateStatus ?? (meta?.errors.length ? "error" : meta?.warnings.length ? "warning" : void 0);
57
+ const message = help ?? meta?.errors[0] ?? meta?.warnings[0];
58
+ const showAsStatus = null != message && null != status;
59
+ const errorSlot = showAsStatus ? message : void 0;
60
+ const descriptionSlot = showAsStatus ? void 0 : message;
61
+ let controlProps = control ?? void 0;
62
+ const valueProp = valuePropName ?? "value";
63
+ const element = /*#__PURE__*/ isValidElement(content) && content.type !== Fragment ? content : void 0;
64
+ if (status && element && "string" != typeof element.type && null == element.props.status && null == element.props.error) controlProps = {
65
+ ...controlProps,
66
+ status
67
+ };
68
+ if (controlProps && "checked" === valuePropName && "checked" in controlProps && (void 0 === controlProps.checked || null === controlProps.checked && element?.type === "input")) controlProps = {
69
+ ...controlProps,
70
+ checked: false
71
+ };
72
+ if (controlProps && "value" === valueProp && null == controlProps.value) {
73
+ if (element?.type === "select") controlProps = {
25
74
  ...controlProps,
26
- status
75
+ value: element.props.multiple ? [] : ""
27
76
  };
28
- if (controlProps && "checked" === valuePropName && "checked" in controlProps && (void 0 === controlProps.checked || null === controlProps.checked && element?.type === "input")) controlProps = {
77
+ else if (element?.type === "input" || element?.type === "textarea") controlProps = {
29
78
  ...controlProps,
30
- checked: false
79
+ value: ""
31
80
  };
32
- if (controlProps && "value" === valueProp && null == controlProps.value) {
33
- if (element?.type === "select") controlProps = {
34
- ...controlProps,
35
- value: element.props.multiple ? [] : ""
36
- };
37
- else if (element?.type === "input" || element?.type === "textarea") controlProps = {
38
- ...controlProps,
39
- value: ""
40
- };
41
- }
42
- if (controlProps && element) for (const [prop, handler] of Object.entries(controlProps)){
43
- const childHandler = element.props[prop];
44
- if (prop !== valueProp && "function" == typeof handler && "function" == typeof childHandler) controlProps = {
45
- ...controlProps,
46
- [prop]: "function" == typeof children ? childHandler : (...t2)=>{
47
- const args = t2;
48
- handler(...args);
49
- childHandler(...args);
50
- }
51
- };
52
- }
53
- const collect = control?.onChange;
54
- const valueChange = (trigger ?? "onChange") === "onChange" && "value" === valueProp && "function" == typeof collect ? {
55
- onChange: controlProps?.onChange,
56
- collect: (value)=>collect(value)
57
- } : null;
58
- if (noStyle) {
59
- if (!element) return content;
60
- const child = controlProps ? /*#__PURE__*/ cloneElement(element, controlProps) : element;
61
- return null != name && meta ? /*#__PURE__*/ jsx(FieldControl, {
62
- name: meta.name,
63
- valueChange: valueChange,
64
- children: child
65
- }) : child;
66
- }
67
- return /*#__PURE__*/ jsx(FormFieldView, {
81
+ }
82
+ if (controlProps && element) for (const [prop, handler] of Object.entries(controlProps)){
83
+ const childHandler = element.props[prop];
84
+ if (prop !== valueProp && "function" == typeof handler && "function" == typeof childHandler) controlProps = {
85
+ ...controlProps,
86
+ [prop]: "function" == typeof children ? childHandler : (...t5)=>{
87
+ const args = t5;
88
+ handler(...args);
89
+ childHandler(...args);
90
+ }
91
+ };
92
+ }
93
+ const collect = control?.onChange;
94
+ const valueChange = (trigger ?? "onChange") === "onChange" && "value" === valueProp && "function" == typeof collect ? {
95
+ onChange: controlProps?.onChange,
96
+ collect: (value)=>collect(value)
97
+ } : null;
98
+ if (noStyle) {
99
+ if (!element) return content;
100
+ const inherited = Object.fromEntries(Object.entries(shellProps).filter((t6)=>{
101
+ const [key] = t6;
102
+ return null == element.props[key] && !("aria-labelledby" === key && element.props["aria-label"]);
103
+ }));
104
+ const errors_0 = meta?.errors ?? [];
105
+ const describedBy = [
106
+ element.props["aria-describedby"] ?? inherited["aria-describedby"],
107
+ parentFeedback?.visible && errors_0.length ? feedbackId : void 0
108
+ ].filter(Boolean).join(" ");
109
+ const child = /*#__PURE__*/ cloneElement(element, {
110
+ ...inherited,
111
+ ...controlProps,
112
+ "aria-describedby": describedBy || void 0,
113
+ "aria-invalid": errors_0.length > 0 ? true : element.props["aria-invalid"] ?? inherited["aria-invalid"]
114
+ });
115
+ return null != name && meta ? /*#__PURE__*/ jsx(FieldControl, {
116
+ name: meta.name,
117
+ valueChange: valueChange,
118
+ children: child
119
+ }) : child;
120
+ }
121
+ return /*#__PURE__*/ jsx(NoStyleFeedbackContext.Provider, {
122
+ value: feedback,
123
+ children: /*#__PURE__*/ jsx(FormFieldView, {
68
124
  formItem: true,
69
125
  reserveMessage: Boolean(rules?.length) || null != help || null != extra || null != validateStatus,
70
126
  label: label,
71
127
  htmlFor: htmlFor,
72
128
  required: requiredMark,
73
129
  error: errorSlot,
130
+ nestedErrors: null == help ? nestedErrors : void 0,
74
131
  invalid: "error" === status,
75
132
  warning: "warning" === status,
76
133
  description: descriptionSlot,
@@ -87,57 +144,38 @@ function FormItem(t0) {
87
144
  classNames: classNames,
88
145
  styles: styles,
89
146
  children: content
90
- });
91
- };
92
- $[0] = children;
93
- $[1] = className;
94
- $[2] = classNames;
95
- $[3] = extra;
96
- $[4] = formInstance;
97
- $[5] = help;
98
- $[6] = htmlFor;
99
- $[7] = label;
100
- $[8] = layout;
101
- $[9] = name;
102
- $[10] = noStyle;
103
- $[11] = required;
104
- $[12] = rules;
105
- $[13] = style;
106
- $[14] = styles;
107
- $[15] = trigger;
108
- $[16] = validateStatus;
109
- $[17] = valuePropName;
110
- $[18] = t1;
111
- } else t1 = $[18];
112
- const renderShell = t1;
113
- if (null == name && null == dependencies && null == shouldUpdate) {
114
- const t2 = children;
115
- let t3;
116
- if ($[19] !== renderShell || $[20] !== t2) {
117
- t3 = renderShell(t2, void 0, null);
118
- $[19] = renderShell;
119
- $[20] = t2;
120
- $[21] = t3;
121
- } else t3 = $[21];
122
- return t3;
123
- }
124
- const t2 = name ?? void 0;
125
- let t3;
126
- if ($[22] !== children || $[23] !== formInstance || $[24] !== name || $[25] !== renderShell) {
127
- t3 = (control_0, meta_0)=>{
147
+ })
148
+ });
149
+ };
150
+ if (null == name && null == dependencies && null == shouldUpdate) return renderShell(children, void 0, null);
151
+ const t7 = name ?? void 0;
152
+ let t8;
153
+ if ($[4] !== feedbackId || $[5] !== noStyle || $[6] !== parentFeedback) {
154
+ t8 = noStyle && parentFeedback ? (t9)=>{
155
+ const { errors: errors_1, destroy } = t9;
156
+ return parentFeedback.report(feedbackId, destroy ? [] : errors_1);
157
+ } : void 0;
158
+ $[4] = feedbackId;
159
+ $[5] = noStyle;
160
+ $[6] = parentFeedback;
161
+ $[7] = t8;
162
+ } else t8 = $[7];
163
+ let t9;
164
+ if ($[8] !== children || $[9] !== formInstance || $[10] !== name || $[11] !== renderShell) {
165
+ t9 = (control_0, meta_0)=>{
128
166
  const content_0 = "function" == typeof children ? children(control_0, meta_0, formInstance) : children;
129
167
  return renderShell(content_0, meta_0, null != name ? control_0 : null);
130
168
  };
131
- $[22] = children;
132
- $[23] = formInstance;
133
- $[24] = name;
134
- $[25] = renderShell;
135
- $[26] = t3;
136
- } else t3 = $[26];
137
- let t4;
138
- if ($[27] !== dependencies || $[28] !== getValueFromEvent || $[29] !== initialValue || $[30] !== messageVariables || $[31] !== normalize || $[32] !== preserve || $[33] !== rules || $[34] !== shouldUpdate || $[35] !== t2 || $[36] !== t3 || $[37] !== trigger || $[38] !== validateFirst || $[39] !== validateTrigger || $[40] !== valuePropName) {
139
- t4 = /*#__PURE__*/ jsx(Field, {
140
- name: t2,
169
+ $[8] = children;
170
+ $[9] = formInstance;
171
+ $[10] = name;
172
+ $[11] = renderShell;
173
+ $[12] = t9;
174
+ } else t9 = $[12];
175
+ let t10;
176
+ if ($[13] !== dependencies || $[14] !== getValueFromEvent || $[15] !== initialValue || $[16] !== messageVariables || $[17] !== normalize || $[18] !== preserve || $[19] !== rules || $[20] !== shouldUpdate || $[21] !== t7 || $[22] !== t8 || $[23] !== t9 || $[24] !== trigger || $[25] !== validateFirst || $[26] !== validateTrigger || $[27] !== valuePropName) {
177
+ t10 = /*#__PURE__*/ jsx(Field, {
178
+ name: t7,
141
179
  rules: rules,
142
180
  initialValue: initialValue,
143
181
  valuePropName: valuePropName,
@@ -150,24 +188,26 @@ function FormItem(t0) {
150
188
  preserve: preserve,
151
189
  messageVariables: messageVariables,
152
190
  validateFirst: validateFirst,
153
- children: t3
191
+ onMetaChange: t8,
192
+ children: t9
154
193
  });
155
- $[27] = dependencies;
156
- $[28] = getValueFromEvent;
157
- $[29] = initialValue;
158
- $[30] = messageVariables;
159
- $[31] = normalize;
160
- $[32] = preserve;
161
- $[33] = rules;
162
- $[34] = shouldUpdate;
163
- $[35] = t2;
164
- $[36] = t3;
165
- $[37] = trigger;
166
- $[38] = validateFirst;
167
- $[39] = validateTrigger;
168
- $[40] = valuePropName;
169
- $[41] = t4;
170
- } else t4 = $[41];
171
- return t4;
194
+ $[13] = dependencies;
195
+ $[14] = getValueFromEvent;
196
+ $[15] = initialValue;
197
+ $[16] = messageVariables;
198
+ $[17] = normalize;
199
+ $[18] = preserve;
200
+ $[19] = rules;
201
+ $[20] = shouldUpdate;
202
+ $[21] = t7;
203
+ $[22] = t8;
204
+ $[23] = t9;
205
+ $[24] = trigger;
206
+ $[25] = validateFirst;
207
+ $[26] = validateTrigger;
208
+ $[27] = valuePropName;
209
+ $[28] = t10;
210
+ } else t10 = $[28];
211
+ return t10;
172
212
  }
173
213
  export { FormItem };
@@ -11,6 +11,7 @@ export interface FormFieldViewProps {
11
11
  htmlFor?: string;
12
12
  required?: boolean;
13
13
  error?: ReactNode;
14
+ nestedErrors?: Record<string, string[]>;
14
15
  invalid?: boolean;
15
16
  /** Render the message slot with warning styling instead of error. */
16
17
  warning?: boolean;
@@ -36,4 +37,4 @@ export interface FormFieldViewProps {
36
37
  * with the aria wiring (describedby/errormessage/invalid/required) applied
37
38
  * to the child control. Not part of the public API.
38
39
  */
39
- export declare function FormFieldView({ formItem, reserveMessage, label, htmlFor, required, error, invalid, warning, description, extra, layout, controlProps, renderControl, children, className, style, classNames, styles, }: FormFieldViewProps): import("react").JSX.Element;
40
+ export declare function FormFieldView({ formItem, reserveMessage, label, htmlFor, required, error, nestedErrors, invalid, warning, description, extra, layout, controlProps, renderControl, children, className, style, classNames, styles, }: FormFieldViewProps): import("react").JSX.Element;