@rockshin/tao-ui 0.0.20 → 0.0.22

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/README.md +8 -1
  2. package/component-manifest.json +77 -48
  3. package/dist/components/button/button.css +11 -11
  4. package/dist/components/button/button.d.ts +3 -2
  5. package/dist/components/button/button.js +55 -47
  6. package/dist/components/checkbox/checkbox.d.ts +3 -2
  7. package/dist/components/checkbox/checkbox.js +91 -81
  8. package/dist/components/date-picker/calendar/calendar-grid.d.ts +7 -1
  9. package/dist/components/date-picker/calendar/calendar-grid.js +158 -160
  10. package/dist/components/date-picker/calendar/time-panel.js +64 -70
  11. package/dist/components/date-picker/date-picker.css +11 -5
  12. package/dist/components/date-picker/date-picker.d.ts +13 -5
  13. package/dist/components/date-picker/date-picker.js +389 -718
  14. package/dist/components/date-picker/range-picker.d.ts +12 -5
  15. package/dist/components/date-picker/range-picker.js +68 -12
  16. package/dist/components/date-picker/types.d.ts +5 -0
  17. package/dist/components/drawer/drawer.css +3 -1
  18. package/dist/components/drawer/drawer.js +119 -133
  19. package/dist/components/form-field/form-field.d.ts +1 -1
  20. package/dist/components/form-field/form-field.js +106 -63
  21. package/dist/components/input/input.css +30 -9
  22. package/dist/components/input/input.d.ts +2 -1
  23. package/dist/components/input/input.js +76 -70
  24. package/dist/components/input-number/input-number.d.ts +5 -3
  25. package/dist/components/input-number/input-number.js +63 -47
  26. package/dist/components/modal/modal.css +2 -1
  27. package/dist/components/modal/modal.js +116 -130
  28. package/dist/components/radio/radio.d.ts +3 -2
  29. package/dist/components/radio/radio.js +43 -39
  30. package/dist/components/select/mobile-select.d.ts +1 -1
  31. package/dist/components/select/mobile-select.js +1 -1
  32. package/dist/components/select/select-icons.d.ts +7 -0
  33. package/dist/components/select/select-icons.js +141 -0
  34. package/dist/components/select/select-model.d.ts +4 -0
  35. package/dist/components/select/select-model.js +22 -0
  36. package/dist/components/select/select-searchable-list.d.ts +22 -0
  37. package/dist/components/select/select-searchable-list.js +101 -0
  38. package/dist/components/select/select-tags.d.ts +15 -0
  39. package/dist/components/select/select-tags.js +152 -0
  40. package/dist/components/select/select-types.d.ts +82 -0
  41. package/dist/components/select/select-types.js +0 -0
  42. package/dist/components/select/select.css +2 -1
  43. package/dist/components/select/select.d.ts +2 -118
  44. package/dist/components/select/select.js +91 -404
  45. package/dist/components/select/use-is-mobile.js +2 -5
  46. package/dist/components/sonner/sonner.js +9 -3
  47. package/dist/components/spinner/spinner.css +1 -1
  48. package/dist/components/splitter/splitter.js +181 -133
  49. package/dist/components/switch/switch.css +17 -8
  50. package/dist/components/switch/switch.d.ts +3 -2
  51. package/dist/components/switch/switch.js +90 -79
  52. package/dist/components/table/table-filter.d.ts +6 -0
  53. package/dist/components/table/table-filter.js +123 -0
  54. package/dist/components/table/table-icons.d.ts +9 -0
  55. package/dist/components/table/table-icons.js +157 -0
  56. package/dist/components/table/table-model.d.ts +11 -0
  57. package/dist/components/table/table-model.js +33 -0
  58. package/dist/components/table/table-types.d.ts +87 -0
  59. package/dist/components/table/table-types.js +0 -0
  60. package/dist/components/table/table.css +14 -15
  61. package/dist/components/table/table.d.ts +3 -101
  62. package/dist/components/table/table.js +29 -329
  63. package/dist/components/tabs/tabs.css +5 -2
  64. package/dist/components/tabs/tabs.js +71 -62
  65. package/dist/components/textarea/textarea.d.ts +5 -3
  66. package/dist/components/textarea/textarea.js +102 -85
  67. package/dist/docs/component-docs.d.ts +1 -0
  68. package/dist/docs/components/breadcrumb.doc.js +3 -1
  69. package/dist/docs/components/checkbox.doc.js +2 -5
  70. package/dist/docs/components/context-menu.doc.js +7 -2
  71. package/dist/docs/components/drawer.doc.js +4 -2
  72. package/dist/docs/components/dropdown.doc.js +7 -3
  73. package/dist/docs/components/form-field.doc.js +0 -1
  74. package/dist/docs/components/form-layout.doc.d.ts +1 -0
  75. package/dist/docs/components/form-layout.doc.js +3 -0
  76. package/dist/docs/components/form-section.doc.js +1 -1
  77. package/dist/docs/components/input-number.doc.js +2 -3
  78. package/dist/docs/components/input.doc.js +1 -2
  79. package/dist/docs/components/modal.doc.js +1 -1
  80. package/dist/docs/components/pagination.doc.js +1 -3
  81. package/dist/docs/components/radio.doc.js +1 -4
  82. package/dist/docs/components/range-picker.doc.js +2 -2
  83. package/dist/docs/components/select.doc.js +19 -6
  84. package/dist/docs/components/spinner.doc.js +4 -1
  85. package/dist/docs/components/splitter.doc.js +1 -1
  86. package/dist/docs/components/stack.doc.d.ts +1 -0
  87. package/dist/docs/components/stack.doc.js +3 -0
  88. package/dist/docs/components/switch.doc.js +1 -2
  89. package/dist/docs/components/table.doc.js +9 -4
  90. package/dist/docs/components/tabs.doc.js +2 -1
  91. package/dist/docs/components/tag.doc.js +1 -0
  92. package/dist/docs/components/tao-provider.doc.js +1 -2
  93. package/dist/index.d.ts +7 -9
  94. package/dist/index.js +4 -5
  95. package/dist/layouts/form-layout/form-layout.d.ts +8 -2
  96. package/dist/layouts/form-layout/form-layout.js +33 -9
  97. package/dist/layouts/stack/stack.d.ts +8 -2
  98. package/dist/layouts/stack/stack.js +36 -12
  99. package/dist/provider/tao-provider.d.ts +3 -9
  100. package/dist/provider/tao-provider.js +99 -33
  101. package/dist/theme/theme.css +24 -14
  102. package/dist/theme/tokens.d.ts +2 -2
  103. package/dist/theme/tokens.js +4 -1
  104. package/dist/utils/portal.d.ts +4 -0
  105. package/dist/utils/portal.js +4 -0
  106. package/dist/utils/refs.d.ts +2 -0
  107. package/dist/utils/refs.js +7 -0
  108. package/llms.txt +26 -24
  109. package/package.json +16 -4
@@ -1,101 +1,144 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
+ import { cloneElement, isValidElement, useId } from "react";
3
4
  import { cx } from "../../utils/semantic.js";
4
5
  import "./form.css";
5
6
  function FormField(t0) {
6
- const $ = c(27);
7
+ const $ = c(40);
7
8
  const { label, htmlFor, required, error, description, children, className, style, classNames, styles } = t0;
8
- const t1 = classNames?.root;
9
+ const generatedId = useId();
10
+ const child = /*#__PURE__*/ isValidElement(children) ? children : null;
11
+ const childId = "string" == typeof child?.props.id ? child.props.id : void 0;
12
+ const controlId = htmlFor ?? childId ?? `${generatedId}-control`;
13
+ const descriptionId = `${generatedId}-description`;
14
+ const errorId = `${generatedId}-error`;
15
+ const childDescribedBy = "string" == typeof child?.props["aria-describedby"] ? child.props["aria-describedby"] : void 0;
16
+ const t1 = error ? errorId : description ? descriptionId : void 0;
9
17
  let t2;
10
- if ($[0] !== className || $[1] !== t1) {
11
- t2 = cx(t1, className);
12
- $[0] = className;
18
+ if ($[0] !== childDescribedBy || $[1] !== t1) {
19
+ t2 = [
20
+ childDescribedBy,
21
+ t1
22
+ ].filter(Boolean);
23
+ $[0] = childDescribedBy;
13
24
  $[1] = t1;
14
25
  $[2] = t2;
15
26
  } else t2 = $[2];
16
- const t3 = styles?.root;
17
- let t4;
18
- if ($[3] !== style || $[4] !== t3) {
19
- t4 = {
20
- ...t3,
27
+ const describedBy = t2.join(" ");
28
+ let t3;
29
+ if ($[3] !== child || $[4] !== children || $[5] !== controlId || $[6] !== describedBy || $[7] !== error || $[8] !== errorId || $[9] !== required) {
30
+ t3 = child ? /*#__PURE__*/ cloneElement(child, {
31
+ id: controlId,
32
+ "aria-describedby": describedBy || void 0,
33
+ "aria-errormessage": error ? errorId : void 0,
34
+ "aria-invalid": error ? true : child.props["aria-invalid"],
35
+ "aria-required": required ? true : child.props["aria-required"]
36
+ }) : children;
37
+ $[3] = child;
38
+ $[4] = children;
39
+ $[5] = controlId;
40
+ $[6] = describedBy;
41
+ $[7] = error;
42
+ $[8] = errorId;
43
+ $[9] = required;
44
+ $[10] = t3;
45
+ } else t3 = $[10];
46
+ const control = t3;
47
+ const t4 = classNames?.root;
48
+ let t5;
49
+ if ($[11] !== className || $[12] !== t4) {
50
+ t5 = cx(t4, className);
51
+ $[11] = className;
52
+ $[12] = t4;
53
+ $[13] = t5;
54
+ } else t5 = $[13];
55
+ const t6 = styles?.root;
56
+ let t7;
57
+ if ($[14] !== style || $[15] !== t6) {
58
+ t7 = {
59
+ ...t6,
21
60
  ...style
22
61
  };
23
- $[3] = style;
24
- $[4] = t3;
25
- $[5] = t4;
26
- } else t4 = $[5];
27
- const t5 = classNames?.label;
28
- const t6 = styles?.label;
29
- let t7;
30
- if ($[6] !== required) {
31
- t7 = required && /*#__PURE__*/ jsx("span", {
62
+ $[14] = style;
63
+ $[15] = t6;
64
+ $[16] = t7;
65
+ } else t7 = $[16];
66
+ const t8 = classNames?.label;
67
+ const t9 = styles?.label;
68
+ let t10;
69
+ if ($[17] !== required) {
70
+ t10 = required && /*#__PURE__*/ jsx("span", {
32
71
  "data-tao-required": "",
33
72
  "aria-hidden": "true",
34
73
  children: "*"
35
74
  });
36
- $[6] = required;
37
- $[7] = t7;
38
- } else t7 = $[7];
39
- let t8;
40
- if ($[8] !== htmlFor || $[9] !== label || $[10] !== t5 || $[11] !== t6 || $[12] !== t7) {
41
- t8 = /*#__PURE__*/ jsxs("label", {
42
- htmlFor: htmlFor,
43
- className: t5,
44
- style: t6,
75
+ $[17] = required;
76
+ $[18] = t10;
77
+ } else t10 = $[18];
78
+ let t11;
79
+ if ($[19] !== controlId || $[20] !== label || $[21] !== t10 || $[22] !== t8 || $[23] !== t9) {
80
+ t11 = /*#__PURE__*/ jsxs("label", {
81
+ htmlFor: controlId,
82
+ className: t8,
83
+ style: t9,
45
84
  "data-tao-form-label": "",
46
85
  children: [
47
86
  label,
48
- t7
87
+ t10
49
88
  ]
50
89
  });
51
- $[8] = htmlFor;
52
- $[9] = label;
53
- $[10] = t5;
54
- $[11] = t6;
55
- $[12] = t7;
56
- $[13] = t8;
57
- } else t8 = $[13];
58
- let t9;
59
- if ($[14] !== classNames?.description || $[15] !== classNames?.error || $[16] !== description || $[17] !== error || $[18] !== styles?.description || $[19] !== styles?.error) {
60
- t9 = error ? /*#__PURE__*/ jsx("p", {
90
+ $[19] = controlId;
91
+ $[20] = label;
92
+ $[21] = t10;
93
+ $[22] = t8;
94
+ $[23] = t9;
95
+ $[24] = t11;
96
+ } else t11 = $[24];
97
+ let t12;
98
+ if ($[25] !== classNames?.description || $[26] !== classNames?.error || $[27] !== description || $[28] !== descriptionId || $[29] !== error || $[30] !== errorId || $[31] !== styles?.description || $[32] !== styles?.error) {
99
+ t12 = error ? /*#__PURE__*/ jsx("p", {
61
100
  className: classNames?.error,
62
101
  style: styles?.error,
63
102
  "data-tao-form-error": "",
103
+ id: errorId,
64
104
  role: "alert",
65
105
  children: error
66
106
  }) : description ? /*#__PURE__*/ jsx("p", {
67
107
  className: classNames?.description,
68
108
  style: styles?.description,
69
109
  "data-tao-form-description": "",
110
+ id: descriptionId,
70
111
  children: description
71
112
  }) : null;
72
- $[14] = classNames?.description;
73
- $[15] = classNames?.error;
74
- $[16] = description;
75
- $[17] = error;
76
- $[18] = styles?.description;
77
- $[19] = styles?.error;
78
- $[20] = t9;
79
- } else t9 = $[20];
80
- let t10;
81
- if ($[21] !== children || $[22] !== t2 || $[23] !== t4 || $[24] !== t8 || $[25] !== t9) {
82
- t10 = /*#__PURE__*/ jsxs("div", {
83
- className: t2,
84
- style: t4,
113
+ $[25] = classNames?.description;
114
+ $[26] = classNames?.error;
115
+ $[27] = description;
116
+ $[28] = descriptionId;
117
+ $[29] = error;
118
+ $[30] = errorId;
119
+ $[31] = styles?.description;
120
+ $[32] = styles?.error;
121
+ $[33] = t12;
122
+ } else t12 = $[33];
123
+ let t13;
124
+ if ($[34] !== control || $[35] !== t11 || $[36] !== t12 || $[37] !== t5 || $[38] !== t7) {
125
+ t13 = /*#__PURE__*/ jsxs("div", {
126
+ className: t5,
127
+ style: t7,
85
128
  "data-tao-form-field": "",
86
129
  children: [
87
- t8,
88
- children,
89
- t9
130
+ t11,
131
+ control,
132
+ t12
90
133
  ]
91
134
  });
92
- $[21] = children;
93
- $[22] = t2;
94
- $[23] = t4;
95
- $[24] = t8;
96
- $[25] = t9;
97
- $[26] = t10;
98
- } else t10 = $[26];
99
- return t10;
135
+ $[34] = control;
136
+ $[35] = t11;
137
+ $[36] = t12;
138
+ $[37] = t5;
139
+ $[38] = t7;
140
+ $[39] = t13;
141
+ } else t13 = $[39];
142
+ return t13;
100
143
  }
101
144
  export { FormField };
@@ -1,4 +1,5 @@
1
1
  [data-tao-input] {
2
+ --tao-input-line-height: var(--tao-line-height);
2
3
  width: 100%;
3
4
  font-family: var(--tao-font-family);
4
5
  align-items: center;
@@ -7,6 +8,7 @@
7
8
  }
8
9
 
9
10
  [data-tao-input][data-tao-size="small"] {
11
+ --tao-input-line-height: var(--tao-line-height-sm);
10
12
  height: var(--tao-control-height-sm);
11
13
  border-radius: var(--tao-radius-sm);
12
14
  }
@@ -27,6 +29,7 @@
27
29
  }
28
30
 
29
31
  [data-tao-input][data-tao-size="large"] {
32
+ --tao-input-line-height: var(--tao-line-height-lg);
30
33
  height: var(--tao-control-height-lg);
31
34
  border-radius: var(--tao-radius-md);
32
35
  }
@@ -41,14 +44,17 @@
41
44
  }
42
45
 
43
46
  [data-tao-input] input {
47
+ box-sizing: border-box;
44
48
  height: 100%;
49
+ font-family: inherit;
50
+ line-height: var(--tao-input-line-height);
45
51
  color: var(--tao-color-text);
46
52
  background: none;
47
53
  border: none;
48
54
  outline: none;
49
55
  flex: 1;
50
56
  min-width: 0;
51
- font-family: inherit;
57
+ padding-block: 0;
52
58
  }
53
59
 
54
60
  [data-tao-input] input::placeholder {
@@ -67,20 +73,35 @@
67
73
  display: flex;
68
74
  }
69
75
 
70
- [data-tao-prefix] {
76
+ [data-tao-prefix], [data-tao-input] [data-tao-prefix] + input {
71
77
  padding-inline-start: var(--tao-padding-sm);
72
78
  }
73
79
 
74
- [data-tao-input] [data-tao-prefix] + input {
75
- padding-inline-start: 0;
80
+ [data-tao-prefix] svg, [data-tao-suffix] svg {
81
+ width: 16px;
82
+ height: 16px;
76
83
  }
77
84
 
78
- [data-tao-suffix] {
79
- padding-inline-end: var(--tao-padding-sm);
85
+ [data-tao-input]:has([data-tao-prefix] svg) [data-tao-prefix] {
86
+ inset-inline-start: var(--tao-padding-sm);
87
+ padding: 0;
88
+ position: absolute;
89
+ top: 50%;
90
+ transform: translateY(-50%);
80
91
  }
81
92
 
82
- [data-tao-prefix] svg, [data-tao-suffix] svg {
83
- width: 16px;
84
- height: 16px;
93
+ [data-tao-input]:has([data-tao-prefix] svg) [data-tao-prefix] svg {
94
+ position: static;
95
+ transform: none;
96
+ }
97
+
98
+ [data-tao-input]:has([data-tao-prefix] svg) input {
99
+ padding-inline-start: calc(var(--tao-padding-sm) +
100
+ 16px +
101
+ var(--tao-padding-sm));
102
+ }
103
+
104
+ [data-tao-suffix] {
105
+ padding-inline-end: var(--tao-padding-sm);
85
106
  }
86
107
 
@@ -1,5 +1,5 @@
1
1
  import { type InputHTMLAttributes, type ReactNode } from 'react';
2
- import { type TaoSize, type TaoVariant } from '../../provider/tao-provider';
2
+ import { type TaoSize, type TaoStatus, type TaoVariant } from '../../provider/tao-provider';
3
3
  import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
4
4
  import './input.css';
5
5
  export type InputSemanticPart = 'root' | 'input' | 'prefix' | 'suffix';
@@ -9,6 +9,7 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
9
9
  prefix?: ReactNode;
10
10
  suffix?: ReactNode;
11
11
  error?: boolean;
12
+ status?: TaoStatus;
12
13
  classNames?: SemanticClassNames<InputSemanticPart>;
13
14
  styles?: SemanticStyles<InputSemanticPart>;
14
15
  }
@@ -5,7 +5,7 @@ import { useTaoConfig } from "../../provider/tao-provider.js";
5
5
  import { cx } from "../../utils/semantic.js";
6
6
  import "./input.css";
7
7
  const input_Input = /*#__PURE__*/ forwardRef(function(t0, ref) {
8
- const $ = c(42);
8
+ const $ = c(44);
9
9
  let className;
10
10
  let classNames;
11
11
  let disabled;
@@ -13,12 +13,13 @@ const input_Input = /*#__PURE__*/ forwardRef(function(t0, ref) {
13
13
  let prefix;
14
14
  let rest;
15
15
  let size;
16
+ let status;
16
17
  let style;
17
18
  let styles;
18
19
  let suffix;
19
20
  let variant;
20
21
  if ($[0] !== t0) {
21
- ({ size, variant, prefix, suffix, error, disabled, className, style, classNames, styles, ...rest } = t0);
22
+ ({ size, variant, prefix, suffix, error, status, disabled, className, style, classNames, styles, ...rest } = t0);
22
23
  $[0] = t0;
23
24
  $[1] = className;
24
25
  $[2] = classNames;
@@ -27,10 +28,11 @@ const input_Input = /*#__PURE__*/ forwardRef(function(t0, ref) {
27
28
  $[5] = prefix;
28
29
  $[6] = rest;
29
30
  $[7] = size;
30
- $[8] = style;
31
- $[9] = styles;
32
- $[10] = suffix;
33
- $[11] = variant;
31
+ $[8] = status;
32
+ $[9] = style;
33
+ $[10] = styles;
34
+ $[11] = suffix;
35
+ $[12] = variant;
34
36
  } else {
35
37
  className = $[1];
36
38
  classNames = $[2];
@@ -39,10 +41,11 @@ const input_Input = /*#__PURE__*/ forwardRef(function(t0, ref) {
39
41
  prefix = $[5];
40
42
  rest = $[6];
41
43
  size = $[7];
42
- style = $[8];
43
- styles = $[9];
44
- suffix = $[10];
45
- variant = $[11];
44
+ status = $[8];
45
+ style = $[9];
46
+ styles = $[10];
47
+ suffix = $[11];
48
+ variant = $[12];
46
49
  }
47
50
  const ctx = useTaoConfig();
48
51
  const resolvedSize = size ?? ctx.size;
@@ -50,74 +53,75 @@ const input_Input = /*#__PURE__*/ forwardRef(function(t0, ref) {
50
53
  const resolvedDisabled = disabled ?? ctx.disabled;
51
54
  const t1 = classNames?.root;
52
55
  let t2;
53
- if ($[12] !== className || $[13] !== t1) {
56
+ if ($[13] !== className || $[14] !== t1) {
54
57
  t2 = cx(t1, className);
55
- $[12] = className;
56
- $[13] = t1;
57
- $[14] = t2;
58
- } else t2 = $[14];
58
+ $[13] = className;
59
+ $[14] = t1;
60
+ $[15] = t2;
61
+ } else t2 = $[15];
59
62
  const t3 = styles?.root;
60
63
  let t4;
61
- if ($[15] !== style || $[16] !== t3) {
64
+ if ($[16] !== style || $[17] !== t3) {
62
65
  t4 = {
63
66
  ...t3,
64
67
  ...style
65
68
  };
66
- $[15] = style;
67
- $[16] = t3;
68
- $[17] = t4;
69
- } else t4 = $[17];
70
- const t5 = error || void 0;
71
- let t6;
72
- if ($[18] !== classNames?.prefix || $[19] !== prefix || $[20] !== styles?.prefix) {
73
- t6 = null != prefix && /*#__PURE__*/ jsx("span", {
69
+ $[16] = style;
70
+ $[17] = t3;
71
+ $[18] = t4;
72
+ } else t4 = $[18];
73
+ const t5 = "error" === status || error || void 0;
74
+ const t6 = "warning" === status || void 0;
75
+ let t7;
76
+ if ($[19] !== classNames?.prefix || $[20] !== prefix || $[21] !== styles?.prefix) {
77
+ t7 = null != prefix && /*#__PURE__*/ jsx("span", {
74
78
  className: classNames?.prefix,
75
79
  style: styles?.prefix,
76
80
  "data-tao-prefix": "",
77
81
  children: prefix
78
82
  });
79
- $[18] = classNames?.prefix;
80
- $[19] = prefix;
81
- $[20] = styles?.prefix;
82
- $[21] = t6;
83
- } else t6 = $[21];
84
- const t7 = classNames?.input;
85
- const t8 = styles?.input;
86
- const t9 = error || void 0;
87
- let t10;
88
- if ($[22] !== ref || $[23] !== resolvedDisabled || $[24] !== rest || $[25] !== t7 || $[26] !== t8 || $[27] !== t9) {
89
- t10 = /*#__PURE__*/ jsx("input", {
83
+ $[19] = classNames?.prefix;
84
+ $[20] = prefix;
85
+ $[21] = styles?.prefix;
86
+ $[22] = t7;
87
+ } else t7 = $[22];
88
+ const t8 = classNames?.input;
89
+ const t9 = styles?.input;
90
+ const t10 = "error" === status || error || void 0;
91
+ let t11;
92
+ if ($[23] !== ref || $[24] !== resolvedDisabled || $[25] !== rest || $[26] !== t10 || $[27] !== t8 || $[28] !== t9) {
93
+ t11 = /*#__PURE__*/ jsx("input", {
90
94
  ...rest,
91
95
  ref: ref,
92
- className: t7,
93
- style: t8,
96
+ className: t8,
97
+ style: t9,
94
98
  disabled: resolvedDisabled,
95
- "aria-invalid": t9
99
+ "aria-invalid": t10
96
100
  });
97
- $[22] = ref;
98
- $[23] = resolvedDisabled;
99
- $[24] = rest;
100
- $[25] = t7;
101
- $[26] = t8;
102
- $[27] = t9;
103
- $[28] = t10;
104
- } else t10 = $[28];
105
- let t11;
106
- if ($[29] !== classNames?.suffix || $[30] !== styles?.suffix || $[31] !== suffix) {
107
- t11 = null != suffix && /*#__PURE__*/ jsx("span", {
101
+ $[23] = ref;
102
+ $[24] = resolvedDisabled;
103
+ $[25] = rest;
104
+ $[26] = t10;
105
+ $[27] = t8;
106
+ $[28] = t9;
107
+ $[29] = t11;
108
+ } else t11 = $[29];
109
+ let t12;
110
+ if ($[30] !== classNames?.suffix || $[31] !== styles?.suffix || $[32] !== suffix) {
111
+ t12 = null != suffix && /*#__PURE__*/ jsx("span", {
108
112
  className: classNames?.suffix,
109
113
  style: styles?.suffix,
110
114
  "data-tao-suffix": "",
111
115
  children: suffix
112
116
  });
113
- $[29] = classNames?.suffix;
114
- $[30] = styles?.suffix;
115
- $[31] = suffix;
116
- $[32] = t11;
117
- } else t11 = $[32];
118
- let t12;
119
- if ($[33] !== resolvedSize || $[34] !== resolvedVariant || $[35] !== t10 || $[36] !== t11 || $[37] !== t2 || $[38] !== t4 || $[39] !== t5 || $[40] !== t6) {
120
- t12 = /*#__PURE__*/ jsxs("div", {
117
+ $[30] = classNames?.suffix;
118
+ $[31] = styles?.suffix;
119
+ $[32] = suffix;
120
+ $[33] = t12;
121
+ } else t12 = $[33];
122
+ let t13;
123
+ if ($[34] !== resolvedSize || $[35] !== resolvedVariant || $[36] !== t11 || $[37] !== t12 || $[38] !== t2 || $[39] !== t4 || $[40] !== t5 || $[41] !== t6 || $[42] !== t7) {
124
+ t13 = /*#__PURE__*/ jsxs("div", {
121
125
  className: t2,
122
126
  style: t4,
123
127
  "data-tao-control": "",
@@ -125,22 +129,24 @@ const input_Input = /*#__PURE__*/ forwardRef(function(t0, ref) {
125
129
  "data-tao-size": resolvedSize,
126
130
  "data-tao-variant": resolvedVariant,
127
131
  "data-tao-error": t5,
132
+ "data-tao-warning": t6,
128
133
  children: [
129
- t6,
130
- t10,
131
- t11
134
+ t7,
135
+ t11,
136
+ t12
132
137
  ]
133
138
  });
134
- $[33] = resolvedSize;
135
- $[34] = resolvedVariant;
136
- $[35] = t10;
139
+ $[34] = resolvedSize;
140
+ $[35] = resolvedVariant;
137
141
  $[36] = t11;
138
- $[37] = t2;
139
- $[38] = t4;
140
- $[39] = t5;
141
- $[40] = t6;
142
- $[41] = t12;
143
- } else t12 = $[41];
144
- return t12;
142
+ $[37] = t12;
143
+ $[38] = t2;
144
+ $[39] = t4;
145
+ $[40] = t5;
146
+ $[41] = t6;
147
+ $[42] = t7;
148
+ $[43] = t13;
149
+ } else t13 = $[43];
150
+ return t13;
145
151
  });
146
152
  export { input_Input as Input };
@@ -1,6 +1,6 @@
1
- import type { ReactNode } from 'react';
1
+ import type { ReactNode, Ref } from 'react';
2
2
  import { type UseNumberInputOptions } from '../../number-input/use-number-input';
3
- import type { TaoSize, TaoVariant } from '../../provider/tao-provider';
3
+ import type { TaoSize, TaoStatus, TaoVariant } from '../../provider/tao-provider';
4
4
  import type { SemanticClassNames, SemanticStyles } from '../../utils/semantic';
5
5
  import { type InputSemanticPart } from '../input/input';
6
6
  export type InputNumberSemanticPart = InputSemanticPart;
@@ -10,6 +10,8 @@ export interface InputNumberProps extends UseNumberInputOptions {
10
10
  size?: TaoSize;
11
11
  variant?: TaoVariant;
12
12
  error?: boolean;
13
+ status?: TaoStatus;
14
+ ref?: Ref<HTMLInputElement>;
13
15
  disabled?: boolean;
14
16
  placeholder?: string;
15
17
  id?: string;
@@ -19,4 +21,4 @@ export interface InputNumberProps extends UseNumberInputOptions {
19
21
  classNames?: SemanticClassNames<InputNumberSemanticPart>;
20
22
  styles?: SemanticStyles<InputNumberSemanticPart>;
21
23
  }
22
- export declare function InputNumber({ prefix, suffix, size, variant, error, disabled, placeholder, id, name, 'aria-label': ariaLabel, className, classNames, styles, ...hookOptions }: InputNumberProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare function InputNumber({ prefix, suffix, size, variant, error, status, disabled, placeholder, id, name, 'aria-label': ariaLabel, className, classNames, styles, ref: forwardedRef, ...hookOptions }: InputNumberProps): import("react/jsx-runtime").JSX.Element;