@oceanbase/design 1.0.0-alpha.1 → 1.0.0-alpha.10
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 +2 -1
- package/dist/static/Inter-Medium.ea234620.woff2 +0 -0
- package/dist/static/Inter-Regular.34ba43c9.woff2 +0 -0
- package/dist/static/Inter-SemiBold.95439fb4.woff2 +0 -0
- package/es/_util/genComponentStyleHook.d.ts +21 -4
- package/es/_util/genComponentStyleHook.js +68 -20
- package/es/alert/index.d.ts +2 -2
- package/es/alert/index.js +22 -6
- package/es/alert/style/index.d.ts +2 -5
- package/es/alert/style/index.js +157 -67
- package/es/app/index.d.ts +8 -0
- package/es/app/index.js +43 -1
- package/es/app/style/index.d.ts +6 -0
- package/es/app/style/index.js +9 -0
- package/es/badge/index.js +15 -7
- package/es/badge/style/index.d.ts +2 -5
- package/es/badge/style/index.js +13 -18
- package/es/button/index.js +10 -4
- package/es/button/style/index.d.ts +4 -5
- package/es/button/style/index.js +40 -7
- package/es/card/index.d.ts +11 -0
- package/es/card/index.js +151 -9
- package/es/card/style/index.d.ts +2 -5
- package/es/card/style/index.js +83 -18
- package/es/checkbox/index.js +9 -2
- package/es/checkbox/style/index.d.ts +2 -5
- package/es/checkbox/style/index.js +14 -11
- package/es/config-provider/context.d.ts +11 -0
- package/es/config-provider/context.js +2 -1
- package/es/config-provider/index.d.ts +4 -3
- package/es/config-provider/index.js +92 -40
- package/es/descriptions/index.d.ts +10 -0
- package/es/descriptions/index.js +62 -5
- package/es/descriptions/style/index.d.ts +3 -6
- package/es/descriptions/style/index.js +70 -10
- package/es/drawer/index.js +10 -7
- package/es/drawer/style/index.d.ts +2 -5
- package/es/drawer/style/index.js +44 -17
- package/es/dropdown/dropdown-button.js +26 -6
- package/es/dropdown/style/index.d.ts +6 -0
- package/es/{_util/genStyle.js → dropdown/style/index.js} +14 -11
- package/es/empty/index.js +4 -3
- package/es/empty/style/index.d.ts +2 -5
- package/es/empty/style/index.js +10 -10
- package/es/fonts/Inter-Medium.woff2 +0 -0
- package/es/fonts/Inter-Regular.woff2 +0 -0
- package/es/fonts/Inter-SemiBold.woff2 +0 -0
- package/es/form/FormItem.d.ts +1 -0
- package/es/form/FormItem.js +26 -11
- package/es/form/index.js +9 -2
- package/es/form/style/index.d.ts +2 -5
- package/es/form/style/index.js +19 -8
- package/es/index.d.ts +4 -3
- package/es/index.js +1 -1
- package/es/input/Input.d.ts +2 -0
- package/es/input/Input.js +30 -7
- package/es/input/Password.js +24 -5
- package/es/input/Search.js +24 -5
- package/es/input/TextArea.js +24 -5
- package/es/input/style/index.d.ts +6 -0
- package/es/input/style/index.js +32 -0
- package/es/input-number/index.d.ts +2 -1
- package/es/input-number/index.js +18 -4
- package/es/input-number/style/index.d.ts +6 -0
- package/es/input-number/style/index.js +19 -0
- package/es/locale/en-US.js +4 -1
- package/es/locale/index.d.ts +2 -0
- package/es/locale/ja-JP.d.ts +3 -0
- package/es/locale/ja-JP.js +31 -0
- package/es/locale/zh-CN.js +4 -1
- package/es/locale/zh-TW.js +4 -1
- package/es/modal/Modal.js +29 -8
- package/es/modal/style/index.d.ts +2 -5
- package/es/modal/style/index.js +67 -26
- package/es/radio/index.js +9 -2
- package/es/radio/style/index.d.ts +2 -5
- package/es/radio/style/index.js +16 -10
- package/es/result/index.d.ts +2 -2
- package/es/result/index.js +14 -6
- package/es/result/style/index.d.ts +2 -5
- package/es/result/style/index.js +3 -6
- package/es/segmented/index.d.ts +1 -0
- package/es/segmented/index.js +24 -9
- package/es/segmented/style/index.d.ts +1 -4
- package/es/segmented/style/index.js +4 -6
- package/es/select/index.js +9 -2
- package/es/select/style/index.d.ts +2 -5
- package/es/select/style/index.js +6 -7
- package/es/slider/index.js +9 -2
- package/es/slider/style/index.d.ts +2 -5
- package/es/slider/style/index.js +11 -11
- package/es/space/index.js +9 -2
- package/es/space/style/index.d.ts +2 -5
- package/es/space/style/index.js +3 -6
- package/es/spin/index.js +9 -2
- package/es/spin/style/index.d.ts +2 -5
- package/es/spin/style/index.js +27 -27
- package/es/static-function/index.js +13 -4
- package/es/style/cssVariables.d.ts +25 -0
- package/es/style/cssVariables.js +48 -0
- package/es/style/cssVariablesMeta.d.ts +24 -0
- package/es/style/cssVariablesMeta.js +974 -0
- package/es/style/global.d.ts +8 -0
- package/es/style/global.js +121 -0
- package/es/style/reset.css +2 -1
- package/es/switch/index.js +9 -2
- package/es/switch/style/index.d.ts +2 -5
- package/es/switch/style/index.js +3 -6
- package/es/table/index.d.ts +1 -4
- package/es/table/index.js +67 -34
- package/es/table/style/index.d.ts +2 -5
- package/es/table/style/index.js +58 -36
- package/es/tabs/index.js +9 -2
- package/es/tabs/style/index.d.ts +2 -5
- package/es/tabs/style/index.js +10 -10
- package/es/tag/index.d.ts +1 -0
- package/es/tag/index.js +17 -4
- package/es/tag/style/index.d.ts +3 -8
- package/es/tag/style/index.js +39 -35
- package/es/theme/compact.d.ts +1 -1
- package/es/theme/compact.js +2 -6
- package/es/theme/dark.d.ts +1 -48
- package/es/theme/default.d.ts +48 -2
- package/es/theme/default.js +324 -62
- package/es/theme/index.d.ts +20 -57
- package/es/theme/interface.d.ts +130 -0
- package/es/theme/interface.js +4 -1
- package/es/theme/style/aliyun.less +41 -41
- package/es/theme/style/compact.less +166 -137
- package/es/theme/style/dark.less +58 -58
- package/es/theme/style/default.less +169 -140
- package/es/tooltip/index.js +4 -4
- package/es/tooltip/style/index.d.ts +2 -5
- package/es/tooltip/style/index.js +10 -13
- package/es/tree-select/index.js +9 -2
- package/es/tree-select/style/index.d.ts +2 -5
- package/es/tree-select/style/index.js +3 -6
- package/es/typography/Link.js +9 -2
- package/es/typography/Paragraph.js +9 -2
- package/es/typography/Text.d.ts +1 -0
- package/es/typography/Text.js +12 -4
- package/es/typography/Title.js +9 -2
- package/es/typography/hooks/useClassName.d.ts +1 -1
- package/es/typography/hooks/useClassName.js +2 -2
- package/es/typography/index.d.ts +12 -1
- package/es/typography/index.js +2 -1
- package/es/typography/style/index.d.ts +2 -5
- package/es/typography/style/index.js +36 -28
- package/lib/_util/genComponentStyleHook.d.ts +21 -4
- package/lib/_util/genComponentStyleHook.js +50 -31
- package/lib/alert/index.d.ts +2 -2
- package/lib/alert/index.js +20 -11
- package/lib/alert/style/index.d.ts +2 -5
- package/lib/alert/style/index.js +174 -79
- package/lib/app/index.d.ts +8 -0
- package/lib/app/index.js +36 -1
- package/lib/app/style/index.d.ts +6 -0
- package/lib/{_util/getWeakenBorderColor.js → app/style/index.js} +15 -10
- package/lib/badge/index.js +32 -23
- package/lib/badge/style/index.d.ts +2 -5
- package/lib/badge/style/index.js +14 -16
- package/lib/button/index.js +5 -4
- package/lib/button/style/index.d.ts +4 -5
- package/lib/button/style/index.js +48 -9
- package/lib/card/index.d.ts +11 -0
- package/lib/card/index.js +160 -12
- package/lib/card/style/index.d.ts +2 -5
- package/lib/card/style/index.js +132 -21
- package/lib/checkbox/index.js +4 -3
- package/lib/checkbox/style/index.d.ts +2 -5
- package/lib/checkbox/style/index.js +10 -8
- package/lib/config-provider/DefaultRenderEmpty.js +4 -3
- package/lib/config-provider/context.d.ts +11 -0
- package/lib/config-provider/index.d.ts +4 -3
- package/lib/config-provider/index.js +133 -30
- package/lib/descriptions/hooks/useItems.js +5 -4
- package/lib/descriptions/index.d.ts +10 -0
- package/lib/descriptions/index.js +54 -6
- package/lib/descriptions/style/index.d.ts +3 -6
- package/lib/descriptions/style/index.js +117 -7
- package/lib/drawer/index.js +46 -35
- package/lib/drawer/style/index.d.ts +2 -5
- package/lib/drawer/style/index.js +44 -14
- package/lib/dropdown/dropdown-button.js +26 -3
- package/lib/dropdown/index.js +2 -2
- package/lib/dropdown/style/index.d.ts +6 -0
- package/lib/dropdown/style/index.js +46 -0
- package/lib/empty/colored.js +413 -327
- package/lib/empty/database.js +267 -222
- package/lib/empty/default.js +16 -21
- package/lib/empty/guide.js +201 -184
- package/lib/empty/index.js +25 -20
- package/lib/empty/style/index.d.ts +2 -5
- package/lib/empty/style/index.js +9 -10
- package/lib/fonts/Inter-Medium.woff2 +0 -0
- package/lib/fonts/Inter-Regular.woff2 +0 -0
- package/lib/fonts/Inter-SemiBold.woff2 +0 -0
- package/lib/form/FormItem.d.ts +1 -0
- package/lib/form/FormItem.js +19 -8
- package/lib/form/index.js +8 -5
- package/lib/form/style/index.d.ts +2 -5
- package/lib/form/style/index.js +28 -7
- package/lib/grid/col.js +2 -1
- package/lib/grid/row.js +2 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.js +3 -1
- package/lib/input/Input.d.ts +2 -0
- package/lib/input/Input.js +37 -13
- package/lib/input/Password.js +22 -4
- package/lib/input/Search.js +32 -12
- package/lib/input/TextArea.js +22 -4
- package/lib/input/style/index.d.ts +6 -0
- package/lib/input/style/index.js +74 -0
- package/lib/input-number/index.d.ts +2 -1
- package/lib/input-number/index.js +19 -3
- package/lib/input-number/style/index.d.ts +6 -0
- package/lib/{_util/genStyle.js → input-number/style/index.js} +22 -17
- package/lib/list/index.js +3 -2
- package/lib/locale/en-US.js +3 -0
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/ja-JP.d.ts +3 -0
- package/lib/locale/ja-JP.js +63 -0
- package/lib/locale/zh-CN.js +3 -0
- package/lib/locale/zh-TW.js +3 -0
- package/lib/lottie/index.js +2 -1
- package/lib/modal/Modal.js +35 -11
- package/lib/modal/Progress.js +9 -5
- package/lib/modal/style/index.d.ts +2 -5
- package/lib/modal/style/index.js +81 -24
- package/lib/radio/index.js +4 -3
- package/lib/radio/style/index.d.ts +2 -5
- package/lib/radio/style/index.js +17 -8
- package/lib/result/403.js +156 -121
- package/lib/result/404.js +328 -267
- package/lib/result/500.js +295 -257
- package/lib/result/Error.js +127 -99
- package/lib/result/Processing.js +246 -213
- package/lib/result/Success.js +233 -169
- package/lib/result/Warning.js +611 -515
- package/lib/result/index.d.ts +2 -2
- package/lib/result/index.js +14 -13
- package/lib/result/style/index.d.ts +2 -5
- package/lib/result/style/index.js +3 -6
- package/lib/segmented/index.d.ts +1 -0
- package/lib/segmented/index.js +17 -6
- package/lib/segmented/style/index.d.ts +1 -4
- package/lib/segmented/style/index.js +4 -6
- package/lib/select/index.js +4 -3
- package/lib/select/style/index.d.ts +2 -5
- package/lib/select/style/index.js +7 -7
- package/lib/slider/index.js +4 -3
- package/lib/slider/style/index.d.ts +2 -5
- package/lib/slider/style/index.js +12 -11
- package/lib/space/index.js +3 -2
- package/lib/space/style/index.d.ts +2 -5
- package/lib/space/style/index.js +3 -6
- package/lib/spin/index.js +7 -6
- package/lib/spin/style/index.d.ts +2 -5
- package/lib/spin/style/index.js +26 -28
- package/lib/static-function/index.js +7 -1
- package/lib/style/cssVariables.d.ts +25 -0
- package/lib/style/cssVariables.js +261 -0
- package/lib/style/cssVariablesMeta.d.ts +24 -0
- package/lib/style/cssVariablesMeta.js +1059 -0
- package/lib/style/global.d.ts +8 -0
- package/lib/style/global.js +176 -0
- package/lib/style/reset.css +2 -1
- package/lib/switch/index.js +4 -3
- package/lib/switch/style/index.d.ts +2 -5
- package/lib/switch/style/index.js +3 -6
- package/lib/table/index.d.ts +1 -4
- package/lib/table/index.js +114 -68
- package/lib/table/style/index.d.ts +2 -5
- package/lib/table/style/index.js +68 -32
- package/lib/tabs/index.js +12 -7
- package/lib/tabs/style/index.d.ts +2 -5
- package/lib/tabs/style/index.js +12 -8
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/index.js +18 -8
- package/lib/tag/style/index.d.ts +3 -8
- package/lib/tag/style/index.js +45 -36
- package/lib/theme/compact.d.ts +1 -1
- package/lib/theme/compact.js +1 -5
- package/lib/theme/dark.d.ts +1 -48
- package/lib/theme/default.d.ts +48 -2
- package/lib/theme/default.js +403 -61
- package/lib/theme/index.d.ts +20 -57
- package/lib/theme/interface.d.ts +130 -0
- package/lib/theme/style/aliyun.less +41 -41
- package/lib/theme/style/compact.less +166 -137
- package/lib/theme/style/dark.less +58 -58
- package/lib/theme/style/default.less +169 -140
- package/lib/tooltip/MouseTooltip.js +43 -39
- package/lib/tooltip/ReactStickyMouseTooltip.js +5 -4
- package/lib/tooltip/index.js +17 -13
- package/lib/tooltip/style/index.d.ts +2 -5
- package/lib/tooltip/style/index.js +10 -13
- package/lib/tree-select/index.js +4 -3
- package/lib/tree-select/style/index.d.ts +2 -5
- package/lib/tree-select/style/index.js +3 -6
- package/lib/typography/Link.js +7 -6
- package/lib/typography/Paragraph.js +7 -6
- package/lib/typography/Text.d.ts +1 -0
- package/lib/typography/Text.js +9 -8
- package/lib/typography/Title.js +7 -6
- package/lib/typography/hooks/useClassName.d.ts +1 -1
- package/lib/typography/hooks/useClassName.js +3 -2
- package/lib/typography/index.d.ts +12 -1
- package/lib/typography/index.js +6 -5
- package/lib/typography/style/index.d.ts +2 -5
- package/lib/typography/style/index.js +34 -26
- package/package.json +10 -9
- package/dist/static/Inter.f6bcdfb6.woff2 +0 -0
- package/es/_util/genStyle.d.ts +0 -2
- package/es/_util/getWeakenBorderColor.d.ts +0 -1
- package/es/_util/getWeakenBorderColor.js +0 -4
- package/es/fonts/Inter.woff2 +0 -0
- package/es/global.css +0 -48
- package/lib/_util/genStyle.d.ts +0 -2
- package/lib/_util/getWeakenBorderColor.d.ts +0 -1
- package/lib/fonts/Inter.woff2 +0 -0
- package/lib/global.css +0 -48
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ConfigProvider as AntConfigProvider } from 'antd';
|
|
3
3
|
import type { ConfigProviderProps as AntConfigProviderProps, ConfigConsumerProps as AntConfigConsumerProps, ThemeConfig as AntThemeConfig } from 'antd/es/config-provider';
|
|
4
|
-
import type { ComponentStyleConfig, CardConfig as AntCardConfig } from 'antd/es/config-provider/context';
|
|
4
|
+
import type { ComponentStyleConfig, CardConfig as AntCardConfig, TableConfig as AntTableConfig } from 'antd/es/config-provider/context';
|
|
5
5
|
import type { AppProps } from 'antd/es/app';
|
|
6
6
|
import type { PaginationConfig } from 'antd/es/pagination';
|
|
7
7
|
import type { SpinIndicator } from 'antd/es/spin';
|
|
@@ -14,8 +14,9 @@ export * from 'antd/es/config-provider/SizeContext';
|
|
|
14
14
|
export * from 'antd/es/config-provider/DisabledContext';
|
|
15
15
|
export * from 'antd/es/config-provider';
|
|
16
16
|
export interface ThemeConfig extends AntThemeConfig {
|
|
17
|
-
isDark?: boolean;
|
|
18
17
|
isAliyun?: boolean;
|
|
18
|
+
isDark?: boolean;
|
|
19
|
+
isCompact?: boolean;
|
|
19
20
|
}
|
|
20
21
|
export type CardConfig = AntCardConfig & {
|
|
21
22
|
divided?: boolean;
|
|
@@ -23,7 +24,7 @@ export type CardConfig = AntCardConfig & {
|
|
|
23
24
|
export type SpinConfig = ComponentStyleConfig & {
|
|
24
25
|
indicator?: SpinIndicator;
|
|
25
26
|
};
|
|
26
|
-
export type TableConfig =
|
|
27
|
+
export type TableConfig = AntTableConfig & {
|
|
27
28
|
selectionColumnWidth?: number;
|
|
28
29
|
};
|
|
29
30
|
export interface ConfigConsumerProps extends AntConfigConsumerProps {
|
|
@@ -40,21 +40,29 @@ var import_StyleContext = __toESM(require("@ant-design/cssinjs/es/StyleContext")
|
|
|
40
40
|
var import_icons = require("@oceanbase/icons");
|
|
41
41
|
var import_aliyun_theme = __toESM(require("@oceanbase/aliyun-theme"));
|
|
42
42
|
var import_lodash = require("lodash");
|
|
43
|
+
var import_app = __toESM(require("../app"));
|
|
43
44
|
var import_static_function = __toESM(require("../static-function"));
|
|
44
45
|
var import_theme = __toESM(require("../theme"));
|
|
45
46
|
var import_default = __toESM(require("../theme/default"));
|
|
46
47
|
var import_dark = __toESM(require("../theme/dark"));
|
|
48
|
+
var import_compact = __toESM(require("../theme/compact"));
|
|
47
49
|
var import_DefaultRenderEmpty = __toESM(require("./DefaultRenderEmpty"));
|
|
50
|
+
var import_global = __toESM(require("../style/global"));
|
|
51
|
+
var import_cssVariables = __toESM(require("../style/cssVariables"));
|
|
48
52
|
__reExport(config_provider_exports, require("./navigate"), module.exports);
|
|
49
53
|
__reExport(config_provider_exports, require("antd/es/config-provider/context"), module.exports);
|
|
50
54
|
__reExport(config_provider_exports, require("antd/es/config-provider/SizeContext"), module.exports);
|
|
51
55
|
__reExport(config_provider_exports, require("antd/es/config-provider/DisabledContext"), module.exports);
|
|
52
56
|
__reExport(config_provider_exports, require("antd/es/config-provider"), module.exports);
|
|
57
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
53
58
|
var ExtendedConfigContext = import_react.default.createContext({
|
|
54
59
|
navigate: void 0,
|
|
55
60
|
hideOnSinglePage: false,
|
|
56
61
|
injectStaticFunction: true
|
|
57
62
|
});
|
|
63
|
+
var getLocaleTokenValue = (mergedThemeToken, locale, tokenKey, tokenValue, tokenValueEn) => {
|
|
64
|
+
return tokenValue !== mergedThemeToken[tokenKey] ? { [tokenKey]: tokenValue } : ["en", "en-gb"].includes(locale.locale) ? { [tokenKey]: tokenValueEn } : {};
|
|
65
|
+
};
|
|
58
66
|
var ConfigProvider = ({
|
|
59
67
|
children,
|
|
60
68
|
theme,
|
|
@@ -71,24 +79,57 @@ var ConfigProvider = ({
|
|
|
71
79
|
appProps,
|
|
72
80
|
...restProps
|
|
73
81
|
}) => {
|
|
74
|
-
var _a, _b;
|
|
82
|
+
var _a, _b, _c, _d, _e;
|
|
75
83
|
const parentContext = import_react.default.useContext(import_antd.ConfigProvider.ConfigContext);
|
|
76
84
|
const parentExtendedContext = import_react.default.useContext(ExtendedConfigContext);
|
|
77
|
-
const { isDark,
|
|
78
|
-
const
|
|
85
|
+
const { isAliyun, isDark, isCompact } = (0, import_lodash.merge)({}, parentContext.theme, theme);
|
|
86
|
+
const aliyunThemeConfig = isAliyun ? import_aliyun_theme.default : void 0;
|
|
87
|
+
const darkThemeConfig = isDark && !isAliyun ? isCompact ? import_dark.default : {
|
|
88
|
+
...import_dark.default,
|
|
89
|
+
token: {
|
|
90
|
+
...import_dark.default.token,
|
|
91
|
+
...Object.fromEntries(
|
|
92
|
+
Object.entries(import_default.default.token).filter(
|
|
93
|
+
([key]) => {
|
|
94
|
+
var _a2;
|
|
95
|
+
return !((_a2 = key == null ? void 0 : key.toLowerCase()) == null ? void 0 : _a2.startsWith("color"));
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
} : void 0;
|
|
101
|
+
const compactThemeConfig = isCompact && !isAliyun ? isDark ? import_compact.default : {
|
|
102
|
+
...import_compact.default,
|
|
103
|
+
token: {
|
|
104
|
+
...import_compact.default.token,
|
|
105
|
+
...Object.fromEntries(
|
|
106
|
+
Object.entries(import_default.default.token).filter(
|
|
107
|
+
([key]) => {
|
|
108
|
+
var _a2;
|
|
109
|
+
return ((_a2 = key == null ? void 0 : key.toLowerCase()) == null ? void 0 : _a2.startsWith("color")) && !["colorBgBase", "colorTextBase"].includes(key);
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
} : void 0;
|
|
79
115
|
const mergedTheme = (0, import_lodash.merge)(
|
|
80
116
|
{},
|
|
81
|
-
|
|
117
|
+
isAliyun ? {} : isDark || isCompact ? import_theme.default.defaultSeed : import_default.default,
|
|
82
118
|
parentContext.theme,
|
|
83
|
-
|
|
119
|
+
aliyunThemeConfig,
|
|
120
|
+
darkThemeConfig,
|
|
121
|
+
compactThemeConfig,
|
|
84
122
|
theme
|
|
85
123
|
);
|
|
86
124
|
const { token } = import_theme.default.useToken();
|
|
87
125
|
const fontFamily = ((_a = mergedTheme.token) == null ? void 0 : _a.fontFamily) || token.fontFamily;
|
|
126
|
+
const fontWeightWeak = ((_b = mergedTheme.token) == null ? void 0 : _b.fontWeightWeak) || token.fontWeightWeak;
|
|
127
|
+
const fontWeight = ((_c = mergedTheme.token) == null ? void 0 : _c.fontWeight) || token.fontWeight;
|
|
128
|
+
const fontWeightStrong = ((_d = mergedTheme.token) == null ? void 0 : _d.fontWeightStrong) || token.fontWeightStrong;
|
|
88
129
|
const parentStyleContext = import_react.default.useContext(import_StyleContext.default);
|
|
89
130
|
const mergedStyleProviderProps = (0, import_lodash.merge)({}, parentStyleContext, styleProviderProps);
|
|
90
131
|
const mergedLocale = (0, import_lodash.merge)({}, parentContext.locale, locale);
|
|
91
|
-
return /* @__PURE__ */
|
|
132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
92
133
|
import_antd.ConfigProvider,
|
|
93
134
|
{
|
|
94
135
|
locale: mergedLocale,
|
|
@@ -96,7 +137,18 @@ var ConfigProvider = ({
|
|
|
96
137
|
collapse: (0, import_lodash.merge)(
|
|
97
138
|
{},
|
|
98
139
|
{
|
|
99
|
-
expandIcon: ({ isActive }) =>
|
|
140
|
+
expandIcon: ({ isActive }) => {
|
|
141
|
+
var _a2, _b2;
|
|
142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
143
|
+
import_icons.CaretRightOutlined,
|
|
144
|
+
{
|
|
145
|
+
rotate: isActive ? 90 : 0,
|
|
146
|
+
style: {
|
|
147
|
+
color: ((_a2 = mergedTheme.token) == null ? void 0 : _a2.colorIcon) || ((_b2 = mergedTheme.token) == null ? void 0 : _b2.colorTextSecondary)
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
}
|
|
100
152
|
},
|
|
101
153
|
parentContext.collapse,
|
|
102
154
|
collapse
|
|
@@ -110,34 +162,85 @@ var ConfigProvider = ({
|
|
|
110
162
|
form
|
|
111
163
|
),
|
|
112
164
|
spin: (0, import_lodash.merge)({}, parentContext.spin, spin),
|
|
113
|
-
table: (0, import_lodash.merge)(
|
|
165
|
+
table: (0, import_lodash.merge)(
|
|
166
|
+
{},
|
|
167
|
+
{
|
|
168
|
+
expandable: {
|
|
169
|
+
expandIcon: ({ expandable, expanded, onExpand, record }) => {
|
|
170
|
+
var _a2, _b2;
|
|
171
|
+
return expandable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
172
|
+
import_icons.CaretRightOutlined,
|
|
173
|
+
{
|
|
174
|
+
onClick: (e) => onExpand(record, e),
|
|
175
|
+
style: {
|
|
176
|
+
// marginRight: mergedTheme.token?.marginXS || 8,
|
|
177
|
+
transition: `transform 0.2s`,
|
|
178
|
+
transform: expanded ? "rotate(90deg)" : void 0,
|
|
179
|
+
color: ((_a2 = mergedTheme.token) == null ? void 0 : _a2.colorIcon) || ((_b2 = mergedTheme.token) == null ? void 0 : _b2.colorTextSecondary)
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
parentContext.table,
|
|
187
|
+
table
|
|
188
|
+
),
|
|
114
189
|
tabs: (0, import_lodash.merge)({}, parentContext.tabs, tabs),
|
|
115
190
|
theme: (0, import_lodash.merge)({}, mergedTheme, {
|
|
116
|
-
token:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
191
|
+
token: {
|
|
192
|
+
...getLocaleTokenValue(
|
|
193
|
+
mergedTheme.token || {},
|
|
194
|
+
mergedLocale,
|
|
195
|
+
"fontFamily",
|
|
196
|
+
fontFamily,
|
|
197
|
+
import_default.fontFamilyEn
|
|
198
|
+
),
|
|
199
|
+
...getLocaleTokenValue(
|
|
200
|
+
mergedTheme.token || {},
|
|
201
|
+
mergedLocale,
|
|
202
|
+
"fontWeightWeak",
|
|
203
|
+
fontWeightWeak,
|
|
204
|
+
import_default.fontWeightWeakEn
|
|
205
|
+
),
|
|
206
|
+
...getLocaleTokenValue(
|
|
207
|
+
mergedTheme.token || {},
|
|
208
|
+
mergedLocale,
|
|
209
|
+
"fontWeight",
|
|
210
|
+
fontWeight,
|
|
211
|
+
import_default.fontWeightEn
|
|
212
|
+
),
|
|
213
|
+
...getLocaleTokenValue(
|
|
214
|
+
mergedTheme.token || {},
|
|
215
|
+
mergedLocale,
|
|
216
|
+
"fontWeightStrong",
|
|
217
|
+
fontWeightStrong,
|
|
218
|
+
import_default.fontWeightStrongEn
|
|
123
219
|
)
|
|
124
|
-
|
|
220
|
+
}
|
|
125
221
|
}),
|
|
126
|
-
renderEmpty: parentContext.renderEmpty || ((componentName) => /* @__PURE__ */
|
|
127
|
-
...restProps
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
222
|
+
renderEmpty: parentContext.renderEmpty || ((componentName) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DefaultRenderEmpty.default, { componentName })),
|
|
223
|
+
...restProps,
|
|
224
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
225
|
+
ExtendedConfigContext.Provider,
|
|
226
|
+
{
|
|
227
|
+
value: {
|
|
228
|
+
navigate: navigate === void 0 ? parentExtendedContext.navigate : navigate,
|
|
229
|
+
hideOnSinglePage: ((_e = parentContext.pagination) == null ? void 0 : _e.showSizeChanger) ? false : hideOnSinglePage !== void 0 ? hideOnSinglePage : parentExtendedContext.hideOnSinglePage,
|
|
230
|
+
// inject static function to outermost ConfigProvider only
|
|
231
|
+
injectStaticFunction: false
|
|
232
|
+
},
|
|
233
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_cssinjs.StyleProvider, { ...mergedStyleProviderProps, children: [
|
|
234
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_cssVariables.default, {}),
|
|
235
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_global.default, { prefixCls: restProps.prefixCls }),
|
|
236
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_app.default, { component: false, ...appProps, children: [
|
|
237
|
+
children,
|
|
238
|
+
parentExtendedContext.injectStaticFunction && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_static_function.default, {})
|
|
239
|
+
] })
|
|
240
|
+
] })
|
|
137
241
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
)
|
|
242
|
+
)
|
|
243
|
+
}
|
|
141
244
|
);
|
|
142
245
|
};
|
|
143
246
|
ConfigProvider.ConfigContext = import_antd.ConfigProvider.ConfigContext;
|
|
@@ -37,6 +37,7 @@ var import_warning = __toESM(require("antd/es/_util/warning"));
|
|
|
37
37
|
var import_toArray = __toESM(require("rc-util/lib/Children/toArray"));
|
|
38
38
|
var import_typography = __toESM(require("../../typography"));
|
|
39
39
|
var import_getEllipsisConfig = require("../../_util/getEllipsisConfig");
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
41
|
var children2Items = (children) => {
|
|
41
42
|
const childrenItems = (0, import_toArray.default)(children).map((node) => {
|
|
42
43
|
if (import_react.default.isValidElement(node)) {
|
|
@@ -63,7 +64,7 @@ function convertItem(props, bordered) {
|
|
|
63
64
|
return {
|
|
64
65
|
...restItemProps,
|
|
65
66
|
// 无边框并且子元素非 Typography 时外面包一层 Typography.Text,以实现自动省略
|
|
66
|
-
children: bordered || (itemChildrenType == null ? void 0 : itemChildrenType.__ANT_TYPOGRAPHY) ? itemChildren : /* @__PURE__ */
|
|
67
|
+
children: bordered || (itemChildrenType == null ? void 0 : itemChildrenType.__ANT_TYPOGRAPHY) ? itemChildren : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
68
|
import_typography.default.Text,
|
|
68
69
|
{
|
|
69
70
|
...restContentProps,
|
|
@@ -76,9 +77,9 @@ function convertItem(props, bordered) {
|
|
|
76
77
|
} : editable === true ? {
|
|
77
78
|
autoSize: false
|
|
78
79
|
} : editable
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
),
|
|
81
|
+
children: itemChildren
|
|
82
|
+
}
|
|
82
83
|
)
|
|
83
84
|
};
|
|
84
85
|
}
|
|
@@ -9,6 +9,16 @@ export interface DescriptionsItemType extends AntDescriptionsItemType {
|
|
|
9
9
|
}
|
|
10
10
|
export interface DescriptionsProps extends AntDescriptionsProps {
|
|
11
11
|
items?: DescriptionsItemType[];
|
|
12
|
+
/** Whether the descriptions is collapsible */
|
|
13
|
+
collapsible?: boolean;
|
|
14
|
+
/** Whether the descriptions is collapsed (controlled mode) */
|
|
15
|
+
collapsed?: boolean;
|
|
16
|
+
/** Default collapsed state (uncontrolled mode) */
|
|
17
|
+
defaultCollapsed?: boolean;
|
|
18
|
+
/** Callback when collapsed state changes */
|
|
19
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
20
|
+
/** Content alignment, when set to 'left', all content values will be aligned to the left based on the longest label width */
|
|
21
|
+
contentAlign?: 'left';
|
|
12
22
|
}
|
|
13
23
|
type CompoundedComponent = React.FC<DescriptionsProps> & {
|
|
14
24
|
Item: typeof DescriptionsItem;
|
|
@@ -35,39 +35,87 @@ __export(descriptions_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(descriptions_exports);
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
|
-
var import_react =
|
|
38
|
+
var import_react = require("react");
|
|
39
|
+
var import_icons = require("@oceanbase/icons");
|
|
39
40
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
41
|
+
var import_theme = __toESM(require("../theme"));
|
|
40
42
|
var import_Item = __toESM(require("./Item"));
|
|
41
43
|
var import_useItems = __toESM(require("./hooks/useItems"));
|
|
42
44
|
var import_style = __toESM(require("./style"));
|
|
43
45
|
__reExport(descriptions_exports, require("antd/es/descriptions"), module.exports);
|
|
46
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
47
|
var Descriptions = ({
|
|
45
48
|
children,
|
|
46
49
|
bordered,
|
|
47
50
|
layout = "horizontal",
|
|
48
51
|
colon = layout === "vertical" ? false : void 0,
|
|
49
52
|
items,
|
|
53
|
+
title,
|
|
50
54
|
prefixCls: customizePrefixCls,
|
|
51
55
|
className,
|
|
56
|
+
column = 3,
|
|
57
|
+
collapsible,
|
|
58
|
+
collapsed: outerCollapsed,
|
|
59
|
+
defaultCollapsed,
|
|
60
|
+
onCollapse,
|
|
61
|
+
contentAlign,
|
|
52
62
|
...restProps
|
|
53
63
|
}) => {
|
|
54
64
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
65
|
+
const { token } = import_theme.default.useToken();
|
|
55
66
|
const prefixCls = getPrefixCls("descriptions", customizePrefixCls);
|
|
56
67
|
const typographyPrefixCls = getPrefixCls("typography", customizePrefixCls);
|
|
57
|
-
const
|
|
68
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls, typographyPrefixCls);
|
|
69
|
+
const [internalCollapsed, setInternalCollapsed] = (0, import_react.useState)(defaultCollapsed ?? false);
|
|
70
|
+
const collapsed = outerCollapsed !== void 0 ? outerCollapsed : internalCollapsed;
|
|
71
|
+
const handleCollapse = (0, import_react.useCallback)(() => {
|
|
72
|
+
const newCollapsed = !collapsed;
|
|
73
|
+
if (outerCollapsed === void 0) {
|
|
74
|
+
setInternalCollapsed(newCollapsed);
|
|
75
|
+
}
|
|
76
|
+
onCollapse == null ? void 0 : onCollapse(newCollapsed);
|
|
77
|
+
}, [collapsed, outerCollapsed, onCollapse]);
|
|
78
|
+
const newItems = (0, import_useItems.default)(items, children, bordered);
|
|
79
|
+
const descriptionsTitle = (0, import_react.useMemo)(() => {
|
|
80
|
+
if (!collapsible) {
|
|
81
|
+
return title;
|
|
82
|
+
}
|
|
83
|
+
if (!title) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-title-wrapper`, onClick: handleCollapse, children: [
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
+
import_icons.CaretRightFilled,
|
|
89
|
+
{
|
|
90
|
+
className: `${prefixCls}-collapsible-icon`,
|
|
91
|
+
style: {
|
|
92
|
+
transition: `transform ${token.motionDurationMid}`,
|
|
93
|
+
transform: collapsed ? void 0 : "rotate(90deg)",
|
|
94
|
+
color: token.colorIcon,
|
|
95
|
+
marginRight: token.marginXS
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: title })
|
|
100
|
+
] });
|
|
101
|
+
}, [collapsible, title, collapsed, prefixCls, token, handleCollapse]);
|
|
58
102
|
const descriptionsCls = (0, import_classnames.default)(className, {
|
|
59
103
|
[`${prefixCls}-vertical`]: layout === "vertical",
|
|
60
|
-
[`${prefixCls}-horizontal`]: layout === "horizontal"
|
|
104
|
+
[`${prefixCls}-horizontal`]: layout === "horizontal",
|
|
105
|
+
[`${prefixCls}-collapsible`]: collapsible,
|
|
106
|
+
[`${prefixCls}-collapsed`]: collapsible && collapsed,
|
|
107
|
+
[`${prefixCls}-content-align-left`]: contentAlign === "left"
|
|
61
108
|
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
109
|
+
return wrapCSSVar(
|
|
110
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
111
|
import_antd.Descriptions,
|
|
66
112
|
{
|
|
67
113
|
layout,
|
|
68
114
|
colon,
|
|
69
115
|
bordered,
|
|
116
|
+
column,
|
|
70
117
|
items: newItems,
|
|
118
|
+
title: descriptionsTitle,
|
|
71
119
|
prefixCls: customizePrefixCls,
|
|
72
120
|
className: descriptionsCls,
|
|
73
121
|
...restProps
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { CSSObject } from '@ant-design/cssinjs';
|
|
3
|
-
import type { FullToken, GenerateStyle } from '
|
|
3
|
+
import type { FullToken, GenerateStyle } from '../../theme/interface';
|
|
4
4
|
import type { DescriptionsProps } from '..';
|
|
5
|
-
export type DescriptionsToken = FullToken<'
|
|
5
|
+
export type DescriptionsToken = FullToken<'Descriptions'> & {
|
|
6
6
|
typographyPrefixCls: string;
|
|
7
7
|
typographyComponentCls: string;
|
|
8
8
|
};
|
|
9
9
|
export declare const genVerticalStyle: (size: DescriptionsProps['size'], token: Partial<DescriptionsToken>) => CSSObject;
|
|
10
10
|
export declare const genDescriptionsStyle: GenerateStyle<DescriptionsToken>;
|
|
11
|
-
declare const _default: (prefixCls: string, typographyPrefixCls: string) =>
|
|
12
|
-
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
13
|
-
hashId: string;
|
|
14
|
-
};
|
|
11
|
+
declare const _default: (prefixCls: string, typographyPrefixCls: string) => readonly [(node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, string, string];
|
|
15
12
|
export default _default;
|
|
@@ -29,7 +29,7 @@ var genVerticalStyle = (size, token) => {
|
|
|
29
29
|
const { componentCls } = token;
|
|
30
30
|
const paddingMap = {
|
|
31
31
|
default: {
|
|
32
|
-
paddingIn: token.
|
|
32
|
+
paddingIn: token.paddingXXS,
|
|
33
33
|
paddingOut: token.paddingLG
|
|
34
34
|
},
|
|
35
35
|
middle: {
|
|
@@ -54,18 +54,44 @@ var genVerticalStyle = (size, token) => {
|
|
|
54
54
|
[`& > th, & > td`]: {
|
|
55
55
|
paddingBottom: paddingConfig.paddingOut
|
|
56
56
|
}
|
|
57
|
+
},
|
|
58
|
+
[`${componentCls}-item`]: {
|
|
59
|
+
[`${componentCls}-item-label`]: {
|
|
60
|
+
fontSize: token.fontSizeSM
|
|
61
|
+
}
|
|
57
62
|
}
|
|
58
63
|
}
|
|
59
64
|
};
|
|
60
65
|
};
|
|
61
66
|
var genDescriptionsStyle = (token) => {
|
|
62
|
-
const { componentCls, typographyComponentCls } = token;
|
|
67
|
+
const { componentCls, typographyComponentCls, calc } = token;
|
|
63
68
|
return {
|
|
64
69
|
[`${componentCls}`]: {
|
|
70
|
+
[`${componentCls}-header`]: {
|
|
71
|
+
marginBottom: token.margin
|
|
72
|
+
},
|
|
73
|
+
// collapsible title style
|
|
74
|
+
[`${componentCls}-title-wrapper`]: {
|
|
75
|
+
cursor: "pointer",
|
|
76
|
+
display: "flex",
|
|
77
|
+
alignItems: "center",
|
|
78
|
+
userSelect: "none",
|
|
79
|
+
[`${componentCls}-collapsible-icon`]: {
|
|
80
|
+
fontSize: token.fontSizeLG
|
|
81
|
+
}
|
|
82
|
+
},
|
|
65
83
|
...genVerticalStyle("default", token),
|
|
84
|
+
[`${componentCls}-row > th, ${componentCls}-row > td`]: {
|
|
85
|
+
paddingRight: token.paddingLG
|
|
86
|
+
},
|
|
87
|
+
[`${componentCls}-item-label`]: {
|
|
88
|
+
fontWeight: token.fontWeightWeak,
|
|
89
|
+
[`&${componentCls}-item-no-colon::after`]: {
|
|
90
|
+
display: "none"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
66
93
|
[`${componentCls}-item-container`]: {
|
|
67
94
|
[`${componentCls}-item-content`]: {
|
|
68
|
-
paddingRight: 12,
|
|
69
95
|
[`${typographyComponentCls}-edit-content`]: {
|
|
70
96
|
insetInlineStart: 0,
|
|
71
97
|
marginTop: 0,
|
|
@@ -75,15 +101,99 @@ var genDescriptionsStyle = (token) => {
|
|
|
75
101
|
},
|
|
76
102
|
[`${componentCls}-item-container:has(${`${typographyComponentCls}-edit-content`})`]: {
|
|
77
103
|
alignItems: "center",
|
|
78
|
-
height: token.fontSize
|
|
104
|
+
height: calc(token.fontSize).mul(token.lineHeight).equal()
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
[`${componentCls}${componentCls}-middle`]: {
|
|
108
|
+
[`${componentCls}-header`]: {
|
|
109
|
+
marginBottom: token.marginSM
|
|
110
|
+
},
|
|
111
|
+
...genVerticalStyle("middle", token)
|
|
112
|
+
},
|
|
113
|
+
[`${componentCls}${componentCls}-small`]: {
|
|
114
|
+
[`${componentCls}-header`]: {
|
|
115
|
+
marginBottom: token.marginXS
|
|
116
|
+
},
|
|
117
|
+
...genVerticalStyle("small", token)
|
|
118
|
+
},
|
|
119
|
+
// collapsed state
|
|
120
|
+
[`${componentCls}${componentCls}-collapsed`]: {
|
|
121
|
+
[`${componentCls}-view`]: {
|
|
122
|
+
display: "none"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
// contentAlign="left": label column auto width based on longest label
|
|
126
|
+
// For non-bordered mode: use CSS Grid to make label and content align across rows
|
|
127
|
+
[`${componentCls}${componentCls}-content-align-left:not(${componentCls}-bordered)`]: {
|
|
128
|
+
[`${componentCls}-view`]: {
|
|
129
|
+
display: "block"
|
|
130
|
+
},
|
|
131
|
+
// Make table, tbody, tr, td all transparent to grid layout
|
|
132
|
+
[`${componentCls}-view > table`]: {
|
|
133
|
+
display: "grid",
|
|
134
|
+
gridTemplateColumns: "auto 1fr"
|
|
135
|
+
},
|
|
136
|
+
[`${componentCls}-view > table > tbody`]: {
|
|
137
|
+
display: "contents"
|
|
138
|
+
},
|
|
139
|
+
[`${componentCls}-row`]: {
|
|
140
|
+
display: "contents"
|
|
141
|
+
},
|
|
142
|
+
[`${componentCls}-row > td${componentCls}-item`]: {
|
|
143
|
+
display: "contents"
|
|
144
|
+
},
|
|
145
|
+
[`${componentCls}-item-container`]: {
|
|
146
|
+
display: "contents"
|
|
147
|
+
},
|
|
148
|
+
[`${componentCls}-item-label`]: {
|
|
149
|
+
whiteSpace: "nowrap",
|
|
150
|
+
paddingBottom: token.padding,
|
|
151
|
+
paddingInlineEnd: token.paddingLG
|
|
152
|
+
},
|
|
153
|
+
[`${componentCls}-item-content`]: {
|
|
154
|
+
paddingBottom: token.padding
|
|
155
|
+
},
|
|
156
|
+
[`&${componentCls}-middle`]: {
|
|
157
|
+
[`${componentCls}-item-label`]: {
|
|
158
|
+
paddingBottom: token.paddingSM,
|
|
159
|
+
paddingInlineEnd: token.paddingLG
|
|
160
|
+
},
|
|
161
|
+
[`${componentCls}-item-content`]: {
|
|
162
|
+
paddingBottom: token.paddingSM
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
[`&${componentCls}-small`]: {
|
|
166
|
+
[`${componentCls}-title`]: {
|
|
167
|
+
fontSize: token.fontSize
|
|
168
|
+
},
|
|
169
|
+
[`${componentCls}-item-label`]: {
|
|
170
|
+
paddingBottom: token.paddingXS,
|
|
171
|
+
paddingInlineEnd: token.paddingLG
|
|
172
|
+
},
|
|
173
|
+
[`${componentCls}-item-content`]: {
|
|
174
|
+
paddingBottom: token.paddingXS
|
|
175
|
+
}
|
|
79
176
|
}
|
|
80
177
|
},
|
|
81
|
-
|
|
82
|
-
[`${componentCls}${componentCls}-
|
|
178
|
+
// For bordered mode: label and content are in separate th and td
|
|
179
|
+
[`${componentCls}${componentCls}-content-align-left${componentCls}-bordered`]: {
|
|
180
|
+
[`${componentCls}-view > table`]: {
|
|
181
|
+
tableLayout: "auto"
|
|
182
|
+
},
|
|
183
|
+
[`${componentCls}-row`]: {
|
|
184
|
+
[`& > th`]: {
|
|
185
|
+
whiteSpace: "nowrap",
|
|
186
|
+
width: 1
|
|
187
|
+
},
|
|
188
|
+
[`& > td`]: {
|
|
189
|
+
width: "100%"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
83
193
|
};
|
|
84
194
|
};
|
|
85
195
|
var style_default = (prefixCls, typographyPrefixCls) => {
|
|
86
|
-
const useStyle = (0, import_genComponentStyleHook.
|
|
196
|
+
const useStyle = (0, import_genComponentStyleHook.genStyleHooks)("Descriptions", (token) => {
|
|
87
197
|
return [
|
|
88
198
|
genDescriptionsStyle({
|
|
89
199
|
...token,
|