@rockshin/tao-ui 0.0.42 → 0.0.43

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 (97) hide show
  1. package/README.md +7 -1
  2. package/component-manifest.json +34 -17
  3. package/dist/components/alert/alert.css +1 -0
  4. package/dist/components/avatar/avatar.js +1 -1
  5. package/dist/components/calendar/calendar.css +10 -60
  6. package/dist/components/calendar/calendar.js +46 -43
  7. package/dist/components/card/card.css +1 -1
  8. package/dist/components/carousel/carousel.css +1 -0
  9. package/dist/components/carousel/carousel.js +62 -7
  10. package/dist/components/collapse/collapse-panels.d.ts +4 -0
  11. package/dist/components/collapse/collapse-panels.js +413 -0
  12. package/dist/components/collapse/collapse.css +199 -0
  13. package/dist/components/collapse/collapse.d.ts +77 -0
  14. package/dist/components/{collapsible/collapsible.js → collapse/collapse.js} +26 -10
  15. package/dist/components/color-picker/color-picker.css +8 -42
  16. package/dist/components/color-picker/color-picker.js +220 -145
  17. package/dist/components/date-picker/date-picker.css +18 -56
  18. package/dist/components/date-picker/date-picker.d.ts +2 -0
  19. package/dist/components/date-picker/date-picker.js +11 -6
  20. package/dist/components/date-picker/presets.js +5 -2
  21. package/dist/components/date-picker/range-picker.d.ts +2 -0
  22. package/dist/components/date-picker/range-picker.js +3 -1
  23. package/dist/components/form/form-item.js +1 -0
  24. package/dist/components/form/form.css +15 -0
  25. package/dist/components/form/form.js +1 -0
  26. package/dist/components/form-field/form-field-view.d.ts +3 -1
  27. package/dist/components/form-field/form-field-view.js +109 -84
  28. package/dist/components/input/base-input.d.ts +25 -0
  29. package/dist/components/input/base-input.js +104 -0
  30. package/dist/components/input/input-shared.css +75 -0
  31. package/dist/components/input/input-shared.d.ts +59 -0
  32. package/dist/components/input/input-shared.js +152 -0
  33. package/dist/components/input/input.css +99 -4
  34. package/dist/components/input/input.d.ts +12 -16
  35. package/dist/components/input/input.js +11 -154
  36. package/dist/components/input/otp.d.ts +29 -0
  37. package/dist/components/input/otp.js +335 -0
  38. package/dist/components/input/password.d.ts +12 -0
  39. package/dist/components/input/password.js +117 -0
  40. package/dist/components/input/search.d.ts +16 -0
  41. package/dist/components/input/search.js +99 -0
  42. package/dist/components/input-number/input-number.d.ts +2 -2
  43. package/dist/components/input-number/input-number.js +2 -2
  44. package/dist/components/list/list-pagination.css +5 -5
  45. package/dist/components/list/list-pagination.js +1 -0
  46. package/dist/components/mentions/mentions.css +7 -0
  47. package/dist/components/modal/modal.css +1 -0
  48. package/dist/components/radio/radio.d.ts +1 -1
  49. package/dist/components/radio/radio.js +78 -73
  50. package/dist/components/select/mobile-select.css +1 -16
  51. package/dist/components/select/mobile-select.d.ts +2 -1
  52. package/dist/components/select/mobile-select.js +68 -63
  53. package/dist/components/select/select-types.d.ts +2 -0
  54. package/dist/components/select/select.css +19 -0
  55. package/dist/components/select/select.js +31 -17
  56. package/dist/components/spinner/spinner.css +1 -1
  57. package/dist/components/steps/steps.css +53 -3
  58. package/dist/components/table/table.css +0 -5
  59. package/dist/components/table/table.js +21 -22
  60. package/dist/components/textarea/textarea.css +20 -0
  61. package/dist/components/textarea/textarea.d.ts +12 -6
  62. package/dist/components/textarea/textarea.js +120 -219
  63. package/dist/components/time-picker/time-picker.css +7 -0
  64. package/dist/components/tree/tree-check.d.ts +1 -0
  65. package/dist/components/tree/tree-check.js +36 -0
  66. package/dist/components/tree/tree.css +13 -18
  67. package/dist/components/tree/tree.js +2 -3
  68. package/dist/components/tree-select/select-engine.css +7 -0
  69. package/dist/components/tree-select/tree-select.js +2 -3
  70. package/dist/components/upload/upload.css +0 -11
  71. package/dist/components/upload/upload.js +13 -3
  72. package/dist/docs/component-docs.js +2 -2
  73. package/dist/docs/components/{collapsible.doc.d.ts → collapse.doc.d.ts} +1 -1
  74. package/dist/docs/components/collapse.doc.js +47 -0
  75. package/dist/docs/components/input.doc.js +11 -4
  76. package/dist/docs/components/textarea.doc.js +4 -2
  77. package/dist/entries/collapse.d.ts +3 -0
  78. package/dist/entries/{collapsible.js → collapse.js} +1 -1
  79. package/dist/entries/input.d.ts +1 -1
  80. package/dist/entries/textarea.d.ts +1 -1
  81. package/dist/index.d.ts +3 -3
  82. package/dist/index.js +1 -1
  83. package/dist/provider/locale.d.ts +6 -0
  84. package/dist/provider/locale.js +10 -0
  85. package/dist/provider/tao-provider.js +1 -0
  86. package/dist/theme/control.css +2 -2
  87. package/dist/theme/theme.css +3 -1
  88. package/dist/theme/tokens.d.ts +2 -2
  89. package/dist/theme/tokens.js +1 -0
  90. package/dist/utils/field-label.d.ts +4 -0
  91. package/dist/utils/field-label.js +7 -0
  92. package/llms.txt +18 -15
  93. package/package.json +7 -4
  94. package/dist/components/collapsible/collapsible.css +0 -49
  95. package/dist/components/collapsible/collapsible.d.ts +0 -39
  96. package/dist/docs/components/collapsible.doc.js +0 -39
  97. package/dist/entries/collapsible.d.ts +0 -3
@@ -102,6 +102,7 @@ button[data-tao-modal-close] {
102
102
  justify-content: center;
103
103
  align-items: center;
104
104
  margin-inline-start: auto;
105
+ margin-inline-end: calc(-1 * var(--tao-padding-sm));
105
106
  padding: 0;
106
107
  display: flex;
107
108
  }
@@ -35,4 +35,4 @@ export interface RadioGroupProps extends Pick<AriaAttributes, 'aria-label' | 'ar
35
35
  name?: string;
36
36
  children?: ReactNode;
37
37
  }
38
- export declare function RadioGroup({ options, value, onChange, disabled, direction, name, children, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, }: RadioGroupProps): import("react").JSX.Element;
38
+ export declare function RadioGroup({ options, value, defaultValue, onChange, disabled, direction, name, children, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, }: RadioGroupProps): import("react").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
- import { createContext, forwardRef, useContext } from "react";
3
+ import { createContext, forwardRef, useContext, useState } from "react";
4
4
  import { useTaoConfig } from "../../provider/tao-provider.js";
5
5
  import { cx } from "../../utils/semantic.js";
6
6
  import "./radio.css";
@@ -171,34 +171,39 @@ const radio_Radio = /*#__PURE__*/ forwardRef(function(t0, ref) {
171
171
  return t15;
172
172
  });
173
173
  function RadioGroup(t0) {
174
- const $ = c(47);
175
- const { options, value, onChange, disabled, direction: t1, name, children, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, "aria-required": ariaRequired } = t0;
174
+ const $ = c(48);
175
+ const { options, value, defaultValue, onChange, disabled, direction: t1, name, children, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, "aria-required": ariaRequired } = t0;
176
176
  const direction = void 0 === t1 ? "horizontal" : t1;
177
177
  const ctx = useTaoConfig();
178
178
  const resolvedDisabled = disabled ?? ctx.disabled ?? false;
179
+ const [internalValue, setInternalValue] = useState(defaultValue);
180
+ const isControlled = void 0 !== value;
181
+ const resolvedValue = isControlled ? value : internalValue;
179
182
  let t2;
180
- if ($[0] !== onChange) {
183
+ if ($[0] !== isControlled || $[1] !== onChange) {
181
184
  t2 = (itemValue)=>{
185
+ if (!isControlled) setInternalValue(itemValue);
182
186
  onChange?.(itemValue);
183
187
  };
184
- $[0] = onChange;
185
- $[1] = t2;
186
- } else t2 = $[1];
188
+ $[0] = isControlled;
189
+ $[1] = onChange;
190
+ $[2] = t2;
191
+ } else t2 = $[2];
187
192
  const handleChange = t2;
188
193
  let t3;
189
- if ($[2] !== handleChange || $[3] !== name || $[4] !== resolvedDisabled || $[5] !== value) {
194
+ if ($[3] !== handleChange || $[4] !== name || $[5] !== resolvedDisabled || $[6] !== resolvedValue) {
190
195
  t3 = {
191
196
  name,
192
- value,
197
+ value: resolvedValue,
193
198
  disabled: resolvedDisabled,
194
199
  onChange: handleChange
195
200
  };
196
- $[2] = handleChange;
197
- $[3] = name;
198
- $[4] = resolvedDisabled;
199
- $[5] = value;
200
- $[6] = t3;
201
- } else t3 = $[6];
201
+ $[3] = handleChange;
202
+ $[4] = name;
203
+ $[5] = resolvedDisabled;
204
+ $[6] = resolvedValue;
205
+ $[7] = t3;
206
+ } else t3 = $[7];
202
207
  const groupCtxValue = t3;
203
208
  let T0;
204
209
  let t10;
@@ -213,7 +218,7 @@ function RadioGroup(t0) {
213
218
  let t7;
214
219
  let t8;
215
220
  let t9;
216
- if ($[7] !== ariaDescribedBy || $[8] !== ariaErrorMessage || $[9] !== ariaInvalid || $[10] !== ariaLabel || $[11] !== ariaLabelledBy || $[12] !== ariaRequired || $[13] !== children || $[14] !== direction || $[15] !== groupCtxValue || $[16] !== id || $[17] !== options) {
221
+ if ($[8] !== ariaDescribedBy || $[9] !== ariaErrorMessage || $[10] !== ariaInvalid || $[11] !== ariaLabel || $[12] !== ariaLabelledBy || $[13] !== ariaRequired || $[14] !== children || $[15] !== direction || $[16] !== groupCtxValue || $[17] !== id || $[18] !== options) {
217
222
  const normalizedOptions = options?.map(_temp);
218
223
  T0 = RadioGroupContext.Provider;
219
224
  t15 = groupCtxValue;
@@ -228,47 +233,47 @@ function RadioGroup(t0) {
228
233
  t12 = ariaInvalid;
229
234
  t13 = ariaRequired;
230
235
  t14 = normalizedOptions ? normalizedOptions.map(_temp2) : children;
231
- $[7] = ariaDescribedBy;
232
- $[8] = ariaErrorMessage;
233
- $[9] = ariaInvalid;
234
- $[10] = ariaLabel;
235
- $[11] = ariaLabelledBy;
236
- $[12] = ariaRequired;
237
- $[13] = children;
238
- $[14] = direction;
239
- $[15] = groupCtxValue;
240
- $[16] = id;
241
- $[17] = options;
242
- $[18] = T0;
243
- $[19] = t10;
244
- $[20] = t11;
245
- $[21] = t12;
246
- $[22] = t13;
247
- $[23] = t14;
248
- $[24] = t15;
249
- $[25] = t4;
250
- $[26] = t5;
251
- $[27] = t6;
252
- $[28] = t7;
253
- $[29] = t8;
254
- $[30] = t9;
236
+ $[8] = ariaDescribedBy;
237
+ $[9] = ariaErrorMessage;
238
+ $[10] = ariaInvalid;
239
+ $[11] = ariaLabel;
240
+ $[12] = ariaLabelledBy;
241
+ $[13] = ariaRequired;
242
+ $[14] = children;
243
+ $[15] = direction;
244
+ $[16] = groupCtxValue;
245
+ $[17] = id;
246
+ $[18] = options;
247
+ $[19] = T0;
248
+ $[20] = t10;
249
+ $[21] = t11;
250
+ $[22] = t12;
251
+ $[23] = t13;
252
+ $[24] = t14;
253
+ $[25] = t15;
254
+ $[26] = t4;
255
+ $[27] = t5;
256
+ $[28] = t6;
257
+ $[29] = t7;
258
+ $[30] = t8;
259
+ $[31] = t9;
255
260
  } else {
256
- T0 = $[18];
257
- t10 = $[19];
258
- t11 = $[20];
259
- t12 = $[21];
260
- t13 = $[22];
261
- t14 = $[23];
262
- t15 = $[24];
263
- t4 = $[25];
264
- t5 = $[26];
265
- t6 = $[27];
266
- t7 = $[28];
267
- t8 = $[29];
268
- t9 = $[30];
261
+ T0 = $[19];
262
+ t10 = $[20];
263
+ t11 = $[21];
264
+ t12 = $[22];
265
+ t13 = $[23];
266
+ t14 = $[24];
267
+ t15 = $[25];
268
+ t4 = $[26];
269
+ t5 = $[27];
270
+ t6 = $[28];
271
+ t7 = $[29];
272
+ t8 = $[30];
273
+ t9 = $[31];
269
274
  }
270
275
  let t16;
271
- if ($[31] !== t10 || $[32] !== t11 || $[33] !== t12 || $[34] !== t13 || $[35] !== t14 || $[36] !== t4 || $[37] !== t5 || $[38] !== t6 || $[39] !== t7 || $[40] !== t8 || $[41] !== t9) {
276
+ if ($[32] !== t10 || $[33] !== t11 || $[34] !== t12 || $[35] !== t13 || $[36] !== t14 || $[37] !== t4 || $[38] !== t5 || $[39] !== t6 || $[40] !== t7 || $[41] !== t8 || $[42] !== t9) {
272
277
  t16 = /*#__PURE__*/ jsx("div", {
273
278
  "data-tao-radio-group": t4,
274
279
  "data-tao-direction": t5,
@@ -282,30 +287,30 @@ function RadioGroup(t0) {
282
287
  "aria-required": t13,
283
288
  children: t14
284
289
  });
285
- $[31] = t10;
286
- $[32] = t11;
287
- $[33] = t12;
288
- $[34] = t13;
289
- $[35] = t14;
290
- $[36] = t4;
291
- $[37] = t5;
292
- $[38] = t6;
293
- $[39] = t7;
294
- $[40] = t8;
295
- $[41] = t9;
296
- $[42] = t16;
297
- } else t16 = $[42];
290
+ $[32] = t10;
291
+ $[33] = t11;
292
+ $[34] = t12;
293
+ $[35] = t13;
294
+ $[36] = t14;
295
+ $[37] = t4;
296
+ $[38] = t5;
297
+ $[39] = t6;
298
+ $[40] = t7;
299
+ $[41] = t8;
300
+ $[42] = t9;
301
+ $[43] = t16;
302
+ } else t16 = $[43];
298
303
  let t17;
299
- if ($[43] !== T0 || $[44] !== t15 || $[45] !== t16) {
304
+ if ($[44] !== T0 || $[45] !== t15 || $[46] !== t16) {
300
305
  t17 = /*#__PURE__*/ jsx(T0, {
301
306
  value: t15,
302
307
  children: t16
303
308
  });
304
- $[43] = T0;
305
- $[44] = t15;
306
- $[45] = t16;
307
- $[46] = t17;
308
- } else t17 = $[46];
309
+ $[44] = T0;
310
+ $[45] = t15;
311
+ $[46] = t16;
312
+ $[47] = t17;
313
+ } else t17 = $[47];
309
314
  return t17;
310
315
  }
311
316
  function _temp2(opt_0) {
@@ -140,23 +140,8 @@
140
140
  }
141
141
 
142
142
  [data-tao-sheet-done] {
143
- border-radius: var(--tao-radius-md);
144
- background: var(--tao-primary);
143
+ -webkit-tap-highlight-color: transparent;
145
144
  width: 100%;
146
145
  height: 44px;
147
- color: var(--tao-color-text-light-solid);
148
- font-family: var(--tao-font-family);
149
- font-size: var(--tao-font-size-base);
150
- font-weight: var(--tao-font-weight-medium);
151
- cursor: pointer;
152
- -webkit-tap-highlight-color: transparent;
153
- border: none;
154
- justify-content: center;
155
- align-items: center;
156
- display: flex;
157
- }
158
-
159
- [data-tao-sheet-done]:active {
160
- opacity: .85;
161
146
  }
162
147
 
@@ -29,5 +29,6 @@ declare function MobileSelectContentInner({ options, value, onChange, onMultiCha
29
29
  export { MobileSelectContentInner as MobileSelectContent };
30
30
  export interface MobileSelectDrawerProps extends MobileSelectContentProps {
31
31
  open: boolean;
32
+ mobileTitle?: ReactNode;
32
33
  }
33
- export declare function MobileSelectDrawer({ open, onClose, placeholder, classNames, styles, popupRender, ...rest }: MobileSelectDrawerProps): import("react").JSX.Element;
34
+ export declare function MobileSelectDrawer({ open, mobileTitle, onClose, placeholder, classNames, styles, popupRender, ...rest }: MobileSelectDrawerProps): import("react").JSX.Element;
@@ -2,7 +2,9 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
3
  import { useCallback, useMemo, useRef } from "react";
4
4
  import { useTaoConfig } from "../../provider/tao-provider.js";
5
+ import { Button } from "../button/button.js";
5
6
  import { Drawer } from "../drawer/drawer.js";
7
+ import { useMobileTitle } from "../../utils/field-label.js";
6
8
  import { SearchIcon } from "./select-icons.js";
7
9
  import { countLeafOptions, defaultFilter, filterTree, flattenLeafOptions } from "./select-model.js";
8
10
  import { useSelectSelection } from "./use-select-selection.js";
@@ -204,8 +206,8 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
204
206
  }),
205
207
  multiple && /*#__PURE__*/ jsx("div", {
206
208
  "data-tao-sheet-footer": "",
207
- children: /*#__PURE__*/ jsx("button", {
208
- type: "button",
209
+ children: /*#__PURE__*/ jsx(Button, {
210
+ size: "large",
209
211
  "data-tao-sheet-done": "",
210
212
  disabled: disabled || null != maxCount && draft.length > maxCount,
211
213
  onClick: handleDone,
@@ -216,8 +218,9 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
216
218
  });
217
219
  }
218
220
  function MobileSelectDrawer(t0) {
219
- const $ = c(28);
221
+ const $ = c(29);
220
222
  let classNames;
223
+ let mobileTitle;
221
224
  let onClose;
222
225
  let open;
223
226
  let placeholder;
@@ -225,27 +228,30 @@ function MobileSelectDrawer(t0) {
225
228
  let rest;
226
229
  let styles;
227
230
  if ($[0] !== t0) {
228
- ({ open, onClose, placeholder, classNames, styles, popupRender, ...rest } = t0);
231
+ ({ open, mobileTitle, onClose, placeholder, classNames, styles, popupRender, ...rest } = t0);
229
232
  $[0] = t0;
230
233
  $[1] = classNames;
231
- $[2] = onClose;
232
- $[3] = open;
233
- $[4] = placeholder;
234
- $[5] = popupRender;
235
- $[6] = rest;
236
- $[7] = styles;
234
+ $[2] = mobileTitle;
235
+ $[3] = onClose;
236
+ $[4] = open;
237
+ $[5] = placeholder;
238
+ $[6] = popupRender;
239
+ $[7] = rest;
240
+ $[8] = styles;
237
241
  } else {
238
242
  classNames = $[1];
239
- onClose = $[2];
240
- open = $[3];
241
- placeholder = $[4];
242
- popupRender = $[5];
243
- rest = $[6];
244
- styles = $[7];
243
+ mobileTitle = $[2];
244
+ onClose = $[3];
245
+ open = $[4];
246
+ placeholder = $[5];
247
+ popupRender = $[6];
248
+ rest = $[7];
249
+ styles = $[8];
245
250
  }
246
251
  const { locale } = useTaoConfig();
252
+ const title = useMobileTitle(mobileTitle, locale.select);
247
253
  let t1;
248
- if ($[8] !== classNames || $[9] !== onClose || $[10] !== placeholder || $[11] !== rest || $[12] !== styles) {
254
+ if ($[9] !== classNames || $[10] !== onClose || $[11] !== placeholder || $[12] !== rest || $[13] !== styles) {
249
255
  t1 = /*#__PURE__*/ jsx(MobileSelectContentInner, {
250
256
  onClose: onClose,
251
257
  placeholder: placeholder,
@@ -253,61 +259,60 @@ function MobileSelectDrawer(t0) {
253
259
  styles: styles,
254
260
  ...rest
255
261
  });
256
- $[8] = classNames;
257
- $[9] = onClose;
258
- $[10] = placeholder;
259
- $[11] = rest;
260
- $[12] = styles;
261
- $[13] = t1;
262
- } else t1 = $[13];
262
+ $[9] = classNames;
263
+ $[10] = onClose;
264
+ $[11] = placeholder;
265
+ $[12] = rest;
266
+ $[13] = styles;
267
+ $[14] = t1;
268
+ } else t1 = $[14];
263
269
  const content = t1;
264
- const t2 = placeholder ?? locale.select;
265
- const t3 = classNames?.popup;
266
- let t4;
267
- if ($[14] !== t3) {
268
- t4 = {
269
- root: t3
270
+ const t2 = classNames?.popup;
271
+ let t3;
272
+ if ($[15] !== t2) {
273
+ t3 = {
274
+ root: t2
270
275
  };
271
- $[14] = t3;
272
- $[15] = t4;
273
- } else t4 = $[15];
274
- const t5 = styles?.popup;
275
- let t6;
276
- if ($[16] !== t5) {
277
- t6 = {
278
- root: t5
276
+ $[15] = t2;
277
+ $[16] = t3;
278
+ } else t3 = $[16];
279
+ const t4 = styles?.popup;
280
+ let t5;
281
+ if ($[17] !== t4) {
282
+ t5 = {
283
+ root: t4
279
284
  };
280
- $[16] = t5;
281
- $[17] = t6;
282
- } else t6 = $[17];
285
+ $[17] = t4;
286
+ $[18] = t5;
287
+ } else t5 = $[18];
288
+ let t6;
289
+ if ($[19] !== content || $[20] !== popupRender) {
290
+ t6 = popupRender ? popupRender(content) : content;
291
+ $[19] = content;
292
+ $[20] = popupRender;
293
+ $[21] = t6;
294
+ } else t6 = $[21];
283
295
  let t7;
284
- if ($[18] !== content || $[19] !== popupRender) {
285
- t7 = popupRender ? popupRender(content) : content;
286
- $[18] = content;
287
- $[19] = popupRender;
288
- $[20] = t7;
289
- } else t7 = $[20];
290
- let t8;
291
- if ($[21] !== onClose || $[22] !== open || $[23] !== t2 || $[24] !== t4 || $[25] !== t6 || $[26] !== t7) {
292
- t8 = /*#__PURE__*/ jsx(Drawer, {
296
+ if ($[22] !== onClose || $[23] !== open || $[24] !== t3 || $[25] !== t5 || $[26] !== t6 || $[27] !== title) {
297
+ t7 = /*#__PURE__*/ jsx(Drawer, {
293
298
  open: open,
294
299
  onClose: onClose,
295
300
  placement: "bottom",
296
- title: t2,
301
+ title: title,
297
302
  height: "70vh",
298
- classNames: t4,
299
- styles: t6,
300
- children: t7
303
+ classNames: t3,
304
+ styles: t5,
305
+ children: t6
301
306
  });
302
- $[21] = onClose;
303
- $[22] = open;
304
- $[23] = t2;
305
- $[24] = t4;
306
- $[25] = t6;
307
- $[26] = t7;
308
- $[27] = t8;
309
- } else t8 = $[27];
310
- return t8;
307
+ $[22] = onClose;
308
+ $[23] = open;
309
+ $[24] = t3;
310
+ $[25] = t5;
311
+ $[26] = t6;
312
+ $[27] = title;
313
+ $[28] = t7;
314
+ } else t7 = $[28];
315
+ return t7;
311
316
  }
312
317
  function CheckIcon() {
313
318
  const $ = c(1);
@@ -120,6 +120,8 @@ export interface SelectProps extends Pick<AriaAttributes, 'aria-label' | 'aria-l
120
120
  hideSelected?: boolean;
121
121
  /** Force mobile or desktop. Otherwise use viewport <576px; an open popup keeps its presentation until closed. */
122
122
  mobile?: boolean;
123
+ /** Mobile drawer title. Defaults to the Form.Item/FormField label, then locale text. */
124
+ mobileTitle?: ReactNode;
123
125
  /** CSS class on the root element. */
124
126
  className?: string;
125
127
  /** Inline styles on the root element. */
@@ -160,6 +160,25 @@ button[data-tao-select-clear] {
160
160
  display: none;
161
161
  }
162
162
 
163
+ @media (hover: hover) and (pointer: fine) {
164
+ [data-tao-select-icons][data-tao-clearable] {
165
+ display: grid;
166
+ }
167
+
168
+ [data-tao-select-icons][data-tao-clearable] > * {
169
+ grid-area: 1 / 1;
170
+ }
171
+
172
+ [data-tao-select]:not(:hover) [data-tao-select-clear]:not(:focus-visible) {
173
+ opacity: 0;
174
+ pointer-events: none;
175
+ }
176
+
177
+ [data-tao-select]:not(:hover) [data-tao-select-icons][data-tao-clearable]:not(:has(:focus-visible)) [data-tao-select-icon] {
178
+ display: flex;
179
+ }
180
+ }
181
+
163
182
  [data-tao-select-icon] {
164
183
  color: var(--tao-color-text-tertiary);
165
184
  transition: transform var(--tao-motion-duration-fast)
@@ -211,27 +211,39 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
211
211
  }) : null;
212
212
  const trailingIcons = /*#__PURE__*/ jsx("span", {
213
213
  "data-tao-select-icons": "",
214
+ "data-tao-clearable": showClearBtn || void 0,
214
215
  children: loading ? /*#__PURE__*/ jsx("span", {
215
216
  "data-tao-select-icon": "",
216
217
  "data-tao-select-loading-slot": "",
217
218
  children: loadingIcon ?? /*#__PURE__*/ jsx(LoadingIcon, {})
218
- }) : showClearBtn ? /*#__PURE__*/ jsx("span", {
219
- "data-tao-select-clear": "",
220
- className: cx(classNames?.clear),
221
- style: styles?.clear,
222
- onPointerDown: (e_2)=>e_2.stopPropagation(),
223
- onClick: handleClear,
224
- onKeyDown: (e_3)=>{
225
- if ('Enter' === e_3.key || ' ' === e_3.key) {
226
- e_3.preventDefault();
227
- e_3.stopPropagation();
228
- clearValue();
229
- }
230
- },
231
- role: "button",
232
- tabIndex: 0,
233
- "aria-label": ctx.locale.clear,
234
- children: clearIcon
219
+ }) : showClearBtn ? /*#__PURE__*/ jsxs(Fragment, {
220
+ children: [
221
+ /*#__PURE__*/ jsx("span", {
222
+ "data-tao-select-clear": "",
223
+ className: cx(classNames?.clear),
224
+ style: styles?.clear,
225
+ onPointerDown: (e_2)=>e_2.stopPropagation(),
226
+ onClick: handleClear,
227
+ onKeyDown: (e_3)=>{
228
+ if ('Enter' === e_3.key || ' ' === e_3.key) {
229
+ e_3.preventDefault();
230
+ e_3.stopPropagation();
231
+ clearValue();
232
+ }
233
+ },
234
+ role: "button",
235
+ tabIndex: 0,
236
+ "aria-label": ctx.locale.clear,
237
+ children: clearIcon
238
+ }),
239
+ /*#__PURE__*/ jsx("span", {
240
+ "data-tao-select-icon": "",
241
+ "data-tao-custom-suffix": null != suffixIcon || void 0,
242
+ className: cx(classNames?.suffix),
243
+ style: styles?.suffix,
244
+ children: suffixIcon ?? /*#__PURE__*/ jsx(ChevronDownIcon, {})
245
+ })
246
+ ]
235
247
  }) : /*#__PURE__*/ jsx("span", {
236
248
  "data-tao-select-icon": "",
237
249
  "data-tao-custom-suffix": null != suffixIcon || void 0,
@@ -340,6 +352,7 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
340
352
  ]
341
353
  }),
342
354
  /*#__PURE__*/ jsx(MobileSelectDrawer, {
355
+ mobileTitle: props.mobileTitle,
343
356
  classNames: classNames,
344
357
  styles: styles,
345
358
  popupRender: popupRender,
@@ -668,6 +681,7 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
668
681
  asChild: true,
669
682
  children: /*#__PURE__*/ jsxs("div", {
670
683
  ref: triggerRef,
684
+ tabIndex: resolvedDisabled ? -1 : 0,
671
685
  id: id,
672
686
  ...ariaProps,
673
687
  "data-tao-control": "",
@@ -53,7 +53,7 @@
53
53
  }
54
54
 
55
55
  [data-tao-spinner-container][data-tao-spinning] [data-tao-spinner-content] {
56
- opacity: .5;
56
+ opacity: .15;
57
57
  pointer-events: none;
58
58
  -webkit-user-select: none;
59
59
  user-select: none;
@@ -610,9 +610,9 @@
610
610
  }
611
611
 
612
612
  [data-tao-steps][data-tao-type="panel"] [data-tao-steps-panel-arrow] {
613
- top: calc(var(--tao-steps-panel-line-width) * -1);
613
+ top: calc(var(--tao-steps-panel-line-width) / -2);
614
614
  z-index: 1;
615
- height: calc(var(--tao-steps-panel-line-width) * 2 + 100%);
615
+ height: calc(var(--tao-steps-panel-line-width) + 100%);
616
616
  width: var(--tao-steps-panel-notch-width);
617
617
  stroke-linecap: round;
618
618
  position: absolute;
@@ -642,6 +642,54 @@
642
642
  --tao-steps-panel-radius: var(--tao-radius-sm);
643
643
  }
644
644
 
645
+ [data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step] {
646
+ isolation: isolate;
647
+ background: none;
648
+ }
649
+
650
+ [data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:before {
651
+ content: "";
652
+ z-index: -1;
653
+ inset-block: calc(var(--tao-steps-panel-line-width) * -1);
654
+ background: var(--tao-steps-panel-bg);
655
+ border-radius: inherit;
656
+ clip-path: polygon(0 0,
657
+ calc(100% - var(--tao-steps-panel-notch-width)) 0,
658
+ 100% 50%,
659
+ calc(100% - var(--tao-steps-panel-notch-width)) 100%,
660
+ 0 100%);
661
+ transition: background-color var(--tao-motion-duration-mid)
662
+ var(--tao-motion-ease-out);
663
+ position: absolute;
664
+ inset-inline-start: 0;
665
+ inset-inline-end: calc(var(--tao-steps-panel-notch-width) * -1);
666
+ }
667
+
668
+ :dir(rtl) [data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:before {
669
+ clip-path: polygon(var(--tao-steps-panel-notch-width) 0,
670
+ 100% 0,
671
+ 100% 100%,
672
+ var(--tao-steps-panel-notch-width) 100%,
673
+ 0 50%);
674
+ }
675
+
676
+ [data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step][data-tao-active]:before {
677
+ background: var(--tao-steps-panel-active-bg);
678
+ }
679
+
680
+ [data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:first-child:before {
681
+ inset-inline-start: calc(var(--tao-steps-panel-line-width) * -1);
682
+ }
683
+
684
+ [data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:last-child:before {
685
+ clip-path: none;
686
+ inset-inline-end: calc(var(--tao-steps-panel-line-width) * -1);
687
+ }
688
+
689
+ [data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] [data-tao-steps-panel-arrow] {
690
+ display: none;
691
+ }
692
+
645
693
  [data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:not(:first-child) {
646
694
  clip-path: polygon(var(--tao-steps-panel-line-width) 0,
647
695
  calc(100% + var(--tao-steps-panel-notch-width)) 0,
@@ -727,11 +775,13 @@
727
775
  --tao-steps-progress-unitless: calc(100 / tan(atan2(var(--tao-steps-progress-svg-size), 1px)));
728
776
  --tao-steps-progress-radius: calc((var(--tao-steps-progress-svg-size) - var(--tao-steps-line-width-bold)) *
729
777
  var(--tao-steps-progress-unitless) / 2);
730
- inset: calc(var(--tao-steps-progress-enhance) * -1);
731
778
  width: var(--tao-steps-progress-svg-size);
732
779
  height: var(--tao-steps-progress-svg-size);
733
780
  pointer-events: none;
734
781
  position: absolute;
782
+ top: 50%;
783
+ left: 50%;
784
+ transform: translate(-50%, -50%);
735
785
  }
736
786
 
737
787
  [data-tao-steps-progress] circle {
@@ -282,11 +282,6 @@
282
282
  width: 48px;
283
283
  }
284
284
 
285
- [data-tao-table-checkbox] {
286
- cursor: pointer;
287
- accent-color: var(--tao-primary);
288
- }
289
-
290
285
  [data-tao-table-cell][data-tao-fixed] {
291
286
  z-index: 1;
292
287
  background: var(--tao-color-bg-container);