@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
|
@@ -16,28 +16,33 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// src/
|
|
20
|
-
var
|
|
21
|
-
__export(
|
|
22
|
-
|
|
19
|
+
// src/input-number/style/index.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
default: () => style_default,
|
|
23
|
+
genInputStyle: () => genInputStyle
|
|
23
24
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
25
|
-
var
|
|
25
|
+
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
|
+
var genInputStyle = (token) => {
|
|
28
|
+
const { antCls, componentCls } = token;
|
|
29
|
+
const selectComponentCls = `${antCls}-select-selector`;
|
|
26
30
|
return {
|
|
27
|
-
[
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
borderStartStartRadius: 0,
|
|
36
|
-
borderEndStartRadius: 0
|
|
31
|
+
[`${componentCls}-group-wrapper`]: {
|
|
32
|
+
[`${componentCls}-group-addon`]: {
|
|
33
|
+
color: token.colorTextTertiary,
|
|
34
|
+
fontSize: token.fontSizeSM,
|
|
35
|
+
[selectComponentCls]: {
|
|
36
|
+
color: token.colorTextTertiary
|
|
37
|
+
}
|
|
38
|
+
}
|
|
37
39
|
}
|
|
38
40
|
};
|
|
39
41
|
};
|
|
42
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("InputNumber", (token) => {
|
|
43
|
+
return [genInputStyle(token)];
|
|
44
|
+
});
|
|
40
45
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
46
|
0 && (module.exports = {
|
|
42
|
-
|
|
47
|
+
genInputStyle
|
|
43
48
|
});
|
package/lib/list/index.js
CHANGED
|
@@ -33,14 +33,15 @@ __export(list_exports, {
|
|
|
33
33
|
default: () => list_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(list_exports);
|
|
36
|
-
var import_react =
|
|
36
|
+
var import_react = require("react");
|
|
37
37
|
var import_antd = require("antd");
|
|
38
38
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
39
39
|
__reExport(list_exports, require("antd/es/list"), module.exports);
|
|
40
40
|
__reExport(list_exports, require("antd/es/list/Item"), module.exports);
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
42
|
function List({ pagination, ...restProps }) {
|
|
42
43
|
const extendedContext = (0, import_react.useContext)(import_config_provider.default.ExtendedConfigContext);
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
44
45
|
import_antd.List,
|
|
45
46
|
{
|
|
46
47
|
...restProps,
|
package/lib/locale/en-US.js
CHANGED
package/lib/locale/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { InputNumberLocale } from '../input-number';
|
|
|
6
6
|
import type { SelectLocale } from '../select';
|
|
7
7
|
import type { TreeSelectLocale } from '../tree-select';
|
|
8
8
|
import type { TableLocale } from '../table';
|
|
9
|
+
import type { CardLocale } from '../card';
|
|
9
10
|
export * from 'antd/es/locale';
|
|
10
11
|
export type GlobalLocale = AntLocale['global'] & {
|
|
11
12
|
inputPlaceholder?: string;
|
|
@@ -22,5 +23,6 @@ export interface Locale extends AntLocale {
|
|
|
22
23
|
Select?: SelectLocale;
|
|
23
24
|
TreeSelect?: TreeSelectLocale;
|
|
24
25
|
Table?: TableLocale;
|
|
26
|
+
Card?: CardLocale;
|
|
25
27
|
}
|
|
26
28
|
export { default as useLocale } from './useLocale';
|
|
@@ -0,0 +1,63 @@
|
|
|
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/locale/ja-JP.ts
|
|
30
|
+
var ja_JP_exports = {};
|
|
31
|
+
__export(ja_JP_exports, {
|
|
32
|
+
default: () => ja_JP_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ja_JP_exports);
|
|
35
|
+
var import_ja_JP = __toESM(require("antd/es/locale/ja_JP"));
|
|
36
|
+
var ja_JP_default = {
|
|
37
|
+
...import_ja_JP.default,
|
|
38
|
+
global: {
|
|
39
|
+
...import_ja_JP.default.global,
|
|
40
|
+
inputPlaceholder: "入力してください"
|
|
41
|
+
},
|
|
42
|
+
Pagination: {
|
|
43
|
+
...import_ja_JP.default.Pagination,
|
|
44
|
+
total: "合計 ${total} 件"
|
|
45
|
+
},
|
|
46
|
+
Drawer: {
|
|
47
|
+
okText: "OK",
|
|
48
|
+
cancelText: "キャンセル"
|
|
49
|
+
},
|
|
50
|
+
Table: {
|
|
51
|
+
...import_ja_JP.default.Table,
|
|
52
|
+
batchOperationBar: {
|
|
53
|
+
selected: "選択中",
|
|
54
|
+
object: "件",
|
|
55
|
+
cancel: "キャンセル",
|
|
56
|
+
collapse: "折りたたむ",
|
|
57
|
+
open: "展開"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
Card: {
|
|
61
|
+
viewDocument: "ドキュメントを見る"
|
|
62
|
+
}
|
|
63
|
+
};
|
package/lib/locale/zh-CN.js
CHANGED
package/lib/locale/zh-TW.js
CHANGED
package/lib/lottie/index.js
CHANGED
|
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_design = require("../index");
|
|
37
37
|
var import_ahooks = require("ahooks");
|
|
38
38
|
var import_classnames = __toESM(require("classnames"));
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
40
|
var Lottie = import_react.default.forwardRef(
|
|
40
41
|
({ mode = "default", loop = true, speed = 1, className, style, ...restProps }, ref) => {
|
|
41
42
|
const { iconPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
|
|
@@ -63,7 +64,7 @@ var Lottie = import_react.default.forwardRef(
|
|
|
63
64
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
64
65
|
animation
|
|
65
66
|
}));
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
68
|
"div",
|
|
68
69
|
{
|
|
69
70
|
ref: containerRef,
|
package/lib/modal/Modal.js
CHANGED
|
@@ -33,12 +33,14 @@ __export(Modal_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Modal_exports);
|
|
35
35
|
var import_antd = require("antd");
|
|
36
|
+
var import_icons = require("@oceanbase/icons");
|
|
36
37
|
var import_classnames = __toESM(require("classnames"));
|
|
37
|
-
var import_react =
|
|
38
|
+
var import_react = require("react");
|
|
38
39
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
39
40
|
var import_space = __toESM(require("../space"));
|
|
40
41
|
var import_static_function = require("../static-function");
|
|
41
42
|
var import_style = __toESM(require("./style"));
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
44
|
var Modal = ({
|
|
43
45
|
extra,
|
|
44
46
|
footer,
|
|
@@ -48,14 +50,17 @@ var Modal = ({
|
|
|
48
50
|
}) => {
|
|
49
51
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
50
52
|
const prefixCls = getPrefixCls("modal", customizePrefixCls);
|
|
51
|
-
const
|
|
53
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
52
54
|
const modalCls = (0, import_classnames.default)(className);
|
|
53
|
-
return
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
+
return wrapCSSVar(
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
57
|
import_antd.Modal,
|
|
56
58
|
{
|
|
57
59
|
destroyOnClose: true,
|
|
58
|
-
footer: footer === false ? null : extra ? (originNode) => /* @__PURE__ */
|
|
60
|
+
footer: footer === false ? null : extra ? (originNode) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-footer-content`, children: [
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-footer-extra`, children: extra }),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_space.default, { children: originNode })
|
|
63
|
+
] }) : footer,
|
|
59
64
|
prefixCls: customizePrefixCls,
|
|
60
65
|
className: modalCls,
|
|
61
66
|
...restProps
|
|
@@ -63,12 +68,31 @@ var Modal = ({
|
|
|
63
68
|
)
|
|
64
69
|
);
|
|
65
70
|
};
|
|
66
|
-
Modal.info = (props) => import_static_function.modal.info(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Modal.
|
|
71
|
+
Modal.info = (props) => import_static_function.modal.info({
|
|
72
|
+
// use outlined icon
|
|
73
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.InfoCircleOutlined, {}),
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
Modal.success = (props) => import_static_function.modal.success({
|
|
77
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CheckCircleOutlined, {}),
|
|
78
|
+
...props
|
|
79
|
+
});
|
|
80
|
+
Modal.error = (props) => import_static_function.modal.error({
|
|
81
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseCircleOutlined, {}),
|
|
82
|
+
...props
|
|
83
|
+
});
|
|
84
|
+
Modal.warning = (props) => import_static_function.modal.warning({
|
|
85
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ExclamationCircleOutlined, {}),
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
Modal.warn = (props) => import_static_function.modal.warning({
|
|
89
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ExclamationCircleOutlined, {}),
|
|
90
|
+
...props
|
|
91
|
+
});
|
|
92
|
+
Modal.confirm = (props) => import_static_function.modal.confirm({
|
|
93
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ExclamationCircleOutlined, {}),
|
|
94
|
+
...props
|
|
95
|
+
});
|
|
72
96
|
Modal.useModal = import_antd.Modal.useModal;
|
|
73
97
|
Modal.destroyAll = import_antd.Modal.destroyAll;
|
|
74
98
|
Modal.config = import_antd.Modal.config;
|
package/lib/modal/Progress.js
CHANGED
|
@@ -32,12 +32,13 @@ __export(Progress_exports, {
|
|
|
32
32
|
default: () => Progress_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Progress_exports);
|
|
35
|
-
var import_react =
|
|
35
|
+
var import_react = require("react");
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
38
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
39
39
|
var import_Modal = __toESM(require("./Modal"));
|
|
40
40
|
var import_icons = require("@oceanbase/icons");
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
42
|
var Progress = ({
|
|
42
43
|
prefixCls: customizePrefixCls,
|
|
43
44
|
className,
|
|
@@ -52,7 +53,7 @@ var Progress = ({
|
|
|
52
53
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
53
54
|
const prefixCls = getPrefixCls("modal", customizePrefixCls);
|
|
54
55
|
const progressModalCls = (0, import_classnames.default)(`${prefixCls}-progress`, className);
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
57
|
import_Modal.default,
|
|
57
58
|
{
|
|
58
59
|
prefixCls: customizePrefixCls,
|
|
@@ -60,9 +61,12 @@ var Progress = ({
|
|
|
60
61
|
width,
|
|
61
62
|
maskClosable,
|
|
62
63
|
footer,
|
|
63
|
-
...restProps
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
...restProps,
|
|
65
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
66
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, { className: `${prefixCls}-progress-loading` }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Progress, { type: "circle", size: 200, ...progress }),
|
|
67
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-progress-description`, children: description })
|
|
68
|
+
] })
|
|
69
|
+
}
|
|
66
70
|
);
|
|
67
71
|
};
|
|
68
72
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -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 ModalToken = FullToken<'Modal'>;
|
|
4
4
|
export declare const genModalStyle: GenerateStyle<ModalToken>;
|
|
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;
|
package/lib/modal/style/index.js
CHANGED
|
@@ -28,25 +28,60 @@ var genModalStyle = (token) => {
|
|
|
28
28
|
const {
|
|
29
29
|
antCls,
|
|
30
30
|
componentCls,
|
|
31
|
-
marginXXS,
|
|
32
31
|
marginLG,
|
|
33
|
-
paddingMD,
|
|
34
|
-
borderRadius,
|
|
35
|
-
controlHeight,
|
|
36
32
|
fontSizeHeading5,
|
|
37
|
-
lineHeightHeading5
|
|
33
|
+
lineHeightHeading5,
|
|
34
|
+
fontSizeHeading3,
|
|
35
|
+
colorSplit,
|
|
36
|
+
calc
|
|
38
37
|
} = token;
|
|
39
38
|
const top = 100;
|
|
40
39
|
const bottom = 100;
|
|
41
|
-
const titleHeight = fontSizeHeading5
|
|
40
|
+
const titleHeight = calc(fontSizeHeading5).mul(lineHeightHeading5).equal();
|
|
42
41
|
return {
|
|
43
42
|
/* Modal */
|
|
44
|
-
[`${componentCls}:not(${componentCls}-confirm)`]: {
|
|
45
|
-
[`${componentCls}-
|
|
46
|
-
|
|
43
|
+
[`${componentCls}:not(${componentCls}-confirm):not(${componentCls}-progress)`]: {
|
|
44
|
+
[`${componentCls}-content`]: {
|
|
45
|
+
paddingBlock: token.padding,
|
|
46
|
+
[`${componentCls}-close`]: {
|
|
47
|
+
marginTop: token.marginXXS,
|
|
48
|
+
marginRight: token.marginXXS
|
|
49
|
+
},
|
|
50
|
+
[`${componentCls}-header`]: {
|
|
51
|
+
position: "relative",
|
|
52
|
+
marginBottom: 0,
|
|
53
|
+
paddingBottom: token.padding,
|
|
54
|
+
[`${componentCls}-title`]: {
|
|
55
|
+
fontSize: fontSizeHeading3
|
|
56
|
+
},
|
|
57
|
+
// 使用伪元素创建贯通的分割线
|
|
58
|
+
"&::after": {
|
|
59
|
+
content: '""',
|
|
60
|
+
position: "absolute",
|
|
61
|
+
bottom: 0,
|
|
62
|
+
left: 0,
|
|
63
|
+
right: 0,
|
|
64
|
+
height: "1px",
|
|
65
|
+
backgroundColor: colorSplit,
|
|
66
|
+
// antd Modal content默认padding通常是24px,使用负margin让分割线贯通
|
|
67
|
+
// 如果antd使用其他padding值,可能需要调整
|
|
68
|
+
marginLeft: calc(token.paddingLG).mul(-1).equal(),
|
|
69
|
+
marginRight: calc(token.paddingLG).mul(-1).equal()
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
[`${componentCls}-body`]: {
|
|
73
|
+
paddingTop: token.paddingLG,
|
|
74
|
+
marginInline: calc(token.marginLG).mul(-1).equal(),
|
|
75
|
+
paddingInline: token.paddingLG
|
|
76
|
+
}
|
|
47
77
|
},
|
|
48
78
|
[`${componentCls}-footer`]: {
|
|
49
|
-
|
|
79
|
+
paddingTop: token.paddingLG,
|
|
80
|
+
marginTop: 0,
|
|
81
|
+
[`${antCls}-btn`]: {
|
|
82
|
+
height: 28,
|
|
83
|
+
minHeight: 28
|
|
84
|
+
},
|
|
50
85
|
[`${componentCls}-footer-content`]: {
|
|
51
86
|
display: "flex",
|
|
52
87
|
justifyContent: "space-between",
|
|
@@ -62,12 +97,16 @@ var genModalStyle = (token) => {
|
|
|
62
97
|
/* Modal.Progress */
|
|
63
98
|
[`${componentCls}${componentCls}-progress`]: {
|
|
64
99
|
[`${componentCls}-content`]: {
|
|
65
|
-
padding:
|
|
100
|
+
padding: token.paddingLG,
|
|
101
|
+
[`${componentCls}-close`]: {
|
|
102
|
+
marginTop: token.marginSM,
|
|
103
|
+
marginRight: token.marginXXS
|
|
104
|
+
},
|
|
66
105
|
[`${componentCls}-header`]: {
|
|
67
106
|
textAlign: "center",
|
|
68
107
|
marginBottom: token.marginXXL,
|
|
69
108
|
[`${componentCls}-title`]: {
|
|
70
|
-
fontSize:
|
|
109
|
+
fontSize: fontSizeHeading3
|
|
71
110
|
}
|
|
72
111
|
},
|
|
73
112
|
[`${componentCls}-body`]: {
|
|
@@ -86,28 +125,46 @@ var genModalStyle = (token) => {
|
|
|
86
125
|
}
|
|
87
126
|
},
|
|
88
127
|
[`${componentCls}-footer`]: {
|
|
89
|
-
textAlign: "center"
|
|
128
|
+
textAlign: "center",
|
|
129
|
+
[`${antCls}-btn`]: {
|
|
130
|
+
height: 28,
|
|
131
|
+
minHeight: 28
|
|
132
|
+
}
|
|
90
133
|
}
|
|
91
134
|
}
|
|
92
135
|
},
|
|
93
136
|
/* Modal.method() */
|
|
94
137
|
[`${componentCls}-confirm`]: {
|
|
95
|
-
[`${componentCls}-
|
|
96
|
-
|
|
97
|
-
color: token.colorTextSecondary
|
|
138
|
+
[`${componentCls}-content`]: {
|
|
139
|
+
padding: token.paddingLG
|
|
98
140
|
},
|
|
99
|
-
[`${componentCls}-
|
|
100
|
-
|
|
141
|
+
[`${componentCls}-body`]: {
|
|
142
|
+
[`${componentCls}-confirm-title`]: {
|
|
143
|
+
fontSize: fontSizeHeading3
|
|
144
|
+
},
|
|
145
|
+
[`${componentCls}-confirm-body > ${token.iconCls}`]: {
|
|
146
|
+
height: calc(token.fontSizeHeading3).mul(token.lineHeight).equal()
|
|
147
|
+
},
|
|
148
|
+
[`${componentCls}-confirm-paragraph`]: {
|
|
149
|
+
rowGap: token.marginSM
|
|
150
|
+
},
|
|
151
|
+
[`${componentCls}-confirm-content`]: {
|
|
152
|
+
color: token.colorTextSecondary
|
|
153
|
+
},
|
|
154
|
+
[`${componentCls}-confirm-btns`]: {
|
|
155
|
+
marginTop: marginLG,
|
|
156
|
+
[`${antCls}-btn`]: {
|
|
157
|
+
height: 28,
|
|
158
|
+
minHeight: 28
|
|
159
|
+
}
|
|
160
|
+
}
|
|
101
161
|
}
|
|
102
162
|
}
|
|
103
163
|
};
|
|
104
164
|
};
|
|
105
|
-
var style_default = (
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
});
|
|
109
|
-
return useStyle(prefixCls);
|
|
110
|
-
};
|
|
165
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Modal", (token) => {
|
|
166
|
+
return [genModalStyle(token)];
|
|
167
|
+
});
|
|
111
168
|
// Annotate the CommonJS export names for ESM import in node:
|
|
112
169
|
0 && (module.exports = {
|
|
113
170
|
genModalStyle
|
package/lib/radio/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(radio_exports, require("antd/es/radio"), module.exports);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
var InternalRadio = 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("radio", customizePrefixCls);
|
|
46
|
-
const
|
|
47
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
47
48
|
const radioCls = (0, import_classnames.default)(className);
|
|
48
|
-
return
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
return wrapCSSVar(
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Radio, { ref, prefixCls: customizePrefixCls, className: radioCls, ...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 RadioToken = FullToken<'Radio'>;
|
|
4
4
|
export declare const genRadioStyle: GenerateStyle<RadioToken>;
|
|
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;
|
package/lib/radio/style/index.js
CHANGED
|
@@ -25,24 +25,33 @@ __export(style_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
26
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
27
|
var genRadioStyle = (token) => {
|
|
28
|
-
const { componentCls, radioSize, fontSize, fontSizeLG, lineHeight } = token;
|
|
28
|
+
const { componentCls, radioSize, fontSize, fontSizeLG, lineHeight, calc } = token;
|
|
29
|
+
const marginBottom = calc(calc(fontSize).mul(lineHeight).equal()).sub(radioSize || fontSizeLG).div(-2).equal();
|
|
29
30
|
return {
|
|
30
31
|
[`${componentCls}-wrapper`]: {
|
|
31
32
|
[`${componentCls}`]: {
|
|
32
33
|
alignSelf: "baseline",
|
|
33
34
|
[`${componentCls}-inner`]: {
|
|
34
|
-
marginBottom
|
|
35
|
+
marginBottom
|
|
35
36
|
}
|
|
37
|
+
},
|
|
38
|
+
[`&:hover ${componentCls}:not(${componentCls}-disabled):not(${componentCls}-checked) ${componentCls}-inner`]: {
|
|
39
|
+
borderColor: token.gray7
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
[`${componentCls}-group`]: {
|
|
43
|
+
[`${componentCls}-button-wrapper:not(${componentCls}-button-wrapper-disabled):not(${componentCls}-button-wrapper-checked):hover`]: {
|
|
44
|
+
// set zIndex to 1 for hover effect to cover checked effect
|
|
45
|
+
zIndex: 1,
|
|
46
|
+
borderColor: token.gray7,
|
|
47
|
+
color: token.colorText
|
|
36
48
|
}
|
|
37
49
|
}
|
|
38
50
|
};
|
|
39
51
|
};
|
|
40
|
-
var style_default = (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
});
|
|
44
|
-
return useStyle(prefixCls);
|
|
45
|
-
};
|
|
52
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Radio", (token) => {
|
|
53
|
+
return [genRadioStyle(token)];
|
|
54
|
+
});
|
|
46
55
|
// Annotate the CommonJS export names for ESM import in node:
|
|
47
56
|
0 && (module.exports = {
|
|
48
57
|
genRadioStyle
|