@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,227 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["listType", "leftIcon", "leftImageSrc", "title", "subTitle", "onToggleChange", "toggleChecked", "showToggle", "showLink", "LinkName", "onLinkClick", "showStatus", "statusIconName", "statusIconColor", "subTitleUp", "tagName", "showTag", "subIconObj", "leftThumbnail", "showRightBtn", "onRightBtnClick", "rightBtnTxt", "showRightIcon", "rightIconName", "onRightIconClick", "tappableArea", "tappableAreaClick"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import designTokens from "./designTokens";
|
|
6
|
+
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
7
|
+
import { isEmpty } from 'lodash';
|
|
8
|
+
import { theme } from "../../utils/theme";
|
|
9
|
+
import { Icon, Image, Text, Toggle, TextLink, TextLinkEnum, Tag, BackImageEunm, Button } from "../index";
|
|
10
|
+
import { cssClasses } from "../../constants";
|
|
11
|
+
import "./style/index.less";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
export var ListItemTypes = {
|
|
14
|
+
ListItemIcon: 'ListItemIcon',
|
|
15
|
+
ListItemImage: 'ListItemImage',
|
|
16
|
+
ListItemOther: 'ListItemOther'
|
|
17
|
+
};
|
|
18
|
+
export var TAPPABLE_AREAS = {
|
|
19
|
+
ALL: 'ALL',
|
|
20
|
+
// 点击全部区域
|
|
21
|
+
EXPECT_IMAGE: 'EXPECT_IMAGE' // 除了坐车的图片区域
|
|
22
|
+
};
|
|
23
|
+
export var ListItemRightTypes = {
|
|
24
|
+
Toggle: 'Toggle',
|
|
25
|
+
Link: 'Link',
|
|
26
|
+
Status: 'Status',
|
|
27
|
+
Default: 'Default'
|
|
28
|
+
};
|
|
29
|
+
var ListItem = function ListItem(_ref) {
|
|
30
|
+
var listType = _ref.listType,
|
|
31
|
+
leftIcon = _ref.leftIcon,
|
|
32
|
+
leftImageSrc = _ref.leftImageSrc,
|
|
33
|
+
title = _ref.title,
|
|
34
|
+
subTitle = _ref.subTitle,
|
|
35
|
+
onToggleChange = _ref.onToggleChange,
|
|
36
|
+
toggleChecked = _ref.toggleChecked,
|
|
37
|
+
showToggle = _ref.showToggle,
|
|
38
|
+
showLink = _ref.showLink,
|
|
39
|
+
LinkName = _ref.LinkName,
|
|
40
|
+
onLinkClick = _ref.onLinkClick,
|
|
41
|
+
showStatus = _ref.showStatus,
|
|
42
|
+
_ref$statusIconName = _ref.statusIconName,
|
|
43
|
+
statusIconName = _ref$statusIconName === void 0 ? "icon-Attention" : _ref$statusIconName,
|
|
44
|
+
_ref$statusIconColor = _ref.statusIconColor,
|
|
45
|
+
statusIconColor = _ref$statusIconColor === void 0 ? "#BC1430" : _ref$statusIconColor,
|
|
46
|
+
_ref$subTitleUp = _ref.subTitleUp,
|
|
47
|
+
subTitleUp = _ref$subTitleUp === void 0 ? false : _ref$subTitleUp,
|
|
48
|
+
tagName = _ref.tagName,
|
|
49
|
+
_ref$showTag = _ref.showTag,
|
|
50
|
+
showTag = _ref$showTag === void 0 ? false : _ref$showTag,
|
|
51
|
+
subIconObj = _ref.subIconObj,
|
|
52
|
+
leftThumbnail = _ref.leftThumbnail,
|
|
53
|
+
_ref$showRightBtn = _ref.showRightBtn,
|
|
54
|
+
showRightBtn = _ref$showRightBtn === void 0 ? false : _ref$showRightBtn,
|
|
55
|
+
onRightBtnClick = _ref.onRightBtnClick,
|
|
56
|
+
rightBtnTxt = _ref.rightBtnTxt,
|
|
57
|
+
_ref$showRightIcon = _ref.showRightIcon,
|
|
58
|
+
showRightIcon = _ref$showRightIcon === void 0 ? false : _ref$showRightIcon,
|
|
59
|
+
rightIconName = _ref.rightIconName,
|
|
60
|
+
onRightIconClick = _ref.onRightIconClick,
|
|
61
|
+
tappableArea = _ref.tappableArea,
|
|
62
|
+
tappableAreaClick = _ref.tappableAreaClick,
|
|
63
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
64
|
+
var sizingListItemImageImage = designTokens.sizingListItemImageImage,
|
|
65
|
+
borderRadiusListItem = designTokens.borderRadiusListItem,
|
|
66
|
+
colorListItemBackground = designTokens.colorListItemBackground,
|
|
67
|
+
colorListItemIconBackground = designTokens.colorListItemIconBackground,
|
|
68
|
+
spacingListItemTextPaddingHorizontal = designTokens.spacingListItemTextPaddingHorizontal,
|
|
69
|
+
sizingListItemIconIcon = designTokens.sizingListItemIconIcon,
|
|
70
|
+
colorListItemTextTitle = designTokens.colorListItemTextTitle,
|
|
71
|
+
colorListItemTextSubtitle = designTokens.colorListItemTextSubtitle,
|
|
72
|
+
colorListItemIconSubtle = designTokens.colorListItemIconSubtle,
|
|
73
|
+
sizingListItemImageIcon = designTokens.sizingListItemImageIcon,
|
|
74
|
+
spacingListItemImageIconPaddingRight = designTokens.spacingListItemImageIconPaddingRight,
|
|
75
|
+
colorListItemTextPoints = designTokens.colorListItemTextPoints,
|
|
76
|
+
sizingListItemImageThumbnail = designTokens.sizingListItemImageThumbnail,
|
|
77
|
+
sizingListItemIconLg = designTokens.sizingListItemIconLg;
|
|
78
|
+
|
|
79
|
+
// console.log('designTokens', designTokens);
|
|
80
|
+
|
|
81
|
+
var useCustomButtonStyle = function useCustomButtonStyle() {
|
|
82
|
+
var hashId = useStyleRegister({
|
|
83
|
+
theme: theme,
|
|
84
|
+
token: {},
|
|
85
|
+
path: ["".concat(cssClasses.PREFIX, "-list-item ")]
|
|
86
|
+
}, function () {
|
|
87
|
+
return "\n .".concat(cssClasses.PREFIX, "-list-item {\n box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.12);\n border-radius: ").concat(borderRadiusListItem || 8, "px;\n background-color:").concat(colorListItemBackground || '#fff', ";\n &.noShadow{\n box-shadow:none !important;\n }\n .").concat(cssClasses.PREFIX, "-icon-container {\n background:").concat(colorListItemIconBackground || '#F5F5F8', ";\n margin-right:").concat(spacingListItemTextPaddingHorizontal, "px;\n }\n .").concat(cssClasses.PREFIX, "-image-container {\n margin-right:").concat(spacingListItemTextPaddingHorizontal, "px;\n }\n }\n .").concat(cssClasses.PREFIX, "-item-right {\n padding-right:").concat(spacingListItemTextPaddingHorizontal, "px;\n }\n .").concat(cssClasses.PREFIX, "-status-warp {\n padding-left: ").concat(spacingListItemTextPaddingHorizontal, "px;\n }\n .").concat(cssClasses.PREFIX, "-item-title {\n color:").concat(colorListItemTextTitle, ";\n }\n .").concat(cssClasses.PREFIX, "-item-subTitle {\n color:").concat(colorListItemTextSubtitle, ";\n }\n \n .").concat(cssClasses.PREFIX, "-sub-icon-title {\n color:").concat(colorListItemTextPoints, ";\n margin-left:").concat(spacingListItemImageIconPaddingRight, "px;\n }\n .").concat(cssClasses.PREFIX, "-right-btn {\n min-width:60px !important;\n }\n ");
|
|
88
|
+
});
|
|
89
|
+
return hashId;
|
|
90
|
+
};
|
|
91
|
+
useCustomButtonStyle();
|
|
92
|
+
var onAllClick = function onAllClick() {
|
|
93
|
+
if (tappableArea === TAPPABLE_AREAS.ALL && tappableAreaClick) {
|
|
94
|
+
tappableAreaClick();
|
|
95
|
+
}
|
|
96
|
+
;
|
|
97
|
+
};
|
|
98
|
+
var onExceptImgClick = function onExceptImgClick(e) {
|
|
99
|
+
if (tappableArea === TAPPABLE_AREAS.EXPECT_IMAGE && tappableAreaClick) {
|
|
100
|
+
e === null || e === void 0 || e.stopPropagation();
|
|
101
|
+
tappableAreaClick();
|
|
102
|
+
}
|
|
103
|
+
;
|
|
104
|
+
};
|
|
105
|
+
var onTextLinkClick = function onTextLinkClick(e) {
|
|
106
|
+
e === null || e === void 0 || e.stopPropagation();
|
|
107
|
+
if (onLinkClick) {
|
|
108
|
+
onLinkClick();
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
var onSwicthChange = function onSwicthChange(checked, event) {
|
|
112
|
+
event === null || event === void 0 || event.stopPropagation();
|
|
113
|
+
if (onToggleChange) {
|
|
114
|
+
onToggleChange(checked, event);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
118
|
+
className: "\n ".concat(cssClasses.PREFIX, "-list-item \n ").concat(listType === ListItemTypes.ListItemOther ? 'noShadow' : "", "\n ")
|
|
119
|
+
}, restProps), {}, {
|
|
120
|
+
onClick: onAllClick,
|
|
121
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
122
|
+
className: "\n ".concat(cssClasses.PREFIX, "-item-left \n "),
|
|
123
|
+
children: [listType === ListItemTypes.ListItemIcon && !isEmpty(leftIcon) && /*#__PURE__*/_jsx("div", {
|
|
124
|
+
className: "".concat(cssClasses.PREFIX, "-icon-container"),
|
|
125
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
126
|
+
name: leftIcon ? leftIcon.iconName : '',
|
|
127
|
+
size: sizingListItemIconIcon,
|
|
128
|
+
style: leftIcon ? leftIcon.iconStyle : {}
|
|
129
|
+
})
|
|
130
|
+
}), listType === ListItemTypes.ListItemImage && leftImageSrc && /*#__PURE__*/_jsxs("div", {
|
|
131
|
+
className: "".concat(cssClasses.PREFIX, "-image-container"),
|
|
132
|
+
children: [/*#__PURE__*/_jsx(Image, {
|
|
133
|
+
radio: 1,
|
|
134
|
+
src: leftImageSrc,
|
|
135
|
+
imageSize: sizingListItemImageImage || 104
|
|
136
|
+
}), showTag && /*#__PURE__*/_jsx(Tag, {
|
|
137
|
+
types: "red",
|
|
138
|
+
style: {
|
|
139
|
+
position: 'absolute',
|
|
140
|
+
bottom: 0,
|
|
141
|
+
left: 0,
|
|
142
|
+
right: 0,
|
|
143
|
+
justifyContent: 'center'
|
|
144
|
+
},
|
|
145
|
+
block: true,
|
|
146
|
+
children: tagName
|
|
147
|
+
})]
|
|
148
|
+
}), listType === ListItemTypes.ListItemOther && leftThumbnail && /*#__PURE__*/_jsx("div", {
|
|
149
|
+
className: "".concat(cssClasses.PREFIX, "-image-container"),
|
|
150
|
+
children: /*#__PURE__*/_jsx(Image, {
|
|
151
|
+
radio: BackImageEunm.whRadio1,
|
|
152
|
+
src: leftThumbnail,
|
|
153
|
+
imageSize: sizingListItemImageThumbnail || 56,
|
|
154
|
+
style: {
|
|
155
|
+
borderRadius: "".concat(borderRadiusListItem, "px"),
|
|
156
|
+
margin: '10px 0'
|
|
157
|
+
}
|
|
158
|
+
})
|
|
159
|
+
})]
|
|
160
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
161
|
+
className: "\n ".concat(cssClasses.PREFIX, "-item-right \n "),
|
|
162
|
+
onClick: onExceptImgClick,
|
|
163
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
164
|
+
className: "".concat(cssClasses.PREFIX, "-title-sub-warp"),
|
|
165
|
+
children: [subTitleUp && /*#__PURE__*/_jsx(Text, {
|
|
166
|
+
size: "ContentC12Regular",
|
|
167
|
+
className: "".concat(cssClasses.PREFIX, "-item-subTitle"),
|
|
168
|
+
children: subTitle
|
|
169
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
170
|
+
size: "ContentC14Bold",
|
|
171
|
+
className: "".concat(cssClasses.PREFIX, "-item-title \n ").concat(subTitle ? 'line1' : 'line2', " \n }"),
|
|
172
|
+
children: title
|
|
173
|
+
}), !subTitleUp && /*#__PURE__*/_jsx(Text, {
|
|
174
|
+
size: "ContentC12Regular",
|
|
175
|
+
className: "".concat(cssClasses.PREFIX, "-item-subTitle"),
|
|
176
|
+
children: subTitle
|
|
177
|
+
}), !isEmpty(subIconObj) && /*#__PURE__*/_jsxs("div", {
|
|
178
|
+
className: "".concat(cssClasses.PREFIX, "-sub-icon"),
|
|
179
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
180
|
+
name: subIconObj.iconName,
|
|
181
|
+
color: colorListItemIconSubtle,
|
|
182
|
+
size: sizingListItemImageIcon || 20
|
|
183
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
184
|
+
size: "ContentC12Regular",
|
|
185
|
+
className: "".concat(cssClasses.PREFIX, "-sub-icon-title"),
|
|
186
|
+
children: subIconObj.value
|
|
187
|
+
})]
|
|
188
|
+
})]
|
|
189
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
190
|
+
className: "".concat(cssClasses.PREFIX, "-status-warp"),
|
|
191
|
+
children: [showToggle && /*#__PURE__*/_jsx(Toggle, {
|
|
192
|
+
size: "small",
|
|
193
|
+
checked: toggleChecked,
|
|
194
|
+
onChange: onSwicthChange
|
|
195
|
+
}), showLink && /*#__PURE__*/_jsx(TextLink, {
|
|
196
|
+
className: "".concat(cssClasses.PREFIX, "-right-link"),
|
|
197
|
+
type: TextLinkEnum.default,
|
|
198
|
+
text: LinkName,
|
|
199
|
+
onClick: onTextLinkClick
|
|
200
|
+
}), showStatus && /*#__PURE__*/_jsx(Icon, {
|
|
201
|
+
name: statusIconName || '',
|
|
202
|
+
size: sizingListItemIconIcon,
|
|
203
|
+
color: statusIconColor
|
|
204
|
+
}), showRightBtn && /*#__PURE__*/_jsx(Button, {
|
|
205
|
+
className: "".concat(cssClasses.PREFIX, "-right-btn"),
|
|
206
|
+
onClick: function onClick(e) {
|
|
207
|
+
e.stopPropagation();
|
|
208
|
+
if (onRightBtnClick) {
|
|
209
|
+
onRightBtnClick();
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
children: rightBtnTxt
|
|
213
|
+
}), showRightIcon && /*#__PURE__*/_jsx(Icon, {
|
|
214
|
+
name: rightIconName || '',
|
|
215
|
+
size: sizingListItemIconLg,
|
|
216
|
+
onClick: function onClick(e) {
|
|
217
|
+
e.stopPropagation();
|
|
218
|
+
if (onRightIconClick) {
|
|
219
|
+
onRightIconClick();
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
})]
|
|
223
|
+
})]
|
|
224
|
+
})]
|
|
225
|
+
}));
|
|
226
|
+
};
|
|
227
|
+
export default ListItem;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
|
|
3
|
+
.@{prefix}-list-item {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
align-items: center;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
|
|
9
|
+
.@{prefix}-item-left {
|
|
10
|
+
|
|
11
|
+
.@{prefix}-icon-container {
|
|
12
|
+
width: 80px;
|
|
13
|
+
height: 80px;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
flex-shrink: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.@{prefix}-image-container {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
position: relative;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.@{prefix}-item-right {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex: 1;
|
|
33
|
+
min-width: 0;
|
|
34
|
+
flex-direction: row;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: space-between;
|
|
37
|
+
|
|
38
|
+
.@{prefix}-title-sub-warp {
|
|
39
|
+
flex: 1;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
|
|
42
|
+
.@{prefix}-item-title {
|
|
43
|
+
display: block;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
text-overflow: ellipsis;
|
|
46
|
+
-webkit-box-orient: vertical;
|
|
47
|
+
|
|
48
|
+
&.line1 {
|
|
49
|
+
display: -webkit-box;
|
|
50
|
+
-webkit-line-clamp: 1;
|
|
51
|
+
-webkit-box-orient: vertical;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.line2 {
|
|
56
|
+
display: -webkit-box;
|
|
57
|
+
-webkit-line-clamp: 2;
|
|
58
|
+
-webkit-box-orient: vertical;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.@{prefix}-item-subTitle {
|
|
64
|
+
display: block;
|
|
65
|
+
white-space: nowrap;
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
text-overflow: ellipsis;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.@{prefix}-sub-icon {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../../../style/variables.less';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const designTokens: {
|
|
2
|
+
borderRadiusLG: any;
|
|
3
|
+
titleColor: any;
|
|
4
|
+
contentBg: any;
|
|
5
|
+
headerBg: any;
|
|
6
|
+
colorText: any;
|
|
7
|
+
colorBgMask: any;
|
|
8
|
+
};
|
|
9
|
+
declare const otherDesignTokens: {
|
|
10
|
+
width: string;
|
|
11
|
+
spacingModalCardPaddingTop: any;
|
|
12
|
+
spacingModalButtonStickyPaddingVertical: any;
|
|
13
|
+
spacingModalCardVerticalGap: any;
|
|
14
|
+
spacingModalCardPaddingHorizontal: any;
|
|
15
|
+
};
|
|
16
|
+
declare const commonToken: {
|
|
17
|
+
[x: string]: string | number;
|
|
18
|
+
};
|
|
19
|
+
declare const styleToken: {
|
|
20
|
+
[x: string]: string | number;
|
|
21
|
+
};
|
|
22
|
+
declare const stickyFooterStyleToken: {
|
|
23
|
+
[x: string]: string | number;
|
|
24
|
+
};
|
|
25
|
+
declare const stickyHeaderFooterStyleToken: {
|
|
26
|
+
[x: string]: string | number;
|
|
27
|
+
};
|
|
28
|
+
declare const stickyHeaderStyleToken: {
|
|
29
|
+
[x: string]: string | number;
|
|
30
|
+
};
|
|
31
|
+
export { designTokens, otherDesignTokens, styleToken, stickyFooterStyleToken, stickyHeaderStyleToken, stickyHeaderFooterStyleToken, commonToken };
|
|
@@ -0,0 +1,35 @@
|
|
|
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 + '-modal';
|
|
5
|
+
var designTokens = {
|
|
6
|
+
borderRadiusLG: getToken('borderRadiusModal'),
|
|
7
|
+
// 圆角
|
|
8
|
+
titleColor: getToken('colorModalTextHeader'),
|
|
9
|
+
// header文本颜色
|
|
10
|
+
contentBg: getToken('colorModalBackground'),
|
|
11
|
+
// 背景
|
|
12
|
+
headerBg: getToken('colorModalBackground'),
|
|
13
|
+
// 背景
|
|
14
|
+
colorText: getToken('colorModalTextBody'),
|
|
15
|
+
// 内容文本颜色
|
|
16
|
+
colorBgMask: getToken('colorModalOverlay') // 遮罩颜色
|
|
17
|
+
};
|
|
18
|
+
var otherDesignTokens = {
|
|
19
|
+
width: "calc(100vw - ".concat(getToken('spacingModalPaddingHorizontal'), "px - ").concat(getToken('spacingModalPaddingHorizontal'), "px)"),
|
|
20
|
+
// 宽度
|
|
21
|
+
spacingModalCardPaddingTop: getToken('spacingModalCardPaddingTop'),
|
|
22
|
+
spacingModalButtonStickyPaddingVertical: getToken('spacingModalButtonStickyPaddingVertical'),
|
|
23
|
+
spacingModalCardVerticalGap: getToken('spacingModalCardVerticalGap'),
|
|
24
|
+
spacingModalCardPaddingHorizontal: getToken('spacingModalCardPaddingHorizontal')
|
|
25
|
+
};
|
|
26
|
+
var commonToken = _defineProperty(_defineProperty({}, "--".concat(prefixCls, "-footer-margin-top"), 0), "--".concat(prefixCls, "-footer-padding"), "".concat(getToken('spacingModalButtonPaddingTop'), "px 0 0"));
|
|
27
|
+
// header content footer都随滚动条滚
|
|
28
|
+
var styleToken = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "--".concat(prefixCls, "-content-padding"), "".concat(otherDesignTokens.spacingModalCardPaddingTop, "px ").concat(otherDesignTokens.spacingModalCardPaddingHorizontal, "px ").concat(getToken('spacingModalCardPaddingBottom'), "px ").concat(otherDesignTokens.spacingModalCardPaddingHorizontal, "px")), "--".concat(prefixCls, "-footer-border-top"), 'none'), "--".concat(prefixCls, "-footer-padding"), 0), "--".concat(prefixCls, "-body-padding"), "".concat(otherDesignTokens.spacingModalCardVerticalGap, "px 0")), "--".concat(prefixCls, "-header-margin-bottom"), 0);
|
|
29
|
+
// header content都随滚动条滚, footer不滚
|
|
30
|
+
var stickyFooterStyleToken = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "--".concat(prefixCls, "-content-padding"), "".concat(otherDesignTokens.spacingModalCardPaddingTop, "px ").concat(otherDesignTokens.spacingModalCardPaddingHorizontal, "px ").concat(40 + getToken('spacingModalButtonStickyPaddingVertical') + getToken('spacingModalButtonStickyPaddingHorizontal'), "px ").concat(otherDesignTokens.spacingModalCardPaddingHorizontal, "px")), "--".concat(prefixCls, "-footer-padding"), "".concat(otherDesignTokens.spacingModalButtonStickyPaddingVertical, "px ").concat(getToken('spacingModalButtonStickyPaddingHorizontal'), "px")), "--".concat(prefixCls, "-footer-border-top"), '1px solid #E1E1E1'), "--".concat(prefixCls, "-body-padding"), "".concat(otherDesignTokens.spacingModalCardVerticalGap, "px 0")), "--".concat(prefixCls, "-header-margin-bottom"), 0);
|
|
31
|
+
// content随滚动条滚, header和footer不滚
|
|
32
|
+
var stickyHeaderFooterStyleToken = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "--".concat(prefixCls, "-content-padding"), "".concat(otherDesignTokens.spacingModalCardPaddingTop, "px ").concat(otherDesignTokens.spacingModalCardPaddingHorizontal, "px ").concat(40 + getToken('spacingModalButtonStickyPaddingVertical') + getToken('spacingModalButtonStickyPaddingHorizontal'), "px ").concat(otherDesignTokens.spacingModalCardPaddingHorizontal, "px")), "--".concat(prefixCls, "-footer-padding"), "".concat(otherDesignTokens.spacingModalButtonStickyPaddingVertical, "px ").concat(getToken('spacingModalButtonStickyPaddingHorizontal'), "px")), "--".concat(prefixCls, "-footer-border-top"), '1px solid #E1E1E1'), "--".concat(prefixCls, "-body-padding"), 0), "--".concat(prefixCls, "-header-margin-bottom"), "".concat(otherDesignTokens.spacingModalCardVerticalGap, "px"));
|
|
33
|
+
// content和footer随滚动条滚, header不滚
|
|
34
|
+
var stickyHeaderStyleToken = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "--".concat(prefixCls, "-content-padding"), "0 ".concat(otherDesignTokens.spacingModalCardPaddingHorizontal, "px ").concat(getToken('spacingModalCardPaddingBottom'), "px ").concat(otherDesignTokens.spacingModalCardPaddingHorizontal, "px")), "--".concat(prefixCls, "-footer-padding"), "".concat(otherDesignTokens.spacingModalCardVerticalGap, "px 0 0")), "--".concat(prefixCls, "-footer-border-top"), 'none'), "--".concat(prefixCls, "-body-padding"), "".concat(otherDesignTokens.spacingModalCardPaddingTop * 2 + 26, "px 0 0 0")), "--".concat(prefixCls, "-header-margin-bottom"), 0), "--".concat(prefixCls, "-header-padding"), "".concat(otherDesignTokens.spacingModalCardPaddingTop, "px ").concat(otherDesignTokens.spacingModalCardPaddingHorizontal, "px"));
|
|
35
|
+
export { designTokens, otherDesignTokens, styleToken, stickyFooterStyleToken, stickyHeaderStyleToken, stickyHeaderFooterStyleToken, commonToken };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style/index.less';
|
|
3
|
+
export type ModalType = 'default' | 'stickyFooter' | 'stickyHeader' | 'stickyHeaderFooter';
|
|
4
|
+
export type ModalSize = '50%' | '66%';
|
|
5
|
+
export interface ModalProps {
|
|
6
|
+
type?: ModalType;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
theme?: string;
|
|
9
|
+
size?: ModalSize;
|
|
10
|
+
footerAlign?: 'left' | 'center' | 'right';
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
declare const Modal: (props: ModalProps) => React.JSX.Element;
|
|
14
|
+
export default Modal;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import "antd/es/config-provider/style";
|
|
2
|
+
import _ConfigProvider from "antd/es/config-provider";
|
|
3
|
+
import "antd/es/modal/style";
|
|
4
|
+
import _Modal from "antd/es/modal";
|
|
5
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
7
|
+
var _excluded = ["title", "style", "children", "type", "breakpoint", "size", "prefix", "footerAlign", "footer"];
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
10
|
+
import { theme } from "../../utils/theme";
|
|
11
|
+
import { cssClasses } from "../../constants";
|
|
12
|
+
import { designTokens, otherDesignTokens, stickyFooterStyleToken, styleToken, stickyHeaderStyleToken, stickyHeaderFooterStyleToken, commonToken } from "./designTokens";
|
|
13
|
+
import Text from "../Text";
|
|
14
|
+
import "./style/index.less";
|
|
15
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
|
+
var Modal = function Modal(props) {
|
|
17
|
+
var title = props.title,
|
|
18
|
+
style = props.style,
|
|
19
|
+
children = props.children,
|
|
20
|
+
_props$type = props.type,
|
|
21
|
+
type = _props$type === void 0 ? 'default' : _props$type,
|
|
22
|
+
_props$breakpoint = props.breakpoint,
|
|
23
|
+
breakpoint = _props$breakpoint === void 0 ? 'mobile' : _props$breakpoint,
|
|
24
|
+
_props$size = props.size,
|
|
25
|
+
size = _props$size === void 0 ? '50%' : _props$size,
|
|
26
|
+
_props$prefix = props.prefix,
|
|
27
|
+
prefix = _props$prefix === void 0 ? "".concat(cssClasses.PREFIX, "-modal") : _props$prefix,
|
|
28
|
+
_props$footerAlign = props.footerAlign,
|
|
29
|
+
footerAlign = _props$footerAlign === void 0 ? 'right' : _props$footerAlign,
|
|
30
|
+
_props$footer = props.footer,
|
|
31
|
+
footer = _props$footer === void 0 ? null : _props$footer,
|
|
32
|
+
attr = _objectWithoutProperties(props, _excluded);
|
|
33
|
+
var spacingModalCardPaddingTop = otherDesignTokens.spacingModalCardPaddingTop,
|
|
34
|
+
spacingModalButtonStickyPaddingVertical = otherDesignTokens.spacingModalButtonStickyPaddingVertical;
|
|
35
|
+
var useCustomButtonStyle = function useCustomButtonStyle() {
|
|
36
|
+
var hashId = useStyleRegister({
|
|
37
|
+
theme: theme,
|
|
38
|
+
token: {
|
|
39
|
+
baseColor: 'blue'
|
|
40
|
+
},
|
|
41
|
+
path: ["".concat(prefix)]
|
|
42
|
+
}, function () {
|
|
43
|
+
return "\n .".concat(prefix, "-sticky-headers .").concat(prefix, "-header {\n }\n .").concat(prefix, "-sticky-header.").concat(prefix, "-sticky-footer .").concat(prefix, "-body {\n overflow-y: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n max-height: calc(80vh - ").concat(spacingModalCardPaddingTop * 2, "px - 26px - ").concat(spacingModalButtonStickyPaddingVertical * 2, "px - 40px - 16px);\n }\n .").concat(prefix, "-sticky-header.").concat(prefix, "-sticky-footer .").concat(prefix, "-body::-webkit-scrollbar {\n display: none;\n }\n .").concat(prefix, "-left .").concat(prefix, "-footer {\n text-align: left;\n }\n .").concat(prefix, "-right .").concat(prefix, "-footer {\n text-align: right;\n }\n .").concat(prefix, "-center .").concat(prefix, "-footer {\n text-align: center;\n }\n ");
|
|
44
|
+
});
|
|
45
|
+
return hashId;
|
|
46
|
+
};
|
|
47
|
+
useCustomButtonStyle();
|
|
48
|
+
// sticky footer固定在底部,不随内容滚动条动
|
|
49
|
+
var commonStyle = _objectSpread({}, commonToken);
|
|
50
|
+
|
|
51
|
+
// sticky footer固定在底部,不随内容滚动条动
|
|
52
|
+
var getStyle = function getStyle() {
|
|
53
|
+
switch (type) {
|
|
54
|
+
case 'stickyHeaderFooter':
|
|
55
|
+
return stickyHeaderFooterStyleToken;
|
|
56
|
+
case 'stickyHeader':
|
|
57
|
+
return stickyHeaderStyleToken;
|
|
58
|
+
case 'stickyFooter':
|
|
59
|
+
return stickyFooterStyleToken;
|
|
60
|
+
default:
|
|
61
|
+
return styleToken;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var customStyle = _objectSpread({}, getStyle());
|
|
65
|
+
var stickyHeaderClass = type === 'stickyHeader' ? "".concat(prefix, "-sticky-headers") : '';
|
|
66
|
+
var stickyFooterClass = type === 'stickyFooter' ? "".concat(prefix, "-sticky-footer") : '';
|
|
67
|
+
var stickyHeaderFooterClass = type === 'stickyHeaderFooter' ? "".concat(prefix, "-sticky-footer ").concat(prefix, "-sticky-header") : '';
|
|
68
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
69
|
+
children: /*#__PURE__*/_jsx(_ConfigProvider, {
|
|
70
|
+
wave: {
|
|
71
|
+
disabled: true
|
|
72
|
+
},
|
|
73
|
+
prefixCls: cssClasses.PREFIX,
|
|
74
|
+
theme: {
|
|
75
|
+
components: {
|
|
76
|
+
Modal: _objectSpread({}, designTokens)
|
|
77
|
+
},
|
|
78
|
+
cssVar: true,
|
|
79
|
+
hashed: false
|
|
80
|
+
},
|
|
81
|
+
children: /*#__PURE__*/_jsx(_Modal, _objectSpread(_objectSpread({
|
|
82
|
+
width: breakpoint === 'desktop' ? size : otherDesignTokens.width,
|
|
83
|
+
title: /*#__PURE__*/_jsx(Text, {
|
|
84
|
+
size: "TitleT21Bold",
|
|
85
|
+
children: title
|
|
86
|
+
}),
|
|
87
|
+
style: _objectSpread(_objectSpread(_objectSpread({
|
|
88
|
+
top: '10%'
|
|
89
|
+
}, commonStyle), customStyle), style),
|
|
90
|
+
footer: footer,
|
|
91
|
+
className: "".concat(stickyFooterClass, " ").concat(prefix, "-").concat(breakpoint, " ").concat(prefix, "-").concat(footerAlign, " ").concat(stickyHeaderClass, " ").concat(stickyHeaderFooterClass)
|
|
92
|
+
}, attr), {}, {
|
|
93
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
94
|
+
size: "ContentC14Regular",
|
|
95
|
+
children: children
|
|
96
|
+
})
|
|
97
|
+
}))
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
export default Modal;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
|
|
3
|
+
// 基础按钮样式
|
|
4
|
+
@components: modal;
|
|
5
|
+
|
|
6
|
+
// 使用字符串拼接
|
|
7
|
+
.@{prefix}-@{components} {
|
|
8
|
+
&::after {
|
|
9
|
+
content: '';
|
|
10
|
+
position: absolute;
|
|
11
|
+
left: 0;
|
|
12
|
+
bottom: var( ~"--@{prefix}-padding-lg");
|
|
13
|
+
display: block;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 64px;
|
|
16
|
+
background: linear-gradient(#F7F7F700, #F7F7F7);
|
|
17
|
+
border-bottom-right-radius: var( ~"--@{prefix}-border-radius-lg");
|
|
18
|
+
border-bottom-left-radius: var( ~"--@{prefix}-border-radius-lg");
|
|
19
|
+
z-index: 1;
|
|
20
|
+
}
|
|
21
|
+
&::before {
|
|
22
|
+
content: '';
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: 0;
|
|
25
|
+
top: 0;
|
|
26
|
+
display: block;
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 24px;
|
|
29
|
+
background: linear-gradient(#F7F7F7, #F7F7F700);
|
|
30
|
+
border-top-right-radius: var( ~"--@{prefix}-border-radius-lg");
|
|
31
|
+
border-top-left-radius: var( ~"--@{prefix}-border-radius-lg");
|
|
32
|
+
z-index: 1;
|
|
33
|
+
}
|
|
34
|
+
.@{prefix}-@{components}-content {
|
|
35
|
+
position: static;
|
|
36
|
+
max-height: 80vh;
|
|
37
|
+
overflow-y: auto;
|
|
38
|
+
-ms-overflow-style: none;
|
|
39
|
+
/* IE 和 Edge */
|
|
40
|
+
scrollbar-width: none;
|
|
41
|
+
&::-webkit-scrollbar {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
44
|
+
/* Firefox */
|
|
45
|
+
}
|
|
46
|
+
.@{prefix}-@{components}-footer {
|
|
47
|
+
position: relative;
|
|
48
|
+
z-index: 2;
|
|
49
|
+
}
|
|
50
|
+
&.@{prefix}-@{components}-sticky-footer {
|
|
51
|
+
.@{prefix}-@{components}-content {
|
|
52
|
+
&::after {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
.@{prefix}-@{components}-footer {
|
|
57
|
+
position: absolute;
|
|
58
|
+
bottom: 0;
|
|
59
|
+
left: 0;
|
|
60
|
+
width: 100%;
|
|
61
|
+
background: #fff;
|
|
62
|
+
border-bottom-right-radius: var( ~"--@{prefix}-border-radius-lg");
|
|
63
|
+
border-bottom-left-radius: var( ~"--@{prefix}-border-radius-lg");
|
|
64
|
+
text-align: center;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
&.@{prefix}-@{components}-desktop.@{prefix}-@{components}-sticky-footer .@{prefix}-button {
|
|
68
|
+
min-width: 290px;
|
|
69
|
+
}
|
|
70
|
+
&.@{prefix}-@{components}-mobile {
|
|
71
|
+
.@{prefix}-button {
|
|
72
|
+
min-width: 100%;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&.@{prefix}-@{components}-sticky-headers {
|
|
77
|
+
.@{prefix}-@{components}-content {
|
|
78
|
+
&::after {
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
.@{prefix}-@{components}-header {
|
|
83
|
+
position: absolute;
|
|
84
|
+
top: 0;
|
|
85
|
+
left: 0;
|
|
86
|
+
width: 100%;
|
|
87
|
+
background: #fff;
|
|
88
|
+
border-top-right-radius: var( ~"--@{prefix}-border-radius-lg");
|
|
89
|
+
border-top-left-radius: var( ~"--@{prefix}-border-radius-lg");
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const designTokens: {
|
|
2
|
+
spacingTopNavigationPaddingHorizontal: any;
|
|
3
|
+
spacingTopNavigationPaddingBottom: any;
|
|
4
|
+
spacingTopNavigationHorizontalGap: any;
|
|
5
|
+
spacingTopNavigationIconButtonHorizontalGap: any;
|
|
6
|
+
spacingTopNavigationTextLinkPaddingRight: any;
|
|
7
|
+
spacingTopNavigationTitlePaddingVertical: any;
|
|
8
|
+
colorTopNavigationTitleStandard: any;
|
|
9
|
+
colorTopNavigationTitleInverse: any;
|
|
10
|
+
colorTopNavigationGradient: any;
|
|
11
|
+
colorTopNavigationBackground: any;
|
|
12
|
+
colorTopNavigationBorderBottom: any;
|
|
13
|
+
colorTopNavigationBackgroundHaze: any;
|
|
14
|
+
colorTopNavigationBackgroundInverse: any;
|
|
15
|
+
};
|
|
16
|
+
export default designTokens;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import TokenManager from "../../utils/tokenManager";
|
|
2
|
+
var designTokens = {
|
|
3
|
+
spacingTopNavigationPaddingHorizontal: TokenManager.tokenKey('spacingTopNavigationPaddingHorizontal'),
|
|
4
|
+
// 左右padding
|
|
5
|
+
spacingTopNavigationPaddingBottom: TokenManager.tokenKey('spacingTopNavigationPaddingBottom'),
|
|
6
|
+
//底部padding
|
|
7
|
+
spacingTopNavigationHorizontalGap: TokenManager.tokenKey('spacingTopNavigationHorizontalGap'),
|
|
8
|
+
spacingTopNavigationIconButtonHorizontalGap: TokenManager.tokenKey('spacingTopNavigationIconButtonHorizontalGap'),
|
|
9
|
+
spacingTopNavigationTextLinkPaddingRight: TokenManager.tokenKey('spacingTopNavigationTextLinkPaddingRight'),
|
|
10
|
+
spacingTopNavigationTitlePaddingVertical: TokenManager.tokenKey('spacingTopNavigationTitlePaddingVertical'),
|
|
11
|
+
colorTopNavigationTitleStandard: TokenManager.tokenKey('colorTopNavigationTitleStandard'),
|
|
12
|
+
colorTopNavigationTitleInverse: TokenManager.tokenKey('colorTopNavigationTitleInverse'),
|
|
13
|
+
colorTopNavigationGradient: TokenManager.tokenKey('colorTopNavigationGradient'),
|
|
14
|
+
colorTopNavigationBackground: TokenManager.tokenKey('colorTopNavigationBackground'),
|
|
15
|
+
colorTopNavigationBorderBottom: TokenManager.tokenKey('colorTopNavigationBorderBottom'),
|
|
16
|
+
colorTopNavigationBackgroundHaze: TokenManager.tokenKey('colorTopNavigationBackgroundHaze'),
|
|
17
|
+
colorTopNavigationBackgroundInverse: TokenManager.tokenKey('colorTopNavigationBackgroundInverse')
|
|
18
|
+
};
|
|
19
|
+
export default designTokens;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style/index.less';
|
|
3
|
+
export interface RightIcon {
|
|
4
|
+
iconName: string;
|
|
5
|
+
onIconClick: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface RightLinkConfig {
|
|
8
|
+
linkText: string;
|
|
9
|
+
onLinkClick: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface TitleIconBadgeConfig {
|
|
12
|
+
iconName: string;
|
|
13
|
+
title: string;
|
|
14
|
+
badge: string | number;
|
|
15
|
+
}
|
|
16
|
+
export interface INavigationProps {
|
|
17
|
+
rightIcons?: RightIcon[];
|
|
18
|
+
leftIconName?: string;
|
|
19
|
+
imgBackground?: boolean;
|
|
20
|
+
rightLink?: RightLinkConfig;
|
|
21
|
+
titleIconBadge?: TitleIconBadgeConfig;
|
|
22
|
+
title?: string;
|
|
23
|
+
hideBorder?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
goBack?: () => void;
|
|
26
|
+
isInverse?: boolean;
|
|
27
|
+
noRight?: boolean;
|
|
28
|
+
leftIconSize?: string | number;
|
|
29
|
+
}
|
|
30
|
+
declare const Navigation: React.FC<INavigationProps>;
|
|
31
|
+
export default Navigation;
|