@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.
- package/README.md +7 -1
- package/component-manifest.json +10 -3
- package/dist/components/auto-complete/auto-complete.js +12 -3
- package/dist/components/breadcrumb/breadcrumb.css +4 -0
- package/dist/components/breadcrumb/breadcrumb.js +1 -0
- package/dist/components/calendar/calendar.d.ts +1 -0
- package/dist/components/calendar/calendar.js +10 -3
- package/dist/components/card/card-tabs.js +204 -182
- package/dist/components/card/card.js +1 -1
- package/dist/components/carousel/carousel.js +11 -5
- package/dist/components/cascader/cascader.js +16 -4
- package/dist/components/collapse/collapse.css +8 -0
- package/dist/components/context-menu/context-menu.d.ts +2 -1
- package/dist/components/context-menu/context-menu.js +57 -44
- package/dist/components/date-picker/calendar/calendar-grid.js +3 -2
- package/dist/components/date-picker/date-picker.css +4 -0
- package/dist/components/date-picker/date-picker.d.ts +1 -0
- package/dist/components/date-picker/date-picker.js +13 -3
- package/dist/components/date-picker/range-picker.d.ts +1 -0
- package/dist/components/date-picker/range-picker.js +13 -3
- package/dist/components/drawer/drawer.d.ts +2 -1
- package/dist/components/drawer/drawer.js +32 -20
- package/dist/components/dropdown/dropdown.d.ts +1 -0
- package/dist/components/dropdown/dropdown.js +139 -123
- package/dist/components/form/field-control.d.ts +6 -0
- package/dist/components/form/field-control.js +42 -0
- package/dist/components/form/form-context.d.ts +3 -0
- package/dist/components/form/form-item.d.ts +2 -1
- package/dist/components/form/form-item.js +55 -42
- package/dist/components/form/form.d.ts +5 -5
- package/dist/components/form/form.js +86 -68
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/use-form.d.ts +16 -0
- package/dist/components/form/use-form.js +69 -0
- package/dist/components/form-field/form-field-view.d.ts +4 -2
- package/dist/components/form-field/form-field-view.js +42 -35
- package/dist/components/mentions/mentions.js +6 -2
- package/dist/components/modal/modal.d.ts +2 -1
- package/dist/components/modal/modal.js +14 -4
- package/dist/components/pagination/pagination.css +4 -0
- package/dist/components/popover/popover.d.ts +2 -1
- package/dist/components/popover/popover.js +185 -176
- package/dist/components/rate/rate.js +114 -88
- package/dist/components/scroll-area/scroll-area.js +127 -118
- package/dist/components/segmented/segmented.js +52 -29
- package/dist/components/select/mobile-select.d.ts +2 -1
- package/dist/components/select/mobile-select.js +52 -47
- package/dist/components/select/select-types.d.ts +1 -0
- package/dist/components/select/select.js +19 -6
- package/dist/components/slider/slider.js +136 -133
- package/dist/components/splitter/splitter.css +4 -0
- package/dist/components/splitter/splitter.js +5 -3
- package/dist/components/table/table.css +29 -11
- package/dist/components/table/table.js +383 -547
- package/dist/components/tabs/tabs.js +3 -2
- package/dist/components/time-picker/time-picker.js +21 -7
- package/dist/components/tooltip/tooltip.d.ts +2 -1
- package/dist/components/tooltip/tooltip.js +82 -71
- package/dist/components/transfer/transfer-parts.js +12 -2
- package/dist/components/transfer/transfer.js +10 -4
- package/dist/components/tree/tree-keyboard.d.ts +6 -0
- package/dist/components/tree/tree-keyboard.js +27 -0
- package/dist/components/tree/tree.js +14 -3
- package/dist/components/tree-select/select-engine.d.ts +2 -1
- package/dist/components/tree-select/select-engine.js +23 -15
- package/dist/components/tree-select/tree-select.js +20 -10
- package/dist/docs/components/form.doc.js +3 -1
- package/dist/docs/components/tao-provider.doc.js +6 -1
- package/dist/entries/form.d.ts +2 -2
- package/dist/entries/provider.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/provider/tao-provider.d.ts +10 -3
- package/dist/provider/tao-provider.js +198 -88
- package/dist/utils/scroll-left.d.ts +3 -0
- package/dist/utils/scroll-left.js +7 -0
- package/llms.txt +3 -3
- 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(
|
|
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:
|
|
81
|
-
t0 =
|
|
82
|
-
t1 =
|
|
83
|
-
hideAdd =
|
|
84
|
-
centered =
|
|
85
|
-
rootClassName =
|
|
86
|
-
classNames =
|
|
87
|
-
styles =
|
|
88
|
-
tabPosition =
|
|
89
|
-
tabPlacement =
|
|
90
|
-
onEdit =
|
|
91
|
-
indicatorSize =
|
|
92
|
-
items =
|
|
93
|
-
destroyInactiveTabPane =
|
|
94
|
-
destroyOnHidden =
|
|
95
|
-
addIcon =
|
|
96
|
-
moreIcon =
|
|
97
|
-
removeIcon =
|
|
98
|
-
more =
|
|
99
|
-
prefixCls =
|
|
100
|
-
className =
|
|
101
|
-
style =
|
|
102
|
-
|
|
103
|
-
animated =
|
|
104
|
-
indicator =
|
|
105
|
-
popupClassName =
|
|
106
|
-
rest =
|
|
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] =
|
|
116
|
-
$[9] =
|
|
117
|
-
$[10] =
|
|
118
|
-
$[11] =
|
|
119
|
-
$[12] =
|
|
120
|
-
$[13] =
|
|
121
|
-
$[14] =
|
|
122
|
-
$[15] =
|
|
123
|
-
$[16] =
|
|
124
|
-
$[17] =
|
|
125
|
-
$[18] =
|
|
126
|
-
$[19] =
|
|
127
|
-
$[20] =
|
|
128
|
-
$[21] =
|
|
129
|
-
$[22] =
|
|
130
|
-
$[23] =
|
|
131
|
-
$[24] =
|
|
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
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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 =
|
|
165
|
-
let
|
|
164
|
+
const [direction, directionRef] = useTaoDirection(directionProp);
|
|
165
|
+
let t2;
|
|
166
166
|
if ($[27] !== classNames || $[28] !== props || $[29] !== size || $[30] !== type) {
|
|
167
|
-
|
|
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] =
|
|
179
|
-
} else
|
|
180
|
-
const classes =
|
|
181
|
-
let
|
|
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
|
-
|
|
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] =
|
|
195
|
-
} else
|
|
196
|
-
const slots =
|
|
197
|
-
let
|
|
194
|
+
$[36] = t3;
|
|
195
|
+
} else t3 = $[36];
|
|
196
|
+
const slots = t3;
|
|
197
|
+
let t4;
|
|
198
198
|
if ($[37] !== classes) {
|
|
199
|
-
|
|
199
|
+
t4 = classes ?? {};
|
|
200
200
|
$[37] = classes;
|
|
201
|
-
$[38] =
|
|
202
|
-
} else
|
|
201
|
+
$[38] = t4;
|
|
202
|
+
} else t4 = $[38];
|
|
203
203
|
let partClasses;
|
|
204
204
|
let popupClasses;
|
|
205
205
|
let rootClass;
|
|
206
|
-
if ($[39] !==
|
|
207
|
-
({ root: rootClass, popup: popupClasses, ...partClasses } =
|
|
208
|
-
$[39] =
|
|
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
|
|
217
|
+
let t5;
|
|
218
218
|
if ($[43] !== slots) {
|
|
219
|
-
|
|
219
|
+
t5 = slots ?? {};
|
|
220
220
|
$[43] = slots;
|
|
221
|
-
$[44] =
|
|
222
|
-
} else
|
|
221
|
+
$[44] = t5;
|
|
222
|
+
} else t5 = $[44];
|
|
223
223
|
let partStyles;
|
|
224
224
|
let popupStyles;
|
|
225
225
|
let rootStyle;
|
|
226
|
-
if ($[45] !==
|
|
227
|
-
({ root: rootStyle, popup: popupStyles, ...partStyles } =
|
|
228
|
-
$[45] =
|
|
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
|
|
238
|
+
let t6;
|
|
239
239
|
if ($[49] !== more) {
|
|
240
|
-
|
|
240
|
+
t6 = more ?? {};
|
|
241
241
|
$[49] = more;
|
|
242
|
-
$[50] =
|
|
243
|
-
} else
|
|
242
|
+
$[50] = t6;
|
|
243
|
+
} else t6 = $[50];
|
|
244
244
|
let moreProps;
|
|
245
245
|
let onVisibleChange;
|
|
246
246
|
let visible;
|
|
247
|
-
if ($[51] !==
|
|
248
|
-
({ visible, onVisibleChange, ...moreProps } =
|
|
249
|
-
$[51] =
|
|
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
|
|
258
|
+
let t7;
|
|
259
259
|
if ($[55] !== animated || $[56] !== type) {
|
|
260
|
-
|
|
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] =
|
|
274
|
-
} else
|
|
275
|
-
const motion =
|
|
276
|
-
let
|
|
273
|
+
$[57] = t7;
|
|
274
|
+
} else t7 = $[57];
|
|
275
|
+
const motion = t7;
|
|
276
|
+
let t8;
|
|
277
277
|
if ($[58] !== animated || $[59] !== motion) {
|
|
278
|
-
|
|
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] =
|
|
291
|
-
} else
|
|
292
|
-
const animation =
|
|
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 ($[
|
|
303
|
+
if ($[62] !== className || $[63] !== prefixCls || $[64] !== rootClass || $[65] !== rootClassName) {
|
|
297
304
|
t12 = cx(prefixCls, rootClass, className, rootClassName);
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
301
|
-
$[
|
|
302
|
-
$[
|
|
303
|
-
} else t12 = $[
|
|
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 ($[
|
|
312
|
+
if ($[67] !== rootStyle || $[68] !== style) {
|
|
306
313
|
t13 = {
|
|
307
314
|
...rootStyle,
|
|
308
315
|
...style
|
|
309
316
|
};
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
} else t13 = $[
|
|
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 ($[
|
|
323
|
+
if ($[70] !== items) {
|
|
317
324
|
t15 = items?.map(_temp);
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
} else t15 = $[
|
|
325
|
+
$[70] = items;
|
|
326
|
+
$[71] = t15;
|
|
327
|
+
} else t15 = $[71];
|
|
321
328
|
let t16;
|
|
322
|
-
if ($[
|
|
329
|
+
if ($[72] !== indicator || $[73] !== indicatorSize) {
|
|
323
330
|
t16 = {
|
|
324
331
|
size: indicatorSize,
|
|
325
332
|
...indicator
|
|
326
333
|
};
|
|
327
|
-
$[
|
|
328
|
-
$[
|
|
329
|
-
$[
|
|
330
|
-
} else t16 = $[
|
|
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 ($[
|
|
340
|
+
if ($[75] !== partStyles || $[76] !== t17) {
|
|
334
341
|
t18 = {
|
|
335
342
|
...partStyles,
|
|
336
343
|
popup: t17
|
|
337
344
|
};
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
340
|
-
$[
|
|
341
|
-
} else t18 = $[
|
|
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 ($[
|
|
351
|
+
if ($[78] !== popupClassName || $[79] !== t19) {
|
|
345
352
|
t20 = cx(t19, popupClassName);
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
} else t20 = $[
|
|
353
|
+
$[78] = popupClassName;
|
|
354
|
+
$[79] = t19;
|
|
355
|
+
$[80] = t20;
|
|
356
|
+
} else t20 = $[80];
|
|
350
357
|
let t21;
|
|
351
|
-
if ($[
|
|
358
|
+
if ($[81] !== moreIcon) {
|
|
352
359
|
t21 = moreIcon ?? /*#__PURE__*/ jsx(TabIcon, {
|
|
353
360
|
type: "more"
|
|
354
361
|
});
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
} else t21 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
|
|
374
|
+
$[83] = direction;
|
|
375
|
+
$[84] = moreProps;
|
|
376
|
+
$[85] = t24;
|
|
377
|
+
} else t24 = $[85];
|
|
369
378
|
let t25;
|
|
370
|
-
if ($[
|
|
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
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
} else t25 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
402
|
-
$[
|
|
403
|
-
} else t26 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
$[
|
|
432
|
-
$[
|
|
433
|
-
$[
|
|
434
|
-
$[
|
|
435
|
-
$[
|
|
436
|
-
$[
|
|
437
|
-
$[
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
} else t27 = $[
|
|
446
|
-
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
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,
|