@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
package/lib/tree-select/index.js
CHANGED
|
@@ -41,6 +41,7 @@ var import_config_provider = __toESM(require("../config-provider"));
|
|
|
41
41
|
var import_en_US = __toESM(require("../locale/en-US"));
|
|
42
42
|
var import_style = __toESM(require("./style"));
|
|
43
43
|
__reExport(tree_select_exports, require("antd/es/tree-select"), module.exports);
|
|
44
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
45
|
var InternalTreeSelect = import_react.default.forwardRef(
|
|
45
46
|
({ locale: customLocale, prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
46
47
|
const { locale: contextLocale, getPrefixCls } = (0, import_react.useContext)(
|
|
@@ -54,10 +55,10 @@ var InternalTreeSelect = import_react.default.forwardRef(
|
|
|
54
55
|
...customLocale
|
|
55
56
|
};
|
|
56
57
|
const prefixCls = getPrefixCls("tree-select", customizePrefixCls);
|
|
57
|
-
const
|
|
58
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
58
59
|
const treeSelectCls = (0, import_classnames.default)(className);
|
|
59
|
-
return
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
return wrapCSSVar(
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
61
62
|
import_antd.TreeSelect,
|
|
62
63
|
{
|
|
63
64
|
ref,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { FullToken, GenerateStyle } from '
|
|
2
|
+
import type { FullToken, GenerateStyle } from '../../theme/interface';
|
|
3
3
|
export type TreeSelectToken = FullToken<'TreeSelect'>;
|
|
4
4
|
export declare const genTreeSelectStyle: GenerateStyle<TreeSelectToken>;
|
|
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
|
-
};
|
|
5
|
+
declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, string, string];
|
|
9
6
|
export default _default;
|
|
@@ -27,12 +27,9 @@ var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
|
27
27
|
var genTreeSelectStyle = (token) => {
|
|
28
28
|
return {};
|
|
29
29
|
};
|
|
30
|
-
var style_default = (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
return useStyle(prefixCls);
|
|
35
|
-
};
|
|
30
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("TreeSelect", (token) => {
|
|
31
|
+
return [genTreeSelectStyle(token)];
|
|
32
|
+
});
|
|
36
33
|
// Annotate the CommonJS export names for ESM import in node:
|
|
37
34
|
0 && (module.exports = {
|
|
38
35
|
genTreeSelectStyle
|
package/lib/typography/Link.js
CHANGED
|
@@ -39,24 +39,25 @@ var import_config_provider = __toESM(require("../config-provider"));
|
|
|
39
39
|
var import_useClassName = __toESM(require("./hooks/useClassName"));
|
|
40
40
|
var import_style = __toESM(require("./style"));
|
|
41
41
|
__reExport(Link_exports, require("antd/es/typography/Link"), module.exports);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
var { Link: AntLink } = import_antd.Typography;
|
|
43
44
|
var Link = import_react.default.forwardRef(
|
|
44
45
|
({ editable, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
|
|
45
46
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
46
47
|
const prefixCls = getPrefixCls("typography", customizePrefixCls);
|
|
47
|
-
const
|
|
48
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
48
49
|
const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable);
|
|
49
|
-
return
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
return wrapCSSVar(
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
52
|
AntLink,
|
|
52
53
|
{
|
|
53
54
|
ref,
|
|
54
55
|
editable,
|
|
55
56
|
prefixCls: customizePrefixCls,
|
|
56
57
|
className: typographyCls,
|
|
57
|
-
...restProps
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
...restProps,
|
|
59
|
+
children
|
|
60
|
+
}
|
|
60
61
|
)
|
|
61
62
|
);
|
|
62
63
|
}
|
|
@@ -39,24 +39,25 @@ var import_config_provider = __toESM(require("../config-provider"));
|
|
|
39
39
|
var import_useClassName = __toESM(require("./hooks/useClassName"));
|
|
40
40
|
var import_style = __toESM(require("./style"));
|
|
41
41
|
__reExport(Paragraph_exports, require("antd/es/typography/Paragraph"), module.exports);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
var { Paragraph: AntParagraph } = import_antd.Typography;
|
|
43
44
|
var Paragraph = import_react.default.forwardRef(
|
|
44
45
|
({ editable, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
|
|
45
46
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
46
47
|
const prefixCls = getPrefixCls("typography", customizePrefixCls);
|
|
47
|
-
const
|
|
48
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
48
49
|
const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable);
|
|
49
|
-
return
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
return wrapCSSVar(
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
52
|
AntParagraph,
|
|
52
53
|
{
|
|
53
54
|
ref,
|
|
54
55
|
editable,
|
|
55
56
|
prefixCls: customizePrefixCls,
|
|
56
57
|
className: typographyCls,
|
|
57
|
-
...restProps
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
...restProps,
|
|
59
|
+
children
|
|
60
|
+
}
|
|
60
61
|
)
|
|
61
62
|
);
|
|
62
63
|
}
|
package/lib/typography/Text.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
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
|
+
caption?: boolean;
|
|
5
6
|
}
|
|
6
7
|
type CompoundedComponent = React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>> & {
|
|
7
8
|
/** @internal */
|
package/lib/typography/Text.js
CHANGED
|
@@ -39,24 +39,25 @@ var import_config_provider = __toESM(require("../config-provider"));
|
|
|
39
39
|
var import_useClassName = __toESM(require("./hooks/useClassName"));
|
|
40
40
|
var import_style = __toESM(require("./style"));
|
|
41
41
|
__reExport(Text_exports, require("antd/es/typography/Text"), module.exports);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
var { Text: AntText } = import_antd.Typography;
|
|
43
44
|
var Text = import_react.default.forwardRef(
|
|
44
|
-
({ editable, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
|
|
45
|
+
({ editable, caption, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
|
|
45
46
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
46
47
|
const prefixCls = getPrefixCls("typography", customizePrefixCls);
|
|
47
|
-
const
|
|
48
|
-
const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable);
|
|
49
|
-
return
|
|
50
|
-
/* @__PURE__ */
|
|
48
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
49
|
+
const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable, caption);
|
|
50
|
+
return wrapCSSVar(
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
52
|
AntText,
|
|
52
53
|
{
|
|
53
54
|
ref,
|
|
54
55
|
editable,
|
|
55
56
|
prefixCls: customizePrefixCls,
|
|
56
57
|
className: typographyCls,
|
|
57
|
-
...restProps
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
...restProps,
|
|
59
|
+
children
|
|
60
|
+
}
|
|
60
61
|
)
|
|
61
62
|
);
|
|
62
63
|
}
|
package/lib/typography/Title.js
CHANGED
|
@@ -39,24 +39,25 @@ var import_config_provider = __toESM(require("../config-provider"));
|
|
|
39
39
|
var import_useClassName = __toESM(require("./hooks/useClassName"));
|
|
40
40
|
var import_style = __toESM(require("./style"));
|
|
41
41
|
__reExport(Title_exports, require("antd/es/typography/Title"), module.exports);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
var { Title: AntTitle } = import_antd.Typography;
|
|
43
44
|
var Title = import_react.default.forwardRef(
|
|
44
45
|
({ editable, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
|
|
45
46
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
46
47
|
const prefixCls = getPrefixCls("typography", customizePrefixCls);
|
|
47
|
-
const
|
|
48
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
48
49
|
const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable);
|
|
49
|
-
return
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
return wrapCSSVar(
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
52
|
AntTitle,
|
|
52
53
|
{
|
|
53
54
|
ref,
|
|
54
55
|
editable,
|
|
55
56
|
prefixCls: customizePrefixCls,
|
|
56
57
|
className: typographyCls,
|
|
57
|
-
...restProps
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
...restProps,
|
|
59
|
+
children
|
|
60
|
+
}
|
|
60
61
|
)
|
|
61
62
|
);
|
|
62
63
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { BlockProps } from 'antd/es/typography/Base';
|
|
2
|
-
declare const useClassName: (prefixCls: string, className: string, editable?: BlockProps['editable']) => string;
|
|
2
|
+
declare const useClassName: (prefixCls: string, className: string, editable?: BlockProps['editable'], caption?: boolean) => string;
|
|
3
3
|
export default useClassName;
|
|
@@ -33,11 +33,12 @@ __export(useClassName_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(useClassName_exports);
|
|
35
35
|
var import_classnames = __toESM(require("classnames"));
|
|
36
|
-
var useClassName = (prefixCls, className, editable) => {
|
|
36
|
+
var useClassName = (prefixCls, className, editable, caption) => {
|
|
37
37
|
var _a;
|
|
38
38
|
const typographyCls = (0, import_classnames.default)(
|
|
39
39
|
{
|
|
40
|
-
[`${prefixCls}-editable-text`]: typeof editable === "object" && ((_a = editable == null ? void 0 : editable.triggerType) == null ? void 0 : _a.includes("text"))
|
|
40
|
+
[`${prefixCls}-editable-text`]: typeof editable === "object" && ((_a = editable == null ? void 0 : editable.triggerType) == null ? void 0 : _a.includes("text")),
|
|
41
|
+
[`${prefixCls}-caption`]: caption
|
|
41
42
|
},
|
|
42
43
|
className
|
|
43
44
|
);
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import { Typography } from 'antd';
|
|
1
|
+
import { Typography as OriginTypography } from 'antd';
|
|
2
|
+
import Text from './Text';
|
|
3
|
+
import Link from './Link';
|
|
4
|
+
import Title from './Title';
|
|
5
|
+
import Paragraph from './Paragraph';
|
|
2
6
|
export * from 'antd/es/typography';
|
|
3
7
|
export * from 'antd/es/typography/Base';
|
|
4
8
|
export * from 'antd/es/typography/Text';
|
|
5
9
|
export * from 'antd/es/typography/Paragraph';
|
|
6
10
|
export * from 'antd/es/typography/Link';
|
|
7
11
|
export * from 'antd/es/typography/Title';
|
|
12
|
+
export type TypographyType = typeof OriginTypography & {
|
|
13
|
+
Text: typeof Text;
|
|
14
|
+
Link: typeof Link;
|
|
15
|
+
Title: typeof Title;
|
|
16
|
+
Paragraph: typeof Paragraph;
|
|
17
|
+
};
|
|
18
|
+
declare const Typography: TypographyType;
|
|
8
19
|
export default Typography;
|
package/lib/typography/index.js
CHANGED
|
@@ -44,11 +44,12 @@ __reExport(typography_exports, require("antd/es/typography/Text"), module.export
|
|
|
44
44
|
__reExport(typography_exports, require("antd/es/typography/Paragraph"), module.exports);
|
|
45
45
|
__reExport(typography_exports, require("antd/es/typography/Link"), module.exports);
|
|
46
46
|
__reExport(typography_exports, require("antd/es/typography/Title"), module.exports);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
var Typography = import_antd.Typography;
|
|
48
|
+
Typography.Text = import_Text.default;
|
|
49
|
+
Typography.Link = import_Link.default;
|
|
50
|
+
Typography.Title = import_Title.default;
|
|
51
|
+
Typography.Paragraph = import_Paragraph.default;
|
|
52
|
+
var typography_default = Typography;
|
|
52
53
|
// Annotate the CommonJS export names for ESM import in node:
|
|
53
54
|
0 && (module.exports = {
|
|
54
55
|
...require("antd/es/typography"),
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { FullToken, GenerateStyle } from '
|
|
2
|
+
import type { FullToken, GenerateStyle } from '../../theme/interface';
|
|
3
3
|
export type TypographyToken = FullToken<'Typography'>;
|
|
4
4
|
export declare const genTypographyStyle: GenerateStyle<TypographyToken>;
|
|
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
|
-
};
|
|
5
|
+
declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, string, string];
|
|
9
6
|
export default _default;
|
|
@@ -23,10 +23,14 @@ __export(style_exports, {
|
|
|
23
23
|
genTypographyStyle: () => genTypographyStyle
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_cssinjs = require("@ant-design/cssinjs");
|
|
26
27
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
28
|
var genTypographyStyle = (token) => {
|
|
28
|
-
const { componentCls, controlHeight, fontSize, lineHeight } = token;
|
|
29
|
-
const marginOffset = (controlHeight
|
|
29
|
+
const { componentCls, controlHeight, fontSize, lineHeight, calc } = token;
|
|
30
|
+
const marginOffset = calc(controlHeight).sub(calc(fontSize).mul(lineHeight).equal()).div(2).equal();
|
|
31
|
+
const paddingTop = calc(marginOffset).sub(token.lineWidth).equal();
|
|
32
|
+
const paddingInline = calc(token.paddingSM).sub(token.lineWidth).equal();
|
|
33
|
+
const negativeMarginOffset = calc(marginOffset).mul(-1).equal();
|
|
30
34
|
return {
|
|
31
35
|
// inherit color and lineHeight from parent instead of fixed colorText
|
|
32
36
|
[`${componentCls}`]: {
|
|
@@ -37,56 +41,60 @@ var genTypographyStyle = (token) => {
|
|
|
37
41
|
fontSize: token.fontSize
|
|
38
42
|
}
|
|
39
43
|
},
|
|
44
|
+
[`${componentCls}-caption`]: {
|
|
45
|
+
fontSize: token.fontSizeSM,
|
|
46
|
+
fontWeight: token.fontWeightWeak
|
|
47
|
+
},
|
|
40
48
|
[`${componentCls}${componentCls}-editable-text:not(${componentCls}-edit-content)`]: {
|
|
41
49
|
"&:hover": {
|
|
42
50
|
background: token.colorBgContainer,
|
|
43
|
-
border: `${token.lineWidth}
|
|
51
|
+
border: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
|
|
44
52
|
borderRadius: token.borderRadius,
|
|
45
53
|
position: "relative",
|
|
46
|
-
insetInlineStart:
|
|
47
|
-
padding: `${
|
|
54
|
+
insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
|
|
55
|
+
padding: `${paddingTop} ${paddingInline}`
|
|
48
56
|
},
|
|
49
57
|
"div&:hover": {
|
|
50
58
|
height: token.controlHeight,
|
|
51
|
-
marginTop:
|
|
52
|
-
marginBottom:
|
|
59
|
+
marginTop: negativeMarginOffset,
|
|
60
|
+
marginBottom: calc("1em").sub(marginOffset).equal()
|
|
53
61
|
},
|
|
54
62
|
"span&:hover": {
|
|
55
63
|
display: "inline-block",
|
|
56
64
|
height: token.controlHeight,
|
|
57
|
-
marginTop:
|
|
58
|
-
marginBottom:
|
|
65
|
+
marginTop: negativeMarginOffset,
|
|
66
|
+
marginBottom: negativeMarginOffset
|
|
59
67
|
},
|
|
60
68
|
"h1&:hover, h2&:hover, h3&:hover, h4&:hover, h5&:hover": {
|
|
61
|
-
marginTop: `${
|
|
62
|
-
marginBottom: `${
|
|
69
|
+
marginTop: `${negativeMarginOffset} !important`,
|
|
70
|
+
marginBottom: `${negativeMarginOffset} !important`
|
|
63
71
|
}
|
|
64
72
|
},
|
|
65
73
|
[`${componentCls}${componentCls}-edit-content`]: {
|
|
66
74
|
[`${componentCls}-div&`]: {
|
|
67
|
-
insetInlineStart:
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
|
|
76
|
+
insetBlockStart: 0,
|
|
77
|
+
marginTop: negativeMarginOffset,
|
|
78
|
+
marginBottom: calc("1em").sub(marginOffset).equal()
|
|
70
79
|
},
|
|
71
80
|
[`${componentCls}-span&`]: {
|
|
72
|
-
insetInlineStart:
|
|
73
|
-
|
|
74
|
-
|
|
81
|
+
insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
|
|
82
|
+
insetBlockStart: 0,
|
|
83
|
+
marginTop: negativeMarginOffset,
|
|
84
|
+
marginBottom: negativeMarginOffset
|
|
75
85
|
},
|
|
76
86
|
[`${componentCls}-h1&, ${componentCls}-h2&, ${componentCls}-h3&, ${componentCls}-h4&, ${componentCls}-h5&`]: {
|
|
77
|
-
insetInlineStart:
|
|
78
|
-
|
|
79
|
-
|
|
87
|
+
insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
|
|
88
|
+
insetBlockStart: 0,
|
|
89
|
+
marginTop: `${negativeMarginOffset} !important`,
|
|
90
|
+
marginBottom: `${negativeMarginOffset} !important`
|
|
80
91
|
}
|
|
81
92
|
}
|
|
82
93
|
};
|
|
83
94
|
};
|
|
84
|
-
var style_default = (
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
});
|
|
88
|
-
return useStyle(prefixCls);
|
|
89
|
-
};
|
|
95
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Typography", (token) => {
|
|
96
|
+
return [genTypographyStyle(token)];
|
|
97
|
+
});
|
|
90
98
|
// Annotate the CommonJS export names for ESM import in node:
|
|
91
99
|
0 && (module.exports = {
|
|
92
100
|
genTypographyStyle
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/design",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.10",
|
|
4
4
|
"description": "The Design System of OceanBase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"LICENSE"
|
|
32
32
|
],
|
|
33
33
|
"sideEffects": [
|
|
34
|
-
"**/*.less",
|
|
35
34
|
"**/*.css"
|
|
36
35
|
],
|
|
37
36
|
"scripts": {
|
|
@@ -39,13 +38,13 @@
|
|
|
39
38
|
},
|
|
40
39
|
"dependencies": {
|
|
41
40
|
"@ant-design/cssinjs": "^1.24.0",
|
|
42
|
-
"@ctrl/tinycolor": "^4.
|
|
41
|
+
"@ctrl/tinycolor": "^4.2.0",
|
|
43
42
|
"@inline-svg-unique-id/react": "^1.2.3",
|
|
44
43
|
"@oceanbase/aliyun-theme": "^0.1.6",
|
|
45
44
|
"@oceanbase/icons": "^1.0.0-alpha.0",
|
|
46
|
-
"@oceanbase/util": "^1.0.0-alpha.
|
|
45
|
+
"@oceanbase/util": "^1.0.0-alpha.2",
|
|
47
46
|
"ahooks": "^2.10.14",
|
|
48
|
-
"antd": "^5.
|
|
47
|
+
"antd": "^5.29.2",
|
|
49
48
|
"classnames": "^2.5.1",
|
|
50
49
|
"lodash": "^4.17.21",
|
|
51
50
|
"lottie-web": "^5.13.0",
|
|
@@ -53,17 +52,19 @@
|
|
|
53
52
|
"rc-util": "^5.44.4"
|
|
54
53
|
},
|
|
55
54
|
"devDependencies": {
|
|
55
|
+
"@ant-design/cssinjs-utils": "^1.1.3",
|
|
56
56
|
"@babel/cli": "^7.28.3",
|
|
57
|
-
"@babel/preset-env": "^7.28.
|
|
57
|
+
"@babel/preset-env": "^7.28.5",
|
|
58
58
|
"antd-token-previewer": "^2.0.8",
|
|
59
|
+
"rc-input": "^1.8.0",
|
|
59
60
|
"rc-select": "^14.16.8",
|
|
60
|
-
"rc-slider": "^11.1.
|
|
61
|
-
"rc-table": "^7.
|
|
61
|
+
"rc-slider": "^11.1.9",
|
|
62
|
+
"rc-table": "^7.55.1",
|
|
62
63
|
"rc-tree-select": "^5.27.0"
|
|
63
64
|
},
|
|
64
65
|
"peerDependencies": {
|
|
65
66
|
"react": ">=16.9.0",
|
|
66
67
|
"react-dom": ">=16.9.0"
|
|
67
68
|
},
|
|
68
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "06757770d5ede2d3bc2ea0409e45d2e6dea5012c"
|
|
69
70
|
}
|
|
Binary file
|
package/es/_util/genStyle.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getWeakenBorderColor(color: string): string;
|
package/es/fonts/Inter.woff2
DELETED
|
Binary file
|
package/es/global.css
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
@import '~antd/dist/reset.css';
|
|
2
|
-
|
|
3
|
-
@font-face {
|
|
4
|
-
font-family: 'Inter';
|
|
5
|
-
/* load priority: local font > self-hosting font > remote font */
|
|
6
|
-
src:
|
|
7
|
-
local('Inter'),
|
|
8
|
-
url('./fonts/Inter.woff2') format('woff2'),
|
|
9
|
-
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2')
|
|
10
|
-
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('./fonts/Consolas.woff2') format('woff2'),
|
|
20
|
-
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2')
|
|
21
|
-
format('woff2');
|
|
22
|
-
font-display: swap;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@font-face {
|
|
26
|
-
font-family: 'Helvetica Neue';
|
|
27
|
-
src:
|
|
28
|
-
local('Helvetica Neue'),
|
|
29
|
-
url('./fonts/HelveticaNeue.woff2') format('woff2'),
|
|
30
|
-
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2')
|
|
31
|
-
format('woff2');
|
|
32
|
-
font-display: swap;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
pre,
|
|
36
|
-
code,
|
|
37
|
-
kbd,
|
|
38
|
-
samp {
|
|
39
|
-
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
* {
|
|
43
|
-
scrollbar-color: #e2e8f3 transparent;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.rc-virtual-list-scrollbar-thumb {
|
|
47
|
-
background: #e2e8f3 !important;
|
|
48
|
-
}
|
package/lib/_util/genStyle.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getWeakenBorderColor(color: string): string;
|
package/lib/fonts/Inter.woff2
DELETED
|
Binary file
|
package/lib/global.css
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
@import '~antd/dist/reset.css';
|
|
2
|
-
|
|
3
|
-
@font-face {
|
|
4
|
-
font-family: 'Inter';
|
|
5
|
-
/* load priority: local font > self-hosting font > remote font */
|
|
6
|
-
src:
|
|
7
|
-
local('Inter'),
|
|
8
|
-
url('./fonts/Inter.woff2') format('woff2'),
|
|
9
|
-
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2')
|
|
10
|
-
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('./fonts/Consolas.woff2') format('woff2'),
|
|
20
|
-
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2')
|
|
21
|
-
format('woff2');
|
|
22
|
-
font-display: swap;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@font-face {
|
|
26
|
-
font-family: 'Helvetica Neue';
|
|
27
|
-
src:
|
|
28
|
-
local('Helvetica Neue'),
|
|
29
|
-
url('./fonts/HelveticaNeue.woff2') format('woff2'),
|
|
30
|
-
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2')
|
|
31
|
-
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
|
-
}
|