@gobolt/genesis 0.0.7 → 0.0.8
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/README.md +8 -2
- package/dist/AntdIcon-c395a1c4.js +204 -0
- package/dist/CheckOutlined-52d9ac25.js +29 -0
- package/dist/{CloseCircleFilled-ZIY-u-27.js → CloseCircleFilled-ddc51e7e.js} +11 -8
- package/dist/CloseOutlined-14b8bba1.js +16 -0
- package/dist/Compact-c39ed20d.js +179 -0
- package/dist/ContextIsolator-b09b2c52.js +20 -0
- package/dist/DownOutlined-64a4732a.js +206 -0
- package/dist/EllipsisOutlined-60122660.js +1115 -0
- package/dist/{ExclamationCircleFilled-BICVVQIg.js → ExclamationCircleFilled-23ef9812.js} +22 -16
- package/dist/InfoCircleFilled-c5f90c20.js +16 -0
- package/dist/Overflow-a570fa69.js +361 -0
- package/dist/RightOutlined-83515eb4.js +16 -0
- package/dist/SearchOutlined-a9014e08.js +16 -0
- package/dist/{TextArea-3MOYYuAQ.js → TextArea-20825221.js} +597 -582
- package/dist/{button-BNV2qdrP.js → button-fa1c119c.js} +287 -280
- package/dist/collapse-345bc884.js +20 -0
- package/dist/compact-item-b8f85aa6.js +75 -0
- package/dist/components/Badge/Badge.d.ts +6 -0
- package/dist/components/Badge/Badge.js +102 -0
- package/dist/components/Badge/__stories__/Badge.stories.d.ts +13 -0
- package/dist/components/Badge/__tests__/Badge.test.js +72 -0
- package/dist/components/Badge/icons/ASN.d.ts +2 -0
- package/dist/components/Badge/icons/ASN.js +23 -0
- package/dist/components/Badge/icons/Appointment.d.ts +2 -0
- package/dist/components/Badge/icons/Appointment.js +23 -0
- package/dist/components/Badge/icons/Inventory.d.ts +2 -0
- package/dist/components/Badge/icons/Inventory.js +23 -0
- package/dist/components/Badge/icons/Parcel.d.ts +2 -0
- package/dist/components/Badge/icons/Parcel.js +23 -0
- package/dist/components/Badge/icons/Product.d.ts +2 -0
- package/dist/components/Badge/icons/Product.js +23 -0
- package/dist/components/Badge/icons/Route.d.ts +2 -0
- package/dist/components/Badge/icons/Route.js +23 -0
- package/dist/components/Badge/icons/Shipment.d.ts +2 -0
- package/dist/components/Badge/icons/Shipment.js +23 -0
- package/dist/components/Badge/icons/ShoppingCart.d.ts +2 -0
- package/dist/components/Badge/icons/ShoppingCart.js +23 -0
- package/dist/components/Badge/icons/System.d.ts +2 -0
- package/dist/components/Badge/icons/System.js +23 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.js +23 -0
- package/dist/components/Badge/styles.d.ts +3 -0
- package/dist/components/Badge/styles.js +35 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +8 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +27 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +8 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
- package/dist/components/Breadcrumb/__stories__/Breadcrumb.stories.d.ts +10 -0
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +70 -0
- package/dist/components/Breadcrumb/index.d.ts +3 -0
- package/dist/components/Breadcrumb/index.js +27 -0
- package/dist/components/Breadcrumb/styles.d.ts +23 -0
- package/dist/components/Breadcrumb/styles.js +2457 -0
- package/dist/components/Button/Button.js +42 -0
- package/dist/components/Button/__tests__/Button.test.js +61 -0
- package/dist/components/Button/index.js +22 -0
- package/dist/components/{atoms/button → Button}/styles.js +30 -19
- package/dist/components/{atoms/checkbox → Checkbox}/Checkbox.d.ts +2 -1
- package/dist/components/Checkbox/Checkbox.js +70 -0
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +64 -0
- package/dist/components/Checkbox/index.js +49 -0
- package/dist/components/{atoms/checkbox → Checkbox}/styles.d.ts +1 -3
- package/dist/components/{atoms/checkbox → Checkbox}/styles.js +165 -157
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +72 -0
- package/dist/components/ErrorBoundaryFallback/index.js +51 -0
- package/dist/components/ErrorBoundaryFallback/styles.d.ts +3 -0
- package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.js +38 -34
- package/dist/components/{molecules/form → Form}/Form.d.ts +2 -4
- package/dist/components/Form/Form.js +49 -0
- package/dist/components/Form/__stories__/FormStory.js +130 -0
- package/dist/components/Form/index.js +48 -0
- package/dist/components/{atoms/input → Input}/Input.d.ts +1 -3
- package/dist/components/Input/Input.js +42 -0
- package/dist/components/{atoms/input → Input}/__stories__/Input.stories.d.ts +5 -1
- package/dist/components/Input/__tests__/Input.test.d.ts +1 -0
- package/dist/components/Input/__tests__/Input.test.js +69 -0
- package/dist/components/Input/index.js +31 -0
- package/dist/components/{atoms/input → Input}/styles.d.ts +2 -3
- package/dist/components/Input/styles.js +542 -0
- package/dist/components/Message/Message.d.ts +13 -0
- package/dist/components/Message/Message.js +105 -0
- package/dist/components/Message/__stories__/Message.stories.d.ts +15 -0
- package/dist/components/Message/__tests__/Message.test.d.ts +1 -0
- package/dist/components/Message/__tests__/Message.test.js +88 -0
- package/dist/components/Message/index.d.ts +2 -0
- package/dist/components/Message/index.js +50 -0
- package/dist/components/Message/styles.d.ts +5 -0
- package/dist/components/Message/styles.js +35 -0
- package/dist/components/Notification/Notification.d.ts +16 -0
- package/dist/components/Notification/Notification.js +1436 -0
- package/dist/components/Notification/__stories__/Notification.stories.d.ts +10 -0
- package/dist/components/Notification/__tests__/Notification.test.d.ts +1 -0
- package/dist/components/Notification/__tests__/Notification.test.js +76 -0
- package/dist/components/Notification/index.d.ts +2 -0
- package/dist/components/Notification/index.js +61 -0
- package/dist/components/Notification/styles.d.ts +6 -0
- package/dist/components/Notification/styles.js +49 -0
- package/dist/components/Radio/Radio.d.ts +14 -0
- package/dist/components/Radio/Radio.js +114 -0
- package/dist/components/Radio/RadioGroup.d.ts +12 -0
- package/dist/components/Radio/RadioGroup.js +86 -0
- package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +9 -0
- package/dist/components/Radio/__tests__/RadioGroup.test.d.ts +1 -0
- package/dist/components/Radio/__tests__/RadioGroup.test.js +85 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/index.js +58 -0
- package/dist/components/Radio/states/RadioChecked.d.ts +2 -0
- package/dist/components/Radio/states/RadioChecked.js +18 -0
- package/dist/components/Radio/states/RadioCheckedDisabled.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedDisabled.js +18 -0
- package/dist/components/Radio/states/RadioCheckedFocussed.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedFocussed.js +30 -0
- package/dist/components/Radio/states/RadioCheckedHover.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedHover.js +18 -0
- package/dist/components/Radio/states/RadioUnchecked.d.ts +2 -0
- package/dist/components/Radio/states/RadioUnchecked.js +15 -0
- package/dist/components/Radio/states/RadioUncheckedDisabled.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedDisabled.js +15 -0
- package/dist/components/Radio/states/RadioUncheckedFocussed.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedFocussed.js +29 -0
- package/dist/components/Radio/states/RadioUncheckedHover.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedHover.js +18 -0
- package/dist/components/{atoms/select → Select}/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +48 -0
- package/dist/components/{atoms/select → Select}/__stories__/Select.stories.d.ts +3 -1
- package/dist/components/Select/__tests__/Select.test.d.ts +1 -0
- package/dist/components/Select/__tests__/Select.test.js +101 -0
- package/dist/components/Select/index.js +30 -0
- package/dist/components/{atoms/select → Select}/styles.d.ts +4 -1
- package/dist/components/Select/styles.js +3723 -0
- package/dist/components/Toast/Toast.d.ts +14 -0
- package/dist/components/Toast/Toast.js +48 -0
- package/dist/components/Toast/__stories__/Toast.stories.d.ts +15 -0
- package/dist/components/Toast/__tests__/Toast.test.d.ts +1 -0
- package/dist/components/Toast/__tests__/Toast.test.js +63 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/index.js +48 -0
- package/dist/components/Toast/styles.d.ts +5 -0
- package/dist/components/Toast/styles.js +39 -0
- package/dist/components/{atoms/typography → Typography}/Typography.d.ts +2 -1
- package/dist/components/Typography/Typography.js +48 -0
- package/dist/components/Typography/__tests__/Typography.test.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.js +60 -0
- package/dist/components/Typography/index.js +48 -0
- package/dist/components/Typography/styles.d.ts +7 -0
- package/dist/components/Typography/styles.js +55 -0
- package/dist/components/index.d.ts +18 -14
- package/dist/components/index.js +70 -14
- package/dist/constants/index.d.ts +104 -0
- package/dist/constants/index.js +41 -7
- package/dist/{context-CZsFJmh6.js → context-3b8a39af.js} +547 -536
- package/dist/genesis/GenesisThemeBreakdown.js +69 -22
- package/dist/genesis/GenesisThemeDemo.d.ts +0 -2
- package/dist/genesis/GenesisThemeDemo.js +53 -4
- package/dist/genesis/styles.d.ts +2 -6
- package/dist/genesis/styles.js +1144 -2210
- package/dist/index-0a886e53.js +100 -0
- package/dist/{index-SAAXFt-P.js → index-0b9ee239.js} +347 -338
- package/dist/index-1a33c134.js +1389 -0
- package/dist/index-4003d75b.js +3748 -0
- package/dist/{index-D1v_7IIx.js → index-501fc13d.js} +369 -343
- package/dist/index-89035ea5.js +3242 -0
- package/dist/{index-BQO27mgE.js → index-8c8d2d0c.js} +123 -122
- package/dist/{index-C7kFNqp2.js → index-e2b72ca8.js} +107 -102
- package/dist/index.d.ts +1 -0
- package/dist/index.js +77 -18
- package/dist/{isVisible-CNQjrJPN.js → isVisible-729780f5.js} +110 -82
- package/dist/{magic-string.es-BkUFmFT4.js → magic-string.es-b7491176.js} +103 -56
- package/dist/{SearchOutlined-DuzJkIiQ.js → pickAttrs-00ba4687.js} +16 -26
- package/dist/presets-83ccb923.js +787 -0
- package/dist/providers/GenesisProvider.d.ts +5 -0
- package/dist/providers/GenesisProvider.js +59 -5
- package/dist/providers/ThemeProvider.d.ts +2 -1
- package/dist/providers/ThemeProvider.js +16 -11
- package/dist/providers/ToastProvider.d.ts +6 -0
- package/dist/providers/ToastProvider.js +49 -0
- package/dist/providers/ToastWrapper.d.ts +7 -0
- package/dist/providers/ToastWrapper.js +56 -0
- package/dist/providers/__stories__/GenesisProvider.stories.d.ts +6 -0
- package/dist/providers/index.d.ts +3 -2
- package/dist/providers/index.js +51 -4
- package/dist/setup-aaca7b6f.js +21158 -0
- package/dist/{styled-components.browser.esm-CZ1XM4o4.js → styled-components.browser.esm-02f500bc.js} +134 -72
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +54 -18
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +51 -15
- package/dist/styles/design-tokens/variables.d.ts +7 -7
- package/dist/styles/design-tokens/variables.js +48 -48
- package/dist/styles/global-styles.js +4 -3
- package/dist/styles/theme/genesis-theme.d.ts +3 -0
- package/dist/styles/theme/genesis-theme.js +402 -263
- package/dist/styles/theme/global-styles.js +4 -3
- package/dist/styles/theme/index.js +5 -4
- package/dist/test/setup.js +46 -2
- package/dist/useVariants-a0d64298.js +30 -0
- package/dist/utils/isAllEnglishString.js +2 -1
- package/package.json +34 -28
- package/dist/AntdIcon-Bsnbyy6g.js +0 -200
- package/dist/CheckOutlined-DAynWe12.js +0 -527
- package/dist/Compact-CJBo3f0u.js +0 -185
- package/dist/ContextIsolator-CGkdKtc3.js +0 -20
- package/dist/Form-Cylpi4M4.js +0 -1815
- package/dist/Overflow-CP1M4Z0s.js +0 -369
- package/dist/compact-item-DH13cl8A.js +0 -61
- package/dist/components/atoms/button/Button.js +0 -27
- package/dist/components/atoms/button/index.js +0 -4
- package/dist/components/atoms/checkbox/Checkbox.js +0 -13
- package/dist/components/atoms/checkbox/__tests__/Checkbox.test.js +0 -18
- package/dist/components/atoms/checkbox/index.js +0 -4
- package/dist/components/atoms/index.d.ts +0 -1
- package/dist/components/atoms/index.js +0 -3
- package/dist/components/atoms/input/Input.js +0 -12
- package/dist/components/atoms/input/__tests__/Input.test.js +0 -28
- package/dist/components/atoms/input/index.js +0 -4
- package/dist/components/atoms/input/styles.js +0 -415
- package/dist/components/atoms/select/Select.js +0 -24
- package/dist/components/atoms/select/__tests__/Select.test.js +0 -10735
- package/dist/components/atoms/select/index.js +0 -4
- package/dist/components/atoms/select/styles.js +0 -3868
- package/dist/components/atoms/typography/Typography.js +0 -44
- package/dist/components/atoms/typography/__tests__/Typography.test.js +0 -16
- package/dist/components/atoms/typography/index.js +0 -4
- package/dist/components/atoms/typography/styles.d.ts +0 -11
- package/dist/components/atoms/typography/styles.js +0 -28
- package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +0 -35
- package/dist/components/molecules/error-boundary-fallback/index.js +0 -4
- package/dist/components/molecules/error-boundary-fallback/styles.d.ts +0 -1
- package/dist/components/molecules/form/Form.js +0 -7
- package/dist/components/molecules/form/__stories__/FormStory.js +0 -90
- package/dist/components/molecules/form/index.js +0 -4
- package/dist/index-3MWkSVA1.js +0 -96
- package/dist/index-BPtFqhcp.js +0 -19110
- package/dist/index-BWys7dkb.js +0 -4462
- package/dist/index-VDH3iLaC.js +0 -884
- package/dist/setup-CMYVZCPF.js +0 -33883
- package/dist/useVariants-CEpw6Ww6.js +0 -29
- /package/dist/components/{atoms/checkbox/__tests__/Checkbox.test.d.ts → Badge/__tests__/Badge.test.d.ts} +0 -0
- /package/dist/components/{atoms/input/__tests__/Input.test.d.ts → Breadcrumb/__tests__/Breadcrumb.test.d.ts} +0 -0
- /package/dist/components/{atoms/button → Button}/Button.d.ts +0 -0
- /package/dist/components/{atoms/button → Button}/__stories__/Button.stories.d.ts +0 -0
- /package/dist/components/{atoms/select/__tests__/Select.test.d.ts → Button/__tests__/Button.test.d.ts} +0 -0
- /package/dist/components/{atoms/button → Button}/index.d.ts +0 -0
- /package/dist/components/{atoms/button → Button}/styles.d.ts +0 -0
- /package/dist/components/{atoms/checkbox → Checkbox}/__stories__/Checkbox.stories.d.ts +0 -0
- /package/dist/components/{atoms/typography/__tests__/Typography.test.d.ts → Checkbox/__tests__/Checkbox.test.d.ts} +0 -0
- /package/dist/components/{atoms/checkbox → Checkbox}/index.d.ts +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/ErrorBoundaryFallback.d.ts +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/__stories__/ErrorBoundaryFallback.stories.d.ts +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/index.d.ts +0 -0
- /package/dist/components/{molecules/form → Form}/__stories__/Form.stories.d.ts +0 -0
- /package/dist/components/{molecules/form → Form}/__stories__/FormStory.d.ts +0 -0
- /package/dist/components/{molecules/form → Form}/index.d.ts +0 -0
- /package/dist/components/{atoms/input → Input}/index.d.ts +0 -0
- /package/dist/components/{atoms/select → Select}/index.d.ts +0 -0
- /package/dist/components/{atoms/typography → Typography}/__stories__/Typography.stories.d.ts +0 -0
- /package/dist/components/{atoms/typography → Typography}/index.d.ts +0 -0
- /package/dist/{presetColors-Cl8UP3Nw.js → presetColors-ccf8cb4c.js} +0 -0
- /package/dist/{reactNode-sKPeiqPL.js → reactNode-f4391605.js} +0 -0
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import * as K from "react";
|
|
2
|
-
import f, { useRef as le, cloneElement as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { R as
|
|
7
|
-
import {
|
|
8
|
-
import { u as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
import f, { useRef as le, cloneElement as xr, forwardRef as We, useState as Me, useImperativeHandle as Ze, useEffect as $e, useContext as Sr } from "react";
|
|
3
|
+
import { c as w, d as _e, h as ie, a as Ce, _ as re, e as Re, f as se } from "./presets-83ccb923.js";
|
|
4
|
+
import { m as He, p as T, g as $r, r as Qe, E as Cr, v as Je, t as Te, C as ke, D as er, q as yr, n as Le, w as Ve } from "./index-4003d75b.js";
|
|
5
|
+
import { u as Pe, o as wr } from "./isVisible-729780f5.js";
|
|
6
|
+
import { R as Er } from "./index-8c8d2d0c.js";
|
|
7
|
+
import { C as Rr } from "./CloseCircleFilled-ddc51e7e.js";
|
|
8
|
+
import { u as rr, a as Fe, g as tr } from "./useVariants-a0d64298.js";
|
|
9
|
+
import { u as ar, F as or } from "./context-3b8a39af.js";
|
|
10
|
+
import { b as Ir, a as nr } from "./Compact-c39ed20d.js";
|
|
11
|
+
import { C as Ge } from "./ContextIsolator-b09b2c52.js";
|
|
12
|
+
import { g as zr } from "./compact-item-b8f85aa6.js";
|
|
13
|
+
function Or(e) {
|
|
14
|
+
return He(e, {
|
|
14
15
|
inputAffixPadding: e.paddingXXS
|
|
15
16
|
});
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
+
const Br = (e) => {
|
|
18
19
|
const {
|
|
19
|
-
controlHeight:
|
|
20
|
-
fontSize:
|
|
21
|
-
lineHeight:
|
|
22
|
-
lineWidth:
|
|
23
|
-
controlHeightSM:
|
|
20
|
+
controlHeight: r,
|
|
21
|
+
fontSize: t,
|
|
22
|
+
lineHeight: a,
|
|
23
|
+
lineWidth: o,
|
|
24
|
+
controlHeightSM: d,
|
|
24
25
|
controlHeightLG: i,
|
|
25
26
|
fontSizeLG: l,
|
|
26
27
|
lineHeightLG: S,
|
|
@@ -31,31 +32,31 @@ const Bn = (e) => {
|
|
|
31
32
|
colorPrimaryHover: G,
|
|
32
33
|
colorPrimary: R,
|
|
33
34
|
controlOutlineWidth: A,
|
|
34
|
-
controlOutline:
|
|
35
|
+
controlOutline: te,
|
|
35
36
|
colorErrorOutline: ee,
|
|
36
37
|
colorWarningOutline: y,
|
|
37
|
-
colorBgContainer:
|
|
38
|
+
colorBgContainer: n
|
|
38
39
|
} = e;
|
|
39
40
|
return {
|
|
40
|
-
paddingBlock: Math.max(Math.round((
|
|
41
|
-
paddingBlockSM: Math.max(Math.round((
|
|
42
|
-
paddingBlockLG: Math.ceil((i - l * S) / 2 * 10) / 10 -
|
|
43
|
-
paddingInline: g -
|
|
44
|
-
paddingInlineSM: p -
|
|
45
|
-
paddingInlineLG: C -
|
|
41
|
+
paddingBlock: Math.max(Math.round((r - t * a) / 2 * 10) / 10 - o, 0),
|
|
42
|
+
paddingBlockSM: Math.max(Math.round((d - t * a) / 2 * 10) / 10 - o, 0),
|
|
43
|
+
paddingBlockLG: Math.ceil((i - l * S) / 2 * 10) / 10 - o,
|
|
44
|
+
paddingInline: g - o,
|
|
45
|
+
paddingInlineSM: p - o,
|
|
46
|
+
paddingInlineLG: C - o,
|
|
46
47
|
addonBg: E,
|
|
47
48
|
activeBorderColor: R,
|
|
48
49
|
hoverBorderColor: G,
|
|
49
|
-
activeShadow: `0 0 0 ${A}px ${
|
|
50
|
+
activeShadow: `0 0 0 ${A}px ${te}`,
|
|
50
51
|
errorActiveShadow: `0 0 0 ${A}px ${ee}`,
|
|
51
52
|
warningActiveShadow: `0 0 0 ${A}px ${y}`,
|
|
52
|
-
hoverBg:
|
|
53
|
-
activeBg:
|
|
54
|
-
inputFontSize:
|
|
53
|
+
hoverBg: n,
|
|
54
|
+
activeBg: n,
|
|
55
|
+
inputFontSize: t,
|
|
55
56
|
inputFontSizeLG: l,
|
|
56
|
-
inputFontSizeSM:
|
|
57
|
+
inputFontSizeSM: t
|
|
57
58
|
};
|
|
58
|
-
},
|
|
59
|
+
}, Ar = (e) => ({
|
|
59
60
|
borderColor: e.hoverBorderColor,
|
|
60
61
|
backgroundColor: e.hoverBg
|
|
61
62
|
}), De = (e) => ({
|
|
@@ -68,36 +69,36 @@ const Bn = (e) => {
|
|
|
68
69
|
"input[disabled], textarea[disabled]": {
|
|
69
70
|
cursor: "not-allowed"
|
|
70
71
|
},
|
|
71
|
-
"&:hover:not([disabled])": Object.assign({},
|
|
72
|
+
"&:hover:not([disabled])": Object.assign({}, Ar(He(e, {
|
|
72
73
|
hoverBorderColor: e.colorBorder,
|
|
73
74
|
hoverBg: e.colorBgContainerDisabled
|
|
74
75
|
})))
|
|
75
|
-
}),
|
|
76
|
+
}), ir = (e, r) => ({
|
|
76
77
|
background: e.colorBgContainer,
|
|
77
78
|
borderWidth: e.lineWidth,
|
|
78
79
|
borderStyle: e.lineType,
|
|
79
|
-
borderColor:
|
|
80
|
+
borderColor: r.borderColor,
|
|
80
81
|
"&:hover": {
|
|
81
|
-
borderColor:
|
|
82
|
+
borderColor: r.hoverBorderColor,
|
|
82
83
|
backgroundColor: e.hoverBg
|
|
83
84
|
},
|
|
84
85
|
"&:focus, &:focus-within": {
|
|
85
|
-
borderColor:
|
|
86
|
-
boxShadow:
|
|
86
|
+
borderColor: r.activeBorderColor,
|
|
87
|
+
boxShadow: r.activeShadow,
|
|
87
88
|
outline: 0,
|
|
88
89
|
backgroundColor: e.activeBg
|
|
89
90
|
}
|
|
90
|
-
}), Ke = (e,
|
|
91
|
-
[`&${e.componentCls}-status-${
|
|
91
|
+
}), Ke = (e, r) => ({
|
|
92
|
+
[`&${e.componentCls}-status-${r.status}:not(${e.componentCls}-disabled)`]: Object.assign(Object.assign({}, ir(e, r)), {
|
|
92
93
|
[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]: {
|
|
93
|
-
color:
|
|
94
|
+
color: r.affixColor
|
|
94
95
|
}
|
|
95
96
|
}),
|
|
96
|
-
[`&${e.componentCls}-status-${
|
|
97
|
-
borderColor:
|
|
97
|
+
[`&${e.componentCls}-status-${r.status}${e.componentCls}-disabled`]: {
|
|
98
|
+
borderColor: r.borderColor
|
|
98
99
|
}
|
|
99
|
-
}),
|
|
100
|
-
"&-outlined": Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},
|
|
100
|
+
}), Nr = (e, r) => ({
|
|
101
|
+
"&-outlined": Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ir(e, {
|
|
101
102
|
borderColor: e.colorBorder,
|
|
102
103
|
hoverBorderColor: e.hoverBorderColor,
|
|
103
104
|
activeBorderColor: e.activeBorderColor,
|
|
@@ -118,15 +119,15 @@ const Bn = (e) => {
|
|
|
118
119
|
activeBorderColor: e.colorWarning,
|
|
119
120
|
activeShadow: e.warningActiveShadow,
|
|
120
121
|
affixColor: e.colorWarning
|
|
121
|
-
})),
|
|
122
|
-
}),
|
|
123
|
-
[`&${e.componentCls}-group-wrapper-status-${
|
|
122
|
+
})), r)
|
|
123
|
+
}), qe = (e, r) => ({
|
|
124
|
+
[`&${e.componentCls}-group-wrapper-status-${r.status}`]: {
|
|
124
125
|
[`${e.componentCls}-group-addon`]: {
|
|
125
|
-
borderColor:
|
|
126
|
-
color:
|
|
126
|
+
borderColor: r.addonBorderColor,
|
|
127
|
+
color: r.addonColor
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
|
-
}),
|
|
130
|
+
}), jr = (e) => ({
|
|
130
131
|
"&-outlined": Object.assign(Object.assign(Object.assign({
|
|
131
132
|
[`${e.componentCls}-group`]: {
|
|
132
133
|
"&-addon": {
|
|
@@ -140,11 +141,11 @@ const Bn = (e) => {
|
|
|
140
141
|
borderInlineStart: 0
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
|
-
},
|
|
144
|
+
}, qe(e, {
|
|
144
145
|
status: "error",
|
|
145
146
|
addonBorderColor: e.colorError,
|
|
146
147
|
addonColor: e.colorErrorText
|
|
147
|
-
})),
|
|
148
|
+
})), qe(e, {
|
|
148
149
|
status: "warning",
|
|
149
150
|
addonBorderColor: e.colorWarning,
|
|
150
151
|
addonColor: e.colorWarningText
|
|
@@ -153,9 +154,9 @@ const Bn = (e) => {
|
|
|
153
154
|
[`${e.componentCls}-group-addon`]: Object.assign({}, De(e))
|
|
154
155
|
}
|
|
155
156
|
})
|
|
156
|
-
}),
|
|
157
|
+
}), Tr = (e, r) => {
|
|
157
158
|
const {
|
|
158
|
-
componentCls:
|
|
159
|
+
componentCls: t
|
|
159
160
|
} = e;
|
|
160
161
|
return {
|
|
161
162
|
"&-borderless": Object.assign({
|
|
@@ -165,75 +166,75 @@ const Bn = (e) => {
|
|
|
165
166
|
outline: "none"
|
|
166
167
|
},
|
|
167
168
|
// >>>>> Disabled
|
|
168
|
-
[`&${
|
|
169
|
+
[`&${t}-disabled, &[disabled]`]: {
|
|
169
170
|
color: e.colorTextDisabled,
|
|
170
171
|
cursor: "not-allowed"
|
|
171
172
|
},
|
|
172
173
|
// >>>>> Status
|
|
173
|
-
[`&${
|
|
174
|
+
[`&${t}-status-error`]: {
|
|
174
175
|
"&, & input, & textarea": {
|
|
175
176
|
color: e.colorError
|
|
176
177
|
}
|
|
177
178
|
},
|
|
178
|
-
[`&${
|
|
179
|
+
[`&${t}-status-warning`]: {
|
|
179
180
|
"&, & input, & textarea": {
|
|
180
181
|
color: e.colorWarning
|
|
181
182
|
}
|
|
182
183
|
}
|
|
183
|
-
},
|
|
184
|
+
}, r)
|
|
184
185
|
};
|
|
185
|
-
},
|
|
186
|
-
background:
|
|
186
|
+
}, lr = (e, r) => ({
|
|
187
|
+
background: r.bg,
|
|
187
188
|
borderWidth: e.lineWidth,
|
|
188
189
|
borderStyle: e.lineType,
|
|
189
190
|
borderColor: "transparent",
|
|
190
191
|
"input&, & input, textarea&, & textarea": {
|
|
191
|
-
color:
|
|
192
|
+
color: r == null ? void 0 : r.inputColor
|
|
192
193
|
},
|
|
193
194
|
"&:hover": {
|
|
194
|
-
background:
|
|
195
|
+
background: r.hoverBg
|
|
195
196
|
},
|
|
196
197
|
"&:focus, &:focus-within": {
|
|
197
198
|
outline: 0,
|
|
198
|
-
borderColor:
|
|
199
|
+
borderColor: r.activeBorderColor,
|
|
199
200
|
backgroundColor: e.activeBg
|
|
200
201
|
}
|
|
201
|
-
}),
|
|
202
|
-
[`&${e.componentCls}-status-${
|
|
202
|
+
}), Xe = (e, r) => ({
|
|
203
|
+
[`&${e.componentCls}-status-${r.status}:not(${e.componentCls}-disabled)`]: Object.assign(Object.assign({}, lr(e, r)), {
|
|
203
204
|
[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]: {
|
|
204
|
-
color:
|
|
205
|
+
color: r.affixColor
|
|
205
206
|
}
|
|
206
207
|
})
|
|
207
|
-
}),
|
|
208
|
-
"&-filled": Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},
|
|
208
|
+
}), Fr = (e, r) => ({
|
|
209
|
+
"&-filled": Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, lr(e, {
|
|
209
210
|
bg: e.colorFillTertiary,
|
|
210
211
|
hoverBg: e.colorFillSecondary,
|
|
211
212
|
activeBorderColor: e.activeBorderColor
|
|
212
213
|
})), {
|
|
213
214
|
[`&${e.componentCls}-disabled, &[disabled]`]: Object.assign({}, De(e))
|
|
214
|
-
}),
|
|
215
|
+
}), Xe(e, {
|
|
215
216
|
status: "error",
|
|
216
217
|
bg: e.colorErrorBg,
|
|
217
218
|
hoverBg: e.colorErrorBgHover,
|
|
218
219
|
activeBorderColor: e.colorError,
|
|
219
220
|
inputColor: e.colorErrorText,
|
|
220
221
|
affixColor: e.colorError
|
|
221
|
-
})),
|
|
222
|
+
})), Xe(e, {
|
|
222
223
|
status: "warning",
|
|
223
224
|
bg: e.colorWarningBg,
|
|
224
225
|
hoverBg: e.colorWarningBgHover,
|
|
225
226
|
activeBorderColor: e.colorWarning,
|
|
226
227
|
inputColor: e.colorWarningText,
|
|
227
228
|
affixColor: e.colorWarning
|
|
228
|
-
})),
|
|
229
|
-
}), Ue = (e,
|
|
230
|
-
[`&${e.componentCls}-group-wrapper-status-${
|
|
229
|
+
})), r)
|
|
230
|
+
}), Ue = (e, r) => ({
|
|
231
|
+
[`&${e.componentCls}-group-wrapper-status-${r.status}`]: {
|
|
231
232
|
[`${e.componentCls}-group-addon`]: {
|
|
232
|
-
background:
|
|
233
|
-
color:
|
|
233
|
+
background: r.addonBg,
|
|
234
|
+
color: r.addonColor
|
|
234
235
|
}
|
|
235
236
|
}
|
|
236
|
-
}),
|
|
237
|
+
}), Wr = (e) => ({
|
|
237
238
|
"&-filled": Object.assign(Object.assign(Object.assign({
|
|
238
239
|
[`${e.componentCls}-group`]: {
|
|
239
240
|
"&-addon": {
|
|
@@ -276,7 +277,7 @@ const Bn = (e) => {
|
|
|
276
277
|
}
|
|
277
278
|
}
|
|
278
279
|
})
|
|
279
|
-
}),
|
|
280
|
+
}), _r = (e) => ({
|
|
280
281
|
// Firefox
|
|
281
282
|
"&::-moz-placeholder": {
|
|
282
283
|
opacity: 1
|
|
@@ -289,24 +290,24 @@ const Bn = (e) => {
|
|
|
289
290
|
"&:placeholder-shown": {
|
|
290
291
|
textOverflow: "ellipsis"
|
|
291
292
|
}
|
|
292
|
-
}),
|
|
293
|
+
}), sr = (e) => {
|
|
293
294
|
const {
|
|
294
|
-
paddingBlockLG:
|
|
295
|
-
lineHeightLG:
|
|
296
|
-
borderRadiusLG:
|
|
297
|
-
paddingInlineLG:
|
|
295
|
+
paddingBlockLG: r,
|
|
296
|
+
lineHeightLG: t,
|
|
297
|
+
borderRadiusLG: a,
|
|
298
|
+
paddingInlineLG: o
|
|
298
299
|
} = e;
|
|
299
300
|
return {
|
|
300
|
-
padding: `${T(
|
|
301
|
+
padding: `${T(r)} ${T(o)}`,
|
|
301
302
|
fontSize: e.inputFontSizeLG,
|
|
302
|
-
lineHeight:
|
|
303
|
-
borderRadius:
|
|
303
|
+
lineHeight: t,
|
|
304
|
+
borderRadius: a
|
|
304
305
|
};
|
|
305
|
-
},
|
|
306
|
+
}, dr = (e) => ({
|
|
306
307
|
padding: `${T(e.paddingBlockSM)} ${T(e.paddingInlineSM)}`,
|
|
307
308
|
fontSize: e.inputFontSizeSM,
|
|
308
309
|
borderRadius: e.borderRadiusSM
|
|
309
|
-
}),
|
|
310
|
+
}), cr = (e) => Object.assign(Object.assign({
|
|
310
311
|
position: "relative",
|
|
311
312
|
display: "inline-block",
|
|
312
313
|
width: "100%",
|
|
@@ -317,7 +318,7 @@ const Bn = (e) => {
|
|
|
317
318
|
lineHeight: e.lineHeight,
|
|
318
319
|
borderRadius: e.borderRadius,
|
|
319
320
|
transition: `all ${e.motionDurationMid}`
|
|
320
|
-
},
|
|
321
|
+
}, _r(e.colorTextPlaceholder)), {
|
|
321
322
|
// Reset height for `textarea`s
|
|
322
323
|
"textarea&": {
|
|
323
324
|
maxWidth: "100%",
|
|
@@ -330,16 +331,16 @@ const Bn = (e) => {
|
|
|
330
331
|
resize: "vertical"
|
|
331
332
|
},
|
|
332
333
|
// Size
|
|
333
|
-
"&-lg": Object.assign({},
|
|
334
|
-
"&-sm": Object.assign({},
|
|
334
|
+
"&-lg": Object.assign({}, sr(e)),
|
|
335
|
+
"&-sm": Object.assign({}, dr(e)),
|
|
335
336
|
// RTL
|
|
336
337
|
"&-rtl, &-textarea-rtl": {
|
|
337
338
|
direction: "rtl"
|
|
338
339
|
}
|
|
339
|
-
}),
|
|
340
|
+
}), Hr = (e) => {
|
|
340
341
|
const {
|
|
341
|
-
componentCls:
|
|
342
|
-
antCls:
|
|
342
|
+
componentCls: r,
|
|
343
|
+
antCls: t
|
|
343
344
|
} = e;
|
|
344
345
|
return {
|
|
345
346
|
position: "relative",
|
|
@@ -355,22 +356,22 @@ const Bn = (e) => {
|
|
|
355
356
|
}
|
|
356
357
|
},
|
|
357
358
|
// Sizing options
|
|
358
|
-
[`&-lg ${
|
|
359
|
-
[`&-sm ${
|
|
359
|
+
[`&-lg ${r}, &-lg > ${r}-group-addon`]: Object.assign({}, sr(e)),
|
|
360
|
+
[`&-sm ${r}, &-sm > ${r}-group-addon`]: Object.assign({}, dr(e)),
|
|
360
361
|
// Fix https://github.com/ant-design/ant-design/issues/5754
|
|
361
|
-
[`&-lg ${
|
|
362
|
+
[`&-lg ${t}-select-single ${t}-select-selector`]: {
|
|
362
363
|
height: e.controlHeightLG
|
|
363
364
|
},
|
|
364
|
-
[`&-sm ${
|
|
365
|
+
[`&-sm ${t}-select-single ${t}-select-selector`]: {
|
|
365
366
|
height: e.controlHeightSM
|
|
366
367
|
},
|
|
367
|
-
[`> ${
|
|
368
|
+
[`> ${r}`]: {
|
|
368
369
|
display: "table-cell",
|
|
369
370
|
"&:not(:first-child):not(:last-child)": {
|
|
370
371
|
borderRadius: 0
|
|
371
372
|
}
|
|
372
373
|
},
|
|
373
|
-
[`${
|
|
374
|
+
[`${r}-group`]: {
|
|
374
375
|
"&-addon, &-wrap": {
|
|
375
376
|
display: "table-cell",
|
|
376
377
|
width: 1,
|
|
@@ -394,10 +395,10 @@ const Bn = (e) => {
|
|
|
394
395
|
transition: `all ${e.motionDurationSlow}`,
|
|
395
396
|
lineHeight: 1,
|
|
396
397
|
// Reset Select's style in addon
|
|
397
|
-
[`${
|
|
398
|
+
[`${t}-select`]: {
|
|
398
399
|
margin: `${T(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${T(e.calc(e.paddingInline).mul(-1).equal())}`,
|
|
399
|
-
[`&${
|
|
400
|
-
[`${
|
|
400
|
+
[`&${t}-select-single:not(${t}-select-customize-input):not(${t}-pagination-size-changer)`]: {
|
|
401
|
+
[`${t}-select-selector`]: {
|
|
401
402
|
backgroundColor: "inherit",
|
|
402
403
|
border: `${T(e.lineWidth)} ${e.lineType} transparent`,
|
|
403
404
|
boxShadow: "none"
|
|
@@ -405,10 +406,10 @@ const Bn = (e) => {
|
|
|
405
406
|
}
|
|
406
407
|
},
|
|
407
408
|
// https://github.com/ant-design/ant-design/issues/31333
|
|
408
|
-
[`${
|
|
409
|
+
[`${t}-cascader-picker`]: {
|
|
409
410
|
margin: `-9px ${T(e.calc(e.paddingInline).mul(-1).equal())}`,
|
|
410
411
|
backgroundColor: "transparent",
|
|
411
|
-
[`${
|
|
412
|
+
[`${t}-cascader-input`]: {
|
|
412
413
|
textAlign: "start",
|
|
413
414
|
border: 0,
|
|
414
415
|
boxShadow: "none"
|
|
@@ -416,7 +417,7 @@ const Bn = (e) => {
|
|
|
416
417
|
}
|
|
417
418
|
}
|
|
418
419
|
},
|
|
419
|
-
[
|
|
420
|
+
[r]: {
|
|
420
421
|
width: "100%",
|
|
421
422
|
marginBottom: 0,
|
|
422
423
|
textAlign: "inherit",
|
|
@@ -428,58 +429,58 @@ const Bn = (e) => {
|
|
|
428
429
|
"&:hover": {
|
|
429
430
|
zIndex: 1,
|
|
430
431
|
borderInlineEndWidth: 1,
|
|
431
|
-
[`${
|
|
432
|
+
[`${r}-search-with-button &`]: {
|
|
432
433
|
zIndex: 0
|
|
433
434
|
}
|
|
434
435
|
}
|
|
435
436
|
},
|
|
436
437
|
// Reset rounded corners
|
|
437
|
-
[`> ${
|
|
438
|
+
[`> ${r}:first-child, ${r}-group-addon:first-child`]: {
|
|
438
439
|
borderStartEndRadius: 0,
|
|
439
440
|
borderEndEndRadius: 0,
|
|
440
441
|
// Reset Select's style in addon
|
|
441
|
-
[`${
|
|
442
|
+
[`${t}-select ${t}-select-selector`]: {
|
|
442
443
|
borderStartEndRadius: 0,
|
|
443
444
|
borderEndEndRadius: 0
|
|
444
445
|
}
|
|
445
446
|
},
|
|
446
|
-
[`> ${
|
|
447
|
-
[`&:not(:first-child) ${
|
|
447
|
+
[`> ${r}-affix-wrapper`]: {
|
|
448
|
+
[`&:not(:first-child) ${r}`]: {
|
|
448
449
|
borderStartStartRadius: 0,
|
|
449
450
|
borderEndStartRadius: 0
|
|
450
451
|
},
|
|
451
|
-
[`&:not(:last-child) ${
|
|
452
|
+
[`&:not(:last-child) ${r}`]: {
|
|
452
453
|
borderStartEndRadius: 0,
|
|
453
454
|
borderEndEndRadius: 0
|
|
454
455
|
}
|
|
455
456
|
},
|
|
456
|
-
[`> ${
|
|
457
|
+
[`> ${r}:last-child, ${r}-group-addon:last-child`]: {
|
|
457
458
|
borderStartStartRadius: 0,
|
|
458
459
|
borderEndStartRadius: 0,
|
|
459
460
|
// Reset Select's style in addon
|
|
460
|
-
[`${
|
|
461
|
+
[`${t}-select ${t}-select-selector`]: {
|
|
461
462
|
borderStartStartRadius: 0,
|
|
462
463
|
borderEndStartRadius: 0
|
|
463
464
|
}
|
|
464
465
|
},
|
|
465
|
-
[`${
|
|
466
|
+
[`${r}-affix-wrapper`]: {
|
|
466
467
|
"&:not(:last-child)": {
|
|
467
468
|
borderStartEndRadius: 0,
|
|
468
469
|
borderEndEndRadius: 0,
|
|
469
|
-
[`${
|
|
470
|
+
[`${r}-search &`]: {
|
|
470
471
|
borderStartStartRadius: e.borderRadius,
|
|
471
472
|
borderEndStartRadius: e.borderRadius
|
|
472
473
|
}
|
|
473
474
|
},
|
|
474
|
-
[`&:not(:first-child), ${
|
|
475
|
+
[`&:not(:first-child), ${r}-search &:not(:first-child)`]: {
|
|
475
476
|
borderStartStartRadius: 0,
|
|
476
477
|
borderEndStartRadius: 0
|
|
477
478
|
}
|
|
478
479
|
},
|
|
479
|
-
[`&${
|
|
480
|
+
[`&${r}-group-compact`]: Object.assign(Object.assign({
|
|
480
481
|
display: "block"
|
|
481
|
-
},
|
|
482
|
-
[`${
|
|
482
|
+
}, Cr()), {
|
|
483
|
+
[`${r}-group-addon, ${r}-group-wrap, > ${r}`]: {
|
|
483
484
|
"&:not(:first-child):not(:last-child)": {
|
|
484
485
|
borderInlineEndWidth: e.lineWidth,
|
|
485
486
|
"&:hover, &:focus": {
|
|
@@ -495,9 +496,9 @@ const Bn = (e) => {
|
|
|
495
496
|
borderRadius: 0
|
|
496
497
|
},
|
|
497
498
|
[`
|
|
498
|
-
& > ${
|
|
499
|
-
& > ${
|
|
500
|
-
& > ${
|
|
499
|
+
& > ${r}-affix-wrapper,
|
|
500
|
+
& > ${r}-number-affix-wrapper,
|
|
501
|
+
& > ${t}-picker-range
|
|
501
502
|
`]: {
|
|
502
503
|
display: "inline-flex"
|
|
503
504
|
},
|
|
@@ -506,59 +507,59 @@ const Bn = (e) => {
|
|
|
506
507
|
borderInlineEndWidth: e.lineWidth
|
|
507
508
|
},
|
|
508
509
|
// Undo float for .ant-input-group .ant-input
|
|
509
|
-
[
|
|
510
|
+
[r]: {
|
|
510
511
|
float: "none"
|
|
511
512
|
},
|
|
512
513
|
// reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
|
|
513
|
-
[`& > ${
|
|
514
|
-
& > ${
|
|
515
|
-
& > ${
|
|
516
|
-
& > ${
|
|
514
|
+
[`& > ${t}-select > ${t}-select-selector,
|
|
515
|
+
& > ${t}-select-auto-complete ${r},
|
|
516
|
+
& > ${t}-cascader-picker ${r},
|
|
517
|
+
& > ${r}-group-wrapper ${r}`]: {
|
|
517
518
|
borderInlineEndWidth: e.lineWidth,
|
|
518
519
|
borderRadius: 0,
|
|
519
520
|
"&:hover, &:focus": {
|
|
520
521
|
zIndex: 1
|
|
521
522
|
}
|
|
522
523
|
},
|
|
523
|
-
[`& > ${
|
|
524
|
+
[`& > ${t}-select-focused`]: {
|
|
524
525
|
zIndex: 1
|
|
525
526
|
},
|
|
526
527
|
// update z-index for arrow icon
|
|
527
|
-
[`& > ${
|
|
528
|
+
[`& > ${t}-select > ${t}-select-arrow`]: {
|
|
528
529
|
zIndex: 1
|
|
529
530
|
// https://github.com/ant-design/ant-design/issues/20371
|
|
530
531
|
},
|
|
531
532
|
[`& > *:first-child,
|
|
532
|
-
& > ${
|
|
533
|
-
& > ${
|
|
534
|
-
& > ${
|
|
533
|
+
& > ${t}-select:first-child > ${t}-select-selector,
|
|
534
|
+
& > ${t}-select-auto-complete:first-child ${r},
|
|
535
|
+
& > ${t}-cascader-picker:first-child ${r}`]: {
|
|
535
536
|
borderStartStartRadius: e.borderRadius,
|
|
536
537
|
borderEndStartRadius: e.borderRadius
|
|
537
538
|
},
|
|
538
539
|
[`& > *:last-child,
|
|
539
|
-
& > ${
|
|
540
|
-
& > ${
|
|
541
|
-
& > ${
|
|
540
|
+
& > ${t}-select:last-child > ${t}-select-selector,
|
|
541
|
+
& > ${t}-cascader-picker:last-child ${r},
|
|
542
|
+
& > ${t}-cascader-picker-focused:last-child ${r}`]: {
|
|
542
543
|
borderInlineEndWidth: e.lineWidth,
|
|
543
544
|
borderStartEndRadius: e.borderRadius,
|
|
544
545
|
borderEndEndRadius: e.borderRadius
|
|
545
546
|
},
|
|
546
547
|
// https://github.com/ant-design/ant-design/issues/12493
|
|
547
|
-
[`& > ${
|
|
548
|
+
[`& > ${t}-select-auto-complete ${r}`]: {
|
|
548
549
|
verticalAlign: "top"
|
|
549
550
|
},
|
|
550
|
-
[`${
|
|
551
|
+
[`${r}-group-wrapper + ${r}-group-wrapper`]: {
|
|
551
552
|
marginInlineStart: e.calc(e.lineWidth).mul(-1).equal(),
|
|
552
|
-
[`${
|
|
553
|
+
[`${r}-affix-wrapper`]: {
|
|
553
554
|
borderRadius: 0
|
|
554
555
|
}
|
|
555
556
|
},
|
|
556
|
-
[`${
|
|
557
|
-
[`&${
|
|
558
|
-
[`& > ${
|
|
557
|
+
[`${r}-group-wrapper:not(:last-child)`]: {
|
|
558
|
+
[`&${r}-search > ${r}-group`]: {
|
|
559
|
+
[`& > ${r}-group-addon > ${r}-search-button`]: {
|
|
559
560
|
borderRadius: 0
|
|
560
561
|
},
|
|
561
|
-
[`& > ${
|
|
562
|
+
[`& > ${r}`]: {
|
|
562
563
|
borderStartStartRadius: e.borderRadius,
|
|
563
564
|
borderStartEndRadius: 0,
|
|
564
565
|
borderEndEndRadius: 0,
|
|
@@ -568,22 +569,22 @@ const Bn = (e) => {
|
|
|
568
569
|
}
|
|
569
570
|
})
|
|
570
571
|
};
|
|
571
|
-
},
|
|
572
|
+
}, Pr = (e) => {
|
|
572
573
|
const {
|
|
573
|
-
componentCls:
|
|
574
|
-
controlHeightSM:
|
|
575
|
-
lineWidth:
|
|
576
|
-
calc:
|
|
577
|
-
} = e, i =
|
|
574
|
+
componentCls: r,
|
|
575
|
+
controlHeightSM: t,
|
|
576
|
+
lineWidth: a,
|
|
577
|
+
calc: o
|
|
578
|
+
} = e, d = 16, i = o(t).sub(o(a).mul(2)).sub(d).div(2).equal();
|
|
578
579
|
return {
|
|
579
|
-
[
|
|
580
|
+
[r]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Qe(e)), cr(e)), Nr(e)), Fr(e)), Tr(e)), {
|
|
580
581
|
'&[type="color"]': {
|
|
581
582
|
height: e.controlHeight,
|
|
582
|
-
[`&${
|
|
583
|
+
[`&${r}-lg`]: {
|
|
583
584
|
height: e.controlHeightLG
|
|
584
585
|
},
|
|
585
|
-
[`&${
|
|
586
|
-
height:
|
|
586
|
+
[`&${r}-sm`]: {
|
|
587
|
+
height: t,
|
|
587
588
|
paddingTop: i,
|
|
588
589
|
paddingBottom: i
|
|
589
590
|
}
|
|
@@ -593,14 +594,15 @@ const Bn = (e) => {
|
|
|
593
594
|
}
|
|
594
595
|
})
|
|
595
596
|
};
|
|
596
|
-
},
|
|
597
|
+
}, Dr = (e) => {
|
|
597
598
|
const {
|
|
598
|
-
componentCls:
|
|
599
|
+
componentCls: r
|
|
599
600
|
} = e;
|
|
600
601
|
return {
|
|
601
602
|
// ========================= Input =========================
|
|
602
|
-
[`${
|
|
603
|
+
[`${r}-clear-icon`]: {
|
|
603
604
|
margin: 0,
|
|
605
|
+
padding: 0,
|
|
604
606
|
lineHeight: 0,
|
|
605
607
|
color: e.colorTextQuaternary,
|
|
606
608
|
fontSize: e.fontSizeIcon,
|
|
@@ -626,32 +628,32 @@ const Bn = (e) => {
|
|
|
626
628
|
}
|
|
627
629
|
}
|
|
628
630
|
};
|
|
629
|
-
},
|
|
631
|
+
}, Mr = (e) => {
|
|
630
632
|
const {
|
|
631
|
-
componentCls:
|
|
632
|
-
inputAffixPadding:
|
|
633
|
-
colorTextDescription:
|
|
634
|
-
motionDurationSlow:
|
|
635
|
-
colorIcon:
|
|
633
|
+
componentCls: r,
|
|
634
|
+
inputAffixPadding: t,
|
|
635
|
+
colorTextDescription: a,
|
|
636
|
+
motionDurationSlow: o,
|
|
637
|
+
colorIcon: d,
|
|
636
638
|
colorIconHover: i,
|
|
637
639
|
iconCls: l
|
|
638
|
-
} = e, S = `${
|
|
640
|
+
} = e, S = `${r}-affix-wrapper`, g = `${r}-affix-wrapper-disabled`;
|
|
639
641
|
return {
|
|
640
|
-
[S]: Object.assign(Object.assign(Object.assign(Object.assign({},
|
|
642
|
+
[S]: Object.assign(Object.assign(Object.assign(Object.assign({}, cr(e)), {
|
|
641
643
|
display: "inline-flex",
|
|
642
|
-
[`&:not(${
|
|
644
|
+
[`&:not(${r}-disabled):hover`]: {
|
|
643
645
|
zIndex: 1,
|
|
644
|
-
[`${
|
|
646
|
+
[`${r}-search-with-button &`]: {
|
|
645
647
|
zIndex: 0
|
|
646
648
|
}
|
|
647
649
|
},
|
|
648
650
|
"&-focused, &:focus": {
|
|
649
651
|
zIndex: 1
|
|
650
652
|
},
|
|
651
|
-
[`> input${
|
|
653
|
+
[`> input${r}`]: {
|
|
652
654
|
padding: 0
|
|
653
655
|
},
|
|
654
|
-
[`> input${
|
|
656
|
+
[`> input${r}, > textarea${r}`]: {
|
|
655
657
|
fontSize: "inherit",
|
|
656
658
|
border: "none",
|
|
657
659
|
borderRadius: 0,
|
|
@@ -671,7 +673,7 @@ const Bn = (e) => {
|
|
|
671
673
|
visibility: "hidden",
|
|
672
674
|
content: '"\\a0"'
|
|
673
675
|
},
|
|
674
|
-
[
|
|
676
|
+
[r]: {
|
|
675
677
|
"&-prefix, &-suffix": {
|
|
676
678
|
display: "flex",
|
|
677
679
|
flex: "none",
|
|
@@ -681,24 +683,24 @@ const Bn = (e) => {
|
|
|
681
683
|
}
|
|
682
684
|
},
|
|
683
685
|
"&-show-count-suffix": {
|
|
684
|
-
color:
|
|
686
|
+
color: a
|
|
685
687
|
},
|
|
686
688
|
"&-show-count-has-suffix": {
|
|
687
689
|
marginInlineEnd: e.paddingXXS
|
|
688
690
|
},
|
|
689
691
|
"&-prefix": {
|
|
690
|
-
marginInlineEnd:
|
|
692
|
+
marginInlineEnd: t
|
|
691
693
|
},
|
|
692
694
|
"&-suffix": {
|
|
693
|
-
marginInlineStart:
|
|
695
|
+
marginInlineStart: t
|
|
694
696
|
}
|
|
695
697
|
}
|
|
696
|
-
}),
|
|
698
|
+
}), Dr(e)), {
|
|
697
699
|
// password
|
|
698
|
-
[`${l}${
|
|
699
|
-
color:
|
|
700
|
+
[`${l}${r}-password-icon`]: {
|
|
701
|
+
color: d,
|
|
700
702
|
cursor: "pointer",
|
|
701
|
-
transition: `all ${
|
|
703
|
+
transition: `all ${o}`,
|
|
702
704
|
"&:hover": {
|
|
703
705
|
color: i
|
|
704
706
|
}
|
|
@@ -706,23 +708,23 @@ const Bn = (e) => {
|
|
|
706
708
|
}),
|
|
707
709
|
[g]: {
|
|
708
710
|
// password disabled
|
|
709
|
-
[`${l}${
|
|
710
|
-
color:
|
|
711
|
+
[`${l}${r}-password-icon`]: {
|
|
712
|
+
color: d,
|
|
711
713
|
cursor: "not-allowed",
|
|
712
714
|
"&:hover": {
|
|
713
|
-
color:
|
|
715
|
+
color: d
|
|
714
716
|
}
|
|
715
717
|
}
|
|
716
718
|
}
|
|
717
719
|
};
|
|
718
|
-
},
|
|
720
|
+
}, Lr = (e) => {
|
|
719
721
|
const {
|
|
720
|
-
componentCls:
|
|
721
|
-
borderRadiusLG:
|
|
722
|
-
borderRadiusSM:
|
|
722
|
+
componentCls: r,
|
|
723
|
+
borderRadiusLG: t,
|
|
724
|
+
borderRadiusSM: a
|
|
723
725
|
} = e;
|
|
724
726
|
return {
|
|
725
|
-
[`${
|
|
727
|
+
[`${r}-group`]: Object.assign(Object.assign(Object.assign({}, Qe(e)), Hr(e)), {
|
|
726
728
|
"&-rtl": {
|
|
727
729
|
direction: "rtl"
|
|
728
730
|
},
|
|
@@ -736,17 +738,17 @@ const Bn = (e) => {
|
|
|
736
738
|
},
|
|
737
739
|
// Size
|
|
738
740
|
"&-lg": {
|
|
739
|
-
[`${
|
|
740
|
-
borderRadius:
|
|
741
|
+
[`${r}-group-addon`]: {
|
|
742
|
+
borderRadius: t,
|
|
741
743
|
fontSize: e.inputFontSizeLG
|
|
742
744
|
}
|
|
743
745
|
},
|
|
744
746
|
"&-sm": {
|
|
745
|
-
[`${
|
|
746
|
-
borderRadius:
|
|
747
|
+
[`${r}-group-addon`]: {
|
|
748
|
+
borderRadius: a
|
|
747
749
|
}
|
|
748
750
|
}
|
|
749
|
-
},
|
|
751
|
+
}, jr(e)), Wr(e)), {
|
|
750
752
|
// '&-disabled': {
|
|
751
753
|
// [`${componentCls}-group-addon`]: {
|
|
752
754
|
// ...genDisabledStyle(token),
|
|
@@ -754,70 +756,78 @@ const Bn = (e) => {
|
|
|
754
756
|
// },
|
|
755
757
|
// Fix the issue of using icons in Space Compact mode
|
|
756
758
|
// https://github.com/ant-design/ant-design/issues/42122
|
|
757
|
-
[`&:not(${
|
|
758
|
-
[`${
|
|
759
|
+
[`&:not(${r}-compact-first-item):not(${r}-compact-last-item)${r}-compact-item`]: {
|
|
760
|
+
[`${r}, ${r}-group-addon`]: {
|
|
759
761
|
borderRadius: 0
|
|
760
762
|
}
|
|
761
763
|
},
|
|
762
|
-
[`&:not(${
|
|
763
|
-
[`${
|
|
764
|
+
[`&:not(${r}-compact-last-item)${r}-compact-first-item`]: {
|
|
765
|
+
[`${r}, ${r}-group-addon`]: {
|
|
764
766
|
borderStartEndRadius: 0,
|
|
765
767
|
borderEndEndRadius: 0
|
|
766
768
|
}
|
|
767
769
|
},
|
|
768
|
-
[`&:not(${
|
|
769
|
-
[`${
|
|
770
|
+
[`&:not(${r}-compact-first-item)${r}-compact-last-item`]: {
|
|
771
|
+
[`${r}, ${r}-group-addon`]: {
|
|
770
772
|
borderStartStartRadius: 0,
|
|
771
773
|
borderEndStartRadius: 0
|
|
772
774
|
}
|
|
773
775
|
},
|
|
774
776
|
// Fix the issue of input use show-count param in space compact mode
|
|
775
777
|
// https://github.com/ant-design/ant-design/issues/46872
|
|
776
|
-
[`&:not(${
|
|
777
|
-
[`${
|
|
778
|
+
[`&:not(${r}-compact-last-item)${r}-compact-item`]: {
|
|
779
|
+
[`${r}-affix-wrapper`]: {
|
|
778
780
|
borderStartEndRadius: 0,
|
|
779
781
|
borderEndEndRadius: 0
|
|
780
782
|
}
|
|
783
|
+
},
|
|
784
|
+
// Fix the issue of input use `addonAfter` param in space compact mode
|
|
785
|
+
// https://github.com/ant-design/ant-design/issues/52483
|
|
786
|
+
[`&:not(${r}-compact-first-item)${r}-compact-item`]: {
|
|
787
|
+
[`${r}-affix-wrapper`]: {
|
|
788
|
+
borderStartStartRadius: 0,
|
|
789
|
+
borderEndStartRadius: 0
|
|
790
|
+
}
|
|
781
791
|
}
|
|
782
792
|
})
|
|
783
793
|
})
|
|
784
794
|
};
|
|
785
|
-
},
|
|
795
|
+
}, Vr = (e) => {
|
|
786
796
|
const {
|
|
787
|
-
componentCls:
|
|
788
|
-
antCls:
|
|
789
|
-
} = e,
|
|
797
|
+
componentCls: r,
|
|
798
|
+
antCls: t
|
|
799
|
+
} = e, a = `${r}-search`;
|
|
790
800
|
return {
|
|
791
|
-
[
|
|
792
|
-
[
|
|
801
|
+
[a]: {
|
|
802
|
+
[r]: {
|
|
793
803
|
"&:hover, &:focus": {
|
|
794
|
-
[`+ ${
|
|
804
|
+
[`+ ${r}-group-addon ${a}-button:not(${t}-btn-primary)`]: {
|
|
795
805
|
borderInlineStartColor: e.colorPrimaryHover
|
|
796
806
|
}
|
|
797
807
|
}
|
|
798
808
|
},
|
|
799
|
-
[`${
|
|
809
|
+
[`${r}-affix-wrapper`]: {
|
|
800
810
|
height: e.controlHeight,
|
|
801
811
|
borderRadius: 0
|
|
802
812
|
},
|
|
803
813
|
// fix slight height diff in Firefox:
|
|
804
814
|
// https://ant.design/components/auto-complete-cn/#auto-complete-demo-certain-category
|
|
805
|
-
[`${
|
|
815
|
+
[`${r}-lg`]: {
|
|
806
816
|
lineHeight: e.calc(e.lineHeightLG).sub(2e-4).equal()
|
|
807
817
|
},
|
|
808
|
-
[`> ${
|
|
809
|
-
[`> ${
|
|
818
|
+
[`> ${r}-group`]: {
|
|
819
|
+
[`> ${r}-group-addon:last-child`]: {
|
|
810
820
|
insetInlineStart: -1,
|
|
811
821
|
padding: 0,
|
|
812
822
|
border: 0,
|
|
813
|
-
[`${
|
|
823
|
+
[`${a}-button`]: {
|
|
814
824
|
// Fix https://github.com/ant-design/ant-design/issues/47150
|
|
815
825
|
marginInlineEnd: -1,
|
|
816
826
|
borderStartStartRadius: 0,
|
|
817
827
|
borderEndStartRadius: 0,
|
|
818
828
|
boxShadow: "none"
|
|
819
829
|
},
|
|
820
|
-
[`${
|
|
830
|
+
[`${a}-button:not(${t}-btn-primary)`]: {
|
|
821
831
|
color: e.colorTextDescription,
|
|
822
832
|
"&:hover": {
|
|
823
833
|
color: e.colorPrimaryHover
|
|
@@ -825,7 +835,7 @@ const Bn = (e) => {
|
|
|
825
835
|
"&:active": {
|
|
826
836
|
color: e.colorPrimaryActive
|
|
827
837
|
},
|
|
828
|
-
[`&${
|
|
838
|
+
[`&${t}-btn-loading::before`]: {
|
|
829
839
|
insetInlineStart: 0,
|
|
830
840
|
insetInlineEnd: 0,
|
|
831
841
|
insetBlockStart: 0,
|
|
@@ -834,19 +844,19 @@ const Bn = (e) => {
|
|
|
834
844
|
}
|
|
835
845
|
}
|
|
836
846
|
},
|
|
837
|
-
[`${
|
|
847
|
+
[`${a}-button`]: {
|
|
838
848
|
height: e.controlHeight,
|
|
839
849
|
"&:hover, &:focus": {
|
|
840
850
|
zIndex: 1
|
|
841
851
|
}
|
|
842
852
|
},
|
|
843
853
|
"&-large": {
|
|
844
|
-
[`${
|
|
854
|
+
[`${r}-affix-wrapper, ${a}-button`]: {
|
|
845
855
|
height: e.controlHeightLG
|
|
846
856
|
}
|
|
847
857
|
},
|
|
848
858
|
"&-small": {
|
|
849
|
-
[`${
|
|
859
|
+
[`${r}-affix-wrapper, ${a}-button`]: {
|
|
850
860
|
height: e.controlHeightSM
|
|
851
861
|
}
|
|
852
862
|
},
|
|
@@ -854,47 +864,47 @@ const Bn = (e) => {
|
|
|
854
864
|
direction: "rtl"
|
|
855
865
|
},
|
|
856
866
|
// ===================== Compact Item Customized Styles =====================
|
|
857
|
-
[`&${
|
|
858
|
-
[`&:not(${
|
|
859
|
-
[`${
|
|
860
|
-
[`${
|
|
867
|
+
[`&${r}-compact-item`]: {
|
|
868
|
+
[`&:not(${r}-compact-last-item)`]: {
|
|
869
|
+
[`${r}-group-addon`]: {
|
|
870
|
+
[`${r}-search-button`]: {
|
|
861
871
|
marginInlineEnd: e.calc(e.lineWidth).mul(-1).equal(),
|
|
862
872
|
borderRadius: 0
|
|
863
873
|
}
|
|
864
874
|
}
|
|
865
875
|
},
|
|
866
|
-
[`&:not(${
|
|
867
|
-
[`${
|
|
876
|
+
[`&:not(${r}-compact-first-item)`]: {
|
|
877
|
+
[`${r},${r}-affix-wrapper`]: {
|
|
868
878
|
borderRadius: 0
|
|
869
879
|
}
|
|
870
880
|
},
|
|
871
|
-
[`> ${
|
|
872
|
-
> ${
|
|
873
|
-
${
|
|
881
|
+
[`> ${r}-group-addon ${r}-search-button,
|
|
882
|
+
> ${r},
|
|
883
|
+
${r}-affix-wrapper`]: {
|
|
874
884
|
"&:hover, &:focus, &:active": {
|
|
875
885
|
zIndex: 2
|
|
876
886
|
}
|
|
877
887
|
},
|
|
878
|
-
[`> ${
|
|
888
|
+
[`> ${r}-affix-wrapper-focused`]: {
|
|
879
889
|
zIndex: 2
|
|
880
890
|
}
|
|
881
891
|
}
|
|
882
892
|
}
|
|
883
893
|
};
|
|
884
|
-
},
|
|
894
|
+
}, Gr = (e) => {
|
|
885
895
|
const {
|
|
886
|
-
componentCls:
|
|
887
|
-
paddingLG:
|
|
888
|
-
} = e,
|
|
896
|
+
componentCls: r,
|
|
897
|
+
paddingLG: t
|
|
898
|
+
} = e, a = `${r}-textarea`;
|
|
889
899
|
return {
|
|
890
|
-
[
|
|
900
|
+
[a]: {
|
|
891
901
|
position: "relative",
|
|
892
902
|
"&-show-count": {
|
|
893
903
|
// https://github.com/ant-design/ant-design/issues/33049
|
|
894
|
-
[`> ${
|
|
904
|
+
[`> ${r}`]: {
|
|
895
905
|
height: "100%"
|
|
896
906
|
},
|
|
897
|
-
[`${
|
|
907
|
+
[`${r}-data-count`]: {
|
|
898
908
|
position: "absolute",
|
|
899
909
|
bottom: e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),
|
|
900
910
|
insetInlineEnd: 0,
|
|
@@ -904,14 +914,14 @@ const Bn = (e) => {
|
|
|
904
914
|
}
|
|
905
915
|
},
|
|
906
916
|
[`
|
|
907
|
-
&-allow-clear > ${
|
|
908
|
-
&-affix-wrapper${
|
|
917
|
+
&-allow-clear > ${r},
|
|
918
|
+
&-affix-wrapper${a}-has-feedback ${r}
|
|
909
919
|
`]: {
|
|
910
|
-
paddingInlineEnd:
|
|
920
|
+
paddingInlineEnd: t
|
|
911
921
|
},
|
|
912
|
-
[`&-affix-wrapper${
|
|
922
|
+
[`&-affix-wrapper${r}-affix-wrapper`]: {
|
|
913
923
|
padding: 0,
|
|
914
|
-
[`> textarea${
|
|
924
|
+
[`> textarea${r}`]: {
|
|
915
925
|
fontSize: "inherit",
|
|
916
926
|
border: "none",
|
|
917
927
|
outline: "none",
|
|
@@ -920,19 +930,19 @@ const Bn = (e) => {
|
|
|
920
930
|
boxShadow: "none !important"
|
|
921
931
|
}
|
|
922
932
|
},
|
|
923
|
-
[`${
|
|
933
|
+
[`${r}-suffix`]: {
|
|
924
934
|
margin: 0,
|
|
925
935
|
"> *:not(:last-child)": {
|
|
926
936
|
marginInline: 0
|
|
927
937
|
},
|
|
928
938
|
// Clear Icon
|
|
929
|
-
[`${
|
|
939
|
+
[`${r}-clear-icon`]: {
|
|
930
940
|
position: "absolute",
|
|
931
941
|
insetInlineEnd: e.paddingInline,
|
|
932
942
|
insetBlockStart: e.paddingXS
|
|
933
943
|
},
|
|
934
944
|
// Feedback Icon
|
|
935
|
-
[`${
|
|
945
|
+
[`${a}-suffix`]: {
|
|
936
946
|
position: "absolute",
|
|
937
947
|
top: 0,
|
|
938
948
|
insetInlineEnd: e.paddingInline,
|
|
@@ -945,112 +955,112 @@ const Bn = (e) => {
|
|
|
945
955
|
}
|
|
946
956
|
}
|
|
947
957
|
},
|
|
948
|
-
[`&-affix-wrapper${
|
|
949
|
-
[`${
|
|
950
|
-
[`${
|
|
958
|
+
[`&-affix-wrapper${r}-affix-wrapper-sm`]: {
|
|
959
|
+
[`${r}-suffix`]: {
|
|
960
|
+
[`${r}-clear-icon`]: {
|
|
951
961
|
insetInlineEnd: e.paddingInlineSM
|
|
952
962
|
}
|
|
953
963
|
}
|
|
954
964
|
}
|
|
955
965
|
}
|
|
956
966
|
};
|
|
957
|
-
},
|
|
967
|
+
}, Kr = (e) => {
|
|
958
968
|
const {
|
|
959
|
-
componentCls:
|
|
969
|
+
componentCls: r
|
|
960
970
|
} = e;
|
|
961
971
|
return {
|
|
962
|
-
[`${
|
|
963
|
-
[`&, & input, & textarea, ${
|
|
972
|
+
[`${r}-out-of-range`]: {
|
|
973
|
+
[`&, & input, & textarea, ${r}-show-count-suffix, ${r}-data-count`]: {
|
|
964
974
|
color: e.colorError
|
|
965
975
|
}
|
|
966
976
|
}
|
|
967
977
|
};
|
|
968
|
-
},
|
|
969
|
-
const
|
|
978
|
+
}, ur = $r("Input", (e) => {
|
|
979
|
+
const r = He(e, Or(e));
|
|
970
980
|
return [
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
981
|
+
Pr(r),
|
|
982
|
+
Gr(r),
|
|
983
|
+
Mr(r),
|
|
984
|
+
Lr(r),
|
|
985
|
+
Vr(r),
|
|
986
|
+
Kr(r),
|
|
977
987
|
// =====================================================
|
|
978
988
|
// == Space Compact ==
|
|
979
989
|
// =====================================================
|
|
980
|
-
|
|
990
|
+
zr(r)
|
|
981
991
|
];
|
|
982
|
-
},
|
|
992
|
+
}, Br, {
|
|
983
993
|
resetFont: !1
|
|
984
994
|
});
|
|
985
|
-
function
|
|
995
|
+
function qr(e) {
|
|
986
996
|
return !!(e.addonBefore || e.addonAfter);
|
|
987
997
|
}
|
|
988
|
-
function
|
|
998
|
+
function Xr(e) {
|
|
989
999
|
return !!(e.prefix || e.suffix || e.allowClear);
|
|
990
1000
|
}
|
|
991
|
-
function Ye(e,
|
|
992
|
-
var
|
|
1001
|
+
function Ye(e, r, t) {
|
|
1002
|
+
var a = r.cloneNode(!0), o = Object.create(e, {
|
|
993
1003
|
target: {
|
|
994
|
-
value:
|
|
1004
|
+
value: a
|
|
995
1005
|
},
|
|
996
1006
|
currentTarget: {
|
|
997
|
-
value:
|
|
1007
|
+
value: a
|
|
998
1008
|
}
|
|
999
1009
|
});
|
|
1000
|
-
return
|
|
1001
|
-
|
|
1002
|
-
},
|
|
1010
|
+
return a.value = t, typeof r.selectionStart == "number" && typeof r.selectionEnd == "number" && (a.selectionStart = r.selectionStart, a.selectionEnd = r.selectionEnd), a.setSelectionRange = function() {
|
|
1011
|
+
r.setSelectionRange.apply(r, arguments);
|
|
1012
|
+
}, o;
|
|
1003
1013
|
}
|
|
1004
|
-
function Ee(e,
|
|
1005
|
-
if (
|
|
1006
|
-
var
|
|
1007
|
-
if (
|
|
1008
|
-
|
|
1014
|
+
function Ee(e, r, t, a) {
|
|
1015
|
+
if (t) {
|
|
1016
|
+
var o = r;
|
|
1017
|
+
if (r.type === "click") {
|
|
1018
|
+
o = Ye(r, e, ""), t(o);
|
|
1009
1019
|
return;
|
|
1010
1020
|
}
|
|
1011
|
-
if (e.type !== "file" &&
|
|
1012
|
-
|
|
1021
|
+
if (e.type !== "file" && a !== void 0) {
|
|
1022
|
+
o = Ye(r, e, a), t(o);
|
|
1013
1023
|
return;
|
|
1014
1024
|
}
|
|
1015
|
-
|
|
1025
|
+
t(o);
|
|
1016
1026
|
}
|
|
1017
1027
|
}
|
|
1018
|
-
function
|
|
1028
|
+
function fr(e, r) {
|
|
1019
1029
|
if (e) {
|
|
1020
|
-
e.focus(
|
|
1021
|
-
var
|
|
1022
|
-
if (
|
|
1023
|
-
var
|
|
1024
|
-
switch (
|
|
1030
|
+
e.focus(r);
|
|
1031
|
+
var t = r || {}, a = t.cursor;
|
|
1032
|
+
if (a) {
|
|
1033
|
+
var o = e.value.length;
|
|
1034
|
+
switch (a) {
|
|
1025
1035
|
case "start":
|
|
1026
1036
|
e.setSelectionRange(0, 0);
|
|
1027
1037
|
break;
|
|
1028
1038
|
case "end":
|
|
1029
|
-
e.setSelectionRange(
|
|
1039
|
+
e.setSelectionRange(o, o);
|
|
1030
1040
|
break;
|
|
1031
1041
|
default:
|
|
1032
|
-
e.setSelectionRange(0,
|
|
1042
|
+
e.setSelectionRange(0, o);
|
|
1033
1043
|
}
|
|
1034
1044
|
}
|
|
1035
1045
|
}
|
|
1036
1046
|
}
|
|
1037
|
-
var
|
|
1038
|
-
var
|
|
1047
|
+
var gr = /* @__PURE__ */ f.forwardRef(function(e, r) {
|
|
1048
|
+
var t, a, o, d = e.inputElement, i = e.children, l = e.prefixCls, S = e.prefix, g = e.suffix, p = e.addonBefore, C = e.addonAfter, E = e.className, G = e.style, R = e.disabled, A = e.readOnly, te = e.focused, ee = e.triggerFocus, y = e.allowClear, n = e.value, Q = e.handleReset, $ = e.hidden, m = e.classes, s = e.classNames, c = e.dataAttrs, u = e.styles, I = e.components, F = e.onClear, b = i ?? d, D = (I == null ? void 0 : I.affixWrapper) || "span", ae = (I == null ? void 0 : I.groupWrapper) || "span", W = (I == null ? void 0 : I.wrapper) || "span", h = (I == null ? void 0 : I.groupAddon) || "span", M = le(null), J = function(Y) {
|
|
1039
1049
|
var Z;
|
|
1040
1050
|
(Z = M.current) !== null && Z !== void 0 && Z.contains(Y.target) && (ee == null || ee());
|
|
1041
|
-
},
|
|
1042
|
-
value:
|
|
1043
|
-
className: w((
|
|
1051
|
+
}, oe = Xr(e), z = /* @__PURE__ */ xr(b, {
|
|
1052
|
+
value: n,
|
|
1053
|
+
className: w((t = b.props) === null || t === void 0 ? void 0 : t.className, !oe && (s == null ? void 0 : s.variant)) || null
|
|
1044
1054
|
}), N = le(null);
|
|
1045
|
-
if (f.useImperativeHandle(
|
|
1055
|
+
if (f.useImperativeHandle(r, function() {
|
|
1046
1056
|
return {
|
|
1047
1057
|
nativeElement: N.current || M.current
|
|
1048
1058
|
};
|
|
1049
|
-
}),
|
|
1050
|
-
var
|
|
1059
|
+
}), oe) {
|
|
1060
|
+
var q = null;
|
|
1051
1061
|
if (y) {
|
|
1052
|
-
var _ = !R && !A &&
|
|
1053
|
-
|
|
1062
|
+
var _ = !R && !A && n, H = "".concat(l, "-clear-icon"), B = _e(y) === "object" && y !== null && y !== void 0 && y.clearIcon ? y.clearIcon : "✖";
|
|
1063
|
+
q = /* @__PURE__ */ f.createElement("button", {
|
|
1054
1064
|
type: "button",
|
|
1055
1065
|
onClick: function(Y) {
|
|
1056
1066
|
Q == null || Q(Y), F == null || F();
|
|
@@ -1061,123 +1071,123 @@ var pn = /* @__PURE__ */ f.forwardRef(function(e, n) {
|
|
|
1061
1071
|
className: w(H, ie(ie({}, "".concat(H, "-hidden"), !_), "".concat(H, "-has-suffix"), !!g))
|
|
1062
1072
|
}, B);
|
|
1063
1073
|
}
|
|
1064
|
-
var
|
|
1065
|
-
className: w("".concat(l, "-suffix"),
|
|
1066
|
-
style:
|
|
1067
|
-
},
|
|
1074
|
+
var X = "".concat(l, "-affix-wrapper"), de = w(X, ie(ie(ie(ie(ie({}, "".concat(l, "-disabled"), R), "".concat(X, "-disabled"), R), "".concat(X, "-focused"), te), "".concat(X, "-readonly"), A), "".concat(X, "-input-with-clear-btn"), g && y && n), m == null ? void 0 : m.affixWrapper, s == null ? void 0 : s.affixWrapper, s == null ? void 0 : s.variant), j = (g || y) && /* @__PURE__ */ f.createElement("span", {
|
|
1075
|
+
className: w("".concat(l, "-suffix"), s == null ? void 0 : s.suffix),
|
|
1076
|
+
style: u == null ? void 0 : u.suffix
|
|
1077
|
+
}, q, g);
|
|
1068
1078
|
z = /* @__PURE__ */ f.createElement(D, Ce({
|
|
1069
|
-
className:
|
|
1070
|
-
style:
|
|
1079
|
+
className: de,
|
|
1080
|
+
style: u == null ? void 0 : u.affixWrapper,
|
|
1071
1081
|
onClick: J
|
|
1072
|
-
},
|
|
1082
|
+
}, c == null ? void 0 : c.affixWrapper, {
|
|
1073
1083
|
ref: M
|
|
1074
1084
|
}), S && /* @__PURE__ */ f.createElement("span", {
|
|
1075
|
-
className: w("".concat(l, "-prefix"),
|
|
1076
|
-
style:
|
|
1085
|
+
className: w("".concat(l, "-prefix"), s == null ? void 0 : s.prefix),
|
|
1086
|
+
style: u == null ? void 0 : u.prefix
|
|
1077
1087
|
}, S), z, j);
|
|
1078
1088
|
}
|
|
1079
|
-
if (
|
|
1080
|
-
var k = "".concat(l, "-group"), U = "".concat(k, "-addon"),
|
|
1081
|
-
z = /* @__PURE__ */ f.createElement(
|
|
1089
|
+
if (qr(e)) {
|
|
1090
|
+
var k = "".concat(l, "-group"), U = "".concat(k, "-addon"), ce = "".concat(k, "-wrapper"), ue = w("".concat(l, "-wrapper"), k, m == null ? void 0 : m.wrapper, s == null ? void 0 : s.wrapper), fe = w(ce, ie({}, "".concat(ce, "-disabled"), R), m == null ? void 0 : m.group, s == null ? void 0 : s.groupWrapper);
|
|
1091
|
+
z = /* @__PURE__ */ f.createElement(ae, {
|
|
1082
1092
|
className: fe,
|
|
1083
1093
|
ref: N
|
|
1084
1094
|
}, /* @__PURE__ */ f.createElement(W, {
|
|
1085
|
-
className:
|
|
1086
|
-
}, p && /* @__PURE__ */ f.createElement(
|
|
1095
|
+
className: ue
|
|
1096
|
+
}, p && /* @__PURE__ */ f.createElement(h, {
|
|
1087
1097
|
className: U
|
|
1088
|
-
}, p), z, C && /* @__PURE__ */ f.createElement(
|
|
1098
|
+
}, p), z, C && /* @__PURE__ */ f.createElement(h, {
|
|
1089
1099
|
className: U
|
|
1090
1100
|
}, C)));
|
|
1091
1101
|
}
|
|
1092
1102
|
return /* @__PURE__ */ f.cloneElement(z, {
|
|
1093
|
-
className: w((
|
|
1094
|
-
style:
|
|
1103
|
+
className: w((a = z.props) === null || a === void 0 ? void 0 : a.className, E) || null,
|
|
1104
|
+
style: re(re({}, (o = z.props) === null || o === void 0 ? void 0 : o.style), G),
|
|
1095
1105
|
hidden: $
|
|
1096
1106
|
});
|
|
1097
|
-
}),
|
|
1098
|
-
function
|
|
1107
|
+
}), Ur = ["show"];
|
|
1108
|
+
function pr(e, r) {
|
|
1099
1109
|
return K.useMemo(function() {
|
|
1100
|
-
var
|
|
1101
|
-
|
|
1102
|
-
var
|
|
1103
|
-
return
|
|
1104
|
-
show: !!
|
|
1105
|
-
showFormatter: typeof
|
|
1106
|
-
strategy:
|
|
1110
|
+
var t = {};
|
|
1111
|
+
r && (t.show = _e(r) === "object" && r.formatter ? r.formatter : !!r), t = re(re({}, t), e);
|
|
1112
|
+
var a = t, o = a.show, d = Re(a, Ur);
|
|
1113
|
+
return re(re({}, d), {}, {
|
|
1114
|
+
show: !!o,
|
|
1115
|
+
showFormatter: typeof o == "function" ? o : void 0,
|
|
1116
|
+
strategy: d.strategy || function(i) {
|
|
1107
1117
|
return i.length;
|
|
1108
1118
|
}
|
|
1109
1119
|
});
|
|
1110
|
-
}, [e,
|
|
1120
|
+
}, [e, r]);
|
|
1111
1121
|
}
|
|
1112
|
-
var
|
|
1113
|
-
var
|
|
1114
|
-
|
|
1115
|
-
},
|
|
1122
|
+
var Yr = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKeyDown", "onKeyUp", "prefixCls", "disabled", "htmlSize", "className", "maxLength", "suffix", "showCount", "count", "type", "classes", "classNames", "styles", "onCompositionStart", "onCompositionEnd"], Zr = /* @__PURE__ */ We(function(e, r) {
|
|
1123
|
+
var t = e.autoComplete, a = e.onChange, o = e.onFocus, d = e.onBlur, i = e.onPressEnter, l = e.onKeyDown, S = e.onKeyUp, g = e.prefixCls, p = g === void 0 ? "rc-input" : g, C = e.disabled, E = e.htmlSize, G = e.className, R = e.maxLength, A = e.suffix, te = e.showCount, ee = e.count, y = e.type, n = y === void 0 ? "text" : y, Q = e.classes, $ = e.classNames, m = e.styles, s = e.onCompositionStart, c = e.onCompositionEnd, u = Re(e, Yr), I = Me(!1), F = se(I, 2), b = F[0], D = F[1], ae = le(!1), W = le(!1), h = le(null), M = le(null), J = function(v) {
|
|
1124
|
+
h.current && fr(h.current, v);
|
|
1125
|
+
}, oe = Pe(e.defaultValue, {
|
|
1116
1126
|
value: e.value
|
|
1117
|
-
}), z =
|
|
1118
|
-
Ze(
|
|
1127
|
+
}), z = se(oe, 2), N = z[0], q = z[1], _ = N == null ? "" : String(N), H = Me(null), B = se(H, 2), X = B[0], de = B[1], j = pr(ee, te), k = j.max || R, U = j.strategy(_), ce = !!k && U > k;
|
|
1128
|
+
Ze(r, function() {
|
|
1119
1129
|
var O;
|
|
1120
1130
|
return {
|
|
1121
1131
|
focus: J,
|
|
1122
1132
|
blur: function() {
|
|
1123
1133
|
var L;
|
|
1124
|
-
(L =
|
|
1134
|
+
(L = h.current) === null || L === void 0 || L.blur();
|
|
1125
1135
|
},
|
|
1126
|
-
setSelectionRange: function(L,
|
|
1136
|
+
setSelectionRange: function(L, be, pe) {
|
|
1127
1137
|
var ge;
|
|
1128
|
-
(ge =
|
|
1138
|
+
(ge = h.current) === null || ge === void 0 || ge.setSelectionRange(L, be, pe);
|
|
1129
1139
|
},
|
|
1130
1140
|
select: function() {
|
|
1131
1141
|
var L;
|
|
1132
|
-
(L =
|
|
1142
|
+
(L = h.current) === null || L === void 0 || L.select();
|
|
1133
1143
|
},
|
|
1134
|
-
input:
|
|
1135
|
-
nativeElement: ((O = M.current) === null || O === void 0 ? void 0 : O.nativeElement) ||
|
|
1144
|
+
input: h.current,
|
|
1145
|
+
nativeElement: ((O = M.current) === null || O === void 0 ? void 0 : O.nativeElement) || h.current
|
|
1136
1146
|
};
|
|
1137
1147
|
}), $e(function() {
|
|
1138
1148
|
W.current && (W.current = !1), D(function(O) {
|
|
1139
1149
|
return O && C ? !1 : O;
|
|
1140
1150
|
});
|
|
1141
1151
|
}, [C]);
|
|
1142
|
-
var
|
|
1152
|
+
var ue = function(v, L, be) {
|
|
1143
1153
|
var pe = L;
|
|
1144
|
-
if (!
|
|
1154
|
+
if (!ae.current && j.exceedFormatter && j.max && j.strategy(L) > j.max) {
|
|
1145
1155
|
if (pe = j.exceedFormatter(L, {
|
|
1146
1156
|
max: j.max
|
|
1147
1157
|
}), L !== pe) {
|
|
1148
|
-
var ge,
|
|
1149
|
-
|
|
1158
|
+
var ge, he;
|
|
1159
|
+
de([((ge = h.current) === null || ge === void 0 ? void 0 : ge.selectionStart) || 0, ((he = h.current) === null || he === void 0 ? void 0 : he.selectionEnd) || 0]);
|
|
1150
1160
|
}
|
|
1151
|
-
} else if (
|
|
1161
|
+
} else if (be.source === "compositionEnd")
|
|
1152
1162
|
return;
|
|
1153
|
-
|
|
1163
|
+
q(pe), h.current && Ee(h.current, v, a, pe);
|
|
1154
1164
|
};
|
|
1155
1165
|
$e(function() {
|
|
1156
|
-
if (
|
|
1166
|
+
if (X) {
|
|
1157
1167
|
var O;
|
|
1158
|
-
(O =
|
|
1168
|
+
(O = h.current) === null || O === void 0 || O.setSelectionRange.apply(O, Je(X));
|
|
1159
1169
|
}
|
|
1160
|
-
}, [
|
|
1161
|
-
var fe = function(
|
|
1162
|
-
|
|
1170
|
+
}, [X]);
|
|
1171
|
+
var fe = function(v) {
|
|
1172
|
+
ue(v, v.target.value, {
|
|
1163
1173
|
source: "change"
|
|
1164
1174
|
});
|
|
1165
|
-
}, P = function(
|
|
1166
|
-
|
|
1175
|
+
}, P = function(v) {
|
|
1176
|
+
ae.current = !1, ue(v, v.currentTarget.value, {
|
|
1167
1177
|
source: "compositionEnd"
|
|
1168
|
-
}),
|
|
1169
|
-
}, Y = function(
|
|
1170
|
-
i &&
|
|
1171
|
-
}, Z = function(
|
|
1172
|
-
|
|
1173
|
-
},
|
|
1174
|
-
D(!0),
|
|
1175
|
-
}, Ie = function(
|
|
1176
|
-
W.current && (W.current = !1), D(!1),
|
|
1177
|
-
}, xe = function(
|
|
1178
|
-
|
|
1179
|
-
}, ze =
|
|
1180
|
-
var
|
|
1178
|
+
}), c == null || c(v);
|
|
1179
|
+
}, Y = function(v) {
|
|
1180
|
+
i && v.key === "Enter" && !W.current && (W.current = !0, i(v)), l == null || l(v);
|
|
1181
|
+
}, Z = function(v) {
|
|
1182
|
+
v.key === "Enter" && (W.current = !1), S == null || S(v);
|
|
1183
|
+
}, me = function(v) {
|
|
1184
|
+
D(!0), o == null || o(v);
|
|
1185
|
+
}, Ie = function(v) {
|
|
1186
|
+
W.current && (W.current = !1), D(!1), d == null || d(v);
|
|
1187
|
+
}, xe = function(v) {
|
|
1188
|
+
q(""), J(), h.current && Ee(h.current, v, a);
|
|
1189
|
+
}, ze = ce && "".concat(p, "-out-of-range"), ye = function() {
|
|
1190
|
+
var v = wr(e, [
|
|
1181
1191
|
"prefixCls",
|
|
1182
1192
|
"onPressEnter",
|
|
1183
1193
|
"addonBefore",
|
|
@@ -1197,85 +1207,87 @@ var Yn = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKe
|
|
|
1197
1207
|
"onClear"
|
|
1198
1208
|
]);
|
|
1199
1209
|
return /* @__PURE__ */ f.createElement("input", Ce({
|
|
1200
|
-
autoComplete:
|
|
1201
|
-
},
|
|
1210
|
+
autoComplete: t
|
|
1211
|
+
}, v, {
|
|
1202
1212
|
onChange: fe,
|
|
1203
|
-
onFocus:
|
|
1213
|
+
onFocus: me,
|
|
1204
1214
|
onBlur: Ie,
|
|
1205
1215
|
onKeyDown: Y,
|
|
1206
1216
|
onKeyUp: Z,
|
|
1207
1217
|
className: w(p, ie({}, "".concat(p, "-disabled"), C), $ == null ? void 0 : $.input),
|
|
1208
|
-
style:
|
|
1209
|
-
ref:
|
|
1218
|
+
style: m == null ? void 0 : m.input,
|
|
1219
|
+
ref: h,
|
|
1210
1220
|
size: E,
|
|
1211
|
-
type:
|
|
1212
|
-
onCompositionStart: function(
|
|
1213
|
-
|
|
1221
|
+
type: n,
|
|
1222
|
+
onCompositionStart: function(be) {
|
|
1223
|
+
ae.current = !0, s == null || s(be);
|
|
1214
1224
|
},
|
|
1215
1225
|
onCompositionEnd: P
|
|
1216
1226
|
}));
|
|
1217
1227
|
}, Oe = function() {
|
|
1218
|
-
var
|
|
1228
|
+
var v = Number(k) > 0;
|
|
1219
1229
|
if (A || j.show) {
|
|
1220
1230
|
var L = j.showFormatter ? j.showFormatter({
|
|
1221
1231
|
value: _,
|
|
1222
1232
|
count: U,
|
|
1223
1233
|
maxLength: k
|
|
1224
|
-
}) : "".concat(U).concat(
|
|
1234
|
+
}) : "".concat(U).concat(v ? " / ".concat(k) : "");
|
|
1225
1235
|
return /* @__PURE__ */ f.createElement(f.Fragment, null, j.show && /* @__PURE__ */ f.createElement("span", {
|
|
1226
1236
|
className: w("".concat(p, "-show-count-suffix"), ie({}, "".concat(p, "-show-count-has-suffix"), !!A), $ == null ? void 0 : $.count),
|
|
1227
|
-
style:
|
|
1237
|
+
style: re({}, m == null ? void 0 : m.count)
|
|
1228
1238
|
}, L), A);
|
|
1229
1239
|
}
|
|
1230
1240
|
return null;
|
|
1231
1241
|
};
|
|
1232
|
-
return /* @__PURE__ */ f.createElement(
|
|
1242
|
+
return /* @__PURE__ */ f.createElement(gr, Ce({}, u, {
|
|
1233
1243
|
prefixCls: p,
|
|
1234
1244
|
className: w(G, ze),
|
|
1235
1245
|
handleReset: xe,
|
|
1236
1246
|
value: _,
|
|
1237
|
-
focused:
|
|
1247
|
+
focused: b,
|
|
1238
1248
|
triggerFocus: J,
|
|
1239
1249
|
suffix: Oe(),
|
|
1240
1250
|
disabled: C,
|
|
1241
1251
|
classes: Q,
|
|
1242
1252
|
classNames: $,
|
|
1243
|
-
styles:
|
|
1253
|
+
styles: m
|
|
1244
1254
|
}), ye());
|
|
1245
1255
|
});
|
|
1246
|
-
const
|
|
1247
|
-
let
|
|
1248
|
-
return typeof e == "object" && (e != null && e.clearIcon) ?
|
|
1249
|
-
clearIcon: /* @__PURE__ */ f.createElement(
|
|
1250
|
-
}),
|
|
1251
|
-
};
|
|
1252
|
-
function
|
|
1253
|
-
const
|
|
1254
|
-
|
|
1255
|
-
var
|
|
1256
|
-
!((
|
|
1256
|
+
const Qr = (e) => {
|
|
1257
|
+
let r;
|
|
1258
|
+
return typeof e == "object" && (e != null && e.clearIcon) ? r = e : e && (r = {
|
|
1259
|
+
clearIcon: /* @__PURE__ */ f.createElement(Rr, null)
|
|
1260
|
+
}), r;
|
|
1261
|
+
}, vr = Qr;
|
|
1262
|
+
function Jr(e, r) {
|
|
1263
|
+
const t = le([]), a = () => {
|
|
1264
|
+
t.current.push(setTimeout(() => {
|
|
1265
|
+
var o, d, i, l;
|
|
1266
|
+
!((o = e.current) === null || o === void 0) && o.input && ((d = e.current) === null || d === void 0 ? void 0 : d.input.getAttribute("type")) === "password" && (!((i = e.current) === null || i === void 0) && i.input.hasAttribute("value")) && ((l = e.current) === null || l === void 0 || l.input.removeAttribute("value"));
|
|
1257
1267
|
}));
|
|
1258
1268
|
};
|
|
1259
|
-
return $e(() => (
|
|
1260
|
-
|
|
1261
|
-
})), []),
|
|
1269
|
+
return $e(() => (r && a(), () => t.current.forEach((o) => {
|
|
1270
|
+
o && clearTimeout(o);
|
|
1271
|
+
})), []), a;
|
|
1262
1272
|
}
|
|
1263
|
-
function
|
|
1273
|
+
function kr(e) {
|
|
1264
1274
|
return !!(e.prefix || e.suffix || e.allowClear || e.showCount);
|
|
1265
1275
|
}
|
|
1266
|
-
var
|
|
1267
|
-
var
|
|
1268
|
-
for (var
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1276
|
+
var et = globalThis && globalThis.__rest || function(e, r) {
|
|
1277
|
+
var t = {};
|
|
1278
|
+
for (var a in e)
|
|
1279
|
+
Object.prototype.hasOwnProperty.call(e, a) && r.indexOf(a) < 0 && (t[a] = e[a]);
|
|
1280
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1281
|
+
for (var o = 0, a = Object.getOwnPropertySymbols(e); o < a.length; o++)
|
|
1282
|
+
r.indexOf(a[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[o]) && (t[a[o]] = e[a[o]]);
|
|
1283
|
+
return t;
|
|
1272
1284
|
};
|
|
1273
|
-
const
|
|
1274
|
-
var
|
|
1285
|
+
const mr = /* @__PURE__ */ We((e, r) => {
|
|
1286
|
+
var t;
|
|
1275
1287
|
const {
|
|
1276
|
-
prefixCls:
|
|
1277
|
-
bordered:
|
|
1278
|
-
status:
|
|
1288
|
+
prefixCls: a,
|
|
1289
|
+
bordered: o = !0,
|
|
1290
|
+
status: d,
|
|
1279
1291
|
size: i,
|
|
1280
1292
|
disabled: l,
|
|
1281
1293
|
onBlur: S,
|
|
@@ -1286,12 +1298,12 @@ const er = /* @__PURE__ */ We((e, n) => {
|
|
|
1286
1298
|
addonBefore: G,
|
|
1287
1299
|
className: R,
|
|
1288
1300
|
style: A,
|
|
1289
|
-
styles:
|
|
1301
|
+
styles: te,
|
|
1290
1302
|
rootClassName: ee,
|
|
1291
1303
|
onChange: y,
|
|
1292
|
-
classNames:
|
|
1304
|
+
classNames: n,
|
|
1293
1305
|
variant: Q
|
|
1294
|
-
} = e, $ =
|
|
1306
|
+
} = e, $ = et(e, ["prefixCls", "bordered", "status", "size", "disabled", "onBlur", "onFocus", "suffix", "allowClear", "addonAfter", "addonBefore", "className", "style", "styles", "rootClassName", "onChange", "classNames", "variant"]);
|
|
1295
1307
|
if (process.env.NODE_ENV !== "production") {
|
|
1296
1308
|
const {
|
|
1297
1309
|
deprecated: P
|
|
@@ -1299,20 +1311,20 @@ const er = /* @__PURE__ */ We((e, n) => {
|
|
|
1299
1311
|
P(!("bordered" in e), "bordered", "variant");
|
|
1300
1312
|
}
|
|
1301
1313
|
const {
|
|
1302
|
-
getPrefixCls:
|
|
1303
|
-
direction:
|
|
1304
|
-
input:
|
|
1305
|
-
} = f.useContext(ke),
|
|
1314
|
+
getPrefixCls: m,
|
|
1315
|
+
direction: s,
|
|
1316
|
+
input: c
|
|
1317
|
+
} = f.useContext(ke), u = m("input", a), I = le(null), F = ar(u), [b, D, ae] = ur(u, F), {
|
|
1306
1318
|
compactSize: W,
|
|
1307
|
-
compactItemClassnames:
|
|
1308
|
-
} =
|
|
1319
|
+
compactItemClassnames: h
|
|
1320
|
+
} = Ir(u, s), M = nr((P) => {
|
|
1309
1321
|
var Y;
|
|
1310
1322
|
return (Y = i ?? W) !== null && Y !== void 0 ? Y : P;
|
|
1311
|
-
}), J = f.useContext(
|
|
1323
|
+
}), J = f.useContext(er), oe = l ?? J, {
|
|
1312
1324
|
status: z,
|
|
1313
1325
|
hasFeedback: N,
|
|
1314
|
-
feedbackIcon:
|
|
1315
|
-
} =
|
|
1326
|
+
feedbackIcon: q
|
|
1327
|
+
} = Sr(or), _ = tr(z, d), H = kr(e) || !!N, B = le(H);
|
|
1316
1328
|
if (process.env.NODE_ENV !== "production") {
|
|
1317
1329
|
const P = Te("Input");
|
|
1318
1330
|
$e(() => {
|
|
@@ -1320,26 +1332,26 @@ const er = /* @__PURE__ */ We((e, n) => {
|
|
|
1320
1332
|
H && !B.current && process.env.NODE_ENV !== "production" && P(document.activeElement === ((Y = I.current) === null || Y === void 0 ? void 0 : Y.input), "usage", "When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"), B.current = H;
|
|
1321
1333
|
}, [H]);
|
|
1322
1334
|
}
|
|
1323
|
-
const
|
|
1324
|
-
|
|
1335
|
+
const X = Jr(I, !0), de = (P) => {
|
|
1336
|
+
X(), S == null || S(P);
|
|
1325
1337
|
}, j = (P) => {
|
|
1326
|
-
|
|
1338
|
+
X(), g == null || g(P);
|
|
1327
1339
|
}, k = (P) => {
|
|
1328
|
-
|
|
1329
|
-
}, U = (N || p) && /* @__PURE__ */ f.createElement(f.Fragment, null, p, N &&
|
|
1330
|
-
return
|
|
1331
|
-
ref:
|
|
1332
|
-
prefixCls:
|
|
1333
|
-
autoComplete:
|
|
1340
|
+
X(), y == null || y(P);
|
|
1341
|
+
}, U = (N || p) && /* @__PURE__ */ f.createElement(f.Fragment, null, p, N && q), ce = vr(C ?? (c == null ? void 0 : c.allowClear)), [ue, fe] = rr("input", Q, o);
|
|
1342
|
+
return b(/* @__PURE__ */ f.createElement(Zr, Object.assign({
|
|
1343
|
+
ref: yr(r, I),
|
|
1344
|
+
prefixCls: u,
|
|
1345
|
+
autoComplete: c == null ? void 0 : c.autoComplete
|
|
1334
1346
|
}, $, {
|
|
1335
|
-
disabled:
|
|
1336
|
-
onBlur:
|
|
1347
|
+
disabled: oe,
|
|
1348
|
+
onBlur: de,
|
|
1337
1349
|
onFocus: j,
|
|
1338
|
-
style: Object.assign(Object.assign({},
|
|
1339
|
-
styles: Object.assign(Object.assign({},
|
|
1350
|
+
style: Object.assign(Object.assign({}, c == null ? void 0 : c.style), A),
|
|
1351
|
+
styles: Object.assign(Object.assign({}, c == null ? void 0 : c.styles), te),
|
|
1340
1352
|
suffix: U,
|
|
1341
|
-
allowClear:
|
|
1342
|
-
className: w(R, ee,
|
|
1353
|
+
allowClear: ce,
|
|
1354
|
+
className: w(R, ee, ae, F, h, c == null ? void 0 : c.className),
|
|
1343
1355
|
onChange: k,
|
|
1344
1356
|
addonBefore: G && /* @__PURE__ */ f.createElement(Ge, {
|
|
1345
1357
|
form: !0,
|
|
@@ -1349,34 +1361,35 @@ const er = /* @__PURE__ */ We((e, n) => {
|
|
|
1349
1361
|
form: !0,
|
|
1350
1362
|
space: !0
|
|
1351
1363
|
}, E),
|
|
1352
|
-
classNames: Object.assign(Object.assign(Object.assign({},
|
|
1364
|
+
classNames: Object.assign(Object.assign(Object.assign({}, n), c == null ? void 0 : c.classNames), {
|
|
1353
1365
|
input: w({
|
|
1354
|
-
[`${
|
|
1355
|
-
[`${
|
|
1356
|
-
[`${
|
|
1357
|
-
},
|
|
1366
|
+
[`${u}-sm`]: M === "small",
|
|
1367
|
+
[`${u}-lg`]: M === "large",
|
|
1368
|
+
[`${u}-rtl`]: s === "rtl"
|
|
1369
|
+
}, n == null ? void 0 : n.input, (t = c == null ? void 0 : c.classNames) === null || t === void 0 ? void 0 : t.input, D),
|
|
1358
1370
|
variant: w({
|
|
1359
|
-
[`${
|
|
1360
|
-
}, Fe(
|
|
1371
|
+
[`${u}-${ue}`]: fe
|
|
1372
|
+
}, Fe(u, _)),
|
|
1361
1373
|
affixWrapper: w({
|
|
1362
|
-
[`${
|
|
1363
|
-
[`${
|
|
1364
|
-
[`${
|
|
1374
|
+
[`${u}-affix-wrapper-sm`]: M === "small",
|
|
1375
|
+
[`${u}-affix-wrapper-lg`]: M === "large",
|
|
1376
|
+
[`${u}-affix-wrapper-rtl`]: s === "rtl"
|
|
1365
1377
|
}, D),
|
|
1366
1378
|
wrapper: w({
|
|
1367
|
-
[`${
|
|
1379
|
+
[`${u}-group-rtl`]: s === "rtl"
|
|
1368
1380
|
}, D),
|
|
1369
1381
|
groupWrapper: w({
|
|
1370
|
-
[`${
|
|
1371
|
-
[`${
|
|
1372
|
-
[`${
|
|
1373
|
-
[`${
|
|
1374
|
-
}, Fe(`${
|
|
1382
|
+
[`${u}-group-wrapper-sm`]: M === "small",
|
|
1383
|
+
[`${u}-group-wrapper-lg`]: M === "large",
|
|
1384
|
+
[`${u}-group-wrapper-rtl`]: s === "rtl",
|
|
1385
|
+
[`${u}-group-wrapper-${ue}`]: fe
|
|
1386
|
+
}, Fe(`${u}-group-wrapper`, _, N), D)
|
|
1375
1387
|
})
|
|
1376
1388
|
})));
|
|
1377
1389
|
});
|
|
1378
|
-
process.env.NODE_ENV !== "production" && (
|
|
1379
|
-
|
|
1390
|
+
process.env.NODE_ENV !== "production" && (mr.displayName = "Input");
|
|
1391
|
+
const Ct = mr;
|
|
1392
|
+
var rt = `
|
|
1380
1393
|
min-height:0 !important;
|
|
1381
1394
|
max-height:none !important;
|
|
1382
1395
|
height:0 !important;
|
|
@@ -1387,31 +1400,31 @@ var nr = `
|
|
|
1387
1400
|
top:0 !important;
|
|
1388
1401
|
right:0 !important;
|
|
1389
1402
|
pointer-events: none !important;
|
|
1390
|
-
`,
|
|
1391
|
-
function
|
|
1392
|
-
var
|
|
1393
|
-
if (
|
|
1394
|
-
return Be[
|
|
1395
|
-
var
|
|
1396
|
-
return "".concat(g, ":").concat(
|
|
1403
|
+
`, tt = ["letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "font-variant", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing", "word-break", "white-space"], Be = {}, ne;
|
|
1404
|
+
function at(e) {
|
|
1405
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, t = e.getAttribute("id") || e.getAttribute("data-reactid") || e.getAttribute("name");
|
|
1406
|
+
if (r && Be[t])
|
|
1407
|
+
return Be[t];
|
|
1408
|
+
var a = window.getComputedStyle(e), o = a.getPropertyValue("box-sizing") || a.getPropertyValue("-moz-box-sizing") || a.getPropertyValue("-webkit-box-sizing"), d = parseFloat(a.getPropertyValue("padding-bottom")) + parseFloat(a.getPropertyValue("padding-top")), i = parseFloat(a.getPropertyValue("border-bottom-width")) + parseFloat(a.getPropertyValue("border-top-width")), l = tt.map(function(g) {
|
|
1409
|
+
return "".concat(g, ":").concat(a.getPropertyValue(g));
|
|
1397
1410
|
}).join(";"), S = {
|
|
1398
1411
|
sizingStyle: l,
|
|
1399
|
-
paddingSize:
|
|
1412
|
+
paddingSize: d,
|
|
1400
1413
|
borderSize: i,
|
|
1401
|
-
boxSizing:
|
|
1414
|
+
boxSizing: o
|
|
1402
1415
|
};
|
|
1403
|
-
return
|
|
1416
|
+
return r && t && (Be[t] = S), S;
|
|
1404
1417
|
}
|
|
1405
|
-
function
|
|
1406
|
-
var
|
|
1407
|
-
|
|
1408
|
-
var
|
|
1409
|
-
|
|
1410
|
-
var g = void 0, p = void 0, C, E =
|
|
1411
|
-
if (l === "border-box" ? E += i : l === "content-box" && (E -=
|
|
1412
|
-
|
|
1413
|
-
var G =
|
|
1414
|
-
|
|
1418
|
+
function ot(e) {
|
|
1419
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
|
|
1420
|
+
ne || (ne = document.createElement("textarea"), ne.setAttribute("tab-index", "-1"), ne.setAttribute("aria-hidden", "true"), ne.setAttribute("name", "hiddenTextarea"), document.body.appendChild(ne)), e.getAttribute("wrap") ? ne.setAttribute("wrap", e.getAttribute("wrap")) : ne.removeAttribute("wrap");
|
|
1421
|
+
var o = at(e, r), d = o.paddingSize, i = o.borderSize, l = o.boxSizing, S = o.sizingStyle;
|
|
1422
|
+
ne.setAttribute("style", "".concat(S, ";").concat(rt)), ne.value = e.value || e.placeholder || "";
|
|
1423
|
+
var g = void 0, p = void 0, C, E = ne.scrollHeight;
|
|
1424
|
+
if (l === "border-box" ? E += i : l === "content-box" && (E -= d), t !== null || a !== null) {
|
|
1425
|
+
ne.value = " ";
|
|
1426
|
+
var G = ne.scrollHeight - d;
|
|
1427
|
+
t !== null && (g = G * t, l === "border-box" && (g = g + d + i), E = Math.max(g, E)), a !== null && (p = G * a, l === "border-box" && (p = p + d + i), C = E > p ? "" : "hidden", E = Math.min(p, E));
|
|
1415
1428
|
}
|
|
1416
1429
|
var R = {
|
|
1417
1430
|
height: E,
|
|
@@ -1420,144 +1433,144 @@ function ar(e) {
|
|
|
1420
1433
|
};
|
|
1421
1434
|
return g && (R.minHeight = g), p && (R.maxHeight = p), R;
|
|
1422
1435
|
}
|
|
1423
|
-
var
|
|
1424
|
-
var
|
|
1425
|
-
value:
|
|
1436
|
+
var nt = ["prefixCls", "defaultValue", "value", "autoSize", "onResize", "className", "style", "disabled", "onChange", "onInternalAutoSize"], Ae = 0, Ne = 1, je = 2, it = /* @__PURE__ */ K.forwardRef(function(e, r) {
|
|
1437
|
+
var t = e, a = t.prefixCls, o = t.defaultValue, d = t.value, i = t.autoSize, l = t.onResize, S = t.className, g = t.style, p = t.disabled, C = t.onChange, E = t.onInternalAutoSize, G = Re(t, nt), R = Pe(o, {
|
|
1438
|
+
value: d,
|
|
1426
1439
|
postState: function(B) {
|
|
1427
1440
|
return B ?? "";
|
|
1428
1441
|
}
|
|
1429
|
-
}), A =
|
|
1442
|
+
}), A = se(R, 2), te = A[0], ee = A[1], y = function(B) {
|
|
1430
1443
|
ee(B.target.value), C == null || C(B);
|
|
1431
|
-
},
|
|
1432
|
-
K.useImperativeHandle(
|
|
1444
|
+
}, n = K.useRef();
|
|
1445
|
+
K.useImperativeHandle(r, function() {
|
|
1433
1446
|
return {
|
|
1434
|
-
textArea:
|
|
1447
|
+
textArea: n.current
|
|
1435
1448
|
};
|
|
1436
1449
|
});
|
|
1437
1450
|
var Q = K.useMemo(function() {
|
|
1438
|
-
return i &&
|
|
1439
|
-
}, [i]), $ =
|
|
1451
|
+
return i && _e(i) === "object" ? [i.minRows, i.maxRows] : [];
|
|
1452
|
+
}, [i]), $ = se(Q, 2), m = $[0], s = $[1], c = !!i, u = function() {
|
|
1440
1453
|
try {
|
|
1441
|
-
if (document.activeElement ===
|
|
1442
|
-
var B =
|
|
1443
|
-
|
|
1454
|
+
if (document.activeElement === n.current) {
|
|
1455
|
+
var B = n.current, X = B.selectionStart, de = B.selectionEnd, j = B.scrollTop;
|
|
1456
|
+
n.current.setSelectionRange(X, de), n.current.scrollTop = j;
|
|
1444
1457
|
}
|
|
1445
1458
|
} catch {
|
|
1446
1459
|
}
|
|
1447
|
-
}, I = K.useState(je), F =
|
|
1460
|
+
}, I = K.useState(je), F = se(I, 2), b = F[0], D = F[1], ae = K.useState(), W = se(ae, 2), h = W[0], M = W[1], J = function() {
|
|
1448
1461
|
D(Ae), process.env.NODE_ENV === "test" && (E == null || E());
|
|
1449
1462
|
};
|
|
1450
1463
|
Le(function() {
|
|
1451
|
-
|
|
1452
|
-
}, [
|
|
1453
|
-
if (
|
|
1464
|
+
c && J();
|
|
1465
|
+
}, [d, m, s, c]), Le(function() {
|
|
1466
|
+
if (b === Ae)
|
|
1454
1467
|
D(Ne);
|
|
1455
|
-
else if (
|
|
1456
|
-
var H =
|
|
1468
|
+
else if (b === Ne) {
|
|
1469
|
+
var H = ot(n.current, !1, m, s);
|
|
1457
1470
|
D(je), M(H);
|
|
1458
1471
|
} else
|
|
1459
|
-
|
|
1460
|
-
}, [
|
|
1461
|
-
var
|
|
1462
|
-
Ve.cancel(
|
|
1472
|
+
u();
|
|
1473
|
+
}, [b]);
|
|
1474
|
+
var oe = K.useRef(), z = function() {
|
|
1475
|
+
Ve.cancel(oe.current);
|
|
1463
1476
|
}, N = function(B) {
|
|
1464
|
-
|
|
1477
|
+
b === je && (l == null || l(B), i && (z(), oe.current = Ve(function() {
|
|
1465
1478
|
J();
|
|
1466
1479
|
})));
|
|
1467
1480
|
};
|
|
1468
1481
|
K.useEffect(function() {
|
|
1469
1482
|
return z;
|
|
1470
1483
|
}, []);
|
|
1471
|
-
var
|
|
1472
|
-
return (
|
|
1484
|
+
var q = c ? h : null, _ = re(re({}, g), q);
|
|
1485
|
+
return (b === Ae || b === Ne) && (_.overflowY = "hidden", _.overflowX = "hidden"), /* @__PURE__ */ K.createElement(Er, {
|
|
1473
1486
|
onResize: N,
|
|
1474
1487
|
disabled: !(i || l)
|
|
1475
1488
|
}, /* @__PURE__ */ K.createElement("textarea", Ce({}, G, {
|
|
1476
|
-
ref:
|
|
1489
|
+
ref: n,
|
|
1477
1490
|
style: _,
|
|
1478
|
-
className: w(
|
|
1491
|
+
className: w(a, S, ie({}, "".concat(a, "-disabled"), p)),
|
|
1479
1492
|
disabled: p,
|
|
1480
|
-
value:
|
|
1493
|
+
value: te,
|
|
1481
1494
|
onChange: y
|
|
1482
1495
|
})));
|
|
1483
|
-
}),
|
|
1484
|
-
var
|
|
1485
|
-
value:
|
|
1486
|
-
defaultValue:
|
|
1487
|
-
}), W =
|
|
1496
|
+
}), lt = ["defaultValue", "value", "onFocus", "onBlur", "onChange", "allowClear", "maxLength", "onCompositionStart", "onCompositionEnd", "suffix", "prefixCls", "showCount", "count", "className", "style", "disabled", "hidden", "classNames", "styles", "onResize", "onClear", "onPressEnter", "readOnly", "autoSize", "onKeyDown"], st = /* @__PURE__ */ f.forwardRef(function(e, r) {
|
|
1497
|
+
var t, a = e.defaultValue, o = e.value, d = e.onFocus, i = e.onBlur, l = e.onChange, S = e.allowClear, g = e.maxLength, p = e.onCompositionStart, C = e.onCompositionEnd, E = e.suffix, G = e.prefixCls, R = G === void 0 ? "rc-textarea" : G, A = e.showCount, te = e.count, ee = e.className, y = e.style, n = e.disabled, Q = e.hidden, $ = e.classNames, m = e.styles, s = e.onResize, c = e.onClear, u = e.onPressEnter, I = e.readOnly, F = e.autoSize, b = e.onKeyDown, D = Re(e, lt), ae = Pe(a, {
|
|
1498
|
+
value: o,
|
|
1499
|
+
defaultValue: a
|
|
1500
|
+
}), W = se(ae, 2), h = W[0], M = W[1], J = h == null ? "" : String(h), oe = f.useState(!1), z = se(oe, 2), N = z[0], q = z[1], _ = f.useRef(!1), H = f.useState(null), B = se(H, 2), X = B[0], de = B[1], j = le(null), k = le(null), U = function() {
|
|
1488
1501
|
var x;
|
|
1489
1502
|
return (x = k.current) === null || x === void 0 ? void 0 : x.textArea;
|
|
1490
|
-
},
|
|
1503
|
+
}, ce = function() {
|
|
1491
1504
|
U().focus();
|
|
1492
1505
|
};
|
|
1493
|
-
Ze(
|
|
1506
|
+
Ze(r, function() {
|
|
1494
1507
|
var V;
|
|
1495
1508
|
return {
|
|
1496
1509
|
resizableTextArea: k.current,
|
|
1497
|
-
focus:
|
|
1510
|
+
focus: ce,
|
|
1498
1511
|
blur: function() {
|
|
1499
1512
|
U().blur();
|
|
1500
1513
|
},
|
|
1501
1514
|
nativeElement: ((V = j.current) === null || V === void 0 ? void 0 : V.nativeElement) || U()
|
|
1502
1515
|
};
|
|
1503
1516
|
}), $e(function() {
|
|
1504
|
-
|
|
1505
|
-
return !
|
|
1517
|
+
q(function(V) {
|
|
1518
|
+
return !n && V;
|
|
1506
1519
|
});
|
|
1507
|
-
}, [
|
|
1508
|
-
var
|
|
1520
|
+
}, [n]);
|
|
1521
|
+
var ue = f.useState(null), fe = se(ue, 2), P = fe[0], Y = fe[1];
|
|
1509
1522
|
f.useEffect(function() {
|
|
1510
1523
|
if (P) {
|
|
1511
1524
|
var V;
|
|
1512
1525
|
(V = U()).setSelectionRange.apply(V, Je(P));
|
|
1513
1526
|
}
|
|
1514
1527
|
}, [P]);
|
|
1515
|
-
var Z =
|
|
1516
|
-
var we =
|
|
1517
|
-
!_.current && Z.exceedFormatter && Z.max && Z.strategy(
|
|
1528
|
+
var Z = pr(te, A), me = (t = Z.max) !== null && t !== void 0 ? t : g, Ie = Number(me) > 0, xe = Z.strategy(J), ze = !!me && xe > me, ye = function(x, ve) {
|
|
1529
|
+
var we = ve;
|
|
1530
|
+
!_.current && Z.exceedFormatter && Z.max && Z.strategy(ve) > Z.max && (we = Z.exceedFormatter(ve, {
|
|
1518
1531
|
max: Z.max
|
|
1519
|
-
}),
|
|
1532
|
+
}), ve !== we && Y([U().selectionStart || 0, U().selectionEnd || 0])), M(we), Ee(x.currentTarget, x, l, we);
|
|
1520
1533
|
}, Oe = function(x) {
|
|
1521
1534
|
_.current = !0, p == null || p(x);
|
|
1522
1535
|
}, O = function(x) {
|
|
1523
1536
|
_.current = !1, ye(x, x.currentTarget.value), C == null || C(x);
|
|
1524
|
-
},
|
|
1537
|
+
}, v = function(x) {
|
|
1525
1538
|
ye(x, x.target.value);
|
|
1526
1539
|
}, L = function(x) {
|
|
1527
|
-
x.key === "Enter" &&
|
|
1528
|
-
},
|
|
1529
|
-
|
|
1540
|
+
x.key === "Enter" && u && u(x), b == null || b(x);
|
|
1541
|
+
}, be = function(x) {
|
|
1542
|
+
q(!0), d == null || d(x);
|
|
1530
1543
|
}, pe = function(x) {
|
|
1531
|
-
|
|
1544
|
+
q(!1), i == null || i(x);
|
|
1532
1545
|
}, ge = function(x) {
|
|
1533
|
-
M(""),
|
|
1534
|
-
},
|
|
1546
|
+
M(""), ce(), Ee(U(), x, l);
|
|
1547
|
+
}, he = E, Se;
|
|
1535
1548
|
Z.show && (Z.showFormatter ? Se = Z.showFormatter({
|
|
1536
1549
|
value: J,
|
|
1537
1550
|
count: xe,
|
|
1538
|
-
maxLength:
|
|
1539
|
-
}) : Se = "".concat(xe).concat(Ie ? " / ".concat(
|
|
1551
|
+
maxLength: me
|
|
1552
|
+
}) : Se = "".concat(xe).concat(Ie ? " / ".concat(me) : ""), he = /* @__PURE__ */ f.createElement(f.Fragment, null, he, /* @__PURE__ */ f.createElement("span", {
|
|
1540
1553
|
className: w("".concat(R, "-data-count"), $ == null ? void 0 : $.count),
|
|
1541
|
-
style:
|
|
1554
|
+
style: m == null ? void 0 : m.count
|
|
1542
1555
|
}, Se)));
|
|
1543
|
-
var
|
|
1544
|
-
var
|
|
1545
|
-
|
|
1546
|
-
},
|
|
1547
|
-
return /* @__PURE__ */ f.createElement(
|
|
1556
|
+
var br = function(x) {
|
|
1557
|
+
var ve;
|
|
1558
|
+
s == null || s(x), (ve = U()) !== null && ve !== void 0 && ve.style.height && de(!0);
|
|
1559
|
+
}, hr = !F && !A && !S;
|
|
1560
|
+
return /* @__PURE__ */ f.createElement(gr, {
|
|
1548
1561
|
ref: j,
|
|
1549
1562
|
value: J,
|
|
1550
1563
|
allowClear: S,
|
|
1551
1564
|
handleReset: ge,
|
|
1552
|
-
suffix:
|
|
1565
|
+
suffix: he,
|
|
1553
1566
|
prefixCls: R,
|
|
1554
|
-
classNames:
|
|
1567
|
+
classNames: re(re({}, $), {}, {
|
|
1555
1568
|
affixWrapper: w($ == null ? void 0 : $.affixWrapper, ie(ie({}, "".concat(R, "-show-count"), A), "".concat(R, "-textarea-allow-clear"), S))
|
|
1556
1569
|
}),
|
|
1557
|
-
disabled:
|
|
1570
|
+
disabled: n,
|
|
1558
1571
|
focused: N,
|
|
1559
1572
|
className: w(ee, ze && "".concat(R, "-out-of-range")),
|
|
1560
|
-
style:
|
|
1573
|
+
style: re(re({}, y), X && !hr ? {
|
|
1561
1574
|
height: "auto"
|
|
1562
1575
|
} : {}),
|
|
1563
1576
|
dataAttrs: {
|
|
@@ -1567,38 +1580,40 @@ var or = ["prefixCls", "defaultValue", "value", "autoSize", "onResize", "classNa
|
|
|
1567
1580
|
},
|
|
1568
1581
|
hidden: Q,
|
|
1569
1582
|
readOnly: I,
|
|
1570
|
-
onClear:
|
|
1571
|
-
}, /* @__PURE__ */ f.createElement(
|
|
1583
|
+
onClear: c
|
|
1584
|
+
}, /* @__PURE__ */ f.createElement(it, Ce({}, D, {
|
|
1572
1585
|
autoSize: F,
|
|
1573
1586
|
maxLength: g,
|
|
1574
1587
|
onKeyDown: L,
|
|
1575
|
-
onChange:
|
|
1576
|
-
onFocus:
|
|
1588
|
+
onChange: v,
|
|
1589
|
+
onFocus: be,
|
|
1577
1590
|
onBlur: pe,
|
|
1578
1591
|
onCompositionStart: Oe,
|
|
1579
1592
|
onCompositionEnd: O,
|
|
1580
1593
|
className: w($ == null ? void 0 : $.textarea),
|
|
1581
|
-
style:
|
|
1594
|
+
style: re(re({}, m == null ? void 0 : m.textarea), {}, {
|
|
1582
1595
|
resize: y == null ? void 0 : y.resize
|
|
1583
1596
|
}),
|
|
1584
|
-
disabled:
|
|
1597
|
+
disabled: n,
|
|
1585
1598
|
prefixCls: R,
|
|
1586
|
-
onResize:
|
|
1599
|
+
onResize: br,
|
|
1587
1600
|
ref: k,
|
|
1588
1601
|
readOnly: I
|
|
1589
1602
|
})));
|
|
1590
|
-
}),
|
|
1591
|
-
var
|
|
1592
|
-
for (var
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1603
|
+
}), dt = globalThis && globalThis.__rest || function(e, r) {
|
|
1604
|
+
var t = {};
|
|
1605
|
+
for (var a in e)
|
|
1606
|
+
Object.prototype.hasOwnProperty.call(e, a) && r.indexOf(a) < 0 && (t[a] = e[a]);
|
|
1607
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1608
|
+
for (var o = 0, a = Object.getOwnPropertySymbols(e); o < a.length; o++)
|
|
1609
|
+
r.indexOf(a[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[o]) && (t[a[o]] = e[a[o]]);
|
|
1610
|
+
return t;
|
|
1596
1611
|
};
|
|
1597
|
-
const
|
|
1598
|
-
var
|
|
1612
|
+
const ct = /* @__PURE__ */ We((e, r) => {
|
|
1613
|
+
var t, a;
|
|
1599
1614
|
const {
|
|
1600
|
-
prefixCls:
|
|
1601
|
-
bordered:
|
|
1615
|
+
prefixCls: o,
|
|
1616
|
+
bordered: d = !0,
|
|
1602
1617
|
size: i,
|
|
1603
1618
|
disabled: l,
|
|
1604
1619
|
status: S,
|
|
@@ -1609,7 +1624,7 @@ const Sr = /* @__PURE__ */ We((e, n) => {
|
|
|
1609
1624
|
style: G,
|
|
1610
1625
|
styles: R,
|
|
1611
1626
|
variant: A
|
|
1612
|
-
} = e,
|
|
1627
|
+
} = e, te = dt(e, ["prefixCls", "bordered", "size", "disabled", "status", "allowClear", "classNames", "rootClassName", "className", "style", "styles", "variant"]);
|
|
1613
1628
|
if (process.env.NODE_ENV !== "production") {
|
|
1614
1629
|
const {
|
|
1615
1630
|
deprecated: z
|
|
@@ -1619,19 +1634,19 @@ const Sr = /* @__PURE__ */ We((e, n) => {
|
|
|
1619
1634
|
const {
|
|
1620
1635
|
getPrefixCls: ee,
|
|
1621
1636
|
direction: y,
|
|
1622
|
-
textArea:
|
|
1623
|
-
} = K.useContext(ke), Q =
|
|
1624
|
-
status:
|
|
1625
|
-
hasFeedback:
|
|
1626
|
-
feedbackIcon:
|
|
1627
|
-
} = K.useContext(
|
|
1628
|
-
K.useImperativeHandle(
|
|
1637
|
+
textArea: n
|
|
1638
|
+
} = K.useContext(ke), Q = nr(i), $ = K.useContext(er), m = l ?? $, {
|
|
1639
|
+
status: s,
|
|
1640
|
+
hasFeedback: c,
|
|
1641
|
+
feedbackIcon: u
|
|
1642
|
+
} = K.useContext(or), I = tr(s, S), F = K.useRef(null);
|
|
1643
|
+
K.useImperativeHandle(r, () => {
|
|
1629
1644
|
var z;
|
|
1630
1645
|
return {
|
|
1631
1646
|
resizableTextArea: (z = F.current) === null || z === void 0 ? void 0 : z.resizableTextArea,
|
|
1632
1647
|
focus: (N) => {
|
|
1633
|
-
var
|
|
1634
|
-
|
|
1648
|
+
var q, _;
|
|
1649
|
+
fr((_ = (q = F.current) === null || q === void 0 ? void 0 : q.resizableTextArea) === null || _ === void 0 ? void 0 : _.textArea, N);
|
|
1635
1650
|
},
|
|
1636
1651
|
blur: () => {
|
|
1637
1652
|
var N;
|
|
@@ -1639,42 +1654,42 @@ const Sr = /* @__PURE__ */ We((e, n) => {
|
|
|
1639
1654
|
}
|
|
1640
1655
|
};
|
|
1641
1656
|
});
|
|
1642
|
-
const
|
|
1643
|
-
return
|
|
1644
|
-
autoComplete:
|
|
1645
|
-
},
|
|
1646
|
-
style: Object.assign(Object.assign({},
|
|
1647
|
-
styles: Object.assign(Object.assign({},
|
|
1648
|
-
disabled:
|
|
1649
|
-
allowClear:
|
|
1650
|
-
className: w(
|
|
1651
|
-
classNames: Object.assign(Object.assign(Object.assign({}, p),
|
|
1657
|
+
const b = ee("input", o), D = ar(b), [ae, W, h] = ur(b, D), [M, J] = rr("textArea", A, d), oe = vr(g ?? (n == null ? void 0 : n.allowClear));
|
|
1658
|
+
return ae(/* @__PURE__ */ K.createElement(st, Object.assign({
|
|
1659
|
+
autoComplete: n == null ? void 0 : n.autoComplete
|
|
1660
|
+
}, te, {
|
|
1661
|
+
style: Object.assign(Object.assign({}, n == null ? void 0 : n.style), G),
|
|
1662
|
+
styles: Object.assign(Object.assign({}, n == null ? void 0 : n.styles), R),
|
|
1663
|
+
disabled: m,
|
|
1664
|
+
allowClear: oe,
|
|
1665
|
+
className: w(h, D, E, C, n == null ? void 0 : n.className),
|
|
1666
|
+
classNames: Object.assign(Object.assign(Object.assign({}, p), n == null ? void 0 : n.classNames), {
|
|
1652
1667
|
textarea: w({
|
|
1653
|
-
[`${
|
|
1654
|
-
[`${
|
|
1655
|
-
}, W, p == null ? void 0 : p.textarea, (
|
|
1668
|
+
[`${b}-sm`]: Q === "small",
|
|
1669
|
+
[`${b}-lg`]: Q === "large"
|
|
1670
|
+
}, W, p == null ? void 0 : p.textarea, (t = n == null ? void 0 : n.classNames) === null || t === void 0 ? void 0 : t.textarea),
|
|
1656
1671
|
variant: w({
|
|
1657
|
-
[`${
|
|
1658
|
-
}, Fe(
|
|
1659
|
-
affixWrapper: w(`${
|
|
1660
|
-
[`${
|
|
1661
|
-
[`${
|
|
1662
|
-
[`${
|
|
1663
|
-
[`${
|
|
1672
|
+
[`${b}-${M}`]: J
|
|
1673
|
+
}, Fe(b, I)),
|
|
1674
|
+
affixWrapper: w(`${b}-textarea-affix-wrapper`, {
|
|
1675
|
+
[`${b}-affix-wrapper-rtl`]: y === "rtl",
|
|
1676
|
+
[`${b}-affix-wrapper-sm`]: Q === "small",
|
|
1677
|
+
[`${b}-affix-wrapper-lg`]: Q === "large",
|
|
1678
|
+
[`${b}-textarea-show-count`]: e.showCount || ((a = e.count) === null || a === void 0 ? void 0 : a.show)
|
|
1664
1679
|
}, W)
|
|
1665
1680
|
}),
|
|
1666
|
-
prefixCls:
|
|
1667
|
-
suffix:
|
|
1668
|
-
className: `${
|
|
1669
|
-
},
|
|
1681
|
+
prefixCls: b,
|
|
1682
|
+
suffix: c && /* @__PURE__ */ K.createElement("span", {
|
|
1683
|
+
className: `${b}-textarea-suffix`
|
|
1684
|
+
}, u),
|
|
1670
1685
|
ref: F
|
|
1671
1686
|
})));
|
|
1672
|
-
});
|
|
1687
|
+
}), yt = ct;
|
|
1673
1688
|
export {
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1689
|
+
Ct as I,
|
|
1690
|
+
yt as T,
|
|
1691
|
+
Br as a,
|
|
1692
|
+
Jr as b,
|
|
1693
|
+
Or as i,
|
|
1694
|
+
ur as u
|
|
1680
1695
|
};
|