@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
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/style/global.tsx
|
|
30
|
+
var global_exports = {};
|
|
31
|
+
__export(global_exports, {
|
|
32
|
+
GlobalStyle: () => GlobalStyle,
|
|
33
|
+
default: () => global_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(global_exports);
|
|
36
|
+
var import_cssinjs = require("@ant-design/cssinjs");
|
|
37
|
+
var import_theme = __toESM(require("../theme"));
|
|
38
|
+
var import_Inter_Regular = __toESM(require("../fonts/Inter-Regular.woff2"));
|
|
39
|
+
var import_Inter_Medium = __toESM(require("../fonts/Inter-Medium.woff2"));
|
|
40
|
+
var import_Inter_SemiBold = __toESM(require("../fonts/Inter-SemiBold.woff2"));
|
|
41
|
+
var import_Consolas = __toESM(require("../fonts/Consolas.woff2"));
|
|
42
|
+
var import_HelveticaNeue = __toESM(require("../fonts/HelveticaNeue.woff2"));
|
|
43
|
+
var import_reset = require("antd/dist/reset.css");
|
|
44
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
|
+
var genGlobalStyle = (token, prefixCls) => {
|
|
46
|
+
const antCls = `.${prefixCls}`;
|
|
47
|
+
const buttonComponentCls = `${antCls}-btn`;
|
|
48
|
+
const typographyComponentCls = `${antCls}-typography`;
|
|
49
|
+
const menuComponentCls = `${antCls}-menu`;
|
|
50
|
+
return [
|
|
51
|
+
{
|
|
52
|
+
"@font-face": {
|
|
53
|
+
fontFamily: "Inter",
|
|
54
|
+
fontStyle: "lighter",
|
|
55
|
+
fontWeight: 300,
|
|
56
|
+
// load priority: local font > self-hosting font > remote font
|
|
57
|
+
src: `local('Inter'), url(${import_Inter_Regular.default}) format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*ucHoQ4exBNYAAAAARtAAAAgAemfOAQ/Inter-Regular.woff2') format('woff2')`,
|
|
58
|
+
fontDisplay: "swap"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"@font-face": {
|
|
63
|
+
fontFamily: "Inter",
|
|
64
|
+
fontStyle: "normal",
|
|
65
|
+
fontWeight: 400,
|
|
66
|
+
src: `local('Inter'), url(${import_Inter_Medium.default}) format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*GboAQ56sQbkAAAAARwAAAAgAemfOAQ/Inter-Medium.woff2') format('woff2')`,
|
|
67
|
+
fontDisplay: "swap"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"@font-face": {
|
|
72
|
+
fontFamily: "Inter",
|
|
73
|
+
fontStyle: "medium",
|
|
74
|
+
fontWeight: 500,
|
|
75
|
+
src: `local('Inter'), url(${import_Inter_Medium.default}) format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*GboAQ56sQbkAAAAARwAAAAgAemfOAQ/Inter-Medium.woff2') format('woff2')`,
|
|
76
|
+
fontDisplay: "swap"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"@font-face": {
|
|
81
|
+
fontFamily: "Inter",
|
|
82
|
+
fontStyle: "semibold",
|
|
83
|
+
fontWeight: 600,
|
|
84
|
+
src: `local('Inter'), url(${import_Inter_SemiBold.default}) format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*tcOIT5gLQl4AAAAARwAAAAgAemfOAQ/Inter-SemiBold.woff2') format('woff2')`,
|
|
85
|
+
fontDisplay: "swap"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"@font-face": {
|
|
90
|
+
fontFamily: "Consolas",
|
|
91
|
+
src: `local('Consolas'), url(${import_Consolas.default}) format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2') format('woff2')`,
|
|
92
|
+
fontDisplay: "swap"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"@font-face": {
|
|
97
|
+
fontFamily: "Helvetica Neue",
|
|
98
|
+
src: `local('Helvetica Neue'), url(${import_HelveticaNeue.default}) format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2') format('woff2')`,
|
|
99
|
+
fontDisplay: "swap"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"pre, code, kbd, samp": {
|
|
104
|
+
fontFamily: token.fontFamilyCode
|
|
105
|
+
},
|
|
106
|
+
"input::placeholder": {
|
|
107
|
+
// affact all placeholder excluding select
|
|
108
|
+
fontWeight: token.fontWeightWeak
|
|
109
|
+
},
|
|
110
|
+
"*": {
|
|
111
|
+
scrollbarColor: `${token.colorFillSecondary} transparent`
|
|
112
|
+
},
|
|
113
|
+
".rc-virtual-list-scrollbar-thumb": {
|
|
114
|
+
background: `${token.colorFillSecondary} !important`
|
|
115
|
+
},
|
|
116
|
+
// handle font-size: 12px font weight
|
|
117
|
+
[`[style*='font-size: 12px']`]: {
|
|
118
|
+
fontWeight: token.fontWeightWeak
|
|
119
|
+
},
|
|
120
|
+
// link with href or data-aspm-param^="obcloud_openLink= show underline on hover
|
|
121
|
+
// except disabled and antd element
|
|
122
|
+
'a[href], a[data-aspm-param^="obcloud_openLink="]': {
|
|
123
|
+
[`&:not([disabled]):not([class^="${prefixCls}-"]):hover`]: {
|
|
124
|
+
textDecoration: "underline"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
// handle link style in button
|
|
128
|
+
[`${buttonComponentCls}${buttonComponentCls}-link:not(${buttonComponentCls}-disabled)`]: {
|
|
129
|
+
'&[href], &[data-aspm-param^="obcloud_openLink="]': {
|
|
130
|
+
"&:hover": {
|
|
131
|
+
textDecoration: "underline"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
// handle link style in typography
|
|
136
|
+
[`${typographyComponentCls}:not(${typographyComponentCls}-disabled)`]: {
|
|
137
|
+
'&[href], &[data-aspm-param^="obcloud_openLink="]': {
|
|
138
|
+
"&:hover": {
|
|
139
|
+
textDecoration: "underline"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
// handle link style in menu
|
|
144
|
+
[`${menuComponentCls}`]: {
|
|
145
|
+
[`${menuComponentCls}-item`]: {
|
|
146
|
+
[`${menuComponentCls}-title-content`]: {
|
|
147
|
+
"a:hover": {
|
|
148
|
+
textDecoration: "none"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
];
|
|
155
|
+
};
|
|
156
|
+
var GlobalStyle = ({ prefixCls = "ant" }) => {
|
|
157
|
+
const { theme, token } = import_theme.default.useToken();
|
|
158
|
+
const wrapSSR = (0, import_cssinjs.useStyleRegister)(
|
|
159
|
+
{
|
|
160
|
+
theme,
|
|
161
|
+
token,
|
|
162
|
+
path: ["global"],
|
|
163
|
+
hashId: "",
|
|
164
|
+
// Empty hashId for global styles
|
|
165
|
+
order: -1e3
|
|
166
|
+
// Inject before other styles
|
|
167
|
+
},
|
|
168
|
+
() => genGlobalStyle(token, prefixCls)
|
|
169
|
+
);
|
|
170
|
+
return wrapSSR(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {}));
|
|
171
|
+
};
|
|
172
|
+
var global_default = GlobalStyle;
|
|
173
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
174
|
+
0 && (module.exports = {
|
|
175
|
+
GlobalStyle
|
|
176
|
+
});
|
package/lib/style/reset.css
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/* antd/dist/reset.css is imported in global.tsx */
|
|
2
|
+
/* reserve this file for compatibility with antd */
|
package/lib/switch/index.js
CHANGED
|
@@ -39,14 +39,15 @@ var import_react = __toESM(require("react"));
|
|
|
39
39
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
40
40
|
var import_style = __toESM(require("./style"));
|
|
41
41
|
__reExport(switch_exports, require("antd/es/switch"), module.exports);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
var InternalSwitch = import_react.default.forwardRef(
|
|
43
44
|
({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
44
45
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
45
46
|
const prefixCls = getPrefixCls("switch", customizePrefixCls);
|
|
46
|
-
const
|
|
47
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
47
48
|
const switchCls = (0, import_classnames.default)(className);
|
|
48
|
-
return
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
return wrapCSSVar(
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Switch, { ref, prefixCls: customizePrefixCls, className: switchCls, ...restProps })
|
|
50
51
|
);
|
|
51
52
|
}
|
|
52
53
|
);
|
|
@@ -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 SwitchToken = FullToken<'Switch'>;
|
|
4
4
|
export declare const genSwitchStyle: GenerateStyle<SwitchToken>;
|
|
5
|
-
declare const _default: (prefixCls: string) =>
|
|
6
|
-
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
7
|
-
hashId: string;
|
|
8
|
-
};
|
|
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;
|
|
@@ -32,12 +32,9 @@ var genSwitchStyle = (token) => {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
var style_default = (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
});
|
|
39
|
-
return useStyle(prefixCls);
|
|
40
|
-
};
|
|
35
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Switch", (token) => {
|
|
36
|
+
return [genSwitchStyle(token)];
|
|
37
|
+
});
|
|
41
38
|
// Annotate the CommonJS export names for ESM import in node:
|
|
42
39
|
0 && (module.exports = {
|
|
43
40
|
genSwitchStyle
|
package/lib/table/index.d.ts
CHANGED
|
@@ -41,10 +41,7 @@ declare const _default: (<RecordType extends AnyObject = AnyObject>(props: Table
|
|
|
41
41
|
Column: <RecordType extends import("antd/es/_util/type").AnyObject>(_: import("antd").TableColumnProps<RecordType>) => null;
|
|
42
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
|
-
useStyle: (prefixCls: string) =>
|
|
45
|
-
wrapSSR: (node: ReactNode) => ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
46
|
-
hashId: string;
|
|
47
|
-
};
|
|
44
|
+
useStyle: (prefixCls: string, rootCls?: string) => readonly [(node: ReactElement<any, string | React.JSXElementConstructor<any>>) => ReactElement<any, string | React.JSXElementConstructor<any>>, string, string];
|
|
48
45
|
useDefaultPagination: (pagination?: false | import("antd").TablePaginationConfig) => false | import("antd").TablePaginationConfig;
|
|
49
46
|
};
|
|
50
47
|
export default _default;
|
package/lib/table/index.js
CHANGED
|
@@ -44,7 +44,9 @@ var import_style = __toESM(require("./style"));
|
|
|
44
44
|
var import_useDefaultPagination = __toESM(require("./hooks/useDefaultPagination"));
|
|
45
45
|
var import_useMergedState = __toESM(require("rc-util/lib/hooks/useMergedState"));
|
|
46
46
|
var import_en_US = __toESM(require("../locale/en-US"));
|
|
47
|
+
var import_theme = __toESM(require("../theme"));
|
|
47
48
|
__reExport(table_exports, require("antd/es/table"), module.exports);
|
|
49
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
48
50
|
function Table(props, ref) {
|
|
49
51
|
var _a, _b;
|
|
50
52
|
const {
|
|
@@ -64,16 +66,18 @@ function Table(props, ref) {
|
|
|
64
66
|
collapseText,
|
|
65
67
|
openText,
|
|
66
68
|
expandable,
|
|
69
|
+
scroll,
|
|
67
70
|
hiddenCancelBtn = false,
|
|
68
71
|
prefixCls: customizePrefixCls,
|
|
69
72
|
className
|
|
70
73
|
} = props;
|
|
71
74
|
const extendedContext = (0, import_react.useContext)(import_config_provider.default.ExtendedConfigContext);
|
|
72
75
|
const pagination = (0, import_useDefaultPagination.default)(customPagination);
|
|
76
|
+
const { token } = import_theme.default.useToken();
|
|
73
77
|
const { getPrefixCls, locale, table } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
74
78
|
const {
|
|
75
79
|
batchOperationBar,
|
|
76
|
-
emptyText = /* @__PURE__ */
|
|
80
|
+
emptyText = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_empty.default, { image: import_empty.default.PRESENTED_IMAGE_SIMPLE }),
|
|
77
81
|
...restLocale
|
|
78
82
|
} = {
|
|
79
83
|
...customLocale,
|
|
@@ -84,7 +88,7 @@ function Table(props, ref) {
|
|
|
84
88
|
}
|
|
85
89
|
};
|
|
86
90
|
const prefixCls = getPrefixCls("table", customizePrefixCls);
|
|
87
|
-
const
|
|
91
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
88
92
|
const tableCls = (0, import_classnames.default)(
|
|
89
93
|
{
|
|
90
94
|
[`${prefixCls}-expandable`]: !(0, import_lodash.isEmpty)(expandable),
|
|
@@ -112,7 +116,7 @@ function Table(props, ref) {
|
|
|
112
116
|
render: (text, record, index) => {
|
|
113
117
|
const element = item.render ? item.render(text, record, index) : record[item.dataIndex];
|
|
114
118
|
const elementType = element == null ? void 0 : element.type;
|
|
115
|
-
return (elementType == null ? void 0 : elementType.__ANT_TOOLTIP) === true ? element : /* @__PURE__ */
|
|
119
|
+
return (elementType == null ? void 0 : elementType.__ANT_TOOLTIP) === true ? element : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
116
120
|
import_typography.default.Text,
|
|
117
121
|
{
|
|
118
122
|
ellipsis: {
|
|
@@ -120,15 +124,16 @@ function Table(props, ref) {
|
|
|
120
124
|
placement: "topLeft",
|
|
121
125
|
title: element
|
|
122
126
|
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
127
|
+
},
|
|
128
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: element })
|
|
129
|
+
}
|
|
126
130
|
);
|
|
127
131
|
}
|
|
128
132
|
};
|
|
129
133
|
}
|
|
130
134
|
return item;
|
|
131
135
|
});
|
|
136
|
+
const hasEllipsisColumn = newColumns.some((item) => item.ellipsis);
|
|
132
137
|
const handleSelectedData = (selectedRowKeys, selectedRows, info) => {
|
|
133
138
|
setCurrentSelectedRowKeys(selectedRowKeys);
|
|
134
139
|
setCurrentSelectedRows(selectedRows);
|
|
@@ -148,75 +153,116 @@ function Table(props, ref) {
|
|
|
148
153
|
if ((0, import_lodash.isEmpty)(rowSelection) || (0, import_lodash.isEmpty)(currentSelectedRowKeys)) {
|
|
149
154
|
return (
|
|
150
155
|
// @ts-ignore
|
|
151
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range)) })
|
|
152
157
|
);
|
|
153
158
|
}
|
|
154
|
-
return /* @__PURE__ */
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
160
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-batch-operation-bar`, children: [
|
|
161
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
162
|
+
import_antd.Space,
|
|
163
|
+
{
|
|
164
|
+
size: 8,
|
|
165
|
+
style: {
|
|
166
|
+
marginRight: 24
|
|
167
|
+
},
|
|
168
|
+
children: [
|
|
169
|
+
toolAlertRender && toolAlertRender(currentSelectedRowKeys, currentSelectedRows),
|
|
170
|
+
!toolAlertRender && toolAlertRender !== false && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `${prefixCls}-batch-operation-selection`, children: [
|
|
171
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: batchOperationBar == null ? void 0 : batchOperationBar.selected }),
|
|
172
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-batch-operation-selection-count`, children: (currentSelectedRowKeys == null ? void 0 : currentSelectedRowKeys.length) || 0 }),
|
|
173
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: batchOperationBar == null ? void 0 : batchOperationBar.object })
|
|
174
|
+
] }),
|
|
175
|
+
!hiddenCancelBtn && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { onClick: handleOptionsCancel, children: cancelText ?? (batchOperationBar == null ? void 0 : batchOperationBar.cancel) }),
|
|
176
|
+
toolSelectedContent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
177
|
+
import_antd.Popover,
|
|
178
|
+
{
|
|
179
|
+
placement: "top",
|
|
180
|
+
overlayClassName: `${prefixCls}-batch-operation-selection-popover`,
|
|
181
|
+
content: toolSelectedContent == null ? void 0 : toolSelectedContent(currentSelectedRowKeys, currentSelectedRows),
|
|
182
|
+
trigger: "click",
|
|
183
|
+
open: openPopover,
|
|
184
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { onClick: () => setOpenPopover(!openPopover), children: openPopover ? collapseText ?? (batchOperationBar == null ? void 0 : batchOperationBar.collapse) : openText ?? (batchOperationBar == null ? void 0 : batchOperationBar.open) })
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
),
|
|
190
|
+
toolOptionsRender && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Space, { size: 8, children: toolOptionsRender == null ? void 0 : toolOptionsRender(currentSelectedRowKeys, currentSelectedRows) })
|
|
191
|
+
] }),
|
|
192
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range)) })
|
|
193
|
+
] });
|
|
177
194
|
};
|
|
178
|
-
return
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
|
|
195
|
+
return wrapCSSVar(
|
|
196
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
197
|
+
import_config_provider.default,
|
|
181
198
|
{
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
199
|
+
theme: {
|
|
200
|
+
components: {
|
|
201
|
+
Button: {
|
|
202
|
+
fontSize: token.fontSizeSM,
|
|
203
|
+
controlHeight: token.controlHeightSM,
|
|
204
|
+
paddingInline: token.paddingXS
|
|
205
|
+
},
|
|
206
|
+
Pagination: {
|
|
207
|
+
fontSize: token.fontSizeSM,
|
|
208
|
+
controlHeight: token.controlHeightSM
|
|
209
|
+
},
|
|
210
|
+
Select: {
|
|
211
|
+
fontSize: token.fontSizeSM,
|
|
212
|
+
controlHeight: token.controlHeightSM,
|
|
213
|
+
// control select padding by inputPaddingHorizontalBase
|
|
214
|
+
paddingSM: token.paddingXS
|
|
198
215
|
}
|
|
199
|
-
|
|
216
|
+
}
|
|
200
217
|
},
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
218
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
219
|
+
import_antd.Table,
|
|
220
|
+
{
|
|
221
|
+
...props,
|
|
222
|
+
ref,
|
|
223
|
+
prefixCls: customizePrefixCls,
|
|
224
|
+
className: tableCls,
|
|
225
|
+
locale: {
|
|
226
|
+
...restLocale,
|
|
227
|
+
emptyText: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-empty-wrapper`, children: typeof emptyText === "function" ? emptyText() : emptyText })
|
|
228
|
+
},
|
|
229
|
+
size,
|
|
230
|
+
bordered: bordered || innerBordered,
|
|
231
|
+
columns: newColumns,
|
|
232
|
+
rowClassName: (...args) => {
|
|
233
|
+
return (0, import_classnames.default)(
|
|
234
|
+
typeof rowClassName === "function" ? rowClassName(...args) : rowClassName,
|
|
235
|
+
{
|
|
236
|
+
[`${prefixCls}-expand-row-by-click`]: expandable == null ? void 0 : expandable.expandRowByClick
|
|
237
|
+
}
|
|
238
|
+
);
|
|
239
|
+
},
|
|
240
|
+
expandable: expandable ? {
|
|
241
|
+
columnWidth: !size || size === "large" ? 40 : 32,
|
|
242
|
+
...expandable
|
|
243
|
+
} : void 0,
|
|
244
|
+
rowSelection: rowSelection ? {
|
|
245
|
+
columnWidth: table == null ? void 0 : table.selectionColumnWidth,
|
|
246
|
+
...rowSelection,
|
|
247
|
+
onChange: (selectedRowKeys, selectedRows, info) => {
|
|
248
|
+
var _a2;
|
|
249
|
+
handleSelectedData(selectedRowKeys, selectedRows, info);
|
|
250
|
+
(_a2 = rowSelection == null ? void 0 : rowSelection.onChange) == null ? void 0 : _a2.call(rowSelection, selectedRowKeys, selectedRows, info);
|
|
251
|
+
}
|
|
252
|
+
} : void 0,
|
|
253
|
+
scroll: {
|
|
254
|
+
// enable auto x scroll when there is no ellipsis column
|
|
255
|
+
x: hasEllipsisColumn ? void 0 : "max-content",
|
|
256
|
+
...scroll
|
|
257
|
+
},
|
|
258
|
+
footer,
|
|
259
|
+
pagination: pagination === false ? false : {
|
|
260
|
+
...pagination,
|
|
261
|
+
hideOnSinglePage: toolAlertRender || toolOptionsRender || toolSelectedContent || (pagination == null ? void 0 : pagination.showSizeChanger) ? false : (pagination == null ? void 0 : pagination.hideOnSinglePage) !== void 0 ? pagination == null ? void 0 : pagination.hideOnSinglePage : extendedContext.hideOnSinglePage,
|
|
262
|
+
showTotal: renderOptionsBar
|
|
263
|
+
}
|
|
212
264
|
}
|
|
213
|
-
|
|
214
|
-
footer,
|
|
215
|
-
pagination: pagination === false ? false : {
|
|
216
|
-
...pagination,
|
|
217
|
-
hideOnSinglePage: toolAlertRender || toolOptionsRender || toolSelectedContent || (pagination == null ? void 0 : pagination.showSizeChanger) ? false : (pagination == null ? void 0 : pagination.hideOnSinglePage) !== void 0 ? pagination == null ? void 0 : pagination.hideOnSinglePage : extendedContext.hideOnSinglePage,
|
|
218
|
-
showTotal: renderOptionsBar
|
|
219
|
-
}
|
|
265
|
+
)
|
|
220
266
|
}
|
|
221
267
|
)
|
|
222
268
|
);
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { CSSObject } from '@ant-design/cssinjs';
|
|
3
|
-
import type { FullToken } from '
|
|
3
|
+
import type { FullToken } from '../../theme/interface';
|
|
4
4
|
export type TableToken = FullToken<'Table'>;
|
|
5
5
|
export declare const genTableStyle: (token: TableToken) => CSSObject;
|
|
6
|
-
declare const _default: (prefixCls: string) =>
|
|
7
|
-
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
8
|
-
hashId: string;
|
|
9
|
-
};
|
|
6
|
+
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];
|
|
10
7
|
export default _default;
|