@rockshin/tao-ui 0.0.44 → 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 +6 -0
- package/component-manifest.json +7 -2
- 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/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/tao-provider.doc.js +6 -1
- package/dist/entries/provider.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- 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 +2 -2
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import { useCallback, useMemo, useRef } from "react";
|
|
4
4
|
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
|
+
import { useMobileTitle } from "../../utils/field-label.js";
|
|
5
6
|
import { Button } from "../button/button.js";
|
|
6
7
|
import { Drawer } from "../drawer/drawer.js";
|
|
7
|
-
import { useMobileTitle } from "../../utils/field-label.js";
|
|
8
8
|
import { SearchIcon } from "./select-icons.js";
|
|
9
9
|
import { countLeafOptions, defaultFilter, filterTree, flattenLeafOptions } from "./select-model.js";
|
|
10
10
|
import { useSelectSelection } from "./use-select-selection.js";
|
|
@@ -218,8 +218,9 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
|
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
220
|
function MobileSelectDrawer(t0) {
|
|
221
|
-
const $ = c(
|
|
221
|
+
const $ = c(31);
|
|
222
222
|
let classNames;
|
|
223
|
+
let direction;
|
|
223
224
|
let mobileTitle;
|
|
224
225
|
let onClose;
|
|
225
226
|
let open;
|
|
@@ -228,30 +229,32 @@ function MobileSelectDrawer(t0) {
|
|
|
228
229
|
let rest;
|
|
229
230
|
let styles;
|
|
230
231
|
if ($[0] !== t0) {
|
|
231
|
-
({ open, mobileTitle, onClose, placeholder, classNames, styles, popupRender, ...rest } = t0);
|
|
232
|
+
({ direction, open, mobileTitle, onClose, placeholder, classNames, styles, popupRender, ...rest } = t0);
|
|
232
233
|
$[0] = t0;
|
|
233
234
|
$[1] = classNames;
|
|
234
|
-
$[2] =
|
|
235
|
-
$[3] =
|
|
236
|
-
$[4] =
|
|
237
|
-
$[5] =
|
|
238
|
-
$[6] =
|
|
239
|
-
$[7] =
|
|
240
|
-
$[8] =
|
|
235
|
+
$[2] = direction;
|
|
236
|
+
$[3] = mobileTitle;
|
|
237
|
+
$[4] = onClose;
|
|
238
|
+
$[5] = open;
|
|
239
|
+
$[6] = placeholder;
|
|
240
|
+
$[7] = popupRender;
|
|
241
|
+
$[8] = rest;
|
|
242
|
+
$[9] = styles;
|
|
241
243
|
} else {
|
|
242
244
|
classNames = $[1];
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
245
|
+
direction = $[2];
|
|
246
|
+
mobileTitle = $[3];
|
|
247
|
+
onClose = $[4];
|
|
248
|
+
open = $[5];
|
|
249
|
+
placeholder = $[6];
|
|
250
|
+
popupRender = $[7];
|
|
251
|
+
rest = $[8];
|
|
252
|
+
styles = $[9];
|
|
250
253
|
}
|
|
251
254
|
const { locale } = useTaoConfig();
|
|
252
255
|
const title = useMobileTitle(mobileTitle, locale.select);
|
|
253
256
|
let t1;
|
|
254
|
-
if ($[
|
|
257
|
+
if ($[10] !== classNames || $[11] !== onClose || $[12] !== placeholder || $[13] !== rest || $[14] !== styles) {
|
|
255
258
|
t1 = /*#__PURE__*/ jsx(MobileSelectContentInner, {
|
|
256
259
|
onClose: onClose,
|
|
257
260
|
placeholder: placeholder,
|
|
@@ -259,42 +262,43 @@ function MobileSelectDrawer(t0) {
|
|
|
259
262
|
styles: styles,
|
|
260
263
|
...rest
|
|
261
264
|
});
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
} else t1 = $[
|
|
265
|
+
$[10] = classNames;
|
|
266
|
+
$[11] = onClose;
|
|
267
|
+
$[12] = placeholder;
|
|
268
|
+
$[13] = rest;
|
|
269
|
+
$[14] = styles;
|
|
270
|
+
$[15] = t1;
|
|
271
|
+
} else t1 = $[15];
|
|
269
272
|
const content = t1;
|
|
270
273
|
const t2 = classNames?.popup;
|
|
271
274
|
let t3;
|
|
272
|
-
if ($[
|
|
275
|
+
if ($[16] !== t2) {
|
|
273
276
|
t3 = {
|
|
274
277
|
root: t2
|
|
275
278
|
};
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
} else t3 = $[
|
|
279
|
+
$[16] = t2;
|
|
280
|
+
$[17] = t3;
|
|
281
|
+
} else t3 = $[17];
|
|
279
282
|
const t4 = styles?.popup;
|
|
280
283
|
let t5;
|
|
281
|
-
if ($[
|
|
284
|
+
if ($[18] !== t4) {
|
|
282
285
|
t5 = {
|
|
283
286
|
root: t4
|
|
284
287
|
};
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
} else t5 = $[
|
|
288
|
+
$[18] = t4;
|
|
289
|
+
$[19] = t5;
|
|
290
|
+
} else t5 = $[19];
|
|
288
291
|
let t6;
|
|
289
|
-
if ($[
|
|
292
|
+
if ($[20] !== content || $[21] !== popupRender) {
|
|
290
293
|
t6 = popupRender ? popupRender(content) : content;
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
} else t6 = $[
|
|
294
|
+
$[20] = content;
|
|
295
|
+
$[21] = popupRender;
|
|
296
|
+
$[22] = t6;
|
|
297
|
+
} else t6 = $[22];
|
|
295
298
|
let t7;
|
|
296
|
-
if ($[
|
|
299
|
+
if ($[23] !== direction || $[24] !== onClose || $[25] !== open || $[26] !== t3 || $[27] !== t5 || $[28] !== t6 || $[29] !== title) {
|
|
297
300
|
t7 = /*#__PURE__*/ jsx(Drawer, {
|
|
301
|
+
direction: direction,
|
|
298
302
|
open: open,
|
|
299
303
|
onClose: onClose,
|
|
300
304
|
placement: "bottom",
|
|
@@ -304,14 +308,15 @@ function MobileSelectDrawer(t0) {
|
|
|
304
308
|
styles: t5,
|
|
305
309
|
children: t6
|
|
306
310
|
});
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
|
|
311
|
+
$[23] = direction;
|
|
312
|
+
$[24] = onClose;
|
|
313
|
+
$[25] = open;
|
|
314
|
+
$[26] = t3;
|
|
315
|
+
$[27] = t5;
|
|
316
|
+
$[28] = t6;
|
|
317
|
+
$[29] = title;
|
|
318
|
+
$[30] = t7;
|
|
319
|
+
} else t7 = $[30];
|
|
315
320
|
return t7;
|
|
316
321
|
}
|
|
317
322
|
function CheckIcon() {
|
|
@@ -24,6 +24,7 @@ export interface SelectRef {
|
|
|
24
24
|
nativeElement: HTMLElement | null;
|
|
25
25
|
}
|
|
26
26
|
export interface SelectProps extends Pick<AriaAttributes, 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-errormessage' | 'aria-invalid' | 'aria-required'> {
|
|
27
|
+
direction?: 'ltr' | 'rtl';
|
|
27
28
|
/** Available options; nested options form groups. */
|
|
28
29
|
options: SelectOption[];
|
|
29
30
|
/** Controlled selection. Use an array for multiple or tags mode. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useCallback, useId, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
3
|
-
import { TaoPortalScope, useTaoConfig } from "../../provider/tao-provider.js";
|
|
3
|
+
import { TaoPortalScope, useTaoConfig, useTaoDirection } from "../../provider/tao-provider.js";
|
|
4
|
+
import { mergeRefs } from "../../utils/refs.js";
|
|
4
5
|
import { cx } from "../../utils/semantic.js";
|
|
5
6
|
import { MobileSelectDrawer } from "./mobile-select.js";
|
|
6
7
|
import { CheckIcon, ChevronDownIcon, CloseIcon, LoadingIcon, SearchIcon } from "./select-icons.js";
|
|
@@ -31,7 +32,7 @@ const PLACEMENT_MAP = {
|
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
34
|
const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
34
|
-
const { options, mode, placeholder, size, variant, disabled, status, showSearch, filterOption, searchValue: searchValueProp, onSearch, allowClear, loading, loadingIcon, notFoundContent: notFoundContentProp, prefix, suffixIcon, removeIcon, autoFocus, id, name, open: openProp, defaultOpen, onOpenChange, placement
|
|
35
|
+
const { options, mode, placeholder, size, variant, disabled, status, showSearch, filterOption, searchValue: searchValueProp, onSearch, allowClear, loading, loadingIcon, notFoundContent: notFoundContentProp, prefix, suffixIcon, removeIcon, autoFocus, id, name, open: openProp, defaultOpen, onOpenChange, placement, popupMatchSelectWidth = true, listHeight = 256, getPopupContainer, optionRender, labelRender, popupRender, tagRender, maxTagCount, maxTagPlaceholder, maxTagTextLength, maxCount, autoClearSearchValue = true, tokenSeparators, hideSelected, mobile, className, style, classNames, styles } = props;
|
|
35
36
|
const ctx = useTaoConfig();
|
|
36
37
|
const notFoundContent = void 0 === notFoundContentProp ? ctx.locale.noResults : notFoundContentProp;
|
|
37
38
|
const resolvedSize = size ?? ctx.size;
|
|
@@ -46,6 +47,10 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
46
47
|
if ((!requestedOpen || void 0 === mobilePresentation) && mobilePresentation !== requestedMobile) setMobilePresentation(requestedMobile);
|
|
47
48
|
const isMobile = (requestedOpen ? mobilePresentation : requestedMobile) ?? false;
|
|
48
49
|
const triggerRef = useRef(null);
|
|
50
|
+
const [direction, directionRef] = useTaoDirection(props.direction);
|
|
51
|
+
const mergedTriggerRef = useMemo(()=>mergeRefs(triggerRef, directionRef), [
|
|
52
|
+
directionRef
|
|
53
|
+
]);
|
|
49
54
|
const inputRef = useRef(null);
|
|
50
55
|
const searchListboxId = useId();
|
|
51
56
|
const isMultiple = 'multiple' === mode || 'tags' === mode;
|
|
@@ -284,9 +289,10 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
284
289
|
if (isMobile) return /*#__PURE__*/ jsxs(Fragment, {
|
|
285
290
|
children: [
|
|
286
291
|
/*#__PURE__*/ jsxs("div", {
|
|
287
|
-
ref:
|
|
292
|
+
ref: mergedTriggerRef,
|
|
288
293
|
id: id,
|
|
289
294
|
"data-tao-control": "",
|
|
295
|
+
dir: direction,
|
|
290
296
|
"data-tao-select": "",
|
|
291
297
|
"data-tao-multiple": isMultiple || void 0,
|
|
292
298
|
"data-tao-size": resolvedSize,
|
|
@@ -352,6 +358,7 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
352
358
|
]
|
|
353
359
|
}),
|
|
354
360
|
/*#__PURE__*/ jsx(MobileSelectDrawer, {
|
|
361
|
+
direction: direction,
|
|
355
362
|
mobileTitle: props.mobileTitle,
|
|
356
363
|
classNames: classNames,
|
|
357
364
|
styles: styles,
|
|
@@ -380,7 +387,8 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
380
387
|
})
|
|
381
388
|
]
|
|
382
389
|
});
|
|
383
|
-
const { side, align } = PLACEMENT_MAP[placement];
|
|
390
|
+
const { side, align: physicalAlign } = PLACEMENT_MAP[placement ?? ('rtl' === direction ? 'bottomRight' : 'bottomLeft')];
|
|
391
|
+
const align = 'rtl' === direction ? 'start' === physicalAlign ? 'end' : 'start' : physicalAlign;
|
|
384
392
|
const contentStyle = {
|
|
385
393
|
...styles?.popup
|
|
386
394
|
};
|
|
@@ -579,9 +587,10 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
579
587
|
/*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Trigger, {
|
|
580
588
|
asChild: true,
|
|
581
589
|
children: /*#__PURE__*/ jsxs("div", {
|
|
582
|
-
ref:
|
|
590
|
+
ref: mergedTriggerRef,
|
|
583
591
|
role: "presentation",
|
|
584
592
|
"data-tao-control": "",
|
|
593
|
+
dir: direction,
|
|
585
594
|
"data-tao-select": "",
|
|
586
595
|
"data-tao-inline-search": "",
|
|
587
596
|
"data-tao-multiple": isMultiple || void 0,
|
|
@@ -647,6 +656,7 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
647
656
|
container: container,
|
|
648
657
|
children: /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
649
658
|
asChild: true,
|
|
659
|
+
direction: direction,
|
|
650
660
|
children: /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Content, {
|
|
651
661
|
"data-tao-select-content": "",
|
|
652
662
|
"data-tao-size": resolvedSize,
|
|
@@ -670,6 +680,7 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
670
680
|
});
|
|
671
681
|
}
|
|
672
682
|
return /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_select_4606f4d3.Root, {
|
|
683
|
+
dir: direction,
|
|
673
684
|
value: radixValue,
|
|
674
685
|
onValueChange: handleValueChange,
|
|
675
686
|
disabled: resolvedDisabled,
|
|
@@ -680,11 +691,12 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
680
691
|
/*#__PURE__*/ jsx(__rspack_external__radix_ui_react_select_4606f4d3.Trigger, {
|
|
681
692
|
asChild: true,
|
|
682
693
|
children: /*#__PURE__*/ jsxs("div", {
|
|
683
|
-
ref:
|
|
694
|
+
ref: mergedTriggerRef,
|
|
684
695
|
tabIndex: resolvedDisabled ? -1 : 0,
|
|
685
696
|
id: id,
|
|
686
697
|
...ariaProps,
|
|
687
698
|
"data-tao-control": "",
|
|
699
|
+
dir: direction,
|
|
688
700
|
"data-tao-select": "",
|
|
689
701
|
"data-tao-size": resolvedSize,
|
|
690
702
|
"data-tao-variant": resolvedVariant,
|
|
@@ -741,6 +753,7 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
741
753
|
container: container,
|
|
742
754
|
children: /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
743
755
|
asChild: true,
|
|
756
|
+
direction: direction,
|
|
744
757
|
children: /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_select_4606f4d3.Content, {
|
|
745
758
|
"data-tao-select-content": "",
|
|
746
759
|
"data-tao-size": resolvedSize,
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import slider from "@rc-component/slider";
|
|
4
4
|
import { forwardRef, useEffect, useRef, useState } from "react";
|
|
5
|
-
import { TaoPortalScope, useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
|
+
import { TaoPortalScope, useTaoConfig, useTaoDirection } from "../../provider/tao-provider.js";
|
|
6
6
|
import { cx } from "../../utils/semantic.js";
|
|
7
7
|
import "../tooltip/tooltip.css";
|
|
8
8
|
import "./slider.css";
|
|
@@ -50,6 +50,7 @@ function SliderTip({ children, value, dragging, disabled, vertical, direction, o
|
|
|
50
50
|
/*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tooltip_b301f25d.Portal, {
|
|
51
51
|
container: trigger && getPopupContainer ? getPopupContainer(trigger) : void 0,
|
|
52
52
|
children: /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
53
|
+
direction: direction,
|
|
53
54
|
children: /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_tooltip_b301f25d.Content, {
|
|
54
55
|
"data-tao-tooltip-content": "",
|
|
55
56
|
side: side,
|
|
@@ -89,9 +90,10 @@ function SliderTip({ children, value, dragging, disabled, vertical, direction, o
|
|
|
89
90
|
});
|
|
90
91
|
}
|
|
91
92
|
const Slider = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
92
|
-
const $ = c(
|
|
93
|
+
const $ = c(68);
|
|
93
94
|
let className;
|
|
94
95
|
let classNames;
|
|
96
|
+
let directionProp;
|
|
95
97
|
let disabled;
|
|
96
98
|
let handleRender;
|
|
97
99
|
let orientation;
|
|
@@ -103,55 +105,54 @@ const Slider = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
103
105
|
let t0;
|
|
104
106
|
let t1;
|
|
105
107
|
let t2;
|
|
106
|
-
let t3;
|
|
107
108
|
if ($[0] !== props) {
|
|
108
|
-
({ prefixCls: t0, classNames, styles, rootClassName, className, style, orientation, vertical: t1, direction:
|
|
109
|
+
({ prefixCls: t0, classNames, styles, rootClassName, className, style, orientation, vertical: t1, direction: directionProp, disabled, tooltip: t2, handleRender, reverse, ...rest } = props);
|
|
109
110
|
$[0] = props;
|
|
110
111
|
$[1] = className;
|
|
111
112
|
$[2] = classNames;
|
|
112
|
-
$[3] =
|
|
113
|
-
$[4] =
|
|
114
|
-
$[5] =
|
|
115
|
-
$[6] =
|
|
116
|
-
$[7] =
|
|
117
|
-
$[8] =
|
|
118
|
-
$[9] =
|
|
119
|
-
$[10] =
|
|
120
|
-
$[11] =
|
|
121
|
-
$[12] =
|
|
122
|
-
$[13] =
|
|
123
|
-
$[14] =
|
|
113
|
+
$[3] = directionProp;
|
|
114
|
+
$[4] = disabled;
|
|
115
|
+
$[5] = handleRender;
|
|
116
|
+
$[6] = orientation;
|
|
117
|
+
$[7] = rest;
|
|
118
|
+
$[8] = reverse;
|
|
119
|
+
$[9] = rootClassName;
|
|
120
|
+
$[10] = style;
|
|
121
|
+
$[11] = styles;
|
|
122
|
+
$[12] = t0;
|
|
123
|
+
$[13] = t1;
|
|
124
|
+
$[14] = t2;
|
|
124
125
|
} else {
|
|
125
126
|
className = $[1];
|
|
126
127
|
classNames = $[2];
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
128
|
+
directionProp = $[3];
|
|
129
|
+
disabled = $[4];
|
|
130
|
+
handleRender = $[5];
|
|
131
|
+
orientation = $[6];
|
|
132
|
+
rest = $[7];
|
|
133
|
+
reverse = $[8];
|
|
134
|
+
rootClassName = $[9];
|
|
135
|
+
style = $[10];
|
|
136
|
+
styles = $[11];
|
|
137
|
+
t0 = $[12];
|
|
138
|
+
t1 = $[13];
|
|
139
|
+
t2 = $[14];
|
|
139
140
|
}
|
|
140
141
|
const prefixCls = void 0 === t0 ? "tao-slider" : t0;
|
|
141
142
|
const vertical = void 0 === t1 ? false : t1;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
$[
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
const
|
|
143
|
+
let t3;
|
|
144
|
+
if ($[15] !== t2) {
|
|
145
|
+
t3 = void 0 === t2 ? {} : t2;
|
|
146
|
+
$[15] = t2;
|
|
147
|
+
$[16] = t3;
|
|
148
|
+
} else t3 = $[16];
|
|
149
|
+
const tooltip = t3;
|
|
150
|
+
const [direction, directionRef] = useTaoDirection(directionProp);
|
|
150
151
|
const config = useTaoConfig();
|
|
151
152
|
const resolvedDisabled = disabled ?? config.disabled;
|
|
152
153
|
const resolvedVertical = orientation ? "vertical" === orientation : vertical;
|
|
153
154
|
let classes;
|
|
154
|
-
let
|
|
155
|
+
let t4;
|
|
155
156
|
if ($[17] !== classNames || $[18] !== props || $[19] !== resolvedDisabled || $[20] !== resolvedVertical || $[21] !== styles) {
|
|
156
157
|
const mergedProps = {
|
|
157
158
|
...props,
|
|
@@ -161,7 +162,7 @@ const Slider = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
161
162
|
classes = "function" == typeof classNames ? classNames({
|
|
162
163
|
props: mergedProps
|
|
163
164
|
}) : classNames;
|
|
164
|
-
|
|
165
|
+
t4 = "function" == typeof styles ? styles({
|
|
165
166
|
props: mergedProps
|
|
166
167
|
}) : styles;
|
|
167
168
|
$[17] = classNames;
|
|
@@ -170,82 +171,82 @@ const Slider = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
170
171
|
$[20] = resolvedVertical;
|
|
171
172
|
$[21] = styles;
|
|
172
173
|
$[22] = classes;
|
|
173
|
-
$[23] =
|
|
174
|
+
$[23] = t4;
|
|
174
175
|
} else {
|
|
175
176
|
classes = $[22];
|
|
176
|
-
|
|
177
|
+
t4 = $[23];
|
|
177
178
|
}
|
|
178
|
-
const semanticStyles =
|
|
179
|
+
const semanticStyles = t4;
|
|
179
180
|
const allDisabled = Array.isArray(resolvedDisabled) ? resolvedDisabled.every(Boolean) : resolvedDisabled;
|
|
180
|
-
const
|
|
181
|
-
const
|
|
182
|
-
const
|
|
183
|
-
const
|
|
184
|
-
const
|
|
185
|
-
let
|
|
186
|
-
if ($[24] !== className || $[25] !== rootClassName || $[26] !==
|
|
187
|
-
|
|
181
|
+
const t5 = resolvedVertical ? "" : void 0;
|
|
182
|
+
const t6 = allDisabled ? "" : void 0;
|
|
183
|
+
const t7 = rest;
|
|
184
|
+
const t8 = "rtl" !== direction || resolvedVertical ? reverse : !reverse;
|
|
185
|
+
const t9 = classes?.root;
|
|
186
|
+
let t10;
|
|
187
|
+
if ($[24] !== className || $[25] !== rootClassName || $[26] !== t9) {
|
|
188
|
+
t10 = cx(t9, rootClassName, className);
|
|
188
189
|
$[24] = className;
|
|
189
190
|
$[25] = rootClassName;
|
|
190
|
-
$[26] =
|
|
191
|
-
$[27] =
|
|
192
|
-
} else
|
|
193
|
-
const
|
|
194
|
-
let
|
|
195
|
-
if ($[28] !== style || $[29] !==
|
|
196
|
-
|
|
197
|
-
...
|
|
191
|
+
$[26] = t9;
|
|
192
|
+
$[27] = t10;
|
|
193
|
+
} else t10 = $[27];
|
|
194
|
+
const t11 = semanticStyles?.root;
|
|
195
|
+
let t12;
|
|
196
|
+
if ($[28] !== style || $[29] !== t11) {
|
|
197
|
+
t12 = {
|
|
198
|
+
...t11,
|
|
198
199
|
...style
|
|
199
200
|
};
|
|
200
201
|
$[28] = style;
|
|
201
|
-
$[29] =
|
|
202
|
-
$[30] =
|
|
203
|
-
} else
|
|
204
|
-
const
|
|
205
|
-
let
|
|
206
|
-
if ($[31] !==
|
|
207
|
-
|
|
208
|
-
$[31] =
|
|
209
|
-
$[32] =
|
|
210
|
-
} else
|
|
211
|
-
const
|
|
212
|
-
let
|
|
213
|
-
if ($[33] !==
|
|
214
|
-
|
|
215
|
-
$[33] =
|
|
216
|
-
$[34] =
|
|
217
|
-
} else
|
|
218
|
-
const
|
|
219
|
-
let
|
|
220
|
-
if ($[35] !==
|
|
221
|
-
|
|
222
|
-
$[35] =
|
|
223
|
-
$[36] =
|
|
224
|
-
} else
|
|
225
|
-
const
|
|
202
|
+
$[29] = t11;
|
|
203
|
+
$[30] = t12;
|
|
204
|
+
} else t12 = $[30];
|
|
205
|
+
const t13 = classes?.tracks;
|
|
206
|
+
let t14;
|
|
207
|
+
if ($[31] !== t13) {
|
|
208
|
+
t14 = cx("tao-slider-tracks-slot", t13);
|
|
209
|
+
$[31] = t13;
|
|
210
|
+
$[32] = t14;
|
|
211
|
+
} else t14 = $[32];
|
|
212
|
+
const t15 = classes?.track;
|
|
213
|
+
let t16;
|
|
214
|
+
if ($[33] !== t15) {
|
|
215
|
+
t16 = cx("tao-slider-track-slot", t15);
|
|
216
|
+
$[33] = t15;
|
|
217
|
+
$[34] = t16;
|
|
218
|
+
} else t16 = $[34];
|
|
219
|
+
const t17 = classes?.rail;
|
|
220
|
+
let t18;
|
|
221
|
+
if ($[35] !== t17) {
|
|
222
|
+
t18 = cx("tao-slider-rail-slot", t17);
|
|
223
|
+
$[35] = t17;
|
|
224
|
+
$[36] = t18;
|
|
225
|
+
} else t18 = $[36];
|
|
226
|
+
const t19 = classes?.handle;
|
|
227
|
+
let t20;
|
|
228
|
+
if ($[37] !== t19) {
|
|
229
|
+
t20 = cx("tao-slider-handle-slot", t19);
|
|
230
|
+
$[37] = t19;
|
|
231
|
+
$[38] = t20;
|
|
232
|
+
} else t20 = $[38];
|
|
226
233
|
let t21;
|
|
227
|
-
if ($[
|
|
228
|
-
t21 =
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
if ($[39] !== t15 || $[40] !== t17 || $[41] !== t19 || $[42] !== t21) {
|
|
234
|
-
t22 = {
|
|
235
|
-
tracks: t15,
|
|
236
|
-
track: t17,
|
|
237
|
-
rail: t19,
|
|
238
|
-
handle: t21
|
|
234
|
+
if ($[39] !== t14 || $[40] !== t16 || $[41] !== t18 || $[42] !== t20) {
|
|
235
|
+
t21 = {
|
|
236
|
+
tracks: t14,
|
|
237
|
+
track: t16,
|
|
238
|
+
rail: t18,
|
|
239
|
+
handle: t20
|
|
239
240
|
};
|
|
240
|
-
$[39] =
|
|
241
|
-
$[40] =
|
|
242
|
-
$[41] =
|
|
243
|
-
$[42] =
|
|
244
|
-
$[43] =
|
|
245
|
-
} else
|
|
246
|
-
let
|
|
241
|
+
$[39] = t14;
|
|
242
|
+
$[40] = t16;
|
|
243
|
+
$[41] = t18;
|
|
244
|
+
$[42] = t20;
|
|
245
|
+
$[43] = t21;
|
|
246
|
+
} else t21 = $[43];
|
|
247
|
+
let t22;
|
|
247
248
|
if ($[44] !== direction || $[45] !== handleRender || $[46] !== resolvedDisabled || $[47] !== resolvedVertical || $[48] !== tooltip) {
|
|
248
|
-
|
|
249
|
+
t22 = (node, info)=>/*#__PURE__*/ jsx(SliderTip, {
|
|
249
250
|
value: info.value,
|
|
250
251
|
dragging: info.dragging,
|
|
251
252
|
disabled: Array.isArray(resolvedDisabled) ? !!resolvedDisabled[info.index] : !!resolvedDisabled,
|
|
@@ -259,52 +260,54 @@ const Slider = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
259
260
|
$[46] = resolvedDisabled;
|
|
260
261
|
$[47] = resolvedVertical;
|
|
261
262
|
$[48] = tooltip;
|
|
262
|
-
$[49] =
|
|
263
|
-
} else
|
|
264
|
-
let
|
|
265
|
-
if ($[50] !== prefixCls || $[51] !== ref || $[52] !== resolvedDisabled || $[53] !== resolvedVertical || $[54] !== semanticStyles || $[55] !==
|
|
266
|
-
|
|
267
|
-
...
|
|
263
|
+
$[49] = t22;
|
|
264
|
+
} else t22 = $[49];
|
|
265
|
+
let t23;
|
|
266
|
+
if ($[50] !== prefixCls || $[51] !== ref || $[52] !== resolvedDisabled || $[53] !== resolvedVertical || $[54] !== semanticStyles || $[55] !== t10 || $[56] !== t12 || $[57] !== t21 || $[58] !== t22 || $[59] !== t7 || $[60] !== t8) {
|
|
267
|
+
t23 = /*#__PURE__*/ jsx(RcSliderComponent, {
|
|
268
|
+
...t7,
|
|
268
269
|
ref: ref,
|
|
269
270
|
prefixCls: prefixCls,
|
|
270
271
|
disabled: resolvedDisabled,
|
|
271
272
|
vertical: resolvedVertical,
|
|
272
|
-
reverse:
|
|
273
|
-
className:
|
|
274
|
-
style:
|
|
275
|
-
classNames:
|
|
273
|
+
reverse: t8,
|
|
274
|
+
className: t10,
|
|
275
|
+
style: t12,
|
|
276
|
+
classNames: t21,
|
|
276
277
|
styles: semanticStyles,
|
|
277
|
-
handleRender:
|
|
278
|
+
handleRender: t22
|
|
278
279
|
});
|
|
279
280
|
$[50] = prefixCls;
|
|
280
281
|
$[51] = ref;
|
|
281
282
|
$[52] = resolvedDisabled;
|
|
282
283
|
$[53] = resolvedVertical;
|
|
283
284
|
$[54] = semanticStyles;
|
|
284
|
-
$[55] =
|
|
285
|
-
$[56] =
|
|
286
|
-
$[57] =
|
|
287
|
-
$[58] =
|
|
288
|
-
$[59] =
|
|
289
|
-
$[60] =
|
|
290
|
-
$[61] =
|
|
291
|
-
} else
|
|
292
|
-
let
|
|
293
|
-
if ($[62] !== direction || $[63] !==
|
|
294
|
-
|
|
285
|
+
$[55] = t10;
|
|
286
|
+
$[56] = t12;
|
|
287
|
+
$[57] = t21;
|
|
288
|
+
$[58] = t22;
|
|
289
|
+
$[59] = t7;
|
|
290
|
+
$[60] = t8;
|
|
291
|
+
$[61] = t23;
|
|
292
|
+
} else t23 = $[61];
|
|
293
|
+
let t24;
|
|
294
|
+
if ($[62] !== direction || $[63] !== directionRef || $[64] !== t23 || $[65] !== t5 || $[66] !== t6) {
|
|
295
|
+
t24 = /*#__PURE__*/ jsx("div", {
|
|
296
|
+
ref: directionRef,
|
|
295
297
|
"data-tao-slider": "",
|
|
296
|
-
"data-tao-vertical":
|
|
297
|
-
"data-tao-disabled":
|
|
298
|
+
"data-tao-vertical": t5,
|
|
299
|
+
"data-tao-disabled": t6,
|
|
298
300
|
dir: direction,
|
|
299
|
-
children:
|
|
301
|
+
children: t23
|
|
300
302
|
});
|
|
301
303
|
$[62] = direction;
|
|
302
|
-
$[63] =
|
|
303
|
-
$[64] =
|
|
304
|
-
$[65] =
|
|
305
|
-
$[66] =
|
|
306
|
-
|
|
307
|
-
|
|
304
|
+
$[63] = directionRef;
|
|
305
|
+
$[64] = t23;
|
|
306
|
+
$[65] = t5;
|
|
307
|
+
$[66] = t6;
|
|
308
|
+
$[67] = t24;
|
|
309
|
+
} else t24 = $[67];
|
|
310
|
+
return t24;
|
|
308
311
|
});
|
|
309
312
|
Slider.displayName = 'Slider';
|
|
310
313
|
export { Slider };
|