@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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
[data-tao-input] {
|
|
2
2
|
--tao-input-line-height: var(--tao-line-height);
|
|
3
|
+
--tao-input-affix-padding: var(--tao-padding-sm);
|
|
3
4
|
width: 100%;
|
|
4
5
|
font-family: var(--tao-font-family);
|
|
5
6
|
align-items: center;
|
|
@@ -22,12 +23,13 @@
|
|
|
22
23
|
|
|
23
24
|
[data-tao-input][data-tao-size="medium"] {
|
|
24
25
|
--tao-input-control-height: var(--tao-control-height);
|
|
26
|
+
--tao-input-affix-padding: var(--tao-padding-xs);
|
|
25
27
|
height: var(--tao-control-height);
|
|
26
28
|
border-radius: var(--tao-radius-md);
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
[data-tao-input][data-tao-size="medium"] input {
|
|
30
|
-
padding-inline: var(--tao-input-padding-inline, var(--tao-padding-
|
|
32
|
+
padding-inline: var(--tao-input-padding-inline, var(--tao-padding-xs));
|
|
31
33
|
font-size: var(--tao-input-input-font-size, var(--tao-font-size-base));
|
|
32
34
|
}
|
|
33
35
|
|
|
@@ -91,7 +93,7 @@
|
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
[data-tao-prefix], [data-tao-input] [data-tao-prefix] + input {
|
|
94
|
-
padding-inline-start: var(--tao-padding
|
|
96
|
+
padding-inline-start: var(--tao-input-affix-padding);
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
[data-tao-prefix] svg, [data-tao-suffix] svg {
|
|
@@ -100,7 +102,7 @@
|
|
|
100
102
|
}
|
|
101
103
|
|
|
102
104
|
[data-tao-input]:has([data-tao-prefix] svg) [data-tao-prefix] {
|
|
103
|
-
inset-inline-start: var(--tao-padding
|
|
105
|
+
inset-inline-start: var(--tao-input-affix-padding);
|
|
104
106
|
padding: 0;
|
|
105
107
|
position: absolute;
|
|
106
108
|
top: 50%;
|
|
@@ -113,12 +115,12 @@
|
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
[data-tao-input]:has([data-tao-prefix] svg) input {
|
|
116
|
-
padding-inline-start: calc(var(--tao-padding
|
|
118
|
+
padding-inline-start: calc(var(--tao-input-affix-padding) +
|
|
117
119
|
16px +
|
|
118
|
-
var(--tao-padding
|
|
120
|
+
var(--tao-input-affix-padding));
|
|
119
121
|
}
|
|
120
122
|
|
|
121
123
|
[data-tao-suffix] {
|
|
122
|
-
padding-inline-end: var(--tao-padding
|
|
124
|
+
padding-inline-end: var(--tao-input-affix-padding);
|
|
123
125
|
}
|
|
124
126
|
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
[data-tao-list-pages] {
|
|
2
|
+
min-width: 0;
|
|
3
|
+
font-family: var(--tao-font-family);
|
|
4
|
+
font-size: var(--tao-font-size-base);
|
|
5
|
+
color: var(--tao-color-text);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
[data-tao-list-pages] > ul {
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 8px;
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 0;
|
|
14
|
+
list-style: none;
|
|
15
|
+
display: flex;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
[data-tao-list-pages] > ul > li {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
align-items: center;
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 0;
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
[data-tao-list-pages] > ul > li[tabindex] {
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
outline: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[data-tao-list-pages] > ul > li:is([class*="-item"], [class$="-prev"], [class$="-next"], [class*="-jump-"]) {
|
|
33
|
+
min-width: var(--tao-control-height);
|
|
34
|
+
height: var(--tao-control-height);
|
|
35
|
+
border-radius: var(--tao-radius);
|
|
36
|
+
border: 1px solid #0000;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
[data-tao-list-pages] > ul > li[class*="-item-active"] {
|
|
40
|
+
color: var(--tao-color-primary);
|
|
41
|
+
border-color: var(--tao-color-primary);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[data-tao-list-pages] > ul > li[tabindex]:focus-visible {
|
|
45
|
+
outline: 2px solid var(--tao-color-primary);
|
|
46
|
+
outline-offset: 2px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[data-tao-list-pages] > ul > li[class*="-disabled"] {
|
|
50
|
+
opacity: .5;
|
|
51
|
+
cursor: not-allowed;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[data-tao-list-pages] button {
|
|
55
|
+
font: inherit;
|
|
56
|
+
color: inherit;
|
|
57
|
+
border-radius: inherit;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
background: none;
|
|
60
|
+
border: 0;
|
|
61
|
+
min-height: 28px;
|
|
62
|
+
padding: 0 8px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
[data-tao-list-pages] button:disabled {
|
|
66
|
+
cursor: not-allowed;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[data-tao-list-pages] input {
|
|
70
|
+
width: 48px;
|
|
71
|
+
min-width: 0;
|
|
72
|
+
height: var(--tao-control-height);
|
|
73
|
+
border: 1px solid var(--tao-color-border);
|
|
74
|
+
border-radius: var(--tao-radius);
|
|
75
|
+
background: var(--tao-color-bg-container);
|
|
76
|
+
color: var(--tao-color-text);
|
|
77
|
+
font: inherit;
|
|
78
|
+
text-align: center;
|
|
79
|
+
box-sizing: border-box;
|
|
80
|
+
margin-inline: 8px;
|
|
81
|
+
padding-inline: 4px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-tao-list-pages] input:focus-visible {
|
|
85
|
+
outline: 2px solid var(--tao-color-primary);
|
|
86
|
+
outline-offset: 2px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
[data-tao-list-pages] [class$="-options"] {
|
|
90
|
+
align-items: center;
|
|
91
|
+
gap: 8px;
|
|
92
|
+
display: flex;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
[data-tao-list-pages] [class*="-quick-jumper"] {
|
|
96
|
+
white-space: nowrap;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[data-tao-list-pages] [class$="-slash"] {
|
|
100
|
+
margin-inline: 4px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-tao-list-pages][data-tao-size="small"] > ul > li:is([class*="-item"], [class$="-prev"], [class$="-next"], [class*="-jump-"]) {
|
|
104
|
+
min-width: var(--tao-control-height-sm);
|
|
105
|
+
height: var(--tao-control-height-sm);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-tao-list-pages][data-tao-size="small"] > ul {
|
|
109
|
+
gap: 4px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[data-tao-list-pages][data-tao-size="small"] input {
|
|
113
|
+
width: 32px;
|
|
114
|
+
height: var(--tao-control-height-sm);
|
|
115
|
+
margin-inline: 4px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@media (width <= 575px) {
|
|
119
|
+
[data-tao-list-pages][data-tao-responsive] > ul {
|
|
120
|
+
gap: 4px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
[data-tao-list-pages][data-tao-responsive] > ul > li:is([class*="-item"], [class$="-prev"], [class$="-next"]) {
|
|
124
|
+
min-width: var(--tao-control-height-sm);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type PaginationProps as RcPaginationProps } from '@rc-component/pagination';
|
|
2
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
3
|
+
import { type TaoSize } from '../../provider/tao-provider.js';
|
|
4
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
5
|
+
import { type SelectProps } from '../select/select.js';
|
|
6
|
+
import './list-pagination.css';
|
|
7
|
+
export interface ListPagination extends Omit<RcPaginationProps, 'showSizeChanger' | 'pageSizeOptions' | 'classNames' | 'styles'> {
|
|
8
|
+
position?: 'top' | 'bottom' | 'both';
|
|
9
|
+
size?: TaoSize | 'default';
|
|
10
|
+
responsive?: boolean;
|
|
11
|
+
rootClassName?: string;
|
|
12
|
+
components?: {
|
|
13
|
+
sizeChanger?: ComponentType<{
|
|
14
|
+
value: number;
|
|
15
|
+
onChange: (value: number) => void;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
className: string;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
selectComponentClass?: ComponentType<{
|
|
21
|
+
value: number;
|
|
22
|
+
onChange: (value: number) => void;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
className: string;
|
|
25
|
+
}>;
|
|
26
|
+
showSizeChanger?: boolean | SelectProps;
|
|
27
|
+
pageSizeOptions?: (string | number)[];
|
|
28
|
+
showQuickJumper?: boolean | {
|
|
29
|
+
goButton?: ReactNode;
|
|
30
|
+
};
|
|
31
|
+
classNames?: SemanticClassNames<'root' | 'item'> | ((info: {
|
|
32
|
+
props: ListPagination;
|
|
33
|
+
}) => SemanticClassNames<'root' | 'item'>);
|
|
34
|
+
styles?: SemanticStyles<'root' | 'item'> | ((info: {
|
|
35
|
+
props: ListPagination;
|
|
36
|
+
}) => SemanticStyles<'root' | 'item'>);
|
|
37
|
+
}
|
|
38
|
+
export declare function ListPaginationControl(props: ListPagination): import("react").JSX.Element;
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react-compiler-runtime";
|
|
3
|
+
import pagination from "@rc-component/pagination";
|
|
4
|
+
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
|
+
import { cx } from "../../utils/semantic.js";
|
|
6
|
+
import { Select } from "../select/select.js";
|
|
7
|
+
import "./list-pagination.css";
|
|
8
|
+
function ListPaginationControl(props) {
|
|
9
|
+
const $ = c(82);
|
|
10
|
+
let className;
|
|
11
|
+
let classNames;
|
|
12
|
+
let components;
|
|
13
|
+
let itemRender;
|
|
14
|
+
let locale;
|
|
15
|
+
let pageSizeOptions;
|
|
16
|
+
let responsive;
|
|
17
|
+
let rest;
|
|
18
|
+
let rootClassName;
|
|
19
|
+
let selectComponentClass;
|
|
20
|
+
let showSizeChanger;
|
|
21
|
+
let size;
|
|
22
|
+
let sizeChangerRender;
|
|
23
|
+
let style;
|
|
24
|
+
let styles;
|
|
25
|
+
let t0;
|
|
26
|
+
if ($[0] !== props) {
|
|
27
|
+
const { position: _position, size: t1, responsive: t2, prefixCls: t3, rootClassName: t4, className: t5, classNames: t6, styles: t7, style: t8, components: t9, selectComponentClass: t10, showSizeChanger: t11, pageSizeOptions: t12, itemRender: t13, locale: t14, sizeChangerRender: t15, ...t16 } = props;
|
|
28
|
+
size = t1;
|
|
29
|
+
responsive = t2;
|
|
30
|
+
t0 = t3;
|
|
31
|
+
rootClassName = t4;
|
|
32
|
+
className = t5;
|
|
33
|
+
classNames = t6;
|
|
34
|
+
styles = t7;
|
|
35
|
+
style = t8;
|
|
36
|
+
components = t9;
|
|
37
|
+
selectComponentClass = t10;
|
|
38
|
+
showSizeChanger = t11;
|
|
39
|
+
pageSizeOptions = t12;
|
|
40
|
+
itemRender = t13;
|
|
41
|
+
locale = t14;
|
|
42
|
+
sizeChangerRender = t15;
|
|
43
|
+
rest = t16;
|
|
44
|
+
$[0] = props;
|
|
45
|
+
$[1] = className;
|
|
46
|
+
$[2] = classNames;
|
|
47
|
+
$[3] = components;
|
|
48
|
+
$[4] = itemRender;
|
|
49
|
+
$[5] = locale;
|
|
50
|
+
$[6] = pageSizeOptions;
|
|
51
|
+
$[7] = responsive;
|
|
52
|
+
$[8] = rest;
|
|
53
|
+
$[9] = rootClassName;
|
|
54
|
+
$[10] = selectComponentClass;
|
|
55
|
+
$[11] = showSizeChanger;
|
|
56
|
+
$[12] = size;
|
|
57
|
+
$[13] = sizeChangerRender;
|
|
58
|
+
$[14] = style;
|
|
59
|
+
$[15] = styles;
|
|
60
|
+
$[16] = t0;
|
|
61
|
+
} else {
|
|
62
|
+
className = $[1];
|
|
63
|
+
classNames = $[2];
|
|
64
|
+
components = $[3];
|
|
65
|
+
itemRender = $[4];
|
|
66
|
+
locale = $[5];
|
|
67
|
+
pageSizeOptions = $[6];
|
|
68
|
+
responsive = $[7];
|
|
69
|
+
rest = $[8];
|
|
70
|
+
rootClassName = $[9];
|
|
71
|
+
selectComponentClass = $[10];
|
|
72
|
+
showSizeChanger = $[11];
|
|
73
|
+
size = $[12];
|
|
74
|
+
sizeChangerRender = $[13];
|
|
75
|
+
style = $[14];
|
|
76
|
+
styles = $[15];
|
|
77
|
+
t0 = $[16];
|
|
78
|
+
}
|
|
79
|
+
const prefixCls = void 0 === t0 ? "tao-list-pages" : t0;
|
|
80
|
+
const { locale: contextLocale, size: contextSize, disabled } = useTaoConfig();
|
|
81
|
+
let t1;
|
|
82
|
+
if ($[17] !== classNames || $[18] !== props) {
|
|
83
|
+
t1 = "function" == typeof classNames ? classNames({
|
|
84
|
+
props
|
|
85
|
+
}) : classNames;
|
|
86
|
+
$[17] = classNames;
|
|
87
|
+
$[18] = props;
|
|
88
|
+
$[19] = t1;
|
|
89
|
+
} else t1 = $[19];
|
|
90
|
+
const classes = t1;
|
|
91
|
+
let t2;
|
|
92
|
+
if ($[20] !== props || $[21] !== styles) {
|
|
93
|
+
t2 = "function" == typeof styles ? styles({
|
|
94
|
+
props
|
|
95
|
+
}) : styles;
|
|
96
|
+
$[20] = props;
|
|
97
|
+
$[21] = styles;
|
|
98
|
+
$[22] = t2;
|
|
99
|
+
} else t2 = $[22];
|
|
100
|
+
const semanticStyles = t2;
|
|
101
|
+
const chinese = contextLocale.locale?.startsWith("zh");
|
|
102
|
+
const CustomSelect = components?.sizeChanger ?? selectComponentClass;
|
|
103
|
+
let t3;
|
|
104
|
+
if ($[23] !== showSizeChanger) {
|
|
105
|
+
t3 = "object" == typeof showSizeChanger ? showSizeChanger : {};
|
|
106
|
+
$[23] = showSizeChanger;
|
|
107
|
+
$[24] = t3;
|
|
108
|
+
} else t3 = $[24];
|
|
109
|
+
const selectProps = t3;
|
|
110
|
+
const current = props.current ?? props.defaultCurrent ?? 1;
|
|
111
|
+
const totalPages = Math.max(1, Math.ceil((props.total ?? 0) / (props.pageSize ?? props.defaultPageSize ?? 10)));
|
|
112
|
+
const t4 = "default" === size ? "medium" : size ?? contextSize;
|
|
113
|
+
const t5 = responsive ? "" : void 0;
|
|
114
|
+
const t6 = props.disabled ?? disabled;
|
|
115
|
+
const t7 = chinese ? "\u6761/\u9875" : "/ page";
|
|
116
|
+
const t8 = chinese ? "\u8DF3\u81F3" : "Go to";
|
|
117
|
+
const t9 = chinese ? "\u786E\u5B9A" : "Go";
|
|
118
|
+
const t10 = chinese ? "\u9875" : "page";
|
|
119
|
+
const t11 = chinese ? "\u6BCF\u9875\u6761\u6570" : "Page size";
|
|
120
|
+
let t12;
|
|
121
|
+
if ($[25] !== contextLocale.next || $[26] !== contextLocale.previous || $[27] !== locale || $[28] !== t10 || $[29] !== t11 || $[30] !== t7 || $[31] !== t8 || $[32] !== t9) {
|
|
122
|
+
t12 = {
|
|
123
|
+
items_per_page: t7,
|
|
124
|
+
jump_to: t8,
|
|
125
|
+
jump_to_confirm: t9,
|
|
126
|
+
page: t10,
|
|
127
|
+
prev_page: contextLocale.previous,
|
|
128
|
+
next_page: contextLocale.next,
|
|
129
|
+
page_size: t11,
|
|
130
|
+
...locale
|
|
131
|
+
};
|
|
132
|
+
$[25] = contextLocale.next;
|
|
133
|
+
$[26] = contextLocale.previous;
|
|
134
|
+
$[27] = locale;
|
|
135
|
+
$[28] = t10;
|
|
136
|
+
$[29] = t11;
|
|
137
|
+
$[30] = t7;
|
|
138
|
+
$[31] = t8;
|
|
139
|
+
$[32] = t9;
|
|
140
|
+
$[33] = t12;
|
|
141
|
+
} else t12 = $[33];
|
|
142
|
+
const t13 = classes?.root;
|
|
143
|
+
let t14;
|
|
144
|
+
if ($[34] !== className || $[35] !== rootClassName || $[36] !== t13) {
|
|
145
|
+
t14 = cx(t13, rootClassName, className);
|
|
146
|
+
$[34] = className;
|
|
147
|
+
$[35] = rootClassName;
|
|
148
|
+
$[36] = t13;
|
|
149
|
+
$[37] = t14;
|
|
150
|
+
} else t14 = $[37];
|
|
151
|
+
const t15 = semanticStyles?.root;
|
|
152
|
+
let t16;
|
|
153
|
+
if ($[38] !== style || $[39] !== t15) {
|
|
154
|
+
t16 = {
|
|
155
|
+
...t15,
|
|
156
|
+
...style
|
|
157
|
+
};
|
|
158
|
+
$[38] = style;
|
|
159
|
+
$[39] = t15;
|
|
160
|
+
$[40] = t16;
|
|
161
|
+
} else t16 = $[40];
|
|
162
|
+
const t17 = classes?.item;
|
|
163
|
+
let t18;
|
|
164
|
+
if ($[41] !== t17) {
|
|
165
|
+
t18 = {
|
|
166
|
+
item: t17
|
|
167
|
+
};
|
|
168
|
+
$[41] = t17;
|
|
169
|
+
$[42] = t18;
|
|
170
|
+
} else t18 = $[42];
|
|
171
|
+
const t19 = semanticStyles?.item;
|
|
172
|
+
let t20;
|
|
173
|
+
if ($[43] !== t19) {
|
|
174
|
+
t20 = {
|
|
175
|
+
item: t19
|
|
176
|
+
};
|
|
177
|
+
$[43] = t19;
|
|
178
|
+
$[44] = t20;
|
|
179
|
+
} else t20 = $[44];
|
|
180
|
+
let t21;
|
|
181
|
+
if ($[45] !== pageSizeOptions) {
|
|
182
|
+
t21 = pageSizeOptions?.map(Number);
|
|
183
|
+
$[45] = pageSizeOptions;
|
|
184
|
+
$[46] = t21;
|
|
185
|
+
} else t21 = $[46];
|
|
186
|
+
const t22 = "object" == typeof showSizeChanger ? true : showSizeChanger;
|
|
187
|
+
let t23;
|
|
188
|
+
let t24;
|
|
189
|
+
let t25;
|
|
190
|
+
let t26;
|
|
191
|
+
if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
|
|
192
|
+
t23 = /*#__PURE__*/ jsx("span", {
|
|
193
|
+
"aria-hidden": "true",
|
|
194
|
+
children: "‹"
|
|
195
|
+
});
|
|
196
|
+
t24 = /*#__PURE__*/ jsx("span", {
|
|
197
|
+
"aria-hidden": "true",
|
|
198
|
+
children: "›"
|
|
199
|
+
});
|
|
200
|
+
t25 = /*#__PURE__*/ jsx("span", {
|
|
201
|
+
"aria-hidden": "true",
|
|
202
|
+
children: "…"
|
|
203
|
+
});
|
|
204
|
+
t26 = /*#__PURE__*/ jsx("span", {
|
|
205
|
+
"aria-hidden": "true",
|
|
206
|
+
children: "…"
|
|
207
|
+
});
|
|
208
|
+
$[47] = t23;
|
|
209
|
+
$[48] = t24;
|
|
210
|
+
$[49] = t25;
|
|
211
|
+
$[50] = t26;
|
|
212
|
+
} else {
|
|
213
|
+
t23 = $[47];
|
|
214
|
+
t24 = $[48];
|
|
215
|
+
t25 = $[49];
|
|
216
|
+
t26 = $[50];
|
|
217
|
+
}
|
|
218
|
+
let t27;
|
|
219
|
+
if ($[51] !== contextLocale.next || $[52] !== contextLocale.previous || $[53] !== current || $[54] !== disabled || $[55] !== itemRender || $[56] !== props.disabled || $[57] !== totalPages) {
|
|
220
|
+
t27 = itemRender ?? ((page, type)=>/*#__PURE__*/ jsx("button", {
|
|
221
|
+
type: "button",
|
|
222
|
+
"aria-label": "page" === type ? `Page ${page}` : "prev" === type ? contextLocale.previous : "next" === type ? contextLocale.next : "jump-prev" === type ? "Previous pages" : "Next pages",
|
|
223
|
+
"aria-current": "page" === type && page === current ? "page" : void 0,
|
|
224
|
+
disabled: !!(props.disabled ?? disabled) || page < 1 || page > totalPages,
|
|
225
|
+
children: "page" === type ? page : "prev" === type ? "\u2039" : "next" === type ? "\u203A" : "\u2026"
|
|
226
|
+
}));
|
|
227
|
+
$[51] = contextLocale.next;
|
|
228
|
+
$[52] = contextLocale.previous;
|
|
229
|
+
$[53] = current;
|
|
230
|
+
$[54] = disabled;
|
|
231
|
+
$[55] = itemRender;
|
|
232
|
+
$[56] = props.disabled;
|
|
233
|
+
$[57] = totalPages;
|
|
234
|
+
$[58] = t27;
|
|
235
|
+
} else t27 = $[58];
|
|
236
|
+
let t28;
|
|
237
|
+
if ($[59] !== CustomSelect || $[60] !== contextSize || $[61] !== selectProps || $[62] !== size || $[63] !== sizeChangerRender) {
|
|
238
|
+
t28 = sizeChangerRender ?? ((info)=>CustomSelect ? /*#__PURE__*/ jsx(CustomSelect, {
|
|
239
|
+
value: info.size,
|
|
240
|
+
onChange: info.onSizeChange,
|
|
241
|
+
disabled: info.disabled,
|
|
242
|
+
className: info.className
|
|
243
|
+
}) : /*#__PURE__*/ jsx(Select, {
|
|
244
|
+
...selectProps,
|
|
245
|
+
value: String(info.size),
|
|
246
|
+
onChange: (value, option)=>{
|
|
247
|
+
info.onSizeChange(Number(value));
|
|
248
|
+
selectProps.onChange?.(value, option);
|
|
249
|
+
},
|
|
250
|
+
options: info.options.map(_temp),
|
|
251
|
+
disabled: info.disabled,
|
|
252
|
+
size: "default" === size ? "medium" : size ?? contextSize,
|
|
253
|
+
"aria-label": info["aria-label"],
|
|
254
|
+
style: {
|
|
255
|
+
minWidth: 100,
|
|
256
|
+
...selectProps.style
|
|
257
|
+
}
|
|
258
|
+
}));
|
|
259
|
+
$[59] = CustomSelect;
|
|
260
|
+
$[60] = contextSize;
|
|
261
|
+
$[61] = selectProps;
|
|
262
|
+
$[62] = size;
|
|
263
|
+
$[63] = sizeChangerRender;
|
|
264
|
+
$[64] = t28;
|
|
265
|
+
} else t28 = $[64];
|
|
266
|
+
let t29;
|
|
267
|
+
if ($[65] !== prefixCls || $[66] !== rest || $[67] !== t12 || $[68] !== t14 || $[69] !== t16 || $[70] !== t18 || $[71] !== t20 || $[72] !== t21 || $[73] !== t22 || $[74] !== t27 || $[75] !== t28 || $[76] !== t6) {
|
|
268
|
+
t29 = /*#__PURE__*/ jsx(pagination, {
|
|
269
|
+
...rest,
|
|
270
|
+
prefixCls: prefixCls,
|
|
271
|
+
disabled: t6,
|
|
272
|
+
locale: t12,
|
|
273
|
+
className: t14,
|
|
274
|
+
style: t16,
|
|
275
|
+
classNames: t18,
|
|
276
|
+
styles: t20,
|
|
277
|
+
pageSizeOptions: t21,
|
|
278
|
+
showSizeChanger: t22,
|
|
279
|
+
prevIcon: t23,
|
|
280
|
+
nextIcon: t24,
|
|
281
|
+
jumpPrevIcon: t25,
|
|
282
|
+
jumpNextIcon: t26,
|
|
283
|
+
itemRender: t27,
|
|
284
|
+
sizeChangerRender: t28
|
|
285
|
+
});
|
|
286
|
+
$[65] = prefixCls;
|
|
287
|
+
$[66] = rest;
|
|
288
|
+
$[67] = t12;
|
|
289
|
+
$[68] = t14;
|
|
290
|
+
$[69] = t16;
|
|
291
|
+
$[70] = t18;
|
|
292
|
+
$[71] = t20;
|
|
293
|
+
$[72] = t21;
|
|
294
|
+
$[73] = t22;
|
|
295
|
+
$[74] = t27;
|
|
296
|
+
$[75] = t28;
|
|
297
|
+
$[76] = t6;
|
|
298
|
+
$[77] = t29;
|
|
299
|
+
} else t29 = $[77];
|
|
300
|
+
let t30;
|
|
301
|
+
if ($[78] !== t29 || $[79] !== t4 || $[80] !== t5) {
|
|
302
|
+
t30 = /*#__PURE__*/ jsx("div", {
|
|
303
|
+
"data-tao-list-pages": "",
|
|
304
|
+
"data-tao-size": t4,
|
|
305
|
+
"data-tao-responsive": t5,
|
|
306
|
+
children: t29
|
|
307
|
+
});
|
|
308
|
+
$[78] = t29;
|
|
309
|
+
$[79] = t4;
|
|
310
|
+
$[80] = t5;
|
|
311
|
+
$[81] = t30;
|
|
312
|
+
} else t30 = $[81];
|
|
313
|
+
return t30;
|
|
314
|
+
}
|
|
315
|
+
function _temp(option_0) {
|
|
316
|
+
return {
|
|
317
|
+
...option_0,
|
|
318
|
+
value: String(option_0.value)
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
export { ListPaginationControl };
|