@rockshin/tao-ui 0.0.41 → 0.0.42
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 +33 -7
- package/THIRD_PARTY_NOTICES.md +34 -0
- package/component-manifest.json +1321 -10
- package/dist/components/affix/affix.css +11 -0
- package/dist/components/affix/affix.d.ts +21 -0
- package/dist/components/affix/affix.js +140 -0
- package/dist/components/app/app-modals.d.ts +2 -0
- package/dist/components/app/app-modals.js +266 -0
- package/dist/components/app/app-notices.d.ts +6 -0
- package/dist/components/app/app-notices.js +334 -0
- package/dist/components/app/app-types.d.ts +154 -0
- package/dist/components/app/app-types.js +0 -0
- package/dist/components/app/app.css +221 -0
- package/dist/components/app/app.d.ts +7 -0
- package/dist/components/app/app.js +69 -0
- package/dist/components/auto-complete/auto-complete.css +35 -0
- package/dist/components/auto-complete/auto-complete.d.ts +47 -0
- package/dist/components/auto-complete/auto-complete.js +106 -0
- package/dist/components/avatar/avatar.css +95 -0
- package/dist/components/avatar/avatar.d.ts +50 -0
- package/dist/components/avatar/avatar.js +159 -0
- package/dist/components/badge/badge.css +165 -0
- package/dist/components/badge/badge.d.ts +48 -0
- package/dist/components/badge/badge.js +412 -0
- package/dist/components/border-beam/border-beam.css +35 -0
- package/dist/components/border-beam/border-beam.d.ts +27 -0
- package/dist/components/border-beam/border-beam.js +215 -0
- package/dist/components/button/button.css +7 -0
- package/dist/components/calendar/calendar.css +176 -0
- package/dist/components/calendar/calendar.d.ts +56 -0
- package/dist/components/calendar/calendar.js +175 -0
- package/dist/components/card/card-tabs.d.ts +43 -0
- package/dist/components/card/card-tabs.js +455 -0
- package/dist/components/card/card.css +401 -0
- package/dist/components/card/card.d.ts +74 -0
- package/dist/components/card/card.js +362 -0
- package/dist/components/carousel/carousel.css +231 -0
- package/dist/components/carousel/carousel.d.ts +35 -0
- package/dist/components/carousel/carousel.js +193 -0
- package/dist/components/cascader/cascader.css +123 -0
- package/dist/components/cascader/cascader.d.ts +58 -0
- package/dist/components/cascader/cascader.js +132 -0
- package/dist/components/checkbox/checkbox.css +7 -0
- package/dist/components/color-picker/color-picker-types.d.ts +78 -0
- package/dist/components/color-picker/color-picker-types.js +0 -0
- package/dist/components/color-picker/color-picker.css +299 -0
- package/dist/components/color-picker/color-picker.d.ts +5 -0
- package/dist/components/color-picker/color-picker.js +974 -0
- package/dist/components/color-picker/color.d.ts +35 -0
- package/dist/components/color-picker/color.js +65 -0
- package/dist/components/date-picker/calendar/calendar-grid.js +4 -11
- package/dist/components/date-picker/calendar/calendar-header.js +76 -69
- package/dist/components/date-picker/calendar/month-grid.js +20 -31
- package/dist/components/date-picker/calendar/time-panel.js +46 -41
- package/dist/components/date-picker/date-picker.css +4 -0
- package/dist/components/date-picker/date-picker.js +4 -4
- package/dist/components/date-picker/range-picker.js +14 -13
- package/dist/components/descriptions/descriptions.css +109 -0
- package/dist/components/descriptions/descriptions.d.ts +49 -0
- package/dist/components/descriptions/descriptions.js +189 -0
- package/dist/components/divider/divider.css +71 -0
- package/dist/components/divider/divider.d.ts +31 -0
- package/dist/components/divider/divider.js +83 -0
- package/dist/components/drawer/drawer.js +199 -184
- package/dist/components/empty/empty.css +35 -0
- package/dist/components/empty/empty.d.ts +25 -0
- package/dist/components/empty/empty.js +278 -0
- package/dist/components/float-button/float-button.css +146 -0
- package/dist/components/float-button/float-button.d.ts +67 -0
- package/dist/components/float-button/float-button.js +347 -0
- package/dist/components/form/form-item.d.ts +1 -1
- package/dist/components/form/form.js +3 -1
- package/dist/components/image/image-icons.d.ts +16 -0
- package/dist/components/image/image-icons.js +63 -0
- package/dist/components/image/image.css +253 -0
- package/dist/components/image/image.d.ts +75 -0
- package/dist/components/image/image.js +818 -0
- package/dist/components/input/input.css +8 -6
- package/dist/components/list/list-pagination.css +127 -0
- package/dist/components/list/list-pagination.d.ts +38 -0
- package/dist/components/list/list-pagination.js +321 -0
- package/dist/components/list/list.css +225 -0
- package/dist/components/list/list.d.ts +77 -0
- package/dist/components/list/list.js +660 -0
- package/dist/components/listy/listy.css +55 -0
- package/dist/components/listy/listy.d.ts +20 -0
- package/dist/components/listy/listy.js +158 -0
- package/dist/components/masonry/masonry.css +13 -0
- package/dist/components/masonry/masonry.d.ts +39 -0
- package/dist/components/masonry/masonry.js +287 -0
- package/dist/components/mentions/mentions.css +172 -0
- package/dist/components/mentions/mentions.d.ts +48 -0
- package/dist/components/mentions/mentions.js +115 -0
- package/dist/components/modal/modal.d.ts +30 -4
- package/dist/components/modal/modal.js +534 -241
- package/dist/components/pagination/pagination.css +10 -0
- package/dist/components/progress/progress.css +187 -0
- package/dist/components/progress/progress.d.ts +66 -0
- package/dist/components/progress/progress.js +567 -0
- package/dist/components/qr-code/qr-code.css +39 -0
- package/dist/components/qr-code/qr-code.d.ts +43 -0
- package/dist/components/qr-code/qr-code.js +286 -0
- package/dist/components/radio/radio.css +7 -0
- package/dist/components/rate/rate.css +97 -0
- package/dist/components/rate/rate.d.ts +17 -0
- package/dist/components/rate/rate.js +172 -0
- package/dist/components/result/result.css +69 -0
- package/dist/components/result/result.d.ts +33 -0
- package/dist/components/result/result.js +320 -0
- package/dist/components/segmented/segmented.css +134 -0
- package/dist/components/segmented/segmented.d.ts +40 -0
- package/dist/components/segmented/segmented.js +169 -0
- package/dist/components/select/mobile-select.d.ts +10 -4
- package/dist/components/select/mobile-select.js +166 -58
- package/dist/components/select/select-tags.js +178 -130
- package/dist/components/select/select-types.d.ts +51 -0
- package/dist/components/select/select.css +69 -10
- package/dist/components/select/select.js +30 -16
- package/dist/components/select/use-select-selection.js +44 -43
- package/dist/components/skeleton/skeleton.css +129 -0
- package/dist/components/skeleton/skeleton.d.ts +78 -0
- package/dist/components/skeleton/skeleton.js +457 -0
- package/dist/components/slider/slider.css +191 -0
- package/dist/components/slider/slider.d.ts +47 -0
- package/dist/components/slider/slider.js +310 -0
- package/dist/components/statistic/statistic.css +34 -0
- package/dist/components/statistic/statistic.d.ts +46 -0
- package/dist/components/statistic/statistic.js +491 -0
- package/dist/components/switch/switch-touch.css +20 -0
- package/dist/components/switch/switch.css +24 -13
- package/dist/components/switch/switch.js +8 -5
- package/dist/components/textarea/textarea.css +1 -1
- package/dist/components/time-picker/time-picker.css +205 -0
- package/dist/components/time-picker/time-picker.d.ts +63 -0
- package/dist/components/time-picker/time-picker.js +356 -0
- package/dist/components/timeline/timeline.css +259 -0
- package/dist/components/timeline/timeline.d.ts +50 -0
- package/dist/components/timeline/timeline.js +140 -0
- package/dist/components/tour/tour.css +151 -0
- package/dist/components/tour/tour.d.ts +45 -0
- package/dist/components/tour/tour.js +575 -0
- package/dist/components/transfer/transfer-list.d.ts +2 -0
- package/dist/components/transfer/transfer-list.js +513 -0
- package/dist/components/transfer/transfer-parts.d.ts +3 -0
- package/dist/components/transfer/transfer-parts.js +163 -0
- package/dist/components/transfer/transfer-types.d.ts +163 -0
- package/dist/components/transfer/transfer-types.js +0 -0
- package/dist/components/transfer/transfer.css +226 -0
- package/dist/components/transfer/transfer.d.ts +13 -0
- package/dist/components/transfer/transfer.js +204 -0
- package/dist/components/tree/tree.css +250 -0
- package/dist/components/tree/tree.d.ts +46 -0
- package/dist/components/tree/tree.js +389 -0
- package/dist/components/tree-select/select-engine.css +231 -0
- package/dist/components/tree-select/select-engine.d.ts +20 -0
- package/dist/components/tree-select/select-engine.js +46 -0
- package/dist/components/tree-select/tree-select.css +25 -0
- package/dist/components/tree-select/tree-select.d.ts +50 -0
- package/dist/components/tree-select/tree-select.js +131 -0
- package/dist/components/upload/upload-types.d.ts +135 -0
- package/dist/components/upload/upload-types.js +0 -0
- package/dist/components/upload/upload.css +177 -0
- package/dist/components/upload/upload.d.ts +12 -0
- package/dist/components/upload/upload.js +455 -0
- package/dist/components/watermark/watermark-context.d.ts +7 -0
- package/dist/components/watermark/watermark-context.js +20 -0
- package/dist/components/watermark/watermark.css +10 -0
- package/dist/components/watermark/watermark.d.ts +38 -0
- package/dist/components/watermark/watermark.js +436 -0
- package/dist/docs/component-docs.d.ts +35 -29
- package/dist/docs/component-docs.js +73 -1
- package/dist/docs/components/affix.doc.d.ts +14 -0
- package/dist/docs/components/affix.doc.js +22 -0
- package/dist/docs/components/app.doc.d.ts +18 -0
- package/dist/docs/components/app.doc.js +42 -0
- package/dist/docs/components/auto-complete.doc.d.ts +18 -0
- package/dist/docs/components/auto-complete.doc.js +49 -0
- package/dist/docs/components/avatar.doc.d.ts +17 -0
- package/dist/docs/components/avatar.doc.js +36 -0
- package/dist/docs/components/badge.doc.d.ts +17 -0
- package/dist/docs/components/badge.doc.js +34 -0
- package/dist/docs/components/border-beam.doc.d.ts +14 -0
- package/dist/docs/components/border-beam.doc.js +22 -0
- package/dist/docs/components/calendar.doc.d.ts +18 -0
- package/dist/docs/components/calendar.doc.js +45 -0
- package/dist/docs/components/card.doc.d.ts +17 -0
- package/dist/docs/components/card.doc.js +39 -0
- package/dist/docs/components/carousel.doc.d.ts +15 -0
- package/dist/docs/components/carousel.doc.js +26 -0
- package/dist/docs/components/cascader.doc.d.ts +18 -0
- package/dist/docs/components/cascader.doc.js +54 -0
- package/dist/docs/components/color-picker.doc.d.ts +18 -0
- package/dist/docs/components/color-picker.doc.js +46 -0
- package/dist/docs/components/descriptions.doc.d.ts +14 -0
- package/dist/docs/components/descriptions.doc.js +26 -0
- package/dist/docs/components/divider.doc.d.ts +17 -0
- package/dist/docs/components/divider.doc.js +34 -0
- package/dist/docs/components/empty.doc.d.ts +18 -0
- package/dist/docs/components/empty.doc.js +40 -0
- package/dist/docs/components/float-button.doc.d.ts +14 -0
- package/dist/docs/components/float-button.doc.js +23 -0
- package/dist/docs/components/form.doc.d.ts +1 -1
- package/dist/docs/components/image.doc.d.ts +15 -0
- package/dist/docs/components/image.doc.js +38 -0
- package/dist/docs/components/list.doc.d.ts +18 -0
- package/dist/docs/components/list.doc.js +43 -0
- package/dist/docs/components/listy.doc.d.ts +18 -0
- package/dist/docs/components/listy.doc.js +40 -0
- package/dist/docs/components/masonry.doc.d.ts +14 -0
- package/dist/docs/components/masonry.doc.js +22 -0
- package/dist/docs/components/mentions.doc.d.ts +18 -0
- package/dist/docs/components/mentions.doc.js +43 -0
- package/dist/docs/components/modal.doc.js +3 -0
- package/dist/docs/components/progress.doc.d.ts +18 -0
- package/dist/docs/components/progress.doc.js +41 -0
- package/dist/docs/components/qr-code.doc.d.ts +18 -0
- package/dist/docs/components/qr-code.doc.js +41 -0
- package/dist/docs/components/rate.doc.d.ts +18 -0
- package/dist/docs/components/rate.doc.js +38 -0
- package/dist/docs/components/result.doc.d.ts +18 -0
- package/dist/docs/components/result.doc.js +42 -0
- package/dist/docs/components/segmented.doc.d.ts +14 -0
- package/dist/docs/components/segmented.doc.js +24 -0
- package/dist/docs/components/skeleton.doc.d.ts +18 -0
- package/dist/docs/components/skeleton.doc.js +42 -0
- package/dist/docs/components/slider.doc.d.ts +18 -0
- package/dist/docs/components/slider.doc.js +41 -0
- package/dist/docs/components/statistic.doc.d.ts +14 -0
- package/dist/docs/components/statistic.doc.js +27 -0
- package/dist/docs/components/time-picker.doc.d.ts +18 -0
- package/dist/docs/components/time-picker.doc.js +45 -0
- package/dist/docs/components/timeline.doc.d.ts +14 -0
- package/dist/docs/components/timeline.doc.js +29 -0
- package/dist/docs/components/tooltip.doc.d.ts +2 -2
- package/dist/docs/components/tour.doc.d.ts +15 -0
- package/dist/docs/components/tour.doc.js +36 -0
- package/dist/docs/components/transfer.doc.d.ts +18 -0
- package/dist/docs/components/transfer.doc.js +48 -0
- package/dist/docs/components/tree-select.doc.d.ts +18 -0
- package/dist/docs/components/tree-select.doc.js +55 -0
- package/dist/docs/components/tree.doc.d.ts +18 -0
- package/dist/docs/components/tree.doc.js +46 -0
- package/dist/docs/components/upload.doc.d.ts +18 -0
- package/dist/docs/components/upload.doc.js +43 -0
- package/dist/docs/components/watermark.doc.d.ts +14 -0
- package/dist/docs/components/watermark.doc.js +22 -0
- package/dist/entries/affix.d.ts +3 -0
- package/dist/entries/affix.js +4 -0
- package/dist/entries/app.d.ts +3 -0
- package/dist/entries/app.js +4 -0
- package/dist/entries/auto-complete.d.ts +4 -0
- package/dist/entries/auto-complete.js +4 -0
- package/dist/entries/avatar.d.ts +3 -0
- package/dist/entries/avatar.js +4 -0
- package/dist/entries/badge.d.ts +3 -0
- package/dist/entries/badge.js +4 -0
- package/dist/entries/border-beam.d.ts +3 -0
- package/dist/entries/border-beam.js +4 -0
- package/dist/entries/calendar.d.ts +3 -0
- package/dist/entries/calendar.js +4 -0
- package/dist/entries/card.d.ts +3 -0
- package/dist/entries/card.js +4 -0
- package/dist/entries/carousel.d.ts +3 -0
- package/dist/entries/carousel.js +4 -0
- package/dist/entries/cascader.d.ts +4 -0
- package/dist/entries/cascader.js +4 -0
- package/dist/entries/color-picker.d.ts +5 -0
- package/dist/entries/color-picker.js +4 -0
- package/dist/entries/descriptions.d.ts +3 -0
- package/dist/entries/descriptions.js +4 -0
- package/dist/entries/divider.d.ts +3 -0
- package/dist/entries/divider.js +4 -0
- package/dist/entries/empty.d.ts +3 -0
- package/dist/entries/empty.js +4 -0
- package/dist/entries/float-button.d.ts +3 -0
- package/dist/entries/float-button.js +4 -0
- package/dist/entries/image.d.ts +3 -0
- package/dist/entries/image.js +4 -0
- package/dist/entries/list.d.ts +3 -0
- package/dist/entries/list.js +4 -0
- package/dist/entries/listy.d.ts +3 -0
- package/dist/entries/listy.js +4 -0
- package/dist/entries/masonry.d.ts +3 -0
- package/dist/entries/masonry.js +4 -0
- package/dist/entries/mentions.d.ts +4 -0
- package/dist/entries/mentions.js +4 -0
- package/dist/entries/progress.d.ts +3 -0
- package/dist/entries/progress.js +4 -0
- package/dist/entries/provider.d.ts +1 -1
- package/dist/entries/provider.js +1 -1
- package/dist/entries/qr-code.d.ts +4 -0
- package/dist/entries/qr-code.js +4 -0
- package/dist/entries/rate.d.ts +3 -0
- package/dist/entries/rate.js +4 -0
- package/dist/entries/result.d.ts +3 -0
- package/dist/entries/result.js +4 -0
- package/dist/entries/segmented.d.ts +3 -0
- package/dist/entries/segmented.js +4 -0
- package/dist/entries/skeleton.d.ts +3 -0
- package/dist/entries/skeleton.js +4 -0
- package/dist/entries/slider.d.ts +3 -0
- package/dist/entries/slider.js +4 -0
- package/dist/entries/statistic.d.ts +3 -0
- package/dist/entries/statistic.js +4 -0
- package/dist/entries/time-picker.d.ts +3 -0
- package/dist/entries/time-picker.js +4 -0
- package/dist/entries/timeline.d.ts +3 -0
- package/dist/entries/timeline.js +4 -0
- package/dist/entries/tour.d.ts +3 -0
- package/dist/entries/tour.js +4 -0
- package/dist/entries/transfer.d.ts +3 -0
- package/dist/entries/transfer.js +4 -0
- package/dist/entries/tree-select.d.ts +4 -0
- package/dist/entries/tree-select.js +4 -0
- package/dist/entries/tree.d.ts +3 -0
- package/dist/entries/tree.js +4 -0
- package/dist/entries/upload.d.ts +4 -0
- package/dist/entries/upload.js +4 -0
- package/dist/entries/util.d.ts +1 -0
- package/dist/entries/util.js +1 -0
- package/dist/entries/watermark.d.ts +3 -0
- package/dist/entries/watermark.js +4 -0
- package/dist/index.d.ts +48 -3
- package/dist/index.js +38 -2
- package/dist/provider/locale.d.ts +59 -0
- package/dist/provider/locale.js +136 -0
- package/dist/provider/tao-provider.d.ts +16 -1
- package/dist/provider/tao-provider.js +104 -87
- package/dist/theme/control.css +10 -0
- package/dist/theme/theme.css +1 -1
- package/dist/utils/breakpoint.d.ts +2 -2
- package/dist/utils/breakpoint.js +3 -1
- package/dist/utils/interop-default.d.ts +2 -0
- package/dist/utils/interop-default.js +4 -0
- package/dist/utils/types.d.ts +7 -0
- package/dist/utils/types.js +0 -0
- package/llms.txt +476 -8
- package/package.json +27 -6
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react-compiler-runtime";
|
|
3
|
+
import { forwardRef, useImperativeHandle, useRef } from "react";
|
|
4
|
+
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
|
+
import { cx } from "../../utils/semantic.js";
|
|
6
|
+
import "./skeleton.css";
|
|
7
|
+
function Element(t0) {
|
|
8
|
+
const $ = c(28);
|
|
9
|
+
const { kind, prefixCls: t1, className, rootClassName, style, styles, classNames, size, shape, active, block, children } = t0;
|
|
10
|
+
const prefixCls = void 0 === t1 ? "tao-skeleton" : t1;
|
|
11
|
+
const { size: contextSize } = useTaoConfig();
|
|
12
|
+
const resolvedSize = "default" === size ? "medium" : size ?? contextSize;
|
|
13
|
+
const t2 = active || void 0;
|
|
14
|
+
const t3 = block || void 0;
|
|
15
|
+
const t4 = `${prefixCls}-element`;
|
|
16
|
+
const t5 = classNames?.root;
|
|
17
|
+
let t6;
|
|
18
|
+
if ($[0] !== className || $[1] !== prefixCls || $[2] !== rootClassName || $[3] !== t4 || $[4] !== t5) {
|
|
19
|
+
t6 = cx(prefixCls, t4, t5, className, rootClassName);
|
|
20
|
+
$[0] = className;
|
|
21
|
+
$[1] = prefixCls;
|
|
22
|
+
$[2] = rootClassName;
|
|
23
|
+
$[3] = t4;
|
|
24
|
+
$[4] = t5;
|
|
25
|
+
$[5] = t6;
|
|
26
|
+
} else t6 = $[5];
|
|
27
|
+
const t7 = styles?.root;
|
|
28
|
+
const t8 = "number" == typeof resolvedSize ? void 0 : resolvedSize;
|
|
29
|
+
const t9 = `${prefixCls}-${kind}`;
|
|
30
|
+
const t10 = classNames?.content;
|
|
31
|
+
let t11;
|
|
32
|
+
if ($[6] !== t10 || $[7] !== t9) {
|
|
33
|
+
t11 = cx(t9, t10);
|
|
34
|
+
$[6] = t10;
|
|
35
|
+
$[7] = t9;
|
|
36
|
+
$[8] = t11;
|
|
37
|
+
} else t11 = $[8];
|
|
38
|
+
let t12;
|
|
39
|
+
if ($[9] !== resolvedSize) {
|
|
40
|
+
t12 = "number" == typeof resolvedSize ? {
|
|
41
|
+
width: resolvedSize,
|
|
42
|
+
height: resolvedSize
|
|
43
|
+
} : {};
|
|
44
|
+
$[9] = resolvedSize;
|
|
45
|
+
$[10] = t12;
|
|
46
|
+
} else t12 = $[10];
|
|
47
|
+
const t13 = styles?.content;
|
|
48
|
+
let t14;
|
|
49
|
+
if ($[11] !== style || $[12] !== t12 || $[13] !== t13) {
|
|
50
|
+
t14 = {
|
|
51
|
+
...t12,
|
|
52
|
+
...t13,
|
|
53
|
+
...style
|
|
54
|
+
};
|
|
55
|
+
$[11] = style;
|
|
56
|
+
$[12] = t12;
|
|
57
|
+
$[13] = t13;
|
|
58
|
+
$[14] = t14;
|
|
59
|
+
} else t14 = $[14];
|
|
60
|
+
let t15;
|
|
61
|
+
if ($[15] !== children || $[16] !== kind || $[17] !== shape || $[18] !== t11 || $[19] !== t14 || $[20] !== t8) {
|
|
62
|
+
t15 = /*#__PURE__*/ jsx("span", {
|
|
63
|
+
"data-tao-skeleton-placeholder": "",
|
|
64
|
+
"data-tao-kind": kind,
|
|
65
|
+
"data-tao-size": t8,
|
|
66
|
+
"data-tao-shape": shape,
|
|
67
|
+
className: t11,
|
|
68
|
+
style: t14,
|
|
69
|
+
children: children
|
|
70
|
+
});
|
|
71
|
+
$[15] = children;
|
|
72
|
+
$[16] = kind;
|
|
73
|
+
$[17] = shape;
|
|
74
|
+
$[18] = t11;
|
|
75
|
+
$[19] = t14;
|
|
76
|
+
$[20] = t8;
|
|
77
|
+
$[21] = t15;
|
|
78
|
+
} else t15 = $[21];
|
|
79
|
+
let t16;
|
|
80
|
+
if ($[22] !== t15 || $[23] !== t2 || $[24] !== t3 || $[25] !== t6 || $[26] !== t7) {
|
|
81
|
+
t16 = /*#__PURE__*/ jsx("div", {
|
|
82
|
+
"data-tao-skeleton-element": "",
|
|
83
|
+
"data-tao-active": t2,
|
|
84
|
+
"data-tao-block": t3,
|
|
85
|
+
"aria-hidden": "true",
|
|
86
|
+
className: t6,
|
|
87
|
+
style: t7,
|
|
88
|
+
children: t15
|
|
89
|
+
});
|
|
90
|
+
$[22] = t15;
|
|
91
|
+
$[23] = t2;
|
|
92
|
+
$[24] = t3;
|
|
93
|
+
$[25] = t6;
|
|
94
|
+
$[26] = t7;
|
|
95
|
+
$[27] = t16;
|
|
96
|
+
} else t16 = $[27];
|
|
97
|
+
return t16;
|
|
98
|
+
}
|
|
99
|
+
function SkeletonAvatar(props) {
|
|
100
|
+
const $ = c(3);
|
|
101
|
+
const t0 = props.shape ?? "circle";
|
|
102
|
+
let t1;
|
|
103
|
+
if ($[0] !== props || $[1] !== t0) {
|
|
104
|
+
t1 = /*#__PURE__*/ jsx(Element, {
|
|
105
|
+
...props,
|
|
106
|
+
kind: "avatar",
|
|
107
|
+
shape: t0
|
|
108
|
+
});
|
|
109
|
+
$[0] = props;
|
|
110
|
+
$[1] = t0;
|
|
111
|
+
$[2] = t1;
|
|
112
|
+
} else t1 = $[2];
|
|
113
|
+
return t1;
|
|
114
|
+
}
|
|
115
|
+
function SkeletonButton(props) {
|
|
116
|
+
const $ = c(2);
|
|
117
|
+
let t0;
|
|
118
|
+
if ($[0] !== props) {
|
|
119
|
+
t0 = /*#__PURE__*/ jsx(Element, {
|
|
120
|
+
...props,
|
|
121
|
+
kind: "button"
|
|
122
|
+
});
|
|
123
|
+
$[0] = props;
|
|
124
|
+
$[1] = t0;
|
|
125
|
+
} else t0 = $[1];
|
|
126
|
+
return t0;
|
|
127
|
+
}
|
|
128
|
+
function SkeletonInput(props) {
|
|
129
|
+
const $ = c(2);
|
|
130
|
+
let t0;
|
|
131
|
+
if ($[0] !== props) {
|
|
132
|
+
t0 = /*#__PURE__*/ jsx(Element, {
|
|
133
|
+
...props,
|
|
134
|
+
kind: "input"
|
|
135
|
+
});
|
|
136
|
+
$[0] = props;
|
|
137
|
+
$[1] = t0;
|
|
138
|
+
} else t0 = $[1];
|
|
139
|
+
return t0;
|
|
140
|
+
}
|
|
141
|
+
function SkeletonNode(props) {
|
|
142
|
+
const $ = c(2);
|
|
143
|
+
let t0;
|
|
144
|
+
if ($[0] !== props) {
|
|
145
|
+
t0 = /*#__PURE__*/ jsx(Element, {
|
|
146
|
+
...props,
|
|
147
|
+
kind: "node"
|
|
148
|
+
});
|
|
149
|
+
$[0] = props;
|
|
150
|
+
$[1] = t0;
|
|
151
|
+
} else t0 = $[1];
|
|
152
|
+
return t0;
|
|
153
|
+
}
|
|
154
|
+
function SkeletonImage(props) {
|
|
155
|
+
const $ = c(3);
|
|
156
|
+
let t0;
|
|
157
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
158
|
+
t0 = /*#__PURE__*/ jsxs("svg", {
|
|
159
|
+
viewBox: "0 0 32 32",
|
|
160
|
+
width: "32",
|
|
161
|
+
height: "32",
|
|
162
|
+
fill: "none",
|
|
163
|
+
"aria-hidden": "true",
|
|
164
|
+
children: [
|
|
165
|
+
/*#__PURE__*/ jsx("rect", {
|
|
166
|
+
x: "4",
|
|
167
|
+
y: "5",
|
|
168
|
+
width: "24",
|
|
169
|
+
height: "22",
|
|
170
|
+
rx: "2",
|
|
171
|
+
stroke: "currentColor",
|
|
172
|
+
strokeWidth: "1.5"
|
|
173
|
+
}),
|
|
174
|
+
/*#__PURE__*/ jsx("circle", {
|
|
175
|
+
cx: "12",
|
|
176
|
+
cy: "12",
|
|
177
|
+
r: "2",
|
|
178
|
+
fill: "currentColor"
|
|
179
|
+
}),
|
|
180
|
+
/*#__PURE__*/ jsx("path", {
|
|
181
|
+
d: "m5 24 8-8 5 5 4-4 5 5",
|
|
182
|
+
stroke: "currentColor",
|
|
183
|
+
strokeWidth: "1.5",
|
|
184
|
+
strokeLinejoin: "round"
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
});
|
|
188
|
+
$[0] = t0;
|
|
189
|
+
} else t0 = $[0];
|
|
190
|
+
let t1;
|
|
191
|
+
if ($[1] !== props) {
|
|
192
|
+
t1 = /*#__PURE__*/ jsx(Element, {
|
|
193
|
+
...props,
|
|
194
|
+
kind: "image",
|
|
195
|
+
children: t0
|
|
196
|
+
});
|
|
197
|
+
$[1] = props;
|
|
198
|
+
$[2] = t1;
|
|
199
|
+
} else t1 = $[2];
|
|
200
|
+
return t1;
|
|
201
|
+
}
|
|
202
|
+
const SkeletonRoot = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
203
|
+
const $ = c(74);
|
|
204
|
+
const { active, avatar: t0, title: t1, paragraph: t2, round, prefixCls: t3, className, rootClassName, style, classNames, styles, children } = props;
|
|
205
|
+
const avatar = void 0 === t0 ? false : t0;
|
|
206
|
+
const title = void 0 === t1 ? true : t1;
|
|
207
|
+
const paragraph = void 0 === t2 ? true : t2;
|
|
208
|
+
const prefixCls = void 0 === t3 ? "tao-skeleton" : t3;
|
|
209
|
+
const root = useRef(null);
|
|
210
|
+
let t4;
|
|
211
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
212
|
+
t4 = ()=>({
|
|
213
|
+
nativeElement: root.current
|
|
214
|
+
});
|
|
215
|
+
$[0] = t4;
|
|
216
|
+
} else t4 = $[0];
|
|
217
|
+
useImperativeHandle(ref, t4);
|
|
218
|
+
let names;
|
|
219
|
+
let t5;
|
|
220
|
+
if ($[1] !== avatar || $[2] !== classNames || $[3] !== paragraph || $[4] !== props || $[5] !== styles || $[6] !== title) {
|
|
221
|
+
const resolvedProps = {
|
|
222
|
+
...props,
|
|
223
|
+
avatar,
|
|
224
|
+
title,
|
|
225
|
+
paragraph
|
|
226
|
+
};
|
|
227
|
+
names = "function" == typeof classNames ? classNames({
|
|
228
|
+
props: resolvedProps
|
|
229
|
+
}) : classNames;
|
|
230
|
+
t5 = "function" == typeof styles ? styles({
|
|
231
|
+
props: resolvedProps
|
|
232
|
+
}) : styles;
|
|
233
|
+
$[1] = avatar;
|
|
234
|
+
$[2] = classNames;
|
|
235
|
+
$[3] = paragraph;
|
|
236
|
+
$[4] = props;
|
|
237
|
+
$[5] = styles;
|
|
238
|
+
$[6] = title;
|
|
239
|
+
$[7] = names;
|
|
240
|
+
$[8] = t5;
|
|
241
|
+
} else {
|
|
242
|
+
names = $[7];
|
|
243
|
+
t5 = $[8];
|
|
244
|
+
}
|
|
245
|
+
const slots = t5;
|
|
246
|
+
if ("loading" in props && !props.loading) {
|
|
247
|
+
let t6;
|
|
248
|
+
if ($[9] !== children) {
|
|
249
|
+
t6 = /*#__PURE__*/ jsx(Fragment, {
|
|
250
|
+
children: children
|
|
251
|
+
});
|
|
252
|
+
$[9] = children;
|
|
253
|
+
$[10] = t6;
|
|
254
|
+
} else t6 = $[10];
|
|
255
|
+
return t6;
|
|
256
|
+
}
|
|
257
|
+
let t6;
|
|
258
|
+
if ($[11] !== avatar) {
|
|
259
|
+
t6 = "object" == typeof avatar ? avatar : {};
|
|
260
|
+
$[11] = avatar;
|
|
261
|
+
$[12] = t6;
|
|
262
|
+
} else t6 = $[12];
|
|
263
|
+
const avatarProps = t6;
|
|
264
|
+
let t7;
|
|
265
|
+
if ($[13] !== title) {
|
|
266
|
+
t7 = "object" == typeof title ? title : {};
|
|
267
|
+
$[13] = title;
|
|
268
|
+
$[14] = t7;
|
|
269
|
+
} else t7 = $[14];
|
|
270
|
+
const titleProps = t7;
|
|
271
|
+
let avatarSize;
|
|
272
|
+
let paragraphProps;
|
|
273
|
+
let paragraphWidth;
|
|
274
|
+
let rows;
|
|
275
|
+
let t8;
|
|
276
|
+
let titleWidth;
|
|
277
|
+
if ($[15] !== avatar || $[16] !== avatarProps.size || $[17] !== paragraph || $[18] !== title || $[19] !== titleProps.width) {
|
|
278
|
+
paragraphProps = "object" == typeof paragraph ? paragraph : {};
|
|
279
|
+
avatarSize = avatarProps.size ?? "large";
|
|
280
|
+
rows = paragraphProps.rows ?? (!avatar && title ? 3 : 2);
|
|
281
|
+
paragraphWidth = paragraphProps.width ?? (avatar && title ? void 0 : "61%");
|
|
282
|
+
titleWidth = titleProps.width ?? (paragraph ? avatar ? "50%" : "38%" : void 0);
|
|
283
|
+
t8 = Array.from({
|
|
284
|
+
length: rows
|
|
285
|
+
}, _temp);
|
|
286
|
+
$[15] = avatar;
|
|
287
|
+
$[16] = avatarProps.size;
|
|
288
|
+
$[17] = paragraph;
|
|
289
|
+
$[18] = title;
|
|
290
|
+
$[19] = titleProps.width;
|
|
291
|
+
$[20] = avatarSize;
|
|
292
|
+
$[21] = paragraphProps;
|
|
293
|
+
$[22] = paragraphWidth;
|
|
294
|
+
$[23] = rows;
|
|
295
|
+
$[24] = t8;
|
|
296
|
+
$[25] = titleWidth;
|
|
297
|
+
} else {
|
|
298
|
+
avatarSize = $[20];
|
|
299
|
+
paragraphProps = $[21];
|
|
300
|
+
paragraphWidth = $[22];
|
|
301
|
+
rows = $[23];
|
|
302
|
+
t8 = $[24];
|
|
303
|
+
titleWidth = $[25];
|
|
304
|
+
}
|
|
305
|
+
const rowNumbers = t8;
|
|
306
|
+
const t9 = active || void 0;
|
|
307
|
+
const t10 = round || void 0;
|
|
308
|
+
const t11 = names?.root;
|
|
309
|
+
let t12;
|
|
310
|
+
if ($[26] !== className || $[27] !== prefixCls || $[28] !== rootClassName || $[29] !== t11) {
|
|
311
|
+
t12 = cx(prefixCls, t11, className, rootClassName);
|
|
312
|
+
$[26] = className;
|
|
313
|
+
$[27] = prefixCls;
|
|
314
|
+
$[28] = rootClassName;
|
|
315
|
+
$[29] = t11;
|
|
316
|
+
$[30] = t12;
|
|
317
|
+
} else t12 = $[30];
|
|
318
|
+
const t13 = slots?.root;
|
|
319
|
+
let t14;
|
|
320
|
+
if ($[31] !== style || $[32] !== t13) {
|
|
321
|
+
t14 = {
|
|
322
|
+
...t13,
|
|
323
|
+
...style
|
|
324
|
+
};
|
|
325
|
+
$[31] = style;
|
|
326
|
+
$[32] = t13;
|
|
327
|
+
$[33] = t14;
|
|
328
|
+
} else t14 = $[33];
|
|
329
|
+
let t15;
|
|
330
|
+
if ($[34] !== avatar || $[35] !== avatarProps.className || $[36] !== avatarProps.prefixCls || $[37] !== avatarProps.rootClassName || $[38] !== avatarProps.shape || $[39] !== avatarProps.style || $[40] !== avatarSize || $[41] !== names?.avatar || $[42] !== names?.header || $[43] !== paragraph || $[44] !== prefixCls || $[45] !== slots?.avatar || $[46] !== slots?.header || $[47] !== title) {
|
|
331
|
+
t15 = avatar && /*#__PURE__*/ jsx("div", {
|
|
332
|
+
"data-tao-skeleton-header": "",
|
|
333
|
+
className: cx(`${prefixCls}-header`, names?.header),
|
|
334
|
+
style: slots?.header,
|
|
335
|
+
"aria-hidden": "true",
|
|
336
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
337
|
+
"data-tao-skeleton-placeholder": "",
|
|
338
|
+
"data-tao-kind": "avatar",
|
|
339
|
+
"data-tao-size": "number" == typeof avatarSize ? void 0 : avatarSize,
|
|
340
|
+
"data-tao-shape": avatarProps.shape ?? (title && !paragraph ? "square" : "circle"),
|
|
341
|
+
className: cx(avatarProps.prefixCls ?? `${prefixCls}-avatar`, names?.avatar, avatarProps.className, avatarProps.rootClassName),
|
|
342
|
+
style: {
|
|
343
|
+
..."number" == typeof avatarSize ? {
|
|
344
|
+
width: avatarSize,
|
|
345
|
+
height: avatarSize
|
|
346
|
+
} : {},
|
|
347
|
+
...avatarProps.style,
|
|
348
|
+
...slots?.avatar
|
|
349
|
+
}
|
|
350
|
+
})
|
|
351
|
+
});
|
|
352
|
+
$[34] = avatar;
|
|
353
|
+
$[35] = avatarProps.className;
|
|
354
|
+
$[36] = avatarProps.prefixCls;
|
|
355
|
+
$[37] = avatarProps.rootClassName;
|
|
356
|
+
$[38] = avatarProps.shape;
|
|
357
|
+
$[39] = avatarProps.style;
|
|
358
|
+
$[40] = avatarSize;
|
|
359
|
+
$[41] = names?.avatar;
|
|
360
|
+
$[42] = names?.header;
|
|
361
|
+
$[43] = paragraph;
|
|
362
|
+
$[44] = prefixCls;
|
|
363
|
+
$[45] = slots?.avatar;
|
|
364
|
+
$[46] = slots?.header;
|
|
365
|
+
$[47] = title;
|
|
366
|
+
$[48] = t15;
|
|
367
|
+
} else t15 = $[48];
|
|
368
|
+
let t16;
|
|
369
|
+
if ($[49] !== names?.paragraph || $[50] !== names?.section || $[51] !== names?.title || $[52] !== paragraph || $[53] !== paragraphProps || $[54] !== paragraphWidth || $[55] !== prefixCls || $[56] !== rowNumbers || $[57] !== rows || $[58] !== slots?.paragraph || $[59] !== slots?.section || $[60] !== slots?.title || $[61] !== title || $[62] !== titleProps.className || $[63] !== titleProps.prefixCls || $[64] !== titleProps.style || $[65] !== titleWidth) {
|
|
370
|
+
t16 = (title || paragraph) && /*#__PURE__*/ jsxs("div", {
|
|
371
|
+
"data-tao-skeleton-section": "",
|
|
372
|
+
className: cx(`${prefixCls}-section`, names?.section),
|
|
373
|
+
style: slots?.section,
|
|
374
|
+
"aria-hidden": "true",
|
|
375
|
+
children: [
|
|
376
|
+
title && /*#__PURE__*/ jsx("div", {
|
|
377
|
+
"data-tao-skeleton-placeholder": "",
|
|
378
|
+
"data-tao-kind": "title",
|
|
379
|
+
className: cx(titleProps.prefixCls ?? `${prefixCls}-title`, names?.title, titleProps.className),
|
|
380
|
+
style: {
|
|
381
|
+
width: titleWidth,
|
|
382
|
+
...titleProps.style,
|
|
383
|
+
...slots?.title
|
|
384
|
+
}
|
|
385
|
+
}),
|
|
386
|
+
paragraph && /*#__PURE__*/ jsx("ul", {
|
|
387
|
+
"data-tao-skeleton-paragraph": "",
|
|
388
|
+
className: cx(paragraphProps.prefixCls ?? `${prefixCls}-paragraph`, names?.paragraph, paragraphProps.className),
|
|
389
|
+
style: {
|
|
390
|
+
...paragraphProps.style,
|
|
391
|
+
...slots?.paragraph
|
|
392
|
+
},
|
|
393
|
+
children: rowNumbers.map((row)=>/*#__PURE__*/ jsx("li", {
|
|
394
|
+
"data-tao-skeleton-placeholder": "",
|
|
395
|
+
"data-tao-kind": "paragraph",
|
|
396
|
+
style: {
|
|
397
|
+
width: Array.isArray(paragraphWidth) ? paragraphWidth[row] : row === rows - 1 ? paragraphWidth : void 0
|
|
398
|
+
}
|
|
399
|
+
}, `row-${row}`))
|
|
400
|
+
})
|
|
401
|
+
]
|
|
402
|
+
});
|
|
403
|
+
$[49] = names?.paragraph;
|
|
404
|
+
$[50] = names?.section;
|
|
405
|
+
$[51] = names?.title;
|
|
406
|
+
$[52] = paragraph;
|
|
407
|
+
$[53] = paragraphProps;
|
|
408
|
+
$[54] = paragraphWidth;
|
|
409
|
+
$[55] = prefixCls;
|
|
410
|
+
$[56] = rowNumbers;
|
|
411
|
+
$[57] = rows;
|
|
412
|
+
$[58] = slots?.paragraph;
|
|
413
|
+
$[59] = slots?.section;
|
|
414
|
+
$[60] = slots?.title;
|
|
415
|
+
$[61] = title;
|
|
416
|
+
$[62] = titleProps.className;
|
|
417
|
+
$[63] = titleProps.prefixCls;
|
|
418
|
+
$[64] = titleProps.style;
|
|
419
|
+
$[65] = titleWidth;
|
|
420
|
+
$[66] = t16;
|
|
421
|
+
} else t16 = $[66];
|
|
422
|
+
let t17;
|
|
423
|
+
if ($[67] !== t10 || $[68] !== t12 || $[69] !== t14 || $[70] !== t15 || $[71] !== t16 || $[72] !== t9) {
|
|
424
|
+
t17 = /*#__PURE__*/ jsxs("div", {
|
|
425
|
+
ref: root,
|
|
426
|
+
"data-tao-skeleton": "",
|
|
427
|
+
"data-tao-active": t9,
|
|
428
|
+
"data-tao-round": t10,
|
|
429
|
+
"aria-busy": "true",
|
|
430
|
+
className: t12,
|
|
431
|
+
style: t14,
|
|
432
|
+
children: [
|
|
433
|
+
t15,
|
|
434
|
+
t16
|
|
435
|
+
]
|
|
436
|
+
});
|
|
437
|
+
$[67] = t10;
|
|
438
|
+
$[68] = t12;
|
|
439
|
+
$[69] = t14;
|
|
440
|
+
$[70] = t15;
|
|
441
|
+
$[71] = t16;
|
|
442
|
+
$[72] = t9;
|
|
443
|
+
$[73] = t17;
|
|
444
|
+
} else t17 = $[73];
|
|
445
|
+
return t17;
|
|
446
|
+
});
|
|
447
|
+
const skeleton_Skeleton = Object.assign(SkeletonRoot, {
|
|
448
|
+
Avatar: SkeletonAvatar,
|
|
449
|
+
Button: SkeletonButton,
|
|
450
|
+
Input: SkeletonInput,
|
|
451
|
+
Image: SkeletonImage,
|
|
452
|
+
Node: SkeletonNode
|
|
453
|
+
});
|
|
454
|
+
function _temp(_, index) {
|
|
455
|
+
return index;
|
|
456
|
+
}
|
|
457
|
+
export { skeleton_Skeleton as Skeleton };
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
[data-tao-slider] {
|
|
2
|
+
min-width: 0;
|
|
3
|
+
color: var(--tao-color-text);
|
|
4
|
+
font-family: var(--tao-font-family);
|
|
5
|
+
font-size: var(--tao-font-size-base);
|
|
6
|
+
line-height: var(--tao-line-height);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
[data-tao-slider] > div {
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
touch-action: none;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
height: 12px;
|
|
14
|
+
margin: 12px 6px;
|
|
15
|
+
padding: 4px 0;
|
|
16
|
+
position: relative;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
[data-tao-slider] .tao-slider-rail-slot {
|
|
20
|
+
background: var(--tao-slider-rail-bg, var(--tao-color-fill-tertiary));
|
|
21
|
+
border-radius: 999px;
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 4px;
|
|
24
|
+
position: absolute;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
[data-tao-slider] :is(.tao-slider-track-slot, .tao-slider-tracks-slot) {
|
|
28
|
+
background: var(--tao-slider-track-bg, var(--tao-color-primary));
|
|
29
|
+
border-radius: 999px;
|
|
30
|
+
height: 4px;
|
|
31
|
+
position: absolute;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
[data-tao-slider] .tao-slider-handle-slot {
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
border: 2px solid var(--tao-slider-handle-color, var(--tao-color-primary));
|
|
37
|
+
background: var(--tao-color-bg-container);
|
|
38
|
+
cursor: grab;
|
|
39
|
+
touch-action: none;
|
|
40
|
+
width: 12px;
|
|
41
|
+
height: 12px;
|
|
42
|
+
transition: border-color var(--tao-motion-duration-fast),
|
|
43
|
+
background-color var(--tao-motion-duration-fast);
|
|
44
|
+
z-index: 2;
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
outline: none;
|
|
47
|
+
margin-top: -4px;
|
|
48
|
+
position: absolute;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[data-tao-slider] .tao-slider-handle-slot:after {
|
|
52
|
+
content: "";
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
position: absolute;
|
|
55
|
+
inset: -10px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[data-tao-slider] .tao-slider-handle-slot:focus-visible {
|
|
59
|
+
outline: 3px solid var(--tao-primary-bg);
|
|
60
|
+
outline-offset: 2px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-tao-slider] .tao-slider-handle-slot[class*="-dragging"] {
|
|
64
|
+
cursor: grabbing;
|
|
65
|
+
border-color: var(--tao-primary-hover);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-tao-slider] .tao-slider-handle-slot[class*="-dragging-delete"] {
|
|
69
|
+
opacity: .3;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
[data-tao-slider] .tao-slider-handle-slot[aria-disabled="true"] {
|
|
73
|
+
cursor: not-allowed;
|
|
74
|
+
border-color: var(--tao-color-border);
|
|
75
|
+
background: var(--tao-color-bg-container-disabled);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[data-tao-slider] [class$="-step"] {
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
background: none;
|
|
81
|
+
width: 100%;
|
|
82
|
+
height: 4px;
|
|
83
|
+
position: absolute;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
[data-tao-slider] [class*="-dot"] {
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
border: 2px solid var(--tao-color-border);
|
|
89
|
+
background: var(--tao-color-bg-container);
|
|
90
|
+
border-radius: 50%;
|
|
91
|
+
width: 8px;
|
|
92
|
+
height: 8px;
|
|
93
|
+
position: absolute;
|
|
94
|
+
top: -2px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[data-tao-slider] [class*="-dot-active"] {
|
|
98
|
+
border-color: var(--tao-color-primary);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
[data-tao-slider] [class$="-mark"] {
|
|
102
|
+
width: 100%;
|
|
103
|
+
font-size: var(--tao-font-size-sm);
|
|
104
|
+
position: absolute;
|
|
105
|
+
top: 18px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-tao-slider] [class*="-mark-text"] {
|
|
109
|
+
color: var(--tao-color-text-secondary);
|
|
110
|
+
text-align: center;
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
white-space: nowrap;
|
|
113
|
+
display: inline-block;
|
|
114
|
+
position: absolute;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
[data-tao-slider] [class*="-mark-text-active"] {
|
|
118
|
+
color: var(--tao-color-text);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
[data-tao-slider] > [class*="-with-marks"] {
|
|
122
|
+
margin-bottom: 32px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[data-tao-slider][data-tao-vertical] {
|
|
126
|
+
height: 100%;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
[data-tao-slider][data-tao-vertical] > div {
|
|
130
|
+
width: 12px;
|
|
131
|
+
height: 100%;
|
|
132
|
+
min-height: 100px;
|
|
133
|
+
margin: 6px 12px;
|
|
134
|
+
padding: 0 4px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
[data-tao-slider][data-tao-vertical] .tao-slider-rail-slot {
|
|
138
|
+
width: 4px;
|
|
139
|
+
height: 100%;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
[data-tao-slider][data-tao-vertical] :is(.tao-slider-track-slot, .tao-slider-tracks-slot) {
|
|
143
|
+
width: 4px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
[data-tao-slider][data-tao-vertical] .tao-slider-handle-slot {
|
|
147
|
+
margin-top: 0;
|
|
148
|
+
margin-left: -4px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
[data-tao-slider][data-tao-vertical] [class$="-step"] {
|
|
152
|
+
width: 4px;
|
|
153
|
+
height: 100%;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
[data-tao-slider][data-tao-vertical] [class*="-dot"] {
|
|
157
|
+
margin-left: -2px;
|
|
158
|
+
top: auto;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
[data-tao-slider][data-tao-vertical] [class$="-mark"] {
|
|
162
|
+
width: 18px;
|
|
163
|
+
height: 100%;
|
|
164
|
+
top: 0;
|
|
165
|
+
left: 18px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
[data-tao-slider][data-tao-disabled] > div {
|
|
169
|
+
cursor: not-allowed;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
[data-tao-slider][data-tao-disabled] :is(.tao-slider-track-slot, .tao-slider-tracks-slot) {
|
|
173
|
+
background: var(--tao-color-fill-secondary);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@media (pointer: coarse) {
|
|
177
|
+
[data-tao-slider] > div {
|
|
178
|
+
margin-block: 18px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
[data-tao-slider] .tao-slider-handle-slot:after {
|
|
182
|
+
inset: -16px;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@media (prefers-reduced-motion: reduce) {
|
|
187
|
+
[data-tao-slider] .tao-slider-handle-slot {
|
|
188
|
+
transition: none;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type SliderProps as RcSliderProps, type SliderRef } from '@rc-component/slider';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
4
|
+
import type { TooltipProps } from '../tooltip/tooltip.js';
|
|
5
|
+
import '../tooltip/tooltip.css';
|
|
6
|
+
import './slider.css';
|
|
7
|
+
export type { SliderRef };
|
|
8
|
+
export type SliderSemanticPart = 'root' | 'tracks' | 'track' | 'rail' | 'handle';
|
|
9
|
+
export type SliderMarks = RcSliderProps['marks'];
|
|
10
|
+
export type Formatter = ((value?: number) => ReactNode) | null;
|
|
11
|
+
export interface SliderTooltipProps extends Omit<TooltipProps, 'children' | 'title' | 'placement'> {
|
|
12
|
+
prefixCls?: string;
|
|
13
|
+
placement?: 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight' | 'left' | 'leftTop' | 'leftBottom' | 'right' | 'rightTop' | 'rightBottom';
|
|
14
|
+
getPopupContainer?: (trigger: HTMLElement) => HTMLElement;
|
|
15
|
+
formatter?: Formatter;
|
|
16
|
+
autoAdjustOverflow?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface SliderBaseProps extends Omit<RcSliderProps, 'value' | 'defaultValue' | 'onChange' | 'onAfterChange' | 'onChangeComplete' | 'range' | 'classNames' | 'styles'> {
|
|
19
|
+
rootClassName?: string;
|
|
20
|
+
orientation?: 'horizontal' | 'vertical';
|
|
21
|
+
direction?: 'ltr' | 'rtl';
|
|
22
|
+
tooltip?: SliderTooltipProps;
|
|
23
|
+
classNames?: SemanticClassNames<SliderSemanticPart> | ((info: {
|
|
24
|
+
props: SliderProps;
|
|
25
|
+
}) => SemanticClassNames<SliderSemanticPart>);
|
|
26
|
+
styles?: SemanticStyles<SliderSemanticPart> | ((info: {
|
|
27
|
+
props: SliderProps;
|
|
28
|
+
}) => SemanticStyles<SliderSemanticPart>);
|
|
29
|
+
}
|
|
30
|
+
export interface SliderSingleProps extends SliderBaseProps {
|
|
31
|
+
range?: false;
|
|
32
|
+
value?: number;
|
|
33
|
+
defaultValue?: number;
|
|
34
|
+
onChange?: (value: number) => void;
|
|
35
|
+
onAfterChange?: (value: number) => void;
|
|
36
|
+
onChangeComplete?: (value: number) => void;
|
|
37
|
+
}
|
|
38
|
+
export interface SliderRangeProps extends SliderBaseProps {
|
|
39
|
+
range: Exclude<RcSliderProps['range'], false | undefined>;
|
|
40
|
+
value?: number[];
|
|
41
|
+
defaultValue?: number[];
|
|
42
|
+
onChange?: (value: number[]) => void;
|
|
43
|
+
onAfterChange?: (value: number[]) => void;
|
|
44
|
+
onChangeComplete?: (value: number[]) => void;
|
|
45
|
+
}
|
|
46
|
+
export type SliderProps = SliderSingleProps | SliderRangeProps;
|
|
47
|
+
export declare const Slider: import("react").ForwardRefExoticComponent<SliderProps & import("react").RefAttributes<SliderRef>>;
|