base6-ui 1.1.1
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/CHANGELOG.md +13 -0
- package/build/plugins.ts +31 -0
- package/build/unPlugin.ts +37 -0
- package/dist/components/AppProvider/index.d.ts +1 -0
- package/dist/components/AppProvider/index.vue.d.ts +17 -0
- package/dist/components/BaseButton/index.d.ts +1 -0
- package/dist/components/BaseButton/index.vue.d.ts +24 -0
- package/dist/components/BaseDataTable/index.d.ts +1 -0
- package/dist/components/BaseDataTable/index.vue.d.ts +22 -0
- package/dist/components/BaseDialog/index.d.ts +2 -0
- package/dist/components/BaseDialog/index.vue.d.ts +56 -0
- package/dist/components/BaseDialog/options.d.ts +2 -0
- package/dist/components/BaseDialog/type.d.ts +29 -0
- package/dist/components/BaseInputNumber/index.d.ts +1 -0
- package/dist/components/BaseInputNumber/index.vue.d.ts +5368 -0
- package/dist/components/BaseLayout/ASide/index.vue.d.ts +20 -0
- package/dist/components/BaseLayout/ASide/type.d.ts +7 -0
- package/dist/components/BaseLayout/index.d.ts +1 -0
- package/dist/components/BaseProgress/index.d.ts +264 -0
- package/dist/components/BaseRadio/index.d.ts +1 -0
- package/dist/components/BaseRadio/index.vue.d.ts +23 -0
- package/dist/components/BaseSelect/index.d.ts +1 -0
- package/dist/components/BaseSelect/index.vue.d.ts +20 -0
- package/dist/components/BaseSlider/index.d.ts +1 -0
- package/dist/components/BaseSlider/index.vue.d.ts +27 -0
- package/dist/components/BaseSwitch/index.d.ts +1 -0
- package/dist/components/BaseSwitch/index.vue.d.ts +23 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/types/themes/extendThemes.d.ts +44 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/themes/color/dark.d.ts +54 -0
- package/dist/config/themes/color/index.d.ts +2 -0
- package/dist/config/themes/color/light.d.ts +53 -0
- package/dist/config/themes/common.d.ts +41 -0
- package/dist/config/themes/components/alert/common.d.ts +2 -0
- package/dist/config/themes/components/alert/dark.d.ts +2 -0
- package/dist/config/themes/components/alert/light.d.ts +2 -0
- package/dist/config/themes/components/baseComponent/dark.d.ts +8 -0
- package/dist/config/themes/components/baseComponent/light.d.ts +8 -0
- package/dist/config/themes/components/button/common.d.ts +2 -0
- package/dist/config/themes/components/button/dark.d.ts +2 -0
- package/dist/config/themes/components/button/light.d.ts +2 -0
- package/dist/config/themes/components/card/dark.d.ts +2 -0
- package/dist/config/themes/components/card/light.d.ts +2 -0
- package/dist/config/themes/components/charts/dark.d.ts +398 -0
- package/dist/config/themes/components/charts/light.d.ts +396 -0
- package/dist/config/themes/components/checkbox/common.d.ts +2 -0
- package/dist/config/themes/components/checkbox/dark.d.ts +2 -0
- package/dist/config/themes/components/checkbox/light.d.ts +2 -0
- package/dist/config/themes/components/dataTable/dark.d.ts +2 -0
- package/dist/config/themes/components/dataTable/light.d.ts +2 -0
- package/dist/config/themes/components/datePicker/dark.d.ts +2 -0
- package/dist/config/themes/components/datePicker/light.d.ts +2 -0
- package/dist/config/themes/components/dialog/common.d.ts +8 -0
- package/dist/config/themes/components/dialog/dark.d.ts +15 -0
- package/dist/config/themes/components/dialog/light.d.ts +15 -0
- package/dist/config/themes/components/dropdown/dark.d.ts +2 -0
- package/dist/config/themes/components/dropdown/light.d.ts +2 -0
- package/dist/config/themes/components/form/dark.d.ts +2 -0
- package/dist/config/themes/components/form/light.d.ts +2 -0
- package/dist/config/themes/components/input/common.d.ts +2 -0
- package/dist/config/themes/components/input/dark.d.ts +2 -0
- package/dist/config/themes/components/input/light.d.ts +2 -0
- package/dist/config/themes/components/inputNumber/common.d.ts +3 -0
- package/dist/config/themes/components/inputNumber/dark.d.ts +3 -0
- package/dist/config/themes/components/inputNumber/light.d.ts +3 -0
- package/dist/config/themes/components/layout/dark.d.ts +5 -0
- package/dist/config/themes/components/layout/light.d.ts +5 -0
- package/dist/config/themes/components/menu/dark.d.ts +2 -0
- package/dist/config/themes/components/menu/light.d.ts +2 -0
- package/dist/config/themes/components/progress/dark.d.ts +3 -0
- package/dist/config/themes/components/progress/light.d.ts +3 -0
- package/dist/config/themes/components/radio/dark.d.ts +3 -0
- package/dist/config/themes/components/radio/light.d.ts +3 -0
- package/dist/config/themes/components/select/dark.d.ts +2 -0
- package/dist/config/themes/components/select/light.d.ts +2 -0
- package/dist/config/themes/components/slider/dark.d.ts +3 -0
- package/dist/config/themes/components/slider/light.d.ts +3 -0
- package/dist/config/themes/components/switch/common.d.ts +3 -0
- package/dist/config/themes/components/switch/dark.d.ts +3 -0
- package/dist/config/themes/components/switch/light.d.ts +3 -0
- package/dist/config/themes/components/tag/dark.d.ts +2 -0
- package/dist/config/themes/components/tag/light.d.ts +2 -0
- package/dist/config/themes/components/transfer/dark.d.ts +2 -0
- package/dist/config/themes/components/transfer/light.d.ts +2 -0
- package/dist/config/themes/dark.d.ts +2 -0
- package/dist/config/themes/index.d.ts +7 -0
- package/dist/config/themes/light.d.ts +2 -0
- package/dist/config/themes/token/dark.d.ts +28 -0
- package/dist/config/themes/token/index.d.ts +2 -0
- package/dist/config/themes/token/light.d.ts +9 -0
- package/dist/globalMethods/index.d.ts +2 -0
- package/dist/globalMethods/modules/confirmTip.d.ts +2 -0
- package/dist/globalMethods/modules/message.d.ts +4 -0
- package/dist/hooks/useNaiveConfigProvideContext.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/types/themes/extendThemes.d.ts +44 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/_virtual/virtual_svg-icons-register.mjs +7 -0
- package/es/components/AppProvider/index.d.ts +1 -0
- package/es/components/AppProvider/index.vue.d.ts +17 -0
- package/es/components/AppProvider/index.vue.mjs +45 -0
- package/es/components/AppProvider/index.vue2.mjs +4 -0
- package/es/components/BaseButton/index.d.ts +1 -0
- package/es/components/BaseButton/index.vue.d.ts +24 -0
- package/es/components/BaseButton/index.vue.mjs +36 -0
- package/es/components/BaseButton/index.vue2.mjs +4 -0
- package/es/components/BaseDataTable/index.d.ts +1 -0
- package/es/components/BaseDataTable/index.vue.d.ts +22 -0
- package/es/components/BaseDataTable/index.vue.mjs +7 -0
- package/es/components/BaseDataTable/index.vue2.mjs +70 -0
- package/es/components/BaseDialog/index.d.ts +2 -0
- package/es/components/BaseDialog/index.vue.d.ts +56 -0
- package/es/components/BaseDialog/index.vue.mjs +141 -0
- package/es/components/BaseDialog/index.vue2.mjs +4 -0
- package/es/components/BaseDialog/options.d.ts +2 -0
- package/es/components/BaseDialog/options.mjs +27 -0
- package/es/components/BaseDialog/type.d.ts +29 -0
- package/es/components/BaseInputNumber/index.d.ts +1 -0
- package/es/components/BaseInputNumber/index.vue.d.ts +5368 -0
- package/es/components/BaseInputNumber/index.vue.mjs +7 -0
- package/es/components/BaseInputNumber/index.vue2.mjs +155 -0
- package/es/components/BaseLayout/ASide/index.vue.d.ts +20 -0
- package/es/components/BaseLayout/ASide/index.vue.mjs +7 -0
- package/es/components/BaseLayout/ASide/index.vue2.mjs +56 -0
- package/es/components/BaseLayout/ASide/type.d.ts +7 -0
- package/es/components/BaseLayout/index.d.ts +1 -0
- package/es/components/BaseProgress/index.d.ts +264 -0
- package/es/components/BaseProgress/index.mjs +81 -0
- package/es/components/BaseRadio/index.d.ts +1 -0
- package/es/components/BaseRadio/index.vue.d.ts +23 -0
- package/es/components/BaseRadio/index.vue.mjs +7 -0
- package/es/components/BaseRadio/index.vue2.mjs +42 -0
- package/es/components/BaseSelect/index.d.ts +1 -0
- package/es/components/BaseSelect/index.vue.d.ts +20 -0
- package/es/components/BaseSelect/index.vue.mjs +56 -0
- package/es/components/BaseSelect/index.vue2.mjs +4 -0
- package/es/components/BaseSlider/index.d.ts +1 -0
- package/es/components/BaseSlider/index.vue.d.ts +27 -0
- package/es/components/BaseSlider/index.vue.mjs +7 -0
- package/es/components/BaseSlider/index.vue2.mjs +107 -0
- package/es/components/BaseSwitch/index.d.ts +1 -0
- package/es/components/BaseSwitch/index.vue.d.ts +23 -0
- package/es/components/BaseSwitch/index.vue.mjs +7 -0
- package/es/components/BaseSwitch/index.vue2.mjs +44 -0
- package/es/components/index.d.ts +11 -0
- package/es/components/types/themes/extendThemes.d.ts +44 -0
- package/es/config/index.d.ts +1 -0
- package/es/config/themes/color/dark.d.ts +54 -0
- package/es/config/themes/color/dark.mjs +61 -0
- package/es/config/themes/color/index.d.ts +2 -0
- package/es/config/themes/color/light.d.ts +53 -0
- package/es/config/themes/color/light.mjs +60 -0
- package/es/config/themes/common.d.ts +41 -0
- package/es/config/themes/common.mjs +39 -0
- package/es/config/themes/components/alert/common.d.ts +2 -0
- package/es/config/themes/components/alert/common.mjs +10 -0
- package/es/config/themes/components/alert/dark.d.ts +2 -0
- package/es/config/themes/components/alert/dark.mjs +21 -0
- package/es/config/themes/components/alert/light.d.ts +2 -0
- package/es/config/themes/components/alert/light.mjs +17 -0
- package/es/config/themes/components/baseComponent/dark.d.ts +8 -0
- package/es/config/themes/components/baseComponent/dark.mjs +249 -0
- package/es/config/themes/components/baseComponent/light.d.ts +8 -0
- package/es/config/themes/components/baseComponent/light.mjs +350 -0
- package/es/config/themes/components/button/common.d.ts +2 -0
- package/es/config/themes/components/button/common.mjs +17 -0
- package/es/config/themes/components/button/dark.d.ts +2 -0
- package/es/config/themes/components/button/dark.mjs +109 -0
- package/es/config/themes/components/button/light.d.ts +2 -0
- package/es/config/themes/components/button/light.mjs +88 -0
- package/es/config/themes/components/card/dark.d.ts +2 -0
- package/es/config/themes/components/card/dark.mjs +14 -0
- package/es/config/themes/components/card/light.d.ts +2 -0
- package/es/config/themes/components/card/light.mjs +14 -0
- package/es/config/themes/components/charts/dark.d.ts +398 -0
- package/es/config/themes/components/charts/dark.mjs +428 -0
- package/es/config/themes/components/charts/light.d.ts +396 -0
- package/es/config/themes/components/charts/light.mjs +426 -0
- package/es/config/themes/components/checkbox/common.d.ts +2 -0
- package/es/config/themes/components/checkbox/common.mjs +7 -0
- package/es/config/themes/components/checkbox/dark.d.ts +2 -0
- package/es/config/themes/components/checkbox/dark.mjs +21 -0
- package/es/config/themes/components/checkbox/light.d.ts +2 -0
- package/es/config/themes/components/checkbox/light.mjs +20 -0
- package/es/config/themes/components/dataTable/dark.d.ts +2 -0
- package/es/config/themes/components/dataTable/dark.mjs +14 -0
- package/es/config/themes/components/dataTable/light.d.ts +2 -0
- package/es/config/themes/components/dataTable/light.mjs +14 -0
- package/es/config/themes/components/datePicker/dark.d.ts +2 -0
- package/es/config/themes/components/datePicker/dark.mjs +11 -0
- package/es/config/themes/components/datePicker/light.d.ts +2 -0
- package/es/config/themes/components/datePicker/light.mjs +11 -0
- package/es/config/themes/components/dialog/common.d.ts +8 -0
- package/es/config/themes/components/dialog/common.mjs +11 -0
- package/es/config/themes/components/dialog/dark.d.ts +15 -0
- package/es/config/themes/components/dialog/dark.mjs +16 -0
- package/es/config/themes/components/dialog/light.d.ts +15 -0
- package/es/config/themes/components/dialog/light.mjs +15 -0
- package/es/config/themes/components/dropdown/dark.d.ts +2 -0
- package/es/config/themes/components/dropdown/dark.mjs +8 -0
- package/es/config/themes/components/dropdown/light.d.ts +2 -0
- package/es/config/themes/components/dropdown/light.mjs +8 -0
- package/es/config/themes/components/form/dark.d.ts +2 -0
- package/es/config/themes/components/form/dark.mjs +8 -0
- package/es/config/themes/components/form/light.d.ts +2 -0
- package/es/config/themes/components/form/light.mjs +8 -0
- package/es/config/themes/components/input/common.d.ts +2 -0
- package/es/config/themes/components/input/common.mjs +11 -0
- package/es/config/themes/components/input/dark.d.ts +2 -0
- package/es/config/themes/components/input/dark.mjs +22 -0
- package/es/config/themes/components/input/light.d.ts +2 -0
- package/es/config/themes/components/input/light.mjs +21 -0
- package/es/config/themes/components/inputNumber/common.d.ts +3 -0
- package/es/config/themes/components/inputNumber/common.mjs +14 -0
- package/es/config/themes/components/inputNumber/dark.d.ts +3 -0
- package/es/config/themes/components/inputNumber/dark.mjs +21 -0
- package/es/config/themes/components/inputNumber/light.d.ts +3 -0
- package/es/config/themes/components/inputNumber/light.mjs +17 -0
- package/es/config/themes/components/layout/dark.d.ts +5 -0
- package/es/config/themes/components/layout/dark.mjs +10 -0
- package/es/config/themes/components/layout/light.d.ts +5 -0
- package/es/config/themes/components/layout/light.mjs +11 -0
- package/es/config/themes/components/menu/dark.d.ts +2 -0
- package/es/config/themes/components/menu/dark.mjs +17 -0
- package/es/config/themes/components/menu/light.d.ts +2 -0
- package/es/config/themes/components/menu/light.mjs +16 -0
- package/es/config/themes/components/progress/dark.d.ts +3 -0
- package/es/config/themes/components/progress/dark.mjs +21 -0
- package/es/config/themes/components/progress/light.d.ts +3 -0
- package/es/config/themes/components/progress/light.mjs +20 -0
- package/es/config/themes/components/radio/dark.d.ts +3 -0
- package/es/config/themes/components/radio/dark.mjs +20 -0
- package/es/config/themes/components/radio/light.d.ts +3 -0
- package/es/config/themes/components/radio/light.mjs +18 -0
- package/es/config/themes/components/select/dark.d.ts +2 -0
- package/es/config/themes/components/select/dark.mjs +40 -0
- package/es/config/themes/components/select/light.d.ts +2 -0
- package/es/config/themes/components/select/light.mjs +36 -0
- package/es/config/themes/components/slider/dark.d.ts +3 -0
- package/es/config/themes/components/slider/dark.mjs +15 -0
- package/es/config/themes/components/slider/light.d.ts +3 -0
- package/es/config/themes/components/slider/light.mjs +15 -0
- package/es/config/themes/components/switch/common.d.ts +3 -0
- package/es/config/themes/components/switch/common.mjs +14 -0
- package/es/config/themes/components/switch/dark.d.ts +3 -0
- package/es/config/themes/components/switch/dark.mjs +15 -0
- package/es/config/themes/components/switch/light.d.ts +3 -0
- package/es/config/themes/components/switch/light.mjs +15 -0
- package/es/config/themes/components/tag/dark.d.ts +2 -0
- package/es/config/themes/components/tag/dark.mjs +34 -0
- package/es/config/themes/components/tag/light.d.ts +2 -0
- package/es/config/themes/components/tag/light.mjs +33 -0
- package/es/config/themes/components/transfer/dark.d.ts +2 -0
- package/es/config/themes/components/transfer/dark.mjs +9 -0
- package/es/config/themes/components/transfer/light.d.ts +2 -0
- package/es/config/themes/components/transfer/light.mjs +9 -0
- package/es/config/themes/dark.d.ts +2 -0
- package/es/config/themes/dark.mjs +53 -0
- package/es/config/themes/index.d.ts +7 -0
- package/es/config/themes/index.mjs +50 -0
- package/es/config/themes/light.d.ts +2 -0
- package/es/config/themes/light.mjs +53 -0
- package/es/config/themes/token/dark.d.ts +28 -0
- package/es/config/themes/token/dark.mjs +31 -0
- package/es/config/themes/token/index.d.ts +2 -0
- package/es/config/themes/token/light.d.ts +9 -0
- package/es/config/themes/token/light.mjs +11 -0
- package/es/globalMethods/index.d.ts +2 -0
- package/es/globalMethods/index.mjs +8 -0
- package/es/globalMethods/modules/confirmTip.d.ts +2 -0
- package/es/globalMethods/modules/confirmTip.mjs +45 -0
- package/es/globalMethods/modules/message.d.ts +4 -0
- package/es/globalMethods/modules/message.mjs +15 -0
- package/es/hooks/useNaiveConfigProvideContext.d.ts +2 -0
- package/es/hooks/useNaiveConfigProvideContext.mjs +8 -0
- package/es/index.css +1 -0
- package/es/index.d.ts +3 -0
- package/es/index.mjs +47 -0
- package/es/node_modules/.pnpm/lib-materials@0.0.8_typescript@5.7.2/node_modules/lib-materials/dist/lib-materials.mjs +750 -0
- package/es/types/themes/extendThemes.d.ts +44 -0
- package/eslint.config.js +114 -0
- package/lib/_virtual/_plugin-vue_export-helper.js +1 -0
- package/lib/_virtual/virtual_svg-icons-register.js +1 -0
- package/lib/components/AppProvider/index.d.ts +1 -0
- package/lib/components/AppProvider/index.vue.d.ts +17 -0
- package/lib/components/AppProvider/index.vue.js +1 -0
- package/lib/components/AppProvider/index.vue2.js +1 -0
- package/lib/components/BaseButton/index.d.ts +1 -0
- package/lib/components/BaseButton/index.vue.d.ts +24 -0
- package/lib/components/BaseButton/index.vue.js +1 -0
- package/lib/components/BaseButton/index.vue2.js +1 -0
- package/lib/components/BaseDataTable/index.d.ts +1 -0
- package/lib/components/BaseDataTable/index.vue.d.ts +22 -0
- package/lib/components/BaseDataTable/index.vue.js +1 -0
- package/lib/components/BaseDataTable/index.vue2.js +1 -0
- package/lib/components/BaseDialog/index.d.ts +2 -0
- package/lib/components/BaseDialog/index.vue.d.ts +56 -0
- package/lib/components/BaseDialog/index.vue.js +1 -0
- package/lib/components/BaseDialog/index.vue2.js +1 -0
- package/lib/components/BaseDialog/options.d.ts +2 -0
- package/lib/components/BaseDialog/options.js +1 -0
- package/lib/components/BaseDialog/type.d.ts +29 -0
- package/lib/components/BaseInputNumber/index.d.ts +1 -0
- package/lib/components/BaseInputNumber/index.vue.d.ts +5368 -0
- package/lib/components/BaseInputNumber/index.vue.js +1 -0
- package/lib/components/BaseInputNumber/index.vue2.js +1 -0
- package/lib/components/BaseLayout/ASide/index.vue.d.ts +20 -0
- package/lib/components/BaseLayout/ASide/index.vue.js +1 -0
- package/lib/components/BaseLayout/ASide/index.vue2.js +1 -0
- package/lib/components/BaseLayout/ASide/type.d.ts +7 -0
- package/lib/components/BaseLayout/index.d.ts +1 -0
- package/lib/components/BaseProgress/index.d.ts +264 -0
- package/lib/components/BaseProgress/index.js +1 -0
- package/lib/components/BaseRadio/index.d.ts +1 -0
- package/lib/components/BaseRadio/index.vue.d.ts +23 -0
- package/lib/components/BaseRadio/index.vue.js +1 -0
- package/lib/components/BaseRadio/index.vue2.js +1 -0
- package/lib/components/BaseSelect/index.d.ts +1 -0
- package/lib/components/BaseSelect/index.vue.d.ts +20 -0
- package/lib/components/BaseSelect/index.vue.js +1 -0
- package/lib/components/BaseSelect/index.vue2.js +1 -0
- package/lib/components/BaseSlider/index.d.ts +1 -0
- package/lib/components/BaseSlider/index.vue.d.ts +27 -0
- package/lib/components/BaseSlider/index.vue.js +1 -0
- package/lib/components/BaseSlider/index.vue2.js +1 -0
- package/lib/components/BaseSwitch/index.d.ts +1 -0
- package/lib/components/BaseSwitch/index.vue.d.ts +23 -0
- package/lib/components/BaseSwitch/index.vue.js +1 -0
- package/lib/components/BaseSwitch/index.vue2.js +1 -0
- package/lib/components/index.d.ts +11 -0
- package/lib/components/types/themes/extendThemes.d.ts +44 -0
- package/lib/config/index.d.ts +1 -0
- package/lib/config/themes/color/dark.d.ts +54 -0
- package/lib/config/themes/color/dark.js +1 -0
- package/lib/config/themes/color/index.d.ts +2 -0
- package/lib/config/themes/color/light.d.ts +53 -0
- package/lib/config/themes/color/light.js +1 -0
- package/lib/config/themes/common.d.ts +41 -0
- package/lib/config/themes/common.js +1 -0
- package/lib/config/themes/components/alert/common.d.ts +2 -0
- package/lib/config/themes/components/alert/common.js +1 -0
- package/lib/config/themes/components/alert/dark.d.ts +2 -0
- package/lib/config/themes/components/alert/dark.js +1 -0
- package/lib/config/themes/components/alert/light.d.ts +2 -0
- package/lib/config/themes/components/alert/light.js +1 -0
- package/lib/config/themes/components/baseComponent/dark.d.ts +8 -0
- package/lib/config/themes/components/baseComponent/dark.js +1 -0
- package/lib/config/themes/components/baseComponent/light.d.ts +8 -0
- package/lib/config/themes/components/baseComponent/light.js +1 -0
- package/lib/config/themes/components/button/common.d.ts +2 -0
- package/lib/config/themes/components/button/common.js +1 -0
- package/lib/config/themes/components/button/dark.d.ts +2 -0
- package/lib/config/themes/components/button/dark.js +1 -0
- package/lib/config/themes/components/button/light.d.ts +2 -0
- package/lib/config/themes/components/button/light.js +1 -0
- package/lib/config/themes/components/card/dark.d.ts +2 -0
- package/lib/config/themes/components/card/dark.js +1 -0
- package/lib/config/themes/components/card/light.d.ts +2 -0
- package/lib/config/themes/components/card/light.js +1 -0
- package/lib/config/themes/components/charts/dark.d.ts +398 -0
- package/lib/config/themes/components/charts/dark.js +1 -0
- package/lib/config/themes/components/charts/light.d.ts +396 -0
- package/lib/config/themes/components/charts/light.js +1 -0
- package/lib/config/themes/components/checkbox/common.d.ts +2 -0
- package/lib/config/themes/components/checkbox/common.js +1 -0
- package/lib/config/themes/components/checkbox/dark.d.ts +2 -0
- package/lib/config/themes/components/checkbox/dark.js +1 -0
- package/lib/config/themes/components/checkbox/light.d.ts +2 -0
- package/lib/config/themes/components/checkbox/light.js +1 -0
- package/lib/config/themes/components/dataTable/dark.d.ts +2 -0
- package/lib/config/themes/components/dataTable/dark.js +1 -0
- package/lib/config/themes/components/dataTable/light.d.ts +2 -0
- package/lib/config/themes/components/dataTable/light.js +1 -0
- package/lib/config/themes/components/datePicker/dark.d.ts +2 -0
- package/lib/config/themes/components/datePicker/dark.js +1 -0
- package/lib/config/themes/components/datePicker/light.d.ts +2 -0
- package/lib/config/themes/components/datePicker/light.js +1 -0
- package/lib/config/themes/components/dialog/common.d.ts +8 -0
- package/lib/config/themes/components/dialog/common.js +1 -0
- package/lib/config/themes/components/dialog/dark.d.ts +15 -0
- package/lib/config/themes/components/dialog/dark.js +1 -0
- package/lib/config/themes/components/dialog/light.d.ts +15 -0
- package/lib/config/themes/components/dialog/light.js +1 -0
- package/lib/config/themes/components/dropdown/dark.d.ts +2 -0
- package/lib/config/themes/components/dropdown/dark.js +1 -0
- package/lib/config/themes/components/dropdown/light.d.ts +2 -0
- package/lib/config/themes/components/dropdown/light.js +1 -0
- package/lib/config/themes/components/form/dark.d.ts +2 -0
- package/lib/config/themes/components/form/dark.js +1 -0
- package/lib/config/themes/components/form/light.d.ts +2 -0
- package/lib/config/themes/components/form/light.js +1 -0
- package/lib/config/themes/components/input/common.d.ts +2 -0
- package/lib/config/themes/components/input/common.js +1 -0
- package/lib/config/themes/components/input/dark.d.ts +2 -0
- package/lib/config/themes/components/input/dark.js +1 -0
- package/lib/config/themes/components/input/light.d.ts +2 -0
- package/lib/config/themes/components/input/light.js +1 -0
- package/lib/config/themes/components/inputNumber/common.d.ts +3 -0
- package/lib/config/themes/components/inputNumber/common.js +1 -0
- package/lib/config/themes/components/inputNumber/dark.d.ts +3 -0
- package/lib/config/themes/components/inputNumber/dark.js +1 -0
- package/lib/config/themes/components/inputNumber/light.d.ts +3 -0
- package/lib/config/themes/components/inputNumber/light.js +1 -0
- package/lib/config/themes/components/layout/dark.d.ts +5 -0
- package/lib/config/themes/components/layout/dark.js +1 -0
- package/lib/config/themes/components/layout/light.d.ts +5 -0
- package/lib/config/themes/components/layout/light.js +1 -0
- package/lib/config/themes/components/menu/dark.d.ts +2 -0
- package/lib/config/themes/components/menu/dark.js +1 -0
- package/lib/config/themes/components/menu/light.d.ts +2 -0
- package/lib/config/themes/components/menu/light.js +1 -0
- package/lib/config/themes/components/progress/dark.d.ts +3 -0
- package/lib/config/themes/components/progress/dark.js +1 -0
- package/lib/config/themes/components/progress/light.d.ts +3 -0
- package/lib/config/themes/components/progress/light.js +1 -0
- package/lib/config/themes/components/radio/dark.d.ts +3 -0
- package/lib/config/themes/components/radio/dark.js +1 -0
- package/lib/config/themes/components/radio/light.d.ts +3 -0
- package/lib/config/themes/components/radio/light.js +1 -0
- package/lib/config/themes/components/select/dark.d.ts +2 -0
- package/lib/config/themes/components/select/dark.js +1 -0
- package/lib/config/themes/components/select/light.d.ts +2 -0
- package/lib/config/themes/components/select/light.js +1 -0
- package/lib/config/themes/components/slider/dark.d.ts +3 -0
- package/lib/config/themes/components/slider/dark.js +1 -0
- package/lib/config/themes/components/slider/light.d.ts +3 -0
- package/lib/config/themes/components/slider/light.js +1 -0
- package/lib/config/themes/components/switch/common.d.ts +3 -0
- package/lib/config/themes/components/switch/common.js +1 -0
- package/lib/config/themes/components/switch/dark.d.ts +3 -0
- package/lib/config/themes/components/switch/dark.js +1 -0
- package/lib/config/themes/components/switch/light.d.ts +3 -0
- package/lib/config/themes/components/switch/light.js +1 -0
- package/lib/config/themes/components/tag/dark.d.ts +2 -0
- package/lib/config/themes/components/tag/dark.js +1 -0
- package/lib/config/themes/components/tag/light.d.ts +2 -0
- package/lib/config/themes/components/tag/light.js +1 -0
- package/lib/config/themes/components/transfer/dark.d.ts +2 -0
- package/lib/config/themes/components/transfer/dark.js +1 -0
- package/lib/config/themes/components/transfer/light.d.ts +2 -0
- package/lib/config/themes/components/transfer/light.js +1 -0
- package/lib/config/themes/dark.d.ts +2 -0
- package/lib/config/themes/dark.js +1 -0
- package/lib/config/themes/index.d.ts +7 -0
- package/lib/config/themes/index.js +1 -0
- package/lib/config/themes/light.d.ts +2 -0
- package/lib/config/themes/light.js +1 -0
- package/lib/config/themes/token/dark.d.ts +28 -0
- package/lib/config/themes/token/dark.js +1 -0
- package/lib/config/themes/token/index.d.ts +2 -0
- package/lib/config/themes/token/light.d.ts +9 -0
- package/lib/config/themes/token/light.js +1 -0
- package/lib/globalMethods/index.d.ts +2 -0
- package/lib/globalMethods/index.js +1 -0
- package/lib/globalMethods/modules/confirmTip.d.ts +2 -0
- package/lib/globalMethods/modules/confirmTip.js +1 -0
- package/lib/globalMethods/modules/message.d.ts +4 -0
- package/lib/globalMethods/modules/message.js +1 -0
- package/lib/hooks/useNaiveConfigProvideContext.d.ts +2 -0
- package/lib/hooks/useNaiveConfigProvideContext.js +1 -0
- package/lib/index.css +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +1 -0
- package/lib/node_modules/.pnpm/lib-materials@0.0.8_typescript@5.7.2/node_modules/lib-materials/dist/lib-materials.js +1 -0
- package/lib/types/themes/extendThemes.d.ts +44 -0
- package/package.json +43 -0
- package/readme.md +83 -0
- package/src/components/AppProvider/index.ts +1 -0
- package/src/components/AppProvider/index.vue +38 -0
- package/src/components/BaseButton/index.ts +1 -0
- package/src/components/BaseButton/index.vue +21 -0
- package/src/components/BaseDataTable/index.ts +1 -0
- package/src/components/BaseDataTable/index.vue +120 -0
- package/src/components/BaseDialog/index.ts +2 -0
- package/src/components/BaseDialog/index.vue +104 -0
- package/src/components/BaseDialog/options.ts +25 -0
- package/src/components/BaseDialog/type.ts +30 -0
- package/src/components/BaseInputNumber/index.ts +1 -0
- package/src/components/BaseInputNumber/index.vue +188 -0
- package/src/components/BaseLayout/ASide/index.vue +104 -0
- package/src/components/BaseLayout/ASide/type.ts +11 -0
- package/src/components/BaseLayout/index.ts +1 -0
- package/src/components/BaseProgress/index.ts +99 -0
- package/src/components/BaseRadio/index.ts +1 -0
- package/src/components/BaseRadio/index.vue +45 -0
- package/src/components/BaseSelect/index.ts +1 -0
- package/src/components/BaseSelect/index.vue +59 -0
- package/src/components/BaseSlider/index.ts +1 -0
- package/src/components/BaseSlider/index.vue +114 -0
- package/src/components/BaseSwitch/index.ts +1 -0
- package/src/components/BaseSwitch/index.vue +69 -0
- package/src/components/index.ts +11 -0
- package/src/components/types/themes/extendThemes.ts +50 -0
- package/src/config/index.ts +1 -0
- package/src/config/themes/color/dark.ts +60 -0
- package/src/config/themes/color/index.ts +2 -0
- package/src/config/themes/color/light.ts +59 -0
- package/src/config/themes/common.ts +50 -0
- package/src/config/themes/components/alert/common.ts +13 -0
- package/src/config/themes/components/alert/dark.ts +23 -0
- package/src/config/themes/components/alert/light.ts +18 -0
- package/src/config/themes/components/baseComponent/dark.ts +189 -0
- package/src/config/themes/components/baseComponent/light.ts +297 -0
- package/src/config/themes/components/button/common.ts +20 -0
- package/src/config/themes/components/button/dark.ts +127 -0
- package/src/config/themes/components/button/light.ts +102 -0
- package/src/config/themes/components/card/dark.ts +13 -0
- package/src/config/themes/components/card/light.ts +13 -0
- package/src/config/themes/components/charts/dark.ts +425 -0
- package/src/config/themes/components/charts/light.ts +424 -0
- package/src/config/themes/components/checkbox/common.ts +7 -0
- package/src/config/themes/components/checkbox/dark.ts +23 -0
- package/src/config/themes/components/checkbox/light.ts +22 -0
- package/src/config/themes/components/dataTable/dark.ts +14 -0
- package/src/config/themes/components/dataTable/light.ts +14 -0
- package/src/config/themes/components/datePicker/dark.ts +10 -0
- package/src/config/themes/components/datePicker/light.ts +10 -0
- package/src/config/themes/components/dialog/common.ts +8 -0
- package/src/config/themes/components/dialog/dark.ts +14 -0
- package/src/config/themes/components/dialog/light.ts +13 -0
- package/src/config/themes/components/dropdown/dark.ts +7 -0
- package/src/config/themes/components/dropdown/light.ts +7 -0
- package/src/config/themes/components/form/dark.ts +7 -0
- package/src/config/themes/components/form/light.ts +7 -0
- package/src/config/themes/components/input/common.ts +13 -0
- package/src/config/themes/components/input/dark.ts +25 -0
- package/src/config/themes/components/input/light.ts +24 -0
- package/src/config/themes/components/inputNumber/common.ts +14 -0
- package/src/config/themes/components/inputNumber/dark.ts +24 -0
- package/src/config/themes/components/inputNumber/light.ts +20 -0
- package/src/config/themes/components/layout/dark.ts +8 -0
- package/src/config/themes/components/layout/light.ts +9 -0
- package/src/config/themes/components/menu/dark.ts +18 -0
- package/src/config/themes/components/menu/light.ts +17 -0
- package/src/config/themes/components/progress/dark.ts +25 -0
- package/src/config/themes/components/progress/light.ts +25 -0
- package/src/config/themes/components/radio/dark.ts +20 -0
- package/src/config/themes/components/radio/light.ts +21 -0
- package/src/config/themes/components/select/dark.ts +42 -0
- package/src/config/themes/components/select/light.ts +38 -0
- package/src/config/themes/components/slider/dark.ts +16 -0
- package/src/config/themes/components/slider/light.ts +16 -0
- package/src/config/themes/components/switch/common.ts +17 -0
- package/src/config/themes/components/switch/dark.ts +17 -0
- package/src/config/themes/components/switch/light.ts +17 -0
- package/src/config/themes/components/tag/dark.ts +40 -0
- package/src/config/themes/components/tag/light.ts +39 -0
- package/src/config/themes/components/transfer/dark.ts +8 -0
- package/src/config/themes/components/transfer/light.ts +8 -0
- package/src/config/themes/dark.ts +61 -0
- package/src/config/themes/index.ts +12 -0
- package/src/config/themes/light.ts +61 -0
- package/src/config/themes/token/dark.ts +32 -0
- package/src/config/themes/token/index.ts +2 -0
- package/src/config/themes/token/light.ts +11 -0
- package/src/globalMethods/index.ts +8 -0
- package/src/globalMethods/modules/confirmTip.ts +49 -0
- package/src/globalMethods/modules/message.ts +20 -0
- package/src/hooks/useNaiveConfigProvideContext.ts +10 -0
- package/src/index.ts +8 -0
- package/src/style/index.scss +63 -0
- package/src/svg-icons/add.svg +1 -0
- package/src/svg-icons/arrow/down.svg +1 -0
- package/src/svg-icons/arrow/top.svg +1 -0
- package/src/svg-icons/logo.svg +4 -0
- package/src/svg-icons/operate/add.svg +1 -0
- package/src/svg-icons/operate/close.svg +1 -0
- package/src/svg-icons/operate/minus.svg +1 -0
- package/src/svg-icons/progress-default.svg +3 -0
- package/src/types/themes/extendThemes.ts +50 -0
- package/tsconfig.json +38 -0
- package/typing/components.d.ts +38 -0
- package/typing/global.d.ts +19 -0
- package/vite.config.ts +61 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/* eslint-disable max-lines-per-function */
|
|
3
|
+
import { defineComponent, h, PropType, shallowRef, watch } from 'vue'
|
|
4
|
+
import { progressProps, NProgress } from 'naive-ui'
|
|
5
|
+
import { SvgIcon } from 'lib-materials'
|
|
6
|
+
import useNaiveConfigProvideContext from '../../hooks/useNaiveConfigProvideContext'
|
|
7
|
+
|
|
8
|
+
export type Size = 'medium' | 'large'
|
|
9
|
+
|
|
10
|
+
const baseProgressProps = {
|
|
11
|
+
...progressProps,
|
|
12
|
+
circleSize: {
|
|
13
|
+
type: String as PropType<Size>,
|
|
14
|
+
default: 'medium'
|
|
15
|
+
},
|
|
16
|
+
tip: String
|
|
17
|
+
} as const
|
|
18
|
+
|
|
19
|
+
export default defineComponent({
|
|
20
|
+
name: 'BaseProgress',
|
|
21
|
+
props: baseProgressProps,
|
|
22
|
+
setup(props, { slots }) {
|
|
23
|
+
const clsPrefix = 'base-progress-'
|
|
24
|
+
const { mergedThemeOverridesRef } = useNaiveConfigProvideContext()
|
|
25
|
+
const extendStyle = shallowRef({})
|
|
26
|
+
|
|
27
|
+
const renderDashBoardContent = () => h(
|
|
28
|
+
'div',
|
|
29
|
+
{
|
|
30
|
+
class: `${clsPrefix}dashboard-content`
|
|
31
|
+
},
|
|
32
|
+
[
|
|
33
|
+
h(
|
|
34
|
+
'div',
|
|
35
|
+
{
|
|
36
|
+
class: `${clsPrefix}dashboard-content-logo`,
|
|
37
|
+
style: 'height:24px;width:24px'
|
|
38
|
+
},
|
|
39
|
+
slots.icon ? slots.icon() : h(SvgIcon, { icon: 'progress-default', size: '18' })
|
|
40
|
+
),
|
|
41
|
+
h(
|
|
42
|
+
'div',
|
|
43
|
+
{
|
|
44
|
+
class: `${clsPrefix}dashboard-content-title`
|
|
45
|
+
},
|
|
46
|
+
[
|
|
47
|
+
h('span', {}, `${props.percentage}`),
|
|
48
|
+
h('span', {}, '%')
|
|
49
|
+
]
|
|
50
|
+
),
|
|
51
|
+
props.tip ? h(
|
|
52
|
+
'div',
|
|
53
|
+
{
|
|
54
|
+
class: `${clsPrefix}dashboard-content-tip`
|
|
55
|
+
},
|
|
56
|
+
props.tip
|
|
57
|
+
) : undefined
|
|
58
|
+
]
|
|
59
|
+
)
|
|
60
|
+
const renderDefault = () => {
|
|
61
|
+
if (slots.default) return () => (slots as any).default()
|
|
62
|
+
if (props.type === 'dashboard') return renderDashBoardContent
|
|
63
|
+
return undefined
|
|
64
|
+
// if (props.type === 'dashboard') return renderDashBoardContent
|
|
65
|
+
// return slots.default ? () => (slots as any).default() : undefined
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
watch(
|
|
69
|
+
() => mergedThemeOverridesRef?.value?.Progress,
|
|
70
|
+
(curVal) => {
|
|
71
|
+
const fontSize = props.circleSize === 'medium' ? curVal.fontSizeCircleMedium : curVal.fontSizeCircleLarge
|
|
72
|
+
const width = props.circleSize === 'medium' ? curVal.circleWidthMedium : curVal.circleWidthLarge
|
|
73
|
+
extendStyle.value = {
|
|
74
|
+
'--n-tip-color-circle': curVal.tipColorCircle || '#56647A',
|
|
75
|
+
'--n-tip-font-size-circle': curVal.tipFontSizeCircle || '14px',
|
|
76
|
+
'--n-content-font-size': fontSize || 'var(--n-font-size)',
|
|
77
|
+
'--n-circle-width': width || '120px'
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
immediate: true
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
return () => (
|
|
86
|
+
h(
|
|
87
|
+
NProgress,
|
|
88
|
+
{
|
|
89
|
+
...props,
|
|
90
|
+
class: 'base-progress',
|
|
91
|
+
style: extendStyle.value
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
default: renderDefault()
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BaseRadio } from './index.vue'
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<n-radio v-bind="$attrs" :class="['base-radio', className]" :style="[extendStyle, style]">
|
|
3
|
+
<template v-for="(item,keys) in $slots" v-slot:[keys]>
|
|
4
|
+
<slot :name="keys"></slot>
|
|
5
|
+
</template>
|
|
6
|
+
</n-radio>
|
|
7
|
+
</template>
|
|
8
|
+
<script lang="ts" setup>
|
|
9
|
+
import { CSSProperties, shallowRef, watch } from 'vue'
|
|
10
|
+
import useNaiveConfigProvideContext from '../../hooks/useNaiveConfigProvideContext'
|
|
11
|
+
type PropsType = {
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
withDefaults(defineProps<PropsType>(), { className: '', style: () => ({}) })
|
|
16
|
+
defineOptions({
|
|
17
|
+
name: 'BaseRadio'
|
|
18
|
+
})
|
|
19
|
+
const { mergedThemeOverridesRef } = useNaiveConfigProvideContext()
|
|
20
|
+
const extendStyle = shallowRef({})
|
|
21
|
+
|
|
22
|
+
watch(
|
|
23
|
+
() => mergedThemeOverridesRef?.value?.Radio,
|
|
24
|
+
(curVal) => {
|
|
25
|
+
if (!curVal) return
|
|
26
|
+
extendStyle.value = {
|
|
27
|
+
'--n-box-shadow-active-disabled': curVal.boxShadowActiveDisabled || curVal.boxShadowDisabled,
|
|
28
|
+
'--n-color-active-disabled': curVal.colorActiveDisabled || curVal.boxShadowDisabled
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
immediate: true
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
</script>
|
|
36
|
+
<style lang="scss" scoped>
|
|
37
|
+
.base-radio {
|
|
38
|
+
&.n-radio--disabled.n-radio--checked {
|
|
39
|
+
:deep(.n-radio__dot--checked) {
|
|
40
|
+
box-shadow: var(--n-box-shadow-active-disabled);
|
|
41
|
+
background-color: var(--n-color-active-disabled);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BaseSelect } from './index.vue'
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<n-select
|
|
3
|
+
class="base-select"
|
|
4
|
+
:renderTag="multiple ? renderMultipleTag : undefined"
|
|
5
|
+
:render-label="multiple ? renderMultipleLabel : undefined"
|
|
6
|
+
:multiple="multiple"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
>
|
|
9
|
+
<template v-for="(item, keys) in $slots" v-slot:[keys]>
|
|
10
|
+
<slot :name="keys"></slot>
|
|
11
|
+
</template>
|
|
12
|
+
</n-select>
|
|
13
|
+
</template>
|
|
14
|
+
<script lang="ts" setup>
|
|
15
|
+
import { h, type VNodeChild } from 'vue'
|
|
16
|
+
import { NCheckbox, NTag, type SelectOption, type SelectRenderTag } from 'naive-ui'
|
|
17
|
+
type PropsType = {
|
|
18
|
+
multiple?: boolean
|
|
19
|
+
}
|
|
20
|
+
withDefaults(defineProps<PropsType>(), { multiple: false })
|
|
21
|
+
const renderMultipleLabel = (option: SelectOption, selected: boolean): VNodeChild => {
|
|
22
|
+
return [
|
|
23
|
+
h(
|
|
24
|
+
NCheckbox,
|
|
25
|
+
{
|
|
26
|
+
checked: selected,
|
|
27
|
+
disabled: option.disabled
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
default: () => option.label
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const renderMultipleTag: SelectRenderTag = ({ option, handleClose }) => {
|
|
37
|
+
return h(
|
|
38
|
+
NTag,
|
|
39
|
+
{
|
|
40
|
+
type: 'default',
|
|
41
|
+
closable: true,
|
|
42
|
+
bordered: false,
|
|
43
|
+
onMousedown: (e: FocusEvent) => {
|
|
44
|
+
e.preventDefault()
|
|
45
|
+
},
|
|
46
|
+
onClose: (e: MouseEvent) => {
|
|
47
|
+
e.stopPropagation()
|
|
48
|
+
handleClose()
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{ default: () => option.label }
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
defineOptions({
|
|
56
|
+
name: 'BaseSelect'
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BaseSlider } from './index.vue'
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="base-slider" :style="[extendStyle, style]">
|
|
3
|
+
<div class="slider-content">
|
|
4
|
+
<n-slider v-bind="$attrs" v-model:value="currentValue" :min="min" :max="max" :range="range" />
|
|
5
|
+
<div v-if="showExtremeValueText" class="extreme-value-text">
|
|
6
|
+
<div>{{ min }}</div>
|
|
7
|
+
<div>{{ max }}</div>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="slider-input" v-if="showInput">
|
|
11
|
+
<n-input-number v-if="!range && typeof currentValue === 'number'" :show-button="false" placeholder="" :size="size"
|
|
12
|
+
v-model:value="currentValue" :min="min" :max="max" :precision="precision" />
|
|
13
|
+
<template v-else-if="range && typeof currentValue !== 'number'">
|
|
14
|
+
<n-input-number :show-button="false" placeholder="" :size="size" v-model:value="currentValue[0]" :min="min"
|
|
15
|
+
:max="max" :precision="precision" />
|
|
16
|
+
<div class="line"></div>
|
|
17
|
+
<n-input-number :show-button="false" placeholder="" :size="size" v-model:value="currentValue[1]" :min="min"
|
|
18
|
+
:max="max" :precision="precision" />
|
|
19
|
+
</template>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script lang="ts" setup>
|
|
25
|
+
import { computed, CSSProperties, shallowRef, watch } from 'vue'
|
|
26
|
+
import useNaiveConfigProvideContext from '../../hooks/useNaiveConfigProvideContext'
|
|
27
|
+
type PropsType = {
|
|
28
|
+
style?: CSSProperties;
|
|
29
|
+
showInput?: boolean;
|
|
30
|
+
size?: 'small' | 'medium';
|
|
31
|
+
value: number | number[],
|
|
32
|
+
min?: number,
|
|
33
|
+
max?: number,
|
|
34
|
+
range?: boolean,
|
|
35
|
+
showExtremeValueText?: boolean
|
|
36
|
+
precision?: number
|
|
37
|
+
}
|
|
38
|
+
const props = withDefaults(defineProps<PropsType>(), {
|
|
39
|
+
style: () => ({}), showInput: false, size: 'medium',
|
|
40
|
+
min: 0, max: 100, range: false, showExtremeValueText: false,
|
|
41
|
+
precision: 0
|
|
42
|
+
})
|
|
43
|
+
defineOptions({
|
|
44
|
+
name: 'BaseSlider'
|
|
45
|
+
})
|
|
46
|
+
const { mergedThemeOverridesRef } = useNaiveConfigProvideContext()
|
|
47
|
+
const extendStyle = shallowRef({})
|
|
48
|
+
|
|
49
|
+
const emits = defineEmits(['update:value'])
|
|
50
|
+
const currentValue = computed({
|
|
51
|
+
get() { return props.value },
|
|
52
|
+
set(value) { emits('update:value', value) }
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
watch(
|
|
56
|
+
() => mergedThemeOverridesRef?.value?.Slider,
|
|
57
|
+
(curVal) => {
|
|
58
|
+
if (!curVal) return
|
|
59
|
+
extendStyle.value = {
|
|
60
|
+
'--n-slider-handler-border': curVal.handleBorderStyle,
|
|
61
|
+
'--n-slider-input-width': curVal.inputWidth,
|
|
62
|
+
'--n-slider-range-input-line-color': curVal.rangeInputLineColor,
|
|
63
|
+
'--n-slider-extreme-value-text-color': curVal.extremeValueTextColor
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
immediate: true
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<style lang="scss" scoped>
|
|
73
|
+
.base-slider {
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
|
|
77
|
+
:deep(.n-slider-handle) {
|
|
78
|
+
border: var(--n-slider-handler-border)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.slider-content {
|
|
82
|
+
flex: 1;
|
|
83
|
+
position: relative;
|
|
84
|
+
|
|
85
|
+
.extreme-value-text {
|
|
86
|
+
position: absolute;
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: space-between;
|
|
89
|
+
align-items: center;
|
|
90
|
+
width: 100%;
|
|
91
|
+
font-size: 12px;
|
|
92
|
+
color: var(--n-slider-extreme-value-text-color);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.slider-input {
|
|
98
|
+
margin-left: 16px;
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
|
|
102
|
+
.line {
|
|
103
|
+
margin: 0 8px;
|
|
104
|
+
width: 10px;
|
|
105
|
+
height: 1px;
|
|
106
|
+
background: var(--n-slider-range-input-line-color);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:deep(.n-input-number) {
|
|
110
|
+
width: var(--n-slider-input-width);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BaseSwitch } from './index.vue'
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<n-switch v-bind="$attrs" :class="`base-switch ${className}`" :style="[extendStyle, style]">
|
|
3
|
+
<template v-for="(item,keys) in $slots" v-slot:[keys]>
|
|
4
|
+
<slot :name="keys"></slot>
|
|
5
|
+
</template>
|
|
6
|
+
</n-switch>
|
|
7
|
+
</template>
|
|
8
|
+
<script lang="ts" setup>
|
|
9
|
+
import { CSSProperties, shallowRef, watch } from 'vue'
|
|
10
|
+
import { useThemeVars } from 'naive-ui'
|
|
11
|
+
import useNaiveConfigProvideContext from '../../hooks/useNaiveConfigProvideContext'
|
|
12
|
+
type PropsType = {
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
withDefaults(defineProps<PropsType>(), { className: '', style: () => ({}) })
|
|
17
|
+
defineOptions({
|
|
18
|
+
name: 'BaseSwitch'
|
|
19
|
+
})
|
|
20
|
+
const NConfigProvider = useNaiveConfigProvideContext()
|
|
21
|
+
const extendStyle = shallowRef({})
|
|
22
|
+
|
|
23
|
+
watch(
|
|
24
|
+
() => NConfigProvider?.mergedThemeOverridesRef.value.Switch,
|
|
25
|
+
(curVal) => {
|
|
26
|
+
console.log(useThemeVars(), 'useThemeVars')
|
|
27
|
+
if (!curVal) return
|
|
28
|
+
extendStyle.value = {
|
|
29
|
+
'--n-rail-color-active-disabled': curVal.railColorActiveDisabled,
|
|
30
|
+
'--n-rail-color-disabled': curVal.railColorDisabled,
|
|
31
|
+
'--n-button-color-disabled': curVal.buttonColorDisabled,
|
|
32
|
+
'--n-button-color-active-disabled': curVal.buttonColorActiveDisabled
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
immediate: true
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
</script>
|
|
40
|
+
<style lang="scss" scoped>
|
|
41
|
+
.base-switch {
|
|
42
|
+
:deep(.n-switch__button) {
|
|
43
|
+
box-shadow:
|
|
44
|
+
0px 5px 5px -3px #0000001A,
|
|
45
|
+
0px 8px 10px 1px #0000000F,
|
|
46
|
+
0px 3px 14px 2px #0000000D;
|
|
47
|
+
|
|
48
|
+
}
|
|
49
|
+
:deep(.n-switch__rail) {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
&.n-switch--disabled {
|
|
53
|
+
:deep(.n-switch__rail) {
|
|
54
|
+
background-color: var(--n-rail-color-disabled);
|
|
55
|
+
.n-switch__button {
|
|
56
|
+
background-color: var(--n-button-color-disabled)
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
&.n-switch--active {
|
|
60
|
+
:deep(.n-switch__rail) {
|
|
61
|
+
background-color: var(--n-rail-color-active-disabled);
|
|
62
|
+
.n-switch__button {
|
|
63
|
+
background-color: var(--n-button-color-active-disabled)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './AppProvider'
|
|
2
|
+
export * from './BaseButton'
|
|
3
|
+
export * from './BaseDataTable'
|
|
4
|
+
export * from './BaseDialog'
|
|
5
|
+
export * from './BaseInputNumber'
|
|
6
|
+
export * from './BaseLayout'
|
|
7
|
+
export * from './BaseRadio'
|
|
8
|
+
export { default as BaseProgress } from './BaseProgress'
|
|
9
|
+
export * from './BaseSelect'
|
|
10
|
+
export * from './BaseSlider'
|
|
11
|
+
export * from './BaseSwitch'
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type ExtendThemeRadio = {
|
|
2
|
+
colorActiveDisabled?: string
|
|
3
|
+
boxShadowActiveDisabled?: string
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export type ExtendThemeSwitch = {
|
|
7
|
+
railColorActiveDisabled?: string
|
|
8
|
+
railColorDisabled?: string
|
|
9
|
+
buttonColorActiveDisabled?: string
|
|
10
|
+
buttonColorDisabled?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type ExtendThemeSlider = {
|
|
14
|
+
handleBorderStyle?: string
|
|
15
|
+
inputWidth?: string
|
|
16
|
+
rangeInputLineColor?: string
|
|
17
|
+
extremeValueTextColor?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type ExtendInputNumber = {
|
|
21
|
+
controlsFontColor?: string
|
|
22
|
+
controlFontColorDisabled?: string
|
|
23
|
+
|
|
24
|
+
innerControlsLargeWidth?: string
|
|
25
|
+
innerControlsMediumWidth?: string
|
|
26
|
+
innerControlsSmallWidth?: string
|
|
27
|
+
innerControlsLargeHeight?: string
|
|
28
|
+
innerControlsMediumHeight?: string
|
|
29
|
+
innerControlsSmallHeight?: string
|
|
30
|
+
innerControlsBackground?: string
|
|
31
|
+
innerControlsDisabledBackground?: string
|
|
32
|
+
innerControlsLargeBorderRadius?: string
|
|
33
|
+
innerControlsMediumBorderRadius?: string
|
|
34
|
+
innerControlsSmallBorderRadius?: string
|
|
35
|
+
|
|
36
|
+
outerControlsBorderStyle?: string
|
|
37
|
+
outerControlsBackground?: string
|
|
38
|
+
outerControlsBorderStyleDisabled?: string
|
|
39
|
+
outerControlsBackgroundDisabled?: string
|
|
40
|
+
outerControlsOpacityDisabled?: number
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type ExtendProgress = {
|
|
44
|
+
circleWidthMedium?: string;
|
|
45
|
+
circleWidthLarge?: string;
|
|
46
|
+
fontSizeCircleMedium?: string;
|
|
47
|
+
fontSizeCircleLarge?: string;
|
|
48
|
+
tipColorCircle?: string;
|
|
49
|
+
tipFontSizeCircle?: string;
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './themes/index'
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const darkBase = {
|
|
2
|
+
// 主色
|
|
3
|
+
'color-primary-1': '#263658',
|
|
4
|
+
'color-primary-2': '#1D4184',
|
|
5
|
+
'color-primary-3': '#184391',
|
|
6
|
+
'color-primary-4': '#18429D',
|
|
7
|
+
'color-primary-5': '#296BD0',
|
|
8
|
+
'color-primary-6': '#3693FF',
|
|
9
|
+
'color-primary-7': '#3693FF',
|
|
10
|
+
'color-primary-8': '#BBD1FF',
|
|
11
|
+
'color-primary-9': '#CBDEFF',
|
|
12
|
+
'color-primary-10': '#E8F1FF',
|
|
13
|
+
// green
|
|
14
|
+
'color-green-1': '#163A2A',
|
|
15
|
+
'color-green-2': '#0D4934',
|
|
16
|
+
'color-green-3': '#005C3A',
|
|
17
|
+
'color-green-4': '#006D55',
|
|
18
|
+
'color-green-5': '#047D4C',
|
|
19
|
+
'color-green-6': '#10C278',
|
|
20
|
+
'color-green-7': '#6DD68E',
|
|
21
|
+
'color-green-8': '#91E9CA',
|
|
22
|
+
'color-green-9': '#C6F0E0',
|
|
23
|
+
'color-green-10': '#E7FFF8',
|
|
24
|
+
// red
|
|
25
|
+
'color-red-1': '#431B1B',
|
|
26
|
+
'color-red-2': '#5E201D',
|
|
27
|
+
'color-red-3': '#76201B',
|
|
28
|
+
'color-red-4': '#96241B',
|
|
29
|
+
'color-red-5': '#C82D25',
|
|
30
|
+
'color-red-6': '#EA4D44',
|
|
31
|
+
'color-red-7': '#EA4D44',
|
|
32
|
+
'color-red-8': '#FFD2CF',
|
|
33
|
+
'color-red-9': '#F9DAD8',
|
|
34
|
+
'color-red-10': '#FFEEEC',
|
|
35
|
+
// origin
|
|
36
|
+
'color-origin-1': '#3F260A',
|
|
37
|
+
'color-origin-2': '#703510',
|
|
38
|
+
'color-origin-3': '#9B5020',
|
|
39
|
+
'color-origin-4': '#A65519',
|
|
40
|
+
'color-origin-5': '#A74800',
|
|
41
|
+
'color-origin-6': '#FF9939',
|
|
42
|
+
'color-origin-7': '#F7A55D',
|
|
43
|
+
'color-origin-8': '#FFB677',
|
|
44
|
+
'color-origin-9': '#FFD59F',
|
|
45
|
+
'color-origin-10': '#FFF7D9',
|
|
46
|
+
// gray
|
|
47
|
+
'color-gray-1': '#161C28',
|
|
48
|
+
'color-gray-2': '#222833',
|
|
49
|
+
'color-gray-3': '#2F3A4B',
|
|
50
|
+
'color-gray-4': '#474E58',
|
|
51
|
+
'color-gray-5': '#818691',
|
|
52
|
+
'color-gray-6': '#9DA3AF',
|
|
53
|
+
'color-gray-7': '#AFB4BE',
|
|
54
|
+
'color-gray-8': '#C7CAD1',
|
|
55
|
+
'color-gray-9': '#E5E9EF',
|
|
56
|
+
'color-gray-10': '#F6F6F6',
|
|
57
|
+
'color-gray-11': '#636467'
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default darkBase
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const lightBase = {
|
|
2
|
+
// 主色
|
|
3
|
+
'color-primary-1': '#ECF2FF',
|
|
4
|
+
'color-primary-2': '#DEEAFF',
|
|
5
|
+
'color-primary-3': '#BBD1FF',
|
|
6
|
+
'color-primary-4': '#A1BFFF',
|
|
7
|
+
'color-primary-5': '#4C8EFF',
|
|
8
|
+
'color-primary-6': '#0151FF',
|
|
9
|
+
'color-primary-7': '#0046DC',
|
|
10
|
+
'color-primary-8': '#003AB8',
|
|
11
|
+
'color-primary-9': '#003098',
|
|
12
|
+
'color-primary-10': '#002575',
|
|
13
|
+
// green
|
|
14
|
+
'color-green-1': '#EBFCF4',
|
|
15
|
+
'color-green-2': '#D6F8E6',
|
|
16
|
+
'color-green-3': '#C0ECD6',
|
|
17
|
+
'color-green-4': '#91E9BC',
|
|
18
|
+
'color-green-5': '#6ED9A5',
|
|
19
|
+
'color-green-6': '#0DAB63',
|
|
20
|
+
'color-green-7': '#059D5E',
|
|
21
|
+
'color-green-8': '#006D45',
|
|
22
|
+
'color-green-9': '#0D492B',
|
|
23
|
+
'color-green-10': '#213F26',
|
|
24
|
+
// red
|
|
25
|
+
'color-red-1': '#FFF0EF',
|
|
26
|
+
'color-red-2': '#F9DAD8',
|
|
27
|
+
'color-red-3': '#FFD2CF',
|
|
28
|
+
'color-red-4': '#FF989A',
|
|
29
|
+
'color-red-5': '#EF7173',
|
|
30
|
+
'color-red-6': '#EC352B',
|
|
31
|
+
'color-red-7': '#C82D25',
|
|
32
|
+
'color-red-8': '#96241B',
|
|
33
|
+
'color-red-9': '#5E201D',
|
|
34
|
+
'color-red-10': '#4B2C2C',
|
|
35
|
+
// origin
|
|
36
|
+
'color-origin-1': '#FFF5E8',
|
|
37
|
+
'color-origin-2': '#FFE5CD',
|
|
38
|
+
'color-origin-3': '#FFE3BF',
|
|
39
|
+
'color-origin-4': '#FFB677',
|
|
40
|
+
'color-origin-5': '#F7A55D',
|
|
41
|
+
'color-origin-6': '#F78821',
|
|
42
|
+
'color-origin-7': '#D25C02',
|
|
43
|
+
'color-origin-8': '#9A4C1B',
|
|
44
|
+
'color-origin-9': '#703510',
|
|
45
|
+
'color-origin-10': '#452009',
|
|
46
|
+
// gray
|
|
47
|
+
'color-gray-1': '#FAFAFA',
|
|
48
|
+
'color-gray-2': '#F3F6FC',
|
|
49
|
+
'color-gray-3': '#E0E6EF',
|
|
50
|
+
'color-gray-4': '#CAD3E2',
|
|
51
|
+
'color-gray-5': '#B0BACB',
|
|
52
|
+
'color-gray-6': '#8D9CAF',
|
|
53
|
+
'color-gray-7': '#657489',
|
|
54
|
+
'color-gray-8': '#56647A',
|
|
55
|
+
'color-gray-9': '#262D3E',
|
|
56
|
+
'color-gray-10': '#161C2A'
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export default lightBase
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export const commonBase = {
|
|
2
|
+
borderRadiusLarge: '10px',
|
|
3
|
+
borderRadiusMedium: '10px',
|
|
4
|
+
borderRadiusSmall: '10px',
|
|
5
|
+
|
|
6
|
+
heightSmall: '28px',
|
|
7
|
+
heightMedium: '32px',
|
|
8
|
+
heightLarge: '40px',
|
|
9
|
+
|
|
10
|
+
fontSizeLarge: '14px',
|
|
11
|
+
fontSizeMedium: '14px',
|
|
12
|
+
fontSizeSmall: '12px',
|
|
13
|
+
|
|
14
|
+
// switch
|
|
15
|
+
buttonHeightSmall: '12px',
|
|
16
|
+
buttonHeightMedium: '16px',
|
|
17
|
+
buttonHeightLarge: '22px',
|
|
18
|
+
buttonWidthSmall: '12px',
|
|
19
|
+
buttonWidthMedium: '16px',
|
|
20
|
+
buttonWidthLarge: '22px',
|
|
21
|
+
buttonWidthPressedSmall: '20px',
|
|
22
|
+
buttonWidthPressedMedium: '24px',
|
|
23
|
+
buttonWidthPressedLarge: '28px',
|
|
24
|
+
railHeightSmall: '16px',
|
|
25
|
+
railHeightMedium: '24px',
|
|
26
|
+
railHeightLarge: '26px',
|
|
27
|
+
railWidthSmall: '28px',
|
|
28
|
+
railWidthMedium: '40px',
|
|
29
|
+
railWidthLarge: '48px',
|
|
30
|
+
|
|
31
|
+
// tag
|
|
32
|
+
tagBorderRadius: '6px',
|
|
33
|
+
tagHeightMedium: '22px',
|
|
34
|
+
tagHeightLarge: '26px',
|
|
35
|
+
paddingBase: '8px 12px',
|
|
36
|
+
iconSizeBase: '20px',
|
|
37
|
+
|
|
38
|
+
paddingMedium: '0 10px',
|
|
39
|
+
tabGapSmall: '24px',
|
|
40
|
+
tabGapMedium: '24px',
|
|
41
|
+
tabGapLarge: '24px',
|
|
42
|
+
/* 小尺寸Line类型水平内边距 */
|
|
43
|
+
tabPaddingSmall: '0 0 4px 0',
|
|
44
|
+
tabPaddingMedium: '0 0 4px 0',
|
|
45
|
+
tabPaddingLarge: '0 0 4px 0',
|
|
46
|
+
|
|
47
|
+
fontWeightNormal: '400',
|
|
48
|
+
fontWeightActive: '500',
|
|
49
|
+
tabBorderRadius: '19px'
|
|
50
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AlertProps } from 'naive-ui'
|
|
2
|
+
import { commonBase } from '../../common'
|
|
3
|
+
|
|
4
|
+
export const AlertThemeCommon: AlertProps['themeOverrides'] = {
|
|
5
|
+
|
|
6
|
+
borderRadius: commonBase.borderRadiusMedium,
|
|
7
|
+
|
|
8
|
+
fontSize: commonBase.fontSizeMedium,
|
|
9
|
+
|
|
10
|
+
iconSize: '16px',
|
|
11
|
+
|
|
12
|
+
iconMargin: '15px 8px 0 12px'
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AlertProps } from 'naive-ui'
|
|
2
|
+
import { darkBase } from '../../color'
|
|
3
|
+
import { AlertThemeCommon } from './common'
|
|
4
|
+
|
|
5
|
+
export const AlertThemeDark: AlertProps['themeOverrides'] = {
|
|
6
|
+
...AlertThemeCommon,
|
|
7
|
+
colorInfo: darkBase['color-primary-1'],
|
|
8
|
+
colorSuccess: darkBase['color-green-1'],
|
|
9
|
+
colorError: darkBase['color-red-1'],
|
|
10
|
+
colorWarning: darkBase['color-origin-1'],
|
|
11
|
+
|
|
12
|
+
contentTextColorError: darkBase['color-gray-10'],
|
|
13
|
+
contentTextColorInfo: darkBase['color-gray-10'],
|
|
14
|
+
contentTextColorSuccess: darkBase['color-gray-10'],
|
|
15
|
+
contentTextColorWarning: darkBase['color-gray-10'],
|
|
16
|
+
|
|
17
|
+
iconColorInfo: darkBase['color-primary-6'],
|
|
18
|
+
iconColorError: darkBase['color-red-6'],
|
|
19
|
+
iconColorSuccess: darkBase['color-green-6'],
|
|
20
|
+
iconColorWarning: darkBase['color-origin-6'],
|
|
21
|
+
|
|
22
|
+
titleTextColor: darkBase['color-gray-10']
|
|
23
|
+
}
|