@oceanbase/design 0.4.15 → 0.4.16
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/es/descriptions/hooks/useItems.js +3 -2
- package/es/descriptions/style/index.js +1 -3
- package/es/global.css +7 -7
- package/es/table/index.d.ts +2 -2
- package/es/typography/Link.d.ts +5 -1
- package/es/typography/Link.js +1 -0
- package/es/typography/Paragraph.d.ts +5 -1
- package/es/typography/Paragraph.js +1 -0
- package/es/typography/Text.d.ts +5 -1
- package/es/typography/Text.js +1 -0
- package/es/typography/Title.d.ts +5 -1
- package/es/typography/Title.js +1 -0
- package/lib/descriptions/hooks/useItems.js +3 -2
- package/lib/descriptions/style/index.js +0 -2
- package/lib/global.css +7 -7
- package/lib/table/index.d.ts +2 -2
- package/lib/typography/Link.d.ts +5 -1
- package/lib/typography/Link.js +1 -0
- package/lib/typography/Paragraph.d.ts +5 -1
- package/lib/typography/Paragraph.js +1 -0
- package/lib/typography/Text.d.ts +5 -1
- package/lib/typography/Text.js +1 -0
- package/lib/typography/Title.d.ts +5 -1
- package/lib/typography/Title.js +1 -0
- package/package.json +3 -4
|
@@ -35,6 +35,7 @@ function convertItem(props, bordered) {
|
|
|
35
35
|
var itemChildren = props.children,
|
|
36
36
|
contentProps = props.contentProps,
|
|
37
37
|
restItemProps = _objectWithoutProperties(props, _excluded);
|
|
38
|
+
var itemChildrenType = itemChildren === null || itemChildren === void 0 ? void 0 : itemChildren.type;
|
|
38
39
|
var defaultEllipsis = {
|
|
39
40
|
tooltip: {
|
|
40
41
|
placement: 'topLeft',
|
|
@@ -47,8 +48,8 @@ function convertItem(props, bordered) {
|
|
|
47
48
|
editable = _ref.editable,
|
|
48
49
|
restContentProps = _objectWithoutProperties(_ref, _excluded2);
|
|
49
50
|
return _objectSpread(_objectSpread({}, restItemProps), {}, {
|
|
50
|
-
//
|
|
51
|
-
children: bordered ? itemChildren : /*#__PURE__*/_jsx(Typography.Text, _objectSpread(_objectSpread({}, restContentProps), {}, {
|
|
51
|
+
// 无边框并且子元素非 Typography 时外面包一层 Typography.Text,以实现自动省略
|
|
52
|
+
children: bordered || itemChildrenType !== null && itemChildrenType !== void 0 && itemChildrenType.__ANT_TYPOGRAPHY ? itemChildren : /*#__PURE__*/_jsx(Typography.Text, _objectSpread(_objectSpread({}, restContentProps), {}, {
|
|
52
53
|
ellipsis: getEllipsisConfig(ellipsis, itemChildren),
|
|
53
54
|
editable:
|
|
54
55
|
// disable autoSize by default to avoid over height
|
|
@@ -32,9 +32,7 @@ export var genDescriptionsStyle = function genDescriptionsStyle(token) {
|
|
|
32
32
|
var componentCls = token.componentCls,
|
|
33
33
|
typographyComponentCls = token.typographyComponentCls;
|
|
34
34
|
return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _objectSpread(_objectSpread({}, genVerticalStyle('default', token)), {}, _defineProperty(_defineProperty({}, "".concat(componentCls, "-item-container"), _defineProperty({}, "".concat(componentCls, "-item-content"), _defineProperty({
|
|
35
|
-
paddingRight: 12
|
|
36
|
-
// 为了保证内部的 Text ellipsis 生效
|
|
37
|
-
overflow: 'hidden'
|
|
35
|
+
paddingRight: 12
|
|
38
36
|
}, "".concat(typographyComponentCls, "-edit-content"), {
|
|
39
37
|
insetInlineStart: 0,
|
|
40
38
|
marginTop: 0,
|
package/es/global.css
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
@font-face {
|
|
4
4
|
font-family: 'Inter';
|
|
5
|
-
/* load priority: local font >
|
|
5
|
+
/* load priority: local font > self-hosting font > remote font */
|
|
6
6
|
src:
|
|
7
7
|
local('Inter'),
|
|
8
|
+
url('./fonts/Inter.woff2') format('woff2'),
|
|
8
9
|
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2')
|
|
9
|
-
format('woff2')
|
|
10
|
-
url('./fonts/Inter.woff2') format('woff2');
|
|
10
|
+
format('woff2');
|
|
11
11
|
/* load strategy: use default font as fallback */
|
|
12
12
|
font-display: swap;
|
|
13
13
|
}
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
font-family: 'Consolas';
|
|
17
17
|
src:
|
|
18
18
|
local('Consolas'),
|
|
19
|
+
url('./fonts/Consolas.woff2') format('woff2'),
|
|
19
20
|
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2')
|
|
20
|
-
format('woff2')
|
|
21
|
-
url('./fonts/Consolas.woff2') format('woff2');
|
|
21
|
+
format('woff2');
|
|
22
22
|
font-display: swap;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
font-family: 'Helvetica Neue';
|
|
27
27
|
src:
|
|
28
28
|
local('Helvetica Neue'),
|
|
29
|
+
url('./fonts/HelveticaNeue.woff2') format('woff2'),
|
|
29
30
|
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2')
|
|
30
|
-
format('woff2')
|
|
31
|
-
url('./fonts/HelveticaNeue.woff2') format('woff2');
|
|
31
|
+
format('woff2');
|
|
32
32
|
font-display: swap;
|
|
33
33
|
}
|
|
34
34
|
|
package/es/table/index.d.ts
CHANGED
|
@@ -38,8 +38,8 @@ declare const _default: (<RecordType extends AnyObject = AnyObject>(props: Table
|
|
|
38
38
|
SELECTION_ALL: "SELECT_ALL";
|
|
39
39
|
SELECTION_INVERT: "SELECT_INVERT";
|
|
40
40
|
SELECTION_NONE: "SELECT_NONE";
|
|
41
|
-
Column: <
|
|
42
|
-
ColumnGroup: <
|
|
41
|
+
Column: <RecordType extends import("antd/es/_util/type").AnyObject>(_: import("antd").TableColumnProps<RecordType>) => null;
|
|
42
|
+
ColumnGroup: <RecordType_1 extends import("antd/es/_util/type").AnyObject>(_: import("antd/es/table/ColumnGroup").ColumnGroupProps<RecordType_1>) => null;
|
|
43
43
|
Summary: typeof Summary;
|
|
44
44
|
useStyle: (prefixCls: string) => {
|
|
45
45
|
wrapSSR: (node: ReactNode) => ReactElement<any, string | React.JSXElementConstructor<any>>;
|
package/es/typography/Link.d.ts
CHANGED
|
@@ -3,5 +3,9 @@ import type { LinkProps as AntLinkProps } from 'antd/es/typography/Link';
|
|
|
3
3
|
export * from 'antd/es/typography/Link';
|
|
4
4
|
export interface LinkProps extends AntLinkProps {
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type CompoundedComponent = React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLElement>> & {
|
|
7
|
+
/** @internal */
|
|
8
|
+
__ANT_TYPOGRAPHY: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const Link: CompoundedComponent;
|
|
7
11
|
export default Link;
|
package/es/typography/Link.js
CHANGED
|
@@ -3,5 +3,9 @@ import type { ParagraphProps as AntParagraphProps } from 'antd/es/typography/Par
|
|
|
3
3
|
export * from 'antd/es/typography/Paragraph';
|
|
4
4
|
export interface ParagraphProps extends AntParagraphProps {
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type CompoundedComponent = React.ForwardRefExoticComponent<ParagraphProps & React.RefAttributes<HTMLElement>> & {
|
|
7
|
+
/** @internal */
|
|
8
|
+
__ANT_TYPOGRAPHY: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const Paragraph: CompoundedComponent;
|
|
7
11
|
export default Paragraph;
|
package/es/typography/Text.d.ts
CHANGED
|
@@ -3,5 +3,9 @@ import type { TextProps as AntTextProps } from 'antd/es/typography/Text';
|
|
|
3
3
|
export * from 'antd/es/typography/Text';
|
|
4
4
|
export interface TextProps extends AntTextProps {
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type CompoundedComponent = React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>> & {
|
|
7
|
+
/** @internal */
|
|
8
|
+
__ANT_TYPOGRAPHY: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const Text: CompoundedComponent;
|
|
7
11
|
export default Text;
|
package/es/typography/Text.js
CHANGED
package/es/typography/Title.d.ts
CHANGED
|
@@ -3,5 +3,9 @@ import type { TitleProps as AntTitleProps } from 'antd/es/typography/Title';
|
|
|
3
3
|
export * from 'antd/es/typography/Title';
|
|
4
4
|
export interface TitleProps extends AntTitleProps {
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type CompoundedComponent = React.ForwardRefExoticComponent<TitleProps & React.RefAttributes<HTMLElement>> & {
|
|
7
|
+
/** @internal */
|
|
8
|
+
__ANT_TYPOGRAPHY: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const Title: CompoundedComponent;
|
|
7
11
|
export default Title;
|
package/es/typography/Title.js
CHANGED
|
@@ -52,6 +52,7 @@ var children2Items = (children) => {
|
|
|
52
52
|
};
|
|
53
53
|
function convertItem(props, bordered) {
|
|
54
54
|
const { children: itemChildren, contentProps, ...restItemProps } = props;
|
|
55
|
+
const itemChildrenType = itemChildren == null ? void 0 : itemChildren.type;
|
|
55
56
|
const defaultEllipsis = {
|
|
56
57
|
tooltip: {
|
|
57
58
|
placement: "topLeft",
|
|
@@ -61,8 +62,8 @@ function convertItem(props, bordered) {
|
|
|
61
62
|
const { ellipsis = defaultEllipsis, editable, ...restContentProps } = contentProps || {};
|
|
62
63
|
return {
|
|
63
64
|
...restItemProps,
|
|
64
|
-
//
|
|
65
|
-
children: bordered ? itemChildren : /* @__PURE__ */ import_react.default.createElement(
|
|
65
|
+
// 无边框并且子元素非 Typography 时外面包一层 Typography.Text,以实现自动省略
|
|
66
|
+
children: bordered || (itemChildrenType == null ? void 0 : itemChildrenType.__ANT_TYPOGRAPHY) ? itemChildren : /* @__PURE__ */ import_react.default.createElement(
|
|
66
67
|
import_typography.default.Text,
|
|
67
68
|
{
|
|
68
69
|
...restContentProps,
|
|
@@ -66,8 +66,6 @@ var genDescriptionsStyle = (token) => {
|
|
|
66
66
|
[`${componentCls}-item-container`]: {
|
|
67
67
|
[`${componentCls}-item-content`]: {
|
|
68
68
|
paddingRight: 12,
|
|
69
|
-
// 为了保证内部的 Text ellipsis 生效
|
|
70
|
-
overflow: "hidden",
|
|
71
69
|
[`${typographyComponentCls}-edit-content`]: {
|
|
72
70
|
insetInlineStart: 0,
|
|
73
71
|
marginTop: 0,
|
package/lib/global.css
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
@font-face {
|
|
4
4
|
font-family: 'Inter';
|
|
5
|
-
/* load priority: local font >
|
|
5
|
+
/* load priority: local font > self-hosting font > remote font */
|
|
6
6
|
src:
|
|
7
7
|
local('Inter'),
|
|
8
|
+
url('./fonts/Inter.woff2') format('woff2'),
|
|
8
9
|
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2')
|
|
9
|
-
format('woff2')
|
|
10
|
-
url('./fonts/Inter.woff2') format('woff2');
|
|
10
|
+
format('woff2');
|
|
11
11
|
/* load strategy: use default font as fallback */
|
|
12
12
|
font-display: swap;
|
|
13
13
|
}
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
font-family: 'Consolas';
|
|
17
17
|
src:
|
|
18
18
|
local('Consolas'),
|
|
19
|
+
url('./fonts/Consolas.woff2') format('woff2'),
|
|
19
20
|
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2')
|
|
20
|
-
format('woff2')
|
|
21
|
-
url('./fonts/Consolas.woff2') format('woff2');
|
|
21
|
+
format('woff2');
|
|
22
22
|
font-display: swap;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
font-family: 'Helvetica Neue';
|
|
27
27
|
src:
|
|
28
28
|
local('Helvetica Neue'),
|
|
29
|
+
url('./fonts/HelveticaNeue.woff2') format('woff2'),
|
|
29
30
|
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2')
|
|
30
|
-
format('woff2')
|
|
31
|
-
url('./fonts/HelveticaNeue.woff2') format('woff2');
|
|
31
|
+
format('woff2');
|
|
32
32
|
font-display: swap;
|
|
33
33
|
}
|
|
34
34
|
|
package/lib/table/index.d.ts
CHANGED
|
@@ -38,8 +38,8 @@ declare const _default: (<RecordType extends AnyObject = AnyObject>(props: Table
|
|
|
38
38
|
SELECTION_ALL: "SELECT_ALL";
|
|
39
39
|
SELECTION_INVERT: "SELECT_INVERT";
|
|
40
40
|
SELECTION_NONE: "SELECT_NONE";
|
|
41
|
-
Column: <
|
|
42
|
-
ColumnGroup: <
|
|
41
|
+
Column: <RecordType extends import("antd/es/_util/type").AnyObject>(_: import("antd").TableColumnProps<RecordType>) => null;
|
|
42
|
+
ColumnGroup: <RecordType_1 extends import("antd/es/_util/type").AnyObject>(_: import("antd/es/table/ColumnGroup").ColumnGroupProps<RecordType_1>) => null;
|
|
43
43
|
Summary: typeof Summary;
|
|
44
44
|
useStyle: (prefixCls: string) => {
|
|
45
45
|
wrapSSR: (node: ReactNode) => ReactElement<any, string | React.JSXElementConstructor<any>>;
|
package/lib/typography/Link.d.ts
CHANGED
|
@@ -3,5 +3,9 @@ import type { LinkProps as AntLinkProps } from 'antd/es/typography/Link';
|
|
|
3
3
|
export * from 'antd/es/typography/Link';
|
|
4
4
|
export interface LinkProps extends AntLinkProps {
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type CompoundedComponent = React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLElement>> & {
|
|
7
|
+
/** @internal */
|
|
8
|
+
__ANT_TYPOGRAPHY: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const Link: CompoundedComponent;
|
|
7
11
|
export default Link;
|
package/lib/typography/Link.js
CHANGED
|
@@ -64,6 +64,7 @@ var Link = import_react.default.forwardRef(
|
|
|
64
64
|
if (process.env.NODE_ENV !== "production") {
|
|
65
65
|
Link.displayName = AntLink.displayName;
|
|
66
66
|
}
|
|
67
|
+
Link.__ANT_TYPOGRAPHY = true;
|
|
67
68
|
var Link_default = Link;
|
|
68
69
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
70
|
0 && (module.exports = {
|
|
@@ -3,5 +3,9 @@ import type { ParagraphProps as AntParagraphProps } from 'antd/es/typography/Par
|
|
|
3
3
|
export * from 'antd/es/typography/Paragraph';
|
|
4
4
|
export interface ParagraphProps extends AntParagraphProps {
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type CompoundedComponent = React.ForwardRefExoticComponent<ParagraphProps & React.RefAttributes<HTMLElement>> & {
|
|
7
|
+
/** @internal */
|
|
8
|
+
__ANT_TYPOGRAPHY: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const Paragraph: CompoundedComponent;
|
|
7
11
|
export default Paragraph;
|
|
@@ -64,6 +64,7 @@ var Paragraph = import_react.default.forwardRef(
|
|
|
64
64
|
if (process.env.NODE_ENV !== "production") {
|
|
65
65
|
Paragraph.displayName = AntParagraph.displayName;
|
|
66
66
|
}
|
|
67
|
+
Paragraph.__ANT_TYPOGRAPHY = true;
|
|
67
68
|
var Paragraph_default = Paragraph;
|
|
68
69
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
70
|
0 && (module.exports = {
|
package/lib/typography/Text.d.ts
CHANGED
|
@@ -3,5 +3,9 @@ import type { TextProps as AntTextProps } from 'antd/es/typography/Text';
|
|
|
3
3
|
export * from 'antd/es/typography/Text';
|
|
4
4
|
export interface TextProps extends AntTextProps {
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type CompoundedComponent = React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>> & {
|
|
7
|
+
/** @internal */
|
|
8
|
+
__ANT_TYPOGRAPHY: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const Text: CompoundedComponent;
|
|
7
11
|
export default Text;
|
package/lib/typography/Text.js
CHANGED
|
@@ -64,6 +64,7 @@ var Text = import_react.default.forwardRef(
|
|
|
64
64
|
if (process.env.NODE_ENV !== "production") {
|
|
65
65
|
Text.displayName = AntText.displayName;
|
|
66
66
|
}
|
|
67
|
+
Text.__ANT_TYPOGRAPHY = true;
|
|
67
68
|
var Text_default = Text;
|
|
68
69
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
70
|
0 && (module.exports = {
|
|
@@ -3,5 +3,9 @@ import type { TitleProps as AntTitleProps } from 'antd/es/typography/Title';
|
|
|
3
3
|
export * from 'antd/es/typography/Title';
|
|
4
4
|
export interface TitleProps extends AntTitleProps {
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type CompoundedComponent = React.ForwardRefExoticComponent<TitleProps & React.RefAttributes<HTMLElement>> & {
|
|
7
|
+
/** @internal */
|
|
8
|
+
__ANT_TYPOGRAPHY: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const Title: CompoundedComponent;
|
|
7
11
|
export default Title;
|
package/lib/typography/Title.js
CHANGED
|
@@ -64,6 +64,7 @@ var Title = import_react.default.forwardRef(
|
|
|
64
64
|
if (process.env.NODE_ENV !== "production") {
|
|
65
65
|
Title.displayName = AntTitle.displayName;
|
|
66
66
|
}
|
|
67
|
+
Title.__ANT_TYPOGRAPHY = true;
|
|
67
68
|
var Title_default = Title;
|
|
68
69
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
70
|
0 && (module.exports = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/design",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.16",
|
|
4
4
|
"description": "The Design System of OceanBase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
],
|
|
33
33
|
"sideEffects": [
|
|
34
34
|
"**/*.less",
|
|
35
|
-
"**/*.css"
|
|
36
|
-
"es/index.js"
|
|
35
|
+
"**/*.css"
|
|
37
36
|
],
|
|
38
37
|
"scripts": {
|
|
39
38
|
"build": "father build && cp src/style/reset.css dist/"
|
|
@@ -66,5 +65,5 @@
|
|
|
66
65
|
"react": ">=16.9.0",
|
|
67
66
|
"react-dom": ">=16.9.0"
|
|
68
67
|
},
|
|
69
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "42879f277f4c72e7254f121861f9e8b8a8e024ce"
|
|
70
69
|
}
|