@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,286 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react-compiler-runtime";
|
|
3
|
+
import { QRCodeCanvas, QRCodeSVG } from "@rc-component/qrcode";
|
|
4
|
+
import { forwardRef, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
|
|
5
|
+
import { enUS } from "../../provider/locale.js";
|
|
6
|
+
import { useTaoInternalConfig } from "../../provider/tao-provider.js";
|
|
7
|
+
import { cx } from "../../utils/semantic.js";
|
|
8
|
+
import { Button } from "../button/button.js";
|
|
9
|
+
import { Spinner } from "../spinner/spinner.js";
|
|
10
|
+
import "./qr-code.css";
|
|
11
|
+
const qr_code_QRCode = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
12
|
+
const $ = c(78);
|
|
13
|
+
let boostLevel;
|
|
14
|
+
let className;
|
|
15
|
+
let classNames;
|
|
16
|
+
let color;
|
|
17
|
+
let icon;
|
|
18
|
+
let marginSize;
|
|
19
|
+
let onRefresh;
|
|
20
|
+
let prefixCls;
|
|
21
|
+
let rest;
|
|
22
|
+
let rootClassName;
|
|
23
|
+
let statusRender;
|
|
24
|
+
let style;
|
|
25
|
+
let styles;
|
|
26
|
+
let t0;
|
|
27
|
+
let t1;
|
|
28
|
+
let t2;
|
|
29
|
+
let t3;
|
|
30
|
+
let t4;
|
|
31
|
+
let t5;
|
|
32
|
+
let t6;
|
|
33
|
+
let title;
|
|
34
|
+
let value;
|
|
35
|
+
if ($[0] !== props) {
|
|
36
|
+
({ value, type: t0, size: t1, icon, iconSize: t2, bordered: t3, errorLevel: t4, status: t5, onRefresh, statusRender, color, bgColor: t6, marginSize, boostLevel, title, className, rootClassName, prefixCls, classNames, styles, style, ...rest } = props);
|
|
37
|
+
$[0] = props;
|
|
38
|
+
$[1] = boostLevel;
|
|
39
|
+
$[2] = className;
|
|
40
|
+
$[3] = classNames;
|
|
41
|
+
$[4] = color;
|
|
42
|
+
$[5] = icon;
|
|
43
|
+
$[6] = marginSize;
|
|
44
|
+
$[7] = onRefresh;
|
|
45
|
+
$[8] = prefixCls;
|
|
46
|
+
$[9] = rest;
|
|
47
|
+
$[10] = rootClassName;
|
|
48
|
+
$[11] = statusRender;
|
|
49
|
+
$[12] = style;
|
|
50
|
+
$[13] = styles;
|
|
51
|
+
$[14] = t0;
|
|
52
|
+
$[15] = t1;
|
|
53
|
+
$[16] = t2;
|
|
54
|
+
$[17] = t3;
|
|
55
|
+
$[18] = t4;
|
|
56
|
+
$[19] = t5;
|
|
57
|
+
$[20] = t6;
|
|
58
|
+
$[21] = title;
|
|
59
|
+
$[22] = value;
|
|
60
|
+
} else {
|
|
61
|
+
boostLevel = $[1];
|
|
62
|
+
className = $[2];
|
|
63
|
+
classNames = $[3];
|
|
64
|
+
color = $[4];
|
|
65
|
+
icon = $[5];
|
|
66
|
+
marginSize = $[6];
|
|
67
|
+
onRefresh = $[7];
|
|
68
|
+
prefixCls = $[8];
|
|
69
|
+
rest = $[9];
|
|
70
|
+
rootClassName = $[10];
|
|
71
|
+
statusRender = $[11];
|
|
72
|
+
style = $[12];
|
|
73
|
+
styles = $[13];
|
|
74
|
+
t0 = $[14];
|
|
75
|
+
t1 = $[15];
|
|
76
|
+
t2 = $[16];
|
|
77
|
+
t3 = $[17];
|
|
78
|
+
t4 = $[18];
|
|
79
|
+
t5 = $[19];
|
|
80
|
+
t6 = $[20];
|
|
81
|
+
title = $[21];
|
|
82
|
+
value = $[22];
|
|
83
|
+
}
|
|
84
|
+
const type = void 0 === t0 ? "canvas" : t0;
|
|
85
|
+
const size = void 0 === t1 ? 160 : t1;
|
|
86
|
+
const iconSize = void 0 === t2 ? 40 : t2;
|
|
87
|
+
const bordered = void 0 === t3 ? true : t3;
|
|
88
|
+
const errorLevel = void 0 === t4 ? "M" : t4;
|
|
89
|
+
const status = void 0 === t5 ? "active" : t5;
|
|
90
|
+
const bgColor = void 0 === t6 ? "transparent" : t6;
|
|
91
|
+
const config = useTaoInternalConfig();
|
|
92
|
+
const root = useRef(null);
|
|
93
|
+
const [themeColor, setThemeColor] = useState("#000000");
|
|
94
|
+
let t7;
|
|
95
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
96
|
+
t7 = ()=>({
|
|
97
|
+
nativeElement: root.current
|
|
98
|
+
});
|
|
99
|
+
$[23] = t7;
|
|
100
|
+
} else t7 = $[23];
|
|
101
|
+
useImperativeHandle(ref, t7);
|
|
102
|
+
let t8;
|
|
103
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
104
|
+
t8 = ()=>{
|
|
105
|
+
if (root.current) setThemeColor(getComputedStyle(root.current).color);
|
|
106
|
+
};
|
|
107
|
+
$[24] = t8;
|
|
108
|
+
} else t8 = $[24];
|
|
109
|
+
useLayoutEffect(t8);
|
|
110
|
+
let names;
|
|
111
|
+
let t9;
|
|
112
|
+
if ($[25] !== bgColor || $[26] !== bordered || $[27] !== classNames || $[28] !== errorLevel || $[29] !== props || $[30] !== size || $[31] !== status || $[32] !== styles || $[33] !== type) {
|
|
113
|
+
const mergedProps = {
|
|
114
|
+
...props,
|
|
115
|
+
type,
|
|
116
|
+
size,
|
|
117
|
+
bordered,
|
|
118
|
+
errorLevel,
|
|
119
|
+
status,
|
|
120
|
+
bgColor
|
|
121
|
+
};
|
|
122
|
+
names = "function" == typeof classNames ? classNames({
|
|
123
|
+
props: mergedProps
|
|
124
|
+
}) : classNames;
|
|
125
|
+
t9 = "function" == typeof styles ? styles({
|
|
126
|
+
props: mergedProps
|
|
127
|
+
}) : styles;
|
|
128
|
+
$[25] = bgColor;
|
|
129
|
+
$[26] = bordered;
|
|
130
|
+
$[27] = classNames;
|
|
131
|
+
$[28] = errorLevel;
|
|
132
|
+
$[29] = props;
|
|
133
|
+
$[30] = size;
|
|
134
|
+
$[31] = status;
|
|
135
|
+
$[32] = styles;
|
|
136
|
+
$[33] = type;
|
|
137
|
+
$[34] = names;
|
|
138
|
+
$[35] = t9;
|
|
139
|
+
} else {
|
|
140
|
+
names = $[34];
|
|
141
|
+
t9 = $[35];
|
|
142
|
+
}
|
|
143
|
+
const semanticStyles = t9;
|
|
144
|
+
const locale = config.locale.qrCode ?? enUS.qrCode;
|
|
145
|
+
if (!value) return null;
|
|
146
|
+
const t10 = color ?? themeColor;
|
|
147
|
+
let t11;
|
|
148
|
+
if ($[36] !== icon || $[37] !== iconSize) {
|
|
149
|
+
t11 = icon ? {
|
|
150
|
+
src: icon,
|
|
151
|
+
height: "number" == typeof iconSize ? iconSize : iconSize.height,
|
|
152
|
+
width: "number" == typeof iconSize ? iconSize : iconSize.width,
|
|
153
|
+
excavate: true,
|
|
154
|
+
crossOrigin: "anonymous"
|
|
155
|
+
} : void 0;
|
|
156
|
+
$[36] = icon;
|
|
157
|
+
$[37] = iconSize;
|
|
158
|
+
$[38] = t11;
|
|
159
|
+
} else t11 = $[38];
|
|
160
|
+
const t12 = rest["aria-label"] ?? title ?? "QR Code";
|
|
161
|
+
let t13;
|
|
162
|
+
if ($[39] !== bgColor || $[40] !== boostLevel || $[41] !== errorLevel || $[42] !== marginSize || $[43] !== size || $[44] !== t10 || $[45] !== t11 || $[46] !== t12 || $[47] !== title || $[48] !== value) {
|
|
163
|
+
t13 = {
|
|
164
|
+
value,
|
|
165
|
+
size,
|
|
166
|
+
level: errorLevel,
|
|
167
|
+
fgColor: t10,
|
|
168
|
+
bgColor,
|
|
169
|
+
marginSize,
|
|
170
|
+
boostLevel,
|
|
171
|
+
title,
|
|
172
|
+
imageSettings: t11,
|
|
173
|
+
role: "img",
|
|
174
|
+
"aria-label": t12
|
|
175
|
+
};
|
|
176
|
+
$[39] = bgColor;
|
|
177
|
+
$[40] = boostLevel;
|
|
178
|
+
$[41] = errorLevel;
|
|
179
|
+
$[42] = marginSize;
|
|
180
|
+
$[43] = size;
|
|
181
|
+
$[44] = t10;
|
|
182
|
+
$[45] = t11;
|
|
183
|
+
$[46] = t12;
|
|
184
|
+
$[47] = title;
|
|
185
|
+
$[48] = value;
|
|
186
|
+
$[49] = t13;
|
|
187
|
+
} else t13 = $[49];
|
|
188
|
+
const qrProps = t13;
|
|
189
|
+
const t14 = names?.root;
|
|
190
|
+
let t15;
|
|
191
|
+
if ($[50] !== className || $[51] !== prefixCls || $[52] !== rootClassName || $[53] !== t14) {
|
|
192
|
+
t15 = cx(prefixCls, t14, rootClassName, className);
|
|
193
|
+
$[50] = className;
|
|
194
|
+
$[51] = prefixCls;
|
|
195
|
+
$[52] = rootClassName;
|
|
196
|
+
$[53] = t14;
|
|
197
|
+
$[54] = t15;
|
|
198
|
+
} else t15 = $[54];
|
|
199
|
+
const t16 = semanticStyles?.root;
|
|
200
|
+
let t17;
|
|
201
|
+
if ($[55] !== bgColor || $[56] !== size || $[57] !== style || $[58] !== t16) {
|
|
202
|
+
t17 = {
|
|
203
|
+
width: size,
|
|
204
|
+
height: size,
|
|
205
|
+
backgroundColor: bgColor,
|
|
206
|
+
...t16,
|
|
207
|
+
...style
|
|
208
|
+
};
|
|
209
|
+
$[55] = bgColor;
|
|
210
|
+
$[56] = size;
|
|
211
|
+
$[57] = style;
|
|
212
|
+
$[58] = t16;
|
|
213
|
+
$[59] = t17;
|
|
214
|
+
} else t17 = $[59];
|
|
215
|
+
let t18;
|
|
216
|
+
if ($[60] !== qrProps || $[61] !== type) {
|
|
217
|
+
t18 = "svg" === type ? /*#__PURE__*/ jsx(QRCodeSVG, {
|
|
218
|
+
...qrProps
|
|
219
|
+
}) : /*#__PURE__*/ jsx(QRCodeCanvas, {
|
|
220
|
+
...qrProps
|
|
221
|
+
});
|
|
222
|
+
$[60] = qrProps;
|
|
223
|
+
$[61] = type;
|
|
224
|
+
$[62] = t18;
|
|
225
|
+
} else t18 = $[62];
|
|
226
|
+
let t19;
|
|
227
|
+
if ($[63] !== locale || $[64] !== names?.cover || $[65] !== onRefresh || $[66] !== semanticStyles?.cover || $[67] !== status || $[68] !== statusRender) {
|
|
228
|
+
t19 = "active" !== status && /*#__PURE__*/ jsx("div", {
|
|
229
|
+
"data-tao-qr-cover": "",
|
|
230
|
+
role: "status",
|
|
231
|
+
className: names?.cover,
|
|
232
|
+
style: semanticStyles?.cover,
|
|
233
|
+
children: statusRender ? statusRender({
|
|
234
|
+
status,
|
|
235
|
+
locale,
|
|
236
|
+
onRefresh
|
|
237
|
+
}) : "loading" === status ? /*#__PURE__*/ jsx(Spinner, {
|
|
238
|
+
"aria-label": "Loading QR Code"
|
|
239
|
+
}) : /*#__PURE__*/ jsxs(Fragment, {
|
|
240
|
+
children: [
|
|
241
|
+
/*#__PURE__*/ jsx("span", {
|
|
242
|
+
children: "expired" === status ? locale.expired : locale.scanned
|
|
243
|
+
}),
|
|
244
|
+
"expired" === status && onRefresh && /*#__PURE__*/ jsx(Button, {
|
|
245
|
+
variant: "bare",
|
|
246
|
+
onClick: onRefresh,
|
|
247
|
+
children: locale.refresh
|
|
248
|
+
})
|
|
249
|
+
]
|
|
250
|
+
})
|
|
251
|
+
});
|
|
252
|
+
$[63] = locale;
|
|
253
|
+
$[64] = names?.cover;
|
|
254
|
+
$[65] = onRefresh;
|
|
255
|
+
$[66] = semanticStyles?.cover;
|
|
256
|
+
$[67] = status;
|
|
257
|
+
$[68] = statusRender;
|
|
258
|
+
$[69] = t19;
|
|
259
|
+
} else t19 = $[69];
|
|
260
|
+
let t20;
|
|
261
|
+
if ($[70] !== bordered || $[71] !== rest || $[72] !== status || $[73] !== t15 || $[74] !== t17 || $[75] !== t18 || $[76] !== t19) {
|
|
262
|
+
t20 = /*#__PURE__*/ jsxs("div", {
|
|
263
|
+
...rest,
|
|
264
|
+
ref: root,
|
|
265
|
+
"data-tao-qr-code": "",
|
|
266
|
+
"data-bordered": bordered,
|
|
267
|
+
"data-status": status,
|
|
268
|
+
className: t15,
|
|
269
|
+
style: t17,
|
|
270
|
+
children: [
|
|
271
|
+
t18,
|
|
272
|
+
t19
|
|
273
|
+
]
|
|
274
|
+
});
|
|
275
|
+
$[70] = bordered;
|
|
276
|
+
$[71] = rest;
|
|
277
|
+
$[72] = status;
|
|
278
|
+
$[73] = t15;
|
|
279
|
+
$[74] = t17;
|
|
280
|
+
$[75] = t18;
|
|
281
|
+
$[76] = t19;
|
|
282
|
+
$[77] = t20;
|
|
283
|
+
} else t20 = $[77];
|
|
284
|
+
return t20;
|
|
285
|
+
});
|
|
286
|
+
export { qr_code_QRCode as QRCode };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
[data-tao-rate] {
|
|
2
|
+
color: var(--tao-rate-star-color, var(--tao-color-warning));
|
|
3
|
+
font-family: var(--tao-font-family);
|
|
4
|
+
font-size: var(--tao-rate-star-size, 20px);
|
|
5
|
+
vertical-align: middle;
|
|
6
|
+
outline: none;
|
|
7
|
+
gap: 8px;
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
line-height: 1;
|
|
11
|
+
list-style: none;
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[data-tao-rate][data-tao-size="small"] {
|
|
16
|
+
font-size: var(--tao-rate-star-size, 16px);
|
|
17
|
+
gap: 6px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
[data-tao-rate][data-tao-size="large"] {
|
|
21
|
+
font-size: var(--tao-rate-star-size, 24px);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[data-tao-rate-item] {
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
transition: transform var(--tao-motion-duration-fast);
|
|
27
|
+
position: relative;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[data-tao-rate-item] > [role="radio"] {
|
|
31
|
+
outline: none;
|
|
32
|
+
display: block;
|
|
33
|
+
position: relative;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-tao-rate-item] > [role="radio"] > div {
|
|
37
|
+
color: var(--tao-rate-star-bg, var(--tao-color-fill-secondary));
|
|
38
|
+
display: flex;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[data-tao-rate-item] > [role="radio"] > div:first-child {
|
|
42
|
+
inset-inline-start: 0;
|
|
43
|
+
z-index: 1;
|
|
44
|
+
width: 50%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
position: absolute;
|
|
47
|
+
top: 0;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[data-tao-rate-item] > [role="radio"] > div:first-child > * {
|
|
52
|
+
flex: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[data-tao-rate-item][data-tao-full] > [role="radio"] > div, [data-tao-rate-item][data-tao-half] > [role="radio"] > div:first-child {
|
|
56
|
+
color: inherit;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[data-tao-rate-item]:hover {
|
|
60
|
+
transform: scale(1.08);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-tao-rate-item] > [role="radio"]:focus-visible {
|
|
64
|
+
outline: 2px solid var(--tao-color-primary);
|
|
65
|
+
outline-offset: 3px;
|
|
66
|
+
border-radius: var(--tao-radius-sm);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[data-tao-rate]:focus-visible {
|
|
70
|
+
outline: 2px solid var(--tao-color-primary);
|
|
71
|
+
outline-offset: 4px;
|
|
72
|
+
border-radius: var(--tao-radius-sm);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
[data-tao-rate]:is([data-tao-disabled], [data-tao-readonly]) [data-tao-rate-item] {
|
|
76
|
+
cursor: default;
|
|
77
|
+
transform: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-tao-rate][data-tao-disabled] {
|
|
81
|
+
opacity: var(--tao-opacity-disabled, .5);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media (pointer: coarse) {
|
|
85
|
+
[data-tao-rate-item] > [role="radio"]:after {
|
|
86
|
+
content: "";
|
|
87
|
+
position: absolute;
|
|
88
|
+
inset: -10px -4px;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@media (prefers-reduced-motion: reduce) {
|
|
93
|
+
[data-tao-rate-item] {
|
|
94
|
+
transition: none;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RateProps as RcRateProps, RateRef as RcRateRef } from '@rc-component/rate/lib/Rate.js';
|
|
2
|
+
import { type AriaAttributes } from 'react';
|
|
3
|
+
import { type TaoSize } from '../../provider/tao-provider.js';
|
|
4
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
5
|
+
import { type TooltipProps } from '../tooltip/tooltip.js';
|
|
6
|
+
import './rate.css';
|
|
7
|
+
export type RateRef = RcRateRef;
|
|
8
|
+
export type RateSemanticPart = 'root' | 'item';
|
|
9
|
+
export interface RateProps extends RcRateProps, Pick<AriaAttributes, 'aria-label' | 'aria-labelledby'> {
|
|
10
|
+
rootClassName?: string;
|
|
11
|
+
size?: TaoSize | 'middle';
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
tooltips?: (Omit<TooltipProps, 'children'> | string)[];
|
|
14
|
+
classNames?: SemanticClassNames<RateSemanticPart>;
|
|
15
|
+
styles?: SemanticStyles<RateSemanticPart>;
|
|
16
|
+
}
|
|
17
|
+
export declare const Rate: import("react").ForwardRefExoticComponent<RateProps & import("react").RefAttributes<RcRateRef>>;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react-compiler-runtime";
|
|
3
|
+
import rate from "@rc-component/rate";
|
|
4
|
+
import { cloneElement, forwardRef } from "react";
|
|
5
|
+
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
6
|
+
import { cx } from "../../utils/semantic.js";
|
|
7
|
+
import { Tooltip } from "../tooltip/tooltip.js";
|
|
8
|
+
import "./rate.css";
|
|
9
|
+
import { interopDefault } from "../../utils/interop-default.js";
|
|
10
|
+
const RcRateComponent = /*#__PURE__*/ interopDefault(rate);
|
|
11
|
+
const Star = /*#__PURE__*/ jsx("svg", {
|
|
12
|
+
"data-tao-rate-icon": "",
|
|
13
|
+
viewBox: "0 0 24 24",
|
|
14
|
+
width: "1em",
|
|
15
|
+
height: "1em",
|
|
16
|
+
fill: "currentColor",
|
|
17
|
+
"aria-hidden": "true",
|
|
18
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
19
|
+
d: "m12 2.4 2.96 6 6.62.96-4.8 4.67 1.14 6.6L12 17.52l-5.92 3.11 1.13-6.6-4.79-4.67L9.04 8.4Z"
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
const Rate = /*#__PURE__*/ forwardRef((t0, ref)=>{
|
|
23
|
+
const $ = c(41);
|
|
24
|
+
let characterRender;
|
|
25
|
+
let className;
|
|
26
|
+
let classNames;
|
|
27
|
+
let disabled;
|
|
28
|
+
let rest;
|
|
29
|
+
let rootClassName;
|
|
30
|
+
let size;
|
|
31
|
+
let style;
|
|
32
|
+
let styles;
|
|
33
|
+
let t1;
|
|
34
|
+
let t2;
|
|
35
|
+
let t3;
|
|
36
|
+
let tooltips;
|
|
37
|
+
if ($[0] !== t0) {
|
|
38
|
+
({ prefixCls: t1, rootClassName, className, classNames, style, styles, tooltips, size, disabled, readOnly: t2, character: t3, characterRender, ...rest } = t0);
|
|
39
|
+
$[0] = t0;
|
|
40
|
+
$[1] = characterRender;
|
|
41
|
+
$[2] = className;
|
|
42
|
+
$[3] = classNames;
|
|
43
|
+
$[4] = disabled;
|
|
44
|
+
$[5] = rest;
|
|
45
|
+
$[6] = rootClassName;
|
|
46
|
+
$[7] = size;
|
|
47
|
+
$[8] = style;
|
|
48
|
+
$[9] = styles;
|
|
49
|
+
$[10] = t1;
|
|
50
|
+
$[11] = t2;
|
|
51
|
+
$[12] = t3;
|
|
52
|
+
$[13] = tooltips;
|
|
53
|
+
} else {
|
|
54
|
+
characterRender = $[1];
|
|
55
|
+
className = $[2];
|
|
56
|
+
classNames = $[3];
|
|
57
|
+
disabled = $[4];
|
|
58
|
+
rest = $[5];
|
|
59
|
+
rootClassName = $[6];
|
|
60
|
+
size = $[7];
|
|
61
|
+
style = $[8];
|
|
62
|
+
styles = $[9];
|
|
63
|
+
t1 = $[10];
|
|
64
|
+
t2 = $[11];
|
|
65
|
+
t3 = $[12];
|
|
66
|
+
tooltips = $[13];
|
|
67
|
+
}
|
|
68
|
+
const prefixCls = void 0 === t1 ? "tao-rate" : t1;
|
|
69
|
+
const readOnly = void 0 === t2 ? false : t2;
|
|
70
|
+
const character = void 0 === t3 ? Star : t3;
|
|
71
|
+
const config = useTaoConfig();
|
|
72
|
+
const resolvedDisabled = disabled ?? config.disabled;
|
|
73
|
+
let t4;
|
|
74
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
75
|
+
t4 = {
|
|
76
|
+
role: "radiogroup"
|
|
77
|
+
};
|
|
78
|
+
$[14] = t4;
|
|
79
|
+
} else t4 = $[14];
|
|
80
|
+
const t5 = "middle" === size ? "medium" : size ?? config.size;
|
|
81
|
+
const t6 = resolvedDisabled ? "" : void 0;
|
|
82
|
+
const t7 = readOnly ? "" : void 0;
|
|
83
|
+
const t8 = readOnly || void 0;
|
|
84
|
+
const t9 = resolvedDisabled || void 0;
|
|
85
|
+
const t10 = resolvedDisabled || readOnly;
|
|
86
|
+
const t11 = classNames?.root;
|
|
87
|
+
let t12;
|
|
88
|
+
if ($[15] !== className || $[16] !== rootClassName || $[17] !== t11) {
|
|
89
|
+
t12 = cx(t11, rootClassName, className);
|
|
90
|
+
$[15] = className;
|
|
91
|
+
$[16] = rootClassName;
|
|
92
|
+
$[17] = t11;
|
|
93
|
+
$[18] = t12;
|
|
94
|
+
} else t12 = $[18];
|
|
95
|
+
const t13 = styles?.root;
|
|
96
|
+
let t14;
|
|
97
|
+
if ($[19] !== style || $[20] !== t13) {
|
|
98
|
+
t14 = {
|
|
99
|
+
...t13,
|
|
100
|
+
...style
|
|
101
|
+
};
|
|
102
|
+
$[19] = style;
|
|
103
|
+
$[20] = t13;
|
|
104
|
+
$[21] = t14;
|
|
105
|
+
} else t14 = $[21];
|
|
106
|
+
let t15;
|
|
107
|
+
if ($[22] !== characterRender || $[23] !== classNames?.item || $[24] !== styles?.item || $[25] !== tooltips) {
|
|
108
|
+
t15 = (node, info)=>{
|
|
109
|
+
const index = info.index ?? 0;
|
|
110
|
+
const half = !!info.allowHalf && (info.value ?? 0) > index && (info.value ?? 0) < index + 1;
|
|
111
|
+
const child = /*#__PURE__*/ cloneElement(node, {
|
|
112
|
+
...{
|
|
113
|
+
"data-tao-rate-item": "",
|
|
114
|
+
"data-tao-half": half ? "" : void 0,
|
|
115
|
+
"data-tao-full": (info.value ?? 0) >= index + 1 ? "" : void 0
|
|
116
|
+
},
|
|
117
|
+
className: cx(node.props.className, classNames?.item),
|
|
118
|
+
style: styles?.item
|
|
119
|
+
});
|
|
120
|
+
const rendered = characterRender ? characterRender(child, info) : child;
|
|
121
|
+
const tip = tooltips?.[index];
|
|
122
|
+
return tip ? /*#__PURE__*/ jsx(Tooltip, {
|
|
123
|
+
..."string" == typeof tip ? {
|
|
124
|
+
title: tip
|
|
125
|
+
} : tip,
|
|
126
|
+
children: rendered
|
|
127
|
+
}) : rendered;
|
|
128
|
+
};
|
|
129
|
+
$[22] = characterRender;
|
|
130
|
+
$[23] = classNames?.item;
|
|
131
|
+
$[24] = styles?.item;
|
|
132
|
+
$[25] = tooltips;
|
|
133
|
+
$[26] = t15;
|
|
134
|
+
} else t15 = $[26];
|
|
135
|
+
let t16;
|
|
136
|
+
if ($[27] !== character || $[28] !== prefixCls || $[29] !== ref || $[30] !== rest || $[31] !== t10 || $[32] !== t12 || $[33] !== t14 || $[34] !== t15 || $[35] !== t5 || $[36] !== t6 || $[37] !== t7 || $[38] !== t8 || $[39] !== t9) {
|
|
137
|
+
t16 = /*#__PURE__*/ jsx(RcRateComponent, {
|
|
138
|
+
...rest,
|
|
139
|
+
ref: ref,
|
|
140
|
+
...t4,
|
|
141
|
+
"data-tao-rate": "",
|
|
142
|
+
"data-tao-size": t5,
|
|
143
|
+
"data-tao-disabled": t6,
|
|
144
|
+
"data-tao-readonly": t7,
|
|
145
|
+
"aria-readonly": t8,
|
|
146
|
+
"aria-disabled": t9,
|
|
147
|
+
prefixCls: prefixCls,
|
|
148
|
+
disabled: t10,
|
|
149
|
+
character: character,
|
|
150
|
+
className: t12,
|
|
151
|
+
style: t14,
|
|
152
|
+
characterRender: t15
|
|
153
|
+
});
|
|
154
|
+
$[27] = character;
|
|
155
|
+
$[28] = prefixCls;
|
|
156
|
+
$[29] = ref;
|
|
157
|
+
$[30] = rest;
|
|
158
|
+
$[31] = t10;
|
|
159
|
+
$[32] = t12;
|
|
160
|
+
$[33] = t14;
|
|
161
|
+
$[34] = t15;
|
|
162
|
+
$[35] = t5;
|
|
163
|
+
$[36] = t6;
|
|
164
|
+
$[37] = t7;
|
|
165
|
+
$[38] = t8;
|
|
166
|
+
$[39] = t9;
|
|
167
|
+
$[40] = t16;
|
|
168
|
+
} else t16 = $[40];
|
|
169
|
+
return t16;
|
|
170
|
+
});
|
|
171
|
+
Rate.displayName = 'Rate';
|
|
172
|
+
export { Rate };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
[data-tao-result] {
|
|
2
|
+
padding: var(--tao-padding-xl) var(--tao-padding-lg);
|
|
3
|
+
color: var(--tao-color-text);
|
|
4
|
+
font-family: var(--tao-font-family);
|
|
5
|
+
font-size: var(--tao-font-size);
|
|
6
|
+
line-height: var(--tao-line-height);
|
|
7
|
+
text-align: center;
|
|
8
|
+
overflow-wrap: anywhere;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
[data-tao-result-icon] {
|
|
12
|
+
color: var(--tao-color-primary);
|
|
13
|
+
margin-block-end: var(--tao-margin-lg);
|
|
14
|
+
line-height: 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[data-tao-result-icon] > svg {
|
|
18
|
+
width: 64px;
|
|
19
|
+
height: 64px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[data-tao-result][data-tao-status="success"] [data-tao-result-icon] {
|
|
23
|
+
color: var(--tao-color-success);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
[data-tao-result][data-tao-status="error"] [data-tao-result-icon] {
|
|
27
|
+
color: var(--tao-color-error);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[data-tao-result][data-tao-status="warning"] [data-tao-result-icon] {
|
|
31
|
+
color: var(--tao-color-warning);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
[data-tao-result-code] {
|
|
35
|
+
color: var(--tao-color-text-tertiary);
|
|
36
|
+
font-size: clamp(64px, 16vw, 96px);
|
|
37
|
+
font-weight: var(--tao-font-weight-strong);
|
|
38
|
+
font-variant-numeric: tabular-nums;
|
|
39
|
+
letter-spacing: -.03em;
|
|
40
|
+
display: inline-block;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[data-tao-result-title] {
|
|
44
|
+
font-size: var(--tao-font-size-xl);
|
|
45
|
+
font-weight: var(--tao-font-weight-strong);
|
|
46
|
+
line-height: var(--tao-line-height);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[data-tao-result-subtitle] {
|
|
50
|
+
color: var(--tao-color-text-secondary);
|
|
51
|
+
margin-block-start: var(--tao-margin-xs);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[data-tao-result-extra] {
|
|
55
|
+
justify-content: center;
|
|
56
|
+
gap: var(--tao-padding-sm);
|
|
57
|
+
flex-wrap: wrap;
|
|
58
|
+
margin-block-start: var(--tao-margin-lg);
|
|
59
|
+
display: flex;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
[data-tao-result-body] {
|
|
63
|
+
padding: var(--tao-padding-lg);
|
|
64
|
+
border-radius: var(--tao-radius);
|
|
65
|
+
background: var(--tao-color-bg-container-disabled);
|
|
66
|
+
text-align: start;
|
|
67
|
+
margin-block-start: var(--tao-margin-lg);
|
|
68
|
+
}
|
|
69
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
|
+
import './result.css';
|
|
4
|
+
export type ExceptionStatusType = 403 | 404 | 500 | '403' | '404' | '500';
|
|
5
|
+
export type ResultStatusType = ExceptionStatusType | 'success' | 'error' | 'info' | 'warning';
|
|
6
|
+
export type ResultSemanticPart = 'root' | 'title' | 'subTitle' | 'body' | 'extra' | 'icon';
|
|
7
|
+
export interface ResultProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
8
|
+
status?: ResultStatusType;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
title?: ReactNode;
|
|
11
|
+
subTitle?: ReactNode;
|
|
12
|
+
extra?: ReactNode;
|
|
13
|
+
prefixCls?: string;
|
|
14
|
+
rootClassName?: string;
|
|
15
|
+
classNames?: SemanticClassNames<ResultSemanticPart> | ((info: {
|
|
16
|
+
props: ResultProps;
|
|
17
|
+
}) => SemanticClassNames<ResultSemanticPart>);
|
|
18
|
+
styles?: SemanticStyles<ResultSemanticPart> | ((info: {
|
|
19
|
+
props: ResultProps;
|
|
20
|
+
}) => SemanticStyles<ResultSemanticPart>);
|
|
21
|
+
}
|
|
22
|
+
export interface ResultRef {
|
|
23
|
+
nativeElement: HTMLDivElement;
|
|
24
|
+
}
|
|
25
|
+
declare function ForbiddenImage(): import("react").JSX.Element;
|
|
26
|
+
declare function NotFoundImage(): import("react").JSX.Element;
|
|
27
|
+
declare function ServerErrorImage(): import("react").JSX.Element;
|
|
28
|
+
export declare const Result: import("react").ForwardRefExoticComponent<ResultProps & import("react").RefAttributes<ResultRef>> & {
|
|
29
|
+
PRESENTED_IMAGE_403: typeof ForbiddenImage;
|
|
30
|
+
PRESENTED_IMAGE_404: typeof NotFoundImage;
|
|
31
|
+
PRESENTED_IMAGE_500: typeof ServerErrorImage;
|
|
32
|
+
};
|
|
33
|
+
export {};
|