@rockshin/tao-ui 0.0.39 → 0.0.41

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 (143) hide show
  1. package/README.md +12 -0
  2. package/dist/components/alert/alert.d.ts +2 -2
  3. package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
  4. package/dist/components/button/button.d.ts +2 -2
  5. package/dist/components/checkbox/checkbox.css +4 -0
  6. package/dist/components/checkbox/checkbox.d.ts +8 -6
  7. package/dist/components/checkbox/checkbox.js +184 -111
  8. package/dist/components/collapsible/collapsible.d.ts +6 -6
  9. package/dist/components/context-menu/context-menu.d.ts +3 -3
  10. package/dist/components/date-picker/calendar/calendar-grid.d.ts +1 -1
  11. package/dist/components/date-picker/calendar/calendar-grid.js +47 -35
  12. package/dist/components/date-picker/calendar/calendar-header.d.ts +2 -2
  13. package/dist/components/date-picker/calendar/month-grid.d.ts +1 -1
  14. package/dist/components/date-picker/calendar/month-grid.js +1 -0
  15. package/dist/components/date-picker/calendar/time-panel.d.ts +2 -2
  16. package/dist/components/date-picker/calendar/time-panel.js +10 -7
  17. package/dist/components/date-picker/calendar/year-grid.d.ts +1 -1
  18. package/dist/components/date-picker/calendar/year-grid.js +1 -0
  19. package/dist/components/date-picker/date-picker.css +4 -0
  20. package/dist/components/date-picker/date-picker.d.ts +7 -6
  21. package/dist/components/date-picker/date-picker.js +52 -5
  22. package/dist/components/date-picker/presets.d.ts +1 -1
  23. package/dist/components/date-picker/range-picker.d.ts +6 -5
  24. package/dist/components/date-picker/range-picker.js +124 -28
  25. package/dist/components/date-picker/types.d.ts +1 -1
  26. package/dist/components/drawer/drawer.d.ts +4 -4
  27. package/dist/components/drawer/drawer.js +125 -111
  28. package/dist/components/dropdown/dropdown.d.ts +8 -8
  29. package/dist/components/form/form-context.d.ts +1 -1
  30. package/dist/components/form/form-item.d.ts +3 -3
  31. package/dist/components/form/form.d.ts +3 -3
  32. package/dist/components/form/index.d.ts +2 -2
  33. package/dist/components/form-actions/form-actions.d.ts +2 -2
  34. package/dist/components/form-field/form-field-view.d.ts +2 -2
  35. package/dist/components/form-field/form-field.d.ts +2 -2
  36. package/dist/components/form-section/form-section.d.ts +2 -2
  37. package/dist/components/input/input.d.ts +2 -2
  38. package/dist/components/input/input.js +1 -1
  39. package/dist/components/input-number/input-number.d.ts +6 -7
  40. package/dist/components/input-number/input-number.js +91 -65
  41. package/dist/components/menu/menu-render.d.ts +1 -1
  42. package/dist/components/modal/confirm-dialog.d.ts +4 -4
  43. package/dist/components/modal/confirm.d.ts +1 -1
  44. package/dist/components/modal/index.d.ts +8 -8
  45. package/dist/components/modal/modal.d.ts +6 -6
  46. package/dist/components/modal/modal.js +115 -101
  47. package/dist/components/modal/use-modal.d.ts +2 -2
  48. package/dist/components/pagination/pagination.d.ts +3 -3
  49. package/dist/components/popconfirm/popconfirm.d.ts +5 -5
  50. package/dist/components/popconfirm/popconfirm.js +74 -61
  51. package/dist/components/popover/popover.d.ts +4 -4
  52. package/dist/components/popover/popover.js +124 -115
  53. package/dist/components/radio/radio.d.ts +9 -6
  54. package/dist/components/radio/radio.js +210 -116
  55. package/dist/components/scroll-area/scroll-area.d.ts +2 -2
  56. package/dist/components/select/mobile-select.d.ts +3 -3
  57. package/dist/components/select/mobile-select.js +3 -1
  58. package/dist/components/select/select-icons.d.ts +5 -5
  59. package/dist/components/select/select-model.d.ts +1 -1
  60. package/dist/components/select/select-searchable-list.d.ts +2 -2
  61. package/dist/components/select/select-tags.d.ts +3 -3
  62. package/dist/components/select/select-types.d.ts +2 -2
  63. package/dist/components/select/select.css +1 -0
  64. package/dist/components/select/select.d.ts +2 -2
  65. package/dist/components/select/use-select-selection.d.ts +3 -3
  66. package/dist/components/sonner/index.d.ts +1 -1
  67. package/dist/components/sonner/sonner.d.ts +5 -4
  68. package/dist/components/spinner/spinner.d.ts +5 -5
  69. package/dist/components/spinner/spinner.js +106 -99
  70. package/dist/components/splitter/splitter.d.ts +3 -3
  71. package/dist/components/status-icon/status-icon.d.ts +1 -1
  72. package/dist/components/steps/steps-icons.d.ts +4 -4
  73. package/dist/components/steps/steps.d.ts +3 -3
  74. package/dist/components/steps/use-display-steps.d.ts +1 -1
  75. package/dist/components/switch/switch.d.ts +4 -3
  76. package/dist/components/switch/switch.js +134 -86
  77. package/dist/components/table/table-filter.d.ts +2 -2
  78. package/dist/components/table/table-icons.d.ts +6 -6
  79. package/dist/components/table/table-model.d.ts +2 -2
  80. package/dist/components/table/table-summary.d.ts +5 -5
  81. package/dist/components/table/table-types.d.ts +3 -3
  82. package/dist/components/table/table.d.ts +6 -6
  83. package/dist/components/table/use-table-data.d.ts +1 -1
  84. package/dist/components/tabs/tabs.d.ts +5 -5
  85. package/dist/components/tabs/tabs.js +72 -65
  86. package/dist/components/tag/tag.d.ts +4 -4
  87. package/dist/components/tag/tag.js +38 -35
  88. package/dist/components/textarea/textarea.d.ts +2 -2
  89. package/dist/components/textarea/textarea.js +1 -1
  90. package/dist/components/tooltip/tooltip.d.ts +2 -2
  91. package/dist/docs/component-docs.d.ts +1 -1
  92. package/dist/docs/components/alert.doc.d.ts +1 -1
  93. package/dist/docs/components/button.doc.d.ts +1 -1
  94. package/dist/docs/components/popover.doc.d.ts +1 -1
  95. package/dist/docs/components/tooltip.doc.d.ts +4 -4
  96. package/dist/docs/index.d.ts +2 -2
  97. package/dist/entries/alert.d.ts +1 -1
  98. package/dist/entries/breadcrumb.d.ts +1 -1
  99. package/dist/entries/button.d.ts +1 -1
  100. package/dist/entries/checkbox.d.ts +1 -1
  101. package/dist/entries/collapsible.d.ts +1 -1
  102. package/dist/entries/context-menu.d.ts +1 -1
  103. package/dist/entries/date-picker.d.ts +1 -1
  104. package/dist/entries/drawer.d.ts +1 -1
  105. package/dist/entries/dropdown.d.ts +1 -1
  106. package/dist/entries/form-actions.d.ts +1 -1
  107. package/dist/entries/form-field.d.ts +1 -1
  108. package/dist/entries/form-layout.d.ts +1 -1
  109. package/dist/entries/form-section.d.ts +1 -1
  110. package/dist/entries/form.d.ts +1 -1
  111. package/dist/entries/input-number.d.ts +1 -1
  112. package/dist/entries/input.d.ts +1 -1
  113. package/dist/entries/modal.d.ts +1 -1
  114. package/dist/entries/number-input.d.ts +1 -1
  115. package/dist/entries/pagination.d.ts +1 -1
  116. package/dist/entries/popconfirm.d.ts +1 -1
  117. package/dist/entries/popover.d.ts +1 -1
  118. package/dist/entries/provider.d.ts +1 -1
  119. package/dist/entries/radio.d.ts +1 -1
  120. package/dist/entries/range-picker.d.ts +1 -1
  121. package/dist/entries/scroll-area.d.ts +1 -1
  122. package/dist/entries/select.d.ts +1 -1
  123. package/dist/entries/sonner.d.ts +1 -1
  124. package/dist/entries/spinner.d.ts +1 -1
  125. package/dist/entries/splitter.d.ts +1 -1
  126. package/dist/entries/stack.d.ts +1 -1
  127. package/dist/entries/steps.d.ts +1 -1
  128. package/dist/entries/switch.d.ts +1 -1
  129. package/dist/entries/table.d.ts +1 -1
  130. package/dist/entries/tabs.d.ts +1 -1
  131. package/dist/entries/tag.d.ts +1 -1
  132. package/dist/entries/textarea.d.ts +1 -1
  133. package/dist/entries/tooltip.d.ts +1 -1
  134. package/dist/index.d.ts +40 -40
  135. package/dist/layouts/form-layout/form-layout.d.ts +2 -2
  136. package/dist/layouts/stack/stack.d.ts +3 -3
  137. package/dist/number-input/format.d.ts +1 -1
  138. package/dist/number-input/index.d.ts +4 -4
  139. package/dist/number-input/number-input.d.ts +2 -2
  140. package/dist/number-input/use-number-input.d.ts +1 -1
  141. package/dist/provider/tao-provider.d.ts +3 -3
  142. package/dist/utils/dialog-content.d.ts +1 -1
  143. package/package.json +38 -38
@@ -1,7 +1,7 @@
1
1
  import { type FormInstance, type Meta, type NamePath, type Rule } from '@rc-component/form';
2
2
  import { type CSSProperties, type ReactNode } from 'react';
3
- import type { TaoStatus } from '../../provider/tao-provider';
4
- import type { SemanticClassNames, SemanticStyles } from '../../utils/semantic';
3
+ import type { TaoStatus } from '../../provider/tao-provider.js';
4
+ import type { SemanticClassNames, SemanticStyles } from '../../utils/semantic.js';
5
5
  export type FormItemSemanticPart = 'root' | 'label' | 'error' | 'description';
6
6
  export type FormItemValidateStatus = TaoStatus;
7
7
  export type FormItemChildren<Values = Record<string, unknown>> = ReactNode | ((control: Record<string, unknown>, meta: Meta, form: FormInstance<Values>) => ReactNode);
@@ -52,4 +52,4 @@ export interface FormItemProps<Values = Record<string, unknown>> {
52
52
  * With no `name`, `dependencies`, or `shouldUpdate`, it is purely
53
53
  * presentational — equivalent to FormField with `help`/`validateStatus`.
54
54
  */
55
- 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>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
55
+ 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>): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
@@ -1,8 +1,8 @@
1
1
  import { type FormInstance, List, type FormProps as RcFormProps, useForm, useWatch } from '@rc-component/form';
2
2
  import { type ReactNode } from 'react';
3
- import { type TaoSize } from '../../provider/tao-provider';
4
- import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
5
- import { FormItem, type FormItemProps } from './form-item';
3
+ import { type TaoSize } from '../../provider/tao-provider.js';
4
+ import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
5
+ import { FormItem, type FormItemProps } from './form-item.js';
6
6
  import './form.css';
7
7
  export type FormSemanticPart = 'root';
8
8
  export interface FormProps<Values = Record<string, unknown>> extends Omit<RcFormProps<Values>, 'component'> {
@@ -1,2 +1,2 @@
1
- export { Form, type FormProps, type FormSemanticPart } from './form';
2
- export type { FormItemChildren, FormItemProps, FormItemSemanticPart, FormItemValidateStatus, } from './form-item';
1
+ export { Form, type FormProps, type FormSemanticPart } from './form.js';
2
+ export type { FormItemChildren, FormItemProps, FormItemSemanticPart, FormItemValidateStatus, } from './form-item.js';
@@ -1,5 +1,5 @@
1
1
  import type { CSSProperties, ReactNode } from 'react';
2
- import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
2
+ import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
3
3
  import '../form-field/form.css';
4
4
  export type FormActionsSemanticPart = 'root';
5
5
  export interface FormActionsProps {
@@ -9,4 +9,4 @@ export interface FormActionsProps {
9
9
  classNames?: SemanticClassNames<FormActionsSemanticPart>;
10
10
  styles?: SemanticStyles<FormActionsSemanticPart>;
11
11
  }
12
- export declare function FormActions({ children, className, style, classNames, styles, }: FormActionsProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function FormActions({ children, className, style, classNames, styles, }: FormActionsProps): import("react").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { type CSSProperties, type ReactNode } from 'react';
2
- import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
2
+ import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
3
3
  export type FormFieldLayout = 'vertical' | 'horizontal';
4
4
  export interface FormFieldViewProps {
5
5
  label?: ReactNode;
@@ -27,4 +27,4 @@ export interface FormFieldViewProps {
27
27
  * with the aria wiring (describedby/errormessage/invalid/required) applied
28
28
  * to the child control. Not part of the public API.
29
29
  */
30
- export declare function FormFieldView({ label, htmlFor, required, error, warning, description, layout, controlProps, children, className, style, classNames, styles, }: FormFieldViewProps): import("react/jsx-runtime").JSX.Element;
30
+ export declare function FormFieldView({ label, htmlFor, required, error, warning, description, layout, controlProps, children, className, style, classNames, styles, }: FormFieldViewProps): import("react").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { CSSProperties, ReactNode } from 'react';
2
- import type { SemanticClassNames, SemanticStyles } from '../../utils/semantic';
2
+ import type { SemanticClassNames, SemanticStyles } from '../../utils/semantic.js';
3
3
  import './form.css';
4
4
  export type FormFieldSemanticPart = 'root' | 'label' | 'error' | 'description';
5
5
  export interface FormFieldProps {
@@ -14,4 +14,4 @@ export interface FormFieldProps {
14
14
  classNames?: SemanticClassNames<FormFieldSemanticPart>;
15
15
  styles?: SemanticStyles<FormFieldSemanticPart>;
16
16
  }
17
- export declare function FormField({ label, htmlFor, required, error, description, children, className, style, classNames, styles, }: FormFieldProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function FormField({ label, htmlFor, required, error, description, children, className, style, classNames, styles, }: FormFieldProps): import("react").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { CSSProperties, ReactNode } from 'react';
2
- import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
2
+ import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
3
3
  import '../form-field/form.css';
4
4
  export type FormSectionSemanticPart = 'root' | 'header' | 'title' | 'description' | 'body';
5
5
  export interface FormSectionProps {
@@ -11,4 +11,4 @@ export interface FormSectionProps {
11
11
  classNames?: SemanticClassNames<FormSectionSemanticPart>;
12
12
  styles?: SemanticStyles<FormSectionSemanticPart>;
13
13
  }
14
- export declare function FormSection({ title, description, children, className, style, classNames, styles, }: FormSectionProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function FormSection({ title, description, children, className, style, classNames, styles, }: FormSectionProps): import("react").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { type InputHTMLAttributes, type ReactNode } from 'react';
2
- import { type TaoSize, type TaoStatus, type TaoVariant } from '../../provider/tao-provider';
3
- import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
2
+ import { type TaoSize, type TaoStatus, type TaoVariant } from '../../provider/tao-provider.js';
3
+ import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
4
4
  import './input.css';
5
5
  export type InputSemanticPart = 'root' | 'input' | 'prefix' | 'suffix';
6
6
  export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
@@ -88,7 +88,7 @@ const input_Input = /*#__PURE__*/ forwardRef(function(t0, ref) {
88
88
  const t8 = "value" in rest ? rest.value ?? "" : void 0;
89
89
  const t9 = classNames?.input;
90
90
  const t10 = styles?.input;
91
- const t11 = "error" === status || error || void 0;
91
+ const t11 = "error" === status || error ? true : rest["aria-invalid"];
92
92
  let t12;
93
93
  if ($[23] !== ref || $[24] !== resolvedDisabled || $[25] !== rest || $[26] !== t10 || $[27] !== t11 || $[28] !== t8 || $[29] !== t9) {
94
94
  t12 = /*#__PURE__*/ jsx("input", {
@@ -1,10 +1,10 @@
1
- import { type ReactNode, type Ref } from 'react';
2
- import { type UseNumberInputOptions } from '../../number-input/use-number-input';
3
- import type { TaoSize, TaoStatus, TaoVariant } from '../../provider/tao-provider';
4
- import type { SemanticClassNames, SemanticStyles } from '../../utils/semantic';
5
- import { type InputSemanticPart } from '../input/input';
1
+ import { type AriaAttributes, type ReactNode, type Ref } from 'react';
2
+ import { type UseNumberInputOptions } from '../../number-input/use-number-input.js';
3
+ import type { TaoSize, TaoStatus, TaoVariant } from '../../provider/tao-provider.js';
4
+ import type { SemanticClassNames, SemanticStyles } from '../../utils/semantic.js';
5
+ import { type InputSemanticPart } from '../input/input.js';
6
6
  export type InputNumberSemanticPart = InputSemanticPart;
7
- export interface InputNumberProps extends UseNumberInputOptions {
7
+ export interface InputNumberProps extends UseNumberInputOptions, Pick<AriaAttributes, 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-errormessage' | 'aria-invalid' | 'aria-required'> {
8
8
  prefix?: ReactNode;
9
9
  suffix?: ReactNode;
10
10
  size?: TaoSize;
@@ -16,7 +16,6 @@ export interface InputNumberProps extends UseNumberInputOptions {
16
16
  placeholder?: string;
17
17
  id?: string;
18
18
  name?: string;
19
- 'aria-label'?: string;
20
19
  className?: string;
21
20
  classNames?: SemanticClassNames<InputNumberSemanticPart>;
22
21
  styles?: SemanticStyles<InputNumberSemanticPart>;
@@ -5,8 +5,13 @@ import { useNumberInput } from "../../number-input/use-number-input.js";
5
5
  import { mergeRefs } from "../../utils/refs.js";
6
6
  import { Input } from "../input/input.js";
7
7
  const input_number_InputNumber = /*#__PURE__*/ forwardRef(function(t0, forwardedRef) {
8
- const $ = c(39);
8
+ const $ = c(49);
9
+ let ariaDescribedBy;
10
+ let ariaErrorMessage;
11
+ let ariaInvalid;
9
12
  let ariaLabel;
13
+ let ariaLabelledBy;
14
+ let ariaRequired;
10
15
  let className;
11
16
  let classNames;
12
17
  let disabled;
@@ -22,62 +27,73 @@ const input_number_InputNumber = /*#__PURE__*/ forwardRef(function(t0, forwarded
22
27
  let suffix;
23
28
  let variant;
24
29
  if ($[0] !== t0) {
25
- ({ prefix, suffix, size, variant, error, status, disabled, placeholder, id, name, "aria-label": ariaLabel, className, classNames, styles, ...hookOptions } = t0);
30
+ ({ prefix, suffix, size, variant, error, status, disabled, placeholder, id, name, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, className, classNames, styles, ...hookOptions } = t0);
26
31
  $[0] = t0;
27
- $[1] = ariaLabel;
28
- $[2] = className;
29
- $[3] = classNames;
30
- $[4] = disabled;
31
- $[5] = error;
32
- $[6] = hookOptions;
33
- $[7] = id;
34
- $[8] = name;
35
- $[9] = placeholder;
36
- $[10] = prefix;
37
- $[11] = size;
38
- $[12] = status;
39
- $[13] = styles;
40
- $[14] = suffix;
41
- $[15] = variant;
32
+ $[1] = ariaDescribedBy;
33
+ $[2] = ariaErrorMessage;
34
+ $[3] = ariaInvalid;
35
+ $[4] = ariaLabel;
36
+ $[5] = ariaLabelledBy;
37
+ $[6] = ariaRequired;
38
+ $[7] = className;
39
+ $[8] = classNames;
40
+ $[9] = disabled;
41
+ $[10] = error;
42
+ $[11] = hookOptions;
43
+ $[12] = id;
44
+ $[13] = name;
45
+ $[14] = placeholder;
46
+ $[15] = prefix;
47
+ $[16] = size;
48
+ $[17] = status;
49
+ $[18] = styles;
50
+ $[19] = suffix;
51
+ $[20] = variant;
42
52
  } else {
43
- ariaLabel = $[1];
44
- className = $[2];
45
- classNames = $[3];
46
- disabled = $[4];
47
- error = $[5];
48
- hookOptions = $[6];
49
- id = $[7];
50
- name = $[8];
51
- placeholder = $[9];
52
- prefix = $[10];
53
- size = $[11];
54
- status = $[12];
55
- styles = $[13];
56
- suffix = $[14];
57
- variant = $[15];
53
+ ariaDescribedBy = $[1];
54
+ ariaErrorMessage = $[2];
55
+ ariaInvalid = $[3];
56
+ ariaLabel = $[4];
57
+ ariaLabelledBy = $[5];
58
+ ariaRequired = $[6];
59
+ className = $[7];
60
+ classNames = $[8];
61
+ disabled = $[9];
62
+ error = $[10];
63
+ hookOptions = $[11];
64
+ id = $[12];
65
+ name = $[13];
66
+ placeholder = $[14];
67
+ prefix = $[15];
68
+ size = $[16];
69
+ status = $[17];
70
+ styles = $[18];
71
+ suffix = $[19];
72
+ variant = $[20];
58
73
  }
59
74
  const { inputProps } = useNumberInput(hookOptions);
60
75
  let inputRest;
61
76
  let ref;
62
- if ($[16] !== inputProps) {
77
+ if ($[21] !== inputProps) {
63
78
  ({ ref, ...inputRest } = inputProps);
64
- $[16] = inputProps;
65
- $[17] = inputRest;
66
- $[18] = ref;
79
+ $[21] = inputProps;
80
+ $[22] = inputRest;
81
+ $[23] = ref;
67
82
  } else {
68
- inputRest = $[17];
69
- ref = $[18];
83
+ inputRest = $[22];
84
+ ref = $[23];
70
85
  }
71
86
  let t1;
72
- if ($[19] !== forwardedRef || $[20] !== ref) {
87
+ if ($[24] !== forwardedRef || $[25] !== ref) {
73
88
  t1 = mergeRefs(ref, forwardedRef);
74
- $[19] = forwardedRef;
75
- $[20] = ref;
76
- $[21] = t1;
77
- } else t1 = $[21];
78
- let t2;
79
- if ($[22] !== ariaLabel || $[23] !== className || $[24] !== classNames || $[25] !== disabled || $[26] !== error || $[27] !== id || $[28] !== inputRest || $[29] !== name || $[30] !== placeholder || $[31] !== prefix || $[32] !== size || $[33] !== status || $[34] !== styles || $[35] !== suffix || $[36] !== t1 || $[37] !== variant) {
80
- t2 = /*#__PURE__*/ jsx(Input, {
89
+ $[24] = forwardedRef;
90
+ $[25] = ref;
91
+ $[26] = t1;
92
+ } else t1 = $[26];
93
+ const t2 = "error" === status || error ? true : ariaInvalid;
94
+ let t3;
95
+ if ($[27] !== ariaDescribedBy || $[28] !== ariaErrorMessage || $[29] !== ariaLabel || $[30] !== ariaLabelledBy || $[31] !== ariaRequired || $[32] !== className || $[33] !== classNames || $[34] !== disabled || $[35] !== error || $[36] !== id || $[37] !== inputRest || $[38] !== name || $[39] !== placeholder || $[40] !== prefix || $[41] !== size || $[42] !== status || $[43] !== styles || $[44] !== suffix || $[45] !== t1 || $[46] !== t2 || $[47] !== variant) {
96
+ t3 = /*#__PURE__*/ jsx(Input, {
81
97
  ref: t1,
82
98
  prefix: prefix,
83
99
  suffix: suffix,
@@ -90,29 +106,39 @@ const input_number_InputNumber = /*#__PURE__*/ forwardRef(function(t0, forwarded
90
106
  id: id,
91
107
  name: name,
92
108
  "aria-label": ariaLabel,
109
+ "aria-labelledby": ariaLabelledBy,
110
+ "aria-describedby": ariaDescribedBy,
111
+ "aria-errormessage": ariaErrorMessage,
112
+ "aria-invalid": t2,
113
+ "aria-required": ariaRequired,
93
114
  className: className,
94
115
  classNames: classNames,
95
116
  styles: styles,
96
117
  ...inputRest
97
118
  });
98
- $[22] = ariaLabel;
99
- $[23] = className;
100
- $[24] = classNames;
101
- $[25] = disabled;
102
- $[26] = error;
103
- $[27] = id;
104
- $[28] = inputRest;
105
- $[29] = name;
106
- $[30] = placeholder;
107
- $[31] = prefix;
108
- $[32] = size;
109
- $[33] = status;
110
- $[34] = styles;
111
- $[35] = suffix;
112
- $[36] = t1;
113
- $[37] = variant;
114
- $[38] = t2;
115
- } else t2 = $[38];
116
- return t2;
119
+ $[27] = ariaDescribedBy;
120
+ $[28] = ariaErrorMessage;
121
+ $[29] = ariaLabel;
122
+ $[30] = ariaLabelledBy;
123
+ $[31] = ariaRequired;
124
+ $[32] = className;
125
+ $[33] = classNames;
126
+ $[34] = disabled;
127
+ $[35] = error;
128
+ $[36] = id;
129
+ $[37] = inputRest;
130
+ $[38] = name;
131
+ $[39] = placeholder;
132
+ $[40] = prefix;
133
+ $[41] = size;
134
+ $[42] = status;
135
+ $[43] = styles;
136
+ $[44] = suffix;
137
+ $[45] = t1;
138
+ $[46] = t2;
139
+ $[47] = variant;
140
+ $[48] = t3;
141
+ } else t3 = $[48];
142
+ return t3;
117
143
  });
118
144
  export { input_number_InputNumber as InputNumber };
@@ -1,5 +1,5 @@
1
1
  import { type ComponentType, type ReactNode } from 'react';
2
- import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
2
+ import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
3
3
  import './menu.css';
4
4
  export type MenuSemanticPart = 'root' | 'content' | 'item' | 'itemIcon' | 'itemLabel' | 'itemExtra' | 'divider' | 'groupLabel' | 'subTrigger' | 'subContent';
5
5
  export interface MenuItemType {
@@ -1,7 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
- import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
3
- import { type ButtonProps } from '../button/button';
4
- import { type ModalSemanticPart } from './modal';
2
+ import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
3
+ import { type ButtonProps } from '../button/button.js';
4
+ import { type ModalSemanticPart } from './modal.js';
5
5
  export type ConfirmType = 'info' | 'success' | 'error' | 'warning' | 'confirm';
6
6
  /** Config accepted by `Modal.confirm/info/...` and `modal.confirm/...` from `useModal`. */
7
7
  export interface ModalFuncProps {
@@ -35,4 +35,4 @@ export interface ConfirmDialogProps extends ModalFuncProps {
35
35
  close: () => void;
36
36
  onMount?: () => void;
37
37
  }
38
- export declare function ConfirmDialog({ onMount, open, close, type, icon, title, content, okText, cancelText, okCancel, okButtonProps, cancelButtonProps, onOk, onCancel, afterClose, centered, width, maskClosable, closable, keyboard, className, classNames, styles, }: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
38
+ export declare function ConfirmDialog({ onMount, open, close, type, icon, title, content, okText, cancelText, okCancel, okButtonProps, cancelButtonProps, onOk, onCancel, afterClose, centered, width, maskClosable, closable, keyboard, className, classNames, styles, }: ConfirmDialogProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { type ModalFuncProps } from './confirm-dialog';
1
+ import { type ModalFuncProps } from './confirm-dialog.js';
2
2
  export interface ModalFuncReturn {
3
3
  destroy: () => void;
4
4
  update: (configUpdate: Partial<ModalFuncProps> | ((prev: ModalFuncProps) => ModalFuncProps)) => void;
@@ -1,7 +1,7 @@
1
- import { type ModalFuncReturn } from './confirm';
2
- import type { ModalFuncProps } from './confirm-dialog';
3
- import { Modal as InternalModal } from './modal';
4
- import { useModal } from './use-modal';
1
+ import { type ModalFuncReturn } from './confirm.js';
2
+ import type { ModalFuncProps } from './confirm-dialog.js';
3
+ import { Modal as InternalModal } from './modal.js';
4
+ import { useModal } from './use-modal.js';
5
5
  type ConfirmFn = (config: ModalFuncProps) => ModalFuncReturn;
6
6
  type ModalType = typeof InternalModal & {
7
7
  confirm: ConfirmFn;
@@ -14,8 +14,8 @@ type ModalType = typeof InternalModal & {
14
14
  destroyAll: () => void;
15
15
  };
16
16
  declare const Modal: ModalType;
17
- export type { ModalFuncReturn } from './confirm';
18
- export type { ConfirmType, ModalFuncProps } from './confirm-dialog';
19
- export type { ModalFooterRender, ModalProps, ModalSemanticPart } from './modal';
20
- export type { ModalHookApi } from './use-modal';
17
+ export type { ModalFuncReturn } from './confirm.js';
18
+ export type { ConfirmType, ModalFuncProps } from './confirm-dialog.js';
19
+ export type { ModalFooterRender, ModalProps, ModalSemanticPart } from './modal.js';
20
+ export type { ModalHookApi } from './use-modal.js';
21
21
  export { Modal };
@@ -1,7 +1,7 @@
1
- import { type FC, type ReactNode } from 'react';
2
- import { type TaoBreakpointMap } from '../../utils/breakpoint';
3
- import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
4
- import { type ButtonProps } from '../button/button';
1
+ import { type AriaAttributes, type FC, type ReactNode } from 'react';
2
+ import { type TaoBreakpointMap } from '../../utils/breakpoint.js';
3
+ import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
4
+ import { type ButtonProps } from '../button/button.js';
5
5
  import './modal.css';
6
6
  export type ModalSemanticPart = 'root' | 'overlay' | 'header' | 'title' | 'body' | 'footer' | 'close';
7
7
  /** Render-prop form of `footer`: receives the default node and the two default button components. */
@@ -9,7 +9,7 @@ export type ModalFooterRender = (originNode: ReactNode, extra: {
9
9
  OkBtn: FC;
10
10
  CancelBtn: FC;
11
11
  }) => ReactNode;
12
- export interface ModalProps {
12
+ export interface ModalProps extends Pick<AriaAttributes, 'aria-label' | 'aria-labelledby' | 'aria-describedby'> {
13
13
  open: boolean;
14
14
  onClose?: () => void;
15
15
  title?: ReactNode;
@@ -53,4 +53,4 @@ export interface ModalProps {
53
53
  classNames?: SemanticClassNames<ModalSemanticPart>;
54
54
  styles?: SemanticStyles<ModalSemanticPart>;
55
55
  }
56
- export declare function Modal({ open, onClose, title, footer, onOk, okText, cancelText, confirmLoading, okButtonProps, cancelButtonProps, width, centered, closable, maskClosable, keyboard, afterClose, destroyOnHidden, children, classNames, styles: stylesProp, }: ModalProps): import("react/jsx-runtime").JSX.Element;
56
+ export declare function Modal({ open, onClose, title, footer, onOk, okText, cancelText, confirmLoading, okButtonProps, cancelButtonProps, width, centered, closable, maskClosable, keyboard, afterClose, destroyOnHidden, children, classNames, styles: stylesProp, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, }: ModalProps): import("react").JSX.Element;