@oceanbase/design 1.0.0-alpha.10 → 1.0.0-alpha.11
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.js +1 -1
- package/es/_util/index.js +1 -0
- package/es/_util/styleChecker.js +1 -0
- package/es/affix/index.js +1 -0
- package/es/alert/index.d.ts +1 -1
- package/es/alert/index.js +5 -2
- package/es/alert/style/index.js +17 -8
- package/es/anchor/index.js +1 -0
- package/es/app/index.js +1 -0
- package/es/auto-complete/index.js +1 -0
- package/es/avatar/index.js +1 -0
- package/es/badge/index.d.ts +2 -0
- package/es/badge/index.js +26 -10
- package/es/badge/style/index.js +3 -1
- package/es/breadcrumb/Breadcrumb.js +1 -0
- package/es/breadcrumb/index.js +1 -0
- package/es/button/index.js +1 -0
- package/es/calendar/index.js +1 -0
- package/es/card/index.js +2 -0
- package/es/card/style/index.js +3 -1
- package/es/carousel/index.js +1 -0
- package/es/cascader/index.js +1 -0
- package/es/checkbox/index.js +1 -0
- package/es/collapse/index.js +1 -0
- package/es/color-picker/index.js +1 -0
- package/es/config-provider/DefaultRenderEmpty.js +1 -0
- package/es/config-provider/index.js +1 -0
- package/es/date-picker/index.js +1 -0
- package/es/descriptions/hooks/useItems.d.ts +4 -4
- package/es/descriptions/hooks/useItems.js +1 -0
- package/es/descriptions/index.js +1 -0
- package/es/divider/index.js +1 -0
- package/es/drawer/index.js +1 -0
- package/es/dropdown/dropdown-button.js +1 -0
- package/es/dropdown/index.js +1 -0
- package/es/empty/colored.js +1 -0
- package/es/empty/database.js +1 -0
- package/es/empty/default.js +1 -0
- package/es/empty/guide.js +1 -0
- package/es/empty/index.js +1 -0
- package/es/float-button/index.js +1 -0
- package/es/form/FormItem.js +1 -0
- package/es/form/index.js +1 -0
- package/es/grid/col.js +1 -0
- package/es/grid/index.js +1 -0
- package/es/grid/row.js +1 -0
- package/es/image/index.js +1 -0
- package/es/index.js +1 -0
- package/es/input/Input.js +1 -0
- package/es/input/Password.js +1 -0
- package/es/input/Search.js +1 -0
- package/es/input/TextArea.js +1 -0
- package/es/input/index.js +1 -0
- package/es/input-number/index.js +1 -0
- package/es/layout/index.js +1 -0
- package/es/list/index.js +1 -0
- package/es/locale/index.js +1 -0
- package/es/lottie/index.js +1 -0
- package/es/mentions/index.js +1 -0
- package/es/menu/index.js +1 -0
- package/es/message/index.js +1 -0
- package/es/modal/Modal.d.ts +1 -1
- package/es/modal/Modal.js +7 -4
- package/es/modal/Progress.js +1 -0
- package/es/modal/index.js +1 -0
- package/es/modal/style/index.js +9 -5
- package/es/notification/index.js +1 -0
- package/es/pagination/index.js +1 -0
- package/es/popconfirm/index.js +1 -0
- package/es/popover/index.js +1 -0
- package/es/progress/index.js +1 -0
- package/es/qrcode/index.js +1 -0
- package/es/radio/index.js +1 -0
- package/es/rate/index.js +1 -0
- package/es/result/403.js +1 -0
- package/es/result/404.js +1 -0
- package/es/result/500.js +1 -0
- package/es/result/Error.js +1 -0
- package/es/result/Processing.js +1 -0
- package/es/result/Success.js +1 -0
- package/es/result/Warning.js +1 -0
- package/es/result/index.js +1 -0
- package/es/segmented/index.js +1 -0
- package/es/select/index.js +1 -0
- package/es/skeleton/index.js +1 -0
- package/es/slider/index.js +1 -0
- package/es/space/index.js +1 -0
- package/es/spin/index.js +1 -0
- package/es/static-function/index.js +1 -0
- package/es/statistic/index.js +1 -0
- package/es/steps/index.js +1 -0
- package/es/style/cssVariables.js +2 -1
- package/es/style/cssVariablesMeta.js +7 -7
- package/es/style/global.js +1 -0
- package/es/switch/index.js +1 -0
- package/es/table/index.js +38 -61
- package/es/table/style/index.js +23 -17
- package/es/tabs/TabPane.js +1 -0
- package/es/tabs/hooks/useLegacyItems.js +1 -0
- package/es/tabs/index.js +1 -0
- package/es/tag/index.js +1 -0
- package/es/tag/style/index.js +4 -1
- package/es/theme/index.js +1 -0
- package/es/theme/interface.d.ts +7 -0
- package/es/theme/style/aliyun.less +1 -1
- package/es/theme/style/compact.less +3 -3
- package/es/theme/style/dark.less +1 -1
- package/es/theme/style/default.less +3 -3
- package/es/time-picker/index.js +1 -0
- package/es/timeline/index.js +1 -0
- package/es/tooltip/MouseTooltip.js +1 -0
- package/es/tooltip/ReactStickyMouseTooltip.js +1 -0
- package/es/tooltip/index.js +1 -0
- package/es/tour/index.js +1 -0
- package/es/transfer/index.js +1 -0
- package/es/tree/index.js +1 -0
- package/es/tree-select/index.js +1 -0
- package/es/typography/Link.js +1 -0
- package/es/typography/Paragraph.js +1 -0
- package/es/typography/Text.js +1 -0
- package/es/typography/Title.js +1 -0
- package/es/typography/index.js +1 -0
- package/es/upload/index.js +1 -0
- package/es/watermark/index.js +1 -0
- package/lib/_util/genComponentStyleHook.js +52 -59
- package/lib/_util/getEllipsisConfig.js +16 -39
- package/lib/_util/index.js +13 -29
- package/lib/_util/styleChecker.js +33 -53
- package/lib/_util/type.js +4 -16
- package/lib/_util/useFlexGapSupport.js +11 -36
- package/lib/affix/index.js +15 -21
- package/lib/alert/index.d.ts +1 -1
- package/lib/alert/index.js +63 -82
- package/lib/alert/style/index.js +111 -108
- package/lib/anchor/index.js +26 -23
- package/lib/app/index.js +47 -54
- package/lib/app/style/index.js +13 -32
- package/lib/auto-complete/index.js +15 -21
- package/lib/avatar/index.js +26 -23
- package/lib/badge/index.d.ts +2 -0
- package/lib/badge/index.js +108 -110
- package/lib/badge/style/index.js +21 -40
- package/lib/breadcrumb/Breadcrumb.js +15 -21
- package/lib/breadcrumb/index.js +31 -31
- package/lib/button/index.js +50 -60
- package/lib/button/style/index.js +35 -57
- package/lib/calendar/index.js +15 -21
- package/lib/card/Card.js +14 -21
- package/lib/card/index.js +246 -255
- package/lib/card/style/index.js +50 -61
- package/lib/carousel/index.js +15 -21
- package/lib/cascader/index.js +15 -21
- package/lib/checkbox/index.js +52 -69
- package/lib/checkbox/style/index.js +20 -35
- package/lib/collapse/index.js +15 -21
- package/lib/color-picker/index.js +15 -21
- package/lib/color-picker/interface.js +14 -21
- package/lib/config-provider/DefaultRenderEmpty.js +34 -48
- package/lib/config-provider/SizeContext.js +14 -21
- package/lib/config-provider/context.js +14 -21
- package/lib/config-provider/index.js +200 -233
- package/lib/config-provider/navigate.js +4 -16
- package/lib/date-picker/index.js +15 -21
- package/lib/descriptions/Item.js +6 -24
- package/lib/descriptions/hooks/useItems.d.ts +4 -4
- package/lib/descriptions/hooks/useItems.js +50 -73
- package/lib/descriptions/index.js +83 -101
- package/lib/descriptions/style/index.js +46 -64
- package/lib/divider/index.js +15 -21
- package/lib/drawer/index.js +108 -127
- package/lib/drawer/style/index.js +36 -51
- package/lib/dropdown/dropdown-button.js +30 -57
- package/lib/dropdown/index.js +30 -46
- package/lib/dropdown/style/index.js +13 -32
- package/lib/empty/colored.js +198 -314
- package/lib/empty/database.js +117 -185
- package/lib/empty/default.js +53 -48
- package/lib/empty/guide.js +145 -224
- package/lib/empty/index.js +77 -95
- package/lib/empty/style/index.js +28 -43
- package/lib/float-button/index.js +15 -21
- package/lib/float-button/interface.js +14 -21
- package/lib/form/FormItem.js +78 -84
- package/lib/form/index.js +57 -77
- package/lib/form/interface.js +14 -21
- package/lib/form/style/index.js +16 -35
- package/lib/grid/col.js +28 -45
- package/lib/grid/index.js +26 -44
- package/lib/grid/row.js +30 -45
- package/lib/image/index.js +15 -21
- package/lib/index.js +333 -154
- package/lib/input/Input.js +65 -78
- package/lib/input/Password.js +59 -76
- package/lib/input/Search.js +59 -76
- package/lib/input/TextArea.js +59 -76
- package/lib/input/index.js +30 -49
- package/lib/input/style/index.js +19 -36
- package/lib/input-number/index.js +56 -76
- package/lib/input-number/style/index.js +13 -32
- package/lib/layout/index.js +15 -21
- package/lib/list/index.js +52 -59
- package/lib/locale/en-US.js +22 -49
- package/lib/locale/index.js +25 -38
- package/lib/locale/ja-JP.js +22 -49
- package/lib/locale/useLocale.js +6 -24
- package/lib/locale/zh-CN.js +22 -49
- package/lib/locale/zh-TW.js +22 -49
- package/lib/lottie/index.js +61 -80
- package/lib/mentions/index.js +15 -21
- package/lib/menu/index.js +15 -21
- package/lib/menu/interface.js +14 -21
- package/lib/message/index.js +15 -21
- package/lib/message/interface.js +14 -21
- package/lib/modal/Modal.d.ts +1 -1
- package/lib/modal/Modal.js +69 -80
- package/lib/modal/Progress.js +44 -61
- package/lib/modal/index.js +23 -42
- package/lib/modal/interface.js +14 -21
- package/lib/modal/style/index.js +34 -46
- package/lib/notification/index.js +15 -21
- package/lib/notification/interface.js +14 -21
- package/lib/pagination/index.js +15 -21
- package/lib/popconfirm/index.js +15 -21
- package/lib/popover/index.js +15 -21
- package/lib/progress/index.js +26 -23
- package/lib/progress/progress.js +14 -21
- package/lib/qrcode/index.js +15 -21
- package/lib/qrcode/interface.js +14 -21
- package/lib/radio/index.js +53 -62
- package/lib/radio/interface.js +14 -21
- package/lib/radio/style/index.js +18 -33
- package/lib/rate/index.js +15 -21
- package/lib/result/403.js +164 -195
- package/lib/result/404.js +291 -354
- package/lib/result/500.js +156 -259
- package/lib/result/Error.js +127 -161
- package/lib/result/Processing.js +320 -252
- package/lib/result/Success.js +202 -261
- package/lib/result/Warning.js +302 -434
- package/lib/result/index.js +65 -80
- package/lib/result/style/index.js +15 -35
- package/lib/segmented/index.js +86 -83
- package/lib/segmented/style/index.js +19 -36
- package/lib/select/index.js +63 -81
- package/lib/select/style/index.js +12 -32
- package/lib/skeleton/index.js +15 -21
- package/lib/slider/index.js +48 -58
- package/lib/slider/style/index.js +19 -37
- package/lib/space/index.js +63 -69
- package/lib/space/style/index.js +16 -36
- package/lib/spin/index.js +58 -76
- package/lib/spin/style/index.js +48 -52
- package/lib/static-function/index.js +48 -73
- package/lib/statistic/index.js +15 -21
- package/lib/steps/index.js +15 -21
- package/lib/style/cssVariables.js +237 -256
- package/lib/style/cssVariablesMeta.js +978 -1057
- package/lib/style/global.js +119 -155
- package/lib/switch/index.js +52 -60
- package/lib/switch/style/index.js +12 -32
- package/lib/table/hooks/useDefaultPagination.js +18 -46
- package/lib/table/index.js +179 -219
- package/lib/table/interface.js +14 -21
- package/lib/table/style/index.js +59 -73
- package/lib/tabs/TabPane.js +7 -24
- package/lib/tabs/hooks/useLegacyItems.js +27 -43
- package/lib/tabs/index.js +107 -124
- package/lib/tabs/style/index.js +23 -38
- package/lib/tag/index.js +78 -98
- package/lib/tag/style/index.js +35 -57
- package/lib/theme/aliyun.js +7 -34
- package/lib/theme/compact.js +9 -36
- package/lib/theme/dark.js +9 -36
- package/lib/theme/default.js +130 -232
- package/lib/theme/index.js +48 -55
- package/lib/theme/interface.d.ts +7 -0
- package/lib/theme/interface.js +14 -21
- package/lib/theme/internal.js +14 -21
- package/lib/theme/style/aliyun.less +1 -1
- package/lib/theme/style/compact.less +3 -3
- package/lib/theme/style/dark.less +1 -1
- package/lib/theme/style/default.less +3 -3
- package/lib/theme/themes/compact/index.js +19 -39
- package/lib/theme/themes/dark/index.js +19 -39
- package/lib/theme/themes/default/index.js +19 -39
- package/lib/theme/themes/seed.js +24 -43
- package/lib/theme/util/alias.js +19 -39
- package/lib/theme/util/format.js +15 -35
- package/lib/time-picker/index.js +15 -21
- package/lib/timeline/index.js +15 -21
- package/lib/tooltip/MouseTooltip.js +84 -98
- package/lib/tooltip/ReactStickyMouseTooltip.js +63 -88
- package/lib/tooltip/hooks/useTooltipTypeList.js +28 -61
- package/lib/tooltip/index.js +123 -137
- package/lib/tooltip/style/index.js +26 -47
- package/lib/tour/index.js +15 -21
- package/lib/tour/interface.js +14 -21
- package/lib/transfer/index.js +15 -21
- package/lib/transfer/interface.js +14 -21
- package/lib/tree/index.js +15 -21
- package/lib/tree-select/index.js +67 -85
- package/lib/tree-select/style/index.js +9 -31
- package/lib/typography/Link.js +54 -68
- package/lib/typography/Paragraph.js +54 -68
- package/lib/typography/Text.js +55 -68
- package/lib/typography/Title.js +54 -68
- package/lib/typography/hooks/useClassName.js +12 -43
- package/lib/typography/index.js +89 -58
- package/lib/typography/style/index.js +29 -45
- package/lib/upload/index.js +15 -21
- package/lib/upload/interface.js +14 -21
- package/lib/watermark/index.js +15 -21
- package/package.json +3 -3
package/lib/calendar/index.js
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";
|
|
15
2
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
module.exports = __toCommonJS(calendar_exports);
|
|
19
|
-
__reExport(calendar_exports, require("antd/es/calendar"), module.exports);
|
|
20
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
21
|
-
0 && (module.exports = {
|
|
22
|
-
...require("antd/es/calendar")
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
23
5
|
});
|
|
6
|
+
var _calendar = require("antd/es/calendar");
|
|
7
|
+
Object.keys(_calendar).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _calendar[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _calendar[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
"use client";
|
package/lib/card/Card.js
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";
|
|
15
2
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
module.exports = __toCommonJS(Card_exports);
|
|
19
|
-
__reExport(Card_exports, require("antd/es/card/Card"), module.exports);
|
|
20
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
21
|
-
0 && (module.exports = {
|
|
22
|
-
...require("antd/es/card/Card")
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
23
5
|
});
|
|
6
|
+
var _Card = require("antd/es/card/Card");
|
|
7
|
+
Object.keys(_Card).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Card[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _Card[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
package/lib/card/index.js
CHANGED
|
@@ -1,261 +1,252 @@
|
|
|
1
|
-
|
|
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";
|
|
29
2
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
__export(card_exports, {
|
|
33
|
-
default: () => card_default
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
34
5
|
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
documentLink,
|
|
166
|
-
documentClick,
|
|
167
|
-
collapsed,
|
|
168
|
-
prefixCls,
|
|
169
|
-
token,
|
|
170
|
-
handleCollapse,
|
|
171
|
-
cardLocale.viewDocument
|
|
172
|
-
]);
|
|
173
|
-
const noBodyHorizontalPadding = (0, import_util2.isHorizontalPaddingZero)(bodyStyle == null ? void 0 : bodyStyle.padding) || (0, import_util2.isHorizontalPaddingZero)((_a = styles == null ? void 0 : styles.body) == null ? void 0 : _a.padding);
|
|
174
|
-
const cardCls = (0, import_classnames.default)(
|
|
175
|
-
{
|
|
176
|
-
[`${prefixCls}-has-head`]: !!(title || extra || tabList || tabBarExtraContent),
|
|
177
|
-
[`${prefixCls}-no-divider`]: !divided,
|
|
178
|
-
[`${prefixCls}-gray`]: gray,
|
|
179
|
-
[`${prefixCls}-no-body-horizontal-padding`]: noBodyHorizontalPadding,
|
|
180
|
-
[`${prefixCls}-collapsible`]: collapsible,
|
|
181
|
-
[`${prefixCls}-collapsed`]: collapsed
|
|
182
|
-
},
|
|
183
|
-
className
|
|
184
|
-
);
|
|
185
|
-
const newTabList = tabList == null ? void 0 : tabList.map((item) => {
|
|
186
|
-
if (!(0, import_util.isNullValue)(item.tag)) {
|
|
187
|
-
return {
|
|
188
|
-
...item,
|
|
189
|
-
tab: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 4, children: [
|
|
190
|
-
item.tab,
|
|
191
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Tag, { bordered: false, className: `${tabsPrefixCls}-tab-tag`, children: item.tag })
|
|
192
|
-
] })
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
return item;
|
|
6
|
+
var _exportNames = {};
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = require("@inline-svg-unique-id/react");
|
|
9
|
+
var _util = require("@oceanbase/util");
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
+
var _react2 = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _icons = require("@oceanbase/icons");
|
|
14
|
+
var _configProvider = _interopRequireDefault(require("../config-provider"));
|
|
15
|
+
var _enUS = _interopRequireDefault(require("../locale/en-US"));
|
|
16
|
+
var _util2 = require("../_util");
|
|
17
|
+
var _theme = _interopRequireDefault(require("../theme"));
|
|
18
|
+
var _style = _interopRequireWildcard(require("./style"));
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
+
var _Card = require("antd/es/card/Card");
|
|
21
|
+
Object.keys(_Card).forEach(function (key) {
|
|
22
|
+
if (key === "default" || key === "__esModule") return;
|
|
23
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
24
|
+
if (key in exports && exports[key] === _Card[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _Card[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
var _card = require("antd/es/card");
|
|
33
|
+
Object.keys(_card).forEach(function (key) {
|
|
34
|
+
if (key === "default" || key === "__esModule") return;
|
|
35
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
36
|
+
if (key in exports && exports[key] === _card[key]) return;
|
|
37
|
+
Object.defineProperty(exports, key, {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () {
|
|
40
|
+
return _card[key];
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
45
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
46
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
47
|
+
"use client";
|
|
48
|
+
const Card = /*#__PURE__*/_react2.default.forwardRef(({
|
|
49
|
+
children,
|
|
50
|
+
size,
|
|
51
|
+
title,
|
|
52
|
+
subTitle,
|
|
53
|
+
document,
|
|
54
|
+
extra,
|
|
55
|
+
tabList,
|
|
56
|
+
tabProps,
|
|
57
|
+
tabBarExtraContent,
|
|
58
|
+
divided: outerDivided,
|
|
59
|
+
gray,
|
|
60
|
+
prefixCls: customizePrefixCls,
|
|
61
|
+
bodyStyle,
|
|
62
|
+
styles,
|
|
63
|
+
className,
|
|
64
|
+
collapsible,
|
|
65
|
+
defaultCollapsed,
|
|
66
|
+
collapsed: outerCollapsed,
|
|
67
|
+
onCollapse,
|
|
68
|
+
locale: customLocale,
|
|
69
|
+
...restProps
|
|
70
|
+
}, ref) => {
|
|
71
|
+
const {
|
|
72
|
+
getPrefixCls,
|
|
73
|
+
card: contextCard,
|
|
74
|
+
locale: contextLocale
|
|
75
|
+
} = (0, _react2.useContext)(_configProvider.default.ConfigContext);
|
|
76
|
+
const {
|
|
77
|
+
token
|
|
78
|
+
} = _theme.default.useToken();
|
|
79
|
+
const divided = outerDivided ?? contextCard?.divided ?? true;
|
|
80
|
+
const cardLocale = {
|
|
81
|
+
..._enUS.default.Card,
|
|
82
|
+
...contextLocale?.Card,
|
|
83
|
+
...customLocale
|
|
84
|
+
};
|
|
85
|
+
const prefixCls = getPrefixCls('card', customizePrefixCls);
|
|
86
|
+
const tabsPrefixCls = getPrefixCls('tabs', customizePrefixCls);
|
|
87
|
+
const [wrapCSSVar] = (0, _style.default)(prefixCls, tabsPrefixCls);
|
|
88
|
+
const [internalCollapsed, setInternalCollapsed] = (0, _react2.useState)(defaultCollapsed ?? false);
|
|
89
|
+
const collapsed = outerCollapsed !== undefined ? outerCollapsed : internalCollapsed;
|
|
90
|
+
const handleCollapse = (0, _react2.useCallback)(() => {
|
|
91
|
+
const newCollapsed = !collapsed;
|
|
92
|
+
if (outerCollapsed === undefined) {
|
|
93
|
+
setInternalCollapsed(newCollapsed);
|
|
94
|
+
}
|
|
95
|
+
onCollapse?.(newCollapsed);
|
|
96
|
+
}, [collapsed, outerCollapsed, onCollapse]);
|
|
97
|
+
const documentLink = typeof document === 'string' ? document : undefined;
|
|
98
|
+
const documentClick = typeof document === 'function' ? document : undefined;
|
|
99
|
+
const cardTitle = (0, _react2.useMemo)(() => {
|
|
100
|
+
if (!collapsible && !subTitle && !document) {
|
|
101
|
+
return title;
|
|
102
|
+
}
|
|
103
|
+
if (!title) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
const titleContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
107
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
108
|
+
className: `${prefixCls}-title-content`,
|
|
109
|
+
children: title
|
|
110
|
+
}), (subTitle || document) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
111
|
+
className: `${prefixCls}-sub-title-wrapper`,
|
|
112
|
+
size: "small",
|
|
113
|
+
children: [subTitle && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
114
|
+
className: `${prefixCls}-sub-title`,
|
|
115
|
+
children: subTitle
|
|
116
|
+
}), document && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
117
|
+
size: "small",
|
|
118
|
+
children: [document && /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Divider, {
|
|
119
|
+
type: "vertical",
|
|
120
|
+
className: `${prefixCls}-document-divider`
|
|
121
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tooltip, {
|
|
122
|
+
title: cardLocale.viewDocument,
|
|
123
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
124
|
+
href: documentLink,
|
|
125
|
+
target: "_blank",
|
|
126
|
+
rel: "noopener noreferrer",
|
|
127
|
+
onClick: documentClick,
|
|
128
|
+
className: `${prefixCls}-document-icon`,
|
|
129
|
+
children: documentLink || documentClick ? /*#__PURE__*/(0, _jsxRuntime.jsx)(DocumentIcon, {
|
|
130
|
+
className: `${prefixCls}-document-default-icon`
|
|
131
|
+
}) : document
|
|
132
|
+
})
|
|
133
|
+
})]
|
|
134
|
+
})]
|
|
135
|
+
})]
|
|
196
136
|
});
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
{
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
137
|
+
if (!collapsible) {
|
|
138
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
139
|
+
className: `${prefixCls}-title-wrapper`,
|
|
140
|
+
style: {
|
|
141
|
+
display: 'flex',
|
|
142
|
+
alignItems: 'center'
|
|
143
|
+
},
|
|
144
|
+
children: titleContent
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
148
|
+
className: `${prefixCls}-title-wrapper`,
|
|
149
|
+
onClick: handleCollapse,
|
|
150
|
+
style: {
|
|
151
|
+
cursor: 'pointer',
|
|
152
|
+
display: 'flex',
|
|
153
|
+
alignItems: 'center'
|
|
154
|
+
},
|
|
155
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.CaretRightFilled, {
|
|
156
|
+
className: `${prefixCls}-collapsible-icon`,
|
|
157
|
+
style: {
|
|
158
|
+
transition: `transform ${token.motionDurationMid}`,
|
|
159
|
+
transform: collapsed ? undefined : 'rotate(90deg)',
|
|
160
|
+
color: token.colorIcon,
|
|
161
|
+
marginRight: token.marginXS
|
|
219
162
|
}
|
|
220
|
-
)
|
|
221
|
-
);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
{
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
{
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", { id: "clip0_61186_2038", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
248
|
-
]
|
|
163
|
+
}), titleContent]
|
|
164
|
+
});
|
|
165
|
+
}, [collapsible, title, subTitle, document, documentLink, documentClick, collapsed, prefixCls, token, handleCollapse, cardLocale.viewDocument]);
|
|
166
|
+
|
|
167
|
+
// card body no horizontal padding
|
|
168
|
+
const noBodyHorizontalPadding = (0, _util2.isHorizontalPaddingZero)(bodyStyle?.padding) || (0, _util2.isHorizontalPaddingZero)(styles?.body?.padding);
|
|
169
|
+
const cardCls = (0, _classnames.default)({
|
|
170
|
+
[`${prefixCls}-has-head`]: !!(title || extra || tabList || tabBarExtraContent),
|
|
171
|
+
[`${prefixCls}-no-divider`]: !divided,
|
|
172
|
+
[`${prefixCls}-gray`]: gray,
|
|
173
|
+
[`${prefixCls}-no-body-horizontal-padding`]: noBodyHorizontalPadding,
|
|
174
|
+
[`${prefixCls}-collapsible`]: collapsible,
|
|
175
|
+
[`${prefixCls}-collapsed`]: collapsed
|
|
176
|
+
}, className);
|
|
177
|
+
const newTabList = tabList?.map(item => {
|
|
178
|
+
if (!(0, _util.isNullValue)(item.tag)) {
|
|
179
|
+
return {
|
|
180
|
+
...item,
|
|
181
|
+
tab: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
182
|
+
size: 4,
|
|
183
|
+
children: [item.tab, /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tag, {
|
|
184
|
+
bordered: false,
|
|
185
|
+
className: `${tabsPrefixCls}-tab-tag`,
|
|
186
|
+
children: item.tag
|
|
187
|
+
})]
|
|
188
|
+
})
|
|
189
|
+
};
|
|
249
190
|
}
|
|
250
|
-
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
191
|
+
return item;
|
|
192
|
+
});
|
|
193
|
+
return wrapCSSVar( /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Card, {
|
|
194
|
+
ref: ref,
|
|
195
|
+
size: size,
|
|
196
|
+
title: cardTitle,
|
|
197
|
+
extra: extra,
|
|
198
|
+
tabList: newTabList,
|
|
199
|
+
tabBarExtraContent: tabBarExtraContent,
|
|
200
|
+
tabProps: {
|
|
201
|
+
size: size === 'small' ? 'small' : 'middle',
|
|
202
|
+
...tabProps
|
|
203
|
+
},
|
|
204
|
+
prefixCls: customizePrefixCls,
|
|
205
|
+
bodyStyle: {
|
|
206
|
+
...bodyStyle
|
|
207
|
+
},
|
|
208
|
+
styles: styles,
|
|
209
|
+
className: cardCls,
|
|
210
|
+
...restProps,
|
|
211
|
+
children: children
|
|
212
|
+
}));
|
|
261
213
|
});
|
|
214
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
215
|
+
Card.displayName = _antd.Card.displayName;
|
|
216
|
+
}
|
|
217
|
+
const DocumentIcon = function ({
|
|
218
|
+
className
|
|
219
|
+
}) {
|
|
220
|
+
const _id = (0, _react.useUniqueInlineId)();
|
|
221
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
222
|
+
width: "16",
|
|
223
|
+
height: "16",
|
|
224
|
+
viewBox: "0 0 16 16",
|
|
225
|
+
fill: "none",
|
|
226
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
227
|
+
className: className,
|
|
228
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
229
|
+
clipPath: `url(#${_id})`,
|
|
230
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
231
|
+
d: "M7.99992 4.66667C7.99992 3.95942 7.71897 3.28115 7.21887 2.78105C6.71877 2.28095 6.0405 2 5.33325 2H1.33325V12H5.99992C6.53035 12 7.03906 12.2107 7.41413 12.5858C7.78921 12.9609 7.99992 13.4696 7.99992 14M7.99992 4.66667V14M7.99992 4.66667C7.99992 3.95942 8.28087 3.28115 8.78097 2.78105C9.28106 2.28095 9.95934 2 10.6666 2H14.6666V12H9.99992C9.46949 12 8.96078 12.2107 8.5857 12.5858C8.21063 12.9609 7.99992 13.4696 7.99992 14",
|
|
232
|
+
stroke: "currentColor",
|
|
233
|
+
strokeLinecap: "round",
|
|
234
|
+
strokeLinejoin: "round"
|
|
235
|
+
})
|
|
236
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("defs", {
|
|
237
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("clipPath", {
|
|
238
|
+
id: _id,
|
|
239
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
|
|
240
|
+
width: "16",
|
|
241
|
+
height: "16",
|
|
242
|
+
fill: "white"
|
|
243
|
+
})
|
|
244
|
+
})
|
|
245
|
+
})]
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
var _default = exports.default = Object.assign(Card, {
|
|
249
|
+
Grid: _antd.Card.Grid,
|
|
250
|
+
Meta: _antd.Card.Meta,
|
|
251
|
+
genTableStyle: _style.genTableStyle
|
|
252
|
+
});
|