@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.
Files changed (417) hide show
  1. package/README.md +151 -11
  2. package/es/assets/iconFont/demo.css +539 -0
  3. package/es/assets/iconFont/demo_index.html +4400 -0
  4. package/es/assets/iconFont/iconfont.css +22 -6
  5. package/es/assets/iconFont/iconfont.eot +0 -0
  6. package/es/assets/iconFont/iconfont.json +28 -0
  7. package/es/assets/iconFont/iconfont.svg +8 -0
  8. package/es/assets/iconFont/iconfont.ttf +0 -0
  9. package/es/assets/iconFont/iconfont.woff +0 -0
  10. package/es/assets/iconFont/iconfont.woff2 +0 -0
  11. package/es/assets/react.svg +1 -0
  12. package/es/assets/token.json +902 -238
  13. package/es/components/Accordion/designTokens.d.ts +11 -0
  14. package/es/components/Accordion/designTokens.js +16 -0
  15. package/es/components/Accordion/index.d.ts +21 -0
  16. package/es/components/Accordion/index.js +77 -0
  17. package/es/components/Accordion/style/index.less +14 -0
  18. package/es/components/Accordion/style/variables.less +4 -0
  19. package/es/components/Amount/designTokens.d.ts +6 -0
  20. package/es/components/Amount/designTokens.js +9 -0
  21. package/es/components/Amount/index.d.ts +23 -0
  22. package/es/components/Amount/index.js +144 -0
  23. package/es/components/Amount/style/index.less +10 -0
  24. package/es/components/Amount/style/variables.less +4 -0
  25. package/es/components/Button/designTokens.js +6 -7
  26. package/es/components/Button/index.d.ts +17 -22
  27. package/es/components/Button/index.js +85 -46
  28. package/es/components/Button/style/{button.less → index.less} +6 -2
  29. package/es/components/Chip/designTokens.d.ts +15 -0
  30. package/es/components/Chip/designTokens.js +22 -0
  31. package/es/components/Chip/index.d.ts +13 -0
  32. package/es/components/Chip/index.js +98 -0
  33. package/es/components/Chip/style/index.less +9 -0
  34. package/es/components/Chip/style/variables.less +4 -0
  35. package/es/components/Divider/index.d.ts +16 -0
  36. package/es/components/Divider/index.js +55 -0
  37. package/es/components/Divider/style/index.less +78 -0
  38. package/es/components/Divider/style/variables.less +4 -0
  39. package/es/components/Drawer/designTokens.d.ts +16 -0
  40. package/es/components/Drawer/designTokens.js +27 -0
  41. package/es/components/Drawer/index.d.ts +21 -0
  42. package/es/components/Drawer/index.js +189 -0
  43. package/es/components/Drawer/style/index.less +73 -0
  44. package/es/components/Drawer/style/variables.less +8 -0
  45. package/es/components/Icon/Icon.d.ts +9 -0
  46. package/es/components/Icon/Icon.js +18 -0
  47. package/es/components/Icon/designTokens.d.ts +6 -0
  48. package/es/components/Icon/designTokens.js +7 -0
  49. package/es/components/Icon/index.d.ts +12 -0
  50. package/es/components/Icon/index.js +29 -0
  51. package/es/components/IconButton/designTokens.d.ts +21 -0
  52. package/es/components/IconButton/designTokens.js +39 -0
  53. package/es/components/IconButton/index.d.ts +24 -0
  54. package/es/components/IconButton/index.js +106 -0
  55. package/es/components/IconButton/style/index.less +59 -0
  56. package/es/components/IconButton/style/variables.less +5 -0
  57. package/es/components/IconButtonGroup/index.d.ts +15 -0
  58. package/es/components/IconButtonGroup/index.js +22 -0
  59. package/es/components/Image/index.d.ts +12 -0
  60. package/es/components/Image/index.js +33 -0
  61. package/es/components/ListItem/designTokens.d.ts +30 -0
  62. package/es/components/ListItem/designTokens.js +31 -0
  63. package/es/components/ListItem/index.d.ts +60 -0
  64. package/es/components/ListItem/index.js +227 -0
  65. package/es/components/ListItem/style/index.less +77 -0
  66. package/es/components/ListItem/style/variables.less +1 -0
  67. package/es/components/Modal/designTokens.d.ts +31 -0
  68. package/es/components/Modal/designTokens.js +35 -0
  69. package/es/components/Modal/index.d.ts +14 -0
  70. package/es/components/Modal/index.js +101 -0
  71. package/es/components/Modal/style/index.less +92 -0
  72. package/es/components/Modal/style/variables.less +5 -0
  73. package/es/components/Navigation/designTokens.d.ts +16 -0
  74. package/es/components/Navigation/designTokens.js +19 -0
  75. package/es/components/Navigation/index.d.ts +31 -0
  76. package/es/components/Navigation/index.js +110 -0
  77. package/es/components/Navigation/style/index.less +52 -0
  78. package/es/components/Navigation/style/variables.less +1 -0
  79. package/es/components/Search/designTokens.d.ts +34 -0
  80. package/es/components/Search/designTokens.js +51 -0
  81. package/es/components/Search/index.d.ts +13 -0
  82. package/es/components/Search/index.js +85 -0
  83. package/es/components/Search/style/index.less +32 -0
  84. package/es/components/Search/style/variables.less +5 -0
  85. package/es/components/Stepper/designTokens.d.ts +26 -0
  86. package/es/components/Stepper/designTokens.js +60 -0
  87. package/es/components/Stepper/index.d.ts +22 -0
  88. package/es/components/Stepper/index.js +153 -0
  89. package/es/components/Stepper/style/index.less +140 -0
  90. package/es/components/Stepper/style/variables.less +5 -0
  91. package/es/components/StickyFooter/designTokens.d.ts +10 -0
  92. package/es/components/StickyFooter/designTokens.js +17 -0
  93. package/es/components/StickyFooter/index.d.ts +17 -0
  94. package/es/components/StickyFooter/index.js +83 -0
  95. package/es/components/StickyFooter/style/index.less +18 -0
  96. package/es/components/StickyFooter/style/variables.less +4 -0
  97. package/es/components/Tabs/designTokens.d.ts +44 -0
  98. package/es/components/Tabs/designTokens.js +64 -0
  99. package/es/components/Tabs/index.d.ts +14 -0
  100. package/es/components/Tabs/index.js +102 -0
  101. package/es/components/Tabs/style/index.less +25 -0
  102. package/es/components/Tabs/style/variables.less +4 -0
  103. package/es/components/Tag/designTokens.d.ts +90 -0
  104. package/es/components/Tag/designTokens.js +124 -0
  105. package/es/components/Tag/index.d.ts +15 -0
  106. package/es/components/Tag/index.js +85 -0
  107. package/es/components/Tag/style/index.less +9 -0
  108. package/es/components/Tag/style/variables.less +4 -0
  109. package/es/components/Text/designTokens.d.ts +51 -0
  110. package/es/components/Text/designTokens.js +52 -0
  111. package/es/components/Text/index.d.ts +6 -25
  112. package/es/components/Text/index.js +69 -56
  113. package/es/components/Text/style/index.less +2 -0
  114. package/es/components/TextInputInside/designTokens.d.ts +38 -0
  115. package/es/components/TextInputInside/designTokens.js +59 -0
  116. package/es/components/TextInputInside/index.d.ts +10 -0
  117. package/es/components/TextInputInside/index.js +141 -0
  118. package/es/components/TextInputInside/style/index.less +36 -0
  119. package/es/components/TextInputInside/style/variables.less +5 -0
  120. package/es/components/TextInputOutside/designTokens.d.ts +41 -0
  121. package/es/components/TextInputOutside/designTokens.js +67 -0
  122. package/es/components/TextInputOutside/index.d.ts +18 -0
  123. package/es/components/TextInputOutside/index.js +66 -0
  124. package/es/components/TextInputOutside/style/index.less +4 -0
  125. package/es/components/TextInputOutside/style/variables.less +5 -0
  126. package/es/components/TextLink/designTokens.d.ts +10 -0
  127. package/es/components/TextLink/designTokens.js +11 -0
  128. package/es/components/TextLink/index.d.ts +20 -0
  129. package/es/components/TextLink/index.js +95 -0
  130. package/es/components/Toast/designTokens.d.ts +13 -0
  131. package/es/components/Toast/designTokens.js +20 -0
  132. package/es/components/Toast/index.d.ts +26 -0
  133. package/es/components/Toast/index.js +175 -0
  134. package/es/components/Toast/style/index.less +9 -0
  135. package/es/components/Toast/style/variables.less +12 -0
  136. package/es/components/Toggle/designTokens.d.ts +9 -0
  137. package/es/components/Toggle/designTokens.js +13 -0
  138. package/es/components/Toggle/index.d.ts +27 -0
  139. package/es/components/Toggle/index.js +21 -0
  140. package/es/components/index.d.ts +45 -0
  141. package/es/components/index.js +26 -2
  142. package/es/constants/index.d.ts +1 -0
  143. package/es/constants/index.js +2 -2
  144. package/es/fonts/SF/SF-Pro-Display-BlackItalic.otf +0 -0
  145. package/es/fonts/SF/SF-Pro-Text-Bold.otf +0 -0
  146. package/es/fonts/SF/SF-Pro-Text-Medium.eot +0 -0
  147. package/es/fonts/SF/SF-Pro-Text-Medium.otf +0 -0
  148. package/es/fonts/SF/SF-Pro-Text-Medium.svg +40549 -0
  149. package/es/fonts/SF/SF-Pro-Text-Medium.ttf +0 -0
  150. package/es/fonts/SF/SF-Pro-Text-Medium.woff +0 -0
  151. package/es/fonts/SF/SF-Pro-Text-Medium.woff2 +0 -0
  152. package/es/fonts/SF/SF-Pro-Text-Regular.otf +0 -0
  153. package/es/fonts/SF/SF-Pro-Text-Regular.ttf +0 -0
  154. package/es/fonts/SF/SF-Pro-Text-Semibold.otf +0 -0
  155. package/es/fonts/SF/SF-Pro-Text-SemiboldItalic.otf +0 -0
  156. package/es/index.d.ts +1 -0
  157. package/es/index.js +1 -2
  158. package/es/style/variables.less +53 -27
  159. package/es/tokens/DXPGlobal.d.ts +255 -193
  160. package/es/tokens/DXPGlobal.js +4 -3
  161. package/es/utils/noop.js +1 -2
  162. package/es/utils/scaleTool.d.ts +12 -0
  163. package/es/utils/scaleTool.js +48 -0
  164. package/es/utils/theme.d.ts +11 -0
  165. package/es/utils/theme.js +15 -0
  166. package/es/utils/themeContext.d.ts +35 -2
  167. package/es/utils/themeContext.js +27 -7
  168. package/es/utils/tokenHelper.js +1 -2
  169. package/es/utils/tokenManager.d.ts +110 -2
  170. package/es/utils/tokenManager.js +778 -724
  171. package/lib/assets/iconFont/demo.css +539 -0
  172. package/lib/assets/iconFont/demo_index.html +4400 -0
  173. package/lib/assets/iconFont/iconfont.css +750 -0
  174. package/lib/assets/iconFont/iconfont.eot +0 -0
  175. package/lib/assets/iconFont/iconfont.json +1290 -0
  176. package/lib/assets/iconFont/iconfont.svg +385 -0
  177. package/lib/assets/iconFont/iconfont.ttf +0 -0
  178. package/lib/assets/iconFont/iconfont.woff +0 -0
  179. package/lib/assets/iconFont/iconfont.woff2 +0 -0
  180. package/lib/assets/react.svg +1 -0
  181. package/lib/assets/token.json +903 -0
  182. package/lib/components/Accordion/designTokens.d.ts +11 -0
  183. package/lib/components/Accordion/designTokens.js +42 -0
  184. package/lib/components/Accordion/index.d.ts +21 -0
  185. package/lib/components/Accordion/index.js +96 -0
  186. package/lib/components/Accordion/style/index.less +14 -0
  187. package/lib/components/Accordion/style/variables.less +4 -0
  188. package/lib/components/Amount/designTokens.d.ts +6 -0
  189. package/lib/components/Amount/designTokens.js +33 -0
  190. package/lib/components/Amount/index.d.ts +23 -0
  191. package/lib/components/Amount/index.js +160 -0
  192. package/lib/components/Amount/style/index.less +10 -0
  193. package/lib/components/Amount/style/variables.less +4 -0
  194. package/lib/components/Button/demo/index.d.ts +3 -0
  195. package/lib/components/Button/demo/index.js +138 -0
  196. package/lib/components/Button/designTokens.d.ts +66 -0
  197. package/lib/components/Button/designTokens.js +139 -0
  198. package/lib/components/Button/index.d.ts +39 -0
  199. package/lib/components/Button/index.js +132 -0
  200. package/lib/components/Button/style/index.less +38 -0
  201. package/lib/components/Button/style/variables.less +5 -0
  202. package/lib/components/Chip/designTokens.d.ts +15 -0
  203. package/lib/components/Chip/designTokens.js +45 -0
  204. package/lib/components/Chip/index.d.ts +13 -0
  205. package/lib/components/Chip/index.js +178 -0
  206. package/lib/components/Chip/style/index.less +9 -0
  207. package/lib/components/Chip/style/variables.less +4 -0
  208. package/lib/components/Divider/index.d.ts +16 -0
  209. package/lib/components/Divider/index.js +111 -0
  210. package/lib/components/Divider/style/index.less +78 -0
  211. package/lib/components/Divider/style/variables.less +4 -0
  212. package/lib/components/Drawer/designTokens.d.ts +16 -0
  213. package/lib/components/Drawer/designTokens.js +62 -0
  214. package/lib/components/Drawer/index.d.ts +21 -0
  215. package/lib/components/Drawer/index.js +229 -0
  216. package/lib/components/Drawer/style/index.less +73 -0
  217. package/lib/components/Drawer/style/variables.less +8 -0
  218. package/lib/components/Icon/Icon.d.ts +9 -0
  219. package/lib/components/Icon/Icon.js +74 -0
  220. package/lib/components/Icon/designTokens.d.ts +6 -0
  221. package/lib/components/Icon/designTokens.js +41 -0
  222. package/lib/components/Icon/index.d.ts +12 -0
  223. package/lib/components/Icon/index.js +73 -0
  224. package/lib/components/IconButton/designTokens.d.ts +21 -0
  225. package/lib/components/IconButton/designTokens.js +61 -0
  226. package/lib/components/IconButton/index.d.ts +24 -0
  227. package/lib/components/IconButton/index.js +202 -0
  228. package/lib/components/IconButton/style/index.less +59 -0
  229. package/lib/components/IconButton/style/variables.less +5 -0
  230. package/lib/components/IconButtonGroup/index.d.ts +15 -0
  231. package/lib/components/IconButtonGroup/index.js +53 -0
  232. package/lib/components/Image/index.d.ts +12 -0
  233. package/lib/components/Image/index.js +102 -0
  234. package/lib/components/ListItem/designTokens.d.ts +30 -0
  235. package/lib/components/ListItem/designTokens.js +65 -0
  236. package/lib/components/ListItem/index.d.ts +60 -0
  237. package/lib/components/ListItem/index.js +348 -0
  238. package/lib/components/ListItem/style/index.less +77 -0
  239. package/lib/components/ListItem/style/variables.less +1 -0
  240. package/lib/components/Modal/designTokens.d.ts +31 -0
  241. package/lib/components/Modal/designTokens.js +88 -0
  242. package/lib/components/Modal/index.d.ts +14 -0
  243. package/lib/components/Modal/index.js +168 -0
  244. package/lib/components/Modal/style/index.less +92 -0
  245. package/lib/components/Modal/style/variables.less +5 -0
  246. package/lib/components/Navigation/designTokens.d.ts +16 -0
  247. package/lib/components/Navigation/designTokens.js +53 -0
  248. package/lib/components/Navigation/index.d.ts +31 -0
  249. package/lib/components/Navigation/index.js +174 -0
  250. package/lib/components/Navigation/style/index.less +52 -0
  251. package/lib/components/Navigation/style/variables.less +1 -0
  252. package/lib/components/Search/designTokens.d.ts +34 -0
  253. package/lib/components/Search/designTokens.js +77 -0
  254. package/lib/components/Search/index.d.ts +13 -0
  255. package/lib/components/Search/index.js +137 -0
  256. package/lib/components/Search/style/index.less +32 -0
  257. package/lib/components/Search/style/variables.less +5 -0
  258. package/lib/components/Stepper/designTokens.d.ts +26 -0
  259. package/lib/components/Stepper/designTokens.js +90 -0
  260. package/lib/components/Stepper/index.d.ts +22 -0
  261. package/lib/components/Stepper/index.js +118 -0
  262. package/lib/components/Stepper/style/index.less +140 -0
  263. package/lib/components/Stepper/style/variables.less +5 -0
  264. package/lib/components/StickyFooter/designTokens.d.ts +10 -0
  265. package/lib/components/StickyFooter/designTokens.js +41 -0
  266. package/lib/components/StickyFooter/index.d.ts +17 -0
  267. package/lib/components/StickyFooter/index.js +150 -0
  268. package/lib/components/StickyFooter/style/index.less +18 -0
  269. package/lib/components/StickyFooter/style/variables.less +4 -0
  270. package/lib/components/Tabs/designTokens.d.ts +44 -0
  271. package/lib/components/Tabs/designTokens.js +90 -0
  272. package/lib/components/Tabs/index.d.ts +14 -0
  273. package/lib/components/Tabs/index.js +145 -0
  274. package/lib/components/Tabs/style/index.less +25 -0
  275. package/lib/components/Tabs/style/variables.less +4 -0
  276. package/lib/components/Tag/designTokens.d.ts +90 -0
  277. package/lib/components/Tag/designTokens.js +181 -0
  278. package/lib/components/Tag/index.d.ts +15 -0
  279. package/lib/components/Tag/index.js +146 -0
  280. package/lib/components/Tag/style/index.less +9 -0
  281. package/lib/components/Tag/style/variables.less +4 -0
  282. package/lib/components/Text/designTokens.d.ts +51 -0
  283. package/lib/components/Text/designTokens.js +75 -0
  284. package/lib/components/Text/index.d.ts +13 -0
  285. package/lib/components/Text/index.js +432 -0
  286. package/lib/components/Text/style/index.less +2 -0
  287. package/lib/components/Text/style/variables.less +4 -0
  288. package/lib/components/TextInputInside/designTokens.d.ts +38 -0
  289. package/lib/components/TextInputInside/designTokens.js +100 -0
  290. package/lib/components/TextInputInside/index.d.ts +10 -0
  291. package/lib/components/TextInputInside/index.js +230 -0
  292. package/lib/components/TextInputInside/style/index.less +36 -0
  293. package/lib/components/TextInputInside/style/variables.less +5 -0
  294. package/lib/components/TextInputOutside/designTokens.d.ts +41 -0
  295. package/lib/components/TextInputOutside/designTokens.js +95 -0
  296. package/lib/components/TextInputOutside/index.d.ts +18 -0
  297. package/lib/components/TextInputOutside/index.js +110 -0
  298. package/lib/components/TextInputOutside/style/index.less +4 -0
  299. package/lib/components/TextInputOutside/style/variables.less +5 -0
  300. package/lib/components/TextLink/designTokens.d.ts +10 -0
  301. package/lib/components/TextLink/designTokens.js +45 -0
  302. package/lib/components/TextLink/index.d.ts +20 -0
  303. package/lib/components/TextLink/index.js +120 -0
  304. package/lib/components/Toast/designTokens.d.ts +13 -0
  305. package/lib/components/Toast/designTokens.js +40 -0
  306. package/lib/components/Toast/index.d.ts +26 -0
  307. package/lib/components/Toast/index.js +213 -0
  308. package/lib/components/Toast/style/index.less +9 -0
  309. package/lib/components/Toast/style/variables.less +12 -0
  310. package/lib/components/Toggle/designTokens.d.ts +9 -0
  311. package/lib/components/Toggle/designTokens.js +47 -0
  312. package/lib/components/Toggle/index.d.ts +27 -0
  313. package/lib/components/Toggle/index.js +67 -0
  314. package/lib/components/index.d.ts +49 -0
  315. package/lib/components/index.js +90 -0
  316. package/lib/constants/index.d.ts +16 -0
  317. package/lib/constants/index.js +42 -0
  318. package/lib/fonts/Poppins/Poppins-Bold.ttf +0 -0
  319. package/lib/fonts/Poppins/Poppins-BoldItalic.ttf +0 -0
  320. package/lib/fonts/Poppins/Poppins-ExtraBold.ttf +0 -0
  321. package/lib/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +0 -0
  322. package/lib/fonts/Poppins/Poppins-ExtraLight.ttf +0 -0
  323. package/lib/fonts/Poppins/Poppins-ExtraLightItalic.ttf +0 -0
  324. package/lib/fonts/Poppins/Poppins-Italic.ttf +0 -0
  325. package/lib/fonts/Poppins/Poppins-Light.ttf +0 -0
  326. package/lib/fonts/Poppins/Poppins-LightItalic.ttf +0 -0
  327. package/lib/fonts/Poppins/Poppins-Medium.ttf +0 -0
  328. package/lib/fonts/Poppins/Poppins-MediumItalic.ttf +0 -0
  329. package/lib/fonts/Poppins/Poppins-Regular.ttf +0 -0
  330. package/lib/fonts/Poppins/Poppins-SemiBold.ttf +0 -0
  331. package/lib/fonts/Poppins/Poppins-SemiBoldItalic.ttf +0 -0
  332. package/lib/fonts/Poppins/Poppins-Thin.ttf +0 -0
  333. package/lib/fonts/Poppins/Poppins-ThinItalic.ttf +0 -0
  334. package/lib/fonts/Roboto/Roboto-Black.ttf +0 -0
  335. package/lib/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
  336. package/lib/fonts/Roboto/Roboto-Bold.ttf +0 -0
  337. package/lib/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
  338. package/lib/fonts/Roboto/Roboto-ExtraBold.ttf +0 -0
  339. package/lib/fonts/Roboto/Roboto-ExtraBoldItalic.ttf +0 -0
  340. package/lib/fonts/Roboto/Roboto-ExtraLight.ttf +0 -0
  341. package/lib/fonts/Roboto/Roboto-ExtraLightItalic.ttf +0 -0
  342. package/lib/fonts/Roboto/Roboto-Italic-VariableFont_wdth,wght.ttf +0 -0
  343. package/lib/fonts/Roboto/Roboto-Italic.ttf +0 -0
  344. package/lib/fonts/Roboto/Roboto-Light.ttf +0 -0
  345. package/lib/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
  346. package/lib/fonts/Roboto/Roboto-Medium.ttf +0 -0
  347. package/lib/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
  348. package/lib/fonts/Roboto/Roboto-Regular.ttf +0 -0
  349. package/lib/fonts/Roboto/Roboto-SemiBold.ttf +0 -0
  350. package/lib/fonts/Roboto/Roboto-SemiBoldItalic.ttf +0 -0
  351. package/lib/fonts/Roboto/Roboto-Thin.ttf +0 -0
  352. package/lib/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
  353. package/lib/fonts/Roboto/Roboto-VariableFont_wdth,wght.ttf +0 -0
  354. package/lib/fonts/SF/SF-Pro-Display-BlackItalic.otf +0 -0
  355. package/lib/fonts/SF/SF-Pro-Text-Bold.otf +0 -0
  356. package/lib/fonts/SF/SF-Pro-Text-Medium.eot +0 -0
  357. package/lib/fonts/SF/SF-Pro-Text-Medium.otf +0 -0
  358. package/lib/fonts/SF/SF-Pro-Text-Medium.svg +40549 -0
  359. package/lib/fonts/SF/SF-Pro-Text-Medium.ttf +0 -0
  360. package/lib/fonts/SF/SF-Pro-Text-Medium.woff +0 -0
  361. package/lib/fonts/SF/SF-Pro-Text-Medium.woff2 +0 -0
  362. package/lib/fonts/SF/SF-Pro-Text-Regular.otf +0 -0
  363. package/lib/fonts/SF/SF-Pro-Text-Regular.ttf +0 -0
  364. package/lib/fonts/SF/SF-Pro-Text-Semibold.otf +0 -0
  365. package/lib/fonts/SF/SF-Pro-Text-SemiboldItalic.otf +0 -0
  366. package/lib/index.d.ts +3 -0
  367. package/lib/index.js +21 -0
  368. package/lib/style/antdDesignToken.json +503 -0
  369. package/lib/style/themes/base-vars.css +6 -0
  370. package/lib/style/themes/colorful.css +5 -0
  371. package/lib/style/themes/index.css +4 -0
  372. package/lib/style/variables.less +60 -0
  373. package/lib/tokens/DXPGlobal.d.ts +302 -0
  374. package/lib/tokens/DXPGlobal.js +37 -0
  375. package/lib/utils/noop.d.ts +1 -0
  376. package/lib/utils/noop.js +26 -0
  377. package/lib/utils/scaleTool.d.ts +12 -0
  378. package/lib/utils/scaleTool.js +66 -0
  379. package/lib/utils/theme.d.ts +11 -0
  380. package/lib/utils/theme.js +32 -0
  381. package/lib/utils/themeContext.d.ts +44 -0
  382. package/lib/utils/themeContext.js +117 -0
  383. package/lib/utils/tokenHelper.d.ts +1 -0
  384. package/lib/utils/tokenHelper.js +38 -0
  385. package/lib/utils/tokenManager.d.ts +1572 -0
  386. package/lib/utils/tokenManager.js +833 -0
  387. package/package.json +29 -22
  388. package/umd/dxp-ui.min.css +1 -2
  389. package/umd/dxp-ui.min.js +1 -2
  390. package/umd/static/SF-Pro-Text-Bold.89d66db4.otf +0 -0
  391. package/umd/static/SF-Pro-Text-Regular.e042d171.ttf +0 -0
  392. package/umd/static/SF-Pro-Text-Regular.f09e811b.otf +0 -0
  393. package/umd/static/SF-Pro-Text-Semibold.a5a4b4bc.otf +0 -0
  394. package/umd/static/SF-Pro-Text-SemiboldItalic.ed8f4a28.otf +0 -0
  395. package/umd/static/iconfont.176e7470.svg +1 -0
  396. package/umd/static/iconfont.47a0c957.ttf +0 -0
  397. package/umd/static/iconfont.6f470e01.eot +0 -0
  398. package/umd/static/iconfont.796b49bb.woff +0 -0
  399. package/es/assets/iconFont/iconfont.js +0 -44
  400. package/es/assets/iconFont/iconfont.js.map +0 -1
  401. package/es/components/Button/designTokens.js.map +0 -1
  402. package/es/components/Button/index.js.map +0 -1
  403. package/es/components/Button/index_backup.d.ts +0 -72
  404. package/es/components/Button/index_backup.js +0 -111
  405. package/es/components/Button/index_backup.js.map +0 -1
  406. package/es/components/Text/index.js.map +0 -1
  407. package/es/components/Text/style/text.less +0 -116
  408. package/es/components/index.js.map +0 -1
  409. package/es/constants/index.js.map +0 -1
  410. package/es/index.js.map +0 -1
  411. package/es/tokens/DXPGlobal.js.map +0 -1
  412. package/es/utils/noop.js.map +0 -1
  413. package/es/utils/themeContext.js.map +0 -1
  414. package/es/utils/tokenHelper.js.map +0 -1
  415. package/es/utils/tokenManager.js.map +0 -1
  416. package/umd/dxp-ui.min.css.map +0 -1
  417. package/umd/dxp-ui.min.js.map +0 -1
@@ -0,0 +1,124 @@
1
+ import { getToken } from "../../utils/tokenHelper";
2
+ var designTokens = {
3
+ borderRadiusSM: getToken('borderRadiusTag') // 圆角
4
+ };
5
+ var designTokensPrimary = {
6
+ colorText: getToken('colorTagText'),
7
+ // 文本颜色
8
+ defaultBg: getToken('colorTagBackgroundPrimary'),
9
+ // 背景色
10
+ colorBorder: getToken('colorTagBackgroundPrimary') // 边框
11
+ };
12
+ var designTokensSecondary = {
13
+ colorText: getToken('colorTagText'),
14
+ // 文本颜色
15
+ defaultBg: getToken('colorTagBackgroundSecondary'),
16
+ // 背景色
17
+ colorBorder: getToken('colorTagBackgroundSecondary') // 边框
18
+ };
19
+ var designTokensBlueLight = {
20
+ colorText: '#3434E1',
21
+ // 文本颜色
22
+ defaultBg: '#EBEBFC',
23
+ // 背景色
24
+ colorBorder: '#EBEBFC' // 边框
25
+ };
26
+ var designTokensGreenLight = {
27
+ colorText: '#00BC6F',
28
+ // 文本颜色
29
+ defaultBg: '#E8FBF3',
30
+ // 背景色
31
+ colorBorder: '#E8FBF3' // 边框
32
+ };
33
+ var designTokensYellowLight = {
34
+ colorText: '#FFC300',
35
+ // 文本颜色
36
+ defaultBg: '#FFF8E5',
37
+ // 背景色
38
+ colorBorder: '#FFF8E5' // 边框
39
+ };
40
+ var designTokensRedLight = {
41
+ colorText: '#FA2C2C',
42
+ // 文本颜色
43
+ defaultBg: '#FFEAEA',
44
+ // 背景色
45
+ colorBorder: '#FFEAEA' // 边框
46
+ };
47
+ var designTokensGreyLight = {
48
+ colorText: '#545454',
49
+ // 文本颜色
50
+ defaultBg: '#E6E6E6',
51
+ // 背景色
52
+ colorBorder: '#E6E6E6' // 边框
53
+ };
54
+ var designTokensLakeblueLight = {
55
+ colorText: '#1482CC',
56
+ // 文本颜色
57
+ defaultBg: '#E8F6FF',
58
+ // 背景色
59
+ colorBorder: '#E8F6FF' // 边框
60
+ };
61
+ var designTokensOrangeLight = {
62
+ colorText: '#FF8D1B',
63
+ // 文本颜色
64
+ defaultBg: '#FFF4E9',
65
+ // 背景色
66
+ colorBorder: '#FFF4E9' // 边框
67
+ };
68
+ var designTokensBlue = {
69
+ colorText: getToken('colorTagText'),
70
+ // 文本颜色
71
+ defaultBg: '#3434E1',
72
+ // 背景色
73
+ colorBorder: '#3434E1' // 边框
74
+ };
75
+ var designTokensGreen = {
76
+ colorText: getToken('colorTagText'),
77
+ // 文本颜色
78
+ defaultBg: '#00BC6F',
79
+ // 背景色
80
+ colorBorder: '#00BC6F' // 边框
81
+ };
82
+ var designTokensYellow = {
83
+ colorText: getToken('colorTagText'),
84
+ // 文本颜色
85
+ defaultBg: '#FFC300',
86
+ // 背景色
87
+ colorBorder: '#FFC300' // 边框
88
+ };
89
+ var designTokensRed = {
90
+ colorText: getToken('colorTagText'),
91
+ // 文本颜色
92
+ defaultBg: '#FA2C2C',
93
+ // 背景色
94
+ colorBorder: '#FA2C2C' // 边框
95
+ };
96
+ var designTokensGrey = {
97
+ colorText: getToken('colorTagText'),
98
+ // 文本颜色
99
+ defaultBg: '#B5B5B5',
100
+ // 背景色
101
+ colorBorder: '#B5B5B5' // 边框
102
+ };
103
+ var designTokensLakeblue = {
104
+ colorText: getToken('colorTagText'),
105
+ // 文本颜色
106
+ defaultBg: '#1482CC',
107
+ // 背景色
108
+ colorBorder: '#1482CC' // 边框
109
+ };
110
+ var designTokensOrange = {
111
+ colorText: getToken('colorTagText'),
112
+ // 文本颜色
113
+ defaultBg: '#FF8D1B',
114
+ // 背景色
115
+ colorBorder: '#FF8D1B' // 边框
116
+ };
117
+ var otherDesignTokens = {
118
+ padding: "0 ".concat(getToken('spacingTagPaddingHorizontal'), "px"),
119
+ // 内边距
120
+ sizingTagShort: "".concat(getToken('sizingTagShort'), "px"),
121
+ sizingTagTall: "".concat(getToken('sizingTagTall'), "px"),
122
+ sizingTagTallLg: "".concat(getToken('sizingTagTallLg'), "px")
123
+ };
124
+ export { designTokens, otherDesignTokens, designTokensPrimary, designTokensSecondary, designTokensBlue, designTokensGrey, designTokensGreen, designTokensRed, designTokensYellow, designTokensOrange, designTokensLakeblue, designTokensBlueLight, designTokensGreyLight, designTokensGreenLight, designTokensRedLight, designTokensYellowLight, designTokensOrangeLight, designTokensLakeblueLight };
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import './style/index.less';
3
+ export type types = 'primary' | 'secondary' | 'blue' | 'green' | 'yellow' | 'red' | 'grey' | 'lakeblue' | 'orange';
4
+ export type size = 'short' | 'tall' | 'tallLg';
5
+ export interface TagProps {
6
+ prefixCls?: string;
7
+ children?: React.ReactNode;
8
+ types?: types;
9
+ style?: React.CSSProperties;
10
+ inverse?: boolean;
11
+ block?: boolean;
12
+ [key: string]: any;
13
+ }
14
+ declare const Tag: (props: TagProps) => React.JSX.Element;
15
+ export default Tag;
@@ -0,0 +1,85 @@
1
+ import "antd/es/config-provider/style";
2
+ import _ConfigProvider from "antd/es/config-provider";
3
+ import "antd/es/tag/style";
4
+ import _Tag from "antd/es/tag";
5
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
6
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
7
+ var _excluded = ["types", "size", "light", "children", "prefixCls", "block", "style"];
8
+ import React from 'react';
9
+ import { designTokens, otherDesignTokens, designTokensPrimary, designTokensSecondary, designTokensBlue, designTokensGrey, designTokensGreen, designTokensRed, designTokensYellow, designTokensOrange, designTokensLakeblue, designTokensBlueLight, designTokensGreyLight, designTokensGreenLight, designTokensRedLight, designTokensYellowLight, designTokensOrangeLight, designTokensLakeblueLight } from "./designTokens";
10
+ import { BASE_CLASS_PREFIX } from "../../constants";
11
+ import Text from "../Text";
12
+ import "./style/index.less";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ var Tag = function Tag(props) {
15
+ var _props$types = props.types,
16
+ types = _props$types === void 0 ? 'primary' : _props$types,
17
+ _props$size = props.size,
18
+ size = _props$size === void 0 ? 'short' : _props$size,
19
+ _props$light = props.light,
20
+ light = _props$light === void 0 ? false : _props$light,
21
+ children = props.children,
22
+ _props$prefixCls = props.prefixCls,
23
+ prefixCls = _props$prefixCls === void 0 ? 'tag' : _props$prefixCls,
24
+ _props$block = props.block,
25
+ block = _props$block === void 0 ? false : _props$block,
26
+ style = props.style,
27
+ attr = _objectWithoutProperties(props, _excluded);
28
+ var padding = otherDesignTokens.padding,
29
+ sizingTagShort = otherDesignTokens.sizingTagShort,
30
+ sizingTagTall = otherDesignTokens.sizingTagTall,
31
+ sizingTagTallLg = otherDesignTokens.sizingTagTallLg;
32
+ var getTagSize = function getTagSize(s) {
33
+ switch (s) {
34
+ case 'tall':
35
+ return sizingTagTall;
36
+ case 'tallLg':
37
+ return sizingTagTallLg;
38
+ default:
39
+ return sizingTagShort;
40
+ }
41
+ };
42
+ var getType = function getType(t) {
43
+ switch (t) {
44
+ case 'secondary':
45
+ return designTokensSecondary;
46
+ case 'blue':
47
+ return light ? designTokensBlueLight : designTokensBlue;
48
+ case 'green':
49
+ return light ? designTokensGreenLight : designTokensGreen;
50
+ case 'red':
51
+ return light ? designTokensRedLight : designTokensRed;
52
+ case 'orange':
53
+ return light ? designTokensOrangeLight : designTokensOrange;
54
+ case 'grey':
55
+ return light ? designTokensGreyLight : designTokensGrey;
56
+ case 'lakeblue':
57
+ return light ? designTokensLakeblueLight : designTokensLakeblue;
58
+ case 'yellow':
59
+ return light ? designTokensYellowLight : designTokensYellow;
60
+ default:
61
+ return designTokensPrimary;
62
+ }
63
+ };
64
+ return /*#__PURE__*/_jsx(_ConfigProvider, {
65
+ prefixCls: BASE_CLASS_PREFIX,
66
+ theme: {
67
+ components: {
68
+ Tag: _objectSpread(_objectSpread({}, designTokens), getType(types))
69
+ }
70
+ },
71
+ children: /*#__PURE__*/_jsx(_Tag, _objectSpread(_objectSpread({}, attr), {}, {
72
+ className: "".concat(BASE_CLASS_PREFIX, "-").concat(prefixCls),
73
+ style: _objectSpread({
74
+ padding: padding,
75
+ height: getTagSize(size),
76
+ width: block ? '100%' : 'auto'
77
+ }, style),
78
+ children: /*#__PURE__*/_jsx(Text, {
79
+ size: "ContentC12SemiBold",
80
+ children: children
81
+ })
82
+ }))
83
+ });
84
+ };
85
+ export default Tag;
@@ -0,0 +1,9 @@
1
+
2
+ @import './variables.less';
3
+
4
+ @components: tag;
5
+ .@{prefix}-@{components}{
6
+ display: flex;
7
+ align-items: center;
8
+ white-space: nowrap;
9
+ }
@@ -0,0 +1,4 @@
1
+
2
+ @import '../../../style/variables.less';
3
+
4
+ @btn-primary-bg-default: var(--base-color-primary);
@@ -0,0 +1,51 @@
1
+ declare const otherDesignTokens: {
2
+ fontSizeDesktopTitleT23: string;
3
+ fontSizeDesktopContentC15: string;
4
+ fontSizeDesktopContentC21: string;
5
+ fontSizeDesktopTitleT21: string;
6
+ fontSizeDesktopTitleT15: string;
7
+ fontSizeDesktopContentC13: string;
8
+ fontSizeDesktopContentC11: string;
9
+ fontSizeDesktopContentC12: string;
10
+ fontSizeDesktopContentC14: string;
11
+ fontSizeDesktopTitleT1: string;
12
+ fontSizeDesktopTitleT32: string;
13
+ fontSizeDesktopTitleT41: string;
14
+ fontSizeDesktopContentC05: string;
15
+ fontSizeDesktopContentC04: string;
16
+ fontSizeDesktopTitleT7: string;
17
+ fontSizeDesktopTitleT8: string;
18
+ fontSizeDesktopTitleT2: string;
19
+ fontSizeDesktopTitleT5: string;
20
+ fontSizeDesktopTitleT3: string;
21
+ fontSizeDesktopTitleT4: string;
22
+ fontSizeDesktopTitleT10: string;
23
+ fontSizeMobileContentC04: string;
24
+ fontSizeMobileContentC05: string;
25
+ fontSizeMobileContentC11: string;
26
+ fontSizeMobileContentC12: string;
27
+ fontSizeMobileContentC13: string;
28
+ fontSizeMobileContentC14: string;
29
+ fontSizeMobileContentC15: string;
30
+ fontSizeMobileContentC21: string;
31
+ fontSizeMobileTitleT12: string;
32
+ fontSizeMobileTitleT13: string;
33
+ fontSizeMobileTitleT14: string;
34
+ fontSizeMobileTitleT15: string;
35
+ fontSizeMobileTitleT21: string;
36
+ fontSizeMobileTitleT23: string;
37
+ fontSizeMobileTitleT24: string;
38
+ fontSizeMobileTitleT25: string;
39
+ fontSizeMobileTitleT32: string;
40
+ fontSizeMobileTitleT34: string;
41
+ fontSizeMobileTitleT41: string;
42
+ fontSizeMobileTitleT45: string;
43
+ fontSizeMobileNavigation: string;
44
+ fontFamilyPromaryRegular: any;
45
+ fontFamilyPromarySemiBold: any;
46
+ fontFamilyPromaryBold: any;
47
+ fontFamilySecondaryRegular: any;
48
+ fontFamilySecondarySemiBold: any;
49
+ fontFamilySecondaryBold: any;
50
+ };
51
+ export { otherDesignTokens };
@@ -0,0 +1,52 @@
1
+ import { getToken } from "../../utils/tokenHelper";
2
+ var otherDesignTokens = {
3
+ fontSizeDesktopTitleT23: "".concat(getToken('fontSizeDesktopTitleT23'), "px"),
4
+ fontSizeDesktopContentC15: "".concat(getToken('fontSizeDesktopContentC15'), "px"),
5
+ fontSizeDesktopContentC21: "".concat(getToken('fontSizeDesktopContentC21'), "px"),
6
+ fontSizeDesktopTitleT21: "".concat(getToken('fontSizeDesktopTitleT21'), "px"),
7
+ fontSizeDesktopTitleT15: "".concat(getToken('fontSizeDesktopTitleT15'), "px"),
8
+ fontSizeDesktopContentC13: "".concat(getToken('fontSizeDesktopContentC13'), "px"),
9
+ fontSizeDesktopContentC11: "".concat(getToken('fontSizeDesktopContentC11'), "px"),
10
+ fontSizeDesktopContentC12: "".concat(getToken('fontSizeDesktopContentC12'), "px"),
11
+ fontSizeDesktopContentC14: "".concat(getToken('fontSizeDesktopContentC14'), "px"),
12
+ fontSizeDesktopTitleT1: "".concat(getToken('fontSizeDesktopTitleT1'), "px"),
13
+ fontSizeDesktopTitleT32: "".concat(getToken('fontSizeDesktopTitleT32'), "px"),
14
+ fontSizeDesktopTitleT41: "".concat(getToken('fontSizeDesktopTitleT41'), "px"),
15
+ fontSizeDesktopContentC05: "".concat(getToken('fontSizeDesktopContentC05'), "px"),
16
+ fontSizeDesktopContentC04: "".concat(getToken('fontSizeDesktopContentC04'), "px"),
17
+ fontSizeDesktopTitleT7: "".concat(getToken('fontSizeDesktopTitleT7'), "px"),
18
+ fontSizeDesktopTitleT8: "".concat(getToken('fontSizeDesktopTitleT8'), "px"),
19
+ fontSizeDesktopTitleT2: "".concat(getToken('fontSizeDesktopTitleT2'), "px"),
20
+ fontSizeDesktopTitleT5: "".concat(getToken('fontSizeDesktopTitleT5'), "px"),
21
+ fontSizeDesktopTitleT3: "".concat(getToken('fontSizeDesktopTitleT3'), "px"),
22
+ fontSizeDesktopTitleT4: "".concat(getToken('fontSizeDesktopTitleT4'), "px"),
23
+ fontSizeDesktopTitleT10: "".concat(getToken('fontSizeDesktopTitleT10'), "px"),
24
+ fontSizeMobileContentC04: "".concat(getToken('fontSizeMobileContentC04'), "px"),
25
+ fontSizeMobileContentC05: "".concat(getToken('fontSizeMobileContentC05'), "px"),
26
+ fontSizeMobileContentC11: "".concat(getToken('fontSizeMobileContentC11'), "px"),
27
+ fontSizeMobileContentC12: "".concat(getToken('fontSizeMobileContentC12'), "px"),
28
+ fontSizeMobileContentC13: "".concat(getToken('fontSizeMobileContentC13'), "px"),
29
+ fontSizeMobileContentC14: "".concat(getToken('fontSizeMobileContentC14'), "px"),
30
+ fontSizeMobileContentC15: "".concat(getToken('fontSizeMobileContentC15'), "px"),
31
+ fontSizeMobileContentC21: "".concat(getToken('fontSizeMobileContentC21'), "px"),
32
+ fontSizeMobileTitleT12: "".concat(getToken('fontSizeMobileTitleT12'), "px"),
33
+ fontSizeMobileTitleT13: "".concat(getToken('fontSizeMobileTitleT13'), "px"),
34
+ fontSizeMobileTitleT14: "".concat(getToken('fontSizeMobileTitleT14'), "px"),
35
+ fontSizeMobileTitleT15: "".concat(getToken('fontSizeMobileTitleT15'), "px"),
36
+ fontSizeMobileTitleT21: "".concat(getToken('fontSizeMobileTitleT21'), "px"),
37
+ fontSizeMobileTitleT23: "".concat(getToken('fontSizeMobileTitleT23'), "px"),
38
+ fontSizeMobileTitleT24: "".concat(getToken('fontSizeMobileTitleT24'), "px"),
39
+ fontSizeMobileTitleT25: "".concat(getToken('fontSizeMobileTitleT25'), "px"),
40
+ fontSizeMobileTitleT32: "".concat(getToken('fontSizeMobileTitleT32'), "px"),
41
+ fontSizeMobileTitleT34: "".concat(getToken('fontSizeMobileTitleT34'), "px"),
42
+ fontSizeMobileTitleT41: "".concat(getToken('fontSizeMobileTitleT41'), "px"),
43
+ fontSizeMobileTitleT45: "".concat(getToken('fontSizeMobileTitleT45'), "px"),
44
+ fontSizeMobileNavigation: "".concat(getToken('fontSizeMobileNavigation'), "px"),
45
+ fontFamilyPromaryRegular: getToken('fontFamilyPromaryRegular'),
46
+ fontFamilyPromarySemiBold: getToken('fontFamilyPromarySemiBold'),
47
+ fontFamilyPromaryBold: getToken('fontFamilyPromaryBold'),
48
+ fontFamilySecondaryRegular: getToken('fontFamilySecondaryRegular'),
49
+ fontFamilySecondarySemiBold: getToken('fontFamilySecondarySemiBold'),
50
+ fontFamilySecondaryBold: getToken('fontFamilySecondaryBold')
51
+ };
52
+ export { otherDesignTokens };
@@ -1,32 +1,13 @@
1
- import React, { PureComponent } from 'react';
2
- import { noop } from '../../utils/noop';
3
- import './style/text.less';
4
- export type Size = 'bannerTitle' | 'pageTitle' | 'sectionTitle' | 'header' | 'bodyBold' | 'bodyRegular' | 'bodyStrikethrough' | 'smallbodyRegular' | 'smallBodyStrikethrough' | 'smallBodySemiBold' | 'smallBodyBold' | 'smallBodyLink' | 'textLink' | 'mediumBody' | 'mediumBodyBold';
5
- export interface xDXpProps {
6
- 'x-dxp-prop'?: string;
7
- }
8
- export interface TextProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
1
+ import React from 'react';
2
+ import './style/index.less';
3
+ export type Size = 'TitleT41Bold' | 'TitleT32Bold' | 'TitleT23Bold' | 'TitleT21Bold' | 'TitleT15Bold' | 'ContentC14Bold' | 'ContentC14Regular' | 'ContentC14Strikethrough' | 'ContentC14TextLink' | 'ContentC13Bold' | 'ContentC13Regular' | 'ContentC13Strikethrough' | 'ContentC13TextLink' | 'ContentC12Regular' | 'ContentC12Strikethrough' | 'ContentC12SemiBold' | 'ContentC12Bold' | 'ContentC12TextLink' | 'navigation';
4
+ export interface TextProps {
9
5
  children?: React.ReactNode;
10
6
  className?: string;
11
7
  size?: Size;
12
8
  prefixCls?: string;
13
9
  style?: React.CSSProperties;
14
- onClick?: React.MouseEventHandler<HTMLButtonElement>;
15
- onMouseDown?: React.MouseEventHandler<HTMLButtonElement>;
16
- onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
17
- onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;
18
- 'aria-label'?: React.AriaAttributes['aria-label'];
19
- 'x-dxp-children-alias'?: string;
20
10
  [key: string]: any;
21
11
  }
22
- export default class Text extends PureComponent<TextProps> {
23
- static defaultProps: {
24
- size: string;
25
- onMouseDown: typeof noop;
26
- onClick: typeof noop;
27
- onMouseEnter: typeof noop;
28
- onMouseLeave: typeof noop;
29
- prefixCls: string;
30
- };
31
- render(): React.JSX.Element;
32
- }
12
+ declare const Text: (props: TextProps) => React.JSX.Element;
13
+ export default Text;
@@ -1,60 +1,73 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
5
- import _createClass from "@babel/runtime/helpers/esm/createClass";
6
- import _inherits from "@babel/runtime/helpers/esm/inherits";
7
- import _createSuper from "@babel/runtime/helpers/esm/createSuper";
8
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
- var _excluded = ["children", "className", "size", "prefixCls", "style"];
10
- /* eslint-disable @typescript-eslint/no-unused-vars */
11
- import React, { PureComponent } from 'react';
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
+ var _excluded = ["children", "className", "size", "prefixCls", "style", "breakpoint"];
5
+ import React from 'react';
12
6
  import { default as classNames } from 'classnames';
13
- import { omit } from 'lodash';
7
+ import { useStyleRegister } from '@ant-design/cssinjs';
8
+ import { theme } from "../../utils/theme";
9
+ import { otherDesignTokens } from "./designTokens";
14
10
  import { cssClasses } from "../../constants";
15
- import { noop } from "../../utils/noop";
16
- import "./style/text.less";
17
- var Text = /*#__PURE__*/function (_PureComponent) {
18
- _inherits(Text, _PureComponent);
19
- var _super = _createSuper(Text);
20
- function Text() {
21
- _classCallCheck(this, Text);
22
- return _super.apply(this, arguments);
23
- }
24
- _createClass(Text, [{
25
- key: "render",
26
- value: function render() {
27
- var _this$props = this.props,
28
- children = _this$props.children,
29
- className = _this$props.className,
30
- size = _this$props.size,
31
- prefixCls = _this$props.prefixCls,
32
- style = _this$props.style,
33
- attr = _objectWithoutProperties(_this$props, _excluded);
34
- var baseProps = _objectSpread(_objectSpread({}, omit(attr, ['x-gemo-children-alias'])), {}, {
35
- className: classNames(prefixCls, _defineProperty({}, "".concat(prefixCls, "-size-").concat(size), size), className),
36
- style: style
37
- });
38
- var xDXpProps = {};
39
- if (!(className && className.includes('-with-icon'))) {
40
- xDXpProps['x-dxp-prop'] = 'children';
41
- }
42
- return /*#__PURE__*/React.createElement("span", _extends({
43
- onClick: this.props.onClick
44
- }, xDXpProps, baseProps, {
45
- onMouseDown: this.props.onMouseDown
46
- }), children);
47
- }
48
- }]);
49
- return Text;
50
- }(PureComponent);
51
- _defineProperty(Text, "defaultProps", {
52
- size: 'bodyBold',
53
- onMouseDown: noop,
54
- onClick: noop,
55
- onMouseEnter: noop,
56
- onMouseLeave: noop,
57
- prefixCls: cssClasses.PREFIX + '-text'
58
- });
59
- export { Text as default };
60
- //# sourceMappingURL=index.js.map
11
+ import "./style/index.less";
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ var Text = function Text(props) {
14
+ var children = props.children,
15
+ className = props.className,
16
+ _props$size = props.size,
17
+ size = _props$size === void 0 ? 'ContentC14Bold' : _props$size,
18
+ _props$prefixCls = props.prefixCls,
19
+ prefixCls = _props$prefixCls === void 0 ? cssClasses.PREFIX + '-text' : _props$prefixCls,
20
+ style = props.style,
21
+ _props$breakpoint = props.breakpoint,
22
+ breakpoint = _props$breakpoint === void 0 ? 'Mobile' : _props$breakpoint,
23
+ attr = _objectWithoutProperties(props, _excluded);
24
+ var fontSizeDesktopTitleT23 = otherDesignTokens.fontSizeDesktopTitleT23,
25
+ fontSizeDesktopTitleT21 = otherDesignTokens.fontSizeDesktopTitleT21,
26
+ fontSizeDesktopTitleT15 = otherDesignTokens.fontSizeDesktopTitleT15,
27
+ fontSizeDesktopContentC13 = otherDesignTokens.fontSizeDesktopContentC13,
28
+ fontSizeDesktopContentC12 = otherDesignTokens.fontSizeDesktopContentC12,
29
+ fontSizeDesktopContentC14 = otherDesignTokens.fontSizeDesktopContentC14,
30
+ fontSizeDesktopTitleT32 = otherDesignTokens.fontSizeDesktopTitleT32,
31
+ fontSizeDesktopTitleT41 = otherDesignTokens.fontSizeDesktopTitleT41,
32
+ fontSizeMobileContentC12 = otherDesignTokens.fontSizeMobileContentC12,
33
+ fontSizeMobileContentC13 = otherDesignTokens.fontSizeMobileContentC13,
34
+ fontSizeMobileContentC14 = otherDesignTokens.fontSizeMobileContentC14,
35
+ fontSizeMobileTitleT15 = otherDesignTokens.fontSizeMobileTitleT15,
36
+ fontSizeMobileTitleT21 = otherDesignTokens.fontSizeMobileTitleT21,
37
+ fontSizeMobileTitleT23 = otherDesignTokens.fontSizeMobileTitleT23,
38
+ fontSizeMobileTitleT32 = otherDesignTokens.fontSizeMobileTitleT32,
39
+ fontSizeMobileTitleT41 = otherDesignTokens.fontSizeMobileTitleT41,
40
+ fontFamilyPromaryBold = otherDesignTokens.fontFamilyPromaryBold,
41
+ fontFamilySecondaryRegular = otherDesignTokens.fontFamilySecondaryRegular,
42
+ fontFamilySecondarySemiBold = otherDesignTokens.fontFamilySecondarySemiBold,
43
+ fontFamilySecondaryBold = otherDesignTokens.fontFamilySecondaryBold;
44
+ var fontFamilyMap = {
45
+ fontFamilyPromaryRegular: "Regular",
46
+ fontFamilyPromarySemiBold: "SemiBold",
47
+ fontFamilyPromaryBold: "Bold",
48
+ fontFamilySecondaryRegular: "Regular",
49
+ fontFamilySecondarySemiBold: "SemiBold",
50
+ fontFamilySecondaryBold: "Bold"
51
+ };
52
+ var useCustomButtonStyle = function useCustomButtonStyle() {
53
+ var hashId = useStyleRegister({
54
+ theme: theme,
55
+ token: {
56
+ baseColor: 'blue'
57
+ },
58
+ path: ["".concat(prefixCls, "-size")]
59
+ }, function () {
60
+ return "\n .".concat(prefixCls, "-mobile.").concat(prefixCls, "-size-TitleT41Bold {\n font-size: ").concat(fontSizeMobileTitleT41, ";\n line-height: 1.2;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n // font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-TitleT32Bold {\n font-size: ").concat(fontSizeMobileTitleT32, ";\n line-height: 1.2;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-TitleT23Bold {\n font-size: ").concat(fontSizeMobileTitleT23, ";\n line-height: 1.2;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-TitleT21Bold {\n font-size: ").concat(fontSizeMobileTitleT21, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-TitleT15Bold {\n font-size: ").concat(fontSizeMobileTitleT15, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC14Bold {\n font-size: ").concat(fontSizeMobileContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC14Regular {\n font-size: ").concat(fontSizeMobileContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC14Strikethrough {\n color: #757575;\n font-size: ").concat(fontSizeMobileContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n text-decoration: line-through;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC14TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC14, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC13Bold {\n font-size: ").concat(fontSizeMobileContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC13Regular {\n font-size: ").concat(fontSizeMobileContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC13Strikethrough {\n color: #757575;\n font-size: ").concat(fontSizeMobileContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n text-decoration: line-through;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC13TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC13, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC12Regular {\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC12Strikethrough {\n color: #757575;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n text-decoration: line-through;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC12SemiBold {\n font-family: ").concat(fontFamilySecondarySemiBold, "-").concat(fontFamilyMap.fontFamilySecondarySemiBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC12Bold {\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC12TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-TitleT41Bold {\n font-size: ").concat(fontSizeDesktopTitleT41, ";\n line-height: 1.2;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-TitleT32Bold {\n font-size: ").concat(fontSizeDesktopTitleT32, ";\n line-height: 1.2;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-TitleT23Bold {\n font-size: ").concat(fontSizeDesktopTitleT23, ";\n line-height: 1.2;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-TitleT21Bold {\n font-size: ").concat(fontSizeDesktopTitleT21, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-TitleT15Bold {\n font-size: ").concat(fontSizeDesktopTitleT15, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC14Bold {\n font-size: ").concat(fontSizeDesktopContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC14Regular {\n font-size: ").concat(fontSizeDesktopContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC14Strikethrough {\n color: #757575;\n font-size: ").concat(fontSizeDesktopContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n text-decoration: line-through;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC14TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC14, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC13Bold {\n font-size: ").concat(fontSizeDesktopContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC13Regular {\n font-size: ").concat(fontSizeDesktopContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC13Strikethrough {\n color: #757575;\n font-size: ").concat(fontSizeDesktopContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n text-decoration: line-through;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC13TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC13, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC12Regular {\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC12Strikethrough {\n color: #757575;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n text-decoration: line-through;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC12SemiBold {\n font-family: ").concat(fontFamilySecondarySemiBold, "-").concat(fontFamilyMap.fontFamilySecondarySemiBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC12Bold {\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC12TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.2px;\n }\n ");
61
+ });
62
+ return hashId;
63
+ };
64
+ useCustomButtonStyle();
65
+ var baseProps = {
66
+ className: classNames(prefixCls, _defineProperty({}, "".concat(prefixCls, "-size-").concat(size), size), breakpoint === 'Desktop' ? "".concat(prefixCls, "-desktop") : "".concat(prefixCls, "-mobile"), className),
67
+ style: style
68
+ };
69
+ return /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread(_objectSpread({}, baseProps), attr), {}, {
70
+ children: children
71
+ }));
72
+ };
73
+ export default Text;
@@ -0,0 +1,2 @@
1
+
2
+ @import './variables.less';
@@ -0,0 +1,38 @@
1
+ declare const designTokens: {
2
+ borderRadius: any;
3
+ paddingInline: any;
4
+ colorText: any;
5
+ colorBorder: string;
6
+ hoverBorderColor: string;
7
+ activeBorderColor: string;
8
+ activeShadow: string;
9
+ colorError: string;
10
+ colorBgContainer: any;
11
+ colorBgContainerDisabled: any;
12
+ };
13
+ declare const otherDesignTokens: {
14
+ hoverBorderColor: any;
15
+ activeBorderColor: any;
16
+ paddingBlock: any;
17
+ colorLabelActive: any;
18
+ colorLabel: any;
19
+ width: string;
20
+ colorError: any;
21
+ iconPaddingLeft: any;
22
+ colorInputIconStandard: any;
23
+ spacingInputTextHintMessagePaddingTop: any;
24
+ colorInputTextHintMessage: any;
25
+ colorInputTextCounter: any;
26
+ colorErrorBorder: any;
27
+ colorInputBackgroundHaze: any;
28
+ };
29
+ declare const commonToken: {
30
+ [x: string]: string | number;
31
+ };
32
+ declare const styleToken: {
33
+ [x: string]: string;
34
+ };
35
+ declare const stickyStyleToken: {
36
+ [x: string]: string;
37
+ };
38
+ export { designTokens, otherDesignTokens, styleToken, stickyStyleToken, commonToken };