@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,18 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["type", "style", "className"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import "../../assets/iconFont/iconfont.css"; // 确保字体路径正确
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
var MIcon = function MIcon(_ref) {
|
|
8
|
+
var type = _ref.type,
|
|
9
|
+
style = _ref.style,
|
|
10
|
+
className = _ref.className,
|
|
11
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
return /*#__PURE__*/_jsx("i", _objectSpread({
|
|
13
|
+
className: "DCPL ".concat(className || '', " ").concat(type),
|
|
14
|
+
style: style,
|
|
15
|
+
"aria-hidden": "true"
|
|
16
|
+
}, rest));
|
|
17
|
+
};
|
|
18
|
+
export default MIcon;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import TokenManager from "../../utils/tokenManager";
|
|
2
|
+
var designTokens = {
|
|
3
|
+
colorIconButtonNeutral: TokenManager.tokenKey('colorIconButtonNeutral'),
|
|
4
|
+
colorIconButtonInverse: TokenManager.tokenKey('colorIconButtonInverse'),
|
|
5
|
+
sizingButtonIcon: TokenManager.tokenKey('sizingButtonIcon')
|
|
6
|
+
};
|
|
7
|
+
export default designTokens;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IIconProps {
|
|
3
|
+
name: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
size?: string | number;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
inverse?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const Icon: (props: IIconProps) => React.JSX.Element;
|
|
12
|
+
export default Icon;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["name", "color", "size", "inverse", "style"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import MIcon from "./Icon";
|
|
6
|
+
import designTokens from "./designTokens";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
var Icon = function Icon(props) {
|
|
9
|
+
var colorIconButtonInverse = designTokens.colorIconButtonInverse,
|
|
10
|
+
colorIconButtonNeutral = designTokens.colorIconButtonNeutral,
|
|
11
|
+
sizingButtonIcon = designTokens.sizingButtonIcon;
|
|
12
|
+
var name = props.name,
|
|
13
|
+
color = props.color,
|
|
14
|
+
_props$size = props.size,
|
|
15
|
+
size = _props$size === void 0 ? sizingButtonIcon : _props$size,
|
|
16
|
+
_props$inverse = props.inverse,
|
|
17
|
+
inverse = _props$inverse === void 0 ? false : _props$inverse,
|
|
18
|
+
style = props.style,
|
|
19
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
20
|
+
var mergeStyle = _objectSpread({
|
|
21
|
+
color: color || (inverse ? colorIconButtonInverse : colorIconButtonNeutral),
|
|
22
|
+
fontSize: size ? "".concat(size, "px") : ''
|
|
23
|
+
}, style);
|
|
24
|
+
return /*#__PURE__*/_jsx(MIcon, _objectSpread({
|
|
25
|
+
type: name,
|
|
26
|
+
style: mergeStyle
|
|
27
|
+
}, rest));
|
|
28
|
+
};
|
|
29
|
+
export default Icon;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const designTokens: {
|
|
2
|
+
colorIconButtonNeutral: any;
|
|
3
|
+
colorIconButtonInverse: any;
|
|
4
|
+
sizingIconButtonMedium: any;
|
|
5
|
+
sizingIconButtonSmall: any;
|
|
6
|
+
spacingIconButtonPaddingVertical: any;
|
|
7
|
+
spacingIconButtonPaddingVerticalSm: any;
|
|
8
|
+
spacingIconButtonPaddingHorizontal: any;
|
|
9
|
+
spacingIconButtonPaddingHorizontalSm: any;
|
|
10
|
+
spacingIconButtonHorizontalGap: any;
|
|
11
|
+
spacingIconButtonHorizontalGapSm: any;
|
|
12
|
+
colorIconButtonDisabled: any;
|
|
13
|
+
colorIconButtonHover: any;
|
|
14
|
+
colorIconButtonActive: any;
|
|
15
|
+
transitionIconButton: string;
|
|
16
|
+
};
|
|
17
|
+
declare const otherDesignTokens: {
|
|
18
|
+
[x: string]: string;
|
|
19
|
+
};
|
|
20
|
+
export { designTokens, otherDesignTokens, };
|
|
21
|
+
export default designTokens;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import { getToken } from "../../utils/tokenHelper";
|
|
3
|
+
import { cssClasses } from "../../constants";
|
|
4
|
+
var prefixCls = cssClasses.PREFIX + '-icon-button';
|
|
5
|
+
|
|
6
|
+
// 设计令牌定义
|
|
7
|
+
var designTokens = {
|
|
8
|
+
// 图标按钮颜色
|
|
9
|
+
colorIconButtonNeutral: getToken('colorIconButtonNeutral'),
|
|
10
|
+
colorIconButtonInverse: getToken('colorIconButtonInverse'),
|
|
11
|
+
// 反色
|
|
12
|
+
|
|
13
|
+
// 图标按钮尺寸
|
|
14
|
+
sizingIconButtonMedium: getToken('sizingIconButtonIconMedium'),
|
|
15
|
+
// Medium Icon: 24px x 24px
|
|
16
|
+
sizingIconButtonSmall: getToken('sizingIconButtonIconSmall'),
|
|
17
|
+
// Small Icon: 16px x 16px
|
|
18
|
+
|
|
19
|
+
// padding
|
|
20
|
+
spacingIconButtonPaddingVertical: getToken('spacingIconButtonPaddingVertical'),
|
|
21
|
+
// Medium
|
|
22
|
+
spacingIconButtonPaddingVerticalSm: getToken('spacingIconButtonPaddingVerticalSm'),
|
|
23
|
+
// Small
|
|
24
|
+
|
|
25
|
+
spacingIconButtonPaddingHorizontal: getToken('spacingIconButtonPaddingHorizontal'),
|
|
26
|
+
spacingIconButtonPaddingHorizontalSm: getToken('spacingIconButtonPaddingHorizontalSm'),
|
|
27
|
+
spacingIconButtonHorizontalGap: getToken('spacingIconButtonHorizontalGap'),
|
|
28
|
+
spacingIconButtonHorizontalGapSm: getToken('spacingIconButtonHorizontalGapSm'),
|
|
29
|
+
colorIconButtonDisabled: getToken('colorIconButtonDisabled'),
|
|
30
|
+
colorIconButtonHover: getToken('colorIconButtonHover'),
|
|
31
|
+
colorIconButtonActive: getToken('colorIconButtonActive'),
|
|
32
|
+
// 过渡动画
|
|
33
|
+
transitionIconButton: '0.3s'
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// 其他样式属性
|
|
37
|
+
var otherDesignTokens = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "--".concat(prefixCls, "-color"), "".concat(getToken('colorIconButtonNeutral'))), "--".concat(prefixCls, "-color-inverse"), "".concat(getToken('colorIconButtonInverse'))), "--".concat(prefixCls, "-color-disabled"), "".concat(getToken('colorIconButtonDisabled'))), "--".concat(prefixCls, "-transition"), "all ".concat(designTokens.transitionIconButton));
|
|
38
|
+
export { designTokens, otherDesignTokens };
|
|
39
|
+
export default designTokens;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style/index.less';
|
|
3
|
+
export type Size = 'medium' | 'small';
|
|
4
|
+
export interface IconButtonProps {
|
|
5
|
+
customeIconSize?: string | number;
|
|
6
|
+
prefixCls?: string;
|
|
7
|
+
name: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
size?: Size | string | number;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
className?: string;
|
|
12
|
+
inverse?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
16
|
+
onMouseDown?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
17
|
+
onMouseEnter?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
18
|
+
onMouseLeave?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}
|
|
21
|
+
declare const IconButton: React.FC<IconButtonProps>;
|
|
22
|
+
import IconButtonGroup from '../IconButtonGroup';
|
|
23
|
+
export { IconButtonGroup };
|
|
24
|
+
export default IconButton;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["prefixCls", "size", "customeIconSize", "disabled", "loading", "style", "className", "onMouseDown", "onClick", "onMouseEnter", "onMouseLeave"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { Theme, useStyleRegister } from '@ant-design/cssinjs';
|
|
7
|
+
import Icon from "../Icon";
|
|
8
|
+
import { cssClasses } from "../../constants";
|
|
9
|
+
import { noop } from "../../utils/noop";
|
|
10
|
+
import { designTokens, otherDesignTokens } from "./designTokens";
|
|
11
|
+
|
|
12
|
+
// 这种是另一方 定制 antd 的 style 的方式; 现在使用了上面的 designTokens.ts 的方式。
|
|
13
|
+
import "./style/index.less";
|
|
14
|
+
|
|
15
|
+
// 定义设计令牌类型
|
|
16
|
+
|
|
17
|
+
// 定义派生令牌类型
|
|
18
|
+
|
|
19
|
+
// 定义派生函数
|
|
20
|
+
var derivativeFunc = function derivativeFunc(token) {
|
|
21
|
+
return {
|
|
22
|
+
buttonColor: token.primaryColor,
|
|
23
|
+
buttonFontSize: token.fontSize * 1.2
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// 创建主题
|
|
28
|
+
var theme = new Theme(derivativeFunc);
|
|
29
|
+
var IconButton = function IconButton(props) {
|
|
30
|
+
var _props$prefixCls = props.prefixCls,
|
|
31
|
+
prefixCls = _props$prefixCls === void 0 ? cssClasses.PREFIX + '-icon-button' : _props$prefixCls,
|
|
32
|
+
_props$size = props.size,
|
|
33
|
+
size = _props$size === void 0 ? 'medium' : _props$size,
|
|
34
|
+
customeIconSize = props.customeIconSize,
|
|
35
|
+
_props$disabled = props.disabled,
|
|
36
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
37
|
+
_props$loading = props.loading,
|
|
38
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
39
|
+
style = props.style,
|
|
40
|
+
className = props.className,
|
|
41
|
+
_props$onMouseDown = props.onMouseDown,
|
|
42
|
+
onMouseDown = _props$onMouseDown === void 0 ? noop : _props$onMouseDown,
|
|
43
|
+
_props$onClick = props.onClick,
|
|
44
|
+
onClick = _props$onClick === void 0 ? noop : _props$onClick,
|
|
45
|
+
_props$onMouseEnter = props.onMouseEnter,
|
|
46
|
+
onMouseEnter = _props$onMouseEnter === void 0 ? noop : _props$onMouseEnter,
|
|
47
|
+
_props$onMouseLeave = props.onMouseLeave,
|
|
48
|
+
onMouseLeave = _props$onMouseLeave === void 0 ? noop : _props$onMouseLeave,
|
|
49
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
50
|
+
|
|
51
|
+
// 获取图标尺寸
|
|
52
|
+
var getIconSize = function getIconSize() {
|
|
53
|
+
if (size === 'medium') {
|
|
54
|
+
return designTokens.sizingIconButtonMedium;
|
|
55
|
+
} else if (size === 'small') {
|
|
56
|
+
return designTokens.sizingIconButtonSmall;
|
|
57
|
+
}
|
|
58
|
+
return designTokens.sizingIconButtonMedium;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// 处理点击事件
|
|
62
|
+
var handleClick = function handleClick(e) {
|
|
63
|
+
if (disabled || loading) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
onClick === null || onClick === void 0 || onClick(e);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// 使用 useStyleRegister 注册自定义样式
|
|
70
|
+
var useCustomIconButtonStyle = function useCustomIconButtonStyle() {
|
|
71
|
+
var iconSize = getIconSize();
|
|
72
|
+
var gap = size === 'medium' ? designTokens.spacingIconButtonHorizontalGap : designTokens.spacingIconButtonHorizontalGapSm;
|
|
73
|
+
var hashId = useStyleRegister({
|
|
74
|
+
theme: theme,
|
|
75
|
+
token: {},
|
|
76
|
+
path: [prefixCls]
|
|
77
|
+
}, function () {
|
|
78
|
+
return "\n .".concat(prefixCls, "-container {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n // width: ").concat(iconSize, "px;\n // height: ").concat(iconSize, "px;\n cursor: ").concat(disabled ? 'not-allowed' : 'pointer', ";\n opacity: ").concat(disabled ? 0.5 : 1, ";\n transition: ").concat(designTokens.transitionIconButton, ";\n }\n\n .").concat(prefixCls, "-medium {\n width: ").concat(designTokens.sizingIconButtonMedium, "px;\n height: ").concat(designTokens.sizingIconButtonMedium, "px;\n padding: ").concat(designTokens.spacingIconButtonPaddingHorizontal, "px ").concat(designTokens.spacingIconButtonPaddingVertical, "px;\n }\n\n .").concat(prefixCls, "-small {\n width: ").concat(designTokens.sizingIconButtonSmall, "px;\n height: ").concat(designTokens.sizingIconButtonSmall, "px;\n padding: ").concat(designTokens.spacingIconButtonPaddingHorizontalSm, "px ").concat(designTokens.spacingIconButtonPaddingVerticalSm, "px;\n }\n\n .").concat(prefixCls, "-container:hover {\n opacity: 0.8;\n color: ").concat(designTokens.colorIconButtonHover, ";\n }\n\n .").concat(prefixCls, "-container:active {\n opacity: 0.7;\n color: ").concat(designTokens.colorIconButtonActive, ";\n }\n\n .").concat(prefixCls, "-loading i {\n animation: loadingCircle 1s infinite linear;\n }\n\n .").concat(prefixCls, "-group {\n gap: ").concat(gap, "px;\n }\n\n .").concat(prefixCls, "-group .").concat(prefixCls, "-medium + .").concat(prefixCls, "-medium {\n padding-left: ").concat(designTokens.spacingIconButtonHorizontalGap, "px;\n }\n\n .").concat(prefixCls, "-group .").concat(prefixCls, "-small + .").concat(prefixCls, "-small {\n padding-left: ").concat(designTokens.spacingIconButtonHorizontalGapSm, "px;\n }\n ");
|
|
79
|
+
});
|
|
80
|
+
return hashId;
|
|
81
|
+
};
|
|
82
|
+
var hashId = useCustomIconButtonStyle();
|
|
83
|
+
var iconSize = getIconSize();
|
|
84
|
+
return /*#__PURE__*/_jsx("div", {
|
|
85
|
+
className: classNames("".concat(prefixCls, " ").concat(prefixCls, "-container ").concat(prefixCls, "-").concat(size, " ").concat(loading ? "".concat(prefixCls, "-loading") : ''), hashId, className),
|
|
86
|
+
style: style,
|
|
87
|
+
onClick: handleClick,
|
|
88
|
+
onMouseDown: onMouseDown,
|
|
89
|
+
onMouseEnter: onMouseEnter,
|
|
90
|
+
onMouseLeave: onMouseLeave,
|
|
91
|
+
children: /*#__PURE__*/_jsx(Icon, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
92
|
+
size: customeIconSize || iconSize,
|
|
93
|
+
style: _objectSpread({}, otherDesignTokens)
|
|
94
|
+
}))
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// 导入IconButtonGroup组件
|
|
99
|
+
import IconButtonGroup from "../IconButtonGroup";
|
|
100
|
+
|
|
101
|
+
// 导出组件
|
|
102
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
103
|
+
export { IconButtonGroup };
|
|
104
|
+
|
|
105
|
+
// 默认导出
|
|
106
|
+
export default IconButton;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
|
|
3
|
+
// 基础图标按钮样式
|
|
4
|
+
@components: icon-button;
|
|
5
|
+
|
|
6
|
+
// 使用字符串拼接
|
|
7
|
+
.@{prefix}-@{components} {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
vertical-align: middle; // 垂直居中
|
|
12
|
+
transition: all 0.3s;
|
|
13
|
+
user-select: none;
|
|
14
|
+
position: relative;
|
|
15
|
+
|
|
16
|
+
&:hover {
|
|
17
|
+
opacity: 0.8;
|
|
18
|
+
transform: scale(0.9);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:active {
|
|
22
|
+
opacity: 0.5;
|
|
23
|
+
transform: scale(0.9);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// 禁用状态
|
|
27
|
+
&[disabled],
|
|
28
|
+
&.@{prefix}-disabled {
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
opacity: 0.5;
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// 加载状态
|
|
35
|
+
&.@{prefix}-loading {
|
|
36
|
+
cursor: default;
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
|
|
39
|
+
i {
|
|
40
|
+
animation: loadingCircle 1s infinite linear;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@keyframes loadingCircle {
|
|
45
|
+
100% {
|
|
46
|
+
transform: rotate(360deg);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// 分组样式
|
|
51
|
+
&-group {
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
flex-direction: row;
|
|
55
|
+
flex-wrap: wrap;
|
|
56
|
+
justify-content: flex-start;
|
|
57
|
+
align-content: center;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IconButtonGroupProps {
|
|
3
|
+
prefixCls?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* IconButtonGroup 组件用于对图标按钮进行分组
|
|
10
|
+
* 分组间距:
|
|
11
|
+
* - 中等图标按钮:8px
|
|
12
|
+
* - 小图标按钮:16px
|
|
13
|
+
*/
|
|
14
|
+
declare const IconButtonGroup: React.FC<IconButtonGroupProps>;
|
|
15
|
+
export default IconButtonGroup;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { cssClasses } from "../../constants";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
/**
|
|
5
|
+
* IconButtonGroup 组件用于对图标按钮进行分组
|
|
6
|
+
* 分组间距:
|
|
7
|
+
* - 中等图标按钮:8px
|
|
8
|
+
* - 小图标按钮:16px
|
|
9
|
+
*/
|
|
10
|
+
var IconButtonGroup = function IconButtonGroup(props) {
|
|
11
|
+
var _props$prefixCls = props.prefixCls,
|
|
12
|
+
prefixCls = _props$prefixCls === void 0 ? cssClasses.PREFIX + '-icon-button-group' : _props$prefixCls,
|
|
13
|
+
className = props.className,
|
|
14
|
+
style = props.style,
|
|
15
|
+
children = props.children;
|
|
16
|
+
return /*#__PURE__*/_jsx("div", {
|
|
17
|
+
className: "".concat(prefixCls, " ").concat(cssClasses.PREFIX, "-icon-button-group ").concat(className || ''),
|
|
18
|
+
style: style,
|
|
19
|
+
children: children
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
export default IconButtonGroup;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type backImageRadio = 1 | 2 | 0.68;
|
|
3
|
+
export declare const BackImageEunm: Record<string, backImageRadio>;
|
|
4
|
+
export interface IImageProps {
|
|
5
|
+
src?: string;
|
|
6
|
+
radio?: backImageRadio;
|
|
7
|
+
imageSize?: number | string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const Image: (props: IImageProps) => React.JSX.Element;
|
|
12
|
+
export default Image;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["src", "style", "imageSize", "radio", "className"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { default as classNames } from 'classnames';
|
|
6
|
+
import { cssClasses } from "../../constants";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export var BackImageEunm = {
|
|
9
|
+
whRadio1: 1,
|
|
10
|
+
whRadio2: 2,
|
|
11
|
+
whRadio3: 0.68
|
|
12
|
+
};
|
|
13
|
+
var Image = function Image(props) {
|
|
14
|
+
var src = props.src,
|
|
15
|
+
style = props.style,
|
|
16
|
+
imageSize = props.imageSize,
|
|
17
|
+
_props$radio = props.radio,
|
|
18
|
+
radio = _props$radio === void 0 ? BackImageEunm.whRadio2 : _props$radio,
|
|
19
|
+
className = props.className,
|
|
20
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
21
|
+
var mergedStyle = imageSize ? _objectSpread({
|
|
22
|
+
width: imageSize,
|
|
23
|
+
height: 'auto',
|
|
24
|
+
aspectRatio: "".concat(radio),
|
|
25
|
+
objectFit: 'cover'
|
|
26
|
+
}, style) : _objectSpread({}, style);
|
|
27
|
+
return /*#__PURE__*/_jsx("img", _objectSpread({
|
|
28
|
+
className: classNames("".concat(cssClasses.PREFIX, "-image}"), className),
|
|
29
|
+
src: src,
|
|
30
|
+
style: mergedStyle
|
|
31
|
+
}, otherProps));
|
|
32
|
+
};
|
|
33
|
+
export default Image;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare const designTokens: {
|
|
2
|
+
sizingListItemIconImage: any;
|
|
3
|
+
sizingListItemIconIcon: any;
|
|
4
|
+
sizingListItemIconIconStatus: any;
|
|
5
|
+
sizingListItemImageImage: any;
|
|
6
|
+
sizingListItemImageIcon: any;
|
|
7
|
+
sizingListItemImageIconLg: any;
|
|
8
|
+
sizingListItemImageThumbnail: any;
|
|
9
|
+
sizingListItemIcon: any;
|
|
10
|
+
sizingListItemIconLg: any;
|
|
11
|
+
spacingListItemIconStatusPaddingRight: any;
|
|
12
|
+
spacingListItemIconPaddingLeft: any;
|
|
13
|
+
spacingListItemImagePaddingRight: any;
|
|
14
|
+
spacingListItemIconImagePaddingVertical: any;
|
|
15
|
+
spacingListItemIconImagePaddingHorizontal: any;
|
|
16
|
+
spacingListItemIconIconPaddingVertical: any;
|
|
17
|
+
spacingListItemIconIconPaddingHorizontal: any;
|
|
18
|
+
spacingListItemImageIconPaddingRight: any;
|
|
19
|
+
spacingListItemImagePointsPaddingTop: any;
|
|
20
|
+
colorListItemIconBackground: any;
|
|
21
|
+
colorListItemIconSubtle: any;
|
|
22
|
+
colorListItemIcon: any;
|
|
23
|
+
borderRadiusListItem: any;
|
|
24
|
+
colorListItemBackground: any;
|
|
25
|
+
spacingListItemTextPaddingHorizontal: any;
|
|
26
|
+
colorListItemTextTitle: any;
|
|
27
|
+
colorListItemTextSubtitle: any;
|
|
28
|
+
colorListItemTextPoints: any;
|
|
29
|
+
};
|
|
30
|
+
export default designTokens;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import TokenManager from "../../utils/tokenManager";
|
|
2
|
+
var designTokens = {
|
|
3
|
+
sizingListItemIconImage: TokenManager.tokenKey('sizingListItemIconImage'),
|
|
4
|
+
sizingListItemIconIcon: TokenManager.tokenKey('sizingListItemIconIcon'),
|
|
5
|
+
sizingListItemIconIconStatus: TokenManager.tokenKey('sizingListItemIconIconStatus'),
|
|
6
|
+
sizingListItemImageImage: TokenManager.tokenKey('sizingListItemImageImage'),
|
|
7
|
+
sizingListItemImageIcon: TokenManager.tokenKey('sizingListItemImageIcon'),
|
|
8
|
+
sizingListItemImageIconLg: TokenManager.tokenKey('sizingListItemImageIconLg'),
|
|
9
|
+
sizingListItemImageThumbnail: TokenManager.tokenKey('sizingListItemImageThumbnail'),
|
|
10
|
+
sizingListItemIcon: TokenManager.tokenKey('sizingListItemIcon'),
|
|
11
|
+
sizingListItemIconLg: TokenManager.tokenKey('sizingListItemIconLg'),
|
|
12
|
+
spacingListItemIconStatusPaddingRight: TokenManager.tokenKey('spacingListItemIconStatusPaddingRight'),
|
|
13
|
+
spacingListItemIconPaddingLeft: TokenManager.tokenKey('spacingListItemIconPaddingLeft'),
|
|
14
|
+
spacingListItemImagePaddingRight: TokenManager.tokenKey('spacingListItemImagePaddingRight'),
|
|
15
|
+
spacingListItemIconImagePaddingVertical: TokenManager.tokenKey('spacingListItemIconImagePaddingVertical'),
|
|
16
|
+
spacingListItemIconImagePaddingHorizontal: TokenManager.tokenKey('spacingListItemIconImagePaddingHorizontal'),
|
|
17
|
+
spacingListItemIconIconPaddingVertical: TokenManager.tokenKey('spacingListItemIconIconPaddingVertical'),
|
|
18
|
+
spacingListItemIconIconPaddingHorizontal: TokenManager.tokenKey('spacingListItemIconIconPaddingHorizontal'),
|
|
19
|
+
spacingListItemImageIconPaddingRight: TokenManager.tokenKey('spacingListItemImageIconPaddingRight'),
|
|
20
|
+
spacingListItemImagePointsPaddingTop: TokenManager.tokenKey('spacingListItemImagePointsPaddingTop'),
|
|
21
|
+
colorListItemIconBackground: TokenManager.tokenKey('colorListItemIconBackground'),
|
|
22
|
+
colorListItemIconSubtle: TokenManager.tokenKey('colorListItemIconSubtle'),
|
|
23
|
+
colorListItemIcon: TokenManager.tokenKey('colorListItemIcon'),
|
|
24
|
+
borderRadiusListItem: TokenManager.tokenKey('borderRadiusListItem'),
|
|
25
|
+
colorListItemBackground: TokenManager.tokenKey('colorListItemBackground'),
|
|
26
|
+
spacingListItemTextPaddingHorizontal: TokenManager.tokenKey('spacingListItemTextPaddingHorizontal'),
|
|
27
|
+
colorListItemTextTitle: TokenManager.tokenKey('colorListItemTextTitle'),
|
|
28
|
+
colorListItemTextSubtitle: TokenManager.tokenKey('colorListItemTextSubtitle'),
|
|
29
|
+
colorListItemTextPoints: TokenManager.tokenKey('colorListItemTextPoints')
|
|
30
|
+
};
|
|
31
|
+
export default designTokens;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style/index.less';
|
|
3
|
+
export declare const ListItemTypes: {
|
|
4
|
+
readonly ListItemIcon: "ListItemIcon";
|
|
5
|
+
readonly ListItemImage: "ListItemImage";
|
|
6
|
+
readonly ListItemOther: "ListItemOther";
|
|
7
|
+
};
|
|
8
|
+
export declare const TAPPABLE_AREAS: {
|
|
9
|
+
readonly ALL: "ALL";
|
|
10
|
+
readonly EXPECT_IMAGE: "EXPECT_IMAGE";
|
|
11
|
+
};
|
|
12
|
+
export declare const ListItemRightTypes: {
|
|
13
|
+
readonly Toggle: "Toggle";
|
|
14
|
+
readonly Link: "Link";
|
|
15
|
+
readonly Status: "Status";
|
|
16
|
+
readonly Default: "Default";
|
|
17
|
+
};
|
|
18
|
+
export type ListItemType = typeof ListItemTypes[keyof typeof ListItemTypes];
|
|
19
|
+
export type ListItemRightType = typeof ListItemRightTypes[keyof typeof ListItemRightTypes];
|
|
20
|
+
export type TappableAreaType = typeof TAPPABLE_AREAS[keyof typeof TAPPABLE_AREAS];
|
|
21
|
+
export interface IIconConfig {
|
|
22
|
+
iconStyle: React.CSSProperties;
|
|
23
|
+
iconName: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ISubIconValueConfig {
|
|
26
|
+
value: string;
|
|
27
|
+
iconName: string;
|
|
28
|
+
}
|
|
29
|
+
export interface IListItemProps {
|
|
30
|
+
listType: ListItemType;
|
|
31
|
+
leftIcon?: IIconConfig;
|
|
32
|
+
leftImageSrc?: string;
|
|
33
|
+
title: string;
|
|
34
|
+
subTitle?: string;
|
|
35
|
+
listItemRightType?: ListItemRightType;
|
|
36
|
+
showToggle?: boolean;
|
|
37
|
+
toggleChecked?: boolean;
|
|
38
|
+
onToggleChange?: (checked: boolean, event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
39
|
+
showLink?: boolean;
|
|
40
|
+
LinkName?: string;
|
|
41
|
+
onLinkClick?: () => void;
|
|
42
|
+
showStatus?: boolean;
|
|
43
|
+
statusIconName?: string;
|
|
44
|
+
statusIconColor?: string;
|
|
45
|
+
subTitleUp?: boolean;
|
|
46
|
+
tagName?: string;
|
|
47
|
+
showTag?: boolean;
|
|
48
|
+
subIconObj?: ISubIconValueConfig;
|
|
49
|
+
leftThumbnail?: string;
|
|
50
|
+
showRightBtn?: boolean;
|
|
51
|
+
onRightBtnClick?: () => void;
|
|
52
|
+
rightBtnTxt?: string;
|
|
53
|
+
showRightIcon?: boolean;
|
|
54
|
+
rightIconName?: string;
|
|
55
|
+
onRightIconClick?: () => void;
|
|
56
|
+
tappableArea?: TappableAreaType;
|
|
57
|
+
tappableAreaClick?: () => void;
|
|
58
|
+
}
|
|
59
|
+
declare const ListItem: React.FC<IListItemProps>;
|
|
60
|
+
export default ListItem;
|