@oceanbase/design 1.0.0-alpha.2 → 1.0.0-alpha.4
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/genComponentStyleHook.d.ts +2 -2
- package/es/_util/genComponentStyleHook.js +15 -2
- package/es/alert/index.d.ts +2 -2
- package/es/alert/index.js +13 -4
- package/es/alert/style/index.d.ts +1 -1
- package/es/alert/style/index.js +152 -58
- package/es/app/index.d.ts +8 -0
- package/es/app/index.js +36 -1
- package/es/app/style/index.d.ts +9 -0
- package/es/{_util/genStyle.js → app/style/index.js} +10 -11
- package/es/badge/index.js +2 -3
- package/es/badge/style/index.d.ts +1 -1
- package/es/badge/style/index.js +1 -3
- package/es/button/style/index.d.ts +1 -1
- package/es/card/index.d.ts +4 -0
- package/es/card/index.js +64 -7
- package/es/card/style/index.d.ts +1 -1
- package/es/card/style/index.js +32 -8
- package/es/checkbox/style/index.d.ts +1 -1
- package/es/config-provider/context.d.ts +11 -0
- package/es/config-provider/context.js +2 -1
- package/es/config-provider/index.d.ts +2 -2
- package/es/config-provider/index.js +57 -34
- package/es/descriptions/style/index.d.ts +1 -1
- package/es/drawer/index.js +7 -5
- package/es/drawer/style/index.d.ts +1 -1
- package/es/drawer/style/index.js +31 -9
- package/es/empty/index.js +1 -1
- package/es/empty/style/index.d.ts +1 -1
- package/es/form/FormItem.d.ts +2 -1
- package/es/form/FormItem.js +14 -4
- package/es/form/style/index.d.ts +1 -1
- package/es/form/style/index.js +13 -2
- package/es/index.d.ts +4 -2
- package/es/index.js +1 -0
- package/es/input-number/index.d.ts +2 -1
- package/es/locale/ja-JP.d.ts +3 -0
- package/es/locale/ja-JP.js +28 -0
- package/es/modal/Modal.js +20 -6
- package/es/modal/style/index.d.ts +1 -1
- package/es/modal/style/index.js +62 -19
- package/es/radio/style/index.d.ts +1 -1
- package/es/result/index.d.ts +2 -2
- package/es/result/index.js +5 -4
- package/es/result/style/index.d.ts +1 -1
- package/es/select/style/index.d.ts +1 -1
- package/es/slider/style/index.d.ts +1 -1
- package/es/space/style/index.d.ts +1 -1
- package/es/spin/style/index.d.ts +1 -1
- package/es/static-function/index.js +13 -4
- package/es/switch/style/index.d.ts +1 -1
- package/es/table/style/index.d.ts +1 -1
- package/es/table/style/index.js +3 -4
- package/es/tabs/style/index.d.ts +1 -1
- package/es/tabs/style/index.js +4 -2
- package/es/tag/index.d.ts +1 -0
- package/es/tag/index.js +3 -2
- package/es/tag/style/index.d.ts +2 -4
- package/es/tag/style/index.js +20 -31
- package/es/theme/dark.d.ts +1 -48
- package/es/theme/default.d.ts +4 -2
- package/es/theme/default.js +59 -28
- package/es/theme/index.d.ts +20 -57
- package/es/theme/interface.d.ts +66 -0
- package/es/theme/interface.js +4 -1
- package/es/theme/style/aliyun.less +40 -40
- package/es/theme/style/compact.less +79 -72
- package/es/theme/style/dark.less +53 -53
- package/es/theme/style/default.less +79 -72
- package/es/tooltip/style/index.d.ts +1 -1
- package/es/tree-select/style/index.d.ts +1 -1
- package/lib/_util/genComponentStyleHook.d.ts +2 -2
- package/lib/_util/genComponentStyleHook.js +20 -4
- package/lib/alert/index.d.ts +2 -2
- package/lib/alert/index.js +18 -9
- package/lib/alert/style/index.d.ts +1 -1
- package/lib/alert/style/index.js +170 -71
- package/lib/app/index.d.ts +8 -0
- package/lib/app/index.js +36 -1
- package/lib/app/style/index.d.ts +9 -0
- package/lib/{_util/getWeakenBorderColor.js → app/style/index.js} +20 -10
- package/lib/badge/index.js +23 -20
- package/lib/badge/style/index.d.ts +1 -1
- package/lib/badge/style/index.js +1 -3
- package/lib/button/index.js +2 -1
- package/lib/button/style/index.d.ts +1 -1
- package/lib/card/index.d.ts +4 -0
- package/lib/card/index.js +70 -9
- package/lib/card/style/index.d.ts +1 -1
- package/lib/card/style/index.js +56 -10
- package/lib/checkbox/index.js +2 -1
- package/lib/checkbox/style/index.d.ts +1 -1
- package/lib/config-provider/DefaultRenderEmpty.js +4 -3
- package/lib/config-provider/context.d.ts +11 -0
- package/lib/config-provider/index.d.ts +2 -2
- package/lib/config-provider/index.js +70 -26
- package/lib/descriptions/hooks/useItems.js +5 -4
- package/lib/descriptions/index.js +3 -2
- package/lib/descriptions/style/index.d.ts +1 -1
- package/lib/drawer/index.js +44 -33
- package/lib/drawer/style/index.d.ts +1 -1
- package/lib/drawer/style/index.js +33 -6
- package/lib/dropdown/dropdown-button.js +3 -13
- package/lib/dropdown/index.js +2 -2
- 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 +23 -18
- package/lib/empty/style/index.d.ts +1 -1
- package/lib/form/FormItem.d.ts +2 -1
- package/lib/form/FormItem.js +18 -6
- package/lib/form/index.js +6 -3
- package/lib/form/style/index.d.ts +1 -1
- package/lib/form/style/index.js +19 -0
- package/lib/grid/col.js +2 -1
- package/lib/grid/row.js +2 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.js +3 -0
- package/lib/input/Input.js +3 -2
- package/lib/input/Password.js +3 -2
- package/lib/input/Search.js +3 -2
- package/lib/input/TextArea.js +3 -2
- package/lib/input-number/index.d.ts +2 -1
- package/lib/input-number/index.js +2 -1
- package/lib/list/index.js +3 -2
- package/lib/locale/ja-JP.d.ts +3 -0
- package/lib/locale/ja-JP.js +60 -0
- package/lib/lottie/index.js +2 -1
- package/lib/modal/Modal.js +33 -9
- package/lib/modal/Progress.js +9 -5
- package/lib/modal/style/index.d.ts +1 -1
- package/lib/modal/style/index.js +76 -17
- package/lib/radio/index.js +2 -1
- package/lib/radio/style/index.d.ts +1 -1
- 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 +12 -11
- package/lib/result/style/index.d.ts +1 -1
- package/lib/segmented/index.js +8 -4
- package/lib/select/index.js +2 -1
- package/lib/select/style/index.d.ts +1 -1
- package/lib/slider/index.js +2 -1
- package/lib/slider/style/index.d.ts +1 -1
- package/lib/space/index.js +2 -1
- package/lib/space/style/index.d.ts +1 -1
- package/lib/spin/index.js +5 -4
- package/lib/spin/style/index.d.ts +1 -1
- package/lib/static-function/index.js +7 -1
- package/lib/switch/index.js +2 -1
- package/lib/switch/style/index.d.ts +1 -1
- package/lib/table/index.js +44 -31
- package/lib/table/style/index.d.ts +1 -1
- package/lib/table/style/index.js +3 -4
- package/lib/tabs/index.js +10 -5
- package/lib/tabs/style/index.d.ts +1 -1
- package/lib/tabs/style/index.js +5 -0
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/index.js +12 -6
- package/lib/tag/style/index.d.ts +2 -4
- package/lib/tag/style/index.js +20 -27
- package/lib/theme/dark.d.ts +1 -48
- package/lib/theme/default.d.ts +4 -2
- package/lib/theme/default.js +67 -27
- package/lib/theme/index.d.ts +20 -57
- package/lib/theme/interface.d.ts +66 -0
- package/lib/theme/style/aliyun.less +40 -40
- package/lib/theme/style/compact.less +79 -72
- package/lib/theme/style/dark.less +53 -53
- package/lib/theme/style/default.less +79 -72
- package/lib/tooltip/MouseTooltip.js +43 -39
- package/lib/tooltip/ReactStickyMouseTooltip.js +5 -4
- package/lib/tooltip/index.js +14 -10
- package/lib/tooltip/style/index.d.ts +1 -1
- package/lib/tree-select/index.js +2 -1
- package/lib/tree-select/style/index.d.ts +1 -1
- package/lib/typography/Link.js +5 -4
- package/lib/typography/Paragraph.js +5 -4
- package/lib/typography/Text.js +5 -4
- package/lib/typography/Title.js +5 -4
- package/package.json +7 -6
- package/es/_util/genStyle.d.ts +0 -2
- package/es/_util/getWeakenBorderColor.d.ts +0 -1
- package/es/_util/getWeakenBorderColor.js +0 -4
- package/lib/_util/genStyle.d.ts +0 -2
- package/lib/_util/genStyle.js +0 -43
- package/lib/_util/getWeakenBorderColor.d.ts +0 -1
package/lib/form/style/index.js
CHANGED
|
@@ -27,6 +27,12 @@ var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
|
27
27
|
var genFormStyle = (token) => {
|
|
28
28
|
const { componentCls } = token;
|
|
29
29
|
return {
|
|
30
|
+
[componentCls]: {
|
|
31
|
+
[`${componentCls}-item-extra`]: {
|
|
32
|
+
paddingTop: token.paddingXXS,
|
|
33
|
+
fontSize: token.fontSizeSM
|
|
34
|
+
}
|
|
35
|
+
},
|
|
30
36
|
[`${componentCls}${componentCls}-vertical`]: {
|
|
31
37
|
[`${componentCls}-item:not(${componentCls}-item-horizontal)`]: {
|
|
32
38
|
[`${componentCls}-item-label > label`]: {
|
|
@@ -36,6 +42,19 @@ var genFormStyle = (token) => {
|
|
|
36
42
|
right: 0
|
|
37
43
|
}
|
|
38
44
|
}
|
|
45
|
+
},
|
|
46
|
+
[`${componentCls}-item-has-description`]: {
|
|
47
|
+
[`${componentCls}-item-control-input`]: {
|
|
48
|
+
minHeight: "auto"
|
|
49
|
+
},
|
|
50
|
+
[`${componentCls}-item-label`]: {
|
|
51
|
+
paddingBottom: token.paddingXXS
|
|
52
|
+
},
|
|
53
|
+
[`${componentCls}-item-description`]: {
|
|
54
|
+
paddingBottom: token.paddingXXS + 2,
|
|
55
|
+
fontSize: token.fontSizeSM,
|
|
56
|
+
color: token.colorTextDescription
|
|
57
|
+
}
|
|
39
58
|
}
|
|
40
59
|
}
|
|
41
60
|
};
|
package/lib/grid/col.js
CHANGED
|
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(col_exports);
|
|
|
35
35
|
var React = __toESM(require("react"));
|
|
36
36
|
var import_useFlexGapSupport = __toESM(require("../_util/useFlexGapSupport"));
|
|
37
37
|
var import_antd = require("antd");
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
39
|
var Col = React.forwardRef((props, ref) => {
|
|
39
40
|
const { style, ...others } = props;
|
|
40
41
|
const supportFlexGap = (0, import_useFlexGapSupport.default)();
|
|
@@ -45,7 +46,7 @@ var Col = React.forwardRef((props, ref) => {
|
|
|
45
46
|
mergeStyle.paddingBottom = "8px";
|
|
46
47
|
mergeStyle.paddingTop = "8px";
|
|
47
48
|
}
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Col, { ref, style: mergeStyle, ...others });
|
|
49
50
|
});
|
|
50
51
|
if (process.env.NODE_ENV !== "production") {
|
|
51
52
|
Col.displayName = "Col";
|
package/lib/grid/row.js
CHANGED
|
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(row_exports);
|
|
|
35
35
|
var React = __toESM(require("react"));
|
|
36
36
|
var import_useFlexGapSupport = __toESM(require("../_util/useFlexGapSupport"));
|
|
37
37
|
var import_antd = require("antd");
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
39
|
var Row = React.forwardRef((props, ref) => {
|
|
39
40
|
const { style, ...others } = props;
|
|
40
41
|
const supportFlexGap = (0, import_useFlexGapSupport.default)();
|
|
@@ -45,7 +46,7 @@ var Row = React.forwardRef((props, ref) => {
|
|
|
45
46
|
mergeStyle.marginTop = "-8px";
|
|
46
47
|
mergeStyle.marginBottom = "-8px";
|
|
47
48
|
}
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Row, { ref, style: mergeStyle, ...others });
|
|
49
50
|
});
|
|
50
51
|
if (process.env.NODE_ENV !== "production") {
|
|
51
52
|
Row.displayName = "Row";
|
package/lib/index.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export { default as Typography } from './typography';
|
|
|
13
13
|
export type { TypographyProps } from './typography';
|
|
14
14
|
export { default as Card } from './card';
|
|
15
15
|
export type { CardProps } from './card';
|
|
16
|
+
export { default as App } from './app';
|
|
17
|
+
export type { AppProps } from './app';
|
|
16
18
|
export { default as ConfigProvider } from './config-provider';
|
|
17
19
|
export type { ConfigProviderProps, ConfigConsumerProps, ThemeConfig } from './config-provider';
|
|
18
20
|
export { default as Descriptions } from './descriptions';
|
|
@@ -68,8 +70,8 @@ export { default as Lottie } from './lottie';
|
|
|
68
70
|
export type { LottieProps, LottieRef } from './lottie';
|
|
69
71
|
export { default as theme } from './theme';
|
|
70
72
|
declare const useToken: () => {
|
|
71
|
-
theme: import("@ant-design/cssinjs").Theme<import("antd/
|
|
72
|
-
token: import("
|
|
73
|
+
theme: import("@ant-design/cssinjs").Theme<import("antd/lib/theme/interface/seeds").SeedToken, import("./theme/interface").AliasToken>;
|
|
74
|
+
token: import("./theme/interface").GlobalToken;
|
|
73
75
|
hashId: string;
|
|
74
76
|
};
|
|
75
77
|
export { useToken };
|
package/lib/index.js
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
33
|
Alert: () => import_alert.default,
|
|
34
|
+
App: () => import_app.default,
|
|
34
35
|
Badge: () => import_badge.default,
|
|
35
36
|
Breadcrumb: () => import_breadcrumb.default,
|
|
36
37
|
Button: () => import_button.default,
|
|
@@ -80,6 +81,7 @@ var import_space = __toESM(require("./space"));
|
|
|
80
81
|
var import_grid = require("./grid");
|
|
81
82
|
var import_typography = __toESM(require("./typography"));
|
|
82
83
|
var import_card = __toESM(require("./card"));
|
|
84
|
+
var import_app = __toESM(require("./app"));
|
|
83
85
|
var import_config_provider = __toESM(require("./config-provider"));
|
|
84
86
|
var import_descriptions = __toESM(require("./descriptions"));
|
|
85
87
|
var import_empty = __toESM(require("./empty"));
|
|
@@ -113,6 +115,7 @@ var { useToken } = import_theme2.default;
|
|
|
113
115
|
// Annotate the CommonJS export names for ESM import in node:
|
|
114
116
|
0 && (module.exports = {
|
|
115
117
|
Alert,
|
|
118
|
+
App,
|
|
116
119
|
Badge,
|
|
117
120
|
Breadcrumb,
|
|
118
121
|
Button,
|
package/lib/input/Input.js
CHANGED
|
@@ -33,11 +33,12 @@ __export(Input_exports, {
|
|
|
33
33
|
default: () => Input_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(Input_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
|
var import_en_US = __toESM(require("../locale/en-US"));
|
|
40
40
|
__reExport(Input_exports, require("antd/es/input/Input"), module.exports);
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
42
|
var Input = (0, import_react.forwardRef)(({ locale: customLocale, ...restProps }, ref) => {
|
|
42
43
|
var _a, _b;
|
|
43
44
|
const { locale: contextLocale } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
@@ -47,7 +48,7 @@ var Input = (0, import_react.forwardRef)(({ locale: customLocale, ...restProps }
|
|
|
47
48
|
...contextLocale == null ? void 0 : contextLocale.Input,
|
|
48
49
|
...customLocale
|
|
49
50
|
};
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Input, { ref, placeholder: inputLocale.placeholder, ...restProps });
|
|
51
52
|
});
|
|
52
53
|
if (process.env.NODE_ENV !== "production") {
|
|
53
54
|
Input.displayName = "Input";
|
package/lib/input/Password.js
CHANGED
|
@@ -33,11 +33,12 @@ __export(Password_exports, {
|
|
|
33
33
|
default: () => Password_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(Password_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
|
var import_en_US = __toESM(require("../locale/en-US"));
|
|
40
40
|
__reExport(Password_exports, require("antd/es/input/Password"), module.exports);
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
42
|
var Password = (0, import_react.forwardRef)(
|
|
42
43
|
({ locale: customLocale, ...restProps }, ref) => {
|
|
43
44
|
var _a, _b;
|
|
@@ -48,7 +49,7 @@ var Password = (0, import_react.forwardRef)(
|
|
|
48
49
|
...contextLocale == null ? void 0 : contextLocale.Input,
|
|
49
50
|
...customLocale
|
|
50
51
|
};
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Input.Password, { ref, placeholder: inputLocale.placeholder, ...restProps });
|
|
52
53
|
}
|
|
53
54
|
);
|
|
54
55
|
if (process.env.NODE_ENV !== "production") {
|
package/lib/input/Search.js
CHANGED
|
@@ -33,11 +33,12 @@ __export(Search_exports, {
|
|
|
33
33
|
default: () => Search_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(Search_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
|
var import_en_US = __toESM(require("../locale/en-US"));
|
|
40
40
|
__reExport(Search_exports, require("antd/es/input/Search"), module.exports);
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
42
|
var Search = (0, import_react.forwardRef)(({ locale: customLocale, ...restProps }, ref) => {
|
|
42
43
|
var _a, _b;
|
|
43
44
|
const { locale: contextLocale } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
@@ -47,7 +48,7 @@ var Search = (0, import_react.forwardRef)(({ locale: customLocale, ...restProps
|
|
|
47
48
|
...contextLocale == null ? void 0 : contextLocale.Input,
|
|
48
49
|
...customLocale
|
|
49
50
|
};
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Input.Search, { ref, placeholder: inputLocale.placeholder, ...restProps });
|
|
51
52
|
});
|
|
52
53
|
if (process.env.NODE_ENV !== "production") {
|
|
53
54
|
Search.displayName = "Search";
|
package/lib/input/TextArea.js
CHANGED
|
@@ -33,11 +33,12 @@ __export(TextArea_exports, {
|
|
|
33
33
|
default: () => TextArea_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(TextArea_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
|
var import_en_US = __toESM(require("../locale/en-US"));
|
|
40
40
|
__reExport(TextArea_exports, require("antd/es/input/TextArea"), module.exports);
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
42
|
var TextArea = (0, import_react.forwardRef)(
|
|
42
43
|
({ locale: customLocale, ...restProps }, ref) => {
|
|
43
44
|
var _a, _b;
|
|
@@ -48,7 +49,7 @@ var TextArea = (0, import_react.forwardRef)(
|
|
|
48
49
|
...contextLocale == null ? void 0 : contextLocale.Input,
|
|
49
50
|
...customLocale
|
|
50
51
|
};
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Input.TextArea, { ref, placeholder: inputLocale.placeholder, ...restProps });
|
|
52
53
|
}
|
|
53
54
|
);
|
|
54
55
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -8,7 +8,8 @@ export interface InputNumberLocale {
|
|
|
8
8
|
export interface InputNumberProps extends AntInputNumberProps {
|
|
9
9
|
locale?: InputNumberLocale;
|
|
10
10
|
}
|
|
11
|
-
type
|
|
11
|
+
type InputNumberRef = React.ComponentRef<typeof AntInputNumber>;
|
|
12
|
+
type CompoundedComponent = React.ForwardRefExoticComponent<InputNumberProps & React.RefAttributes<InputNumberRef>> & {
|
|
12
13
|
_InternalPanelDoNotUseOrYouWillBeFired: typeof AntInputNumber._InternalPanelDoNotUseOrYouWillBeFired;
|
|
13
14
|
};
|
|
14
15
|
declare const InputNumber: CompoundedComponent;
|
|
@@ -38,6 +38,7 @@ var import_react = __toESM(require("react"));
|
|
|
38
38
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
39
39
|
var import_en_US = __toESM(require("../locale/en-US"));
|
|
40
40
|
__reExport(input_number_exports, require("antd/es/input-number"), module.exports);
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
42
|
var InternalInputNumber = import_react.default.forwardRef(
|
|
42
43
|
({ locale: customLocale, ...restProps }, ref) => {
|
|
43
44
|
var _a, _b;
|
|
@@ -48,7 +49,7 @@ var InternalInputNumber = import_react.default.forwardRef(
|
|
|
48
49
|
...contextLocale == null ? void 0 : contextLocale.InputNumber,
|
|
49
50
|
...customLocale
|
|
50
51
|
};
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.InputNumber, { ref, placeholder: inputNumberLocale.placeholder, ...restProps });
|
|
52
53
|
}
|
|
53
54
|
);
|
|
54
55
|
var InputNumber = InternalInputNumber;
|
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,
|
|
@@ -0,0 +1,60 @@
|
|
|
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: "確定",
|
|
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
|
+
};
|
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,
|
|
@@ -51,11 +53,14 @@ var Modal = ({
|
|
|
51
53
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
52
54
|
const modalCls = (0, import_classnames.default)(className);
|
|
53
55
|
return wrapSSR(
|
|
54
|
-
/* @__PURE__ */
|
|
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,5 +1,5 @@
|
|
|
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
5
|
declare const _default: (prefixCls: string) => {
|
package/lib/modal/style/index.js
CHANGED
|
@@ -28,25 +28,59 @@ 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
|
|
38
36
|
} = token;
|
|
39
37
|
const top = 100;
|
|
40
38
|
const bottom = 100;
|
|
41
39
|
const titleHeight = fontSizeHeading5 * lineHeightHeading5;
|
|
42
40
|
return {
|
|
43
41
|
/* Modal */
|
|
44
|
-
[`${componentCls}:not(${componentCls}-confirm)`]: {
|
|
45
|
-
[`${componentCls}-
|
|
46
|
-
|
|
42
|
+
[`${componentCls}:not(${componentCls}-confirm):not(${componentCls}-progress)`]: {
|
|
43
|
+
[`${componentCls}-content`]: {
|
|
44
|
+
paddingBlock: token.padding,
|
|
45
|
+
[`${componentCls}-close`]: {
|
|
46
|
+
marginTop: token.marginXXS,
|
|
47
|
+
marginRight: token.marginXXS
|
|
48
|
+
},
|
|
49
|
+
[`${componentCls}-header`]: {
|
|
50
|
+
position: "relative",
|
|
51
|
+
marginBottom: 0,
|
|
52
|
+
paddingBottom: token.padding,
|
|
53
|
+
[`${componentCls}-title`]: {
|
|
54
|
+
fontSize: fontSizeHeading3
|
|
55
|
+
},
|
|
56
|
+
// 使用伪元素创建贯通的分割线
|
|
57
|
+
"&::after": {
|
|
58
|
+
content: '""',
|
|
59
|
+
position: "absolute",
|
|
60
|
+
bottom: 0,
|
|
61
|
+
left: 0,
|
|
62
|
+
right: 0,
|
|
63
|
+
height: "1px",
|
|
64
|
+
backgroundColor: colorSplit,
|
|
65
|
+
// antd Modal content默认padding通常是24px,使用负margin让分割线贯通
|
|
66
|
+
// 如果antd使用其他padding值,可能需要调整
|
|
67
|
+
marginLeft: `-${token.paddingLG}px`,
|
|
68
|
+
marginRight: `-${token.paddingLG}px`
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
[`${componentCls}-body`]: {
|
|
72
|
+
paddingTop: token.paddingLG,
|
|
73
|
+
marginInline: `-${token.marginLG}px`,
|
|
74
|
+
paddingInline: token.paddingLG
|
|
75
|
+
}
|
|
47
76
|
},
|
|
48
77
|
[`${componentCls}-footer`]: {
|
|
49
|
-
|
|
78
|
+
paddingTop: token.paddingLG,
|
|
79
|
+
marginTop: 0,
|
|
80
|
+
[`${antCls}-btn`]: {
|
|
81
|
+
height: 28,
|
|
82
|
+
minHeight: 28
|
|
83
|
+
},
|
|
50
84
|
[`${componentCls}-footer-content`]: {
|
|
51
85
|
display: "flex",
|
|
52
86
|
justifyContent: "space-between",
|
|
@@ -62,12 +96,16 @@ var genModalStyle = (token) => {
|
|
|
62
96
|
/* Modal.Progress */
|
|
63
97
|
[`${componentCls}${componentCls}-progress`]: {
|
|
64
98
|
[`${componentCls}-content`]: {
|
|
65
|
-
padding:
|
|
99
|
+
padding: token.paddingLG,
|
|
100
|
+
[`${componentCls}-close`]: {
|
|
101
|
+
marginTop: token.marginSM,
|
|
102
|
+
marginRight: token.marginXXS
|
|
103
|
+
},
|
|
66
104
|
[`${componentCls}-header`]: {
|
|
67
105
|
textAlign: "center",
|
|
68
106
|
marginBottom: token.marginXXL,
|
|
69
107
|
[`${componentCls}-title`]: {
|
|
70
|
-
fontSize:
|
|
108
|
+
fontSize: fontSizeHeading3
|
|
71
109
|
}
|
|
72
110
|
},
|
|
73
111
|
[`${componentCls}-body`]: {
|
|
@@ -86,18 +124,39 @@ var genModalStyle = (token) => {
|
|
|
86
124
|
}
|
|
87
125
|
},
|
|
88
126
|
[`${componentCls}-footer`]: {
|
|
89
|
-
textAlign: "center"
|
|
127
|
+
textAlign: "center",
|
|
128
|
+
[`${antCls}-btn`]: {
|
|
129
|
+
height: 28,
|
|
130
|
+
minHeight: 28
|
|
131
|
+
}
|
|
90
132
|
}
|
|
91
133
|
}
|
|
92
134
|
},
|
|
93
135
|
/* Modal.method() */
|
|
94
136
|
[`${componentCls}-confirm`]: {
|
|
95
|
-
[`${componentCls}-
|
|
96
|
-
|
|
97
|
-
color: token.colorTextSecondary
|
|
137
|
+
[`${componentCls}-content`]: {
|
|
138
|
+
padding: token.paddingLG
|
|
98
139
|
},
|
|
99
|
-
[`${componentCls}-
|
|
100
|
-
|
|
140
|
+
[`${componentCls}-body`]: {
|
|
141
|
+
[`${componentCls}-confirm-title`]: {
|
|
142
|
+
fontSize: fontSizeHeading3
|
|
143
|
+
},
|
|
144
|
+
[`${componentCls}-confirm-body > ${token.iconCls}`]: {
|
|
145
|
+
height: token.fontSizeHeading3 * token.lineHeight
|
|
146
|
+
},
|
|
147
|
+
[`${componentCls}-confirm-paragraph`]: {
|
|
148
|
+
rowGap: token.marginSM
|
|
149
|
+
},
|
|
150
|
+
[`${componentCls}-confirm-content`]: {
|
|
151
|
+
color: token.colorTextSecondary
|
|
152
|
+
},
|
|
153
|
+
[`${componentCls}-confirm-btns`]: {
|
|
154
|
+
marginTop: marginLG,
|
|
155
|
+
[`${antCls}-btn`]: {
|
|
156
|
+
height: 28,
|
|
157
|
+
minHeight: 28
|
|
158
|
+
}
|
|
159
|
+
}
|
|
101
160
|
}
|
|
102
161
|
}
|
|
103
162
|
};
|
package/lib/radio/index.js
CHANGED
|
@@ -39,6 +39,7 @@ 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);
|
|
@@ -46,7 +47,7 @@ var InternalRadio = import_react.default.forwardRef(
|
|
|
46
47
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
47
48
|
const radioCls = (0, import_classnames.default)(className);
|
|
48
49
|
return wrapSSR(
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Radio, { ref, prefixCls: customizePrefixCls, className: radioCls, ...restProps })
|
|
50
51
|
);
|
|
51
52
|
}
|
|
52
53
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
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
5
|
declare const _default: (prefixCls: string) => {
|