@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,139 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/Button/designTokens.ts
|
|
20
|
+
var designTokens_exports = {};
|
|
21
|
+
__export(designTokens_exports, {
|
|
22
|
+
designTokens: () => designTokens,
|
|
23
|
+
inverseDesignTokens: () => inverseDesignTokens
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(designTokens_exports);
|
|
26
|
+
var import_tokenHelper = require("../../utils/tokenHelper");
|
|
27
|
+
var designTokens = {
|
|
28
|
+
// 算法配置
|
|
29
|
+
// algorithm: true,
|
|
30
|
+
// 主要按钮背景色
|
|
31
|
+
colorPrimary: (0, import_tokenHelper.getToken)("colorButtonBackgroundPrimary"),
|
|
32
|
+
// 主要按钮 Hover
|
|
33
|
+
colorPrimaryHover: (0, import_tokenHelper.getToken)("colorButtonBackgroundPrimary"),
|
|
34
|
+
colorPrimaryActive: (0, import_tokenHelper.getToken)("colorButtonBackgroundPrimary"),
|
|
35
|
+
// colorPrimaryBg: getToken('colorButtonBackgroundPrimary'),
|
|
36
|
+
// 主要按钮文本颜色
|
|
37
|
+
primaryColor: (0, import_tokenHelper.getToken)("colorButtonTextPrimary"),
|
|
38
|
+
// 次要按钮背景色 默认是白色
|
|
39
|
+
// 次要按钮文本颜色
|
|
40
|
+
defaultColor: (0, import_tokenHelper.getToken)("colorButtonTextSecondary"),
|
|
41
|
+
// 次要按钮边框颜色
|
|
42
|
+
defaultBorderColor: (0, import_tokenHelper.getToken)("colorButtonTextSecondary"),
|
|
43
|
+
// 禁用按钮背景色 Hover
|
|
44
|
+
colorBgContainerDisabled: (0, import_tokenHelper.getToken)("colorButtonBackgroundPrimaryDisable"),
|
|
45
|
+
borderColorDisabled: (0, import_tokenHelper.getToken)("colorButtonBackgroundPrimaryDisable"),
|
|
46
|
+
colorTextDisabled: (0, import_tokenHelper.getToken)("colorButtonTextDisabled"),
|
|
47
|
+
// Success 按钮背景色
|
|
48
|
+
green1: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
49
|
+
green2: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
50
|
+
green3: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
51
|
+
green4: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
52
|
+
green5: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
53
|
+
green6: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
54
|
+
green7: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
55
|
+
// Inverse 反色配置 token配置不出来,用 inverse 判断处理。
|
|
56
|
+
// ghostBg: getToken('colorButtonBackgroundPrimaryInverse'),
|
|
57
|
+
// defaultGhostBorderColor: getToken('colorButtonBackgroundPrimaryInverse'),
|
|
58
|
+
// groupBorderColor: getToken('colorButtonBackgroundPrimaryInverse'),
|
|
59
|
+
// // 文本按钮的
|
|
60
|
+
// defaultGhostColor: getToken('colorButtonTextPrimaryInverse'),
|
|
61
|
+
// Inverse 反色配置 end
|
|
62
|
+
// 全局公用的:
|
|
63
|
+
// 按钮圆角
|
|
64
|
+
borderRadius: (0, import_tokenHelper.getToken)("borderRadiusButton"),
|
|
65
|
+
borderRadiusSM: (0, import_tokenHelper.getToken)("borderRadiusButton"),
|
|
66
|
+
borderRadiusLG: (0, import_tokenHelper.getToken)("borderRadiusButton"),
|
|
67
|
+
defaultShadow: "0 0px 0 rgba(0,0,0,0.02)",
|
|
68
|
+
primaryShadow: "0 0 0 rgba(5,145,255,0.1)",
|
|
69
|
+
// gFontFamilySecondaryBold: String = "Roboto"
|
|
70
|
+
// fontWeight700: Font.Weight = .bold 改用 text 组件实现
|
|
71
|
+
// fontWeight: getToken(''),
|
|
72
|
+
// fontfamily: getToken(''),
|
|
73
|
+
// 边框宽度
|
|
74
|
+
lineWidth: (0, import_tokenHelper.getToken)("borderWidthButtonSecondary"),
|
|
75
|
+
// 默认文本按钮的文本色
|
|
76
|
+
textTextColor: (0, import_tokenHelper.getToken)("colorButtonTextSecondary"),
|
|
77
|
+
// 按钮内间距
|
|
78
|
+
paddingInline: (0, import_tokenHelper.getToken)("spacingButtonPaddingHorizontal"),
|
|
79
|
+
paddingInlineSM: (0, import_tokenHelper.getToken)("spacingButtonPaddingHorizontal"),
|
|
80
|
+
paddingInlineLG: (0, import_tokenHelper.getToken)("spacingButtonPaddingHorizontal"),
|
|
81
|
+
paddingBlock: (0, import_tokenHelper.getToken)("spacingButtonPaddingVertical"),
|
|
82
|
+
paddingBlockSM: (0, import_tokenHelper.getToken)("spacingButtonPaddingVertical"),
|
|
83
|
+
paddingBlockLG: (0, import_tokenHelper.getToken)("spacingButtonPaddingVertical")
|
|
84
|
+
};
|
|
85
|
+
var inverseDesignTokens = {
|
|
86
|
+
// 算法配置
|
|
87
|
+
// algorithm: true,
|
|
88
|
+
// 主要按钮背景色
|
|
89
|
+
colorPrimary: (0, import_tokenHelper.getToken)("colorButtonBackgroundPrimaryInverse"),
|
|
90
|
+
// 主要按钮 Hover
|
|
91
|
+
colorPrimaryHover: (0, import_tokenHelper.getToken)("colorButtonBackgroundPrimaryInverse"),
|
|
92
|
+
colorPrimaryActive: (0, import_tokenHelper.getToken)("colorButtonBackgroundPrimaryInverse"),
|
|
93
|
+
// 主要按钮 Active
|
|
94
|
+
// colorPrimaryBg: getToken('colorButtonBackgroundPrimaryInverse'),
|
|
95
|
+
// 主要按钮文本颜色
|
|
96
|
+
primaryColor: (0, import_tokenHelper.getToken)("colorButtonTextPrimaryInverse"),
|
|
97
|
+
// 次要按钮背景色 默认是白色
|
|
98
|
+
defaultBg: "rgba(255,255,255,0)",
|
|
99
|
+
defaultHoverBg: "rgba(255,255,255,0)",
|
|
100
|
+
defaultActiveBg: "rgba(255,255,255,0)",
|
|
101
|
+
// 次要按钮文本颜色
|
|
102
|
+
defaultColor: (0, import_tokenHelper.getToken)("colorButtonTextSecondaryInverse"),
|
|
103
|
+
// 次要按钮边框颜色
|
|
104
|
+
defaultBorderColor: (0, import_tokenHelper.getToken)("colorButtonSecondaryBorderInverse"),
|
|
105
|
+
// 禁用按钮背景色 Hover
|
|
106
|
+
colorBgContainerDisabled: (0, import_tokenHelper.getToken)("colorButtonBackgroundPrimaryDisable"),
|
|
107
|
+
borderColorDisabled: (0, import_tokenHelper.getToken)("colorButtonBackgroundPrimaryDisable"),
|
|
108
|
+
colorTextDisabled: (0, import_tokenHelper.getToken)("colorButtonTextDisabled"),
|
|
109
|
+
// Success 按钮背景色
|
|
110
|
+
green1: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
111
|
+
green2: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
112
|
+
green3: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
113
|
+
green4: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
114
|
+
green5: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
115
|
+
green6: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
116
|
+
green7: (0, import_tokenHelper.getToken)("colorButtonBackgroundSuccess"),
|
|
117
|
+
// 全局公用的:
|
|
118
|
+
// 按钮圆角
|
|
119
|
+
borderRadius: (0, import_tokenHelper.getToken)("borderRadiusButton"),
|
|
120
|
+
borderRadiusSM: (0, import_tokenHelper.getToken)("borderRadiusButton"),
|
|
121
|
+
borderRadiusLG: (0, import_tokenHelper.getToken)("borderRadiusButton"),
|
|
122
|
+
defaultShadow: "0 0px 0 rgba(0,0,0,0.02)",
|
|
123
|
+
primaryShadow: "0 0 0 rgba(5,145,255,0.1)",
|
|
124
|
+
// gFontFamilySecondaryBold: String = "Roboto"
|
|
125
|
+
// fontWeight700: Font.Weight = .bold 改用 text 组件实现
|
|
126
|
+
// fontWeight: getToken(''),
|
|
127
|
+
// fontfamily: getToken(''),
|
|
128
|
+
// 边框宽度
|
|
129
|
+
lineWidth: (0, import_tokenHelper.getToken)("borderWidthButtonSecondary"),
|
|
130
|
+
// 默认文本按钮的文本色
|
|
131
|
+
textTextColor: (0, import_tokenHelper.getToken)("colorButtonTextSecondary"),
|
|
132
|
+
// 按钮内间距
|
|
133
|
+
paddingInline: (0, import_tokenHelper.getToken)("spacingButtonPaddingHorizontal"),
|
|
134
|
+
paddingInlineSM: (0, import_tokenHelper.getToken)("spacingButtonPaddingHorizontal"),
|
|
135
|
+
paddingInlineLG: (0, import_tokenHelper.getToken)("spacingButtonPaddingHorizontal"),
|
|
136
|
+
paddingBlock: (0, import_tokenHelper.getToken)("spacingButtonPaddingVertical"),
|
|
137
|
+
paddingBlockSM: (0, import_tokenHelper.getToken)("spacingButtonPaddingVertical"),
|
|
138
|
+
paddingBlockLG: (0, import_tokenHelper.getToken)("spacingButtonPaddingVertical")
|
|
139
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TextProps } from "../Text";
|
|
3
|
+
import './style/index.less';
|
|
4
|
+
export type HtmlType = 'button' | 'reset' | 'submit';
|
|
5
|
+
export type Size = 'middle' | 'small' | 'large';
|
|
6
|
+
export type ButtonType = 'primary' | 'default' | 'dashed' | 'link' | 'text';
|
|
7
|
+
export type ButtonColorType = 'default' | 'primary' | 'danger' | 'blue' | 'purple' | 'cyan' | 'green' | 'magenta' | 'pink' | 'red' | 'orange' | 'yellow' | 'volcano' | 'geekblue' | 'lime' | 'gold';
|
|
8
|
+
export interface ButtonThemeConfig {
|
|
9
|
+
token?: Record<string, any>;
|
|
10
|
+
components?: {
|
|
11
|
+
Button?: Record<string, any>;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
cssVar?: boolean;
|
|
15
|
+
hashed?: boolean;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
export interface xDXpProps {
|
|
19
|
+
'x-dxp-prop'?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'color'> {
|
|
22
|
+
type?: ButtonType;
|
|
23
|
+
color?: ButtonColorType;
|
|
24
|
+
inverse?: boolean;
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
htmlType?: HtmlType;
|
|
27
|
+
size?: Size;
|
|
28
|
+
fontSize?: TextProps['size'];
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
block?: boolean;
|
|
31
|
+
style?: React.CSSProperties;
|
|
32
|
+
theme?: string | ButtonThemeConfig;
|
|
33
|
+
prefixCls?: string;
|
|
34
|
+
'aria-label'?: React.AriaAttributes['aria-label'];
|
|
35
|
+
contentClassName?: string;
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}
|
|
38
|
+
declare const ButtonWithContext: React.FC<ButtonProps>;
|
|
39
|
+
export default ButtonWithContext;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __objRest = (source, exclude) => {
|
|
25
|
+
var target = {};
|
|
26
|
+
for (var prop in source)
|
|
27
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
if (source != null && __getOwnPropSymbols)
|
|
30
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
+
target[prop] = source[prop];
|
|
33
|
+
}
|
|
34
|
+
return target;
|
|
35
|
+
};
|
|
36
|
+
var __export = (target, all) => {
|
|
37
|
+
for (var name in all)
|
|
38
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
39
|
+
};
|
|
40
|
+
var __copyProps = (to, from, except, desc) => {
|
|
41
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
42
|
+
for (let key of __getOwnPropNames(from))
|
|
43
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
44
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
45
|
+
}
|
|
46
|
+
return to;
|
|
47
|
+
};
|
|
48
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
49
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
50
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
51
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
52
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
53
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
54
|
+
mod
|
|
55
|
+
));
|
|
56
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
57
|
+
|
|
58
|
+
// src/components/Button/index.tsx
|
|
59
|
+
var Button_exports = {};
|
|
60
|
+
__export(Button_exports, {
|
|
61
|
+
default: () => Button_default
|
|
62
|
+
});
|
|
63
|
+
module.exports = __toCommonJS(Button_exports);
|
|
64
|
+
var import_react = __toESM(require("react"));
|
|
65
|
+
var import_antd = require("antd");
|
|
66
|
+
var import_Text = __toESM(require("../Text"));
|
|
67
|
+
var import_constants = require("../../constants");
|
|
68
|
+
var import_noop = require("../../utils/noop");
|
|
69
|
+
var import_designTokens = require("./designTokens");
|
|
70
|
+
var import_style = require("./style/index.less");
|
|
71
|
+
var ButtonComponent = class extends import_react.PureComponent {
|
|
72
|
+
render() {
|
|
73
|
+
var _b, _c, _d;
|
|
74
|
+
const { children, inverse, fontSize, theme, parentTheme } = this.props;
|
|
75
|
+
const _a = this.props, { fontSize: _, theme: __, inverse: ___, parentTheme: ____ } = _a, filteredProps = __objRest(_a, ["fontSize", "theme", "inverse", "parentTheme"]);
|
|
76
|
+
const baseTokens = inverse ? import_designTokens.inverseDesignTokens : import_designTokens.designTokens;
|
|
77
|
+
let themeConfig = {
|
|
78
|
+
components: {
|
|
79
|
+
Button: baseTokens
|
|
80
|
+
},
|
|
81
|
+
token: {},
|
|
82
|
+
cssVar: true,
|
|
83
|
+
hashed: false
|
|
84
|
+
};
|
|
85
|
+
if (parentTheme) {
|
|
86
|
+
const parentButtonTokens = ((_b = parentTheme.components) == null ? void 0 : _b.Button) || {};
|
|
87
|
+
const parentGlobalTokens = parentTheme.token || {};
|
|
88
|
+
themeConfig = __spreadProps(__spreadValues(__spreadValues({}, themeConfig), parentTheme), {
|
|
89
|
+
token: __spreadValues(__spreadValues({}, themeConfig.token || {}), parentGlobalTokens),
|
|
90
|
+
components: __spreadProps(__spreadValues({}, parentTheme.components), {
|
|
91
|
+
Button: __spreadValues(__spreadValues({}, baseTokens), parentButtonTokens)
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
if (theme && typeof theme === "object") {
|
|
96
|
+
const userButtonTokens = ((_c = theme.components) == null ? void 0 : _c.Button) || {};
|
|
97
|
+
const userGlobalTokens = theme.token || {};
|
|
98
|
+
themeConfig = __spreadProps(__spreadValues(__spreadValues({}, themeConfig), theme), {
|
|
99
|
+
token: __spreadValues(__spreadValues({}, themeConfig.token || {}), userGlobalTokens),
|
|
100
|
+
components: __spreadProps(__spreadValues(__spreadValues({}, themeConfig.components), theme.components), {
|
|
101
|
+
Button: __spreadValues(__spreadValues(__spreadValues({}, baseTokens), ((_d = parentTheme == null ? void 0 : parentTheme.components) == null ? void 0 : _d.Button) || {}), userButtonTokens)
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
106
|
+
import_antd.ConfigProvider,
|
|
107
|
+
{
|
|
108
|
+
wave: { disabled: true },
|
|
109
|
+
prefixCls: import_constants.cssClasses.PREFIX,
|
|
110
|
+
theme: themeConfig
|
|
111
|
+
},
|
|
112
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Button, __spreadValues({}, filteredProps), /* @__PURE__ */ import_react.default.createElement(import_Text.default, { size: fontSize }, children))
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
ButtonComponent.defaultProps = {
|
|
117
|
+
disabled: false,
|
|
118
|
+
size: "large",
|
|
119
|
+
type: "default",
|
|
120
|
+
theme: "light",
|
|
121
|
+
htmlType: "button",
|
|
122
|
+
onMouseDown: import_noop.noop,
|
|
123
|
+
onClick: import_noop.noop,
|
|
124
|
+
onMouseEnter: import_noop.noop,
|
|
125
|
+
onMouseLeave: import_noop.noop,
|
|
126
|
+
prefixCls: import_constants.cssClasses.PREFIX + "-button"
|
|
127
|
+
};
|
|
128
|
+
var ButtonWithContext = (props) => {
|
|
129
|
+
const { theme: parentTheme } = import_react.default.useContext(import_antd.ConfigProvider.ConfigContext);
|
|
130
|
+
return /* @__PURE__ */ import_react.default.createElement(ButtonComponent, __spreadProps(__spreadValues({}, props), { parentTheme }));
|
|
131
|
+
};
|
|
132
|
+
var Button_default = ButtonWithContext;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
|
|
3
|
+
// 基础按钮样式
|
|
4
|
+
@components: button;
|
|
5
|
+
|
|
6
|
+
// 使用字符串拼接
|
|
7
|
+
.@{prefix}-@{components} {
|
|
8
|
+
min-width: 128px;
|
|
9
|
+
padding-top: 8px;
|
|
10
|
+
padding-bottom: 8px;
|
|
11
|
+
|
|
12
|
+
// 按钮类型
|
|
13
|
+
// &-primary {
|
|
14
|
+
// background-color: @btn-primary-bg-default;
|
|
15
|
+
// }
|
|
16
|
+
&:not(:disabled):not(.ant-btn-disabled):hover {
|
|
17
|
+
opacity: 0.8;
|
|
18
|
+
transition: opacity 0.3s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
19
|
+
.@{prefix}-text {
|
|
20
|
+
transform: scale(0.9);
|
|
21
|
+
transform-origin: center;
|
|
22
|
+
transition: opacity 0.3s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:not(:disabled):not(.dxp-button-disabled):active {
|
|
27
|
+
opacity: 0.5;
|
|
28
|
+
transition: opacity 0.3s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
29
|
+
.@{prefix}-text {
|
|
30
|
+
transform: scale(0.9);
|
|
31
|
+
transform-origin: center;
|
|
32
|
+
transition: opacity 0.3s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
&:focus, &:focus-visible{
|
|
36
|
+
outline: none;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const designTokens: {
|
|
2
|
+
borderRadiusChip: any;
|
|
3
|
+
colorChipBackgroundStandard: any;
|
|
4
|
+
colorChipBorderStandard: any;
|
|
5
|
+
borderWidthChip: any;
|
|
6
|
+
spacingChipPaddingHorizontal: any;
|
|
7
|
+
spacingChipPaddingVertical: any;
|
|
8
|
+
colorChipBackgroundHover: any;
|
|
9
|
+
colorChipTextInactive: any;
|
|
10
|
+
colorChipBackgroundActive: any;
|
|
11
|
+
colorChipBorderActive: any;
|
|
12
|
+
colorChipTextActive: any;
|
|
13
|
+
sizingChipIconClose: any;
|
|
14
|
+
};
|
|
15
|
+
export { designTokens };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/Chip/designTokens.ts
|
|
20
|
+
var designTokens_exports = {};
|
|
21
|
+
__export(designTokens_exports, {
|
|
22
|
+
designTokens: () => designTokens
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(designTokens_exports);
|
|
25
|
+
var import_tokenHelper = require("../../utils/tokenHelper");
|
|
26
|
+
var designTokens = {
|
|
27
|
+
borderRadiusChip: (0, import_tokenHelper.getToken)("borderRadiusChip"),
|
|
28
|
+
// 选中的边框颜色
|
|
29
|
+
colorChipBackgroundStandard: (0, import_tokenHelper.getToken)("colorChipBackgroundStandard"),
|
|
30
|
+
// 选中的label颜色
|
|
31
|
+
colorChipBorderStandard: (0, import_tokenHelper.getToken)("colorChipBorderStandard"),
|
|
32
|
+
// hover label颜色
|
|
33
|
+
borderWidthChip: (0, import_tokenHelper.getToken)("borderWidthChip"),
|
|
34
|
+
// active label颜色
|
|
35
|
+
spacingChipPaddingHorizontal: (0, import_tokenHelper.getToken)("spacingChipPaddingHorizontal"),
|
|
36
|
+
// 默认label颜色
|
|
37
|
+
spacingChipPaddingVertical: (0, import_tokenHelper.getToken)("spacingChipPaddingVertical"),
|
|
38
|
+
// 未选中的边框
|
|
39
|
+
colorChipBackgroundHover: (0, import_tokenHelper.getToken)("colorChipBackgroundHover"),
|
|
40
|
+
colorChipTextInactive: (0, import_tokenHelper.getToken)("colorChipTextInactive"),
|
|
41
|
+
colorChipBackgroundActive: (0, import_tokenHelper.getToken)("colorChipBackgroundActive"),
|
|
42
|
+
colorChipBorderActive: (0, import_tokenHelper.getToken)("colorChipBorderActive"),
|
|
43
|
+
colorChipTextActive: (0, import_tokenHelper.getToken)("colorChipTextActive"),
|
|
44
|
+
sizingChipIconClose: (0, import_tokenHelper.getToken)("sizingChipIconClose")
|
|
45
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style/index.less';
|
|
3
|
+
export interface ChipProps {
|
|
4
|
+
prefixCls?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
types?: 'textOnly' | 'removable';
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
onChange?: () => void;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
declare const Chip: (props: ChipProps) => React.JSX.Element;
|
|
13
|
+
export default Chip;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
33
|
+
var __export = (target, all) => {
|
|
34
|
+
for (var name in all)
|
|
35
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
36
|
+
};
|
|
37
|
+
var __copyProps = (to, from, except, desc) => {
|
|
38
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
39
|
+
for (let key of __getOwnPropNames(from))
|
|
40
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
41
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
42
|
+
}
|
|
43
|
+
return to;
|
|
44
|
+
};
|
|
45
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
46
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
47
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
48
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
49
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
50
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
51
|
+
mod
|
|
52
|
+
));
|
|
53
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
54
|
+
|
|
55
|
+
// src/components/Chip/index.tsx
|
|
56
|
+
var Chip_exports = {};
|
|
57
|
+
__export(Chip_exports, {
|
|
58
|
+
default: () => Chip_default
|
|
59
|
+
});
|
|
60
|
+
module.exports = __toCommonJS(Chip_exports);
|
|
61
|
+
var import_react = __toESM(require("react"));
|
|
62
|
+
var import_antd = require("antd");
|
|
63
|
+
var import_cssinjs = require("@ant-design/cssinjs");
|
|
64
|
+
var import_theme = require("../../utils/theme");
|
|
65
|
+
var import_designTokens = require("./designTokens");
|
|
66
|
+
var import_constants = require("../../constants");
|
|
67
|
+
var import_Text = __toESM(require("../Text"));
|
|
68
|
+
var import_style = require("./style/index.less");
|
|
69
|
+
var Chip = (props) => {
|
|
70
|
+
const _a = props, {
|
|
71
|
+
types = "textOnly",
|
|
72
|
+
children,
|
|
73
|
+
prefixCls = "tag",
|
|
74
|
+
checked,
|
|
75
|
+
onChange = () => {
|
|
76
|
+
},
|
|
77
|
+
onClose = () => {
|
|
78
|
+
},
|
|
79
|
+
style
|
|
80
|
+
} = _a, attr = __objRest(_a, [
|
|
81
|
+
"types",
|
|
82
|
+
"children",
|
|
83
|
+
"prefixCls",
|
|
84
|
+
"checked",
|
|
85
|
+
"onChange",
|
|
86
|
+
"onClose",
|
|
87
|
+
"style"
|
|
88
|
+
]);
|
|
89
|
+
const {
|
|
90
|
+
borderRadiusChip,
|
|
91
|
+
colorChipBackgroundStandard,
|
|
92
|
+
colorChipBorderStandard,
|
|
93
|
+
borderWidthChip,
|
|
94
|
+
spacingChipPaddingHorizontal,
|
|
95
|
+
spacingChipPaddingVertical,
|
|
96
|
+
colorChipBackgroundHover,
|
|
97
|
+
colorChipTextInactive,
|
|
98
|
+
colorChipBackgroundActive,
|
|
99
|
+
colorChipBorderActive,
|
|
100
|
+
colorChipTextActive,
|
|
101
|
+
sizingChipIconClose
|
|
102
|
+
// spacingChipTextLinkPaddingVertical,
|
|
103
|
+
// spacingChipTextLinkPaddingHorizontal,
|
|
104
|
+
} = import_designTokens.designTokens;
|
|
105
|
+
const useCustomButtonStyle = () => {
|
|
106
|
+
const hashId = (0, import_cssinjs.useStyleRegister)({
|
|
107
|
+
theme: import_theme.theme,
|
|
108
|
+
token: { baseColor: "blue" },
|
|
109
|
+
path: ["tag-textonly"]
|
|
110
|
+
}, () => `
|
|
111
|
+
.tag-textonly {
|
|
112
|
+
color: ${colorChipTextInactive};
|
|
113
|
+
border-color: ${colorChipBorderStandard};
|
|
114
|
+
border-width: ${borderWidthChip}px;
|
|
115
|
+
border-radius: ${borderRadiusChip}px;
|
|
116
|
+
background-color: ${colorChipBackgroundStandard};
|
|
117
|
+
padding: ${spacingChipPaddingVertical}px ${spacingChipPaddingHorizontal}px;
|
|
118
|
+
}
|
|
119
|
+
.tag-textonly:hover {
|
|
120
|
+
background-color: ${colorChipBackgroundHover};
|
|
121
|
+
}
|
|
122
|
+
.tag-textonly:active {
|
|
123
|
+
background-color: ${colorChipBackgroundHover};
|
|
124
|
+
}
|
|
125
|
+
.tag-active,
|
|
126
|
+
.tag-active:hover,
|
|
127
|
+
.tag-active:active {
|
|
128
|
+
color: ${colorChipTextActive};
|
|
129
|
+
border-color: ${colorChipBorderActive};
|
|
130
|
+
background-color: ${colorChipBackgroundActive};
|
|
131
|
+
}
|
|
132
|
+
`);
|
|
133
|
+
return hashId;
|
|
134
|
+
};
|
|
135
|
+
useCustomButtonStyle();
|
|
136
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
137
|
+
import_antd.ConfigProvider,
|
|
138
|
+
{
|
|
139
|
+
prefixCls: import_constants.BASE_CLASS_PREFIX,
|
|
140
|
+
theme: {
|
|
141
|
+
components: {
|
|
142
|
+
Tag: {
|
|
143
|
+
borderRadiusSM: borderRadiusChip,
|
|
144
|
+
defaultBg: colorChipBackgroundActive,
|
|
145
|
+
colorBorder: colorChipBorderActive,
|
|
146
|
+
lineWidth: borderWidthChip,
|
|
147
|
+
colorText: colorChipTextActive,
|
|
148
|
+
marginXS: 16,
|
|
149
|
+
fontSizeIcon: sizingChipIconClose
|
|
150
|
+
// spacingChipTextLinkPaddingVertical,
|
|
151
|
+
// spacingChipTextLinkPaddingHorizontal,
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
types === "textOnly" ? /* @__PURE__ */ import_react.default.createElement(
|
|
157
|
+
"span",
|
|
158
|
+
{
|
|
159
|
+
className: `${import_constants.BASE_CLASS_PREFIX}-${prefixCls}-${types} tag-textonly ${checked ? "tag-active" : ""}`,
|
|
160
|
+
onClick: () => onChange(),
|
|
161
|
+
style
|
|
162
|
+
},
|
|
163
|
+
/* @__PURE__ */ import_react.default.createElement(import_Text.default, { size: "ContentC14Regular" }, children)
|
|
164
|
+
) : /* @__PURE__ */ import_react.default.createElement(
|
|
165
|
+
import_antd.Tag,
|
|
166
|
+
__spreadValues({
|
|
167
|
+
className: `${import_constants.BASE_CLASS_PREFIX}-${prefixCls}-${types}`,
|
|
168
|
+
style: __spreadValues({ padding: `${spacingChipPaddingVertical}px ${spacingChipPaddingHorizontal}px` }, style),
|
|
169
|
+
onClose: (e) => {
|
|
170
|
+
e.preventDefault();
|
|
171
|
+
onClose();
|
|
172
|
+
}
|
|
173
|
+
}, attr),
|
|
174
|
+
/* @__PURE__ */ import_react.default.createElement(import_Text.default, { size: "ContentC14Regular" }, children)
|
|
175
|
+
)
|
|
176
|
+
);
|
|
177
|
+
};
|
|
178
|
+
var Chip_default = Chip;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import './style/index.less';
|
|
3
|
+
export interface DividerProps {
|
|
4
|
+
type?: 'solid' | 'dashed' | 'eight' | 'whiteBg' | 'grayBg' | 'vertical';
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export default class Divider extends PureComponent<DividerProps> {
|
|
11
|
+
static defaultProps: {
|
|
12
|
+
type: string;
|
|
13
|
+
prefixCls: string;
|
|
14
|
+
};
|
|
15
|
+
render(): React.JSX.Element;
|
|
16
|
+
}
|