@rockshin/tao-ui 0.0.40 → 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 +70 -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,491 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react-compiler-runtime";
|
|
3
|
+
import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
|
|
4
|
+
import { cx } from "../../utils/semantic.js";
|
|
5
|
+
import { Skeleton } from "../skeleton/skeleton.js";
|
|
6
|
+
import "./statistic.css";
|
|
7
|
+
const plainNumber = new Intl.NumberFormat('en-US', {
|
|
8
|
+
useGrouping: false,
|
|
9
|
+
maximumSignificantDigits: 21
|
|
10
|
+
});
|
|
11
|
+
function formattedNumber(value, precision, group, separator) {
|
|
12
|
+
const text = 'number' == typeof value && String(value).includes('e') ? plainNumber.format(value) : String(value);
|
|
13
|
+
const match = /^(-?)(\d*)(?:\.(\d+))?$/.exec(text);
|
|
14
|
+
if (!match || '-' === text) return text;
|
|
15
|
+
const integer = (match[2] || '0').replace(/\B(?=(\d{3})+(?!\d))/g, group);
|
|
16
|
+
const fraction = void 0 === precision ? match[3] ?? '' : (match[3] ?? '').padEnd(precision, '0').slice(0, Math.max(0, precision));
|
|
17
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
18
|
+
children: [
|
|
19
|
+
/*#__PURE__*/ jsxs("span", {
|
|
20
|
+
"data-tao-statistic-integer": "",
|
|
21
|
+
children: [
|
|
22
|
+
match[1],
|
|
23
|
+
integer
|
|
24
|
+
]
|
|
25
|
+
}),
|
|
26
|
+
fraction && /*#__PURE__*/ jsxs("span", {
|
|
27
|
+
"data-tao-statistic-decimal": "",
|
|
28
|
+
children: [
|
|
29
|
+
separator,
|
|
30
|
+
fraction
|
|
31
|
+
]
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
const hasContent = (node)=>null != node && 'boolean' != typeof node;
|
|
37
|
+
const StatisticRoot = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
38
|
+
const $ = c(82);
|
|
39
|
+
let className;
|
|
40
|
+
let classNames;
|
|
41
|
+
let formatter;
|
|
42
|
+
let precision;
|
|
43
|
+
let prefix;
|
|
44
|
+
let prefixCls;
|
|
45
|
+
let rest;
|
|
46
|
+
let rootClassName;
|
|
47
|
+
let style;
|
|
48
|
+
let styles;
|
|
49
|
+
let suffix;
|
|
50
|
+
let t0;
|
|
51
|
+
let t1;
|
|
52
|
+
let t2;
|
|
53
|
+
let t3;
|
|
54
|
+
let title;
|
|
55
|
+
let valueRender;
|
|
56
|
+
let valueStyle;
|
|
57
|
+
if ($[0] !== props) {
|
|
58
|
+
({ prefixCls, rootClassName, value: t0, valueStyle, valueRender, title, prefix, suffix, loading: t1, formatter, decimalSeparator: t2, groupSeparator: t3, precision, classNames, styles, className, style, ...rest } = props);
|
|
59
|
+
$[0] = props;
|
|
60
|
+
$[1] = className;
|
|
61
|
+
$[2] = classNames;
|
|
62
|
+
$[3] = formatter;
|
|
63
|
+
$[4] = precision;
|
|
64
|
+
$[5] = prefix;
|
|
65
|
+
$[6] = prefixCls;
|
|
66
|
+
$[7] = rest;
|
|
67
|
+
$[8] = rootClassName;
|
|
68
|
+
$[9] = style;
|
|
69
|
+
$[10] = styles;
|
|
70
|
+
$[11] = suffix;
|
|
71
|
+
$[12] = t0;
|
|
72
|
+
$[13] = t1;
|
|
73
|
+
$[14] = t2;
|
|
74
|
+
$[15] = t3;
|
|
75
|
+
$[16] = title;
|
|
76
|
+
$[17] = valueRender;
|
|
77
|
+
$[18] = valueStyle;
|
|
78
|
+
} else {
|
|
79
|
+
className = $[1];
|
|
80
|
+
classNames = $[2];
|
|
81
|
+
formatter = $[3];
|
|
82
|
+
precision = $[4];
|
|
83
|
+
prefix = $[5];
|
|
84
|
+
prefixCls = $[6];
|
|
85
|
+
rest = $[7];
|
|
86
|
+
rootClassName = $[8];
|
|
87
|
+
style = $[9];
|
|
88
|
+
styles = $[10];
|
|
89
|
+
suffix = $[11];
|
|
90
|
+
t0 = $[12];
|
|
91
|
+
t1 = $[13];
|
|
92
|
+
t2 = $[14];
|
|
93
|
+
t3 = $[15];
|
|
94
|
+
title = $[16];
|
|
95
|
+
valueRender = $[17];
|
|
96
|
+
valueStyle = $[18];
|
|
97
|
+
}
|
|
98
|
+
const value = void 0 === t0 ? 0 : t0;
|
|
99
|
+
const loading = void 0 === t1 ? false : t1;
|
|
100
|
+
const decimalSeparator = void 0 === t2 ? "." : t2;
|
|
101
|
+
const groupSeparator = void 0 === t3 ? "," : t3;
|
|
102
|
+
let classes;
|
|
103
|
+
let t4;
|
|
104
|
+
if ($[19] !== classNames || $[20] !== decimalSeparator || $[21] !== groupSeparator || $[22] !== loading || $[23] !== props || $[24] !== styles || $[25] !== value) {
|
|
105
|
+
const merged = {
|
|
106
|
+
...props,
|
|
107
|
+
value,
|
|
108
|
+
loading,
|
|
109
|
+
decimalSeparator,
|
|
110
|
+
groupSeparator
|
|
111
|
+
};
|
|
112
|
+
classes = "function" == typeof classNames ? classNames({
|
|
113
|
+
props: merged
|
|
114
|
+
}) : classNames;
|
|
115
|
+
t4 = "function" == typeof styles ? styles({
|
|
116
|
+
props: merged
|
|
117
|
+
}) : styles;
|
|
118
|
+
$[19] = classNames;
|
|
119
|
+
$[20] = decimalSeparator;
|
|
120
|
+
$[21] = groupSeparator;
|
|
121
|
+
$[22] = loading;
|
|
122
|
+
$[23] = props;
|
|
123
|
+
$[24] = styles;
|
|
124
|
+
$[25] = value;
|
|
125
|
+
$[26] = classes;
|
|
126
|
+
$[27] = t4;
|
|
127
|
+
} else {
|
|
128
|
+
classes = $[26];
|
|
129
|
+
t4 = $[27];
|
|
130
|
+
}
|
|
131
|
+
const slots = t4;
|
|
132
|
+
const node = useRef(null);
|
|
133
|
+
let t5;
|
|
134
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
135
|
+
t5 = ()=>({
|
|
136
|
+
nativeElement: node.current
|
|
137
|
+
});
|
|
138
|
+
$[28] = t5;
|
|
139
|
+
} else t5 = $[28];
|
|
140
|
+
useImperativeHandle(ref, t5);
|
|
141
|
+
const t6 = classes?.value;
|
|
142
|
+
const t7 = slots?.value;
|
|
143
|
+
let t8;
|
|
144
|
+
if ($[29] !== decimalSeparator || $[30] !== formatter || $[31] !== groupSeparator || $[32] !== precision || $[33] !== value) {
|
|
145
|
+
t8 = "function" == typeof formatter ? formatter(value) : formattedNumber(value, precision, groupSeparator, decimalSeparator);
|
|
146
|
+
$[29] = decimalSeparator;
|
|
147
|
+
$[30] = formatter;
|
|
148
|
+
$[31] = groupSeparator;
|
|
149
|
+
$[32] = precision;
|
|
150
|
+
$[33] = value;
|
|
151
|
+
$[34] = t8;
|
|
152
|
+
} else t8 = $[34];
|
|
153
|
+
let t9;
|
|
154
|
+
if ($[35] !== t6 || $[36] !== t7 || $[37] !== t8) {
|
|
155
|
+
t9 = /*#__PURE__*/ jsx("span", {
|
|
156
|
+
"data-tao-statistic-value": "",
|
|
157
|
+
className: t6,
|
|
158
|
+
style: t7,
|
|
159
|
+
children: t8
|
|
160
|
+
});
|
|
161
|
+
$[35] = t6;
|
|
162
|
+
$[36] = t7;
|
|
163
|
+
$[37] = t8;
|
|
164
|
+
$[38] = t9;
|
|
165
|
+
} else t9 = $[38];
|
|
166
|
+
const formatted = t9;
|
|
167
|
+
const t10 = classes?.root;
|
|
168
|
+
let t11;
|
|
169
|
+
if ($[39] !== className || $[40] !== prefixCls || $[41] !== rootClassName || $[42] !== t10) {
|
|
170
|
+
t11 = cx(prefixCls, t10, className, rootClassName);
|
|
171
|
+
$[39] = className;
|
|
172
|
+
$[40] = prefixCls;
|
|
173
|
+
$[41] = rootClassName;
|
|
174
|
+
$[42] = t10;
|
|
175
|
+
$[43] = t11;
|
|
176
|
+
} else t11 = $[43];
|
|
177
|
+
const t12 = slots?.root;
|
|
178
|
+
let t13;
|
|
179
|
+
if ($[44] !== style || $[45] !== t12) {
|
|
180
|
+
t13 = {
|
|
181
|
+
...t12,
|
|
182
|
+
...style
|
|
183
|
+
};
|
|
184
|
+
$[44] = style;
|
|
185
|
+
$[45] = t12;
|
|
186
|
+
$[46] = t13;
|
|
187
|
+
} else t13 = $[46];
|
|
188
|
+
let t14;
|
|
189
|
+
if ($[47] !== classes?.header || $[48] !== classes?.title || $[49] !== slots?.header || $[50] !== slots?.title || $[51] !== title) {
|
|
190
|
+
t14 = hasContent(title) && /*#__PURE__*/ jsx("div", {
|
|
191
|
+
"data-tao-statistic-header": "",
|
|
192
|
+
className: classes?.header,
|
|
193
|
+
style: slots?.header,
|
|
194
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
195
|
+
"data-tao-statistic-title": "",
|
|
196
|
+
className: classes?.title,
|
|
197
|
+
style: slots?.title,
|
|
198
|
+
children: title
|
|
199
|
+
})
|
|
200
|
+
});
|
|
201
|
+
$[47] = classes?.header;
|
|
202
|
+
$[48] = classes?.title;
|
|
203
|
+
$[49] = slots?.header;
|
|
204
|
+
$[50] = slots?.title;
|
|
205
|
+
$[51] = title;
|
|
206
|
+
$[52] = t14;
|
|
207
|
+
} else t14 = $[52];
|
|
208
|
+
const t15 = classes?.content;
|
|
209
|
+
const t16 = slots?.content;
|
|
210
|
+
let t17;
|
|
211
|
+
if ($[53] !== t16 || $[54] !== valueStyle) {
|
|
212
|
+
t17 = {
|
|
213
|
+
...valueStyle,
|
|
214
|
+
...t16
|
|
215
|
+
};
|
|
216
|
+
$[53] = t16;
|
|
217
|
+
$[54] = valueStyle;
|
|
218
|
+
$[55] = t17;
|
|
219
|
+
} else t17 = $[55];
|
|
220
|
+
let t18;
|
|
221
|
+
if ($[56] !== classes?.prefix || $[57] !== prefix || $[58] !== slots?.prefix) {
|
|
222
|
+
t18 = hasContent(prefix) && /*#__PURE__*/ jsx("span", {
|
|
223
|
+
"data-tao-statistic-prefix": "",
|
|
224
|
+
className: classes?.prefix,
|
|
225
|
+
style: slots?.prefix,
|
|
226
|
+
children: prefix
|
|
227
|
+
});
|
|
228
|
+
$[56] = classes?.prefix;
|
|
229
|
+
$[57] = prefix;
|
|
230
|
+
$[58] = slots?.prefix;
|
|
231
|
+
$[59] = t18;
|
|
232
|
+
} else t18 = $[59];
|
|
233
|
+
let t19;
|
|
234
|
+
if ($[60] !== formatted || $[61] !== valueRender) {
|
|
235
|
+
t19 = valueRender ? valueRender(formatted) : formatted;
|
|
236
|
+
$[60] = formatted;
|
|
237
|
+
$[61] = valueRender;
|
|
238
|
+
$[62] = t19;
|
|
239
|
+
} else t19 = $[62];
|
|
240
|
+
let t20;
|
|
241
|
+
if ($[63] !== classes?.suffix || $[64] !== slots?.suffix || $[65] !== suffix) {
|
|
242
|
+
t20 = hasContent(suffix) && /*#__PURE__*/ jsx("span", {
|
|
243
|
+
"data-tao-statistic-suffix": "",
|
|
244
|
+
className: classes?.suffix,
|
|
245
|
+
style: slots?.suffix,
|
|
246
|
+
children: suffix
|
|
247
|
+
});
|
|
248
|
+
$[63] = classes?.suffix;
|
|
249
|
+
$[64] = slots?.suffix;
|
|
250
|
+
$[65] = suffix;
|
|
251
|
+
$[66] = t20;
|
|
252
|
+
} else t20 = $[66];
|
|
253
|
+
let t21;
|
|
254
|
+
if ($[67] !== t15 || $[68] !== t17 || $[69] !== t18 || $[70] !== t19 || $[71] !== t20) {
|
|
255
|
+
t21 = /*#__PURE__*/ jsxs("div", {
|
|
256
|
+
"data-tao-statistic-content": "",
|
|
257
|
+
className: t15,
|
|
258
|
+
style: t17,
|
|
259
|
+
children: [
|
|
260
|
+
t18,
|
|
261
|
+
t19,
|
|
262
|
+
t20
|
|
263
|
+
]
|
|
264
|
+
});
|
|
265
|
+
$[67] = t15;
|
|
266
|
+
$[68] = t17;
|
|
267
|
+
$[69] = t18;
|
|
268
|
+
$[70] = t19;
|
|
269
|
+
$[71] = t20;
|
|
270
|
+
$[72] = t21;
|
|
271
|
+
} else t21 = $[72];
|
|
272
|
+
let t22;
|
|
273
|
+
if ($[73] !== loading || $[74] !== t21) {
|
|
274
|
+
t22 = /*#__PURE__*/ jsx(Skeleton, {
|
|
275
|
+
loading: loading,
|
|
276
|
+
paragraph: false,
|
|
277
|
+
active: true,
|
|
278
|
+
children: t21
|
|
279
|
+
});
|
|
280
|
+
$[73] = loading;
|
|
281
|
+
$[74] = t21;
|
|
282
|
+
$[75] = t22;
|
|
283
|
+
} else t22 = $[75];
|
|
284
|
+
let t23;
|
|
285
|
+
if ($[76] !== rest || $[77] !== t11 || $[78] !== t13 || $[79] !== t14 || $[80] !== t22) {
|
|
286
|
+
t23 = /*#__PURE__*/ jsxs("div", {
|
|
287
|
+
...rest,
|
|
288
|
+
ref: node,
|
|
289
|
+
"data-tao-statistic": "",
|
|
290
|
+
className: t11,
|
|
291
|
+
style: t13,
|
|
292
|
+
children: [
|
|
293
|
+
t14,
|
|
294
|
+
t22
|
|
295
|
+
]
|
|
296
|
+
});
|
|
297
|
+
$[76] = rest;
|
|
298
|
+
$[77] = t11;
|
|
299
|
+
$[78] = t13;
|
|
300
|
+
$[79] = t14;
|
|
301
|
+
$[80] = t22;
|
|
302
|
+
$[81] = t23;
|
|
303
|
+
} else t23 = $[81];
|
|
304
|
+
return t23;
|
|
305
|
+
});
|
|
306
|
+
StatisticRoot.displayName = 'Statistic';
|
|
307
|
+
const units = [
|
|
308
|
+
[
|
|
309
|
+
'Y',
|
|
310
|
+
31536000000
|
|
311
|
+
],
|
|
312
|
+
[
|
|
313
|
+
'M',
|
|
314
|
+
2592000000
|
|
315
|
+
],
|
|
316
|
+
[
|
|
317
|
+
'D',
|
|
318
|
+
86400000
|
|
319
|
+
],
|
|
320
|
+
[
|
|
321
|
+
'H',
|
|
322
|
+
3600000
|
|
323
|
+
],
|
|
324
|
+
[
|
|
325
|
+
'm',
|
|
326
|
+
60000
|
|
327
|
+
],
|
|
328
|
+
[
|
|
329
|
+
's',
|
|
330
|
+
1000
|
|
331
|
+
],
|
|
332
|
+
[
|
|
333
|
+
'S',
|
|
334
|
+
1
|
|
335
|
+
]
|
|
336
|
+
];
|
|
337
|
+
function formatDuration(duration, format) {
|
|
338
|
+
const literals = [];
|
|
339
|
+
let output = format.replace(/\[([^\]]*)\]/g, (_, literal)=>{
|
|
340
|
+
literals.push(literal);
|
|
341
|
+
return '\0';
|
|
342
|
+
});
|
|
343
|
+
let remaining = Math.max(0, duration);
|
|
344
|
+
for (const [unit, milliseconds] of units){
|
|
345
|
+
if (!output.includes(unit)) continue;
|
|
346
|
+
const value = Math.floor(remaining / milliseconds);
|
|
347
|
+
remaining %= milliseconds;
|
|
348
|
+
output = output.replace(new RegExp(`${unit}+`, 'g'), (token)=>String(value).padStart(token.length, '0'));
|
|
349
|
+
}
|
|
350
|
+
let index = 0;
|
|
351
|
+
return output.replace(/\0/g, ()=>literals[index++]);
|
|
352
|
+
}
|
|
353
|
+
function StatisticTimer(t0) {
|
|
354
|
+
const $ = c(29);
|
|
355
|
+
let onChange;
|
|
356
|
+
let onFinish;
|
|
357
|
+
let rest;
|
|
358
|
+
let t1;
|
|
359
|
+
let type;
|
|
360
|
+
let value;
|
|
361
|
+
if ($[0] !== t0) {
|
|
362
|
+
({ value, format: t1, onChange, onFinish, type, ...rest } = t0);
|
|
363
|
+
$[0] = t0;
|
|
364
|
+
$[1] = onChange;
|
|
365
|
+
$[2] = onFinish;
|
|
366
|
+
$[3] = rest;
|
|
367
|
+
$[4] = t1;
|
|
368
|
+
$[5] = type;
|
|
369
|
+
$[6] = value;
|
|
370
|
+
} else {
|
|
371
|
+
onChange = $[1];
|
|
372
|
+
onFinish = $[2];
|
|
373
|
+
rest = $[3];
|
|
374
|
+
t1 = $[4];
|
|
375
|
+
type = $[5];
|
|
376
|
+
value = $[6];
|
|
377
|
+
}
|
|
378
|
+
const format = void 0 === t1 ? "HH:mm:ss" : t1;
|
|
379
|
+
const [now, setNow] = useState();
|
|
380
|
+
let t2;
|
|
381
|
+
if ($[7] !== onChange || $[8] !== onFinish) {
|
|
382
|
+
t2 = {
|
|
383
|
+
onChange,
|
|
384
|
+
onFinish
|
|
385
|
+
};
|
|
386
|
+
$[7] = onChange;
|
|
387
|
+
$[8] = onFinish;
|
|
388
|
+
$[9] = t2;
|
|
389
|
+
} else t2 = $[9];
|
|
390
|
+
const callbacks = useRef(t2);
|
|
391
|
+
let t3;
|
|
392
|
+
let t4;
|
|
393
|
+
if ($[10] !== onChange || $[11] !== onFinish) {
|
|
394
|
+
t3 = ()=>{
|
|
395
|
+
callbacks.current = {
|
|
396
|
+
onChange,
|
|
397
|
+
onFinish
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
t4 = [
|
|
401
|
+
onChange,
|
|
402
|
+
onFinish
|
|
403
|
+
];
|
|
404
|
+
$[10] = onChange;
|
|
405
|
+
$[11] = onFinish;
|
|
406
|
+
$[12] = t3;
|
|
407
|
+
$[13] = t4;
|
|
408
|
+
} else {
|
|
409
|
+
t3 = $[12];
|
|
410
|
+
t4 = $[13];
|
|
411
|
+
}
|
|
412
|
+
useLayoutEffect(t3, t4);
|
|
413
|
+
let t5;
|
|
414
|
+
if ($[14] !== value) {
|
|
415
|
+
t5 = new Date(value).getTime();
|
|
416
|
+
$[14] = value;
|
|
417
|
+
$[15] = t5;
|
|
418
|
+
} else t5 = $[15];
|
|
419
|
+
const target = t5;
|
|
420
|
+
let t6;
|
|
421
|
+
let t7;
|
|
422
|
+
if ($[16] !== target || $[17] !== type) {
|
|
423
|
+
t6 = ()=>{
|
|
424
|
+
setNow(Date.now());
|
|
425
|
+
const timer = setInterval(()=>{
|
|
426
|
+
const current = Date.now();
|
|
427
|
+
const difference = "countdown" === type ? target - current : current - target;
|
|
428
|
+
setNow(current);
|
|
429
|
+
callbacks.current.onChange?.(difference);
|
|
430
|
+
if ("countdown" === type && current > target) {
|
|
431
|
+
clearInterval(timer);
|
|
432
|
+
callbacks.current.onFinish?.();
|
|
433
|
+
}
|
|
434
|
+
}, 16.666666666666668);
|
|
435
|
+
return ()=>clearInterval(timer);
|
|
436
|
+
};
|
|
437
|
+
t7 = [
|
|
438
|
+
target,
|
|
439
|
+
type
|
|
440
|
+
];
|
|
441
|
+
$[16] = target;
|
|
442
|
+
$[17] = type;
|
|
443
|
+
$[18] = t6;
|
|
444
|
+
$[19] = t7;
|
|
445
|
+
} else {
|
|
446
|
+
t6 = $[18];
|
|
447
|
+
t7 = $[19];
|
|
448
|
+
}
|
|
449
|
+
useEffect(t6, t7);
|
|
450
|
+
let t8;
|
|
451
|
+
if ($[20] !== format || $[21] !== now || $[22] !== target || $[23] !== type) {
|
|
452
|
+
t8 = ()=>void 0 === now ? "-" : formatDuration("countdown" === type ? target - now : now - target, format);
|
|
453
|
+
$[20] = format;
|
|
454
|
+
$[21] = now;
|
|
455
|
+
$[22] = target;
|
|
456
|
+
$[23] = type;
|
|
457
|
+
$[24] = t8;
|
|
458
|
+
} else t8 = $[24];
|
|
459
|
+
let t9;
|
|
460
|
+
if ($[25] !== rest || $[26] !== t8 || $[27] !== value) {
|
|
461
|
+
t9 = /*#__PURE__*/ jsx(StatisticRoot, {
|
|
462
|
+
...rest,
|
|
463
|
+
value: value,
|
|
464
|
+
valueRender: void 0,
|
|
465
|
+
formatter: t8
|
|
466
|
+
});
|
|
467
|
+
$[25] = rest;
|
|
468
|
+
$[26] = t8;
|
|
469
|
+
$[27] = value;
|
|
470
|
+
$[28] = t9;
|
|
471
|
+
} else t9 = $[28];
|
|
472
|
+
return t9;
|
|
473
|
+
}
|
|
474
|
+
function Countdown(props) {
|
|
475
|
+
const $ = c(2);
|
|
476
|
+
let t0;
|
|
477
|
+
if ($[0] !== props) {
|
|
478
|
+
t0 = /*#__PURE__*/ jsx(StatisticTimer, {
|
|
479
|
+
...props,
|
|
480
|
+
type: "countdown"
|
|
481
|
+
});
|
|
482
|
+
$[0] = props;
|
|
483
|
+
$[1] = t0;
|
|
484
|
+
} else t0 = $[1];
|
|
485
|
+
return t0;
|
|
486
|
+
}
|
|
487
|
+
const Statistic = Object.assign(StatisticRoot, {
|
|
488
|
+
Timer: StatisticTimer,
|
|
489
|
+
Countdown: Countdown
|
|
490
|
+
});
|
|
491
|
+
export { Statistic };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@media (pointer: coarse) {
|
|
2
|
+
button[data-tao-switch][data-tao-size] {
|
|
3
|
+
margin-block: 11px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
button[data-tao-switch][data-tao-size="small"] {
|
|
7
|
+
margin: 14px 8px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
button[data-tao-switch]:after {
|
|
11
|
+
content: "";
|
|
12
|
+
width: max(100%, 44px);
|
|
13
|
+
height: 44px;
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 50%;
|
|
16
|
+
left: 50%;
|
|
17
|
+
transform: translate(-50%, -50%);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import "./switch-touch.css";
|
|
2
|
+
|
|
1
3
|
button[data-tao-switch] {
|
|
2
4
|
box-sizing: border-box;
|
|
3
5
|
vertical-align: middle;
|
|
@@ -52,13 +54,20 @@ button[data-tao-switch][disabled] {
|
|
|
52
54
|
opacity: var(--tao-opacity-loading);
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
[data-tao-switch-handle] {
|
|
57
|
+
[data-tao-switch-handle-track] {
|
|
56
58
|
top: 2px;
|
|
59
|
+
bottom: 2px;
|
|
57
60
|
transition: transform var(--tao-motion-duration-mid) ease-in-out;
|
|
58
61
|
position: absolute;
|
|
59
62
|
inset-inline-start: 2px;
|
|
60
63
|
}
|
|
61
64
|
|
|
65
|
+
[data-tao-switch-handle] {
|
|
66
|
+
top: 0;
|
|
67
|
+
position: absolute;
|
|
68
|
+
inset-inline-start: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
62
71
|
[data-tao-switch-handle]:before {
|
|
63
72
|
content: "";
|
|
64
73
|
top: 0;
|
|
@@ -77,8 +86,8 @@ button[data-tao-switch][data-tao-size="medium"] [data-tao-switch-handle] {
|
|
|
77
86
|
height: 18px;
|
|
78
87
|
}
|
|
79
88
|
|
|
80
|
-
button[data-tao-switch][data-tao-size="medium"]
|
|
81
|
-
|
|
89
|
+
button[data-tao-switch][data-tao-size="medium"] [data-tao-switch-handle-track] {
|
|
90
|
+
inset-inline-end: 20px;
|
|
82
91
|
}
|
|
83
92
|
|
|
84
93
|
button[data-tao-switch][data-tao-size="small"] [data-tao-switch-handle] {
|
|
@@ -86,16 +95,16 @@ button[data-tao-switch][data-tao-size="small"] [data-tao-switch-handle] {
|
|
|
86
95
|
height: 12px;
|
|
87
96
|
}
|
|
88
97
|
|
|
89
|
-
button[data-tao-switch][data-tao-size="small"]
|
|
90
|
-
|
|
98
|
+
button[data-tao-switch][data-tao-size="small"] [data-tao-switch-handle-track] {
|
|
99
|
+
inset-inline-end: 14px;
|
|
91
100
|
}
|
|
92
101
|
|
|
93
|
-
|
|
94
|
-
transform: translateX(
|
|
102
|
+
button[data-tao-switch][data-tao-checked] [data-tao-switch-handle-track] {
|
|
103
|
+
transform: translateX(100%);
|
|
95
104
|
}
|
|
96
105
|
|
|
97
|
-
|
|
98
|
-
transform: translateX(-
|
|
106
|
+
button[data-tao-switch][data-tao-checked]:dir(rtl) [data-tao-switch-handle-track] {
|
|
107
|
+
transform: translateX(-100%);
|
|
99
108
|
}
|
|
100
109
|
|
|
101
110
|
button[data-tao-switch]:not([disabled]):active [data-tao-switch-handle]:before {
|
|
@@ -107,12 +116,12 @@ button[data-tao-switch][data-tao-checked]:not([disabled]):active [data-tao-switc
|
|
|
107
116
|
}
|
|
108
117
|
|
|
109
118
|
[data-tao-switch-handle] [data-tao-switch-loading] {
|
|
110
|
-
|
|
111
|
-
animation: tao-spin calc(var(--tao-motion-unit) * 8) linear infinite;
|
|
119
|
+
animation: tao-switch-spin calc(var(--tao-motion-unit) * 8) linear infinite;
|
|
112
120
|
color: var(--tao-color-text-secondary);
|
|
113
121
|
z-index: 1;
|
|
114
122
|
position: absolute;
|
|
115
|
-
|
|
123
|
+
top: 50%;
|
|
124
|
+
left: 50%;
|
|
116
125
|
transform: translate(-50%, -50%);
|
|
117
126
|
}
|
|
118
127
|
|
|
@@ -130,7 +139,7 @@ button[data-tao-switch][data-tao-checked] [data-tao-switch-loading] {
|
|
|
130
139
|
color: var(--tao-primary);
|
|
131
140
|
}
|
|
132
141
|
|
|
133
|
-
@keyframes tao-spin {
|
|
142
|
+
@keyframes tao-switch-spin {
|
|
134
143
|
from {
|
|
135
144
|
transform: translate(-50%, -50%) rotate(0);
|
|
136
145
|
}
|
|
@@ -152,9 +161,11 @@ button[data-tao-switch][data-tao-checked] [data-tao-switch-loading] {
|
|
|
152
161
|
|
|
153
162
|
[data-tao-switch-inner-checked], [data-tao-switch-inner-unchecked] {
|
|
154
163
|
color: #fff;
|
|
164
|
+
white-space: nowrap;
|
|
155
165
|
pointer-events: none;
|
|
156
166
|
transition: margin-inline-start var(--tao-motion-duration-mid) ease-in-out,
|
|
157
167
|
margin-inline-end var(--tao-motion-duration-mid) ease-in-out;
|
|
168
|
+
justify-content: center;
|
|
158
169
|
display: block;
|
|
159
170
|
}
|
|
160
171
|
|
|
@@ -101,11 +101,14 @@ const switch_Switch = /*#__PURE__*/ forwardRef(function(t0, ref) {
|
|
|
101
101
|
} else t11 = $[25];
|
|
102
102
|
let t12;
|
|
103
103
|
if ($[26] !== t10 || $[27] !== t11 || $[28] !== t9) {
|
|
104
|
-
t12 = /*#__PURE__*/ jsx("
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
t12 = /*#__PURE__*/ jsx("span", {
|
|
105
|
+
"data-tao-switch-handle-track": "",
|
|
106
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
107
|
+
className: t9,
|
|
108
|
+
style: t10,
|
|
109
|
+
"data-tao-switch-handle": "",
|
|
110
|
+
children: t11
|
|
111
|
+
})
|
|
109
112
|
});
|
|
110
113
|
$[26] = t10;
|
|
111
114
|
$[27] = t11;
|