@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,230 @@
|
|
|
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/TextInputInside/index.tsx
|
|
56
|
+
var TextInputInside_exports = {};
|
|
57
|
+
__export(TextInputInside_exports, {
|
|
58
|
+
default: () => TextInputInside_default
|
|
59
|
+
});
|
|
60
|
+
module.exports = __toCommonJS(TextInputInside_exports);
|
|
61
|
+
var import_react = __toESM(require("react"));
|
|
62
|
+
var import_antd = require("antd");
|
|
63
|
+
var import_cssinjs = require("@ant-design/cssinjs");
|
|
64
|
+
var import_theme = require("../../utils/theme");
|
|
65
|
+
var import_constants = require("../../constants");
|
|
66
|
+
var import_designTokens = require("./designTokens");
|
|
67
|
+
var import_Text = __toESM(require("../Text"));
|
|
68
|
+
var import_Icon = __toESM(require("../Icon"));
|
|
69
|
+
var import_style = require("./style/index.less");
|
|
70
|
+
var import_lodash = require("lodash");
|
|
71
|
+
var TextInputInside = (props) => {
|
|
72
|
+
const _a = props, { label, message, status, type, image, count, value, disabled } = _a, attr = __objRest(_a, ["label", "message", "status", "type", "image", "count", "value", "disabled"]);
|
|
73
|
+
const {
|
|
74
|
+
paddingInline,
|
|
75
|
+
colorBgContainer,
|
|
76
|
+
borderRadius
|
|
77
|
+
} = import_designTokens.designTokens;
|
|
78
|
+
const {
|
|
79
|
+
paddingBlock,
|
|
80
|
+
colorLabel,
|
|
81
|
+
colorLabelActive,
|
|
82
|
+
colorError,
|
|
83
|
+
colorErrorBorder,
|
|
84
|
+
iconPaddingLeft,
|
|
85
|
+
colorInputIconStandard,
|
|
86
|
+
spacingInputTextHintMessagePaddingTop,
|
|
87
|
+
hoverBorderColor,
|
|
88
|
+
activeBorderColor,
|
|
89
|
+
colorInputTextHintMessage,
|
|
90
|
+
colorInputTextCounter,
|
|
91
|
+
colorInputBackgroundHaze
|
|
92
|
+
} = import_designTokens.otherDesignTokens;
|
|
93
|
+
const inputRef = (0, import_react.useRef)(null);
|
|
94
|
+
const [focus, setFocus] = (0, import_react.useState)(false);
|
|
95
|
+
const [val, setVal] = (0, import_react.useState)("");
|
|
96
|
+
const prefix = `${import_constants.cssClasses.PREFIX}-textInput`;
|
|
97
|
+
const useCustomButtonStyle = () => {
|
|
98
|
+
const hashId = (0, import_cssinjs.useStyleRegister)({
|
|
99
|
+
theme: import_theme.theme,
|
|
100
|
+
token: { baseColor: "blue" },
|
|
101
|
+
path: [`${prefix}`]
|
|
102
|
+
}, () => `
|
|
103
|
+
.${prefix} {
|
|
104
|
+
height: ${paddingBlock * 2 + 24}px;
|
|
105
|
+
background: ${colorBgContainer};
|
|
106
|
+
padding: ${paddingBlock}px ${paddingInline}px;
|
|
107
|
+
border-radius: ${borderRadius}px;
|
|
108
|
+
border: 1px solid #fff;
|
|
109
|
+
}
|
|
110
|
+
.${prefix}:hover {
|
|
111
|
+
border-color: ${hoverBorderColor};
|
|
112
|
+
}
|
|
113
|
+
.${prefix}:active {
|
|
114
|
+
border-color: ${activeBorderColor};
|
|
115
|
+
}
|
|
116
|
+
.${prefix}-label {
|
|
117
|
+
color: ${colorLabel};
|
|
118
|
+
}
|
|
119
|
+
.${prefix}-focus .${prefix}-label {
|
|
120
|
+
top: 7px;
|
|
121
|
+
color: ${colorLabelActive};
|
|
122
|
+
}
|
|
123
|
+
.${prefix}-has-search {
|
|
124
|
+
padding-right: ${paddingInline + iconPaddingLeft + 24}px;
|
|
125
|
+
}
|
|
126
|
+
.${prefix}-focus {
|
|
127
|
+
padding-top: 30px;
|
|
128
|
+
padding-bottom: 10px;
|
|
129
|
+
}
|
|
130
|
+
.${prefix}-error {
|
|
131
|
+
border: 1px solid ${colorErrorBorder};
|
|
132
|
+
}
|
|
133
|
+
.${prefix}-error:hover {
|
|
134
|
+
border-color: ${colorErrorBorder};
|
|
135
|
+
}
|
|
136
|
+
.${prefix}-error:active {
|
|
137
|
+
border-color: ${colorErrorBorder};
|
|
138
|
+
}
|
|
139
|
+
.${prefix}-tips {
|
|
140
|
+
bottom: -${spacingInputTextHintMessagePaddingTop + 18}px;
|
|
141
|
+
color: ${colorInputTextHintMessage};
|
|
142
|
+
}
|
|
143
|
+
.${prefix}-error-tips {
|
|
144
|
+
color: ${colorError};
|
|
145
|
+
}
|
|
146
|
+
.${prefix}-right {
|
|
147
|
+
right: ${paddingInline}px;
|
|
148
|
+
color: ${colorInputIconStandard};
|
|
149
|
+
top: ${paddingBlock}px;
|
|
150
|
+
line-height: 1;
|
|
151
|
+
}
|
|
152
|
+
.${prefix}-count {
|
|
153
|
+
color: ${colorInputTextCounter};
|
|
154
|
+
}
|
|
155
|
+
.${prefix}-disabled {
|
|
156
|
+
background: ${colorInputBackgroundHaze};
|
|
157
|
+
border-color: ${colorInputBackgroundHaze};
|
|
158
|
+
}
|
|
159
|
+
.${prefix}-disabled:hover {
|
|
160
|
+
border-color: ${colorInputBackgroundHaze};
|
|
161
|
+
}
|
|
162
|
+
.${prefix}-disabled:active {
|
|
163
|
+
border-color: ${colorInputBackgroundHaze};
|
|
164
|
+
}
|
|
165
|
+
`);
|
|
166
|
+
return hashId;
|
|
167
|
+
};
|
|
168
|
+
useCustomButtonStyle();
|
|
169
|
+
const error = status === "error" ? `${prefix}-error` : "";
|
|
170
|
+
const disabledStyle = disabled ? `${prefix}-disabled` : "";
|
|
171
|
+
const focusStyle = focus || value ? `${prefix}-focus` : "";
|
|
172
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
173
|
+
import_antd.ConfigProvider,
|
|
174
|
+
{
|
|
175
|
+
wave: { disabled: true },
|
|
176
|
+
prefixCls: prefix,
|
|
177
|
+
theme: {
|
|
178
|
+
components: {
|
|
179
|
+
Input: __spreadValues({}, import_designTokens.designTokens)
|
|
180
|
+
},
|
|
181
|
+
cssVar: true,
|
|
182
|
+
hashed: false
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
186
|
+
"div",
|
|
187
|
+
{
|
|
188
|
+
className: `${prefix} ${focusStyle} ${error} ${disabledStyle}`
|
|
189
|
+
},
|
|
190
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
191
|
+
"span",
|
|
192
|
+
{
|
|
193
|
+
className: `${prefix}-label`,
|
|
194
|
+
onClick: () => {
|
|
195
|
+
inputRef.current.focus({
|
|
196
|
+
cursor: "end"
|
|
197
|
+
});
|
|
198
|
+
setFocus(true);
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
/* @__PURE__ */ import_react.default.createElement(import_Text.default, { size: focus || value ? "ContentC12SemiBold" : "ContentC14Regular" }, label)
|
|
202
|
+
),
|
|
203
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
204
|
+
import_antd.Input,
|
|
205
|
+
__spreadValues({
|
|
206
|
+
className: (0, import_lodash.isEmpty)(type) ? "" : `${prefix}-has-search`,
|
|
207
|
+
onFocus: () => {
|
|
208
|
+
setFocus(true);
|
|
209
|
+
},
|
|
210
|
+
onBlur: () => setFocus(val ? true : false),
|
|
211
|
+
value: val || value,
|
|
212
|
+
onChange: (e) => {
|
|
213
|
+
const newValue = e.target.value;
|
|
214
|
+
if (!count || newValue.length <= count) {
|
|
215
|
+
setVal(newValue);
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
disabled,
|
|
219
|
+
ref: inputRef
|
|
220
|
+
}, attr)
|
|
221
|
+
),
|
|
222
|
+
/* @__PURE__ */ import_react.default.createElement(import_Text.default, { size: "ContentC12Regular", className: status === "error" ? `${prefix}-tips ${prefix}-error-tips` : `${prefix}-tips` }, message),
|
|
223
|
+
type === "search" && /* @__PURE__ */ import_react.default.createElement(import_Icon.default, { className: `${prefix}-right`, size: 24, name: "icon-Search" }),
|
|
224
|
+
type === "link" && /* @__PURE__ */ import_react.default.createElement(import_Text.default, { size: "ContentC14TextLink", className: `${prefix}-right` }, "Link"),
|
|
225
|
+
type === "image" && /* @__PURE__ */ import_react.default.createElement("img", { src: image, alt: "", className: `${prefix}-right` }),
|
|
226
|
+
type === "counter" && /* @__PURE__ */ import_react.default.createElement(import_Text.default, { size: "ContentC12Regular", className: `${prefix}-count` }, (value || val || "").length, "/", count)
|
|
227
|
+
)
|
|
228
|
+
));
|
|
229
|
+
};
|
|
230
|
+
var TextInputInside_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,95 @@
|
|
|
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/TextInputOutside/designTokens.ts
|
|
20
|
+
var designTokens_exports = {};
|
|
21
|
+
__export(designTokens_exports, {
|
|
22
|
+
designFormHorizontalTokens: () => designFormHorizontalTokens,
|
|
23
|
+
designFormTokens: () => designFormTokens,
|
|
24
|
+
designTokens: () => designTokens,
|
|
25
|
+
styleToken: () => styleToken
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(designTokens_exports);
|
|
28
|
+
var import_tokenHelper = require("../../utils/tokenHelper");
|
|
29
|
+
var import_constants = require("../../constants");
|
|
30
|
+
var prefixCls = import_constants.cssClasses.PREFIX + "-input-outside";
|
|
31
|
+
var designTokens = {
|
|
32
|
+
borderRadius: (0, import_tokenHelper.getToken)("borderRadiusInput"),
|
|
33
|
+
// 圆角
|
|
34
|
+
paddingBlock: (0, import_tokenHelper.getToken)("spacinginputpaddingVerticalM"),
|
|
35
|
+
// 纵向内边距
|
|
36
|
+
paddingInline: (0, import_tokenHelper.getToken)("spacingInputPaddingHorizontal"),
|
|
37
|
+
// 横向内边距
|
|
38
|
+
colorText: (0, import_tokenHelper.getToken)("colorInputTextActive"),
|
|
39
|
+
// 内容文本颜色
|
|
40
|
+
hoverBorderColor: (0, import_tokenHelper.getToken)("colorInputBorderActive"),
|
|
41
|
+
// hover边框颜色
|
|
42
|
+
activeBorderColor: (0, import_tokenHelper.getToken)("colorInputBorderActive"),
|
|
43
|
+
// active边框颜色
|
|
44
|
+
activeShadow: "0px 0px 0px 2px #180C8E33",
|
|
45
|
+
// 边框shadow颜色
|
|
46
|
+
colorError: (0, import_tokenHelper.getToken)("colorInputTextError"),
|
|
47
|
+
// 错误信息文本颜色
|
|
48
|
+
colorBgContainer: (0, import_tokenHelper.getToken)("colorInputBackground"),
|
|
49
|
+
// 背景颜色
|
|
50
|
+
borderWidthInputStandard: (0, import_tokenHelper.getToken)("borderWidthInputStandard"),
|
|
51
|
+
// 标准边框宽度
|
|
52
|
+
colorBorder: (0, import_tokenHelper.getToken)("colorInputBorderStandard"),
|
|
53
|
+
// 标准边框颜色
|
|
54
|
+
colorInputTextPlaceholder: (0, import_tokenHelper.getToken)("colorInputTextPlaceholder"),
|
|
55
|
+
// placeholder文本颜色
|
|
56
|
+
fontSize: (0, import_tokenHelper.getToken)("ContentC14Regular"),
|
|
57
|
+
// 字体大小
|
|
58
|
+
colorBgContainerDisabled: (0, import_tokenHelper.getToken)("colorInputBackgroundHaze")
|
|
59
|
+
// 背景颜色
|
|
60
|
+
};
|
|
61
|
+
var designFormTokens = {
|
|
62
|
+
labelRequiredMarkColor: (0, import_tokenHelper.getToken)("colorInputTextError"),
|
|
63
|
+
colorError: (0, import_tokenHelper.getToken)("colorInputTextError"),
|
|
64
|
+
// 错误信息文本颜色
|
|
65
|
+
lineHeight: 24 / (0, import_tokenHelper.getToken)("ContentC14Regular"),
|
|
66
|
+
// 行高
|
|
67
|
+
labelHeight: 24 / (0, import_tokenHelper.getToken)("ContentC14Regular"),
|
|
68
|
+
// 行高
|
|
69
|
+
labelColor: (0, import_tokenHelper.getToken)("colorInputTextLabel"),
|
|
70
|
+
// label文本颜色
|
|
71
|
+
labelFontSize: (0, import_tokenHelper.getToken)("ContentC14Regular"),
|
|
72
|
+
fontSize: (0, import_tokenHelper.getToken)("ContentC14Regular"),
|
|
73
|
+
// 字体大小
|
|
74
|
+
itemMarginBottom: 28
|
|
75
|
+
};
|
|
76
|
+
var designFormHorizontalTokens = {
|
|
77
|
+
verticalLabelPadding: "0 0 8px",
|
|
78
|
+
labelRequiredMarkColor: (0, import_tokenHelper.getToken)("colorInputTextError"),
|
|
79
|
+
colorError: (0, import_tokenHelper.getToken)("colorInputTextError"),
|
|
80
|
+
// 错误信息文本颜色
|
|
81
|
+
labelHeight: `${(0, import_tokenHelper.getToken)("spacinginputpaddingVerticalM") * 2 + 24}px`,
|
|
82
|
+
// label高
|
|
83
|
+
labelColor: (0, import_tokenHelper.getToken)("colorInputTextLabel"),
|
|
84
|
+
// label文本颜色
|
|
85
|
+
lineHeight: 24 / (0, import_tokenHelper.getToken)("ContentC14Regular"),
|
|
86
|
+
// 行高
|
|
87
|
+
labelFontSize: (0, import_tokenHelper.getToken)("ContentC14Regular"),
|
|
88
|
+
fontSize: (0, import_tokenHelper.getToken)("ContentC14Regular"),
|
|
89
|
+
// 字体大小
|
|
90
|
+
itemMarginBottom: 28
|
|
91
|
+
};
|
|
92
|
+
var styleToken = {
|
|
93
|
+
[`--${prefixCls}-color-error-border-hover`]: (0, import_tokenHelper.getToken)("colorInputBorderError")
|
|
94
|
+
// error颜色
|
|
95
|
+
};
|
|
@@ -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,110 @@
|
|
|
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/TextInputOutside/index.tsx
|
|
56
|
+
var TextInputOutside_exports = {};
|
|
57
|
+
__export(TextInputOutside_exports, {
|
|
58
|
+
default: () => TextInputOutside_default
|
|
59
|
+
});
|
|
60
|
+
module.exports = __toCommonJS(TextInputOutside_exports);
|
|
61
|
+
var import_react = __toESM(require("react"));
|
|
62
|
+
var import_antd = require("antd");
|
|
63
|
+
var import_cssinjs = require("@ant-design/cssinjs");
|
|
64
|
+
var import_theme = require("../../utils/theme");
|
|
65
|
+
var import_constants = require("../../constants");
|
|
66
|
+
var import_designTokens = require("./designTokens");
|
|
67
|
+
var import_style = require("./style/index.less");
|
|
68
|
+
var TextInputOutside = (props) => {
|
|
69
|
+
const _a = props, { layout = "horizontal", placeholder, disabled } = _a, attr = __objRest(_a, ["layout", "placeholder", "disabled"]);
|
|
70
|
+
const prefix = `${import_constants.cssClasses.PREFIX}-inputOutside`;
|
|
71
|
+
const useCustomButtonStyle = () => {
|
|
72
|
+
const hashId = (0, import_cssinjs.useStyleRegister)({
|
|
73
|
+
theme: import_theme.theme,
|
|
74
|
+
token: { baseColor: "blue" },
|
|
75
|
+
path: [`${prefix}`]
|
|
76
|
+
}, () => `
|
|
77
|
+
.${prefix}-input {
|
|
78
|
+
height: ${import_designTokens.designTokens.paddingBlock * 2 + 24}px;;
|
|
79
|
+
}
|
|
80
|
+
`);
|
|
81
|
+
return hashId;
|
|
82
|
+
};
|
|
83
|
+
useCustomButtonStyle();
|
|
84
|
+
const customStyle = import_designTokens.styleToken;
|
|
85
|
+
const formDesign = layout === "vertical" ? import_designTokens.designFormTokens : import_designTokens.designFormHorizontalTokens;
|
|
86
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
87
|
+
import_antd.ConfigProvider,
|
|
88
|
+
{
|
|
89
|
+
wave: { disabled: true },
|
|
90
|
+
prefixCls: prefix,
|
|
91
|
+
theme: {
|
|
92
|
+
components: {
|
|
93
|
+
Input: __spreadValues({}, import_designTokens.designTokens),
|
|
94
|
+
Form: __spreadValues({}, formDesign)
|
|
95
|
+
},
|
|
96
|
+
cssVar: true,
|
|
97
|
+
hashed: false
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
101
|
+
import_antd.Form.Item,
|
|
102
|
+
__spreadValues({
|
|
103
|
+
layout,
|
|
104
|
+
className: prefix
|
|
105
|
+
}, attr),
|
|
106
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Input, { placeholder, disabled, style: __spreadValues({}, customStyle) })
|
|
107
|
+
)
|
|
108
|
+
));
|
|
109
|
+
};
|
|
110
|
+
var TextInputOutside_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,45 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/TextLink/designTokens.ts
|
|
30
|
+
var designTokens_exports = {};
|
|
31
|
+
__export(designTokens_exports, {
|
|
32
|
+
default: () => designTokens_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(designTokens_exports);
|
|
35
|
+
var import_tokenManager = __toESM(require("../../utils/tokenManager"));
|
|
36
|
+
var designTokens = {
|
|
37
|
+
spacingTextLinkHorizontalGap: import_tokenManager.default.tokenKey("spacingTextLinkHorizontalGap"),
|
|
38
|
+
sizingTextLinkIconLeft: import_tokenManager.default.tokenKey("sizingTextLinkIconLeft"),
|
|
39
|
+
sizingTextLinkIconRight: import_tokenManager.default.tokenKey("sizingTextLinkIconRight"),
|
|
40
|
+
colorTextLinkTextInverse: import_tokenManager.default.tokenKey("colorTextLinkTextInverse"),
|
|
41
|
+
colorTextLinkText: import_tokenManager.default.tokenKey("colorTextLinkText"),
|
|
42
|
+
colorTextLinkIconInverse: import_tokenManager.default.tokenKey("colorTextLinkIconInverse"),
|
|
43
|
+
colorTextLinkIcon: import_tokenManager.default.tokenKey("colorTextLinkIcon")
|
|
44
|
+
};
|
|
45
|
+
var designTokens_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;
|