@oceanbase/design 1.0.0-alpha.1 → 1.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/design.min.css +1 -1
- package/dist/design.min.js +1 -1
- package/dist/reset.css +2 -1
- package/dist/static/Inter-Medium.ea234620.woff2 +0 -0
- package/dist/static/Inter-Regular.34ba43c9.woff2 +0 -0
- package/dist/static/Inter-SemiBold.95439fb4.woff2 +0 -0
- package/es/_util/genComponentStyleHook.d.ts +21 -4
- package/es/_util/genComponentStyleHook.js +68 -20
- package/es/alert/index.d.ts +2 -2
- package/es/alert/index.js +22 -6
- package/es/alert/style/index.d.ts +2 -5
- package/es/alert/style/index.js +157 -67
- package/es/app/index.d.ts +8 -0
- package/es/app/index.js +43 -1
- package/es/app/style/index.d.ts +6 -0
- package/es/app/style/index.js +9 -0
- package/es/badge/index.js +15 -7
- package/es/badge/style/index.d.ts +2 -5
- package/es/badge/style/index.js +13 -18
- package/es/button/index.js +10 -4
- package/es/button/style/index.d.ts +4 -5
- package/es/button/style/index.js +40 -7
- package/es/card/index.d.ts +11 -0
- package/es/card/index.js +151 -9
- package/es/card/style/index.d.ts +2 -5
- package/es/card/style/index.js +83 -18
- package/es/checkbox/index.js +9 -2
- package/es/checkbox/style/index.d.ts +2 -5
- package/es/checkbox/style/index.js +14 -11
- package/es/config-provider/context.d.ts +11 -0
- package/es/config-provider/context.js +2 -1
- package/es/config-provider/index.d.ts +4 -3
- package/es/config-provider/index.js +92 -40
- package/es/descriptions/index.d.ts +10 -0
- package/es/descriptions/index.js +62 -5
- package/es/descriptions/style/index.d.ts +3 -6
- package/es/descriptions/style/index.js +70 -10
- package/es/drawer/index.js +10 -7
- package/es/drawer/style/index.d.ts +2 -5
- package/es/drawer/style/index.js +44 -17
- package/es/dropdown/dropdown-button.js +26 -6
- package/es/dropdown/style/index.d.ts +6 -0
- package/es/{_util/genStyle.js → dropdown/style/index.js} +14 -11
- package/es/empty/index.js +4 -3
- package/es/empty/style/index.d.ts +2 -5
- package/es/empty/style/index.js +10 -10
- package/es/fonts/Inter-Medium.woff2 +0 -0
- package/es/fonts/Inter-Regular.woff2 +0 -0
- package/es/fonts/Inter-SemiBold.woff2 +0 -0
- package/es/form/FormItem.d.ts +1 -0
- package/es/form/FormItem.js +26 -11
- package/es/form/index.js +9 -2
- package/es/form/style/index.d.ts +2 -5
- package/es/form/style/index.js +19 -8
- package/es/index.d.ts +4 -3
- package/es/index.js +1 -1
- package/es/input/Input.d.ts +2 -0
- package/es/input/Input.js +30 -7
- package/es/input/Password.js +24 -5
- package/es/input/Search.js +24 -5
- package/es/input/TextArea.js +24 -5
- package/es/input/style/index.d.ts +6 -0
- package/es/input/style/index.js +32 -0
- package/es/input-number/index.d.ts +2 -1
- package/es/input-number/index.js +18 -4
- package/es/input-number/style/index.d.ts +6 -0
- package/es/input-number/style/index.js +19 -0
- package/es/locale/en-US.js +4 -1
- package/es/locale/index.d.ts +2 -0
- package/es/locale/ja-JP.d.ts +3 -0
- package/es/locale/ja-JP.js +31 -0
- package/es/locale/zh-CN.js +4 -1
- package/es/locale/zh-TW.js +4 -1
- package/es/modal/Modal.js +29 -8
- package/es/modal/style/index.d.ts +2 -5
- package/es/modal/style/index.js +67 -26
- package/es/radio/index.js +9 -2
- package/es/radio/style/index.d.ts +2 -5
- package/es/radio/style/index.js +16 -10
- package/es/result/index.d.ts +2 -2
- package/es/result/index.js +14 -6
- package/es/result/style/index.d.ts +2 -5
- package/es/result/style/index.js +3 -6
- package/es/segmented/index.d.ts +1 -0
- package/es/segmented/index.js +24 -9
- package/es/segmented/style/index.d.ts +1 -4
- package/es/segmented/style/index.js +4 -6
- package/es/select/index.js +9 -2
- package/es/select/style/index.d.ts +2 -5
- package/es/select/style/index.js +6 -7
- package/es/slider/index.js +9 -2
- package/es/slider/style/index.d.ts +2 -5
- package/es/slider/style/index.js +11 -11
- package/es/space/index.js +9 -2
- package/es/space/style/index.d.ts +2 -5
- package/es/space/style/index.js +3 -6
- package/es/spin/index.js +9 -2
- package/es/spin/style/index.d.ts +2 -5
- package/es/spin/style/index.js +27 -27
- package/es/static-function/index.js +13 -4
- package/es/style/cssVariables.d.ts +25 -0
- package/es/style/cssVariables.js +48 -0
- package/es/style/cssVariablesMeta.d.ts +24 -0
- package/es/style/cssVariablesMeta.js +974 -0
- package/es/style/global.d.ts +8 -0
- package/es/style/global.js +121 -0
- package/es/style/reset.css +2 -1
- package/es/switch/index.js +9 -2
- package/es/switch/style/index.d.ts +2 -5
- package/es/switch/style/index.js +3 -6
- package/es/table/index.d.ts +1 -4
- package/es/table/index.js +67 -34
- package/es/table/style/index.d.ts +2 -5
- package/es/table/style/index.js +58 -36
- package/es/tabs/index.js +9 -2
- package/es/tabs/style/index.d.ts +2 -5
- package/es/tabs/style/index.js +10 -10
- package/es/tag/index.d.ts +1 -0
- package/es/tag/index.js +17 -4
- package/es/tag/style/index.d.ts +3 -8
- package/es/tag/style/index.js +39 -35
- package/es/theme/compact.d.ts +1 -1
- package/es/theme/compact.js +2 -6
- package/es/theme/dark.d.ts +1 -48
- package/es/theme/default.d.ts +48 -2
- package/es/theme/default.js +324 -62
- package/es/theme/index.d.ts +20 -57
- package/es/theme/interface.d.ts +130 -0
- package/es/theme/interface.js +4 -1
- package/es/theme/style/aliyun.less +41 -41
- package/es/theme/style/compact.less +166 -137
- package/es/theme/style/dark.less +58 -58
- package/es/theme/style/default.less +169 -140
- package/es/tooltip/index.js +4 -4
- package/es/tooltip/style/index.d.ts +2 -5
- package/es/tooltip/style/index.js +10 -13
- package/es/tree-select/index.js +9 -2
- package/es/tree-select/style/index.d.ts +2 -5
- package/es/tree-select/style/index.js +3 -6
- package/es/typography/Link.js +9 -2
- package/es/typography/Paragraph.js +9 -2
- package/es/typography/Text.d.ts +1 -0
- package/es/typography/Text.js +12 -4
- package/es/typography/Title.js +9 -2
- package/es/typography/hooks/useClassName.d.ts +1 -1
- package/es/typography/hooks/useClassName.js +2 -2
- package/es/typography/index.d.ts +12 -1
- package/es/typography/index.js +2 -1
- package/es/typography/style/index.d.ts +2 -5
- package/es/typography/style/index.js +36 -28
- package/lib/_util/genComponentStyleHook.d.ts +21 -4
- package/lib/_util/genComponentStyleHook.js +50 -31
- package/lib/alert/index.d.ts +2 -2
- package/lib/alert/index.js +20 -11
- package/lib/alert/style/index.d.ts +2 -5
- package/lib/alert/style/index.js +174 -79
- package/lib/app/index.d.ts +8 -0
- package/lib/app/index.js +36 -1
- package/lib/app/style/index.d.ts +6 -0
- package/lib/{_util/getWeakenBorderColor.js → app/style/index.js} +15 -10
- package/lib/badge/index.js +32 -23
- package/lib/badge/style/index.d.ts +2 -5
- package/lib/badge/style/index.js +14 -16
- package/lib/button/index.js +5 -4
- package/lib/button/style/index.d.ts +4 -5
- package/lib/button/style/index.js +48 -9
- package/lib/card/index.d.ts +11 -0
- package/lib/card/index.js +160 -12
- package/lib/card/style/index.d.ts +2 -5
- package/lib/card/style/index.js +132 -21
- package/lib/checkbox/index.js +4 -3
- package/lib/checkbox/style/index.d.ts +2 -5
- package/lib/checkbox/style/index.js +10 -8
- package/lib/config-provider/DefaultRenderEmpty.js +4 -3
- package/lib/config-provider/context.d.ts +11 -0
- package/lib/config-provider/index.d.ts +4 -3
- package/lib/config-provider/index.js +133 -30
- package/lib/descriptions/hooks/useItems.js +5 -4
- package/lib/descriptions/index.d.ts +10 -0
- package/lib/descriptions/index.js +54 -6
- package/lib/descriptions/style/index.d.ts +3 -6
- package/lib/descriptions/style/index.js +117 -7
- package/lib/drawer/index.js +46 -35
- package/lib/drawer/style/index.d.ts +2 -5
- package/lib/drawer/style/index.js +44 -14
- package/lib/dropdown/dropdown-button.js +26 -3
- package/lib/dropdown/index.js +2 -2
- package/lib/dropdown/style/index.d.ts +6 -0
- package/lib/dropdown/style/index.js +46 -0
- package/lib/empty/colored.js +413 -327
- package/lib/empty/database.js +267 -222
- package/lib/empty/default.js +16 -21
- package/lib/empty/guide.js +201 -184
- package/lib/empty/index.js +25 -20
- package/lib/empty/style/index.d.ts +2 -5
- package/lib/empty/style/index.js +9 -10
- package/lib/fonts/Inter-Medium.woff2 +0 -0
- package/lib/fonts/Inter-Regular.woff2 +0 -0
- package/lib/fonts/Inter-SemiBold.woff2 +0 -0
- package/lib/form/FormItem.d.ts +1 -0
- package/lib/form/FormItem.js +19 -8
- package/lib/form/index.js +8 -5
- package/lib/form/style/index.d.ts +2 -5
- package/lib/form/style/index.js +28 -7
- package/lib/grid/col.js +2 -1
- package/lib/grid/row.js +2 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.js +3 -1
- package/lib/input/Input.d.ts +2 -0
- package/lib/input/Input.js +37 -13
- package/lib/input/Password.js +22 -4
- package/lib/input/Search.js +32 -12
- package/lib/input/TextArea.js +22 -4
- package/lib/input/style/index.d.ts +6 -0
- package/lib/input/style/index.js +74 -0
- package/lib/input-number/index.d.ts +2 -1
- package/lib/input-number/index.js +19 -3
- package/lib/input-number/style/index.d.ts +6 -0
- package/lib/{_util/genStyle.js → input-number/style/index.js} +22 -17
- package/lib/list/index.js +3 -2
- package/lib/locale/en-US.js +3 -0
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/ja-JP.d.ts +3 -0
- package/lib/locale/ja-JP.js +63 -0
- package/lib/locale/zh-CN.js +3 -0
- package/lib/locale/zh-TW.js +3 -0
- package/lib/lottie/index.js +2 -1
- package/lib/modal/Modal.js +35 -11
- package/lib/modal/Progress.js +9 -5
- package/lib/modal/style/index.d.ts +2 -5
- package/lib/modal/style/index.js +81 -24
- package/lib/radio/index.js +4 -3
- package/lib/radio/style/index.d.ts +2 -5
- package/lib/radio/style/index.js +17 -8
- package/lib/result/403.js +156 -121
- package/lib/result/404.js +328 -267
- package/lib/result/500.js +295 -257
- package/lib/result/Error.js +127 -99
- package/lib/result/Processing.js +246 -213
- package/lib/result/Success.js +233 -169
- package/lib/result/Warning.js +611 -515
- package/lib/result/index.d.ts +2 -2
- package/lib/result/index.js +14 -13
- package/lib/result/style/index.d.ts +2 -5
- package/lib/result/style/index.js +3 -6
- package/lib/segmented/index.d.ts +1 -0
- package/lib/segmented/index.js +17 -6
- package/lib/segmented/style/index.d.ts +1 -4
- package/lib/segmented/style/index.js +4 -6
- package/lib/select/index.js +4 -3
- package/lib/select/style/index.d.ts +2 -5
- package/lib/select/style/index.js +7 -7
- package/lib/slider/index.js +4 -3
- package/lib/slider/style/index.d.ts +2 -5
- package/lib/slider/style/index.js +12 -11
- package/lib/space/index.js +3 -2
- package/lib/space/style/index.d.ts +2 -5
- package/lib/space/style/index.js +3 -6
- package/lib/spin/index.js +7 -6
- package/lib/spin/style/index.d.ts +2 -5
- package/lib/spin/style/index.js +26 -28
- package/lib/static-function/index.js +7 -1
- package/lib/style/cssVariables.d.ts +25 -0
- package/lib/style/cssVariables.js +261 -0
- package/lib/style/cssVariablesMeta.d.ts +24 -0
- package/lib/style/cssVariablesMeta.js +1059 -0
- package/lib/style/global.d.ts +8 -0
- package/lib/style/global.js +176 -0
- package/lib/style/reset.css +2 -1
- package/lib/switch/index.js +4 -3
- package/lib/switch/style/index.d.ts +2 -5
- package/lib/switch/style/index.js +3 -6
- package/lib/table/index.d.ts +1 -4
- package/lib/table/index.js +114 -68
- package/lib/table/style/index.d.ts +2 -5
- package/lib/table/style/index.js +68 -32
- package/lib/tabs/index.js +12 -7
- package/lib/tabs/style/index.d.ts +2 -5
- package/lib/tabs/style/index.js +12 -8
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/index.js +18 -8
- package/lib/tag/style/index.d.ts +3 -8
- package/lib/tag/style/index.js +45 -36
- package/lib/theme/compact.d.ts +1 -1
- package/lib/theme/compact.js +1 -5
- package/lib/theme/dark.d.ts +1 -48
- package/lib/theme/default.d.ts +48 -2
- package/lib/theme/default.js +403 -61
- package/lib/theme/index.d.ts +20 -57
- package/lib/theme/interface.d.ts +130 -0
- package/lib/theme/style/aliyun.less +41 -41
- package/lib/theme/style/compact.less +166 -137
- package/lib/theme/style/dark.less +58 -58
- package/lib/theme/style/default.less +169 -140
- package/lib/tooltip/MouseTooltip.js +43 -39
- package/lib/tooltip/ReactStickyMouseTooltip.js +5 -4
- package/lib/tooltip/index.js +17 -13
- package/lib/tooltip/style/index.d.ts +2 -5
- package/lib/tooltip/style/index.js +10 -13
- package/lib/tree-select/index.js +4 -3
- package/lib/tree-select/style/index.d.ts +2 -5
- package/lib/tree-select/style/index.js +3 -6
- package/lib/typography/Link.js +7 -6
- package/lib/typography/Paragraph.js +7 -6
- package/lib/typography/Text.d.ts +1 -0
- package/lib/typography/Text.js +9 -8
- package/lib/typography/Title.js +7 -6
- package/lib/typography/hooks/useClassName.d.ts +1 -1
- package/lib/typography/hooks/useClassName.js +3 -2
- package/lib/typography/index.d.ts +12 -1
- package/lib/typography/index.js +6 -5
- package/lib/typography/style/index.d.ts +2 -5
- package/lib/typography/style/index.js +34 -26
- package/package.json +10 -9
- package/dist/static/Inter.f6bcdfb6.woff2 +0 -0
- package/es/_util/genStyle.d.ts +0 -2
- package/es/_util/getWeakenBorderColor.d.ts +0 -1
- package/es/_util/getWeakenBorderColor.js +0 -4
- package/es/fonts/Inter.woff2 +0 -0
- package/es/global.css +0 -48
- package/lib/_util/genStyle.d.ts +0 -2
- package/lib/_util/getWeakenBorderColor.d.ts +0 -1
- package/lib/fonts/Inter.woff2 +0 -0
- package/lib/global.css +0 -48
package/lib/result/index.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export type ResultStatusType = AntResultStatusType | 'processing';
|
|
|
8
8
|
export interface ResultProps extends Omit<AntResultProps, 'status'> {
|
|
9
9
|
status?: ResultStatusType;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type ResultType = React.FC<ResultProps> & {
|
|
12
12
|
PRESENTED_IMAGE_403: typeof Image403;
|
|
13
13
|
PRESENTED_IMAGE_404: typeof Image404;
|
|
14
14
|
PRESENTED_IMAGE_500: typeof Image500;
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
16
|
declare const Result: ResultType;
|
|
17
17
|
export default Result;
|
package/lib/result/index.js
CHANGED
|
@@ -33,7 +33,7 @@ __export(result_exports, {
|
|
|
33
33
|
default: () => result_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(result_exports);
|
|
36
|
-
var import_react =
|
|
36
|
+
var import_react = require("react");
|
|
37
37
|
var import_antd = require("antd");
|
|
38
38
|
var import_classnames = __toESM(require("classnames"));
|
|
39
39
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
@@ -46,22 +46,23 @@ var import__2 = __toESM(require("./404"));
|
|
|
46
46
|
var import__3 = __toESM(require("./500"));
|
|
47
47
|
var import_style = __toESM(require("./style"));
|
|
48
48
|
__reExport(result_exports, require("antd/es/result"), module.exports);
|
|
49
|
-
var
|
|
49
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
50
|
+
var Result = ({ prefixCls: customizePrefixCls, className, status, ...restProps }) => {
|
|
50
51
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
51
52
|
const prefixCls = getPrefixCls("result", customizePrefixCls);
|
|
52
|
-
const
|
|
53
|
-
const resultCls = (0, import_classnames.default)(
|
|
53
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
54
|
+
const resultCls = (0, import_classnames.default)(className);
|
|
54
55
|
const statusMap = {
|
|
55
|
-
success: /* @__PURE__ */
|
|
56
|
-
error: /* @__PURE__ */
|
|
57
|
-
warning: /* @__PURE__ */
|
|
58
|
-
processing: /* @__PURE__ */
|
|
59
|
-
403: /* @__PURE__ */
|
|
60
|
-
404: /* @__PURE__ */
|
|
61
|
-
500: /* @__PURE__ */
|
|
56
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Success.default, {}),
|
|
57
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Error.default, {}),
|
|
58
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Warning.default, {}),
|
|
59
|
+
processing: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Processing.default, {}),
|
|
60
|
+
403: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {}),
|
|
61
|
+
404: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.default, {}),
|
|
62
|
+
500: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__3.default, {})
|
|
62
63
|
};
|
|
63
|
-
return
|
|
64
|
-
/* @__PURE__ */
|
|
64
|
+
return wrapCSSVar(
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
66
|
import_antd.Result,
|
|
66
67
|
{
|
|
67
68
|
icon: statusMap[status],
|
|
@@ -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 ResultToken = FullToken<'Result'>;
|
|
4
4
|
export declare const genResultStyle: GenerateStyle<ResultToken>;
|
|
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;
|
|
@@ -47,12 +47,9 @@ var genResultStyle = (token) => {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
|
-
var style_default = (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
return useStyle(prefixCls);
|
|
55
|
-
};
|
|
50
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Result", (token) => {
|
|
51
|
+
return [genResultStyle(token)];
|
|
52
|
+
});
|
|
56
53
|
// Annotate the CommonJS export names for ESM import in node:
|
|
57
54
|
0 && (module.exports = {
|
|
58
55
|
genResultStyle
|
package/lib/segmented/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { SegmentedRawOption } from 'rc-segmented';
|
|
|
6
6
|
export * from 'antd/es/segmented';
|
|
7
7
|
type BadgeType = BadgeProps | BadgeProps['count'];
|
|
8
8
|
export type SegmentedLabeledOption = AntSegmentedLabeledOption & {
|
|
9
|
+
icon?: React.ReactNode;
|
|
9
10
|
ellipsis?: EllipsisConfig;
|
|
10
11
|
badge?: BadgeType;
|
|
11
12
|
};
|
package/lib/segmented/index.js
CHANGED
|
@@ -40,6 +40,7 @@ var import_typography = __toESM(require("../typography"));
|
|
|
40
40
|
var import_badge = __toESM(require("../badge"));
|
|
41
41
|
var import_style = __toESM(require("./style"));
|
|
42
42
|
__reExport(segmented_exports, require("antd/es/segmented"), module.exports);
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
44
|
var isReactNode = (item) => {
|
|
44
45
|
return import_react.default.isValidElement(item);
|
|
45
46
|
};
|
|
@@ -47,24 +48,34 @@ var Segmented = import_react.default.forwardRef(
|
|
|
47
48
|
({ prefixCls: customizePrefixCls, options, ...restProps }, ref) => {
|
|
48
49
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
49
50
|
const prefixCls = getPrefixCls("segmented", customizePrefixCls);
|
|
50
|
-
const
|
|
51
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
51
52
|
const renderBadge = (0, import_react.useCallback)((badge) => {
|
|
52
53
|
if (typeof badge === "object" && !isReactNode(badge)) {
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { ...badge });
|
|
54
55
|
}
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { count: badge });
|
|
56
57
|
}, []);
|
|
57
58
|
const newOptions = options == null ? void 0 : options.map((item) => {
|
|
58
59
|
if (typeof item === "object") {
|
|
59
|
-
const {
|
|
60
|
+
const {
|
|
61
|
+
label,
|
|
62
|
+
icon,
|
|
63
|
+
badge,
|
|
64
|
+
ellipsis = { tooltip: true },
|
|
65
|
+
...restItem
|
|
66
|
+
} = item;
|
|
60
67
|
return {
|
|
61
68
|
...restItem,
|
|
62
|
-
label: /* @__PURE__ */
|
|
69
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Flex, { align: "center", justify: "center", children: [
|
|
70
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-item-icon`, children: icon }),
|
|
71
|
+
ellipsis ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_typography.default.Text, { ellipsis, children: label }) : label,
|
|
72
|
+
badge && renderBadge(badge)
|
|
73
|
+
] })
|
|
63
74
|
};
|
|
64
75
|
}
|
|
65
76
|
return item;
|
|
66
77
|
});
|
|
67
|
-
return
|
|
78
|
+
return wrapCSSVar(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Segmented, { ref, options: newOptions, ...restProps }));
|
|
68
79
|
}
|
|
69
80
|
);
|
|
70
81
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -2,8 +2,5 @@
|
|
|
2
2
|
import type { FullToken, GenerateStyle } from 'antd/lib/theme/internal';
|
|
3
3
|
export type SegmentedToken = FullToken<'Segmented'>;
|
|
4
4
|
export declare const genSegmentedStyle: GenerateStyle<SegmentedToken>;
|
|
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;
|
|
@@ -45,6 +45,7 @@ var genSegmentedStyle = (token) => {
|
|
|
45
45
|
[`>${componentCls}-item`]: {
|
|
46
46
|
[`>${componentCls}-item-label`]: {
|
|
47
47
|
[`${antCls}-badge >${antCls}-badge-count`]: {
|
|
48
|
+
marginInlineStart: 4,
|
|
48
49
|
backgroundColor: colorFillSecondary,
|
|
49
50
|
color: "inherit",
|
|
50
51
|
boxShadow: "none"
|
|
@@ -54,12 +55,9 @@ var genSegmentedStyle = (token) => {
|
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
57
|
};
|
|
57
|
-
var style_default = (
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
});
|
|
61
|
-
return useStyle(prefixCls);
|
|
62
|
-
};
|
|
58
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Segmented", (token) => {
|
|
59
|
+
return [genSegmentedStyle(token)];
|
|
60
|
+
});
|
|
63
61
|
// Annotate the CommonJS export names for ESM import in node:
|
|
64
62
|
0 && (module.exports = {
|
|
65
63
|
genSegmentedStyle
|
package/lib/select/index.js
CHANGED
|
@@ -40,6 +40,7 @@ var import_config_provider = __toESM(require("../config-provider"));
|
|
|
40
40
|
var import_en_US = __toESM(require("../locale/en-US"));
|
|
41
41
|
var import_style = __toESM(require("./style"));
|
|
42
42
|
__reExport(select_exports, require("antd/es/select"), module.exports);
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
44
|
var InternalSelect = import_react.default.forwardRef(
|
|
44
45
|
({ locale: customLocale, prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
45
46
|
const { locale: contextLocale, getPrefixCls } = (0, import_react.useContext)(
|
|
@@ -53,10 +54,10 @@ var InternalSelect = import_react.default.forwardRef(
|
|
|
53
54
|
...customLocale
|
|
54
55
|
};
|
|
55
56
|
const prefixCls = getPrefixCls("select", customizePrefixCls);
|
|
56
|
-
const
|
|
57
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
57
58
|
const selectCls = (0, import_classnames.default)(className);
|
|
58
|
-
return
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
return wrapCSSVar(
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
61
|
import_antd.Select,
|
|
61
62
|
{
|
|
62
63
|
ref,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { FullToken, GenerateStyle } from '
|
|
2
|
+
import type { FullToken, GenerateStyle } from '../../theme/interface';
|
|
3
3
|
export type SelectToken = FullToken<'Select'>;
|
|
4
4
|
export declare const genSelectStyle: GenerateStyle<SelectToken>;
|
|
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;
|
|
@@ -28,18 +28,18 @@ var genSelectStyle = (token) => {
|
|
|
28
28
|
const { componentCls } = token;
|
|
29
29
|
return {
|
|
30
30
|
[`${componentCls}`]: {
|
|
31
|
-
[`${componentCls}-
|
|
31
|
+
[`${componentCls}-selection-placeholder`]: {
|
|
32
|
+
fontWeight: token.fontWeightWeak
|
|
33
|
+
},
|
|
34
|
+
[`${componentCls}-clear`]: {
|
|
32
35
|
color: token.colorTextTertiary
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
};
|
|
36
39
|
};
|
|
37
|
-
var style_default = (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
return useStyle(prefixCls);
|
|
42
|
-
};
|
|
40
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Select", (token) => {
|
|
41
|
+
return [genSelectStyle(token)];
|
|
42
|
+
});
|
|
43
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44
44
|
0 && (module.exports = {
|
|
45
45
|
genSelectStyle
|
package/lib/slider/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(slider_exports, require("antd/es/slider"), module.exports);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
var Slider = 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("slider", customizePrefixCls);
|
|
46
|
-
const
|
|
47
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
47
48
|
const sliderCls = (0, import_classnames.default)(className);
|
|
48
|
-
return
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
return wrapCSSVar(
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Slider, { ref, prefixCls: customizePrefixCls, className: sliderCls, ...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 SliderToken = FullToken<'Slider'>;
|
|
4
4
|
export declare const genSliderStyle: GenerateStyle<SliderToken>;
|
|
5
|
-
declare const _default: (prefixCls: string) =>
|
|
6
|
-
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
7
|
-
hashId: string;
|
|
8
|
-
};
|
|
5
|
+
declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, string, string];
|
|
9
6
|
export default _default;
|
|
@@ -23,32 +23,33 @@ __export(style_exports, {
|
|
|
23
23
|
genSliderStyle: () => genSliderStyle
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
|
-
var
|
|
26
|
+
var import_cssinjs = require("@ant-design/cssinjs");
|
|
27
27
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
28
28
|
var genSliderStyle = (token) => {
|
|
29
|
-
const { componentCls, dotSize = 8, handleSize = 10, handleLineWidth = 2 } = token;
|
|
29
|
+
const { componentCls, dotSize = 8, handleSize = 10, handleLineWidth = 2, calc } = token;
|
|
30
|
+
const dotSizeHalf = (0, import_cssinjs.unit)(calc(dotSize).div(2).equal());
|
|
31
|
+
const handleOffset = (0, import_cssinjs.unit)(
|
|
32
|
+
calc(handleSize).add(calc(handleLineWidth).mul(2).equal()).div(2).equal()
|
|
33
|
+
);
|
|
30
34
|
return {
|
|
31
35
|
[`${componentCls}${componentCls}-horizontal`]: {
|
|
32
36
|
[`${componentCls}-mark`]: {
|
|
33
37
|
[`${componentCls}-mark-text[style*="left: 0%;"]`]: {
|
|
34
|
-
transform: `translateX(calc(0% - ${
|
|
38
|
+
transform: `translateX(calc(0% - ${dotSizeHalf})) !important`
|
|
35
39
|
},
|
|
36
40
|
[`${componentCls}-mark-text[style*="left: 100%;"]`]: {
|
|
37
|
-
transform: `translateX(calc(-100% + ${
|
|
41
|
+
transform: `translateX(calc(-100% + ${dotSizeHalf})) !important`
|
|
38
42
|
},
|
|
39
43
|
[`${componentCls}-mark-text[style="transform: translateX(-50%);"]`]: {
|
|
40
|
-
transform: `translateX(calc(0% - ${
|
|
44
|
+
transform: `translateX(calc(0% - ${handleOffset})) !important`
|
|
41
45
|
}
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
};
|
|
45
49
|
};
|
|
46
|
-
var style_default = (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
});
|
|
50
|
-
return useStyle(prefixCls);
|
|
51
|
-
};
|
|
50
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Slider", (token) => {
|
|
51
|
+
return [genSliderStyle(token)];
|
|
52
|
+
});
|
|
52
53
|
// Annotate the CommonJS export names for ESM import in node:
|
|
53
54
|
0 && (module.exports = {
|
|
54
55
|
genSliderStyle
|
package/lib/space/index.js
CHANGED
|
@@ -43,11 +43,12 @@ var import_antd = require("antd");
|
|
|
43
43
|
var import_style = __toESM(require("./style"));
|
|
44
44
|
__reExport(space_exports, require("antd/es/space"), module.exports);
|
|
45
45
|
var import_context = require("antd/es/space/context");
|
|
46
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
46
47
|
var Space = React.forwardRef(
|
|
47
48
|
({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
48
49
|
const { getPrefixCls } = React.useContext(import_config_provider.ConfigContext);
|
|
49
50
|
const prefixCls = getPrefixCls("space", customizePrefixCls);
|
|
50
|
-
const
|
|
51
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
51
52
|
const supportFlexGap = (0, import_useFlexGapSupport.default)();
|
|
52
53
|
const spaceCls = (0, import_classnames.default)(
|
|
53
54
|
{
|
|
@@ -56,7 +57,7 @@ var Space = React.forwardRef(
|
|
|
56
57
|
},
|
|
57
58
|
className
|
|
58
59
|
);
|
|
59
|
-
return
|
|
60
|
+
return wrapCSSVar(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Space, { ref, className: spaceCls, ...restProps }));
|
|
60
61
|
}
|
|
61
62
|
);
|
|
62
63
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import type { FullToken, GenerateStyle } from '../../theme/interface';
|
|
3
3
|
export type SpaceToken = FullToken<'Space'>;
|
|
4
4
|
export declare const genSpaceStyle: GenerateStyle<SpaceToken>;
|
|
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/space/style/index.js
CHANGED
|
@@ -47,12 +47,9 @@ var genSpaceStyle = (token) => {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
|
-
var style_default = (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
return useStyle(prefixCls);
|
|
55
|
-
};
|
|
50
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Space", (token) => {
|
|
51
|
+
return [genSpaceStyle(token)];
|
|
52
|
+
});
|
|
56
53
|
// Annotate the CommonJS export names for ESM import in node:
|
|
57
54
|
0 && (module.exports = {
|
|
58
55
|
genSpaceStyle
|
package/lib/spin/index.js
CHANGED
|
@@ -35,13 +35,14 @@ __export(spin_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(spin_exports);
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
|
-
var import_react =
|
|
38
|
+
var import_react = require("react");
|
|
39
39
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
40
40
|
var import_lottie = __toESM(require("../lottie"));
|
|
41
41
|
var import_spin = __toESM(require("./assets/spin.json"));
|
|
42
42
|
var import_spin_gray = __toESM(require("./assets/spin-gray.json"));
|
|
43
43
|
var import_style = __toESM(require("./style"));
|
|
44
44
|
__reExport(spin_exports, require("antd/es/spin"), module.exports);
|
|
45
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
46
|
var Spin = ({
|
|
46
47
|
prefixCls: customizePrefixCls,
|
|
47
48
|
className,
|
|
@@ -50,11 +51,11 @@ var Spin = ({
|
|
|
50
51
|
...restProps
|
|
51
52
|
}) => {
|
|
52
53
|
const { getPrefixCls, spin } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
53
|
-
const indicator = customizeIndicator || (spin == null ? void 0 : spin.indicator) || (gray ? /* @__PURE__ */
|
|
54
|
+
const indicator = customizeIndicator || (spin == null ? void 0 : spin.indicator) || (gray ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lottie.default, { animationData: import_spin_gray.default }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lottie.default, { animationData: import_spin.default }));
|
|
54
55
|
const isDefaultIndicator = !(customizeIndicator || (spin == null ? void 0 : spin.indicator));
|
|
55
56
|
const isGrayIndicator = isDefaultIndicator && gray;
|
|
56
57
|
const prefixCls = getPrefixCls("spin", customizePrefixCls);
|
|
57
|
-
const
|
|
58
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
58
59
|
const spinCls = (0, import_classnames.default)(
|
|
59
60
|
{
|
|
60
61
|
[`${prefixCls}-oceanbase`]: isDefaultIndicator,
|
|
@@ -62,8 +63,8 @@ var Spin = ({
|
|
|
62
63
|
},
|
|
63
64
|
className
|
|
64
65
|
);
|
|
65
|
-
return
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
return wrapCSSVar(
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
68
|
import_antd.Spin,
|
|
68
69
|
{
|
|
69
70
|
prefixCls: customizePrefixCls,
|
|
@@ -75,7 +76,7 @@ var Spin = ({
|
|
|
75
76
|
);
|
|
76
77
|
};
|
|
77
78
|
Spin.setDefaultIndicator = import_antd.Spin.setDefaultIndicator;
|
|
78
|
-
Spin.setDefaultIndicator(/* @__PURE__ */
|
|
79
|
+
Spin.setDefaultIndicator(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spin, {}));
|
|
79
80
|
if (process.env.NODE_ENV !== "production") {
|
|
80
81
|
Spin.displayName = import_antd.Spin.displayName;
|
|
81
82
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { FullToken, GenerateStyle } from '
|
|
2
|
+
import type { FullToken, GenerateStyle } from '../../theme/interface';
|
|
3
3
|
export type SpinToken = FullToken<'Spin'> & {
|
|
4
4
|
spinDotSize: number;
|
|
5
5
|
spinDotSizeSM: number;
|
|
6
6
|
spinDotSizeLG: number;
|
|
7
7
|
};
|
|
8
8
|
export declare const genSpinStyle: GenerateStyle<SpinToken>;
|
|
9
|
-
declare const _default: (prefixCls: string) =>
|
|
10
|
-
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
11
|
-
hashId: string;
|
|
12
|
-
};
|
|
9
|
+
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];
|
|
13
10
|
export default _default;
|
package/lib/spin/style/index.js
CHANGED
|
@@ -25,9 +25,9 @@ __export(style_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
26
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
27
|
var genSizeStyle = (spinDotSize, token) => {
|
|
28
|
-
const { componentCls, colorText } = token;
|
|
28
|
+
const { componentCls, colorText, calc } = token;
|
|
29
29
|
const spinDotWidth = spinDotSize;
|
|
30
|
-
const spinDotHight = spinDotWidth
|
|
30
|
+
const spinDotHight = calc(spinDotWidth).mul(295).div(397).equal();
|
|
31
31
|
return {
|
|
32
32
|
// only work for oceanbase indicator
|
|
33
33
|
[`&${componentCls}-oceanbase`]: {
|
|
@@ -43,12 +43,12 @@ var genSizeStyle = (spinDotSize, token) => {
|
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
var genNestedSizeStyle = (spinDotSize, token) => {
|
|
46
|
-
const { componentCls, fontSize } = token;
|
|
46
|
+
const { componentCls, fontSize, calc } = token;
|
|
47
47
|
const spinDotWidth = spinDotSize;
|
|
48
|
-
const spinDotHight = spinDotWidth
|
|
49
|
-
const dotMarginLeft = -
|
|
50
|
-
const dotMarginTop = -
|
|
51
|
-
const textPaddingTop = (spinDotHight
|
|
48
|
+
const spinDotHight = calc(spinDotWidth).mul(295).div(397).equal();
|
|
49
|
+
const dotMarginLeft = calc(spinDotWidth).div(-2).equal();
|
|
50
|
+
const dotMarginTop = calc(spinDotHight).div(-2).equal();
|
|
51
|
+
const textPaddingTop = calc(spinDotHight).sub(fontSize).div(2).add(2).equal();
|
|
52
52
|
return {
|
|
53
53
|
// only work for oceanbase indicator
|
|
54
54
|
// `& > ${componentCls}-oceanbase` is compatible with double .ant-spin like Table loading
|
|
@@ -61,7 +61,7 @@ var genNestedSizeStyle = (spinDotSize, token) => {
|
|
|
61
61
|
paddingTop: textPaddingTop
|
|
62
62
|
},
|
|
63
63
|
[`&${componentCls}-show-text ${componentCls}-dot`]: {
|
|
64
|
-
marginTop: dotMarginTop
|
|
64
|
+
marginTop: calc(dotMarginTop).sub(10).equal()
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
};
|
|
@@ -83,26 +83,24 @@ var genSpinStyle = (token) => {
|
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
|
-
var style_default = (
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return useStyle(prefixCls);
|
|
105
|
-
};
|
|
86
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Spin", (token) => {
|
|
87
|
+
const { calc } = token;
|
|
88
|
+
return [
|
|
89
|
+
genSpinStyle({
|
|
90
|
+
...token,
|
|
91
|
+
// https://github.com/ant-design/ant-design/blob/master/components/spin/style/index.tsx#L238
|
|
92
|
+
// spinDotSize: (token.controlHeightLG / 2) * ratio,
|
|
93
|
+
// spinDotSizeSM: token.controlHeightLG * 0.35 * ratio,
|
|
94
|
+
// spinDotSizeLG: token.controlHeight * ratio,
|
|
95
|
+
spinDotSize: calc(token.controlHeight).mul(1.75).equal(),
|
|
96
|
+
// 56,
|
|
97
|
+
spinDotSizeSM: calc(token.controlHeight).mul(1.125).equal(),
|
|
98
|
+
// 36
|
|
99
|
+
spinDotSizeLG: calc(token.controlHeight).mul(2.25).equal()
|
|
100
|
+
// 72
|
|
101
|
+
})
|
|
102
|
+
];
|
|
103
|
+
});
|
|
106
104
|
// Annotate the CommonJS export names for ESM import in node:
|
|
107
105
|
0 && (module.exports = {
|
|
108
106
|
genSpinStyle
|
|
@@ -36,8 +36,11 @@ __export(static_function_exports, {
|
|
|
36
36
|
token: () => token
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(static_function_exports);
|
|
39
|
+
var import_react = require("react");
|
|
39
40
|
var import_antd = require("antd");
|
|
40
41
|
var import_alias = __toESM(require("antd/lib/theme/util/alias"));
|
|
42
|
+
var import_config_provider = __toESM(require("../config-provider"));
|
|
43
|
+
var import_style = __toESM(require("../modal/style"));
|
|
41
44
|
var import_theme = __toESM(require("../theme"));
|
|
42
45
|
var import_default = __toESM(require("../theme/default"));
|
|
43
46
|
var { defaultAlgorithm, defaultSeed, useToken } = import_theme.default;
|
|
@@ -45,7 +48,7 @@ var _a, _b, _c;
|
|
|
45
48
|
var mapToken = {
|
|
46
49
|
...defaultAlgorithm(defaultSeed),
|
|
47
50
|
...import_default.default.token,
|
|
48
|
-
//
|
|
51
|
+
// need to override some Alias Token values
|
|
49
52
|
override: {
|
|
50
53
|
boxShadow: (_a = import_default.default.token) == null ? void 0 : _a.boxShadow,
|
|
51
54
|
boxShadowSecondary: (_b = import_default.default.token) == null ? void 0 : _b.boxShadowSecondary,
|
|
@@ -58,6 +61,9 @@ var notification = import_antd.notification;
|
|
|
58
61
|
var modal = import_antd.Modal;
|
|
59
62
|
var static_function_default = () => {
|
|
60
63
|
token = useToken().token;
|
|
64
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
65
|
+
const prefixCls = getPrefixCls("modal");
|
|
66
|
+
(0, import_style.default)(prefixCls);
|
|
61
67
|
const staticFunction = import_antd.App.useApp();
|
|
62
68
|
message = {
|
|
63
69
|
...staticFunction.message,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OceanBase Design System - CSS Variables Style
|
|
3
|
+
* 使用 @ant-design/cssinjs 动态注入 CSS 变量
|
|
4
|
+
* 根据主题 token 值动态生成
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { CSSInterpolation } from '@ant-design/cssinjs';
|
|
8
|
+
import type { GlobalToken } from '../theme/interface';
|
|
9
|
+
/**
|
|
10
|
+
* 根据 token 生成 CSS 变量样式
|
|
11
|
+
*/
|
|
12
|
+
declare const genCssVariablesStyle: (token: GlobalToken, prefix?: string) => CSSInterpolation;
|
|
13
|
+
export interface CssVariablesStyleProps {
|
|
14
|
+
/**
|
|
15
|
+
* CSS 变量前缀,默认为 'ob'
|
|
16
|
+
*/
|
|
17
|
+
prefix?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* CSS 变量注入组件
|
|
21
|
+
* 使用 @ant-design/cssinjs 动态注入 CSS 变量
|
|
22
|
+
*/
|
|
23
|
+
declare const CssVariablesStyle: React.FC<CssVariablesStyleProps>;
|
|
24
|
+
export { CssVariablesStyle, genCssVariablesStyle };
|
|
25
|
+
export default CssVariablesStyle;
|