@rockshin/tao-ui 0.0.58 → 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 (111) 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 +18 -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.css +1 -1
  11. package/dist/components/color-picker/color-picker.js +386 -362
  12. package/dist/components/context-menu/context-menu.d.ts +3 -1
  13. package/dist/components/context-menu/context-menu.js +48 -43
  14. package/dist/components/date-picker/calendar/calendar-grid.d.ts +5 -3
  15. package/dist/components/date-picker/calendar/calendar-grid.js +9 -4
  16. package/dist/components/date-picker/calendar/month-grid.d.ts +2 -1
  17. package/dist/components/date-picker/calendar/month-grid.js +61 -45
  18. package/dist/components/date-picker/calendar/time-panel.d.ts +8 -1
  19. package/dist/components/date-picker/calendar/time-panel.js +93 -88
  20. package/dist/components/date-picker/calendar/year-grid.d.ts +2 -1
  21. package/dist/components/date-picker/calendar/year-grid.js +60 -44
  22. package/dist/components/date-picker/date-picker.css +9 -0
  23. package/dist/components/date-picker/date-picker.js +25 -14
  24. package/dist/components/date-picker/range-picker.d.ts +2 -0
  25. package/dist/components/date-picker/range-picker.js +132 -73
  26. package/dist/components/date-picker/types.js +1 -1
  27. package/dist/components/drawer/drawer.d.ts +1 -1
  28. package/dist/components/drawer/drawer.js +4 -3
  29. package/dist/components/dropdown/dropdown.d.ts +1 -0
  30. package/dist/components/dropdown/dropdown.js +29 -21
  31. package/dist/components/float-button/float-button.js +6 -5
  32. package/dist/components/form/form-item.d.ts +1 -1
  33. package/dist/components/form/form-item.js +160 -120
  34. package/dist/components/form/use-form.js +2 -1
  35. package/dist/components/form-field/form-field-view.d.ts +2 -1
  36. package/dist/components/form-field/form-field-view.js +173 -108
  37. package/dist/components/input/input-shared.js +3 -2
  38. package/dist/components/input/otp.js +114 -110
  39. package/dist/components/input/password.js +55 -61
  40. package/dist/components/input/search.js +8 -4
  41. package/dist/components/input-number/input-number.d.ts +2 -1
  42. package/dist/components/input-number/input-number.js +67 -52
  43. package/dist/components/mentions/mentions.js +4 -2
  44. package/dist/components/menu/menu-render.d.ts +6 -0
  45. package/dist/components/menu/menu-render.js +39 -26
  46. package/dist/components/modal/confirm-dialog.js +22 -10
  47. package/dist/components/modal/modal.js +320 -315
  48. package/dist/components/modal/use-modal.js +1 -1
  49. package/dist/components/pagination/pagination.d.ts +4 -2
  50. package/dist/components/pagination/pagination.js +128 -117
  51. package/dist/components/popover/popover.js +214 -351
  52. package/dist/components/qr-code/qr-code.js +157 -150
  53. package/dist/components/radio/radio.d.ts +3 -1
  54. package/dist/components/radio/radio.js +73 -64
  55. package/dist/components/select/mobile-select.js +7 -4
  56. package/dist/components/select/select-model.js +3 -3
  57. package/dist/components/select/select.js +78 -39
  58. package/dist/components/select/use-select-selection.js +100 -92
  59. package/dist/components/slider/slider.d.ts +2 -2
  60. package/dist/components/slider/slider.js +13 -2
  61. package/dist/components/sonner/sonner.js +2 -2
  62. package/dist/components/splitter/splitter.css +1 -0
  63. package/dist/components/splitter/splitter.js +152 -126
  64. package/dist/components/statistic/statistic.js +38 -31
  65. package/dist/components/switch/switch.js +45 -39
  66. package/dist/components/table/table-filter.d.ts +3 -1
  67. package/dist/components/table/table-filter.js +100 -74
  68. package/dist/components/table/table.js +2 -0
  69. package/dist/components/table/use-table-data.js +2 -2
  70. package/dist/components/tabs/tabs.d.ts +3 -2
  71. package/dist/components/tabs/tabs.js +122 -112
  72. package/dist/components/time-picker/time-picker.js +35 -3
  73. package/dist/components/tooltip/tooltip.d.ts +1 -1
  74. package/dist/components/tooltip/tooltip.js +220 -124
  75. package/dist/components/tree/tree.js +31 -3
  76. package/dist/components/tree-select/tree-select.js +2 -1
  77. package/dist/components/upload/upload.js +67 -40
  78. package/dist/locales/ar-EG.js +2 -0
  79. package/dist/locales/de-DE.js +2 -0
  80. package/dist/locales/en-US.js +2 -0
  81. package/dist/locales/es-ES.js +2 -0
  82. package/dist/locales/fr-FR.js +2 -0
  83. package/dist/locales/hi-IN.js +2 -0
  84. package/dist/locales/id-ID.js +2 -0
  85. package/dist/locales/it-IT.js +2 -0
  86. package/dist/locales/ja-JP.js +2 -0
  87. package/dist/locales/ko-KR.js +2 -0
  88. package/dist/locales/pt-BR.js +2 -0
  89. package/dist/locales/ru-RU.js +2 -0
  90. package/dist/locales/th-TH.js +2 -0
  91. package/dist/locales/tr-TR.js +2 -0
  92. package/dist/locales/types.d.ts +2 -0
  93. package/dist/locales/vi-VN.js +2 -0
  94. package/dist/locales/zh-CN.js +2 -0
  95. package/dist/locales/zh-TW.js +2 -0
  96. package/dist/number-input/format.js +1 -1
  97. package/dist/number-input/use-number-input.d.ts +1 -0
  98. package/dist/number-input/use-number-input.js +170 -321
  99. package/dist/number-input/validate.d.ts +1 -0
  100. package/dist/number-input/validate.js +1 -1
  101. package/dist/provider/tao-provider.d.ts +2 -2
  102. package/dist/provider/tao-provider.js +66 -52
  103. package/dist/theme/control.css +5 -1
  104. package/dist/theme/theme.css +2 -2
  105. package/dist/utils/composed-parent.d.ts +1 -0
  106. package/dist/utils/composed-parent.js +7 -0
  107. package/dist/utils/portal.d.ts +5 -0
  108. package/dist/utils/portal.js +7 -1
  109. package/dist/utils/refs.d.ts +3 -1
  110. package/dist/utils/refs.js +25 -1
  111. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
- import { useEffect, useRef, useState } from "react";
3
+ import { Children, useEffect, useRef, useState } from "react";
4
+ import { useCommittedRef } from "../../utils/refs.js";
4
5
  import { cx } from "../../utils/semantic.js";
5
6
  import "./splitter.css";
6
7
  import { useTaoConfig } from "../../provider/tao-provider.js";
@@ -87,7 +88,7 @@ function Panel(_props) {
87
88
  return null;
88
89
  }
89
90
  function Splitter(t0) {
90
- const $ = c(80);
91
+ const $ = c(82);
91
92
  const { orientation: t1, onResize, onResizeEnd, onResizeStart, className, classNames, styles, children } = t0;
92
93
  const orientation = void 0 === t1 ? "horizontal" : t1;
93
94
  const { locale } = useTaoConfig();
@@ -96,9 +97,7 @@ function Splitter(t0) {
96
97
  if ($[0] !== children) {
97
98
  const nextPanels = [];
98
99
  const nextPanelChildren = [];
99
- const childArray = Array.isArray(children) ? children : [
100
- children
101
- ];
100
+ const childArray = Children.toArray(children);
102
101
  for (const child of childArray)if (child && "object" == typeof child && "type" in child) {
103
102
  const panelChild = child;
104
103
  if (panelChild.type === Panel && panelChild.props) {
@@ -242,8 +241,21 @@ function Splitter(t0) {
242
241
  } else t12 = $[22];
243
242
  const resizePanels = t12;
244
243
  let t13;
245
- if ($[23] !== isHorizontal || $[24] !== onResize || $[25] !== onResizeEnd || $[26] !== onResizeStart || $[27] !== resizePanels || $[28] !== sizes) {
246
- t13 = (index_0, e)=>{
244
+ if ($[23] !== onResize || $[24] !== onResizeEnd || $[25] !== resizePanels) {
245
+ t13 = {
246
+ resizePanels,
247
+ onResize,
248
+ onResizeEnd
249
+ };
250
+ $[23] = onResize;
251
+ $[24] = onResizeEnd;
252
+ $[25] = resizePanels;
253
+ $[26] = t13;
254
+ } else t13 = $[26];
255
+ const dragSettings = useCommittedRef(t13);
256
+ let t14;
257
+ if ($[27] !== dragSettings || $[28] !== isHorizontal || $[29] !== onResizeStart || $[30] !== sizes) {
258
+ t14 = (index_0, e)=>{
247
259
  if (0 !== e.button) return;
248
260
  e.preventDefault();
249
261
  activeDrag.current?.cleanup();
@@ -258,10 +270,12 @@ function Splitter(t0) {
258
270
  const handleMove = (ev)=>{
259
271
  if (ev.pointerId !== pointerId) return;
260
272
  const delta_0 = ((isHorizontal ? ev.clientX : ev.clientY) - pos) * sign;
261
- const next_1 = resizePanels(index_0, delta_0, startSizes_0);
273
+ const next_1 = dragSettings.current.resizePanels(index_0, delta_0, startSizes_0);
262
274
  currentSizes = next_1;
263
275
  setSizes(next_1);
264
- onResize?.(next_1);
276
+ dragSettings.current.onResize?.([
277
+ ...next_1
278
+ ]);
265
279
  };
266
280
  const cleanup = ()=>{
267
281
  ownerDocument.removeEventListener("pointermove", handleMove);
@@ -272,7 +286,9 @@ function Splitter(t0) {
272
286
  const handleEnd = (ev_0)=>{
273
287
  if (ev_0.pointerId !== pointerId) return;
274
288
  cleanup();
275
- onResizeEnd?.(currentSizes);
289
+ dragSettings.current.onResizeEnd?.([
290
+ ...currentSizes
291
+ ]);
276
292
  };
277
293
  activeDrag.current = {
278
294
  index: index_0,
@@ -281,20 +297,20 @@ function Splitter(t0) {
281
297
  ownerDocument.addEventListener("pointermove", handleMove);
282
298
  ownerDocument.addEventListener("pointerup", handleEnd);
283
299
  ownerDocument.addEventListener("pointercancel", handleEnd);
284
- onResizeStart?.(sizes);
300
+ onResizeStart?.([
301
+ ...sizes
302
+ ]);
285
303
  };
286
- $[23] = isHorizontal;
287
- $[24] = onResize;
288
- $[25] = onResizeEnd;
289
- $[26] = onResizeStart;
290
- $[27] = resizePanels;
291
- $[28] = sizes;
292
- $[29] = t13;
293
- } else t13 = $[29];
294
- const handleDragStart = t13;
295
- let t14;
296
- if ($[30] !== isHorizontal || $[31] !== onResize || $[32] !== onResizeEnd || $[33] !== onResizeStart || $[34] !== resizePanels || $[35] !== sizes) {
297
- t14 = (index_1, event)=>{
304
+ $[27] = dragSettings;
305
+ $[28] = isHorizontal;
306
+ $[29] = onResizeStart;
307
+ $[30] = sizes;
308
+ $[31] = t14;
309
+ } else t14 = $[31];
310
+ const handleDragStart = t14;
311
+ let t15;
312
+ if ($[32] !== isHorizontal || $[33] !== onResize || $[34] !== onResizeEnd || $[35] !== onResizeStart || $[36] !== resizePanels || $[37] !== sizes) {
313
+ t15 = (index_1, event)=>{
298
314
  if (event.defaultPrevented || event.target !== event.currentTarget) return;
299
315
  const rtl = "rtl" === getComputedStyle(event.currentTarget).direction;
300
316
  const growKey = isHorizontal ? rtl ? "ArrowLeft" : "ArrowRight" : "ArrowDown";
@@ -304,23 +320,29 @@ function Splitter(t0) {
304
320
  const delta_1 = event.key === growKey ? 10 : -10;
305
321
  const next_2 = resizePanels(index_1, delta_1, sizes);
306
322
  if (next_2[index_1] === sizes[index_1] && next_2[index_1 + 1] === sizes[index_1 + 1]) return;
307
- onResizeStart?.(sizes);
323
+ onResizeStart?.([
324
+ ...sizes
325
+ ]);
308
326
  setSizes(next_2);
309
- onResize?.(next_2);
310
- onResizeEnd?.(next_2);
327
+ onResize?.([
328
+ ...next_2
329
+ ]);
330
+ onResizeEnd?.([
331
+ ...next_2
332
+ ]);
311
333
  };
312
- $[30] = isHorizontal;
313
- $[31] = onResize;
314
- $[32] = onResizeEnd;
315
- $[33] = onResizeStart;
316
- $[34] = resizePanels;
317
- $[35] = sizes;
318
- $[36] = t14;
319
- } else t14 = $[36];
320
- const handleDraggerKeyDown = t14;
321
- let t15;
322
- if ($[37] !== containerSize || $[38] !== panelCount || $[39] !== panels || $[40] !== sizes) {
323
- t15 = (index_2, direction)=>{
334
+ $[32] = isHorizontal;
335
+ $[33] = onResize;
336
+ $[34] = onResizeEnd;
337
+ $[35] = onResizeStart;
338
+ $[36] = resizePanels;
339
+ $[37] = sizes;
340
+ $[38] = t15;
341
+ } else t15 = $[38];
342
+ const handleDraggerKeyDown = t15;
343
+ let t16;
344
+ if ($[39] !== containerSize || $[40] !== panelCount || $[41] !== panels || $[42] !== sizes) {
345
+ t16 = (index_2, direction)=>{
324
346
  const draggerSpace_0 = (panelCount - 1) * 1;
325
347
  const available_1 = containerSize - draggerSpace_0;
326
348
  const targetIdx = "start" === direction ? index_2 : index_2 + 1;
@@ -351,28 +373,32 @@ function Splitter(t0) {
351
373
  }
352
374
  return next_3;
353
375
  };
354
- $[37] = containerSize;
355
- $[38] = panelCount;
356
- $[39] = panels;
357
- $[40] = sizes;
358
- $[41] = t15;
359
- } else t15 = $[41];
360
- const getCollapseSizes = t15;
361
- let t16;
362
- if ($[42] !== onResize || $[43] !== onResizeEnd) {
363
- t16 = (next_4)=>{
376
+ $[39] = containerSize;
377
+ $[40] = panelCount;
378
+ $[41] = panels;
379
+ $[42] = sizes;
380
+ $[43] = t16;
381
+ } else t16 = $[43];
382
+ const getCollapseSizes = t16;
383
+ let t17;
384
+ if ($[44] !== onResize || $[45] !== onResizeEnd) {
385
+ t17 = (next_4)=>{
364
386
  setSizes(next_4);
365
- onResize?.(next_4);
366
- onResizeEnd?.(next_4);
387
+ onResize?.([
388
+ ...next_4
389
+ ]);
390
+ onResizeEnd?.([
391
+ ...next_4
392
+ ]);
367
393
  };
368
- $[42] = onResize;
369
- $[43] = onResizeEnd;
370
- $[44] = t16;
371
- } else t16 = $[44];
372
- const handleCollapse = t16;
373
- let t17;
374
- if ($[45] !== panels) {
375
- t17 = function(index_3) {
394
+ $[44] = onResize;
395
+ $[45] = onResizeEnd;
396
+ $[46] = t17;
397
+ } else t17 = $[46];
398
+ const handleCollapse = t17;
399
+ let t18;
400
+ if ($[47] !== panels) {
401
+ t18 = function(index_3) {
376
402
  const leftPanel = panels[index_3];
377
403
  const rightPanel = panels[index_3 + 1];
378
404
  let startCollapsible = false;
@@ -390,48 +416,48 @@ function Splitter(t0) {
390
416
  end: endCollapsible
391
417
  };
392
418
  };
393
- $[45] = panels;
394
- $[46] = t17;
395
- } else t17 = $[46];
396
- const getDraggerCollapse = t17;
419
+ $[47] = panels;
420
+ $[48] = t18;
421
+ } else t18 = $[48];
422
+ const getDraggerCollapse = t18;
397
423
  if (sizes.length !== panelCount) {
398
- const t18 = classNames?.root;
399
- let t19;
400
- if ($[47] !== className || $[48] !== t18) {
401
- t19 = cx(t18, className);
402
- $[47] = className;
403
- $[48] = t18;
404
- $[49] = t19;
405
- } else t19 = $[49];
406
- const t20 = styles?.root;
407
- let t21;
408
- if ($[50] !== orientation || $[51] !== t19 || $[52] !== t20) {
409
- t21 = /*#__PURE__*/ jsx("div", {
424
+ const t19 = classNames?.root;
425
+ let t20;
426
+ if ($[49] !== className || $[50] !== t19) {
427
+ t20 = cx(t19, className);
428
+ $[49] = className;
429
+ $[50] = t19;
430
+ $[51] = t20;
431
+ } else t20 = $[51];
432
+ const t21 = styles?.root;
433
+ let t22;
434
+ if ($[52] !== orientation || $[53] !== t20 || $[54] !== t21) {
435
+ t22 = /*#__PURE__*/ jsx("div", {
410
436
  ref: containerRef,
411
437
  "data-tao-splitter": "",
412
438
  "data-tao-orientation": orientation,
413
- className: t19,
414
- style: t20
439
+ className: t20,
440
+ style: t21
415
441
  });
416
- $[50] = orientation;
417
- $[51] = t19;
418
- $[52] = t20;
419
- $[53] = t21;
420
- } else t21 = $[53];
421
- return t21;
442
+ $[52] = orientation;
443
+ $[53] = t20;
444
+ $[54] = t21;
445
+ $[55] = t22;
446
+ } else t22 = $[55];
447
+ return t22;
422
448
  }
423
- const t18 = classNames?.root;
424
- let t19;
425
- if ($[54] !== className || $[55] !== t18) {
426
- t19 = cx(t18, className);
427
- $[54] = className;
428
- $[55] = t18;
429
- $[56] = t19;
430
- } else t19 = $[56];
431
- const t20 = styles?.root;
432
- let t21;
433
- if ($[57] !== classNames?.dragger || $[58] !== classNames?.panel || $[59] !== containerSize || $[60] !== getCollapseSizes || $[61] !== getDraggerCollapse || $[62] !== handleCollapse || $[63] !== handleDragStart || $[64] !== handleDraggerKeyDown || $[65] !== isHorizontal || $[66] !== locale || $[67] !== orientation || $[68] !== panelChildren || $[69] !== panelCount || $[70] !== panels || $[71] !== sizes || $[72] !== styles?.dragger || $[73] !== styles?.panel) {
434
- t21 = panels.map((panel, i_0)=>{
449
+ const t19 = classNames?.root;
450
+ let t20;
451
+ if ($[56] !== className || $[57] !== t19) {
452
+ t20 = cx(t19, className);
453
+ $[56] = className;
454
+ $[57] = t19;
455
+ $[58] = t20;
456
+ } else t20 = $[58];
457
+ const t21 = styles?.root;
458
+ let t22;
459
+ if ($[59] !== classNames?.dragger || $[60] !== classNames?.panel || $[61] !== containerSize || $[62] !== getCollapseSizes || $[63] !== getDraggerCollapse || $[64] !== handleCollapse || $[65] !== handleDragStart || $[66] !== handleDraggerKeyDown || $[67] !== isHorizontal || $[68] !== locale || $[69] !== orientation || $[70] !== panelChildren || $[71] !== panelCount || $[72] !== panels || $[73] !== sizes || $[74] !== styles?.dragger || $[75] !== styles?.panel) {
460
+ t22 = panels.map((panel, i_0)=>{
435
461
  const sizeStyle = isHorizontal ? {
436
462
  width: sizes[i_0],
437
463
  flexShrink: 0,
@@ -529,42 +555,42 @@ function Splitter(t0) {
529
555
  ]
530
556
  }, i_0);
531
557
  });
532
- $[57] = classNames?.dragger;
533
- $[58] = classNames?.panel;
534
- $[59] = containerSize;
535
- $[60] = getCollapseSizes;
536
- $[61] = getDraggerCollapse;
537
- $[62] = handleCollapse;
538
- $[63] = handleDragStart;
539
- $[64] = handleDraggerKeyDown;
540
- $[65] = isHorizontal;
541
- $[66] = locale;
542
- $[67] = orientation;
543
- $[68] = panelChildren;
544
- $[69] = panelCount;
545
- $[70] = panels;
546
- $[71] = sizes;
547
- $[72] = styles?.dragger;
548
- $[73] = styles?.panel;
549
- $[74] = t21;
550
- } else t21 = $[74];
551
- let t22;
552
- if ($[75] !== orientation || $[76] !== t19 || $[77] !== t20 || $[78] !== t21) {
553
- t22 = /*#__PURE__*/ jsx("div", {
558
+ $[59] = classNames?.dragger;
559
+ $[60] = classNames?.panel;
560
+ $[61] = containerSize;
561
+ $[62] = getCollapseSizes;
562
+ $[63] = getDraggerCollapse;
563
+ $[64] = handleCollapse;
564
+ $[65] = handleDragStart;
565
+ $[66] = handleDraggerKeyDown;
566
+ $[67] = isHorizontal;
567
+ $[68] = locale;
568
+ $[69] = orientation;
569
+ $[70] = panelChildren;
570
+ $[71] = panelCount;
571
+ $[72] = panels;
572
+ $[73] = sizes;
573
+ $[74] = styles?.dragger;
574
+ $[75] = styles?.panel;
575
+ $[76] = t22;
576
+ } else t22 = $[76];
577
+ let t23;
578
+ if ($[77] !== orientation || $[78] !== t20 || $[79] !== t21 || $[80] !== t22) {
579
+ t23 = /*#__PURE__*/ jsx("div", {
554
580
  ref: containerRef,
555
581
  "data-tao-splitter": "",
556
582
  "data-tao-orientation": orientation,
557
- className: t19,
558
- style: t20,
559
- children: t21
583
+ className: t20,
584
+ style: t21,
585
+ children: t22
560
586
  });
561
- $[75] = orientation;
562
- $[76] = t19;
563
- $[77] = t20;
564
- $[78] = t21;
565
- $[79] = t22;
566
- } else t22 = $[79];
567
- return t22;
587
+ $[77] = orientation;
588
+ $[78] = t20;
589
+ $[79] = t21;
590
+ $[80] = t22;
591
+ $[81] = t23;
592
+ } else t23 = $[81];
593
+ return t23;
568
594
  }
569
595
  function _temp2(event_2) {
570
596
  return event_2.stopPropagation();
@@ -373,7 +373,7 @@ function formatDuration(duration, format) {
373
373
  return output.replace(/\0/g, ()=>literals[index++]);
374
374
  }
375
375
  function StatisticTimer(t0) {
376
- const $ = c(29);
376
+ const $ = c(31);
377
377
  let onChange;
378
378
  let onFinish;
379
379
  let rest;
@@ -434,16 +434,23 @@ function StatisticTimer(t0) {
434
434
  useLayoutEffect(t3, t4);
435
435
  let t5;
436
436
  if ($[14] !== value) {
437
- const timestamp = void 0 === value ? 0 / 0 : new Date(value).getTime();
438
- t5 = Number.isNaN(timestamp) ? void 0 : timestamp;
437
+ t5 = "string" == typeof value && "" !== value.trim() && Number.isFinite(Number(value)) ? Number(value) : value;
439
438
  $[14] = value;
440
439
  $[15] = t5;
441
440
  } else t5 = $[15];
442
- const target = t5;
441
+ const normalized = t5;
443
442
  let t6;
443
+ if ($[16] !== normalized) {
444
+ const timestamp = void 0 === normalized ? 0 / 0 : new Date(normalized).getTime();
445
+ t6 = Number.isNaN(timestamp) ? void 0 : timestamp;
446
+ $[16] = normalized;
447
+ $[17] = t6;
448
+ } else t6 = $[17];
449
+ const target = t6;
444
450
  let t7;
445
- if ($[16] !== target || $[17] !== type) {
446
- t6 = ()=>{
451
+ let t8;
452
+ if ($[18] !== target || $[19] !== type) {
453
+ t7 = ()=>{
447
454
  if (void 0 === target) return void setNow(void 0);
448
455
  setNow(Date.now());
449
456
  const timer = setInterval(()=>{
@@ -458,41 +465,41 @@ function StatisticTimer(t0) {
458
465
  }, 16.666666666666668);
459
466
  return ()=>clearInterval(timer);
460
467
  };
461
- t7 = [
468
+ t8 = [
462
469
  target,
463
470
  type
464
471
  ];
465
- $[16] = target;
466
- $[17] = type;
467
- $[18] = t6;
468
- $[19] = t7;
472
+ $[18] = target;
473
+ $[19] = type;
474
+ $[20] = t7;
475
+ $[21] = t8;
469
476
  } else {
470
- t6 = $[18];
471
- t7 = $[19];
477
+ t7 = $[20];
478
+ t8 = $[21];
472
479
  }
473
- useEffect(t6, t7);
474
- let t8;
475
- if ($[20] !== format || $[21] !== now || $[22] !== target || $[23] !== type) {
476
- t8 = ()=>void 0 === now || void 0 === target ? "-" : formatDuration("countdown" === type ? target - now : now - target, format);
477
- $[20] = format;
478
- $[21] = now;
479
- $[22] = target;
480
- $[23] = type;
481
- $[24] = t8;
482
- } else t8 = $[24];
480
+ useEffect(t7, t8);
483
481
  let t9;
484
- if ($[25] !== rest || $[26] !== t8 || $[27] !== value) {
485
- t9 = /*#__PURE__*/ jsx(StatisticRoot, {
482
+ if ($[22] !== format || $[23] !== now || $[24] !== target || $[25] !== type) {
483
+ t9 = ()=>void 0 === now || void 0 === target ? "-" : formatDuration("countdown" === type ? target - now : now - target, format);
484
+ $[22] = format;
485
+ $[23] = now;
486
+ $[24] = target;
487
+ $[25] = type;
488
+ $[26] = t9;
489
+ } else t9 = $[26];
490
+ let t10;
491
+ if ($[27] !== rest || $[28] !== t9 || $[29] !== value) {
492
+ t10 = /*#__PURE__*/ jsx(StatisticRoot, {
486
493
  ...rest,
487
494
  value: value,
488
- formatter: t8
495
+ formatter: t9
489
496
  });
490
- $[25] = rest;
491
- $[26] = t8;
492
- $[27] = value;
497
+ $[27] = rest;
493
498
  $[28] = t9;
494
- } else t9 = $[28];
495
- return t9;
499
+ $[29] = value;
500
+ $[30] = t10;
501
+ } else t10 = $[30];
502
+ return t10;
496
503
  }
497
504
  function Countdown(props) {
498
505
  const $ = c(2);
@@ -5,7 +5,7 @@ import { useTaoConfig } from "../../provider/tao-provider.js";
5
5
  import { cx } from "../../utils/semantic.js";
6
6
  import "./switch.css";
7
7
  const switch_Switch = /*#__PURE__*/ forwardRef(function(props, ref) {
8
- const $ = c(50);
8
+ const $ = c(52);
9
9
  let ariaProps;
10
10
  let checked;
11
11
  let checkedChildren;
@@ -115,40 +115,46 @@ const switch_Switch = /*#__PURE__*/ forwardRef(function(props, ref) {
115
115
  $[28] = t9;
116
116
  $[29] = t10;
117
117
  } else t10 = $[29];
118
- let t11;
119
- if ($[30] !== checkedChildren) {
120
- t11 = /*#__PURE__*/ jsx("span", {
118
+ const t11 = !resolvedChecked || void 0;
119
+ let t12;
120
+ if ($[30] !== checkedChildren || $[31] !== t11) {
121
+ t12 = /*#__PURE__*/ jsx("span", {
121
122
  "data-tao-switch-inner-checked": "",
123
+ "aria-hidden": t11,
122
124
  children: checkedChildren
123
125
  });
124
126
  $[30] = checkedChildren;
125
127
  $[31] = t11;
126
- } else t11 = $[31];
127
- let t12;
128
- if ($[32] !== unCheckedChildren) {
129
- t12 = /*#__PURE__*/ jsx("span", {
128
+ $[32] = t12;
129
+ } else t12 = $[32];
130
+ const t13 = resolvedChecked || void 0;
131
+ let t14;
132
+ if ($[33] !== t13 || $[34] !== unCheckedChildren) {
133
+ t14 = /*#__PURE__*/ jsx("span", {
130
134
  "data-tao-switch-inner-unchecked": "",
135
+ "aria-hidden": t13,
131
136
  children: unCheckedChildren
132
137
  });
133
- $[32] = unCheckedChildren;
134
- $[33] = t12;
135
- } else t12 = $[33];
136
- let t13;
137
- if ($[34] !== t11 || $[35] !== t12) {
138
- t13 = /*#__PURE__*/ jsxs("span", {
138
+ $[33] = t13;
139
+ $[34] = unCheckedChildren;
140
+ $[35] = t14;
141
+ } else t14 = $[35];
142
+ let t15;
143
+ if ($[36] !== t12 || $[37] !== t14) {
144
+ t15 = /*#__PURE__*/ jsxs("span", {
139
145
  "data-tao-switch-inner": "",
140
146
  children: [
141
- t11,
142
- t12
147
+ t12,
148
+ t14
143
149
  ]
144
150
  });
145
- $[34] = t11;
146
- $[35] = t12;
147
- $[36] = t13;
148
- } else t13 = $[36];
149
- let t14;
150
- if ($[37] !== ariaProps || $[38] !== handleChange || $[39] !== isDisabled || $[40] !== ref || $[41] !== resolvedChecked || $[42] !== resolvedSize || $[43] !== t1 || $[44] !== t10 || $[45] !== t13 || $[46] !== t3 || $[47] !== t5 || $[48] !== t6) {
151
- t14 = /*#__PURE__*/ jsxs("button", {
151
+ $[36] = t12;
152
+ $[37] = t14;
153
+ $[38] = t15;
154
+ } else t15 = $[38];
155
+ let t16;
156
+ if ($[39] !== ariaProps || $[40] !== handleChange || $[41] !== isDisabled || $[42] !== ref || $[43] !== resolvedChecked || $[44] !== resolvedSize || $[45] !== t1 || $[46] !== t10 || $[47] !== t15 || $[48] !== t3 || $[49] !== t5 || $[50] !== t6) {
157
+ t16 = /*#__PURE__*/ jsxs("button", {
152
158
  ...ariaProps,
153
159
  "aria-busy": t1,
154
160
  ref: ref,
@@ -164,24 +170,24 @@ const switch_Switch = /*#__PURE__*/ forwardRef(function(props, ref) {
164
170
  onClick: handleChange,
165
171
  children: [
166
172
  t10,
167
- t13
173
+ t15
168
174
  ]
169
175
  });
170
- $[37] = ariaProps;
171
- $[38] = handleChange;
172
- $[39] = isDisabled;
173
- $[40] = ref;
174
- $[41] = resolvedChecked;
175
- $[42] = resolvedSize;
176
- $[43] = t1;
177
- $[44] = t10;
178
- $[45] = t13;
179
- $[46] = t3;
180
- $[47] = t5;
181
- $[48] = t6;
182
- $[49] = t14;
183
- } else t14 = $[49];
184
- return t14;
176
+ $[39] = ariaProps;
177
+ $[40] = handleChange;
178
+ $[41] = isDisabled;
179
+ $[42] = ref;
180
+ $[43] = resolvedChecked;
181
+ $[44] = resolvedSize;
182
+ $[45] = t1;
183
+ $[46] = t10;
184
+ $[47] = t15;
185
+ $[48] = t3;
186
+ $[49] = t5;
187
+ $[50] = t6;
188
+ $[51] = t16;
189
+ } else t16 = $[51];
190
+ return t16;
185
191
  });
186
192
  function LoadingIcon() {
187
193
  const $ = c(1);
@@ -1,6 +1,8 @@
1
+ import { type TaoDirection } from '../../provider/tao-provider.js';
1
2
  import type { TableFilterItem } from './table-types.js';
2
- export declare function TableFilterDropdown({ filters, activeValues, onSelect, }: {
3
+ export declare function TableFilterDropdown({ filters, activeValues, direction, onSelect, }: {
3
4
  filters: TableFilterItem[];
4
5
  activeValues: string[];
6
+ direction?: TaoDirection;
5
7
  onSelect: (values: string[]) => void;
6
8
  }): import("react").JSX.Element;