@oceanbase/design 0.4.1 → 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.
- package/dist/design.min.css +1 -1
- package/dist/design.min.js +1 -1
- package/dist/reset.css +1 -0
- package/es/_util/genComponentStyleHook.d.ts +0 -1
- package/es/_util/genComponentStyleHook.js +1 -25
- package/es/button/index.d.ts +1 -1
- package/es/card/index.js +11 -19
- package/es/descriptions/hooks/useItems.d.ts +1 -1
- package/es/empty/style/index.js +13 -11
- package/es/global.css +48 -0
- package/es/index.d.ts +3 -1
- package/es/index.js +2 -1
- package/es/progress/index.d.ts +1 -0
- package/es/progress/index.js +1 -0
- package/es/progress/progress.d.ts +1 -0
- package/es/progress/progress.js +1 -0
- package/es/radio/index.d.ts +6 -1
- package/es/result/style/index.js +10 -2
- package/es/slider/style/index.js +2 -2
- package/es/switch/index.d.ts +4 -0
- package/es/switch/index.js +40 -1
- package/es/switch/style/index.d.ts +9 -0
- package/es/switch/style/index.js +17 -0
- package/es/table/index.js +4 -1
- package/es/table/style/index.js +40 -32
- package/es/theme/default.js +3 -1
- package/es/theme/style/compact.less +1 -1
- package/es/theme/style/default.less +1 -1
- package/es/tooltip/MouseTooltip.js +3 -2
- package/es/tooltip/index.js +3 -2
- package/es/tooltip/style/index.js +11 -2
- package/es/typography/Link.js +9 -3
- package/es/typography/Paragraph.js +9 -3
- package/es/typography/Text.js +9 -3
- package/es/typography/Title.js +9 -3
- package/es/typography/hooks/useClassName.d.ts +3 -0
- package/es/typography/hooks/useClassName.js +11 -0
- package/es/typography/style/index.js +45 -3
- package/lib/_util/genComponentStyleHook.d.ts +0 -1
- package/lib/_util/genComponentStyleHook.js +3 -38
- package/lib/button/index.d.ts +1 -1
- package/lib/card/index.js +10 -21
- package/lib/descriptions/hooks/useItems.d.ts +1 -1
- package/lib/empty/style/index.js +42 -46
- package/lib/global.css +48 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.js +4 -1
- package/lib/progress/index.d.ts +1 -0
- package/lib/progress/index.js +2 -0
- package/lib/progress/progress.d.ts +1 -0
- package/lib/progress/progress.js +23 -0
- package/lib/radio/index.d.ts +6 -1
- package/lib/result/style/index.js +10 -1
- package/lib/slider/style/index.js +2 -2
- package/lib/switch/index.d.ts +4 -0
- package/lib/switch/index.js +40 -1
- package/lib/switch/style/index.d.ts +9 -0
- package/lib/switch/style/index.js +44 -0
- package/lib/table/index.js +5 -0
- package/lib/table/style/index.js +77 -42
- package/lib/theme/default.js +3 -1
- package/lib/theme/style/compact.less +1 -1
- package/lib/theme/style/default.less +1 -1
- package/lib/tooltip/MouseTooltip.js +3 -2
- package/lib/tooltip/index.js +3 -2
- package/lib/tooltip/style/index.js +10 -1
- package/lib/typography/Link.js +14 -2
- package/lib/typography/Paragraph.js +14 -2
- package/lib/typography/Text.js +14 -2
- package/lib/typography/Title.js +14 -2
- package/lib/typography/hooks/useClassName.d.ts +3 -0
- package/lib/typography/hooks/useClassName.js +46 -0
- package/lib/typography/style/index.js +49 -1
- package/package.json +6 -7
- package/es/reset.css +0 -10
- package/lib/reset.css +0 -10
- /package/es/{_util/fonts → fonts}/Consolas.woff2 +0 -0
- /package/es/{_util/fonts → fonts}/HelveticaNeue.woff2 +0 -0
- /package/es/{_util/fonts → fonts}/Inter.woff2 +0 -0
- /package/lib/{_util/fonts → fonts}/Consolas.woff2 +0 -0
- /package/lib/{_util/fonts → fonts}/HelveticaNeue.woff2 +0 -0
- /package/lib/{_util/fonts → fonts}/Inter.woff2 +0 -0
|
@@ -5,13 +5,22 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
5
5
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
6
6
|
export var genTooltipStyle = function genTooltipStyle(token) {
|
|
7
7
|
var componentCls = token.componentCls;
|
|
8
|
-
return _defineProperty({}, componentCls, _defineProperty(
|
|
8
|
+
return _defineProperty({}, componentCls, _defineProperty(_defineProperty({
|
|
9
|
+
maxWidth: 300
|
|
10
|
+
}, "".concat(componentCls, "-inner"), {
|
|
11
|
+
maxHeight: 250,
|
|
12
|
+
overflow: 'auto'
|
|
13
|
+
}), "".concat(componentCls, "-close-icon-wrap"), _defineProperty({
|
|
9
14
|
display: 'flex',
|
|
10
15
|
justifyContent: 'space-between',
|
|
11
16
|
alignItems: 'flex-start',
|
|
12
17
|
wordBreak: 'break-all'
|
|
13
18
|
}, "".concat(componentCls, "-close-icon"), {
|
|
14
|
-
cursor: 'pointer'
|
|
19
|
+
cursor: 'pointer',
|
|
20
|
+
color: token.colorIcon,
|
|
21
|
+
'&:hover': {
|
|
22
|
+
color: token.colorIconHover
|
|
23
|
+
}
|
|
15
24
|
})));
|
|
16
25
|
};
|
|
17
26
|
export default (function (prefixCls) {
|
package/es/typography/Link.js
CHANGED
|
@@ -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 = ["prefixCls", "children"];
|
|
2
|
+
var _excluded = ["editable", "prefixCls", "className", "children"];
|
|
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; }
|
|
@@ -10,12 +10,15 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
10
10
|
import React, { useContext } from 'react';
|
|
11
11
|
import { Typography as AntTypography } from 'antd';
|
|
12
12
|
import ConfigProvider from "../config-provider";
|
|
13
|
+
import useClassName from "./hooks/useClassName";
|
|
13
14
|
import useStyle from "./style";
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
var AntLink = AntTypography.Link;
|
|
16
17
|
export * from 'antd/es/typography/Link';
|
|
17
18
|
var Link = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18
|
-
var
|
|
19
|
+
var editable = _ref.editable,
|
|
20
|
+
customizePrefixCls = _ref.prefixCls,
|
|
21
|
+
className = _ref.className,
|
|
19
22
|
children = _ref.children,
|
|
20
23
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
24
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
@@ -23,9 +26,12 @@ var Link = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
23
26
|
var prefixCls = getPrefixCls('typography', customizePrefixCls);
|
|
24
27
|
var _useStyle = useStyle(prefixCls),
|
|
25
28
|
wrapSSR = _useStyle.wrapSSR;
|
|
29
|
+
var typographyCls = useClassName(prefixCls, className, editable);
|
|
26
30
|
return wrapSSR( /*#__PURE__*/_jsx(AntLink, _objectSpread(_objectSpread({
|
|
27
31
|
ref: ref,
|
|
28
|
-
|
|
32
|
+
editable: editable,
|
|
33
|
+
prefixCls: customizePrefixCls,
|
|
34
|
+
className: typographyCls
|
|
29
35
|
}, restProps), {}, {
|
|
30
36
|
children: children
|
|
31
37
|
})));
|
|
@@ -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 = ["prefixCls", "children"];
|
|
2
|
+
var _excluded = ["editable", "prefixCls", "className", "children"];
|
|
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; }
|
|
@@ -10,12 +10,15 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
10
10
|
import React, { useContext } from 'react';
|
|
11
11
|
import { Typography as AntTypography } from 'antd';
|
|
12
12
|
import ConfigProvider from "../config-provider";
|
|
13
|
+
import useClassName from "./hooks/useClassName";
|
|
13
14
|
import useStyle from "./style";
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
var AntParagraph = AntTypography.Paragraph;
|
|
16
17
|
export * from 'antd/es/typography/Paragraph';
|
|
17
18
|
var Paragraph = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18
|
-
var
|
|
19
|
+
var editable = _ref.editable,
|
|
20
|
+
customizePrefixCls = _ref.prefixCls,
|
|
21
|
+
className = _ref.className,
|
|
19
22
|
children = _ref.children,
|
|
20
23
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
24
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
@@ -23,9 +26,12 @@ var Paragraph = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
23
26
|
var prefixCls = getPrefixCls('typography', customizePrefixCls);
|
|
24
27
|
var _useStyle = useStyle(prefixCls),
|
|
25
28
|
wrapSSR = _useStyle.wrapSSR;
|
|
29
|
+
var typographyCls = useClassName(prefixCls, className, editable);
|
|
26
30
|
return wrapSSR( /*#__PURE__*/_jsx(AntParagraph, _objectSpread(_objectSpread({
|
|
27
31
|
ref: ref,
|
|
28
|
-
|
|
32
|
+
editable: editable,
|
|
33
|
+
prefixCls: customizePrefixCls,
|
|
34
|
+
className: typographyCls
|
|
29
35
|
}, restProps), {}, {
|
|
30
36
|
children: children
|
|
31
37
|
})));
|
package/es/typography/Text.js
CHANGED
|
@@ -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 = ["prefixCls", "children"];
|
|
2
|
+
var _excluded = ["editable", "prefixCls", "className", "children"];
|
|
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; }
|
|
@@ -10,12 +10,15 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
10
10
|
import React, { useContext } from 'react';
|
|
11
11
|
import { Typography as AntTypography } from 'antd';
|
|
12
12
|
import ConfigProvider from "../config-provider";
|
|
13
|
+
import useClassName from "./hooks/useClassName";
|
|
13
14
|
import useStyle from "./style";
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
var AntText = AntTypography.Text;
|
|
16
17
|
export * from 'antd/es/typography/Text';
|
|
17
18
|
var Text = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18
|
-
var
|
|
19
|
+
var editable = _ref.editable,
|
|
20
|
+
customizePrefixCls = _ref.prefixCls,
|
|
21
|
+
className = _ref.className,
|
|
19
22
|
children = _ref.children,
|
|
20
23
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
24
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
@@ -23,9 +26,12 @@ var Text = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
23
26
|
var prefixCls = getPrefixCls('typography', customizePrefixCls);
|
|
24
27
|
var _useStyle = useStyle(prefixCls),
|
|
25
28
|
wrapSSR = _useStyle.wrapSSR;
|
|
29
|
+
var typographyCls = useClassName(prefixCls, className, editable);
|
|
26
30
|
return wrapSSR( /*#__PURE__*/_jsx(AntText, _objectSpread(_objectSpread({
|
|
27
31
|
ref: ref,
|
|
28
|
-
|
|
32
|
+
editable: editable,
|
|
33
|
+
prefixCls: customizePrefixCls,
|
|
34
|
+
className: typographyCls
|
|
29
35
|
}, restProps), {}, {
|
|
30
36
|
children: children
|
|
31
37
|
})));
|
package/es/typography/Title.js
CHANGED
|
@@ -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 = ["prefixCls", "children"];
|
|
2
|
+
var _excluded = ["editable", "prefixCls", "className", "children"];
|
|
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; }
|
|
@@ -10,12 +10,15 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
10
10
|
import React, { useContext } from 'react';
|
|
11
11
|
import { Typography as AntTypography } from 'antd';
|
|
12
12
|
import ConfigProvider from "../config-provider";
|
|
13
|
+
import useClassName from "./hooks/useClassName";
|
|
13
14
|
import useStyle from "./style";
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
var AntTitle = AntTypography.Title;
|
|
16
17
|
export * from 'antd/es/typography/Title';
|
|
17
18
|
var Title = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18
|
-
var
|
|
19
|
+
var editable = _ref.editable,
|
|
20
|
+
customizePrefixCls = _ref.prefixCls,
|
|
21
|
+
className = _ref.className,
|
|
19
22
|
children = _ref.children,
|
|
20
23
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
24
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
@@ -23,9 +26,12 @@ var Title = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
23
26
|
var prefixCls = getPrefixCls('typography', customizePrefixCls);
|
|
24
27
|
var _useStyle = useStyle(prefixCls),
|
|
25
28
|
wrapSSR = _useStyle.wrapSSR;
|
|
29
|
+
var typographyCls = useClassName(prefixCls, className, editable);
|
|
26
30
|
return wrapSSR( /*#__PURE__*/_jsx(AntTitle, _objectSpread(_objectSpread({
|
|
27
31
|
ref: ref,
|
|
28
|
-
|
|
32
|
+
editable: editable,
|
|
33
|
+
prefixCls: customizePrefixCls,
|
|
34
|
+
className: typographyCls
|
|
29
35
|
}, restProps), {}, {
|
|
30
36
|
children: children
|
|
31
37
|
})));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
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; }
|
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
3
|
+
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); }
|
|
4
|
+
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); }
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
var useClassName = function useClassName(prefixCls, className, editable) {
|
|
7
|
+
var _editable$triggerType;
|
|
8
|
+
var typographyCls = classNames(_defineProperty({}, "".concat(prefixCls, "-editable-text"), _typeof(editable) === 'object' && (editable === null || editable === void 0 || (_editable$triggerType = editable.triggerType) === null || _editable$triggerType === void 0 ? void 0 : _editable$triggerType.includes('text'))), className);
|
|
9
|
+
return typographyCls;
|
|
10
|
+
};
|
|
11
|
+
export default useClassName;
|
|
@@ -4,8 +4,12 @@ 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 genTypographyStyle = function genTypographyStyle(token) {
|
|
7
|
-
var componentCls = token.componentCls
|
|
8
|
-
|
|
7
|
+
var componentCls = token.componentCls,
|
|
8
|
+
controlHeight = token.controlHeight,
|
|
9
|
+
fontSize = token.fontSize,
|
|
10
|
+
lineHeight = token.lineHeight;
|
|
11
|
+
var marginOffset = (controlHeight - fontSize * lineHeight) / 2;
|
|
12
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "span".concat(componentCls), {
|
|
9
13
|
lineHeight: 'inherit',
|
|
10
14
|
color: 'inherit',
|
|
11
15
|
fontSize: 'inherit'
|
|
@@ -13,7 +17,45 @@ export var genTypographyStyle = function genTypographyStyle(token) {
|
|
|
13
17
|
lineHeight: 'inherit',
|
|
14
18
|
color: 'inherit',
|
|
15
19
|
fontSize: 'inherit'
|
|
16
|
-
})
|
|
20
|
+
}), "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-edit"), {
|
|
21
|
+
fontSize: token.fontSize
|
|
22
|
+
})), "".concat(componentCls).concat(componentCls, "-editable-text:not(").concat(componentCls, "-edit-content)"), {
|
|
23
|
+
'&:hover': {
|
|
24
|
+
background: token.colorBgContainer,
|
|
25
|
+
border: "".concat(token.lineWidth, "px ").concat(token.lineType, " ").concat(token.colorBorder),
|
|
26
|
+
borderRadius: token.borderRadius,
|
|
27
|
+
position: 'relative',
|
|
28
|
+
insetInlineStart: -token.paddingSM,
|
|
29
|
+
padding: "".concat(marginOffset - token.lineWidth, "px ").concat(token.paddingSM - token.lineWidth, "px")
|
|
30
|
+
},
|
|
31
|
+
'div&:hover': {
|
|
32
|
+
height: token.controlHeight,
|
|
33
|
+
marginTop: -marginOffset,
|
|
34
|
+
marginBottom: "calc(1em - ".concat(marginOffset, "px)")
|
|
35
|
+
},
|
|
36
|
+
'span&:hover': {
|
|
37
|
+
display: 'inline-block',
|
|
38
|
+
height: token.controlHeight,
|
|
39
|
+
marginTop: -marginOffset,
|
|
40
|
+
marginBottom: -marginOffset
|
|
41
|
+
},
|
|
42
|
+
'h1&:hover, h2&:hover, h3&:hover, h4&:hover, h5&:hover': {
|
|
43
|
+
marginTop: "".concat(-marginOffset, "px !important"),
|
|
44
|
+
marginBottom: "".concat(-marginOffset, "px !important")
|
|
45
|
+
}
|
|
46
|
+
}), "".concat(componentCls).concat(componentCls, "-edit-content"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-div&"), {
|
|
47
|
+
insetInlineStart: -token.paddingSM,
|
|
48
|
+
marginTop: -marginOffset,
|
|
49
|
+
marginBottom: "calc(1em - ".concat(marginOffset, "px)")
|
|
50
|
+
}), "".concat(componentCls, "-span&"), {
|
|
51
|
+
insetInlineStart: -token.paddingSM,
|
|
52
|
+
marginTop: -marginOffset,
|
|
53
|
+
marginBottom: -marginOffset
|
|
54
|
+
}), "".concat(componentCls, "-h1&, ").concat(componentCls, "-h2&, ").concat(componentCls, "-h3&, ").concat(componentCls, "-h4&, ").concat(componentCls, "-h5&"), {
|
|
55
|
+
insetInlineStart: -token.paddingSM,
|
|
56
|
+
marginTop: "".concat(-marginOffset, "px !important"),
|
|
57
|
+
marginBottom: "".concat(-marginOffset, "px !important")
|
|
58
|
+
}));
|
|
17
59
|
};
|
|
18
60
|
export default (function (prefixCls) {
|
|
19
61
|
var useStyle = genComponentStyleHook('Typography', function (token) {
|
|
@@ -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;
|
|
@@ -29,51 +29,17 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/_util/genComponentStyleHook.ts
|
|
30
30
|
var genComponentStyleHook_exports = {};
|
|
31
31
|
__export(genComponentStyleHook_exports, {
|
|
32
|
-
genComponentStyleHook: () => genComponentStyleHook
|
|
33
|
-
genCustomFontStyle: () => genCustomFontStyle
|
|
32
|
+
genComponentStyleHook: () => genComponentStyleHook
|
|
34
33
|
});
|
|
35
34
|
module.exports = __toCommonJS(genComponentStyleHook_exports);
|
|
36
35
|
var import_internal = require("antd/es/theme/internal");
|
|
37
36
|
var import_theme = __toESM(require("../theme"));
|
|
38
|
-
var import_Inter = __toESM(require("./fonts/Inter.woff2"));
|
|
39
|
-
var import_Consolas = __toESM(require("./fonts/Consolas.woff2"));
|
|
40
|
-
var import_HelveticaNeue = __toESM(require("./fonts/HelveticaNeue.woff2"));
|
|
41
|
-
var genCustomFontStyle = (token) => {
|
|
42
|
-
return [
|
|
43
|
-
{
|
|
44
|
-
// English font: work by default
|
|
45
|
-
["@font-face"]: {
|
|
46
|
-
fontFamily: "Inter",
|
|
47
|
-
// load priority: remote font > local font
|
|
48
|
-
src: `url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2') format('woff2'), url(${import_Inter.default}) format('woff2')`,
|
|
49
|
-
// 定义字体加载策略,外置字体加载前使用默认字体进行兜底
|
|
50
|
-
fontDisplay: "swap"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
// Code font: work by default
|
|
55
|
-
["@font-face"]: {
|
|
56
|
-
fontFamily: "Consolas",
|
|
57
|
-
src: `url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2') format('woff2'), url(${import_Consolas.default}) format('woff2')`,
|
|
58
|
-
fontDisplay: "swap"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
// Number code: work manully by configuring font-family
|
|
63
|
-
["@font-face"]: {
|
|
64
|
-
fontFamily: "Helvetica Neue",
|
|
65
|
-
src: `url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2') format('woff2'), url(${import_HelveticaNeue.default}) format('woff2')`,
|
|
66
|
-
fontDisplay: "swap"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
];
|
|
70
|
-
};
|
|
71
37
|
function genComponentStyleHook(componentName, styleFn, getDefaultToken) {
|
|
72
38
|
return (prefixCls) => {
|
|
73
39
|
const useStyle = (0, import_internal.genComponentStyleHook)(
|
|
74
40
|
`OB-${componentName}`,
|
|
75
41
|
(token) => {
|
|
76
|
-
return [
|
|
42
|
+
return [styleFn(token)];
|
|
77
43
|
},
|
|
78
44
|
getDefaultToken,
|
|
79
45
|
{
|
|
@@ -94,6 +60,5 @@ function genComponentStyleHook(componentName, styleFn, getDefaultToken) {
|
|
|
94
60
|
}
|
|
95
61
|
// Annotate the CommonJS export names for ESM import in node:
|
|
96
62
|
0 && (module.exports = {
|
|
97
|
-
genComponentStyleHook
|
|
98
|
-
genCustomFontStyle
|
|
63
|
+
genComponentStyleHook
|
|
99
64
|
});
|
package/lib/button/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { ButtonProps as AntButtonProps } from 'antd/es/button';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export * from 'antd/es/button';
|
|
4
4
|
export type ButtonProps = AntButtonProps;
|
|
5
|
-
declare const _default: React.ForwardRefExoticComponent<AntButtonProps & React.RefAttributes<
|
|
5
|
+
declare const _default: React.ForwardRefExoticComponent<AntButtonProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>> & {
|
|
6
6
|
Group: React.FC<import("antd/es/button").ButtonGroupProps>;
|
|
7
7
|
__ANT_BUTTON: boolean;
|
|
8
8
|
};
|
package/lib/card/index.js
CHANGED
|
@@ -78,29 +78,18 @@ var Card = import_react.default.forwardRef(
|
|
|
78
78
|
});
|
|
79
79
|
return wrapSSR(
|
|
80
80
|
/* @__PURE__ */ import_react.default.createElement(
|
|
81
|
-
|
|
81
|
+
import_antd.Card,
|
|
82
82
|
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
ref,
|
|
84
|
+
size,
|
|
85
|
+
tabList: newTabList,
|
|
86
|
+
prefixCls: customizePrefixCls,
|
|
87
|
+
bodyStyle,
|
|
88
|
+
styles,
|
|
89
|
+
className: cardCls,
|
|
90
|
+
...restProps
|
|
89
91
|
},
|
|
90
|
-
|
|
91
|
-
import_antd.Card,
|
|
92
|
-
{
|
|
93
|
-
ref,
|
|
94
|
-
size,
|
|
95
|
-
tabList: newTabList,
|
|
96
|
-
prefixCls: customizePrefixCls,
|
|
97
|
-
bodyStyle,
|
|
98
|
-
styles,
|
|
99
|
-
className: cardCls,
|
|
100
|
-
...restProps
|
|
101
|
-
},
|
|
102
|
-
children
|
|
103
|
-
)
|
|
92
|
+
children
|
|
104
93
|
)
|
|
105
94
|
);
|
|
106
95
|
}
|
|
@@ -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;
|
package/lib/empty/style/index.js
CHANGED
|
@@ -26,15 +26,7 @@ module.exports = __toCommonJS(style_exports);
|
|
|
26
26
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
27
|
var import_genStyle = require("../../_util/genStyle");
|
|
28
28
|
var genEmptyStyle = (token) => {
|
|
29
|
-
const {
|
|
30
|
-
antCls,
|
|
31
|
-
componentCls,
|
|
32
|
-
colorTextTertiary,
|
|
33
|
-
colorBgLayout,
|
|
34
|
-
colorFill,
|
|
35
|
-
colorText,
|
|
36
|
-
colorTextSecondary
|
|
37
|
-
} = token;
|
|
29
|
+
const { antCls, componentCls, colorTextTertiary, colorText, colorTextSecondary } = token;
|
|
38
30
|
return {
|
|
39
31
|
[`${componentCls}`]: {
|
|
40
32
|
[`${componentCls}-image`]: {
|
|
@@ -47,54 +39,58 @@ var genEmptyStyle = (token) => {
|
|
|
47
39
|
[`${componentCls}-title`]: {
|
|
48
40
|
color: token.colorText,
|
|
49
41
|
fontWeight: token.fontWeightStrong,
|
|
50
|
-
fontSize: token.
|
|
51
|
-
lineHeight: token.
|
|
42
|
+
fontSize: token.fontSizeHeading4,
|
|
43
|
+
lineHeight: token.lineHeightHeading4,
|
|
52
44
|
marginTop: token.marginLG
|
|
53
45
|
},
|
|
54
46
|
[`${componentCls}-description-content`]: {
|
|
55
47
|
color: colorTextTertiary,
|
|
48
|
+
maxWidth: 600,
|
|
49
|
+
margin: "0px auto",
|
|
56
50
|
marginTop: token.marginXS
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
[`${antCls}-steps-item-icon`]: {
|
|
70
|
-
height: token.controlHeightSM,
|
|
71
|
-
width: token.controlHeightSM,
|
|
72
|
-
lineHeight: `${token.controlHeightSM}px`,
|
|
73
|
-
backgroundColor: token.colorFillSecondary,
|
|
74
|
-
// override default border color
|
|
75
|
-
borderColor: token.colorFillSecondary,
|
|
76
|
-
[`${antCls}-steps-icon`]: {
|
|
77
|
-
color: colorTextSecondary,
|
|
78
|
-
fontSize: token.fontSize
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
[`${antCls}-steps-item-content`]: {
|
|
82
|
-
[`${antCls}-steps-item-title`]: {
|
|
83
|
-
color: colorText,
|
|
84
|
-
fontSize: token.fontSize,
|
|
85
|
-
fontWeight: token.fontWeightStrong,
|
|
51
|
+
},
|
|
52
|
+
[`${antCls}-steps`]: {
|
|
53
|
+
maxWidth: 1e3,
|
|
54
|
+
margin: "0px auto",
|
|
55
|
+
marginTop: token.marginLG,
|
|
56
|
+
padding: token.paddingLG,
|
|
57
|
+
backgroundColor: token.colorFillQuaternary,
|
|
58
|
+
borderRadius: token.borderRadiusLG,
|
|
59
|
+
[`${antCls}-steps-item-container`]: {
|
|
60
|
+
[`${antCls}-steps-item-icon`]: {
|
|
61
|
+
height: token.controlHeightSM,
|
|
62
|
+
width: token.controlHeightSM,
|
|
86
63
|
lineHeight: `${token.controlHeightSM}px`,
|
|
87
|
-
|
|
88
|
-
|
|
64
|
+
backgroundColor: token.colorFillSecondary,
|
|
65
|
+
// override default border color
|
|
66
|
+
borderColor: token.colorFillSecondary,
|
|
67
|
+
[`${antCls}-steps-icon`]: {
|
|
68
|
+
color: colorTextSecondary,
|
|
69
|
+
fontSize: token.fontSize
|
|
89
70
|
}
|
|
90
71
|
},
|
|
91
|
-
[`${antCls}-steps-item-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
72
|
+
[`${antCls}-steps-item-content`]: {
|
|
73
|
+
[`${antCls}-steps-item-title`]: {
|
|
74
|
+
color: colorText,
|
|
75
|
+
fontSize: token.fontSize,
|
|
76
|
+
fontWeight: token.fontWeightStrong,
|
|
77
|
+
lineHeight: `${token.controlHeightSM}px`,
|
|
78
|
+
"&::after": {
|
|
79
|
+
top: token.controlHeightSM / 2
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
[`${antCls}-steps-item-description`]: {
|
|
83
|
+
color: colorTextTertiary,
|
|
84
|
+
fontSize: token.fontSizeSM,
|
|
85
|
+
marginTop: token.marginXS
|
|
86
|
+
}
|
|
95
87
|
}
|
|
96
88
|
}
|
|
97
89
|
}
|
|
90
|
+
},
|
|
91
|
+
[`${componentCls}-footer`]: {
|
|
92
|
+
marginTop: token.marginLG,
|
|
93
|
+
...(0, import_genStyle.genLargeStyle)(token)
|
|
98
94
|
}
|
|
99
95
|
},
|
|
100
96
|
[`${componentCls}-horizontal`]: {
|
package/lib/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/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './global.css';
|
|
2
2
|
export * from 'antd';
|
|
3
3
|
export { version } from '../package.json';
|
|
4
4
|
export { default as Alert } from './alert';
|
|
@@ -42,6 +42,8 @@ export { default as Radio } from './radio';
|
|
|
42
42
|
export type { RadioProps } from './radio';
|
|
43
43
|
export { default as Checkbox } from './checkbox';
|
|
44
44
|
export type { CheckboxProps } from './checkbox';
|
|
45
|
+
export { default as Switch } from './switch';
|
|
46
|
+
export type { SwitchProps } from './switch';
|
|
45
47
|
export { default as Select } from './select';
|
|
46
48
|
export type { SelectProps } from './select';
|
|
47
49
|
export { default as TreeSelect } from './tree-select';
|
package/lib/index.js
CHANGED
|
@@ -55,6 +55,7 @@ __export(src_exports, {
|
|
|
55
55
|
Slider: () => import_slider.default,
|
|
56
56
|
Space: () => import_space.default,
|
|
57
57
|
Spin: () => import_spin.default,
|
|
58
|
+
Switch: () => import_switch.default,
|
|
58
59
|
Table: () => import_table.default,
|
|
59
60
|
Tabs: () => import_tabs.default,
|
|
60
61
|
Tag: () => import_tag.default,
|
|
@@ -70,7 +71,7 @@ __export(src_exports, {
|
|
|
70
71
|
version: () => import_package.version
|
|
71
72
|
});
|
|
72
73
|
module.exports = __toCommonJS(src_exports);
|
|
73
|
-
var
|
|
74
|
+
var import_global = require("./global.css");
|
|
74
75
|
__reExport(src_exports, require("antd"), module.exports);
|
|
75
76
|
var import_package = require("../package.json");
|
|
76
77
|
var import_alert = __toESM(require("./alert"));
|
|
@@ -94,6 +95,7 @@ var import_input = __toESM(require("./input"));
|
|
|
94
95
|
var import_input_number = __toESM(require("./input-number"));
|
|
95
96
|
var import_radio = __toESM(require("./radio"));
|
|
96
97
|
var import_checkbox = __toESM(require("./checkbox"));
|
|
98
|
+
var import_switch = __toESM(require("./switch"));
|
|
97
99
|
var import_select = __toESM(require("./select"));
|
|
98
100
|
var import_tree_select = __toESM(require("./tree-select"));
|
|
99
101
|
var import_slider = __toESM(require("./slider"));
|
|
@@ -135,6 +137,7 @@ var { useToken } = import_theme2.default;
|
|
|
135
137
|
Slider,
|
|
136
138
|
Space,
|
|
137
139
|
Spin,
|
|
140
|
+
Switch,
|
|
138
141
|
Table,
|
|
139
142
|
Tabs,
|
|
140
143
|
Tag,
|
package/lib/progress/index.d.ts
CHANGED
package/lib/progress/index.js
CHANGED
|
@@ -16,8 +16,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// src/progress/index.ts
|
|
17
17
|
var progress_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(progress_exports);
|
|
19
|
+
__reExport(progress_exports, require("antd/es/progress/progress"), module.exports);
|
|
19
20
|
__reExport(progress_exports, require("antd/es/progress"), module.exports);
|
|
20
21
|
// Annotate the CommonJS export names for ESM import in node:
|
|
21
22
|
0 && (module.exports = {
|
|
23
|
+
...require("antd/es/progress/progress"),
|
|
22
24
|
...require("antd/es/progress")
|
|
23
25
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/progress/progress';
|