@oceanbase/design 1.0.0-alpha.4 → 1.0.0-alpha.6

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 (58) hide show
  1. package/dist/design.min.css +1 -1
  2. package/dist/design.min.js +1 -1
  3. package/dist/reset.css +2 -1
  4. package/es/alert/index.js +3 -0
  5. package/es/alert/style/index.js +21 -22
  6. package/es/button/style/index.js +10 -2
  7. package/es/card/style/index.js +7 -5
  8. package/es/checkbox/style/index.js +4 -2
  9. package/es/config-provider/index.d.ts +2 -1
  10. package/es/config-provider/index.js +41 -16
  11. package/es/descriptions/style/index.js +3 -2
  12. package/es/drawer/style/index.js +7 -5
  13. package/es/empty/style/index.js +6 -4
  14. package/es/form/FormItem.d.ts +1 -1
  15. package/es/form/style/index.js +3 -2
  16. package/es/index.d.ts +0 -1
  17. package/es/index.js +0 -1
  18. package/es/modal/style/index.js +7 -6
  19. package/es/radio/style/index.js +4 -2
  20. package/es/slider/style/index.js +7 -5
  21. package/es/spin/style/index.js +14 -11
  22. package/es/style/global.d.ts +5 -0
  23. package/es/style/global.js +62 -0
  24. package/es/style/reset.css +2 -1
  25. package/es/table/style/index.js +17 -16
  26. package/es/theme/compact.d.ts +1 -1
  27. package/es/theme/compact.js +2 -6
  28. package/es/theme/default.js +28 -9
  29. package/es/typography/style/index.js +25 -20
  30. package/lib/alert/index.js +2 -0
  31. package/lib/alert/style/index.js +18 -19
  32. package/lib/button/style/index.js +8 -2
  33. package/lib/card/style/index.js +6 -5
  34. package/lib/checkbox/style/index.js +3 -2
  35. package/lib/config-provider/index.d.ts +2 -1
  36. package/lib/config-provider/index.js +60 -12
  37. package/lib/descriptions/style/index.js +2 -2
  38. package/lib/drawer/style/index.js +6 -5
  39. package/lib/empty/style/index.js +5 -4
  40. package/lib/form/FormItem.d.ts +1 -1
  41. package/lib/form/style/index.js +2 -2
  42. package/lib/index.d.ts +0 -1
  43. package/lib/index.js +0 -1
  44. package/lib/modal/style/index.js +7 -6
  45. package/lib/radio/style/index.js +3 -2
  46. package/lib/slider/style/index.js +6 -5
  47. package/lib/spin/style/index.js +12 -11
  48. package/lib/style/global.d.ts +5 -0
  49. package/lib/style/global.js +101 -0
  50. package/lib/style/reset.css +2 -1
  51. package/lib/table/style/index.js +17 -16
  52. package/lib/theme/compact.d.ts +1 -1
  53. package/lib/theme/compact.js +1 -5
  54. package/lib/theme/default.js +28 -9
  55. package/lib/typography/style/index.js +24 -20
  56. package/package.json +2 -3
  57. package/es/global.css +0 -48
  58. package/lib/global.css +0 -48
package/dist/reset.css CHANGED
@@ -1 +1,2 @@
1
- @import '~antd/dist/reset.css';
1
+ /* antd/dist/reset.css is imported in global.tsx */
2
+ /* reserve this file for compatibility with antd */
package/es/alert/index.js CHANGED
@@ -13,6 +13,7 @@ import { CheckCircleOutlined, CloseCircleOutlined, ExclamationCircleOutlined, In
13
13
  import classNames from 'classnames';
14
14
  import ConfigProvider from "../config-provider";
15
15
  import useStyle from "./style";
16
+ import theme from "../theme";
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
17
18
  export * from 'antd/es/alert';
18
19
  var iconMapOutlined = {
@@ -32,6 +33,8 @@ var Alert = function Alert(_ref) {
32
33
  customizePrefixCls = _ref.prefixCls,
33
34
  className = _ref.className,
34
35
  restProps = _objectWithoutProperties(_ref, _excluded);
36
+ var _theme$useToken = theme.useToken(),
37
+ token = _theme$useToken.token;
35
38
  // banner exists and type is empty, use warning type by default for correct icon
36
39
  var type = banner && !typeProp ? 'warning' : typeProp;
37
40
  var _useContext = useContext(ConfigProvider.ConfigContext),
@@ -2,6 +2,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
+ import { unit } from '@ant-design/cssinjs';
5
6
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
7
  import { upperFirst } from 'lodash';
7
8
  var genAlertTypeStyle = function genAlertTypeStyle(type, token) {
@@ -32,21 +33,33 @@ export var genAlertStyle = function genAlertStyle(token) {
32
33
  var componentCls = token.componentCls,
33
34
  colorIcon = token.colorIcon,
34
35
  colorIconHover = token.colorIconHover,
35
- motionDurationMid = token.motionDurationMid;
36
+ motionDurationMid = token.motionDurationMid,
37
+ calc = token.calc;
36
38
  // height = fontSize * lineHeight
37
- var height = token.fontSize * token.lineHeight;
39
+ var height = calc(token.fontSize).mul(token.lineHeight).equal();
38
40
  // icon width = fontSizeLG (icon size)
39
41
  var iconWidth = token.fontSizeLG;
40
42
  // content and action start position = icon width + icon margin
41
- var contentStartOffset = iconWidth + token.marginXS;
43
+ var contentStartOffset = calc(iconWidth).add(token.marginXS).equal();
42
44
  // close icon width (approximate)
43
45
  var closeIconWidth = height;
44
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
46
+ // Common calculated values
47
+ var contentWidth = unit(calc(contentStartOffset).add(closeIconWidth).add(token.padding).equal());
48
+ var actionWidth = unit(calc(contentStartOffset).add(token.padding).equal());
49
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
45
50
  // vertical align to flex-start
46
51
  alignItems: 'flex-start !important',
47
52
  paddingInline: token.padding,
48
53
  position: 'relative'
49
- }, "".concat(componentCls, "-icon"), {
54
+ }, "".concat(componentCls, "-content"), {
55
+ flex: "1 1 calc(100% - ".concat(contentWidth, ")"),
56
+ minWidth: 0,
57
+ maxWidth: "calc(100% - ".concat(contentWidth, ")"),
58
+ wordBreak: 'break-word'
59
+ }), "".concat(componentCls, "-action"), {
60
+ width: "calc(100% - ".concat(actionWidth, ")"),
61
+ marginInlineStart: contentStartOffset
62
+ }), "".concat(componentCls, "-icon"), {
50
63
  height: height,
51
64
  fontSize: token.fontSizeLG,
52
65
  marginInlineEnd: token.marginXS,
@@ -72,18 +85,11 @@ export var genAlertStyle = function genAlertStyle(token) {
72
85
  a: {
73
86
  textDecoration: 'underline'
74
87
  }
75
- }), "&".concat(componentCls, "-success"), genAlertTypeStyle('success', token)), "&".concat(componentCls, "-info"), genAlertTypeStyle('info', token)), "&".concat(componentCls, "-warning"), genAlertTypeStyle('warning', token)), "&".concat(componentCls, "-error"), genAlertTypeStyle('error', token))), "".concat(componentCls, ":not(").concat(componentCls, "-with-description)"), _defineProperty(_defineProperty({
88
+ }), "&".concat(componentCls, "-success"), genAlertTypeStyle('success', token)), "&".concat(componentCls, "-info"), genAlertTypeStyle('info', token)), "&".concat(componentCls, "-warning"), genAlertTypeStyle('warning', token)), "&".concat(componentCls, "-error"), genAlertTypeStyle('error', token))), "".concat(componentCls, ":not(").concat(componentCls, "-with-description)"), _defineProperty({
76
89
  flexWrap: 'wrap'
77
- }, "".concat(componentCls, "-content"), {
78
- flex: "1 1 calc(100% - ".concat(contentStartOffset + closeIconWidth + token.padding, "px)"),
79
- minWidth: 0,
80
- maxWidth: "calc(100% - ".concat(contentStartOffset + closeIconWidth + token.padding, "px)"),
81
- wordBreak: 'break-word'
82
- }), "".concat(componentCls, "-action"), {
83
- width: "calc(100% - ".concat(contentStartOffset + token.padding, "px)"),
84
- marginInlineStart: contentStartOffset,
90
+ }, "".concat(componentCls, "-action"), {
85
91
  marginTop: token.marginXS
86
- })), "".concat(componentCls).concat(componentCls, "-with-description"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
92
+ })), "".concat(componentCls).concat(componentCls, "-with-description"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
87
93
  paddingBlock: token.paddingSM,
88
94
  flexWrap: 'wrap'
89
95
  }, "".concat(componentCls, "-message"), {
@@ -93,14 +99,7 @@ export var genAlertStyle = function genAlertStyle(token) {
93
99
  wordBreak: 'break-word'
94
100
  }), "".concat(componentCls, "-description"), {
95
101
  wordBreak: 'break-word'
96
- }), "".concat(componentCls, "-content"), {
97
- flex: "1 1 calc(100% - ".concat(contentStartOffset + closeIconWidth + token.padding, "px)"),
98
- minWidth: 0,
99
- maxWidth: "calc(100% - ".concat(contentStartOffset + closeIconWidth + token.padding, "px)"),
100
- wordBreak: 'break-word'
101
102
  }), "".concat(componentCls, "-action"), {
102
- width: "calc(100% - ".concat(contentStartOffset + token.padding, "px)"),
103
- marginInlineStart: contentStartOffset,
104
103
  marginTop: token.marginSM
105
104
  }), "".concat(componentCls, "-close-icon"), {
106
105
  top: token.paddingSM
@@ -1,10 +1,18 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1
5
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
2
6
  export var genButtonStyle = function genButtonStyle(token) {
3
- return {};
7
+ var componentCls = token.componentCls;
8
+ return _defineProperty({}, "".concat(componentCls), {
9
+ // remove box-shadow for button
10
+ boxShadow: 'none !important'
11
+ });
4
12
  };
5
13
  export default (function (prefixCls, isAliyun) {
6
14
  var useStyle = genComponentStyleHook('Button', function (token) {
7
- return isAliyun ? [] : [genButtonStyle(token)];
15
+ return [genButtonStyle(token)];
8
16
  });
9
17
  return useStyle(prefixCls);
10
18
  });
@@ -4,6 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import { unit } from '@ant-design/cssinjs';
7
8
  import { genTabsStyle } from "../../tabs/style";
8
9
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
9
10
  export var genTableStyle = function genTableStyle(padding, token) {
@@ -26,14 +27,15 @@ export var genCardStyle = function genCardStyle(token) {
26
27
  tabsComponentCls = token.tabsComponentCls,
27
28
  tabsPrefixCls = token.tabsPrefixCls,
28
29
  paddingSM = token.paddingSM,
29
- paddingLG = token.paddingLG;
30
+ paddingLG = token.paddingLG,
31
+ calc = token.calc;
30
32
  var tableComponentCls = "".concat(antCls, "-table");
31
33
  return _ref2 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref2, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-body"), {
32
34
  paddingTop: token.padding
33
35
  }), "".concat(componentCls, ":not(").concat(componentCls, "-bordered):not(").concat(componentCls, "-type-inner)"), {
34
36
  boxShadow: 'none'
35
37
  }), "".concat(componentCls).concat(componentCls, "-bordered"), _defineProperty({
36
- borderRadius: token.borderRadiusLG - 2
38
+ borderRadius: calc(token.borderRadiusLG).sub(2).equal()
37
39
  }, "".concat(componentCls).concat(componentCls, "-bordered"), _defineProperty({
38
40
  borderRadius: token.borderRadius
39
41
  }, "".concat(componentCls).concat(componentCls, "-bordered"), {
@@ -46,11 +48,11 @@ export var genCardStyle = function genCardStyle(token) {
46
48
  }, tabsComponentCls, _defineProperty({}, "&".concat(tabsComponentCls, "-top, &").concat(tabsComponentCls, "-bottom"), _defineProperty({}, "".concat(tabsComponentCls, "-nav::before"), {
47
49
  border: 'none'
48
50
  }))))), "".concat(componentCls).concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), {
49
- padding: "0 ".concat(paddingLG, "px ").concat(paddingLG, "px ").concat(paddingLG, "px")
51
+ padding: "0 ".concat(unit(paddingLG), " ").concat(unit(paddingLG), " ").concat(unit(paddingLG))
50
52
  })), "".concat(componentCls, "-small"), _defineProperty({}, "".concat(componentCls, "-body"), {
51
53
  paddingTop: token.paddingXS
52
54
  })), "".concat(componentCls, "-small").concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), {
53
- padding: "0 ".concat(paddingSM, "px ").concat(paddingSM, "px ").concat(paddingSM, "px")
55
+ padding: "0 ".concat(unit(paddingSM), " ").concat(unit(paddingSM), " ").concat(unit(paddingSM))
54
56
  })), "".concat(componentCls, "-small").concat(componentCls, "-contain-tabs >").concat(componentCls, "-head"), _defineProperty({}, "".concat(componentCls, "-head-title, ").concat(componentCls, "-head-extra"), {
55
57
  paddingTop: token.paddingXS
56
58
  })), "".concat(componentCls).concat(componentCls, "-contain-tabs"), _defineProperty({}, "".concat(componentCls, "-head"), _objectSpread(_objectSpread({}, genTabsStyle(_objectSpread(_objectSpread({}, token), {}, {
@@ -65,7 +67,7 @@ export var genCardStyle = function genCardStyle(token) {
65
67
  // work for Card not containing Card.Grid
66
68
  marginBottom: 0
67
69
  })), "&".concat(componentCls, "-has-title").concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), _defineProperty({}, "& > ".concat(tableComponentCls, "-wrapper ").concat(tableComponentCls, ":not(").concat(tableComponentCls, "-bordered):first-child"), {
68
- marginTop: -token.marginSM
70
+ marginTop: calc(token.marginSM).mul(-1).equal()
69
71
  }))), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref2, "".concat(componentCls).concat(componentCls, "-no-body-horizontal-padding"), genTableStyle(paddingLG, token)), "".concat(componentCls).concat(componentCls, "-no-body-horizontal-padding").concat(componentCls, "-small"), genTableStyle(paddingSM, token)), "".concat(componentCls).concat(componentCls, "-collapsible"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-title-wrapper"), _defineProperty({
70
72
  userSelect: 'none'
71
73
  }, "".concat(componentCls, "-collapsible-icon"), {
@@ -7,11 +7,13 @@ export var genCheckboxStyle = function genCheckboxStyle(token) {
7
7
  var componentCls = token.componentCls,
8
8
  fontSize = token.fontSize,
9
9
  fontSizeLG = token.fontSizeLG,
10
- lineHeight = token.lineHeight;
10
+ lineHeight = token.lineHeight,
11
+ calc = token.calc;
12
+ var translateY = calc(calc(fontSize).mul(lineHeight).equal()).sub(fontSizeLG).div(2).equal();
11
13
  return _defineProperty({}, "".concat(componentCls, "-wrapper"), _defineProperty({}, "".concat(componentCls), _defineProperty({
12
14
  alignSelf: 'baseline'
13
15
  }, "".concat(componentCls, "-inner"), {
14
- transform: "translate(0px, ".concat((fontSize * lineHeight - fontSizeLG) / 2, "px)")
16
+ transform: "translate(0px, ".concat(translateY, ")")
15
17
  })));
16
18
  };
17
19
  export default (function (prefixCls) {
@@ -14,8 +14,9 @@ export * from 'antd/es/config-provider/SizeContext';
14
14
  export * from 'antd/es/config-provider/DisabledContext';
15
15
  export * from 'antd/es/config-provider';
16
16
  export interface ThemeConfig extends AntThemeConfig {
17
- isDark?: boolean;
18
17
  isAliyun?: boolean;
18
+ isDark?: boolean;
19
+ isCompact?: boolean;
19
20
  }
20
21
  export type CardConfig = AntCardConfig & {
21
22
  divided?: boolean;
@@ -1,5 +1,11 @@
1
1
  var _excluded = ["children", "theme", "locale", "navigate", "hideOnSinglePage", "card", "collapse", "form", "spin", "table", "tabs", "styleProviderProps", "appProps"];
2
2
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
8
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
3
9
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
10
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
11
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
@@ -19,7 +25,9 @@ import StaticFunction from "../static-function";
19
25
  import themeConfig from "../theme";
20
26
  import defaultTheme, { fontFamilyEn, fontWeightEn, fontWeightStrongEn } from "../theme/default";
21
27
  import darkTheme from "../theme/dark";
28
+ import compactTheme from "../theme/compact";
22
29
  import DefaultRenderEmpty from "./DefaultRenderEmpty";
30
+ import GlobalStyle from "../style/global";
23
31
  import { jsx as _jsx } from "react/jsx-runtime";
24
32
  import { jsxs as _jsxs } from "react/jsx-runtime";
25
33
  export * from "./navigate";
@@ -32,8 +40,8 @@ var ExtendedConfigContext = /*#__PURE__*/React.createContext({
32
40
  hideOnSinglePage: false,
33
41
  injectStaticFunction: true
34
42
  });
35
- var getLocaleTokenValue = function getLocaleTokenValue(locale, tokenKey, tokenValue, tokenValueEn) {
36
- return tokenValue !== defaultTheme.token[tokenKey] ? _defineProperty({}, tokenKey, tokenValue) : ['en', 'en-gb'].includes(locale.locale) ? _defineProperty({}, tokenKey, tokenValueEn) : {};
43
+ var getLocaleTokenValue = function getLocaleTokenValue(mergedThemeToken, locale, tokenKey, tokenValue, tokenValueEn) {
44
+ return tokenValue !== mergedThemeToken[tokenKey] ? _defineProperty({}, tokenKey, tokenValue) : ['en', 'en-gb'].includes(locale.locale) ? _defineProperty({}, tokenKey, tokenValueEn) : {};
37
45
  };
38
46
  var ConfigProvider = function ConfigProvider(_ref3) {
39
47
  var _mergedTheme$token, _mergedTheme$token2, _mergedTheme$token3, _parentContext$pagina;
@@ -55,10 +63,27 @@ var ConfigProvider = function ConfigProvider(_ref3) {
55
63
  var parentContext = React.useContext(AntConfigProvider.ConfigContext);
56
64
  var parentExtendedContext = React.useContext(ExtendedConfigContext);
57
65
  var _merge = merge({}, parentContext.theme, theme),
66
+ isAliyun = _merge.isAliyun,
58
67
  isDark = _merge.isDark,
59
- isAliyun = _merge.isAliyun;
60
- var customTheme = isAliyun ? aliyunTheme : isDark ? darkTheme : undefined;
61
- var mergedTheme = merge({}, customTheme ? {} : defaultTheme, parentContext.theme, customTheme, theme);
68
+ isCompact = _merge.isCompact;
69
+ var aliyunThemeConfig = isAliyun ? aliyunTheme : undefined;
70
+ var darkThemeConfig = isDark && !isAliyun ? isCompact ? darkTheme : _objectSpread(_objectSpread({}, darkTheme), {}, {
71
+ token: _objectSpread(_objectSpread({}, darkTheme.token), Object.fromEntries(Object.entries(defaultTheme.token).filter(function (_ref4) {
72
+ var _key$toLowerCase;
73
+ var _ref5 = _slicedToArray(_ref4, 1),
74
+ key = _ref5[0];
75
+ return !(key !== null && key !== void 0 && (_key$toLowerCase = key.toLowerCase()) !== null && _key$toLowerCase !== void 0 && _key$toLowerCase.startsWith('color'));
76
+ })))
77
+ }) : undefined;
78
+ var compactThemeConfig = isCompact && !isAliyun ? isDark ? compactTheme : _objectSpread(_objectSpread({}, compactTheme), {}, {
79
+ token: _objectSpread(_objectSpread({}, compactTheme.token), Object.fromEntries(Object.entries(defaultTheme.token).filter(function (_ref6) {
80
+ var _key$toLowerCase2;
81
+ var _ref7 = _slicedToArray(_ref6, 1),
82
+ key = _ref7[0];
83
+ return (key === null || key === void 0 || (_key$toLowerCase2 = key.toLowerCase()) === null || _key$toLowerCase2 === void 0 ? void 0 : _key$toLowerCase2.startsWith('color')) && !['colorBgBase', 'colorTextBase'].includes(key);
84
+ })))
85
+ }) : undefined;
86
+ var mergedTheme = merge({}, isAliyun ? {} : isDark || isCompact ? themeConfig.defaultSeed : defaultTheme, parentContext.theme, aliyunThemeConfig, darkThemeConfig, compactThemeConfig, theme);
62
87
  var _themeConfig$useToken = themeConfig.useToken(),
63
88
  token = _themeConfig$useToken.token;
64
89
  var fontFamily = ((_mergedTheme$token = mergedTheme.token) === null || _mergedTheme$token === void 0 ? void 0 : _mergedTheme$token.fontFamily) || token.fontFamily;
@@ -74,9 +99,9 @@ var ConfigProvider = function ConfigProvider(_ref3) {
74
99
  locale: mergedLocale,
75
100
  card: merge({}, parentContext.card, card),
76
101
  collapse: merge({}, {
77
- expandIcon: function expandIcon(_ref4) {
102
+ expandIcon: function expandIcon(_ref8) {
78
103
  var _mergedTheme$token4, _mergedTheme$token5;
79
- var isActive = _ref4.isActive;
104
+ var isActive = _ref8.isActive;
80
105
  return /*#__PURE__*/_jsx(CaretRightOutlined, {
81
106
  rotate: isActive ? 90 : 0,
82
107
  style: {
@@ -91,12 +116,12 @@ var ConfigProvider = function ConfigProvider(_ref3) {
91
116
  spin: merge({}, parentContext.spin, spin),
92
117
  table: merge({}, {
93
118
  expandable: {
94
- expandIcon: function expandIcon(_ref5) {
119
+ expandIcon: function expandIcon(_ref9) {
95
120
  var _mergedTheme$token6, _mergedTheme$token7;
96
- var expandable = _ref5.expandable,
97
- expanded = _ref5.expanded,
98
- onExpand = _ref5.onExpand,
99
- record = _ref5.record;
121
+ var expandable = _ref9.expandable,
122
+ expanded = _ref9.expanded,
123
+ onExpand = _ref9.onExpand,
124
+ record = _ref9.record;
100
125
  return expandable && /*#__PURE__*/_jsx(CaretRightOutlined, {
101
126
  onClick: function onClick(e) {
102
127
  return onExpand(record, e);
@@ -112,7 +137,7 @@ var ConfigProvider = function ConfigProvider(_ref3) {
112
137
  }, parentContext.table, table),
113
138
  tabs: merge({}, parentContext.tabs, tabs),
114
139
  theme: merge({}, mergedTheme, {
115
- token: _objectSpread(_objectSpread(_objectSpread({}, getLocaleTokenValue(mergedLocale, 'fontFamily', fontFamily, fontFamilyEn)), getLocaleTokenValue(mergedLocale, 'fontWeight', fontWeight, fontWeightEn)), getLocaleTokenValue(mergedLocale, 'fontWeightStrong', fontWeightStrong, fontWeightStrongEn))
140
+ token: _objectSpread(_objectSpread(_objectSpread({}, getLocaleTokenValue(mergedTheme.token || {}, mergedLocale, 'fontFamily', fontFamily, fontFamilyEn)), getLocaleTokenValue(mergedTheme.token || {}, mergedLocale, 'fontWeight', fontWeight, fontWeightEn)), getLocaleTokenValue(mergedTheme.token || {}, mergedLocale, 'fontWeightStrong', fontWeightStrong, fontWeightStrongEn))
116
141
  }),
117
142
  renderEmpty: parentContext.renderEmpty || function (componentName) {
118
143
  return /*#__PURE__*/_jsx(DefaultRenderEmpty, {
@@ -127,12 +152,12 @@ var ConfigProvider = function ConfigProvider(_ref3) {
127
152
  // inject static function to outermost ConfigProvider only
128
153
  injectStaticFunction: false
129
154
  },
130
- children: /*#__PURE__*/_jsx(StyleProvider, _objectSpread(_objectSpread({}, mergedStyleProviderProps), {}, {
131
- children: /*#__PURE__*/_jsxs(App, _objectSpread(_objectSpread({
155
+ children: /*#__PURE__*/_jsxs(StyleProvider, _objectSpread(_objectSpread({}, mergedStyleProviderProps), {}, {
156
+ children: [/*#__PURE__*/_jsx(GlobalStyle, {}), /*#__PURE__*/_jsxs(App, _objectSpread(_objectSpread({
132
157
  component: false
133
158
  }, appProps), {}, {
134
159
  children: [children, parentExtendedContext.injectStaticFunction && /*#__PURE__*/_jsx(StaticFunction, {})]
135
- }))
160
+ }))]
136
161
  }))
137
162
  })
138
163
  }));
@@ -32,7 +32,8 @@ export var genVerticalStyle = function genVerticalStyle(size, token) {
32
32
  };
33
33
  export var genDescriptionsStyle = function genDescriptionsStyle(token) {
34
34
  var componentCls = token.componentCls,
35
- typographyComponentCls = token.typographyComponentCls;
35
+ typographyComponentCls = token.typographyComponentCls,
36
+ calc = token.calc;
36
37
  return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _objectSpread(_objectSpread({}, genVerticalStyle('default', token)), {}, _defineProperty(_defineProperty({}, "".concat(componentCls, "-item-container"), _defineProperty({}, "".concat(componentCls, "-item-content"), _defineProperty({
37
38
  paddingRight: 12
38
39
  }, "".concat(typographyComponentCls, "-edit-content"), {
@@ -41,7 +42,7 @@ export var genDescriptionsStyle = function genDescriptionsStyle(token) {
41
42
  marginBottom: 0
42
43
  }))), "".concat(componentCls, "-item-container:has(", "".concat(typographyComponentCls, "-edit-content"), ")"), {
43
44
  alignItems: 'center',
44
- height: token.fontSize * token.lineHeight
45
+ height: calc(token.fontSize).mul(token.lineHeight).equal()
45
46
  }))), "".concat(componentCls).concat(componentCls, "-middle"), genVerticalStyle('middle', token)), "".concat(componentCls).concat(componentCls, "-small"), genVerticalStyle('small', token));
46
47
  };
47
48
  export default (function (prefixCls, typographyPrefixCls) {
@@ -2,18 +2,20 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
+ import { unit } from '@ant-design/cssinjs';
5
6
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
7
  export var genDrawerStyle = function genDrawerStyle(token) {
7
8
  var componentCls = token.componentCls,
8
9
  antCls = token.antCls,
9
10
  fontSizeHeading3 = token.fontSizeHeading3,
10
- colorSplit = token.colorSplit;
11
+ colorSplit = token.colorSplit,
12
+ calc = token.calc;
11
13
  var contentPadding = token.paddingLG;
12
14
  var boxShadowBottom = '0 2px 4px 0 rgba(54,69,99,0.04), 0 1px 6px -1px rgba(54,69,99,0.04), 0 1px 2px 0 rgba(54,69,99,0.06)';
13
15
  var boxShadowTop = '0 -2px 4px 0 rgba(54,69,99,0.04), 0 -1px 6px -1px rgba(54,69,99,0.04), 0 -1px 2px 0 rgba(54,69,99,0.06)';
14
16
  return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-content"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-header"), _defineProperty(_defineProperty({
15
17
  position: 'relative',
16
- padding: "".concat(token.padding, "px ").concat(token.paddingLG, "px"),
18
+ padding: "".concat(unit(token.padding), " ").concat(unit(token.paddingLG)),
17
19
  borderBottom: 'none',
18
20
  transition: "box-shadow ".concat(token.motionDurationMid),
19
21
  // ensure header box-shadow cover body content
@@ -29,8 +31,8 @@ export var genDrawerStyle = function genDrawerStyle(token) {
29
31
  height: '1px',
30
32
  backgroundColor: colorSplit,
31
33
  // 使用负margin让分割线贯通到content边缘
32
- marginLeft: "-".concat(token.paddingLG, "px"),
33
- marginRight: "-".concat(token.paddingLG, "px")
34
+ marginLeft: calc(token.paddingLG).mul(-1).equal(),
35
+ marginRight: calc(token.paddingLG).mul(-1).equal()
34
36
  })), "".concat(componentCls, "-header-shadow"), {
35
37
  boxShadow: boxShadowBottom
36
38
  }), "".concat(componentCls, "-body"), {
@@ -42,7 +44,7 @@ export var genDrawerStyle = function genDrawerStyle(token) {
42
44
  overflow: 'auto'
43
45
  }), "".concat(componentCls, "-footer-container"), _defineProperty({
44
46
  position: 'sticky',
45
- padding: "".concat(token.padding, "px ").concat(token.paddingLG, "px"),
47
+ padding: "".concat(unit(token.padding), " ").concat(unit(token.paddingLG)),
46
48
  transition: "box-shadow ".concat(token.motionDurationMid),
47
49
  // ensure footer box-shadow cover body content
48
50
  zIndex: 10
@@ -2,13 +2,15 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
+ import { unit } from '@ant-design/cssinjs';
5
6
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
7
  export var genEmptyStyle = function genEmptyStyle(token) {
7
8
  var antCls = token.antCls,
8
9
  componentCls = token.componentCls,
9
10
  colorTextTertiary = token.colorTextTertiary,
10
11
  colorText = token.colorText,
11
- colorTextSecondary = token.colorTextSecondary;
12
+ colorTextSecondary = token.colorTextSecondary,
13
+ calc = token.calc;
12
14
  return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty({}, "".concat(componentCls, "-image"), {
13
15
  height: 160,
14
16
  marginBottom: 0
@@ -36,7 +38,7 @@ export var genEmptyStyle = function genEmptyStyle(token) {
36
38
  }, "".concat(antCls, "-steps-item-container"), _defineProperty(_defineProperty({}, "".concat(antCls, "-steps-item-icon"), _defineProperty({
37
39
  height: token.controlHeightSM,
38
40
  width: token.controlHeightSM,
39
- lineHeight: "".concat(token.controlHeightSM, "px"),
41
+ lineHeight: unit(token.controlHeightSM),
40
42
  backgroundColor: token.colorFillSecondary,
41
43
  // override default border color
42
44
  borderColor: token.colorFillSecondary
@@ -47,9 +49,9 @@ export var genEmptyStyle = function genEmptyStyle(token) {
47
49
  color: colorText,
48
50
  fontSize: token.fontSize,
49
51
  fontWeight: token.fontWeightStrong,
50
- lineHeight: "".concat(token.controlHeightSM, "px"),
52
+ lineHeight: unit(token.controlHeightSM),
51
53
  '&::after': {
52
- top: token.controlHeightSM / 2
54
+ top: calc(token.controlHeightSM).div(2).equal()
53
55
  }
54
56
  }), "".concat(antCls, "-steps-item-description"), {
55
57
  color: colorTextTertiary,
@@ -4,7 +4,7 @@ import type { FormItemProps as AntFormItemProps } from 'antd/es/form';
4
4
  import type { TooltipProps } from '../tooltip';
5
5
  declare const AntFormItem: (<Values = any>(props: AntFormItemProps<Values>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
6
6
  useStatus: () => {
7
- status?: "" | "success" | "warning" | "error" | "validating";
7
+ status?: "" | "warning" | "error" | "success" | "validating";
8
8
  errors: React.ReactNode[];
9
9
  warnings: React.ReactNode[];
10
10
  };
@@ -4,7 +4,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
6
  export var genFormStyle = function genFormStyle(token) {
7
- var componentCls = token.componentCls;
7
+ var componentCls = token.componentCls,
8
+ calc = token.calc;
8
9
  return _defineProperty(_defineProperty({}, componentCls, _defineProperty({}, "".concat(componentCls, "-item-extra"), {
9
10
  paddingTop: token.paddingXXS,
10
11
  fontSize: token.fontSizeSM
@@ -18,7 +19,7 @@ export var genFormStyle = function genFormStyle(token) {
18
19
  }), "".concat(componentCls, "-item-label"), {
19
20
  paddingBottom: token.paddingXXS
20
21
  }), "".concat(componentCls, "-item-description"), {
21
- paddingBottom: token.paddingXXS + 2,
22
+ paddingBottom: calc(token.paddingXXS).add(2).equal(),
22
23
  fontSize: token.fontSizeSM,
23
24
  color: token.colorTextDescription
24
25
  })));
package/es/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import './global.css';
2
1
  export * from 'antd';
3
2
  export { version } from '../package.json';
4
3
  export { default as Alert } from './alert';
package/es/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import "./global.css";
2
1
  export * from 'antd';
3
2
  export { version } from "../package.json";
4
3
  export { default as Alert } from "./alert";
@@ -10,10 +10,11 @@ export var genModalStyle = function genModalStyle(token) {
10
10
  fontSizeHeading5 = token.fontSizeHeading5,
11
11
  lineHeightHeading5 = token.lineHeightHeading5,
12
12
  fontSizeHeading3 = token.fontSizeHeading3,
13
- colorSplit = token.colorSplit;
13
+ colorSplit = token.colorSplit,
14
+ calc = token.calc;
14
15
  var top = 100;
15
16
  var bottom = 100;
16
- var titleHeight = fontSizeHeading5 * lineHeightHeading5;
17
+ var titleHeight = calc(fontSizeHeading5).mul(lineHeightHeading5).equal();
17
18
  return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-confirm):not(").concat(componentCls, "-progress)"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-content"), _defineProperty(_defineProperty(_defineProperty({
18
19
  paddingBlock: token.padding
19
20
  }, "".concat(componentCls, "-close"), {
@@ -35,11 +36,11 @@ export var genModalStyle = function genModalStyle(token) {
35
36
  backgroundColor: colorSplit,
36
37
  // antd Modal content默认padding通常是24px,使用负margin让分割线贯通
37
38
  // 如果antd使用其他padding值,可能需要调整
38
- marginLeft: "-".concat(token.paddingLG, "px"),
39
- marginRight: "-".concat(token.paddingLG, "px")
39
+ marginLeft: calc(token.paddingLG).mul(-1).equal(),
40
+ marginRight: calc(token.paddingLG).mul(-1).equal()
40
41
  })), "".concat(componentCls, "-body"), {
41
42
  paddingTop: token.paddingLG,
42
- marginInline: "-".concat(token.marginLG, "px"),
43
+ marginInline: calc(token.marginLG).mul(-1).equal(),
43
44
  paddingInline: token.paddingLG
44
45
  })), "".concat(componentCls, "-footer"), _defineProperty(_defineProperty({
45
46
  paddingTop: token.paddingLG,
@@ -85,7 +86,7 @@ export var genModalStyle = function genModalStyle(token) {
85
86
  }), "".concat(componentCls, "-body"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-confirm-title"), {
86
87
  fontSize: fontSizeHeading3
87
88
  }), "".concat(componentCls, "-confirm-body > ").concat(token.iconCls), {
88
- height: token.fontSizeHeading3 * token.lineHeight
89
+ height: calc(token.fontSizeHeading3).mul(token.lineHeight).equal()
89
90
  }), "".concat(componentCls, "-confirm-paragraph"), {
90
91
  rowGap: token.marginSM
91
92
  }), "".concat(componentCls, "-confirm-content"), {
@@ -8,11 +8,13 @@ export var genRadioStyle = function genRadioStyle(token) {
8
8
  radioSize = token.radioSize,
9
9
  fontSize = token.fontSize,
10
10
  fontSizeLG = token.fontSizeLG,
11
- lineHeight = token.lineHeight;
11
+ lineHeight = token.lineHeight,
12
+ calc = token.calc;
13
+ var marginBottom = calc(calc(fontSize).mul(lineHeight).equal()).sub(radioSize || fontSizeLG).div(-2).equal();
12
14
  return _defineProperty({}, "".concat(componentCls, "-wrapper"), _defineProperty({}, "".concat(componentCls), _defineProperty({
13
15
  alignSelf: 'baseline'
14
16
  }, "".concat(componentCls, "-inner"), {
15
- marginBottom: -(fontSize * lineHeight - (radioSize || fontSizeLG)) / 2
17
+ marginBottom: marginBottom
16
18
  })));
17
19
  };
18
20
  export default (function (prefixCls) {
@@ -2,7 +2,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
- import { toNumber } from 'lodash';
6
5
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
7
6
  export var genSliderStyle = function genSliderStyle(token) {
8
7
  var componentCls = token.componentCls,
@@ -11,13 +10,16 @@ export var genSliderStyle = function genSliderStyle(token) {
11
10
  _token$handleSize = token.handleSize,
12
11
  handleSize = _token$handleSize === void 0 ? 10 : _token$handleSize,
13
12
  _token$handleLineWidt = token.handleLineWidth,
14
- handleLineWidth = _token$handleLineWidt === void 0 ? 2 : _token$handleLineWidt;
13
+ handleLineWidth = _token$handleLineWidt === void 0 ? 2 : _token$handleLineWidt,
14
+ calc = token.calc;
15
+ var dotSizeHalf = calc(dotSize).div(2).equal();
16
+ var handleOffset = calc(handleSize).add(calc(handleLineWidth).mul(2).equal()).div(2).equal();
15
17
  return _defineProperty({}, "".concat(componentCls).concat(componentCls, "-horizontal"), _defineProperty({}, "".concat(componentCls, "-mark"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-mark-text[style*=\"left: 0%;\"]"), {
16
- transform: "translateX(calc(0% - ".concat(dotSize / 2, "px)) !important")
18
+ transform: "translateX(calc(0% - ".concat(dotSizeHalf, ")) !important")
17
19
  }), "".concat(componentCls, "-mark-text[style*=\"left: 100%;\"]"), {
18
- transform: "translateX(calc(-100% + ".concat(dotSize / 2, "px)) !important")
20
+ transform: "translateX(calc(-100% + ".concat(dotSizeHalf, ")) !important")
19
21
  }), "".concat(componentCls, "-mark-text[style=\"transform: translateX(-50%);\"]"), {
20
- transform: "translateX(calc(0% - ".concat((handleSize + toNumber(handleLineWidth) * 2) / 2, "px)) !important")
22
+ transform: "translateX(calc(0% - ".concat(handleOffset, ")) !important")
21
23
  })));
22
24
  };
23
25
  export default (function (prefixCls) {