@digitalc/dxp-ui 0.0.5-alpha.15 → 0.0.5-alpha.17

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 (238) hide show
  1. package/README.md +81 -47
  2. package/es/assets/token.json +128 -102
  3. package/es/components/Accordion/designTokens.d.ts +3 -3
  4. package/es/components/Accordion/designTokens.js +22 -14
  5. package/es/components/Accordion/index.js +8 -4
  6. package/es/components/Amount/designTokens.d.ts +2 -2
  7. package/es/components/Amount/designTokens.js +12 -8
  8. package/es/components/Amount/index.d.ts +3 -10
  9. package/es/components/Amount/index.js +122 -136
  10. package/es/components/Button/designTokens.d.ts +18 -3
  11. package/es/components/Button/designTokens.js +136 -122
  12. package/es/components/Button/index.d.ts +16 -5
  13. package/es/components/Button/index.js +89 -94
  14. package/es/components/Button/style/index.less +1 -1
  15. package/es/components/Card/designTokens.d.ts +9 -0
  16. package/es/components/Card/designTokens.js +14 -0
  17. package/es/components/Card/index.d.ts +15 -0
  18. package/es/components/Card/index.js +66 -0
  19. package/es/components/Card/style/index.less +45 -0
  20. package/es/components/Card/style/variables.less +4 -0
  21. package/es/components/Chip/designTokens.d.ts +2 -2
  22. package/es/components/Chip/designTokens.js +25 -21
  23. package/es/components/Chip/index.js +9 -8
  24. package/es/components/Divider/designTokens.d.ts +4 -0
  25. package/es/components/Divider/designTokens.js +9 -0
  26. package/es/components/Divider/index.d.ts +3 -8
  27. package/es/components/Divider/index.js +31 -49
  28. package/es/components/Drawer/designTokens.d.ts +2 -2
  29. package/es/components/Drawer/designTokens.js +30 -26
  30. package/es/components/Drawer/index.d.ts +6 -2
  31. package/es/components/Drawer/index.js +71 -68
  32. package/es/components/Drawer/style/index.less +13 -7
  33. package/es/components/GlobalTokenProvider/index.d.ts +11 -0
  34. package/es/components/GlobalTokenProvider/index.js +16 -0
  35. package/es/components/Icon/designTokens.d.ts +3 -3
  36. package/es/components/Icon/designTokens.js +11 -6
  37. package/es/components/Icon/index.js +6 -2
  38. package/es/components/IconButton/designTokens.d.ts +3 -4
  39. package/es/components/IconButton/designTokens.js +38 -32
  40. package/es/components/IconButton/index.d.ts +1 -1
  41. package/es/components/IconButton/index.js +7 -7
  42. package/es/components/Image/index.d.ts +1 -1
  43. package/es/components/Image/index.js +4 -3
  44. package/es/components/ListItem/designTokens.d.ts +4 -2
  45. package/es/components/ListItem/designTokens.js +36 -30
  46. package/es/components/ListItem/index.d.ts +12 -2
  47. package/es/components/ListItem/index.js +95 -30
  48. package/es/components/ListItem/style/index.less +42 -9
  49. package/es/components/Modal/designTokens.d.ts +11 -20
  50. package/es/components/Modal/designTokens.js +39 -30
  51. package/es/components/Modal/index.js +24 -11
  52. package/es/components/Navigation/designTokens.d.ts +9 -8
  53. package/es/components/Navigation/designTokens.js +24 -18
  54. package/es/components/Navigation/index.d.ts +1 -0
  55. package/es/components/Navigation/index.js +14 -10
  56. package/es/components/Notification/designTokens.d.ts +9 -0
  57. package/es/components/Notification/designTokens.js +14 -0
  58. package/es/components/Notification/index.d.ts +12 -0
  59. package/es/components/Notification/index.js +54 -0
  60. package/es/components/Notification/style/index.less +45 -0
  61. package/es/components/Notification/style/variables.less +4 -0
  62. package/es/components/Search/designTokens.d.ts +4 -4
  63. package/es/components/Search/designTokens.js +57 -46
  64. package/es/components/Search/index.js +15 -9
  65. package/es/components/Stepper/designTokens.d.ts +4 -5
  66. package/es/components/Stepper/designTokens.js +48 -40
  67. package/es/components/Stepper/index.d.ts +9 -10
  68. package/es/components/Stepper/index.js +139 -135
  69. package/es/components/Stepper/style/index.less +27 -12
  70. package/es/components/StickyFooter/designTokens.d.ts +2 -2
  71. package/es/components/StickyFooter/designTokens.js +20 -16
  72. package/es/components/StickyFooter/index.d.ts +2 -2
  73. package/es/components/StickyFooter/index.js +68 -39
  74. package/es/components/StickyFooter/style/index.less +5 -3
  75. package/es/components/Tabs/designTokens.d.ts +6 -6
  76. package/es/components/Tabs/designTokens.js +77 -60
  77. package/es/components/Tabs/index.js +11 -6
  78. package/es/components/Tag/designTokens.d.ts +42 -42
  79. package/es/components/Tag/designTokens.js +139 -95
  80. package/es/components/Tag/index.d.ts +1 -1
  81. package/es/components/Tag/index.js +16 -3
  82. package/es/components/Text/designTokens.d.ts +19 -10
  83. package/es/components/Text/designTokens.js +65 -51
  84. package/es/components/Text/index.d.ts +2 -1
  85. package/es/components/Text/index.js +42 -12
  86. package/es/components/TextInputInside/designTokens.d.ts +3 -12
  87. package/es/components/TextInputInside/designTokens.js +59 -57
  88. package/es/components/TextInputInside/index.js +10 -7
  89. package/es/components/TextInputOutside/designTokens.d.ts +5 -5
  90. package/es/components/TextInputOutside/designTokens.js +77 -61
  91. package/es/components/TextInputOutside/index.js +12 -7
  92. package/es/components/TextLink/designTokens.d.ts +2 -2
  93. package/es/components/TextLink/designTokens.js +14 -10
  94. package/es/components/TextLink/index.js +2 -1
  95. package/es/components/Toast/designTokens.d.ts +2 -2
  96. package/es/components/Toast/designTokens.js +20 -19
  97. package/es/components/Toast/index.js +2 -1
  98. package/es/components/Toggle/designTokens.d.ts +2 -2
  99. package/es/components/Toggle/designTokens.js +16 -12
  100. package/es/components/Toggle/index.js +2 -1
  101. package/es/components/index.d.ts +7 -1
  102. package/es/components/index.js +6 -2
  103. package/es/constants/index.d.ts +4 -1
  104. package/es/constants/index.js +5 -1
  105. package/es/index.d.ts +2 -0
  106. package/es/index.js +4 -0
  107. package/es/tokens/DXPGlobal.d.ts +27 -19
  108. package/es/tokens/DXPGlobal.js +3 -2
  109. package/es/utils/TokenContext.d.ts +14 -0
  110. package/es/utils/TokenContext.js +91 -0
  111. package/es/utils/deviceType.d.ts +14 -0
  112. package/es/utils/deviceType.js +65 -0
  113. package/es/utils/index.d.ts +9 -0
  114. package/es/utils/index.js +9 -0
  115. package/es/utils/tokenHelper.js +2 -5
  116. package/es/utils/tokenManager.d.ts +82 -20
  117. package/es/utils/tokenManager.js +857 -779
  118. package/lib/assets/token.json +128 -102
  119. package/lib/components/Accordion/designTokens.d.ts +3 -3
  120. package/lib/components/Accordion/designTokens.js +25 -17
  121. package/lib/components/Accordion/index.js +8 -4
  122. package/lib/components/Amount/designTokens.d.ts +2 -2
  123. package/lib/components/Amount/designTokens.js +13 -9
  124. package/lib/components/Amount/index.d.ts +3 -10
  125. package/lib/components/Amount/index.js +84 -90
  126. package/lib/components/Button/designTokens.d.ts +18 -3
  127. package/lib/components/Button/designTokens.js +120 -114
  128. package/lib/components/Button/index.d.ts +16 -5
  129. package/lib/components/Button/index.js +59 -51
  130. package/lib/components/Button/style/index.less +1 -1
  131. package/lib/components/Card/designTokens.d.ts +9 -0
  132. package/lib/components/Card/designTokens.js +37 -0
  133. package/lib/components/Card/index.d.ts +15 -0
  134. package/lib/components/Card/index.js +156 -0
  135. package/lib/components/Card/style/index.less +45 -0
  136. package/lib/components/Card/style/variables.less +4 -0
  137. package/lib/components/Chip/designTokens.d.ts +2 -2
  138. package/lib/components/Chip/designTokens.js +25 -21
  139. package/lib/components/Chip/index.js +8 -5
  140. package/lib/components/Divider/designTokens.d.ts +4 -0
  141. package/lib/components/Divider/designTokens.js +32 -0
  142. package/lib/components/Divider/index.d.ts +3 -8
  143. package/lib/components/Divider/index.js +41 -43
  144. package/lib/components/Drawer/designTokens.d.ts +2 -2
  145. package/lib/components/Drawer/designTokens.js +31 -38
  146. package/lib/components/Drawer/index.d.ts +6 -2
  147. package/lib/components/Drawer/index.js +80 -53
  148. package/lib/components/Drawer/style/index.less +13 -7
  149. package/lib/components/GlobalTokenProvider/index.d.ts +11 -0
  150. package/lib/components/GlobalTokenProvider/index.js +40 -0
  151. package/lib/components/Icon/designTokens.d.ts +3 -3
  152. package/lib/components/Icon/designTokens.js +11 -17
  153. package/lib/components/Icon/index.js +5 -4
  154. package/lib/components/IconButton/designTokens.d.ts +3 -4
  155. package/lib/components/IconButton/designTokens.js +41 -34
  156. package/lib/components/IconButton/index.d.ts +1 -1
  157. package/lib/components/IconButton/index.js +25 -23
  158. package/lib/components/Image/index.d.ts +1 -1
  159. package/lib/components/Image/index.js +4 -4
  160. package/lib/components/ListItem/designTokens.d.ts +4 -2
  161. package/lib/components/ListItem/designTokens.js +36 -41
  162. package/lib/components/ListItem/index.d.ts +12 -2
  163. package/lib/components/ListItem/index.js +115 -46
  164. package/lib/components/ListItem/style/index.less +42 -9
  165. package/lib/components/Modal/designTokens.d.ts +11 -20
  166. package/lib/components/Modal/designTokens.js +44 -60
  167. package/lib/components/Modal/index.js +63 -16
  168. package/lib/components/Navigation/designTokens.d.ts +9 -8
  169. package/lib/components/Navigation/designTokens.js +24 -29
  170. package/lib/components/Navigation/index.d.ts +1 -0
  171. package/lib/components/Navigation/index.js +13 -12
  172. package/lib/components/Notification/designTokens.d.ts +9 -0
  173. package/lib/components/Notification/designTokens.js +37 -0
  174. package/lib/components/Notification/index.d.ts +12 -0
  175. package/lib/components/Notification/index.js +110 -0
  176. package/lib/components/Notification/style/index.less +45 -0
  177. package/lib/components/Notification/style/variables.less +4 -0
  178. package/lib/components/Search/designTokens.d.ts +4 -4
  179. package/lib/components/Search/designTokens.js +61 -49
  180. package/lib/components/Search/index.js +31 -9
  181. package/lib/components/Stepper/designTokens.d.ts +4 -5
  182. package/lib/components/Stepper/designTokens.js +70 -62
  183. package/lib/components/Stepper/index.d.ts +9 -10
  184. package/lib/components/Stepper/index.js +104 -53
  185. package/lib/components/Stepper/style/index.less +27 -12
  186. package/lib/components/StickyFooter/designTokens.d.ts +2 -2
  187. package/lib/components/StickyFooter/designTokens.js +21 -17
  188. package/lib/components/StickyFooter/index.d.ts +2 -2
  189. package/lib/components/StickyFooter/index.js +50 -18
  190. package/lib/components/StickyFooter/style/index.less +5 -3
  191. package/lib/components/Tabs/designTokens.d.ts +6 -6
  192. package/lib/components/Tabs/designTokens.js +80 -63
  193. package/lib/components/Tabs/index.js +19 -12
  194. package/lib/components/Tag/designTokens.d.ts +42 -42
  195. package/lib/components/Tag/designTokens.js +159 -115
  196. package/lib/components/Tag/index.d.ts +1 -1
  197. package/lib/components/Tag/index.js +27 -14
  198. package/lib/components/Text/designTokens.d.ts +19 -10
  199. package/lib/components/Text/designTokens.js +65 -51
  200. package/lib/components/Text/index.d.ts +2 -1
  201. package/lib/components/Text/index.js +407 -297
  202. package/lib/components/TextInputInside/designTokens.d.ts +3 -12
  203. package/lib/components/TextInputInside/designTokens.js +62 -75
  204. package/lib/components/TextInputInside/index.js +10 -7
  205. package/lib/components/TextInputOutside/designTokens.d.ts +5 -5
  206. package/lib/components/TextInputOutside/designTokens.js +82 -66
  207. package/lib/components/TextInputOutside/index.js +12 -8
  208. package/lib/components/TextLink/designTokens.d.ts +2 -2
  209. package/lib/components/TextLink/designTokens.js +14 -21
  210. package/lib/components/TextLink/index.js +3 -2
  211. package/lib/components/Toast/designTokens.d.ts +2 -2
  212. package/lib/components/Toast/designTokens.js +20 -16
  213. package/lib/components/Toast/index.js +7 -6
  214. package/lib/components/Toggle/designTokens.d.ts +2 -2
  215. package/lib/components/Toggle/designTokens.js +16 -23
  216. package/lib/components/Toggle/index.js +3 -2
  217. package/lib/components/index.d.ts +7 -1
  218. package/lib/components/index.js +10 -2
  219. package/lib/constants/index.d.ts +4 -1
  220. package/lib/constants/index.js +5 -1
  221. package/lib/index.d.ts +2 -0
  222. package/lib/index.js +22 -0
  223. package/lib/tokens/DXPGlobal.d.ts +27 -19
  224. package/lib/tokens/DXPGlobal.js +1 -1
  225. package/lib/utils/TokenContext.d.ts +14 -0
  226. package/lib/utils/TokenContext.js +85 -0
  227. package/lib/utils/deviceType.d.ts +14 -0
  228. package/lib/utils/deviceType.js +56 -0
  229. package/lib/utils/index.d.ts +9 -0
  230. package/lib/utils/index.js +44 -0
  231. package/lib/utils/tokenHelper.js +2 -12
  232. package/lib/utils/tokenManager.d.ts +82 -20
  233. package/lib/utils/tokenManager.js +840 -777
  234. package/package.json +14 -11
  235. package/umd/dxp-ui.min.css +1 -1
  236. package/umd/dxp-ui.min.js +1 -1
  237. package/lib/components/Button/demo/index.d.ts +0 -3
  238. package/lib/components/Button/demo/index.js +0 -138
@@ -1,8 +1,8 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["hideBorder", "className", "rightIcons", "rightLink", "title", "goBack", "isInverse", "titleIconBadge", "imgBackground", "noRight", "leftIconName", "leftIconSize"];
3
+ var _excluded = ["hideBorder", "className", "rightIcons", "rightLink", "title", "goBack", "isInverse", "titleIconBadge", "imgBackground", "noRight", "leftIconName", "leftIconSize", "hidegoback"];
4
4
  import React from 'react';
5
- import designTokens from "./designTokens";
5
+ import { useDesignTokens } from "./designTokens";
6
6
  import { useStyleRegister } from '@ant-design/cssinjs';
7
7
  import { isEmpty } from 'lodash';
8
8
  import { theme } from "../../utils/theme";
@@ -13,7 +13,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  var Navigation = function Navigation(_ref) {
14
14
  var _rightIcons$slice;
15
15
  var hideBorder = _ref.hideBorder,
16
- className = _ref.className,
16
+ _ref$className = _ref.className,
17
+ className = _ref$className === void 0 ? '' : _ref$className,
17
18
  rightIcons = _ref.rightIcons,
18
19
  rightLink = _ref.rightLink,
19
20
  title = _ref.title,
@@ -25,9 +26,13 @@ var Navigation = function Navigation(_ref) {
25
26
  noRight = _ref$noRight === void 0 ? false : _ref$noRight,
26
27
  leftIconName = _ref.leftIconName,
27
28
  leftIconSize = _ref.leftIconSize,
29
+ _ref$hidegoback = _ref.hidegoback,
30
+ hidegoback = _ref$hidegoback === void 0 ? false : _ref$hidegoback,
28
31
  restProps = _objectWithoutProperties(_ref, _excluded);
32
+ var designTokens = useDesignTokens();
29
33
  var spacingTopNavigationPaddingHorizontal = designTokens.spacingTopNavigationPaddingHorizontal,
30
34
  spacingTopNavigationPaddingBottom = designTokens.spacingTopNavigationPaddingBottom,
35
+ spacingTopNavigationPaddingTop = designTokens.spacingTopNavigationPaddingTop,
31
36
  colorTopNavigationBorderBottom = designTokens.colorTopNavigationBorderBottom,
32
37
  spacingTopNavigationTextLinkPaddingRight = designTokens.spacingTopNavigationTextLinkPaddingRight,
33
38
  colorTopNavigationBackgroundInverse = designTokens.colorTopNavigationBackgroundInverse,
@@ -35,14 +40,13 @@ var Navigation = function Navigation(_ref) {
35
40
  colorTopNavigationTitleStandard = designTokens.colorTopNavigationTitleStandard,
36
41
  colorTopNavigationTitleInverse = designTokens.colorTopNavigationTitleInverse,
37
42
  colorTopNavigationGradient = designTokens.colorTopNavigationGradient;
38
- console.log('designTokens', designTokens);
39
43
  var useCustomButtonStyle = function useCustomButtonStyle() {
40
44
  var hashId = useStyleRegister({
41
45
  theme: theme,
42
46
  token: {},
43
47
  path: ["".concat(cssClasses.PREFIX, "-header")]
44
48
  }, function () {
45
- return "\n .".concat(cssClasses.PREFIX, "-header {\n padding-left: ").concat(spacingTopNavigationPaddingHorizontal, "px;\n padding-right: ").concat(spacingTopNavigationPaddingHorizontal, "px;\n padding-bottom: ").concat(spacingTopNavigationPaddingBottom, "px;\n padding-top: ").concat(spacingTopNavigationPaddingBottom, "px; // TODO\uFF1A\u8BBE\u8BA1\u7A3F\u4E0A\u6CA1\u6709\u6682\u65F6\u52A0\u7684\n border-bottom: 1px solid ").concat(colorTopNavigationBorderBottom, ";\n background-color:").concat(colorTopNavigationBackground, ";\n &.inverse {\n background-color:").concat(colorTopNavigationBackgroundInverse, ";\n }\n &.imgBackground {\n background:").concat(colorTopNavigationGradient, ";\n }\n &.hideBorder {\n border-bottom:none;\n box-shadow: 0px -2px 10px 0px rgba(26, 24, 134, 0.1);\n }\n &.noRight{\n justify-content:center !important;\n .dxp-title-warp{\n line-height:41px;\n }\n .").concat(cssClasses.PREFIX, "-header-back {\n position:absolute;\n left: ").concat(spacingTopNavigationPaddingHorizontal, "px;\n }\n }\n }\n .").concat(cssClasses.PREFIX, "-title {\n color:").concat(colorTopNavigationTitleStandard, ";\n &.inverse {\n color:").concat(colorTopNavigationTitleInverse, ";\n }\n }\n .").concat(cssClasses.PREFIX, "-right-link {\n padding-right: ").concat(spacingTopNavigationTextLinkPaddingRight, "px;\n }\n ");
49
+ return "\n .".concat(cssClasses.PREFIX, "-header {\n padding-left: ").concat(spacingTopNavigationPaddingHorizontal, "px;\n padding-right: ").concat(spacingTopNavigationPaddingHorizontal, "px;\n padding-bottom: ").concat(spacingTopNavigationPaddingBottom, "px;\n padding-top: ").concat(spacingTopNavigationPaddingTop, "px; \n border-bottom: 1px solid ").concat(colorTopNavigationBorderBottom, ";\n background-color:").concat(colorTopNavigationBackground, ";\n &.inverse {\n background-color:").concat(colorTopNavigationBackgroundInverse, ";\n }\n &.imgBackground {\n background:").concat(colorTopNavigationGradient, ";\n }\n &.hideBorder {\n border-bottom:none;\n box-shadow: 0px -2px 10px 0px rgba(26, 24, 134, 0.1);\n }\n &.noRight{\n justify-content:center !important;\n .dxp-title-warp{\n line-height:41px;\n }\n .").concat(cssClasses.PREFIX, "-header-back {\n position:absolute;\n left: ").concat(spacingTopNavigationPaddingHorizontal, "px;\n }\n }\n }\n .").concat(cssClasses.PREFIX, "-title {\n color:").concat(colorTopNavigationTitleStandard, ";\n &.inverse {\n color:").concat(colorTopNavigationTitleInverse, ";\n }\n }\n .").concat(cssClasses.PREFIX, "-right-link {\n padding-right: ").concat(spacingTopNavigationTextLinkPaddingRight, "px;\n }\n ");
46
50
  });
47
51
  return hashId;
48
52
  };
@@ -53,9 +57,9 @@ var Navigation = function Navigation(_ref) {
53
57
  }
54
58
  };
55
59
  return /*#__PURE__*/_jsxs("header", _objectSpread(_objectSpread({
56
- className: "".concat(cssClasses.PREFIX, "-header ").concat(hideBorder ? 'hideBorder' : '', " ").concat(isInverse ? 'inverse' : '', " ").concat(imgBackground ? 'imgBackground' : '', " ").concat(noRight ? 'noRight' : '', " ").concat(className || '')
60
+ className: "".concat(cssClasses.PREFIX, "-header ").concat(hideBorder ? 'hideBorder' : '', " ").concat(isInverse ? 'inverse' : '', " ").concat(imgBackground ? 'imgBackground' : '', " ").concat(noRight ? 'noRight' : '', " ").concat(className || '')
57
61
  }, restProps), {}, {
58
- children: [/*#__PURE__*/_jsx(IconButton, {
62
+ children: [!hidegoback && /*#__PURE__*/_jsx(IconButton, {
59
63
  className: "".concat(cssClasses.PREFIX, "-header-back"),
60
64
  customeIconSize: leftIconSize,
61
65
  inverse: isInverse,
@@ -63,7 +67,7 @@ var Navigation = function Navigation(_ref) {
63
67
  name: leftIconName || "icon-a-Backarrow-copy",
64
68
  onClick: onGoBack
65
69
  }), /*#__PURE__*/_jsx("div", {
66
- className: "\n ".concat(cssClasses.PREFIX, "-title-warp\n "),
70
+ className: "".concat(cssClasses.PREFIX, "-title-warp"),
67
71
  children: !isEmpty(titleIconBadge) ? /*#__PURE__*/_jsxs("div", {
68
72
  className: "".concat(cssClasses.PREFIX, "-title-badge"),
69
73
  children: [/*#__PURE__*/_jsx(Icon, {
@@ -75,7 +79,7 @@ var Navigation = function Navigation(_ref) {
75
79
  name: titleIconBadge.iconName
76
80
  }), /*#__PURE__*/_jsx(Text, {
77
81
  inverse: isInverse,
78
- size: "ContentC14Bold",
82
+ size: "NavigationBold",
79
83
  className: "".concat(cssClasses.PREFIX, "-title ").concat(isInverse ? 'inverse' : '', " "),
80
84
  children: titleIconBadge.title
81
85
  }), /*#__PURE__*/_jsx("div", {
@@ -84,7 +88,7 @@ var Navigation = function Navigation(_ref) {
84
88
  })]
85
89
  }) : /*#__PURE__*/_jsx(Text, {
86
90
  inverse: isInverse,
87
- size: "ContentC14Bold",
91
+ size: "NavigationBold",
88
92
  className: "".concat(cssClasses.PREFIX, "-title ").concat(isInverse ? 'inverse' : '', " "),
89
93
  children: title
90
94
  })
@@ -0,0 +1,9 @@
1
+ declare const useDesignTokens: () => {
2
+ colorNotificationBackgroundInfo: any;
3
+ borderRadiusNotification: any;
4
+ spacingNotificationPaddingHorizontal: any;
5
+ spacingNotificationPaddingVertical: any;
6
+ colorNotificationTextTitle: any;
7
+ colorNotificationTextBody: any;
8
+ };
9
+ export { useDesignTokens };
@@ -0,0 +1,14 @@
1
+ import { useDynamicTokens } from "../../utils";
2
+ var useDesignTokens = function useDesignTokens() {
3
+ var getToken = useDynamicTokens();
4
+ var designTokens = {
5
+ colorNotificationBackgroundInfo: getToken('colorNotificationBackgroundInfo'),
6
+ borderRadiusNotification: getToken('borderRadiusNotification'),
7
+ spacingNotificationPaddingHorizontal: getToken('spacingNotificationPaddingHorizontal'),
8
+ spacingNotificationPaddingVertical: getToken('spacingNotificationPaddingVertical'),
9
+ colorNotificationTextTitle: getToken('colorNotificationTextTitle'),
10
+ colorNotificationTextBody: getToken('colorNotificationTextBody')
11
+ };
12
+ return designTokens;
13
+ };
14
+ export { useDesignTokens };
@@ -0,0 +1,12 @@
1
+ import React, { ReactNode } from 'react';
2
+ import './style/index.less';
3
+ export interface NotificationProps {
4
+ type?: 'info';
5
+ className?: string;
6
+ title?: ReactNode;
7
+ content?: ReactNode;
8
+ style?: React.CSSProperties;
9
+ [key: string]: any;
10
+ }
11
+ declare const Notification: (props: NotificationProps) => React.JSX.Element;
12
+ export default Notification;
@@ -0,0 +1,54 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["className", "prefixCls", "type", "title", "content"];
4
+ import React from 'react';
5
+ import { useStyleRegister } from '@ant-design/cssinjs';
6
+ import { theme } from "../../utils/theme";
7
+ import { useDesignTokens } from "./designTokens";
8
+ import { cssClasses } from "../../constants";
9
+ import { Text } from "../";
10
+ import "./style/index.less";
11
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
+ var Notification = function Notification(props) {
13
+ var _props$className = props.className,
14
+ className = _props$className === void 0 ? '' : _props$className,
15
+ _props$prefixCls = props.prefixCls,
16
+ prefixCls = _props$prefixCls === void 0 ? cssClasses.PREFIX + '-notification' : _props$prefixCls,
17
+ _props$type = props.type,
18
+ type = _props$type === void 0 ? 'info' : _props$type,
19
+ title = props.title,
20
+ content = props.content,
21
+ attr = _objectWithoutProperties(props, _excluded);
22
+ var designTokens = useDesignTokens();
23
+ var colorNotificationBackgroundInfo = designTokens.colorNotificationBackgroundInfo,
24
+ borderRadiusNotification = designTokens.borderRadiusNotification,
25
+ spacingNotificationPaddingHorizontal = designTokens.spacingNotificationPaddingHorizontal,
26
+ spacingNotificationPaddingVertical = designTokens.spacingNotificationPaddingVertical,
27
+ colorNotificationTextTitle = designTokens.colorNotificationTextTitle,
28
+ colorNotificationTextBody = designTokens.colorNotificationTextBody;
29
+ var useCustomButtonStyle = function useCustomButtonStyle() {
30
+ var hashId = useStyleRegister({
31
+ theme: theme,
32
+ token: {},
33
+ path: [prefixCls]
34
+ }, function () {
35
+ return "\n .".concat(prefixCls, " {\n display: flex;\n flex-flow: column;\n padding: ").concat(spacingNotificationPaddingVertical, "px ").concat(spacingNotificationPaddingHorizontal, "px;\n border-radius: ").concat(borderRadiusNotification, "px;\n background: ").concat(colorNotificationBackgroundInfo, ";\n }\n ");
36
+ });
37
+ return hashId;
38
+ };
39
+ useCustomButtonStyle();
40
+ return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
41
+ className: "".concat(prefixCls, " ").concat(prefixCls, "-").concat(type, " ").concat(className)
42
+ }, attr), {}, {
43
+ children: [/*#__PURE__*/_jsx(Text, {
44
+ size: "TitleT14Bold",
45
+ color: colorNotificationTextTitle,
46
+ children: title
47
+ }), /*#__PURE__*/_jsx(Text, {
48
+ size: "ContentC12Regular",
49
+ color: colorNotificationTextBody,
50
+ children: content
51
+ })]
52
+ }));
53
+ };
54
+ export default Notification;
@@ -0,0 +1,45 @@
1
+
2
+ @import './variables.less';
3
+
4
+ @components: card;
5
+ .@{prefix}-@{components} {
6
+ background: #FFFFFF;
7
+ overflow: unset;
8
+ }
9
+ .@{prefix}-@{components}-whiteDivider,
10
+ .@{prefix}-@{components}-grayDivider {
11
+ padding: 0;
12
+ .@{prefix}-@{components}-list {
13
+ background: #FFFFFF;
14
+ overflow: unset;
15
+ > div {
16
+ position: relative;
17
+ }
18
+ > div + div {
19
+ border-top: 1px dashed #D5D5D5;
20
+ &::before,
21
+ &::after {
22
+ content: '';
23
+ display: block;
24
+ height: 16px;
25
+ width: 8px;
26
+ position: absolute;
27
+ z-index: 99;
28
+ top: -8px;
29
+ border: 1px solid #d5d5d5;
30
+ }
31
+ &::before {
32
+ left: -1px;
33
+ border-top-right-radius: 16px;
34
+ border-bottom-right-radius: 16px;
35
+ border-left: 0;
36
+ }
37
+ &::after {
38
+ right: -1px;
39
+ border-top-left-radius: 16px;
40
+ border-bottom-left-radius: 16px;
41
+ border-right: 0;
42
+ }
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,4 @@
1
+
2
+ @import '../../../style/variables.less';
3
+
4
+ @btn-primary-bg-default: var(--base-color-primary);
@@ -1,4 +1,4 @@
1
- declare const otherDesignTokens: {
1
+ declare const useOtherDesignTokens: () => {
2
2
  spacingSearchInputIconPaddingRight: any;
3
3
  spacingSearchInputPaddingHorizontal: any;
4
4
  colorSearchInputIconStandard: any;
@@ -13,7 +13,7 @@ declare const otherDesignTokens: {
13
13
  spacingSearchInputResultListPaddingLeft: any;
14
14
  spacingSearchInputResultListPaddingRight: any;
15
15
  };
16
- declare const designTokens: {
16
+ declare const useDesignTokens: () => {
17
17
  borderRadius: any;
18
18
  paddingBlock: number;
19
19
  paddingInline: any;
@@ -28,7 +28,7 @@ declare const designTokens: {
28
28
  fontSize: any;
29
29
  lineHeight: number;
30
30
  };
31
- declare const styleToken: {
31
+ declare const useStyleToken: () => {
32
32
  [x: string]: any;
33
33
  };
34
- export { designTokens, otherDesignTokens, styleToken };
34
+ export { useOtherDesignTokens, useDesignTokens, useStyleToken };
@@ -1,51 +1,62 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- import { getToken } from "../../utils/tokenHelper";
3
- // import { wSacle } from '@/utils/scaleTool';
4
2
  import { cssClasses } from "../../constants";
3
+ import { useDynamicTokens } from "../../utils";
5
4
  var prefixCls = cssClasses.PREFIX + '-input-outside';
6
- var otherDesignTokens = {
7
- spacingSearchInputIconPaddingRight: getToken('spacingSearchInputIconPaddingRight'),
8
- spacingSearchInputPaddingHorizontal: getToken('spacingSearchInputPaddingHorizontal'),
9
- colorSearchInputIconStandard: getToken('colorSearchInputIconStandard'),
10
- // 搜索图标颜色
11
- spacingSearchInputVerticalGap: getToken('spacingSearchInputVerticalGap'),
12
- colorSearchInputBackground: getToken('colorSearchInputBackground'),
13
- colorSearchInputBackgroundHover: getToken('colorSearchInputBackgroundHover'),
14
- colorSearchInputBorderStandard: getToken('colorSearchInputBorderStandard'),
15
- colorSearchInputTextPlaceholder: getToken('colorSearchInputTextPlaceholder'),
16
- colorSearchInputTextLabel: getToken('colorSearchInputTextLabel'),
17
- colorSearchInputTextResults: getToken('colorSearchInputTextResults'),
18
- spacingSearchInputResultPaddingVertical: getToken('spacingSearchInputResultPaddingVertical'),
19
- spacingSearchInputResultListPaddingLeft: getToken('spacingSearchInputResultListPaddingLeft'),
20
- spacingSearchInputResultListPaddingRight: getToken('spacingSearchInputResultListPaddingRight')
5
+ var useOtherDesignTokens = function useOtherDesignTokens() {
6
+ var getToken = useDynamicTokens();
7
+ var otherDesignTokens = {
8
+ spacingSearchInputIconPaddingRight: getToken('spacingSearchInputIconPaddingRight'),
9
+ spacingSearchInputPaddingHorizontal: getToken('spacingSearchInputPaddingHorizontal'),
10
+ colorSearchInputIconStandard: getToken('colorSearchInputIconStandard'),
11
+ // 搜索图标颜色
12
+ spacingSearchInputVerticalGap: getToken('spacingSearchInputVerticalGap'),
13
+ colorSearchInputBackground: getToken('colorSearchInputBackground'),
14
+ colorSearchInputBackgroundHover: getToken('colorSearchInputBackgroundHover'),
15
+ colorSearchInputBorderStandard: getToken('colorSearchInputBorderStandard'),
16
+ colorSearchInputTextPlaceholder: getToken('colorSearchInputTextPlaceholder'),
17
+ colorSearchInputTextLabel: getToken('colorSearchInputTextLabel'),
18
+ colorSearchInputTextResults: getToken('colorSearchInputTextResults'),
19
+ spacingSearchInputResultPaddingVertical: getToken('spacingSearchInputResultPaddingVertical'),
20
+ spacingSearchInputResultListPaddingLeft: getToken('spacingSearchInputResultListPaddingLeft'),
21
+ spacingSearchInputResultListPaddingRight: getToken('spacingSearchInputResultListPaddingRight')
22
+ };
23
+ return otherDesignTokens;
21
24
  };
22
- var designTokens = {
23
- borderRadius: getToken('borderRadiusInput'),
24
- // 圆角
25
- paddingBlock: 10,
26
- // 纵向内边距
27
- paddingInline: otherDesignTokens.spacingSearchInputPaddingHorizontal + 16 + otherDesignTokens.spacingSearchInputIconPaddingRight,
28
- // 横向内边距
29
- colorText: getToken('colorInputTextActive'),
30
- // 内容文本颜色
31
- hoverBorderColor: getToken('colorInputBorderActive'),
32
- // hover边框颜色
33
- activeBorderColor: getToken('colorInputBorderActive'),
34
- // active边框颜色
35
- activeShadow: 'none',
36
- // activeShadow: '0px 0px 0px 2px #180C8E33', // 边框shadow颜色
37
- colorBgContainer: getToken('colorInputBackground'),
38
- // 背景颜色
39
- borderWidthInputStandard: getToken('borderWidthInputStandard'),
40
- // 标准边框宽度
41
- colorBorder: getToken('colorInputBorderStandard'),
42
- // 标准边框颜色
43
- colorInputTextPlaceholder: getToken('colorInputTextPlaceholder'),
44
- // placeholder文本颜色
45
- fontSize: getToken('ContentC14Regular'),
46
- // 字体大小
47
- lineHeight: 1.5
48
- // colorBgContainerDisabled: getToken('colorInputBackgroundHaze'), // 背景颜色
25
+ var useDesignTokens = function useDesignTokens() {
26
+ var getToken = useDynamicTokens();
27
+ var designTokens = {
28
+ borderRadius: getToken('borderRadiusInput'),
29
+ // 圆角
30
+ paddingBlock: 10,
31
+ // 纵向内边距
32
+ paddingInline: getToken('spacingSearchInputPaddingHorizontal'),
33
+ // 横向内边距
34
+ colorText: getToken('colorInputTextActive'),
35
+ // 内容文本颜色
36
+ hoverBorderColor: getToken('colorInputBorderActive'),
37
+ // hover边框颜色
38
+ activeBorderColor: getToken('colorInputBorderActive'),
39
+ // active边框颜色
40
+ activeShadow: 'none',
41
+ // activeShadow: '0px 0px 0px 2px #180C8E33', // 边框shadow颜色
42
+ colorBgContainer: getToken('colorInputBackground'),
43
+ // 背景颜色
44
+ borderWidthInputStandard: getToken('borderWidthInputStandard'),
45
+ // 标准边框宽度
46
+ colorBorder: getToken('colorInputBorderStandard'),
47
+ // 标准边框颜色
48
+ colorInputTextPlaceholder: getToken('colorInputTextPlaceholder'),
49
+ // placeholder文本颜色
50
+ fontSize: getToken('ContentC14Regular'),
51
+ // 字体大小
52
+ lineHeight: 1.5
53
+ // colorBgContainerDisabled: getToken('colorInputBackgroundHaze'), // 背景颜色
54
+ };
55
+ return designTokens;
49
56
  };
50
- var styleToken = _defineProperty({}, "--".concat(prefixCls, "-color-error-border-hover"), getToken('colorInputBorderError'));
51
- export { designTokens, otherDesignTokens, styleToken };
57
+ var useStyleToken = function useStyleToken() {
58
+ var getToken = useDynamicTokens();
59
+ var styleToken = _defineProperty({}, "--".concat(prefixCls, "-color-error-border-hover"), getToken('colorInputBorderError'));
60
+ return styleToken;
61
+ };
62
+ export { useOtherDesignTokens, useDesignTokens, useStyleToken };
@@ -3,11 +3,13 @@ import _ConfigProvider from "antd/es/config-provider";
3
3
  import "antd/es/input/style";
4
4
  import _Input from "antd/es/input";
5
5
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
6
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
7
+ var _excluded = ["placeholder", "resultList", "onSearch", "onEnter", "showResult", "className"];
6
8
  import React from 'react';
7
9
  import { useStyleRegister } from '@ant-design/cssinjs';
8
10
  import { theme } from "../../utils/theme";
9
11
  import { cssClasses } from "../../constants";
10
- import { designTokens, otherDesignTokens } from "./designTokens";
12
+ import { useOtherDesignTokens, useDesignTokens } from "./designTokens";
11
13
  import Icon from "../Icon";
12
14
  import "./style/index.less";
13
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -18,10 +20,16 @@ var Search = function Search(props) {
18
20
  onSearch = _props$onSearch === void 0 ? function () {} : _props$onSearch,
19
21
  _props$onEnter = props.onEnter,
20
22
  onEnter = _props$onEnter === void 0 ? function () {} : _props$onEnter,
21
- showResult = props.showResult;
23
+ showResult = props.showResult,
24
+ _props$className = props.className,
25
+ className = _props$className === void 0 ? '' : _props$className,
26
+ attr = _objectWithoutProperties(props, _excluded);
22
27
  var prefix = "".concat(cssClasses.PREFIX, "-search");
28
+ var otherDesignTokens = useOtherDesignTokens();
29
+ var designTokens = useDesignTokens();
23
30
  var colorSearchInputIconStandard = otherDesignTokens.colorSearchInputIconStandard,
24
31
  spacingSearchInputPaddingHorizontal = otherDesignTokens.spacingSearchInputPaddingHorizontal,
32
+ spacingSearchInputIconPaddingRight = otherDesignTokens.spacingSearchInputIconPaddingRight,
25
33
  spacingSearchInputVerticalGap = otherDesignTokens.spacingSearchInputVerticalGap,
26
34
  colorSearchInputBackground = otherDesignTokens.colorSearchInputBackground,
27
35
  spacingSearchInputResultPaddingVertical = otherDesignTokens.spacingSearchInputResultPaddingVertical,
@@ -33,12 +41,10 @@ var Search = function Search(props) {
33
41
  var useCustomButtonStyle = function useCustomButtonStyle() {
34
42
  var hashId = useStyleRegister({
35
43
  theme: theme,
36
- token: {
37
- baseColor: 'blue'
38
- },
44
+ token: {},
39
45
  path: ["".concat(prefix)]
40
46
  }, function () {
41
- return "\n .".concat(prefix, "-icon {\n color: ").concat(colorSearchInputIconStandard, ";\n top: 15px;\n left: ").concat(spacingSearchInputPaddingHorizontal, "px;\n }\n .").concat(prefix, "-result {\n margin-top: ").concat(spacingSearchInputVerticalGap, "px;\n padding: ").concat(spacingSearchInputResultPaddingVertical, "px 0;\n border: 1px solid ").concat(colorSearchInputBorderStandard, ";\n background: ").concat(colorSearchInputBackground, ";\n border-radius: ").concat(designTokens.borderRadius, "px;\n color: ").concat(colorSearchInputTextResults, ";\n }\n .").concat(prefix, "-result li {\n padding: ").concat(spacingSearchInputResultPaddingVertical, "px ").concat(spacingSearchInputResultListPaddingRight, "px ").concat(spacingSearchInputResultPaddingVertical, "px ").concat(spacingSearchInputResultListPaddingLeft, "px;\n line-height: 24px;\n }\n .").concat(prefix, "-result li:hover {\n background: ").concat(colorSearchInputBackgroundHover, ";\n }\n .").concat(prefix, "-result li a {\n color: ").concat(colorSearchInputTextResults, ";\n }\n ");
47
+ return "\n .".concat(prefix, " {\n .").concat(prefix, "-input,\n .").concat(prefix, "-input-affix-wrapper {\n padding-left: ").concat(spacingSearchInputPaddingHorizontal + 16 + spacingSearchInputIconPaddingRight, "px;\n }\n }\n .").concat(prefix, "-icon {\n color: ").concat(colorSearchInputIconStandard, ";\n top: 15px;\n left: ").concat(spacingSearchInputPaddingHorizontal, "px;\n z-index: 2;\n }\n .").concat(prefix, "-result {\n margin-top: ").concat(spacingSearchInputVerticalGap, "px;\n padding: ").concat(spacingSearchInputResultPaddingVertical, "px 0;\n border: 1px solid ").concat(colorSearchInputBorderStandard, ";\n background: ").concat(colorSearchInputBackground, ";\n border-radius: ").concat(designTokens.borderRadius, "px;\n color: ").concat(colorSearchInputTextResults, ";\n }\n .").concat(prefix, "-result li {\n padding: ").concat(spacingSearchInputResultPaddingVertical, "px ").concat(spacingSearchInputResultListPaddingRight, "px ").concat(spacingSearchInputResultPaddingVertical, "px ").concat(spacingSearchInputResultListPaddingLeft, "px;\n line-height: 24px;\n }\n .").concat(prefix, "-result li:hover {\n background: ").concat(colorSearchInputBackgroundHover, ";\n }\n .").concat(prefix, "-result li a {\n color: ").concat(colorSearchInputTextResults, ";\n }\n ");
42
48
  });
43
49
  return hashId;
44
50
  };
@@ -60,8 +66,8 @@ var Search = function Search(props) {
60
66
  hashed: false
61
67
  },
62
68
  children: /*#__PURE__*/_jsxs("div", {
63
- className: prefix,
64
- children: [/*#__PURE__*/_jsx(_Input, {
69
+ className: "".concat(prefix, " ").concat(className),
70
+ children: [/*#__PURE__*/_jsx(_Input, _objectSpread({
65
71
  placeholder: placeholder,
66
72
  onChange: function onChange(e) {
67
73
  var val = e.target.value || '';
@@ -71,7 +77,7 @@ var Search = function Search(props) {
71
77
  var val = e.target.value || '';
72
78
  onEnter(val);
73
79
  }
74
- }), /*#__PURE__*/_jsx(Icon, {
80
+ }, attr)), /*#__PURE__*/_jsx(Icon, {
75
81
  className: "".concat(prefix, "-icon"),
76
82
  size: 16,
77
83
  name: "icon-Search"
@@ -1,4 +1,4 @@
1
- declare const designTokens: {
1
+ declare const useDesignTokens: () => {
2
2
  colorText: any;
3
3
  colorTextDescription: any;
4
4
  colorTextLightSolid: any;
@@ -7,14 +7,14 @@ declare const designTokens: {
7
7
  colorBorderSecondary: any;
8
8
  colorSplit: any;
9
9
  };
10
- declare const otherDesignTokens: {
10
+ declare const useOtherDesignTokens: () => {
11
11
  [x: string]: string;
12
12
  '--ant-steps-icon-size': string;
13
13
  '--ant-steps-icon-size-sm': string;
14
14
  '--dxp-steps-icon-size': string;
15
15
  '--dxp-steps-icon-size-sm': string;
16
16
  };
17
- declare const mobileDesignTokens: {
17
+ declare const useMobileDesignTokens: () => {
18
18
  colorStepperBackgroundActiveWeak: any;
19
19
  '--dxp-steps-color-neutral': any;
20
20
  '--dxp-steps-color-secondary': any;
@@ -22,5 +22,4 @@ declare const mobileDesignTokens: {
22
22
  '--dxp-steps-background-active': any;
23
23
  '--dxp-steps-background-activeWeak': any;
24
24
  };
25
- export { otherDesignTokens, mobileDesignTokens, };
26
- export default designTokens;
25
+ export { useDesignTokens, useMobileDesignTokens, useOtherDesignTokens };
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- var _otherDesignTokens;
3
- import { getToken } from "../../utils/tokenHelper";
4
2
  import { cssClasses } from "../../constants";
3
+ import { useDynamicTokens } from "../../utils";
5
4
  /*
6
5
  这里是 dxp 的 UI token,缓存在本地的内置变量;
7
6
  通过antd 提供的 ConfigProvider 注入了组件级 token 变量来实现 gomo 风格的UI组件;
@@ -12,49 +11,58 @@ import { cssClasses } from "../../constants";
12
11
  目前优先选择第二种,因为第一种需要写 less 文件,要知道对应组件的dom结构,才能覆盖;而第二种只需要对齐 变量值,就能覆盖;
13
12
  */
14
13
  var prefixCls = cssClasses.PREFIX + '-stepper';
15
- var designTokens = {
16
- // 算法配置
17
- // algorithm: true,
14
+ var useDesignTokens = function useDesignTokens() {
15
+ var getToken = useDynamicTokens();
16
+ return {
17
+ // 算法配置
18
+ // algorithm: true,
18
19
 
19
- // 当前 高亮步骤 text描述|| 已完成步骤的 text 色都是它
20
- colorText: getToken('colorStepperTextInactive'),
21
- // 深灰
22
- // 未开始的步骤text色 \ text描述色
23
- colorTextDescription: getToken('colorStepperTextInactive'),
24
- // 当前 高亮步骤 icon的 text 色
25
- colorTextLightSolid: getToken('colorStepperTextActive'),
26
- // 白色
20
+ // 当前 高亮步骤 text描述|| 已完成步骤的 text 色都是它
21
+ colorText: getToken('colorStepperTextInactive'),
22
+ // 深灰
23
+ // 未开始的步骤text色 \ text描述色
24
+ colorTextDescription: getToken('colorStepperTextInactive'),
25
+ // 当前 高亮步骤 icon的 text 色
26
+ colorTextLightSolid: getToken('colorStepperTextActive'),
27
+ // 白色
27
28
 
28
- // 高亮步骤 background色
29
- colorPrimary: getToken('colorStepperBackgroundActive'),
30
- // 蓝色
31
- // 高亮步骤 分割线的颜色 此颜色和 colorPrimary 的颜色一致(自动的)
29
+ // 高亮步骤 background色
30
+ colorPrimary: getToken('colorStepperBackgroundActive'),
31
+ // 蓝色
32
+ // 高亮步骤 分割线的颜色 此颜色和 colorPrimary 的颜色一致(自动的)
32
33
 
33
- // 已完成 background 颜色 无此token 通过less 变量覆盖
34
- // colorSuccess: getToken('colorStepperBackgroundSuccess'),
34
+ // 已完成 background 颜色 无此token 通过less 变量覆盖
35
+ // colorSuccess: getToken('colorStepperBackgroundSuccess'),
35
36
 
36
- // 未开始 状态 background 颜色 无此token 通过less 变量覆盖
37
- // processIconBgColor: getToken('colorStepperBackgroundInactive'),
37
+ // 未开始 状态 background 颜色 无此token 通过less 变量覆盖
38
+ // processIconBgColor: getToken('colorStepperBackgroundInactive'),
38
39
 
39
- // 进行中状态 线条颜色
40
- colorBorderBg: getToken('colorStepperBorderActive'),
41
- colorBorderSecondary: getToken('colorStepperConnectorInactive'),
42
- // colorSplit 未开始 分割线的颜色,此颜色和 colorBorderSecondary 的颜色一致
43
- colorSplit: getToken('colorStepperConnectorInactive') // 灰色
40
+ // 进行中状态 线条颜色
41
+ colorBorderBg: getToken('colorStepperBorderActive'),
42
+ colorBorderSecondary: getToken('colorStepperConnectorInactive'),
43
+ // colorSplit 未开始 分割线的颜色,此颜色和 colorBorderSecondary 的颜色一致
44
+ colorSplit: getToken('colorStepperConnectorInactive') // 灰色
44
45
 
45
- // color.stepper.icon.success
46
- // fontSize: '14px',
47
- // fontSizeSM: '14px',
46
+ // color.stepper.icon.success
47
+ // fontSize: '14px',
48
+ // fontSizeSM: '14px',
49
+ };
48
50
  };
49
- var otherDesignTokens = (_otherDesignTokens = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_otherDesignTokens, "--".concat(cssClasses.PREFIX, "-progress-default-color"), "".concat(getToken('colorStepperBorderActive'))), "--".concat(prefixCls, "-progress-default-color"), "".concat(getToken('colorStepperBorderActive'))), "--".concat(prefixCls, "-progress-border-width"), "".concat(getToken('borderWidthStepperActive'))), "--".concat(prefixCls, "-progress-border-connector"), "".concat(getToken('borderWidthStepperConnector'))), "--".concat(prefixCls, "-finish-icon-bg-color"), "".concat(getToken('colorStepperBackgroundSuccess'))), "--".concat(prefixCls, "-finish-icon-border-color"), "".concat(getToken('colorStepperBackgroundSuccess'))), "--".concat(prefixCls, "-finish-icon-success"), "".concat(getToken('colorStepperIconSuccess'))), "--".concat(prefixCls, "-finish-line-color"), "".concat(getToken('colorStepperConnectorSuccess'))), "--".concat(prefixCls, "-wait-icon-bg-color"), "".concat(getToken('colorStepperBackgroundInactive'))), "--".concat(prefixCls, "-wait-icon-border-color"), "".concat(getToken('colorStepperBackgroundInactive'))), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_otherDesignTokens, "--".concat(prefixCls, "-wait-icon-color"), "".concat(getToken('colorStepperTextLabel'))), '--ant-steps-icon-size', getToken('sizingStepperOuter') + 'px'), '--ant-steps-icon-size-sm', getToken('sizingStepperInner') + 'px'), '--dxp-steps-icon-size', getToken('sizingStepperOuter') + 'px'), '--dxp-steps-icon-size-sm', getToken('sizingStepperInner') + 'px'));
50
- var mobileDesignTokens = {
51
- colorStepperBackgroundActiveWeak: getToken('colorStepperBackgroundActiveWeak'),
52
- // moblie
53
- '--dxp-steps-color-neutral': getToken('colorStepperTextNeutral'),
54
- '--dxp-steps-color-secondary': getToken('colorStepperTextLabel'),
55
- '--dxp-steps-color-label2': getToken('colorStepperTextLabel2'),
56
- '--dxp-steps-background-active': getToken('colorStepperBackgroundActive'),
57
- '--dxp-steps-background-activeWeak': getToken('colorStepperBackgroundActiveWeak')
51
+ var useOtherDesignTokens = function useOtherDesignTokens() {
52
+ var _ref;
53
+ var getToken = useDynamicTokens();
54
+ return _ref = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, "--".concat(cssClasses.PREFIX, "-progress-default-color"), "".concat(getToken('colorStepperBorderActive'))), "--".concat(prefixCls, "-progress-default-color"), "".concat(getToken('colorStepperBorderActive'))), "--".concat(prefixCls, "-progress-border-width"), "".concat(getToken('borderWidthStepperActive'))), "--".concat(prefixCls, "-progress-border-connector"), "".concat(getToken('borderWidthStepperConnector'))), "--".concat(prefixCls, "-finish-icon-bg-color"), "".concat(getToken('colorStepperBackgroundSuccess'))), "--".concat(prefixCls, "-finish-icon-border-color"), "".concat(getToken('colorStepperBackgroundSuccess'))), "--".concat(prefixCls, "-finish-icon-success"), "".concat(getToken('colorStepperIconSuccess'))), "--".concat(prefixCls, "-finish-line-color"), "".concat(getToken('colorStepperConnectorSuccess'))), "--".concat(prefixCls, "-wait-icon-bg-color"), "".concat(getToken('colorStepperBackgroundInactive'))), "--".concat(prefixCls, "-wait-icon-border-color"), "".concat(getToken('colorStepperBackgroundInactive'))), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, "--".concat(prefixCls, "-wait-icon-color"), "".concat(getToken('colorStepperTextLabel'))), '--ant-steps-icon-size', getToken('sizingStepperOuter') + 'px'), '--ant-steps-icon-size-sm', getToken('sizingStepperInner') + 'px'), '--dxp-steps-icon-size', getToken('sizingStepperOuter') + 'px'), '--dxp-steps-icon-size-sm', getToken('sizingStepperInner') + 'px');
58
55
  };
59
- export { otherDesignTokens, mobileDesignTokens };
60
- export default designTokens;
56
+ var useMobileDesignTokens = function useMobileDesignTokens() {
57
+ var getToken = useDynamicTokens();
58
+ return {
59
+ colorStepperBackgroundActiveWeak: getToken('colorStepperBackgroundActiveWeak'),
60
+ // moblie
61
+ '--dxp-steps-color-neutral': getToken('colorStepperTextNeutral'),
62
+ '--dxp-steps-color-secondary': getToken('colorStepperTextLabel'),
63
+ '--dxp-steps-color-label2': getToken('colorStepperTextLabel2'),
64
+ '--dxp-steps-background-active': getToken('colorStepperBackgroundActive'),
65
+ '--dxp-steps-background-activeWeak': getToken('colorStepperBackgroundActiveWeak')
66
+ };
67
+ };
68
+ export { useDesignTokens, useMobileDesignTokens, useOtherDesignTokens };
@@ -1,22 +1,21 @@
1
1
  import { StepsProps } from 'antd';
2
- import React, { PureComponent } from 'react';
2
+ import React from 'react';
3
3
  import './style/index.less';
4
+ export declare const stepperTypes: {
5
+ readonly default: "default";
6
+ readonly line: "line";
7
+ };
8
+ export type StepperType = typeof stepperTypes[keyof typeof stepperTypes];
4
9
  export interface StepperProps extends Omit<StepsProps, 'description'> {
5
10
  description?: string;
6
11
  prefixCls?: string;
7
12
  breakpoint?: 'desktop' | 'mobile';
13
+ stepperType?: StepperType;
8
14
  percent?: number;
9
15
  title?: string;
10
16
  labelPlacement?: 'horizontal' | 'vertical';
11
17
  nextStepText?: string;
12
18
  [key: string]: any;
13
19
  }
14
- export default class Stepper extends PureComponent<StepperProps> {
15
- static defaultProps: {
16
- prefixCls: string;
17
- breakpoint: string;
18
- labelPlacement: string;
19
- };
20
- descriptionText: (content: React.ReactNode) => React.JSX.Element;
21
- render(): React.JSX.Element;
22
- }
20
+ declare const Stepper: React.FC<StepperProps>;
21
+ export default Stepper;