@oceanbase/design 0.4.0 → 0.4.2

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 (114) hide show
  1. package/dist/design.min.css +1 -1
  2. package/dist/design.min.js +1 -1
  3. package/dist/reset.css +1 -0
  4. package/es/_util/genComponentStyleHook.d.ts +0 -1
  5. package/es/_util/genComponentStyleHook.js +1 -25
  6. package/es/button/style/index.js +17 -3
  7. package/es/card/index.js +11 -19
  8. package/es/card/style/index.js +5 -3
  9. package/es/checkbox/index.d.ts +2 -0
  10. package/es/checkbox/index.js +40 -1
  11. package/es/checkbox/style/index.d.ts +9 -0
  12. package/es/checkbox/style/index.js +22 -0
  13. package/es/config-provider/index.d.ts +2 -0
  14. package/es/config-provider/index.js +6 -4
  15. package/es/descriptions/hooks/useItems.d.ts +4 -4
  16. package/es/empty/default.js +34 -55
  17. package/es/empty/style/index.js +13 -11
  18. package/es/global.css +48 -0
  19. package/es/index.d.ts +9 -1
  20. package/es/index.js +5 -1
  21. package/es/progress/index.d.ts +1 -0
  22. package/es/progress/index.js +1 -0
  23. package/es/progress/progress.d.ts +1 -0
  24. package/es/progress/progress.js +1 -0
  25. package/es/radio/index.d.ts +7 -0
  26. package/es/radio/index.js +41 -1
  27. package/es/radio/style/index.d.ts +9 -0
  28. package/es/radio/style/index.js +23 -0
  29. package/es/result/style/index.js +10 -2
  30. package/es/slider/index.d.ts +5 -0
  31. package/es/slider/index.js +36 -1
  32. package/es/slider/style/index.d.ts +9 -0
  33. package/es/slider/style/index.js +21 -0
  34. package/es/switch/index.d.ts +4 -0
  35. package/es/switch/index.js +40 -1
  36. package/es/switch/style/index.d.ts +9 -0
  37. package/es/switch/style/index.js +17 -0
  38. package/es/table/index.js +18 -3
  39. package/es/table/style/index.js +55 -40
  40. package/es/theme/default.js +13 -12
  41. package/es/theme/style/aliyun.less +5 -1
  42. package/es/theme/style/compact.less +7 -3
  43. package/es/theme/style/dark.less +5 -1
  44. package/es/theme/style/default.less +15 -11
  45. package/es/tooltip/MouseTooltip.js +3 -2
  46. package/es/tooltip/index.js +3 -2
  47. package/es/tooltip/style/index.js +11 -2
  48. package/es/typography/Link.js +9 -3
  49. package/es/typography/Paragraph.js +9 -3
  50. package/es/typography/Text.js +9 -3
  51. package/es/typography/Title.js +9 -3
  52. package/es/typography/hooks/useClassName.d.ts +3 -0
  53. package/es/typography/hooks/useClassName.js +11 -0
  54. package/es/typography/style/index.js +45 -3
  55. package/lib/_util/genComponentStyleHook.d.ts +0 -1
  56. package/lib/_util/genComponentStyleHook.js +3 -38
  57. package/lib/button/style/index.js +21 -1
  58. package/lib/card/index.js +10 -21
  59. package/lib/card/style/index.js +7 -2
  60. package/lib/checkbox/index.d.ts +2 -0
  61. package/lib/checkbox/index.js +49 -1
  62. package/lib/checkbox/style/index.d.ts +9 -0
  63. package/lib/checkbox/style/index.js +49 -0
  64. package/lib/config-provider/index.d.ts +2 -0
  65. package/lib/config-provider/index.js +2 -1
  66. package/lib/descriptions/hooks/useItems.d.ts +4 -4
  67. package/lib/empty/default.js +8 -39
  68. package/lib/empty/style/index.js +42 -46
  69. package/lib/global.css +48 -0
  70. package/lib/index.d.ts +9 -1
  71. package/lib/index.js +13 -1
  72. package/lib/progress/index.d.ts +1 -0
  73. package/lib/progress/index.js +2 -0
  74. package/lib/progress/progress.d.ts +1 -0
  75. package/lib/progress/progress.js +23 -0
  76. package/lib/radio/index.d.ts +7 -0
  77. package/lib/radio/index.js +42 -1
  78. package/lib/radio/style/index.d.ts +9 -0
  79. package/lib/radio/style/index.js +49 -0
  80. package/lib/result/style/index.js +10 -1
  81. package/lib/slider/index.d.ts +5 -0
  82. package/lib/slider/index.js +38 -1
  83. package/lib/slider/style/index.d.ts +9 -0
  84. package/lib/slider/style/index.js +51 -0
  85. package/lib/switch/index.d.ts +4 -0
  86. package/lib/switch/index.js +40 -1
  87. package/lib/switch/style/index.d.ts +9 -0
  88. package/lib/switch/style/index.js +44 -0
  89. package/lib/table/index.js +19 -3
  90. package/lib/table/style/index.js +94 -55
  91. package/lib/theme/default.js +13 -12
  92. package/lib/theme/style/aliyun.less +5 -1
  93. package/lib/theme/style/compact.less +7 -3
  94. package/lib/theme/style/dark.less +5 -1
  95. package/lib/theme/style/default.less +15 -11
  96. package/lib/tooltip/MouseTooltip.js +3 -2
  97. package/lib/tooltip/index.js +3 -2
  98. package/lib/tooltip/style/index.js +10 -1
  99. package/lib/typography/Link.js +14 -2
  100. package/lib/typography/Paragraph.js +14 -2
  101. package/lib/typography/Text.js +14 -2
  102. package/lib/typography/Title.js +14 -2
  103. package/lib/typography/hooks/useClassName.d.ts +3 -0
  104. package/lib/typography/hooks/useClassName.js +46 -0
  105. package/lib/typography/style/index.js +49 -1
  106. package/package.json +13 -13
  107. package/es/reset.css +0 -10
  108. package/lib/reset.css +0 -10
  109. /package/es/{_util/fonts → fonts}/Consolas.woff2 +0 -0
  110. /package/es/{_util/fonts → fonts}/HelveticaNeue.woff2 +0 -0
  111. /package/es/{_util/fonts → fonts}/Inter.woff2 +0 -0
  112. /package/lib/{_util/fonts → fonts}/Consolas.woff2 +0 -0
  113. /package/lib/{_util/fonts → fonts}/HelveticaNeue.woff2 +0 -0
  114. /package/lib/{_util/fonts → fonts}/Inter.woff2 +0 -0
package/dist/reset.css ADDED
@@ -0,0 +1 @@
1
+ @import '~antd/dist/reset.css';
@@ -4,7 +4,6 @@ import type { ComponentTokenMap } from 'antd/es/theme/interface';
4
4
  import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
5
5
  import type { GlobalToken } from 'antd/es/theme/interface';
6
6
  export type ComponentName = keyof ComponentTokenMap;
7
- export declare const genCustomFontStyle: (token: GlobalToken) => CSSObject[];
8
7
  export declare function genComponentStyleHook(componentName: ComponentName, styleFn: GenerateStyle<FullToken<ComponentName>>, getDefaultToken?: Partial<FullToken<ComponentName>> | ((token: GlobalToken) => Partial<FullToken<ComponentName>>)): (prefixCls: string) => {
9
8
  wrapSSR: (node: React.ReactNode) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
10
9
  hashId: string;
@@ -1,39 +1,15 @@
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
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
2
  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."); }
4
3
  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); }
5
4
  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; }
6
5
  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; } }
7
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
- 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; }
9
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
10
- 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); }
11
7
  import { genComponentStyleHook as antGenComponentStyleHook } from 'antd/es/theme/internal';
12
8
  import theme from "../theme";
13
- import Inter from "./fonts/Inter.woff2";
14
- import Consolas from "./fonts/Consolas.woff2";
15
- import HelveticaNeue from "./fonts/HelveticaNeue.woff2";
16
- export var genCustomFontStyle = function genCustomFontStyle(token) {
17
- return [_defineProperty({}, '@font-face', {
18
- fontFamily: 'Inter',
19
- // load priority: remote font > local font
20
- src: "url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2') format('woff2'), url(".concat(Inter, ") format('woff2')"),
21
- // 定义字体加载策略,外置字体加载前使用默认字体进行兜底
22
- fontDisplay: 'swap'
23
- }), _defineProperty({}, '@font-face', {
24
- fontFamily: 'Consolas',
25
- src: "url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2') format('woff2'), url(".concat(Consolas, ") format('woff2')"),
26
- fontDisplay: 'swap'
27
- }), _defineProperty({}, '@font-face', {
28
- fontFamily: 'Helvetica Neue',
29
- src: "url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2') format('woff2'), url(".concat(HelveticaNeue, ") format('woff2')"),
30
- fontDisplay: 'swap'
31
- })];
32
- };
33
9
  export function genComponentStyleHook(componentName, styleFn, getDefaultToken) {
34
10
  return function (prefixCls) {
35
11
  var useStyle = antGenComponentStyleHook("OB-".concat(componentName), function (token) {
36
- return [genCustomFontStyle(token), styleFn(token)];
12
+ return [styleFn(token)];
37
13
  }, getDefaultToken, {
38
14
  resetStyle: false,
39
15
  // antd style order is -999 and -998
@@ -5,17 +5,31 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
5
5
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
6
  export var genButtonStyle = function genButtonStyle(token) {
7
7
  var componentCls = token.componentCls;
8
- return _defineProperty(_defineProperty({}, "".concat(componentCls), {
8
+ // primary button className
9
+ var primaryBtnCls = "".concat(componentCls).concat(componentCls, "-primary:not([disabled]):not(").concat(componentCls, "-disabled):not(").concat(componentCls, "-dangerous):not(").concat(componentCls, "-background-ghost)");
10
+ var primaryAndCompactItemBtnCls = "".concat(componentCls, "-compact-item").concat(primaryBtnCls);
11
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), {
9
12
  // remove box-shadow for button
10
13
  boxShadow: 'none !important'
11
- }), "".concat(componentCls).concat(componentCls, "-primary:not([disabled]):not(").concat(componentCls, "-disabled):not(").concat(componentCls, "-dangerous):not(").concat(componentCls, "-background-ghost)"), _defineProperty(_defineProperty({
14
+ }), "".concat(primaryBtnCls), _defineProperty(_defineProperty({
12
15
  background: 'linear-gradient(-59deg, #002BFF 0%, #0080FF 100%)',
13
16
  border: 'none'
14
17
  }, '&:hover', {
15
18
  background: 'linear-gradient(120deg, #1AA0FF 0%, #1A53FF 100%)'
16
19
  }), '&:active', {
17
20
  background: 'linear-gradient(120deg, #0060E6 0%, #0013E6 100%)'
18
- }));
21
+ })), "".concat(primaryBtnCls).concat(componentCls, "-compact-last-item"), _defineProperty(_defineProperty({
22
+ background: 'linear-gradient(-59deg, #002BFF 0%, #002BFF 100%)'
23
+ }, '&:hover', {
24
+ background: 'linear-gradient(120deg, #1AA0FF 0%, #1A53FF 100%)'
25
+ }), '&:active', {
26
+ background: 'linear-gradient(120deg, #0060E6 0%, #0013E6 100%)'
27
+ })), "".concat(primaryAndCompactItemBtnCls, "+").concat(primaryAndCompactItemBtnCls, ":before"), {
28
+ height: '100%',
29
+ top: 0
30
+ }), "".concat(primaryAndCompactItemBtnCls, ":hover"), {
31
+ zIndex: 0
32
+ });
19
33
  };
20
34
  export default (function (prefixCls, isAliyun) {
21
35
  var useStyle = genComponentStyleHook('Button', function (token) {
package/es/card/index.js CHANGED
@@ -54,25 +54,17 @@ var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
54
54
  }
55
55
  return item;
56
56
  });
57
- return wrapSSR( /*#__PURE__*/_jsx(ConfigProvider, {
58
- injectStaticFunction: false,
59
- table: noBodyPadding ? {
60
- // expand selection column width for larger padding-left
61
- // related to .ant-card-no-body-padding style
62
- selectionColumnWidth: size === 'small' ? 36 : 48
63
- } : {},
64
- children: /*#__PURE__*/_jsx(AntCard, _objectSpread(_objectSpread({
65
- ref: ref,
66
- size: size,
67
- tabList: newTabList,
68
- prefixCls: customizePrefixCls,
69
- bodyStyle: bodyStyle,
70
- styles: styles,
71
- className: cardCls
72
- }, restProps), {}, {
73
- children: children
74
- }))
75
- }));
57
+ return wrapSSR( /*#__PURE__*/_jsx(AntCard, _objectSpread(_objectSpread({
58
+ ref: ref,
59
+ size: size,
60
+ tabList: newTabList,
61
+ prefixCls: customizePrefixCls,
62
+ bodyStyle: bodyStyle,
63
+ styles: styles,
64
+ className: cardCls
65
+ }, restProps), {}, {
66
+ children: children
67
+ })));
76
68
  });
77
69
  if (process.env.NODE_ENV !== 'production') {
78
70
  Card.displayName = AntCard.displayName;
@@ -26,14 +26,16 @@ export var genCardStyle = function genCardStyle(token) {
26
26
  padding = token.padding,
27
27
  paddingSM = token.paddingSM,
28
28
  paddingLG = token.paddingLG;
29
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-bordered):not(").concat(componentCls, "-type-inner)"), {
29
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-bordered):not(").concat(componentCls, "-type-inner)"), {
30
30
  boxShadow: 'none'
31
31
  })), "".concat(componentCls).concat(componentCls, "-no-divider"), _defineProperty({}, "".concat(componentCls, "-head"), {
32
32
  borderBottom: 'none'
33
33
  })), "".concat(componentCls).concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), {
34
- padding: "0 ".concat(paddingLG, "px ").concat(padding, "px ").concat(paddingLG, "px")
34
+ padding: "0 ".concat(paddingLG, "px ").concat(paddingLG, "px ").concat(paddingLG, "px")
35
35
  })), "".concat(componentCls, "-small").concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), {
36
- padding: "0 ".concat(paddingSM, "px 12px ").concat(paddingSM, "px")
36
+ padding: "0 ".concat(paddingSM, "px ").concat(paddingSM, "px ").concat(paddingSM, "px")
37
+ })), "".concat(componentCls, "-small").concat(componentCls, "-contain-tabs >").concat(componentCls, "-head"), _defineProperty({}, "".concat(componentCls, "-head-title, ").concat(componentCls, "-head-extra"), {
38
+ paddingTop: token.paddingXS
37
39
  })), "".concat(componentCls).concat(componentCls, "-contain-tabs"), _defineProperty({}, "".concat(componentCls, "-head"), genTagStyle(_objectSpread(_objectSpread({}, token), {}, {
38
40
  componentCls: tabsComponentCls,
39
41
  prefixCls: tabsPrefixCls
@@ -1 +1,3 @@
1
1
  export * from 'antd/es/checkbox';
2
+ declare const Checkbox: any;
3
+ export default Checkbox;
@@ -1 +1,40 @@
1
- export * from 'antd/es/checkbox';
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
+ var _excluded = ["prefixCls", "className"];
3
+ 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
+ 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
+ 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; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ 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); }
8
+ 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; }
9
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
+ import { Checkbox as AntCheckbox } from 'antd';
11
+ import classNames from 'classnames';
12
+ import React, { useContext } from 'react';
13
+ import ConfigProvider from "../config-provider";
14
+ import useStyle from "./style";
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ export * from 'antd/es/checkbox';
17
+ var InternalCheckbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
18
+ var customizePrefixCls = _ref.prefixCls,
19
+ className = _ref.className,
20
+ restProps = _objectWithoutProperties(_ref, _excluded);
21
+ var _useContext = useContext(ConfigProvider.ConfigContext),
22
+ getPrefixCls = _useContext.getPrefixCls;
23
+ var prefixCls = getPrefixCls('checkbox', customizePrefixCls);
24
+ var _useStyle = useStyle(prefixCls),
25
+ wrapSSR = _useStyle.wrapSSR;
26
+ var checkboxCls = classNames(className);
27
+ return wrapSSR( /*#__PURE__*/_jsx(AntCheckbox, _objectSpread({
28
+ ref: ref,
29
+ prefixCls: customizePrefixCls,
30
+ className: checkboxCls
31
+ }, restProps)));
32
+ });
33
+ var Checkbox = InternalCheckbox;
34
+ Checkbox.Group = AntCheckbox.Group;
35
+ // @ts-ignore
36
+ Checkbox.__ANT_CHECKBOX = AntCheckbox.__ANT_CHECKBOX;
37
+ if (process.env.NODE_ENV !== 'production') {
38
+ Checkbox.displayName = AntCheckbox.displayName;
39
+ }
40
+ export default Checkbox;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
3
+ export type CheckboxToken = FullToken<'Checkbox'>;
4
+ export declare const genCheckboxStyle: GenerateStyle<CheckboxToken>;
5
+ declare const _default: (prefixCls: string) => {
6
+ wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
7
+ hashId: string;
8
+ };
9
+ export default _default;
@@ -0,0 +1,22 @@
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); }
5
+ import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
+ export var genCheckboxStyle = function genCheckboxStyle(token) {
7
+ var componentCls = token.componentCls,
8
+ fontSize = token.fontSize,
9
+ fontSizeLG = token.fontSizeLG,
10
+ lineHeight = token.lineHeight;
11
+ return _defineProperty({}, "".concat(componentCls, "-wrapper"), _defineProperty({}, "".concat(componentCls), _defineProperty({
12
+ alignSelf: 'baseline'
13
+ }, "".concat(componentCls, "-inner"), {
14
+ transform: "translate(0px, ".concat((fontSize * lineHeight - fontSizeLG) / 2, "px)")
15
+ })));
16
+ };
17
+ export default (function (prefixCls) {
18
+ var useStyle = genComponentStyleHook('Checkbox', function (token) {
19
+ return [genCheckboxStyle(token)];
20
+ });
21
+ return useStyle(prefixCls);
22
+ });
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { ConfigProvider as AntConfigProvider } from 'antd';
3
3
  import type { ConfigProviderProps as AntConfigProviderProps, ConfigConsumerProps as AntConfigConsumerProps, ThemeConfig as AntThemeConfig } from 'antd/es/config-provider';
4
4
  import type { ComponentStyleConfig } from 'antd/es/config-provider/context';
5
+ import type { AppProps } from 'antd/es/app';
5
6
  import type { PaginationConfig } from 'antd/es/pagination';
6
7
  import type { SpinIndicator } from 'antd/es/spin';
7
8
  import type { StyleProviderProps } from '@ant-design/cssinjs';
@@ -41,6 +42,7 @@ export interface ConfigProviderProps extends AntConfigProviderProps {
41
42
  table?: TableConfig;
42
43
  injectStaticFunction?: boolean;
43
44
  styleProviderProps?: StyleProviderProps;
45
+ appProps?: AppProps;
44
46
  }
45
47
  export interface ExtendedConfigConsumerProps {
46
48
  navigate?: NavigateFunction;
@@ -1,5 +1,5 @@
1
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
- var _excluded = ["children", "theme", "locale", "navigate", "hideOnSinglePage", "form", "spin", "table", "tabs", "injectStaticFunction", "styleProviderProps"];
2
+ var _excluded = ["children", "theme", "locale", "navigate", "hideOnSinglePage", "form", "spin", "table", "tabs", "injectStaticFunction", "styleProviderProps", "appProps"];
3
3
  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
4
  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
5
  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; }
@@ -43,6 +43,7 @@ var ConfigProvider = function ConfigProvider(_ref) {
43
43
  _ref$injectStaticFunc = _ref.injectStaticFunction,
44
44
  injectStaticFunction = _ref$injectStaticFunc === void 0 ? true : _ref$injectStaticFunc,
45
45
  styleProviderProps = _ref.styleProviderProps,
46
+ appProps = _ref.appProps,
46
47
  restProps = _objectWithoutProperties(_ref, _excluded);
47
48
  // inherit from parent ConfigProvider
48
49
  var parentContext = React.useContext(AntConfigProvider.ConfigContext);
@@ -95,10 +96,11 @@ var ConfigProvider = function ConfigProvider(_ref) {
95
96
  hideOnSinglePage: (_parentContext$pagina = parentContext.pagination) !== null && _parentContext$pagina !== void 0 && _parentContext$pagina.showSizeChanger ? false : hideOnSinglePage !== undefined ? hideOnSinglePage : parentExtendedContext.hideOnSinglePage
96
97
  },
97
98
  children: /*#__PURE__*/_jsx(StyleProvider, _objectSpread(_objectSpread({}, mergedStyleProviderProps), {}, {
98
- children: /*#__PURE__*/_jsxs(App, {
99
- component: false,
99
+ children: /*#__PURE__*/_jsxs(App, _objectSpread(_objectSpread({
100
+ component: false
101
+ }, appProps), {}, {
100
102
  children: [children, injectStaticFunction && /*#__PURE__*/_jsx(StaticFunction, {})]
101
- })
103
+ }))
102
104
  }))
103
105
  })
104
106
  }));
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import type { DescriptionsItemType } from '..';
3
3
  export default function useItems(items?: DescriptionsItemType[], children?: React.ReactNode, bordered?: boolean): {
4
4
  children: string | number | boolean | Iterable<React.ReactNode> | import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
5
- span?: number | {
5
+ span?: number | "filled" | {
6
6
  xxl?: number;
7
7
  xl?: number;
8
8
  lg?: number;
@@ -10,11 +10,11 @@ export default function useItems(items?: DescriptionsItemType[], children?: Reac
10
10
  sm?: number;
11
11
  xs?: number;
12
12
  };
13
- prefixCls?: string;
14
- style?: React.CSSProperties;
15
13
  className?: string;
16
- label?: React.ReactNode;
14
+ style?: React.CSSProperties;
15
+ prefixCls?: string;
17
16
  key?: React.Key;
17
+ label?: React.ReactNode;
18
18
  labelStyle?: React.CSSProperties;
19
19
  contentStyle?: React.CSSProperties;
20
20
  }[];
@@ -1,70 +1,49 @@
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 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; }
3
- 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; }
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
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
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
1
  import React from 'react';
8
2
  import { jsx as _jsx } from "react/jsx-runtime";
9
3
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
4
  var DefaultEmptyImg = function DefaultEmptyImg(props) {
11
- return /*#__PURE__*/_jsx("svg", _objectSpread(_objectSpread({
12
- width: "46.25775px",
13
- height: "46.36575px",
14
- viewBox: "0 0 46.25775 46.36575",
5
+ return /*#__PURE__*/_jsx("svg", {
6
+ width: "56px",
7
+ height: "56px",
8
+ viewBox: "0 0 56 56",
15
9
  version: "1.1",
16
- xmlns: "http://www.w3.org/2000/svg"
17
- }, props), {}, {
10
+ xmlns: "http://www.w3.org/2000/svg",
18
11
  children: /*#__PURE__*/_jsx("g", {
19
12
  stroke: "none",
20
13
  strokeWidth: "1",
21
14
  fill: "none",
22
15
  fillRule: "evenodd",
23
- children: /*#__PURE__*/_jsx("g", {
24
- transform: "translate(-801.05, -274.05)",
25
- children: /*#__PURE__*/_jsx("g", {
26
- transform: "translate(796, 270)",
27
- children: /*#__PURE__*/_jsxs("g", {
28
- transform: "translate(1, 0)",
29
- children: [/*#__PURE__*/_jsx("rect", {
30
- x: "0",
31
- y: "0",
32
- width: "54",
33
- height: "54"
34
- }), /*#__PURE__*/_jsxs("g", {
35
- transform: "translate(4.05, 4.05)",
36
- fillRule: "nonzero",
37
- children: [/*#__PURE__*/_jsx("rect", {
38
- fill: "#E6E6E6",
39
- x: "5.3055",
40
- y: "0",
41
- width: "35.79525",
42
- height: "28.134",
43
- rx: "2.72025"
44
- }), /*#__PURE__*/_jsx("rect", {
45
- fill: "#F8F8F8",
46
- x: "11.04975",
47
- y: "5.0625",
48
- width: "24.1515",
49
- height: "1.593",
50
- rx: "0.7965"
51
- }), /*#__PURE__*/_jsx("rect", {
52
- fill: "#F8F8F8",
53
- x: "11.04975",
54
- y: "10.60425",
55
- width: "16.08525",
56
- height: "1.593",
57
- rx: "0.7965"
58
- }), /*#__PURE__*/_jsx("path", {
59
- d: "M43.53075,46.36575 L2.72025,46.36575 C1.22175,46.36575 0,45.15075 0,43.6455 L0,20.277 C0,18.7785 1.215,17.55675 2.72025,17.55675 L18.576,17.55675 C19.494,17.55675 20.3445,18.01575 20.85075,18.78525 L22.32225,21.0195 C22.82175,21.78225 23.679,22.248 24.597,22.248 L43.5375,22.248 C45.036,22.248 46.25775,23.463 46.25775,24.96825 L46.25775,43.6455 C46.25775,45.144 45.04275,46.36575 43.5375,46.36575 L43.53075,46.36575 Z",
60
- fill: "#F8F8F8"
61
- })]
62
- })]
63
- })
64
- })
16
+ children: /*#__PURE__*/_jsxs("g", {
17
+ transform: "translate(4.2, 4.2)",
18
+ fillRule: "nonzero",
19
+ children: [/*#__PURE__*/_jsx("rect", {
20
+ fill: "#CDD5E4",
21
+ x: "5.495",
22
+ y: "0",
23
+ width: "37.121",
24
+ height: "29.176",
25
+ rx: "4.03"
26
+ }), /*#__PURE__*/_jsx("rect", {
27
+ fill: "#F8F8F8",
28
+ x: "11.452",
29
+ y: "5.257",
30
+ width: "25.046",
31
+ height: "1.652",
32
+ rx: "0.826"
33
+ }), /*#__PURE__*/_jsx("rect", {
34
+ fill: "#F8F8F8",
35
+ x: "11.452",
36
+ y: "10.997",
37
+ width: "16.681",
38
+ height: "1.652",
39
+ rx: "0.826"
40
+ }), /*#__PURE__*/_jsx("path", {
41
+ d: "M45.143,48.083 L2.821,48.083 C1.267,48.083 0,46.823 0,45.262 L0,21.028 C0,19.474 1.26,18.207 2.821,18.207 L19.264,18.207 C20.216,18.207 21.098,18.683 21.623,19.481 L23.149,21.798 C23.667,22.589 24.556,23.072 25.508,23.072 L45.15,23.072 C46.704,23.072 47.971,24.332 47.971,25.893 L47.971,45.262 C47.971,46.816 46.711,48.083 45.15,48.083 L45.143,48.083 Z",
42
+ fill: "#F3F6FC"
43
+ })]
65
44
  })
66
45
  })
67
- }));
46
+ });
68
47
  };
69
48
  if (process.env.NODE_ENV !== 'production') {
70
49
  DefaultEmptyImg.displayName = 'DefaultEmptyImg';
@@ -10,29 +10,29 @@ export var genEmptyStyle = function genEmptyStyle(token) {
10
10
  var antCls = token.antCls,
11
11
  componentCls = token.componentCls,
12
12
  colorTextTertiary = token.colorTextTertiary,
13
- colorBgLayout = token.colorBgLayout,
14
- colorFill = token.colorFill,
15
13
  colorText = token.colorText,
16
14
  colorTextSecondary = token.colorTextSecondary;
17
- return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-image"), {
15
+ return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-image"), {
18
16
  height: 160,
19
17
  marginBottom: 0
20
- }), "".concat(componentCls, "-description"), _defineProperty(_defineProperty({
18
+ }), "".concat(componentCls, "-description"), _defineProperty(_defineProperty(_defineProperty({
21
19
  // ensure description content color is correct always
22
20
  color: colorTextTertiary
23
21
  }, "".concat(componentCls, "-title"), {
24
22
  color: token.colorText,
25
23
  fontWeight: token.fontWeightStrong,
26
- fontSize: token.fontSizeHeading3,
27
- lineHeight: token.lineHeightHeading3,
24
+ fontSize: token.fontSizeHeading4,
25
+ lineHeight: token.lineHeightHeading4,
28
26
  marginTop: token.marginLG
29
27
  }), "".concat(componentCls, "-description-content"), {
30
28
  color: colorTextTertiary,
29
+ maxWidth: 600,
30
+ margin: '0px auto',
31
31
  marginTop: token.marginXS
32
- })), "".concat(componentCls, "-footer"), _objectSpread({
33
- marginTop: token.marginLG
34
- }, genLargeStyle(token))), "".concat(antCls, "-steps"), _defineProperty({
35
- marginTop: token.margin,
32
+ }), "".concat(antCls, "-steps"), _defineProperty({
33
+ maxWidth: 1000,
34
+ margin: '0px auto',
35
+ marginTop: token.marginLG,
36
36
  padding: token.paddingLG,
37
37
  backgroundColor: token.colorFillQuaternary,
38
38
  borderRadius: token.borderRadiusLG
@@ -58,7 +58,9 @@ export var genEmptyStyle = function genEmptyStyle(token) {
58
58
  color: colorTextTertiary,
59
59
  fontSize: token.fontSizeSM,
60
60
  marginTop: token.marginXS
61
- }))))), "".concat(componentCls, "-horizontal"), _defineProperty({
61
+ }))))), "".concat(componentCls, "-footer"), _objectSpread({
62
+ marginTop: token.marginLG
63
+ }, genLargeStyle(token)))), "".concat(componentCls, "-horizontal"), _defineProperty({
62
64
  display: 'flex',
63
65
  justifyContent: 'center',
64
66
  alignItems: 'center'
package/es/global.css ADDED
@@ -0,0 +1,48 @@
1
+ @import 'antd/dist/reset.css';
2
+
3
+ @font-face {
4
+ font-family: 'Inter';
5
+ /* load priority: local font > remote font > self-hosting font */
6
+ src:
7
+ local('Inter'),
8
+ url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2')
9
+ format('woff2'),
10
+ url('./fonts/Inter.woff2') format('woff2');
11
+ /* load strategy: use default font as fallback */
12
+ font-display: swap;
13
+ }
14
+
15
+ @font-face {
16
+ font-family: 'Consolas';
17
+ src:
18
+ local('Consolas'),
19
+ url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2')
20
+ format('woff2'),
21
+ url('./fonts/Consolas.woff2') format('woff2');
22
+ font-display: swap;
23
+ }
24
+
25
+ @font-face {
26
+ font-family: 'Helvetica Neue';
27
+ src:
28
+ local('Helvetica Neue'),
29
+ url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2')
30
+ format('woff2'),
31
+ url('./fonts/HelveticaNeue.woff2') format('woff2');
32
+ font-display: swap;
33
+ }
34
+
35
+ pre,
36
+ code,
37
+ kbd,
38
+ samp {
39
+ font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
40
+ }
41
+
42
+ * {
43
+ scrollbar-color: #e2e8f3 transparent;
44
+ }
45
+
46
+ .rc-virtual-list-scrollbar-thumb {
47
+ background: #e2e8f3 !important;
48
+ }
package/es/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import './reset.css';
1
+ import './global.css';
2
2
  export * from 'antd';
3
3
  export { version } from '../package.json';
4
4
  export { default as Alert } from './alert';
@@ -38,10 +38,18 @@ export { default as Input } from './input';
38
38
  export type { InputProps } from './input';
39
39
  export { default as InputNumber } from './input-number';
40
40
  export type { InputNumberProps } from './input-number';
41
+ export { default as Radio } from './radio';
42
+ export type { RadioProps } from './radio';
43
+ export { default as Checkbox } from './checkbox';
44
+ export type { CheckboxProps } from './checkbox';
45
+ export { default as Switch } from './switch';
46
+ export type { SwitchProps } from './switch';
41
47
  export { default as Select } from './select';
42
48
  export type { SelectProps } from './select';
43
49
  export { default as TreeSelect } from './tree-select';
44
50
  export type { TreeSelectProps } from './tree-select';
51
+ export { default as Slider } from './slider';
52
+ export type { SliderSingleProps, SliderRangeProps } from './slider';
45
53
  export { default as Tooltip } from './tooltip';
46
54
  export type { TooltipProps } from './tooltip';
47
55
  export { default as Segmented } from './segmented';
package/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./reset.css";
1
+ import "./global.css";
2
2
  export * from 'antd';
3
3
  export { version } from "../package.json";
4
4
  export { default as Alert } from "./alert";
@@ -20,8 +20,12 @@ export { default as Tabs } from "./tabs";
20
20
  export { default as Tag } from "./tag";
21
21
  export { default as Input } from "./input";
22
22
  export { default as InputNumber } from "./input-number";
23
+ export { default as Radio } from "./radio";
24
+ export { default as Checkbox } from "./checkbox";
25
+ export { default as Switch } from "./switch";
23
26
  export { default as Select } from "./select";
24
27
  export { default as TreeSelect } from "./tree-select";
28
+ export { default as Slider } from "./slider";
25
29
  export { default as Tooltip } from "./tooltip";
26
30
  export { default as Segmented } from "./segmented";
27
31
  export { default as Breadcrumb } from "./breadcrumb";
@@ -1 +1,2 @@
1
+ export * from 'antd/es/progress/progress';
1
2
  export * from 'antd/es/progress';
@@ -1 +1,2 @@
1
+ export * from 'antd/es/progress/progress';
1
2
  export * from 'antd/es/progress';
@@ -0,0 +1 @@
1
+ export * from 'antd/es/progress/progress';
@@ -0,0 +1 @@
1
+ export * from 'antd/es/progress/progress';
@@ -1 +1,8 @@
1
+ import type { RadioProps as AntRadioProps, RadioRef } from 'antd/es/radio';
2
+ import React from 'react';
1
3
  export * from 'antd/es/radio';
4
+ declare const Radio: React.ForwardRefExoticComponent<AntRadioProps & React.RefAttributes<RadioRef>> & {
5
+ Group: React.MemoExoticComponent<React.ForwardRefExoticComponent<import("antd").RadioGroupProps & React.RefAttributes<HTMLDivElement>>>;
6
+ Button: React.ForwardRefExoticComponent<import("antd/es/radio/radioButton").RadioButtonProps & React.RefAttributes<RadioRef>>;
7
+ };
8
+ export default Radio;