@sdata/web-vue 1.6.0 → 1.7.0
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 +5 -6
- package/dist/sd.css +13859 -13697
- package/dist/sd.min.css +1 -1
- package/dist/sd.scss +2 -0
- package/es/_components/auto-tooltip/style/index.css +1 -1
- package/es/_components/auto-tooltip/style/index.d.ts +1 -1
- package/es/_components/auto-tooltip/style/index.js +1 -1
- package/es/_components/auto-tooltip/style/index.scss +11 -0
- package/es/_components/input-label/style/index.css +18 -21
- package/es/_components/input-label/style/index.d.ts +1 -1
- package/es/_components/input-label/style/index.js +1 -1
- package/es/_components/input-label/style/index.scss +9 -0
- package/es/_components/input-label/style/input-label.scss +127 -0
- package/es/_components/input-label/style/token.scss +1 -0
- package/es/_components/picker/style/index.scss +197 -0
- package/es/_components/picker/style/token.scss +70 -0
- package/es/_components/select-view/style/index.css +160 -217
- package/es/_components/select-view/style/index.d.ts +1 -1
- package/es/_components/select-view/style/index.js +1 -1
- package/es/_components/select-view/style/index.scss +60 -0
- package/es/_components/select-view/style/token.scss +10 -0
- package/es/affix/style/index.css +1 -1
- package/es/affix/style/index.d.ts +2 -2
- package/es/affix/style/index.js +2 -2
- package/es/affix/style/index.scss +9 -0
- package/es/alert/style/index.css +1 -1
- package/es/alert/style/index.d.ts +2 -2
- package/es/alert/style/index.js +2 -2
- package/es/alert/style/index.scss +199 -0
- package/es/alert/style/token.scss +82 -0
- package/es/anchor/style/index.css +2 -2
- package/es/anchor/style/index.d.ts +2 -2
- package/es/anchor/style/index.js +2 -2
- package/es/anchor/style/index.scss +103 -0
- package/es/anchor/style/token.scss +36 -0
- package/es/auto-complete/style/index.css +3 -1
- package/es/auto-complete/style/index.d.ts +2 -2
- package/es/auto-complete/style/index.js +2 -2
- package/es/auto-complete/style/index.scss +78 -0
- package/es/auto-complete/style/token.scss +64 -0
- package/es/avatar/style/index.css +2 -2
- package/es/avatar/style/index.d.ts +2 -2
- package/es/avatar/style/index.js +2 -2
- package/es/avatar/style/index.scss +161 -0
- package/es/avatar/style/token.scss +57 -0
- package/es/back-top/style/index.css +1 -1
- package/es/back-top/style/index.d.ts +2 -2
- package/es/back-top/style/index.js +2 -2
- package/es/back-top/style/index.scss +34 -0
- package/es/back-top/style/token.scss +25 -0
- package/es/badge/style/index.css +9 -14
- package/es/badge/style/index.d.ts +2 -2
- package/es/badge/style/index.js +2 -2
- package/es/badge/style/index.scss +230 -0
- package/es/badge/style/token.scss +64 -0
- package/es/breadcrumb/style/index.css +1 -1
- package/es/breadcrumb/style/index.d.ts +2 -2
- package/es/breadcrumb/style/index.js +2 -2
- package/es/breadcrumb/style/index.scss +78 -0
- package/es/breadcrumb/style/token.scss +43 -0
- package/es/button/style/index.css +110 -69
- package/es/button/style/index.d.ts +2 -2
- package/es/button/style/index.js +2 -2
- package/es/button/style/index.scss +600 -0
- package/es/button/style/token.scss +469 -0
- package/es/calendar/style/index.css +8 -10
- package/es/calendar/style/index.d.ts +2 -2
- package/es/calendar/style/index.js +2 -2
- package/es/calendar/style/{index.less → index.scss} +77 -74
- package/es/calendar/style/token.scss +65 -0
- package/es/card/style/index.css +9 -8
- package/es/card/style/index.d.ts +2 -2
- package/es/card/style/index.js +2 -2
- package/es/card/style/index.scss +270 -0
- package/es/card/style/token.scss +75 -0
- package/es/carousel/style/index.css +19 -24
- package/es/carousel/style/index.d.ts +2 -2
- package/es/carousel/style/index.js +2 -2
- package/es/carousel/style/index.scss +412 -0
- package/es/carousel/style/{slide.less → slide.scss} +19 -16
- package/es/carousel/style/token.scss +44 -0
- package/es/cascader/style/index.css +38 -56
- package/es/cascader/style/index.d.ts +2 -2
- package/es/cascader/style/index.js +2 -2
- package/es/cascader/style/index.scss +242 -0
- package/es/cascader/style/token.scss +51 -0
- package/es/checkbox/style/index.css +13 -15
- package/es/checkbox/style/index.d.ts +2 -2
- package/es/checkbox/style/index.js +2 -2
- package/es/checkbox/style/index.scss +186 -0
- package/es/checkbox/style/token.scss +70 -0
- package/es/collapse/style/index.css +6 -2
- package/es/collapse/style/index.d.ts +2 -2
- package/es/collapse/style/index.js +2 -2
- package/es/collapse/style/index.scss +183 -0
- package/es/collapse/style/token.scss +67 -0
- package/es/color-picker/style/index.css +7 -4
- package/es/color-picker/style/index.d.ts +2 -2
- package/es/color-picker/style/index.js +2 -2
- package/es/color-picker/style/index.scss +411 -0
- package/es/color-picker/style/token.scss +102 -0
- package/es/comment/style/index.css +2 -3
- package/es/comment/style/index.d.ts +2 -2
- package/es/comment/style/index.js +2 -2
- package/es/comment/style/index.scss +69 -0
- package/es/comment/style/token.scss +35 -0
- package/es/config-provider/config-provider.js +14 -2
- package/es/config-provider/config-provider.vue.d.ts +62 -2
- package/es/config-provider/config-provider.vue_vue_type_script_lang.js +17 -4
- package/es/config-provider/context.d.ts +2 -0
- package/es/config-provider/index.d.ts +116 -4
- package/es/config-provider/theme-provider.js +7 -0
- package/es/config-provider/theme-provider.vue.d.ts +26 -0
- package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +108 -0
- package/es/config-provider/theme.d.ts +27 -0
- package/es/config-provider/theme.js +90 -0
- package/es/date-picker/style/date.scss +133 -0
- package/es/date-picker/style/index.css +206 -46
- package/es/date-picker/style/index.d.ts +3 -3
- package/es/date-picker/style/index.js +3 -3
- package/es/date-picker/style/index.scss +318 -0
- package/es/date-picker/style/month.scss +34 -0
- package/es/date-picker/style/quarter.scss +12 -0
- package/es/date-picker/style/range.scss +12 -0
- package/es/date-picker/style/shortcuts.scss +29 -0
- package/es/date-picker/style/token.scss +86 -0
- package/es/date-picker/style/week.scss +72 -0
- package/es/date-picker/style/year.scss +12 -0
- package/es/descriptions/style/index.css +13 -27
- package/es/descriptions/style/index.d.ts +2 -2
- package/es/descriptions/style/index.js +2 -2
- package/es/descriptions/style/index.scss +217 -0
- package/es/descriptions/style/token.scss +83 -0
- package/es/divider/style/index.css +1 -1
- package/es/divider/style/index.d.ts +2 -2
- package/es/divider/style/index.js +2 -2
- package/es/divider/style/index.scss +58 -0
- package/es/divider/style/token.scss +31 -0
- package/es/drawer/style/index.css +35 -1
- package/es/drawer/style/index.d.ts +2 -2
- package/es/drawer/style/index.js +2 -2
- package/es/drawer/style/{index.less → index.scss} +40 -37
- package/es/drawer/style/token.scss +31 -0
- package/es/dropdown/style/index.css +2 -3
- package/es/dropdown/style/index.d.ts +2 -2
- package/es/dropdown/style/index.js +2 -2
- package/es/dropdown/style/index.scss +109 -0
- package/es/dropdown/style/token.scss +45 -0
- package/es/ellipsis/style/index.css +1 -1
- package/es/ellipsis/style/index.d.ts +2 -2
- package/es/ellipsis/style/index.js +2 -2
- package/es/ellipsis/style/{index.less → index.scss} +5 -4
- package/es/ellipsis/style/token.scss +5 -0
- package/es/empty/style/index.css +1 -1
- package/es/empty/style/index.d.ts +2 -2
- package/es/empty/style/index.js +2 -2
- package/es/empty/style/index.scss +28 -0
- package/es/empty/style/token.scss +21 -0
- package/es/form/style/index.css +36 -21
- package/es/form/style/index.d.ts +2 -2
- package/es/form/style/index.js +2 -2
- package/es/form/style/index.scss +257 -0
- package/es/form/style/status.scss +210 -0
- package/es/form/style/token.scss +139 -0
- package/es/grid/style/col.scss +112 -0
- package/es/grid/style/grid.scss +8 -0
- package/es/grid/style/index.css +291 -526
- package/es/grid/style/index.d.ts +2 -2
- package/es/grid/style/index.js +2 -2
- package/es/grid/style/index.scss +3 -0
- package/es/grid/style/{row.less → row.scss} +4 -3
- package/es/image/style/image.scss +161 -0
- package/es/image/style/index.css +15 -14
- package/es/image/style/index.d.ts +2 -2
- package/es/image/style/index.js +2 -2
- package/es/image/style/index.scss +5 -0
- package/es/image/style/preview.scss +231 -0
- package/es/image/style/token.scss +139 -0
- package/es/image/style/trigger.scss +17 -0
- package/es/index.css +13859 -13697
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -1
- package/es/index.scss +77 -0
- package/es/input/style/group.scss +66 -0
- package/es/input/style/index.css +140 -37
- package/es/input/style/index.d.ts +2 -2
- package/es/input/style/index.js +2 -2
- package/es/input/style/index.scss +114 -0
- package/es/input/style/input.scss +258 -0
- package/es/input/style/password.scss +15 -0
- package/es/input/style/search.scss +22 -0
- package/es/input/style/size.scss +166 -0
- package/es/input/style/textarea.scss +42 -0
- package/es/input/style/token.scss +139 -0
- package/es/input-number/style/index.css +9 -14
- package/es/input-number/style/index.d.ts +2 -2
- package/es/input-number/style/index.js +2 -2
- package/es/input-number/style/index.scss +167 -0
- package/es/input-number/style/token.scss +53 -0
- package/es/input-tag/style/index.css +132 -177
- package/es/input-tag/style/index.d.ts +2 -2
- package/es/input-tag/style/index.js +2 -2
- package/es/input-tag/style/index.scss +42 -0
- package/es/input-tag/style/input-tag.scss +306 -0
- package/es/input-tag/style/token.scss +97 -0
- package/es/layout/index.d.ts +1 -1
- package/es/layout/sider.vue.d.ts +1 -1
- package/es/layout/style/index.css +2 -1
- package/es/layout/style/index.d.ts +2 -2
- package/es/layout/style/index.js +2 -2
- package/es/layout/style/{index.less → index.scss} +19 -17
- package/es/layout/style/token.scss +21 -0
- package/es/link/style/index.css +2 -3
- package/es/link/style/index.d.ts +2 -2
- package/es/link/style/index.js +2 -2
- package/es/link/style/index.scss +123 -0
- package/es/link/style/token.scss +77 -0
- package/es/list/style/index.css +3 -4
- package/es/list/style/index.d.ts +2 -2
- package/es/list/style/index.js +2 -2
- package/es/list/style/index.scss +228 -0
- package/es/list/style/token.scss +61 -0
- package/es/mention/style/index.css +1 -1
- package/es/mention/style/index.d.ts +2 -2
- package/es/mention/style/index.js +2 -2
- package/es/mention/style/{index.less → index.scss} +5 -3
- package/es/mention/style/token.scss +14 -0
- package/es/menu/base-menu.vue.d.ts +1 -1
- package/es/menu/menu.d.ts +1 -1
- package/es/menu/style/index.css +48 -48
- package/es/menu/style/index.d.ts +2 -2
- package/es/menu/style/index.js +2 -2
- package/es/menu/style/index.scss +726 -0
- package/es/menu/style/token.scss +145 -0
- package/es/menu/sub-menu-pop.vue.d.ts +1 -1
- package/es/message/style/index.css +10 -1
- package/es/message/style/index.d.ts +2 -2
- package/es/message/style/index.js +2 -2
- package/es/message/style/index.scss +196 -0
- package/es/message/style/token.scss +89 -0
- package/es/modal/style/index.css +19 -2
- package/es/modal/style/index.d.ts +2 -2
- package/es/modal/style/index.js +2 -2
- package/es/modal/style/index.scss +276 -0
- package/es/modal/style/token.scss +57 -0
- package/es/notification/style/index.css +14 -1
- package/es/notification/style/index.d.ts +2 -2
- package/es/notification/style/index.js +2 -2
- package/es/notification/style/index.scss +249 -0
- package/es/notification/style/token.scss +133 -0
- package/es/overflow-list/style/index.css +1 -1
- package/es/overflow-list/style/index.d.ts +2 -2
- package/es/overflow-list/style/index.js +2 -2
- package/es/overflow-list/style/{index.less → index.scss} +4 -3
- package/es/page-header/style/index.css +1 -1
- package/es/page-header/style/index.d.ts +2 -2
- package/es/page-header/style/index.js +2 -2
- package/es/page-header/style/index.scss +128 -0
- package/es/page-header/style/token.scss +63 -0
- package/es/pagination/style/index.css +22 -34
- package/es/pagination/style/index.d.ts +2 -2
- package/es/pagination/style/index.js +2 -2
- package/es/pagination/style/index.scss +371 -0
- package/es/pagination/style/token.scss +97 -0
- package/es/popconfirm/style/index.css +1 -1
- package/es/popconfirm/style/index.d.ts +2 -2
- package/es/popconfirm/style/index.js +2 -2
- package/es/popconfirm/style/index.scss +73 -0
- package/es/popconfirm/style/token.scss +26 -0
- package/es/popover/style/index.css +1 -1
- package/es/popover/style/index.d.ts +2 -2
- package/es/popover/style/index.js +2 -2
- package/es/popover/style/index.scss +41 -0
- package/es/popover/style/token.scss +33 -0
- package/es/progress/style/index.css +8 -10
- package/es/progress/style/index.d.ts +2 -2
- package/es/progress/style/index.js +2 -2
- package/es/progress/style/index.scss +380 -0
- package/es/progress/style/token.scss +119 -0
- package/es/radio/style/index.css +21 -18
- package/es/radio/style/index.d.ts +2 -2
- package/es/radio/style/index.js +2 -2
- package/es/radio/style/index.scss +271 -0
- package/es/radio/style/token.scss +108 -0
- package/es/rate/style/index.css +5 -7
- package/es/rate/style/index.d.ts +2 -2
- package/es/rate/style/index.js +2 -2
- package/es/rate/style/{index.less → index.scss} +18 -15
- package/es/rate/style/token.scss +24 -0
- package/es/resize-box/style/index.css +3 -5
- package/es/resize-box/style/index.d.ts +2 -2
- package/es/resize-box/style/index.js +2 -2
- package/es/resize-box/style/{index.less → index.scss} +11 -9
- package/es/resize-box/style/token.scss +14 -0
- package/es/result/style/index.css +3 -7
- package/es/result/style/index.d.ts +2 -2
- package/es/result/style/index.js +2 -2
- package/es/result/style/index.scss +130 -0
- package/es/result/style/token.scss +65 -0
- package/es/scrollbar/style/index.css +6 -5
- package/es/scrollbar/style/index.d.ts +2 -2
- package/es/scrollbar/style/index.js +2 -2
- package/es/scrollbar/style/index.scss +133 -0
- package/es/scrollbar/style/token.scss +25 -0
- package/es/sd-vue.js +2 -0
- package/es/select/style/index.css +2 -3
- package/es/select/style/index.d.ts +2 -2
- package/es/select/style/index.js +2 -2
- package/es/select/style/index.scss +135 -0
- package/es/select/style/token.scss +67 -0
- package/es/skeleton/style/index.css +2 -1
- package/es/skeleton/style/index.d.ts +2 -2
- package/es/skeleton/style/index.js +2 -2
- package/es/skeleton/style/index.scss +68 -0
- package/es/skeleton/style/token.scss +27 -0
- package/es/slider/style/index.css +5 -6
- package/es/slider/style/index.d.ts +2 -2
- package/es/slider/style/index.js +2 -2
- package/es/slider/style/index.scss +282 -0
- package/es/slider/style/token.scss +60 -0
- package/es/space/style/index.css +1 -1
- package/es/space/style/index.d.ts +2 -2
- package/es/space/style/index.js +2 -2
- package/es/space/style/{index.less → index.scss} +6 -5
- package/es/spin/style/dot-loading.scss +64 -0
- package/es/spin/style/index.css +66 -67
- package/es/spin/style/index.d.ts +2 -2
- package/es/spin/style/index.js +2 -2
- package/es/spin/style/index.scss +55 -0
- package/es/spin/style/token.scss +32 -0
- package/es/split/style/index.css +2 -1
- package/es/split/style/index.d.ts +2 -2
- package/es/split/style/index.js +2 -2
- package/es/split/style/index.scss +56 -0
- package/es/split/style/token.scss +21 -0
- package/es/statistic/style/index.css +1 -1
- package/es/statistic/style/index.d.ts +2 -2
- package/es/statistic/style/index.js +2 -2
- package/es/statistic/style/index.scss +49 -0
- package/es/statistic/style/token.scss +33 -0
- package/es/steps/style/arrow.scss +207 -0
- package/es/steps/style/circle.scss +268 -0
- package/es/steps/style/dot.scss +206 -0
- package/es/steps/style/index.css +16 -9
- package/es/steps/style/index.d.ts +2 -2
- package/es/steps/style/index.js +2 -2
- package/es/steps/style/index.scss +77 -0
- package/es/steps/style/navigation.scss +61 -0
- package/es/steps/style/token.scss +207 -0
- package/es/style/animation/{fade.less → fade.scss} +5 -5
- package/es/style/animation/index.scss +3 -0
- package/es/style/animation/{slide.less → slide.scss} +13 -13
- package/es/style/animation/{zoom.less → zoom.scss} +25 -25
- package/es/style/base.scss +18 -0
- package/es/style/color/colors.scss +405 -0
- package/es/style/color/css-variables.scss +405 -0
- package/es/style/icon.scss +89 -0
- package/es/style/index.scss +11 -0
- package/es/style/mixins/icon-hover.scss +14 -0
- package/es/style/mixins/index.scss +15 -0
- package/es/style/normalize.scss +227 -0
- package/es/style/theme/_functions.scss +15 -0
- package/es/style/theme/_legacy-token-aliases.scss +23 -0
- package/es/style/theme/_mixins.scss +9 -0
- package/es/style/theme/_tokens.scss +18 -0
- package/es/style/theme/component.scss +21 -0
- package/es/style/theme/css-variables.scss +146 -0
- package/es/style/theme/global.scss +390 -0
- package/es/style/theme/index.scss +66 -0
- package/es/style/theme/legacy-less-var.scss +15 -0
- package/es/style/theme.scss +1 -0
- package/es/switch/style/index.css +12 -4
- package/es/switch/style/index.d.ts +2 -2
- package/es/switch/style/index.js +2 -2
- package/es/switch/style/index.scss +327 -0
- package/es/switch/style/token.scss +68 -0
- package/es/table/style/{filters-popup.less → filters-popup.scss} +13 -9
- package/es/table/style/index.css +46 -56
- package/es/table/style/index.d.ts +2 -2
- package/es/table/style/index.js +2 -2
- package/es/table/style/index.scss +973 -0
- package/es/table/style/token.scss +142 -0
- package/es/tabs/style/index.css +125 -76
- package/es/tabs/style/index.d.ts +2 -2
- package/es/tabs/style/index.js +2 -2
- package/es/tabs/style/index.scss +843 -0
- package/es/tabs/style/rtl.scss +107 -0
- package/es/tabs/style/token.scss +241 -0
- package/es/tabs/style/vertical.scss +160 -0
- package/es/tag/style/index.css +117 -170
- package/es/tag/style/index.d.ts +2 -2
- package/es/tag/style/index.js +2 -2
- package/es/tag/style/index.scss +324 -0
- package/es/tag/style/token.scss +181 -0
- package/es/textarea/style/index.css +25 -19
- package/es/textarea/style/index.d.ts +2 -2
- package/es/textarea/style/index.js +2 -2
- package/es/textarea/style/index.scss +66 -0
- package/es/theme-provider/index.d.ts +53 -0
- package/es/theme-provider/index.js +10 -0
- package/es/time-picker/style/index.css +2 -2
- package/es/time-picker/style/index.d.ts +3 -3
- package/es/time-picker/style/index.js +3 -3
- package/es/time-picker/style/index.scss +96 -0
- package/es/time-picker/style/token.scss +33 -0
- package/es/timeline/style/horizontal.scss +92 -0
- package/es/timeline/style/index.css +39 -1
- package/es/timeline/style/index.d.ts +2 -2
- package/es/timeline/style/index.js +2 -2
- package/es/timeline/style/index.scss +275 -0
- package/es/timeline/style/token.scss +45 -0
- package/es/tooltip/style/index.css +1 -1
- package/es/tooltip/style/index.d.ts +2 -2
- package/es/tooltip/style/index.js +2 -2
- package/es/tooltip/style/index.scss +25 -0
- package/es/tooltip/style/token.scss +25 -0
- package/es/transfer/style/index.css +3 -2
- package/es/transfer/style/index.d.ts +2 -2
- package/es/transfer/style/index.js +2 -2
- package/es/transfer/style/index.scss +298 -0
- package/es/transfer/style/token.scss +91 -0
- package/es/tree/style/index.css +18 -18
- package/es/tree/style/index.d.ts +2 -2
- package/es/tree/style/index.js +2 -2
- package/es/tree/style/index.scss +433 -0
- package/es/tree/style/token.scss +99 -0
- package/es/tree-select/style/index.css +1 -1
- package/es/tree-select/style/index.d.ts +3 -3
- package/es/tree-select/style/index.js +3 -3
- package/es/tree-select/style/index.scss +53 -0
- package/es/tree-select/style/token.scss +16 -0
- package/es/trigger/style/index.css +6 -14
- package/es/trigger/style/index.d.ts +2 -2
- package/es/trigger/style/index.js +2 -2
- package/es/trigger/style/{index.less → index.scss} +13 -11
- package/es/trigger/style/token.scss +13 -0
- package/es/typography/style/index.css +19 -21
- package/es/typography/style/index.d.ts +2 -2
- package/es/typography/style/index.js +2 -2
- package/es/typography/style/index.scss +208 -0
- package/es/typography/style/token.scss +73 -0
- package/es/upload/style/index.css +28 -19
- package/es/upload/style/index.d.ts +2 -2
- package/es/upload/style/index.js +2 -2
- package/es/upload/style/index.scss +503 -0
- package/es/upload/style/token.scss +212 -0
- package/es/verification-code/style/index.css +2 -1
- package/es/verification-code/style/index.d.ts +2 -2
- package/es/verification-code/style/index.js +2 -2
- package/es/verification-code/style/index.scss +34 -0
- package/es/verification-code/style/token.scss +1 -0
- package/es/watermark/style/index.d.ts +1 -1
- package/es/watermark/style/index.js +1 -1
- package/es/web-vue.css +5 -0
- package/json/vetur-attributes.json +6 -0
- package/json/vetur-tags.json +6 -1
- package/json/web-types.json +23 -1
- package/package.json +7 -8
- package/dist/sd.less +0 -2
- package/es/_components/auto-tooltip/style/index.less +0 -10
- package/es/_components/input-label/style/index.less +0 -7
- package/es/_components/input-label/style/input-label.less +0 -70
- package/es/_components/input-label/style/token.less +0 -0
- package/es/_components/picker/style/index.css +0 -186
- package/es/_components/picker/style/index.less +0 -190
- package/es/_components/picker/style/token.less +0 -51
- package/es/_components/select-view/style/index.less +0 -58
- package/es/_components/select-view/style/token.less +0 -5
- package/es/affix/style/index.less +0 -8
- package/es/alert/style/index.less +0 -197
- package/es/alert/style/token.less +0 -66
- package/es/anchor/style/index.less +0 -101
- package/es/anchor/style/token.less +0 -30
- package/es/auto-complete/style/index.less +0 -44
- package/es/auto-complete/style/token.less +0 -42
- package/es/avatar/style/index.less +0 -153
- package/es/avatar/style/token.less +0 -47
- package/es/back-top/style/index.less +0 -32
- package/es/back-top/style/token.less +0 -19
- package/es/badge/style/index.less +0 -178
- package/es/badge/style/token.less +0 -55
- package/es/breadcrumb/style/index.less +0 -76
- package/es/breadcrumb/style/token.less +0 -37
- package/es/button/style/index.less +0 -303
- package/es/button/style/token.less +0 -335
- package/es/calendar/style/token.less +0 -39
- package/es/card/style/index.less +0 -216
- package/es/card/style/token.less +0 -69
- package/es/carousel/style/index.less +0 -399
- package/es/carousel/style/token.less +0 -33
- package/es/cascader/style/index.less +0 -234
- package/es/cascader/style/token.less +0 -39
- package/es/checkbox/style/index.less +0 -178
- package/es/checkbox/style/token.less +0 -57
- package/es/collapse/style/index.less +0 -177
- package/es/collapse/style/token.less +0 -57
- package/es/color-picker/style/index.less +0 -310
- package/es/color-picker/style/token.less +0 -93
- package/es/comment/style/index.less +0 -66
- package/es/comment/style/token.less +0 -29
- package/es/date-picker/style/date.less +0 -128
- package/es/date-picker/style/index.less +0 -313
- package/es/date-picker/style/month.less +0 -30
- package/es/date-picker/style/quarter.less +0 -8
- package/es/date-picker/style/range.less +0 -9
- package/es/date-picker/style/shortcuts.less +0 -25
- package/es/date-picker/style/token.less +0 -56
- package/es/date-picker/style/week.less +0 -70
- package/es/date-picker/style/year.less +0 -8
- package/es/descriptions/style/index.less +0 -158
- package/es/descriptions/style/token.less +0 -75
- package/es/divider/style/index.less +0 -56
- package/es/divider/style/token.less +0 -25
- package/es/drawer/style/token.less +0 -25
- package/es/dropdown/style/index.less +0 -106
- package/es/dropdown/style/token.less +0 -40
- package/es/ellipsis/style/token.less +0 -5
- package/es/empty/style/index.less +0 -26
- package/es/empty/style/token.less +0 -15
- package/es/form/style/index.less +0 -256
- package/es/form/style/status.less +0 -157
- package/es/form/style/token.less +0 -121
- package/es/grid/style/col.less +0 -95
- package/es/grid/style/grid.less +0 -5
- package/es/grid/style/index.less +0 -3
- package/es/image/style/image.less +0 -157
- package/es/image/style/index.less +0 -5
- package/es/image/style/preview.less +0 -224
- package/es/image/style/token.less +0 -119
- package/es/image/style/trigger.less +0 -13
- package/es/index.less +0 -77
- package/es/input/style/group.less +0 -62
- package/es/input/style/index.less +0 -119
- package/es/input/style/input.less +0 -184
- package/es/input/style/password.less +0 -11
- package/es/input/style/search.less +0 -18
- package/es/input/style/size.less +0 -149
- package/es/input/style/textarea.less +0 -37
- package/es/input/style/token.less +0 -125
- package/es/input-number/style/index.less +0 -162
- package/es/input-number/style/token.less +0 -31
- package/es/input-tag/style/index.less +0 -40
- package/es/input-tag/style/input-tag.less +0 -129
- package/es/input-tag/style/token.less +0 -83
- package/es/layout/style/token.less +0 -13
- package/es/link/style/index.less +0 -120
- package/es/link/style/token.less +0 -59
- package/es/list/style/index.less +0 -181
- package/es/list/style/token.less +0 -55
- package/es/mention/style/token.less +0 -9
- package/es/menu/style/index.less +0 -618
- package/es/menu/style/token.less +0 -117
- package/es/message/style/index.less +0 -190
- package/es/message/style/token.less +0 -83
- package/es/modal/style/index.less +0 -269
- package/es/modal/style/token.less +0 -51
- package/es/notification/style/index.less +0 -245
- package/es/notification/style/token.less +0 -97
- package/es/page-header/style/index.less +0 -123
- package/es/page-header/style/token.less +0 -53
- package/es/pagination/style/index.less +0 -298
- package/es/pagination/style/token.less +0 -73
- package/es/popconfirm/style/index.less +0 -70
- package/es/popconfirm/style/token.less +0 -20
- package/es/popover/style/index.less +0 -38
- package/es/popover/style/token.less +0 -27
- package/es/progress/style/index.less +0 -379
- package/es/progress/style/token.less +0 -105
- package/es/radio/style/index.less +0 -266
- package/es/radio/style/token.less +0 -93
- package/es/rate/style/token.less +0 -18
- package/es/resize-box/style/token.less +0 -6
- package/es/result/style/index.less +0 -93
- package/es/result/style/token.less +0 -51
- package/es/scrollbar/style/index.less +0 -131
- package/es/scrollbar/style/token.less +0 -17
- package/es/select/style/index.less +0 -132
- package/es/select/style/token.less +0 -43
- package/es/skeleton/style/index.less +0 -65
- package/es/skeleton/style/token.less +0 -21
- package/es/slider/style/index.less +0 -277
- package/es/slider/style/token.less +0 -50
- package/es/spin/style/dot-loading.less +0 -63
- package/es/spin/style/index.less +0 -52
- package/es/spin/style/token.less +0 -27
- package/es/split/style/index.less +0 -53
- package/es/split/style/token.less +0 -10
- package/es/statistic/style/index.less +0 -47
- package/es/statistic/style/token.less +0 -27
- package/es/steps/style/arrow.less +0 -201
- package/es/steps/style/circle.less +0 -263
- package/es/steps/style/dot.less +0 -202
- package/es/steps/style/index.less +0 -74
- package/es/steps/style/navigation.less +0 -56
- package/es/steps/style/token.less +0 -143
- package/es/style/animation/index.css +0 -328
- package/es/style/animation/index.less +0 -3
- package/es/style/color/colors.less +0 -427
- package/es/style/color/css-variables.less +0 -389
- package/es/style/color/get-rgb-str.d.ts +0 -1
- package/es/style/color/get-rgb-str.js +0 -17
- package/es/style/icon.less +0 -86
- package/es/style/index.css +0 -1236
- package/es/style/index.less +0 -10
- package/es/style/mixins/icon-hover.less +0 -14
- package/es/style/mixins/index.css +0 -17
- package/es/style/mixins/index.less +0 -13
- package/es/style/normalize.less +0 -353
- package/es/style/theme/component.less +0 -21
- package/es/style/theme/css-variables.less +0 -126
- package/es/style/theme/global.less +0 -382
- package/es/style/theme/index.css +0 -17
- package/es/style/theme/index.less +0 -43
- package/es/switch/style/index.less +0 -322
- package/es/switch/style/token.less +0 -48
- package/es/table/style/index.less +0 -875
- package/es/table/style/token.less +0 -115
- package/es/tabs/style/index.less +0 -700
- package/es/tabs/style/rtl.less +0 -103
- package/es/tabs/style/token.less +0 -223
- package/es/tabs/style/vertical.less +0 -156
- package/es/tag/style/index.less +0 -170
- package/es/tag/style/token.less +0 -153
- package/es/textarea/style/index.less +0 -64
- package/es/time-picker/style/index.less +0 -93
- package/es/time-picker/style/token.less +0 -25
- package/es/timeline/style/horizontal.less +0 -87
- package/es/timeline/style/index.less +0 -271
- package/es/timeline/style/token.less +0 -39
- package/es/tooltip/style/index.less +0 -24
- package/es/tooltip/style/token.less +0 -19
- package/es/transfer/style/index.less +0 -294
- package/es/transfer/style/token.less +0 -79
- package/es/tree/style/index.less +0 -379
- package/es/tree/style/token.less +0 -89
- package/es/tree-select/style/index.less +0 -49
- package/es/tree-select/style/token.less +0 -9
- package/es/trigger/style/token.less +0 -7
- package/es/typography/style/index.less +0 -204
- package/es/typography/style/token.less +0 -55
- package/es/upload/style/index.less +0 -500
- package/es/upload/style/token.less +0 -181
- package/es/verification-code/style/index.less +0 -32
- package/es/verification-code/style/token.less +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import { Size } from '../_utils/constant';
|
|
3
3
|
import { SDLang } from '../locale/interface';
|
|
4
|
+
import { SDThemeConfig, SDThemeMode } from './theme';
|
|
4
5
|
declare const _default: typeof __VLS_export;
|
|
5
6
|
export default _default;
|
|
6
7
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -34,7 +35,13 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
34
35
|
type: BooleanConstructor;
|
|
35
36
|
default: boolean;
|
|
36
37
|
};
|
|
37
|
-
|
|
38
|
+
theme: {
|
|
39
|
+
type: PropType<SDThemeConfig>;
|
|
40
|
+
};
|
|
41
|
+
themeMode: {
|
|
42
|
+
type: PropType<SDThemeMode>;
|
|
43
|
+
};
|
|
44
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
45
|
prefixCls: {
|
|
39
46
|
type: StringConstructor;
|
|
40
47
|
default: string;
|
|
@@ -65,6 +72,12 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
65
72
|
type: BooleanConstructor;
|
|
66
73
|
default: boolean;
|
|
67
74
|
};
|
|
75
|
+
theme: {
|
|
76
|
+
type: PropType<SDThemeConfig>;
|
|
77
|
+
};
|
|
78
|
+
themeMode: {
|
|
79
|
+
type: PropType<SDThemeMode>;
|
|
80
|
+
};
|
|
68
81
|
}>> & Readonly<{}>, {
|
|
69
82
|
prefixCls: string;
|
|
70
83
|
updateAtScroll: boolean;
|
|
@@ -72,4 +85,51 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
72
85
|
rtl: boolean;
|
|
73
86
|
global: boolean;
|
|
74
87
|
exchangeTime: boolean;
|
|
75
|
-
}, {}, {
|
|
88
|
+
}, {}, {
|
|
89
|
+
ThemeProvider: {
|
|
90
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
91
|
+
theme?: SDThemeConfig;
|
|
92
|
+
themeMode?: SDThemeMode;
|
|
93
|
+
global?: boolean;
|
|
94
|
+
tag?: string;
|
|
95
|
+
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
96
|
+
themeMode: SDThemeMode;
|
|
97
|
+
global: boolean;
|
|
98
|
+
tag: string;
|
|
99
|
+
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
100
|
+
P: {};
|
|
101
|
+
B: {};
|
|
102
|
+
D: {};
|
|
103
|
+
C: {};
|
|
104
|
+
M: {};
|
|
105
|
+
Defaults: {};
|
|
106
|
+
}, Readonly<{
|
|
107
|
+
theme?: SDThemeConfig;
|
|
108
|
+
themeMode?: SDThemeMode;
|
|
109
|
+
global?: boolean;
|
|
110
|
+
tag?: string;
|
|
111
|
+
}> & Readonly<{}>, {}, {}, {}, {}, {
|
|
112
|
+
themeMode: SDThemeMode;
|
|
113
|
+
global: boolean;
|
|
114
|
+
tag: string;
|
|
115
|
+
}>;
|
|
116
|
+
__isFragment?: never;
|
|
117
|
+
__isTeleport?: never;
|
|
118
|
+
__isSuspense?: never;
|
|
119
|
+
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
120
|
+
theme?: SDThemeConfig;
|
|
121
|
+
themeMode?: SDThemeMode;
|
|
122
|
+
global?: boolean;
|
|
123
|
+
tag?: string;
|
|
124
|
+
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
125
|
+
themeMode: SDThemeMode;
|
|
126
|
+
global: boolean;
|
|
127
|
+
tag: string;
|
|
128
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
129
|
+
$slots: {
|
|
130
|
+
default?: (props: {}) => any;
|
|
131
|
+
} & {
|
|
132
|
+
default?: (props: {}) => any;
|
|
133
|
+
};
|
|
134
|
+
});
|
|
135
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { configProviderInjectionKey } from "./context.js";
|
|
2
|
-
import {
|
|
2
|
+
import { normalizeTheme } from "./theme.js";
|
|
3
|
+
import theme_provider_default from "./theme-provider.js";
|
|
4
|
+
import { defineComponent, getCurrentInstance, provide, reactive, toRefs, watch } from "vue";
|
|
3
5
|
//#region components/config-provider/config-provider.vue?vue&type=script&lang.ts
|
|
4
6
|
var config_provider_vue_vue_type_script_lang_default = defineComponent({
|
|
5
7
|
name: "ConfigProvider",
|
|
@@ -29,7 +31,9 @@ var config_provider_vue_vue_type_script_lang_default = defineComponent({
|
|
|
29
31
|
rtl: {
|
|
30
32
|
type: Boolean,
|
|
31
33
|
default: false
|
|
32
|
-
}
|
|
34
|
+
},
|
|
35
|
+
theme: { type: Object },
|
|
36
|
+
themeMode: { type: String }
|
|
33
37
|
},
|
|
34
38
|
setup(props, { slots }) {
|
|
35
39
|
const { prefixCls, locale, size, updateAtScroll, scrollToClose, exchangeTime, rtl } = toRefs(props);
|
|
@@ -41,13 +45,22 @@ var config_provider_vue_vue_type_script_lang_default = defineComponent({
|
|
|
41
45
|
updateAtScroll,
|
|
42
46
|
scrollToClose,
|
|
43
47
|
exchangeTime,
|
|
44
|
-
rtl
|
|
48
|
+
rtl,
|
|
49
|
+
theme: normalizeTheme(props.theme)
|
|
50
|
+
});
|
|
51
|
+
watch(() => props.theme, (themeConfig) => {
|
|
52
|
+
config.theme = normalizeTheme(themeConfig);
|
|
53
|
+
}, {
|
|
54
|
+
immediate: true,
|
|
55
|
+
deep: true
|
|
45
56
|
});
|
|
46
57
|
if (props.global) {
|
|
47
58
|
const instance = getCurrentInstance();
|
|
48
59
|
if (instance) instance.appContext.app.provide(configProviderInjectionKey, config);
|
|
49
60
|
} else provide(configProviderInjectionKey, config);
|
|
50
|
-
|
|
61
|
+
return {};
|
|
62
|
+
},
|
|
63
|
+
components: { ThemeProvider: theme_provider_default }
|
|
51
64
|
});
|
|
52
65
|
//#endregion
|
|
53
66
|
export { config_provider_vue_vue_type_script_lang_default as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { InjectionKey, Slots } from 'vue';
|
|
2
2
|
import { Size } from '../_utils/constant';
|
|
3
3
|
import { SDLang } from '../locale/interface';
|
|
4
|
+
import { SDThemeNormalized } from './theme';
|
|
4
5
|
export interface ConfigProvider {
|
|
5
6
|
slots: Slots;
|
|
6
7
|
prefixCls?: string;
|
|
@@ -10,5 +11,6 @@ export interface ConfigProvider {
|
|
|
10
11
|
scrollToClose?: boolean;
|
|
11
12
|
exchangeTime?: boolean;
|
|
12
13
|
rtl?: boolean;
|
|
14
|
+
theme?: SDThemeNormalized;
|
|
13
15
|
}
|
|
14
16
|
export declare const configProviderInjectionKey: InjectionKey<ConfigProvider>;
|
|
@@ -33,14 +33,67 @@ declare const ConfigProvider: {
|
|
|
33
33
|
type: BooleanConstructor;
|
|
34
34
|
default: boolean;
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
theme: {
|
|
37
|
+
type: import("vue").PropType<import("./theme").SDThemeConfig>;
|
|
38
|
+
};
|
|
39
|
+
themeMode: {
|
|
40
|
+
type: import("vue").PropType<import("./theme").SDThemeMode>;
|
|
41
|
+
};
|
|
42
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
37
43
|
prefixCls: string;
|
|
38
44
|
updateAtScroll: boolean;
|
|
39
45
|
scrollToClose: boolean;
|
|
40
46
|
rtl: boolean;
|
|
41
47
|
global: boolean;
|
|
42
48
|
exchangeTime: boolean;
|
|
43
|
-
}, true, {}, {},
|
|
49
|
+
}, true, {}, {}, {
|
|
50
|
+
ThemeProvider: {
|
|
51
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
52
|
+
theme?: import("./theme").SDThemeConfig;
|
|
53
|
+
themeMode?: import("./theme").SDThemeMode;
|
|
54
|
+
global?: boolean;
|
|
55
|
+
tag?: string;
|
|
56
|
+
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
57
|
+
themeMode: import("./theme").SDThemeMode;
|
|
58
|
+
global: boolean;
|
|
59
|
+
tag: string;
|
|
60
|
+
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
61
|
+
P: {};
|
|
62
|
+
B: {};
|
|
63
|
+
D: {};
|
|
64
|
+
C: {};
|
|
65
|
+
M: {};
|
|
66
|
+
Defaults: {};
|
|
67
|
+
}, Readonly<{
|
|
68
|
+
theme?: import("./theme").SDThemeConfig;
|
|
69
|
+
themeMode?: import("./theme").SDThemeMode;
|
|
70
|
+
global?: boolean;
|
|
71
|
+
tag?: string;
|
|
72
|
+
}> & Readonly<{}>, {}, {}, {}, {}, {
|
|
73
|
+
themeMode: import("./theme").SDThemeMode;
|
|
74
|
+
global: boolean;
|
|
75
|
+
tag: string;
|
|
76
|
+
}>;
|
|
77
|
+
__isFragment?: never;
|
|
78
|
+
__isTeleport?: never;
|
|
79
|
+
__isSuspense?: never;
|
|
80
|
+
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
81
|
+
theme?: import("./theme").SDThemeConfig;
|
|
82
|
+
themeMode?: import("./theme").SDThemeMode;
|
|
83
|
+
global?: boolean;
|
|
84
|
+
tag?: string;
|
|
85
|
+
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
86
|
+
themeMode: import("./theme").SDThemeMode;
|
|
87
|
+
global: boolean;
|
|
88
|
+
tag: string;
|
|
89
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
90
|
+
$slots: {
|
|
91
|
+
default?: (props: {}) => any;
|
|
92
|
+
} & {
|
|
93
|
+
default?: (props: {}) => any;
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
} & import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
44
97
|
P: {};
|
|
45
98
|
B: {};
|
|
46
99
|
D: {};
|
|
@@ -78,6 +131,12 @@ declare const ConfigProvider: {
|
|
|
78
131
|
type: BooleanConstructor;
|
|
79
132
|
default: boolean;
|
|
80
133
|
};
|
|
134
|
+
theme: {
|
|
135
|
+
type: import("vue").PropType<import("./theme").SDThemeConfig>;
|
|
136
|
+
};
|
|
137
|
+
themeMode: {
|
|
138
|
+
type: import("vue").PropType<import("./theme").SDThemeMode>;
|
|
139
|
+
};
|
|
81
140
|
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
82
141
|
prefixCls: string;
|
|
83
142
|
updateAtScroll: boolean;
|
|
@@ -120,14 +179,67 @@ declare const ConfigProvider: {
|
|
|
120
179
|
type: BooleanConstructor;
|
|
121
180
|
default: boolean;
|
|
122
181
|
};
|
|
123
|
-
|
|
182
|
+
theme: {
|
|
183
|
+
type: import("vue").PropType<import("./theme").SDThemeConfig>;
|
|
184
|
+
};
|
|
185
|
+
themeMode: {
|
|
186
|
+
type: import("vue").PropType<import("./theme").SDThemeMode>;
|
|
187
|
+
};
|
|
188
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
124
189
|
prefixCls: string;
|
|
125
190
|
updateAtScroll: boolean;
|
|
126
191
|
scrollToClose: boolean;
|
|
127
192
|
rtl: boolean;
|
|
128
193
|
global: boolean;
|
|
129
194
|
exchangeTime: boolean;
|
|
130
|
-
}, {}, string, {},
|
|
195
|
+
}, {}, string, {}, {
|
|
196
|
+
ThemeProvider: {
|
|
197
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
198
|
+
theme?: import("./theme").SDThemeConfig;
|
|
199
|
+
themeMode?: import("./theme").SDThemeMode;
|
|
200
|
+
global?: boolean;
|
|
201
|
+
tag?: string;
|
|
202
|
+
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
203
|
+
themeMode: import("./theme").SDThemeMode;
|
|
204
|
+
global: boolean;
|
|
205
|
+
tag: string;
|
|
206
|
+
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
207
|
+
P: {};
|
|
208
|
+
B: {};
|
|
209
|
+
D: {};
|
|
210
|
+
C: {};
|
|
211
|
+
M: {};
|
|
212
|
+
Defaults: {};
|
|
213
|
+
}, Readonly<{
|
|
214
|
+
theme?: import("./theme").SDThemeConfig;
|
|
215
|
+
themeMode?: import("./theme").SDThemeMode;
|
|
216
|
+
global?: boolean;
|
|
217
|
+
tag?: string;
|
|
218
|
+
}> & Readonly<{}>, {}, {}, {}, {}, {
|
|
219
|
+
themeMode: import("./theme").SDThemeMode;
|
|
220
|
+
global: boolean;
|
|
221
|
+
tag: string;
|
|
222
|
+
}>;
|
|
223
|
+
__isFragment?: never;
|
|
224
|
+
__isTeleport?: never;
|
|
225
|
+
__isSuspense?: never;
|
|
226
|
+
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
227
|
+
theme?: import("./theme").SDThemeConfig;
|
|
228
|
+
themeMode?: import("./theme").SDThemeMode;
|
|
229
|
+
global?: boolean;
|
|
230
|
+
tag?: string;
|
|
231
|
+
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
232
|
+
themeMode: import("./theme").SDThemeMode;
|
|
233
|
+
global: boolean;
|
|
234
|
+
tag: string;
|
|
235
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
236
|
+
$slots: {
|
|
237
|
+
default?: (props: {}) => any;
|
|
238
|
+
} & {
|
|
239
|
+
default?: (props: {}) => any;
|
|
240
|
+
};
|
|
241
|
+
});
|
|
242
|
+
} & import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
131
243
|
install: (app: App, options?: SDOptions) => void;
|
|
132
244
|
};
|
|
133
245
|
export type ConfigProviderInstance = InstanceType<typeof _ConfigProvider>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import theme_provider_vue_vue_type_script_setup_true_lang_default from "./theme-provider.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region components/config-provider/theme-provider.vue
|
|
5
|
+
var theme_provider_default = /* @__PURE__ */ _plugin_vue_export_helper_default(theme_provider_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-a0a91a8a"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { theme_provider_default as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type SDThemeConfig, type SDThemeMode } from './theme';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
theme?: SDThemeConfig;
|
|
4
|
+
themeMode?: SDThemeMode;
|
|
5
|
+
global?: boolean;
|
|
6
|
+
tag?: string;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_9: {}, __VLS_11: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_9) => any;
|
|
11
|
+
} & {
|
|
12
|
+
default?: (props: typeof __VLS_11) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
themeMode: SDThemeMode;
|
|
16
|
+
global: boolean;
|
|
17
|
+
tag: string;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.124.0/helpers/objectSpread2.js";
|
|
2
|
+
import { applyThemeCSSVariables, clearThemeCSSVariables, normalizeTheme } from "./theme.js";
|
|
3
|
+
import { computed, createBlock, defineComponent, onBeforeUnmount, openBlock, renderSlot, resolveDynamicComponent, shallowRef, watch, withCtx } from "vue";
|
|
4
|
+
//#region components/config-provider/theme-provider.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var theme_provider_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, { name: "ThemeProvider" }), {}, {
|
|
6
|
+
__name: "theme-provider",
|
|
7
|
+
props: {
|
|
8
|
+
theme: {},
|
|
9
|
+
themeMode: { default: void 0 },
|
|
10
|
+
global: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false
|
|
13
|
+
},
|
|
14
|
+
tag: { default: "div" }
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const rootElement = shallowRef(null);
|
|
19
|
+
const normalizedTheme = computed(() => normalizeTheme(props.theme));
|
|
20
|
+
const usesLocalThemeContainer = computed(() => {
|
|
21
|
+
if (props.global) return false;
|
|
22
|
+
return Boolean(props.themeMode) || Object.keys(normalizedTheme.value.tokens).length > 0 || Object.keys(normalizedTheme.value.components).length > 0;
|
|
23
|
+
});
|
|
24
|
+
let appliedThemeKeys = /* @__PURE__ */ new Set();
|
|
25
|
+
let activeTarget = null;
|
|
26
|
+
let previousGlobalThemeMode;
|
|
27
|
+
function resolveThemeTarget() {
|
|
28
|
+
if (typeof document === "undefined") return null;
|
|
29
|
+
if (props.global) return document.body || document.documentElement;
|
|
30
|
+
if (!usesLocalThemeContainer.value) return null;
|
|
31
|
+
return rootElement.value;
|
|
32
|
+
}
|
|
33
|
+
function restoreThemeMode(target) {
|
|
34
|
+
if (!props.global) {
|
|
35
|
+
if (props.themeMode) target.setAttribute("sd-theme", props.themeMode);
|
|
36
|
+
else target.removeAttribute("sd-theme");
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (props.themeMode) {
|
|
40
|
+
target.setAttribute("sd-theme", props.themeMode);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (previousGlobalThemeMode === null) {
|
|
44
|
+
target.removeAttribute("sd-theme");
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (previousGlobalThemeMode) target.setAttribute("sd-theme", previousGlobalThemeMode);
|
|
48
|
+
}
|
|
49
|
+
function resetActiveTarget() {
|
|
50
|
+
if (!activeTarget) return;
|
|
51
|
+
cleanupTarget(activeTarget);
|
|
52
|
+
activeTarget = null;
|
|
53
|
+
}
|
|
54
|
+
function cleanupTarget(target) {
|
|
55
|
+
if (!target) return;
|
|
56
|
+
clearThemeCSSVariables(target, appliedThemeKeys);
|
|
57
|
+
appliedThemeKeys = /* @__PURE__ */ new Set();
|
|
58
|
+
if (props.global) {
|
|
59
|
+
if (previousGlobalThemeMode === void 0) target.removeAttribute("sd-theme");
|
|
60
|
+
else if (previousGlobalThemeMode === null) target.removeAttribute("sd-theme");
|
|
61
|
+
else target.setAttribute("sd-theme", previousGlobalThemeMode);
|
|
62
|
+
previousGlobalThemeMode = void 0;
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
target.removeAttribute("sd-theme");
|
|
66
|
+
}
|
|
67
|
+
function syncThemeTarget() {
|
|
68
|
+
const nextTarget = resolveThemeTarget();
|
|
69
|
+
if (!nextTarget) {
|
|
70
|
+
resetActiveTarget();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (activeTarget && activeTarget !== nextTarget) cleanupTarget(activeTarget);
|
|
74
|
+
if (props.global && activeTarget !== nextTarget && previousGlobalThemeMode === void 0) previousGlobalThemeMode = nextTarget.getAttribute("sd-theme");
|
|
75
|
+
appliedThemeKeys = applyThemeCSSVariables(nextTarget, normalizedTheme.value, appliedThemeKeys);
|
|
76
|
+
restoreThemeMode(nextTarget);
|
|
77
|
+
activeTarget = nextTarget;
|
|
78
|
+
}
|
|
79
|
+
watch([
|
|
80
|
+
normalizedTheme,
|
|
81
|
+
() => props.themeMode,
|
|
82
|
+
() => props.global,
|
|
83
|
+
usesLocalThemeContainer,
|
|
84
|
+
rootElement
|
|
85
|
+
], syncThemeTarget, {
|
|
86
|
+
deep: true,
|
|
87
|
+
immediate: true,
|
|
88
|
+
flush: "post"
|
|
89
|
+
});
|
|
90
|
+
onBeforeUnmount(() => {
|
|
91
|
+
cleanupTarget(activeTarget);
|
|
92
|
+
activeTarget = null;
|
|
93
|
+
});
|
|
94
|
+
return (_ctx, _cache) => {
|
|
95
|
+
return usesLocalThemeContainer.value ? (openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
|
|
96
|
+
key: 0,
|
|
97
|
+
ref_key: "rootElement",
|
|
98
|
+
ref: rootElement,
|
|
99
|
+
class: "sd-theme-provider"
|
|
100
|
+
}, {
|
|
101
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
|
|
102
|
+
_: 3
|
|
103
|
+
}, 512)) : renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
}));
|
|
107
|
+
//#endregion
|
|
108
|
+
export { theme_provider_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type ThemeTokenValue = string | number;
|
|
2
|
+
export type ThemeTokenMap = Record<string, ThemeTokenValue>;
|
|
3
|
+
export interface SDThemeMeta {
|
|
4
|
+
name?: string;
|
|
5
|
+
schemaVersion?: number;
|
|
6
|
+
cssVarPrefix?: string;
|
|
7
|
+
}
|
|
8
|
+
export type SDThemeMode = 'light' | 'dark';
|
|
9
|
+
export interface SDThemeConfig {
|
|
10
|
+
tokens?: ThemeTokenMap;
|
|
11
|
+
components?: Record<string, ThemeTokenMap>;
|
|
12
|
+
meta?: SDThemeMeta;
|
|
13
|
+
token?: ThemeTokenMap;
|
|
14
|
+
component?: Record<string, ThemeTokenMap>;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
export interface SDThemeNormalized {
|
|
18
|
+
tokens: ThemeTokenMap;
|
|
19
|
+
components: Record<string, ThemeTokenMap>;
|
|
20
|
+
meta: Required<Pick<SDThemeMeta, 'schemaVersion' | 'cssVarPrefix'>> & Pick<SDThemeMeta, 'name'>;
|
|
21
|
+
}
|
|
22
|
+
export declare function normalizeTokenKey(key: string): string;
|
|
23
|
+
export declare function normalizeTheme(theme?: SDThemeConfig): SDThemeNormalized;
|
|
24
|
+
export declare function resolveThemeToken(theme: SDThemeNormalized, componentName: string, tokenKey: string): ThemeTokenValue | undefined;
|
|
25
|
+
export declare function getThemeCSSVariables(theme: SDThemeNormalized): Record<string, string>;
|
|
26
|
+
export declare function applyThemeCSSVariables(target: HTMLElement, theme: SDThemeNormalized, previousKeys?: Set<string>): Set<string>;
|
|
27
|
+
export declare function clearThemeCSSVariables(target: HTMLElement, keys: Set<string>): void;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.124.0/helpers/objectSpread2.js";
|
|
2
|
+
//#region components/config-provider/theme.ts
|
|
3
|
+
var DEFAULT_THEME_META = {
|
|
4
|
+
schemaVersion: 1,
|
|
5
|
+
cssVarPrefix: "--"
|
|
6
|
+
};
|
|
7
|
+
var RESERVED_THEME_KEYS = new Set([
|
|
8
|
+
"tokens",
|
|
9
|
+
"components",
|
|
10
|
+
"meta",
|
|
11
|
+
"token",
|
|
12
|
+
"component"
|
|
13
|
+
]);
|
|
14
|
+
function normalizeCssVarPrefix(prefix) {
|
|
15
|
+
if (!prefix) return "--";
|
|
16
|
+
const trimmed = prefix.trim();
|
|
17
|
+
if (!trimmed || trimmed === "--") return "--";
|
|
18
|
+
if (trimmed.startsWith("--")) return trimmed.endsWith("-") ? trimmed : `${trimmed}-`;
|
|
19
|
+
return `--${trimmed.replace(/^-+/, "")}${trimmed.endsWith("-") ? "" : "-"}`;
|
|
20
|
+
}
|
|
21
|
+
function normalizeTokenKey(key) {
|
|
22
|
+
return key.trim().replace(/([a-z\d])([A-Z])/g, "$1-$2").replace(/([a-zA-Z])(\d+)/g, "$1-$2").replace(/(\d+)([a-zA-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").replace(/-{2,}/g, "-").replace(/^-|-$/g, "").toLowerCase();
|
|
23
|
+
}
|
|
24
|
+
function normalizeTokenMap(tokens) {
|
|
25
|
+
if (!tokens || typeof tokens !== "object") return {};
|
|
26
|
+
const normalized = {};
|
|
27
|
+
for (const [key, value] of Object.entries(tokens)) {
|
|
28
|
+
if (typeof value !== "string" && typeof value !== "number") continue;
|
|
29
|
+
const normalizedKey = normalizeTokenKey(key);
|
|
30
|
+
if (!normalizedKey) continue;
|
|
31
|
+
normalized[normalizedKey] = typeof value === "string" ? value.trim() : value;
|
|
32
|
+
}
|
|
33
|
+
return normalized;
|
|
34
|
+
}
|
|
35
|
+
function normalizeComponentTokenMap(components) {
|
|
36
|
+
if (!components || typeof components !== "object") return {};
|
|
37
|
+
const normalized = {};
|
|
38
|
+
for (const [componentName, tokenMap] of Object.entries(components)) {
|
|
39
|
+
const normalizedName = normalizeTokenKey(componentName);
|
|
40
|
+
if (!normalizedName) continue;
|
|
41
|
+
const normalizedTokens = normalizeTokenMap(tokenMap);
|
|
42
|
+
if (Object.keys(normalizedTokens).length) normalized[normalizedName] = normalizedTokens;
|
|
43
|
+
}
|
|
44
|
+
return normalized;
|
|
45
|
+
}
|
|
46
|
+
function collectLegacyRootTokens(theme) {
|
|
47
|
+
return normalizeTokenMap(Object.fromEntries(Object.entries(theme).filter(([key, value]) => {
|
|
48
|
+
if (RESERVED_THEME_KEYS.has(key)) return false;
|
|
49
|
+
return typeof value === "string" || typeof value === "number";
|
|
50
|
+
})));
|
|
51
|
+
}
|
|
52
|
+
function normalizeTheme(theme) {
|
|
53
|
+
var _theme$tokens, _theme$meta, _theme$meta$schemaVer, _theme$meta2, _theme$meta$cssVarPre, _theme$meta3, _theme$components;
|
|
54
|
+
if (!theme || typeof theme !== "object") return {
|
|
55
|
+
tokens: {},
|
|
56
|
+
components: {},
|
|
57
|
+
meta: DEFAULT_THEME_META
|
|
58
|
+
};
|
|
59
|
+
const themeTokens = normalizeTokenMap((_theme$tokens = theme.tokens) !== null && _theme$tokens !== void 0 ? _theme$tokens : theme.token);
|
|
60
|
+
const legacyRootTokens = collectLegacyRootTokens(theme);
|
|
61
|
+
const meta = {
|
|
62
|
+
name: (_theme$meta = theme.meta) === null || _theme$meta === void 0 ? void 0 : _theme$meta.name,
|
|
63
|
+
schemaVersion: (_theme$meta$schemaVer = (_theme$meta2 = theme.meta) === null || _theme$meta2 === void 0 ? void 0 : _theme$meta2.schemaVersion) !== null && _theme$meta$schemaVer !== void 0 ? _theme$meta$schemaVer : DEFAULT_THEME_META.schemaVersion,
|
|
64
|
+
cssVarPrefix: normalizeCssVarPrefix((_theme$meta$cssVarPre = (_theme$meta3 = theme.meta) === null || _theme$meta3 === void 0 ? void 0 : _theme$meta3.cssVarPrefix) !== null && _theme$meta$cssVarPre !== void 0 ? _theme$meta$cssVarPre : DEFAULT_THEME_META.cssVarPrefix)
|
|
65
|
+
};
|
|
66
|
+
return {
|
|
67
|
+
tokens: _objectSpread2(_objectSpread2({}, legacyRootTokens), themeTokens),
|
|
68
|
+
components: normalizeComponentTokenMap((_theme$components = theme.components) !== null && _theme$components !== void 0 ? _theme$components : theme.component),
|
|
69
|
+
meta
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function getThemeCSSVariables(theme) {
|
|
73
|
+
const cssVariables = {};
|
|
74
|
+
const prefix = theme.meta.cssVarPrefix;
|
|
75
|
+
for (const [tokenKey, tokenValue] of Object.entries(theme.tokens)) cssVariables[`${prefix}${tokenKey}`] = `${tokenValue}`;
|
|
76
|
+
for (const [componentName, tokenMap] of Object.entries(theme.components)) for (const [tokenKey, tokenValue] of Object.entries(tokenMap)) cssVariables[`${prefix}component-${componentName}-${tokenKey}`] = `${tokenValue}`;
|
|
77
|
+
return cssVariables;
|
|
78
|
+
}
|
|
79
|
+
function applyThemeCSSVariables(target, theme, previousKeys = /* @__PURE__ */ new Set()) {
|
|
80
|
+
const variableMap = getThemeCSSVariables(theme);
|
|
81
|
+
const nextKeys = new Set(Object.keys(variableMap));
|
|
82
|
+
for (const key of previousKeys) if (!nextKeys.has(key)) target.style.removeProperty(key);
|
|
83
|
+
for (const [key, value] of Object.entries(variableMap)) target.style.setProperty(key, value);
|
|
84
|
+
return nextKeys;
|
|
85
|
+
}
|
|
86
|
+
function clearThemeCSSVariables(target, keys) {
|
|
87
|
+
for (const key of keys) target.style.removeProperty(key);
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
export { applyThemeCSSVariables, clearThemeCSSVariables, normalizeTheme };
|