@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,11 @@
|
|
|
1
|
+
import { Theme } from '@ant-design/cssinjs';
|
|
2
|
+
type DesignToken = {
|
|
3
|
+
primaryColor: string;
|
|
4
|
+
fontSize: number;
|
|
5
|
+
};
|
|
6
|
+
type DerivativeToken = {
|
|
7
|
+
buttonColor: string;
|
|
8
|
+
buttonFontSize: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const theme: Theme<DesignToken, DerivativeToken>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Theme } from '@ant-design/cssinjs';
|
|
2
|
+
// 定义设计令牌类型
|
|
3
|
+
|
|
4
|
+
// 定义派生令牌类型
|
|
5
|
+
|
|
6
|
+
// 定义派生函数
|
|
7
|
+
var derivativeFunc = function derivativeFunc(token) {
|
|
8
|
+
return {
|
|
9
|
+
buttonColor: token.primaryColor,
|
|
10
|
+
buttonFontSize: token.fontSize * 1.2
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// 创建主题
|
|
15
|
+
export var theme = new Theme(derivativeFunc);
|
|
@@ -1,11 +1,44 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type ThemeStyle = 'default' | 'colorful';
|
|
3
|
+
export interface AntdCompatibleThemeConfig {
|
|
4
|
+
token?: Record<string, any>;
|
|
5
|
+
components?: Record<string, any>;
|
|
6
|
+
override?: {
|
|
7
|
+
override?: Record<string, any>;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
cssVar?: {
|
|
11
|
+
prefix?: string;
|
|
12
|
+
key?: string;
|
|
13
|
+
};
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
3
16
|
export interface ThemeContextType {
|
|
4
17
|
style: ThemeStyle;
|
|
5
18
|
setStyle: (style: ThemeStyle) => void;
|
|
19
|
+
theme?: AntdCompatibleThemeConfig;
|
|
20
|
+
token?: Record<string, any>;
|
|
21
|
+
components?: Record<string, any>;
|
|
22
|
+
override?: {
|
|
23
|
+
override?: Record<string, any>;
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
};
|
|
26
|
+
cssVar?: boolean | {
|
|
27
|
+
prefix?: string | undefined;
|
|
28
|
+
key?: string | undefined;
|
|
29
|
+
} | undefined;
|
|
6
30
|
}
|
|
7
|
-
export
|
|
31
|
+
export interface ThemeProviderProps {
|
|
8
32
|
children: React.ReactNode;
|
|
9
33
|
defaultStyle?: ThemeStyle;
|
|
10
|
-
|
|
34
|
+
theme?: AntdCompatibleThemeConfig;
|
|
35
|
+
token?: Record<string, any>;
|
|
36
|
+
components?: Record<string, any>;
|
|
37
|
+
override?: {
|
|
38
|
+
override?: Record<string, any>;
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
};
|
|
41
|
+
cssVar?: Record<string, any> | boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
11
44
|
export declare const useTheme: () => ThemeContextType;
|
package/es/utils/themeContext.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["children", "defaultStyle", "theme", "token", "components", "override", "cssVar"];
|
|
2
5
|
import React, { createContext, useContext, useEffect } from 'react';
|
|
3
6
|
|
|
4
7
|
// 主题类型定义
|
|
5
8
|
|
|
9
|
+
// 与antd的ThemeConfig接口兼容的类型定义
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
11
|
// 创建 Context
|
|
7
12
|
var ThemeContext = /*#__PURE__*/createContext({
|
|
8
13
|
style: 'default',
|
|
@@ -11,7 +16,13 @@ var ThemeContext = /*#__PURE__*/createContext({
|
|
|
11
16
|
export var ThemeProvider = function ThemeProvider(_ref) {
|
|
12
17
|
var children = _ref.children,
|
|
13
18
|
_ref$defaultStyle = _ref.defaultStyle,
|
|
14
|
-
defaultStyle = _ref$defaultStyle === void 0 ? 'default' : _ref$defaultStyle
|
|
19
|
+
defaultStyle = _ref$defaultStyle === void 0 ? 'default' : _ref$defaultStyle,
|
|
20
|
+
theme = _ref.theme,
|
|
21
|
+
token = _ref.token,
|
|
22
|
+
components = _ref.components,
|
|
23
|
+
override = _ref.override,
|
|
24
|
+
cssVar = _ref.cssVar,
|
|
25
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
15
26
|
var _React$useState = React.useState(defaultStyle),
|
|
16
27
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
17
28
|
style = _React$useState2[0],
|
|
@@ -21,12 +32,22 @@ export var ThemeProvider = function ThemeProvider(_ref) {
|
|
|
21
32
|
useEffect(function () {
|
|
22
33
|
document.documentElement.setAttribute('data-theme-style', style);
|
|
23
34
|
}, [style]);
|
|
24
|
-
|
|
25
|
-
|
|
35
|
+
|
|
36
|
+
// 合并主题配置
|
|
37
|
+
var themeConfig = _objectSpread(_objectSpread({}, rest), {}, {
|
|
38
|
+
theme: theme,
|
|
39
|
+
token: token,
|
|
40
|
+
components: components,
|
|
41
|
+
override: override,
|
|
42
|
+
cssVar: cssVar
|
|
43
|
+
});
|
|
44
|
+
return /*#__PURE__*/_jsx(ThemeContext.Provider, {
|
|
45
|
+
value: _objectSpread({
|
|
26
46
|
style: style,
|
|
27
47
|
setStyle: setStyle
|
|
28
|
-
}
|
|
29
|
-
|
|
48
|
+
}, themeConfig),
|
|
49
|
+
children: children
|
|
50
|
+
});
|
|
30
51
|
};
|
|
31
52
|
|
|
32
53
|
// Hook for using theme
|
|
@@ -36,5 +57,4 @@ export var useTheme = function useTheme() {
|
|
|
36
57
|
throw new Error('useTheme must be used within a ThemeProvider');
|
|
37
58
|
}
|
|
38
59
|
return context;
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=themeContext.js.map
|
|
60
|
+
};
|
package/es/utils/tokenHelper.js
CHANGED
|
@@ -8,12 +8,55 @@ interface ShadowStyle {
|
|
|
8
8
|
shadowOpacity: number;
|
|
9
9
|
shadowRadius: number;
|
|
10
10
|
}
|
|
11
|
-
type TokenValue = string | number | ShadowStyle | undefined;
|
|
11
|
+
type TokenValue = string | number | boolean | ShadowStyle | undefined;
|
|
12
12
|
interface TokenRef {
|
|
13
13
|
root: Record<string, TokenValue> | null;
|
|
14
14
|
[key: string]: TokenValue | Record<string, TokenValue> | null;
|
|
15
15
|
}
|
|
16
16
|
export declare const getComponentToken: () => {
|
|
17
|
+
spacinginputpaddingVerticalM: number;
|
|
18
|
+
fontSizeDesktopTitleT23: TokenValue;
|
|
19
|
+
fontSizeDesktopContentC15: TokenValue;
|
|
20
|
+
fontSizeDesktopContentC21: TokenValue;
|
|
21
|
+
fontSizeDesktopTitleT21: TokenValue;
|
|
22
|
+
fontSizeDesktopTitleT15: TokenValue;
|
|
23
|
+
fontSizeDesktopContentC13: TokenValue;
|
|
24
|
+
fontSizeDesktopContentC11: TokenValue;
|
|
25
|
+
fontSizeDesktopContentC12: TokenValue;
|
|
26
|
+
fontSizeDesktopContentC14: TokenValue;
|
|
27
|
+
fontSizeDesktopTitleT1: TokenValue;
|
|
28
|
+
fontSizeDesktopTitleT32: TokenValue;
|
|
29
|
+
fontSizeDesktopTitleT41: TokenValue;
|
|
30
|
+
fontSizeDesktopContentC05: TokenValue;
|
|
31
|
+
fontSizeDesktopContentC04: TokenValue;
|
|
32
|
+
fontSizeDesktopTitleT7: TokenValue;
|
|
33
|
+
fontSizeDesktopTitleT8: TokenValue;
|
|
34
|
+
fontSizeDesktopTitleT2: TokenValue;
|
|
35
|
+
fontSizeDesktopTitleT5: TokenValue;
|
|
36
|
+
fontSizeDesktopTitleT3: TokenValue;
|
|
37
|
+
fontSizeDesktopTitleT4: TokenValue;
|
|
38
|
+
fontSizeDesktopTitleT10: TokenValue;
|
|
39
|
+
fontSizeMobileContentC04: TokenValue;
|
|
40
|
+
fontSizeMobileContentC05: TokenValue;
|
|
41
|
+
fontSizeMobileContentC11: TokenValue;
|
|
42
|
+
fontSizeMobileContentC12: TokenValue;
|
|
43
|
+
fontSizeMobileContentC13: TokenValue;
|
|
44
|
+
fontSizeMobileContentC14: TokenValue;
|
|
45
|
+
fontSizeMobileContentC15: TokenValue;
|
|
46
|
+
fontSizeMobileContentC21: TokenValue;
|
|
47
|
+
fontSizeMobileTitleT12: TokenValue;
|
|
48
|
+
fontSizeMobileTitleT13: TokenValue;
|
|
49
|
+
fontSizeMobileTitleT14: TokenValue;
|
|
50
|
+
fontSizeMobileTitleT15: TokenValue;
|
|
51
|
+
fontSizeMobileTitleT21: TokenValue;
|
|
52
|
+
fontSizeMobileTitleT23: TokenValue;
|
|
53
|
+
fontSizeMobileTitleT24: TokenValue;
|
|
54
|
+
fontSizeMobileTitleT25: TokenValue;
|
|
55
|
+
fontSizeMobileTitleT32: TokenValue;
|
|
56
|
+
fontSizeMobileTitleT34: TokenValue;
|
|
57
|
+
fontSizeMobileTitleT41: TokenValue;
|
|
58
|
+
fontSizeMobileTitleT45: TokenValue;
|
|
59
|
+
fontSizeMobileNavigation: TokenValue;
|
|
17
60
|
sizingVoucherImage: TokenValue;
|
|
18
61
|
sizingVoucherImageLg: TokenValue;
|
|
19
62
|
sizingVoucherHeight: TokenValue;
|
|
@@ -405,6 +448,7 @@ export declare const getComponentToken: () => {
|
|
|
405
448
|
colorButtonBackgroundPrimaryInversePressed: TokenValue;
|
|
406
449
|
colorButtonBackgroundSuccess: TokenValue;
|
|
407
450
|
colorStickyFooterText: TokenValue;
|
|
451
|
+
colorStickyFooterText2: TokenValue;
|
|
408
452
|
colorStickyFooterPrice: TokenValue;
|
|
409
453
|
colorStickyFooterPriceStrikethrough: TokenValue;
|
|
410
454
|
colorStickyFooterBorderTop: TokenValue;
|
|
@@ -532,6 +576,9 @@ export declare const getComponentToken: () => {
|
|
|
532
576
|
colorStepperBorderActive: TokenValue;
|
|
533
577
|
colorStepperConnectorSuccess: TokenValue;
|
|
534
578
|
colorStepperConnectorInactive: TokenValue;
|
|
579
|
+
colorStepperTextNeutral: TokenValue;
|
|
580
|
+
colorStepperTextLabel2: TokenValue;
|
|
581
|
+
colorStepperBackgroundActiveWeak: TokenValue;
|
|
535
582
|
colorPaginationText: TokenValue;
|
|
536
583
|
colorPaginationIcon: TokenValue;
|
|
537
584
|
colorPaginationBackgroundHover: TokenValue;
|
|
@@ -541,6 +588,7 @@ export declare const getComponentToken: () => {
|
|
|
541
588
|
colorTopNavigationGradient: TokenValue;
|
|
542
589
|
colorTopNavigationBackground: TokenValue;
|
|
543
590
|
colorTopNavigationBackgroundHaze: TokenValue;
|
|
591
|
+
colorTopNavigationBackgroundInverse: TokenValue;
|
|
544
592
|
colorTopNavigationBorderBottom: TokenValue;
|
|
545
593
|
colorBottomNavigationTextActive: TokenValue;
|
|
546
594
|
colorBottomNavigationTextInactive: TokenValue;
|
|
@@ -733,13 +781,62 @@ export declare const getComponentToken: () => {
|
|
|
733
781
|
opacityButtonPressed: TokenValue;
|
|
734
782
|
colorButtonBackgroundPrimaryDisable: TokenValue;
|
|
735
783
|
colorButtonTextDisable: TokenValue;
|
|
784
|
+
fontFamilyPromaryBold: TokenValue;
|
|
785
|
+
fontFamilyPromaryRegular: TokenValue;
|
|
786
|
+
fontFamilyPromarySemiBold: TokenValue;
|
|
787
|
+
fontFamilySecondaryBold: TokenValue;
|
|
788
|
+
fontFamilySecondaryRegular: TokenValue;
|
|
789
|
+
fontFamilySecondarySemiBold: TokenValue;
|
|
736
790
|
};
|
|
737
791
|
declare const TokenManager: {
|
|
738
792
|
tokenRef: TokenRef;
|
|
739
793
|
tokenKey: (key: string) => any;
|
|
740
|
-
designTokenKey: (key: string) => string | number | ShadowStyle;
|
|
794
|
+
designTokenKey: (key: string | number) => string | number | true | ShadowStyle;
|
|
741
795
|
setTokenRef: (value: Record<string, TokenValue>) => void;
|
|
742
796
|
getComponentToken: () => {
|
|
797
|
+
spacinginputpaddingVerticalM: number;
|
|
798
|
+
fontSizeDesktopTitleT23: TokenValue;
|
|
799
|
+
fontSizeDesktopContentC15: TokenValue;
|
|
800
|
+
fontSizeDesktopContentC21: TokenValue;
|
|
801
|
+
fontSizeDesktopTitleT21: TokenValue;
|
|
802
|
+
fontSizeDesktopTitleT15: TokenValue;
|
|
803
|
+
fontSizeDesktopContentC13: TokenValue;
|
|
804
|
+
fontSizeDesktopContentC11: TokenValue;
|
|
805
|
+
fontSizeDesktopContentC12: TokenValue;
|
|
806
|
+
fontSizeDesktopContentC14: TokenValue;
|
|
807
|
+
fontSizeDesktopTitleT1: TokenValue;
|
|
808
|
+
fontSizeDesktopTitleT32: TokenValue;
|
|
809
|
+
fontSizeDesktopTitleT41: TokenValue;
|
|
810
|
+
fontSizeDesktopContentC05: TokenValue;
|
|
811
|
+
fontSizeDesktopContentC04: TokenValue;
|
|
812
|
+
fontSizeDesktopTitleT7: TokenValue;
|
|
813
|
+
fontSizeDesktopTitleT8: TokenValue;
|
|
814
|
+
fontSizeDesktopTitleT2: TokenValue;
|
|
815
|
+
fontSizeDesktopTitleT5: TokenValue;
|
|
816
|
+
fontSizeDesktopTitleT3: TokenValue;
|
|
817
|
+
fontSizeDesktopTitleT4: TokenValue;
|
|
818
|
+
fontSizeDesktopTitleT10: TokenValue;
|
|
819
|
+
fontSizeMobileContentC04: TokenValue;
|
|
820
|
+
fontSizeMobileContentC05: TokenValue;
|
|
821
|
+
fontSizeMobileContentC11: TokenValue;
|
|
822
|
+
fontSizeMobileContentC12: TokenValue;
|
|
823
|
+
fontSizeMobileContentC13: TokenValue;
|
|
824
|
+
fontSizeMobileContentC14: TokenValue;
|
|
825
|
+
fontSizeMobileContentC15: TokenValue;
|
|
826
|
+
fontSizeMobileContentC21: TokenValue;
|
|
827
|
+
fontSizeMobileTitleT12: TokenValue;
|
|
828
|
+
fontSizeMobileTitleT13: TokenValue;
|
|
829
|
+
fontSizeMobileTitleT14: TokenValue;
|
|
830
|
+
fontSizeMobileTitleT15: TokenValue;
|
|
831
|
+
fontSizeMobileTitleT21: TokenValue;
|
|
832
|
+
fontSizeMobileTitleT23: TokenValue;
|
|
833
|
+
fontSizeMobileTitleT24: TokenValue;
|
|
834
|
+
fontSizeMobileTitleT25: TokenValue;
|
|
835
|
+
fontSizeMobileTitleT32: TokenValue;
|
|
836
|
+
fontSizeMobileTitleT34: TokenValue;
|
|
837
|
+
fontSizeMobileTitleT41: TokenValue;
|
|
838
|
+
fontSizeMobileTitleT45: TokenValue;
|
|
839
|
+
fontSizeMobileNavigation: TokenValue;
|
|
743
840
|
sizingVoucherImage: TokenValue;
|
|
744
841
|
sizingVoucherImageLg: TokenValue;
|
|
745
842
|
sizingVoucherHeight: TokenValue;
|
|
@@ -1131,6 +1228,7 @@ declare const TokenManager: {
|
|
|
1131
1228
|
colorButtonBackgroundPrimaryInversePressed: TokenValue;
|
|
1132
1229
|
colorButtonBackgroundSuccess: TokenValue;
|
|
1133
1230
|
colorStickyFooterText: TokenValue;
|
|
1231
|
+
colorStickyFooterText2: TokenValue;
|
|
1134
1232
|
colorStickyFooterPrice: TokenValue;
|
|
1135
1233
|
colorStickyFooterPriceStrikethrough: TokenValue;
|
|
1136
1234
|
colorStickyFooterBorderTop: TokenValue;
|
|
@@ -1258,6 +1356,9 @@ declare const TokenManager: {
|
|
|
1258
1356
|
colorStepperBorderActive: TokenValue;
|
|
1259
1357
|
colorStepperConnectorSuccess: TokenValue;
|
|
1260
1358
|
colorStepperConnectorInactive: TokenValue;
|
|
1359
|
+
colorStepperTextNeutral: TokenValue;
|
|
1360
|
+
colorStepperTextLabel2: TokenValue;
|
|
1361
|
+
colorStepperBackgroundActiveWeak: TokenValue;
|
|
1261
1362
|
colorPaginationText: TokenValue;
|
|
1262
1363
|
colorPaginationIcon: TokenValue;
|
|
1263
1364
|
colorPaginationBackgroundHover: TokenValue;
|
|
@@ -1267,6 +1368,7 @@ declare const TokenManager: {
|
|
|
1267
1368
|
colorTopNavigationGradient: TokenValue;
|
|
1268
1369
|
colorTopNavigationBackground: TokenValue;
|
|
1269
1370
|
colorTopNavigationBackgroundHaze: TokenValue;
|
|
1371
|
+
colorTopNavigationBackgroundInverse: TokenValue;
|
|
1270
1372
|
colorTopNavigationBorderBottom: TokenValue;
|
|
1271
1373
|
colorBottomNavigationTextActive: TokenValue;
|
|
1272
1374
|
colorBottomNavigationTextInactive: TokenValue;
|
|
@@ -1459,6 +1561,12 @@ declare const TokenManager: {
|
|
|
1459
1561
|
opacityButtonPressed: TokenValue;
|
|
1460
1562
|
colorButtonBackgroundPrimaryDisable: TokenValue;
|
|
1461
1563
|
colorButtonTextDisable: TokenValue;
|
|
1564
|
+
fontFamilyPromaryBold: TokenValue;
|
|
1565
|
+
fontFamilyPromaryRegular: TokenValue;
|
|
1566
|
+
fontFamilyPromarySemiBold: TokenValue;
|
|
1567
|
+
fontFamilySecondaryBold: TokenValue;
|
|
1568
|
+
fontFamilySecondaryRegular: TokenValue;
|
|
1569
|
+
fontFamilySecondarySemiBold: TokenValue;
|
|
1462
1570
|
};
|
|
1463
1571
|
};
|
|
1464
1572
|
export default TokenManager;
|