@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.
- 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/style/index.js +17 -3
- package/es/card/index.js +11 -19
- package/es/card/style/index.js +5 -3
- package/es/checkbox/index.d.ts +2 -0
- package/es/checkbox/index.js +40 -1
- package/es/checkbox/style/index.d.ts +9 -0
- package/es/checkbox/style/index.js +22 -0
- package/es/config-provider/index.d.ts +2 -0
- package/es/config-provider/index.js +6 -4
- package/es/descriptions/hooks/useItems.d.ts +4 -4
- package/es/empty/default.js +34 -55
- package/es/empty/style/index.js +13 -11
- package/es/global.css +48 -0
- package/es/index.d.ts +9 -1
- package/es/index.js +5 -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 +7 -0
- package/es/radio/index.js +41 -1
- package/es/radio/style/index.d.ts +9 -0
- package/es/radio/style/index.js +23 -0
- package/es/result/style/index.js +10 -2
- package/es/slider/index.d.ts +5 -0
- package/es/slider/index.js +36 -1
- package/es/slider/style/index.d.ts +9 -0
- package/es/slider/style/index.js +21 -0
- 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 +18 -3
- package/es/table/style/index.js +55 -40
- package/es/theme/default.js +13 -12
- package/es/theme/style/aliyun.less +5 -1
- package/es/theme/style/compact.less +7 -3
- package/es/theme/style/dark.less +5 -1
- package/es/theme/style/default.less +15 -11
- 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/style/index.js +21 -1
- package/lib/card/index.js +10 -21
- package/lib/card/style/index.js +7 -2
- package/lib/checkbox/index.d.ts +2 -0
- package/lib/checkbox/index.js +49 -1
- package/lib/checkbox/style/index.d.ts +9 -0
- package/lib/checkbox/style/index.js +49 -0
- package/lib/config-provider/index.d.ts +2 -0
- package/lib/config-provider/index.js +2 -1
- package/lib/descriptions/hooks/useItems.d.ts +4 -4
- package/lib/empty/default.js +8 -39
- package/lib/empty/style/index.js +42 -46
- package/lib/global.css +48 -0
- package/lib/index.d.ts +9 -1
- package/lib/index.js +13 -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 +7 -0
- package/lib/radio/index.js +42 -1
- package/lib/radio/style/index.d.ts +9 -0
- package/lib/radio/style/index.js +49 -0
- package/lib/result/style/index.js +10 -1
- package/lib/slider/index.d.ts +5 -0
- package/lib/slider/index.js +38 -1
- package/lib/slider/style/index.d.ts +9 -0
- package/lib/slider/style/index.js +51 -0
- 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 +19 -3
- package/lib/table/style/index.js +94 -55
- package/lib/theme/default.js +13 -12
- package/lib/theme/style/aliyun.less +5 -1
- package/lib/theme/style/compact.less +7 -3
- package/lib/theme/style/dark.less +5 -1
- package/lib/theme/style/default.less +15 -11
- 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 +13 -13
- 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
package/es/theme/style/dark.less
CHANGED
|
@@ -312,6 +312,9 @@
|
|
|
312
312
|
@colorFillSecondary: rgba(255, 255, 255, 0.12);
|
|
313
313
|
@colorFillTertiary: rgba(255, 255, 255, 0.08);
|
|
314
314
|
@colorFillQuaternary: rgba(255, 255, 255, 0.04);
|
|
315
|
+
@colorBgSolid: rgba(255, 255, 255, 0.95);
|
|
316
|
+
@colorBgSolidHover: rgb(255, 255, 255);
|
|
317
|
+
@colorBgSolidActive: rgba(255, 255, 255, 0.9);
|
|
315
318
|
@colorBgLayout: #000000;
|
|
316
319
|
@colorBgContainer: #141414;
|
|
317
320
|
@colorBgElevated: #1f1f1f;
|
|
@@ -339,6 +342,7 @@
|
|
|
339
342
|
@colorSuccessTextActive: #0e845d;
|
|
340
343
|
@colorErrorBg: #2b1416;
|
|
341
344
|
@colorErrorBgHover: #44191a;
|
|
345
|
+
@colorErrorBgFilledHover: #421a1b;
|
|
342
346
|
@colorErrorBgActive: #591f1f;
|
|
343
347
|
@colorErrorBorder: #591f1f;
|
|
344
348
|
@colorErrorBorderHover: #7b2525;
|
|
@@ -428,7 +432,7 @@
|
|
|
428
432
|
@colorErrorOutline: rgba(250, 20, 40, 0.1);
|
|
429
433
|
@colorWarningOutline: rgba(180, 93, 0, 0.15);
|
|
430
434
|
@fontSizeIcon: 12;
|
|
431
|
-
@lineWidthFocus:
|
|
435
|
+
@lineWidthFocus: 3;
|
|
432
436
|
@controlOutlineWidth: 2;
|
|
433
437
|
@controlInteractiveSize: 16;
|
|
434
438
|
@controlItemBgHover: rgba(255, 255, 255, 0.08);
|
|
@@ -312,6 +312,9 @@
|
|
|
312
312
|
@colorFillSecondary: #e2e8f3;
|
|
313
313
|
@colorFillTertiary: #f3f6fc;
|
|
314
314
|
@colorFillQuaternary: #f8fafe;
|
|
315
|
+
@colorBgSolid: rgb(0, 0, 0);
|
|
316
|
+
@colorBgSolidHover: rgba(0, 0, 0, 0.75);
|
|
317
|
+
@colorBgSolidActive: rgba(0, 0, 0, 0.95);
|
|
315
318
|
@colorBgLayout: #f3f6fc;
|
|
316
319
|
@colorBgContainer: #ffffff;
|
|
317
320
|
@colorBgElevated: #ffffff;
|
|
@@ -339,6 +342,7 @@
|
|
|
339
342
|
@colorSuccessTextActive: #00b378;
|
|
340
343
|
@colorErrorBg: #ffebeb;
|
|
341
344
|
@colorErrorBgHover: #ffd6d6;
|
|
345
|
+
@colorErrorBgFilledHover: #ffd7d3;
|
|
342
346
|
@colorErrorBgActive: #ffbcb5;
|
|
343
347
|
@colorErrorBorder: #ffb3b3;
|
|
344
348
|
@colorErrorBorderHover: #ff7575;
|
|
@@ -372,22 +376,22 @@
|
|
|
372
376
|
@fontSizeSM: 12;
|
|
373
377
|
@fontSizeLG: 16;
|
|
374
378
|
@fontSizeXL: 20;
|
|
375
|
-
@fontSizeHeading1:
|
|
376
|
-
@fontSizeHeading2:
|
|
377
|
-
@fontSizeHeading3:
|
|
378
|
-
@fontSizeHeading4:
|
|
379
|
-
@fontSizeHeading5:
|
|
379
|
+
@fontSizeHeading1: 38;
|
|
380
|
+
@fontSizeHeading2: 30;
|
|
381
|
+
@fontSizeHeading3: 24;
|
|
382
|
+
@fontSizeHeading4: 20;
|
|
383
|
+
@fontSizeHeading5: 16;
|
|
380
384
|
@lineHeight: 1.5714285714285714;
|
|
381
385
|
@lineHeightLG: 1.5;
|
|
382
386
|
@lineHeightSM: 1.6666666666666667;
|
|
383
387
|
@fontHeight: 22;
|
|
384
388
|
@fontHeightLG: 24;
|
|
385
389
|
@fontHeightSM: 20;
|
|
386
|
-
@lineHeightHeading1: 1.
|
|
387
|
-
@lineHeightHeading2: 1.
|
|
388
|
-
@lineHeightHeading3: 1.
|
|
389
|
-
@lineHeightHeading4: 1.
|
|
390
|
-
@lineHeightHeading5: 1.
|
|
390
|
+
@lineHeightHeading1: 1.2105263157894737;
|
|
391
|
+
@lineHeightHeading2: 1.2666666666666666;
|
|
392
|
+
@lineHeightHeading3: 1.3333333333333333;
|
|
393
|
+
@lineHeightHeading4: 1.4;
|
|
394
|
+
@lineHeightHeading5: 1.5;
|
|
391
395
|
@sizeXXL: 48;
|
|
392
396
|
@sizeXL: 32;
|
|
393
397
|
@sizeLG: 24;
|
|
@@ -410,6 +414,7 @@
|
|
|
410
414
|
@borderRadiusOuter: 4;
|
|
411
415
|
@boxShadowSecondary: 0 6px 16px 0 rgba(54, 69, 99, 0.08), 0 3px 6px -4px rgba(54, 69, 99, 0.12), 0 9px 28px 8px rgba(54, 69, 99, 0.05);
|
|
412
416
|
@boxShadow: 0 1px 2px 0 rgba(54, 69, 99, 0.03), 0 1px 6px -1px rgba(54, 69, 99, 0.02), 0 2px 4px 0 rgba(54, 69, 99, 0.02);
|
|
417
|
+
@lineWidthFocus: 3;
|
|
413
418
|
@colorFillContent: #e2e8f3;
|
|
414
419
|
@colorFillContentHover: #cdd5e4;
|
|
415
420
|
@colorFillAlter: #f8fafe;
|
|
@@ -430,7 +435,6 @@
|
|
|
430
435
|
@colorErrorOutline: rgba(255, 5, 5, 0.08);
|
|
431
436
|
@colorWarningOutline: rgba(255, 164, 19, 0.11);
|
|
432
437
|
@fontSizeIcon: 12;
|
|
433
|
-
@lineWidthFocus: 4;
|
|
434
438
|
@controlOutlineWidth: 2;
|
|
435
439
|
@controlInteractiveSize: 16;
|
|
436
440
|
@controlItemBgHover: #f3f6fc;
|
|
@@ -23,6 +23,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
23
23
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
24
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
25
|
var MouseTooltip = function MouseTooltip(_ref) {
|
|
26
|
+
var _token$Tooltip, _token$Tooltip2;
|
|
26
27
|
var children = _ref.children,
|
|
27
28
|
title = _ref.title,
|
|
28
29
|
backgroundColor = _ref.color,
|
|
@@ -99,10 +100,10 @@ var MouseTooltip = function MouseTooltip(_ref) {
|
|
|
99
100
|
boxShadow: token.boxShadowSecondary,
|
|
100
101
|
borderRadius: token.borderRadius,
|
|
101
102
|
// @ts-ignore
|
|
102
|
-
color: textColor || token.Tooltip.colorTextLightSolid || token.colorTextLightSolid,
|
|
103
|
+
color: textColor || ((_token$Tooltip = token.Tooltip) === null || _token$Tooltip === void 0 ? void 0 : _token$Tooltip.colorTextLightSolid) || token.colorTextLightSolid,
|
|
103
104
|
backgroundColor:
|
|
104
105
|
// @ts-ignore
|
|
105
|
-
backgroundColor || token.Tooltip.colorBgSpotlight || token.colorBgSpotlight,
|
|
106
|
+
backgroundColor || ((_token$Tooltip2 = token.Tooltip) === null || _token$Tooltip2 === void 0 ? void 0 : _token$Tooltip2.colorBgSpotlight) || token.colorBgSpotlight,
|
|
106
107
|
left: isOverWidth ? clientX - tooltipWidth - offset : clientX + offset,
|
|
107
108
|
top: isOverHeight ? clientY - tooltipHeight - offset : clientY + offset
|
|
108
109
|
}, restOverlayInnerStyle)
|
package/es/tooltip/index.js
CHANGED
|
@@ -52,7 +52,8 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
52
52
|
var _useStyle = useStyle(prefixCls),
|
|
53
53
|
wrapSSR = _useStyle.wrapSSR,
|
|
54
54
|
hashId = _useStyle.hashId;
|
|
55
|
-
var tooltipCls = classNames(className
|
|
55
|
+
var tooltipCls = classNames(className);
|
|
56
|
+
var mouseTooltipCls = classNames(prefixCls, className, hashId);
|
|
56
57
|
var _useState = useState((_ref2 = (_ref3 = open !== null && open !== void 0 ? open : visible) !== null && _ref3 !== void 0 ? _ref3 : defaultOpen) !== null && _ref2 !== void 0 ? _ref2 : defaultVisible),
|
|
57
58
|
_useState2 = _slicedToArray(_useState, 2),
|
|
58
59
|
innerOpen = _useState2[0],
|
|
@@ -92,7 +93,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
92
93
|
overlayInnerStyle: _objectSpread({
|
|
93
94
|
color: typeItem === null || typeItem === void 0 ? void 0 : typeItem.color
|
|
94
95
|
}, overlayInnerStyle),
|
|
95
|
-
className:
|
|
96
|
+
className: mouseTooltipCls,
|
|
96
97
|
overlay: overlay
|
|
97
98
|
}, restProps), {}, {
|
|
98
99
|
children: children
|
|
@@ -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
|
});
|
|
@@ -26,12 +26,15 @@ module.exports = __toCommonJS(style_exports);
|
|
|
26
26
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
27
|
var genButtonStyle = (token) => {
|
|
28
28
|
const { componentCls } = token;
|
|
29
|
+
const primaryBtnCls = `${componentCls}${componentCls}-primary:not([disabled]):not(${componentCls}-disabled):not(${componentCls}-dangerous):not(${componentCls}-background-ghost)`;
|
|
30
|
+
const primaryAndCompactItemBtnCls = `${componentCls}-compact-item${primaryBtnCls}`;
|
|
29
31
|
return {
|
|
30
32
|
[`${componentCls}`]: {
|
|
31
33
|
// remove box-shadow for button
|
|
32
34
|
boxShadow: "none !important"
|
|
33
35
|
},
|
|
34
|
-
|
|
36
|
+
// primary button
|
|
37
|
+
[`${primaryBtnCls}`]: {
|
|
35
38
|
background: "linear-gradient(-59deg, #002BFF 0%, #0080FF 100%)",
|
|
36
39
|
border: "none",
|
|
37
40
|
["&:hover"]: {
|
|
@@ -40,6 +43,23 @@ var genButtonStyle = (token) => {
|
|
|
40
43
|
["&:active"]: {
|
|
41
44
|
background: "linear-gradient(120deg, #0060E6 0%, #0013E6 100%)"
|
|
42
45
|
}
|
|
46
|
+
},
|
|
47
|
+
// primary button in compact item
|
|
48
|
+
[`${primaryBtnCls}${componentCls}-compact-last-item`]: {
|
|
49
|
+
background: "linear-gradient(-59deg, #002BFF 0%, #002BFF 100%)",
|
|
50
|
+
["&:hover"]: {
|
|
51
|
+
background: "linear-gradient(120deg, #1AA0FF 0%, #1A53FF 100%)"
|
|
52
|
+
},
|
|
53
|
+
["&:active"]: {
|
|
54
|
+
background: "linear-gradient(120deg, #0060E6 0%, #0013E6 100%)"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
[`${primaryAndCompactItemBtnCls}+${primaryAndCompactItemBtnCls}:before`]: {
|
|
58
|
+
height: "100%",
|
|
59
|
+
top: 0
|
|
60
|
+
},
|
|
61
|
+
[`${primaryAndCompactItemBtnCls}:hover`]: {
|
|
62
|
+
zIndex: 0
|
|
43
63
|
}
|
|
44
64
|
};
|
|
45
65
|
};
|
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
|
}
|
package/lib/card/style/index.js
CHANGED
|
@@ -70,12 +70,17 @@ var genCardStyle = (token) => {
|
|
|
70
70
|
},
|
|
71
71
|
[`${componentCls}${componentCls}-no-divider:not(${componentCls}-contain-tabs)`]: {
|
|
72
72
|
[`${componentCls}-body`]: {
|
|
73
|
-
padding: `0 ${paddingLG}px ${
|
|
73
|
+
padding: `0 ${paddingLG}px ${paddingLG}px ${paddingLG}px`
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
[`${componentCls}-small${componentCls}-no-divider:not(${componentCls}-contain-tabs)`]: {
|
|
77
77
|
[`${componentCls}-body`]: {
|
|
78
|
-
padding: `0 ${paddingSM}px
|
|
78
|
+
padding: `0 ${paddingSM}px ${paddingSM}px ${paddingSM}px`
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
[`${componentCls}-small${componentCls}-contain-tabs >${componentCls}-head`]: {
|
|
82
|
+
[`${componentCls}-head-title, ${componentCls}-head-extra`]: {
|
|
83
|
+
paddingTop: token.paddingXS
|
|
79
84
|
}
|
|
80
85
|
},
|
|
81
86
|
[`${componentCls}${componentCls}-contain-tabs`]: {
|
package/lib/checkbox/index.d.ts
CHANGED
package/lib/checkbox/index.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
5
11
|
var __copyProps = (to, from, except, desc) => {
|
|
6
12
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
13
|
for (let key of __getOwnPropNames(from))
|
|
@@ -11,12 +17,54 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
11
17
|
return to;
|
|
12
18
|
};
|
|
13
19
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
14
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
29
|
|
|
16
|
-
// src/checkbox/index.
|
|
30
|
+
// src/checkbox/index.tsx
|
|
17
31
|
var checkbox_exports = {};
|
|
32
|
+
__export(checkbox_exports, {
|
|
33
|
+
default: () => checkbox_default
|
|
34
|
+
});
|
|
18
35
|
module.exports = __toCommonJS(checkbox_exports);
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_config_provider = __toESM(require("../config-provider"));
|
|
40
|
+
var import_style = __toESM(require("./style"));
|
|
19
41
|
__reExport(checkbox_exports, require("antd/es/checkbox"), module.exports);
|
|
42
|
+
var InternalCheckbox = import_react.default.forwardRef(
|
|
43
|
+
({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
44
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
45
|
+
const prefixCls = getPrefixCls("checkbox", customizePrefixCls);
|
|
46
|
+
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
47
|
+
const checkboxCls = (0, import_classnames.default)(className);
|
|
48
|
+
return wrapSSR(
|
|
49
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
50
|
+
import_antd.Checkbox,
|
|
51
|
+
{
|
|
52
|
+
ref,
|
|
53
|
+
prefixCls: customizePrefixCls,
|
|
54
|
+
className: checkboxCls,
|
|
55
|
+
...restProps
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
var Checkbox = InternalCheckbox;
|
|
62
|
+
Checkbox.Group = import_antd.Checkbox.Group;
|
|
63
|
+
Checkbox.__ANT_CHECKBOX = import_antd.Checkbox.__ANT_CHECKBOX;
|
|
64
|
+
if (process.env.NODE_ENV !== "production") {
|
|
65
|
+
Checkbox.displayName = import_antd.Checkbox.displayName;
|
|
66
|
+
}
|
|
67
|
+
var checkbox_default = Checkbox;
|
|
20
68
|
// Annotate the CommonJS export names for ESM import in node:
|
|
21
69
|
0 && (module.exports = {
|
|
22
70
|
...require("antd/es/checkbox")
|