@rockshin/tao-ui 0.0.58 → 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 (93) 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 +105 -47
  4. package/dist/components/auto-complete/auto-complete.js +9 -2
  5. package/dist/components/calendar/calendar.js +22 -18
  6. package/dist/components/carousel/carousel.js +27 -14
  7. package/dist/components/cascader/cascader.js +17 -12
  8. package/dist/components/checkbox/checkbox.d.ts +3 -1
  9. package/dist/components/checkbox/checkbox.js +65 -58
  10. package/dist/components/color-picker/color-picker.js +383 -360
  11. package/dist/components/date-picker/calendar/calendar-grid.d.ts +5 -3
  12. package/dist/components/date-picker/calendar/calendar-grid.js +9 -4
  13. package/dist/components/date-picker/calendar/month-grid.d.ts +2 -1
  14. package/dist/components/date-picker/calendar/month-grid.js +61 -45
  15. package/dist/components/date-picker/calendar/time-panel.d.ts +8 -1
  16. package/dist/components/date-picker/calendar/time-panel.js +89 -88
  17. package/dist/components/date-picker/calendar/year-grid.d.ts +2 -1
  18. package/dist/components/date-picker/calendar/year-grid.js +60 -44
  19. package/dist/components/date-picker/date-picker.css +9 -0
  20. package/dist/components/date-picker/date-picker.js +22 -13
  21. package/dist/components/date-picker/range-picker.d.ts +2 -0
  22. package/dist/components/date-picker/range-picker.js +127 -70
  23. package/dist/components/date-picker/types.js +1 -1
  24. package/dist/components/drawer/drawer.d.ts +1 -1
  25. package/dist/components/drawer/drawer.js +4 -3
  26. package/dist/components/dropdown/dropdown.js +11 -9
  27. package/dist/components/float-button/float-button.js +4 -4
  28. package/dist/components/form/form-item.d.ts +1 -1
  29. package/dist/components/form/form-item.js +160 -120
  30. package/dist/components/form-field/form-field-view.d.ts +2 -1
  31. package/dist/components/form-field/form-field-view.js +173 -108
  32. package/dist/components/input/input-shared.js +3 -2
  33. package/dist/components/input/otp.js +114 -110
  34. package/dist/components/input/password.js +55 -61
  35. package/dist/components/input/search.js +8 -4
  36. package/dist/components/mentions/mentions.js +1 -0
  37. package/dist/components/menu/menu-render.js +1 -0
  38. package/dist/components/modal/confirm-dialog.js +11 -4
  39. package/dist/components/modal/modal.js +320 -315
  40. package/dist/components/pagination/pagination.d.ts +1 -0
  41. package/dist/components/pagination/pagination.js +1 -0
  42. package/dist/components/popover/popover.js +325 -289
  43. package/dist/components/qr-code/qr-code.js +157 -150
  44. package/dist/components/radio/radio.d.ts +3 -1
  45. package/dist/components/radio/radio.js +73 -64
  46. package/dist/components/select/mobile-select.js +6 -3
  47. package/dist/components/select/select-model.js +2 -2
  48. package/dist/components/select/select.js +78 -39
  49. package/dist/components/select/use-select-selection.js +58 -58
  50. package/dist/components/slider/slider.d.ts +2 -2
  51. package/dist/components/slider/slider.js +13 -2
  52. package/dist/components/sonner/sonner.js +2 -2
  53. package/dist/components/splitter/splitter.css +1 -0
  54. package/dist/components/splitter/splitter.js +152 -126
  55. package/dist/components/switch/switch.js +45 -39
  56. package/dist/components/table/table.js +1 -0
  57. package/dist/components/table/use-table-data.js +2 -2
  58. package/dist/components/time-picker/time-picker.js +31 -1
  59. package/dist/components/tooltip/tooltip.js +237 -99
  60. package/dist/components/tree/tree.js +31 -3
  61. package/dist/components/tree-select/tree-select.js +1 -1
  62. package/dist/components/upload/upload.js +67 -40
  63. package/dist/locales/ar-EG.js +2 -0
  64. package/dist/locales/de-DE.js +2 -0
  65. package/dist/locales/en-US.js +2 -0
  66. package/dist/locales/es-ES.js +2 -0
  67. package/dist/locales/fr-FR.js +2 -0
  68. package/dist/locales/hi-IN.js +2 -0
  69. package/dist/locales/id-ID.js +2 -0
  70. package/dist/locales/it-IT.js +2 -0
  71. package/dist/locales/ja-JP.js +2 -0
  72. package/dist/locales/ko-KR.js +2 -0
  73. package/dist/locales/pt-BR.js +2 -0
  74. package/dist/locales/ru-RU.js +2 -0
  75. package/dist/locales/th-TH.js +2 -0
  76. package/dist/locales/tr-TR.js +2 -0
  77. package/dist/locales/types.d.ts +2 -0
  78. package/dist/locales/vi-VN.js +2 -0
  79. package/dist/locales/zh-CN.js +2 -0
  80. package/dist/locales/zh-TW.js +2 -0
  81. package/dist/number-input/format.js +1 -1
  82. package/dist/number-input/use-number-input.js +166 -321
  83. package/dist/number-input/validate.d.ts +1 -0
  84. package/dist/number-input/validate.js +1 -1
  85. package/dist/provider/tao-provider.d.ts +2 -2
  86. package/dist/provider/tao-provider.js +49 -49
  87. package/dist/utils/composed-parent.d.ts +1 -0
  88. package/dist/utils/composed-parent.js +7 -0
  89. package/dist/utils/portal.d.ts +5 -0
  90. package/dist/utils/portal.js +7 -1
  91. package/dist/utils/refs.d.ts +3 -1
  92. package/dist/utils/refs.js +25 -1
  93. package/package.json +1 -1
@@ -9,7 +9,10 @@ import { Button } from "../button/button.js";
9
9
  import { Spinner } from "../spinner/spinner.js";
10
10
  import "./qr-code.css";
11
11
  const qr_code_QRCode = /*#__PURE__*/ forwardRef(function(props, ref) {
12
- const $ = c(81);
12
+ const $ = c(84);
13
+ let ariaDescribedBy;
14
+ let ariaLabel;
15
+ let ariaLabelledBy;
13
16
  let boostLevel;
14
17
  let className;
15
18
  let classNames;
@@ -33,53 +36,59 @@ const qr_code_QRCode = /*#__PURE__*/ forwardRef(function(props, ref) {
33
36
  let title;
34
37
  let value;
35
38
  if ($[0] !== props) {
36
- ({ value, type: t0, size: t1, icon, iconSize: t2, bordered: t3, errorLevel: t4, status: t5, onRefresh, statusRender, color, bgColor: t6, marginSize, boostLevel, title, className, rootClassName, prefixCls, classNames, styles, style, ...rest } = props);
39
+ ({ value, type: t0, size: t1, icon, iconSize: t2, bordered: t3, errorLevel: t4, status: t5, onRefresh, statusRender, color, bgColor: t6, marginSize, boostLevel, title, className, rootClassName, prefixCls, classNames, styles, style, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...rest } = props);
37
40
  $[0] = props;
38
- $[1] = boostLevel;
39
- $[2] = className;
40
- $[3] = classNames;
41
- $[4] = color;
42
- $[5] = icon;
43
- $[6] = marginSize;
44
- $[7] = onRefresh;
45
- $[8] = prefixCls;
46
- $[9] = rest;
47
- $[10] = rootClassName;
48
- $[11] = statusRender;
49
- $[12] = style;
50
- $[13] = styles;
51
- $[14] = t0;
52
- $[15] = t1;
53
- $[16] = t2;
54
- $[17] = t3;
55
- $[18] = t4;
56
- $[19] = t5;
57
- $[20] = t6;
58
- $[21] = title;
59
- $[22] = value;
41
+ $[1] = ariaDescribedBy;
42
+ $[2] = ariaLabel;
43
+ $[3] = ariaLabelledBy;
44
+ $[4] = boostLevel;
45
+ $[5] = className;
46
+ $[6] = classNames;
47
+ $[7] = color;
48
+ $[8] = icon;
49
+ $[9] = marginSize;
50
+ $[10] = onRefresh;
51
+ $[11] = prefixCls;
52
+ $[12] = rest;
53
+ $[13] = rootClassName;
54
+ $[14] = statusRender;
55
+ $[15] = style;
56
+ $[16] = styles;
57
+ $[17] = t0;
58
+ $[18] = t1;
59
+ $[19] = t2;
60
+ $[20] = t3;
61
+ $[21] = t4;
62
+ $[22] = t5;
63
+ $[23] = t6;
64
+ $[24] = title;
65
+ $[25] = value;
60
66
  } else {
61
- boostLevel = $[1];
62
- className = $[2];
63
- classNames = $[3];
64
- color = $[4];
65
- icon = $[5];
66
- marginSize = $[6];
67
- onRefresh = $[7];
68
- prefixCls = $[8];
69
- rest = $[9];
70
- rootClassName = $[10];
71
- statusRender = $[11];
72
- style = $[12];
73
- styles = $[13];
74
- t0 = $[14];
75
- t1 = $[15];
76
- t2 = $[16];
77
- t3 = $[17];
78
- t4 = $[18];
79
- t5 = $[19];
80
- t6 = $[20];
81
- title = $[21];
82
- value = $[22];
67
+ ariaDescribedBy = $[1];
68
+ ariaLabel = $[2];
69
+ ariaLabelledBy = $[3];
70
+ boostLevel = $[4];
71
+ className = $[5];
72
+ classNames = $[6];
73
+ color = $[7];
74
+ icon = $[8];
75
+ marginSize = $[9];
76
+ onRefresh = $[10];
77
+ prefixCls = $[11];
78
+ rest = $[12];
79
+ rootClassName = $[13];
80
+ statusRender = $[14];
81
+ style = $[15];
82
+ styles = $[16];
83
+ t0 = $[17];
84
+ t1 = $[18];
85
+ t2 = $[19];
86
+ t3 = $[20];
87
+ t4 = $[21];
88
+ t5 = $[22];
89
+ t6 = $[23];
90
+ title = $[24];
91
+ value = $[25];
83
92
  }
84
93
  const type = void 0 === t0 ? "canvas" : t0;
85
94
  const size = void 0 === t1 ? 160 : t1;
@@ -92,24 +101,24 @@ const qr_code_QRCode = /*#__PURE__*/ forwardRef(function(props, ref) {
92
101
  const root = useRef(null);
93
102
  const [themeColor, setThemeColor] = useState("#000000");
94
103
  let t7;
95
- if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
104
+ if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
96
105
  t7 = ()=>root.current ? {
97
106
  nativeElement: root.current
98
107
  } : null;
99
- $[23] = t7;
100
- } else t7 = $[23];
108
+ $[26] = t7;
109
+ } else t7 = $[26];
101
110
  useImperativeHandle(ref, t7);
102
111
  let t8;
103
- if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
112
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
104
113
  t8 = ()=>{
105
114
  if (root.current) setThemeColor(getComputedStyle(root.current).color);
106
115
  };
107
- $[24] = t8;
108
- } else t8 = $[24];
116
+ $[27] = t8;
117
+ } else t8 = $[27];
109
118
  useLayoutEffect(t8);
110
119
  let names;
111
120
  let t9;
112
- if ($[25] !== bgColor || $[26] !== bordered || $[27] !== classNames || $[28] !== errorLevel || $[29] !== props || $[30] !== size || $[31] !== status || $[32] !== styles || $[33] !== type) {
121
+ if ($[28] !== bgColor || $[29] !== bordered || $[30] !== classNames || $[31] !== errorLevel || $[32] !== props || $[33] !== size || $[34] !== status || $[35] !== styles || $[36] !== type) {
113
122
  const mergedProps = {
114
123
  ...props,
115
124
  type,
@@ -125,27 +134,27 @@ const qr_code_QRCode = /*#__PURE__*/ forwardRef(function(props, ref) {
125
134
  t9 = "function" == typeof styles ? styles({
126
135
  props: mergedProps
127
136
  }) : styles;
128
- $[25] = bgColor;
129
- $[26] = bordered;
130
- $[27] = classNames;
131
- $[28] = errorLevel;
132
- $[29] = props;
133
- $[30] = size;
134
- $[31] = status;
135
- $[32] = styles;
136
- $[33] = type;
137
- $[34] = names;
138
- $[35] = t9;
137
+ $[28] = bgColor;
138
+ $[29] = bordered;
139
+ $[30] = classNames;
140
+ $[31] = errorLevel;
141
+ $[32] = props;
142
+ $[33] = size;
143
+ $[34] = status;
144
+ $[35] = styles;
145
+ $[36] = type;
146
+ $[37] = names;
147
+ $[38] = t9;
139
148
  } else {
140
- names = $[34];
141
- t9 = $[35];
149
+ names = $[37];
150
+ t9 = $[38];
142
151
  }
143
152
  const semanticStyles = t9;
144
153
  const locale = config.locale.qrCode ?? enUS.qrCode;
145
154
  if (!value) return null;
146
155
  const t10 = color ?? themeColor;
147
156
  let t11;
148
- if ($[36] !== icon || $[37] !== iconSize) {
157
+ if ($[39] !== icon || $[40] !== iconSize) {
149
158
  t11 = icon ? {
150
159
  src: icon,
151
160
  height: "number" == typeof iconSize ? iconSize : iconSize.height,
@@ -153,16 +162,14 @@ const qr_code_QRCode = /*#__PURE__*/ forwardRef(function(props, ref) {
153
162
  excavate: true,
154
163
  crossOrigin: "anonymous"
155
164
  } : void 0;
156
- $[36] = icon;
157
- $[37] = iconSize;
158
- $[38] = t11;
159
- } else t11 = $[38];
160
- const t12 = rest["aria-label"] ?? title ?? "QR Code";
161
- const t13 = rest["aria-labelledby"];
162
- const t14 = rest["aria-describedby"];
163
- let t15;
164
- if ($[39] !== bgColor || $[40] !== boostLevel || $[41] !== errorLevel || $[42] !== marginSize || $[43] !== size || $[44] !== t10 || $[45] !== t11 || $[46] !== t12 || $[47] !== t13 || $[48] !== t14 || $[49] !== title || $[50] !== value) {
165
- t15 = {
165
+ $[39] = icon;
166
+ $[40] = iconSize;
167
+ $[41] = t11;
168
+ } else t11 = $[41];
169
+ const t12 = ariaLabel ?? title ?? "QR Code";
170
+ let t13;
171
+ if ($[42] !== ariaDescribedBy || $[43] !== ariaLabelledBy || $[44] !== bgColor || $[45] !== boostLevel || $[46] !== errorLevel || $[47] !== marginSize || $[48] !== size || $[49] !== t10 || $[50] !== t11 || $[51] !== t12 || $[52] !== title || $[53] !== value) {
172
+ t13 = {
166
173
  value,
167
174
  size,
168
175
  level: errorLevel,
@@ -174,64 +181,64 @@ const qr_code_QRCode = /*#__PURE__*/ forwardRef(function(props, ref) {
174
181
  imageSettings: t11,
175
182
  role: "img",
176
183
  "aria-label": t12,
177
- "aria-labelledby": t13,
178
- "aria-describedby": t14
184
+ "aria-labelledby": ariaLabelledBy,
185
+ "aria-describedby": ariaDescribedBy
179
186
  };
180
- $[39] = bgColor;
181
- $[40] = boostLevel;
182
- $[41] = errorLevel;
183
- $[42] = marginSize;
184
- $[43] = size;
185
- $[44] = t10;
186
- $[45] = t11;
187
- $[46] = t12;
188
- $[47] = t13;
189
- $[48] = t14;
190
- $[49] = title;
191
- $[50] = value;
192
- $[51] = t15;
193
- } else t15 = $[51];
194
- const qrProps = t15;
195
- const t16 = names?.root;
187
+ $[42] = ariaDescribedBy;
188
+ $[43] = ariaLabelledBy;
189
+ $[44] = bgColor;
190
+ $[45] = boostLevel;
191
+ $[46] = errorLevel;
192
+ $[47] = marginSize;
193
+ $[48] = size;
194
+ $[49] = t10;
195
+ $[50] = t11;
196
+ $[51] = t12;
197
+ $[52] = title;
198
+ $[53] = value;
199
+ $[54] = t13;
200
+ } else t13 = $[54];
201
+ const qrProps = t13;
202
+ const t14 = names?.root;
203
+ let t15;
204
+ if ($[55] !== className || $[56] !== prefixCls || $[57] !== rootClassName || $[58] !== t14) {
205
+ t15 = cx(prefixCls, t14, rootClassName, className);
206
+ $[55] = className;
207
+ $[56] = prefixCls;
208
+ $[57] = rootClassName;
209
+ $[58] = t14;
210
+ $[59] = t15;
211
+ } else t15 = $[59];
212
+ const t16 = semanticStyles?.root;
196
213
  let t17;
197
- if ($[52] !== className || $[53] !== prefixCls || $[54] !== rootClassName || $[55] !== t16) {
198
- t17 = cx(prefixCls, t16, rootClassName, className);
199
- $[52] = className;
200
- $[53] = prefixCls;
201
- $[54] = rootClassName;
202
- $[55] = t16;
203
- $[56] = t17;
204
- } else t17 = $[56];
205
- const t18 = semanticStyles?.root;
206
- let t19;
207
- if ($[57] !== bgColor || $[58] !== size || $[59] !== style || $[60] !== t18) {
208
- t19 = {
214
+ if ($[60] !== bgColor || $[61] !== size || $[62] !== style || $[63] !== t16) {
215
+ t17 = {
209
216
  width: size,
210
217
  height: size,
211
218
  backgroundColor: bgColor,
212
- ...t18,
219
+ ...t16,
213
220
  ...style
214
221
  };
215
- $[57] = bgColor;
216
- $[58] = size;
217
- $[59] = style;
218
- $[60] = t18;
219
- $[61] = t19;
220
- } else t19 = $[61];
221
- let t20;
222
- if ($[62] !== qrProps || $[63] !== type) {
223
- t20 = "svg" === type ? /*#__PURE__*/ jsx(QRCodeSVG, {
222
+ $[60] = bgColor;
223
+ $[61] = size;
224
+ $[62] = style;
225
+ $[63] = t16;
226
+ $[64] = t17;
227
+ } else t17 = $[64];
228
+ let t18;
229
+ if ($[65] !== qrProps || $[66] !== type) {
230
+ t18 = "svg" === type ? /*#__PURE__*/ jsx(QRCodeSVG, {
224
231
  ...qrProps
225
232
  }) : /*#__PURE__*/ jsx(QRCodeCanvas, {
226
233
  ...qrProps
227
234
  });
228
- $[62] = qrProps;
229
- $[63] = type;
230
- $[64] = t20;
231
- } else t20 = $[64];
232
- let t21;
233
- if ($[65] !== config.locale.messages || $[66] !== locale || $[67] !== names?.cover || $[68] !== onRefresh || $[69] !== semanticStyles?.cover || $[70] !== status || $[71] !== statusRender) {
234
- t21 = "active" !== status && /*#__PURE__*/ jsx("div", {
235
+ $[65] = qrProps;
236
+ $[66] = type;
237
+ $[67] = t18;
238
+ } else t18 = $[67];
239
+ let t19;
240
+ if ($[68] !== config.locale.messages || $[69] !== locale || $[70] !== names?.cover || $[71] !== onRefresh || $[72] !== semanticStyles?.cover || $[73] !== status || $[74] !== statusRender) {
241
+ t19 = "active" !== status && /*#__PURE__*/ jsx("div", {
235
242
  "data-tao-qr-cover": "",
236
243
  role: "status",
237
244
  className: names?.cover,
@@ -255,39 +262,39 @@ const qr_code_QRCode = /*#__PURE__*/ forwardRef(function(props, ref) {
255
262
  ]
256
263
  })
257
264
  });
258
- $[65] = config.locale.messages;
259
- $[66] = locale;
260
- $[67] = names?.cover;
261
- $[68] = onRefresh;
262
- $[69] = semanticStyles?.cover;
263
- $[70] = status;
264
- $[71] = statusRender;
265
- $[72] = t21;
266
- } else t21 = $[72];
267
- let t22;
268
- if ($[73] !== bordered || $[74] !== rest || $[75] !== status || $[76] !== t17 || $[77] !== t19 || $[78] !== t20 || $[79] !== t21) {
269
- t22 = /*#__PURE__*/ jsxs("div", {
265
+ $[68] = config.locale.messages;
266
+ $[69] = locale;
267
+ $[70] = names?.cover;
268
+ $[71] = onRefresh;
269
+ $[72] = semanticStyles?.cover;
270
+ $[73] = status;
271
+ $[74] = statusRender;
272
+ $[75] = t19;
273
+ } else t19 = $[75];
274
+ let t20;
275
+ if ($[76] !== bordered || $[77] !== rest || $[78] !== status || $[79] !== t15 || $[80] !== t17 || $[81] !== t18 || $[82] !== t19) {
276
+ t20 = /*#__PURE__*/ jsxs("div", {
270
277
  ...rest,
271
278
  ref: root,
272
279
  "data-tao-qr-code": "",
273
280
  "data-bordered": bordered,
274
281
  "data-status": status,
275
- className: t17,
276
- style: t19,
282
+ className: t15,
283
+ style: t17,
277
284
  children: [
278
- t20,
279
- t21
285
+ t18,
286
+ t19
280
287
  ]
281
288
  });
282
- $[73] = bordered;
283
- $[74] = rest;
284
- $[75] = status;
285
- $[76] = t17;
286
- $[77] = t19;
287
- $[78] = t20;
288
- $[79] = t21;
289
- $[80] = t22;
290
- } else t22 = $[80];
291
- return t22;
289
+ $[76] = bordered;
290
+ $[77] = rest;
291
+ $[78] = status;
292
+ $[79] = t15;
293
+ $[80] = t17;
294
+ $[81] = t18;
295
+ $[82] = t19;
296
+ $[83] = t20;
297
+ } else t20 = $[83];
298
+ return t20;
292
299
  });
293
300
  export { qr_code_QRCode as QRCode };
@@ -1,4 +1,4 @@
1
- import { type AriaAttributes, type ChangeEvent, type ReactNode, type Ref } from 'react';
1
+ import { type AriaAttributes, type ChangeEvent, type FocusEventHandler, type ReactNode, type Ref } from 'react';
2
2
  import { type TaoSize } from '../../provider/tao-provider.js';
3
3
  import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
4
4
  import './radio.css';
@@ -29,6 +29,8 @@ export interface RadioGroupProps extends Pick<AriaAttributes, 'aria-label' | 'ar
29
29
  value?: string;
30
30
  defaultValue?: string;
31
31
  onChange?: (value: string) => void;
32
+ /** Fires when focus leaves any radio in the group (Form validateTrigger). */
33
+ onBlur?: FocusEventHandler<HTMLDivElement>;
32
34
  disabled?: boolean;
33
35
  size?: TaoSize;
34
36
  direction?: 'horizontal' | 'vertical';
@@ -4,6 +4,7 @@ import useLayoutEffect from "@rc-component/util/es/hooks/useLayoutEffect";
4
4
  import { createContext, forwardRef, useContext, useEffect, useId, useRef, useState } from "react";
5
5
  import { useTaoConfig } from "../../provider/tao-provider.js";
6
6
  import { cx } from "../../utils/semantic.js";
7
+ import { useFormLayout } from "../form/form-context.js";
7
8
  import "./radio.css";
8
9
  const RadioGroupContext = /*#__PURE__*/ createContext(null);
9
10
  const radio_Radio = /*#__PURE__*/ forwardRef(function(t0, ref) {
@@ -51,6 +52,7 @@ const radio_Radio = /*#__PURE__*/ forwardRef(function(t0, ref) {
51
52
  }
52
53
  const ctx = useTaoConfig();
53
54
  const groupCtx = useContext(RadioGroupContext);
55
+ const inForm = null != useFormLayout().form;
54
56
  const resolvedDisabled = disabled ?? groupCtx?.disabled ?? ctx.disabled ?? false;
55
57
  const grouped = null != groupCtx && null != value;
56
58
  const resolvedChecked = grouped ? groupCtx.value === value : checked;
@@ -78,7 +80,7 @@ const radio_Radio = /*#__PURE__*/ forwardRef(function(t0, ref) {
78
80
  $[19] = t5;
79
81
  } else t5 = $[19];
80
82
  const t6 = styles?.root;
81
- const t7 = required ?? (void 0 === ariaRequired ? grouped && groupCtx.required : true === ariaRequired || "true" === ariaRequired);
83
+ const t7 = required ?? (!inForm && (void 0 === ariaRequired ? grouped && groupCtx.required : true === ariaRequired || "true" === ariaRequired));
82
84
  let t8;
83
85
  if ($[20] !== ariaProps || $[21] !== defaultChecked || $[22] !== handleChange || $[23] !== ref || $[24] !== resolvedChecked || $[25] !== resolvedDisabled || $[26] !== resolvedName || $[27] !== t7 || $[28] !== value) {
84
86
  t8 = /*#__PURE__*/ jsx("input", {
@@ -177,9 +179,9 @@ const radio_Radio = /*#__PURE__*/ forwardRef(function(t0, ref) {
177
179
  return t16;
178
180
  });
179
181
  function RadioGroup(props) {
180
- const $ = c(60);
182
+ const $ = c(63);
181
183
  const generatedName = useId();
182
- const { options, value, defaultValue, onChange, disabled, size, direction: t0, name, children, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, "aria-required": ariaRequired } = props;
184
+ const { options, value, defaultValue, onChange, onBlur, disabled, size, direction: t0, name, children, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, "aria-required": ariaRequired } = props;
183
185
  const direction = void 0 === t0 ? "horizontal" : t0;
184
186
  const ctx = useTaoConfig();
185
187
  const resolvedDisabled = disabled ?? ctx.disabled ?? false;
@@ -273,12 +275,13 @@ function RadioGroup(props) {
273
275
  let t18;
274
276
  let t19;
275
277
  let t20;
278
+ let t21;
276
279
  let t8;
277
280
  let t9;
278
- if ($[18] !== ariaDescribedBy || $[19] !== ariaErrorMessage || $[20] !== ariaInvalid || $[21] !== ariaLabel || $[22] !== ariaLabelledBy || $[23] !== ariaRequired || $[24] !== children || $[25] !== direction || $[26] !== groupCtxValue || $[27] !== id || $[28] !== options) {
281
+ if ($[18] !== ariaDescribedBy || $[19] !== ariaErrorMessage || $[20] !== ariaInvalid || $[21] !== ariaLabel || $[22] !== ariaLabelledBy || $[23] !== ariaRequired || $[24] !== children || $[25] !== direction || $[26] !== groupCtxValue || $[27] !== id || $[28] !== onBlur || $[29] !== options) {
279
282
  const normalizedOptions = options?.map(_temp);
280
283
  T0 = RadioGroupContext.Provider;
281
- t20 = groupCtxValue;
284
+ t21 = groupCtxValue;
282
285
  t8 = root;
283
286
  t9 = "";
284
287
  t10 = direction;
@@ -290,7 +293,8 @@ function RadioGroup(props) {
290
293
  t16 = ariaErrorMessage;
291
294
  t17 = ariaInvalid;
292
295
  t18 = ariaRequired;
293
- t19 = normalizedOptions ? normalizedOptions.map(_temp2) : children;
296
+ t19 = onBlur;
297
+ t20 = normalizedOptions ? normalizedOptions.map(_temp2) : children;
294
298
  $[18] = ariaDescribedBy;
295
299
  $[19] = ariaErrorMessage;
296
300
  $[20] = ariaInvalid;
@@ -301,40 +305,43 @@ function RadioGroup(props) {
301
305
  $[25] = direction;
302
306
  $[26] = groupCtxValue;
303
307
  $[27] = id;
304
- $[28] = options;
305
- $[29] = T0;
306
- $[30] = t10;
307
- $[31] = t11;
308
- $[32] = t12;
309
- $[33] = t13;
310
- $[34] = t14;
311
- $[35] = t15;
312
- $[36] = t16;
313
- $[37] = t17;
314
- $[38] = t18;
315
- $[39] = t19;
316
- $[40] = t20;
317
- $[41] = t8;
318
- $[42] = t9;
308
+ $[28] = onBlur;
309
+ $[29] = options;
310
+ $[30] = T0;
311
+ $[31] = t10;
312
+ $[32] = t11;
313
+ $[33] = t12;
314
+ $[34] = t13;
315
+ $[35] = t14;
316
+ $[36] = t15;
317
+ $[37] = t16;
318
+ $[38] = t17;
319
+ $[39] = t18;
320
+ $[40] = t19;
321
+ $[41] = t20;
322
+ $[42] = t21;
323
+ $[43] = t8;
324
+ $[44] = t9;
319
325
  } else {
320
- T0 = $[29];
321
- t10 = $[30];
322
- t11 = $[31];
323
- t12 = $[32];
324
- t13 = $[33];
325
- t14 = $[34];
326
- t15 = $[35];
327
- t16 = $[36];
328
- t17 = $[37];
329
- t18 = $[38];
330
- t19 = $[39];
331
- t20 = $[40];
332
- t8 = $[41];
333
- t9 = $[42];
326
+ T0 = $[30];
327
+ t10 = $[31];
328
+ t11 = $[32];
329
+ t12 = $[33];
330
+ t13 = $[34];
331
+ t14 = $[35];
332
+ t15 = $[36];
333
+ t16 = $[37];
334
+ t17 = $[38];
335
+ t18 = $[39];
336
+ t19 = $[40];
337
+ t20 = $[41];
338
+ t21 = $[42];
339
+ t8 = $[43];
340
+ t9 = $[44];
334
341
  }
335
- let t21;
336
- if ($[43] !== t10 || $[44] !== t11 || $[45] !== t12 || $[46] !== t13 || $[47] !== t14 || $[48] !== t15 || $[49] !== t16 || $[50] !== t17 || $[51] !== t18 || $[52] !== t19 || $[53] !== t8 || $[54] !== t9) {
337
- t21 = /*#__PURE__*/ jsx("div", {
342
+ let t22;
343
+ if ($[45] !== t10 || $[46] !== t11 || $[47] !== t12 || $[48] !== t13 || $[49] !== t14 || $[50] !== t15 || $[51] !== t16 || $[52] !== t17 || $[53] !== t18 || $[54] !== t19 || $[55] !== t20 || $[56] !== t8 || $[57] !== t9) {
344
+ t22 = /*#__PURE__*/ jsx("div", {
338
345
  ref: t8,
339
346
  "data-tao-radio-group": t9,
340
347
  "data-tao-direction": t10,
@@ -346,34 +353,36 @@ function RadioGroup(props) {
346
353
  "aria-errormessage": t16,
347
354
  "aria-invalid": t17,
348
355
  "aria-required": t18,
349
- children: t19
356
+ onBlur: t19,
357
+ children: t20
350
358
  });
351
- $[43] = t10;
352
- $[44] = t11;
353
- $[45] = t12;
354
- $[46] = t13;
355
- $[47] = t14;
356
- $[48] = t15;
357
- $[49] = t16;
358
- $[50] = t17;
359
- $[51] = t18;
360
- $[52] = t19;
361
- $[53] = t8;
362
- $[54] = t9;
363
- $[55] = t21;
364
- } else t21 = $[55];
365
- let t22;
366
- if ($[56] !== T0 || $[57] !== t20 || $[58] !== t21) {
367
- t22 = /*#__PURE__*/ jsx(T0, {
368
- value: t20,
369
- children: t21
359
+ $[45] = t10;
360
+ $[46] = t11;
361
+ $[47] = t12;
362
+ $[48] = t13;
363
+ $[49] = t14;
364
+ $[50] = t15;
365
+ $[51] = t16;
366
+ $[52] = t17;
367
+ $[53] = t18;
368
+ $[54] = t19;
369
+ $[55] = t20;
370
+ $[56] = t8;
371
+ $[57] = t9;
372
+ $[58] = t22;
373
+ } else t22 = $[58];
374
+ let t23;
375
+ if ($[59] !== T0 || $[60] !== t21 || $[61] !== t22) {
376
+ t23 = /*#__PURE__*/ jsx(T0, {
377
+ value: t21,
378
+ children: t22
370
379
  });
371
- $[56] = T0;
372
- $[57] = t20;
373
- $[58] = t21;
374
- $[59] = t22;
375
- } else t22 = $[59];
376
- return t22;
380
+ $[59] = T0;
381
+ $[60] = t21;
382
+ $[61] = t22;
383
+ $[62] = t23;
384
+ } else t23 = $[62];
385
+ return t23;
377
386
  }
378
387
  function _temp2(opt_0) {
379
388
  return /*#__PURE__*/ jsx(radio_Radio, {
@@ -37,7 +37,9 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
37
37
  }, !!disabled);
38
38
  const composingRef = useRef(false);
39
39
  const createTag = ()=>{
40
- if (addTokens(search)) onSearchClear();
40
+ const added = addTokens(search);
41
+ if (added) onSearchClear();
42
+ return added;
41
43
  };
42
44
  const knownOptions = useMemo(()=>flattenLeafOptions(options), [
43
45
  options
@@ -187,10 +189,11 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
187
189
  },
188
190
  onKeyDown: (e_0)=>{
189
191
  if (composingRef.current || e_0.nativeEvent.isComposing || 229 === e_0.keyCode) return;
190
- if (multiple && ('Enter' === e_0.key || tokenSeparators?.some((separator)=>separator && search.includes(separator)))) {
192
+ if (!multiple) return;
193
+ if ('Enter' === e_0.key) {
191
194
  e_0.preventDefault();
192
195
  createTag();
193
- }
196
+ } else if (tokenSeparators?.includes(e_0.key) && createTag()) e_0.preventDefault();
194
197
  },
195
198
  placeholder: locale.searchPlaceholder,
196
199
  "aria-label": locale.searchOptions
@@ -28,8 +28,8 @@ function countLeafOptions(options) {
28
28
  return count;
29
29
  }
30
30
  function defaultFilter(input, option) {
31
- const label = 'string' == typeof option.label ? option.label : String(option.label);
32
- return label.toLowerCase().includes(input.toLowerCase());
31
+ const text = 'string' == typeof option.label || 'number' == typeof option.label ? String(option.label) : option.value;
32
+ return text.toLowerCase().includes(input.toLowerCase());
33
33
  }
34
34
  function filterTree(options, filter, input) {
35
35
  const result = [];