@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
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 [
|
|
12
|
+
return [styleFn(token)];
|
|
37
13
|
}, getDefaultToken, {
|
|
38
14
|
resetStyle: false,
|
|
39
15
|
// antd style order is -999 and -998
|
package/es/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/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(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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;
|
|
@@ -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/es/empty/style/index.js
CHANGED
|
@@ -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(
|
|
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.
|
|
27
|
-
lineHeight: token.
|
|
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
|
-
})
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
marginTop: token.
|
|
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, "-
|
|
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 './
|
|
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/es/index.js
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";
|
|
@@ -22,6 +22,7 @@ export { default as Input } from "./input";
|
|
|
22
22
|
export { default as InputNumber } from "./input-number";
|
|
23
23
|
export { default as Radio } from "./radio";
|
|
24
24
|
export { default as Checkbox } from "./checkbox";
|
|
25
|
+
export { default as Switch } from "./switch";
|
|
25
26
|
export { default as Select } from "./select";
|
|
26
27
|
export { default as TreeSelect } from "./tree-select";
|
|
27
28
|
export { default as Slider } from "./slider";
|
package/es/progress/index.d.ts
CHANGED
package/es/progress/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/progress/progress';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/progress/progress';
|
package/es/radio/index.d.ts
CHANGED
|
@@ -1,3 +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';
|
|
2
|
-
declare const 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
|
+
};
|
|
3
8
|
export default Radio;
|
package/es/result/style/index.js
CHANGED
|
@@ -8,9 +8,17 @@ import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
|
8
8
|
import { genLargeStyle } from "../../_util/genStyle";
|
|
9
9
|
export var genResultStyle = function genResultStyle(token) {
|
|
10
10
|
var componentCls = token.componentCls;
|
|
11
|
-
return _defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-title"), {
|
|
12
|
-
fontWeight: token.fontWeightStrong
|
|
11
|
+
return _defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-title"), {
|
|
12
|
+
fontWeight: token.fontWeightStrong,
|
|
13
|
+
fontSize: token.fontSizeHeading4,
|
|
14
|
+
lineHeight: token.lineHeightHeading4
|
|
15
|
+
}), "".concat(componentCls, "-subtitle"), {
|
|
16
|
+
maxWidth: 600,
|
|
17
|
+
margin: '0px auto'
|
|
13
18
|
}), "".concat(componentCls, "-extra"), _objectSpread({}, genLargeStyle(token))), "".concat(componentCls, "-content"), {
|
|
19
|
+
maxWidth: 1000,
|
|
20
|
+
margin: '0px auto',
|
|
21
|
+
marginTop: token.marginLG,
|
|
14
22
|
padding: token.paddingLG,
|
|
15
23
|
borderRadius: token.borderRadiusLG
|
|
16
24
|
}));
|
package/es/slider/style/index.js
CHANGED
|
@@ -7,9 +7,9 @@ export var genSliderStyle = function genSliderStyle(token) {
|
|
|
7
7
|
var componentCls = token.componentCls,
|
|
8
8
|
_token$dotSize = token.dotSize,
|
|
9
9
|
dotSize = _token$dotSize === void 0 ? 8 : _token$dotSize;
|
|
10
|
-
return _defineProperty({}, "".concat(componentCls).concat(componentCls, "-horizontal"), _defineProperty({}, "".concat(componentCls, "-mark"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-mark-text[style
|
|
10
|
+
return _defineProperty({}, "".concat(componentCls).concat(componentCls, "-horizontal"), _defineProperty({}, "".concat(componentCls, "-mark"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-mark-text[style*=\"left: 0%;\"]"), {
|
|
11
11
|
transform: "translateX(calc(0% - ".concat(dotSize / 2, "px)) !important")
|
|
12
|
-
}), "".concat(componentCls, "-mark-text[style
|
|
12
|
+
}), "".concat(componentCls, "-mark-text[style*=\"left: 100%;\"]"), {
|
|
13
13
|
transform: "translateX(calc(-100% + ".concat(dotSize / 2, "px)) !important")
|
|
14
14
|
})));
|
|
15
15
|
};
|
package/es/switch/index.d.ts
CHANGED
package/es/switch/index.js
CHANGED
|
@@ -1 +1,40 @@
|
|
|
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", "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 { Switch as AntSwitch } 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/switch';
|
|
17
|
+
var InternalSwitch = /*#__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('switch', customizePrefixCls);
|
|
24
|
+
var _useStyle = useStyle(prefixCls),
|
|
25
|
+
wrapSSR = _useStyle.wrapSSR;
|
|
26
|
+
var switchCls = classNames(className);
|
|
27
|
+
return wrapSSR( /*#__PURE__*/_jsx(AntSwitch, _objectSpread({
|
|
28
|
+
ref: ref,
|
|
29
|
+
prefixCls: customizePrefixCls,
|
|
30
|
+
className: switchCls
|
|
31
|
+
}, restProps)));
|
|
32
|
+
});
|
|
33
|
+
var Switch = InternalSwitch;
|
|
34
|
+
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
Switch.__ANT_SWITCH = AntSwitch.__ANT_SWITCH;
|
|
37
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
38
|
+
Switch.displayName = AntSwitch.displayName;
|
|
39
|
+
}
|
|
40
|
+
export default Switch;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
3
|
+
export type SwitchToken = FullToken<'Switch'>;
|
|
4
|
+
export declare const genSwitchStyle: GenerateStyle<SwitchToken>;
|
|
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,17 @@
|
|
|
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 genSwitchStyle = function genSwitchStyle(token) {
|
|
7
|
+
var componentCls = token.componentCls;
|
|
8
|
+
return _defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-checked):not(").concat(componentCls, "-disabled):not(").concat(componentCls, "-loading)"), {
|
|
9
|
+
background: token.colorTextTertiary
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
export default (function (prefixCls) {
|
|
13
|
+
var useStyle = genComponentStyleHook('Switch', function (token) {
|
|
14
|
+
return [genSwitchStyle(token)];
|
|
15
|
+
});
|
|
16
|
+
return useStyle(prefixCls);
|
|
17
|
+
});
|
package/es/table/index.js
CHANGED
|
@@ -63,7 +63,7 @@ function Table(props, ref) {
|
|
|
63
63
|
var prefixCls = getPrefixCls('table', customizePrefixCls);
|
|
64
64
|
var _useStyle = useStyle(prefixCls),
|
|
65
65
|
wrapSSR = _useStyle.wrapSSR;
|
|
66
|
-
var tableCls = classNames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-expandable"), !isEmpty(expandable)), "".concat(prefixCls, "-has-footer"), !!footer), className);
|
|
66
|
+
var tableCls = classNames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-expandable"), !isEmpty(expandable)), "".concat(prefixCls, "-selectable"), !!rowSelection), "".concat(prefixCls, "-has-footer"), !!footer), className);
|
|
67
67
|
var _useState = useState(false),
|
|
68
68
|
_useState2 = _slicedToArray(_useState, 2),
|
|
69
69
|
openPopover = _useState2[0],
|
|
@@ -188,6 +188,9 @@ function Table(props, ref) {
|
|
|
188
188
|
})
|
|
189
189
|
}),
|
|
190
190
|
columns: newColumns,
|
|
191
|
+
expandable: expandable ? _objectSpread({
|
|
192
|
+
columnWidth: 32
|
|
193
|
+
}, expandable) : undefined,
|
|
191
194
|
rowSelection: rowSelection ? _objectSpread(_objectSpread({
|
|
192
195
|
columnWidth: table === null || table === void 0 ? void 0 : table.selectionColumnWidth
|
|
193
196
|
}, rowSelection), {}, {
|
package/es/table/style/index.js
CHANGED
|
@@ -14,30 +14,30 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
14
14
|
colorLink = token.colorLink,
|
|
15
15
|
borderRadiusLG = token.borderRadiusLG,
|
|
16
16
|
colorBorderSecondary = token.colorBorderSecondary,
|
|
17
|
-
paddingSM = token.paddingSM,
|
|
18
17
|
padding = token.padding,
|
|
19
|
-
paddingLG = token.paddingLG,
|
|
20
18
|
marginLG = token.marginLG,
|
|
21
|
-
marginXS = token.marginXS
|
|
22
|
-
|
|
23
|
-
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-wrapper ").concat(componentCls), _defineProperty(_defineProperty(_defineProperty({
|
|
19
|
+
marginXS = token.marginXS;
|
|
20
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-wrapper ").concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
24
21
|
color: colorText,
|
|
25
22
|
backgroundColor: colorBgBase,
|
|
26
23
|
borderRadius: borderRadiusLG
|
|
27
24
|
}, "".concat(componentCls, "-footer"), {
|
|
28
25
|
borderBottom: "1px solid ".concat(colorBorderSecondary)
|
|
29
|
-
}), "".concat(componentCls, "-thead
|
|
26
|
+
}), "".concat(componentCls, "-thead, ").concat(componentCls, "-tbody"), _defineProperty({}, 'td, th', _defineProperty(_defineProperty({}, "&".concat(componentCls, "-row-expand-icon-cell"), {
|
|
27
|
+
backgroundColor: colorBgBase,
|
|
28
|
+
padding: "".concat(token.paddingSM, "px ").concat(token.paddingXS, "px")
|
|
29
|
+
}), "&:not(:first-child):not(".concat(componentCls, "-selection-column):not(").concat(componentCls, "-row-expand-icon-cell)"), {
|
|
30
|
+
paddingLeft: token.paddingXS
|
|
31
|
+
}))), "".concat(componentCls, "-thead > tr"), _defineProperty(_defineProperty(_defineProperty({}, 'th', {
|
|
30
32
|
// 弱化列标题
|
|
31
33
|
color: colorTextSecondary,
|
|
32
34
|
fontWeight: 'normal',
|
|
33
35
|
backgroundColor: colorBgBase
|
|
34
|
-
}), "
|
|
35
|
-
backgroundColor: colorBgBase
|
|
36
|
-
}), "th".concat(componentCls, "-column-sort"), {
|
|
36
|
+
}), "th".concat(componentCls, "-column-has-sorters"), {
|
|
37
37
|
backgroundColor: colorBgBase
|
|
38
38
|
}), "".concat(componentCls, "-cell-scrollbar"), {
|
|
39
39
|
boxShadow: "0 1px 0 1px ".concat(colorBgBase)
|
|
40
|
-
})), "".concat(componentCls, "-tbody"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "tr:nth-child(2n + 1):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(antCls, "-descriptions-row) > td"), {
|
|
40
|
+
})), "".concat(componentCls, "-tbody"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "tr:nth-child(2n + 1):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(antCls, "-descriptions-row) > td"), {
|
|
41
41
|
backgroundColor: colorBgBase
|
|
42
42
|
}), "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row):not(").concat(antCls, "-descriptions-row) > td"), {
|
|
43
43
|
backgroundColor: colorFillQuaternary
|
|
@@ -45,30 +45,30 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
45
45
|
backgroundColor: "".concat(colorPrimaryBg, " !important")
|
|
46
46
|
}), "tr".concat(componentCls, "-row-selected > td"), {
|
|
47
47
|
backgroundColor: "".concat(colorPrimaryBg, " !important")
|
|
48
|
-
}), "".concat(componentCls, "-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
})
|
|
48
|
+
}), "".concat(componentCls, "-tbody-virtual-scrollbar ").concat(componentCls, "-tbody-virtual-scrollbar-thumb"), {
|
|
49
|
+
background: "".concat(token.colorFillSecondary, " !important")
|
|
50
|
+
}), "tr > td:has(".concat(componentCls, "-row-expand-icon-expanded)"), _defineProperty({
|
|
51
|
+
borderBottom: 'none'
|
|
52
|
+
}, "& ~ td", {
|
|
53
|
+
borderBottom: 'none'
|
|
54
|
+
})), "tr > td", {
|
|
55
|
+
transition: "background ".concat(token.motionDurationMid)
|
|
56
|
+
}), "".concat(componentCls, "-placeholder td"), {
|
|
57
|
+
borderBottom: 'none'
|
|
58
|
+
}), "".concat(componentCls, "-empty-wrapper"), {
|
|
57
59
|
minHeight: 360,
|
|
58
60
|
display: 'flex',
|
|
59
61
|
justifyContent: 'center',
|
|
60
62
|
alignItems: 'center'
|
|
61
63
|
}), "tr > td > ".concat(componentCls, "-wrapper:only-child ").concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
62
|
-
|
|
63
|
-
marginBlock: '0 !important',
|
|
64
|
-
marginInline: '0 !important'
|
|
64
|
+
borderBottom: 'none'
|
|
65
65
|
}, "".concat(componentCls, "-thead > tr > th"), {
|
|
66
|
-
backgroundColor:
|
|
67
|
-
}), "".concat(componentCls, "-
|
|
68
|
-
|
|
69
|
-
}), "".concat(componentCls, "-
|
|
70
|
-
borderRadius:
|
|
71
|
-
})
|
|
66
|
+
backgroundColor: token.colorFillQuaternary
|
|
67
|
+
}), "".concat(componentCls, "-thead > tr:first-child > th:first-child"), {
|
|
68
|
+
borderRadius: 0
|
|
69
|
+
}), "".concat(componentCls, "-thead > tr:first-child > th:last-child"), {
|
|
70
|
+
borderRadius: 0
|
|
71
|
+
}), "".concat(componentCls, "-empty-wrapper"), {
|
|
72
72
|
minHeight: 'auto'
|
|
73
73
|
})))), "".concat(componentCls, "-wrapper:not(").concat(componentCls, "-expandable):not(").concat(componentCls, "-has-footer) ").concat(componentCls, ":not(").concat(componentCls, "-bordered):not(").concat(componentCls, "-empty)"), {
|
|
74
74
|
borderBottom: "1px solid ".concat(colorBorderSecondary),
|
|
@@ -77,15 +77,23 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
77
77
|
backgroundColor: colorFillQuaternary
|
|
78
78
|
}), "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row):not(").concat(antCls, "-descriptions-row) > td"), {
|
|
79
79
|
backgroundColor: colorBgBase
|
|
80
|
-
}))), "".concat(componentCls, "-wrapper
|
|
81
|
-
border: 'none'
|
|
82
|
-
})))), "".concat(componentCls, "-wrapper").concat(componentCls, "-expandable"), _defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row)"), _defineProperty(_defineProperty({}, '& > td', {
|
|
80
|
+
}))), "".concat(componentCls, "-wrapper").concat(componentCls, "-expandable"), _defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty(_defineProperty({}, "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row)"), _defineProperty(_defineProperty({}, '& > td', {
|
|
83
81
|
backgroundColor: colorBgBase
|
|
84
82
|
}), '&:hover', {
|
|
85
83
|
td: {
|
|
86
84
|
backgroundColor: colorPrimaryBg
|
|
87
85
|
}
|
|
88
|
-
}))
|
|
86
|
+
})), "tr > td > ".concat(componentCls, "-wrapper:only-child ").concat(componentCls), {
|
|
87
|
+
marginLeft: token.marginXS + token.lineWidth * 2
|
|
88
|
+
}))), "".concat(componentCls, "-middle, ").concat(componentCls, "-small"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "tr > td > ".concat(componentCls, "-wrapper:only-child ").concat(componentCls), {
|
|
89
|
+
marginLeft: token.marginXS + token.lineWidth * 2 + token.margin
|
|
90
|
+
})))), "".concat(componentCls, "-wrapper").concat(componentCls, "-expandable").concat(componentCls, "-selectable"), _defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-expanded-row > td"), _defineProperty({}, "& > *:not(".concat(componentCls, "-wrapper)"), {
|
|
91
|
+
marginLeft: token.marginLG + token.marginXL + token.lineWidth * 2
|
|
92
|
+
})), "tr > td > ".concat(componentCls, "-wrapper:only-child ").concat(componentCls), {
|
|
93
|
+
marginLeft: token.marginXS + token.marginXL + token.lineWidth * 2
|
|
94
|
+
}))), "".concat(componentCls, "-middle, ").concat(componentCls, "-small"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "tr > td > ".concat(componentCls, "-wrapper:only-child ").concat(componentCls), {
|
|
95
|
+
marginLeft: token.marginXS + token.marginXL + token.lineWidth * 2 + token.margin
|
|
96
|
+
})))), "".concat(componentCls, "-wrapper ").concat(antCls, "-spin-blur"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "".concat(componentCls, "-placeholder"), {
|
|
89
97
|
// hide empty when Table loading
|
|
90
98
|
visibility: 'hidden'
|
|
91
99
|
}))), "".concat(componentCls, "-wrapper"), _defineProperty({}, "".concat(componentCls, "-pagination"), _defineProperty(_defineProperty({}, "&".concat(antCls, "-pagination"), {
|
package/es/theme/default.js
CHANGED
|
@@ -84,7 +84,9 @@ var defaultTheme = {
|
|
|
84
84
|
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)',
|
|
85
85
|
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)',
|
|
86
86
|
borderRadius: 6,
|
|
87
|
-
wireframe: false
|
|
87
|
+
wireframe: false,
|
|
88
|
+
// Remove focus outline
|
|
89
|
+
lineWidthFocus: 0
|
|
88
90
|
},
|
|
89
91
|
components: {
|
|
90
92
|
Breadcrumb: {
|
|
@@ -414,6 +414,7 @@
|
|
|
414
414
|
@borderRadiusOuter: 4;
|
|
415
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);
|
|
416
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;
|
|
417
418
|
@colorFillContent: #e2e8f3;
|
|
418
419
|
@colorFillContentHover: #cdd5e4;
|
|
419
420
|
@colorFillAlter: #f8fafe;
|
|
@@ -434,7 +435,6 @@
|
|
|
434
435
|
@colorErrorOutline: rgba(255, 5, 5, 0.08);
|
|
435
436
|
@colorWarningOutline: rgba(255, 164, 19, 0.11);
|
|
436
437
|
@fontSizeIcon: 10;
|
|
437
|
-
@lineWidthFocus: 3;
|
|
438
438
|
@controlOutlineWidth: 2;
|
|
439
439
|
@controlInteractiveSize: 14;
|
|
440
440
|
@controlItemBgHover: #f3f6fc;
|
|
@@ -414,6 +414,7 @@
|
|
|
414
414
|
@borderRadiusOuter: 4;
|
|
415
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);
|
|
416
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;
|
|
417
418
|
@colorFillContent: #e2e8f3;
|
|
418
419
|
@colorFillContentHover: #cdd5e4;
|
|
419
420
|
@colorFillAlter: #f8fafe;
|
|
@@ -434,7 +435,6 @@
|
|
|
434
435
|
@colorErrorOutline: rgba(255, 5, 5, 0.08);
|
|
435
436
|
@colorWarningOutline: rgba(255, 164, 19, 0.11);
|
|
436
437
|
@fontSizeIcon: 12;
|
|
437
|
-
@lineWidthFocus: 3;
|
|
438
438
|
@controlOutlineWidth: 2;
|
|
439
439
|
@controlInteractiveSize: 16;
|
|
440
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
|