@rockshin/tao-ui 0.0.43 → 0.0.45

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 (77) hide show
  1. package/README.md +7 -1
  2. package/component-manifest.json +10 -3
  3. package/dist/components/auto-complete/auto-complete.js +12 -3
  4. package/dist/components/breadcrumb/breadcrumb.css +4 -0
  5. package/dist/components/breadcrumb/breadcrumb.js +1 -0
  6. package/dist/components/calendar/calendar.d.ts +1 -0
  7. package/dist/components/calendar/calendar.js +10 -3
  8. package/dist/components/card/card-tabs.js +204 -182
  9. package/dist/components/card/card.js +1 -1
  10. package/dist/components/carousel/carousel.js +11 -5
  11. package/dist/components/cascader/cascader.js +16 -4
  12. package/dist/components/collapse/collapse.css +8 -0
  13. package/dist/components/context-menu/context-menu.d.ts +2 -1
  14. package/dist/components/context-menu/context-menu.js +57 -44
  15. package/dist/components/date-picker/calendar/calendar-grid.js +3 -2
  16. package/dist/components/date-picker/date-picker.css +4 -0
  17. package/dist/components/date-picker/date-picker.d.ts +1 -0
  18. package/dist/components/date-picker/date-picker.js +13 -3
  19. package/dist/components/date-picker/range-picker.d.ts +1 -0
  20. package/dist/components/date-picker/range-picker.js +13 -3
  21. package/dist/components/drawer/drawer.d.ts +2 -1
  22. package/dist/components/drawer/drawer.js +32 -20
  23. package/dist/components/dropdown/dropdown.d.ts +1 -0
  24. package/dist/components/dropdown/dropdown.js +139 -123
  25. package/dist/components/form/field-control.d.ts +6 -0
  26. package/dist/components/form/field-control.js +42 -0
  27. package/dist/components/form/form-context.d.ts +3 -0
  28. package/dist/components/form/form-item.d.ts +2 -1
  29. package/dist/components/form/form-item.js +55 -42
  30. package/dist/components/form/form.d.ts +5 -5
  31. package/dist/components/form/form.js +86 -68
  32. package/dist/components/form/index.d.ts +1 -0
  33. package/dist/components/form/use-form.d.ts +16 -0
  34. package/dist/components/form/use-form.js +69 -0
  35. package/dist/components/form-field/form-field-view.d.ts +4 -2
  36. package/dist/components/form-field/form-field-view.js +42 -35
  37. package/dist/components/mentions/mentions.js +6 -2
  38. package/dist/components/modal/modal.d.ts +2 -1
  39. package/dist/components/modal/modal.js +14 -4
  40. package/dist/components/pagination/pagination.css +4 -0
  41. package/dist/components/popover/popover.d.ts +2 -1
  42. package/dist/components/popover/popover.js +185 -176
  43. package/dist/components/rate/rate.js +114 -88
  44. package/dist/components/scroll-area/scroll-area.js +127 -118
  45. package/dist/components/segmented/segmented.js +52 -29
  46. package/dist/components/select/mobile-select.d.ts +2 -1
  47. package/dist/components/select/mobile-select.js +52 -47
  48. package/dist/components/select/select-types.d.ts +1 -0
  49. package/dist/components/select/select.js +19 -6
  50. package/dist/components/slider/slider.js +136 -133
  51. package/dist/components/splitter/splitter.css +4 -0
  52. package/dist/components/splitter/splitter.js +5 -3
  53. package/dist/components/table/table.css +29 -11
  54. package/dist/components/table/table.js +383 -547
  55. package/dist/components/tabs/tabs.js +3 -2
  56. package/dist/components/time-picker/time-picker.js +21 -7
  57. package/dist/components/tooltip/tooltip.d.ts +2 -1
  58. package/dist/components/tooltip/tooltip.js +82 -71
  59. package/dist/components/transfer/transfer-parts.js +12 -2
  60. package/dist/components/transfer/transfer.js +10 -4
  61. package/dist/components/tree/tree-keyboard.d.ts +6 -0
  62. package/dist/components/tree/tree-keyboard.js +27 -0
  63. package/dist/components/tree/tree.js +14 -3
  64. package/dist/components/tree-select/select-engine.d.ts +2 -1
  65. package/dist/components/tree-select/select-engine.js +23 -15
  66. package/dist/components/tree-select/tree-select.js +20 -10
  67. package/dist/docs/components/form.doc.js +3 -1
  68. package/dist/docs/components/tao-provider.doc.js +6 -1
  69. package/dist/entries/form.d.ts +2 -2
  70. package/dist/entries/provider.d.ts +1 -1
  71. package/dist/index.d.ts +3 -3
  72. package/dist/provider/tao-provider.d.ts +10 -3
  73. package/dist/provider/tao-provider.js +198 -88
  74. package/dist/utils/scroll-left.d.ts +3 -0
  75. package/dist/utils/scroll-left.js +7 -0
  76. package/llms.txt +3 -3
  77. package/package.json +4 -2
@@ -1,7 +1,7 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
3
  import tabs from "@rc-component/tabs";
4
- import { TaoPortalScope } from "../../provider/tao-provider.js";
4
+ import { TaoPortalScope, useTaoDirection } from "../../provider/tao-provider.js";
5
5
  import { interopDefault } from "../../utils/interop-default.js";
6
6
  import { cx } from "../../utils/semantic.js";
7
7
  const RcTabsComponent = /*#__PURE__*/ interopDefault(tabs);
@@ -49,7 +49,7 @@ function TabIcon(t0) {
49
49
  return t1;
50
50
  }
51
51
  function CardTabs(props) {
52
- const $ = c(114);
52
+ const $ = c(120);
53
53
  let addIcon;
54
54
  let animated;
55
55
  let centered;
@@ -57,6 +57,7 @@ function CardTabs(props) {
57
57
  let classNames;
58
58
  let destroyInactiveTabPane;
59
59
  let destroyOnHidden;
60
+ let directionProp;
60
61
  let hideAdd;
61
62
  let indicator;
62
63
  let indicatorSize;
@@ -73,37 +74,36 @@ function CardTabs(props) {
73
74
  let styles;
74
75
  let t0;
75
76
  let t1;
76
- let t2;
77
77
  let tabPlacement;
78
78
  let tabPosition;
79
79
  if ($[0] !== props) {
80
- const { type: t3, size: t4, hideAdd: t5, centered: t6, rootClassName: t7, classNames: t8, styles: t9, tabPosition: t10, tabPlacement: t11, onEdit: t12, children: _children, indicatorSize: t13, items: t14, destroyInactiveTabPane: t15, destroyOnHidden: t16, addIcon: t17, moreIcon: t18, removeIcon: t19, more: t20, prefixCls: t21, className: t22, style: t23, direction: t24, animated: t25, indicator: t26, popupClassName: t27, ...t28 } = props;
81
- t0 = t3;
82
- t1 = t4;
83
- hideAdd = t5;
84
- centered = t6;
85
- rootClassName = t7;
86
- classNames = t8;
87
- styles = t9;
88
- tabPosition = t10;
89
- tabPlacement = t11;
90
- onEdit = t12;
91
- indicatorSize = t13;
92
- items = t14;
93
- destroyInactiveTabPane = t15;
94
- destroyOnHidden = t16;
95
- addIcon = t17;
96
- moreIcon = t18;
97
- removeIcon = t19;
98
- more = t20;
99
- prefixCls = t21;
100
- className = t22;
101
- style = t23;
102
- t2 = t24;
103
- animated = t25;
104
- indicator = t26;
105
- popupClassName = t27;
106
- rest = t28;
80
+ const { type: t2, size: t3, hideAdd: t4, centered: t5, rootClassName: t6, classNames: t7, styles: t8, tabPosition: t9, tabPlacement: t10, onEdit: t11, children: _children, indicatorSize: t12, items: t13, destroyInactiveTabPane: t14, destroyOnHidden: t15, addIcon: t16, moreIcon: t17, removeIcon: t18, more: t19, prefixCls: t20, className: t21, style: t22, direction: t23, animated: t24, indicator: t25, popupClassName: t26, ...t27 } = props;
81
+ t0 = t2;
82
+ t1 = t3;
83
+ hideAdd = t4;
84
+ centered = t5;
85
+ rootClassName = t6;
86
+ classNames = t7;
87
+ styles = t8;
88
+ tabPosition = t9;
89
+ tabPlacement = t10;
90
+ onEdit = t11;
91
+ indicatorSize = t12;
92
+ items = t13;
93
+ destroyInactiveTabPane = t14;
94
+ destroyOnHidden = t15;
95
+ addIcon = t16;
96
+ moreIcon = t17;
97
+ removeIcon = t18;
98
+ more = t19;
99
+ prefixCls = t20;
100
+ className = t21;
101
+ style = t22;
102
+ directionProp = t23;
103
+ animated = t24;
104
+ indicator = t25;
105
+ popupClassName = t26;
106
+ rest = t27;
107
107
  $[0] = props;
108
108
  $[1] = addIcon;
109
109
  $[2] = animated;
@@ -112,23 +112,23 @@ function CardTabs(props) {
112
112
  $[5] = classNames;
113
113
  $[6] = destroyInactiveTabPane;
114
114
  $[7] = destroyOnHidden;
115
- $[8] = hideAdd;
116
- $[9] = indicator;
117
- $[10] = indicatorSize;
118
- $[11] = items;
119
- $[12] = more;
120
- $[13] = moreIcon;
121
- $[14] = onEdit;
122
- $[15] = popupClassName;
123
- $[16] = prefixCls;
124
- $[17] = removeIcon;
125
- $[18] = rest;
126
- $[19] = rootClassName;
127
- $[20] = style;
128
- $[21] = styles;
129
- $[22] = t0;
130
- $[23] = t1;
131
- $[24] = t2;
115
+ $[8] = directionProp;
116
+ $[9] = hideAdd;
117
+ $[10] = indicator;
118
+ $[11] = indicatorSize;
119
+ $[12] = items;
120
+ $[13] = more;
121
+ $[14] = moreIcon;
122
+ $[15] = onEdit;
123
+ $[16] = popupClassName;
124
+ $[17] = prefixCls;
125
+ $[18] = removeIcon;
126
+ $[19] = rest;
127
+ $[20] = rootClassName;
128
+ $[21] = style;
129
+ $[22] = styles;
130
+ $[23] = t0;
131
+ $[24] = t1;
132
132
  $[25] = tabPlacement;
133
133
  $[26] = tabPosition;
134
134
  } else {
@@ -139,32 +139,32 @@ function CardTabs(props) {
139
139
  classNames = $[5];
140
140
  destroyInactiveTabPane = $[6];
141
141
  destroyOnHidden = $[7];
142
- hideAdd = $[8];
143
- indicator = $[9];
144
- indicatorSize = $[10];
145
- items = $[11];
146
- more = $[12];
147
- moreIcon = $[13];
148
- onEdit = $[14];
149
- popupClassName = $[15];
150
- prefixCls = $[16];
151
- removeIcon = $[17];
152
- rest = $[18];
153
- rootClassName = $[19];
154
- style = $[20];
155
- styles = $[21];
156
- t0 = $[22];
157
- t1 = $[23];
158
- t2 = $[24];
142
+ directionProp = $[8];
143
+ hideAdd = $[9];
144
+ indicator = $[10];
145
+ indicatorSize = $[11];
146
+ items = $[12];
147
+ more = $[13];
148
+ moreIcon = $[14];
149
+ onEdit = $[15];
150
+ popupClassName = $[16];
151
+ prefixCls = $[17];
152
+ removeIcon = $[18];
153
+ rest = $[19];
154
+ rootClassName = $[20];
155
+ style = $[21];
156
+ styles = $[22];
157
+ t0 = $[23];
158
+ t1 = $[24];
159
159
  tabPlacement = $[25];
160
160
  tabPosition = $[26];
161
161
  }
162
162
  const type = void 0 === t0 ? "line" : t0;
163
163
  const size = void 0 === t1 ? "medium" : t1;
164
- const direction = void 0 === t2 ? "ltr" : t2;
165
- let t3;
164
+ const [direction, directionRef] = useTaoDirection(directionProp);
165
+ let t2;
166
166
  if ($[27] !== classNames || $[28] !== props || $[29] !== size || $[30] !== type) {
167
- t3 = "function" == typeof classNames ? classNames({
167
+ t2 = "function" == typeof classNames ? classNames({
168
168
  props: {
169
169
  ...props,
170
170
  size,
@@ -175,12 +175,12 @@ function CardTabs(props) {
175
175
  $[28] = props;
176
176
  $[29] = size;
177
177
  $[30] = type;
178
- $[31] = t3;
179
- } else t3 = $[31];
180
- const classes = t3;
181
- let t4;
178
+ $[31] = t2;
179
+ } else t2 = $[31];
180
+ const classes = t2;
181
+ let t3;
182
182
  if ($[32] !== props || $[33] !== size || $[34] !== styles || $[35] !== type) {
183
- t4 = "function" == typeof styles ? styles({
183
+ t3 = "function" == typeof styles ? styles({
184
184
  props: {
185
185
  ...props,
186
186
  size,
@@ -191,21 +191,21 @@ function CardTabs(props) {
191
191
  $[33] = size;
192
192
  $[34] = styles;
193
193
  $[35] = type;
194
- $[36] = t4;
195
- } else t4 = $[36];
196
- const slots = t4;
197
- let t5;
194
+ $[36] = t3;
195
+ } else t3 = $[36];
196
+ const slots = t3;
197
+ let t4;
198
198
  if ($[37] !== classes) {
199
- t5 = classes ?? {};
199
+ t4 = classes ?? {};
200
200
  $[37] = classes;
201
- $[38] = t5;
202
- } else t5 = $[38];
201
+ $[38] = t4;
202
+ } else t4 = $[38];
203
203
  let partClasses;
204
204
  let popupClasses;
205
205
  let rootClass;
206
- if ($[39] !== t5) {
207
- ({ root: rootClass, popup: popupClasses, ...partClasses } = t5);
208
- $[39] = t5;
206
+ if ($[39] !== t4) {
207
+ ({ root: rootClass, popup: popupClasses, ...partClasses } = t4);
208
+ $[39] = t4;
209
209
  $[40] = partClasses;
210
210
  $[41] = popupClasses;
211
211
  $[42] = rootClass;
@@ -214,18 +214,18 @@ function CardTabs(props) {
214
214
  popupClasses = $[41];
215
215
  rootClass = $[42];
216
216
  }
217
- let t6;
217
+ let t5;
218
218
  if ($[43] !== slots) {
219
- t6 = slots ?? {};
219
+ t5 = slots ?? {};
220
220
  $[43] = slots;
221
- $[44] = t6;
222
- } else t6 = $[44];
221
+ $[44] = t5;
222
+ } else t5 = $[44];
223
223
  let partStyles;
224
224
  let popupStyles;
225
225
  let rootStyle;
226
- if ($[45] !== t6) {
227
- ({ root: rootStyle, popup: popupStyles, ...partStyles } = t6);
228
- $[45] = t6;
226
+ if ($[45] !== t5) {
227
+ ({ root: rootStyle, popup: popupStyles, ...partStyles } = t5);
228
+ $[45] = t5;
229
229
  $[46] = partStyles;
230
230
  $[47] = popupStyles;
231
231
  $[48] = rootStyle;
@@ -235,18 +235,18 @@ function CardTabs(props) {
235
235
  rootStyle = $[48];
236
236
  }
237
237
  const position = "start" === tabPlacement ? "rtl" === direction ? "right" : "left" : "end" === tabPlacement ? "rtl" === direction ? "left" : "right" : tabPlacement ?? tabPosition;
238
- let t7;
238
+ let t6;
239
239
  if ($[49] !== more) {
240
- t7 = more ?? {};
240
+ t6 = more ?? {};
241
241
  $[49] = more;
242
- $[50] = t7;
243
- } else t7 = $[50];
242
+ $[50] = t6;
243
+ } else t6 = $[50];
244
244
  let moreProps;
245
245
  let onVisibleChange;
246
246
  let visible;
247
- if ($[51] !== t7) {
248
- ({ visible, onVisibleChange, ...moreProps } = t7);
249
- $[51] = t7;
247
+ if ($[51] !== t6) {
248
+ ({ visible, onVisibleChange, ...moreProps } = t6);
249
+ $[51] = t6;
250
250
  $[52] = moreProps;
251
251
  $[53] = onVisibleChange;
252
252
  $[54] = visible;
@@ -255,9 +255,9 @@ function CardTabs(props) {
255
255
  onVisibleChange = $[53];
256
256
  visible = $[54];
257
257
  }
258
- let t8;
258
+ let t7;
259
259
  if ($[55] !== animated || $[56] !== type) {
260
- t8 = false === animated ? {
260
+ t7 = false === animated ? {
261
261
  inkBar: false,
262
262
  tabPane: false
263
263
  } : true === animated ? {
@@ -270,12 +270,12 @@ function CardTabs(props) {
270
270
  };
271
271
  $[55] = animated;
272
272
  $[56] = type;
273
- $[57] = t8;
274
- } else t8 = $[57];
275
- const motion = t8;
276
- let t9;
273
+ $[57] = t7;
274
+ } else t7 = $[57];
275
+ const motion = t7;
276
+ let t8;
277
277
  if ($[58] !== animated || $[59] !== motion) {
278
- t9 = motion.tabPane ? {
278
+ t8 = motion.tabPane ? {
279
279
  ...motion,
280
280
  tabPaneMotion: {
281
281
  motionAppear: false,
@@ -287,87 +287,96 @@ function CardTabs(props) {
287
287
  } : motion;
288
288
  $[58] = animated;
289
289
  $[59] = motion;
290
- $[60] = t9;
291
- } else t9 = $[60];
292
- const animation = t9;
290
+ $[60] = t8;
291
+ } else t8 = $[60];
292
+ const animation = t8;
293
+ let t9;
294
+ if ($[61] === Symbol.for("react.memo_cache_sentinel")) {
295
+ t9 = {
296
+ display: "contents"
297
+ };
298
+ $[61] = t9;
299
+ } else t9 = $[61];
293
300
  const t10 = "middle" === size ? "medium" : size;
294
301
  const t11 = centered || void 0;
295
302
  let t12;
296
- if ($[61] !== className || $[62] !== prefixCls || $[63] !== rootClass || $[64] !== rootClassName) {
303
+ if ($[62] !== className || $[63] !== prefixCls || $[64] !== rootClass || $[65] !== rootClassName) {
297
304
  t12 = cx(prefixCls, rootClass, className, rootClassName);
298
- $[61] = className;
299
- $[62] = prefixCls;
300
- $[63] = rootClass;
301
- $[64] = rootClassName;
302
- $[65] = t12;
303
- } else t12 = $[65];
305
+ $[62] = className;
306
+ $[63] = prefixCls;
307
+ $[64] = rootClass;
308
+ $[65] = rootClassName;
309
+ $[66] = t12;
310
+ } else t12 = $[66];
304
311
  let t13;
305
- if ($[66] !== rootStyle || $[67] !== style) {
312
+ if ($[67] !== rootStyle || $[68] !== style) {
306
313
  t13 = {
307
314
  ...rootStyle,
308
315
  ...style
309
316
  };
310
- $[66] = rootStyle;
311
- $[67] = style;
312
- $[68] = t13;
313
- } else t13 = $[68];
317
+ $[67] = rootStyle;
318
+ $[68] = style;
319
+ $[69] = t13;
320
+ } else t13 = $[69];
314
321
  const t14 = destroyOnHidden ?? destroyInactiveTabPane;
315
322
  let t15;
316
- if ($[69] !== items) {
323
+ if ($[70] !== items) {
317
324
  t15 = items?.map(_temp);
318
- $[69] = items;
319
- $[70] = t15;
320
- } else t15 = $[70];
325
+ $[70] = items;
326
+ $[71] = t15;
327
+ } else t15 = $[71];
321
328
  let t16;
322
- if ($[71] !== indicator || $[72] !== indicatorSize) {
329
+ if ($[72] !== indicator || $[73] !== indicatorSize) {
323
330
  t16 = {
324
331
  size: indicatorSize,
325
332
  ...indicator
326
333
  };
327
- $[71] = indicator;
328
- $[72] = indicatorSize;
329
- $[73] = t16;
330
- } else t16 = $[73];
334
+ $[72] = indicator;
335
+ $[73] = indicatorSize;
336
+ $[74] = t16;
337
+ } else t16 = $[74];
331
338
  const t17 = popupStyles?.root;
332
339
  let t18;
333
- if ($[74] !== partStyles || $[75] !== t17) {
340
+ if ($[75] !== partStyles || $[76] !== t17) {
334
341
  t18 = {
335
342
  ...partStyles,
336
343
  popup: t17
337
344
  };
338
- $[74] = partStyles;
339
- $[75] = t17;
340
- $[76] = t18;
341
- } else t18 = $[76];
345
+ $[75] = partStyles;
346
+ $[76] = t17;
347
+ $[77] = t18;
348
+ } else t18 = $[77];
342
349
  const t19 = popupClasses?.root;
343
350
  let t20;
344
- if ($[77] !== popupClassName || $[78] !== t19) {
351
+ if ($[78] !== popupClassName || $[79] !== t19) {
345
352
  t20 = cx(t19, popupClassName);
346
- $[77] = popupClassName;
347
- $[78] = t19;
348
- $[79] = t20;
349
- } else t20 = $[79];
353
+ $[78] = popupClassName;
354
+ $[79] = t19;
355
+ $[80] = t20;
356
+ } else t20 = $[80];
350
357
  let t21;
351
- if ($[80] !== moreIcon) {
358
+ if ($[81] !== moreIcon) {
352
359
  t21 = moreIcon ?? /*#__PURE__*/ jsx(TabIcon, {
353
360
  type: "more"
354
361
  });
355
- $[80] = moreIcon;
356
- $[81] = t21;
357
- } else t21 = $[81];
362
+ $[81] = moreIcon;
363
+ $[82] = t21;
364
+ } else t21 = $[82];
358
365
  const t22 = moreProps.open ?? visible;
359
366
  const t23 = moreProps.onOpenChange ?? onVisibleChange;
360
367
  let t24;
361
- if ($[82] !== moreProps) {
368
+ if ($[83] !== direction || $[84] !== moreProps) {
362
369
  t24 = (menu, info)=>/*#__PURE__*/ jsx(TaoPortalScope, {
363
370
  asChild: true,
371
+ direction: direction,
364
372
  children: moreProps.popupRender ? moreProps.popupRender(menu, info) : menu
365
373
  });
366
- $[82] = moreProps;
367
- $[83] = t24;
368
- } else t24 = $[83];
374
+ $[83] = direction;
375
+ $[84] = moreProps;
376
+ $[85] = t24;
377
+ } else t24 = $[85];
369
378
  let t25;
370
- if ($[84] !== moreProps || $[85] !== t21 || $[86] !== t22 || $[87] !== t23 || $[88] !== t24) {
379
+ if ($[86] !== moreProps || $[87] !== t21 || $[88] !== t22 || $[89] !== t23 || $[90] !== t24) {
371
380
  t25 = {
372
381
  icon: t21,
373
382
  ...moreProps,
@@ -375,15 +384,15 @@ function CardTabs(props) {
375
384
  onOpenChange: t23,
376
385
  popupRender: t24
377
386
  };
378
- $[84] = moreProps;
379
- $[85] = t21;
380
- $[86] = t22;
381
- $[87] = t23;
382
- $[88] = t24;
383
- $[89] = t25;
384
- } else t25 = $[89];
387
+ $[86] = moreProps;
388
+ $[87] = t21;
389
+ $[88] = t22;
390
+ $[89] = t23;
391
+ $[90] = t24;
392
+ $[91] = t25;
393
+ } else t25 = $[91];
385
394
  let t26;
386
- if ($[90] !== addIcon || $[91] !== hideAdd || $[92] !== onEdit || $[93] !== removeIcon || $[94] !== type) {
395
+ if ($[92] !== addIcon || $[93] !== hideAdd || $[94] !== onEdit || $[95] !== removeIcon || $[96] !== type) {
387
396
  t26 = "editable-card" === type ? {
388
397
  showAdd: !hideAdd,
389
398
  addIcon: addIcon ?? /*#__PURE__*/ jsx(TabIcon, {
@@ -394,15 +403,15 @@ function CardTabs(props) {
394
403
  }),
395
404
  onEdit: (action, info_0)=>onEdit?.("add" === action ? info_0.event : info_0.key, action)
396
405
  } : void 0;
397
- $[90] = addIcon;
398
- $[91] = hideAdd;
399
- $[92] = onEdit;
400
- $[93] = removeIcon;
401
- $[94] = type;
402
- $[95] = t26;
403
- } else t26 = $[95];
406
+ $[92] = addIcon;
407
+ $[93] = hideAdd;
408
+ $[94] = onEdit;
409
+ $[95] = removeIcon;
410
+ $[96] = type;
411
+ $[97] = t26;
412
+ } else t26 = $[97];
404
413
  let t27;
405
- if ($[96] !== animation || $[97] !== direction || $[98] !== partClasses || $[99] !== position || $[100] !== rest || $[101] !== t10 || $[102] !== t11 || $[103] !== t12 || $[104] !== t13 || $[105] !== t14 || $[106] !== t15 || $[107] !== t16 || $[108] !== t18 || $[109] !== t20 || $[110] !== t25 || $[111] !== t26 || $[112] !== type) {
414
+ if ($[98] !== animation || $[99] !== direction || $[100] !== partClasses || $[101] !== position || $[102] !== rest || $[103] !== t10 || $[104] !== t11 || $[105] !== t12 || $[106] !== t13 || $[107] !== t14 || $[108] !== t15 || $[109] !== t16 || $[110] !== t18 || $[111] !== t20 || $[112] !== t25 || $[113] !== t26 || $[114] !== type) {
406
415
  t27 = /*#__PURE__*/ jsx(RcTabsComponent, {
407
416
  ...rest,
408
417
  prefixCls: "tao-card-tabs",
@@ -424,26 +433,39 @@ function CardTabs(props) {
424
433
  more: t25,
425
434
  editable: t26
426
435
  });
427
- $[96] = animation;
428
- $[97] = direction;
429
- $[98] = partClasses;
430
- $[99] = position;
431
- $[100] = rest;
432
- $[101] = t10;
433
- $[102] = t11;
434
- $[103] = t12;
435
- $[104] = t13;
436
- $[105] = t14;
437
- $[106] = t15;
438
- $[107] = t16;
439
- $[108] = t18;
440
- $[109] = t20;
441
- $[110] = t25;
442
- $[111] = t26;
443
- $[112] = type;
444
- $[113] = t27;
445
- } else t27 = $[113];
446
- return t27;
436
+ $[98] = animation;
437
+ $[99] = direction;
438
+ $[100] = partClasses;
439
+ $[101] = position;
440
+ $[102] = rest;
441
+ $[103] = t10;
442
+ $[104] = t11;
443
+ $[105] = t12;
444
+ $[106] = t13;
445
+ $[107] = t14;
446
+ $[108] = t15;
447
+ $[109] = t16;
448
+ $[110] = t18;
449
+ $[111] = t20;
450
+ $[112] = t25;
451
+ $[113] = t26;
452
+ $[114] = type;
453
+ $[115] = t27;
454
+ } else t27 = $[115];
455
+ let t28;
456
+ if ($[116] !== direction || $[117] !== directionRef || $[118] !== t27) {
457
+ t28 = /*#__PURE__*/ jsx("div", {
458
+ ref: directionRef,
459
+ dir: direction,
460
+ style: t9,
461
+ children: t27
462
+ });
463
+ $[116] = direction;
464
+ $[117] = directionRef;
465
+ $[118] = t27;
466
+ $[119] = t28;
467
+ } else t28 = $[119];
468
+ return t28;
447
469
  }
448
470
  function _temp(t0) {
449
471
  const { destroyInactiveTabPane: legacyDestroy, ...item } = t0;
@@ -298,7 +298,7 @@ const CardRoot = /*#__PURE__*/ forwardRef((props, ref)=>{
298
298
  }),
299
299
  tabList && /*#__PURE__*/ jsx(CardTabs, {
300
300
  size: 'small' === size ? 'small' : 'large',
301
- direction: 'rtl' === rest.dir ? 'rtl' : 'ltr',
301
+ direction: 'rtl' === rest.dir || 'ltr' === rest.dir ? rest.dir : void 0,
302
302
  ...tabProps,
303
303
  ...void 0 !== activeTabKey ? {
304
304
  activeKey: activeTabKey
@@ -1,9 +1,10 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
3
  import react_slick from "@ant-design/react-slick";
4
- import { Children, forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
5
- import { useTaoInternalConfig } from "../../provider/tao-provider.js";
4
+ import { Children, forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
5
+ import { useTaoDirection, useTaoInternalConfig } from "../../provider/tao-provider.js";
6
6
  import { interopDefault } from "../../utils/interop-default.js";
7
+ import { mergeRefs } from "../../utils/refs.js";
7
8
  import { cx } from "../../utils/semantic.js";
8
9
  import "./carousel.css";
9
10
  const SlickCarouselComponent = /*#__PURE__*/ interopDefault(react_slick);
@@ -165,15 +166,19 @@ const carousel_Carousel = /*#__PURE__*/ forwardRef(function(props, ref) {
165
166
  const { responsive, ...baseProps } = props;
166
167
  const responsiveSettings = useResponsiveSettings(responsive);
167
168
  const unslick = 'unslick' === responsiveSettings;
168
- const { dots = true, arrows = false, prevArrow, nextArrow, draggable = false, waitForAnimate = false, dotPosition, dotPlacement, vertical, rootClassName, className, style, id, autoplay = false, autoplaySpeed = 3000, initialSlide = 0, rtl = false, children, effect = 'scrollx', slickGoTo, prefixCls, classNames, styles, appendDots, ...rest } = {
169
+ const { dots = true, arrows = false, prevArrow, nextArrow, draggable = false, waitForAnimate = false, dotPosition, dotPlacement, vertical, rootClassName, className, style, id, autoplay = false, autoplaySpeed = 3000, initialSlide = 0, rtl, children, effect = 'scrollx', slickGoTo, prefixCls, classNames, styles, appendDots, ...rest } = {
169
170
  ...baseProps,
170
171
  ...unslick ? {} : responsiveSettings
171
172
  };
172
173
  const placement = dotPlacement ?? ('left' === dotPosition ? 'start' : 'right' === dotPosition ? 'end' : dotPosition) ?? 'bottom';
173
174
  const isVertical = vertical ?? ('start' === placement || 'end' === placement);
174
- const isRtl = rtl && !isVertical;
175
+ const [direction, directionRef] = useTaoDirection(void 0 === rtl ? void 0 : rtl ? 'rtl' : 'ltr');
176
+ const isRtl = 'rtl' === direction && !isVertical;
175
177
  const sliderRef = useRef(null);
176
178
  const rootRef = useRef(null);
179
+ const mergedRootRef = useMemo(()=>mergeRefs(rootRef, directionRef), [
180
+ directionRef
181
+ ]);
177
182
  const count = Children.count(children);
178
183
  useImperativeHandle(ref, ()=>({
179
184
  nativeElement: rootRef.current,
@@ -200,7 +205,8 @@ const carousel_Carousel = /*#__PURE__*/ forwardRef(function(props, ref) {
200
205
  unslick
201
206
  ]);
202
207
  return /*#__PURE__*/ jsx("div", {
203
- ref: rootRef,
208
+ ref: mergedRootRef,
209
+ dir: direction,
204
210
  "data-tao-carousel": "",
205
211
  "data-dot-placement": placement,
206
212
  "data-vertical": isVertical || void 0,
@@ -1,8 +1,9 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
3
  import cascader, { Panel } from "@rc-component/cascader";
4
- import { forwardRef } from "react";
5
- import { useTaoInternalConfig } from "../../provider/tao-provider.js";
4
+ import { forwardRef, useMemo } from "react";
5
+ import { useTaoDirection, useTaoInternalConfig } from "../../provider/tao-provider.js";
6
+ import { mergeRefs } from "../../utils/refs.js";
6
7
  import { cx } from "../../utils/semantic.js";
7
8
  import { ChevronDownIcon, CloseIcon } from "../select/select-icons.js";
8
9
  import { Spinner } from "../spinner/spinner.js";
@@ -44,9 +45,16 @@ function InternalCascader(props, ref) {
44
45
  props: resolvedProps
45
46
  }) : styles;
46
47
  const renderPopup = popupRender ?? dropdownRender;
48
+ const [direction, directionRef] = useTaoDirection(props.direction);
49
+ const mergedRef = useMemo(()=>mergeRefs(ref, (node)=>directionRef(node?.nativeElement ?? null)), [
50
+ ref,
51
+ directionRef
52
+ ]);
47
53
  return /*#__PURE__*/ jsx(RcCascaderComponent, {
48
54
  ...rest,
49
- ref: ref,
55
+ ref: mergedRef,
56
+ direction: direction,
57
+ dir: direction,
50
58
  prefixCls: prefixCls,
51
59
  popupPrefixCls: "tao-cascader",
52
60
  "data-tao-cascader": "",
@@ -91,6 +99,7 @@ function InternalCascader(props, ref) {
91
99
  ...semanticStyles?.popup?.root
92
100
  },
93
101
  popupRender: (menu)=>/*#__PURE__*/ jsx(SelectEnginePopup, {
102
+ direction: direction,
94
103
  size: size,
95
104
  children: /*#__PURE__*/ jsx("div", {
96
105
  "data-tao-cascader-popup": "",
@@ -106,14 +115,17 @@ function CascaderPanel(props) {
106
115
  const { multiple, className, rootClassName, style, prefixCls = 'tao-cascader', disabled = config.disabled, notFoundContent = config.locale.noResults, expandIcon = /*#__PURE__*/ jsx(ExpandIcon, {}), loadingIcon = /*#__PURE__*/ jsx(Spinner, {
107
116
  size: "small"
108
117
  }), ...rest } = props;
118
+ const [direction, directionRef] = useTaoDirection(props.direction);
109
119
  return /*#__PURE__*/ jsx("div", {
120
+ ref: directionRef,
110
121
  "data-tao-cascader-panel": "",
111
122
  "data-tao-cascader-popup": "",
112
123
  className: cx(className, rootClassName),
113
124
  style: style,
114
- dir: props.direction,
125
+ dir: direction,
115
126
  children: /*#__PURE__*/ jsx(Panel, {
116
127
  ...rest,
128
+ direction: direction,
117
129
  prefixCls: prefixCls,
118
130
  checkable: multiple,
119
131
  disabled: disabled,