@gobolt/genesis 0.0.8 → 0.0.9
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 +10 -0
- package/dist/{AntdIcon-c395a1c4.js → AntdIcon-BoLh1dP8.js} +66 -68
- package/dist/CheckOutlined-CeTKr6II.js +13 -0
- package/dist/{CloseCircleFilled-ddc51e7e.js → CloseCircleFilled-DXCxlIQL.js} +8 -11
- package/dist/{CloseOutlined-14b8bba1.js → CloseOutlined-ClXDNn82.js} +9 -12
- package/dist/{Compact-c39ed20d.js → Compact-CGY560JF.js} +63 -65
- package/dist/ContextIsolator-D5x2Ih51.js +20 -0
- package/dist/{ExclamationCircleFilled-23ef9812.js → ExclamationCircleFilled-C0Kj5KQV.js} +16 -22
- package/dist/KeyCode-DM2sFh3-.js +517 -0
- package/dist/LoadingOutlined-8EnJdZ7I.js +13 -0
- package/dist/{Overflow-a570fa69.js → Overflow-PBZD-PFm.js} +63 -64
- package/dist/{DownOutlined-64a4732a.js → PurePanel-BqPLRtc2.js} +67 -70
- package/dist/{SearchOutlined-a9014e08.js → SearchOutlined-BP3Z2K6j.js} +8 -11
- package/dist/{TextArea-20825221.js → TextArea-DKwCct3i.js} +583 -588
- package/dist/Typography-aGoDUl4R.js +710 -0
- package/dist/bundle.css +1204 -0
- package/dist/{button-fa1c119c.js → button-CDQgO1OK.js} +274 -278
- package/dist/{collapse-345bc884.js → collapse-Dtpt-6W_.js} +2 -2
- package/dist/compact-item-DH13cl8A.js +61 -0
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Badge/Badge.js +63 -62
- package/dist/components/Badge/__tests__/Badge.test.js +11 -65
- package/dist/components/Badge/index.js +2 -21
- package/dist/components/Badge/styles.js +7 -8
- package/dist/components/Breadcrumb/Breadcrumb.js +8 -24
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +21 -7
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +13 -60
- package/dist/components/Breadcrumb/index.js +2 -25
- package/dist/components/Breadcrumb/styles.d.ts +10 -6
- package/dist/components/Breadcrumb/styles.js +787 -808
- package/dist/components/Button/Button.d.ts +6 -4
- package/dist/components/Button/Button.js +20 -40
- package/dist/components/Button/__tests__/Button.test.js +9 -54
- package/dist/components/Button/index.js +2 -20
- package/dist/components/Button/styles.d.ts +9 -5
- package/dist/components/Button/styles.js +19 -30
- package/dist/components/Checkbox/Checkbox.js +8 -38
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +16 -62
- package/dist/components/Checkbox/index.js +2 -47
- package/dist/components/Checkbox/styles.d.ts +8 -1
- package/dist/components/Checkbox/styles.js +181 -188
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +2 -4
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +19 -51
- package/dist/components/ErrorBoundaryFallback/index.d.ts +1 -0
- package/dist/components/ErrorBoundaryFallback/index.js +2 -49
- package/dist/components/ErrorBoundaryFallback/styles.d.ts +1 -3
- package/dist/components/ErrorBoundaryFallback/styles.js +34 -37
- package/dist/components/Form/Form.d.ts +18 -5
- package/dist/components/Form/Form.js +4 -45
- package/dist/components/Form/__stories__/FormStory.js +44 -81
- package/dist/components/Form/__tests__/form.test.d.ts +1 -0
- package/dist/components/Form/__tests__/form.test.js +18 -0
- package/dist/components/Form/index.js +2 -46
- package/dist/components/Form/styles.d.ts +3 -0
- package/dist/components/Form/styles.js +5 -0
- package/dist/components/Input/Input.js +6 -29
- package/dist/components/Input/__tests__/Input.test.js +21 -66
- package/dist/components/Input/index.js +2 -29
- package/dist/components/Input/styles.d.ts +5 -2
- package/dist/components/Input/styles.js +319 -332
- package/dist/components/Message/Message.d.ts +4 -4
- package/dist/components/Message/Message.js +53 -80
- package/dist/components/Message/__tests__/Message.test.js +24 -70
- package/dist/components/Message/index.js +2 -48
- package/dist/components/Message/styles.d.ts +4 -1
- package/dist/components/Message/styles.js +24 -18
- package/dist/components/Notification/Notification.d.ts +11 -10
- package/dist/components/Notification/Notification.js +306 -372
- package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
- package/dist/components/Notification/NotificationRightChevron.js +23 -0
- package/dist/components/Notification/__tests__/Notification.test.js +8 -69
- package/dist/components/Notification/index.js +2 -59
- package/dist/components/Notification/styles.d.ts +13 -3
- package/dist/components/Notification/styles.js +36 -20
- package/dist/components/Radio/Radio.js +20 -106
- package/dist/components/Radio/RadioGroup.js +18 -71
- package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +1 -1
- package/dist/components/Radio/__tests__/RadioGroup.test.js +15 -70
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/Radio/index.js +2 -56
- package/dist/components/Select/DropdownChevron.d.ts +2 -0
- package/dist/components/Select/DropdownChevron.js +23 -0
- package/dist/components/Select/Select.d.ts +9 -4
- package/dist/components/Select/Select.js +29 -41
- package/dist/components/Select/__tests__/Select.test.js +10752 -93
- package/dist/components/Select/index.js +2 -28
- package/dist/components/Select/styles.d.ts +20 -6
- package/dist/components/Select/styles.js +1381 -1370
- package/dist/components/Toast/Toast.d.ts +4 -4
- package/dist/components/Toast/Toast.js +8 -37
- package/dist/components/Toast/__stories__/Toast.stories.d.ts +1 -0
- package/dist/components/Toast/__tests__/Toast.test.js +10 -55
- package/dist/components/Toast/index.js +2 -46
- package/dist/components/Toast/styles.d.ts +6 -1
- package/dist/components/Toast/styles.js +36 -21
- package/dist/components/Typography/Typography.d.ts +7 -4
- package/dist/components/Typography/Typography.js +2 -42
- package/dist/components/Typography/__stories__/Typography.stories.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.js +19 -56
- package/dist/components/Typography/index.js +2 -46
- package/dist/components/Typography/styles.d.ts +18 -4
- package/dist/components/Typography/styles.js +36 -43
- package/dist/components/index.d.ts +13 -5
- package/dist/components/index.js +24 -70
- package/dist/{context-3b8a39af.js → context-BMW3aJEf.js} +538 -548
- package/dist/genesis/GenesisThemeBreakdown.js +38 -55
- package/dist/genesis/GenesisThemeDemo.js +3 -53
- package/dist/genesis/styles.d.ts +6 -2
- package/dist/genesis/styles.js +496 -521
- package/dist/{index-e2b72ca8.js → index-1CBpubM3.js} +97 -102
- package/dist/index-BZAhCB_K.js +97 -0
- package/dist/{index-501fc13d.js → index-C0SmxWLS.js} +367 -392
- package/dist/index-C8haFnXI.js +1112 -0
- package/dist/index-CfDY25LP.js +873 -0
- package/dist/index-DPW8XdWj.js +952 -0
- package/dist/{index-8c8d2d0c.js → index-bKlRxQp4.js} +114 -114
- package/dist/index-oK7z6jnz.js +22795 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +31 -77
- package/dist/{isVisible-729780f5.js → isVisible-A-IfeFoT.js} +67 -94
- package/dist/{magic-string.es-b7491176.js → magic-string.es-D2FWSwU3.js} +56 -103
- package/dist/{pickAttrs-00ba4687.js → pickAttrs-B0YTfcV1.js} +1 -1
- package/dist/providers/GenesisProvider.d.ts +0 -5
- package/dist/providers/GenesisProvider.js +9 -59
- package/dist/providers/ThemeProvider.d.ts +1 -2
- package/dist/providers/ThemeProvider.js +11 -13
- package/dist/providers/ToastProvider.d.ts +11 -4
- package/dist/providers/ToastProvider.js +10 -39
- package/dist/providers/index.d.ts +2 -3
- package/dist/providers/index.js +4 -51
- package/dist/providers/useGenesis.d.ts +7 -0
- package/dist/providers/useGenesis.js +6 -0
- package/dist/setup-BvfREoHl.js +33891 -0
- package/dist/{styled-components.browser.esm-02f500bc.js → styled-components.browser.esm-CZ1XM4o4.js} +72 -134
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +15 -45
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +15 -45
- package/dist/styles/design-tokens/{typography → typography-tokens}/TypographyTokens.stories.d.ts +1 -0
- package/dist/styles/design-tokens/variables.d.ts +10 -10
- package/dist/styles/design-tokens/variables.js +1 -1
- package/dist/styles/global-styles.d.ts +1 -0
- package/dist/styles/global-styles.js +14 -31
- package/dist/styles/theme/genesis-theme.js +257 -212
- package/dist/styles/theme/genesis-theme.types.d.ts +46 -0
- package/dist/styles/theme/index.js +4 -5
- package/dist/styles-CT_fyXBd.js +1808 -0
- package/dist/test/setup.js +3 -46
- package/dist/useLocale-DT-z_vQ6.js +16 -0
- package/dist/useVariants-DvhXfgJY.js +30 -0
- package/dist/utils/isAllEnglishString.js +1 -2
- package/dist/{presets-83ccb923.js → warning-C63HNL9U.js} +358 -356
- package/package.json +35 -35
- package/dist/CheckOutlined-52d9ac25.js +0 -29
- package/dist/ContextIsolator-b09b2c52.js +0 -20
- package/dist/EllipsisOutlined-60122660.js +0 -1115
- package/dist/InfoCircleFilled-c5f90c20.js +0 -16
- package/dist/RightOutlined-83515eb4.js +0 -16
- package/dist/compact-item-b8f85aa6.js +0 -75
- package/dist/index-0a886e53.js +0 -100
- package/dist/index-0b9ee239.js +0 -955
- package/dist/index-1a33c134.js +0 -1389
- package/dist/index-4003d75b.js +0 -3748
- package/dist/index-89035ea5.js +0 -3242
- package/dist/providers/ToastWrapper.d.ts +0 -7
- package/dist/providers/ToastWrapper.js +0 -56
- package/dist/setup-aaca7b6f.js +0 -21158
- package/dist/styles/theme/global-styles.d.ts +0 -1
- package/dist/styles/theme/global-styles.js +0 -36
- package/dist/useVariants-a0d64298.js +0 -30
- /package/dist/{presetColors-ccf8cb4c.js → presetColors-Cl8UP3Nw.js} +0 -0
- /package/dist/{reactNode-f4391605.js → reactNode-sKPeiqPL.js} +0 -0
|
@@ -1,301 +1,282 @@
|
|
|
1
|
-
import { d as pe } from "../../styled-components.browser.esm-
|
|
2
|
-
import { TYPE as
|
|
1
|
+
import { d as pe } from "../../styled-components.browser.esm-CZ1XM4o4.js";
|
|
2
|
+
import { TYPE as oe, STATE as V } from "../../constants/index.js";
|
|
3
3
|
import * as s from "react";
|
|
4
|
-
import { useContext as
|
|
5
|
-
import {
|
|
6
|
-
import { C as Q,
|
|
7
|
-
import { F as X, u as Oe } from "../../context-
|
|
8
|
-
import { u as we, i as Ee, a as
|
|
9
|
-
import { p as
|
|
10
|
-
import { g as _e } from "../../useVariants-
|
|
11
|
-
import { a as ae, b as ze } from "../../Compact-
|
|
12
|
-
import {
|
|
13
|
-
import { o as Ne } from "../../isVisible-
|
|
14
|
-
import {
|
|
15
|
-
import { c as
|
|
16
|
-
import { B as
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
4
|
+
import { useContext as ee, useMemo as me, useState as ge, useRef as Ce } from "react";
|
|
5
|
+
import { a as re, c as q } from "../../warning-C63HNL9U.js";
|
|
6
|
+
import { C as Q, v as se, g as be, m as ve, w as xe, b as ne, x as ye, D as he, t as ie } from "../../index-oK7z6jnz.js";
|
|
7
|
+
import { F as X, u as Oe } from "../../context-BMW3aJEf.js";
|
|
8
|
+
import { u as we, i as Ee, a as Pe, I as W, b as $e, T as Ie } from "../../TextArea-DKwCct3i.js";
|
|
9
|
+
import { p as Se } from "../../pickAttrs-B0YTfcV1.js";
|
|
10
|
+
import { g as _e } from "../../useVariants-DvhXfgJY.js";
|
|
11
|
+
import { a as ae, b as ze } from "../../Compact-CGY560JF.js";
|
|
12
|
+
import { I as ue } from "../../AntdIcon-BoLh1dP8.js";
|
|
13
|
+
import { o as Ne } from "../../isVisible-A-IfeFoT.js";
|
|
14
|
+
import { R as je } from "../../SearchOutlined-BP3Z2K6j.js";
|
|
15
|
+
import { c as te } from "../../reactNode-sKPeiqPL.js";
|
|
16
|
+
import { B as Me } from "../../button-CDQgO1OK.js";
|
|
17
|
+
var Re = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" }, ke = function(o, r) {
|
|
18
|
+
return /* @__PURE__ */ s.createElement(ue, re({}, o, {
|
|
19
|
+
ref: r,
|
|
20
|
+
icon: Re
|
|
21
|
+
}));
|
|
22
|
+
}, le = /* @__PURE__ */ s.forwardRef(ke);
|
|
23
|
+
process.env.NODE_ENV !== "production" && (le.displayName = "EyeInvisibleOutlined");
|
|
24
|
+
var Ae = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" }, Be = function(o, r) {
|
|
25
|
+
return /* @__PURE__ */ s.createElement(ue, re({}, o, {
|
|
26
|
+
ref: r,
|
|
27
|
+
icon: Ae
|
|
28
|
+
}));
|
|
29
|
+
}, ce = /* @__PURE__ */ s.forwardRef(Be);
|
|
30
|
+
process.env.NODE_ENV !== "production" && (ce.displayName = "EyeOutlined");
|
|
31
|
+
const Te = (e) => {
|
|
25
32
|
const {
|
|
26
|
-
getPrefixCls:
|
|
27
|
-
direction:
|
|
28
|
-
} =
|
|
29
|
-
prefixCls:
|
|
30
|
-
className:
|
|
31
|
-
} = e, a =
|
|
33
|
+
getPrefixCls: o,
|
|
34
|
+
direction: r
|
|
35
|
+
} = ee(Q), {
|
|
36
|
+
prefixCls: n,
|
|
37
|
+
className: t
|
|
38
|
+
} = e, a = o("input-group", n), b = o("input"), [d, x] = we(b), v = q(a, {
|
|
32
39
|
[`${a}-lg`]: e.size === "large",
|
|
33
40
|
[`${a}-sm`]: e.size === "small",
|
|
34
41
|
[`${a}-compact`]: e.compact,
|
|
35
|
-
[`${a}-rtl`]:
|
|
36
|
-
},
|
|
42
|
+
[`${a}-rtl`]: r === "rtl"
|
|
43
|
+
}, x, t), f = ee(X), p = me(() => Object.assign(Object.assign({}, f), {
|
|
37
44
|
isFormItemInput: !1
|
|
38
|
-
}), [
|
|
39
|
-
return process.env.NODE_ENV !== "production" && se("Input.Group").deprecated(!1, "Input.Group", "Space.Compact"),
|
|
40
|
-
className:
|
|
45
|
+
}), [f]);
|
|
46
|
+
return process.env.NODE_ENV !== "production" && se("Input.Group").deprecated(!1, "Input.Group", "Space.Compact"), d(/* @__PURE__ */ s.createElement("span", {
|
|
47
|
+
className: v,
|
|
41
48
|
style: e.style,
|
|
42
49
|
onMouseEnter: e.onMouseEnter,
|
|
43
50
|
onMouseLeave: e.onMouseLeave,
|
|
44
51
|
onFocus: e.onFocus,
|
|
45
52
|
onBlur: e.onBlur
|
|
46
53
|
}, /* @__PURE__ */ s.createElement(X.Provider, {
|
|
47
|
-
value:
|
|
54
|
+
value: p
|
|
48
55
|
}, e.children)));
|
|
49
|
-
},
|
|
56
|
+
}, Ve = (e) => {
|
|
50
57
|
const {
|
|
51
|
-
componentCls:
|
|
52
|
-
paddingXS:
|
|
58
|
+
componentCls: o,
|
|
59
|
+
paddingXS: r
|
|
53
60
|
} = e;
|
|
54
61
|
return {
|
|
55
|
-
[
|
|
62
|
+
[o]: {
|
|
56
63
|
display: "inline-flex",
|
|
57
64
|
alignItems: "center",
|
|
58
65
|
flexWrap: "nowrap",
|
|
59
|
-
columnGap:
|
|
66
|
+
columnGap: r,
|
|
60
67
|
"&-rtl": {
|
|
61
68
|
direction: "rtl"
|
|
62
69
|
},
|
|
63
|
-
[`${
|
|
70
|
+
[`${o}-input`]: {
|
|
64
71
|
textAlign: "center",
|
|
65
72
|
paddingInline: e.paddingXXS
|
|
66
73
|
},
|
|
67
74
|
// ================= Size =================
|
|
68
|
-
[`&${
|
|
75
|
+
[`&${o}-sm ${o}-input`]: {
|
|
69
76
|
paddingInline: e.calc(e.paddingXXS).div(2).equal()
|
|
70
77
|
},
|
|
71
|
-
[`&${
|
|
78
|
+
[`&${o}-lg ${o}-input`]: {
|
|
72
79
|
paddingInline: e.paddingXS
|
|
73
80
|
}
|
|
74
81
|
}
|
|
75
82
|
};
|
|
76
|
-
},
|
|
77
|
-
const
|
|
78
|
-
return [
|
|
79
|
-
},
|
|
80
|
-
var
|
|
81
|
-
var
|
|
82
|
-
for (var
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
r.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (o[t[n]] = e[t[n]]);
|
|
87
|
-
return o;
|
|
83
|
+
}, De = be(["Input", "OTP"], (e) => {
|
|
84
|
+
const o = ve(e, Ee(e));
|
|
85
|
+
return [Ve(o)];
|
|
86
|
+
}, Pe);
|
|
87
|
+
var Fe = function(e, o) {
|
|
88
|
+
var r = {};
|
|
89
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && o.indexOf(n) < 0 && (r[n] = e[n]);
|
|
90
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, n = Object.getOwnPropertySymbols(e); t < n.length; t++)
|
|
91
|
+
o.indexOf(n[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[t]) && (r[n[t]] = e[n[t]]);
|
|
92
|
+
return r;
|
|
88
93
|
};
|
|
89
|
-
const
|
|
94
|
+
const Le = /* @__PURE__ */ s.forwardRef((e, o) => {
|
|
90
95
|
const {
|
|
91
|
-
value:
|
|
92
|
-
onChange:
|
|
93
|
-
onActiveChange:
|
|
96
|
+
value: r,
|
|
97
|
+
onChange: n,
|
|
98
|
+
onActiveChange: t,
|
|
94
99
|
index: a,
|
|
95
|
-
mask:
|
|
96
|
-
} = e,
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
s.useImperativeHandle(
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
var
|
|
103
|
-
const
|
|
104
|
-
document.activeElement ===
|
|
100
|
+
mask: b
|
|
101
|
+
} = e, d = Fe(e, ["value", "onChange", "onActiveChange", "index", "mask"]), x = r && typeof b == "string" ? b : r, v = (m) => {
|
|
102
|
+
n(a, m.target.value);
|
|
103
|
+
}, f = s.useRef(null);
|
|
104
|
+
s.useImperativeHandle(o, () => f.current);
|
|
105
|
+
const p = () => {
|
|
106
|
+
xe(() => {
|
|
107
|
+
var m;
|
|
108
|
+
const y = (m = f.current) === null || m === void 0 ? void 0 : m.input;
|
|
109
|
+
document.activeElement === y && y && y.select();
|
|
105
110
|
});
|
|
106
|
-
},
|
|
111
|
+
}, I = (m) => {
|
|
107
112
|
const {
|
|
108
|
-
key:
|
|
109
|
-
ctrlKey:
|
|
110
|
-
metaKey:
|
|
111
|
-
} =
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
113
|
+
key: y,
|
|
114
|
+
ctrlKey: M,
|
|
115
|
+
metaKey: R
|
|
116
|
+
} = m;
|
|
117
|
+
y === "ArrowLeft" ? t(a - 1) : y === "ArrowRight" ? t(a + 1) : y === "z" && (M || R) && m.preventDefault(), p();
|
|
118
|
+
}, P = (m) => {
|
|
119
|
+
m.key === "Backspace" && !r && t(a - 1), p();
|
|
115
120
|
};
|
|
116
121
|
return /* @__PURE__ */ s.createElement(W, Object.assign({
|
|
117
|
-
type:
|
|
118
|
-
},
|
|
119
|
-
ref:
|
|
120
|
-
value:
|
|
121
|
-
onInput:
|
|
122
|
-
onFocus:
|
|
123
|
-
onKeyDown:
|
|
124
|
-
onKeyUp:
|
|
125
|
-
onMouseDown:
|
|
126
|
-
onMouseUp:
|
|
122
|
+
type: b === !0 ? "password" : "text"
|
|
123
|
+
}, d, {
|
|
124
|
+
ref: f,
|
|
125
|
+
value: x,
|
|
126
|
+
onInput: v,
|
|
127
|
+
onFocus: p,
|
|
128
|
+
onKeyDown: I,
|
|
129
|
+
onKeyUp: P,
|
|
130
|
+
onMouseDown: p,
|
|
131
|
+
onMouseUp: p
|
|
127
132
|
}));
|
|
128
|
-
})
|
|
129
|
-
var
|
|
130
|
-
var
|
|
131
|
-
for (var
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
r.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (o[t[n]] = e[t[n]]);
|
|
136
|
-
return o;
|
|
133
|
+
});
|
|
134
|
+
var Ke = function(e, o) {
|
|
135
|
+
var r = {};
|
|
136
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && o.indexOf(n) < 0 && (r[n] = e[n]);
|
|
137
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, n = Object.getOwnPropertySymbols(e); t < n.length; t++)
|
|
138
|
+
o.indexOf(n[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[t]) && (r[n[t]] = e[n[t]]);
|
|
139
|
+
return r;
|
|
137
140
|
};
|
|
138
141
|
function U(e) {
|
|
139
142
|
return (e || "").split("");
|
|
140
143
|
}
|
|
141
|
-
const
|
|
144
|
+
const Ge = /* @__PURE__ */ s.forwardRef((e, o) => {
|
|
142
145
|
const {
|
|
143
|
-
prefixCls:
|
|
144
|
-
length:
|
|
145
|
-
size:
|
|
146
|
+
prefixCls: r,
|
|
147
|
+
length: n = 6,
|
|
148
|
+
size: t,
|
|
146
149
|
defaultValue: a,
|
|
147
|
-
value:
|
|
148
|
-
onChange:
|
|
149
|
-
formatter:
|
|
150
|
-
variant:
|
|
151
|
-
disabled:
|
|
152
|
-
status:
|
|
153
|
-
autoFocus:
|
|
154
|
-
mask:
|
|
155
|
-
type:
|
|
156
|
-
onInput:
|
|
157
|
-
inputMode:
|
|
158
|
-
} = e,
|
|
150
|
+
value: b,
|
|
151
|
+
onChange: d,
|
|
152
|
+
formatter: x,
|
|
153
|
+
variant: v,
|
|
154
|
+
disabled: f,
|
|
155
|
+
status: p,
|
|
156
|
+
autoFocus: I,
|
|
157
|
+
mask: P,
|
|
158
|
+
type: m,
|
|
159
|
+
onInput: y,
|
|
160
|
+
inputMode: M
|
|
161
|
+
} = e, R = Ke(e, ["prefixCls", "length", "size", "defaultValue", "value", "onChange", "formatter", "variant", "disabled", "status", "autoFocus", "mask", "type", "onInput", "inputMode"]);
|
|
159
162
|
if (process.env.NODE_ENV !== "production") {
|
|
160
163
|
const i = se("Input.OTP");
|
|
161
|
-
process.env.NODE_ENV !== "production" && i(!(typeof
|
|
164
|
+
process.env.NODE_ENV !== "production" && i(!(typeof P == "string" && P.length > 1), "usage", "`mask` prop should be a single character.");
|
|
162
165
|
}
|
|
163
166
|
const {
|
|
164
|
-
getPrefixCls:
|
|
167
|
+
getPrefixCls: S,
|
|
165
168
|
direction: _
|
|
166
|
-
} = s.useContext(Q), w =
|
|
169
|
+
} = s.useContext(Q), w = S("otp", r), F = Se(R, {
|
|
167
170
|
aria: !0,
|
|
168
171
|
data: !0,
|
|
169
172
|
attr: !0
|
|
170
|
-
}),
|
|
173
|
+
}), $ = Oe(w), [k, L, A] = De(w, $), h = ae((i) => t ?? i), z = s.useContext(X), N = _e(z.status, p), B = s.useMemo(() => Object.assign(Object.assign({}, z), {
|
|
171
174
|
status: N,
|
|
172
175
|
hasFeedback: !1,
|
|
173
176
|
feedbackIcon: null
|
|
174
177
|
}), [z, N]), E = s.useRef(null), O = s.useRef({});
|
|
175
|
-
s.useImperativeHandle(
|
|
178
|
+
s.useImperativeHandle(o, () => ({
|
|
176
179
|
focus: () => {
|
|
177
180
|
var i;
|
|
178
181
|
(i = O.current[0]) === null || i === void 0 || i.focus();
|
|
179
182
|
},
|
|
180
183
|
blur: () => {
|
|
181
184
|
var i;
|
|
182
|
-
for (let
|
|
183
|
-
(i = O.current[
|
|
185
|
+
for (let l = 0; l < n; l += 1)
|
|
186
|
+
(i = O.current[l]) === null || i === void 0 || i.blur();
|
|
184
187
|
},
|
|
185
188
|
nativeElement: E.current
|
|
186
189
|
}));
|
|
187
|
-
const K = (i) =>
|
|
190
|
+
const K = (i) => x ? x(i) : i, [G, H] = s.useState(U(K(a || "")));
|
|
188
191
|
s.useEffect(() => {
|
|
189
|
-
|
|
190
|
-
}, [
|
|
192
|
+
b !== void 0 && H(U(b));
|
|
193
|
+
}, [b]);
|
|
191
194
|
const Y = ne((i) => {
|
|
192
|
-
|
|
193
|
-
}), J = ne((i,
|
|
194
|
-
let
|
|
195
|
-
for (let
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
for (let
|
|
199
|
-
|
|
200
|
-
const
|
|
201
|
-
return
|
|
202
|
-
}),
|
|
203
|
-
var u;
|
|
204
|
-
const B = J(i, c), g = Math.min(i + c.length, t - 1);
|
|
205
|
-
g !== i && B[i] !== void 0 && ((u = O.current[g]) === null || u === void 0 || u.focus()), Y(B);
|
|
206
|
-
}, m = (i) => {
|
|
195
|
+
H(i), y && y(i), d && i.length === n && i.every((l) => l) && i.some((l, c) => G[c] !== l) && d(i.join(""));
|
|
196
|
+
}), J = ne((i, l) => {
|
|
197
|
+
let c = ye(G);
|
|
198
|
+
for (let C = 0; C < i; C += 1)
|
|
199
|
+
c[C] || (c[C] = "");
|
|
200
|
+
l.length <= 1 ? c[i] = l : c = c.slice(0, i).concat(U(l)), c = c.slice(0, n);
|
|
201
|
+
for (let C = c.length - 1; C >= 0 && !c[C]; C -= 1)
|
|
202
|
+
c.pop();
|
|
203
|
+
const T = K(c.map((C) => C || " ").join(""));
|
|
204
|
+
return c = U(T).map((C, Z) => C === " " && !c[Z] ? c[Z] : C), c;
|
|
205
|
+
}), u = (i, l) => {
|
|
207
206
|
var c;
|
|
208
|
-
|
|
207
|
+
const T = J(i, l), C = Math.min(i + l.length, n - 1);
|
|
208
|
+
C !== i && T[i] !== void 0 && ((c = O.current[C]) === null || c === void 0 || c.focus()), Y(T);
|
|
209
|
+
}, g = (i) => {
|
|
210
|
+
var l;
|
|
211
|
+
(l = O.current[i]) === null || l === void 0 || l.focus();
|
|
209
212
|
}, j = {
|
|
210
|
-
variant:
|
|
211
|
-
disabled:
|
|
213
|
+
variant: v,
|
|
214
|
+
disabled: f,
|
|
212
215
|
status: N,
|
|
213
|
-
mask:
|
|
214
|
-
type:
|
|
215
|
-
inputMode:
|
|
216
|
+
mask: P,
|
|
217
|
+
type: m,
|
|
218
|
+
inputMode: M
|
|
216
219
|
};
|
|
217
|
-
return
|
|
220
|
+
return k(/* @__PURE__ */ s.createElement("div", Object.assign({}, F, {
|
|
218
221
|
ref: E,
|
|
219
|
-
className:
|
|
220
|
-
[`${w}-sm`]:
|
|
221
|
-
[`${w}-lg`]:
|
|
222
|
+
className: q(w, {
|
|
223
|
+
[`${w}-sm`]: h === "small",
|
|
224
|
+
[`${w}-lg`]: h === "large",
|
|
222
225
|
[`${w}-rtl`]: _ === "rtl"
|
|
223
226
|
}, A, L)
|
|
224
227
|
}), /* @__PURE__ */ s.createElement(X.Provider, {
|
|
225
|
-
value:
|
|
228
|
+
value: B
|
|
226
229
|
}, Array.from({
|
|
227
|
-
length:
|
|
228
|
-
}).map((i,
|
|
229
|
-
const
|
|
230
|
-
return /* @__PURE__ */ s.createElement(
|
|
231
|
-
ref: (
|
|
232
|
-
O.current[
|
|
230
|
+
length: n
|
|
231
|
+
}).map((i, l) => {
|
|
232
|
+
const c = `otp-${l}`, T = G[l] || "";
|
|
233
|
+
return /* @__PURE__ */ s.createElement(Le, Object.assign({
|
|
234
|
+
ref: (C) => {
|
|
235
|
+
O.current[l] = C;
|
|
233
236
|
},
|
|
234
|
-
key:
|
|
235
|
-
index:
|
|
236
|
-
size:
|
|
237
|
+
key: c,
|
|
238
|
+
index: l,
|
|
239
|
+
size: h,
|
|
237
240
|
htmlSize: 1,
|
|
238
241
|
className: `${w}-input`,
|
|
239
|
-
onChange:
|
|
240
|
-
value:
|
|
241
|
-
onActiveChange:
|
|
242
|
-
autoFocus:
|
|
242
|
+
onChange: u,
|
|
243
|
+
value: T,
|
|
244
|
+
onActiveChange: g,
|
|
245
|
+
autoFocus: l === 0 && I
|
|
243
246
|
}, j));
|
|
244
247
|
}))));
|
|
245
|
-
})
|
|
246
|
-
var
|
|
247
|
-
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}));
|
|
253
|
-
}, ce = /* @__PURE__ */ s.forwardRef(Ue);
|
|
254
|
-
process.env.NODE_ENV !== "production" && (ce.displayName = "EyeInvisibleOutlined");
|
|
255
|
-
const Xe = ce;
|
|
256
|
-
var He = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" };
|
|
257
|
-
const Qe = He;
|
|
258
|
-
var We = function(r, o) {
|
|
259
|
-
return /* @__PURE__ */ s.createElement(le, re({}, r, {
|
|
260
|
-
ref: o,
|
|
261
|
-
icon: Qe
|
|
262
|
-
}));
|
|
263
|
-
}, ue = /* @__PURE__ */ s.forwardRef(We);
|
|
264
|
-
process.env.NODE_ENV !== "production" && (ue.displayName = "EyeOutlined");
|
|
265
|
-
const Ye = ue;
|
|
266
|
-
var Je = globalThis && globalThis.__rest || function(e, r) {
|
|
267
|
-
var o = {};
|
|
268
|
-
for (var t in e)
|
|
269
|
-
Object.prototype.hasOwnProperty.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
|
|
270
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
271
|
-
for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
|
|
272
|
-
r.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (o[t[n]] = e[t[n]]);
|
|
273
|
-
return o;
|
|
248
|
+
});
|
|
249
|
+
var He = function(e, o) {
|
|
250
|
+
var r = {};
|
|
251
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && o.indexOf(n) < 0 && (r[n] = e[n]);
|
|
252
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, n = Object.getOwnPropertySymbols(e); t < n.length; t++)
|
|
253
|
+
o.indexOf(n[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[t]) && (r[n[t]] = e[n[t]]);
|
|
254
|
+
return r;
|
|
274
255
|
};
|
|
275
|
-
const
|
|
256
|
+
const Ue = (e) => e ? /* @__PURE__ */ s.createElement(ce, null) : /* @__PURE__ */ s.createElement(le, null), Xe = {
|
|
276
257
|
click: "onClick",
|
|
277
258
|
hover: "onMouseOver"
|
|
278
|
-
}, de = /* @__PURE__ */ s.forwardRef((e,
|
|
259
|
+
}, de = /* @__PURE__ */ s.forwardRef((e, o) => {
|
|
279
260
|
const {
|
|
280
|
-
disabled:
|
|
281
|
-
action:
|
|
282
|
-
visibilityToggle:
|
|
283
|
-
iconRender: a =
|
|
284
|
-
} = e,
|
|
261
|
+
disabled: r,
|
|
262
|
+
action: n = "click",
|
|
263
|
+
visibilityToggle: t = !0,
|
|
264
|
+
iconRender: a = Ue
|
|
265
|
+
} = e, b = s.useContext(he), d = r ?? b, x = typeof t == "object" && t.visible !== void 0, [v, f] = ge(() => x ? t.visible : !1), p = Ce(null);
|
|
285
266
|
s.useEffect(() => {
|
|
286
|
-
|
|
287
|
-
}, [
|
|
288
|
-
const
|
|
289
|
-
var
|
|
290
|
-
if (
|
|
267
|
+
x && f(t.visible);
|
|
268
|
+
}, [x, t]);
|
|
269
|
+
const I = $e(p), P = () => {
|
|
270
|
+
var h;
|
|
271
|
+
if (d)
|
|
291
272
|
return;
|
|
292
|
-
|
|
293
|
-
const z = !
|
|
294
|
-
|
|
295
|
-
},
|
|
296
|
-
const z =
|
|
297
|
-
[z]:
|
|
298
|
-
className: `${
|
|
273
|
+
v && I();
|
|
274
|
+
const z = !v;
|
|
275
|
+
f(z), typeof t == "object" && ((h = t.onVisibleChange) === null || h === void 0 || h.call(t, z));
|
|
276
|
+
}, m = (h) => {
|
|
277
|
+
const z = Xe[n] || "", N = a(v), B = {
|
|
278
|
+
[z]: P,
|
|
279
|
+
className: `${h}-icon`,
|
|
299
280
|
key: "passwordIcon",
|
|
300
281
|
onMouseDown: (E) => {
|
|
301
282
|
E.preventDefault();
|
|
@@ -304,139 +285,136 @@ const Ze = (e) => e ? /* @__PURE__ */ s.createElement(Ye, null) : /* @__PURE__ *
|
|
|
304
285
|
E.preventDefault();
|
|
305
286
|
}
|
|
306
287
|
};
|
|
307
|
-
return /* @__PURE__ */ s.cloneElement(/* @__PURE__ */ s.isValidElement(N) ? N : /* @__PURE__ */ s.createElement("span", null, N),
|
|
288
|
+
return /* @__PURE__ */ s.cloneElement(/* @__PURE__ */ s.isValidElement(N) ? N : /* @__PURE__ */ s.createElement("span", null, N), B);
|
|
308
289
|
}, {
|
|
309
|
-
className:
|
|
310
|
-
prefixCls:
|
|
311
|
-
inputPrefixCls:
|
|
312
|
-
size:
|
|
313
|
-
} = e, _ =
|
|
290
|
+
className: y,
|
|
291
|
+
prefixCls: M,
|
|
292
|
+
inputPrefixCls: R,
|
|
293
|
+
size: S
|
|
294
|
+
} = e, _ = He(e, ["className", "prefixCls", "inputPrefixCls", "size"]), {
|
|
314
295
|
getPrefixCls: w
|
|
315
|
-
} = s.useContext(Q), F = w("input",
|
|
316
|
-
[`${
|
|
296
|
+
} = s.useContext(Q), F = w("input", R), $ = w("input-password", M), k = t && m($), L = q($, y, {
|
|
297
|
+
[`${$}-${S}`]: !!S
|
|
317
298
|
}), A = Object.assign(Object.assign({}, Ne(_, ["suffix", "iconRender", "visibilityToggle"])), {
|
|
318
|
-
type:
|
|
299
|
+
type: v ? "text" : "password",
|
|
319
300
|
className: L,
|
|
320
301
|
prefixCls: F,
|
|
321
|
-
suffix:
|
|
302
|
+
suffix: k
|
|
322
303
|
});
|
|
323
|
-
return
|
|
324
|
-
ref: ie(
|
|
304
|
+
return S && (A.size = S), /* @__PURE__ */ s.createElement(W, Object.assign({
|
|
305
|
+
ref: ie(o, p)
|
|
325
306
|
}, A));
|
|
326
307
|
});
|
|
327
308
|
process.env.NODE_ENV !== "production" && (de.displayName = "Input.Password");
|
|
328
|
-
|
|
329
|
-
var
|
|
330
|
-
var o =
|
|
331
|
-
for (var t
|
|
332
|
-
Object.prototype.
|
|
333
|
-
|
|
334
|
-
for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
|
|
335
|
-
r.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (o[t[n]] = e[t[n]]);
|
|
336
|
-
return o;
|
|
309
|
+
var qe = function(e, o) {
|
|
310
|
+
var r = {};
|
|
311
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && o.indexOf(n) < 0 && (r[n] = e[n]);
|
|
312
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, n = Object.getOwnPropertySymbols(e); t < n.length; t++)
|
|
313
|
+
o.indexOf(n[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[t]) && (r[n[t]] = e[n[t]]);
|
|
314
|
+
return r;
|
|
337
315
|
};
|
|
338
|
-
const fe = /* @__PURE__ */ s.forwardRef((e,
|
|
316
|
+
const fe = /* @__PURE__ */ s.forwardRef((e, o) => {
|
|
339
317
|
const {
|
|
340
|
-
prefixCls:
|
|
341
|
-
inputPrefixCls:
|
|
342
|
-
className:
|
|
318
|
+
prefixCls: r,
|
|
319
|
+
inputPrefixCls: n,
|
|
320
|
+
className: t,
|
|
343
321
|
size: a,
|
|
344
|
-
suffix:
|
|
345
|
-
enterButton:
|
|
346
|
-
addonAfter:
|
|
347
|
-
loading:
|
|
348
|
-
disabled:
|
|
349
|
-
onSearch:
|
|
350
|
-
onChange:
|
|
351
|
-
onCompositionStart:
|
|
352
|
-
onCompositionEnd:
|
|
353
|
-
} = e,
|
|
354
|
-
getPrefixCls:
|
|
355
|
-
direction:
|
|
356
|
-
} = s.useContext(Q),
|
|
322
|
+
suffix: b,
|
|
323
|
+
enterButton: d = !1,
|
|
324
|
+
addonAfter: x,
|
|
325
|
+
loading: v,
|
|
326
|
+
disabled: f,
|
|
327
|
+
onSearch: p,
|
|
328
|
+
onChange: I,
|
|
329
|
+
onCompositionStart: P,
|
|
330
|
+
onCompositionEnd: m
|
|
331
|
+
} = e, y = qe(e, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]), {
|
|
332
|
+
getPrefixCls: M,
|
|
333
|
+
direction: R
|
|
334
|
+
} = s.useContext(Q), S = s.useRef(!1), _ = M("input-search", r), w = M("input", n), {
|
|
357
335
|
compactSize: F
|
|
358
|
-
} = ze(_,
|
|
359
|
-
var
|
|
360
|
-
return (
|
|
361
|
-
}),
|
|
362
|
-
|
|
336
|
+
} = ze(_, R), $ = ae((u) => {
|
|
337
|
+
var g;
|
|
338
|
+
return (g = a ?? F) !== null && g !== void 0 ? g : u;
|
|
339
|
+
}), k = s.useRef(null), L = (u) => {
|
|
340
|
+
u != null && u.target && u.type === "click" && p && p(u.target.value, u, {
|
|
363
341
|
source: "clear"
|
|
364
|
-
}),
|
|
365
|
-
}, A = (
|
|
366
|
-
var
|
|
367
|
-
document.activeElement === ((
|
|
368
|
-
},
|
|
369
|
-
var
|
|
370
|
-
|
|
342
|
+
}), I == null || I(u);
|
|
343
|
+
}, A = (u) => {
|
|
344
|
+
var g;
|
|
345
|
+
document.activeElement === ((g = k.current) === null || g === void 0 ? void 0 : g.input) && u.preventDefault();
|
|
346
|
+
}, h = (u) => {
|
|
347
|
+
var g, j;
|
|
348
|
+
p && p((j = (g = k.current) === null || g === void 0 ? void 0 : g.input) === null || j === void 0 ? void 0 : j.value, u, {
|
|
371
349
|
source: "input"
|
|
372
350
|
});
|
|
373
|
-
}, z = (
|
|
374
|
-
|
|
375
|
-
}, N = typeof
|
|
351
|
+
}, z = (u) => {
|
|
352
|
+
S.current || v || h(u);
|
|
353
|
+
}, N = typeof d == "boolean" ? /* @__PURE__ */ s.createElement(je, null) : null, B = `${_}-button`;
|
|
376
354
|
let E;
|
|
377
|
-
const O =
|
|
378
|
-
K || O.type === "button" ? E =
|
|
355
|
+
const O = d || {}, K = O.type && O.type.__ANT_BUTTON === !0;
|
|
356
|
+
K || O.type === "button" ? E = te(O, Object.assign({
|
|
379
357
|
onMouseDown: A,
|
|
380
|
-
onClick: (
|
|
381
|
-
var
|
|
382
|
-
(j = (
|
|
358
|
+
onClick: (u) => {
|
|
359
|
+
var g, j;
|
|
360
|
+
(j = (g = O == null ? void 0 : O.props) === null || g === void 0 ? void 0 : g.onClick) === null || j === void 0 || j.call(g, u), h(u);
|
|
383
361
|
},
|
|
384
362
|
key: "enterButton"
|
|
385
363
|
}, K ? {
|
|
386
|
-
className:
|
|
387
|
-
size:
|
|
388
|
-
} : {})) : E = /* @__PURE__ */ s.createElement(
|
|
389
|
-
className:
|
|
390
|
-
type:
|
|
391
|
-
size:
|
|
392
|
-
disabled:
|
|
364
|
+
className: B,
|
|
365
|
+
size: $
|
|
366
|
+
} : {})) : E = /* @__PURE__ */ s.createElement(Me, {
|
|
367
|
+
className: B,
|
|
368
|
+
type: d ? "primary" : void 0,
|
|
369
|
+
size: $,
|
|
370
|
+
disabled: f,
|
|
393
371
|
key: "enterButton",
|
|
394
372
|
onMouseDown: A,
|
|
395
|
-
onClick:
|
|
396
|
-
loading:
|
|
373
|
+
onClick: h,
|
|
374
|
+
loading: v,
|
|
397
375
|
icon: N
|
|
398
|
-
},
|
|
376
|
+
}, d), x && (E = [E, te(x, {
|
|
399
377
|
key: "addonAfter"
|
|
400
378
|
})]);
|
|
401
|
-
const G =
|
|
402
|
-
[`${_}-rtl`]:
|
|
403
|
-
[`${_}-${
|
|
404
|
-
[`${_}-with-button`]: !!
|
|
405
|
-
},
|
|
379
|
+
const G = q(_, {
|
|
380
|
+
[`${_}-rtl`]: R === "rtl",
|
|
381
|
+
[`${_}-${$}`]: !!$,
|
|
382
|
+
[`${_}-with-button`]: !!d
|
|
383
|
+
}, t), H = Object.assign(Object.assign({}, y), {
|
|
406
384
|
className: G,
|
|
407
385
|
prefixCls: w,
|
|
408
386
|
type: "search"
|
|
409
|
-
}), Y = (
|
|
410
|
-
|
|
411
|
-
}, J = (
|
|
412
|
-
|
|
387
|
+
}), Y = (u) => {
|
|
388
|
+
S.current = !0, P == null || P(u);
|
|
389
|
+
}, J = (u) => {
|
|
390
|
+
S.current = !1, m == null || m(u);
|
|
413
391
|
};
|
|
414
392
|
return /* @__PURE__ */ s.createElement(W, Object.assign({
|
|
415
|
-
ref: ie(
|
|
393
|
+
ref: ie(k, o),
|
|
416
394
|
onPressEnter: z
|
|
417
|
-
},
|
|
418
|
-
size:
|
|
395
|
+
}, H, {
|
|
396
|
+
size: $,
|
|
419
397
|
onCompositionStart: Y,
|
|
420
398
|
onCompositionEnd: J,
|
|
421
399
|
addonAfter: E,
|
|
422
|
-
suffix:
|
|
400
|
+
suffix: b,
|
|
423
401
|
onChange: L,
|
|
424
|
-
disabled:
|
|
402
|
+
disabled: f
|
|
425
403
|
}));
|
|
426
404
|
});
|
|
427
405
|
process.env.NODE_ENV !== "production" && (fe.displayName = "Search");
|
|
428
|
-
const
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
const
|
|
435
|
-
const
|
|
436
|
-
color: e
|
|
437
|
-
borderColor: e[
|
|
438
|
-
ringColor: e[
|
|
439
|
-
},
|
|
406
|
+
const D = W;
|
|
407
|
+
D.Group = Te;
|
|
408
|
+
D.Search = fe;
|
|
409
|
+
D.TextArea = Ie;
|
|
410
|
+
D.Password = de;
|
|
411
|
+
D.OTP = Ge;
|
|
412
|
+
const Qe = (e, o, r) => {
|
|
413
|
+
const n = {
|
|
414
|
+
color: e.inputs.onsurface.active,
|
|
415
|
+
borderColor: e[oe.secondary].active.borderColor,
|
|
416
|
+
ringColor: e[o].focussed.ringColor
|
|
417
|
+
}, t = {
|
|
440
418
|
color: e.status.success.default,
|
|
441
419
|
borderColor: e.status.success.default,
|
|
442
420
|
ringColor: e.status.success.ringColor
|
|
@@ -444,20 +422,20 @@ const rt = V, st = (e, r, o) => {
|
|
|
444
422
|
color: e.status.error.default,
|
|
445
423
|
borderColor: e.status.error.default,
|
|
446
424
|
ringColor: e.status.error.ringColor
|
|
447
|
-
},
|
|
425
|
+
}, b = r !== V.error && r !== V.success && r !== V.filled ? {
|
|
448
426
|
color: e.inputs.onsurface.active,
|
|
449
427
|
backgroundColor: e.inputs.surface.active,
|
|
450
428
|
borderColor: e.inputs.surface.border,
|
|
451
|
-
ringColor: e[
|
|
429
|
+
ringColor: e[o][r].ringColor
|
|
452
430
|
} : null;
|
|
453
431
|
return {
|
|
454
|
-
filled:
|
|
432
|
+
filled: n,
|
|
455
433
|
error: a,
|
|
456
|
-
success:
|
|
457
|
-
themeState:
|
|
458
|
-
}[((
|
|
459
|
-
},
|
|
460
|
-
const d =
|
|
434
|
+
success: t,
|
|
435
|
+
themeState: b
|
|
436
|
+
}[((f) => [V.filled, V.error, V.success].includes(f) ? f : "themeState")(r)];
|
|
437
|
+
}, We = ({ colors: e, borderRadius: o, components: r }, n, t, a, b) => {
|
|
438
|
+
const d = Qe(e, n, t), x = (v, f) => f && !v ? `${o.BorderRadiusMd}px 0px 0px ${o.BorderRadiusMd}px` : v && !f ? `0px ${o.BorderRadiusMd}px ${o.BorderRadiusMd}px 0px` : "0px";
|
|
461
439
|
return `
|
|
462
440
|
&.ant-input {
|
|
463
441
|
font-family: 'Inter', sans-serif;
|
|
@@ -470,21 +448,21 @@ const rt = V, st = (e, r, o) => {
|
|
|
470
448
|
outline: none;
|
|
471
449
|
color: ${d.color};
|
|
472
450
|
box-shadow: none;
|
|
473
|
-
border-color: ${e[
|
|
451
|
+
border-color: ${e[n].focussed.borderColor};
|
|
474
452
|
}
|
|
475
453
|
}
|
|
476
454
|
|
|
477
455
|
.ant-input-group:focus-within {
|
|
478
456
|
outline: none;
|
|
479
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[
|
|
480
|
-
border-radius: ${
|
|
457
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[n].focussed.ringColor};
|
|
458
|
+
border-radius: ${o.BorderRadiusMd}px;
|
|
481
459
|
transition: box-shadow 0.2s ease-in-out;
|
|
482
460
|
|
|
483
461
|
/* Hide focus styles on inner input when parent is focused */
|
|
484
462
|
.ant-input:focus-within {
|
|
485
463
|
box-shadow: none;
|
|
486
464
|
border-radius: 0;
|
|
487
|
-
border-radius: ${
|
|
465
|
+
border-radius: ${x(a, b)};
|
|
488
466
|
border-color: #ddd;
|
|
489
467
|
}
|
|
490
468
|
}
|
|
@@ -495,14 +473,14 @@ const rt = V, st = (e, r, o) => {
|
|
|
495
473
|
.ant-input-group .ant-input:focus-within {
|
|
496
474
|
outline: none;
|
|
497
475
|
box-shadow: none;
|
|
498
|
-
border-color: ${e[
|
|
476
|
+
border-color: ${e[n].focussed.borderColor};
|
|
499
477
|
}
|
|
500
478
|
|
|
501
479
|
/* Single focus ring on group */
|
|
502
480
|
.ant-input-group:focus-within {
|
|
503
481
|
outline: none;
|
|
504
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[
|
|
505
|
-
border-radius: ${
|
|
482
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[n].focussed.ringColor};
|
|
483
|
+
border-radius: ${o.BorderRadiusMd}px;
|
|
506
484
|
transition: box-shadow 0.2s ease-in-out;
|
|
507
485
|
}
|
|
508
486
|
|
|
@@ -510,33 +488,42 @@ const rt = V, st = (e, r, o) => {
|
|
|
510
488
|
&:not(.ant-input-group):focus-visible {
|
|
511
489
|
outline: none;
|
|
512
490
|
color: ${d.color};
|
|
513
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[
|
|
514
|
-
border-radius: ${
|
|
515
|
-
border-color: ${e[
|
|
491
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[n].focussed.ringColor};
|
|
492
|
+
border-radius: ${o.BorderRadiusMd}px;
|
|
493
|
+
border-color: ${e[n].focussed.borderColor};
|
|
516
494
|
transition: box-shadow 0.2s ease-in-out;
|
|
517
495
|
}
|
|
518
496
|
|
|
519
497
|
&:not(.ant-input-group .ant-input):focus-visible {
|
|
520
498
|
outline: none;
|
|
521
499
|
color: ${d.color};
|
|
522
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[
|
|
523
|
-
border-radius: ${
|
|
524
|
-
border-color: ${e[
|
|
500
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[n].focussed.ringColor};
|
|
501
|
+
border-radius: ${o.BorderRadiusMd}px;
|
|
502
|
+
border-color: ${e[n].focussed.borderColor};
|
|
525
503
|
transition: box-shadow 0.2s ease-in-out;
|
|
526
|
-
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
&.ant-input-group-wrapper {
|
|
507
|
+
.ant-input-group-addon {
|
|
508
|
+
padding-left: ${r.input.suffixPrefixHorPadding};
|
|
509
|
+
padding-right: ${r.input.suffixPrefixHorPadding};
|
|
510
|
+
padding-top: ${r.input.suffixPrefixVerPadding};
|
|
511
|
+
padding-bottom: ${r.input.suffixPrefixVerPadding};
|
|
512
|
+
}
|
|
513
|
+
}
|
|
527
514
|
`;
|
|
528
|
-
},
|
|
529
|
-
${({ theme: e, state:
|
|
530
|
-
const
|
|
531
|
-
return
|
|
515
|
+
}, pn = pe(D)`
|
|
516
|
+
${({ theme: e, state: o, type: r = oe.primary, ...n }) => {
|
|
517
|
+
const t = !!n.addonBefore, a = !!n.addonAfter;
|
|
518
|
+
return We(
|
|
532
519
|
e,
|
|
533
|
-
o,
|
|
534
520
|
r,
|
|
535
|
-
|
|
521
|
+
o,
|
|
522
|
+
t,
|
|
536
523
|
a
|
|
537
524
|
);
|
|
538
525
|
}}
|
|
539
526
|
`;
|
|
540
527
|
export {
|
|
541
|
-
|
|
528
|
+
pn as Input
|
|
542
529
|
};
|