@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,59 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import { getToken } from "../../utils/tokenHelper";
|
|
3
|
+
import { cssClasses } from "../../constants";
|
|
4
|
+
var prefixCls = cssClasses.PREFIX + '-modal';
|
|
5
|
+
var designTokens = {
|
|
6
|
+
borderRadius: getToken('borderRadiusInput'),
|
|
7
|
+
// 圆角
|
|
8
|
+
// paddingBlock: getToken('spacingInputPaddingVertical'), // 纵向内边距
|
|
9
|
+
paddingInline: getToken('spacingInputPaddingHorizontal'),
|
|
10
|
+
// 横向内边距
|
|
11
|
+
colorText: getToken('colorInputTextActive'),
|
|
12
|
+
// 内容文本颜色
|
|
13
|
+
colorBorder: 'transparent',
|
|
14
|
+
// 边框颜色
|
|
15
|
+
hoverBorderColor: 'transparent',
|
|
16
|
+
// 边框颜色
|
|
17
|
+
activeBorderColor: 'transparent',
|
|
18
|
+
// 边框颜色
|
|
19
|
+
activeShadow: '',
|
|
20
|
+
// 边框shadow颜色
|
|
21
|
+
colorError: 'transparent',
|
|
22
|
+
// 错误边框颜色
|
|
23
|
+
colorBgContainer: getToken('colorInputBackground'),
|
|
24
|
+
// 背景颜色
|
|
25
|
+
colorBgContainerDisabled: getToken('colorInputBackgroundHaze') // 背景颜色
|
|
26
|
+
};
|
|
27
|
+
var otherDesignTokens = {
|
|
28
|
+
hoverBorderColor: getToken('colorInputBorderActive'),
|
|
29
|
+
// hover边框颜色
|
|
30
|
+
activeBorderColor: getToken('colorInputBorderActive'),
|
|
31
|
+
// active边框颜色
|
|
32
|
+
paddingBlock: getToken('spacingInputPaddingVerticalLg'),
|
|
33
|
+
// 纵向内边距
|
|
34
|
+
colorLabelActive: getToken('colorInputTextLabelActive'),
|
|
35
|
+
// label激活状态的颜色
|
|
36
|
+
colorLabel: getToken('colorInputTextLabel'),
|
|
37
|
+
// label文本颜色
|
|
38
|
+
width: "calc(100vw - ".concat(getToken('spacingModalPaddingHorizontal'), "px - ").concat(getToken('spacingModalPaddingHorizontal'), "px)"),
|
|
39
|
+
// 宽度
|
|
40
|
+
colorError: getToken('colorInputTextError'),
|
|
41
|
+
// 错误信息文本颜色
|
|
42
|
+
iconPaddingLeft: getToken('spacingInputIconPaddingLeft'),
|
|
43
|
+
// 错误信息文本颜色
|
|
44
|
+
colorInputIconStandard: getToken('colorInputIconStandard'),
|
|
45
|
+
// 标准icon颜色
|
|
46
|
+
spacingInputTextHintMessagePaddingTop: getToken('spacingInputTextHintMessagePaddingTop'),
|
|
47
|
+
// 错误信息文本颜色
|
|
48
|
+
colorInputTextHintMessage: getToken('colorInputTextHintMessage'),
|
|
49
|
+
// 信息文本颜色
|
|
50
|
+
colorInputTextCounter: getToken('colorInputTextCounter'),
|
|
51
|
+
// 字数统计文本颜色
|
|
52
|
+
colorErrorBorder: getToken('colorInputBorderError'),
|
|
53
|
+
// error颜色
|
|
54
|
+
colorInputBackgroundHaze: getToken('colorInputBackgroundHaze') // 背景颜色
|
|
55
|
+
};
|
|
56
|
+
var commonToken = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "--".concat(prefixCls, "-header-margin-bottom"), 0), "--".concat(prefixCls, "-footer-margin-top"), 0), "--".concat(prefixCls, "-footer-padding"), "".concat(getToken('spacingModalButtonPaddingTop'), "px 0 0")), "--".concat(prefixCls, "-body-padding"), "".concat(getToken('spacingModalCardVerticalGap'), "px 0"));
|
|
57
|
+
var styleToken = _defineProperty(_defineProperty(_defineProperty({}, "--".concat(prefixCls, "-content-padding"), "".concat(getToken('spacingModalCardPaddingTop'), "px ").concat(getToken('spacingModalCardPaddingHorizontal'), "px ").concat(getToken('spacingModalCardPaddingBottom'), "px ").concat(getToken('spacingModalCardPaddingHorizontal'), "px")), "--".concat(prefixCls, "-footer-border-top"), 'none'), "--".concat(prefixCls, "-footer-padding"), '0px');
|
|
58
|
+
var stickyStyleToken = _defineProperty(_defineProperty(_defineProperty({}, "--".concat(prefixCls, "-content-padding"), "".concat(getToken('spacingModalCardPaddingTop'), "px ").concat(getToken('spacingModalCardPaddingHorizontal'), "px ").concat(40 + getToken('spacingModalButtonStickyPaddingVertical') + getToken('spacingModalButtonStickyPaddingHorizontal'), "px ").concat(getToken('spacingModalCardPaddingHorizontal'), "px")), "--".concat(prefixCls, "-footer-padding"), "".concat(getToken('spacingModalButtonStickyPaddingVertical'), "px ").concat(getToken('spacingModalButtonStickyPaddingHorizontal'), "px")), "--".concat(prefixCls, "-footer-border-top"), '1px solid #E1E1E1');
|
|
59
|
+
export { designTokens, otherDesignTokens, styleToken, stickyStyleToken, commonToken };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style/index.less';
|
|
3
|
+
export type InputType = 'default' | 'search' | 'link' | 'image' | 'counter';
|
|
4
|
+
export interface TextInputInsideProps {
|
|
5
|
+
type?: InputType;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
declare const TextInputInside: (props: TextInputInsideProps) => React.JSX.Element;
|
|
10
|
+
export default TextInputInside;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import "antd/es/config-provider/style";
|
|
2
|
+
import _ConfigProvider from "antd/es/config-provider";
|
|
3
|
+
import "antd/es/input/style";
|
|
4
|
+
import _Input from "antd/es/input";
|
|
5
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
8
|
+
var _excluded = ["label", "message", "status", "type", "image", "count", "value", "disabled"];
|
|
9
|
+
import React, { useState, useRef } from 'react';
|
|
10
|
+
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
11
|
+
import { theme } from "../../utils/theme";
|
|
12
|
+
import { cssClasses } from "../../constants";
|
|
13
|
+
import { designTokens, otherDesignTokens } from "./designTokens";
|
|
14
|
+
import Text from "../Text";
|
|
15
|
+
import Icon from "../Icon";
|
|
16
|
+
import "./style/index.less";
|
|
17
|
+
import { isEmpty } from 'lodash';
|
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
|
+
var TextInputInside = function TextInputInside(props) {
|
|
20
|
+
var label = props.label,
|
|
21
|
+
message = props.message,
|
|
22
|
+
status = props.status,
|
|
23
|
+
type = props.type,
|
|
24
|
+
image = props.image,
|
|
25
|
+
count = props.count,
|
|
26
|
+
value = props.value,
|
|
27
|
+
disabled = props.disabled,
|
|
28
|
+
attr = _objectWithoutProperties(props, _excluded);
|
|
29
|
+
var paddingInline = designTokens.paddingInline,
|
|
30
|
+
colorBgContainer = designTokens.colorBgContainer,
|
|
31
|
+
borderRadius = designTokens.borderRadius;
|
|
32
|
+
var paddingBlock = otherDesignTokens.paddingBlock,
|
|
33
|
+
colorLabel = otherDesignTokens.colorLabel,
|
|
34
|
+
colorLabelActive = otherDesignTokens.colorLabelActive,
|
|
35
|
+
colorError = otherDesignTokens.colorError,
|
|
36
|
+
colorErrorBorder = otherDesignTokens.colorErrorBorder,
|
|
37
|
+
iconPaddingLeft = otherDesignTokens.iconPaddingLeft,
|
|
38
|
+
colorInputIconStandard = otherDesignTokens.colorInputIconStandard,
|
|
39
|
+
spacingInputTextHintMessagePaddingTop = otherDesignTokens.spacingInputTextHintMessagePaddingTop,
|
|
40
|
+
hoverBorderColor = otherDesignTokens.hoverBorderColor,
|
|
41
|
+
activeBorderColor = otherDesignTokens.activeBorderColor,
|
|
42
|
+
colorInputTextHintMessage = otherDesignTokens.colorInputTextHintMessage,
|
|
43
|
+
colorInputTextCounter = otherDesignTokens.colorInputTextCounter,
|
|
44
|
+
colorInputBackgroundHaze = otherDesignTokens.colorInputBackgroundHaze;
|
|
45
|
+
var inputRef = useRef(null);
|
|
46
|
+
var _useState = useState(false),
|
|
47
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
48
|
+
focus = _useState2[0],
|
|
49
|
+
setFocus = _useState2[1];
|
|
50
|
+
var _useState3 = useState(''),
|
|
51
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
52
|
+
val = _useState4[0],
|
|
53
|
+
setVal = _useState4[1];
|
|
54
|
+
var prefix = "".concat(cssClasses.PREFIX, "-textInput");
|
|
55
|
+
var useCustomButtonStyle = function useCustomButtonStyle() {
|
|
56
|
+
var hashId = useStyleRegister({
|
|
57
|
+
theme: theme,
|
|
58
|
+
token: {
|
|
59
|
+
baseColor: 'blue'
|
|
60
|
+
},
|
|
61
|
+
path: ["".concat(prefix)]
|
|
62
|
+
}, function () {
|
|
63
|
+
return "\n .".concat(prefix, " {\n height: ").concat(paddingBlock * 2 + 24, "px;\n background: ").concat(colorBgContainer, ";\n padding: ").concat(paddingBlock, "px ").concat(paddingInline, "px;\n border-radius: ").concat(borderRadius, "px;\n border: 1px solid #fff;\n }\n .").concat(prefix, ":hover {\n border-color: ").concat(hoverBorderColor, ";\n }\n .").concat(prefix, ":active {\n border-color: ").concat(activeBorderColor, ";\n }\n .").concat(prefix, "-label {\n color: ").concat(colorLabel, ";\n }\n .").concat(prefix, "-focus .").concat(prefix, "-label {\n top: 7px;\n color: ").concat(colorLabelActive, ";\n }\n .").concat(prefix, "-has-search {\n padding-right: ").concat(paddingInline + iconPaddingLeft + 24, "px;\n }\n .").concat(prefix, "-focus {\n padding-top: 30px;\n padding-bottom: 10px;\n }\n .").concat(prefix, "-error {\n border: 1px solid ").concat(colorErrorBorder, ";\n }\n .").concat(prefix, "-error:hover {\n border-color: ").concat(colorErrorBorder, ";\n }\n .").concat(prefix, "-error:active {\n border-color: ").concat(colorErrorBorder, ";\n }\n .").concat(prefix, "-tips {\n bottom: -").concat(spacingInputTextHintMessagePaddingTop + 18, "px;\n color: ").concat(colorInputTextHintMessage, ";\n }\n .").concat(prefix, "-error-tips {\n color: ").concat(colorError, ";\n }\n .").concat(prefix, "-right {\n right: ").concat(paddingInline, "px;\n color: ").concat(colorInputIconStandard, ";\n top: ").concat(paddingBlock, "px;\n line-height: 1;\n }\n .").concat(prefix, "-count {\n color: ").concat(colorInputTextCounter, ";\n }\n .").concat(prefix, "-disabled {\n background: ").concat(colorInputBackgroundHaze, ";\n border-color: ").concat(colorInputBackgroundHaze, ";\n }\n .").concat(prefix, "-disabled:hover {\n border-color: ").concat(colorInputBackgroundHaze, ";\n }\n .").concat(prefix, "-disabled:active {\n border-color: ").concat(colorInputBackgroundHaze, ";\n }\n ");
|
|
64
|
+
});
|
|
65
|
+
return hashId;
|
|
66
|
+
};
|
|
67
|
+
useCustomButtonStyle();
|
|
68
|
+
var error = status === 'error' ? "".concat(prefix, "-error") : '';
|
|
69
|
+
var disabledStyle = disabled ? "".concat(prefix, "-disabled") : '';
|
|
70
|
+
var focusStyle = focus || value ? "".concat(prefix, "-focus") : '';
|
|
71
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
72
|
+
children: /*#__PURE__*/_jsx(_ConfigProvider, {
|
|
73
|
+
wave: {
|
|
74
|
+
disabled: true
|
|
75
|
+
},
|
|
76
|
+
prefixCls: prefix,
|
|
77
|
+
theme: {
|
|
78
|
+
components: {
|
|
79
|
+
Input: _objectSpread({}, designTokens)
|
|
80
|
+
},
|
|
81
|
+
cssVar: true,
|
|
82
|
+
hashed: false
|
|
83
|
+
},
|
|
84
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
85
|
+
className: "".concat(prefix, " ").concat(focusStyle, " ").concat(error, " ").concat(disabledStyle),
|
|
86
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
87
|
+
className: "".concat(prefix, "-label"),
|
|
88
|
+
onClick: function onClick() {
|
|
89
|
+
inputRef.current.focus({
|
|
90
|
+
cursor: 'end'
|
|
91
|
+
});
|
|
92
|
+
setFocus(true);
|
|
93
|
+
},
|
|
94
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
95
|
+
size: focus || value ? 'ContentC12SemiBold' : 'ContentC14Regular',
|
|
96
|
+
children: label
|
|
97
|
+
})
|
|
98
|
+
}), /*#__PURE__*/_jsx(_Input, _objectSpread({
|
|
99
|
+
className: isEmpty(type) ? '' : "".concat(prefix, "-has-search"),
|
|
100
|
+
onFocus: function onFocus() {
|
|
101
|
+
setFocus(true);
|
|
102
|
+
},
|
|
103
|
+
onBlur: function onBlur() {
|
|
104
|
+
return setFocus(val ? true : false);
|
|
105
|
+
},
|
|
106
|
+
value: val || value,
|
|
107
|
+
onChange: function onChange(e) {
|
|
108
|
+
var newValue = e.target.value;
|
|
109
|
+
// 检查是否存在 count 属性且新值长度是否超过 count
|
|
110
|
+
if (!count || newValue.length <= count) {
|
|
111
|
+
setVal(newValue);
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
disabled: disabled,
|
|
115
|
+
ref: inputRef
|
|
116
|
+
}, attr)), /*#__PURE__*/_jsx(Text, {
|
|
117
|
+
size: "ContentC12Regular",
|
|
118
|
+
className: status === 'error' ? "".concat(prefix, "-tips ").concat(prefix, "-error-tips") : "".concat(prefix, "-tips"),
|
|
119
|
+
children: message
|
|
120
|
+
}), type === 'search' && /*#__PURE__*/_jsx(Icon, {
|
|
121
|
+
className: "".concat(prefix, "-right"),
|
|
122
|
+
size: 24,
|
|
123
|
+
name: "icon-Search"
|
|
124
|
+
}), type === 'link' && /*#__PURE__*/_jsx(Text, {
|
|
125
|
+
size: "ContentC14TextLink",
|
|
126
|
+
className: "".concat(prefix, "-right"),
|
|
127
|
+
children: "Link"
|
|
128
|
+
}), type === 'image' && /*#__PURE__*/_jsx("img", {
|
|
129
|
+
src: image,
|
|
130
|
+
alt: "",
|
|
131
|
+
className: "".concat(prefix, "-right")
|
|
132
|
+
}), type === 'counter' && /*#__PURE__*/_jsxs(Text, {
|
|
133
|
+
size: "ContentC12Regular",
|
|
134
|
+
className: "".concat(prefix, "-count"),
|
|
135
|
+
children: [(value || val || '').length, "/", count]
|
|
136
|
+
})]
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
export default TextInputInside;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
|
|
3
|
+
// 基础按钮样式
|
|
4
|
+
@components: textInput;
|
|
5
|
+
|
|
6
|
+
// 使用字符串拼接
|
|
7
|
+
.@{prefix}-@{components} {
|
|
8
|
+
position: relative;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
margin-bottom: 22px;
|
|
11
|
+
.@{prefix}-@{components}-label {
|
|
12
|
+
position: absolute;
|
|
13
|
+
z-index: 1;
|
|
14
|
+
}
|
|
15
|
+
.@{prefix}-@{components}-input {
|
|
16
|
+
height: 24px;
|
|
17
|
+
padding: 0;
|
|
18
|
+
}
|
|
19
|
+
.@{prefix}-@{components}-right {
|
|
20
|
+
position: absolute;
|
|
21
|
+
z-index: 1;
|
|
22
|
+
}
|
|
23
|
+
.@{prefix}-@{components}-tips {
|
|
24
|
+
position: absolute;
|
|
25
|
+
left: 0;
|
|
26
|
+
padding-top: 4px;
|
|
27
|
+
}
|
|
28
|
+
.@{prefix}-@{components}-count {
|
|
29
|
+
position: absolute;
|
|
30
|
+
right: 0;
|
|
31
|
+
bottom: -22px;
|
|
32
|
+
}
|
|
33
|
+
img {
|
|
34
|
+
height: 24px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const designTokens: {
|
|
2
|
+
borderRadius: any;
|
|
3
|
+
paddingBlock: any;
|
|
4
|
+
paddingInline: any;
|
|
5
|
+
colorText: any;
|
|
6
|
+
hoverBorderColor: any;
|
|
7
|
+
activeBorderColor: any;
|
|
8
|
+
activeShadow: string;
|
|
9
|
+
colorError: any;
|
|
10
|
+
colorBgContainer: any;
|
|
11
|
+
borderWidthInputStandard: any;
|
|
12
|
+
colorBorder: any;
|
|
13
|
+
colorInputTextPlaceholder: any;
|
|
14
|
+
fontSize: any;
|
|
15
|
+
colorBgContainerDisabled: any;
|
|
16
|
+
};
|
|
17
|
+
declare const designFormTokens: {
|
|
18
|
+
labelRequiredMarkColor: any;
|
|
19
|
+
colorError: any;
|
|
20
|
+
lineHeight: number;
|
|
21
|
+
labelHeight: number;
|
|
22
|
+
labelColor: any;
|
|
23
|
+
labelFontSize: any;
|
|
24
|
+
fontSize: any;
|
|
25
|
+
itemMarginBottom: number;
|
|
26
|
+
};
|
|
27
|
+
declare const designFormHorizontalTokens: {
|
|
28
|
+
verticalLabelPadding: string;
|
|
29
|
+
labelRequiredMarkColor: any;
|
|
30
|
+
colorError: any;
|
|
31
|
+
labelHeight: string;
|
|
32
|
+
labelColor: any;
|
|
33
|
+
lineHeight: number;
|
|
34
|
+
labelFontSize: any;
|
|
35
|
+
fontSize: any;
|
|
36
|
+
itemMarginBottom: number;
|
|
37
|
+
};
|
|
38
|
+
declare const styleToken: {
|
|
39
|
+
[x: string]: any;
|
|
40
|
+
};
|
|
41
|
+
export { designTokens, designFormTokens, designFormHorizontalTokens, styleToken };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import { getToken } from "../../utils/tokenHelper";
|
|
3
|
+
import { cssClasses } from "../../constants";
|
|
4
|
+
var prefixCls = cssClasses.PREFIX + '-input-outside';
|
|
5
|
+
var designTokens = {
|
|
6
|
+
borderRadius: getToken('borderRadiusInput'),
|
|
7
|
+
// 圆角
|
|
8
|
+
paddingBlock: getToken('spacinginputpaddingVerticalM'),
|
|
9
|
+
// 纵向内边距
|
|
10
|
+
paddingInline: getToken('spacingInputPaddingHorizontal'),
|
|
11
|
+
// 横向内边距
|
|
12
|
+
colorText: getToken('colorInputTextActive'),
|
|
13
|
+
// 内容文本颜色
|
|
14
|
+
hoverBorderColor: getToken('colorInputBorderActive'),
|
|
15
|
+
// hover边框颜色
|
|
16
|
+
activeBorderColor: getToken('colorInputBorderActive'),
|
|
17
|
+
// active边框颜色
|
|
18
|
+
activeShadow: '0px 0px 0px 2px #180C8E33',
|
|
19
|
+
// 边框shadow颜色
|
|
20
|
+
colorError: getToken('colorInputTextError'),
|
|
21
|
+
// 错误信息文本颜色
|
|
22
|
+
colorBgContainer: getToken('colorInputBackground'),
|
|
23
|
+
// 背景颜色
|
|
24
|
+
borderWidthInputStandard: getToken('borderWidthInputStandard'),
|
|
25
|
+
// 标准边框宽度
|
|
26
|
+
colorBorder: getToken('colorInputBorderStandard'),
|
|
27
|
+
// 标准边框颜色
|
|
28
|
+
colorInputTextPlaceholder: getToken('colorInputTextPlaceholder'),
|
|
29
|
+
// placeholder文本颜色
|
|
30
|
+
fontSize: getToken('ContentC14Regular'),
|
|
31
|
+
// 字体大小
|
|
32
|
+
colorBgContainerDisabled: getToken('colorInputBackgroundHaze') // 背景颜色
|
|
33
|
+
};
|
|
34
|
+
var designFormTokens = {
|
|
35
|
+
labelRequiredMarkColor: getToken('colorInputTextError'),
|
|
36
|
+
colorError: getToken('colorInputTextError'),
|
|
37
|
+
// 错误信息文本颜色
|
|
38
|
+
lineHeight: 24 / getToken('ContentC14Regular'),
|
|
39
|
+
// 行高
|
|
40
|
+
labelHeight: 24 / getToken('ContentC14Regular'),
|
|
41
|
+
// 行高
|
|
42
|
+
labelColor: getToken('colorInputTextLabel'),
|
|
43
|
+
// label文本颜色
|
|
44
|
+
labelFontSize: getToken('ContentC14Regular'),
|
|
45
|
+
fontSize: getToken('ContentC14Regular'),
|
|
46
|
+
// 字体大小
|
|
47
|
+
itemMarginBottom: 28
|
|
48
|
+
};
|
|
49
|
+
var designFormHorizontalTokens = {
|
|
50
|
+
verticalLabelPadding: '0 0 8px',
|
|
51
|
+
labelRequiredMarkColor: getToken('colorInputTextError'),
|
|
52
|
+
colorError: getToken('colorInputTextError'),
|
|
53
|
+
// 错误信息文本颜色
|
|
54
|
+
labelHeight: "".concat(getToken('spacinginputpaddingVerticalM') * 2 + 24, "px"),
|
|
55
|
+
// label高
|
|
56
|
+
labelColor: getToken('colorInputTextLabel'),
|
|
57
|
+
// label文本颜色
|
|
58
|
+
lineHeight: 24 / getToken('ContentC14Regular'),
|
|
59
|
+
// 行高
|
|
60
|
+
labelFontSize: getToken('ContentC14Regular'),
|
|
61
|
+
fontSize: getToken('ContentC14Regular'),
|
|
62
|
+
// 字体大小
|
|
63
|
+
itemMarginBottom: 28
|
|
64
|
+
};
|
|
65
|
+
// --dxp-input-outside-line-height
|
|
66
|
+
var styleToken = _defineProperty({}, "--".concat(prefixCls, "-color-error-border-hover"), getToken('colorInputBorderError'));
|
|
67
|
+
export { designTokens, designFormTokens, designFormHorizontalTokens, styleToken };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style/index.less';
|
|
3
|
+
type FieldType = {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
export type InputType = 'default' | 'search' | 'link' | 'image' | 'counter';
|
|
7
|
+
export interface TextInputOutsideProps {
|
|
8
|
+
name: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
rules?: FieldType[];
|
|
11
|
+
layout?: 'vertical' | 'horizontal';
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
type?: InputType;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
declare const TextInputOutside: (props: TextInputOutsideProps) => React.JSX.Element;
|
|
18
|
+
export default TextInputOutside;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import "antd/es/config-provider/style";
|
|
2
|
+
import _ConfigProvider from "antd/es/config-provider";
|
|
3
|
+
import "antd/es/form/style";
|
|
4
|
+
import _Form from "antd/es/form";
|
|
5
|
+
import "antd/es/input/style";
|
|
6
|
+
import _Input from "antd/es/input";
|
|
7
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
8
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
9
|
+
var _excluded = ["layout", "placeholder", "disabled"];
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
12
|
+
import { theme } from "../../utils/theme";
|
|
13
|
+
import { cssClasses } from "../../constants";
|
|
14
|
+
import { designTokens, designFormTokens, designFormHorizontalTokens, styleToken } from "./designTokens";
|
|
15
|
+
import "./style/index.less";
|
|
16
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
17
|
+
var TextInputOutside = function TextInputOutside(props) {
|
|
18
|
+
var _props$layout = props.layout,
|
|
19
|
+
layout = _props$layout === void 0 ? 'horizontal' : _props$layout,
|
|
20
|
+
placeholder = props.placeholder,
|
|
21
|
+
disabled = props.disabled,
|
|
22
|
+
attr = _objectWithoutProperties(props, _excluded);
|
|
23
|
+
var prefix = "".concat(cssClasses.PREFIX, "-inputOutside");
|
|
24
|
+
var useCustomButtonStyle = function useCustomButtonStyle() {
|
|
25
|
+
var hashId = useStyleRegister({
|
|
26
|
+
theme: theme,
|
|
27
|
+
token: {
|
|
28
|
+
baseColor: 'blue'
|
|
29
|
+
},
|
|
30
|
+
path: ["".concat(prefix)]
|
|
31
|
+
}, function () {
|
|
32
|
+
return "\n .".concat(prefix, "-input {\n height: ").concat(designTokens.paddingBlock * 2 + 24, "px;;\n }\n ");
|
|
33
|
+
});
|
|
34
|
+
return hashId;
|
|
35
|
+
};
|
|
36
|
+
useCustomButtonStyle();
|
|
37
|
+
var customStyle = styleToken;
|
|
38
|
+
var formDesign = layout === 'vertical' ? designFormTokens : designFormHorizontalTokens;
|
|
39
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
40
|
+
children: /*#__PURE__*/_jsx(_ConfigProvider, {
|
|
41
|
+
wave: {
|
|
42
|
+
disabled: true
|
|
43
|
+
},
|
|
44
|
+
prefixCls: prefix,
|
|
45
|
+
theme: {
|
|
46
|
+
components: {
|
|
47
|
+
Input: _objectSpread({}, designTokens),
|
|
48
|
+
Form: _objectSpread({}, formDesign)
|
|
49
|
+
},
|
|
50
|
+
cssVar: true,
|
|
51
|
+
hashed: false
|
|
52
|
+
},
|
|
53
|
+
children: /*#__PURE__*/_jsx(_Form.Item, _objectSpread(_objectSpread({
|
|
54
|
+
layout: layout,
|
|
55
|
+
className: prefix
|
|
56
|
+
}, attr), {}, {
|
|
57
|
+
children: /*#__PURE__*/_jsx(_Input, {
|
|
58
|
+
placeholder: placeholder,
|
|
59
|
+
disabled: disabled,
|
|
60
|
+
style: _objectSpread({}, customStyle)
|
|
61
|
+
})
|
|
62
|
+
}))
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
export default TextInputOutside;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const designTokens: {
|
|
2
|
+
spacingTextLinkHorizontalGap: any;
|
|
3
|
+
sizingTextLinkIconLeft: any;
|
|
4
|
+
sizingTextLinkIconRight: any;
|
|
5
|
+
colorTextLinkTextInverse: any;
|
|
6
|
+
colorTextLinkText: any;
|
|
7
|
+
colorTextLinkIconInverse: any;
|
|
8
|
+
colorTextLinkIcon: any;
|
|
9
|
+
};
|
|
10
|
+
export default designTokens;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import TokenManager from "../../utils/tokenManager";
|
|
2
|
+
var designTokens = {
|
|
3
|
+
spacingTextLinkHorizontalGap: TokenManager.tokenKey('spacingTextLinkHorizontalGap'),
|
|
4
|
+
sizingTextLinkIconLeft: TokenManager.tokenKey('sizingTextLinkIconLeft'),
|
|
5
|
+
sizingTextLinkIconRight: TokenManager.tokenKey('sizingTextLinkIconRight'),
|
|
6
|
+
colorTextLinkTextInverse: TokenManager.tokenKey('colorTextLinkTextInverse'),
|
|
7
|
+
colorTextLinkText: TokenManager.tokenKey('colorTextLinkText'),
|
|
8
|
+
colorTextLinkIconInverse: TokenManager.tokenKey('colorTextLinkIconInverse'),
|
|
9
|
+
colorTextLinkIcon: TokenManager.tokenKey('colorTextLinkIcon')
|
|
10
|
+
};
|
|
11
|
+
export default designTokens;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const TextLinkEnum: {
|
|
3
|
+
readonly default: "default";
|
|
4
|
+
readonly withLeftIcon: "withLeftIcon";
|
|
5
|
+
readonly withRightIcon: "withRightIcon";
|
|
6
|
+
readonly inlineParagraph: "inlineParagraph";
|
|
7
|
+
};
|
|
8
|
+
export type TextLinkType = typeof TextLinkEnum[keyof typeof TextLinkEnum];
|
|
9
|
+
export interface ITextLinkProps {
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
type: TextLinkType;
|
|
12
|
+
iconName?: string;
|
|
13
|
+
iconSize?: string | number;
|
|
14
|
+
text?: string;
|
|
15
|
+
inverse?: boolean;
|
|
16
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const TextLink: (props: ITextLinkProps) => React.JSX.Element;
|
|
20
|
+
export default TextLink;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["text", "style", "iconName", "iconSize", "type", "inverse", "onClick", "className"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import Text from "../Text";
|
|
6
|
+
import Icon from "../Icon";
|
|
7
|
+
import designTokens from "./designTokens";
|
|
8
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
export var TextLinkEnum = {
|
|
10
|
+
default: 'default',
|
|
11
|
+
withLeftIcon: 'withLeftIcon',
|
|
12
|
+
withRightIcon: 'withRightIcon',
|
|
13
|
+
inlineParagraph: 'inlineParagraph'
|
|
14
|
+
};
|
|
15
|
+
;
|
|
16
|
+
var TextLink = function TextLink(props) {
|
|
17
|
+
var text = props.text,
|
|
18
|
+
style = props.style,
|
|
19
|
+
iconName = props.iconName,
|
|
20
|
+
iconSize = props.iconSize,
|
|
21
|
+
_props$type = props.type,
|
|
22
|
+
type = _props$type === void 0 ? TextLinkEnum.default : _props$type,
|
|
23
|
+
_props$inverse = props.inverse,
|
|
24
|
+
inverse = _props$inverse === void 0 ? false : _props$inverse,
|
|
25
|
+
onClick = props.onClick,
|
|
26
|
+
className = props.className,
|
|
27
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
28
|
+
var spacingTextLinkHorizontalGap = designTokens.spacingTextLinkHorizontalGap,
|
|
29
|
+
sizingTextLinkIconLeft = designTokens.sizingTextLinkIconLeft,
|
|
30
|
+
sizingTextLinkIconRight = designTokens.sizingTextLinkIconRight,
|
|
31
|
+
colorTextLinkTextInverse = designTokens.colorTextLinkTextInverse,
|
|
32
|
+
colorTextLinkText = designTokens.colorTextLinkText,
|
|
33
|
+
colorTextLinkIconInverse = designTokens.colorTextLinkIconInverse,
|
|
34
|
+
colorTextLinkIcon = designTokens.colorTextLinkIcon;
|
|
35
|
+
var colorTextLinkText_ = inverse ? colorTextLinkTextInverse : colorTextLinkText;
|
|
36
|
+
var colorTextLinkIcon_ = inverse ? colorTextLinkIconInverse : colorTextLinkIcon;
|
|
37
|
+
var sizingTextLinkIcon = iconSize || 0;
|
|
38
|
+
if (type === TextLinkEnum.withLeftIcon) {
|
|
39
|
+
sizingTextLinkIcon = sizingTextLinkIconLeft;
|
|
40
|
+
} else if (type === TextLinkEnum.withRightIcon) {
|
|
41
|
+
sizingTextLinkIcon = sizingTextLinkIconRight;
|
|
42
|
+
}
|
|
43
|
+
var renderText = function renderText() {
|
|
44
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
45
|
+
size: "ContentC14TextLink",
|
|
46
|
+
style: {
|
|
47
|
+
color: colorTextLinkText_
|
|
48
|
+
},
|
|
49
|
+
children: text
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
var renderIcon = function renderIcon() {
|
|
53
|
+
if (iconName) {
|
|
54
|
+
return /*#__PURE__*/_jsx(Icon, {
|
|
55
|
+
name: iconName,
|
|
56
|
+
size: sizingTextLinkIcon,
|
|
57
|
+
color: colorTextLinkIcon_,
|
|
58
|
+
style: type === TextLinkEnum.withLeftIcon ? {
|
|
59
|
+
marginRight: spacingTextLinkHorizontalGap
|
|
60
|
+
} : {
|
|
61
|
+
marginLeft: spacingTextLinkHorizontalGap
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
};
|
|
67
|
+
var renderContent = function renderContent(type) {
|
|
68
|
+
switch (type) {
|
|
69
|
+
case TextLinkEnum.withLeftIcon:
|
|
70
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
71
|
+
children: [renderIcon(), renderText()]
|
|
72
|
+
});
|
|
73
|
+
case TextLinkEnum.withRightIcon:
|
|
74
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
75
|
+
children: [renderText(), renderIcon()]
|
|
76
|
+
});
|
|
77
|
+
case TextLinkEnum.inlineParagraph:
|
|
78
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
79
|
+
children: [renderText(), renderIcon()]
|
|
80
|
+
});
|
|
81
|
+
default:
|
|
82
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
83
|
+
children: renderText()
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
return /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread({
|
|
88
|
+
style: style,
|
|
89
|
+
onClick: onClick,
|
|
90
|
+
className: "".concat(className || '')
|
|
91
|
+
}, restProps), {}, {
|
|
92
|
+
children: renderContent(type)
|
|
93
|
+
}));
|
|
94
|
+
};
|
|
95
|
+
export default TextLink;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const designTokens: {
|
|
2
|
+
colorText: any;
|
|
3
|
+
contentBg: any;
|
|
4
|
+
borderRadiusLG: any;
|
|
5
|
+
colorWarning: string;
|
|
6
|
+
colorSuccess: string;
|
|
7
|
+
colorInfo: string;
|
|
8
|
+
horizontalGap: string;
|
|
9
|
+
contentPadding: string;
|
|
10
|
+
colorLinkText: any;
|
|
11
|
+
sizingToastIcon: any;
|
|
12
|
+
};
|
|
13
|
+
export { designTokens };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getToken } from "../../utils/tokenHelper";
|
|
2
|
+
var designTokens = {
|
|
3
|
+
// 算法配置
|
|
4
|
+
// algorithm: true,
|
|
5
|
+
|
|
6
|
+
colorText: getToken('colorToastTextInverse'),
|
|
7
|
+
contentBg: getToken('colorToastBackground'),
|
|
8
|
+
borderRadiusLG: getToken('borderRadiusCardSm'),
|
|
9
|
+
colorWarning: "rgb(255,181,36)",
|
|
10
|
+
colorSuccess: "rgb(0,179,121)",
|
|
11
|
+
// 成功状态的颜色
|
|
12
|
+
colorInfo: "rgb(255,93,118)",
|
|
13
|
+
horizontalGap: "".concat(getToken('spacingToastPaddingHorizontal'), "px"),
|
|
14
|
+
contentPadding: "".concat(getToken('spacingToastPaddingHorizontal'), "px ").concat(getToken('spacingToastPaddingVertical'), "px"),
|
|
15
|
+
colorLinkText: getToken('colorToastTextLinkInverse'),
|
|
16
|
+
sizingToastIcon: getToken('sizingToastIcon')
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// export default designTokens;
|
|
20
|
+
export { designTokens };
|