@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/form/FormItem.js
CHANGED
|
@@ -42,12 +42,14 @@ var import_config_provider = __toESM(require("../config-provider"));
|
|
|
42
42
|
var import_useTooltipTypeList = require("../tooltip/hooks/useTooltipTypeList");
|
|
43
43
|
var import_style = __toESM(require("./style"));
|
|
44
44
|
__reExport(FormItem_exports, require("antd/es/form/FormItem"), module.exports);
|
|
45
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
46
|
var AntFormItem = import_antd.Form.Item;
|
|
46
47
|
var FormItem = ({
|
|
47
48
|
children,
|
|
48
49
|
label,
|
|
49
50
|
tooltip,
|
|
50
51
|
action,
|
|
52
|
+
description,
|
|
51
53
|
layout: externalLayout,
|
|
52
54
|
prefixCls: customizePrefixCls,
|
|
53
55
|
className,
|
|
@@ -56,8 +58,10 @@ var FormItem = ({
|
|
|
56
58
|
var _a;
|
|
57
59
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
58
60
|
const prefixCls = getPrefixCls("form", customizePrefixCls);
|
|
59
|
-
const
|
|
60
|
-
const formItemCls = (0, import_classnames.default)(className
|
|
61
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
62
|
+
const formItemCls = (0, import_classnames.default)(className, {
|
|
63
|
+
[`${prefixCls}-item-has-description`]: !!description
|
|
64
|
+
});
|
|
61
65
|
const {
|
|
62
66
|
layout: contextLayout,
|
|
63
67
|
// compatible with vertical for version < antd 27.0.0
|
|
@@ -79,19 +83,26 @@ var FormItem = ({
|
|
|
79
83
|
...restTooltipProps
|
|
80
84
|
};
|
|
81
85
|
}
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
const isVertical = layout === "vertical" || vertical;
|
|
87
|
+
const descriptionContent = description && isVertical ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-item-description`, children: description }) : null;
|
|
88
|
+
const actionContent = action && (layout === "vertical" || vertical) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-item-action`, children: action }) : null;
|
|
89
|
+
return wrapCSSVar(
|
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
84
91
|
AntFormItem,
|
|
85
92
|
{
|
|
86
93
|
layout,
|
|
87
|
-
label:
|
|
94
|
+
label: actionContent || descriptionContent ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
95
|
+
label,
|
|
96
|
+
actionContent,
|
|
97
|
+
descriptionContent
|
|
98
|
+
] }) : label,
|
|
88
99
|
tooltip,
|
|
89
100
|
required: (0, import_lodash.isPlainObject)(children) && ((_a = children.type) == null ? void 0 : _a.__ANT_SWITCH) ? true : void 0,
|
|
90
101
|
prefixCls: customizePrefixCls,
|
|
91
102
|
className: formItemCls,
|
|
92
|
-
...restProps
|
|
93
|
-
|
|
94
|
-
|
|
103
|
+
...restProps,
|
|
104
|
+
children
|
|
105
|
+
}
|
|
95
106
|
)
|
|
96
107
|
);
|
|
97
108
|
};
|
package/lib/form/index.js
CHANGED
|
@@ -33,13 +33,17 @@ __export(form_exports, {
|
|
|
33
33
|
default: () => form_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(form_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"));
|
|
40
40
|
var import_FormItem = __toESM(require("./FormItem"));
|
|
41
41
|
var import_style = __toESM(require("./style"));
|
|
42
42
|
__reExport(form_exports, require("antd/es/form"), module.exports);
|
|
43
|
+
var import_jsx_runtime = (
|
|
44
|
+
// @ts-ignore to ignore children type error
|
|
45
|
+
require("react/jsx-runtime")
|
|
46
|
+
);
|
|
43
47
|
var Form = ({
|
|
44
48
|
hideRequiredMark,
|
|
45
49
|
prefixCls: customizePrefixCls,
|
|
@@ -48,11 +52,10 @@ var Form = ({
|
|
|
48
52
|
}) => {
|
|
49
53
|
const { getPrefixCls, form: contextForm } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
50
54
|
const prefixCls = getPrefixCls("form", customizePrefixCls);
|
|
51
|
-
const
|
|
55
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
52
56
|
const formCls = (0, import_classnames.default)(className);
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
57
|
+
return wrapCSSVar(
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
59
|
import_antd.Form,
|
|
57
60
|
{
|
|
58
61
|
requiredMark: (
|
|
@@ -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 FormToken = FullToken<'Form'>;
|
|
4
4
|
export declare const genFormStyle: GenerateStyle<FormToken>;
|
|
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/form/style/index.js
CHANGED
|
@@ -25,10 +25,34 @@ __export(style_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
26
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
27
|
var genFormStyle = (token) => {
|
|
28
|
-
const { componentCls } = token;
|
|
28
|
+
const { componentCls, calc } = token;
|
|
29
29
|
return {
|
|
30
|
+
[componentCls]: {
|
|
31
|
+
// extra style
|
|
32
|
+
[`${componentCls}-item-explain, ${componentCls}-item-extra`]: {
|
|
33
|
+
paddingTop: token.paddingXXS,
|
|
34
|
+
fontSize: token.fontSizeSM
|
|
35
|
+
},
|
|
36
|
+
[`${componentCls}-item-explain + ${componentCls}-item-extra`]: {
|
|
37
|
+
paddingTop: 0
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
// vertical layout style
|
|
30
41
|
[`${componentCls}${componentCls}-vertical`]: {
|
|
31
42
|
[`${componentCls}-item:not(${componentCls}-item-horizontal)`]: {
|
|
43
|
+
// description style
|
|
44
|
+
[`${componentCls}-item-control-input`]: {
|
|
45
|
+
minHeight: "auto"
|
|
46
|
+
},
|
|
47
|
+
[`${componentCls}-item-label`]: {
|
|
48
|
+
paddingBottom: calc(token.paddingXXS).add(2).equal()
|
|
49
|
+
},
|
|
50
|
+
[`${componentCls}-item-description`]: {
|
|
51
|
+
paddingTop: token.paddingXXS,
|
|
52
|
+
fontSize: token.fontSizeSM,
|
|
53
|
+
color: token.colorTextDescription
|
|
54
|
+
},
|
|
55
|
+
// action style
|
|
32
56
|
[`${componentCls}-item-label > label`]: {
|
|
33
57
|
width: "100%",
|
|
34
58
|
[`${componentCls}-item-action`]: {
|
|
@@ -40,12 +64,9 @@ var genFormStyle = (token) => {
|
|
|
40
64
|
}
|
|
41
65
|
};
|
|
42
66
|
};
|
|
43
|
-
var style_default = (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
});
|
|
47
|
-
return useStyle(prefixCls);
|
|
48
|
-
};
|
|
67
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Form", (token) => {
|
|
68
|
+
return [genFormStyle(token)];
|
|
69
|
+
});
|
|
49
70
|
// Annotate the CommonJS export names for ESM import in node:
|
|
50
71
|
0 && (module.exports = {
|
|
51
72
|
genFormStyle
|
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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import './global.css';
|
|
2
1
|
export * from 'antd';
|
|
3
2
|
export { version } from '../package.json';
|
|
4
3
|
export { default as Alert } from './alert';
|
|
@@ -13,6 +12,8 @@ export { default as Typography } from './typography';
|
|
|
13
12
|
export type { TypographyProps } from './typography';
|
|
14
13
|
export { default as Card } from './card';
|
|
15
14
|
export type { CardProps } from './card';
|
|
15
|
+
export { default as App } from './app';
|
|
16
|
+
export type { AppProps } from './app';
|
|
16
17
|
export { default as ConfigProvider } from './config-provider';
|
|
17
18
|
export type { ConfigProviderProps, ConfigConsumerProps, ThemeConfig } from './config-provider';
|
|
18
19
|
export { default as Descriptions } from './descriptions';
|
|
@@ -68,8 +69,8 @@ export { default as Lottie } from './lottie';
|
|
|
68
69
|
export type { LottieProps, LottieRef } from './lottie';
|
|
69
70
|
export { default as theme } from './theme';
|
|
70
71
|
declare const useToken: () => {
|
|
71
|
-
theme: import("@ant-design/cssinjs").Theme<import("antd/
|
|
72
|
-
token: import("
|
|
72
|
+
theme: import("@ant-design/cssinjs").Theme<import("antd/lib/theme/interface/seeds").SeedToken, import("./theme/interface").AliasToken>;
|
|
73
|
+
token: import("./theme/interface").GlobalToken;
|
|
73
74
|
hashId: string;
|
|
74
75
|
};
|
|
75
76
|
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,
|
|
@@ -71,7 +72,6 @@ __export(src_exports, {
|
|
|
71
72
|
version: () => import_package.version
|
|
72
73
|
});
|
|
73
74
|
module.exports = __toCommonJS(src_exports);
|
|
74
|
-
var import_global = require("./global.css");
|
|
75
75
|
__reExport(src_exports, require("antd"), module.exports);
|
|
76
76
|
var import_package = require("../package.json");
|
|
77
77
|
var import_alert = __toESM(require("./alert"));
|
|
@@ -80,6 +80,7 @@ var import_space = __toESM(require("./space"));
|
|
|
80
80
|
var import_grid = require("./grid");
|
|
81
81
|
var import_typography = __toESM(require("./typography"));
|
|
82
82
|
var import_card = __toESM(require("./card"));
|
|
83
|
+
var import_app = __toESM(require("./app"));
|
|
83
84
|
var import_config_provider = __toESM(require("./config-provider"));
|
|
84
85
|
var import_descriptions = __toESM(require("./descriptions"));
|
|
85
86
|
var import_empty = __toESM(require("./empty"));
|
|
@@ -113,6 +114,7 @@ var { useToken } = import_theme2.default;
|
|
|
113
114
|
// Annotate the CommonJS export names for ESM import in node:
|
|
114
115
|
0 && (module.exports = {
|
|
115
116
|
Alert,
|
|
117
|
+
App,
|
|
116
118
|
Badge,
|
|
117
119
|
Breadcrumb,
|
|
118
120
|
Button,
|
package/lib/input/Input.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { InputProps as AntInputProps, InputRef } from 'antd';
|
|
3
|
+
import type { ShowCountFormatter } from 'rc-input/es/interface';
|
|
3
4
|
export * from 'antd/es/input/Input';
|
|
4
5
|
export interface InputLocale {
|
|
5
6
|
placeholder?: string;
|
|
@@ -7,5 +8,6 @@ export interface InputLocale {
|
|
|
7
8
|
export interface InputProps extends AntInputProps {
|
|
8
9
|
locale?: InputLocale;
|
|
9
10
|
}
|
|
11
|
+
export declare const showCountFormatter: ShowCountFormatter;
|
|
10
12
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>;
|
|
11
13
|
export default Input;
|
package/lib/input/Input.js
CHANGED
|
@@ -30,30 +30,54 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/input/Input.tsx
|
|
31
31
|
var Input_exports = {};
|
|
32
32
|
__export(Input_exports, {
|
|
33
|
-
default: () => Input_default
|
|
33
|
+
default: () => Input_default,
|
|
34
|
+
showCountFormatter: () => showCountFormatter
|
|
34
35
|
});
|
|
35
36
|
module.exports = __toCommonJS(Input_exports);
|
|
36
|
-
var import_react =
|
|
37
|
+
var import_react = require("react");
|
|
37
38
|
var import_antd = require("antd");
|
|
38
39
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
39
40
|
var import_en_US = __toESM(require("../locale/en-US"));
|
|
41
|
+
var import_style = __toESM(require("./style"));
|
|
40
42
|
__reExport(Input_exports, require("antd/es/input/Input"), module.exports);
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
+
var showCountFormatter = ({ count, maxLength }) => {
|
|
45
|
+
return `${count}/${maxLength}`;
|
|
46
|
+
};
|
|
47
|
+
var Input = (0, import_react.forwardRef)(
|
|
48
|
+
({ prefixCls: customizePrefixCls, locale: customLocale, showCount, ...restProps }, ref) => {
|
|
49
|
+
var _a, _b;
|
|
50
|
+
const { getPrefixCls, locale: contextLocale } = (0, import_react.useContext)(
|
|
51
|
+
import_config_provider.default.ConfigContext
|
|
52
|
+
);
|
|
53
|
+
const inputLocale = {
|
|
54
|
+
placeholder: ((_a = contextLocale == null ? void 0 : contextLocale.global) == null ? void 0 : _a.inputPlaceholder) || ((_b = import_en_US.default.global) == null ? void 0 : _b.inputPlaceholder),
|
|
55
|
+
...import_en_US.default.Input,
|
|
56
|
+
...contextLocale == null ? void 0 : contextLocale.Input,
|
|
57
|
+
...customLocale
|
|
58
|
+
};
|
|
59
|
+
const prefixCls = getPrefixCls("input", customizePrefixCls);
|
|
60
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
61
|
+
return wrapCSSVar(
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
|
+
import_antd.Input,
|
|
64
|
+
{
|
|
65
|
+
ref,
|
|
66
|
+
prefixCls: customizePrefixCls,
|
|
67
|
+
placeholder: inputLocale.placeholder,
|
|
68
|
+
showCount: showCount === true ? { formatter: showCountFormatter } : showCount,
|
|
69
|
+
...restProps
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
);
|
|
52
75
|
if (process.env.NODE_ENV !== "production") {
|
|
53
76
|
Input.displayName = "Input";
|
|
54
77
|
}
|
|
55
78
|
var Input_default = Input;
|
|
56
79
|
// Annotate the CommonJS export names for ESM import in node:
|
|
57
80
|
0 && (module.exports = {
|
|
81
|
+
showCountFormatter,
|
|
58
82
|
...require("antd/es/input/Input")
|
|
59
83
|
});
|
package/lib/input/Password.js
CHANGED
|
@@ -33,22 +33,40 @@ __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
|
+
var import_Input = require("./Input");
|
|
41
|
+
var import_style = __toESM(require("./style"));
|
|
40
42
|
__reExport(Password_exports, require("antd/es/input/Password"), module.exports);
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
44
|
var Password = (0, import_react.forwardRef)(
|
|
42
|
-
({ locale: customLocale, ...restProps }, ref) => {
|
|
45
|
+
({ prefixCls: customizePrefixCls, locale: customLocale, showCount, ...restProps }, ref) => {
|
|
43
46
|
var _a, _b;
|
|
44
|
-
const { locale: contextLocale } = (0, import_react.useContext)(
|
|
47
|
+
const { getPrefixCls, locale: contextLocale } = (0, import_react.useContext)(
|
|
48
|
+
import_config_provider.default.ConfigContext
|
|
49
|
+
);
|
|
50
|
+
const prefixCls = getPrefixCls("input", customizePrefixCls);
|
|
51
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
45
52
|
const inputLocale = {
|
|
46
53
|
placeholder: ((_a = contextLocale == null ? void 0 : contextLocale.global) == null ? void 0 : _a.inputPlaceholder) || ((_b = import_en_US.default.global) == null ? void 0 : _b.inputPlaceholder),
|
|
47
54
|
...import_en_US.default.Input,
|
|
48
55
|
...contextLocale == null ? void 0 : contextLocale.Input,
|
|
49
56
|
...customLocale
|
|
50
57
|
};
|
|
51
|
-
return
|
|
58
|
+
return wrapCSSVar(
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
+
import_antd.Input.Password,
|
|
61
|
+
{
|
|
62
|
+
ref,
|
|
63
|
+
prefixCls: customizePrefixCls,
|
|
64
|
+
placeholder: inputLocale.placeholder,
|
|
65
|
+
showCount: showCount === true ? { formatter: import_Input.showCountFormatter } : showCount,
|
|
66
|
+
...restProps
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
);
|
|
52
70
|
}
|
|
53
71
|
);
|
|
54
72
|
if (process.env.NODE_ENV !== "production") {
|
package/lib/input/Search.js
CHANGED
|
@@ -33,22 +33,42 @@ __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
|
+
var import_Input = require("./Input");
|
|
41
|
+
var import_style = __toESM(require("./style"));
|
|
40
42
|
__reExport(Search_exports, require("antd/es/input/Search"), module.exports);
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
+
var Search = (0, import_react.forwardRef)(
|
|
45
|
+
({ prefixCls: customizePrefixCls, locale: customLocale, showCount, ...restProps }, ref) => {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
const { getPrefixCls, locale: contextLocale } = (0, import_react.useContext)(
|
|
48
|
+
import_config_provider.default.ConfigContext
|
|
49
|
+
);
|
|
50
|
+
const prefixCls = getPrefixCls("input", customizePrefixCls);
|
|
51
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
52
|
+
const inputLocale = {
|
|
53
|
+
placeholder: ((_a = contextLocale == null ? void 0 : contextLocale.global) == null ? void 0 : _a.inputPlaceholder) || ((_b = import_en_US.default.global) == null ? void 0 : _b.inputPlaceholder),
|
|
54
|
+
...import_en_US.default.Input,
|
|
55
|
+
...contextLocale == null ? void 0 : contextLocale.Input,
|
|
56
|
+
...customLocale
|
|
57
|
+
};
|
|
58
|
+
return wrapCSSVar(
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
+
import_antd.Input.Search,
|
|
61
|
+
{
|
|
62
|
+
ref,
|
|
63
|
+
prefixCls: customizePrefixCls,
|
|
64
|
+
placeholder: inputLocale.placeholder,
|
|
65
|
+
showCount: showCount === true ? { formatter: import_Input.showCountFormatter } : showCount,
|
|
66
|
+
...restProps
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
);
|
|
52
72
|
if (process.env.NODE_ENV !== "production") {
|
|
53
73
|
Search.displayName = "Search";
|
|
54
74
|
}
|
package/lib/input/TextArea.js
CHANGED
|
@@ -33,22 +33,40 @@ __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
|
+
var import_Input = require("./Input");
|
|
41
|
+
var import_style = __toESM(require("./style"));
|
|
40
42
|
__reExport(TextArea_exports, require("antd/es/input/TextArea"), module.exports);
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
44
|
var TextArea = (0, import_react.forwardRef)(
|
|
42
|
-
({ locale: customLocale, ...restProps }, ref) => {
|
|
45
|
+
({ prefixCls: customizePrefixCls, locale: customLocale, showCount, ...restProps }, ref) => {
|
|
43
46
|
var _a, _b;
|
|
44
|
-
const { locale: contextLocale } = (0, import_react.useContext)(
|
|
47
|
+
const { getPrefixCls, locale: contextLocale } = (0, import_react.useContext)(
|
|
48
|
+
import_config_provider.default.ConfigContext
|
|
49
|
+
);
|
|
50
|
+
const prefixCls = getPrefixCls("input", customizePrefixCls);
|
|
51
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
45
52
|
const inputLocale = {
|
|
46
53
|
placeholder: ((_a = contextLocale == null ? void 0 : contextLocale.global) == null ? void 0 : _a.inputPlaceholder) || ((_b = import_en_US.default.global) == null ? void 0 : _b.inputPlaceholder),
|
|
47
54
|
...import_en_US.default.Input,
|
|
48
55
|
...contextLocale == null ? void 0 : contextLocale.Input,
|
|
49
56
|
...customLocale
|
|
50
57
|
};
|
|
51
|
-
return
|
|
58
|
+
return wrapCSSVar(
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
+
import_antd.Input.TextArea,
|
|
61
|
+
{
|
|
62
|
+
ref,
|
|
63
|
+
prefixCls: customizePrefixCls,
|
|
64
|
+
placeholder: inputLocale.placeholder,
|
|
65
|
+
showCount: showCount === true ? { formatter: import_Input.showCountFormatter } : showCount,
|
|
66
|
+
...restProps
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
);
|
|
52
70
|
}
|
|
53
71
|
);
|
|
54
72
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FullToken, GenerateStyle } from '../../theme/interface';
|
|
3
|
+
export type InputToken = FullToken<'Input'>;
|
|
4
|
+
export declare const genInputStyle: GenerateStyle<InputToken>;
|
|
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];
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/input/style/index.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
default: () => style_default,
|
|
23
|
+
genInputStyle: () => genInputStyle
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
|
+
var genInputStyle = (token) => {
|
|
28
|
+
const { componentCls } = token;
|
|
29
|
+
return {
|
|
30
|
+
[`${componentCls}-affix-wrapper`]: {
|
|
31
|
+
[`&:not(${componentCls}-disabled)`]: {
|
|
32
|
+
[`${componentCls}-prefix, ${componentCls}-suffix`]: {
|
|
33
|
+
fontSize: token.fontSizeSM
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
[`${componentCls}-prefix, ${componentCls}-suffix`]: {
|
|
37
|
+
color: token.colorIcon
|
|
38
|
+
},
|
|
39
|
+
[`${componentCls}-suffix`]: {
|
|
40
|
+
[`${componentCls}-clear-icon`]: {
|
|
41
|
+
color: token.colorTextTertiary
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
var genSearchInputStyle = (token) => {
|
|
48
|
+
const { componentCls, antCls } = token;
|
|
49
|
+
const searchPrefixCls = `${componentCls}-search`;
|
|
50
|
+
return {
|
|
51
|
+
[searchPrefixCls]: {
|
|
52
|
+
[`> ${componentCls}-group`]: {
|
|
53
|
+
[`> ${componentCls}-group-addon:last-child`]: {
|
|
54
|
+
[`${searchPrefixCls}-button:not(${antCls}-btn-color-primary)`]: {
|
|
55
|
+
color: token.colorIcon,
|
|
56
|
+
"&:not([disabled]):hover": {
|
|
57
|
+
color: token.colorIconHover
|
|
58
|
+
},
|
|
59
|
+
"&:active": {
|
|
60
|
+
color: token.colorIconHover
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Input", (token) => {
|
|
69
|
+
return [genInputStyle(token), genSearchInputStyle(token)];
|
|
70
|
+
});
|
|
71
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
72
|
+
0 && (module.exports = {
|
|
73
|
+
genInputStyle
|
|
74
|
+
});
|
|
@@ -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;
|
|
@@ -37,18 +37,34 @@ var import_antd = require("antd");
|
|
|
37
37
|
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
|
+
var import_style = __toESM(require("./style"));
|
|
40
41
|
__reExport(input_number_exports, require("antd/es/input-number"), module.exports);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
43
|
var InternalInputNumber = import_react.default.forwardRef(
|
|
42
|
-
({ locale: customLocale, ...restProps }, ref) => {
|
|
44
|
+
({ prefixCls: customizePrefixCls, locale: customLocale, ...restProps }, ref) => {
|
|
43
45
|
var _a, _b;
|
|
44
|
-
const { locale: contextLocale } = (0, import_react.useContext)(
|
|
46
|
+
const { getPrefixCls, locale: contextLocale } = (0, import_react.useContext)(
|
|
47
|
+
import_config_provider.default.ConfigContext
|
|
48
|
+
);
|
|
49
|
+
const prefixCls = getPrefixCls("input-number", customizePrefixCls);
|
|
50
|
+
const [wrapCSSVar] = (0, import_style.default)(prefixCls);
|
|
45
51
|
const inputNumberLocale = {
|
|
46
52
|
placeholder: ((_a = contextLocale == null ? void 0 : contextLocale.global) == null ? void 0 : _a.inputPlaceholder) || ((_b = import_en_US.default.global) == null ? void 0 : _b.inputPlaceholder),
|
|
47
53
|
...import_en_US.default.InputNumber,
|
|
48
54
|
...contextLocale == null ? void 0 : contextLocale.InputNumber,
|
|
49
55
|
...customLocale
|
|
50
56
|
};
|
|
51
|
-
return
|
|
57
|
+
return wrapCSSVar(
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
+
import_antd.InputNumber,
|
|
60
|
+
{
|
|
61
|
+
ref,
|
|
62
|
+
prefixCls: customizePrefixCls,
|
|
63
|
+
placeholder: inputNumberLocale.placeholder,
|
|
64
|
+
...restProps
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
);
|
|
52
68
|
}
|
|
53
69
|
);
|
|
54
70
|
var InputNumber = InternalInputNumber;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FullToken, GenerateStyle } from '../../theme/interface';
|
|
3
|
+
export type InputNumberToken = FullToken<'InputNumber'>;
|
|
4
|
+
export declare const genInputStyle: GenerateStyle<InputNumberToken>;
|
|
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];
|
|
6
|
+
export default _default;
|