@digitalc/dxp-ui 0.0.4 → 0.0.5-alpha-gomo.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/README.md +151 -11
- package/es/assets/iconFont/demo.css +539 -0
- package/es/assets/iconFont/demo_index.html +4400 -0
- package/es/assets/iconFont/iconfont.css +22 -6
- package/es/assets/iconFont/iconfont.eot +0 -0
- package/es/assets/iconFont/iconfont.json +28 -0
- package/es/assets/iconFont/iconfont.svg +8 -0
- package/es/assets/iconFont/iconfont.ttf +0 -0
- package/es/assets/iconFont/iconfont.woff +0 -0
- package/es/assets/iconFont/iconfont.woff2 +0 -0
- package/es/assets/react.svg +1 -0
- package/es/assets/token.json +902 -238
- package/es/components/Accordion/designTokens.d.ts +11 -0
- package/es/components/Accordion/designTokens.js +16 -0
- package/es/components/Accordion/index.d.ts +21 -0
- package/es/components/Accordion/index.js +77 -0
- package/es/components/Accordion/style/index.less +14 -0
- package/es/components/Accordion/style/variables.less +4 -0
- package/es/components/Amount/designTokens.d.ts +6 -0
- package/es/components/Amount/designTokens.js +9 -0
- package/es/components/Amount/index.d.ts +23 -0
- package/es/components/Amount/index.js +144 -0
- package/es/components/Amount/style/index.less +10 -0
- package/es/components/Amount/style/variables.less +4 -0
- package/es/components/Button/designTokens.js +6 -7
- package/es/components/Button/index.d.ts +17 -22
- package/es/components/Button/index.js +85 -46
- package/es/components/Button/style/{button.less → index.less} +6 -2
- package/es/components/Chip/designTokens.d.ts +15 -0
- package/es/components/Chip/designTokens.js +22 -0
- package/es/components/Chip/index.d.ts +13 -0
- package/es/components/Chip/index.js +98 -0
- package/es/components/Chip/style/index.less +9 -0
- package/es/components/Chip/style/variables.less +4 -0
- package/es/components/Divider/index.d.ts +16 -0
- package/es/components/Divider/index.js +55 -0
- package/es/components/Divider/style/index.less +78 -0
- package/es/components/Divider/style/variables.less +4 -0
- package/es/components/Drawer/designTokens.d.ts +16 -0
- package/es/components/Drawer/designTokens.js +27 -0
- package/es/components/Drawer/index.d.ts +21 -0
- package/es/components/Drawer/index.js +189 -0
- package/es/components/Drawer/style/index.less +73 -0
- package/es/components/Drawer/style/variables.less +8 -0
- package/es/components/Icon/Icon.d.ts +9 -0
- package/es/components/Icon/Icon.js +18 -0
- package/es/components/Icon/designTokens.d.ts +6 -0
- package/es/components/Icon/designTokens.js +7 -0
- package/es/components/Icon/index.d.ts +12 -0
- package/es/components/Icon/index.js +29 -0
- package/es/components/IconButton/designTokens.d.ts +21 -0
- package/es/components/IconButton/designTokens.js +39 -0
- package/es/components/IconButton/index.d.ts +24 -0
- package/es/components/IconButton/index.js +106 -0
- package/es/components/IconButton/style/index.less +59 -0
- package/es/components/IconButton/style/variables.less +5 -0
- package/es/components/IconButtonGroup/index.d.ts +15 -0
- package/es/components/IconButtonGroup/index.js +22 -0
- package/es/components/Image/index.d.ts +12 -0
- package/es/components/Image/index.js +33 -0
- package/es/components/ListItem/designTokens.d.ts +30 -0
- package/es/components/ListItem/designTokens.js +31 -0
- package/es/components/ListItem/index.d.ts +60 -0
- package/es/components/ListItem/index.js +227 -0
- package/es/components/ListItem/style/index.less +77 -0
- package/es/components/ListItem/style/variables.less +1 -0
- package/es/components/Modal/designTokens.d.ts +31 -0
- package/es/components/Modal/designTokens.js +35 -0
- package/es/components/Modal/index.d.ts +14 -0
- package/es/components/Modal/index.js +101 -0
- package/es/components/Modal/style/index.less +92 -0
- package/es/components/Modal/style/variables.less +5 -0
- package/es/components/Navigation/designTokens.d.ts +16 -0
- package/es/components/Navigation/designTokens.js +19 -0
- package/es/components/Navigation/index.d.ts +31 -0
- package/es/components/Navigation/index.js +110 -0
- package/es/components/Navigation/style/index.less +52 -0
- package/es/components/Navigation/style/variables.less +1 -0
- package/es/components/Search/designTokens.d.ts +34 -0
- package/es/components/Search/designTokens.js +51 -0
- package/es/components/Search/index.d.ts +13 -0
- package/es/components/Search/index.js +85 -0
- package/es/components/Search/style/index.less +32 -0
- package/es/components/Search/style/variables.less +5 -0
- package/es/components/Stepper/designTokens.d.ts +26 -0
- package/es/components/Stepper/designTokens.js +60 -0
- package/es/components/Stepper/index.d.ts +22 -0
- package/es/components/Stepper/index.js +153 -0
- package/es/components/Stepper/style/index.less +140 -0
- package/es/components/Stepper/style/variables.less +5 -0
- package/es/components/StickyFooter/designTokens.d.ts +10 -0
- package/es/components/StickyFooter/designTokens.js +17 -0
- package/es/components/StickyFooter/index.d.ts +17 -0
- package/es/components/StickyFooter/index.js +83 -0
- package/es/components/StickyFooter/style/index.less +18 -0
- package/es/components/StickyFooter/style/variables.less +4 -0
- package/es/components/Tabs/designTokens.d.ts +44 -0
- package/es/components/Tabs/designTokens.js +64 -0
- package/es/components/Tabs/index.d.ts +14 -0
- package/es/components/Tabs/index.js +102 -0
- package/es/components/Tabs/style/index.less +25 -0
- package/es/components/Tabs/style/variables.less +4 -0
- package/es/components/Tag/designTokens.d.ts +90 -0
- package/es/components/Tag/designTokens.js +124 -0
- package/es/components/Tag/index.d.ts +15 -0
- package/es/components/Tag/index.js +85 -0
- package/es/components/Tag/style/index.less +9 -0
- package/es/components/Tag/style/variables.less +4 -0
- package/es/components/Text/designTokens.d.ts +51 -0
- package/es/components/Text/designTokens.js +52 -0
- package/es/components/Text/index.d.ts +6 -25
- package/es/components/Text/index.js +69 -56
- package/es/components/Text/style/index.less +2 -0
- package/es/components/TextInputInside/designTokens.d.ts +38 -0
- package/es/components/TextInputInside/designTokens.js +59 -0
- package/es/components/TextInputInside/index.d.ts +10 -0
- package/es/components/TextInputInside/index.js +141 -0
- package/es/components/TextInputInside/style/index.less +36 -0
- package/es/components/TextInputInside/style/variables.less +5 -0
- package/es/components/TextInputOutside/designTokens.d.ts +41 -0
- package/es/components/TextInputOutside/designTokens.js +67 -0
- package/es/components/TextInputOutside/index.d.ts +18 -0
- package/es/components/TextInputOutside/index.js +66 -0
- package/es/components/TextInputOutside/style/index.less +4 -0
- package/es/components/TextInputOutside/style/variables.less +5 -0
- package/es/components/TextLink/designTokens.d.ts +10 -0
- package/es/components/TextLink/designTokens.js +11 -0
- package/es/components/TextLink/index.d.ts +20 -0
- package/es/components/TextLink/index.js +95 -0
- package/es/components/Toast/designTokens.d.ts +13 -0
- package/es/components/Toast/designTokens.js +20 -0
- package/es/components/Toast/index.d.ts +26 -0
- package/es/components/Toast/index.js +175 -0
- package/es/components/Toast/style/index.less +9 -0
- package/es/components/Toast/style/variables.less +12 -0
- package/es/components/Toggle/designTokens.d.ts +9 -0
- package/es/components/Toggle/designTokens.js +13 -0
- package/es/components/Toggle/index.d.ts +27 -0
- package/es/components/Toggle/index.js +21 -0
- package/es/components/index.d.ts +45 -0
- package/es/components/index.js +26 -2
- package/es/constants/index.d.ts +1 -0
- package/es/constants/index.js +2 -2
- package/es/fonts/SF/SF-Pro-Display-BlackItalic.otf +0 -0
- package/es/fonts/SF/SF-Pro-Text-Bold.otf +0 -0
- package/es/fonts/SF/SF-Pro-Text-Medium.eot +0 -0
- package/es/fonts/SF/SF-Pro-Text-Medium.otf +0 -0
- package/es/fonts/SF/SF-Pro-Text-Medium.svg +40549 -0
- package/es/fonts/SF/SF-Pro-Text-Medium.ttf +0 -0
- package/es/fonts/SF/SF-Pro-Text-Medium.woff +0 -0
- package/es/fonts/SF/SF-Pro-Text-Medium.woff2 +0 -0
- package/es/fonts/SF/SF-Pro-Text-Regular.otf +0 -0
- package/es/fonts/SF/SF-Pro-Text-Regular.ttf +0 -0
- package/es/fonts/SF/SF-Pro-Text-Semibold.otf +0 -0
- package/es/fonts/SF/SF-Pro-Text-SemiboldItalic.otf +0 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -2
- package/es/style/variables.less +53 -27
- package/es/tokens/DXPGlobal.d.ts +255 -193
- package/es/tokens/DXPGlobal.js +4 -3
- package/es/utils/noop.js +1 -2
- package/es/utils/scaleTool.d.ts +12 -0
- package/es/utils/scaleTool.js +48 -0
- package/es/utils/theme.d.ts +11 -0
- package/es/utils/theme.js +15 -0
- package/es/utils/themeContext.d.ts +35 -2
- package/es/utils/themeContext.js +27 -7
- package/es/utils/tokenHelper.js +1 -2
- package/es/utils/tokenManager.d.ts +110 -2
- package/es/utils/tokenManager.js +778 -724
- package/lib/assets/iconFont/demo.css +539 -0
- package/lib/assets/iconFont/demo_index.html +4400 -0
- package/lib/assets/iconFont/iconfont.css +750 -0
- package/lib/assets/iconFont/iconfont.eot +0 -0
- package/lib/assets/iconFont/iconfont.json +1290 -0
- package/lib/assets/iconFont/iconfont.svg +385 -0
- package/lib/assets/iconFont/iconfont.ttf +0 -0
- package/lib/assets/iconFont/iconfont.woff +0 -0
- package/lib/assets/iconFont/iconfont.woff2 +0 -0
- package/lib/assets/react.svg +1 -0
- package/lib/assets/token.json +903 -0
- package/lib/components/Accordion/designTokens.d.ts +11 -0
- package/lib/components/Accordion/designTokens.js +42 -0
- package/lib/components/Accordion/index.d.ts +21 -0
- package/lib/components/Accordion/index.js +96 -0
- package/lib/components/Accordion/style/index.less +14 -0
- package/lib/components/Accordion/style/variables.less +4 -0
- package/lib/components/Amount/designTokens.d.ts +6 -0
- package/lib/components/Amount/designTokens.js +33 -0
- package/lib/components/Amount/index.d.ts +23 -0
- package/lib/components/Amount/index.js +160 -0
- package/lib/components/Amount/style/index.less +10 -0
- package/lib/components/Amount/style/variables.less +4 -0
- package/lib/components/Button/demo/index.d.ts +3 -0
- package/lib/components/Button/demo/index.js +138 -0
- package/lib/components/Button/designTokens.d.ts +66 -0
- package/lib/components/Button/designTokens.js +139 -0
- package/lib/components/Button/index.d.ts +39 -0
- package/lib/components/Button/index.js +132 -0
- package/lib/components/Button/style/index.less +38 -0
- package/lib/components/Button/style/variables.less +5 -0
- package/lib/components/Chip/designTokens.d.ts +15 -0
- package/lib/components/Chip/designTokens.js +45 -0
- package/lib/components/Chip/index.d.ts +13 -0
- package/lib/components/Chip/index.js +178 -0
- package/lib/components/Chip/style/index.less +9 -0
- package/lib/components/Chip/style/variables.less +4 -0
- package/lib/components/Divider/index.d.ts +16 -0
- package/lib/components/Divider/index.js +111 -0
- package/lib/components/Divider/style/index.less +78 -0
- package/lib/components/Divider/style/variables.less +4 -0
- package/lib/components/Drawer/designTokens.d.ts +16 -0
- package/lib/components/Drawer/designTokens.js +62 -0
- package/lib/components/Drawer/index.d.ts +21 -0
- package/lib/components/Drawer/index.js +229 -0
- package/lib/components/Drawer/style/index.less +73 -0
- package/lib/components/Drawer/style/variables.less +8 -0
- package/lib/components/Icon/Icon.d.ts +9 -0
- package/lib/components/Icon/Icon.js +74 -0
- package/lib/components/Icon/designTokens.d.ts +6 -0
- package/lib/components/Icon/designTokens.js +41 -0
- package/lib/components/Icon/index.d.ts +12 -0
- package/lib/components/Icon/index.js +73 -0
- package/lib/components/IconButton/designTokens.d.ts +21 -0
- package/lib/components/IconButton/designTokens.js +61 -0
- package/lib/components/IconButton/index.d.ts +24 -0
- package/lib/components/IconButton/index.js +202 -0
- package/lib/components/IconButton/style/index.less +59 -0
- package/lib/components/IconButton/style/variables.less +5 -0
- package/lib/components/IconButtonGroup/index.d.ts +15 -0
- package/lib/components/IconButtonGroup/index.js +53 -0
- package/lib/components/Image/index.d.ts +12 -0
- package/lib/components/Image/index.js +102 -0
- package/lib/components/ListItem/designTokens.d.ts +30 -0
- package/lib/components/ListItem/designTokens.js +65 -0
- package/lib/components/ListItem/index.d.ts +60 -0
- package/lib/components/ListItem/index.js +348 -0
- package/lib/components/ListItem/style/index.less +77 -0
- package/lib/components/ListItem/style/variables.less +1 -0
- package/lib/components/Modal/designTokens.d.ts +31 -0
- package/lib/components/Modal/designTokens.js +88 -0
- package/lib/components/Modal/index.d.ts +14 -0
- package/lib/components/Modal/index.js +168 -0
- package/lib/components/Modal/style/index.less +92 -0
- package/lib/components/Modal/style/variables.less +5 -0
- package/lib/components/Navigation/designTokens.d.ts +16 -0
- package/lib/components/Navigation/designTokens.js +53 -0
- package/lib/components/Navigation/index.d.ts +31 -0
- package/lib/components/Navigation/index.js +174 -0
- package/lib/components/Navigation/style/index.less +52 -0
- package/lib/components/Navigation/style/variables.less +1 -0
- package/lib/components/Search/designTokens.d.ts +34 -0
- package/lib/components/Search/designTokens.js +77 -0
- package/lib/components/Search/index.d.ts +13 -0
- package/lib/components/Search/index.js +137 -0
- package/lib/components/Search/style/index.less +32 -0
- package/lib/components/Search/style/variables.less +5 -0
- package/lib/components/Stepper/designTokens.d.ts +26 -0
- package/lib/components/Stepper/designTokens.js +90 -0
- package/lib/components/Stepper/index.d.ts +22 -0
- package/lib/components/Stepper/index.js +118 -0
- package/lib/components/Stepper/style/index.less +140 -0
- package/lib/components/Stepper/style/variables.less +5 -0
- package/lib/components/StickyFooter/designTokens.d.ts +10 -0
- package/lib/components/StickyFooter/designTokens.js +41 -0
- package/lib/components/StickyFooter/index.d.ts +17 -0
- package/lib/components/StickyFooter/index.js +150 -0
- package/lib/components/StickyFooter/style/index.less +18 -0
- package/lib/components/StickyFooter/style/variables.less +4 -0
- package/lib/components/Tabs/designTokens.d.ts +44 -0
- package/lib/components/Tabs/designTokens.js +90 -0
- package/lib/components/Tabs/index.d.ts +14 -0
- package/lib/components/Tabs/index.js +145 -0
- package/lib/components/Tabs/style/index.less +25 -0
- package/lib/components/Tabs/style/variables.less +4 -0
- package/lib/components/Tag/designTokens.d.ts +90 -0
- package/lib/components/Tag/designTokens.js +181 -0
- package/lib/components/Tag/index.d.ts +15 -0
- package/lib/components/Tag/index.js +146 -0
- package/lib/components/Tag/style/index.less +9 -0
- package/lib/components/Tag/style/variables.less +4 -0
- package/lib/components/Text/designTokens.d.ts +51 -0
- package/lib/components/Text/designTokens.js +75 -0
- package/lib/components/Text/index.d.ts +13 -0
- package/lib/components/Text/index.js +432 -0
- package/lib/components/Text/style/index.less +2 -0
- package/lib/components/Text/style/variables.less +4 -0
- package/lib/components/TextInputInside/designTokens.d.ts +38 -0
- package/lib/components/TextInputInside/designTokens.js +100 -0
- package/lib/components/TextInputInside/index.d.ts +10 -0
- package/lib/components/TextInputInside/index.js +230 -0
- package/lib/components/TextInputInside/style/index.less +36 -0
- package/lib/components/TextInputInside/style/variables.less +5 -0
- package/lib/components/TextInputOutside/designTokens.d.ts +41 -0
- package/lib/components/TextInputOutside/designTokens.js +95 -0
- package/lib/components/TextInputOutside/index.d.ts +18 -0
- package/lib/components/TextInputOutside/index.js +110 -0
- package/lib/components/TextInputOutside/style/index.less +4 -0
- package/lib/components/TextInputOutside/style/variables.less +5 -0
- package/lib/components/TextLink/designTokens.d.ts +10 -0
- package/lib/components/TextLink/designTokens.js +45 -0
- package/lib/components/TextLink/index.d.ts +20 -0
- package/lib/components/TextLink/index.js +120 -0
- package/lib/components/Toast/designTokens.d.ts +13 -0
- package/lib/components/Toast/designTokens.js +40 -0
- package/lib/components/Toast/index.d.ts +26 -0
- package/lib/components/Toast/index.js +213 -0
- package/lib/components/Toast/style/index.less +9 -0
- package/lib/components/Toast/style/variables.less +12 -0
- package/lib/components/Toggle/designTokens.d.ts +9 -0
- package/lib/components/Toggle/designTokens.js +47 -0
- package/lib/components/Toggle/index.d.ts +27 -0
- package/lib/components/Toggle/index.js +67 -0
- package/lib/components/index.d.ts +49 -0
- package/lib/components/index.js +90 -0
- package/lib/constants/index.d.ts +16 -0
- package/lib/constants/index.js +42 -0
- package/lib/fonts/Poppins/Poppins-Bold.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-BoldItalic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-ExtraBold.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-ExtraLight.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-ExtraLightItalic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-Italic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-Light.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-LightItalic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-Medium.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-MediumItalic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-Regular.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-SemiBold.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-SemiBoldItalic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-Thin.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-ThinItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Black.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Bold.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-ExtraBold.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-ExtraBoldItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-ExtraLight.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-ExtraLightItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Italic-VariableFont_wdth,wght.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Italic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Light.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-SemiBold.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-SemiBoldItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Thin.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-VariableFont_wdth,wght.ttf +0 -0
- package/lib/fonts/SF/SF-Pro-Display-BlackItalic.otf +0 -0
- package/lib/fonts/SF/SF-Pro-Text-Bold.otf +0 -0
- package/lib/fonts/SF/SF-Pro-Text-Medium.eot +0 -0
- package/lib/fonts/SF/SF-Pro-Text-Medium.otf +0 -0
- package/lib/fonts/SF/SF-Pro-Text-Medium.svg +40549 -0
- package/lib/fonts/SF/SF-Pro-Text-Medium.ttf +0 -0
- package/lib/fonts/SF/SF-Pro-Text-Medium.woff +0 -0
- package/lib/fonts/SF/SF-Pro-Text-Medium.woff2 +0 -0
- package/lib/fonts/SF/SF-Pro-Text-Regular.otf +0 -0
- package/lib/fonts/SF/SF-Pro-Text-Regular.ttf +0 -0
- package/lib/fonts/SF/SF-Pro-Text-Semibold.otf +0 -0
- package/lib/fonts/SF/SF-Pro-Text-SemiboldItalic.otf +0 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +21 -0
- package/lib/style/antdDesignToken.json +503 -0
- package/lib/style/themes/base-vars.css +6 -0
- package/lib/style/themes/colorful.css +5 -0
- package/lib/style/themes/index.css +4 -0
- package/lib/style/variables.less +60 -0
- package/lib/tokens/DXPGlobal.d.ts +302 -0
- package/lib/tokens/DXPGlobal.js +37 -0
- package/lib/utils/noop.d.ts +1 -0
- package/lib/utils/noop.js +26 -0
- package/lib/utils/scaleTool.d.ts +12 -0
- package/lib/utils/scaleTool.js +66 -0
- package/lib/utils/theme.d.ts +11 -0
- package/lib/utils/theme.js +32 -0
- package/lib/utils/themeContext.d.ts +44 -0
- package/lib/utils/themeContext.js +117 -0
- package/lib/utils/tokenHelper.d.ts +1 -0
- package/lib/utils/tokenHelper.js +38 -0
- package/lib/utils/tokenManager.d.ts +1572 -0
- package/lib/utils/tokenManager.js +833 -0
- package/package.json +29 -22
- package/umd/dxp-ui.min.css +1 -2
- package/umd/dxp-ui.min.js +1 -2
- package/umd/static/SF-Pro-Text-Bold.89d66db4.otf +0 -0
- package/umd/static/SF-Pro-Text-Regular.e042d171.ttf +0 -0
- package/umd/static/SF-Pro-Text-Regular.f09e811b.otf +0 -0
- package/umd/static/SF-Pro-Text-Semibold.a5a4b4bc.otf +0 -0
- package/umd/static/SF-Pro-Text-SemiboldItalic.ed8f4a28.otf +0 -0
- package/umd/static/iconfont.176e7470.svg +1 -0
- package/umd/static/iconfont.47a0c957.ttf +0 -0
- package/umd/static/iconfont.6f470e01.eot +0 -0
- package/umd/static/iconfont.796b49bb.woff +0 -0
- package/es/assets/iconFont/iconfont.js +0 -44
- package/es/assets/iconFont/iconfont.js.map +0 -1
- package/es/components/Button/designTokens.js.map +0 -1
- package/es/components/Button/index.js.map +0 -1
- package/es/components/Button/index_backup.d.ts +0 -72
- package/es/components/Button/index_backup.js +0 -111
- package/es/components/Button/index_backup.js.map +0 -1
- package/es/components/Text/index.js.map +0 -1
- package/es/components/Text/style/text.less +0 -116
- package/es/components/index.js.map +0 -1
- package/es/constants/index.js.map +0 -1
- package/es/index.js.map +0 -1
- package/es/tokens/DXPGlobal.js.map +0 -1
- package/es/utils/noop.js.map +0 -1
- package/es/utils/themeContext.js.map +0 -1
- package/es/utils/tokenHelper.js.map +0 -1
- package/es/utils/tokenManager.js.map +0 -1
- package/umd/dxp-ui.min.css.map +0 -1
- package/umd/dxp-ui.min.js.map +0 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
|
|
3
|
+
// 基础按钮样式
|
|
4
|
+
@components: stepper;
|
|
5
|
+
|
|
6
|
+
// 使用字符串拼接
|
|
7
|
+
.@{prefix}-@{components} {
|
|
8
|
+
display: flex;
|
|
9
|
+
width: 100%;
|
|
10
|
+
font-size:0;
|
|
11
|
+
text-align: initial;
|
|
12
|
+
min-width: 128px;
|
|
13
|
+
padding-top: 8px;
|
|
14
|
+
padding-bottom: 8px;
|
|
15
|
+
|
|
16
|
+
// 定义中间变量来存储动态生成的 CSS 变量名
|
|
17
|
+
@progress-default-color: ~"--@{prefix}-@{components}-progress-default-color";
|
|
18
|
+
@progress-border-width: ~"--@{prefix}-@{components}-progress-border-width";
|
|
19
|
+
@progress-border-connector: ~"--@{prefix}-@{components}-progress-border-connector";
|
|
20
|
+
|
|
21
|
+
@finish-icon-bg-color: ~"--@{prefix}-@{components}-finish-icon-bg-color";
|
|
22
|
+
@finish-icon-border-color: ~"--@{prefix}-@{components}-finish-icon-border-color";
|
|
23
|
+
@finish-icon-success: ~"--@{prefix}-@{components}-finish-icon-success";
|
|
24
|
+
@finish-line-color: ~"--@{prefix}-@{components}-finish-line-color";
|
|
25
|
+
|
|
26
|
+
@wait-icon-bg-color: ~"--@{prefix}-@{components}-wait-icon-bg-color";
|
|
27
|
+
@wait-icon-border-color: ~"--@{prefix}-@{components}-wait-icon-border-color";
|
|
28
|
+
@wait-icon-color: ~"--@{prefix}-@{components}-wait-icon-success";
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
// 当前高亮步骤的圈的颜色
|
|
33
|
+
.ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path,
|
|
34
|
+
.dxp-progress-inner:not(.dxp-progress-circle-gradient) .dxp-progress-circle-path {
|
|
35
|
+
// stroke-width: calc(var(@progress-border-width) * 2);
|
|
36
|
+
stroke: var(@progress-default-color) !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.dxp-stepper-item-finish>.dxp-stepper-item-container>.dxp-stepper-item-content>.dxp-stepper-item-title::after {
|
|
40
|
+
height: calc(var(@progress-border-connector) * 1px); // 使用 calc() 函数结合单位
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// 当前已完成步骤的背景颜色
|
|
44
|
+
.dxp-stepper-item-finish .dxp-stepper-item-icon {
|
|
45
|
+
background-color: var(@finish-icon-bg-color);
|
|
46
|
+
border-color: var(@finish-icon-border-color);
|
|
47
|
+
|
|
48
|
+
.anticon {
|
|
49
|
+
color: var(@finish-icon-success);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// 当前已完成步骤的进度条颜色
|
|
54
|
+
.dxp-stepper-item-finish>.dxp-stepper-item-container>.dxp-stepper-item-content>.dxp-stepper-item-title::after {
|
|
55
|
+
border-color: var(@finish-line-color);
|
|
56
|
+
background-color: var(@finish-line-color);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.dxp-stepper-item-wait .dxp-stepper-item-icon {
|
|
60
|
+
background-color: var(@wait-icon-bg-color);
|
|
61
|
+
border-color: var(@wait-icon-border-color);
|
|
62
|
+
|
|
63
|
+
.dxp-stepper-icon {
|
|
64
|
+
color: var(@wait-icon-color);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.dxp-stepper-with-progress.dxp-stepper-small .dxp-stepper-item-icon .dxp-progress-inner {
|
|
69
|
+
width: calc(var(--dxp-steps-icon-size-sm) + calc(var(--dxp-line-width) * 5)) !important;
|
|
70
|
+
height: calc(var(--dxp-steps-icon-size-sm) + calc(var(--dxp-line-width) * 5)) !important;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// moblie
|
|
76
|
+
@dxp-steps-color-neutral: ~"--dxp-steps-color-neutral";
|
|
77
|
+
@dxp-steps-color-secondary: ~"--dxp-steps-color-secondary";
|
|
78
|
+
@dxp-steps-color-label2: ~"--dxp-steps-color-label2";
|
|
79
|
+
@dxp-steps-background-active: ~"--dxp-steps-background-active";
|
|
80
|
+
@dxp-steps-background-activeWeak: ~"--dxp-steps-background-activeWeak";
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
@stepper-prefix-cls: stepper;
|
|
84
|
+
|
|
85
|
+
.@{prefix}-@{stepper-prefix-cls} {
|
|
86
|
+
font-size:0;
|
|
87
|
+
&-description {
|
|
88
|
+
margin-top: 4px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// mobile
|
|
92
|
+
&-m {
|
|
93
|
+
width: 100%;
|
|
94
|
+
padding: 16px 0;
|
|
95
|
+
|
|
96
|
+
&-header {
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
gap: 0;
|
|
100
|
+
.@{prefix}-@{stepper-prefix-cls}-bg{
|
|
101
|
+
background-color: var(@dxp-steps-background-active);
|
|
102
|
+
}
|
|
103
|
+
.@{prefix}-@{stepper-prefix-cls}-inner{
|
|
104
|
+
background-color: var(@dxp-steps-background-activeWeak);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&-count {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: baseline;
|
|
111
|
+
gap: 2px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&-neutral {
|
|
115
|
+
color: var(@dxp-steps-color-neutral);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&-secondary {
|
|
119
|
+
color: var(@dxp-steps-color-secondary);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&-title {
|
|
123
|
+
color: var(@dxp-steps-color-neutral);
|
|
124
|
+
margin-top: 0;
|
|
125
|
+
font-weight: 500;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&-next {
|
|
129
|
+
color: var(@dxp-steps-color-label2);
|
|
130
|
+
margin-top:0;
|
|
131
|
+
color: #858585;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.ant-progress,
|
|
135
|
+
.ant5-progress,
|
|
136
|
+
.dxp-progress {
|
|
137
|
+
margin: 4px 0;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getToken } from "../../utils/tokenHelper";
|
|
2
|
+
var designTokens = {
|
|
3
|
+
padding: "".concat(getToken('spacingStickyFooterPaddingTop'), "px ").concat(getToken('spacingStickyFooterPaddingHorizontal'), "px ").concat(getToken('spacingStickyFooterPaddingBottom'), "px"),
|
|
4
|
+
// 间距
|
|
5
|
+
borderTop: "1px solid ".concat(getToken('colorStickyFooterBorderTop')),
|
|
6
|
+
// 边框
|
|
7
|
+
backgroundColor: getToken('colorStickyFooterBackground'),
|
|
8
|
+
// 背景颜色
|
|
9
|
+
priceColor: getToken('colorStickyFooterPrice'),
|
|
10
|
+
// 金额颜色
|
|
11
|
+
textColor: getToken('colorStickyFooterText'),
|
|
12
|
+
// 文本颜色
|
|
13
|
+
textDiscontColor: getToken('colorStickyFooterText2'),
|
|
14
|
+
// 文本颜色
|
|
15
|
+
colorStrikethrough: getToken('colorStickyFooterPriceStrikethrough') // 划线价颜色
|
|
16
|
+
};
|
|
17
|
+
export { designTokens };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style/index.less';
|
|
3
|
+
export type type = 'default' | 'priceVariant1' | 'priceVariant2';
|
|
4
|
+
export interface StickyFooterProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
colorPrice?: string;
|
|
8
|
+
type?: type;
|
|
9
|
+
priceStrikethrough?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
onDropDownClick?: React.MouseEventHandler;
|
|
13
|
+
onRightBtnClick?: React.MouseEventHandler;
|
|
14
|
+
onBtnClick?: React.MouseEventHandler;
|
|
15
|
+
}
|
|
16
|
+
declare const StickyFooter: (props: StickyFooterProps) => React.JSX.Element;
|
|
17
|
+
export default StickyFooter;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["type", "colorPrice", "price", "priceStrikethrough", "buttonText", "title", "position", "size", "children", "onDropDownClick", "onRightBtnClick", "onBtnClick", "showIcon", "iconType"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
6
|
+
import { theme } from "../../utils/theme";
|
|
7
|
+
import { designTokens } from "./designTokens";
|
|
8
|
+
import { cssClasses } from "../../constants";
|
|
9
|
+
import { Amount, Button } from "../index";
|
|
10
|
+
import "./style/index.less";
|
|
11
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
var StickyFooter = function StickyFooter(props) {
|
|
13
|
+
var _props$type = props.type,
|
|
14
|
+
type = _props$type === void 0 ? 'default' : _props$type,
|
|
15
|
+
colorPrice = props.colorPrice,
|
|
16
|
+
price = props.price,
|
|
17
|
+
priceStrikethrough = props.priceStrikethrough,
|
|
18
|
+
_props$buttonText = props.buttonText,
|
|
19
|
+
buttonText = _props$buttonText === void 0 ? 'Confirm' : _props$buttonText,
|
|
20
|
+
title = props.title,
|
|
21
|
+
position = props.position,
|
|
22
|
+
size = props.size,
|
|
23
|
+
children = props.children,
|
|
24
|
+
onDropDownClick = props.onDropDownClick,
|
|
25
|
+
onRightBtnClick = props.onRightBtnClick,
|
|
26
|
+
onBtnClick = props.onBtnClick,
|
|
27
|
+
_props$showIcon = props.showIcon,
|
|
28
|
+
showIcon = _props$showIcon === void 0 ? true : _props$showIcon,
|
|
29
|
+
iconType = props.iconType,
|
|
30
|
+
attr = _objectWithoutProperties(props, _excluded);
|
|
31
|
+
var padding = designTokens.padding,
|
|
32
|
+
borderTop = designTokens.borderTop,
|
|
33
|
+
backgroundColor = designTokens.backgroundColor,
|
|
34
|
+
priceColor = designTokens.priceColor,
|
|
35
|
+
textColor = designTokens.textColor,
|
|
36
|
+
textDiscontColor = designTokens.textDiscontColor,
|
|
37
|
+
colorStrikethrough = designTokens.colorStrikethrough;
|
|
38
|
+
var useCustomButtonStyle = function useCustomButtonStyle() {
|
|
39
|
+
var hashId = useStyleRegister({
|
|
40
|
+
theme: theme,
|
|
41
|
+
token: {
|
|
42
|
+
baseColor: 'blue'
|
|
43
|
+
},
|
|
44
|
+
path: ["".concat(cssClasses.PREFIX, "-stickyFooter")]
|
|
45
|
+
}, function () {
|
|
46
|
+
return "\n .".concat(cssClasses.PREFIX, "-stickyFooter {\n padding: ").concat(padding, ";\n border-top: ").concat(borderTop, ";\n background-color: ").concat(backgroundColor, ";\n }\n ");
|
|
47
|
+
});
|
|
48
|
+
return hashId;
|
|
49
|
+
};
|
|
50
|
+
useCustomButtonStyle();
|
|
51
|
+
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
52
|
+
className: "".concat(cssClasses.PREFIX, "-stickyFooter ").concat(cssClasses.PREFIX, "-stickyFooter-").concat(type),
|
|
53
|
+
onClick: props.onClick
|
|
54
|
+
}, attr), {}, {
|
|
55
|
+
children: [type === 'default' && /*#__PURE__*/_jsx(_Fragment, {
|
|
56
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
57
|
+
type: "primary",
|
|
58
|
+
block: true,
|
|
59
|
+
onClick: onBtnClick,
|
|
60
|
+
children: buttonText
|
|
61
|
+
})
|
|
62
|
+
}), type === 'priceVariant1' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
63
|
+
children: [/*#__PURE__*/_jsx(Amount, {
|
|
64
|
+
priceStrikethrough: priceStrikethrough,
|
|
65
|
+
priceColor: colorPrice || priceColor,
|
|
66
|
+
textColor: title === 'discount' ? textDiscontColor : textColor,
|
|
67
|
+
colorStrikethrough: colorStrikethrough,
|
|
68
|
+
title: title,
|
|
69
|
+
position: position,
|
|
70
|
+
size: size,
|
|
71
|
+
showIcon: showIcon,
|
|
72
|
+
onDropDownClick: onDropDownClick,
|
|
73
|
+
iconType: iconType,
|
|
74
|
+
children: price
|
|
75
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
76
|
+
type: "primary",
|
|
77
|
+
onClick: onRightBtnClick,
|
|
78
|
+
children: buttonText
|
|
79
|
+
})]
|
|
80
|
+
}), children]
|
|
81
|
+
}));
|
|
82
|
+
};
|
|
83
|
+
export default StickyFooter;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
@import './variables.less';
|
|
3
|
+
@components: stickyFooter;
|
|
4
|
+
.@{prefix}-@{components} {
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
align-items: center;
|
|
8
|
+
position: fixed;
|
|
9
|
+
left: 0;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
width: 100%;
|
|
12
|
+
background: #fff;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
z-index: 9;
|
|
15
|
+
&.@{prefix}-@{components}-default {
|
|
16
|
+
justify-content: center;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare const otherDesignToken: {
|
|
2
|
+
colorTabsTextSubtitleInverseInactive: any;
|
|
3
|
+
colorTabsTextSubtitleInactive: any;
|
|
4
|
+
colorTabsIconInactiveInverse: any;
|
|
5
|
+
colorTabsIconActiveInverse: any;
|
|
6
|
+
colorTabsIconInactive: any;
|
|
7
|
+
colorTabsIconActive: any;
|
|
8
|
+
colorTabsTextSubtitleInverse: any;
|
|
9
|
+
colorTabsTextSubtitle: any;
|
|
10
|
+
sizingTabsIcon: any;
|
|
11
|
+
};
|
|
12
|
+
declare const designTokens: {
|
|
13
|
+
inkBarColor: any;
|
|
14
|
+
itemSelectedColor: any;
|
|
15
|
+
itemHoverColor: any;
|
|
16
|
+
itemActiveColor: any;
|
|
17
|
+
itemColor: any;
|
|
18
|
+
colorBorderSecondary: any;
|
|
19
|
+
horizontalItemPadding: string;
|
|
20
|
+
lineWidthBold: any;
|
|
21
|
+
};
|
|
22
|
+
declare const designFillTokens: {
|
|
23
|
+
inkBarColor: string;
|
|
24
|
+
itemSelectedColor: string;
|
|
25
|
+
itemHoverColor: any;
|
|
26
|
+
itemActiveColor: any;
|
|
27
|
+
itemColor: any;
|
|
28
|
+
colorBorderSecondary: string;
|
|
29
|
+
cardPadding: string;
|
|
30
|
+
colorFillAlter: string;
|
|
31
|
+
lineWidth: number;
|
|
32
|
+
colorBgContainer: string;
|
|
33
|
+
};
|
|
34
|
+
declare const inverseDesignTokens: {
|
|
35
|
+
inkBarColor: any;
|
|
36
|
+
itemSelectedColor: any;
|
|
37
|
+
itemHoverColor: any;
|
|
38
|
+
itemActiveColor: any;
|
|
39
|
+
itemColor: any;
|
|
40
|
+
colorBorderSecondary: any;
|
|
41
|
+
horizontalItemPadding: string;
|
|
42
|
+
lineWidthBold: any;
|
|
43
|
+
};
|
|
44
|
+
export { otherDesignToken, designTokens, inverseDesignTokens, designFillTokens };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { getToken } from "../../utils/tokenHelper";
|
|
2
|
+
var otherDesignToken = {
|
|
3
|
+
colorTabsTextSubtitleInverseInactive: getToken('colorTabsTextSubtitleInverseInactive'),
|
|
4
|
+
colorTabsTextSubtitleInactive: getToken('colorTabsTextSubtitleInactive'),
|
|
5
|
+
colorTabsIconInactiveInverse: getToken('colorTabsIconInactiveInverse'),
|
|
6
|
+
colorTabsIconActiveInverse: getToken('colorTabsIconActiveInverse'),
|
|
7
|
+
colorTabsIconInactive: getToken('colorTabsIconInactive'),
|
|
8
|
+
colorTabsIconActive: getToken('colorTabsIconActive'),
|
|
9
|
+
colorTabsTextSubtitleInverse: getToken('colorTabsTextSubtitleInverse'),
|
|
10
|
+
colorTabsTextSubtitle: getToken('colorTabsTextSubtitle'),
|
|
11
|
+
sizingTabsIcon: getToken('sizingTabsIcon')
|
|
12
|
+
};
|
|
13
|
+
var designTokens = {
|
|
14
|
+
inkBarColor: getToken('colorTabsBorderActive'),
|
|
15
|
+
// 选中的边框颜色
|
|
16
|
+
itemSelectedColor: getToken('colorTabsTextTitle'),
|
|
17
|
+
// 选中的label颜色
|
|
18
|
+
itemHoverColor: getToken('colorTabsTextTitle'),
|
|
19
|
+
// hover label颜色
|
|
20
|
+
itemActiveColor: getToken('colorTabsTextTitle'),
|
|
21
|
+
// active label颜色
|
|
22
|
+
itemColor: getToken('colorTabsTextTitleInactive'),
|
|
23
|
+
// 默认label颜色
|
|
24
|
+
colorBorderSecondary: getToken('colorTabsBorderInactive'),
|
|
25
|
+
// 未选中的边框
|
|
26
|
+
horizontalItemPadding: "".concat(getToken('spacingTabsVerticalGap'), "px ").concat(getToken('spacingTabsPaddingHorizontal'), "px"),
|
|
27
|
+
lineWidthBold: getToken('borderWidthTabsActive')
|
|
28
|
+
};
|
|
29
|
+
var designFillTokens = {
|
|
30
|
+
inkBarColor: '#4D28E8',
|
|
31
|
+
// 选中的边框颜色
|
|
32
|
+
itemSelectedColor: '#fff',
|
|
33
|
+
// 选中的label颜色
|
|
34
|
+
itemHoverColor: getToken('colorTabsTextTitle'),
|
|
35
|
+
// hover label颜色
|
|
36
|
+
itemActiveColor: getToken('colorTabsTextTitle'),
|
|
37
|
+
// active label颜色
|
|
38
|
+
itemColor: getToken('colorTabsTextTitleInactive'),
|
|
39
|
+
// 默认label颜色
|
|
40
|
+
colorBorderSecondary: '#F5F5F8',
|
|
41
|
+
// 未选中的边框
|
|
42
|
+
cardPadding: "6px ".concat(getToken('spacingTabsPaddingHorizontal'), "px"),
|
|
43
|
+
colorFillAlter: '#F5F5F8',
|
|
44
|
+
lineWidth: 0,
|
|
45
|
+
// 线条宽度
|
|
46
|
+
colorBgContainer: '#4D28E8'
|
|
47
|
+
};
|
|
48
|
+
var inverseDesignTokens = {
|
|
49
|
+
inkBarColor: getToken('colorTabsBorderActiveInverse'),
|
|
50
|
+
// 选中的边框颜色
|
|
51
|
+
itemSelectedColor: getToken('colorTabsTextTitleInverse'),
|
|
52
|
+
// 选中的label颜色
|
|
53
|
+
itemHoverColor: getToken('colorTabsTextTitleInverse'),
|
|
54
|
+
// hover label颜色
|
|
55
|
+
itemActiveColor: getToken('colorTabsTextTitleInverse'),
|
|
56
|
+
// active label颜色
|
|
57
|
+
itemColor: getToken('colorTabsTextTitleInverseInactive'),
|
|
58
|
+
// 默认label颜色
|
|
59
|
+
colorBorderSecondary: getToken('colorTabsBorderInactiveInverse'),
|
|
60
|
+
// 未选中的边框
|
|
61
|
+
horizontalItemPadding: "".concat(getToken('spacingTabsVerticalGap'), "px ").concat(getToken('spacingTabsPaddingHorizontal'), "px"),
|
|
62
|
+
lineWidthBold: getToken('borderWidthTabsActive')
|
|
63
|
+
};
|
|
64
|
+
export { otherDesignToken, designTokens, inverseDesignTokens, designFillTokens };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style/index.less';
|
|
3
|
+
export type Type = 'default' | 'fill';
|
|
4
|
+
export interface TabsProps {
|
|
5
|
+
prefixCls?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
defaultActiveKey?: string;
|
|
8
|
+
onChange?: (key: string) => void;
|
|
9
|
+
items?: any[];
|
|
10
|
+
inverse?: boolean;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
declare const Tabs: (props: TabsProps) => React.JSX.Element;
|
|
14
|
+
export default Tabs;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import "antd/es/config-provider/style";
|
|
2
|
+
import _ConfigProvider from "antd/es/config-provider";
|
|
3
|
+
import "antd/es/tabs/style";
|
|
4
|
+
import _Tabs from "antd/es/tabs";
|
|
5
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
8
|
+
var _excluded = ["inverse", "children", "items", "type", "defaultActiveKey", "prefixCls"];
|
|
9
|
+
import React, { useState } from 'react';
|
|
10
|
+
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
11
|
+
import { theme } from "../../utils/theme";
|
|
12
|
+
import { designTokens, inverseDesignTokens, otherDesignToken, designFillTokens } from "./designTokens";
|
|
13
|
+
import { BASE_CLASS_PREFIX } from "../../constants";
|
|
14
|
+
import Text from "../Text";
|
|
15
|
+
import "./style/index.less";
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
var Tabs = function Tabs(props) {
|
|
18
|
+
var inverse = props.inverse,
|
|
19
|
+
children = props.children,
|
|
20
|
+
_props$items = props.items,
|
|
21
|
+
items = _props$items === void 0 ? [] : _props$items,
|
|
22
|
+
_props$type = props.type,
|
|
23
|
+
type = _props$type === void 0 ? 'default' : _props$type,
|
|
24
|
+
defaultActiveKey = props.defaultActiveKey,
|
|
25
|
+
_props$prefixCls = props.prefixCls,
|
|
26
|
+
prefixCls = _props$prefixCls === void 0 ? "".concat(BASE_CLASS_PREFIX, "-tabs") : _props$prefixCls,
|
|
27
|
+
attr = _objectWithoutProperties(props, _excluded);
|
|
28
|
+
|
|
29
|
+
// inverse表示反选,颜色不同
|
|
30
|
+
var subTitleColor = inverse ? otherDesignToken.colorTabsTextSubtitleInverseInactive : otherDesignToken.colorTabsTextSubtitleInactive; // 默认subTitle颜色
|
|
31
|
+
var subTitleActiveColor = inverse ? otherDesignToken.colorTabsTextSubtitleInverse : otherDesignToken.colorTabsTextSubtitle; // 选中的subTitle颜色
|
|
32
|
+
var iconColor = inverse ? otherDesignToken.colorTabsIconInactiveInverse : otherDesignToken.colorTabsIconInactive; // 选中的subTitle颜色
|
|
33
|
+
var iconActiveColor = inverse ? otherDesignToken.colorTabsIconActiveInverse : otherDesignToken.colorTabsIconActive; // 选中的subTitle颜色
|
|
34
|
+
|
|
35
|
+
var useCustomButtonStyle = function useCustomButtonStyle() {
|
|
36
|
+
var hashId = useStyleRegister({
|
|
37
|
+
theme: theme,
|
|
38
|
+
token: {
|
|
39
|
+
baseColor: 'blue'
|
|
40
|
+
},
|
|
41
|
+
path: ["".concat(prefixCls)]
|
|
42
|
+
}, function () {
|
|
43
|
+
return "\n .".concat(prefixCls, "-card.").concat(prefixCls, "-fill>.").concat(prefixCls, "-nav .").concat(prefixCls, "-tab {\n border-radius: 18px;\n }\n .").concat(prefixCls, "-card.").concat(prefixCls, "-fill .").concat(prefixCls, "-nav-list {\n background: ").concat(designFillTokens.colorFillAlter, ";\n border-radius: 18px;\n }\n ");
|
|
44
|
+
});
|
|
45
|
+
return hashId;
|
|
46
|
+
};
|
|
47
|
+
useCustomButtonStyle();
|
|
48
|
+
var _useState = useState(defaultActiveKey || ''),
|
|
49
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
50
|
+
activeKey = _useState2[0],
|
|
51
|
+
setActiveKey = _useState2[1];
|
|
52
|
+
var handleTabClick = function handleTabClick(key) {
|
|
53
|
+
setActiveKey(key);
|
|
54
|
+
};
|
|
55
|
+
var item = items.map(function (i) {
|
|
56
|
+
return _objectSpread(_objectSpread({
|
|
57
|
+
label: /*#__PURE__*/_jsxs("div", {
|
|
58
|
+
className: "".concat(prefixCls, "-item"),
|
|
59
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
60
|
+
style: {
|
|
61
|
+
color: i.key === activeKey ? iconActiveColor : iconColor,
|
|
62
|
+
fontSize: otherDesignToken.sizingTabsIcon
|
|
63
|
+
},
|
|
64
|
+
children: i.icon
|
|
65
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
66
|
+
size: "ContentC14Regular",
|
|
67
|
+
className: "".concat(prefixCls, "-item-title"),
|
|
68
|
+
children: i.title
|
|
69
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
70
|
+
size: "ContentC12Regular",
|
|
71
|
+
style: {
|
|
72
|
+
color: i.key === activeKey ? subTitleActiveColor : subTitleColor
|
|
73
|
+
},
|
|
74
|
+
children: i.subTitle
|
|
75
|
+
})]
|
|
76
|
+
})
|
|
77
|
+
}, i), {}, {
|
|
78
|
+
icon: null
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
var inverseStoken = inverse ? inverseDesignTokens : designTokens;
|
|
82
|
+
var fillStoken = type === 'fill' ? designFillTokens : inverseStoken;
|
|
83
|
+
return /*#__PURE__*/_jsx(_ConfigProvider, {
|
|
84
|
+
prefixCls: BASE_CLASS_PREFIX,
|
|
85
|
+
theme: {
|
|
86
|
+
components: {
|
|
87
|
+
Tabs: _objectSpread(_objectSpread({}, fillStoken), {}, {
|
|
88
|
+
horizontalItemGutter: 0
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
children: /*#__PURE__*/_jsx(_Tabs, _objectSpread(_objectSpread({}, attr), {}, {
|
|
93
|
+
defaultActiveKey: defaultActiveKey,
|
|
94
|
+
items: item,
|
|
95
|
+
onTabClick: handleTabClick,
|
|
96
|
+
type: type === 'fill' ? "card" : "line",
|
|
97
|
+
className: type === 'fill' ? "".concat(prefixCls, "-fill") : '',
|
|
98
|
+
children: children
|
|
99
|
+
}))
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
export default Tabs;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
@import './variables.less';
|
|
3
|
+
|
|
4
|
+
@components: tabs;
|
|
5
|
+
.@{prefix}-@{components}-item {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
}
|
|
11
|
+
.@{prefix}-@{components}-tab-btn {
|
|
12
|
+
text-align: center;
|
|
13
|
+
.@{prefix}-@{components}-tab-icon {
|
|
14
|
+
margin: 0 !important;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
.@{prefix}-@{components}-tab-active .@{prefix}-@{components}-item-title {
|
|
18
|
+
font-family: Roboto-Bold;
|
|
19
|
+
}
|
|
20
|
+
.@{prefix}-@{components}-fill .@{prefix}-@{components}-tab-active .@{prefix}-@{components}-item-title {
|
|
21
|
+
font-family: Roboto-Regular;
|
|
22
|
+
}
|
|
23
|
+
.@{prefix}-@{components}-fill>.@{prefix}-@{components}-nav .@{prefix}-@{components}-tab-focus {
|
|
24
|
+
outline: none;
|
|
25
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
declare const designTokens: {
|
|
2
|
+
borderRadiusSM: any;
|
|
3
|
+
};
|
|
4
|
+
declare const designTokensPrimary: {
|
|
5
|
+
colorText: any;
|
|
6
|
+
defaultBg: any;
|
|
7
|
+
colorBorder: any;
|
|
8
|
+
};
|
|
9
|
+
declare const designTokensSecondary: {
|
|
10
|
+
colorText: any;
|
|
11
|
+
defaultBg: any;
|
|
12
|
+
colorBorder: any;
|
|
13
|
+
};
|
|
14
|
+
declare const designTokensBlueLight: {
|
|
15
|
+
colorText: string;
|
|
16
|
+
defaultBg: string;
|
|
17
|
+
colorBorder: string;
|
|
18
|
+
};
|
|
19
|
+
declare const designTokensGreenLight: {
|
|
20
|
+
colorText: string;
|
|
21
|
+
defaultBg: string;
|
|
22
|
+
colorBorder: string;
|
|
23
|
+
};
|
|
24
|
+
declare const designTokensYellowLight: {
|
|
25
|
+
colorText: string;
|
|
26
|
+
defaultBg: string;
|
|
27
|
+
colorBorder: string;
|
|
28
|
+
};
|
|
29
|
+
declare const designTokensRedLight: {
|
|
30
|
+
colorText: string;
|
|
31
|
+
defaultBg: string;
|
|
32
|
+
colorBorder: string;
|
|
33
|
+
};
|
|
34
|
+
declare const designTokensGreyLight: {
|
|
35
|
+
colorText: string;
|
|
36
|
+
defaultBg: string;
|
|
37
|
+
colorBorder: string;
|
|
38
|
+
};
|
|
39
|
+
declare const designTokensLakeblueLight: {
|
|
40
|
+
colorText: string;
|
|
41
|
+
defaultBg: string;
|
|
42
|
+
colorBorder: string;
|
|
43
|
+
};
|
|
44
|
+
declare const designTokensOrangeLight: {
|
|
45
|
+
colorText: string;
|
|
46
|
+
defaultBg: string;
|
|
47
|
+
colorBorder: string;
|
|
48
|
+
};
|
|
49
|
+
declare const designTokensBlue: {
|
|
50
|
+
colorText: any;
|
|
51
|
+
defaultBg: string;
|
|
52
|
+
colorBorder: string;
|
|
53
|
+
};
|
|
54
|
+
declare const designTokensGreen: {
|
|
55
|
+
colorText: any;
|
|
56
|
+
defaultBg: string;
|
|
57
|
+
colorBorder: string;
|
|
58
|
+
};
|
|
59
|
+
declare const designTokensYellow: {
|
|
60
|
+
colorText: any;
|
|
61
|
+
defaultBg: string;
|
|
62
|
+
colorBorder: string;
|
|
63
|
+
};
|
|
64
|
+
declare const designTokensRed: {
|
|
65
|
+
colorText: any;
|
|
66
|
+
defaultBg: string;
|
|
67
|
+
colorBorder: string;
|
|
68
|
+
};
|
|
69
|
+
declare const designTokensGrey: {
|
|
70
|
+
colorText: any;
|
|
71
|
+
defaultBg: string;
|
|
72
|
+
colorBorder: string;
|
|
73
|
+
};
|
|
74
|
+
declare const designTokensLakeblue: {
|
|
75
|
+
colorText: any;
|
|
76
|
+
defaultBg: string;
|
|
77
|
+
colorBorder: string;
|
|
78
|
+
};
|
|
79
|
+
declare const designTokensOrange: {
|
|
80
|
+
colorText: any;
|
|
81
|
+
defaultBg: string;
|
|
82
|
+
colorBorder: string;
|
|
83
|
+
};
|
|
84
|
+
declare const otherDesignTokens: {
|
|
85
|
+
padding: string;
|
|
86
|
+
sizingTagShort: string;
|
|
87
|
+
sizingTagTall: string;
|
|
88
|
+
sizingTagTallLg: string;
|
|
89
|
+
};
|
|
90
|
+
export { designTokens, otherDesignTokens, designTokensPrimary, designTokensSecondary, designTokensBlue, designTokensGrey, designTokensGreen, designTokensRed, designTokensYellow, designTokensOrange, designTokensLakeblue, designTokensBlueLight, designTokensGreyLight, designTokensGreenLight, designTokensRedLight, designTokensYellowLight, designTokensOrangeLight, designTokensLakeblueLight, };
|