@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,259 @@
|
|
|
1
|
+
@layer tao {
|
|
2
|
+
[data-tao-timeline] {
|
|
3
|
+
color: var(--tao-color-text);
|
|
4
|
+
font: var(--tao-font-size) / var(--tao-line-height) var(--tao-font-family);
|
|
5
|
+
--tao-timeline-color: var(--tao-color-primary);
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
list-style: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
[data-tao-timeline-item] {
|
|
12
|
+
min-width: 0;
|
|
13
|
+
padding-bottom: 20px;
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[data-tao-timeline-item]:last-child {
|
|
18
|
+
padding-bottom: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[data-tao-timeline-wrapper] {
|
|
22
|
+
min-width: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[data-tao-timeline-icon] {
|
|
26
|
+
inset-inline-start: 0;
|
|
27
|
+
border: 2px solid var(--tao-timeline-color);
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
width: 10px;
|
|
30
|
+
height: 10px;
|
|
31
|
+
color: var(--tao-timeline-color);
|
|
32
|
+
background: var(--tao-color-bg-container);
|
|
33
|
+
z-index: 1;
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
align-items: center;
|
|
37
|
+
display: flex;
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: 6px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[data-tao-timeline-icon][data-tao-custom] {
|
|
43
|
+
border: 0;
|
|
44
|
+
border-radius: 0;
|
|
45
|
+
width: 18px;
|
|
46
|
+
height: 18px;
|
|
47
|
+
margin-inline-start: -4px;
|
|
48
|
+
top: 2px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[data-tao-timeline-icon] [data-tao-spinner] {
|
|
52
|
+
font-size: 14px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[data-tao-timeline][data-tao-variant="filled"] [data-tao-timeline-icon]:not([data-tao-custom]) {
|
|
56
|
+
background: var(--tao-timeline-color);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[data-tao-timeline-rail] {
|
|
60
|
+
top: 16px;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
border-inline-start: 2px solid var(--tao-color-border);
|
|
63
|
+
width: 0;
|
|
64
|
+
position: absolute;
|
|
65
|
+
inset-inline-start: 4px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-tao-timeline-item]:last-child [data-tao-timeline-rail] {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
[data-tao-timeline-item][data-tao-loading] [data-tao-timeline-rail] {
|
|
73
|
+
border-inline-start-style: dotted;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
[data-tao-timeline-section] {
|
|
77
|
+
overflow-wrap: anywhere;
|
|
78
|
+
padding-inline-start: 26px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
[data-tao-timeline-title] {
|
|
82
|
+
font-weight: 500;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[data-tao-timeline-content] {
|
|
86
|
+
min-width: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
[data-tao-timeline][data-tao-orientation="vertical"][data-tao-split] [data-tao-timeline-section] {
|
|
90
|
+
grid-template-columns: minmax(0, var(--tao-timeline-title-span)) minmax(0,
|
|
91
|
+
1fr);
|
|
92
|
+
gap: 0;
|
|
93
|
+
padding: 0;
|
|
94
|
+
display: grid;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[data-tao-timeline][data-tao-orientation="vertical"][data-tao-split] [data-tao-timeline-header] {
|
|
98
|
+
text-align: end;
|
|
99
|
+
padding-inline-end: 20px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[data-tao-timeline][data-tao-orientation="vertical"][data-tao-split] [data-tao-timeline-content] {
|
|
103
|
+
padding-inline-start: 20px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[data-tao-timeline][data-tao-orientation="vertical"][data-tao-split] [data-tao-timeline-icon] {
|
|
107
|
+
margin-inline-start: -5px;
|
|
108
|
+
inset-inline-start: var(--tao-timeline-title-span);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
[data-tao-timeline][data-tao-orientation="vertical"][data-tao-split] [data-tao-timeline-icon][data-tao-custom] {
|
|
112
|
+
margin-inline-start: -9px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[data-tao-timeline][data-tao-orientation="vertical"][data-tao-split] [data-tao-timeline-rail] {
|
|
116
|
+
margin-inline-start: -1px;
|
|
117
|
+
inset-inline-start: var(--tao-timeline-title-span);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[data-tao-timeline][data-tao-orientation="vertical"][data-tao-split] [data-tao-placement="end"] [data-tao-timeline-section] {
|
|
121
|
+
grid-template-columns: minmax(0, 1fr) minmax(0,
|
|
122
|
+
var(--tao-timeline-title-span));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[data-tao-timeline][data-tao-orientation="vertical"][data-tao-split] [data-tao-placement="end"] [data-tao-timeline-header] {
|
|
126
|
+
text-align: start;
|
|
127
|
+
grid-area: 1 / 2;
|
|
128
|
+
padding-inline: 20px 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
[data-tao-timeline][data-tao-orientation="vertical"][data-tao-split] [data-tao-placement="end"] [data-tao-timeline-content] {
|
|
132
|
+
text-align: end;
|
|
133
|
+
grid-area: 1 / 1;
|
|
134
|
+
padding-inline: 0 20px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
[data-tao-timeline][data-tao-orientation="vertical"][data-tao-split] [data-tao-placement="end"] [data-tao-timeline-icon], [data-tao-timeline][data-tao-orientation="vertical"][data-tao-split] [data-tao-placement="end"] [data-tao-timeline-rail] {
|
|
138
|
+
inset-inline-start: calc(100% - var(--tao-timeline-title-span));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
[data-tao-timeline][data-tao-orientation="vertical"]:not([data-tao-split]) [data-tao-placement="end"] [data-tao-timeline-icon] {
|
|
142
|
+
inset-inline: auto 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
[data-tao-timeline][data-tao-orientation="vertical"]:not([data-tao-split]) [data-tao-placement="end"] [data-tao-timeline-rail] {
|
|
146
|
+
inset-inline: auto 4px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
[data-tao-timeline][data-tao-orientation="vertical"]:not([data-tao-split]) [data-tao-placement="end"] [data-tao-timeline-section] {
|
|
150
|
+
text-align: end;
|
|
151
|
+
padding-inline: 0 26px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
[data-tao-timeline][data-tao-orientation="horizontal"] {
|
|
155
|
+
align-items: stretch;
|
|
156
|
+
display: flex;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
[data-tao-timeline][data-tao-orientation="horizontal"] [data-tao-timeline-item] {
|
|
160
|
+
flex: 1;
|
|
161
|
+
padding: 0 16px 0 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
[data-tao-timeline][data-tao-orientation="horizontal"] [data-tao-timeline-section] {
|
|
165
|
+
padding: 24px 0 0;
|
|
166
|
+
display: block;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
[data-tao-timeline][data-tao-orientation="horizontal"] [data-tao-timeline-icon] {
|
|
170
|
+
inset-inline-start: 0;
|
|
171
|
+
margin: 0;
|
|
172
|
+
top: 6px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
[data-tao-timeline][data-tao-orientation="horizontal"] [data-tao-timeline-rail] {
|
|
176
|
+
top: 10px;
|
|
177
|
+
bottom: auto;
|
|
178
|
+
border-inline-start: 0;
|
|
179
|
+
border-top: 2px solid var(--tao-color-border);
|
|
180
|
+
width: calc(100% - 10px);
|
|
181
|
+
margin: 0;
|
|
182
|
+
inset-inline-start: 10px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
[data-tao-timeline][data-tao-orientation="horizontal"] [data-tao-timeline-header], [data-tao-timeline][data-tao-orientation="horizontal"] [data-tao-timeline-content] {
|
|
186
|
+
text-align: start;
|
|
187
|
+
padding: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
[data-tao-timeline][data-tao-orientation="horizontal"]:not([data-tao-mode="alternate"]) [data-tao-placement="end"] [data-tao-timeline-icon] {
|
|
191
|
+
top: auto;
|
|
192
|
+
bottom: 6px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
[data-tao-timeline][data-tao-orientation="horizontal"]:not([data-tao-mode="alternate"]) [data-tao-placement="end"] [data-tao-timeline-rail] {
|
|
196
|
+
top: auto;
|
|
197
|
+
bottom: 10px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
[data-tao-timeline][data-tao-orientation="horizontal"]:not([data-tao-mode="alternate"]) [data-tao-placement="end"] [data-tao-timeline-section] {
|
|
201
|
+
padding: 0 0 24px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
[data-tao-timeline][data-tao-orientation="horizontal"][data-tao-mode="alternate"] [data-tao-timeline-item] {
|
|
205
|
+
padding: 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
[data-tao-timeline][data-tao-orientation="horizontal"][data-tao-mode="alternate"] [data-tao-timeline-wrapper] {
|
|
209
|
+
height: 100%;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
[data-tao-timeline][data-tao-orientation="horizontal"][data-tao-mode="alternate"] [data-tao-timeline-icon] {
|
|
213
|
+
top: 50%;
|
|
214
|
+
inset-inline-start: 50%;
|
|
215
|
+
transform: translate(-50%, -50%);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
[data-tao-timeline][data-tao-orientation="horizontal"][data-tao-mode="alternate"] [data-tao-timeline-rail] {
|
|
219
|
+
top: 50%;
|
|
220
|
+
width: 100%;
|
|
221
|
+
inset-inline-start: 50%;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
[data-tao-timeline][data-tao-orientation="horizontal"][data-tao-mode="alternate"] [data-tao-timeline-section] {
|
|
225
|
+
box-sizing: border-box;
|
|
226
|
+
grid-template-rows: 1fr 20px 1fr;
|
|
227
|
+
height: 100%;
|
|
228
|
+
min-height: 120px;
|
|
229
|
+
padding: 0 8px;
|
|
230
|
+
display: grid;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
[data-tao-timeline][data-tao-orientation="horizontal"][data-tao-mode="alternate"] [data-tao-timeline-header] {
|
|
234
|
+
text-align: center;
|
|
235
|
+
grid-row: 1;
|
|
236
|
+
align-self: end;
|
|
237
|
+
margin-bottom: 10px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
[data-tao-timeline][data-tao-orientation="horizontal"][data-tao-mode="alternate"] [data-tao-timeline-content] {
|
|
241
|
+
text-align: center;
|
|
242
|
+
grid-row: 3;
|
|
243
|
+
align-self: start;
|
|
244
|
+
margin-top: 10px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
[data-tao-timeline][data-tao-orientation="horizontal"][data-tao-mode="alternate"] [data-tao-placement="end"] [data-tao-timeline-header] {
|
|
248
|
+
grid-row: 3;
|
|
249
|
+
align-self: start;
|
|
250
|
+
margin: 10px 0 0;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
[data-tao-timeline][data-tao-orientation="horizontal"][data-tao-mode="alternate"] [data-tao-placement="end"] [data-tao-timeline-content] {
|
|
254
|
+
grid-row: 1;
|
|
255
|
+
align-self: end;
|
|
256
|
+
margin: 0 0 10px;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type CSSProperties, type HTMLAttributes, type Key, type ReactNode } from 'react';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
|
+
import './timeline.css';
|
|
4
|
+
export type ItemPosition = 'left' | 'right' | 'start' | 'end';
|
|
5
|
+
export type ItemPlacement = 'start' | 'end';
|
|
6
|
+
export type TimelineMode = ItemPosition | 'alternate';
|
|
7
|
+
export type TimelineSemanticPart = 'root' | 'item' | 'itemWrapper' | 'itemIcon' | 'itemSection' | 'itemHeader' | 'itemTitle' | 'itemContent' | 'itemRail';
|
|
8
|
+
export type TimelineItemSemanticPart = 'root' | 'wrapper' | 'icon' | 'section' | 'header' | 'title' | 'content' | 'rail';
|
|
9
|
+
export interface TimelineItemType {
|
|
10
|
+
color?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
classNames?: SemanticClassNames<TimelineItemSemanticPart>;
|
|
14
|
+
styles?: SemanticStyles<TimelineItemSemanticPart>;
|
|
15
|
+
placement?: ItemPlacement;
|
|
16
|
+
position?: ItemPosition;
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
key?: Key;
|
|
19
|
+
title?: ReactNode;
|
|
20
|
+
content?: ReactNode;
|
|
21
|
+
label?: ReactNode;
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
icon?: ReactNode;
|
|
24
|
+
dot?: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export interface TimelineProps extends Omit<HTMLAttributes<HTMLOListElement>, 'children'> {
|
|
27
|
+
prefixCls?: string;
|
|
28
|
+
rootClassName?: string;
|
|
29
|
+
variant?: 'filled' | 'outlined';
|
|
30
|
+
mode?: TimelineMode;
|
|
31
|
+
orientation?: 'horizontal' | 'vertical';
|
|
32
|
+
titleSpan?: string | number;
|
|
33
|
+
items?: TimelineItemType[];
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
pending?: ReactNode;
|
|
36
|
+
pendingDot?: ReactNode;
|
|
37
|
+
reverse?: boolean;
|
|
38
|
+
classNames?: SemanticClassNames<TimelineSemanticPart> | ((info: {
|
|
39
|
+
props: TimelineProps;
|
|
40
|
+
}) => SemanticClassNames<TimelineSemanticPart>);
|
|
41
|
+
styles?: SemanticStyles<TimelineSemanticPart> | ((info: {
|
|
42
|
+
props: TimelineProps;
|
|
43
|
+
}) => SemanticStyles<TimelineSemanticPart>);
|
|
44
|
+
}
|
|
45
|
+
declare function TimelineRoot(props: TimelineProps): import("react").JSX.Element;
|
|
46
|
+
declare function TimelineItem(_props: TimelineItemType): null;
|
|
47
|
+
export declare const Timeline: typeof TimelineRoot & {
|
|
48
|
+
Item: typeof TimelineItem;
|
|
49
|
+
};
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Children, Fragment, isValidElement } from "react";
|
|
3
|
+
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
4
|
+
import { cx } from "../../utils/semantic.js";
|
|
5
|
+
import { Spinner } from "../spinner/spinner.js";
|
|
6
|
+
import "./timeline.css";
|
|
7
|
+
function childItems(children) {
|
|
8
|
+
return Children.toArray(children).flatMap((child)=>/*#__PURE__*/ isValidElement(child) ? child.type === Fragment ? childItems(child.props.children) : [
|
|
9
|
+
{
|
|
10
|
+
...child.props,
|
|
11
|
+
key: child.key ?? void 0
|
|
12
|
+
}
|
|
13
|
+
] : []);
|
|
14
|
+
}
|
|
15
|
+
const colors = {
|
|
16
|
+
blue: 'var(--tao-color-primary)',
|
|
17
|
+
red: 'var(--tao-color-error)',
|
|
18
|
+
green: 'var(--tao-color-success)',
|
|
19
|
+
gray: 'var(--tao-color-text-quaternary)'
|
|
20
|
+
};
|
|
21
|
+
const normalizedPlacement = (placement)=>'right' === placement || 'end' === placement ? 'end' : 'start';
|
|
22
|
+
function TimelineRoot(props) {
|
|
23
|
+
const config = useTaoConfig();
|
|
24
|
+
const { prefixCls, rootClassName, variant = 'filled' === config.variant ? 'filled' : 'outlined', mode = 'start', orientation = 'vertical', titleSpan = 12, items, children, pending, pendingDot, reverse, classNames, styles, className, style, ...rest } = props;
|
|
25
|
+
const actualMode = 'alternate' === mode ? mode : normalizedPlacement(mode);
|
|
26
|
+
const resolved = (items ?? childItems(children)).map((item, index)=>({
|
|
27
|
+
...item,
|
|
28
|
+
title: item.title ?? item.label,
|
|
29
|
+
content: item.content ?? item.children,
|
|
30
|
+
icon: item.icon ?? item.dot,
|
|
31
|
+
placement: normalizedPlacement(item.placement ?? item.position ?? ('alternate' === actualMode ? index % 2 === 0 ? 'start' : 'end' : actualMode))
|
|
32
|
+
}));
|
|
33
|
+
if (pending) resolved.push({
|
|
34
|
+
content: pending,
|
|
35
|
+
icon: pendingDot,
|
|
36
|
+
loading: true,
|
|
37
|
+
placement: 'start',
|
|
38
|
+
title: void 0
|
|
39
|
+
});
|
|
40
|
+
if (reverse) resolved.reverse();
|
|
41
|
+
const split = 'alternate' === actualMode || 'vertical' === orientation && resolved.some((item_0)=>!!item_0.title);
|
|
42
|
+
const merged = {
|
|
43
|
+
...props,
|
|
44
|
+
variant,
|
|
45
|
+
mode: actualMode,
|
|
46
|
+
orientation,
|
|
47
|
+
items: resolved
|
|
48
|
+
};
|
|
49
|
+
const classes = 'function' == typeof classNames ? classNames({
|
|
50
|
+
props: merged
|
|
51
|
+
}) : classNames;
|
|
52
|
+
const slots = 'function' == typeof styles ? styles({
|
|
53
|
+
props: merged
|
|
54
|
+
}) : styles;
|
|
55
|
+
const span = 'alternate' === actualMode ? '50%' : 'number' == typeof titleSpan ? `${titleSpan / 24 * 100}%` : titleSpan;
|
|
56
|
+
return /*#__PURE__*/ jsx("ol", {
|
|
57
|
+
...rest,
|
|
58
|
+
"data-tao-timeline": "",
|
|
59
|
+
"data-tao-orientation": orientation,
|
|
60
|
+
"data-tao-mode": actualMode,
|
|
61
|
+
"data-tao-split": split || void 0,
|
|
62
|
+
"data-tao-variant": variant,
|
|
63
|
+
className: cx(prefixCls, classes?.root, className, rootClassName),
|
|
64
|
+
style: {
|
|
65
|
+
'--tao-timeline-title-span': span,
|
|
66
|
+
...slots?.root,
|
|
67
|
+
...style
|
|
68
|
+
},
|
|
69
|
+
children: resolved.map((item_1, index_0)=>{
|
|
70
|
+
function part(rootPart, localPart) {
|
|
71
|
+
return {
|
|
72
|
+
className: cx(classes?.[rootPart], item_1.classNames?.[localPart]),
|
|
73
|
+
style: {
|
|
74
|
+
...slots?.[rootPart],
|
|
75
|
+
...item_1.styles?.[localPart]
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
const icon = item_1.icon ?? (item_1.loading ? /*#__PURE__*/ jsx(Spinner, {
|
|
80
|
+
size: "small"
|
|
81
|
+
}) : null);
|
|
82
|
+
return /*#__PURE__*/ jsx("li", {
|
|
83
|
+
"data-tao-timeline-item": "",
|
|
84
|
+
"data-tao-placement": item_1.placement,
|
|
85
|
+
"data-tao-loading": item_1.loading || void 0,
|
|
86
|
+
className: cx(classes?.item, item_1.classNames?.root, item_1.className),
|
|
87
|
+
style: {
|
|
88
|
+
'--tao-timeline-color': item_1.color ? colors[item_1.color] ?? item_1.color : void 0,
|
|
89
|
+
...slots?.item,
|
|
90
|
+
...item_1.styles?.root,
|
|
91
|
+
...item_1.style
|
|
92
|
+
},
|
|
93
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
94
|
+
"data-tao-timeline-wrapper": "",
|
|
95
|
+
...part('itemWrapper', 'wrapper'),
|
|
96
|
+
children: [
|
|
97
|
+
/*#__PURE__*/ jsx("span", {
|
|
98
|
+
"data-tao-timeline-rail": "",
|
|
99
|
+
"aria-hidden": "true",
|
|
100
|
+
...part('itemRail', 'rail')
|
|
101
|
+
}),
|
|
102
|
+
/*#__PURE__*/ jsx("span", {
|
|
103
|
+
"data-tao-timeline-icon": "",
|
|
104
|
+
"data-tao-custom": null !== icon || void 0,
|
|
105
|
+
...part('itemIcon', 'icon'),
|
|
106
|
+
children: icon
|
|
107
|
+
}),
|
|
108
|
+
/*#__PURE__*/ jsxs("div", {
|
|
109
|
+
"data-tao-timeline-section": "",
|
|
110
|
+
...part('itemSection', 'section'),
|
|
111
|
+
children: [
|
|
112
|
+
/*#__PURE__*/ jsx("div", {
|
|
113
|
+
"data-tao-timeline-header": "",
|
|
114
|
+
...part('itemHeader', 'header'),
|
|
115
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
116
|
+
"data-tao-timeline-title": "",
|
|
117
|
+
...part('itemTitle', 'title'),
|
|
118
|
+
children: item_1.title
|
|
119
|
+
})
|
|
120
|
+
}),
|
|
121
|
+
/*#__PURE__*/ jsx("div", {
|
|
122
|
+
"data-tao-timeline-content": "",
|
|
123
|
+
...part('itemContent', 'content'),
|
|
124
|
+
children: item_1.content
|
|
125
|
+
})
|
|
126
|
+
]
|
|
127
|
+
})
|
|
128
|
+
]
|
|
129
|
+
})
|
|
130
|
+
}, item_1.key ?? index_0);
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function TimelineItem(_props) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
const Timeline = Object.assign(TimelineRoot, {
|
|
138
|
+
Item: TimelineItem
|
|
139
|
+
});
|
|
140
|
+
export { Timeline };
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
@layer tao {
|
|
2
|
+
[data-tao-tour] {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
border: 1px solid var(--tao-color-border-secondary);
|
|
5
|
+
border-radius: var(--tao-radius);
|
|
6
|
+
background: var(--tao-color-bg-elevated);
|
|
7
|
+
width: 100%;
|
|
8
|
+
color: var(--tao-color-text);
|
|
9
|
+
box-shadow: var(--tao-box-shadow-secondary);
|
|
10
|
+
font: var(--tao-font-size-base) / var(--tao-line-height) var(--tao-font-family);
|
|
11
|
+
outline: none;
|
|
12
|
+
position: relative;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[data-tao-tour-section] {
|
|
16
|
+
padding: 16px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
[data-tao-tour-header] {
|
|
20
|
+
margin-bottom: 8px;
|
|
21
|
+
padding-inline-end: 24px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[data-tao-tour-title] {
|
|
25
|
+
font-weight: 600;
|
|
26
|
+
font-size: var(--tao-font-size-lg);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[data-tao-tour-description] {
|
|
30
|
+
color: var(--tao-color-text-secondary);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[data-tao-tour-close] {
|
|
34
|
+
top: 8px;
|
|
35
|
+
border-radius: var(--tao-radius-sm);
|
|
36
|
+
width: 28px;
|
|
37
|
+
height: 28px;
|
|
38
|
+
color: var(--tao-color-text-secondary);
|
|
39
|
+
font: 22px / 1 var(--tao-font-family);
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
background: none;
|
|
42
|
+
border: 0;
|
|
43
|
+
place-items: center;
|
|
44
|
+
padding: 0;
|
|
45
|
+
display: grid;
|
|
46
|
+
position: absolute;
|
|
47
|
+
inset-inline-end: 8px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
[data-tao-tour-close]:hover {
|
|
51
|
+
background: var(--tao-color-bg-text-hover);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[data-tao-tour-close]:focus-visible {
|
|
55
|
+
outline: 2px solid var(--tao-primary);
|
|
56
|
+
outline-offset: 2px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[data-tao-tour-cover] {
|
|
60
|
+
border-start-start-radius: var(--tao-radius);
|
|
61
|
+
border-start-end-radius: var(--tao-radius);
|
|
62
|
+
margin: -16px -16px 16px;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
[data-tao-tour-cover] :is(img, video) {
|
|
67
|
+
object-fit: cover;
|
|
68
|
+
width: 100%;
|
|
69
|
+
max-height: 200px;
|
|
70
|
+
display: block;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
[data-tao-tour-footer] {
|
|
74
|
+
justify-content: space-between;
|
|
75
|
+
align-items: center;
|
|
76
|
+
gap: 12px;
|
|
77
|
+
margin-top: 16px;
|
|
78
|
+
display: flex;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
[data-tao-tour-indicators] {
|
|
82
|
+
gap: 6px;
|
|
83
|
+
display: flex;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
[data-tao-tour-indicator] {
|
|
87
|
+
background: var(--tao-color-fill-secondary);
|
|
88
|
+
border-radius: 50%;
|
|
89
|
+
width: 6px;
|
|
90
|
+
height: 6px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[data-tao-tour-indicator][data-active] {
|
|
94
|
+
background: var(--tao-primary);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[data-tao-tour-actions] {
|
|
98
|
+
gap: 8px;
|
|
99
|
+
margin-inline-start: auto;
|
|
100
|
+
display: flex;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-tao-tour][data-type="primary"] {
|
|
104
|
+
background: var(--tao-primary);
|
|
105
|
+
color: var(--tao-color-text-light-solid);
|
|
106
|
+
border-color: var(--tao-primary);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[data-tao-tour][data-type="primary"] :is([data-tao-tour-description], [data-tao-tour-close]) {
|
|
110
|
+
color: inherit;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
[data-tao-tour][data-type="primary"] [data-tao-tour-indicator] {
|
|
114
|
+
background: color-mix(in oklab,
|
|
115
|
+
var(--tao-color-text-light-solid),
|
|
116
|
+
transparent 65%);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
[data-tao-tour][data-type="primary"] [data-tao-tour-indicator][data-active] {
|
|
120
|
+
background: var(--tao-color-text-light-solid);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
[data-tao-tour][data-type="primary"] [data-tao-tour-actions] [data-tao-variant="ghost"] {
|
|
124
|
+
color: inherit;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
[data-tao-tour-popup] > [class$="-arrow"] {
|
|
128
|
+
z-index: -1;
|
|
129
|
+
pointer-events: none;
|
|
130
|
+
width: 12px;
|
|
131
|
+
height: 12px;
|
|
132
|
+
left: var(--arrow-x);
|
|
133
|
+
top: var(--arrow-y);
|
|
134
|
+
position: absolute;
|
|
135
|
+
transform: translate(-50%, -50%);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
[data-tao-tour-popup] > [class$="-arrow"]:before {
|
|
139
|
+
content: "";
|
|
140
|
+
background: var(--tao-color-bg-elevated);
|
|
141
|
+
width: 100%;
|
|
142
|
+
height: 100%;
|
|
143
|
+
display: block;
|
|
144
|
+
transform: rotate(45deg);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
[data-tao-tour-popup]:has([data-type="primary"]) > [class$="-arrow"]:before {
|
|
148
|
+
background: var(--tao-primary);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type TourProps as RcTourProps, type TourStepProps as RcTourStepProps } from '@rc-component/tour';
|
|
2
|
+
import { type CSSProperties, type MouseEventHandler, type ReactNode } from 'react';
|
|
3
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
4
|
+
import './tour.css';
|
|
5
|
+
export type TourSemanticPart = 'root' | 'cover' | 'close' | 'mask' | 'section' | 'footer' | 'actions' | 'indicator' | 'indicators' | 'header' | 'title' | 'description';
|
|
6
|
+
export type TourSemanticType = {
|
|
7
|
+
classNames?: SemanticClassNames<TourSemanticPart>;
|
|
8
|
+
styles?: SemanticStyles<TourSemanticPart>;
|
|
9
|
+
};
|
|
10
|
+
export interface TourLocale {
|
|
11
|
+
Next: string;
|
|
12
|
+
Previous: string;
|
|
13
|
+
Finish: string;
|
|
14
|
+
}
|
|
15
|
+
type TourButtonProps = {
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
18
|
+
className?: string;
|
|
19
|
+
style?: CSSProperties;
|
|
20
|
+
};
|
|
21
|
+
export interface TourStepProps extends Omit<RcTourStepProps, 'styles' | 'classNames'> {
|
|
22
|
+
cover?: ReactNode;
|
|
23
|
+
nextButtonProps?: TourButtonProps;
|
|
24
|
+
prevButtonProps?: TourButtonProps;
|
|
25
|
+
type?: 'default' | 'primary';
|
|
26
|
+
classNames?: TourSemanticType['classNames'];
|
|
27
|
+
styles?: TourSemanticType['styles'];
|
|
28
|
+
}
|
|
29
|
+
export interface TourProps extends Omit<RcTourProps, 'renderPanel' | 'steps' | 'classNames' | 'styles'> {
|
|
30
|
+
steps?: TourStepProps[];
|
|
31
|
+
indicatorsRender?: (current: number, total: number) => ReactNode;
|
|
32
|
+
actionsRender?: (originNode: ReactNode, info: {
|
|
33
|
+
current: number;
|
|
34
|
+
total: number;
|
|
35
|
+
}) => ReactNode;
|
|
36
|
+
type?: 'default' | 'primary';
|
|
37
|
+
classNames?: TourSemanticType['classNames'] | ((info: {
|
|
38
|
+
props: TourProps;
|
|
39
|
+
}) => TourSemanticType['classNames']);
|
|
40
|
+
styles?: TourSemanticType['styles'] | ((info: {
|
|
41
|
+
props: TourProps;
|
|
42
|
+
}) => TourSemanticType['styles']);
|
|
43
|
+
}
|
|
44
|
+
export declare function Tour(props: TourProps): import("react").JSX.Element;
|
|
45
|
+
export {};
|