@rockshin/tao-ui 0.0.59 → 0.0.60

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 (41) hide show
  1. package/dist/components/cascader/cascader.js +1 -0
  2. package/dist/components/color-picker/color-picker.css +1 -1
  3. package/dist/components/color-picker/color-picker.js +3 -2
  4. package/dist/components/context-menu/context-menu.d.ts +3 -1
  5. package/dist/components/context-menu/context-menu.js +48 -43
  6. package/dist/components/date-picker/calendar/time-panel.js +7 -3
  7. package/dist/components/date-picker/date-picker.js +3 -1
  8. package/dist/components/date-picker/range-picker.js +5 -3
  9. package/dist/components/dropdown/dropdown.d.ts +1 -0
  10. package/dist/components/dropdown/dropdown.js +18 -12
  11. package/dist/components/float-button/float-button.js +2 -1
  12. package/dist/components/form/use-form.js +2 -1
  13. package/dist/components/input-number/input-number.d.ts +2 -1
  14. package/dist/components/input-number/input-number.js +67 -52
  15. package/dist/components/mentions/mentions.js +3 -2
  16. package/dist/components/menu/menu-render.d.ts +6 -0
  17. package/dist/components/menu/menu-render.js +38 -26
  18. package/dist/components/modal/confirm-dialog.js +11 -6
  19. package/dist/components/modal/use-modal.js +1 -1
  20. package/dist/components/pagination/pagination.d.ts +3 -2
  21. package/dist/components/pagination/pagination.js +127 -117
  22. package/dist/components/popover/popover.js +125 -298
  23. package/dist/components/select/mobile-select.js +1 -1
  24. package/dist/components/select/select-model.js +1 -1
  25. package/dist/components/select/use-select-selection.js +94 -86
  26. package/dist/components/statistic/statistic.js +38 -31
  27. package/dist/components/table/table-filter.d.ts +3 -1
  28. package/dist/components/table/table-filter.js +100 -74
  29. package/dist/components/table/table.js +1 -0
  30. package/dist/components/tabs/tabs.d.ts +3 -2
  31. package/dist/components/tabs/tabs.js +122 -112
  32. package/dist/components/time-picker/time-picker.js +4 -2
  33. package/dist/components/tooltip/tooltip.d.ts +1 -1
  34. package/dist/components/tooltip/tooltip.js +168 -210
  35. package/dist/components/tree-select/tree-select.js +1 -0
  36. package/dist/number-input/use-number-input.d.ts +1 -0
  37. package/dist/number-input/use-number-input.js +6 -2
  38. package/dist/provider/tao-provider.js +18 -4
  39. package/dist/theme/control.css +5 -1
  40. package/dist/theme/theme.css +2 -2
  41. package/package.json +1 -1
@@ -6,8 +6,8 @@ import { mergeRefs } from "../../utils/refs.js";
6
6
  import { cx } from "../../utils/semantic.js";
7
7
  import "./tabs.css";
8
8
  function Tabs(t0) {
9
- const $ = c(86);
10
- const { items, activeKey: activeKeyProp, defaultActiveKey, onChange, size, variant: t1, destroyInactiveTabPane: t2, className, classNames, styles, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy } = t0;
9
+ const $ = c(89);
10
+ const { items, activeKey: activeKeyProp, defaultActiveKey, onChange, size, variant: t1, destroyInactiveTabPane: t2, className, style, classNames, styles, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy } = t0;
11
11
  const variant = void 0 === t1 ? "line" : t1;
12
12
  const destroyInactiveTabPane = void 0 === t2 ? false : t2;
13
13
  const ctx = useTaoConfig();
@@ -124,7 +124,7 @@ function Tabs(t0) {
124
124
  next = enabledItems[(idx + 1) % enabledItems.length];
125
125
  } else if (e.key === (rtl ? "ArrowRight" : "ArrowLeft")) {
126
126
  e.preventDefault();
127
- next = enabledItems[(idx - 1 + enabledItems.length) % enabledItems.length];
127
+ next = idx < 0 ? enabledItems[enabledItems.length - 1] : enabledItems[(idx - 1 + enabledItems.length) % enabledItems.length];
128
128
  } else if ("Home" === e.key) {
129
129
  e.preventDefault();
130
130
  next = enabledItems[0];
@@ -154,26 +154,36 @@ function Tabs(t0) {
154
154
  $[28] = t12;
155
155
  } else t12 = $[28];
156
156
  const t13 = styles?.root;
157
- const t14 = classNames?.nav;
158
- let t15;
159
- if ($[29] !== t14) {
160
- t15 = cx(t14);
161
- $[29] = t14;
162
- $[30] = t15;
163
- } else t15 = $[30];
164
- const t16 = styles?.nav;
165
- let t17;
166
- if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
167
- t17 = (event)=>{
168
- if (!(event.relatedTarget instanceof Node) || !event.currentTarget.contains(event.relatedTarget)) setFocusedKey(void 0);
157
+ let t14;
158
+ if ($[29] !== style || $[30] !== t13) {
159
+ t14 = {
160
+ ...t13,
161
+ ...style
169
162
  };
170
- $[31] = t17;
171
- } else t17 = $[31];
163
+ $[29] = style;
164
+ $[30] = t13;
165
+ $[31] = t14;
166
+ } else t14 = $[31];
167
+ const t15 = classNames?.nav;
168
+ let t16;
169
+ if ($[32] !== t15) {
170
+ t16 = cx(t15);
171
+ $[32] = t15;
172
+ $[33] = t16;
173
+ } else t16 = $[33];
174
+ const t17 = styles?.nav;
172
175
  let t18;
173
- if ($[32] !== classNames?.tab || $[33] !== currentKey || $[34] !== destroyInactiveTabPane || $[35] !== focusKey || $[36] !== getItemId || $[37] !== handleSelect || $[38] !== items || $[39] !== styles?.tab) {
174
- let t19;
175
- if ($[41] !== classNames?.tab || $[42] !== currentKey || $[43] !== destroyInactiveTabPane || $[44] !== focusKey || $[45] !== getItemId || $[46] !== handleSelect || $[47] !== styles?.tab) {
176
- t19 = (item_5)=>{
176
+ if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
177
+ t18 = (event)=>{
178
+ if (!(event.relatedTarget instanceof Node) || !event.currentTarget.contains(event.relatedTarget)) setFocusedKey(void 0);
179
+ };
180
+ $[34] = t18;
181
+ } else t18 = $[34];
182
+ let t19;
183
+ if ($[35] !== classNames?.tab || $[36] !== currentKey || $[37] !== destroyInactiveTabPane || $[38] !== focusKey || $[39] !== getItemId || $[40] !== handleSelect || $[41] !== items || $[42] !== styles?.tab) {
184
+ let t20;
185
+ if ($[44] !== classNames?.tab || $[45] !== currentKey || $[46] !== destroyInactiveTabPane || $[47] !== focusKey || $[48] !== getItemId || $[49] !== handleSelect || $[50] !== styles?.tab) {
186
+ t20 = (item_5)=>{
177
187
  const isActive = item_5.key === currentKey;
178
188
  const tabId = getItemId("tab", item_5.key);
179
189
  const panelId = getItemId("panel", item_5.key);
@@ -201,29 +211,29 @@ function Tabs(t0) {
201
211
  children: item_5.label
202
212
  }, item_5.key);
203
213
  };
204
- $[41] = classNames?.tab;
205
- $[42] = currentKey;
206
- $[43] = destroyInactiveTabPane;
207
- $[44] = focusKey;
208
- $[45] = getItemId;
209
- $[46] = handleSelect;
210
- $[47] = styles?.tab;
211
- $[48] = t19;
212
- } else t19 = $[48];
213
- t18 = items.map(t19);
214
- $[32] = classNames?.tab;
215
- $[33] = currentKey;
216
- $[34] = destroyInactiveTabPane;
217
- $[35] = focusKey;
218
- $[36] = getItemId;
219
- $[37] = handleSelect;
220
- $[38] = items;
221
- $[39] = styles?.tab;
222
- $[40] = t18;
223
- } else t18 = $[40];
224
- let t19;
225
- if ($[49] !== classNames?.indicator || $[50] !== direction || $[51] !== inkStyle || $[52] !== styles?.indicator || $[53] !== variant) {
226
- t19 = "line" === variant && inkStyle && /*#__PURE__*/ jsx("span", {
214
+ $[44] = classNames?.tab;
215
+ $[45] = currentKey;
216
+ $[46] = destroyInactiveTabPane;
217
+ $[47] = focusKey;
218
+ $[48] = getItemId;
219
+ $[49] = handleSelect;
220
+ $[50] = styles?.tab;
221
+ $[51] = t20;
222
+ } else t20 = $[51];
223
+ t19 = items.map(t20);
224
+ $[35] = classNames?.tab;
225
+ $[36] = currentKey;
226
+ $[37] = destroyInactiveTabPane;
227
+ $[38] = focusKey;
228
+ $[39] = getItemId;
229
+ $[40] = handleSelect;
230
+ $[41] = items;
231
+ $[42] = styles?.tab;
232
+ $[43] = t19;
233
+ } else t19 = $[43];
234
+ let t20;
235
+ if ($[52] !== classNames?.indicator || $[53] !== direction || $[54] !== inkStyle || $[55] !== styles?.indicator || $[56] !== variant) {
236
+ t20 = "line" === variant && inkStyle && /*#__PURE__*/ jsx("span", {
227
237
  "data-tao-tabs-ink": "",
228
238
  style: {
229
239
  transform: `translateX(${inkStyle.left}px) scaleX(${inkStyle.width})`,
@@ -232,54 +242,54 @@ function Tabs(t0) {
232
242
  },
233
243
  className: cx(classNames?.indicator)
234
244
  });
235
- $[49] = classNames?.indicator;
236
- $[50] = direction;
237
- $[51] = inkStyle;
238
- $[52] = styles?.indicator;
239
- $[53] = variant;
240
- $[54] = t19;
241
- } else t19 = $[54];
242
- let t20;
243
- if ($[55] !== ariaLabel || $[56] !== ariaLabelledBy || $[57] !== handleKeyDown || $[58] !== listRef || $[59] !== t18 || $[60] !== t19) {
244
- t20 = /*#__PURE__*/ jsxs("div", {
245
+ $[52] = classNames?.indicator;
246
+ $[53] = direction;
247
+ $[54] = inkStyle;
248
+ $[55] = styles?.indicator;
249
+ $[56] = variant;
250
+ $[57] = t20;
251
+ } else t20 = $[57];
252
+ let t21;
253
+ if ($[58] !== ariaLabel || $[59] !== ariaLabelledBy || $[60] !== handleKeyDown || $[61] !== listRef || $[62] !== t19 || $[63] !== t20) {
254
+ t21 = /*#__PURE__*/ jsxs("div", {
245
255
  ref: listRef,
246
256
  role: "tablist",
247
257
  "aria-label": ariaLabel,
248
258
  "aria-labelledby": ariaLabelledBy,
249
259
  "data-tao-tabs-list": "",
250
- onBlur: t17,
260
+ onBlur: t18,
251
261
  onKeyDown: handleKeyDown,
252
262
  children: [
253
- t18,
254
- t19
263
+ t19,
264
+ t20
255
265
  ]
256
266
  });
257
- $[55] = ariaLabel;
258
- $[56] = ariaLabelledBy;
259
- $[57] = handleKeyDown;
260
- $[58] = listRef;
261
- $[59] = t18;
262
- $[60] = t19;
263
- $[61] = t20;
264
- } else t20 = $[61];
265
- let t21;
266
- if ($[62] !== t15 || $[63] !== t16 || $[64] !== t20) {
267
- t21 = /*#__PURE__*/ jsx("div", {
267
+ $[58] = ariaLabel;
268
+ $[59] = ariaLabelledBy;
269
+ $[60] = handleKeyDown;
270
+ $[61] = listRef;
271
+ $[62] = t19;
272
+ $[63] = t20;
273
+ $[64] = t21;
274
+ } else t21 = $[64];
275
+ let t22;
276
+ if ($[65] !== t16 || $[66] !== t17 || $[67] !== t21) {
277
+ t22 = /*#__PURE__*/ jsx("div", {
268
278
  "data-tao-tabs-nav": "",
269
- className: t15,
270
- style: t16,
271
- children: t20
279
+ className: t16,
280
+ style: t17,
281
+ children: t21
272
282
  });
273
- $[62] = t15;
274
- $[63] = t16;
275
- $[64] = t20;
276
- $[65] = t21;
277
- } else t21 = $[65];
278
- let t22;
279
- if ($[66] !== classNames?.panel || $[67] !== currentKey || $[68] !== destroyInactiveTabPane || $[69] !== getItemId || $[70] !== items || $[71] !== styles?.panel) {
280
- let t23;
281
- if ($[73] !== classNames?.panel || $[74] !== currentKey || $[75] !== destroyInactiveTabPane || $[76] !== getItemId || $[77] !== styles?.panel) {
282
- t23 = (item_6)=>{
283
+ $[65] = t16;
284
+ $[66] = t17;
285
+ $[67] = t21;
286
+ $[68] = t22;
287
+ } else t22 = $[68];
288
+ let t23;
289
+ if ($[69] !== classNames?.panel || $[70] !== currentKey || $[71] !== destroyInactiveTabPane || $[72] !== getItemId || $[73] !== items || $[74] !== styles?.panel) {
290
+ let t24;
291
+ if ($[76] !== classNames?.panel || $[77] !== currentKey || $[78] !== destroyInactiveTabPane || $[79] !== getItemId || $[80] !== styles?.panel) {
292
+ t24 = (item_6)=>{
283
293
  const isActive_0 = item_6.key === currentKey;
284
294
  const tabId_0 = getItemId("tab", item_6.key);
285
295
  const panelId_0 = getItemId("panel", item_6.key);
@@ -297,44 +307,44 @@ function Tabs(t0) {
297
307
  children: item_6.children
298
308
  }, item_6.key);
299
309
  };
300
- $[73] = classNames?.panel;
301
- $[74] = currentKey;
302
- $[75] = destroyInactiveTabPane;
303
- $[76] = getItemId;
304
- $[77] = styles?.panel;
305
- $[78] = t23;
306
- } else t23 = $[78];
307
- t22 = items.map(t23);
308
- $[66] = classNames?.panel;
309
- $[67] = currentKey;
310
- $[68] = destroyInactiveTabPane;
311
- $[69] = getItemId;
312
- $[70] = items;
313
- $[71] = styles?.panel;
314
- $[72] = t22;
315
- } else t22 = $[72];
316
- let t23;
317
- if ($[79] !== resolvedSize || $[80] !== t12 || $[81] !== t13 || $[82] !== t21 || $[83] !== t22 || $[84] !== variant) {
318
- t23 = /*#__PURE__*/ jsxs("div", {
310
+ $[76] = classNames?.panel;
311
+ $[77] = currentKey;
312
+ $[78] = destroyInactiveTabPane;
313
+ $[79] = getItemId;
314
+ $[80] = styles?.panel;
315
+ $[81] = t24;
316
+ } else t24 = $[81];
317
+ t23 = items.map(t24);
318
+ $[69] = classNames?.panel;
319
+ $[70] = currentKey;
320
+ $[71] = destroyInactiveTabPane;
321
+ $[72] = getItemId;
322
+ $[73] = items;
323
+ $[74] = styles?.panel;
324
+ $[75] = t23;
325
+ } else t23 = $[75];
326
+ let t24;
327
+ if ($[82] !== resolvedSize || $[83] !== t12 || $[84] !== t14 || $[85] !== t22 || $[86] !== t23 || $[87] !== variant) {
328
+ t24 = /*#__PURE__*/ jsxs("div", {
319
329
  "data-tao-tabs": "",
320
330
  "data-tao-variant": variant,
321
331
  "data-tao-size": resolvedSize,
322
332
  className: t12,
323
- style: t13,
333
+ style: t14,
324
334
  children: [
325
- t21,
326
- t22
335
+ t22,
336
+ t23
327
337
  ]
328
338
  });
329
- $[79] = resolvedSize;
330
- $[80] = t12;
331
- $[81] = t13;
332
- $[82] = t21;
333
- $[83] = t22;
334
- $[84] = variant;
335
- $[85] = t23;
336
- } else t23 = $[85];
337
- return t23;
339
+ $[82] = resolvedSize;
340
+ $[83] = t12;
341
+ $[84] = t14;
342
+ $[85] = t22;
343
+ $[86] = t23;
344
+ $[87] = variant;
345
+ $[88] = t24;
346
+ } else t24 = $[88];
347
+ return t24;
338
348
  }
339
349
  function _temp2(t) {
340
350
  return !t.disabled;
@@ -4,9 +4,9 @@ import picker, { RangePicker } from "@rc-component/picker";
4
4
  import dayjs from "@rc-component/picker/generate/dayjs";
5
5
  import en_US from "@rc-component/picker/locale/en_US";
6
6
  import { forwardRef, useImperativeHandle, useMemo, useRef, useState } from "react";
7
+ import { normalizeDigits, resolveNumberFormat } from "../../number-input/locale.js";
7
8
  import { TaoPortalScope, useTaoConfig, useTaoDirection, useTaoInternalConfig } from "../../provider/tao-provider.js";
8
9
  import { mergeRefs } from "../../utils/refs.js";
9
- import { normalizeDigits, resolveNumberFormat } from "../../number-input/locale.js";
10
10
  import { cx } from "../../utils/semantic.js";
11
11
  import { Button } from "../button/button.js";
12
12
  import { parsePickerDate } from "../date-picker/date-localization.js";
@@ -211,7 +211,7 @@ function useAppearance(props, classNames, styles) {
211
211
  position: "absolute",
212
212
  width: "max-content",
213
213
  maxWidth: "calc(100vw - 24px)",
214
- zIndex: "calc(var(--tao-z-index-popup-base) + 50)",
214
+ zIndex: "var(--tao-z-index-popup)",
215
215
  ...props.popupStyle,
216
216
  ...t13
217
217
  };
@@ -330,6 +330,7 @@ const SingleTimePicker = /*#__PURE__*/ forwardRef((props, ref)=>{
330
330
  disabled: disabled,
331
331
  placeholder: placeholder ?? locale?.timePickerLocale?.placeholder ?? locale?.lang.placeholder ?? appearance.config.locale.selectTime ?? 'Select time',
332
332
  prefixCls: prefixCls,
333
+ "aria-invalid": 'error' === status ? true : props['aria-invalid'],
333
334
  "aria-busy": 'validating' === status || void 0,
334
335
  suffix: void 0 !== suffix ? suffix : void 0 !== suffixIcon ? suffixIcon : /*#__PURE__*/ jsx(TimeIcon, {}),
335
336
  allowClear: clear,
@@ -418,6 +419,7 @@ const TimeRangePicker = /*#__PURE__*/ forwardRef((props, ref)=>{
418
419
  appearance.config.locale.endTime ?? 'End time'
419
420
  ],
420
421
  prefixCls: prefixCls,
422
+ "aria-invalid": 'error' === status ? true : props['aria-invalid'],
421
423
  "aria-busy": 'validating' === status || void 0,
422
424
  suffix: void 0 !== suffix ? suffix : void 0 !== suffixIcon ? suffixIcon : /*#__PURE__*/ jsx(TimeIcon, {}),
423
425
  allowClear: clear,
@@ -31,4 +31,4 @@ export interface TooltipProps {
31
31
  /** Exactly one trigger element. */
32
32
  children: ReactNode;
33
33
  }
34
- export declare function Tooltip(props: TooltipProps): import("react").JSX.Element;
34
+ export declare function Tooltip({ direction: directionProp, title, placement, arrow, open, defaultOpen, onOpenChange, mouseEnterDelay, mouseLeaveDelay, color, className, style, classNames, styles, children, }: TooltipProps): import("react").JSX.Element;