@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,111 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __objRest = (source, exclude) => {
|
|
25
|
+
var target = {};
|
|
26
|
+
for (var prop in source)
|
|
27
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
if (source != null && __getOwnPropSymbols)
|
|
30
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
+
target[prop] = source[prop];
|
|
33
|
+
}
|
|
34
|
+
return target;
|
|
35
|
+
};
|
|
36
|
+
var __export = (target, all) => {
|
|
37
|
+
for (var name in all)
|
|
38
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
39
|
+
};
|
|
40
|
+
var __copyProps = (to, from, except, desc) => {
|
|
41
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
42
|
+
for (let key of __getOwnPropNames(from))
|
|
43
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
44
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
45
|
+
}
|
|
46
|
+
return to;
|
|
47
|
+
};
|
|
48
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
49
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
50
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
51
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
52
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
53
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
54
|
+
mod
|
|
55
|
+
));
|
|
56
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
57
|
+
|
|
58
|
+
// src/components/Divider/index.tsx
|
|
59
|
+
var Divider_exports = {};
|
|
60
|
+
__export(Divider_exports, {
|
|
61
|
+
default: () => Divider
|
|
62
|
+
});
|
|
63
|
+
module.exports = __toCommonJS(Divider_exports);
|
|
64
|
+
var import_react = __toESM(require("react"));
|
|
65
|
+
var import_classnames = __toESM(require("classnames"));
|
|
66
|
+
var import_tokenManager = __toESM(require("../../utils/tokenManager"));
|
|
67
|
+
var import_constants = require("../../constants");
|
|
68
|
+
var import_style = require("./style/index.less");
|
|
69
|
+
var Divider = class extends import_react.PureComponent {
|
|
70
|
+
render() {
|
|
71
|
+
const _a = this.props, {
|
|
72
|
+
children,
|
|
73
|
+
className,
|
|
74
|
+
prefixCls,
|
|
75
|
+
type,
|
|
76
|
+
style,
|
|
77
|
+
height
|
|
78
|
+
} = _a, attr = __objRest(_a, [
|
|
79
|
+
"children",
|
|
80
|
+
"className",
|
|
81
|
+
"prefixCls",
|
|
82
|
+
"type",
|
|
83
|
+
"style",
|
|
84
|
+
"height"
|
|
85
|
+
]);
|
|
86
|
+
const baseProps = {
|
|
87
|
+
className: (0, import_classnames.default)(
|
|
88
|
+
prefixCls,
|
|
89
|
+
{
|
|
90
|
+
[`${prefixCls}-type-${type}`]: type
|
|
91
|
+
},
|
|
92
|
+
className
|
|
93
|
+
)
|
|
94
|
+
};
|
|
95
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
96
|
+
"div",
|
|
97
|
+
__spreadProps(__spreadValues(__spreadValues({}, baseProps), attr), {
|
|
98
|
+
style: __spreadProps(__spreadValues({
|
|
99
|
+
height
|
|
100
|
+
}, style), {
|
|
101
|
+
borderColor: import_tokenManager.default.tokenKey("colorDivider10Horizontal")
|
|
102
|
+
})
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ import_react.default.createElement("div", null, children)
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
Divider.defaultProps = {
|
|
109
|
+
type: "solid",
|
|
110
|
+
prefixCls: import_constants.cssClasses.PREFIX + "-divider"
|
|
111
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
|
|
2
|
+
@import './variables.less';
|
|
3
|
+
|
|
4
|
+
@components: divider;
|
|
5
|
+
.@{prefix}-@{components} {
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.@{prefix}-@{components}-type-solid {
|
|
10
|
+
border-bottom: 1px solid #BFBFC7;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.@{prefix}-@{components}-type-dashed {
|
|
14
|
+
border-bottom: 1px dashed #E6E6E6;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.@{prefix}-@{components}-type-eight {
|
|
18
|
+
border-bottom: 8px solid #F5F5F8;
|
|
19
|
+
}
|
|
20
|
+
.@{prefix}-@{components}-type-whiteBg {
|
|
21
|
+
position: relative;
|
|
22
|
+
padding-top: 8px;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
&::before,
|
|
25
|
+
&::after {
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 0;
|
|
28
|
+
display: block;
|
|
29
|
+
content: '';
|
|
30
|
+
width: 16px;
|
|
31
|
+
height: 16px;
|
|
32
|
+
border-radius: 50%;
|
|
33
|
+
border: 1px solid #D5D5D5;
|
|
34
|
+
background: #fff;
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
}
|
|
37
|
+
&::before {
|
|
38
|
+
left: -8px;
|
|
39
|
+
}
|
|
40
|
+
&::after {
|
|
41
|
+
right: -8px;
|
|
42
|
+
}
|
|
43
|
+
> div {
|
|
44
|
+
margin-bottom: 8px;
|
|
45
|
+
border-bottom: 2px dashed #EBEBEB;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
.@{prefix}-@{components}-type-grayBg {
|
|
49
|
+
position: relative;
|
|
50
|
+
padding-top: 8px;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
&::before,
|
|
53
|
+
&::after {
|
|
54
|
+
position: absolute;
|
|
55
|
+
top: 0;
|
|
56
|
+
display: block;
|
|
57
|
+
content: '';
|
|
58
|
+
width: 16px;
|
|
59
|
+
height: 16px;
|
|
60
|
+
border-radius: 50%;
|
|
61
|
+
background: #F5F5F5;
|
|
62
|
+
}
|
|
63
|
+
&::before {
|
|
64
|
+
left: -8px;
|
|
65
|
+
}
|
|
66
|
+
&::after {
|
|
67
|
+
right: -8px;
|
|
68
|
+
}
|
|
69
|
+
> div {
|
|
70
|
+
margin-bottom: 8px;
|
|
71
|
+
border-bottom: 2px dashed #F2F2F2;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
.@{prefix}-@{components}-type-vertical {
|
|
75
|
+
width: auto;
|
|
76
|
+
min-height: 12px;
|
|
77
|
+
border-left: 1px solid #BFBFC7;
|
|
78
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const designTokens: {
|
|
2
|
+
colorDrawerBackgroundOverlay: any;
|
|
3
|
+
colorDrawerBackgroundStandard: any;
|
|
4
|
+
borderTopLeftRadius: any;
|
|
5
|
+
borderTopRightRadius: any;
|
|
6
|
+
spacingDrawerPaddingHorizontal: any;
|
|
7
|
+
spacingDrawerPaddingBottom: any;
|
|
8
|
+
spacingDrawerPaddingTop: any;
|
|
9
|
+
sizingDrawerHandle: any;
|
|
10
|
+
colorDrawerHandle: any;
|
|
11
|
+
spacingDrawerHandlePaddingTop: any;
|
|
12
|
+
spacingDrawerHandlePaddingBottom: any;
|
|
13
|
+
colorDrawerTextHeader: any;
|
|
14
|
+
spacingDrawerListOptionHorizontalGap: any;
|
|
15
|
+
};
|
|
16
|
+
export default designTokens;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/Drawer/designTokens.ts
|
|
30
|
+
var designTokens_exports = {};
|
|
31
|
+
__export(designTokens_exports, {
|
|
32
|
+
default: () => designTokens_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(designTokens_exports);
|
|
35
|
+
var import_tokenManager = __toESM(require("../../utils/tokenManager"));
|
|
36
|
+
var designTokens = {
|
|
37
|
+
colorDrawerBackgroundOverlay: import_tokenManager.default.tokenKey("colorDrawerBackgroundOverlay") || "rgba(0, 0, 0, 0.60)",
|
|
38
|
+
// 遮罩层背景色
|
|
39
|
+
colorDrawerBackgroundStandard: import_tokenManager.default.tokenKey("colorDrawerBackgroundStandard") || "#FFF",
|
|
40
|
+
// 内容的底色
|
|
41
|
+
borderTopLeftRadius: import_tokenManager.default.tokenKey("borderRadiusDrawerTopLeft"),
|
|
42
|
+
// 弹出窗上左上圆角
|
|
43
|
+
borderTopRightRadius: import_tokenManager.default.tokenKey("borderRadiusDrawerTopRight"),
|
|
44
|
+
// 弹出窗上右上圆角
|
|
45
|
+
spacingDrawerPaddingHorizontal: import_tokenManager.default.tokenKey("spacingDrawerPaddingHorizontal"),
|
|
46
|
+
// 内部横padding
|
|
47
|
+
spacingDrawerPaddingBottom: import_tokenManager.default.tokenKey("spacingDrawerPaddingBottom"),
|
|
48
|
+
spacingDrawerPaddingTop: import_tokenManager.default.tokenKey("spacingDrawerPaddingTop"),
|
|
49
|
+
sizingDrawerHandle: import_tokenManager.default.tokenKey("sizingDrawerHandle"),
|
|
50
|
+
// 上部 小滑块的宽
|
|
51
|
+
colorDrawerHandle: import_tokenManager.default.tokenKey("colorDrawerHandle"),
|
|
52
|
+
// 上部 小滑块的背景色
|
|
53
|
+
spacingDrawerHandlePaddingTop: import_tokenManager.default.tokenKey("spacingDrawerHandlePaddingTop"),
|
|
54
|
+
// 上部 小滑块
|
|
55
|
+
spacingDrawerHandlePaddingBottom: import_tokenManager.default.tokenKey("spacingDrawerHandlePaddingBottom"),
|
|
56
|
+
// 上部 小滑块
|
|
57
|
+
colorDrawerTextHeader: import_tokenManager.default.tokenKey("colorDrawerTextHeader"),
|
|
58
|
+
// title的颜色
|
|
59
|
+
spacingDrawerListOptionHorizontalGap: import_tokenManager.default.tokenKey("spacingDrawerListOptionHorizontalGap")
|
|
60
|
+
// 间距
|
|
61
|
+
};
|
|
62
|
+
var designTokens_default = designTokens;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style/index.less';
|
|
3
|
+
export type DrawerType = 'DrawerTypeHandler' | 'DrawerTypeCloseBtn';
|
|
4
|
+
export declare const DrawerTypeEnum: Record<string, DrawerType>;
|
|
5
|
+
export interface BottomDrawerProps {
|
|
6
|
+
visible: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
height?: number | string;
|
|
10
|
+
title?: string;
|
|
11
|
+
drawerType: DrawerType;
|
|
12
|
+
bottomBtnText?: string;
|
|
13
|
+
bottomLinkText?: string;
|
|
14
|
+
showBottomBorder?: boolean;
|
|
15
|
+
showImage?: boolean;
|
|
16
|
+
imageSrc?: string;
|
|
17
|
+
onLinkClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
18
|
+
onBottomBtnClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
19
|
+
}
|
|
20
|
+
declare const BottomDrawer: React.FC<BottomDrawerProps>;
|
|
21
|
+
export default BottomDrawer;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __export = (target, all) => {
|
|
22
|
+
for (var name in all)
|
|
23
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
24
|
+
};
|
|
25
|
+
var __copyProps = (to, from, except, desc) => {
|
|
26
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
+
for (let key of __getOwnPropNames(from))
|
|
28
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
29
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
30
|
+
}
|
|
31
|
+
return to;
|
|
32
|
+
};
|
|
33
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
34
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
35
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
36
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
37
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
38
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
39
|
+
mod
|
|
40
|
+
));
|
|
41
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
42
|
+
|
|
43
|
+
// src/components/Drawer/index.tsx
|
|
44
|
+
var Drawer_exports = {};
|
|
45
|
+
__export(Drawer_exports, {
|
|
46
|
+
DrawerTypeEnum: () => DrawerTypeEnum,
|
|
47
|
+
default: () => Drawer_default
|
|
48
|
+
});
|
|
49
|
+
module.exports = __toCommonJS(Drawer_exports);
|
|
50
|
+
var import_react = __toESM(require("react"));
|
|
51
|
+
var import_designTokens = __toESM(require("./designTokens"));
|
|
52
|
+
var import__ = require("../index");
|
|
53
|
+
var import_constants = require("../../constants");
|
|
54
|
+
var import_style = require("./style/index.less");
|
|
55
|
+
var DrawerTypeEnum = {
|
|
56
|
+
DrawerTypeHandler: "DrawerTypeHandler",
|
|
57
|
+
DrawerTypeCloseBtn: "DrawerTypeCloseBtn"
|
|
58
|
+
};
|
|
59
|
+
var BottomDrawer = ({
|
|
60
|
+
visible,
|
|
61
|
+
onClose,
|
|
62
|
+
children,
|
|
63
|
+
height,
|
|
64
|
+
title,
|
|
65
|
+
drawerType = DrawerTypeEnum.DrawerTypeHandler,
|
|
66
|
+
bottomBtnText,
|
|
67
|
+
bottomLinkText,
|
|
68
|
+
showBottomBorder,
|
|
69
|
+
showImage,
|
|
70
|
+
imageSrc,
|
|
71
|
+
onLinkClick,
|
|
72
|
+
onBottomBtnClick
|
|
73
|
+
}) => {
|
|
74
|
+
const originalBodyOverflow = (0, import_react.useRef)("");
|
|
75
|
+
const [isMounted, setIsMounted] = (0, import_react.useState)(false);
|
|
76
|
+
const [paddingBottom, setPaddingBottom] = (0, import_react.useState)(0);
|
|
77
|
+
(0, import_react.useEffect)(() => {
|
|
78
|
+
if (visible) {
|
|
79
|
+
originalBodyOverflow.current = document.body.style.overflow;
|
|
80
|
+
document.body.style.overflow = "hidden";
|
|
81
|
+
document.body.style.touchAction = "none";
|
|
82
|
+
setIsMounted(true);
|
|
83
|
+
} else {
|
|
84
|
+
document.body.style.overflow = originalBodyOverflow.current;
|
|
85
|
+
document.body.style.touchAction = "auto";
|
|
86
|
+
const timer = setTimeout(() => setIsMounted(false), 100);
|
|
87
|
+
return () => clearTimeout(timer);
|
|
88
|
+
}
|
|
89
|
+
}, [visible]);
|
|
90
|
+
(0, import_react.useEffect)(() => {
|
|
91
|
+
if (!visible) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const timer = setTimeout(() => {
|
|
95
|
+
const footer = document.querySelector(`.${import_constants.cssClasses.PREFIX}-stickyFooter`);
|
|
96
|
+
if (footer) {
|
|
97
|
+
const observer = new ResizeObserver((entries) => {
|
|
98
|
+
const contentHeight = (entries == null ? void 0 : entries[0].contentRect.height) + 10;
|
|
99
|
+
const borderBoxHeight = (entries == null ? void 0 : entries[0].target.getBoundingClientRect().height) + 10;
|
|
100
|
+
setPaddingBottom(borderBoxHeight || contentHeight);
|
|
101
|
+
});
|
|
102
|
+
observer.observe(footer, { box: "border-box" });
|
|
103
|
+
return () => observer.disconnect();
|
|
104
|
+
}
|
|
105
|
+
}, 100);
|
|
106
|
+
return () => clearTimeout(timer);
|
|
107
|
+
}, [visible]);
|
|
108
|
+
const {
|
|
109
|
+
colorDrawerBackgroundOverlay,
|
|
110
|
+
colorDrawerBackgroundStandard,
|
|
111
|
+
borderTopLeftRadius,
|
|
112
|
+
borderTopRightRadius,
|
|
113
|
+
spacingDrawerPaddingHorizontal,
|
|
114
|
+
sizingDrawerHandle,
|
|
115
|
+
colorDrawerHandle,
|
|
116
|
+
spacingDrawerHandlePaddingTop,
|
|
117
|
+
spacingDrawerHandlePaddingBottom,
|
|
118
|
+
colorDrawerTextHeader,
|
|
119
|
+
spacingDrawerListOptionHorizontalGap,
|
|
120
|
+
spacingDrawerPaddingBottom,
|
|
121
|
+
spacingDrawerPaddingTop
|
|
122
|
+
} = import_designTokens.default;
|
|
123
|
+
if (!isMounted)
|
|
124
|
+
return null;
|
|
125
|
+
const borderStyle = showBottomBorder ? {} : { border: "none" };
|
|
126
|
+
const TitleCom = title ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${import_constants.cssClasses.PREFIX}-drawer-header` }, /* @__PURE__ */ import_react.default.createElement(
|
|
127
|
+
import__.Text,
|
|
128
|
+
{
|
|
129
|
+
size: "TitleT21Bold",
|
|
130
|
+
style: { color: colorDrawerTextHeader, marginBottom: `${spacingDrawerListOptionHorizontalGap}px`, display: "block" }
|
|
131
|
+
},
|
|
132
|
+
title
|
|
133
|
+
)) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null);
|
|
134
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
className: `${import_constants.cssClasses.PREFIX}-drawer-mask ${visible ? "visible" : ""}`,
|
|
138
|
+
style: { background: colorDrawerBackgroundOverlay },
|
|
139
|
+
onClick: onClose
|
|
140
|
+
},
|
|
141
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
142
|
+
"div",
|
|
143
|
+
{
|
|
144
|
+
className: `${import_constants.cssClasses.PREFIX}-drawer-content ${visible ? "active" : ""}`,
|
|
145
|
+
style: {
|
|
146
|
+
height,
|
|
147
|
+
background: colorDrawerBackgroundStandard,
|
|
148
|
+
borderTopLeftRadius: `${borderTopLeftRadius}px`,
|
|
149
|
+
borderTopRightRadius: `${borderTopRightRadius}px`
|
|
150
|
+
},
|
|
151
|
+
onClick: (e) => e.stopPropagation()
|
|
152
|
+
},
|
|
153
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
154
|
+
"div",
|
|
155
|
+
{
|
|
156
|
+
className: `${import_constants.cssClasses.PREFIX}-drawer-inner`,
|
|
157
|
+
style: {
|
|
158
|
+
paddingLeft: `${spacingDrawerPaddingHorizontal}px`,
|
|
159
|
+
paddingRight: `${spacingDrawerPaddingHorizontal}px`,
|
|
160
|
+
paddingBottom: `${paddingBottom}px`
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
drawerType === DrawerTypeEnum.DrawerTypeHandler && /* @__PURE__ */ import_react.default.createElement(
|
|
164
|
+
"div",
|
|
165
|
+
{
|
|
166
|
+
className: "handle-bar",
|
|
167
|
+
style: {
|
|
168
|
+
width: sizingDrawerHandle ? `${sizingDrawerHandle}px` : 0,
|
|
169
|
+
background: colorDrawerHandle,
|
|
170
|
+
marginTop: `${spacingDrawerHandlePaddingTop}px`,
|
|
171
|
+
marginBottom: `${spacingDrawerHandlePaddingBottom}px`
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
drawerType === DrawerTypeEnum.DrawerTypeCloseBtn && /* @__PURE__ */ import_react.default.createElement(
|
|
176
|
+
"div",
|
|
177
|
+
{
|
|
178
|
+
className: "close-warp",
|
|
179
|
+
style: {
|
|
180
|
+
paddingTop: `${spacingDrawerPaddingTop}px`
|
|
181
|
+
// paddingBottom: `${spacingDrawerListOptionHorizontalGap}px`,
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
/* @__PURE__ */ import_react.default.createElement("div", null, TitleCom),
|
|
185
|
+
/* @__PURE__ */ import_react.default.createElement(import__.Icon, { name: "icon-Close", onClick: onClose })
|
|
186
|
+
),
|
|
187
|
+
showImage && /* @__PURE__ */ import_react.default.createElement(
|
|
188
|
+
import__.Image,
|
|
189
|
+
{
|
|
190
|
+
radio: 2,
|
|
191
|
+
src: imageSrc,
|
|
192
|
+
imageSize: "100%",
|
|
193
|
+
style: { marginBottom: `${spacingDrawerPaddingBottom}px` }
|
|
194
|
+
}
|
|
195
|
+
),
|
|
196
|
+
drawerType !== DrawerTypeEnum.DrawerTypeCloseBtn && title && TitleCom,
|
|
197
|
+
children
|
|
198
|
+
),
|
|
199
|
+
(!!bottomBtnText || !!bottomLinkText) && /* @__PURE__ */ import_react.default.createElement(
|
|
200
|
+
import__.StickyFooter,
|
|
201
|
+
{
|
|
202
|
+
onClick: onBottomBtnClick,
|
|
203
|
+
buttonText: bottomBtnText,
|
|
204
|
+
style: __spreadValues({
|
|
205
|
+
flexDirection: "column",
|
|
206
|
+
flexShrink: 0
|
|
207
|
+
}, borderStyle)
|
|
208
|
+
},
|
|
209
|
+
!!bottomLinkText && /* @__PURE__ */ import_react.default.createElement(
|
|
210
|
+
import__.Text,
|
|
211
|
+
{
|
|
212
|
+
onClick: (e) => {
|
|
213
|
+
e == null ? void 0 : e.stopPropagation();
|
|
214
|
+
if (onLinkClick) {
|
|
215
|
+
onLinkClick(e);
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
size: "ContentC14TextLink",
|
|
219
|
+
style: {
|
|
220
|
+
marginTop: `${spacingDrawerListOptionHorizontalGap}px`
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
bottomLinkText
|
|
224
|
+
)
|
|
225
|
+
)
|
|
226
|
+
)
|
|
227
|
+
);
|
|
228
|
+
};
|
|
229
|
+
var Drawer_default = BottomDrawer;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
|
|
3
|
+
// 添加iOS惯性滚动限制
|
|
4
|
+
.@{prefix}-drawer-content {
|
|
5
|
+
-webkit-overflow-scrolling: touch;
|
|
6
|
+
overscroll-behavior: contain;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.@{prefix}-drawer-mask {
|
|
10
|
+
touch-action: none; // 阻止移动端触摸事件
|
|
11
|
+
position: fixed;
|
|
12
|
+
top: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
background: rgba(0, 0, 0, 0.5);
|
|
17
|
+
opacity: 0;
|
|
18
|
+
transition: opacity @transition-duration @easing-function;
|
|
19
|
+
z-index: @mask-zindex;
|
|
20
|
+
|
|
21
|
+
&.visible {
|
|
22
|
+
opacity: 1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.@{prefix}-drawer-content {
|
|
27
|
+
.transition-properties();
|
|
28
|
+
position: fixed;
|
|
29
|
+
left: 0;
|
|
30
|
+
width: 100%;
|
|
31
|
+
bottom: -100%;
|
|
32
|
+
background: white;
|
|
33
|
+
border-radius: @border-radius @border-radius 0 0;
|
|
34
|
+
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
|
|
35
|
+
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
|
|
40
|
+
min-height: 20vh;
|
|
41
|
+
max-height: 80vh;
|
|
42
|
+
|
|
43
|
+
&.active {
|
|
44
|
+
bottom: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.handle-bar {
|
|
48
|
+
height: 4px;
|
|
49
|
+
margin: 0 auto;
|
|
50
|
+
border-radius: 4px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.@{prefix}-drawer-inner {
|
|
54
|
+
overflow: auto;
|
|
55
|
+
flex: 1;
|
|
56
|
+
min-height: 0;
|
|
57
|
+
padding-bottom: 20px;
|
|
58
|
+
/* 防止底部遮挡 */
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.close-warp {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: row;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 混合 (Mixin)
|
|
71
|
+
.transition-properties() {
|
|
72
|
+
transition: bottom @transition-duration @easing-function;
|
|
73
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
33
|
+
var __export = (target, all) => {
|
|
34
|
+
for (var name in all)
|
|
35
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
36
|
+
};
|
|
37
|
+
var __copyProps = (to, from, except, desc) => {
|
|
38
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
39
|
+
for (let key of __getOwnPropNames(from))
|
|
40
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
41
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
42
|
+
}
|
|
43
|
+
return to;
|
|
44
|
+
};
|
|
45
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
46
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
47
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
48
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
49
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
50
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
51
|
+
mod
|
|
52
|
+
));
|
|
53
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
54
|
+
|
|
55
|
+
// src/components/Icon/Icon.tsx
|
|
56
|
+
var Icon_exports = {};
|
|
57
|
+
__export(Icon_exports, {
|
|
58
|
+
default: () => Icon_default
|
|
59
|
+
});
|
|
60
|
+
module.exports = __toCommonJS(Icon_exports);
|
|
61
|
+
var import_react = __toESM(require("react"));
|
|
62
|
+
var import_iconfont = require("../../assets/iconFont/iconfont.css");
|
|
63
|
+
var MIcon = (_a) => {
|
|
64
|
+
var _b = _a, { type, style, className } = _b, rest = __objRest(_b, ["type", "style", "className"]);
|
|
65
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
"i",
|
|
67
|
+
__spreadValues({
|
|
68
|
+
className: `DCPL ${className || ""} ${type}`,
|
|
69
|
+
style,
|
|
70
|
+
"aria-hidden": "true"
|
|
71
|
+
}, rest)
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
var Icon_default = MIcon;
|