@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,77 +1,92 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { useNumberInput } from "../../number-input/use-number-input.js";
4
+ import { mergeRefs } from "../../utils/refs.js";
4
5
  import { Input } from "../input/input.js";
5
6
  function InputNumber(t0) {
6
- const $ = c(34);
7
+ const $ = c(40);
7
8
  let ariaLabel;
8
9
  let className;
9
10
  let classNames;
10
11
  let disabled;
11
12
  let error;
13
+ let forwardedRef;
12
14
  let hookOptions;
13
15
  let id;
14
16
  let name;
15
17
  let placeholder;
16
18
  let prefix;
17
19
  let size;
20
+ let status;
18
21
  let styles;
19
22
  let suffix;
20
23
  let variant;
21
24
  if ($[0] !== t0) {
22
- ({ prefix, suffix, size, variant, error, disabled, placeholder, id, name, "aria-label": ariaLabel, className, classNames, styles, ...hookOptions } = t0);
25
+ ({ prefix, suffix, size, variant, error, status, disabled, placeholder, id, name, "aria-label": ariaLabel, className, classNames, styles, ref: forwardedRef, ...hookOptions } = t0);
23
26
  $[0] = t0;
24
27
  $[1] = ariaLabel;
25
28
  $[2] = className;
26
29
  $[3] = classNames;
27
30
  $[4] = disabled;
28
31
  $[5] = error;
29
- $[6] = hookOptions;
30
- $[7] = id;
31
- $[8] = name;
32
- $[9] = placeholder;
33
- $[10] = prefix;
34
- $[11] = size;
35
- $[12] = styles;
36
- $[13] = suffix;
37
- $[14] = variant;
32
+ $[6] = forwardedRef;
33
+ $[7] = hookOptions;
34
+ $[8] = id;
35
+ $[9] = name;
36
+ $[10] = placeholder;
37
+ $[11] = prefix;
38
+ $[12] = size;
39
+ $[13] = status;
40
+ $[14] = styles;
41
+ $[15] = suffix;
42
+ $[16] = variant;
38
43
  } else {
39
44
  ariaLabel = $[1];
40
45
  className = $[2];
41
46
  classNames = $[3];
42
47
  disabled = $[4];
43
48
  error = $[5];
44
- hookOptions = $[6];
45
- id = $[7];
46
- name = $[8];
47
- placeholder = $[9];
48
- prefix = $[10];
49
- size = $[11];
50
- styles = $[12];
51
- suffix = $[13];
52
- variant = $[14];
49
+ forwardedRef = $[6];
50
+ hookOptions = $[7];
51
+ id = $[8];
52
+ name = $[9];
53
+ placeholder = $[10];
54
+ prefix = $[11];
55
+ size = $[12];
56
+ status = $[13];
57
+ styles = $[14];
58
+ suffix = $[15];
59
+ variant = $[16];
53
60
  }
54
61
  const { inputProps } = useNumberInput(hookOptions);
55
62
  let inputRest;
56
63
  let ref;
57
- if ($[15] !== inputProps) {
64
+ if ($[17] !== inputProps) {
58
65
  ({ ref, ...inputRest } = inputProps);
59
- $[15] = inputProps;
60
- $[16] = inputRest;
61
- $[17] = ref;
66
+ $[17] = inputProps;
67
+ $[18] = inputRest;
68
+ $[19] = ref;
62
69
  } else {
63
- inputRest = $[16];
64
- ref = $[17];
70
+ inputRest = $[18];
71
+ ref = $[19];
65
72
  }
66
73
  let t1;
67
- if ($[18] !== ariaLabel || $[19] !== className || $[20] !== classNames || $[21] !== disabled || $[22] !== error || $[23] !== id || $[24] !== inputRest || $[25] !== name || $[26] !== placeholder || $[27] !== prefix || $[28] !== ref || $[29] !== size || $[30] !== styles || $[31] !== suffix || $[32] !== variant) {
68
- t1 = /*#__PURE__*/ jsx(Input, {
69
- ref: ref,
74
+ if ($[20] !== forwardedRef || $[21] !== ref) {
75
+ t1 = mergeRefs(ref, forwardedRef);
76
+ $[20] = forwardedRef;
77
+ $[21] = ref;
78
+ $[22] = t1;
79
+ } else t1 = $[22];
80
+ let t2;
81
+ if ($[23] !== ariaLabel || $[24] !== className || $[25] !== classNames || $[26] !== disabled || $[27] !== error || $[28] !== id || $[29] !== inputRest || $[30] !== name || $[31] !== placeholder || $[32] !== prefix || $[33] !== size || $[34] !== status || $[35] !== styles || $[36] !== suffix || $[37] !== t1 || $[38] !== variant) {
82
+ t2 = /*#__PURE__*/ jsx(Input, {
83
+ ref: t1,
70
84
  prefix: prefix,
71
85
  suffix: suffix,
72
86
  size: size,
73
87
  variant: variant,
74
88
  error: error,
89
+ status: status,
75
90
  disabled: disabled,
76
91
  placeholder: placeholder,
77
92
  id: id,
@@ -82,23 +97,24 @@ function InputNumber(t0) {
82
97
  styles: styles,
83
98
  ...inputRest
84
99
  });
85
- $[18] = ariaLabel;
86
- $[19] = className;
87
- $[20] = classNames;
88
- $[21] = disabled;
89
- $[22] = error;
90
- $[23] = id;
91
- $[24] = inputRest;
92
- $[25] = name;
93
- $[26] = placeholder;
94
- $[27] = prefix;
95
- $[28] = ref;
96
- $[29] = size;
97
- $[30] = styles;
98
- $[31] = suffix;
99
- $[32] = variant;
100
- $[33] = t1;
101
- } else t1 = $[33];
102
- return t1;
100
+ $[23] = ariaLabel;
101
+ $[24] = className;
102
+ $[25] = classNames;
103
+ $[26] = disabled;
104
+ $[27] = error;
105
+ $[28] = id;
106
+ $[29] = inputRest;
107
+ $[30] = name;
108
+ $[31] = placeholder;
109
+ $[32] = prefix;
110
+ $[33] = size;
111
+ $[34] = status;
112
+ $[35] = styles;
113
+ $[36] = suffix;
114
+ $[37] = t1;
115
+ $[38] = variant;
116
+ $[39] = t2;
117
+ } else t2 = $[39];
118
+ return t2;
103
119
  }
104
120
  export { InputNumber };
@@ -93,7 +93,8 @@ button[data-tao-modal-close] {
93
93
  color: var(--tao-color-text-tertiary);
94
94
  cursor: pointer;
95
95
  margin: 0;
96
- transition: all var(--tao-motion-duration-fast) ease-out;
96
+ transition: background-color var(--tao-motion-duration-fast) ease-out,
97
+ color var(--tao-motion-duration-fast) ease-out;
97
98
  appearance: none;
98
99
  background: none;
99
100
  border: none;
@@ -2,12 +2,13 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { useEffect, useRef } from "react";
4
4
  import { TaoPortalScope } from "../../provider/tao-provider.js";
5
+ import { preventParentOutsideDismiss } from "../../utils/portal.js";
5
6
  import { cx } from "../../utils/semantic.js";
6
7
  import { Button } from "../button/button.js";
7
8
  import "./modal.css";
8
9
  import * as __rspack_external__radix_ui_react_dialog_dabd8325 from "@radix-ui/react-dialog";
9
10
  function Modal(t0) {
10
- const $ = c(87);
11
+ const $ = c(83);
11
12
  const { open, onClose, title, footer, onOk, okText: t1, cancelText: t2, confirmLoading, okButtonProps, cancelButtonProps, width: t3, centered: t4, closable: t5, maskClosable: t6, keyboard: t7, afterClose, destroyOnHidden: t8, children, classNames, styles: stylesProp } = t0;
12
13
  const okText = void 0 === t1 ? "OK" : t1;
13
14
  const cancelText = void 0 === t2 ? "Cancel" : t2;
@@ -141,55 +142,42 @@ function Modal(t0) {
141
142
  $[31] = t21;
142
143
  } else t21 = $[31];
143
144
  const t22 = stylesProp?.overlay;
144
- let t23;
145
- if ($[32] !== forceMount || $[33] !== t21 || $[34] !== t22) {
146
- t23 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Overlay, {
145
+ const t23 = maskClosable ? onClose : void 0;
146
+ let t24;
147
+ if ($[32] !== forceMount || $[33] !== t21 || $[34] !== t22 || $[35] !== t23) {
148
+ t24 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Overlay, {
147
149
  forceMount: forceMount,
148
150
  "data-tao-modal-overlay": "",
149
151
  className: t21,
150
- style: t22
152
+ style: t22,
153
+ onClick: t23
151
154
  });
152
155
  $[32] = forceMount;
153
156
  $[33] = t21;
154
157
  $[34] = t22;
155
158
  $[35] = t23;
156
- } else t23 = $[35];
157
- const t24 = centered ? "" : void 0;
158
- const t25 = open ? "" : void 0;
159
- const t26 = classNames?.root;
160
- let t27;
161
- if ($[36] !== t26) {
162
- t27 = cx(t26);
163
- $[36] = t26;
164
- $[37] = t27;
165
- } else t27 = $[37];
159
+ $[36] = t24;
160
+ } else t24 = $[36];
161
+ const t25 = centered ? "" : void 0;
162
+ const t26 = open ? "" : void 0;
163
+ const t27 = classNames?.root;
166
164
  let t28;
167
- if ($[38] !== keyboard) {
168
- t28 = (e)=>{
165
+ if ($[37] !== t27) {
166
+ t28 = cx(t27);
167
+ $[37] = t27;
168
+ $[38] = t28;
169
+ } else t28 = $[38];
170
+ let t29;
171
+ if ($[39] !== keyboard) {
172
+ t29 = (e)=>{
169
173
  if (!keyboard) e.preventDefault();
170
174
  };
171
- $[38] = keyboard;
172
- $[39] = t28;
173
- } else t28 = $[39];
174
- let t29;
175
+ $[39] = keyboard;
176
+ $[40] = t29;
177
+ } else t29 = $[40];
175
178
  let t30;
176
- if ($[40] !== maskClosable) {
177
- t29 = (e_0)=>{
178
- if (!maskClosable) e_0.preventDefault();
179
- };
180
- t30 = (e_1)=>{
181
- if (!maskClosable) e_1.preventDefault();
182
- };
183
- $[40] = maskClosable;
184
- $[41] = t29;
185
- $[42] = t30;
186
- } else {
187
- t29 = $[41];
188
- t30 = $[42];
189
- }
190
- let t31;
191
- if ($[43] !== classNames?.close || $[44] !== classNames?.header || $[45] !== classNames?.title || $[46] !== closable || $[47] !== onClose || $[48] !== stylesProp?.close || $[49] !== stylesProp?.header || $[50] !== stylesProp?.title || $[51] !== title) {
192
- t31 = (null != title || closable) && /*#__PURE__*/ jsxs("div", {
179
+ if ($[41] !== classNames?.close || $[42] !== classNames?.header || $[43] !== classNames?.title || $[44] !== closable || $[45] !== onClose || $[46] !== stylesProp?.close || $[47] !== stylesProp?.header || $[48] !== stylesProp?.title || $[49] !== title) {
180
+ t30 = (null != title || closable) && /*#__PURE__*/ jsxs("div", {
193
181
  "data-tao-modal-header": "",
194
182
  className: cx(classNames?.header),
195
183
  style: stylesProp?.header,
@@ -216,127 +204,125 @@ function Modal(t0) {
216
204
  })
217
205
  ]
218
206
  });
219
- $[43] = classNames?.close;
220
- $[44] = classNames?.header;
221
- $[45] = classNames?.title;
222
- $[46] = closable;
223
- $[47] = onClose;
224
- $[48] = stylesProp?.close;
225
- $[49] = stylesProp?.header;
226
- $[50] = stylesProp?.title;
227
- $[51] = title;
228
- $[52] = t31;
229
- } else t31 = $[52];
230
- const t32 = classNames?.body;
231
- let t33;
232
- if ($[53] !== t32) {
233
- t33 = cx(t32);
234
- $[53] = t32;
235
- $[54] = t33;
236
- } else t33 = $[54];
237
- const t34 = stylesProp?.body;
238
- let t35;
239
- if ($[55] !== children || $[56] !== t33 || $[57] !== t34) {
240
- t35 = /*#__PURE__*/ jsx("div", {
207
+ $[41] = classNames?.close;
208
+ $[42] = classNames?.header;
209
+ $[43] = classNames?.title;
210
+ $[44] = closable;
211
+ $[45] = onClose;
212
+ $[46] = stylesProp?.close;
213
+ $[47] = stylesProp?.header;
214
+ $[48] = stylesProp?.title;
215
+ $[49] = title;
216
+ $[50] = t30;
217
+ } else t30 = $[50];
218
+ const t31 = classNames?.body;
219
+ let t32;
220
+ if ($[51] !== t31) {
221
+ t32 = cx(t31);
222
+ $[51] = t31;
223
+ $[52] = t32;
224
+ } else t32 = $[52];
225
+ const t33 = stylesProp?.body;
226
+ let t34;
227
+ if ($[53] !== children || $[54] !== t32 || $[55] !== t33) {
228
+ t34 = /*#__PURE__*/ jsx("div", {
241
229
  "data-tao-modal-body": "",
242
- className: t33,
243
- style: t34,
230
+ className: t32,
231
+ style: t33,
244
232
  children: children
245
233
  });
246
- $[55] = children;
247
- $[56] = t33;
248
- $[57] = t34;
249
- $[58] = t35;
250
- } else t35 = $[58];
251
- let t36;
252
- if ($[59] !== classNames?.footer || $[60] !== footerContent || $[61] !== stylesProp?.footer) {
253
- t36 = null != footerContent && /*#__PURE__*/ jsx("div", {
234
+ $[53] = children;
235
+ $[54] = t32;
236
+ $[55] = t33;
237
+ $[56] = t34;
238
+ } else t34 = $[56];
239
+ let t35;
240
+ if ($[57] !== classNames?.footer || $[58] !== footerContent || $[59] !== stylesProp?.footer) {
241
+ t35 = null != footerContent && /*#__PURE__*/ jsx("div", {
254
242
  "data-tao-modal-footer": "",
255
243
  className: cx(classNames?.footer),
256
244
  style: stylesProp?.footer,
257
245
  children: footerContent
258
246
  });
259
- $[59] = classNames?.footer;
260
- $[60] = footerContent;
261
- $[61] = stylesProp?.footer;
262
- $[62] = t36;
263
- } else t36 = $[62];
264
- let t37;
265
- if ($[63] !== contentStyle || $[64] !== forceMount || $[65] !== t27 || $[66] !== t28 || $[67] !== t29 || $[68] !== t30 || $[69] !== t31 || $[70] !== t35 || $[71] !== t36) {
266
- t37 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
247
+ $[57] = classNames?.footer;
248
+ $[58] = footerContent;
249
+ $[59] = stylesProp?.footer;
250
+ $[60] = t35;
251
+ } else t35 = $[60];
252
+ let t36;
253
+ if ($[61] !== contentStyle || $[62] !== forceMount || $[63] !== t28 || $[64] !== t29 || $[65] !== t30 || $[66] !== t34 || $[67] !== t35) {
254
+ t36 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
267
255
  forceMount: forceMount,
268
256
  "data-tao-modal": "",
269
257
  style: contentStyle,
270
- className: t27,
258
+ className: t28,
271
259
  "aria-describedby": void 0,
272
- onEscapeKeyDown: t28,
273
- onPointerDownOutside: t29,
274
- onInteractOutside: t30,
260
+ onEscapeKeyDown: t29,
261
+ onPointerDownOutside: preventParentOutsideDismiss,
262
+ onInteractOutside: preventParentOutsideDismiss,
275
263
  children: [
276
- t31,
277
- t35,
278
- t36
264
+ t30,
265
+ t34,
266
+ t35
279
267
  ]
280
268
  });
281
- $[63] = contentStyle;
282
- $[64] = forceMount;
283
- $[65] = t27;
284
- $[66] = t28;
285
- $[67] = t29;
286
- $[68] = t30;
287
- $[69] = t31;
288
- $[70] = t35;
269
+ $[61] = contentStyle;
270
+ $[62] = forceMount;
271
+ $[63] = t28;
272
+ $[64] = t29;
273
+ $[65] = t30;
274
+ $[66] = t34;
275
+ $[67] = t35;
276
+ $[68] = t36;
277
+ } else t36 = $[68];
278
+ let t37;
279
+ if ($[69] !== t25 || $[70] !== t26 || $[71] !== t36) {
280
+ t37 = /*#__PURE__*/ jsx("div", {
281
+ "data-tao-modal-wrap": "",
282
+ "data-tao-centered": t25,
283
+ "data-tao-open": t26,
284
+ children: t36
285
+ });
286
+ $[69] = t25;
287
+ $[70] = t26;
289
288
  $[71] = t36;
290
289
  $[72] = t37;
291
290
  } else t37 = $[72];
292
291
  let t38;
293
- if ($[73] !== t24 || $[74] !== t25 || $[75] !== t37) {
294
- t38 = /*#__PURE__*/ jsx("div", {
295
- "data-tao-modal-wrap": "",
296
- "data-tao-centered": t24,
297
- "data-tao-open": t25,
298
- children: t37
292
+ if ($[73] !== t24 || $[74] !== t37) {
293
+ t38 = /*#__PURE__*/ jsxs(TaoPortalScope, {
294
+ children: [
295
+ t24,
296
+ t37
297
+ ]
299
298
  });
300
299
  $[73] = t24;
301
- $[74] = t25;
302
- $[75] = t37;
303
- $[76] = t38;
304
- } else t38 = $[76];
300
+ $[74] = t37;
301
+ $[75] = t38;
302
+ } else t38 = $[75];
305
303
  let t39;
306
- if ($[77] !== t23 || $[78] !== t38) {
307
- t39 = /*#__PURE__*/ jsxs(TaoPortalScope, {
308
- children: [
309
- t23,
310
- t38
311
- ]
304
+ if ($[76] !== forceMount || $[77] !== t38) {
305
+ t39 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Portal, {
306
+ forceMount: forceMount,
307
+ children: t38
312
308
  });
313
- $[77] = t23;
314
- $[78] = t38;
315
- $[79] = t39;
316
- } else t39 = $[79];
309
+ $[76] = forceMount;
310
+ $[77] = t38;
311
+ $[78] = t39;
312
+ } else t39 = $[78];
317
313
  let t40;
318
- if ($[80] !== forceMount || $[81] !== t39) {
319
- t40 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Portal, {
320
- forceMount: forceMount,
314
+ if ($[79] !== open || $[80] !== t19 || $[81] !== t39) {
315
+ t40 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
316
+ open: open,
317
+ onOpenChange: t19,
321
318
  children: t39
322
319
  });
323
- $[80] = forceMount;
320
+ $[79] = open;
321
+ $[80] = t19;
324
322
  $[81] = t39;
325
323
  $[82] = t40;
326
324
  } else t40 = $[82];
327
- let t41;
328
- if ($[83] !== open || $[84] !== t19 || $[85] !== t40) {
329
- t41 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
330
- open: open,
331
- onOpenChange: t19,
332
- children: t40
333
- });
334
- $[83] = open;
335
- $[84] = t19;
336
- $[85] = t40;
337
- $[86] = t41;
338
- } else t41 = $[86];
339
- return t41;
325
+ return t40;
340
326
  }
341
327
  function CloseIcon() {
342
328
  const $ = c(1);
@@ -1,4 +1,4 @@
1
- import { type ChangeEvent, type ReactNode } from 'react';
1
+ import { type ChangeEvent, type ReactNode, type Ref } from 'react';
2
2
  import { type TaoSize } from '../../provider/tao-provider';
3
3
  import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
4
4
  import './radio.css';
@@ -13,8 +13,9 @@ export interface RadioProps {
13
13
  name?: string;
14
14
  classNames?: SemanticClassNames<RadioSemanticPart>;
15
15
  styles?: SemanticStyles<RadioSemanticPart>;
16
+ ref?: Ref<HTMLInputElement>;
16
17
  }
17
- export declare function Radio({ value, checked, disabled, onChange, children, name, classNames, styles, }: RadioProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function Radio({ value, checked, defaultChecked, disabled, onChange, children, name, classNames, styles, ref, }: RadioProps): import("react/jsx-runtime").JSX.Element;
18
19
  export type RadioOptionType = {
19
20
  label: ReactNode;
20
21
  value: string;
@@ -6,8 +6,8 @@ import { cx } from "../../utils/semantic.js";
6
6
  import "./radio.css";
7
7
  const RadioGroupContext = /*#__PURE__*/ createContext(null);
8
8
  function Radio(t0) {
9
- const $ = c(31);
10
- const { value, checked, disabled, onChange, children, name, classNames, styles } = t0;
9
+ const $ = c(33);
10
+ const { value, checked, defaultChecked, disabled, onChange, children, name, classNames, styles, ref } = t0;
11
11
  const ctx = useTaoConfig();
12
12
  const groupCtx = useContext(RadioGroupContext);
13
13
  const resolvedDisabled = disabled ?? groupCtx?.disabled ?? ctx.disabled ?? false;
@@ -35,47 +35,51 @@ function Radio(t0) {
35
35
  } else t4 = $[5];
36
36
  const t5 = styles?.root;
37
37
  let t6;
38
- if ($[6] !== handleChange || $[7] !== resolvedChecked || $[8] !== resolvedDisabled || $[9] !== resolvedName || $[10] !== value) {
38
+ if ($[6] !== defaultChecked || $[7] !== handleChange || $[8] !== ref || $[9] !== resolvedChecked || $[10] !== resolvedDisabled || $[11] !== resolvedName || $[12] !== value) {
39
39
  t6 = /*#__PURE__*/ jsx("input", {
40
+ ref: ref,
40
41
  type: "radio",
41
42
  name: resolvedName,
42
43
  value: value,
43
44
  checked: resolvedChecked,
45
+ defaultChecked: defaultChecked,
44
46
  disabled: resolvedDisabled,
45
47
  onChange: handleChange,
46
48
  "data-tao-radio-input": ""
47
49
  });
48
- $[6] = handleChange;
49
- $[7] = resolvedChecked;
50
- $[8] = resolvedDisabled;
51
- $[9] = resolvedName;
52
- $[10] = value;
53
- $[11] = t6;
54
- } else t6 = $[11];
50
+ $[6] = defaultChecked;
51
+ $[7] = handleChange;
52
+ $[8] = ref;
53
+ $[9] = resolvedChecked;
54
+ $[10] = resolvedDisabled;
55
+ $[11] = resolvedName;
56
+ $[12] = value;
57
+ $[13] = t6;
58
+ } else t6 = $[13];
55
59
  const t7 = resolvedChecked || void 0;
56
60
  const t8 = classNames?.indicator;
57
61
  let t9;
58
- if ($[12] !== t8) {
62
+ if ($[14] !== t8) {
59
63
  t9 = cx(t8);
60
- $[12] = t8;
61
- $[13] = t9;
62
- } else t9 = $[13];
64
+ $[14] = t8;
65
+ $[15] = t9;
66
+ } else t9 = $[15];
63
67
  const t10 = styles?.indicator;
64
68
  let t11;
65
- if ($[14] !== t10 || $[15] !== t7 || $[16] !== t9) {
69
+ if ($[16] !== t10 || $[17] !== t7 || $[18] !== t9) {
66
70
  t11 = /*#__PURE__*/ jsx("span", {
67
71
  "data-tao-radio": "",
68
72
  "data-tao-checked": t7,
69
73
  className: t9,
70
74
  style: t10
71
75
  });
72
- $[14] = t10;
73
- $[15] = t7;
74
- $[16] = t9;
75
- $[17] = t11;
76
- } else t11 = $[17];
76
+ $[16] = t10;
77
+ $[17] = t7;
78
+ $[18] = t9;
79
+ $[19] = t11;
80
+ } else t11 = $[19];
77
81
  let t12;
78
- if ($[18] !== t11 || $[19] !== t6) {
82
+ if ($[20] !== t11 || $[21] !== t6) {
79
83
  t12 = /*#__PURE__*/ jsxs("span", {
80
84
  "data-tao-radio-control": "",
81
85
  children: [
@@ -83,25 +87,25 @@ function Radio(t0) {
83
87
  t11
84
88
  ]
85
89
  });
86
- $[18] = t11;
87
- $[19] = t6;
88
- $[20] = t12;
89
- } else t12 = $[20];
90
+ $[20] = t11;
91
+ $[21] = t6;
92
+ $[22] = t12;
93
+ } else t12 = $[22];
90
94
  let t13;
91
- if ($[21] !== children || $[22] !== classNames?.label || $[23] !== styles?.label) {
95
+ if ($[23] !== children || $[24] !== classNames?.label || $[25] !== styles?.label) {
92
96
  t13 = null != children && /*#__PURE__*/ jsx("span", {
93
97
  "data-tao-radio-label": "",
94
98
  className: cx(classNames?.label),
95
99
  style: styles?.label,
96
100
  children: children
97
101
  });
98
- $[21] = children;
99
- $[22] = classNames?.label;
100
- $[23] = styles?.label;
101
- $[24] = t13;
102
- } else t13 = $[24];
102
+ $[23] = children;
103
+ $[24] = classNames?.label;
104
+ $[25] = styles?.label;
105
+ $[26] = t13;
106
+ } else t13 = $[26];
103
107
  let t14;
104
- if ($[25] !== t12 || $[26] !== t13 || $[27] !== t2 || $[28] !== t4 || $[29] !== t5) {
108
+ if ($[27] !== t12 || $[28] !== t13 || $[29] !== t2 || $[30] !== t4 || $[31] !== t5) {
105
109
  t14 = /*#__PURE__*/ jsxs("label", {
106
110
  "data-tao-radio-wrapper": "",
107
111
  "data-tao-disabled": t2,
@@ -112,13 +116,13 @@ function Radio(t0) {
112
116
  t13
113
117
  ]
114
118
  });
115
- $[25] = t12;
116
- $[26] = t13;
117
- $[27] = t2;
118
- $[28] = t4;
119
- $[29] = t5;
120
- $[30] = t14;
121
- } else t14 = $[30];
119
+ $[27] = t12;
120
+ $[28] = t13;
121
+ $[29] = t2;
122
+ $[30] = t4;
123
+ $[31] = t5;
124
+ $[32] = t14;
125
+ } else t14 = $[32];
122
126
  return t14;
123
127
  }
124
128
  function RadioGroup(t0) {
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- import { type SelectOption } from './select';
2
+ import type { SelectOption } from './select-types';
3
3
  import './mobile-select.css';
4
4
  interface MobileSelectContentProps {
5
5
  options: SelectOption[];
@@ -2,7 +2,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { useCallback, useMemo, useState } from "react";
4
4
  import { Drawer } from "../drawer/drawer.js";
5
- import { SearchIcon } from "./select.js";
5
+ import { SearchIcon } from "./select-icons.js";
6
6
  import "./mobile-select.css";
7
7
  const defaultFilter = (input, option)=>{
8
8
  const label = 'string' == typeof option.label ? option.label : String(option.label);