@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,174 @@
|
|
|
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/Navigation/index.tsx
|
|
56
|
+
var Navigation_exports = {};
|
|
57
|
+
__export(Navigation_exports, {
|
|
58
|
+
default: () => Navigation_default
|
|
59
|
+
});
|
|
60
|
+
module.exports = __toCommonJS(Navigation_exports);
|
|
61
|
+
var import_react = __toESM(require("react"));
|
|
62
|
+
var import_designTokens = __toESM(require("./designTokens"));
|
|
63
|
+
var import_cssinjs = require("@ant-design/cssinjs");
|
|
64
|
+
var import_lodash = require("lodash");
|
|
65
|
+
var import_theme = require("../../utils/theme");
|
|
66
|
+
var import__ = require("../index");
|
|
67
|
+
var import_constants = require("../../constants");
|
|
68
|
+
var import_style = require("./style/index.less");
|
|
69
|
+
var Navigation = (_a) => {
|
|
70
|
+
var _b = _a, {
|
|
71
|
+
hideBorder,
|
|
72
|
+
className,
|
|
73
|
+
rightIcons,
|
|
74
|
+
rightLink,
|
|
75
|
+
title,
|
|
76
|
+
goBack,
|
|
77
|
+
isInverse,
|
|
78
|
+
titleIconBadge,
|
|
79
|
+
imgBackground,
|
|
80
|
+
noRight = false,
|
|
81
|
+
leftIconName,
|
|
82
|
+
leftIconSize
|
|
83
|
+
} = _b, restProps = __objRest(_b, [
|
|
84
|
+
"hideBorder",
|
|
85
|
+
"className",
|
|
86
|
+
"rightIcons",
|
|
87
|
+
"rightLink",
|
|
88
|
+
"title",
|
|
89
|
+
"goBack",
|
|
90
|
+
"isInverse",
|
|
91
|
+
"titleIconBadge",
|
|
92
|
+
"imgBackground",
|
|
93
|
+
"noRight",
|
|
94
|
+
"leftIconName",
|
|
95
|
+
"leftIconSize"
|
|
96
|
+
]);
|
|
97
|
+
var _a2;
|
|
98
|
+
const {
|
|
99
|
+
spacingTopNavigationPaddingHorizontal,
|
|
100
|
+
spacingTopNavigationPaddingBottom,
|
|
101
|
+
colorTopNavigationBorderBottom,
|
|
102
|
+
spacingTopNavigationTextLinkPaddingRight,
|
|
103
|
+
colorTopNavigationBackgroundInverse,
|
|
104
|
+
colorTopNavigationBackground,
|
|
105
|
+
colorTopNavigationTitleStandard,
|
|
106
|
+
colorTopNavigationTitleInverse,
|
|
107
|
+
colorTopNavigationGradient
|
|
108
|
+
} = import_designTokens.default;
|
|
109
|
+
console.log("designTokens", import_designTokens.default);
|
|
110
|
+
const useCustomButtonStyle = () => {
|
|
111
|
+
const hashId = (0, import_cssinjs.useStyleRegister)({
|
|
112
|
+
theme: import_theme.theme,
|
|
113
|
+
token: {},
|
|
114
|
+
path: [`${import_constants.cssClasses.PREFIX}-header`]
|
|
115
|
+
}, () => `
|
|
116
|
+
.${import_constants.cssClasses.PREFIX}-header {
|
|
117
|
+
padding-left: ${spacingTopNavigationPaddingHorizontal}px;
|
|
118
|
+
padding-right: ${spacingTopNavigationPaddingHorizontal}px;
|
|
119
|
+
padding-bottom: ${spacingTopNavigationPaddingBottom}px;
|
|
120
|
+
padding-top: ${spacingTopNavigationPaddingBottom}px; // TODO:设计稿上没有暂时加的
|
|
121
|
+
border-bottom: 1px solid ${colorTopNavigationBorderBottom};
|
|
122
|
+
background-color:${colorTopNavigationBackground};
|
|
123
|
+
&.inverse {
|
|
124
|
+
background-color:${colorTopNavigationBackgroundInverse};
|
|
125
|
+
}
|
|
126
|
+
&.imgBackground {
|
|
127
|
+
background:${colorTopNavigationGradient};
|
|
128
|
+
}
|
|
129
|
+
&.hideBorder {
|
|
130
|
+
border-bottom:none;
|
|
131
|
+
box-shadow: 0px -2px 10px 0px rgba(26, 24, 134, 0.1);
|
|
132
|
+
}
|
|
133
|
+
&.noRight{
|
|
134
|
+
justify-content:center !important;
|
|
135
|
+
.dxp-title-warp{
|
|
136
|
+
line-height:41px;
|
|
137
|
+
}
|
|
138
|
+
.${import_constants.cssClasses.PREFIX}-header-back {
|
|
139
|
+
position:absolute;
|
|
140
|
+
left: ${spacingTopNavigationPaddingHorizontal}px;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
.${import_constants.cssClasses.PREFIX}-title {
|
|
145
|
+
color:${colorTopNavigationTitleStandard};
|
|
146
|
+
&.inverse {
|
|
147
|
+
color:${colorTopNavigationTitleInverse};
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
.${import_constants.cssClasses.PREFIX}-right-link {
|
|
151
|
+
padding-right: ${spacingTopNavigationTextLinkPaddingRight}px;
|
|
152
|
+
}
|
|
153
|
+
`);
|
|
154
|
+
return hashId;
|
|
155
|
+
};
|
|
156
|
+
useCustomButtonStyle();
|
|
157
|
+
const onGoBack = () => {
|
|
158
|
+
if (goBack) {
|
|
159
|
+
goBack();
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
163
|
+
"header",
|
|
164
|
+
__spreadValues({
|
|
165
|
+
className: `${import_constants.cssClasses.PREFIX}-header ${hideBorder ? "hideBorder" : ""} ${isInverse ? "inverse" : ""} ${imgBackground ? "imgBackground" : ""} ${noRight ? "noRight" : ""} ${className || ""}`
|
|
166
|
+
}, restProps),
|
|
167
|
+
/* @__PURE__ */ import_react.default.createElement(import__.IconButton, { className: `${import_constants.cssClasses.PREFIX}-header-back`, customeIconSize: leftIconSize, inverse: isInverse, size: "medium", name: leftIconName || "icon-a-Backarrow-copy", onClick: onGoBack }),
|
|
168
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: `
|
|
169
|
+
${import_constants.cssClasses.PREFIX}-title-warp
|
|
170
|
+
` }, !(0, import_lodash.isEmpty)(titleIconBadge) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${import_constants.cssClasses.PREFIX}-title-badge` }, /* @__PURE__ */ import_react.default.createElement(import__.Icon, { inverse: isInverse, size: 24, style: { marginRight: "4px" }, name: titleIconBadge.iconName }), /* @__PURE__ */ import_react.default.createElement(import__.Text, { inverse: isInverse, size: "ContentC14Bold", className: `${import_constants.cssClasses.PREFIX}-title ${isInverse ? "inverse" : ""} ` }, titleIconBadge.title), /* @__PURE__ */ import_react.default.createElement("div", { className: `${import_constants.cssClasses.PREFIX}-badge` }, +titleIconBadge.badge > 99 ? "99+" : titleIconBadge.badge)) : /* @__PURE__ */ import_react.default.createElement(import__.Text, { inverse: isInverse, size: "ContentC14Bold", className: `${import_constants.cssClasses.PREFIX}-title ${isInverse ? "inverse" : ""} ` }, title)),
|
|
171
|
+
!noRight && /* @__PURE__ */ import_react.default.createElement(import__.IconButtonGroup, { className: `${import_constants.cssClasses.PREFIX}-rightWarp` }, (_a2 = rightIcons == null ? void 0 : rightIcons.slice(0, 3)) == null ? void 0 : _a2.map((i, index) => /* @__PURE__ */ import_react.default.createElement(import__.IconButton, { inverse: isInverse, key: index, name: i.iconName, size: "medium", onClick: i.onIconClick })), !(0, import_lodash.isEmpty)(rightLink) && /* @__PURE__ */ import_react.default.createElement(import__.TextLink, { inverse: isInverse, className: `${import_constants.cssClasses.PREFIX}-right-link`, type: import__.TextLinkEnum.default, text: rightLink.linkText, onClick: rightLink.onLinkClick }))
|
|
172
|
+
);
|
|
173
|
+
};
|
|
174
|
+
var Navigation_default = Navigation;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
.@{prefix}-header {
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
align-items: center;
|
|
8
|
+
position: fixed;
|
|
9
|
+
left: 0;
|
|
10
|
+
top: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
margin: 0 auto;
|
|
13
|
+
z-index: 999;
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
.@{prefix}-title-warp {
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
text-overflow: ellipsis;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.@{prefix}-title {
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
text-overflow: ellipsis;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.@{prefix}-title-badge {
|
|
29
|
+
position: relative;
|
|
30
|
+
display: flex;
|
|
31
|
+
|
|
32
|
+
.@{prefix}-badge {
|
|
33
|
+
position: absolute;
|
|
34
|
+
right: -36px;
|
|
35
|
+
top: -2px;
|
|
36
|
+
background-color: #FA2C2C;
|
|
37
|
+
color: #FFF;
|
|
38
|
+
height: 18px;
|
|
39
|
+
width: 38px;
|
|
40
|
+
border-radius: 18px;
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
text-align: center;
|
|
43
|
+
line-height: 18px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.@{prefix}-rightWarp {
|
|
49
|
+
flex: 0 0 auto;
|
|
50
|
+
/* 关键!禁止伸缩 */
|
|
51
|
+
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../../../style/variables.less';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare const otherDesignTokens: {
|
|
2
|
+
spacingSearchInputIconPaddingRight: any;
|
|
3
|
+
spacingSearchInputPaddingHorizontal: any;
|
|
4
|
+
colorSearchInputIconStandard: any;
|
|
5
|
+
spacingSearchInputVerticalGap: any;
|
|
6
|
+
colorSearchInputBackground: any;
|
|
7
|
+
colorSearchInputBackgroundHover: any;
|
|
8
|
+
colorSearchInputBorderStandard: any;
|
|
9
|
+
colorSearchInputTextPlaceholder: any;
|
|
10
|
+
colorSearchInputTextLabel: any;
|
|
11
|
+
colorSearchInputTextResults: any;
|
|
12
|
+
spacingSearchInputResultPaddingVertical: any;
|
|
13
|
+
spacingSearchInputResultListPaddingLeft: any;
|
|
14
|
+
spacingSearchInputResultListPaddingRight: any;
|
|
15
|
+
};
|
|
16
|
+
declare const designTokens: {
|
|
17
|
+
borderRadius: any;
|
|
18
|
+
paddingBlock: number;
|
|
19
|
+
paddingInline: any;
|
|
20
|
+
colorText: any;
|
|
21
|
+
hoverBorderColor: any;
|
|
22
|
+
activeBorderColor: any;
|
|
23
|
+
activeShadow: string;
|
|
24
|
+
colorBgContainer: any;
|
|
25
|
+
borderWidthInputStandard: any;
|
|
26
|
+
colorBorder: any;
|
|
27
|
+
colorInputTextPlaceholder: any;
|
|
28
|
+
fontSize: any;
|
|
29
|
+
lineHeight: number;
|
|
30
|
+
};
|
|
31
|
+
declare const styleToken: {
|
|
32
|
+
[x: string]: any;
|
|
33
|
+
};
|
|
34
|
+
export { designTokens, otherDesignTokens, styleToken };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/Search/designTokens.ts
|
|
20
|
+
var designTokens_exports = {};
|
|
21
|
+
__export(designTokens_exports, {
|
|
22
|
+
designTokens: () => designTokens,
|
|
23
|
+
otherDesignTokens: () => otherDesignTokens,
|
|
24
|
+
styleToken: () => styleToken
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(designTokens_exports);
|
|
27
|
+
var import_tokenHelper = require("../../utils/tokenHelper");
|
|
28
|
+
var import_constants = require("../../constants");
|
|
29
|
+
var prefixCls = import_constants.cssClasses.PREFIX + "-input-outside";
|
|
30
|
+
var otherDesignTokens = {
|
|
31
|
+
spacingSearchInputIconPaddingRight: (0, import_tokenHelper.getToken)("spacingSearchInputIconPaddingRight"),
|
|
32
|
+
spacingSearchInputPaddingHorizontal: (0, import_tokenHelper.getToken)("spacingSearchInputPaddingHorizontal"),
|
|
33
|
+
colorSearchInputIconStandard: (0, import_tokenHelper.getToken)("colorSearchInputIconStandard"),
|
|
34
|
+
// 搜索图标颜色
|
|
35
|
+
spacingSearchInputVerticalGap: (0, import_tokenHelper.getToken)("spacingSearchInputVerticalGap"),
|
|
36
|
+
colorSearchInputBackground: (0, import_tokenHelper.getToken)("colorSearchInputBackground"),
|
|
37
|
+
colorSearchInputBackgroundHover: (0, import_tokenHelper.getToken)("colorSearchInputBackgroundHover"),
|
|
38
|
+
colorSearchInputBorderStandard: (0, import_tokenHelper.getToken)("colorSearchInputBorderStandard"),
|
|
39
|
+
colorSearchInputTextPlaceholder: (0, import_tokenHelper.getToken)("colorSearchInputTextPlaceholder"),
|
|
40
|
+
colorSearchInputTextLabel: (0, import_tokenHelper.getToken)("colorSearchInputTextLabel"),
|
|
41
|
+
colorSearchInputTextResults: (0, import_tokenHelper.getToken)("colorSearchInputTextResults"),
|
|
42
|
+
spacingSearchInputResultPaddingVertical: (0, import_tokenHelper.getToken)("spacingSearchInputResultPaddingVertical"),
|
|
43
|
+
spacingSearchInputResultListPaddingLeft: (0, import_tokenHelper.getToken)("spacingSearchInputResultListPaddingLeft"),
|
|
44
|
+
spacingSearchInputResultListPaddingRight: (0, import_tokenHelper.getToken)("spacingSearchInputResultListPaddingRight")
|
|
45
|
+
};
|
|
46
|
+
var designTokens = {
|
|
47
|
+
borderRadius: (0, import_tokenHelper.getToken)("borderRadiusInput"),
|
|
48
|
+
// 圆角
|
|
49
|
+
paddingBlock: 10,
|
|
50
|
+
// 纵向内边距
|
|
51
|
+
paddingInline: otherDesignTokens.spacingSearchInputPaddingHorizontal + 16 + otherDesignTokens.spacingSearchInputIconPaddingRight,
|
|
52
|
+
// 横向内边距
|
|
53
|
+
colorText: (0, import_tokenHelper.getToken)("colorInputTextActive"),
|
|
54
|
+
// 内容文本颜色
|
|
55
|
+
hoverBorderColor: (0, import_tokenHelper.getToken)("colorInputBorderActive"),
|
|
56
|
+
// hover边框颜色
|
|
57
|
+
activeBorderColor: (0, import_tokenHelper.getToken)("colorInputBorderActive"),
|
|
58
|
+
// active边框颜色
|
|
59
|
+
activeShadow: "none",
|
|
60
|
+
// activeShadow: '0px 0px 0px 2px #180C8E33', // 边框shadow颜色
|
|
61
|
+
colorBgContainer: (0, import_tokenHelper.getToken)("colorInputBackground"),
|
|
62
|
+
// 背景颜色
|
|
63
|
+
borderWidthInputStandard: (0, import_tokenHelper.getToken)("borderWidthInputStandard"),
|
|
64
|
+
// 标准边框宽度
|
|
65
|
+
colorBorder: (0, import_tokenHelper.getToken)("colorInputBorderStandard"),
|
|
66
|
+
// 标准边框颜色
|
|
67
|
+
colorInputTextPlaceholder: (0, import_tokenHelper.getToken)("colorInputTextPlaceholder"),
|
|
68
|
+
// placeholder文本颜色
|
|
69
|
+
fontSize: (0, import_tokenHelper.getToken)("ContentC14Regular"),
|
|
70
|
+
// 字体大小
|
|
71
|
+
lineHeight: 1.5
|
|
72
|
+
// colorBgContainerDisabled: getToken('colorInputBackgroundHaze'), // 背景颜色
|
|
73
|
+
};
|
|
74
|
+
var styleToken = {
|
|
75
|
+
[`--${prefixCls}-color-error-border-hover`]: (0, import_tokenHelper.getToken)("colorInputBorderError")
|
|
76
|
+
// error颜色
|
|
77
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import './style/index.less';
|
|
3
|
+
export interface SearchProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
resultList?: ReactNode;
|
|
6
|
+
onSearch?: (value: string) => void;
|
|
7
|
+
onEnter?: (value: string) => void;
|
|
8
|
+
showResult?: boolean;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
declare const Search: (props: SearchProps) => React.JSX.Element;
|
|
13
|
+
export default Search;
|
|
@@ -0,0 +1,137 @@
|
|
|
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/Search/index.tsx
|
|
44
|
+
var Search_exports = {};
|
|
45
|
+
__export(Search_exports, {
|
|
46
|
+
default: () => Search_default
|
|
47
|
+
});
|
|
48
|
+
module.exports = __toCommonJS(Search_exports);
|
|
49
|
+
var import_react = __toESM(require("react"));
|
|
50
|
+
var import_antd = require("antd");
|
|
51
|
+
var import_cssinjs = require("@ant-design/cssinjs");
|
|
52
|
+
var import_theme = require("../../utils/theme");
|
|
53
|
+
var import_constants = require("../../constants");
|
|
54
|
+
var import_designTokens = require("./designTokens");
|
|
55
|
+
var import_Icon = __toESM(require("../Icon"));
|
|
56
|
+
var import_style = require("./style/index.less");
|
|
57
|
+
var Search = (props) => {
|
|
58
|
+
const { placeholder, resultList, onSearch = () => {
|
|
59
|
+
}, onEnter = () => {
|
|
60
|
+
}, showResult } = props;
|
|
61
|
+
const prefix = `${import_constants.cssClasses.PREFIX}-search`;
|
|
62
|
+
const {
|
|
63
|
+
colorSearchInputIconStandard,
|
|
64
|
+
spacingSearchInputPaddingHorizontal,
|
|
65
|
+
spacingSearchInputVerticalGap,
|
|
66
|
+
colorSearchInputBackground,
|
|
67
|
+
spacingSearchInputResultPaddingVertical,
|
|
68
|
+
colorSearchInputTextResults,
|
|
69
|
+
spacingSearchInputResultListPaddingLeft,
|
|
70
|
+
spacingSearchInputResultListPaddingRight,
|
|
71
|
+
colorSearchInputBackgroundHover,
|
|
72
|
+
colorSearchInputBorderStandard
|
|
73
|
+
// colorSearchInputTextLabel: getToken('colorSearchInputTextLabel'),
|
|
74
|
+
} = import_designTokens.otherDesignTokens;
|
|
75
|
+
const useCustomButtonStyle = () => {
|
|
76
|
+
const hashId = (0, import_cssinjs.useStyleRegister)({
|
|
77
|
+
theme: import_theme.theme,
|
|
78
|
+
token: { baseColor: "blue" },
|
|
79
|
+
path: [`${prefix}`]
|
|
80
|
+
}, () => `
|
|
81
|
+
.${prefix}-icon {
|
|
82
|
+
color: ${colorSearchInputIconStandard};
|
|
83
|
+
top: 15px;
|
|
84
|
+
left: ${spacingSearchInputPaddingHorizontal}px;
|
|
85
|
+
}
|
|
86
|
+
.${prefix}-result {
|
|
87
|
+
margin-top: ${spacingSearchInputVerticalGap}px;
|
|
88
|
+
padding: ${spacingSearchInputResultPaddingVertical}px 0;
|
|
89
|
+
border: 1px solid ${colorSearchInputBorderStandard};
|
|
90
|
+
background: ${colorSearchInputBackground};
|
|
91
|
+
border-radius: ${import_designTokens.designTokens.borderRadius}px;
|
|
92
|
+
color: ${colorSearchInputTextResults};
|
|
93
|
+
}
|
|
94
|
+
.${prefix}-result li {
|
|
95
|
+
padding: ${spacingSearchInputResultPaddingVertical}px ${spacingSearchInputResultListPaddingRight}px ${spacingSearchInputResultPaddingVertical}px ${spacingSearchInputResultListPaddingLeft}px;
|
|
96
|
+
line-height: 24px;
|
|
97
|
+
}
|
|
98
|
+
.${prefix}-result li:hover {
|
|
99
|
+
background: ${colorSearchInputBackgroundHover};
|
|
100
|
+
}
|
|
101
|
+
.${prefix}-result li a {
|
|
102
|
+
color: ${colorSearchInputTextResults};
|
|
103
|
+
}
|
|
104
|
+
`);
|
|
105
|
+
return hashId;
|
|
106
|
+
};
|
|
107
|
+
useCustomButtonStyle();
|
|
108
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
109
|
+
import_antd.ConfigProvider,
|
|
110
|
+
{
|
|
111
|
+
wave: { disabled: true },
|
|
112
|
+
prefixCls: prefix,
|
|
113
|
+
theme: {
|
|
114
|
+
components: {
|
|
115
|
+
Input: __spreadValues({}, import_designTokens.designTokens)
|
|
116
|
+
},
|
|
117
|
+
cssVar: true,
|
|
118
|
+
hashed: false
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: prefix }, /* @__PURE__ */ import_react.default.createElement(
|
|
122
|
+
import_antd.Input,
|
|
123
|
+
{
|
|
124
|
+
placeholder,
|
|
125
|
+
onChange: (e) => {
|
|
126
|
+
const val = e.target.value || "";
|
|
127
|
+
onSearch(val);
|
|
128
|
+
},
|
|
129
|
+
onPressEnter: (e) => {
|
|
130
|
+
const val = e.target.value || "";
|
|
131
|
+
onEnter(val);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
), /* @__PURE__ */ import_react.default.createElement(import_Icon.default, { className: `${prefix}-icon`, size: 16, name: "icon-Search" }), resultList && /* @__PURE__ */ import_react.default.createElement("div", { className: showResult ? `${prefix}-result ${prefix}-result-show` : `${prefix}-result` }, resultList))
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
var Search_default = Search;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
|
|
3
|
+
// 基础按钮样式
|
|
4
|
+
@components: search;
|
|
5
|
+
|
|
6
|
+
.@{prefix}-@{components} {
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.@{prefix}-@{components}-icon {
|
|
11
|
+
position: absolute;
|
|
12
|
+
line-height: 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.@{prefix}-@{components}-result {
|
|
16
|
+
display: none;
|
|
17
|
+
position: absolute;
|
|
18
|
+
left: 0;
|
|
19
|
+
top: 46px;
|
|
20
|
+
width: 100%;
|
|
21
|
+
z-index: 9;
|
|
22
|
+
ul {
|
|
23
|
+
margin: 0;
|
|
24
|
+
padding: 0;
|
|
25
|
+
li {
|
|
26
|
+
list-style: none;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
.@{prefix}-@{components}-result-show {
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare const designTokens: {
|
|
2
|
+
colorText: any;
|
|
3
|
+
colorTextDescription: any;
|
|
4
|
+
colorTextLightSolid: any;
|
|
5
|
+
colorPrimary: any;
|
|
6
|
+
colorBorderBg: any;
|
|
7
|
+
colorBorderSecondary: any;
|
|
8
|
+
colorSplit: any;
|
|
9
|
+
};
|
|
10
|
+
declare const otherDesignTokens: {
|
|
11
|
+
[x: string]: string;
|
|
12
|
+
'--ant-steps-icon-size': string;
|
|
13
|
+
'--ant-steps-icon-size-sm': string;
|
|
14
|
+
'--dxp-steps-icon-size': string;
|
|
15
|
+
'--dxp-steps-icon-size-sm': string;
|
|
16
|
+
};
|
|
17
|
+
declare const mobileDesignTokens: {
|
|
18
|
+
colorStepperBackgroundActiveWeak: any;
|
|
19
|
+
'--dxp-steps-color-neutral': any;
|
|
20
|
+
'--dxp-steps-color-secondary': any;
|
|
21
|
+
'--dxp-steps-color-label2': any;
|
|
22
|
+
'--dxp-steps-background-active': any;
|
|
23
|
+
'--dxp-steps-background-activeWeak': any;
|
|
24
|
+
};
|
|
25
|
+
export { otherDesignTokens, mobileDesignTokens, };
|
|
26
|
+
export default designTokens;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/Stepper/designTokens.ts
|
|
20
|
+
var designTokens_exports = {};
|
|
21
|
+
__export(designTokens_exports, {
|
|
22
|
+
default: () => designTokens_default,
|
|
23
|
+
mobileDesignTokens: () => mobileDesignTokens,
|
|
24
|
+
otherDesignTokens: () => otherDesignTokens
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(designTokens_exports);
|
|
27
|
+
var import_tokenHelper = require("../../utils/tokenHelper");
|
|
28
|
+
var import_constants = require("../../constants");
|
|
29
|
+
var prefixCls = import_constants.cssClasses.PREFIX + "-stepper";
|
|
30
|
+
var designTokens = {
|
|
31
|
+
// 算法配置
|
|
32
|
+
// algorithm: true,
|
|
33
|
+
// 当前 高亮步骤 text描述|| 已完成步骤的 text 色都是它
|
|
34
|
+
colorText: (0, import_tokenHelper.getToken)("colorStepperTextInactive"),
|
|
35
|
+
// 深灰
|
|
36
|
+
// 未开始的步骤text色 \ text描述色
|
|
37
|
+
colorTextDescription: (0, import_tokenHelper.getToken)("colorStepperTextInactive"),
|
|
38
|
+
// 当前 高亮步骤 icon的 text 色
|
|
39
|
+
colorTextLightSolid: (0, import_tokenHelper.getToken)("colorStepperTextActive"),
|
|
40
|
+
// 白色
|
|
41
|
+
// 高亮步骤 background色
|
|
42
|
+
colorPrimary: (0, import_tokenHelper.getToken)("colorStepperBackgroundActive"),
|
|
43
|
+
// 蓝色
|
|
44
|
+
// 高亮步骤 分割线的颜色 此颜色和 colorPrimary 的颜色一致(自动的)
|
|
45
|
+
// 已完成 background 颜色 无此token 通过less 变量覆盖
|
|
46
|
+
// colorSuccess: getToken('colorStepperBackgroundSuccess'),
|
|
47
|
+
// 未开始 状态 background 颜色 无此token 通过less 变量覆盖
|
|
48
|
+
// processIconBgColor: getToken('colorStepperBackgroundInactive'),
|
|
49
|
+
// 进行中状态 线条颜色
|
|
50
|
+
colorBorderBg: (0, import_tokenHelper.getToken)("colorStepperBorderActive"),
|
|
51
|
+
colorBorderSecondary: (0, import_tokenHelper.getToken)("colorStepperConnectorInactive"),
|
|
52
|
+
// colorSplit 未开始 分割线的颜色,此颜色和 colorBorderSecondary 的颜色一致
|
|
53
|
+
colorSplit: (0, import_tokenHelper.getToken)("colorStepperConnectorInactive")
|
|
54
|
+
// 灰色
|
|
55
|
+
// color.stepper.icon.success
|
|
56
|
+
// fontSize: '14px',
|
|
57
|
+
// fontSizeSM: '14px',
|
|
58
|
+
};
|
|
59
|
+
var otherDesignTokens = {
|
|
60
|
+
// 进行中 步骤条 圈的颜色
|
|
61
|
+
[`--${import_constants.cssClasses.PREFIX}-progress-default-color`]: `${(0, import_tokenHelper.getToken)("colorStepperBorderActive")}`,
|
|
62
|
+
[`--${prefixCls}-progress-default-color`]: `${(0, import_tokenHelper.getToken)("colorStepperBorderActive")}`,
|
|
63
|
+
[`--${prefixCls}-progress-border-width`]: `${(0, import_tokenHelper.getToken)("borderWidthStepperActive")}`,
|
|
64
|
+
[`--${prefixCls}-progress-border-connector`]: `${(0, import_tokenHelper.getToken)("borderWidthStepperConnector")}`,
|
|
65
|
+
// 已完成 步骤条 圈的颜色
|
|
66
|
+
[`--${prefixCls}-finish-icon-bg-color`]: `${(0, import_tokenHelper.getToken)("colorStepperBackgroundSuccess")}`,
|
|
67
|
+
[`--${prefixCls}-finish-icon-border-color`]: `${(0, import_tokenHelper.getToken)("colorStepperBackgroundSuccess")}`,
|
|
68
|
+
[`--${prefixCls}-finish-icon-success`]: `${(0, import_tokenHelper.getToken)("colorStepperIconSuccess")}`,
|
|
69
|
+
[`--${prefixCls}-finish-line-color`]: `${(0, import_tokenHelper.getToken)("colorStepperConnectorSuccess")}`,
|
|
70
|
+
// 未开始 步骤条 圈的颜色
|
|
71
|
+
[`--${prefixCls}-wait-icon-bg-color`]: `${(0, import_tokenHelper.getToken)("colorStepperBackgroundInactive")}`,
|
|
72
|
+
[`--${prefixCls}-wait-icon-border-color`]: `${(0, import_tokenHelper.getToken)("colorStepperBackgroundInactive")}`,
|
|
73
|
+
[`--${prefixCls}-wait-icon-color`]: `${(0, import_tokenHelper.getToken)("colorStepperTextLabel")}`,
|
|
74
|
+
// 进行中状态 线条颜色在上面的token 中
|
|
75
|
+
// colorStepperConnectorInactive
|
|
76
|
+
"--ant-steps-icon-size": (0, import_tokenHelper.getToken)("sizingStepperOuter") + "px",
|
|
77
|
+
"--ant-steps-icon-size-sm": (0, import_tokenHelper.getToken)("sizingStepperInner") + "px",
|
|
78
|
+
"--dxp-steps-icon-size": (0, import_tokenHelper.getToken)("sizingStepperOuter") + "px",
|
|
79
|
+
"--dxp-steps-icon-size-sm": (0, import_tokenHelper.getToken)("sizingStepperInner") + "px"
|
|
80
|
+
};
|
|
81
|
+
var mobileDesignTokens = {
|
|
82
|
+
colorStepperBackgroundActiveWeak: (0, import_tokenHelper.getToken)("colorStepperBackgroundActiveWeak"),
|
|
83
|
+
// moblie
|
|
84
|
+
"--dxp-steps-color-neutral": (0, import_tokenHelper.getToken)("colorStepperTextNeutral"),
|
|
85
|
+
"--dxp-steps-color-secondary": (0, import_tokenHelper.getToken)("colorStepperTextLabel"),
|
|
86
|
+
"--dxp-steps-color-label2": (0, import_tokenHelper.getToken)("colorStepperTextLabel2"),
|
|
87
|
+
"--dxp-steps-background-active": (0, import_tokenHelper.getToken)("colorStepperBackgroundActive"),
|
|
88
|
+
"--dxp-steps-background-activeWeak": (0, import_tokenHelper.getToken)("colorStepperBackgroundActiveWeak")
|
|
89
|
+
};
|
|
90
|
+
var designTokens_default = designTokens;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StepsProps } from 'antd';
|
|
2
|
+
import React, { PureComponent } from 'react';
|
|
3
|
+
import './style/index.less';
|
|
4
|
+
export interface StepperProps extends Omit<StepsProps, 'description'> {
|
|
5
|
+
description?: string;
|
|
6
|
+
prefixCls?: string;
|
|
7
|
+
breakpoint?: 'desktop' | 'mobile';
|
|
8
|
+
percent?: number;
|
|
9
|
+
title?: string;
|
|
10
|
+
labelPlacement?: 'horizontal' | 'vertical';
|
|
11
|
+
nextStepText?: string;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
14
|
+
export default class Stepper extends PureComponent<StepperProps> {
|
|
15
|
+
static defaultProps: {
|
|
16
|
+
prefixCls: string;
|
|
17
|
+
breakpoint: string;
|
|
18
|
+
labelPlacement: string;
|
|
19
|
+
};
|
|
20
|
+
descriptionText: (content: React.ReactNode) => React.JSX.Element;
|
|
21
|
+
render(): React.JSX.Element;
|
|
22
|
+
}
|