@gobolt/genesis 0.0.11 → 0.1.0
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 +6 -0
- package/dist/ClockCircleOutlined-BaXQuLIn.js +13 -0
- package/dist/{Compact-DBh6nSYB.js → Compact-Du9689ax.js} +8 -8
- package/dist/{ContextIsolator-CwuJooYf.js → ContextIsolator-BmfhJgG0.js} +2 -2
- package/dist/{DownOutlined-5-15jS0h.js → DownOutlined-Dcq69ZKM.js} +9 -9
- package/dist/{EllipsisOutlined-CJ2pgE2d.js → EllipsisOutlined-DGMph0Bj.js} +110 -110
- package/dist/{Keyframes-sPZXYuXt.js → Keyframes-C9_aCDvn.js} +1 -1
- package/dist/{Overflow-DdNKJLQh.js → Overflow-DWf4XIal.js} +31 -31
- package/dist/{Skeleton-B3vg9CbL.js → Skeleton-BVN4pcVe.js} +2 -2
- package/dist/TextArea-Bkf9hh7l.js +708 -0
- package/dist/{Typography-DqI7RslA.js → Typography-CoZ5qD-t.js} +3 -3
- package/dist/{button-B2Rgggx2.js → button-BwqpCxVM.js} +5 -5
- package/dist/components/Avatar/Avatar.js +3 -3
- package/dist/components/Avatar/__tests__/Avatar.test.js +1 -1
- package/dist/components/Avatar/styles.js +42 -42
- package/dist/components/Badge/Badge.js +3 -3
- package/dist/components/Badge/__tests__/Badge.test.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +1 -1
- package/dist/components/Breadcrumb/styles.js +4 -4
- package/dist/components/Button/__tests__/Button.test.js +1 -1
- package/dist/components/Button/styles.js +1 -1
- package/dist/components/Card/__tests__/Card.test.js +1 -1
- package/dist/components/Card/styles.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +1 -1
- package/dist/components/Checkbox/styles.js +1 -1
- package/dist/components/Dashboard/__stories__/DashboardLayoutContent.js +8 -8
- package/dist/components/Dashboard/__stories__/DashboardLayoutHeader.js +4 -4
- package/dist/components/Dashboard/__tests__/Dashboard.test.js +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +6 -0
- package/dist/components/DatePicker/DatePicker.js +5 -0
- package/dist/components/DatePicker/__stories__/DatePicker.stories.d.ts +10 -0
- package/dist/components/DatePicker/__tests__/DatePicker.test.d.ts +1 -0
- package/dist/components/DatePicker/__tests__/DatePicker.test.js +19 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +4 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +5 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +5 -0
- package/dist/components/DateRangePicker/__stories__/DateRangePicker.stories.d.ts +9 -0
- package/dist/components/DateRangePicker/__tests__/DateRangePicker.test.d.ts +1 -0
- package/dist/components/DateRangePicker/__tests__/DateRangePicker.test.js +23 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/DateRangePicker/index.js +4 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.js +3 -3
- package/dist/components/ErrorBoundary/__tests__/ErrorBoundary.test.js +1 -1
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +3 -3
- package/dist/components/ErrorBoundaryFallback/styles.js +1 -1
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Form/__stories__/FormStory.js +4 -4
- package/dist/components/Form/__tests__/form.test.js +2 -2
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Form/styles.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/__tests__/Input.test.js +1 -1
- package/dist/components/Input/styles.js +1 -1
- package/dist/components/Layout/Content/ResponsiveContent.js +3 -3
- package/dist/components/Layout/MainLayout/MainLayout.js +1 -1
- package/dist/components/Layout/__tests__/Layout.test.js +1 -1
- package/dist/components/Message/Message.js +3 -3
- package/dist/components/Message/__tests__/Message.test.js +1 -1
- package/dist/components/Notification/Notification.js +3 -3
- package/dist/components/Notification/NotificationBadge/__tests__/NotificationBadge.test.js +1 -1
- package/dist/components/Notification/__tests__/Notification.test.js +1 -1
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Popover/__tests__/Popover.test.js +1 -1
- package/dist/components/Popover/styles.js +1 -1
- package/dist/components/Progress/Progress.js +3 -3
- package/dist/components/Progress/Progress.util.js +3 -3
- package/dist/components/Progress/ProgressText.js +3 -3
- package/dist/components/Progress/__tests__/Progress.test.js +1 -1
- package/dist/components/Progress/styles.js +3 -3
- package/dist/components/Radio/Radio.js +3 -3
- package/dist/components/Radio/RadioGroup.js +1 -1
- package/dist/components/Radio/__tests__/RadioGroup.test.js +1 -1
- package/dist/components/Row/Row.js +1 -1
- package/dist/components/Row/RowActions/RowActions.js +3 -3
- package/dist/components/Row/RowLabelValue/RowLabelValue.js +3 -3
- package/dist/components/Row/RowLabelValue/styles.js +1 -1
- package/dist/components/Row/__tests__/Row.test.js +1 -1
- package/dist/components/SegmentedControls/__tests__/SegmentedControls.test.js +1 -1
- package/dist/components/SegmentedControls/styles.js +27 -27
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Select/__tests__/Select.test.js +1 -1
- package/dist/components/Select/styles.js +1 -1
- package/dist/components/Shapes/__tests__/Shapes.test.js +1 -1
- package/dist/components/Switch/__tests__/Switch.test.js +1 -1
- package/dist/components/Switch/styles.js +15 -15
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/__mocks__/table-mocks.js +3 -3
- package/dist/components/Table/__tests__/Table.test.js +1 -1
- package/dist/components/Table/styles.js +1 -1
- package/dist/components/Tabs/__tests__/Tabs.test.js +1 -1
- package/dist/components/Tabs/styles.js +1 -1
- package/dist/components/Tile/__tests__/Tile.test.js +1 -1
- package/dist/components/Toast/Toast.js +3 -3
- package/dist/components/Toast/__tests__/Toast.test.js +2 -2
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +3 -3
- package/dist/components/Tooltip/__tests__/Tooltip.test.js +1 -1
- package/dist/components/Tooltip/styles.js +1 -1
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/Typography/__tests__/Typography.test.js +2 -2
- package/dist/components/Typography/index.js +1 -1
- package/dist/components/Typography/styles.js +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +46 -42
- package/dist/{context-Cx7GtZpz.js → context-DIFtNa4d.js} +70 -70
- package/dist/{dropdown-zGGFIyJ_.js → dropdown-Dp_PTQ2u.js} +60 -59
- package/dist/genesis/GenesisThemeBreakdown.js +86 -44
- package/dist/genesis/labs/Lab.stories.d.ts +6 -0
- package/dist/genesis/styles.js +2 -2
- package/dist/{index-CdiHBmVe.js → index-BPVue1Yd.js} +44 -44
- package/dist/{index-CRotrkWm.js → index-BQM5OniU.js} +7 -7
- package/dist/{index-BTGF--50.js → index-B_1Ge8na.js} +20 -19
- package/dist/{index-ByspLxrB.js → index-BbTV2Cw5.js} +32 -31
- package/dist/index-BeGv28kJ.js +5173 -0
- package/dist/{index-Dyl-ddV6.js → index-BpZSuIUV.js} +16 -16
- package/dist/{index-CodMmNWv.js → index-BvOLXELm.js} +3 -3
- package/dist/{index-hoPiccJv.js → index-CLSrpQRW.js} +9 -8
- package/dist/{index-D0P16DlX.js → index-CbVOl2U6.js} +26 -24
- package/dist/{index-DWUXwgXK.js → index-D0U6r5O7.js} +265 -294
- package/dist/{index-BW_7pvTr.js → index-DEu2PVzQ.js} +4 -4
- package/dist/{index-DmZOkMjs.js → index-DNQ-jnBx.js} +1207 -1514
- package/dist/index-DOsPeIWJ.js +1000 -0
- package/dist/{index-CSPlXIlA.js → index-DRGX1Wem.js} +7 -7
- package/dist/index-DWjq9XYj.js +899 -0
- package/dist/index.js +53 -49
- package/dist/motion-CUN72xsH.js +33 -0
- package/dist/providers/GenesisProvider.js +1 -1
- package/dist/providers/ToastProvider.js +3 -3
- package/dist/providers/index.js +1 -1
- package/dist/providers/useGenesis.js +1 -1
- package/dist/{responsiveObserver-O1kw80RG.js → responsiveObserver-dCkpy7Cb.js} +1 -1
- package/dist/roundedArrow-DI_Q-xdU.js +65 -0
- package/dist/{setup-CKu7-AfI.js → setup-CUbCc8fQ.js} +2 -2
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +7 -7
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +3 -3
- package/dist/styles/theme/genesis-theme.js +211 -349
- package/dist/styles/theme/theme-tree/ThemeTree.js +114 -113
- package/dist/{styles-BSD221S5.js → styles-CWdUpZom.js} +12 -12
- package/dist/{styles-BDbHpHsc.js → styles-D1vKDy9V.js} +9 -9
- package/dist/{styles-D9iYILpv.js → styles-qerRs7Rn.js} +493 -492
- package/dist/test/setup.js +2 -2
- package/dist/{toArray-DGvPoJP_.js → toArray-U3Az44CO.js} +1 -1
- package/dist/{useBreakpoint-CAMzKscx.js → useBreakpoint-TkMv121M.js} +2 -2
- package/dist/{useCSSVarCls-C-MlZC6a.js → useCSSVarCls-Dau77fzS.js} +1 -1
- package/dist/useIcons-Ck4JP1m9.js +321 -0
- package/dist/{useLocale-DWRfeMSS.js → useLocale-CTfNpakL.js} +1 -1
- package/dist/{useMergedState-BoELfaU9.js → useMergedState-D6toxSxh.js} +1 -1
- package/dist/{useSize-CPo2bUE3.js → useSize-DSq4r6zy.js} +1 -1
- package/dist/{useVariants-Cin23jEC.js → useVariants-DrLzUVLU.js} +2 -2
- package/dist/{useZIndex-D81lkWy4.js → useZIndex-DhyHuZTN.js} +1 -1
- package/dist/utils/icon-util.js +38 -44
- package/package.json +2 -1
- package/dist/TextArea-CKWbFr0u.js +0 -1698
- package/dist/index-CqqwGTME.js +0 -956
|
@@ -1,36 +1,33 @@
|
|
|
1
1
|
import * as o from "react";
|
|
2
|
-
import
|
|
3
|
-
import { e as
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
6
|
-
import { T as
|
|
2
|
+
import Rn, { useState as Tn, useRef as he, useEffect as Yn, useMemo as fr, useContext as mr } from "react";
|
|
3
|
+
import { e as Be, f as pn, a as te, j as vr, _ as ee, b as ae, d as on, g as wn, w as Ue, c as gr, n as ht, F as zn } from "./presets-Djh_L_6R.js";
|
|
4
|
+
import { t as pr, a8 as hr, o as Ye, B as br, h as Mn, F as un, _ as Sr, e as Cr, E as yr, a as bt, G as St, Z as wr, c as tt, j as Bt, m as Hn, C as rt, g as zt, k as ot, v as qn, f as ke, r as Er, D as Ir } from "./index-BbTV2Cw5.js";
|
|
5
|
+
import { u as Qn } from "./useMergedState-D6toxSxh.js";
|
|
6
|
+
import { T as xr, a as Or } from "./index-D0U6r5O7.js";
|
|
7
7
|
import { K as W } from "./KeyCode-DM2sFh3-.js";
|
|
8
|
-
import { p as
|
|
9
|
-
import { F as
|
|
10
|
-
import { o as
|
|
11
|
-
import { R as
|
|
8
|
+
import { p as Fn } from "./pickAttrs-CleuMJFR.js";
|
|
9
|
+
import { F as Rr, s as Mr, a as Dr, b as $r, c as Nr, i as Ct } from "./Overflow-DWf4XIal.js";
|
|
10
|
+
import { o as Ht } from "./omit-B_u6A-HL.js";
|
|
11
|
+
import { R as Ft } from "./index-BQM5OniU.js";
|
|
12
12
|
import "./index-DLdU7Tpd.js";
|
|
13
|
-
import { t as
|
|
14
|
-
import { u as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { u as
|
|
18
|
-
import { u as
|
|
19
|
-
import { u as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { R as Gr } from "./CloseOutlined-ogxnm7Oy.js";
|
|
26
|
-
import { R as Yr } from "./LoadingOutlined-C1qu6ymP.js";
|
|
27
|
-
import { R as qr } from "./SearchOutlined-DNj-7b_h.js";
|
|
13
|
+
import { t as Zn } from "./toArray-U3Az44CO.js";
|
|
14
|
+
import { u as Pr } from "./useZIndex-DhyHuZTN.js";
|
|
15
|
+
import { g as _r } from "./motion-CUN72xsH.js";
|
|
16
|
+
import { i as yt, g as Tr } from "./DownOutlined-Dcq69ZKM.js";
|
|
17
|
+
import { u as Vr, a as Lr, g as Br } from "./useVariants-DrLzUVLU.js";
|
|
18
|
+
import { u as at } from "./useLocale-CTfNpakL.js";
|
|
19
|
+
import { u as zr } from "./useCSSVarCls-Dau77fzS.js";
|
|
20
|
+
import { u as Hr } from "./useSize-DSq4r6zy.js";
|
|
21
|
+
import { F as Fr } from "./context-DIFtNa4d.js";
|
|
22
|
+
import { u as Ar } from "./Compact-Du9689ax.js";
|
|
23
|
+
import { g as jr } from "./compact-item-DH13cl8A.js";
|
|
24
|
+
import { g as Wr, u as Kr } from "./useIcons-Ck4JP1m9.js";
|
|
28
25
|
var jn = function(n) {
|
|
29
|
-
var t = n.className, r = n.customizeIcon, a = n.customizeIconProps,
|
|
26
|
+
var t = n.className, r = n.customizeIcon, a = n.customizeIconProps, l = n.children, i = n.onMouseDown, u = n.onClick, d = typeof r == "function" ? r(a) : r;
|
|
30
27
|
return /* @__PURE__ */ o.createElement("span", {
|
|
31
28
|
className: t,
|
|
32
29
|
onMouseDown: function(v) {
|
|
33
|
-
v.preventDefault(),
|
|
30
|
+
v.preventDefault(), i == null || i(v);
|
|
34
31
|
},
|
|
35
32
|
style: {
|
|
36
33
|
userSelect: "none",
|
|
@@ -40,46 +37,46 @@ var jn = function(n) {
|
|
|
40
37
|
onClick: u,
|
|
41
38
|
"aria-hidden": !0
|
|
42
39
|
}, d !== void 0 ? d : /* @__PURE__ */ o.createElement("span", {
|
|
43
|
-
className:
|
|
40
|
+
className: Be(t.split(/\s+/).map(function(f) {
|
|
44
41
|
return "".concat(f, "-icon");
|
|
45
42
|
}))
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
var
|
|
43
|
+
}, l));
|
|
44
|
+
}, Ur = function(n, t, r, a, l) {
|
|
45
|
+
var i = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, u = arguments.length > 6 ? arguments[6] : void 0, d = arguments.length > 7 ? arguments[7] : void 0, f = Rn.useMemo(function() {
|
|
49
46
|
if (pn(a) === "object")
|
|
50
47
|
return a.clearIcon;
|
|
51
|
-
if (
|
|
52
|
-
return
|
|
53
|
-
}, [a,
|
|
54
|
-
return !!(!
|
|
55
|
-
}, [a,
|
|
48
|
+
if (l)
|
|
49
|
+
return l;
|
|
50
|
+
}, [a, l]), v = Rn.useMemo(function() {
|
|
51
|
+
return !!(!i && a && (r.length || u) && !(d === "combobox" && u === ""));
|
|
52
|
+
}, [a, i, r.length, u, d]);
|
|
56
53
|
return {
|
|
57
54
|
allowClear: v,
|
|
58
|
-
clearIcon: /* @__PURE__ */
|
|
55
|
+
clearIcon: /* @__PURE__ */ Rn.createElement(jn, {
|
|
59
56
|
className: "".concat(n, "-clear"),
|
|
60
57
|
onMouseDown: t,
|
|
61
58
|
customizeIcon: f
|
|
62
59
|
}, "×")
|
|
63
60
|
};
|
|
64
|
-
},
|
|
65
|
-
function
|
|
66
|
-
return o.useContext(
|
|
61
|
+
}, At = /* @__PURE__ */ o.createContext(null);
|
|
62
|
+
function Xr() {
|
|
63
|
+
return o.useContext(At);
|
|
67
64
|
}
|
|
68
|
-
function
|
|
69
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, n = o.useState(!1), t = te(n, 2), r = t[0], a = t[1],
|
|
70
|
-
window.clearTimeout(
|
|
65
|
+
function Gr() {
|
|
66
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, n = o.useState(!1), t = te(n, 2), r = t[0], a = t[1], l = o.useRef(null), i = function() {
|
|
67
|
+
window.clearTimeout(l.current);
|
|
71
68
|
};
|
|
72
69
|
o.useEffect(function() {
|
|
73
|
-
return
|
|
70
|
+
return i;
|
|
74
71
|
}, []);
|
|
75
72
|
var u = function(f, v) {
|
|
76
|
-
|
|
73
|
+
i(), l.current = window.setTimeout(function() {
|
|
77
74
|
a(f), v && v();
|
|
78
75
|
}, e);
|
|
79
76
|
};
|
|
80
|
-
return [r, u,
|
|
77
|
+
return [r, u, i];
|
|
81
78
|
}
|
|
82
|
-
function
|
|
79
|
+
function jt() {
|
|
83
80
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, n = o.useRef(null), t = o.useRef(null);
|
|
84
81
|
o.useEffect(function() {
|
|
85
82
|
return function() {
|
|
@@ -95,30 +92,30 @@ function Kt() {
|
|
|
95
92
|
return n.current;
|
|
96
93
|
}, r];
|
|
97
94
|
}
|
|
98
|
-
function
|
|
95
|
+
function Yr(e, n, t, r) {
|
|
99
96
|
var a = o.useRef(null);
|
|
100
97
|
a.current = {
|
|
101
98
|
open: n,
|
|
102
99
|
triggerOpen: t,
|
|
103
100
|
customizedTrigger: r
|
|
104
101
|
}, o.useEffect(function() {
|
|
105
|
-
function i
|
|
102
|
+
function l(i) {
|
|
106
103
|
var u;
|
|
107
104
|
if (!((u = a.current) !== null && u !== void 0 && u.customizedTrigger)) {
|
|
108
|
-
var d =
|
|
109
|
-
d.shadowRoot &&
|
|
105
|
+
var d = i.target;
|
|
106
|
+
d.shadowRoot && i.composed && (d = i.composedPath()[0] || d), a.current.open && e().filter(function(f) {
|
|
110
107
|
return f;
|
|
111
108
|
}).every(function(f) {
|
|
112
109
|
return !f.contains(d) && f !== d;
|
|
113
110
|
}) && a.current.triggerOpen(!1);
|
|
114
111
|
}
|
|
115
112
|
}
|
|
116
|
-
return window.addEventListener("mousedown",
|
|
117
|
-
return window.removeEventListener("mousedown",
|
|
113
|
+
return window.addEventListener("mousedown", l), function() {
|
|
114
|
+
return window.removeEventListener("mousedown", l);
|
|
118
115
|
};
|
|
119
116
|
}, []);
|
|
120
117
|
}
|
|
121
|
-
function
|
|
118
|
+
function qr(e) {
|
|
122
119
|
return (
|
|
123
120
|
// Undefined for Edge bug:
|
|
124
121
|
// https://github.com/ant-design/ant-design/issues/51292
|
|
@@ -154,27 +151,27 @@ function eo(e) {
|
|
|
154
151
|
].includes(e)
|
|
155
152
|
);
|
|
156
153
|
}
|
|
157
|
-
var
|
|
158
|
-
var r, a = n.prefixCls,
|
|
159
|
-
return
|
|
154
|
+
var Qr = function(n, t) {
|
|
155
|
+
var r, a = n.prefixCls, l = n.id, i = n.inputElement, u = n.disabled, d = n.tabIndex, f = n.autoFocus, v = n.autoComplete, s = n.editable, h = n.activeDescendantId, c = n.value, g = n.maxLength, m = n.onKeyDown, S = n.onMouseDown, C = n.onChange, b = n.onPaste, x = n.onCompositionStart, w = n.onCompositionEnd, B = n.onBlur, p = n.open, E = n.attrs, L = i || /* @__PURE__ */ o.createElement("input", null), H = L, q = H.ref, _ = H.props, A = _.onKeyDown, X = _.onChange, Q = _.onMouseDown, G = _.onCompositionStart, j = _.onCompositionEnd, ne = _.onBlur, Z = _.style;
|
|
156
|
+
return vr(!("maxLength" in L.props), "Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."), L = /* @__PURE__ */ o.cloneElement(L, ee(ee(ee({
|
|
160
157
|
type: "search"
|
|
161
158
|
}, _), {}, {
|
|
162
159
|
// Override over origin props
|
|
163
|
-
id:
|
|
164
|
-
ref:
|
|
160
|
+
id: l,
|
|
161
|
+
ref: pr(t, q),
|
|
165
162
|
disabled: u,
|
|
166
163
|
tabIndex: d,
|
|
167
164
|
autoComplete: v || "off",
|
|
168
165
|
autoFocus: f,
|
|
169
|
-
className:
|
|
166
|
+
className: Be("".concat(a, "-selection-search-input"), (r = L) === null || r === void 0 || (r = r.props) === null || r === void 0 ? void 0 : r.className),
|
|
170
167
|
role: "combobox",
|
|
171
168
|
"aria-expanded": p || !1,
|
|
172
169
|
"aria-haspopup": "listbox",
|
|
173
|
-
"aria-owns": "".concat(
|
|
170
|
+
"aria-owns": "".concat(l, "_list"),
|
|
174
171
|
"aria-autocomplete": "list",
|
|
175
|
-
"aria-controls": "".concat(
|
|
176
|
-
"aria-activedescendant": p ?
|
|
177
|
-
},
|
|
172
|
+
"aria-controls": "".concat(l, "_list"),
|
|
173
|
+
"aria-activedescendant": p ? h : void 0
|
|
174
|
+
}, E), {}, {
|
|
178
175
|
value: s ? c : "",
|
|
179
176
|
maxLength: g,
|
|
180
177
|
readOnly: !s,
|
|
@@ -182,104 +179,104 @@ var no = function(n, t) {
|
|
|
182
179
|
style: ee(ee({}, Z), {}, {
|
|
183
180
|
opacity: s ? null : 0
|
|
184
181
|
}),
|
|
185
|
-
onKeyDown: function(
|
|
186
|
-
m(
|
|
182
|
+
onKeyDown: function(I) {
|
|
183
|
+
m(I), A && A(I);
|
|
187
184
|
},
|
|
188
|
-
onMouseDown: function(
|
|
189
|
-
S(
|
|
185
|
+
onMouseDown: function(I) {
|
|
186
|
+
S(I), Q && Q(I);
|
|
190
187
|
},
|
|
191
|
-
onChange: function(
|
|
192
|
-
|
|
188
|
+
onChange: function(I) {
|
|
189
|
+
C(I), X && X(I);
|
|
193
190
|
},
|
|
194
|
-
onCompositionStart: function(
|
|
195
|
-
|
|
191
|
+
onCompositionStart: function(I) {
|
|
192
|
+
x(I), G && G(I);
|
|
196
193
|
},
|
|
197
|
-
onCompositionEnd: function(
|
|
198
|
-
|
|
194
|
+
onCompositionEnd: function(I) {
|
|
195
|
+
w(I), j && j(I);
|
|
199
196
|
},
|
|
200
|
-
onPaste:
|
|
201
|
-
onBlur: function(
|
|
202
|
-
|
|
197
|
+
onPaste: b,
|
|
198
|
+
onBlur: function(I) {
|
|
199
|
+
B(I), ne && ne(I);
|
|
203
200
|
}
|
|
204
|
-
})),
|
|
205
|
-
},
|
|
206
|
-
process.env.NODE_ENV !== "production" && (
|
|
207
|
-
function
|
|
201
|
+
})), L;
|
|
202
|
+
}, it = /* @__PURE__ */ o.forwardRef(Qr);
|
|
203
|
+
process.env.NODE_ENV !== "production" && (it.displayName = "Input");
|
|
204
|
+
function lt(e) {
|
|
208
205
|
return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
|
|
209
206
|
}
|
|
210
|
-
var
|
|
211
|
-
function
|
|
207
|
+
var Zr = typeof window < "u" && window.document && window.document.documentElement, Jr = process.env.NODE_ENV !== "test" && Zr;
|
|
208
|
+
function kr(e) {
|
|
212
209
|
return e != null;
|
|
213
210
|
}
|
|
214
|
-
function
|
|
211
|
+
function eo(e) {
|
|
215
212
|
return !e && e !== 0;
|
|
216
213
|
}
|
|
217
|
-
function
|
|
214
|
+
function wt(e) {
|
|
218
215
|
return ["string", "number"].includes(pn(e));
|
|
219
216
|
}
|
|
220
|
-
function
|
|
217
|
+
function Wt(e) {
|
|
221
218
|
var n = void 0;
|
|
222
|
-
return e && (
|
|
219
|
+
return e && (wt(e.title) ? n = e.title.toString() : wt(e.label) && (n = e.label.toString())), n;
|
|
223
220
|
}
|
|
224
|
-
function
|
|
225
|
-
|
|
221
|
+
function no(e, n) {
|
|
222
|
+
Jr ? o.useLayoutEffect(e, n) : o.useEffect(e, n);
|
|
226
223
|
}
|
|
227
|
-
function
|
|
224
|
+
function to(e) {
|
|
228
225
|
var n;
|
|
229
226
|
return (n = e.key) !== null && n !== void 0 ? n : e.value;
|
|
230
227
|
}
|
|
231
|
-
var
|
|
228
|
+
var Et = function(n) {
|
|
232
229
|
n.preventDefault(), n.stopPropagation();
|
|
233
|
-
},
|
|
234
|
-
var t = n.id, r = n.prefixCls, a = n.values,
|
|
230
|
+
}, ro = function(n) {
|
|
231
|
+
var t = n.id, r = n.prefixCls, a = n.values, l = n.open, i = n.searchValue, u = n.autoClearSearchValue, d = n.inputRef, f = n.placeholder, v = n.disabled, s = n.mode, h = n.showSearch, c = n.autoFocus, g = n.autoComplete, m = n.activeDescendantId, S = n.tabIndex, C = n.removeIcon, b = n.maxTagCount, x = n.maxTagTextLength, w = n.maxTagPlaceholder, B = w === void 0 ? function(K) {
|
|
235
232
|
return "+ ".concat(K.length, " ...");
|
|
236
|
-
} :
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}, [
|
|
240
|
-
var
|
|
233
|
+
} : w, p = n.tagRender, E = n.onToggleOpen, L = n.onRemove, H = n.onInputChange, q = n.onInputPaste, _ = n.onInputKeyDown, A = n.onInputMouseDown, X = n.onInputCompositionStart, Q = n.onInputCompositionEnd, G = n.onInputBlur, j = o.useRef(null), ne = Tn(0), Z = te(ne, 2), Y = Z[0], I = Z[1], D = Tn(!1), fe = te(D, 2), ie = fe[0], J = fe[1], se = "".concat(r, "-selection"), ye = l || s === "multiple" && u === !1 || s === "tags" ? i : "", ge = s === "tags" || s === "multiple" && u === !1 || h && (l || ie);
|
|
234
|
+
no(function() {
|
|
235
|
+
I(j.current.scrollWidth);
|
|
236
|
+
}, [ye]);
|
|
237
|
+
var Re = function(O, F, le, me, re) {
|
|
241
238
|
return /* @__PURE__ */ o.createElement("span", {
|
|
242
|
-
title:
|
|
243
|
-
className:
|
|
239
|
+
title: Wt(O),
|
|
240
|
+
className: Be("".concat(se, "-item"), ae({}, "".concat(se, "-item-disabled"), le))
|
|
244
241
|
}, /* @__PURE__ */ o.createElement("span", {
|
|
245
242
|
className: "".concat(se, "-item-content")
|
|
246
|
-
},
|
|
243
|
+
}, F), me && /* @__PURE__ */ o.createElement(jn, {
|
|
247
244
|
className: "".concat(se, "-item-remove"),
|
|
248
|
-
onMouseDown:
|
|
245
|
+
onMouseDown: Et,
|
|
249
246
|
onClick: re,
|
|
250
|
-
customizeIcon:
|
|
247
|
+
customizeIcon: C
|
|
251
248
|
}, "×"));
|
|
252
|
-
}, ce = function(
|
|
253
|
-
var
|
|
254
|
-
|
|
249
|
+
}, ce = function(O, F, le, me, re, Ce) {
|
|
250
|
+
var Le = function(Ne) {
|
|
251
|
+
Et(Ne), E(!l);
|
|
255
252
|
};
|
|
256
253
|
return /* @__PURE__ */ o.createElement("span", {
|
|
257
|
-
onMouseDown:
|
|
254
|
+
onMouseDown: Le
|
|
258
255
|
}, p({
|
|
259
|
-
label:
|
|
260
|
-
value:
|
|
256
|
+
label: F,
|
|
257
|
+
value: O,
|
|
261
258
|
disabled: le,
|
|
262
259
|
closable: me,
|
|
263
260
|
onClose: re,
|
|
264
|
-
isMaxTag: !!
|
|
261
|
+
isMaxTag: !!Ce
|
|
265
262
|
}));
|
|
266
|
-
}, pe = function(
|
|
267
|
-
var
|
|
268
|
-
if (typeof
|
|
269
|
-
var
|
|
270
|
-
|
|
263
|
+
}, pe = function(O) {
|
|
264
|
+
var F = O.disabled, le = O.label, me = O.value, re = !v && !F, Ce = le;
|
|
265
|
+
if (typeof x == "number" && (typeof le == "string" || typeof le == "number")) {
|
|
266
|
+
var Le = String(Ce);
|
|
267
|
+
Le.length > x && (Ce = "".concat(Le.slice(0, x), "..."));
|
|
271
268
|
}
|
|
272
269
|
var xe = function(de) {
|
|
273
|
-
de && de.stopPropagation(),
|
|
270
|
+
de && de.stopPropagation(), L(O);
|
|
274
271
|
};
|
|
275
|
-
return typeof p == "function" ? ce(me,
|
|
276
|
-
},
|
|
272
|
+
return typeof p == "function" ? ce(me, Ce, F, re, xe) : Re(O, Ce, F, re, xe);
|
|
273
|
+
}, R = function(O) {
|
|
277
274
|
if (!a.length)
|
|
278
275
|
return null;
|
|
279
|
-
var
|
|
280
|
-
return typeof p == "function" ? ce(void 0,
|
|
281
|
-
title:
|
|
282
|
-
},
|
|
276
|
+
var F = typeof B == "function" ? B(O) : B;
|
|
277
|
+
return typeof p == "function" ? ce(void 0, F, !1, !1, void 0, !0) : Re({
|
|
278
|
+
title: F
|
|
279
|
+
}, F, !1);
|
|
283
280
|
}, y = /* @__PURE__ */ o.createElement("div", {
|
|
284
281
|
className: "".concat(se, "-search"),
|
|
285
282
|
style: {
|
|
@@ -291,9 +288,9 @@ var xt = function(n) {
|
|
|
291
288
|
onBlur: function() {
|
|
292
289
|
J(!1);
|
|
293
290
|
}
|
|
294
|
-
}, /* @__PURE__ */ o.createElement(
|
|
291
|
+
}, /* @__PURE__ */ o.createElement(it, {
|
|
295
292
|
ref: d,
|
|
296
|
-
open:
|
|
293
|
+
open: l,
|
|
297
294
|
prefixCls: r,
|
|
298
295
|
id: t,
|
|
299
296
|
inputElement: null,
|
|
@@ -302,40 +299,40 @@ var xt = function(n) {
|
|
|
302
299
|
autoComplete: g,
|
|
303
300
|
editable: ge,
|
|
304
301
|
activeDescendantId: m,
|
|
305
|
-
value:
|
|
302
|
+
value: ye,
|
|
306
303
|
onKeyDown: _,
|
|
307
|
-
onMouseDown:
|
|
308
|
-
onChange:
|
|
304
|
+
onMouseDown: A,
|
|
305
|
+
onChange: H,
|
|
309
306
|
onPaste: q,
|
|
310
|
-
onCompositionStart:
|
|
307
|
+
onCompositionStart: X,
|
|
311
308
|
onCompositionEnd: Q,
|
|
312
309
|
onBlur: G,
|
|
313
310
|
tabIndex: S,
|
|
314
|
-
attrs:
|
|
311
|
+
attrs: Fn(n, !0)
|
|
315
312
|
}), /* @__PURE__ */ o.createElement("span", {
|
|
316
313
|
ref: j,
|
|
317
314
|
className: "".concat(se, "-search-mirror"),
|
|
318
315
|
"aria-hidden": !0
|
|
319
|
-
},
|
|
316
|
+
}, ye, " ")), $ = /* @__PURE__ */ o.createElement(Rr, {
|
|
320
317
|
prefixCls: "".concat(se, "-overflow"),
|
|
321
318
|
data: a,
|
|
322
319
|
renderItem: pe,
|
|
323
|
-
renderRest:
|
|
320
|
+
renderRest: R,
|
|
324
321
|
suffix: y,
|
|
325
|
-
itemKey:
|
|
326
|
-
maxCount:
|
|
322
|
+
itemKey: to,
|
|
323
|
+
maxCount: b
|
|
327
324
|
});
|
|
328
325
|
return /* @__PURE__ */ o.createElement("span", {
|
|
329
326
|
className: "".concat(se, "-wrap")
|
|
330
|
-
},
|
|
327
|
+
}, $, !a.length && !ye && /* @__PURE__ */ o.createElement("span", {
|
|
331
328
|
className: "".concat(se, "-placeholder")
|
|
332
329
|
}, f));
|
|
333
|
-
},
|
|
334
|
-
var t = n.inputElement, r = n.prefixCls, a = n.id,
|
|
335
|
-
G &&
|
|
330
|
+
}, oo = function(n) {
|
|
331
|
+
var t = n.inputElement, r = n.prefixCls, a = n.id, l = n.inputRef, i = n.disabled, u = n.autoFocus, d = n.autoComplete, f = n.activeDescendantId, v = n.mode, s = n.open, h = n.values, c = n.placeholder, g = n.tabIndex, m = n.showSearch, S = n.searchValue, C = n.activeValue, b = n.maxLength, x = n.onInputKeyDown, w = n.onInputMouseDown, B = n.onInputChange, p = n.onInputPaste, E = n.onInputCompositionStart, L = n.onInputCompositionEnd, H = n.onInputBlur, q = n.title, _ = o.useState(!1), A = te(_, 2), X = A[0], Q = A[1], G = v === "combobox", j = G || m, ne = h[0], Z = S || "";
|
|
332
|
+
G && C && !X && (Z = C), o.useEffect(function() {
|
|
336
333
|
G && Q(!1);
|
|
337
|
-
}, [G,
|
|
338
|
-
var Y = v !== "combobox" && !s && !m ? !1 : !!Z,
|
|
334
|
+
}, [G, C]);
|
|
335
|
+
var Y = v !== "combobox" && !s && !m ? !1 : !!Z, I = q === void 0 ? Wt(ne) : q, D = o.useMemo(function() {
|
|
339
336
|
return ne ? null : /* @__PURE__ */ o.createElement("span", {
|
|
340
337
|
className: "".concat(r, "-selection-placeholder"),
|
|
341
338
|
style: Y ? {
|
|
@@ -347,102 +344,102 @@ var xt = function(n) {
|
|
|
347
344
|
className: "".concat(r, "-selection-wrap")
|
|
348
345
|
}, /* @__PURE__ */ o.createElement("span", {
|
|
349
346
|
className: "".concat(r, "-selection-search")
|
|
350
|
-
}, /* @__PURE__ */ o.createElement(
|
|
351
|
-
ref:
|
|
347
|
+
}, /* @__PURE__ */ o.createElement(it, {
|
|
348
|
+
ref: l,
|
|
352
349
|
prefixCls: r,
|
|
353
350
|
id: a,
|
|
354
351
|
open: s,
|
|
355
352
|
inputElement: t,
|
|
356
|
-
disabled:
|
|
353
|
+
disabled: i,
|
|
357
354
|
autoFocus: u,
|
|
358
355
|
autoComplete: d,
|
|
359
356
|
editable: j,
|
|
360
357
|
activeDescendantId: f,
|
|
361
358
|
value: Z,
|
|
362
|
-
onKeyDown:
|
|
363
|
-
onMouseDown:
|
|
359
|
+
onKeyDown: x,
|
|
360
|
+
onMouseDown: w,
|
|
364
361
|
onChange: function(ie) {
|
|
365
|
-
Q(!0),
|
|
362
|
+
Q(!0), B(ie);
|
|
366
363
|
},
|
|
367
364
|
onPaste: p,
|
|
368
|
-
onCompositionStart:
|
|
369
|
-
onCompositionEnd:
|
|
370
|
-
onBlur:
|
|
365
|
+
onCompositionStart: E,
|
|
366
|
+
onCompositionEnd: L,
|
|
367
|
+
onBlur: H,
|
|
371
368
|
tabIndex: g,
|
|
372
|
-
attrs:
|
|
373
|
-
maxLength: G ?
|
|
369
|
+
attrs: Fn(n, !0),
|
|
370
|
+
maxLength: G ? b : void 0
|
|
374
371
|
})), !G && ne ? /* @__PURE__ */ o.createElement("span", {
|
|
375
372
|
className: "".concat(r, "-selection-item"),
|
|
376
|
-
title:
|
|
373
|
+
title: I,
|
|
377
374
|
style: Y ? {
|
|
378
375
|
visibility: "hidden"
|
|
379
376
|
} : void 0
|
|
380
|
-
}, ne.label) : null,
|
|
381
|
-
},
|
|
382
|
-
var r = he(null), a = he(!1),
|
|
377
|
+
}, ne.label) : null, D);
|
|
378
|
+
}, ao = function(n, t) {
|
|
379
|
+
var r = he(null), a = he(!1), l = n.prefixCls, i = n.open, u = n.mode, d = n.showSearch, f = n.tokenWithEnter, v = n.disabled, s = n.prefix, h = n.autoClearSearchValue, c = n.onSearch, g = n.onSearchSubmit, m = n.onToggleOpen, S = n.onInputKeyDown, C = n.onInputBlur, b = n.domRef;
|
|
383
380
|
o.useImperativeHandle(t, function() {
|
|
384
381
|
return {
|
|
385
|
-
focus: function(
|
|
386
|
-
r.current.focus(
|
|
382
|
+
focus: function(I) {
|
|
383
|
+
r.current.focus(I);
|
|
387
384
|
},
|
|
388
385
|
blur: function() {
|
|
389
386
|
r.current.blur();
|
|
390
387
|
}
|
|
391
388
|
};
|
|
392
389
|
});
|
|
393
|
-
var
|
|
394
|
-
var
|
|
395
|
-
!fe &&
|
|
396
|
-
},
|
|
390
|
+
var x = jt(0), w = te(x, 2), B = w[0], p = w[1], E = function(I) {
|
|
391
|
+
var D = I.which, fe = r.current instanceof HTMLTextAreaElement;
|
|
392
|
+
!fe && i && (D === W.UP || D === W.DOWN) && I.preventDefault(), S && S(I), D === W.ENTER && u === "tags" && !a.current && !i && (g == null || g(I.target.value)), !(fe && !i && ~[W.UP, W.DOWN, W.LEFT, W.RIGHT].indexOf(D)) && qr(D) && m(!0);
|
|
393
|
+
}, L = function() {
|
|
397
394
|
p(!0);
|
|
398
|
-
},
|
|
399
|
-
c(
|
|
395
|
+
}, H = he(null), q = function(I) {
|
|
396
|
+
c(I, !0, a.current) !== !1 && m(!0);
|
|
400
397
|
}, _ = function() {
|
|
401
398
|
a.current = !0;
|
|
402
|
-
},
|
|
403
|
-
a.current = !1, u !== "combobox" && q(
|
|
404
|
-
},
|
|
405
|
-
var
|
|
406
|
-
if (f &&
|
|
407
|
-
var fe =
|
|
408
|
-
|
|
399
|
+
}, A = function(I) {
|
|
400
|
+
a.current = !1, u !== "combobox" && q(I.target.value);
|
|
401
|
+
}, X = function(I) {
|
|
402
|
+
var D = I.target.value;
|
|
403
|
+
if (f && H.current && /[\r\n]/.test(H.current)) {
|
|
404
|
+
var fe = H.current.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
|
|
405
|
+
D = D.replace(fe, H.current);
|
|
409
406
|
}
|
|
410
|
-
|
|
411
|
-
}, Q = function(
|
|
412
|
-
var
|
|
413
|
-
|
|
414
|
-
}, G = function(
|
|
415
|
-
var
|
|
416
|
-
if (
|
|
407
|
+
H.current = null, q(D);
|
|
408
|
+
}, Q = function(I) {
|
|
409
|
+
var D = I.clipboardData, fe = D == null ? void 0 : D.getData("text");
|
|
410
|
+
H.current = fe || "";
|
|
411
|
+
}, G = function(I) {
|
|
412
|
+
var D = I.target;
|
|
413
|
+
if (D !== r.current) {
|
|
417
414
|
var fe = document.body.style.msTouchAction !== void 0;
|
|
418
415
|
fe ? setTimeout(function() {
|
|
419
416
|
r.current.focus();
|
|
420
417
|
}) : r.current.focus();
|
|
421
418
|
}
|
|
422
|
-
}, j = function(
|
|
423
|
-
var
|
|
424
|
-
|
|
419
|
+
}, j = function(I) {
|
|
420
|
+
var D = B();
|
|
421
|
+
I.target !== r.current && !D && !(u === "combobox" && v) && I.preventDefault(), (u !== "combobox" && (!d || !D) || !i) && (i && h !== !1 && c("", !0, !1), m());
|
|
425
422
|
}, ne = {
|
|
426
423
|
inputRef: r,
|
|
427
|
-
onInputKeyDown:
|
|
428
|
-
onInputMouseDown:
|
|
429
|
-
onInputChange:
|
|
424
|
+
onInputKeyDown: E,
|
|
425
|
+
onInputMouseDown: L,
|
|
426
|
+
onInputChange: X,
|
|
430
427
|
onInputPaste: Q,
|
|
431
428
|
onInputCompositionStart: _,
|
|
432
|
-
onInputCompositionEnd:
|
|
433
|
-
onInputBlur:
|
|
434
|
-
}, Z = u === "multiple" || u === "tags" ? /* @__PURE__ */ o.createElement(
|
|
429
|
+
onInputCompositionEnd: A,
|
|
430
|
+
onInputBlur: C
|
|
431
|
+
}, Z = u === "multiple" || u === "tags" ? /* @__PURE__ */ o.createElement(ro, on({}, n, ne)) : /* @__PURE__ */ o.createElement(oo, on({}, n, ne));
|
|
435
432
|
return /* @__PURE__ */ o.createElement("div", {
|
|
436
|
-
ref:
|
|
437
|
-
className: "".concat(
|
|
433
|
+
ref: b,
|
|
434
|
+
className: "".concat(l, "-selector"),
|
|
438
435
|
onClick: G,
|
|
439
436
|
onMouseDown: j
|
|
440
437
|
}, s && /* @__PURE__ */ o.createElement("div", {
|
|
441
|
-
className: "".concat(
|
|
438
|
+
className: "".concat(l, "-prefix")
|
|
442
439
|
}, s), Z);
|
|
443
|
-
},
|
|
444
|
-
process.env.NODE_ENV !== "production" && (
|
|
445
|
-
var
|
|
440
|
+
}, Kt = /* @__PURE__ */ o.forwardRef(ao);
|
|
441
|
+
process.env.NODE_ENV !== "production" && (Kt.displayName = "Selector");
|
|
442
|
+
var io = ["prefixCls", "disabled", "visible", "children", "popupElement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "direction", "placement", "builtinPlacements", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "getPopupContainer", "empty", "getTriggerDOMNode", "onPopupVisibleChange", "onPopupMouseEnter"], lo = function(n) {
|
|
446
443
|
var t = n === !0 ? 0 : 1;
|
|
447
444
|
return {
|
|
448
445
|
bottomLeft: {
|
|
@@ -482,17 +479,17 @@ var fo = ["prefixCls", "disabled", "visible", "children", "popupElement", "anima
|
|
|
482
479
|
htmlRegion: "scroll"
|
|
483
480
|
}
|
|
484
481
|
};
|
|
485
|
-
},
|
|
482
|
+
}, uo = function(n, t) {
|
|
486
483
|
var r = n.prefixCls;
|
|
487
484
|
n.disabled;
|
|
488
|
-
var a = n.visible,
|
|
489
|
-
S && (
|
|
485
|
+
var a = n.visible, l = n.children, i = n.popupElement, u = n.animation, d = n.transitionName, f = n.dropdownStyle, v = n.dropdownClassName, s = n.direction, h = s === void 0 ? "ltr" : s, c = n.placement, g = n.builtinPlacements, m = n.dropdownMatchSelectWidth, S = n.dropdownRender, C = n.dropdownAlign, b = n.getPopupContainer, x = n.empty, w = n.getTriggerDOMNode, B = n.onPopupVisibleChange, p = n.onPopupMouseEnter, E = wn(n, io), L = "".concat(r, "-dropdown"), H = i;
|
|
486
|
+
S && (H = S(i));
|
|
490
487
|
var q = o.useMemo(function() {
|
|
491
|
-
return g ||
|
|
492
|
-
}, [g, m]), _ = u ? "".concat(
|
|
493
|
-
return
|
|
494
|
-
}, [m,
|
|
495
|
-
|
|
488
|
+
return g || lo(m);
|
|
489
|
+
}, [g, m]), _ = u ? "".concat(L, "-").concat(u) : d, A = typeof m == "number", X = o.useMemo(function() {
|
|
490
|
+
return A ? null : m === !1 ? "minWidth" : "width";
|
|
491
|
+
}, [m, A]), Q = f;
|
|
492
|
+
A && (Q = ee(ee({}, Q), {}, {
|
|
496
493
|
width: m
|
|
497
494
|
}));
|
|
498
495
|
var G = o.useRef(null);
|
|
@@ -503,61 +500,61 @@ var fo = ["prefixCls", "disabled", "visible", "children", "popupElement", "anima
|
|
|
503
500
|
return (ne = G.current) === null || ne === void 0 ? void 0 : ne.popupElement;
|
|
504
501
|
}
|
|
505
502
|
};
|
|
506
|
-
}), /* @__PURE__ */ o.createElement(
|
|
507
|
-
showAction:
|
|
508
|
-
hideAction:
|
|
509
|
-
popupPlacement: c || (
|
|
503
|
+
}), /* @__PURE__ */ o.createElement(xr, on({}, E, {
|
|
504
|
+
showAction: B ? ["click"] : [],
|
|
505
|
+
hideAction: B ? ["click"] : [],
|
|
506
|
+
popupPlacement: c || (h === "rtl" ? "bottomRight" : "bottomLeft"),
|
|
510
507
|
builtinPlacements: q,
|
|
511
|
-
prefixCls:
|
|
508
|
+
prefixCls: L,
|
|
512
509
|
popupTransitionName: _,
|
|
513
510
|
popup: /* @__PURE__ */ o.createElement("div", {
|
|
514
511
|
onMouseEnter: p
|
|
515
|
-
},
|
|
512
|
+
}, H),
|
|
516
513
|
ref: G,
|
|
517
|
-
stretch:
|
|
518
|
-
popupAlign:
|
|
514
|
+
stretch: X,
|
|
515
|
+
popupAlign: C,
|
|
519
516
|
popupVisible: a,
|
|
520
|
-
getPopupContainer:
|
|
521
|
-
popupClassName:
|
|
517
|
+
getPopupContainer: b,
|
|
518
|
+
popupClassName: Be(v, ae({}, "".concat(L, "-empty"), x)),
|
|
522
519
|
popupStyle: Q,
|
|
523
|
-
getTriggerDOMNode:
|
|
524
|
-
onPopupVisibleChange:
|
|
525
|
-
}),
|
|
526
|
-
},
|
|
527
|
-
process.env.NODE_ENV !== "production" && (
|
|
528
|
-
function
|
|
520
|
+
getTriggerDOMNode: w,
|
|
521
|
+
onPopupVisibleChange: B
|
|
522
|
+
}), l);
|
|
523
|
+
}, Ut = /* @__PURE__ */ o.forwardRef(uo);
|
|
524
|
+
process.env.NODE_ENV !== "production" && (Ut.displayName = "SelectTrigger");
|
|
525
|
+
function It(e, n) {
|
|
529
526
|
var t = e.key, r;
|
|
530
527
|
return "value" in e && (r = e.value), t ?? (r !== void 0 ? r : "rc-index-key-".concat(n));
|
|
531
528
|
}
|
|
532
|
-
function
|
|
529
|
+
function Jn(e) {
|
|
533
530
|
return typeof e < "u" && !Number.isNaN(e);
|
|
534
531
|
}
|
|
535
|
-
function
|
|
536
|
-
var t = e || {}, r = t.label, a = t.value,
|
|
532
|
+
function Xt(e, n) {
|
|
533
|
+
var t = e || {}, r = t.label, a = t.value, l = t.options, i = t.groupLabel, u = r || (n ? "children" : "label");
|
|
537
534
|
return {
|
|
538
535
|
label: u,
|
|
539
536
|
value: a || "value",
|
|
540
|
-
options:
|
|
541
|
-
groupLabel:
|
|
537
|
+
options: l || "options",
|
|
538
|
+
groupLabel: i || u
|
|
542
539
|
};
|
|
543
540
|
}
|
|
544
|
-
function
|
|
545
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = n.fieldNames, r = n.childrenAsData, a = [],
|
|
546
|
-
function v(s,
|
|
541
|
+
function co(e) {
|
|
542
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = n.fieldNames, r = n.childrenAsData, a = [], l = Xt(t, !1), i = l.label, u = l.value, d = l.options, f = l.groupLabel;
|
|
543
|
+
function v(s, h) {
|
|
547
544
|
Array.isArray(s) && s.forEach(function(c) {
|
|
548
|
-
if (
|
|
545
|
+
if (h || !(d in c)) {
|
|
549
546
|
var g = c[u];
|
|
550
547
|
a.push({
|
|
551
|
-
key:
|
|
552
|
-
groupOption:
|
|
548
|
+
key: It(c, a.length),
|
|
549
|
+
groupOption: h,
|
|
553
550
|
data: c,
|
|
554
|
-
label: c[
|
|
551
|
+
label: c[i],
|
|
555
552
|
value: g
|
|
556
553
|
});
|
|
557
554
|
} else {
|
|
558
555
|
var m = c[f];
|
|
559
556
|
m === void 0 && r && (m = c.label), a.push({
|
|
560
|
-
key:
|
|
557
|
+
key: It(c, a.length),
|
|
561
558
|
group: !0,
|
|
562
559
|
data: c,
|
|
563
560
|
label: m
|
|
@@ -567,7 +564,7 @@ function go(e) {
|
|
|
567
564
|
}
|
|
568
565
|
return v(e, !1), a;
|
|
569
566
|
}
|
|
570
|
-
function
|
|
567
|
+
function kn(e) {
|
|
571
568
|
var n = ee({}, e);
|
|
572
569
|
return "props" in n || Object.defineProperty(n, "props", {
|
|
573
570
|
get: function() {
|
|
@@ -575,21 +572,21 @@ function et(e) {
|
|
|
575
572
|
}
|
|
576
573
|
}), n;
|
|
577
574
|
}
|
|
578
|
-
var
|
|
575
|
+
var so = function(n, t, r) {
|
|
579
576
|
if (!t || !t.length)
|
|
580
577
|
return null;
|
|
581
|
-
var a = !1,
|
|
582
|
-
var v =
|
|
578
|
+
var a = !1, l = function u(d, f) {
|
|
579
|
+
var v = hr(f), s = v[0], h = v.slice(1);
|
|
583
580
|
if (!s)
|
|
584
581
|
return [d];
|
|
585
582
|
var c = d.split(s);
|
|
586
583
|
return a = a || c.length > 1, c.reduce(function(g, m) {
|
|
587
|
-
return [].concat(
|
|
584
|
+
return [].concat(Ye(g), Ye(u(m, h)));
|
|
588
585
|
}, []).filter(Boolean);
|
|
589
|
-
},
|
|
590
|
-
return a ? typeof r < "u" ?
|
|
591
|
-
},
|
|
592
|
-
function
|
|
586
|
+
}, i = l(n, t);
|
|
587
|
+
return a ? typeof r < "u" ? i.slice(0, r) : i : null;
|
|
588
|
+
}, ut = /* @__PURE__ */ o.createContext(null);
|
|
589
|
+
function fo(e) {
|
|
593
590
|
var n = e.visible, t = e.values;
|
|
594
591
|
if (!n)
|
|
595
592
|
return null;
|
|
@@ -604,86 +601,86 @@ function ho(e) {
|
|
|
604
601
|
opacity: 0
|
|
605
602
|
}
|
|
606
603
|
}, "".concat(t.slice(0, r).map(function(a) {
|
|
607
|
-
var
|
|
608
|
-
return ["number", "string"].includes(pn(
|
|
604
|
+
var l = a.label, i = a.value;
|
|
605
|
+
return ["number", "string"].includes(pn(l)) ? l : i;
|
|
609
606
|
}).join(", ")), t.length > r ? ", ..." : null);
|
|
610
607
|
}
|
|
611
|
-
var
|
|
608
|
+
var mo = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "prefix", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"], vo = ["value", "onChange", "removeIcon", "placeholder", "autoFocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabIndex"], An = function(n) {
|
|
612
609
|
return n === "tags" || n === "multiple";
|
|
613
|
-
},
|
|
614
|
-
var t, r = e.id, a = e.prefixCls,
|
|
615
|
-
|
|
616
|
-
delete
|
|
610
|
+
}, Gt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
611
|
+
var t, r = e.id, a = e.prefixCls, l = e.className, i = e.showSearch, u = e.tagRender, d = e.direction, f = e.omitDomProps, v = e.displayValues, s = e.onDisplayValuesChange, h = e.emptyOptions, c = e.notFoundContent, g = c === void 0 ? "Not Found" : c, m = e.onClear, S = e.mode, C = e.disabled, b = e.loading, x = e.getInputElement, w = e.getRawInputElement, B = e.open, p = e.defaultOpen, E = e.onDropdownVisibleChange, L = e.activeValue, H = e.onActiveValueChange, q = e.activeDescendantId, _ = e.searchValue, A = e.autoClearSearchValue, X = e.onSearch, Q = e.onSearchSplit, G = e.tokenSeparators, j = e.allowClear, ne = e.prefix, Z = e.suffixIcon, Y = e.clearIcon, I = e.OptionList, D = e.animation, fe = e.transitionName, ie = e.dropdownStyle, J = e.dropdownClassName, se = e.dropdownMatchSelectWidth, ye = e.dropdownRender, ge = e.dropdownAlign, Re = e.placement, ce = e.builtinPlacements, pe = e.getPopupContainer, R = e.showAction, y = R === void 0 ? [] : R, $ = e.onFocus, K = e.onBlur, O = e.onKeyUp, F = e.onKeyDown, le = e.onMouseDown, me = wn(e, mo), re = An(S), Ce = (i !== void 0 ? i : re) || S === "combobox", Le = ee({}, me);
|
|
612
|
+
vo.forEach(function(ue) {
|
|
613
|
+
delete Le[ue];
|
|
617
614
|
}), f == null || f.forEach(function(ue) {
|
|
618
|
-
delete
|
|
615
|
+
delete Le[ue];
|
|
619
616
|
});
|
|
620
|
-
var xe = o.useState(!1), Ne = te(xe, 2), de = Ne[0],
|
|
617
|
+
var xe = o.useState(!1), Ne = te(xe, 2), de = Ne[0], Xe = Ne[1];
|
|
621
618
|
o.useEffect(function() {
|
|
622
|
-
|
|
619
|
+
Xe(Or());
|
|
623
620
|
}, []);
|
|
624
|
-
var
|
|
621
|
+
var Ge = o.useRef(null), Se = o.useRef(null), Me = o.useRef(null), we = o.useRef(null), Oe = o.useRef(null), Pe = o.useRef(!1), en = Gr(), Ae = te(en, 3), He = Ae[0], Ee = Ae[1], hn = Ae[2];
|
|
625
622
|
o.useImperativeHandle(n, function() {
|
|
626
|
-
var ue,
|
|
623
|
+
var ue, U;
|
|
627
624
|
return {
|
|
628
|
-
focus: (ue =
|
|
629
|
-
blur: (
|
|
630
|
-
scrollTo: function(
|
|
631
|
-
var
|
|
632
|
-
return (
|
|
625
|
+
focus: (ue = we.current) === null || ue === void 0 ? void 0 : ue.focus,
|
|
626
|
+
blur: (U = we.current) === null || U === void 0 ? void 0 : U.blur,
|
|
627
|
+
scrollTo: function(Ke) {
|
|
628
|
+
var Ve;
|
|
629
|
+
return (Ve = Oe.current) === null || Ve === void 0 ? void 0 : Ve.scrollTo(Ke);
|
|
633
630
|
},
|
|
634
|
-
nativeElement:
|
|
631
|
+
nativeElement: Ge.current || Se.current
|
|
635
632
|
};
|
|
636
633
|
});
|
|
637
634
|
var Fe = o.useMemo(function() {
|
|
638
635
|
var ue;
|
|
639
636
|
if (S !== "combobox")
|
|
640
637
|
return _;
|
|
641
|
-
var
|
|
642
|
-
return typeof
|
|
643
|
-
}, [_, S, v]), _e = S === "combobox" && typeof
|
|
644
|
-
|
|
638
|
+
var U = (ue = v[0]) === null || ue === void 0 ? void 0 : ue.value;
|
|
639
|
+
return typeof U == "string" || typeof U == "number" ? String(U) : "";
|
|
640
|
+
}, [_, S, v]), _e = S === "combobox" && typeof x == "function" && x() || null, $e = typeof w == "function" && w(), $n = br(Se, $e == null || (t = $e.props) === null || t === void 0 ? void 0 : t.ref), En = o.useState(!1), dn = te(En, 2), bn = dn[0], In = dn[1];
|
|
641
|
+
Mn(function() {
|
|
645
642
|
In(!0);
|
|
646
643
|
}, []);
|
|
647
|
-
var cn =
|
|
644
|
+
var cn = Qn(!1, {
|
|
648
645
|
defaultValue: p,
|
|
649
|
-
value:
|
|
650
|
-
}),
|
|
651
|
-
(
|
|
652
|
-
var an = vn ? !1 :
|
|
653
|
-
var
|
|
654
|
-
|
|
655
|
-
}, [
|
|
646
|
+
value: B
|
|
647
|
+
}), qe = te(cn, 2), fn = qe[0], mn = qe[1], De = bn ? fn : !1, vn = !g && h;
|
|
648
|
+
(C || vn && De && S === "combobox") && (De = !1);
|
|
649
|
+
var an = vn ? !1 : De, N = o.useCallback(function(ue) {
|
|
650
|
+
var U = ue !== void 0 ? ue : !De;
|
|
651
|
+
C || (mn(U), De !== U && (E == null || E(U)));
|
|
652
|
+
}, [C, De, mn, E]), z = o.useMemo(function() {
|
|
656
653
|
return (G || []).some(function(ue) {
|
|
657
654
|
return [`
|
|
658
655
|
`, `\r
|
|
659
656
|
`].includes(ue);
|
|
660
657
|
});
|
|
661
|
-
}, [G]),
|
|
662
|
-
if (!(re &&
|
|
663
|
-
var
|
|
664
|
-
|
|
665
|
-
var sn =
|
|
666
|
-
return S !== "combobox" && ln && (ze = "", Q == null || Q(ln), N(!1),
|
|
667
|
-
source:
|
|
668
|
-
}),
|
|
658
|
+
}, [G]), T = o.useContext(ut) || {}, V = T.maxCount, oe = T.rawValues, be = function(U, We, Ke) {
|
|
659
|
+
if (!(re && Jn(V) && (oe == null ? void 0 : oe.size) >= V)) {
|
|
660
|
+
var Ve = !0, ze = U;
|
|
661
|
+
H == null || H(null);
|
|
662
|
+
var sn = so(U, G, Jn(V) ? V - oe.size : void 0), ln = Ke ? null : sn;
|
|
663
|
+
return S !== "combobox" && ln && (ze = "", Q == null || Q(ln), N(!1), Ve = !1), X && Fe !== ze && X(ze, {
|
|
664
|
+
source: We ? "typing" : "effect"
|
|
665
|
+
}), Ve;
|
|
669
666
|
}
|
|
670
|
-
},
|
|
671
|
-
!
|
|
667
|
+
}, Qe = function(U) {
|
|
668
|
+
!U || !U.trim() || X(U, {
|
|
672
669
|
source: "submit"
|
|
673
670
|
});
|
|
674
671
|
};
|
|
675
672
|
o.useEffect(function() {
|
|
676
|
-
!
|
|
677
|
-
}, [
|
|
678
|
-
fn &&
|
|
679
|
-
}, [
|
|
680
|
-
var
|
|
681
|
-
var
|
|
682
|
-
if (
|
|
683
|
-
for (var ze =
|
|
684
|
-
var
|
|
685
|
-
if (!
|
|
686
|
-
ze.splice(ln, 1), sn =
|
|
673
|
+
!De && !re && S !== "combobox" && be("", !1, !1);
|
|
674
|
+
}, [De]), o.useEffect(function() {
|
|
675
|
+
fn && C && mn(!1), C && !Pe.current && Ee(!1);
|
|
676
|
+
}, [C]);
|
|
677
|
+
var je = jt(), nn = te(je, 2), Ie = nn[0], tn = nn[1], Ze = o.useRef(!1), Nn = function(U) {
|
|
678
|
+
var We = Ie(), Ke = U.key, Ve = Ke === "Enter";
|
|
679
|
+
if (Ve && (S !== "combobox" && U.preventDefault(), De || N(!0)), tn(!!Fe), Ke === "Backspace" && !We && re && !Fe && v.length) {
|
|
680
|
+
for (var ze = Ye(v), sn = null, ln = ze.length - 1; ln >= 0; ln -= 1) {
|
|
681
|
+
var Cn = ze[ln];
|
|
682
|
+
if (!Cn.disabled) {
|
|
683
|
+
ze.splice(ln, 1), sn = Cn;
|
|
687
684
|
break;
|
|
688
685
|
}
|
|
689
686
|
}
|
|
@@ -692,39 +689,39 @@ var bo = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
|
|
|
692
689
|
values: [sn]
|
|
693
690
|
});
|
|
694
691
|
}
|
|
695
|
-
for (var
|
|
696
|
-
|
|
697
|
-
if (
|
|
698
|
-
var
|
|
699
|
-
|
|
692
|
+
for (var On = arguments.length, yn = new Array(On > 1 ? On - 1 : 0), Ln = 1; Ln < On; Ln++)
|
|
693
|
+
yn[Ln - 1] = arguments[Ln];
|
|
694
|
+
if (De && (!Ve || !Ze.current)) {
|
|
695
|
+
var Bn;
|
|
696
|
+
Ve && (Ze.current = !0), (Bn = Oe.current) === null || Bn === void 0 || Bn.onKeyDown.apply(Bn, [U].concat(yn));
|
|
700
697
|
}
|
|
701
|
-
|
|
702
|
-
},
|
|
703
|
-
for (var
|
|
704
|
-
|
|
705
|
-
if (
|
|
698
|
+
F == null || F.apply(void 0, [U].concat(yn));
|
|
699
|
+
}, Vn = function(U) {
|
|
700
|
+
for (var We = arguments.length, Ke = new Array(We > 1 ? We - 1 : 0), Ve = 1; Ve < We; Ve++)
|
|
701
|
+
Ke[Ve - 1] = arguments[Ve];
|
|
702
|
+
if (De) {
|
|
706
703
|
var ze;
|
|
707
|
-
(ze =
|
|
704
|
+
(ze = Oe.current) === null || ze === void 0 || ze.onKeyUp.apply(ze, [U].concat(Ke));
|
|
708
705
|
}
|
|
709
|
-
|
|
710
|
-
}, rn = function(
|
|
711
|
-
var
|
|
712
|
-
return
|
|
706
|
+
U.key === "Enter" && (Ze.current = !1), O == null || O.apply(void 0, [U].concat(Ke));
|
|
707
|
+
}, rn = function(U) {
|
|
708
|
+
var We = v.filter(function(Ke) {
|
|
709
|
+
return Ke !== U;
|
|
713
710
|
});
|
|
714
|
-
s(
|
|
711
|
+
s(We, {
|
|
715
712
|
type: "remove",
|
|
716
|
-
values: [
|
|
713
|
+
values: [U]
|
|
717
714
|
});
|
|
718
|
-
},
|
|
719
|
-
|
|
720
|
-
}, P = o.useRef(!1),
|
|
721
|
-
Ee(!0),
|
|
715
|
+
}, Je = function() {
|
|
716
|
+
Ze.current = !1;
|
|
717
|
+
}, P = o.useRef(!1), M = function() {
|
|
718
|
+
Ee(!0), C || ($ && !P.current && $.apply(void 0, arguments), y.includes("focus") && N(!0)), P.current = !0;
|
|
722
719
|
}, k = function() {
|
|
723
720
|
Pe.current = !0, Ee(!1, function() {
|
|
724
721
|
P.current = !1, Pe.current = !1, N(!1);
|
|
725
|
-
}), !
|
|
722
|
+
}), !C && (Fe && (S === "tags" ? X(Fe, {
|
|
726
723
|
source: "submit"
|
|
727
|
-
}) : S === "multiple" &&
|
|
724
|
+
}) : S === "multiple" && X("", {
|
|
728
725
|
source: "blur"
|
|
729
726
|
})), K && K.apply(void 0, arguments));
|
|
730
727
|
}, ve = [];
|
|
@@ -735,142 +732,142 @@ var bo = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
|
|
|
735
732
|
}), ve.splice(0, ve.length);
|
|
736
733
|
};
|
|
737
734
|
}, []);
|
|
738
|
-
var Te = function(
|
|
739
|
-
var
|
|
740
|
-
if (
|
|
735
|
+
var Te = function(U) {
|
|
736
|
+
var We, Ke = U.target, Ve = (We = Me.current) === null || We === void 0 ? void 0 : We.getPopupElement();
|
|
737
|
+
if (Ve && Ve.contains(Ke)) {
|
|
741
738
|
var ze = setTimeout(function() {
|
|
742
|
-
var
|
|
743
|
-
if (
|
|
744
|
-
var
|
|
745
|
-
(
|
|
739
|
+
var On = ve.indexOf(ze);
|
|
740
|
+
if (On !== -1 && ve.splice(On, 1), hn(), !de && !Ve.contains(document.activeElement)) {
|
|
741
|
+
var yn;
|
|
742
|
+
(yn = we.current) === null || yn === void 0 || yn.focus();
|
|
746
743
|
}
|
|
747
744
|
});
|
|
748
745
|
ve.push(ze);
|
|
749
746
|
}
|
|
750
|
-
for (var sn = arguments.length, ln = new Array(sn > 1 ? sn - 1 : 0),
|
|
751
|
-
ln[
|
|
752
|
-
le == null || le.apply(void 0, [
|
|
747
|
+
for (var sn = arguments.length, ln = new Array(sn > 1 ? sn - 1 : 0), Cn = 1; Cn < sn; Cn++)
|
|
748
|
+
ln[Cn - 1] = arguments[Cn];
|
|
749
|
+
le == null || le.apply(void 0, [U].concat(ln));
|
|
753
750
|
}, xn = o.useState({}), Sn = te(xn, 2), Wn = Sn[1];
|
|
754
751
|
function Kn() {
|
|
755
752
|
Wn({});
|
|
756
753
|
}
|
|
757
|
-
var
|
|
758
|
-
|
|
759
|
-
N(
|
|
760
|
-
}),
|
|
754
|
+
var Pn;
|
|
755
|
+
$e && (Pn = function(U) {
|
|
756
|
+
N(U);
|
|
757
|
+
}), Yr(function() {
|
|
761
758
|
var ue;
|
|
762
|
-
return [
|
|
763
|
-
}, an, N,
|
|
764
|
-
var
|
|
759
|
+
return [Ge.current, (ue = Me.current) === null || ue === void 0 ? void 0 : ue.getPopupElement()];
|
|
760
|
+
}, an, N, !!$e);
|
|
761
|
+
var _n = o.useMemo(function() {
|
|
765
762
|
return ee(ee({}, e), {}, {
|
|
766
763
|
notFoundContent: g,
|
|
767
|
-
open:
|
|
764
|
+
open: De,
|
|
768
765
|
triggerOpen: an,
|
|
769
766
|
id: r,
|
|
770
|
-
showSearch:
|
|
767
|
+
showSearch: Ce,
|
|
771
768
|
multiple: re,
|
|
772
769
|
toggleOpen: N
|
|
773
770
|
});
|
|
774
|
-
}, [e, g, an,
|
|
775
|
-
|
|
776
|
-
className:
|
|
771
|
+
}, [e, g, an, De, r, Ce, re, N]), mt = !!Z || b, vt;
|
|
772
|
+
mt && (vt = /* @__PURE__ */ o.createElement(jn, {
|
|
773
|
+
className: Be("".concat(a, "-arrow"), ae({}, "".concat(a, "-arrow-loading"), b)),
|
|
777
774
|
customizeIcon: Z,
|
|
778
775
|
customizeIconProps: {
|
|
779
|
-
loading:
|
|
776
|
+
loading: b,
|
|
780
777
|
searchValue: Fe,
|
|
781
|
-
open:
|
|
782
|
-
focused:
|
|
783
|
-
showSearch:
|
|
778
|
+
open: De,
|
|
779
|
+
focused: He,
|
|
780
|
+
showSearch: Ce
|
|
784
781
|
}
|
|
785
782
|
}));
|
|
786
|
-
var
|
|
787
|
-
var
|
|
788
|
-
m == null || m(), (
|
|
783
|
+
var lr = function() {
|
|
784
|
+
var U;
|
|
785
|
+
m == null || m(), (U = we.current) === null || U === void 0 || U.focus(), s([], {
|
|
789
786
|
type: "clear",
|
|
790
787
|
values: v
|
|
791
788
|
}), be("", !1, !1);
|
|
792
|
-
},
|
|
793
|
-
ref:
|
|
794
|
-
}),
|
|
795
|
-
ref:
|
|
796
|
-
disabled:
|
|
789
|
+
}, gt = Ur(a, lr, v, j, Y, C, Fe, S), ur = gt.allowClear, cr = gt.clearIcon, sr = /* @__PURE__ */ o.createElement(I, {
|
|
790
|
+
ref: Oe
|
|
791
|
+
}), dr = Be(a, l, ae(ae(ae(ae(ae(ae(ae(ae(ae(ae({}, "".concat(a, "-focused"), He), "".concat(a, "-multiple"), re), "".concat(a, "-single"), !re), "".concat(a, "-allow-clear"), j), "".concat(a, "-show-arrow"), mt), "".concat(a, "-disabled"), C), "".concat(a, "-loading"), b), "".concat(a, "-open"), De), "".concat(a, "-customize-input"), _e), "".concat(a, "-show-search"), Ce)), pt = /* @__PURE__ */ o.createElement(Ut, {
|
|
792
|
+
ref: Me,
|
|
793
|
+
disabled: C,
|
|
797
794
|
prefixCls: a,
|
|
798
795
|
visible: an,
|
|
799
|
-
popupElement:
|
|
800
|
-
animation:
|
|
796
|
+
popupElement: sr,
|
|
797
|
+
animation: D,
|
|
801
798
|
transitionName: fe,
|
|
802
799
|
dropdownStyle: ie,
|
|
803
800
|
dropdownClassName: J,
|
|
804
801
|
direction: d,
|
|
805
802
|
dropdownMatchSelectWidth: se,
|
|
806
|
-
dropdownRender:
|
|
803
|
+
dropdownRender: ye,
|
|
807
804
|
dropdownAlign: ge,
|
|
808
|
-
placement:
|
|
805
|
+
placement: Re,
|
|
809
806
|
builtinPlacements: ce,
|
|
810
807
|
getPopupContainer: pe,
|
|
811
|
-
empty:
|
|
812
|
-
getTriggerDOMNode: function(
|
|
808
|
+
empty: h,
|
|
809
|
+
getTriggerDOMNode: function(U) {
|
|
813
810
|
return (
|
|
814
811
|
// TODO: This is workaround and should be removed in `rc-select`
|
|
815
812
|
// And use new standard `nativeElement` for ref.
|
|
816
813
|
// But we should update `rc-resize-observer` first.
|
|
817
|
-
Se.current ||
|
|
814
|
+
Se.current || U
|
|
818
815
|
);
|
|
819
816
|
},
|
|
820
|
-
onPopupVisibleChange:
|
|
817
|
+
onPopupVisibleChange: Pn,
|
|
821
818
|
onPopupMouseEnter: Kn
|
|
822
|
-
},
|
|
823
|
-
ref:
|
|
824
|
-
}) : /* @__PURE__ */ o.createElement(
|
|
819
|
+
}, $e ? /* @__PURE__ */ o.cloneElement($e, {
|
|
820
|
+
ref: $n
|
|
821
|
+
}) : /* @__PURE__ */ o.createElement(Kt, on({}, e, {
|
|
825
822
|
domRef: Se,
|
|
826
823
|
prefixCls: a,
|
|
827
824
|
inputElement: _e,
|
|
828
|
-
ref:
|
|
825
|
+
ref: we,
|
|
829
826
|
id: r,
|
|
830
827
|
prefix: ne,
|
|
831
|
-
showSearch:
|
|
832
|
-
autoClearSearchValue:
|
|
828
|
+
showSearch: Ce,
|
|
829
|
+
autoClearSearchValue: A,
|
|
833
830
|
mode: S,
|
|
834
831
|
activeDescendantId: q,
|
|
835
832
|
tagRender: u,
|
|
836
833
|
values: v,
|
|
837
|
-
open:
|
|
834
|
+
open: De,
|
|
838
835
|
onToggleOpen: N,
|
|
839
|
-
activeValue:
|
|
836
|
+
activeValue: L,
|
|
840
837
|
searchValue: Fe,
|
|
841
838
|
onSearch: be,
|
|
842
|
-
onSearchSubmit:
|
|
839
|
+
onSearchSubmit: Qe,
|
|
843
840
|
onRemove: rn,
|
|
844
|
-
tokenWithEnter:
|
|
845
|
-
onInputBlur:
|
|
846
|
-
}))),
|
|
847
|
-
return
|
|
848
|
-
className:
|
|
849
|
-
},
|
|
850
|
-
ref:
|
|
841
|
+
tokenWithEnter: z,
|
|
842
|
+
onInputBlur: Je
|
|
843
|
+
}))), Un;
|
|
844
|
+
return $e ? Un = pt : Un = /* @__PURE__ */ o.createElement("div", on({
|
|
845
|
+
className: dr
|
|
846
|
+
}, Le, {
|
|
847
|
+
ref: Ge,
|
|
851
848
|
onMouseDown: Te,
|
|
852
|
-
onKeyDown:
|
|
853
|
-
onKeyUp:
|
|
854
|
-
onFocus:
|
|
849
|
+
onKeyDown: Nn,
|
|
850
|
+
onKeyUp: Vn,
|
|
851
|
+
onFocus: M,
|
|
855
852
|
onBlur: k
|
|
856
|
-
}), /* @__PURE__ */ o.createElement(
|
|
857
|
-
visible:
|
|
853
|
+
}), /* @__PURE__ */ o.createElement(fo, {
|
|
854
|
+
visible: He && !De,
|
|
858
855
|
values: v
|
|
859
|
-
}),
|
|
860
|
-
value:
|
|
861
|
-
},
|
|
856
|
+
}), pt, vt, ur && cr), /* @__PURE__ */ o.createElement(At.Provider, {
|
|
857
|
+
value: _n
|
|
858
|
+
}, Un);
|
|
862
859
|
});
|
|
863
|
-
process.env.NODE_ENV !== "production" && (
|
|
864
|
-
var
|
|
860
|
+
process.env.NODE_ENV !== "production" && (Gt.displayName = "BaseSelect");
|
|
861
|
+
var ct = function() {
|
|
865
862
|
return null;
|
|
866
863
|
};
|
|
867
|
-
|
|
868
|
-
var
|
|
864
|
+
ct.isSelectOptGroup = !0;
|
|
865
|
+
var st = function() {
|
|
869
866
|
return null;
|
|
870
867
|
};
|
|
871
|
-
|
|
872
|
-
var
|
|
873
|
-
var t = e.height, r = e.offsetY, a = e.offsetX,
|
|
868
|
+
st.isSelectOption = !0;
|
|
869
|
+
var Yt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
870
|
+
var t = e.height, r = e.offsetY, a = e.offsetX, l = e.children, i = e.prefixCls, u = e.onInnerResize, d = e.innerProps, f = e.rtl, v = e.extra, s = {}, h = {
|
|
874
871
|
display: "flex",
|
|
875
872
|
flexDirection: "column"
|
|
876
873
|
};
|
|
@@ -878,23 +875,23 @@ var Qt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
|
878
875
|
height: t,
|
|
879
876
|
position: "relative",
|
|
880
877
|
overflow: "hidden"
|
|
881
|
-
},
|
|
878
|
+
}, h = ee(ee({}, h), {}, ae(ae(ae(ae(ae({
|
|
882
879
|
transform: "translateY(".concat(r, "px)")
|
|
883
880
|
}, f ? "marginRight" : "marginLeft", -a), "position", "absolute"), "left", 0), "right", 0), "top", 0))), /* @__PURE__ */ o.createElement("div", {
|
|
884
881
|
style: s
|
|
885
|
-
}, /* @__PURE__ */ o.createElement(
|
|
882
|
+
}, /* @__PURE__ */ o.createElement(Ft, {
|
|
886
883
|
onResize: function(g) {
|
|
887
884
|
var m = g.offsetHeight;
|
|
888
885
|
m && u && u();
|
|
889
886
|
}
|
|
890
887
|
}, /* @__PURE__ */ o.createElement("div", on({
|
|
891
|
-
style:
|
|
892
|
-
className:
|
|
888
|
+
style: h,
|
|
889
|
+
className: Be(ae({}, "".concat(i, "-holder-inner"), i)),
|
|
893
890
|
ref: n
|
|
894
|
-
}, d),
|
|
891
|
+
}, d), l, v)));
|
|
895
892
|
});
|
|
896
|
-
|
|
897
|
-
function
|
|
893
|
+
Yt.displayName = "Filler";
|
|
894
|
+
function go(e) {
|
|
898
895
|
var n = e.children, t = e.setRef, r = o.useCallback(function(a) {
|
|
899
896
|
t(a);
|
|
900
897
|
}, []);
|
|
@@ -902,38 +899,38 @@ function wo(e) {
|
|
|
902
899
|
ref: r
|
|
903
900
|
});
|
|
904
901
|
}
|
|
905
|
-
function
|
|
902
|
+
function po(e, n, t, r, a, l, i, u) {
|
|
906
903
|
var d = u.getKey;
|
|
907
904
|
return e.slice(n, t + 1).map(function(f, v) {
|
|
908
|
-
var s = n + v,
|
|
905
|
+
var s = n + v, h = i(f, s, {
|
|
909
906
|
style: {
|
|
910
907
|
width: r
|
|
911
908
|
},
|
|
912
909
|
offsetX: a
|
|
913
910
|
}), c = d(f);
|
|
914
|
-
return /* @__PURE__ */ o.createElement(
|
|
911
|
+
return /* @__PURE__ */ o.createElement(go, {
|
|
915
912
|
key: c,
|
|
916
913
|
setRef: function(m) {
|
|
917
|
-
return
|
|
914
|
+
return l(f, m);
|
|
918
915
|
}
|
|
919
|
-
},
|
|
916
|
+
}, h);
|
|
920
917
|
});
|
|
921
918
|
}
|
|
922
|
-
function
|
|
923
|
-
var r = e.length, a = n.length,
|
|
919
|
+
function ho(e, n, t) {
|
|
920
|
+
var r = e.length, a = n.length, l, i;
|
|
924
921
|
if (r === 0 && a === 0)
|
|
925
922
|
return null;
|
|
926
|
-
r < a ? (
|
|
923
|
+
r < a ? (l = e, i = n) : (l = n, i = e);
|
|
927
924
|
var u = {
|
|
928
925
|
__EMPTY_ITEM__: !0
|
|
929
926
|
};
|
|
930
927
|
function d(g) {
|
|
931
928
|
return g !== void 0 ? t(g) : u;
|
|
932
929
|
}
|
|
933
|
-
for (var f = null, v = Math.abs(r - a) !== 1, s = 0; s <
|
|
934
|
-
var
|
|
935
|
-
if (
|
|
936
|
-
f = s, v = v ||
|
|
930
|
+
for (var f = null, v = Math.abs(r - a) !== 1, s = 0; s < i.length; s += 1) {
|
|
931
|
+
var h = d(l[s]), c = d(i[s]);
|
|
932
|
+
if (h !== c) {
|
|
933
|
+
f = s, v = v || h !== d(i[s + 1]);
|
|
937
934
|
break;
|
|
938
935
|
}
|
|
939
936
|
}
|
|
@@ -942,18 +939,18 @@ function yo(e, n, t) {
|
|
|
942
939
|
multiple: v
|
|
943
940
|
};
|
|
944
941
|
}
|
|
945
|
-
function
|
|
946
|
-
var r = o.useState(e), a = te(r, 2),
|
|
942
|
+
function bo(e, n, t) {
|
|
943
|
+
var r = o.useState(e), a = te(r, 2), l = a[0], i = a[1], u = o.useState(null), d = te(u, 2), f = d[0], v = d[1];
|
|
947
944
|
return o.useEffect(function() {
|
|
948
|
-
var s =
|
|
949
|
-
(s == null ? void 0 : s.index) !== void 0 && v(e[s.index]),
|
|
945
|
+
var s = ho(l || [], e, n);
|
|
946
|
+
(s == null ? void 0 : s.index) !== void 0 && v(e[s.index]), i(e);
|
|
950
947
|
}, [e]), [f];
|
|
951
948
|
}
|
|
952
|
-
var
|
|
953
|
-
const
|
|
954
|
-
var a = he(!1),
|
|
955
|
-
function
|
|
956
|
-
clearTimeout(
|
|
949
|
+
var xt = (typeof navigator > "u" ? "undefined" : pn(navigator)) === "object" && /Firefox/i.test(navigator.userAgent);
|
|
950
|
+
const qt = function(e, n, t, r) {
|
|
951
|
+
var a = he(!1), l = he(null);
|
|
952
|
+
function i() {
|
|
953
|
+
clearTimeout(l.current), a.current = !0, l.current = setTimeout(function() {
|
|
957
954
|
a.current = !1;
|
|
958
955
|
}, 50);
|
|
959
956
|
}
|
|
@@ -970,69 +967,69 @@ const Zt = function(e, n, t, r) {
|
|
|
970
967
|
f > 0 && u.current.right
|
|
971
968
|
) : f < 0 && u.current.top || // Pass origin wheel when on the bottom
|
|
972
969
|
f > 0 && u.current.bottom;
|
|
973
|
-
return v && s ? (clearTimeout(
|
|
970
|
+
return v && s ? (clearTimeout(l.current), a.current = !1) : (!s || a.current) && i(), !a.current && s;
|
|
974
971
|
};
|
|
975
972
|
};
|
|
976
|
-
function
|
|
977
|
-
var u = he(0), d = he(null), f = he(null), v = he(!1), s =
|
|
978
|
-
function b
|
|
979
|
-
if (un.cancel(d.current), !s(!1,
|
|
980
|
-
var
|
|
981
|
-
if (!
|
|
982
|
-
|
|
973
|
+
function So(e, n, t, r, a, l, i) {
|
|
974
|
+
var u = he(0), d = he(null), f = he(null), v = he(!1), s = qt(n, t, r, a);
|
|
975
|
+
function h(b, x) {
|
|
976
|
+
if (un.cancel(d.current), !s(!1, x)) {
|
|
977
|
+
var w = b;
|
|
978
|
+
if (!w._virtualHandled)
|
|
979
|
+
w._virtualHandled = !0;
|
|
983
980
|
else
|
|
984
981
|
return;
|
|
985
|
-
u.current +=
|
|
986
|
-
var
|
|
987
|
-
|
|
982
|
+
u.current += x, f.current = x, xt || w.preventDefault(), d.current = un(function() {
|
|
983
|
+
var B = v.current ? 10 : 1;
|
|
984
|
+
i(u.current * B, !1), u.current = 0;
|
|
988
985
|
});
|
|
989
986
|
}
|
|
990
987
|
}
|
|
991
|
-
function c(
|
|
992
|
-
|
|
988
|
+
function c(b, x) {
|
|
989
|
+
i(x, !0), xt || b.preventDefault();
|
|
993
990
|
}
|
|
994
991
|
var g = he(null), m = he(null);
|
|
995
|
-
function S(
|
|
992
|
+
function S(b) {
|
|
996
993
|
if (e) {
|
|
997
994
|
un.cancel(m.current), m.current = un(function() {
|
|
998
995
|
g.current = null;
|
|
999
996
|
}, 2);
|
|
1000
|
-
var
|
|
1001
|
-
(g.current === "sx" || !g.current &&
|
|
1002
|
-
var
|
|
1003
|
-
g.current === null && (g.current =
|
|
997
|
+
var x = b.deltaX, w = b.deltaY, B = b.shiftKey, p = x, E = w;
|
|
998
|
+
(g.current === "sx" || !g.current && B && w && !x) && (p = w, E = 0, g.current = "sx");
|
|
999
|
+
var L = Math.abs(p), H = Math.abs(E);
|
|
1000
|
+
g.current === null && (g.current = l && L > H ? "x" : "y"), g.current === "y" ? h(b, E) : c(b, p);
|
|
1004
1001
|
}
|
|
1005
1002
|
}
|
|
1006
|
-
function
|
|
1007
|
-
e && (v.current =
|
|
1003
|
+
function C(b) {
|
|
1004
|
+
e && (v.current = b.detail === f.current);
|
|
1008
1005
|
}
|
|
1009
|
-
return [S,
|
|
1006
|
+
return [S, C];
|
|
1010
1007
|
}
|
|
1011
|
-
function
|
|
1008
|
+
function Co(e, n, t, r) {
|
|
1012
1009
|
var a = o.useMemo(function() {
|
|
1013
1010
|
return [/* @__PURE__ */ new Map(), []];
|
|
1014
|
-
}, [e, t.id, r]),
|
|
1015
|
-
var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : v,
|
|
1016
|
-
if (
|
|
1011
|
+
}, [e, t.id, r]), l = te(a, 2), i = l[0], u = l[1], d = function(v) {
|
|
1012
|
+
var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : v, h = i.get(v), c = i.get(s);
|
|
1013
|
+
if (h === void 0 || c === void 0)
|
|
1017
1014
|
for (var g = e.length, m = u.length; m < g; m += 1) {
|
|
1018
|
-
var S,
|
|
1019
|
-
|
|
1020
|
-
var
|
|
1021
|
-
if (u[m] = (u[m - 1] || 0) +
|
|
1015
|
+
var S, C = e[m], b = n(C);
|
|
1016
|
+
i.set(b, m);
|
|
1017
|
+
var x = (S = t.get(b)) !== null && S !== void 0 ? S : r;
|
|
1018
|
+
if (u[m] = (u[m - 1] || 0) + x, b === v && (h = m), b === s && (c = m), h !== void 0 && c !== void 0)
|
|
1022
1019
|
break;
|
|
1023
1020
|
}
|
|
1024
1021
|
return {
|
|
1025
|
-
top: u[
|
|
1022
|
+
top: u[h - 1] || 0,
|
|
1026
1023
|
bottom: u[c]
|
|
1027
1024
|
};
|
|
1028
1025
|
};
|
|
1029
1026
|
return d;
|
|
1030
1027
|
}
|
|
1031
|
-
var
|
|
1028
|
+
var yo = /* @__PURE__ */ function() {
|
|
1032
1029
|
function e() {
|
|
1033
|
-
|
|
1030
|
+
Cr(this, e), ae(this, "maps", void 0), ae(this, "id", 0), ae(this, "diffKeys", /* @__PURE__ */ new Set()), this.maps = /* @__PURE__ */ Object.create(null);
|
|
1034
1031
|
}
|
|
1035
|
-
return
|
|
1032
|
+
return Sr(e, [{
|
|
1036
1033
|
key: "set",
|
|
1037
1034
|
value: function(t, r) {
|
|
1038
1035
|
this.maps[t] = r, this.id += 1, this.diffKeys.add(t);
|
|
@@ -1058,12 +1055,12 @@ var Ro = /* @__PURE__ */ function() {
|
|
|
1058
1055
|
}
|
|
1059
1056
|
}]), e;
|
|
1060
1057
|
}();
|
|
1061
|
-
function
|
|
1058
|
+
function Ot(e) {
|
|
1062
1059
|
var n = parseFloat(e);
|
|
1063
1060
|
return isNaN(n) ? 0 : n;
|
|
1064
1061
|
}
|
|
1065
|
-
function
|
|
1066
|
-
var r = o.useState(0), a = te(r, 2),
|
|
1062
|
+
function wo(e, n, t) {
|
|
1063
|
+
var r = o.useState(0), a = te(r, 2), l = a[0], i = a[1], u = he(/* @__PURE__ */ new Map()), d = he(new yo()), f = he(0);
|
|
1067
1064
|
function v() {
|
|
1068
1065
|
f.current += 1;
|
|
1069
1066
|
}
|
|
@@ -1071,14 +1068,14 @@ function Oo(e, n, t) {
|
|
|
1071
1068
|
var c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
1072
1069
|
v();
|
|
1073
1070
|
var g = function() {
|
|
1074
|
-
var
|
|
1075
|
-
u.current.forEach(function(
|
|
1076
|
-
if (
|
|
1077
|
-
var
|
|
1078
|
-
d.current.get(
|
|
1071
|
+
var C = !1;
|
|
1072
|
+
u.current.forEach(function(b, x) {
|
|
1073
|
+
if (b && b.offsetParent) {
|
|
1074
|
+
var w = yr(b), B = w.offsetHeight, p = getComputedStyle(w), E = p.marginTop, L = p.marginBottom, H = Ot(E), q = Ot(L), _ = B + H + q;
|
|
1075
|
+
d.current.get(x) !== _ && (d.current.set(x, _), C = !0);
|
|
1079
1076
|
}
|
|
1080
|
-
}),
|
|
1081
|
-
return
|
|
1077
|
+
}), C && i(function(b) {
|
|
1078
|
+
return b + 1;
|
|
1082
1079
|
});
|
|
1083
1080
|
};
|
|
1084
1081
|
if (c)
|
|
@@ -1091,63 +1088,63 @@ function Oo(e, n, t) {
|
|
|
1091
1088
|
});
|
|
1092
1089
|
}
|
|
1093
1090
|
}
|
|
1094
|
-
function
|
|
1091
|
+
function h(c, g) {
|
|
1095
1092
|
var m = e(c);
|
|
1096
1093
|
u.current.get(m), g ? (u.current.set(m, g), s()) : u.current.delete(m);
|
|
1097
1094
|
}
|
|
1098
|
-
return
|
|
1095
|
+
return Yn(function() {
|
|
1099
1096
|
return v;
|
|
1100
|
-
}, []), [
|
|
1097
|
+
}, []), [h, s, d.current, l];
|
|
1101
1098
|
}
|
|
1102
|
-
var
|
|
1103
|
-
function
|
|
1104
|
-
var r = he(!1), a = he(0),
|
|
1099
|
+
var Rt = 14 / 15;
|
|
1100
|
+
function Eo(e, n, t) {
|
|
1101
|
+
var r = he(!1), a = he(0), l = he(0), i = he(null), u = he(null), d, f = function(c) {
|
|
1105
1102
|
if (r.current) {
|
|
1106
|
-
var g = Math.ceil(c.touches[0].pageX), m = Math.ceil(c.touches[0].pageY), S = a.current - g,
|
|
1107
|
-
|
|
1108
|
-
var
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
var
|
|
1112
|
-
(!t(
|
|
1103
|
+
var g = Math.ceil(c.touches[0].pageX), m = Math.ceil(c.touches[0].pageY), S = a.current - g, C = l.current - m, b = Math.abs(S) > Math.abs(C);
|
|
1104
|
+
b ? a.current = g : l.current = m;
|
|
1105
|
+
var x = t(b, b ? S : C, !1, c);
|
|
1106
|
+
x && c.preventDefault(), clearInterval(u.current), x && (u.current = setInterval(function() {
|
|
1107
|
+
b ? S *= Rt : C *= Rt;
|
|
1108
|
+
var w = Math.floor(b ? S : C);
|
|
1109
|
+
(!t(b, w, !0) || Math.abs(w) <= 0.1) && clearInterval(u.current);
|
|
1113
1110
|
}, 16));
|
|
1114
1111
|
}
|
|
1115
1112
|
}, v = function() {
|
|
1116
1113
|
r.current = !1, d();
|
|
1117
1114
|
}, s = function(c) {
|
|
1118
|
-
d(), c.touches.length === 1 && !r.current && (r.current = !0, a.current = Math.ceil(c.touches[0].pageX),
|
|
1115
|
+
d(), c.touches.length === 1 && !r.current && (r.current = !0, a.current = Math.ceil(c.touches[0].pageX), l.current = Math.ceil(c.touches[0].pageY), i.current = c.target, i.current.addEventListener("touchmove", f, {
|
|
1119
1116
|
passive: !1
|
|
1120
|
-
}),
|
|
1117
|
+
}), i.current.addEventListener("touchend", v, {
|
|
1121
1118
|
passive: !0
|
|
1122
1119
|
}));
|
|
1123
1120
|
};
|
|
1124
1121
|
d = function() {
|
|
1125
|
-
|
|
1126
|
-
},
|
|
1122
|
+
i.current && (i.current.removeEventListener("touchmove", f), i.current.removeEventListener("touchend", v));
|
|
1123
|
+
}, Mn(function() {
|
|
1127
1124
|
return e && n.current.addEventListener("touchstart", s, {
|
|
1128
1125
|
passive: !0
|
|
1129
1126
|
}), function() {
|
|
1130
|
-
var
|
|
1131
|
-
(
|
|
1127
|
+
var h;
|
|
1128
|
+
(h = n.current) === null || h === void 0 || h.removeEventListener("touchstart", s), d(), clearInterval(u.current);
|
|
1132
1129
|
};
|
|
1133
1130
|
}, [e]);
|
|
1134
1131
|
}
|
|
1135
|
-
function
|
|
1132
|
+
function Mt(e) {
|
|
1136
1133
|
return Math.floor(Math.pow(e, 0.5));
|
|
1137
1134
|
}
|
|
1138
|
-
function
|
|
1135
|
+
function et(e, n) {
|
|
1139
1136
|
var t = "touches" in e ? e.touches[0] : e;
|
|
1140
1137
|
return t[n ? "pageX" : "pageY"] - window[n ? "scrollX" : "scrollY"];
|
|
1141
1138
|
}
|
|
1142
|
-
function
|
|
1139
|
+
function Io(e, n, t) {
|
|
1143
1140
|
o.useEffect(function() {
|
|
1144
1141
|
var r = n.current;
|
|
1145
1142
|
if (e && r) {
|
|
1146
|
-
var a = !1,
|
|
1147
|
-
un.cancel(
|
|
1148
|
-
}, d = function
|
|
1149
|
-
u(),
|
|
1150
|
-
t(
|
|
1143
|
+
var a = !1, l, i, u = function() {
|
|
1144
|
+
un.cancel(l);
|
|
1145
|
+
}, d = function h() {
|
|
1146
|
+
u(), l = un(function() {
|
|
1147
|
+
t(i), h();
|
|
1151
1148
|
});
|
|
1152
1149
|
}, f = function(c) {
|
|
1153
1150
|
var g = c;
|
|
@@ -1156,13 +1153,13 @@ function Mo(e, n, t) {
|
|
|
1156
1153
|
a = !1, u();
|
|
1157
1154
|
}, s = function(c) {
|
|
1158
1155
|
if (a) {
|
|
1159
|
-
var g =
|
|
1156
|
+
var g = et(c, !1), m = r.getBoundingClientRect(), S = m.top, C = m.bottom;
|
|
1160
1157
|
if (g <= S) {
|
|
1161
|
-
var
|
|
1162
|
-
|
|
1163
|
-
} else if (g >=
|
|
1164
|
-
var
|
|
1165
|
-
|
|
1158
|
+
var b = S - g;
|
|
1159
|
+
i = -Mt(b), d();
|
|
1160
|
+
} else if (g >= C) {
|
|
1161
|
+
var x = g - C;
|
|
1162
|
+
i = Mt(x), d();
|
|
1166
1163
|
} else
|
|
1167
1164
|
u();
|
|
1168
1165
|
}
|
|
@@ -1173,149 +1170,149 @@ function Mo(e, n, t) {
|
|
|
1173
1170
|
}
|
|
1174
1171
|
}, [e]);
|
|
1175
1172
|
}
|
|
1176
|
-
var
|
|
1177
|
-
function
|
|
1178
|
-
var d = o.useRef(), f = o.useState(null), v = te(f, 2), s = v[0],
|
|
1179
|
-
return
|
|
1180
|
-
if (s && s.times <
|
|
1173
|
+
var Dt = 10;
|
|
1174
|
+
function xo(e, n, t, r, a, l, i, u) {
|
|
1175
|
+
var d = o.useRef(), f = o.useState(null), v = te(f, 2), s = v[0], h = v[1];
|
|
1176
|
+
return Mn(function() {
|
|
1177
|
+
if (s && s.times < Dt) {
|
|
1181
1178
|
if (!e.current) {
|
|
1182
|
-
|
|
1179
|
+
h(function(Y) {
|
|
1183
1180
|
return ee({}, Y);
|
|
1184
1181
|
});
|
|
1185
1182
|
return;
|
|
1186
1183
|
}
|
|
1187
|
-
|
|
1188
|
-
var c = s.targetAlign, g = s.originAlign, m = s.index, S = s.offset,
|
|
1189
|
-
if (
|
|
1190
|
-
for (var
|
|
1184
|
+
l();
|
|
1185
|
+
var c = s.targetAlign, g = s.originAlign, m = s.index, S = s.offset, C = e.current.clientHeight, b = !1, x = c, w = null;
|
|
1186
|
+
if (C) {
|
|
1187
|
+
for (var B = c || g, p = 0, E = 0, L = 0, H = Math.min(n.length - 1, m), q = 0; q <= H; q += 1) {
|
|
1191
1188
|
var _ = a(n[q]);
|
|
1192
|
-
|
|
1193
|
-
var
|
|
1194
|
-
|
|
1189
|
+
E = p;
|
|
1190
|
+
var A = t.get(_);
|
|
1191
|
+
L = E + (A === void 0 ? r : A), p = L;
|
|
1195
1192
|
}
|
|
1196
|
-
for (var
|
|
1193
|
+
for (var X = B === "top" ? S : C - S, Q = H; Q >= 0; Q -= 1) {
|
|
1197
1194
|
var G = a(n[Q]), j = t.get(G);
|
|
1198
1195
|
if (j === void 0) {
|
|
1199
|
-
|
|
1196
|
+
b = !0;
|
|
1200
1197
|
break;
|
|
1201
1198
|
}
|
|
1202
|
-
if (
|
|
1199
|
+
if (X -= j, X <= 0)
|
|
1203
1200
|
break;
|
|
1204
1201
|
}
|
|
1205
|
-
switch (
|
|
1202
|
+
switch (B) {
|
|
1206
1203
|
case "top":
|
|
1207
|
-
|
|
1204
|
+
w = E - S;
|
|
1208
1205
|
break;
|
|
1209
1206
|
case "bottom":
|
|
1210
|
-
|
|
1207
|
+
w = L - C + S;
|
|
1211
1208
|
break;
|
|
1212
1209
|
default: {
|
|
1213
|
-
var ne = e.current.scrollTop, Z = ne +
|
|
1214
|
-
|
|
1210
|
+
var ne = e.current.scrollTop, Z = ne + C;
|
|
1211
|
+
E < ne ? x = "top" : L > Z && (x = "bottom");
|
|
1215
1212
|
}
|
|
1216
1213
|
}
|
|
1217
|
-
|
|
1214
|
+
w !== null && i(w), w !== s.lastTop && (b = !0);
|
|
1218
1215
|
}
|
|
1219
|
-
|
|
1216
|
+
b && h(ee(ee({}, s), {}, {
|
|
1220
1217
|
times: s.times + 1,
|
|
1221
|
-
targetAlign:
|
|
1222
|
-
lastTop:
|
|
1218
|
+
targetAlign: x,
|
|
1219
|
+
lastTop: w
|
|
1223
1220
|
}));
|
|
1224
|
-
} else process.env.NODE_ENV !== "production" && (s == null ? void 0 : s.times) ===
|
|
1221
|
+
} else process.env.NODE_ENV !== "production" && (s == null ? void 0 : s.times) === Dt && Ue(!1, "Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.");
|
|
1225
1222
|
}, [s, e.current]), function(c) {
|
|
1226
1223
|
if (c == null) {
|
|
1227
1224
|
u();
|
|
1228
1225
|
return;
|
|
1229
1226
|
}
|
|
1230
1227
|
if (un.cancel(d.current), typeof c == "number")
|
|
1231
|
-
|
|
1228
|
+
i(c);
|
|
1232
1229
|
else if (c && pn(c) === "object") {
|
|
1233
1230
|
var g, m = c.align;
|
|
1234
|
-
"index" in c ? g = c.index : g = n.findIndex(function(
|
|
1235
|
-
return a(
|
|
1231
|
+
"index" in c ? g = c.index : g = n.findIndex(function(b) {
|
|
1232
|
+
return a(b) === c.key;
|
|
1236
1233
|
});
|
|
1237
|
-
var S = c.offset,
|
|
1238
|
-
|
|
1234
|
+
var S = c.offset, C = S === void 0 ? 0 : S;
|
|
1235
|
+
h({
|
|
1239
1236
|
times: 0,
|
|
1240
1237
|
index: g,
|
|
1241
|
-
offset:
|
|
1238
|
+
offset: C,
|
|
1242
1239
|
originAlign: m
|
|
1243
1240
|
});
|
|
1244
1241
|
}
|
|
1245
1242
|
};
|
|
1246
1243
|
}
|
|
1247
|
-
var
|
|
1248
|
-
var t = e.prefixCls, r = e.rtl, a = e.scrollOffset,
|
|
1244
|
+
var nt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
1245
|
+
var t = e.prefixCls, r = e.rtl, a = e.scrollOffset, l = e.scrollRange, i = e.onStartMove, u = e.onStopMove, d = e.onScroll, f = e.horizontal, v = e.spinSize, s = e.containerSize, h = e.style, c = e.thumbStyle, g = e.showScrollBar, m = o.useState(!1), S = te(m, 2), C = S[0], b = S[1], x = o.useState(null), w = te(x, 2), B = w[0], p = w[1], E = o.useState(null), L = te(E, 2), H = L[0], q = L[1], _ = !r, A = o.useRef(), X = o.useRef(), Q = o.useState(g), G = te(Q, 2), j = G[0], ne = G[1], Z = o.useRef(), Y = function() {
|
|
1249
1246
|
g === !0 || g === !1 || (clearTimeout(Z.current), ne(!0), Z.current = setTimeout(function() {
|
|
1250
1247
|
ne(!1);
|
|
1251
1248
|
}, 3e3));
|
|
1252
|
-
},
|
|
1253
|
-
if (a === 0 ||
|
|
1249
|
+
}, I = l - s || 0, D = s - v || 0, fe = o.useMemo(function() {
|
|
1250
|
+
if (a === 0 || I === 0)
|
|
1254
1251
|
return 0;
|
|
1255
|
-
var
|
|
1256
|
-
return
|
|
1257
|
-
}, [a,
|
|
1252
|
+
var R = a / I;
|
|
1253
|
+
return R * D;
|
|
1254
|
+
}, [a, I, D]), ie = function(y) {
|
|
1258
1255
|
y.stopPropagation(), y.preventDefault();
|
|
1259
1256
|
}, J = o.useRef({
|
|
1260
1257
|
top: fe,
|
|
1261
|
-
dragging:
|
|
1262
|
-
pageY:
|
|
1263
|
-
startTop:
|
|
1258
|
+
dragging: C,
|
|
1259
|
+
pageY: B,
|
|
1260
|
+
startTop: H
|
|
1264
1261
|
});
|
|
1265
1262
|
J.current = {
|
|
1266
1263
|
top: fe,
|
|
1267
|
-
dragging:
|
|
1268
|
-
pageY:
|
|
1269
|
-
startTop:
|
|
1264
|
+
dragging: C,
|
|
1265
|
+
pageY: B,
|
|
1266
|
+
startTop: H
|
|
1270
1267
|
};
|
|
1271
1268
|
var se = function(y) {
|
|
1272
|
-
|
|
1269
|
+
b(!0), p(et(y, f)), q(J.current.top), i(), y.stopPropagation(), y.preventDefault();
|
|
1273
1270
|
};
|
|
1274
1271
|
o.useEffect(function() {
|
|
1275
|
-
var
|
|
1276
|
-
|
|
1277
|
-
}, y =
|
|
1278
|
-
return y.addEventListener("touchstart",
|
|
1272
|
+
var R = function(O) {
|
|
1273
|
+
O.preventDefault();
|
|
1274
|
+
}, y = A.current, $ = X.current;
|
|
1275
|
+
return y.addEventListener("touchstart", R, {
|
|
1279
1276
|
passive: !1
|
|
1280
|
-
}),
|
|
1277
|
+
}), $.addEventListener("touchstart", se, {
|
|
1281
1278
|
passive: !1
|
|
1282
1279
|
}), function() {
|
|
1283
|
-
y.removeEventListener("touchstart",
|
|
1280
|
+
y.removeEventListener("touchstart", R), $.removeEventListener("touchstart", se);
|
|
1284
1281
|
};
|
|
1285
1282
|
}, []);
|
|
1286
|
-
var
|
|
1287
|
-
|
|
1283
|
+
var ye = o.useRef();
|
|
1284
|
+
ye.current = I;
|
|
1288
1285
|
var ge = o.useRef();
|
|
1289
|
-
ge.current =
|
|
1290
|
-
if (
|
|
1291
|
-
var
|
|
1292
|
-
var
|
|
1293
|
-
un.cancel(
|
|
1294
|
-
var
|
|
1286
|
+
ge.current = D, o.useEffect(function() {
|
|
1287
|
+
if (C) {
|
|
1288
|
+
var R, y = function(O) {
|
|
1289
|
+
var F = J.current, le = F.dragging, me = F.pageY, re = F.startTop;
|
|
1290
|
+
un.cancel(R);
|
|
1291
|
+
var Ce = A.current.getBoundingClientRect(), Le = s / (f ? Ce.width : Ce.height);
|
|
1295
1292
|
if (le) {
|
|
1296
|
-
var xe = (
|
|
1293
|
+
var xe = (et(O, f) - me) * Le, Ne = re;
|
|
1297
1294
|
!_ && f ? Ne -= xe : Ne += xe;
|
|
1298
|
-
var de =
|
|
1299
|
-
Se = Math.max(Se, 0), Se = Math.min(Se, de),
|
|
1295
|
+
var de = ye.current, Xe = ge.current, Ge = Xe ? Ne / Xe : 0, Se = Math.ceil(Ge * de);
|
|
1296
|
+
Se = Math.max(Se, 0), Se = Math.min(Se, de), R = un(function() {
|
|
1300
1297
|
d(Se, f);
|
|
1301
1298
|
});
|
|
1302
1299
|
}
|
|
1303
|
-
},
|
|
1304
|
-
|
|
1300
|
+
}, $ = function() {
|
|
1301
|
+
b(!1), u();
|
|
1305
1302
|
};
|
|
1306
1303
|
return window.addEventListener("mousemove", y, {
|
|
1307
1304
|
passive: !0
|
|
1308
1305
|
}), window.addEventListener("touchmove", y, {
|
|
1309
1306
|
passive: !0
|
|
1310
|
-
}), window.addEventListener("mouseup",
|
|
1307
|
+
}), window.addEventListener("mouseup", $, {
|
|
1311
1308
|
passive: !0
|
|
1312
|
-
}), window.addEventListener("touchend",
|
|
1309
|
+
}), window.addEventListener("touchend", $, {
|
|
1313
1310
|
passive: !0
|
|
1314
1311
|
}), function() {
|
|
1315
|
-
window.removeEventListener("mousemove", y), window.removeEventListener("touchmove", y), window.removeEventListener("mouseup",
|
|
1312
|
+
window.removeEventListener("mousemove", y), window.removeEventListener("touchmove", y), window.removeEventListener("mouseup", $), window.removeEventListener("touchend", $), un.cancel(R);
|
|
1316
1313
|
};
|
|
1317
1314
|
}
|
|
1318
|
-
}, [
|
|
1315
|
+
}, [C]), o.useEffect(function() {
|
|
1319
1316
|
return Y(), function() {
|
|
1320
1317
|
clearTimeout(Z.current);
|
|
1321
1318
|
};
|
|
@@ -1324,7 +1321,7 @@ var tt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
|
1324
1321
|
delayHidden: Y
|
|
1325
1322
|
};
|
|
1326
1323
|
});
|
|
1327
|
-
var
|
|
1324
|
+
var Re = "".concat(t, "-scrollbar"), ce = {
|
|
1328
1325
|
position: "absolute",
|
|
1329
1326
|
visibility: j ? null : "hidden"
|
|
1330
1327
|
}, pe = {
|
|
@@ -1335,46 +1332,46 @@ var tt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
|
1335
1332
|
userSelect: "none"
|
|
1336
1333
|
};
|
|
1337
1334
|
return f ? (ce.height = 8, ce.left = 0, ce.right = 0, ce.bottom = 0, pe.height = "100%", pe.width = v, _ ? pe.left = fe : pe.right = fe) : (ce.width = 8, ce.top = 0, ce.bottom = 0, _ ? ce.right = 0 : ce.left = 0, pe.width = "100%", pe.height = v, pe.top = fe), /* @__PURE__ */ o.createElement("div", {
|
|
1338
|
-
ref:
|
|
1339
|
-
className:
|
|
1340
|
-
style: ee(ee({}, ce),
|
|
1335
|
+
ref: A,
|
|
1336
|
+
className: Be(Re, ae(ae(ae({}, "".concat(Re, "-horizontal"), f), "".concat(Re, "-vertical"), !f), "".concat(Re, "-visible"), j)),
|
|
1337
|
+
style: ee(ee({}, ce), h),
|
|
1341
1338
|
onMouseDown: ie,
|
|
1342
1339
|
onMouseMove: Y
|
|
1343
1340
|
}, /* @__PURE__ */ o.createElement("div", {
|
|
1344
|
-
ref:
|
|
1345
|
-
className:
|
|
1341
|
+
ref: X,
|
|
1342
|
+
className: Be("".concat(Re, "-thumb"), ae({}, "".concat(Re, "-thumb-moving"), C)),
|
|
1346
1343
|
style: ee(ee({}, pe), c),
|
|
1347
1344
|
onMouseDown: se
|
|
1348
1345
|
}));
|
|
1349
1346
|
});
|
|
1350
|
-
process.env.NODE_ENV !== "production" && (
|
|
1351
|
-
var
|
|
1352
|
-
function
|
|
1347
|
+
process.env.NODE_ENV !== "production" && (nt.displayName = "ScrollBar");
|
|
1348
|
+
var Oo = 20;
|
|
1349
|
+
function $t() {
|
|
1353
1350
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = e / n * e;
|
|
1354
|
-
return isNaN(t) && (t = 0), t = Math.max(t,
|
|
1351
|
+
return isNaN(t) && (t = 0), t = Math.max(t, Oo), Math.floor(t);
|
|
1355
1352
|
}
|
|
1356
|
-
var
|
|
1353
|
+
var Ro = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles", "showScrollBar"], Mo = [], Do = {
|
|
1357
1354
|
overflowY: "auto",
|
|
1358
1355
|
overflowAnchor: "none"
|
|
1359
1356
|
};
|
|
1360
|
-
function
|
|
1361
|
-
var t = e.prefixCls, r = t === void 0 ? "rc-virtual-list" : t, a = e.className,
|
|
1362
|
-
return typeof
|
|
1363
|
-
}, [
|
|
1364
|
-
return Object.values(j.maps).reduce(function(P,
|
|
1365
|
-
return P +
|
|
1357
|
+
function $o(e, n) {
|
|
1358
|
+
var t = e.prefixCls, r = t === void 0 ? "rc-virtual-list" : t, a = e.className, l = e.height, i = e.itemHeight, u = e.fullHeight, d = u === void 0 ? !0 : u, f = e.style, v = e.data, s = e.children, h = e.itemKey, c = e.virtual, g = e.direction, m = e.scrollWidth, S = e.component, C = S === void 0 ? "div" : S, b = e.onScroll, x = e.onVirtualScroll, w = e.onVisibleChange, B = e.innerProps, p = e.extraRender, E = e.styles, L = e.showScrollBar, H = L === void 0 ? "optional" : L, q = wn(e, Ro), _ = o.useCallback(function(P) {
|
|
1359
|
+
return typeof h == "function" ? h(P) : P == null ? void 0 : P[h];
|
|
1360
|
+
}, [h]), A = wo(_), X = te(A, 4), Q = X[0], G = X[1], j = X[2], ne = X[3], Z = !!(c !== !1 && l && i), Y = o.useMemo(function() {
|
|
1361
|
+
return Object.values(j.maps).reduce(function(P, M) {
|
|
1362
|
+
return P + M;
|
|
1366
1363
|
}, 0);
|
|
1367
|
-
}, [j.id, j.maps]),
|
|
1364
|
+
}, [j.id, j.maps]), I = Z && v && (Math.max(i * v.length, Y) > l || !!m), D = g === "rtl", fe = Be(r, ae({}, "".concat(r, "-rtl"), D), a), ie = v || Mo, J = he(), se = he(), ye = he(), ge = Tn(0), Re = te(ge, 2), ce = Re[0], pe = Re[1], R = Tn(0), y = te(R, 2), $ = y[0], K = y[1], O = Tn(!1), F = te(O, 2), le = F[0], me = F[1], re = function() {
|
|
1368
1365
|
me(!0);
|
|
1369
|
-
},
|
|
1366
|
+
}, Ce = function() {
|
|
1370
1367
|
me(!1);
|
|
1371
|
-
},
|
|
1368
|
+
}, Le = {
|
|
1372
1369
|
getKey: _
|
|
1373
1370
|
};
|
|
1374
1371
|
function xe(P) {
|
|
1375
|
-
pe(function(
|
|
1372
|
+
pe(function(M) {
|
|
1376
1373
|
var k;
|
|
1377
|
-
typeof P == "function" ? k = P(
|
|
1374
|
+
typeof P == "function" ? k = P(M) : k = P;
|
|
1378
1375
|
var ve = In(k);
|
|
1379
1376
|
return J.current.scrollTop = ve, ve;
|
|
1380
1377
|
});
|
|
@@ -1382,9 +1379,9 @@ function Lo(e, n) {
|
|
|
1382
1379
|
var Ne = he({
|
|
1383
1380
|
start: 0,
|
|
1384
1381
|
end: ie.length
|
|
1385
|
-
}), de = he(),
|
|
1382
|
+
}), de = he(), Xe = bo(ie, _), Ge = te(Xe, 1), Se = Ge[0];
|
|
1386
1383
|
de.current = Se;
|
|
1387
|
-
var
|
|
1384
|
+
var Me = o.useMemo(function() {
|
|
1388
1385
|
if (!Z)
|
|
1389
1386
|
return {
|
|
1390
1387
|
scrollHeight: void 0,
|
|
@@ -1392,7 +1389,7 @@ function Lo(e, n) {
|
|
|
1392
1389
|
end: ie.length - 1,
|
|
1393
1390
|
offset: void 0
|
|
1394
1391
|
};
|
|
1395
|
-
if (!
|
|
1392
|
+
if (!I) {
|
|
1396
1393
|
var P;
|
|
1397
1394
|
return {
|
|
1398
1395
|
scrollHeight: ((P = se.current) === null || P === void 0 ? void 0 : P.offsetHeight) || 0,
|
|
@@ -1401,307 +1398,307 @@ function Lo(e, n) {
|
|
|
1401
1398
|
offset: void 0
|
|
1402
1399
|
};
|
|
1403
1400
|
}
|
|
1404
|
-
for (var
|
|
1405
|
-
var Wn = ie[Sn], Kn = _(Wn),
|
|
1406
|
-
|
|
1401
|
+
for (var M = 0, k, ve, Te, xn = ie.length, Sn = 0; Sn < xn; Sn += 1) {
|
|
1402
|
+
var Wn = ie[Sn], Kn = _(Wn), Pn = j.get(Kn), _n = M + (Pn === void 0 ? i : Pn);
|
|
1403
|
+
_n >= ce && k === void 0 && (k = Sn, ve = M), _n > ce + l && Te === void 0 && (Te = Sn), M = _n;
|
|
1407
1404
|
}
|
|
1408
|
-
return k === void 0 && (k = 0, ve = 0, Te = Math.ceil(
|
|
1409
|
-
scrollHeight:
|
|
1405
|
+
return k === void 0 && (k = 0, ve = 0, Te = Math.ceil(l / i)), Te === void 0 && (Te = ie.length - 1), Te = Math.min(Te + 1, ie.length - 1), {
|
|
1406
|
+
scrollHeight: M,
|
|
1410
1407
|
start: k,
|
|
1411
1408
|
end: Te,
|
|
1412
1409
|
offset: ve
|
|
1413
1410
|
};
|
|
1414
|
-
}, [
|
|
1415
|
-
Ne.current.start =
|
|
1411
|
+
}, [I, Z, ce, ie, ne, l]), we = Me.scrollHeight, Oe = Me.start, Pe = Me.end, en = Me.offset;
|
|
1412
|
+
Ne.current.start = Oe, Ne.current.end = Pe, o.useLayoutEffect(function() {
|
|
1416
1413
|
var P = j.getRecord();
|
|
1417
1414
|
if (P.size === 1) {
|
|
1418
|
-
var
|
|
1419
|
-
if (k ===
|
|
1420
|
-
var ve = j.get(
|
|
1415
|
+
var M = Array.from(P)[0], k = _(ie[Oe]);
|
|
1416
|
+
if (k === M) {
|
|
1417
|
+
var ve = j.get(M), Te = ve - i;
|
|
1421
1418
|
xe(function(xn) {
|
|
1422
1419
|
return xn + Te;
|
|
1423
1420
|
});
|
|
1424
1421
|
}
|
|
1425
1422
|
}
|
|
1426
1423
|
j.resetRecord();
|
|
1427
|
-
}, [
|
|
1428
|
-
var
|
|
1424
|
+
}, [we]);
|
|
1425
|
+
var Ae = o.useState({
|
|
1429
1426
|
width: 0,
|
|
1430
|
-
height:
|
|
1431
|
-
}),
|
|
1427
|
+
height: l
|
|
1428
|
+
}), He = te(Ae, 2), Ee = He[0], hn = He[1], Fe = function(M) {
|
|
1432
1429
|
hn({
|
|
1433
|
-
width:
|
|
1434
|
-
height:
|
|
1430
|
+
width: M.offsetWidth,
|
|
1431
|
+
height: M.offsetHeight
|
|
1435
1432
|
});
|
|
1436
|
-
}, _e = he(),
|
|
1437
|
-
return
|
|
1433
|
+
}, _e = he(), $e = he(), $n = o.useMemo(function() {
|
|
1434
|
+
return $t(Ee.width, m);
|
|
1438
1435
|
}, [Ee.width, m]), En = o.useMemo(function() {
|
|
1439
|
-
return
|
|
1440
|
-
}, [Ee.height,
|
|
1436
|
+
return $t(Ee.height, we);
|
|
1437
|
+
}, [Ee.height, we]), dn = we - l, bn = he(dn);
|
|
1441
1438
|
bn.current = dn;
|
|
1442
1439
|
function In(P) {
|
|
1443
|
-
var
|
|
1444
|
-
return Number.isNaN(bn.current) || (
|
|
1440
|
+
var M = P;
|
|
1441
|
+
return Number.isNaN(bn.current) || (M = Math.min(M, bn.current)), M = Math.max(M, 0), M;
|
|
1445
1442
|
}
|
|
1446
|
-
var cn = ce <= 0,
|
|
1443
|
+
var cn = ce <= 0, qe = ce >= dn, fn = $ <= 0, mn = $ >= m, De = qt(cn, qe, fn, mn), vn = function() {
|
|
1447
1444
|
return {
|
|
1448
|
-
x:
|
|
1445
|
+
x: D ? -$ : $,
|
|
1449
1446
|
y: ce
|
|
1450
1447
|
};
|
|
1451
|
-
}, an = he(vn()), N =
|
|
1452
|
-
if (
|
|
1453
|
-
var
|
|
1454
|
-
(an.current.x !==
|
|
1448
|
+
}, an = he(vn()), N = bt(function(P) {
|
|
1449
|
+
if (x) {
|
|
1450
|
+
var M = ee(ee({}, vn()), P);
|
|
1451
|
+
(an.current.x !== M.x || an.current.y !== M.y) && (x(M), an.current = M);
|
|
1455
1452
|
}
|
|
1456
1453
|
});
|
|
1457
|
-
function
|
|
1454
|
+
function z(P, M) {
|
|
1458
1455
|
var k = P;
|
|
1459
|
-
|
|
1456
|
+
M ? (St.flushSync(function() {
|
|
1460
1457
|
K(k);
|
|
1461
1458
|
}), N()) : xe(k);
|
|
1462
1459
|
}
|
|
1463
|
-
function
|
|
1464
|
-
var
|
|
1465
|
-
|
|
1460
|
+
function T(P) {
|
|
1461
|
+
var M = P.currentTarget.scrollTop;
|
|
1462
|
+
M !== ce && xe(M), b == null || b(P), N();
|
|
1466
1463
|
}
|
|
1467
|
-
var
|
|
1468
|
-
var k =
|
|
1464
|
+
var V = function(M) {
|
|
1465
|
+
var k = M, ve = m ? m - Ee.width : 0;
|
|
1469
1466
|
return k = Math.max(k, 0), k = Math.min(k, ve), k;
|
|
1470
|
-
}, oe =
|
|
1471
|
-
|
|
1467
|
+
}, oe = bt(function(P, M) {
|
|
1468
|
+
M ? (St.flushSync(function() {
|
|
1472
1469
|
K(function(k) {
|
|
1473
|
-
var ve = k + (
|
|
1474
|
-
return
|
|
1470
|
+
var ve = k + (D ? -P : P);
|
|
1471
|
+
return V(ve);
|
|
1475
1472
|
});
|
|
1476
1473
|
}), N()) : xe(function(k) {
|
|
1477
1474
|
var ve = k + P;
|
|
1478
1475
|
return ve;
|
|
1479
1476
|
});
|
|
1480
|
-
}), be =
|
|
1481
|
-
|
|
1477
|
+
}), be = So(Z, cn, qe, fn, mn, !!m, oe), Qe = te(be, 2), je = Qe[0], nn = Qe[1];
|
|
1478
|
+
Eo(Z, J, function(P, M, k, ve) {
|
|
1482
1479
|
var Te = ve;
|
|
1483
|
-
return
|
|
1480
|
+
return De(P, M, k) ? !1 : !Te || !Te._virtualHandled ? (Te && (Te._virtualHandled = !0), je({
|
|
1484
1481
|
preventDefault: function() {
|
|
1485
1482
|
},
|
|
1486
|
-
deltaX: P ?
|
|
1487
|
-
deltaY: P ? 0 :
|
|
1483
|
+
deltaX: P ? M : 0,
|
|
1484
|
+
deltaY: P ? 0 : M
|
|
1488
1485
|
}), !0) : !1;
|
|
1489
|
-
}),
|
|
1490
|
-
xe(function(
|
|
1491
|
-
return
|
|
1486
|
+
}), Io(I, J, function(P) {
|
|
1487
|
+
xe(function(M) {
|
|
1488
|
+
return M + P;
|
|
1492
1489
|
});
|
|
1493
|
-
}),
|
|
1490
|
+
}), Mn(function() {
|
|
1494
1491
|
function P(k) {
|
|
1495
|
-
var ve = cn && k.detail < 0, Te =
|
|
1492
|
+
var ve = cn && k.detail < 0, Te = qe && k.detail > 0;
|
|
1496
1493
|
Z && !ve && !Te && k.preventDefault();
|
|
1497
1494
|
}
|
|
1498
|
-
var
|
|
1499
|
-
return
|
|
1495
|
+
var M = J.current;
|
|
1496
|
+
return M.addEventListener("wheel", je, {
|
|
1500
1497
|
passive: !1
|
|
1501
|
-
}),
|
|
1498
|
+
}), M.addEventListener("DOMMouseScroll", nn, {
|
|
1502
1499
|
passive: !0
|
|
1503
|
-
}),
|
|
1500
|
+
}), M.addEventListener("MozMousePixelScroll", P, {
|
|
1504
1501
|
passive: !1
|
|
1505
1502
|
}), function() {
|
|
1506
|
-
|
|
1503
|
+
M.removeEventListener("wheel", je), M.removeEventListener("DOMMouseScroll", nn), M.removeEventListener("MozMousePixelScroll", P);
|
|
1507
1504
|
};
|
|
1508
|
-
}, [Z, cn,
|
|
1505
|
+
}, [Z, cn, qe]), Mn(function() {
|
|
1509
1506
|
if (m) {
|
|
1510
|
-
var P =
|
|
1507
|
+
var P = V($);
|
|
1511
1508
|
K(P), N({
|
|
1512
1509
|
x: P
|
|
1513
1510
|
});
|
|
1514
1511
|
}
|
|
1515
1512
|
}, [Ee.width, m]);
|
|
1516
1513
|
var Ie = function() {
|
|
1517
|
-
var
|
|
1518
|
-
(
|
|
1519
|
-
}, tn =
|
|
1514
|
+
var M, k;
|
|
1515
|
+
(M = _e.current) === null || M === void 0 || M.delayHidden(), (k = $e.current) === null || k === void 0 || k.delayHidden();
|
|
1516
|
+
}, tn = xo(J, ie, j, i, _, function() {
|
|
1520
1517
|
return G(!0);
|
|
1521
1518
|
}, xe, Ie);
|
|
1522
1519
|
o.useImperativeHandle(n, function() {
|
|
1523
1520
|
return {
|
|
1524
|
-
nativeElement:
|
|
1521
|
+
nativeElement: ye.current,
|
|
1525
1522
|
getScrollInfo: vn,
|
|
1526
|
-
scrollTo: function(
|
|
1523
|
+
scrollTo: function(M) {
|
|
1527
1524
|
function k(ve) {
|
|
1528
1525
|
return ve && pn(ve) === "object" && ("left" in ve || "top" in ve);
|
|
1529
1526
|
}
|
|
1530
|
-
k(
|
|
1527
|
+
k(M) ? (M.left !== void 0 && K(V(M.left)), tn(M.top)) : tn(M);
|
|
1531
1528
|
}
|
|
1532
1529
|
};
|
|
1533
|
-
}),
|
|
1534
|
-
if (
|
|
1535
|
-
var P = ie.slice(
|
|
1536
|
-
|
|
1530
|
+
}), Mn(function() {
|
|
1531
|
+
if (w) {
|
|
1532
|
+
var P = ie.slice(Oe, Pe + 1);
|
|
1533
|
+
w(P, ie);
|
|
1537
1534
|
}
|
|
1538
|
-
}, [
|
|
1539
|
-
var
|
|
1540
|
-
start:
|
|
1535
|
+
}, [Oe, Pe, ie]);
|
|
1536
|
+
var Ze = Co(ie, _, j, i), Nn = p == null ? void 0 : p({
|
|
1537
|
+
start: Oe,
|
|
1541
1538
|
end: Pe,
|
|
1542
|
-
virtual:
|
|
1543
|
-
offsetX:
|
|
1539
|
+
virtual: I,
|
|
1540
|
+
offsetX: $,
|
|
1544
1541
|
offsetY: en,
|
|
1545
|
-
rtl:
|
|
1546
|
-
getSize:
|
|
1547
|
-
}),
|
|
1548
|
-
|
|
1549
|
-
var
|
|
1550
|
-
return
|
|
1551
|
-
ref:
|
|
1542
|
+
rtl: D,
|
|
1543
|
+
getSize: Ze
|
|
1544
|
+
}), Vn = po(ie, Oe, Pe, m, $, Q, s, Le), rn = null;
|
|
1545
|
+
l && (rn = ee(ae({}, d ? "height" : "maxHeight", l), Do), Z && (rn.overflowY = "hidden", m && (rn.overflowX = "hidden"), le && (rn.pointerEvents = "none")));
|
|
1546
|
+
var Je = {};
|
|
1547
|
+
return D && (Je.dir = "rtl"), /* @__PURE__ */ o.createElement("div", on({
|
|
1548
|
+
ref: ye,
|
|
1552
1549
|
style: ee(ee({}, f), {}, {
|
|
1553
1550
|
position: "relative"
|
|
1554
1551
|
}),
|
|
1555
1552
|
className: fe
|
|
1556
|
-
},
|
|
1553
|
+
}, Je, q), /* @__PURE__ */ o.createElement(Ft, {
|
|
1557
1554
|
onResize: Fe
|
|
1558
|
-
}, /* @__PURE__ */ o.createElement(
|
|
1555
|
+
}, /* @__PURE__ */ o.createElement(C, {
|
|
1559
1556
|
className: "".concat(r, "-holder"),
|
|
1560
1557
|
style: rn,
|
|
1561
1558
|
ref: J,
|
|
1562
|
-
onScroll:
|
|
1559
|
+
onScroll: T,
|
|
1563
1560
|
onMouseEnter: Ie
|
|
1564
|
-
}, /* @__PURE__ */ o.createElement(
|
|
1561
|
+
}, /* @__PURE__ */ o.createElement(Yt, {
|
|
1565
1562
|
prefixCls: r,
|
|
1566
|
-
height:
|
|
1567
|
-
offsetX:
|
|
1563
|
+
height: we,
|
|
1564
|
+
offsetX: $,
|
|
1568
1565
|
offsetY: en,
|
|
1569
1566
|
scrollWidth: m,
|
|
1570
1567
|
onInnerResize: G,
|
|
1571
1568
|
ref: se,
|
|
1572
|
-
innerProps:
|
|
1573
|
-
rtl:
|
|
1574
|
-
extra:
|
|
1575
|
-
},
|
|
1569
|
+
innerProps: B,
|
|
1570
|
+
rtl: D,
|
|
1571
|
+
extra: Nn
|
|
1572
|
+
}, Vn))), I && we > l && /* @__PURE__ */ o.createElement(nt, {
|
|
1576
1573
|
ref: _e,
|
|
1577
1574
|
prefixCls: r,
|
|
1578
1575
|
scrollOffset: ce,
|
|
1579
|
-
scrollRange:
|
|
1580
|
-
rtl:
|
|
1581
|
-
onScroll:
|
|
1576
|
+
scrollRange: we,
|
|
1577
|
+
rtl: D,
|
|
1578
|
+
onScroll: z,
|
|
1582
1579
|
onStartMove: re,
|
|
1583
|
-
onStopMove:
|
|
1580
|
+
onStopMove: Ce,
|
|
1584
1581
|
spinSize: En,
|
|
1585
1582
|
containerSize: Ee.height,
|
|
1586
|
-
style:
|
|
1587
|
-
thumbStyle:
|
|
1588
|
-
showScrollBar:
|
|
1589
|
-
}),
|
|
1590
|
-
ref:
|
|
1583
|
+
style: E == null ? void 0 : E.verticalScrollBar,
|
|
1584
|
+
thumbStyle: E == null ? void 0 : E.verticalScrollBarThumb,
|
|
1585
|
+
showScrollBar: H
|
|
1586
|
+
}), I && m > Ee.width && /* @__PURE__ */ o.createElement(nt, {
|
|
1587
|
+
ref: $e,
|
|
1591
1588
|
prefixCls: r,
|
|
1592
|
-
scrollOffset:
|
|
1589
|
+
scrollOffset: $,
|
|
1593
1590
|
scrollRange: m,
|
|
1594
|
-
rtl:
|
|
1595
|
-
onScroll:
|
|
1591
|
+
rtl: D,
|
|
1592
|
+
onScroll: z,
|
|
1596
1593
|
onStartMove: re,
|
|
1597
|
-
onStopMove:
|
|
1598
|
-
spinSize:
|
|
1594
|
+
onStopMove: Ce,
|
|
1595
|
+
spinSize: $n,
|
|
1599
1596
|
containerSize: Ee.width,
|
|
1600
1597
|
horizontal: !0,
|
|
1601
|
-
style:
|
|
1602
|
-
thumbStyle:
|
|
1603
|
-
showScrollBar:
|
|
1598
|
+
style: E == null ? void 0 : E.horizontalScrollBar,
|
|
1599
|
+
thumbStyle: E == null ? void 0 : E.horizontalScrollBarThumb,
|
|
1600
|
+
showScrollBar: H
|
|
1604
1601
|
}));
|
|
1605
1602
|
}
|
|
1606
|
-
var
|
|
1607
|
-
|
|
1608
|
-
function
|
|
1603
|
+
var Qt = /* @__PURE__ */ o.forwardRef($o);
|
|
1604
|
+
Qt.displayName = "List";
|
|
1605
|
+
function No() {
|
|
1609
1606
|
return /(mac\sos|macintosh)/i.test(navigator.appVersion);
|
|
1610
1607
|
}
|
|
1611
|
-
var
|
|
1612
|
-
function
|
|
1608
|
+
var Po = ["disabled", "title", "children", "style", "className"];
|
|
1609
|
+
function Nt(e) {
|
|
1613
1610
|
return typeof e == "string" || typeof e == "number";
|
|
1614
1611
|
}
|
|
1615
|
-
var
|
|
1616
|
-
var r =
|
|
1612
|
+
var _o = function(n, t) {
|
|
1613
|
+
var r = Xr(), a = r.prefixCls, l = r.id, i = r.open, u = r.multiple, d = r.mode, f = r.searchValue, v = r.toggleOpen, s = r.notFoundContent, h = r.onPopupScroll, c = o.useContext(ut), g = c.maxCount, m = c.flattenOptions, S = c.onActiveValue, C = c.defaultActiveFirstOption, b = c.onSelect, x = c.menuItemSelectedIcon, w = c.rawValues, B = c.fieldNames, p = c.virtual, E = c.direction, L = c.listHeight, H = c.listItemHeight, q = c.optionRender, _ = "".concat(a, "-item"), A = wr(function() {
|
|
1617
1614
|
return m;
|
|
1618
|
-
}, [
|
|
1619
|
-
return y[0] &&
|
|
1620
|
-
}),
|
|
1621
|
-
return u &&
|
|
1622
|
-
}, [u, g,
|
|
1615
|
+
}, [i, m], function(R, y) {
|
|
1616
|
+
return y[0] && R[1] !== y[1];
|
|
1617
|
+
}), X = o.useRef(null), Q = o.useMemo(function() {
|
|
1618
|
+
return u && Jn(g) && (w == null ? void 0 : w.size) >= g;
|
|
1619
|
+
}, [u, g, w == null ? void 0 : w.size]), G = function(y) {
|
|
1623
1620
|
y.preventDefault();
|
|
1624
1621
|
}, j = function(y) {
|
|
1625
|
-
var
|
|
1626
|
-
(
|
|
1622
|
+
var $;
|
|
1623
|
+
($ = X.current) === null || $ === void 0 || $.scrollTo(typeof y == "number" ? {
|
|
1627
1624
|
index: y
|
|
1628
1625
|
} : y);
|
|
1629
|
-
}, ne = o.useCallback(function(
|
|
1630
|
-
return d === "combobox" ? !1 :
|
|
1631
|
-
}, [d,
|
|
1632
|
-
for (var
|
|
1633
|
-
var
|
|
1626
|
+
}, ne = o.useCallback(function(R) {
|
|
1627
|
+
return d === "combobox" ? !1 : w.has(R);
|
|
1628
|
+
}, [d, Ye(w).toString(), w.size]), Z = function(y) {
|
|
1629
|
+
for (var $ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1, K = A.length, O = 0; O < K; O += 1) {
|
|
1630
|
+
var F = (y + O * $ + K) % K, le = A[F] || {}, me = le.group, re = le.data;
|
|
1634
1631
|
if (!me && !(re != null && re.disabled) && (ne(re.value) || !Q))
|
|
1635
|
-
return
|
|
1632
|
+
return F;
|
|
1636
1633
|
}
|
|
1637
1634
|
return -1;
|
|
1638
1635
|
}, Y = o.useState(function() {
|
|
1639
1636
|
return Z(0);
|
|
1640
|
-
}),
|
|
1641
|
-
var
|
|
1637
|
+
}), I = te(Y, 2), D = I[0], fe = I[1], ie = function(y) {
|
|
1638
|
+
var $ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1642
1639
|
fe(y);
|
|
1643
1640
|
var K = {
|
|
1644
|
-
source:
|
|
1645
|
-
},
|
|
1646
|
-
if (!
|
|
1641
|
+
source: $ ? "keyboard" : "mouse"
|
|
1642
|
+
}, O = A[y];
|
|
1643
|
+
if (!O) {
|
|
1647
1644
|
S(null, -1, K);
|
|
1648
1645
|
return;
|
|
1649
1646
|
}
|
|
1650
|
-
S(
|
|
1647
|
+
S(O.value, y, K);
|
|
1651
1648
|
};
|
|
1652
|
-
|
|
1653
|
-
ie(
|
|
1654
|
-
}, [
|
|
1655
|
-
var J = o.useCallback(function(
|
|
1656
|
-
return d === "combobox" ? String(
|
|
1657
|
-
}, [d, f,
|
|
1658
|
-
|
|
1659
|
-
var
|
|
1660
|
-
if (!u &&
|
|
1661
|
-
var
|
|
1662
|
-
var
|
|
1663
|
-
return
|
|
1649
|
+
Yn(function() {
|
|
1650
|
+
ie(C !== !1 ? Z(0) : -1);
|
|
1651
|
+
}, [A.length, f]);
|
|
1652
|
+
var J = o.useCallback(function(R) {
|
|
1653
|
+
return d === "combobox" ? String(R).toLowerCase() === f.toLowerCase() : w.has(R);
|
|
1654
|
+
}, [d, f, Ye(w).toString(), w.size]);
|
|
1655
|
+
Yn(function() {
|
|
1656
|
+
var R = setTimeout(function() {
|
|
1657
|
+
if (!u && i && w.size === 1) {
|
|
1658
|
+
var $ = Array.from(w)[0], K = A.findIndex(function(O) {
|
|
1659
|
+
var F = O.data;
|
|
1660
|
+
return F.value === $;
|
|
1664
1661
|
});
|
|
1665
1662
|
K !== -1 && (ie(K), j(K));
|
|
1666
1663
|
}
|
|
1667
1664
|
});
|
|
1668
|
-
if (
|
|
1665
|
+
if (i) {
|
|
1669
1666
|
var y;
|
|
1670
|
-
(y =
|
|
1667
|
+
(y = X.current) === null || y === void 0 || y.scrollTo(void 0);
|
|
1671
1668
|
}
|
|
1672
1669
|
return function() {
|
|
1673
|
-
return clearTimeout(
|
|
1670
|
+
return clearTimeout(R);
|
|
1674
1671
|
};
|
|
1675
|
-
}, [
|
|
1672
|
+
}, [i, f]);
|
|
1676
1673
|
var se = function(y) {
|
|
1677
|
-
y !== void 0 &&
|
|
1678
|
-
selected: !
|
|
1674
|
+
y !== void 0 && b(y, {
|
|
1675
|
+
selected: !w.has(y)
|
|
1679
1676
|
}), u || v(!1);
|
|
1680
1677
|
};
|
|
1681
1678
|
if (o.useImperativeHandle(t, function() {
|
|
1682
1679
|
return {
|
|
1683
1680
|
onKeyDown: function(y) {
|
|
1684
|
-
var
|
|
1685
|
-
switch (
|
|
1681
|
+
var $ = y.which, K = y.ctrlKey;
|
|
1682
|
+
switch ($) {
|
|
1686
1683
|
case W.N:
|
|
1687
1684
|
case W.P:
|
|
1688
1685
|
case W.UP:
|
|
1689
1686
|
case W.DOWN: {
|
|
1690
|
-
var
|
|
1691
|
-
if (
|
|
1692
|
-
var
|
|
1693
|
-
j(
|
|
1687
|
+
var O = 0;
|
|
1688
|
+
if ($ === W.UP ? O = -1 : $ === W.DOWN ? O = 1 : No() && K && ($ === W.N ? O = 1 : $ === W.P && (O = -1)), O !== 0) {
|
|
1689
|
+
var F = Z(D + O, O);
|
|
1690
|
+
j(F), ie(F, !0);
|
|
1694
1691
|
}
|
|
1695
1692
|
break;
|
|
1696
1693
|
}
|
|
1697
1694
|
case W.TAB:
|
|
1698
1695
|
case W.ENTER: {
|
|
1699
|
-
var le, me =
|
|
1700
|
-
me && !(me != null && (le = me.data) !== null && le !== void 0 && le.disabled) && !Q ? se(me.value) : se(void 0),
|
|
1696
|
+
var le, me = A[D];
|
|
1697
|
+
me && !(me != null && (le = me.data) !== null && le !== void 0 && le.disabled) && !Q ? se(me.value) : se(void 0), i && y.preventDefault();
|
|
1701
1698
|
break;
|
|
1702
1699
|
}
|
|
1703
1700
|
case W.ESC:
|
|
1704
|
-
v(!1),
|
|
1701
|
+
v(!1), i && y.stopPropagation();
|
|
1705
1702
|
}
|
|
1706
1703
|
},
|
|
1707
1704
|
onKeyUp: function() {
|
|
@@ -1710,40 +1707,40 @@ var Vo = function(n, t) {
|
|
|
1710
1707
|
j(y);
|
|
1711
1708
|
}
|
|
1712
1709
|
};
|
|
1713
|
-
}),
|
|
1710
|
+
}), A.length === 0)
|
|
1714
1711
|
return /* @__PURE__ */ o.createElement("div", {
|
|
1715
1712
|
role: "listbox",
|
|
1716
|
-
id: "".concat(
|
|
1713
|
+
id: "".concat(l, "_list"),
|
|
1717
1714
|
className: "".concat(_, "-empty"),
|
|
1718
1715
|
onMouseDown: G
|
|
1719
1716
|
}, s);
|
|
1720
|
-
var
|
|
1721
|
-
return
|
|
1717
|
+
var ye = Object.keys(B).map(function(R) {
|
|
1718
|
+
return B[R];
|
|
1722
1719
|
}), ge = function(y) {
|
|
1723
1720
|
return y.label;
|
|
1724
1721
|
};
|
|
1725
|
-
function
|
|
1726
|
-
var
|
|
1722
|
+
function Re(R, y) {
|
|
1723
|
+
var $ = R.group;
|
|
1727
1724
|
return {
|
|
1728
|
-
role:
|
|
1729
|
-
id: "".concat(
|
|
1725
|
+
role: $ ? "presentation" : "option",
|
|
1726
|
+
id: "".concat(l, "_list_").concat(y)
|
|
1730
1727
|
};
|
|
1731
1728
|
}
|
|
1732
1729
|
var ce = function(y) {
|
|
1733
|
-
var
|
|
1734
|
-
if (
|
|
1730
|
+
var $ = A[y];
|
|
1731
|
+
if (!$)
|
|
1735
1732
|
return null;
|
|
1736
|
-
var K =
|
|
1737
|
-
return
|
|
1738
|
-
"aria-label": typeof me == "string" && !
|
|
1733
|
+
var K = $.data || {}, O = K.value, F = $.group, le = Fn(K, !0), me = ge($);
|
|
1734
|
+
return $ ? /* @__PURE__ */ o.createElement("div", on({
|
|
1735
|
+
"aria-label": typeof me == "string" && !F ? me : null
|
|
1739
1736
|
}, le, {
|
|
1740
1737
|
key: y
|
|
1741
|
-
},
|
|
1742
|
-
"aria-selected": J(
|
|
1743
|
-
}),
|
|
1738
|
+
}, Re($, y), {
|
|
1739
|
+
"aria-selected": J(O)
|
|
1740
|
+
}), O) : null;
|
|
1744
1741
|
}, pe = {
|
|
1745
1742
|
role: "listbox",
|
|
1746
|
-
id: "".concat(
|
|
1743
|
+
id: "".concat(l, "_list")
|
|
1747
1744
|
};
|
|
1748
1745
|
return /* @__PURE__ */ o.createElement(o.Fragment, null, p && /* @__PURE__ */ o.createElement("div", on({}, pe, {
|
|
1749
1746
|
style: {
|
|
@@ -1751,67 +1748,67 @@ var Vo = function(n, t) {
|
|
|
1751
1748
|
width: 0,
|
|
1752
1749
|
overflow: "hidden"
|
|
1753
1750
|
}
|
|
1754
|
-
}), ce(
|
|
1751
|
+
}), ce(D - 1), ce(D), ce(D + 1)), /* @__PURE__ */ o.createElement(Qt, {
|
|
1755
1752
|
itemKey: "key",
|
|
1756
|
-
ref:
|
|
1757
|
-
data:
|
|
1758
|
-
height:
|
|
1759
|
-
itemHeight:
|
|
1753
|
+
ref: X,
|
|
1754
|
+
data: A,
|
|
1755
|
+
height: L,
|
|
1756
|
+
itemHeight: H,
|
|
1760
1757
|
fullHeight: !1,
|
|
1761
1758
|
onMouseDown: G,
|
|
1762
|
-
onScroll:
|
|
1759
|
+
onScroll: h,
|
|
1763
1760
|
virtual: p,
|
|
1764
|
-
direction:
|
|
1761
|
+
direction: E,
|
|
1765
1762
|
innerProps: p ? null : pe
|
|
1766
|
-
}, function(
|
|
1767
|
-
var
|
|
1768
|
-
if (
|
|
1769
|
-
var re,
|
|
1763
|
+
}, function(R, y) {
|
|
1764
|
+
var $ = R.group, K = R.groupOption, O = R.data, F = R.label, le = R.value, me = O.key;
|
|
1765
|
+
if ($) {
|
|
1766
|
+
var re, Ce = (re = O.title) !== null && re !== void 0 ? re : Nt(F) ? F.toString() : void 0;
|
|
1770
1767
|
return /* @__PURE__ */ o.createElement("div", {
|
|
1771
|
-
className:
|
|
1772
|
-
title:
|
|
1773
|
-
},
|
|
1768
|
+
className: Be(_, "".concat(_, "-group"), O.className),
|
|
1769
|
+
title: Ce
|
|
1770
|
+
}, F !== void 0 ? F : me);
|
|
1774
1771
|
}
|
|
1775
|
-
var
|
|
1776
|
-
|
|
1777
|
-
var Ne =
|
|
1778
|
-
return xe !== void 0 && (
|
|
1772
|
+
var Le = O.disabled, xe = O.title;
|
|
1773
|
+
O.children;
|
|
1774
|
+
var Ne = O.style, de = O.className, Xe = wn(O, Po), Ge = Ht(Xe, ye), Se = ne(le), Me = Le || !Se && Q, we = "".concat(_, "-option"), Oe = Be(_, we, de, ae(ae(ae(ae({}, "".concat(we, "-grouped"), K), "".concat(we, "-active"), D === y && !Me), "".concat(we, "-disabled"), Me), "".concat(we, "-selected"), Se)), Pe = ge(R), en = !x || typeof x == "function" || Se, Ae = typeof Pe == "number" ? Pe : Pe || le, He = Nt(Ae) ? Ae.toString() : void 0;
|
|
1775
|
+
return xe !== void 0 && (He = xe), /* @__PURE__ */ o.createElement("div", on({}, Fn(Ge), p ? {} : Re(R, y), {
|
|
1779
1776
|
"aria-selected": J(le),
|
|
1780
|
-
className:
|
|
1781
|
-
title:
|
|
1777
|
+
className: Oe,
|
|
1778
|
+
title: He,
|
|
1782
1779
|
onMouseMove: function() {
|
|
1783
|
-
|
|
1780
|
+
D === y || Me || ie(y);
|
|
1784
1781
|
},
|
|
1785
1782
|
onClick: function() {
|
|
1786
|
-
|
|
1783
|
+
Me || se(le);
|
|
1787
1784
|
},
|
|
1788
1785
|
style: Ne
|
|
1789
1786
|
}), /* @__PURE__ */ o.createElement("div", {
|
|
1790
|
-
className: "".concat(
|
|
1791
|
-
}, typeof q == "function" ? q(
|
|
1787
|
+
className: "".concat(we, "-content")
|
|
1788
|
+
}, typeof q == "function" ? q(R, {
|
|
1792
1789
|
index: y
|
|
1793
|
-
}) :
|
|
1790
|
+
}) : Ae), /* @__PURE__ */ o.isValidElement(x) || Se, en && /* @__PURE__ */ o.createElement(jn, {
|
|
1794
1791
|
className: "".concat(_, "-option-state"),
|
|
1795
|
-
customizeIcon:
|
|
1792
|
+
customizeIcon: x,
|
|
1796
1793
|
customizeIconProps: {
|
|
1797
1794
|
value: le,
|
|
1798
|
-
disabled:
|
|
1795
|
+
disabled: Me,
|
|
1799
1796
|
isSelected: Se
|
|
1800
1797
|
}
|
|
1801
1798
|
}, Se ? "✓" : null));
|
|
1802
1799
|
}));
|
|
1803
|
-
},
|
|
1804
|
-
process.env.NODE_ENV !== "production" && (
|
|
1805
|
-
const
|
|
1800
|
+
}, Zt = /* @__PURE__ */ o.forwardRef(_o);
|
|
1801
|
+
process.env.NODE_ENV !== "production" && (Zt.displayName = "OptionList");
|
|
1802
|
+
const To = function(e, n) {
|
|
1806
1803
|
var t = o.useRef({
|
|
1807
1804
|
values: /* @__PURE__ */ new Map(),
|
|
1808
1805
|
options: /* @__PURE__ */ new Map()
|
|
1809
1806
|
}), r = o.useMemo(function() {
|
|
1810
|
-
var
|
|
1807
|
+
var l = t.current, i = l.values, u = l.options, d = e.map(function(s) {
|
|
1811
1808
|
if (s.label === void 0) {
|
|
1812
|
-
var
|
|
1809
|
+
var h;
|
|
1813
1810
|
return ee(ee({}, s), {}, {
|
|
1814
|
-
label: (
|
|
1811
|
+
label: (h = i.get(s.value)) === null || h === void 0 ? void 0 : h.label
|
|
1815
1812
|
});
|
|
1816
1813
|
}
|
|
1817
1814
|
return s;
|
|
@@ -1819,98 +1816,98 @@ const zo = function(e, n) {
|
|
|
1819
1816
|
return d.forEach(function(s) {
|
|
1820
1817
|
f.set(s.value, s), v.set(s.value, n.get(s.value) || u.get(s.value));
|
|
1821
1818
|
}), t.current.values = f, t.current.options = v, d;
|
|
1822
|
-
}, [e, n]), a = o.useCallback(function(
|
|
1823
|
-
return n.get(
|
|
1819
|
+
}, [e, n]), a = o.useCallback(function(l) {
|
|
1820
|
+
return n.get(l) || t.current.options.get(l);
|
|
1824
1821
|
}, [n]);
|
|
1825
1822
|
return [r, a];
|
|
1826
1823
|
};
|
|
1827
|
-
function
|
|
1828
|
-
return
|
|
1824
|
+
function Xn(e, n) {
|
|
1825
|
+
return lt(e).join("").toUpperCase().includes(n);
|
|
1829
1826
|
}
|
|
1830
|
-
const
|
|
1827
|
+
const Vo = function(e, n, t, r, a) {
|
|
1831
1828
|
return o.useMemo(function() {
|
|
1832
1829
|
if (!t || r === !1)
|
|
1833
1830
|
return e;
|
|
1834
|
-
var
|
|
1835
|
-
return a ?
|
|
1836
|
-
},
|
|
1837
|
-
return
|
|
1831
|
+
var l = n.options, i = n.label, u = n.value, d = [], f = typeof r == "function", v = t.toUpperCase(), s = f ? r : function(c, g) {
|
|
1832
|
+
return a ? Xn(g[a], v) : g[l] ? Xn(g[i !== "children" ? i : "label"], v) : Xn(g[u], v);
|
|
1833
|
+
}, h = f ? function(c) {
|
|
1834
|
+
return kn(c);
|
|
1838
1835
|
} : function(c) {
|
|
1839
1836
|
return c;
|
|
1840
1837
|
};
|
|
1841
1838
|
return e.forEach(function(c) {
|
|
1842
|
-
if (c[
|
|
1843
|
-
var g = s(t,
|
|
1839
|
+
if (c[l]) {
|
|
1840
|
+
var g = s(t, h(c));
|
|
1844
1841
|
if (g)
|
|
1845
1842
|
d.push(c);
|
|
1846
1843
|
else {
|
|
1847
|
-
var m = c[
|
|
1848
|
-
return s(t,
|
|
1844
|
+
var m = c[l].filter(function(S) {
|
|
1845
|
+
return s(t, h(S));
|
|
1849
1846
|
});
|
|
1850
|
-
m.length && d.push(ee(ee({}, c), {}, ae({},
|
|
1847
|
+
m.length && d.push(ee(ee({}, c), {}, ae({}, l, m)));
|
|
1851
1848
|
}
|
|
1852
1849
|
return;
|
|
1853
1850
|
}
|
|
1854
|
-
s(t,
|
|
1851
|
+
s(t, h(c)) && d.push(c);
|
|
1855
1852
|
}), d;
|
|
1856
1853
|
}, [e, r, a, t, n]);
|
|
1857
1854
|
};
|
|
1858
|
-
var
|
|
1859
|
-
function
|
|
1855
|
+
var Pt = 0, Lo = process.env.NODE_ENV !== "test" && gr();
|
|
1856
|
+
function Bo() {
|
|
1860
1857
|
var e;
|
|
1861
|
-
return
|
|
1858
|
+
return Lo ? (e = Pt, Pt += 1) : e = "TEST_OR_SSR", e;
|
|
1862
1859
|
}
|
|
1863
|
-
function
|
|
1860
|
+
function zo(e) {
|
|
1864
1861
|
var n = o.useState(), t = te(n, 2), r = t[0], a = t[1];
|
|
1865
1862
|
return o.useEffect(function() {
|
|
1866
|
-
a("rc_select_".concat(
|
|
1863
|
+
a("rc_select_".concat(Bo()));
|
|
1867
1864
|
}, []), e || r;
|
|
1868
1865
|
}
|
|
1869
|
-
var
|
|
1870
|
-
function
|
|
1871
|
-
var n = e, t = n.key, r = n.props, a = r.children,
|
|
1866
|
+
var Ho = ["children", "value"], Fo = ["children"];
|
|
1867
|
+
function Ao(e) {
|
|
1868
|
+
var n = e, t = n.key, r = n.props, a = r.children, l = r.value, i = wn(r, Ho);
|
|
1872
1869
|
return ee({
|
|
1873
1870
|
key: t,
|
|
1874
|
-
value:
|
|
1871
|
+
value: l !== void 0 ? l : t,
|
|
1875
1872
|
children: a
|
|
1876
|
-
},
|
|
1873
|
+
}, i);
|
|
1877
1874
|
}
|
|
1878
|
-
function
|
|
1875
|
+
function dt(e) {
|
|
1879
1876
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1880
|
-
return
|
|
1877
|
+
return Zn(e).map(function(t, r) {
|
|
1881
1878
|
if (!/* @__PURE__ */ o.isValidElement(t) || !t.type)
|
|
1882
1879
|
return null;
|
|
1883
|
-
var a = t,
|
|
1884
|
-
return n || !
|
|
1885
|
-
key: "__RC_SELECT_GRP__".concat(
|
|
1886
|
-
label:
|
|
1880
|
+
var a = t, l = a.type.isSelectOptGroup, i = a.key, u = a.props, d = u.children, f = wn(u, Fo);
|
|
1881
|
+
return n || !l ? Ao(t) : ee(ee({
|
|
1882
|
+
key: "__RC_SELECT_GRP__".concat(i === null ? r : i, "__"),
|
|
1883
|
+
label: i
|
|
1887
1884
|
}, f), {}, {
|
|
1888
|
-
options:
|
|
1885
|
+
options: dt(d)
|
|
1889
1886
|
});
|
|
1890
1887
|
}).filter(function(t) {
|
|
1891
1888
|
return t;
|
|
1892
1889
|
});
|
|
1893
1890
|
}
|
|
1894
|
-
var
|
|
1891
|
+
var jo = function(n, t, r, a, l) {
|
|
1895
1892
|
return o.useMemo(function() {
|
|
1896
|
-
var
|
|
1897
|
-
u && (
|
|
1893
|
+
var i = n, u = !n;
|
|
1894
|
+
u && (i = dt(t));
|
|
1898
1895
|
var d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), v = function(c, g, m) {
|
|
1899
1896
|
m && typeof m == "string" && c.set(g[m], g);
|
|
1900
|
-
}, s = function
|
|
1897
|
+
}, s = function h(c) {
|
|
1901
1898
|
for (var g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, m = 0; m < c.length; m += 1) {
|
|
1902
1899
|
var S = c[m];
|
|
1903
|
-
!S[r.options] || g ? (d.set(S[r.value], S), v(f, S, r.label), v(f, S, a), v(f, S,
|
|
1900
|
+
!S[r.options] || g ? (d.set(S[r.value], S), v(f, S, r.label), v(f, S, a), v(f, S, l)) : h(S[r.options], !0);
|
|
1904
1901
|
}
|
|
1905
1902
|
};
|
|
1906
|
-
return s(
|
|
1907
|
-
options:
|
|
1903
|
+
return s(i), {
|
|
1904
|
+
options: i,
|
|
1908
1905
|
valueOptions: d,
|
|
1909
1906
|
labelOptions: f
|
|
1910
1907
|
};
|
|
1911
|
-
}, [n, t, r, a,
|
|
1908
|
+
}, [n, t, r, a, l]);
|
|
1912
1909
|
};
|
|
1913
|
-
function
|
|
1910
|
+
function _t(e) {
|
|
1914
1911
|
var n = o.useRef();
|
|
1915
1912
|
n.current = e;
|
|
1916
1913
|
var t = o.useCallback(function() {
|
|
@@ -1918,66 +1915,66 @@ function Lt(e) {
|
|
|
1918
1915
|
}, []);
|
|
1919
1916
|
return t;
|
|
1920
1917
|
}
|
|
1921
|
-
function
|
|
1922
|
-
var n = e.mode, t = e.options, r = e.children, a = e.backfill,
|
|
1923
|
-
if (Ue(n !== "tags" ||
|
|
1918
|
+
function Wo(e) {
|
|
1919
|
+
var n = e.mode, t = e.options, r = e.children, a = e.backfill, l = e.allowClear, i = e.placeholder, u = e.getInputElement, d = e.showSearch, f = e.onSearch, v = e.defaultOpen, s = e.autoFocus, h = e.labelInValue, c = e.value, g = e.inputValue, m = e.optionLabelProp, S = An(n), C = d !== void 0 ? d : S || n === "combobox", b = t || dt(r);
|
|
1920
|
+
if (Ue(n !== "tags" || b.every(function(p) {
|
|
1924
1921
|
return !p.disabled;
|
|
1925
1922
|
}), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), n === "tags" || n === "combobox") {
|
|
1926
|
-
var
|
|
1927
|
-
return p.options ? p.options.some(function(
|
|
1928
|
-
return typeof ("value" in
|
|
1923
|
+
var x = b.some(function(p) {
|
|
1924
|
+
return p.options ? p.options.some(function(E) {
|
|
1925
|
+
return typeof ("value" in E ? E.value : E.key) == "number";
|
|
1929
1926
|
}) : typeof ("value" in p ? p.value : p.key) == "number";
|
|
1930
1927
|
});
|
|
1931
|
-
Ue(!
|
|
1928
|
+
Ue(!x, "`value` of Option should not use number type when `mode` is `tags` or `combobox`.");
|
|
1932
1929
|
}
|
|
1933
|
-
if (Ue(n !== "combobox" || !m, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), Ue(n === "combobox" || !a, "`backfill` only works with `combobox` mode."), Ue(n === "combobox" || !u, "`getInputElement` only work with `combobox` mode."),
|
|
1934
|
-
var
|
|
1935
|
-
Ue(!
|
|
1930
|
+
if (Ue(n !== "combobox" || !m, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), Ue(n === "combobox" || !a, "`backfill` only works with `combobox` mode."), Ue(n === "combobox" || !u, "`getInputElement` only work with `combobox` mode."), ht(n !== "combobox" || !u || !l || !i, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), f && !C && n !== "combobox" && n !== "tags" && Ue(!1, "`onSearch` should work with `showSearch` instead of use alone."), ht(!v || s, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."), c != null) {
|
|
1931
|
+
var w = lt(c);
|
|
1932
|
+
Ue(!h || w.every(function(p) {
|
|
1936
1933
|
return pn(p) === "object" && ("key" in p || "value" in p);
|
|
1937
1934
|
}), "`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"), Ue(!S || Array.isArray(c), "`value` should be array when `mode` is `multiple` or `tags`");
|
|
1938
1935
|
}
|
|
1939
1936
|
if (r) {
|
|
1940
|
-
var
|
|
1941
|
-
|
|
1937
|
+
var B = null;
|
|
1938
|
+
Zn(r).some(function(p) {
|
|
1942
1939
|
if (!/* @__PURE__ */ o.isValidElement(p) || !p.type)
|
|
1943
1940
|
return !1;
|
|
1944
|
-
var
|
|
1945
|
-
if (
|
|
1941
|
+
var E = p, L = E.type;
|
|
1942
|
+
if (L.isSelectOption)
|
|
1946
1943
|
return !1;
|
|
1947
|
-
if (
|
|
1948
|
-
var
|
|
1949
|
-
return !/* @__PURE__ */ o.isValidElement(q) || !p.type || q.type.isSelectOption ? !0 : (
|
|
1944
|
+
if (L.isSelectOptGroup) {
|
|
1945
|
+
var H = Zn(p.props.children).every(function(q) {
|
|
1946
|
+
return !/* @__PURE__ */ o.isValidElement(q) || !p.type || q.type.isSelectOption ? !0 : (B = q.type, !1);
|
|
1950
1947
|
});
|
|
1951
|
-
return !
|
|
1948
|
+
return !H;
|
|
1952
1949
|
}
|
|
1953
|
-
return
|
|
1954
|
-
}),
|
|
1950
|
+
return B = L, !0;
|
|
1951
|
+
}), B && Ue(!1, "`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(B.displayName || B.name || B, "`.")), Ue(g === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
|
|
1955
1952
|
}
|
|
1956
1953
|
}
|
|
1957
|
-
function
|
|
1954
|
+
function Ko(e, n) {
|
|
1958
1955
|
if (e) {
|
|
1959
1956
|
var t = function r(a) {
|
|
1960
|
-
for (var
|
|
1961
|
-
var u = a[
|
|
1957
|
+
for (var l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, i = 0; i < a.length; i++) {
|
|
1958
|
+
var u = a[i];
|
|
1962
1959
|
if (u[n == null ? void 0 : n.value] === null)
|
|
1963
1960
|
return Ue(!1, "`value` in Select options should not be `null`."), !0;
|
|
1964
|
-
if (!
|
|
1961
|
+
if (!l && Array.isArray(u[n == null ? void 0 : n.options]) && r(u[n == null ? void 0 : n.options], !0))
|
|
1965
1962
|
break;
|
|
1966
1963
|
}
|
|
1967
1964
|
};
|
|
1968
1965
|
t(e);
|
|
1969
1966
|
}
|
|
1970
1967
|
}
|
|
1971
|
-
var
|
|
1972
|
-
function
|
|
1968
|
+
var Uo = ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "optionRender", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "direction", "listHeight", "listItemHeight", "labelRender", "value", "defaultValue", "labelInValue", "onChange", "maxCount"], Xo = ["inputValue"];
|
|
1969
|
+
function Go(e) {
|
|
1973
1970
|
return !e || pn(e) !== "object";
|
|
1974
1971
|
}
|
|
1975
|
-
var
|
|
1976
|
-
var t = e.id, r = e.mode, a = e.prefixCls,
|
|
1977
|
-
return
|
|
1978
|
-
}, [
|
|
1972
|
+
var Jt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
1973
|
+
var t = e.id, r = e.mode, a = e.prefixCls, l = a === void 0 ? "rc-select" : a, i = e.backfill, u = e.fieldNames, d = e.inputValue, f = e.searchValue, v = e.onSearch, s = e.autoClearSearchValue, h = s === void 0 ? !0 : s, c = e.onSelect, g = e.onDeselect, m = e.dropdownMatchSelectWidth, S = m === void 0 ? !0 : m, C = e.filterOption, b = e.filterSort, x = e.optionFilterProp, w = e.optionLabelProp, B = e.options, p = e.optionRender, E = e.children, L = e.defaultActiveFirstOption, H = e.menuItemSelectedIcon, q = e.virtual, _ = e.direction, A = e.listHeight, X = A === void 0 ? 200 : A, Q = e.listItemHeight, G = Q === void 0 ? 20 : Q, j = e.labelRender, ne = e.value, Z = e.defaultValue, Y = e.labelInValue, I = e.onChange, D = e.maxCount, fe = wn(e, Uo), ie = zo(t), J = An(r), se = !!(!B && E), ye = o.useMemo(function() {
|
|
1974
|
+
return C === void 0 && r === "combobox" ? !1 : C;
|
|
1975
|
+
}, [C, r]), ge = o.useMemo(
|
|
1979
1976
|
function() {
|
|
1980
|
-
return
|
|
1977
|
+
return Xt(u, se);
|
|
1981
1978
|
},
|
|
1982
1979
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
1983
1980
|
[
|
|
@@ -1986,52 +1983,52 @@ var er = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
|
1986
1983
|
se
|
|
1987
1984
|
]
|
|
1988
1985
|
/* eslint-enable react-hooks/exhaustive-deps */
|
|
1989
|
-
),
|
|
1986
|
+
), Re = Qn("", {
|
|
1990
1987
|
value: f !== void 0 ? f : d,
|
|
1991
|
-
postState: function(
|
|
1992
|
-
return
|
|
1988
|
+
postState: function(z) {
|
|
1989
|
+
return z || "";
|
|
1993
1990
|
}
|
|
1994
|
-
}), ce = te(
|
|
1995
|
-
var
|
|
1996
|
-
return
|
|
1997
|
-
var
|
|
1998
|
-
if (
|
|
1999
|
-
|
|
1991
|
+
}), ce = te(Re, 2), pe = ce[0], R = ce[1], y = jo(B, E, ge, x, w), $ = y.valueOptions, K = y.labelOptions, O = y.options, F = o.useCallback(function(N) {
|
|
1992
|
+
var z = lt(N);
|
|
1993
|
+
return z.map(function(T) {
|
|
1994
|
+
var V, oe, be, Qe, je;
|
|
1995
|
+
if (Go(T))
|
|
1996
|
+
V = T;
|
|
2000
1997
|
else {
|
|
2001
1998
|
var nn;
|
|
2002
|
-
be =
|
|
1999
|
+
be = T.key, oe = T.label, V = (nn = T.value) !== null && nn !== void 0 ? nn : be;
|
|
2003
2000
|
}
|
|
2004
|
-
var Ie =
|
|
2001
|
+
var Ie = $.get(V);
|
|
2005
2002
|
if (Ie) {
|
|
2006
2003
|
var tn;
|
|
2007
|
-
if (oe === void 0 && (oe = Ie == null ? void 0 : Ie[
|
|
2008
|
-
var
|
|
2009
|
-
|
|
2004
|
+
if (oe === void 0 && (oe = Ie == null ? void 0 : Ie[w || ge.label]), be === void 0 && (be = (tn = Ie == null ? void 0 : Ie.key) !== null && tn !== void 0 ? tn : V), Qe = Ie == null ? void 0 : Ie.disabled, je = Ie == null ? void 0 : Ie.title, process.env.NODE_ENV !== "production" && !w) {
|
|
2005
|
+
var Ze = Ie == null ? void 0 : Ie[ge.label];
|
|
2006
|
+
Ze !== void 0 && !/* @__PURE__ */ o.isValidElement(Ze) && !/* @__PURE__ */ o.isValidElement(oe) && Ze !== oe && Ue(!1, "`label` of `value` is not same as `label` in Select options.");
|
|
2010
2007
|
}
|
|
2011
2008
|
}
|
|
2012
2009
|
return {
|
|
2013
2010
|
label: oe,
|
|
2014
|
-
value:
|
|
2011
|
+
value: V,
|
|
2015
2012
|
key: be,
|
|
2016
|
-
disabled:
|
|
2017
|
-
title:
|
|
2013
|
+
disabled: Qe,
|
|
2014
|
+
title: je
|
|
2018
2015
|
};
|
|
2019
2016
|
});
|
|
2020
|
-
}, [ge,
|
|
2017
|
+
}, [ge, w, $]), le = Qn(Z, {
|
|
2021
2018
|
value: ne
|
|
2022
|
-
}), me = te(le, 2), re = me[0],
|
|
2023
|
-
var N,
|
|
2024
|
-
return r === "combobox" &&
|
|
2025
|
-
}, [re,
|
|
2019
|
+
}), me = te(le, 2), re = me[0], Ce = me[1], Le = o.useMemo(function() {
|
|
2020
|
+
var N, z = J && re === null ? [] : re, T = F(z);
|
|
2021
|
+
return r === "combobox" && eo((N = T[0]) === null || N === void 0 ? void 0 : N.value) ? [] : T;
|
|
2022
|
+
}, [re, F, r, J]), xe = To(Le, $), Ne = te(xe, 2), de = Ne[0], Xe = Ne[1], Ge = o.useMemo(function() {
|
|
2026
2023
|
if (!r && de.length === 1) {
|
|
2027
2024
|
var N = de[0];
|
|
2028
2025
|
if (N.value === null && (N.label === null || N.label === void 0))
|
|
2029
2026
|
return [];
|
|
2030
2027
|
}
|
|
2031
|
-
return de.map(function(
|
|
2032
|
-
var
|
|
2033
|
-
return ee(ee({},
|
|
2034
|
-
label: (
|
|
2028
|
+
return de.map(function(z) {
|
|
2029
|
+
var T;
|
|
2030
|
+
return ee(ee({}, z), {}, {
|
|
2031
|
+
label: (T = typeof j == "function" ? j(z) : z.label) !== null && T !== void 0 ? T : z.value
|
|
2035
2032
|
});
|
|
2036
2033
|
});
|
|
2037
2034
|
}, [r, de, j]), Se = o.useMemo(function() {
|
|
@@ -2041,168 +2038,168 @@ var er = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
|
2041
2038
|
}, [de]);
|
|
2042
2039
|
o.useEffect(function() {
|
|
2043
2040
|
if (r === "combobox") {
|
|
2044
|
-
var N,
|
|
2045
|
-
|
|
2041
|
+
var N, z = (N = de[0]) === null || N === void 0 ? void 0 : N.value;
|
|
2042
|
+
R(kr(z) ? String(z) : "");
|
|
2046
2043
|
}
|
|
2047
2044
|
}, [de]);
|
|
2048
|
-
var
|
|
2049
|
-
var
|
|
2050
|
-
return ae(ae({}, ge.value, N), ge.label,
|
|
2051
|
-
}),
|
|
2045
|
+
var Me = _t(function(N, z) {
|
|
2046
|
+
var T = z ?? N;
|
|
2047
|
+
return ae(ae({}, ge.value, N), ge.label, T);
|
|
2048
|
+
}), we = o.useMemo(function() {
|
|
2052
2049
|
if (r !== "tags")
|
|
2053
|
-
return
|
|
2054
|
-
var N =
|
|
2055
|
-
return
|
|
2050
|
+
return O;
|
|
2051
|
+
var N = Ye(O), z = function(V) {
|
|
2052
|
+
return $.has(V);
|
|
2056
2053
|
};
|
|
2057
|
-
return
|
|
2058
|
-
return
|
|
2059
|
-
}).forEach(function(
|
|
2060
|
-
var
|
|
2061
|
-
V
|
|
2054
|
+
return Ye(de).sort(function(T, V) {
|
|
2055
|
+
return T.value < V.value ? -1 : 1;
|
|
2056
|
+
}).forEach(function(T) {
|
|
2057
|
+
var V = T.value;
|
|
2058
|
+
z(V) || N.push(Me(V, T.label));
|
|
2062
2059
|
}), N;
|
|
2063
|
-
}, [
|
|
2064
|
-
return r !== "tags" || !pe ||
|
|
2065
|
-
return N[
|
|
2066
|
-
}) ||
|
|
2060
|
+
}, [Me, O, $, de, r]), Oe = Vo(we, ge, pe, ye, x), Pe = o.useMemo(function() {
|
|
2061
|
+
return r !== "tags" || !pe || Oe.some(function(N) {
|
|
2062
|
+
return N[x || "value"] === pe;
|
|
2063
|
+
}) || Oe.some(function(N) {
|
|
2067
2064
|
return N[ge.value] === pe;
|
|
2068
|
-
}) ?
|
|
2069
|
-
}, [
|
|
2070
|
-
var
|
|
2071
|
-
return
|
|
2065
|
+
}) ? Oe : [Me(pe)].concat(Ye(Oe));
|
|
2066
|
+
}, [Me, x, r, Oe, pe, ge]), en = function N(z) {
|
|
2067
|
+
var T = Ye(z).sort(function(V, oe) {
|
|
2068
|
+
return b(V, oe, {
|
|
2072
2069
|
searchValue: pe
|
|
2073
2070
|
});
|
|
2074
2071
|
});
|
|
2075
|
-
return
|
|
2076
|
-
return Array.isArray(
|
|
2077
|
-
options:
|
|
2078
|
-
}) :
|
|
2072
|
+
return T.map(function(V) {
|
|
2073
|
+
return Array.isArray(V.options) ? ee(ee({}, V), {}, {
|
|
2074
|
+
options: V.options.length > 0 ? N(V.options) : V.options
|
|
2075
|
+
}) : V;
|
|
2079
2076
|
});
|
|
2080
|
-
},
|
|
2081
|
-
return
|
|
2082
|
-
}, [Pe,
|
|
2083
|
-
return
|
|
2077
|
+
}, Ae = o.useMemo(function() {
|
|
2078
|
+
return b ? en(Pe) : Pe;
|
|
2079
|
+
}, [Pe, b, pe]), He = o.useMemo(function() {
|
|
2080
|
+
return co(Ae, {
|
|
2084
2081
|
fieldNames: ge,
|
|
2085
2082
|
childrenAsData: se
|
|
2086
2083
|
});
|
|
2087
|
-
}, [
|
|
2088
|
-
var
|
|
2089
|
-
if (
|
|
2090
|
-
(
|
|
2091
|
-
var
|
|
2092
|
-
return ((
|
|
2084
|
+
}, [Ae, ge, se]), Ee = function(z) {
|
|
2085
|
+
var T = F(z);
|
|
2086
|
+
if (Ce(T), I && // Trigger event only when value changed
|
|
2087
|
+
(T.length !== de.length || T.some(function(be, Qe) {
|
|
2088
|
+
var je;
|
|
2089
|
+
return ((je = de[Qe]) === null || je === void 0 ? void 0 : je.value) !== (be == null ? void 0 : be.value);
|
|
2093
2090
|
}))) {
|
|
2094
|
-
var
|
|
2091
|
+
var V = Y ? T : T.map(function(be) {
|
|
2095
2092
|
return be.value;
|
|
2096
|
-
}), oe =
|
|
2097
|
-
return
|
|
2093
|
+
}), oe = T.map(function(be) {
|
|
2094
|
+
return kn(Xe(be.value));
|
|
2098
2095
|
});
|
|
2099
|
-
|
|
2096
|
+
I(
|
|
2100
2097
|
// Value
|
|
2101
|
-
J ?
|
|
2098
|
+
J ? V : V[0],
|
|
2102
2099
|
// Option
|
|
2103
2100
|
J ? oe : oe[0]
|
|
2104
2101
|
);
|
|
2105
2102
|
}
|
|
2106
|
-
}, hn = o.useState(null), Fe = te(hn, 2), _e = Fe[0],
|
|
2107
|
-
var
|
|
2108
|
-
bn(
|
|
2109
|
-
}, [
|
|
2103
|
+
}, hn = o.useState(null), Fe = te(hn, 2), _e = Fe[0], $e = Fe[1], $n = o.useState(0), En = te($n, 2), dn = En[0], bn = En[1], In = L !== void 0 ? L : r !== "combobox", cn = o.useCallback(function(N, z) {
|
|
2104
|
+
var T = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, V = T.source, oe = V === void 0 ? "keyboard" : V;
|
|
2105
|
+
bn(z), i && r === "combobox" && N !== null && oe === "keyboard" && $e(String(N));
|
|
2106
|
+
}, [i, r]), qe = function(z, T, V) {
|
|
2110
2107
|
var oe = function() {
|
|
2111
|
-
var rn,
|
|
2108
|
+
var rn, Je = Xe(z);
|
|
2112
2109
|
return [Y ? {
|
|
2113
|
-
label:
|
|
2114
|
-
value:
|
|
2115
|
-
key: (rn =
|
|
2116
|
-
} :
|
|
2110
|
+
label: Je == null ? void 0 : Je[ge.label],
|
|
2111
|
+
value: z,
|
|
2112
|
+
key: (rn = Je == null ? void 0 : Je.key) !== null && rn !== void 0 ? rn : z
|
|
2113
|
+
} : z, kn(Je)];
|
|
2117
2114
|
};
|
|
2118
|
-
if (
|
|
2119
|
-
var be = oe(),
|
|
2120
|
-
c(
|
|
2121
|
-
} else if (!
|
|
2122
|
-
var Ie = oe(), tn = te(Ie, 2),
|
|
2123
|
-
g(
|
|
2115
|
+
if (T && c) {
|
|
2116
|
+
var be = oe(), Qe = te(be, 2), je = Qe[0], nn = Qe[1];
|
|
2117
|
+
c(je, nn);
|
|
2118
|
+
} else if (!T && g && V !== "clear") {
|
|
2119
|
+
var Ie = oe(), tn = te(Ie, 2), Ze = tn[0], Nn = tn[1];
|
|
2120
|
+
g(Ze, Nn);
|
|
2124
2121
|
}
|
|
2125
|
-
}, fn =
|
|
2126
|
-
var
|
|
2127
|
-
|
|
2122
|
+
}, fn = _t(function(N, z) {
|
|
2123
|
+
var T, V = J ? z.selected : !0;
|
|
2124
|
+
V ? T = J ? [].concat(Ye(de), [N]) : [N] : T = de.filter(function(oe) {
|
|
2128
2125
|
return oe.value !== N;
|
|
2129
|
-
}), Ee(
|
|
2130
|
-
}), mn = function(
|
|
2131
|
-
Ee(
|
|
2132
|
-
var
|
|
2133
|
-
(
|
|
2134
|
-
|
|
2126
|
+
}), Ee(T), qe(N, V), r === "combobox" ? $e("") : (!An || h) && (R(""), $e(""));
|
|
2127
|
+
}), mn = function(z, T) {
|
|
2128
|
+
Ee(z);
|
|
2129
|
+
var V = T.type, oe = T.values;
|
|
2130
|
+
(V === "remove" || V === "clear") && oe.forEach(function(be) {
|
|
2131
|
+
qe(be.value, !1, V);
|
|
2135
2132
|
});
|
|
2136
|
-
},
|
|
2137
|
-
if (
|
|
2138
|
-
var
|
|
2139
|
-
if (
|
|
2140
|
-
var oe = Array.from(new Set([].concat(
|
|
2141
|
-
Ee(oe),
|
|
2133
|
+
}, De = function(z, T) {
|
|
2134
|
+
if (R(z), $e(null), T.source === "submit") {
|
|
2135
|
+
var V = (z || "").trim();
|
|
2136
|
+
if (V) {
|
|
2137
|
+
var oe = Array.from(new Set([].concat(Ye(Se), [V])));
|
|
2138
|
+
Ee(oe), qe(V, !0), R("");
|
|
2142
2139
|
}
|
|
2143
2140
|
return;
|
|
2144
2141
|
}
|
|
2145
|
-
|
|
2146
|
-
}, vn = function(
|
|
2147
|
-
var
|
|
2148
|
-
r !== "tags" && (
|
|
2142
|
+
T.source !== "blur" && (r === "combobox" && Ee(z), v == null || v(z));
|
|
2143
|
+
}, vn = function(z) {
|
|
2144
|
+
var T = z;
|
|
2145
|
+
r !== "tags" && (T = z.map(function(oe) {
|
|
2149
2146
|
var be = K.get(oe);
|
|
2150
2147
|
return be == null ? void 0 : be.value;
|
|
2151
2148
|
}).filter(function(oe) {
|
|
2152
2149
|
return oe !== void 0;
|
|
2153
2150
|
}));
|
|
2154
|
-
var
|
|
2155
|
-
Ee(
|
|
2156
|
-
|
|
2151
|
+
var V = Array.from(new Set([].concat(Ye(Se), Ye(T))));
|
|
2152
|
+
Ee(V), V.forEach(function(oe) {
|
|
2153
|
+
qe(oe, !0);
|
|
2157
2154
|
});
|
|
2158
2155
|
}, an = o.useMemo(function() {
|
|
2159
2156
|
var N = q !== !1 && S !== !1;
|
|
2160
2157
|
return ee(ee({}, y), {}, {
|
|
2161
|
-
flattenOptions:
|
|
2158
|
+
flattenOptions: He,
|
|
2162
2159
|
onActiveValue: cn,
|
|
2163
2160
|
defaultActiveFirstOption: In,
|
|
2164
2161
|
onSelect: fn,
|
|
2165
|
-
menuItemSelectedIcon:
|
|
2162
|
+
menuItemSelectedIcon: H,
|
|
2166
2163
|
rawValues: Se,
|
|
2167
2164
|
fieldNames: ge,
|
|
2168
2165
|
virtual: N,
|
|
2169
2166
|
direction: _,
|
|
2170
|
-
listHeight:
|
|
2167
|
+
listHeight: X,
|
|
2171
2168
|
listItemHeight: G,
|
|
2172
2169
|
childrenAsData: se,
|
|
2173
|
-
maxCount:
|
|
2170
|
+
maxCount: D,
|
|
2174
2171
|
optionRender: p
|
|
2175
2172
|
});
|
|
2176
|
-
}, [
|
|
2177
|
-
return process.env.NODE_ENV !== "production" && (
|
|
2173
|
+
}, [D, y, He, cn, In, fn, H, Se, ge, q, S, _, X, G, se, p]);
|
|
2174
|
+
return process.env.NODE_ENV !== "production" && (Wo(e), Ko(O, ge)), /* @__PURE__ */ o.createElement(ut.Provider, {
|
|
2178
2175
|
value: an
|
|
2179
|
-
}, /* @__PURE__ */ o.createElement(
|
|
2176
|
+
}, /* @__PURE__ */ o.createElement(Gt, on({}, fe, {
|
|
2180
2177
|
// >>> MISC
|
|
2181
2178
|
id: ie,
|
|
2182
|
-
prefixCls:
|
|
2179
|
+
prefixCls: l,
|
|
2183
2180
|
ref: n,
|
|
2184
|
-
omitDomProps:
|
|
2181
|
+
omitDomProps: Xo,
|
|
2185
2182
|
mode: r,
|
|
2186
|
-
displayValues:
|
|
2183
|
+
displayValues: Ge,
|
|
2187
2184
|
onDisplayValuesChange: mn,
|
|
2188
2185
|
direction: _,
|
|
2189
2186
|
searchValue: pe,
|
|
2190
|
-
onSearch:
|
|
2191
|
-
autoClearSearchValue:
|
|
2187
|
+
onSearch: De,
|
|
2188
|
+
autoClearSearchValue: h,
|
|
2192
2189
|
onSearchSplit: vn,
|
|
2193
2190
|
dropdownMatchSelectWidth: S,
|
|
2194
|
-
OptionList:
|
|
2195
|
-
emptyOptions: !
|
|
2191
|
+
OptionList: Zt,
|
|
2192
|
+
emptyOptions: !He.length,
|
|
2196
2193
|
activeValue: _e,
|
|
2197
2194
|
activeDescendantId: "".concat(ie, "_list_").concat(dn)
|
|
2198
2195
|
})));
|
|
2199
2196
|
});
|
|
2200
|
-
process.env.NODE_ENV !== "production" && (
|
|
2201
|
-
var
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
const
|
|
2205
|
-
const [, e] =
|
|
2197
|
+
process.env.NODE_ENV !== "production" && (Jt.displayName = "Select");
|
|
2198
|
+
var ft = Jt;
|
|
2199
|
+
ft.Option = st;
|
|
2200
|
+
ft.OptGroup = ct;
|
|
2201
|
+
const kt = () => {
|
|
2202
|
+
const [, e] = tt(), [n] = at("Empty"), r = new zn(e.colorBgBase).toHsl().l < 0.5 ? {
|
|
2206
2203
|
opacity: 0.65
|
|
2207
2204
|
} : {};
|
|
2208
2205
|
return /* @__PURE__ */ o.createElement("svg", {
|
|
@@ -2251,22 +2248,22 @@ const nr = () => {
|
|
|
2251
2248
|
d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
|
|
2252
2249
|
}))));
|
|
2253
2250
|
};
|
|
2254
|
-
process.env.NODE_ENV !== "production" && (
|
|
2255
|
-
const
|
|
2256
|
-
const [, e] =
|
|
2251
|
+
process.env.NODE_ENV !== "production" && (kt.displayName = "EmptyImage");
|
|
2252
|
+
const er = () => {
|
|
2253
|
+
const [, e] = tt(), [n] = at("Empty"), {
|
|
2257
2254
|
colorFill: t,
|
|
2258
2255
|
colorFillTertiary: r,
|
|
2259
2256
|
colorFillQuaternary: a,
|
|
2260
|
-
colorBgContainer:
|
|
2257
|
+
colorBgContainer: l
|
|
2261
2258
|
} = e, {
|
|
2262
|
-
borderColor:
|
|
2259
|
+
borderColor: i,
|
|
2263
2260
|
shadowColor: u,
|
|
2264
2261
|
contentColor: d
|
|
2265
|
-
} =
|
|
2266
|
-
borderColor: new zn(t).onBackground(
|
|
2267
|
-
shadowColor: new zn(r).onBackground(
|
|
2268
|
-
contentColor: new zn(a).onBackground(
|
|
2269
|
-
}), [t, r, a,
|
|
2262
|
+
} = fr(() => ({
|
|
2263
|
+
borderColor: new zn(t).onBackground(l).toHexString(),
|
|
2264
|
+
shadowColor: new zn(r).onBackground(l).toHexString(),
|
|
2265
|
+
contentColor: new zn(a).onBackground(l).toHexString()
|
|
2266
|
+
}), [t, r, a, l]);
|
|
2270
2267
|
return /* @__PURE__ */ o.createElement("svg", {
|
|
2271
2268
|
width: "64",
|
|
2272
2269
|
height: "41",
|
|
@@ -2284,7 +2281,7 @@ const tr = () => {
|
|
|
2284
2281
|
ry: "7"
|
|
2285
2282
|
}), /* @__PURE__ */ o.createElement("g", {
|
|
2286
2283
|
fillRule: "nonzero",
|
|
2287
|
-
stroke:
|
|
2284
|
+
stroke: i
|
|
2288
2285
|
}, /* @__PURE__ */ o.createElement("path", {
|
|
2289
2286
|
d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
|
2290
2287
|
}), /* @__PURE__ */ o.createElement("path", {
|
|
@@ -2292,21 +2289,21 @@ const tr = () => {
|
|
|
2292
2289
|
fill: d
|
|
2293
2290
|
}))));
|
|
2294
2291
|
};
|
|
2295
|
-
process.env.NODE_ENV !== "production" && (
|
|
2296
|
-
const
|
|
2292
|
+
process.env.NODE_ENV !== "production" && (er.displayName = "SimpleImage");
|
|
2293
|
+
const Yo = (e) => {
|
|
2297
2294
|
const {
|
|
2298
2295
|
componentCls: n,
|
|
2299
2296
|
margin: t,
|
|
2300
2297
|
marginXS: r,
|
|
2301
2298
|
marginXL: a,
|
|
2302
|
-
fontSize:
|
|
2303
|
-
lineHeight:
|
|
2299
|
+
fontSize: l,
|
|
2300
|
+
lineHeight: i
|
|
2304
2301
|
} = e;
|
|
2305
2302
|
return {
|
|
2306
2303
|
[n]: {
|
|
2307
2304
|
marginInline: r,
|
|
2308
|
-
fontSize:
|
|
2309
|
-
lineHeight:
|
|
2305
|
+
fontSize: l,
|
|
2306
|
+
lineHeight: i,
|
|
2310
2307
|
textAlign: "center",
|
|
2311
2308
|
// 原来 &-image 没有父子结构,现在为了外层承担我们的 hashId,改成父子结构
|
|
2312
2309
|
[`${n}-image`]: {
|
|
@@ -2348,85 +2345,85 @@ const ko = (e) => {
|
|
|
2348
2345
|
}
|
|
2349
2346
|
}
|
|
2350
2347
|
};
|
|
2351
|
-
},
|
|
2348
|
+
}, qo = Bt("Empty", (e) => {
|
|
2352
2349
|
const {
|
|
2353
2350
|
componentCls: n,
|
|
2354
2351
|
controlHeightLG: t,
|
|
2355
2352
|
calc: r
|
|
2356
|
-
} = e, a =
|
|
2353
|
+
} = e, a = Hn(e, {
|
|
2357
2354
|
emptyImgCls: `${n}-img`,
|
|
2358
2355
|
emptyImgHeight: r(t).mul(2.5).equal(),
|
|
2359
2356
|
emptyImgHeightMD: t,
|
|
2360
2357
|
emptyImgHeightSM: r(t).mul(0.875).equal()
|
|
2361
2358
|
});
|
|
2362
|
-
return [
|
|
2359
|
+
return [Yo(a)];
|
|
2363
2360
|
});
|
|
2364
|
-
var
|
|
2361
|
+
var Qo = function(e, n) {
|
|
2365
2362
|
var t = {};
|
|
2366
2363
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]);
|
|
2367
2364
|
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
|
|
2368
2365
|
n.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (t[r[a]] = e[r[a]]);
|
|
2369
2366
|
return t;
|
|
2370
2367
|
};
|
|
2371
|
-
const
|
|
2372
|
-
var n, t, r, a,
|
|
2368
|
+
const nr = /* @__PURE__ */ o.createElement(kt, null), tr = /* @__PURE__ */ o.createElement(er, null), gn = (e) => {
|
|
2369
|
+
var n, t, r, a, l, i, u, d;
|
|
2373
2370
|
const {
|
|
2374
2371
|
className: f,
|
|
2375
2372
|
rootClassName: v,
|
|
2376
2373
|
prefixCls: s,
|
|
2377
|
-
image:
|
|
2374
|
+
image: h = nr,
|
|
2378
2375
|
description: c,
|
|
2379
2376
|
children: g,
|
|
2380
2377
|
imageStyle: m,
|
|
2381
2378
|
style: S,
|
|
2382
|
-
classNames:
|
|
2383
|
-
styles:
|
|
2384
|
-
} = e,
|
|
2385
|
-
getPrefixCls:
|
|
2386
|
-
direction:
|
|
2379
|
+
classNames: C,
|
|
2380
|
+
styles: b
|
|
2381
|
+
} = e, x = Qo(e, ["className", "rootClassName", "prefixCls", "image", "description", "children", "imageStyle", "style", "classNames", "styles"]), {
|
|
2382
|
+
getPrefixCls: w,
|
|
2383
|
+
direction: B,
|
|
2387
2384
|
empty: p
|
|
2388
|
-
} = o.useContext(
|
|
2385
|
+
} = o.useContext(rt), E = w("empty", s), [L, H, q] = qo(E), [_] = at("Empty"), A = typeof c < "u" ? c : _ == null ? void 0 : _.description, X = typeof A == "string" ? A : "empty";
|
|
2389
2386
|
let Q = null;
|
|
2390
|
-
if (typeof
|
|
2391
|
-
alt:
|
|
2392
|
-
src:
|
|
2393
|
-
}) : Q =
|
|
2394
|
-
const G =
|
|
2387
|
+
if (typeof h == "string" ? Q = /* @__PURE__ */ o.createElement("img", {
|
|
2388
|
+
alt: X,
|
|
2389
|
+
src: h
|
|
2390
|
+
}) : Q = h, process.env.NODE_ENV !== "production") {
|
|
2391
|
+
const G = zt("Empty");
|
|
2395
2392
|
[["imageStyle", "styles: { image: {} }"]].forEach((j) => {
|
|
2396
2393
|
let [ne, Z] = j;
|
|
2397
2394
|
G.deprecated(!(ne in e), ne, Z);
|
|
2398
2395
|
});
|
|
2399
2396
|
}
|
|
2400
|
-
return
|
|
2401
|
-
className:
|
|
2402
|
-
[`${
|
|
2403
|
-
[`${
|
|
2404
|
-
}, f, v, (n = p == null ? void 0 : p.classNames) === null || n === void 0 ? void 0 : n.root,
|
|
2405
|
-
style: Object.assign(Object.assign(Object.assign(Object.assign({}, (t = p == null ? void 0 : p.styles) === null || t === void 0 ? void 0 : t.root), p == null ? void 0 : p.style),
|
|
2406
|
-
},
|
|
2407
|
-
className:
|
|
2408
|
-
style: Object.assign(Object.assign(Object.assign({}, m), (a = p == null ? void 0 : p.styles) === null || a === void 0 ? void 0 : a.image),
|
|
2409
|
-
}, Q),
|
|
2410
|
-
className:
|
|
2411
|
-
style: Object.assign(Object.assign({}, (
|
|
2412
|
-
},
|
|
2413
|
-
className:
|
|
2414
|
-
style: Object.assign(Object.assign({}, (d = p == null ? void 0 : p.styles) === null || d === void 0 ? void 0 : d.footer),
|
|
2397
|
+
return L(/* @__PURE__ */ o.createElement("div", Object.assign({
|
|
2398
|
+
className: Be(H, q, E, p == null ? void 0 : p.className, {
|
|
2399
|
+
[`${E}-normal`]: h === tr,
|
|
2400
|
+
[`${E}-rtl`]: B === "rtl"
|
|
2401
|
+
}, f, v, (n = p == null ? void 0 : p.classNames) === null || n === void 0 ? void 0 : n.root, C == null ? void 0 : C.root),
|
|
2402
|
+
style: Object.assign(Object.assign(Object.assign(Object.assign({}, (t = p == null ? void 0 : p.styles) === null || t === void 0 ? void 0 : t.root), p == null ? void 0 : p.style), b == null ? void 0 : b.root), S)
|
|
2403
|
+
}, x), /* @__PURE__ */ o.createElement("div", {
|
|
2404
|
+
className: Be(`${E}-image`, (r = p == null ? void 0 : p.classNames) === null || r === void 0 ? void 0 : r.image, C == null ? void 0 : C.image),
|
|
2405
|
+
style: Object.assign(Object.assign(Object.assign({}, m), (a = p == null ? void 0 : p.styles) === null || a === void 0 ? void 0 : a.image), b == null ? void 0 : b.image)
|
|
2406
|
+
}, Q), A && /* @__PURE__ */ o.createElement("div", {
|
|
2407
|
+
className: Be(`${E}-description`, (l = p == null ? void 0 : p.classNames) === null || l === void 0 ? void 0 : l.description, C == null ? void 0 : C.description),
|
|
2408
|
+
style: Object.assign(Object.assign({}, (i = p == null ? void 0 : p.styles) === null || i === void 0 ? void 0 : i.description), b == null ? void 0 : b.description)
|
|
2409
|
+
}, A), g && /* @__PURE__ */ o.createElement("div", {
|
|
2410
|
+
className: Be(`${E}-footer`, (u = p == null ? void 0 : p.classNames) === null || u === void 0 ? void 0 : u.footer, C == null ? void 0 : C.footer),
|
|
2411
|
+
style: Object.assign(Object.assign({}, (d = p == null ? void 0 : p.styles) === null || d === void 0 ? void 0 : d.footer), b == null ? void 0 : b.footer)
|
|
2415
2412
|
}, g)));
|
|
2416
2413
|
};
|
|
2417
|
-
gn.PRESENTED_IMAGE_DEFAULT =
|
|
2418
|
-
gn.PRESENTED_IMAGE_SIMPLE =
|
|
2414
|
+
gn.PRESENTED_IMAGE_DEFAULT = nr;
|
|
2415
|
+
gn.PRESENTED_IMAGE_SIMPLE = tr;
|
|
2419
2416
|
process.env.NODE_ENV !== "production" && (gn.displayName = "Empty");
|
|
2420
|
-
const
|
|
2417
|
+
const Zo = (e) => {
|
|
2421
2418
|
const {
|
|
2422
2419
|
componentName: n
|
|
2423
2420
|
} = e, {
|
|
2424
2421
|
getPrefixCls: t
|
|
2425
|
-
} =
|
|
2422
|
+
} = mr(rt), r = t("empty");
|
|
2426
2423
|
switch (n) {
|
|
2427
2424
|
case "Table":
|
|
2428
2425
|
case "List":
|
|
2429
|
-
return /* @__PURE__ */
|
|
2426
|
+
return /* @__PURE__ */ Rn.createElement(gn, {
|
|
2430
2427
|
image: gn.PRESENTED_IMAGE_SIMPLE
|
|
2431
2428
|
});
|
|
2432
2429
|
case "Select":
|
|
@@ -2434,16 +2431,16 @@ const ta = (e) => {
|
|
|
2434
2431
|
case "Cascader":
|
|
2435
2432
|
case "Transfer":
|
|
2436
2433
|
case "Mentions":
|
|
2437
|
-
return /* @__PURE__ */
|
|
2434
|
+
return /* @__PURE__ */ Rn.createElement(gn, {
|
|
2438
2435
|
image: gn.PRESENTED_IMAGE_SIMPLE,
|
|
2439
2436
|
className: `${r}-small`
|
|
2440
2437
|
});
|
|
2441
2438
|
case "Table.filter":
|
|
2442
2439
|
return null;
|
|
2443
2440
|
default:
|
|
2444
|
-
return /* @__PURE__ */
|
|
2441
|
+
return /* @__PURE__ */ Rn.createElement(gn, null);
|
|
2445
2442
|
}
|
|
2446
|
-
},
|
|
2443
|
+
}, Jo = (e) => {
|
|
2447
2444
|
const t = {
|
|
2448
2445
|
overflow: {
|
|
2449
2446
|
adjustX: !0,
|
|
@@ -2472,10 +2469,10 @@ const ta = (e) => {
|
|
|
2472
2469
|
})
|
|
2473
2470
|
};
|
|
2474
2471
|
};
|
|
2475
|
-
function
|
|
2476
|
-
return e ||
|
|
2472
|
+
function ko(e, n) {
|
|
2473
|
+
return e || Jo(n);
|
|
2477
2474
|
}
|
|
2478
|
-
const
|
|
2475
|
+
const Tt = (e) => {
|
|
2479
2476
|
const {
|
|
2480
2477
|
optionHeight: n,
|
|
2481
2478
|
optionFontSize: t,
|
|
@@ -2493,14 +2490,14 @@ const Ht = (e) => {
|
|
|
2493
2490
|
lineHeight: r,
|
|
2494
2491
|
boxSizing: "border-box"
|
|
2495
2492
|
};
|
|
2496
|
-
},
|
|
2493
|
+
}, ea = (e) => {
|
|
2497
2494
|
const {
|
|
2498
2495
|
antCls: n,
|
|
2499
2496
|
componentCls: t
|
|
2500
|
-
} = e, r = `${t}-item`, a = `&${n}-slide-up-enter${n}-slide-up-enter-active`,
|
|
2497
|
+
} = e, r = `${t}-item`, a = `&${n}-slide-up-enter${n}-slide-up-enter-active`, l = `&${n}-slide-up-appear${n}-slide-up-appear-active`, i = `&${n}-slide-up-leave${n}-slide-up-leave-active`, u = `${t}-dropdown-placement-`, d = `${r}-option-selected`;
|
|
2501
2498
|
return [
|
|
2502
2499
|
{
|
|
2503
|
-
[`${t}-dropdown`]: Object.assign(Object.assign({},
|
|
2500
|
+
[`${t}-dropdown`]: Object.assign(Object.assign({}, ot(e)), {
|
|
2504
2501
|
position: "absolute",
|
|
2505
2502
|
top: -9999,
|
|
2506
2503
|
zIndex: e.zIndexPopup,
|
|
@@ -2518,31 +2515,31 @@ const Ht = (e) => {
|
|
|
2518
2515
|
boxShadow: e.boxShadowSecondary,
|
|
2519
2516
|
[`
|
|
2520
2517
|
${a}${u}bottomLeft,
|
|
2521
|
-
${
|
|
2518
|
+
${l}${u}bottomLeft
|
|
2522
2519
|
`]: {
|
|
2523
|
-
animationName:
|
|
2520
|
+
animationName: Mr
|
|
2524
2521
|
},
|
|
2525
2522
|
[`
|
|
2526
2523
|
${a}${u}topLeft,
|
|
2527
|
-
${
|
|
2524
|
+
${l}${u}topLeft,
|
|
2528
2525
|
${a}${u}topRight,
|
|
2529
|
-
${
|
|
2526
|
+
${l}${u}topRight
|
|
2530
2527
|
`]: {
|
|
2531
|
-
animationName:
|
|
2528
|
+
animationName: Dr
|
|
2532
2529
|
},
|
|
2533
|
-
[`${
|
|
2534
|
-
animationName:
|
|
2530
|
+
[`${i}${u}bottomLeft`]: {
|
|
2531
|
+
animationName: $r
|
|
2535
2532
|
},
|
|
2536
2533
|
[`
|
|
2537
|
-
${
|
|
2538
|
-
${
|
|
2534
|
+
${i}${u}topLeft,
|
|
2535
|
+
${i}${u}topRight
|
|
2539
2536
|
`]: {
|
|
2540
|
-
animationName:
|
|
2537
|
+
animationName: Nr
|
|
2541
2538
|
},
|
|
2542
2539
|
"&-hidden": {
|
|
2543
2540
|
display: "none"
|
|
2544
2541
|
},
|
|
2545
|
-
[r]: Object.assign(Object.assign({},
|
|
2542
|
+
[r]: Object.assign(Object.assign({}, Tt(e)), {
|
|
2546
2543
|
cursor: "pointer",
|
|
2547
2544
|
transition: `background ${e.motionDurationSlow} ease`,
|
|
2548
2545
|
borderRadius: e.borderRadiusSM,
|
|
@@ -2557,7 +2554,7 @@ const Ht = (e) => {
|
|
|
2557
2554
|
display: "flex",
|
|
2558
2555
|
"&-content": Object.assign({
|
|
2559
2556
|
flex: "auto"
|
|
2560
|
-
},
|
|
2557
|
+
}, qn),
|
|
2561
2558
|
"&-state": {
|
|
2562
2559
|
flex: "none",
|
|
2563
2560
|
display: "flex",
|
|
@@ -2585,7 +2582,7 @@ const Ht = (e) => {
|
|
|
2585
2582
|
paddingInlineStart: e.calc(e.controlPaddingHorizontal).mul(2).equal()
|
|
2586
2583
|
}
|
|
2587
2584
|
},
|
|
2588
|
-
"&-empty": Object.assign(Object.assign({},
|
|
2585
|
+
"&-empty": Object.assign(Object.assign({}, Tt(e)), {
|
|
2589
2586
|
color: e.colorTextDisabled
|
|
2590
2587
|
})
|
|
2591
2588
|
}),
|
|
@@ -2605,280 +2602,24 @@ const Ht = (e) => {
|
|
|
2605
2602
|
})
|
|
2606
2603
|
},
|
|
2607
2604
|
// Follow code may reuse in other components
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2605
|
+
Ct(e, "slide-up"),
|
|
2606
|
+
Ct(e, "slide-down"),
|
|
2607
|
+
yt(e, "move-up"),
|
|
2608
|
+
yt(e, "move-down")
|
|
2612
2609
|
];
|
|
2613
|
-
}, ia = (e) => {
|
|
2614
|
-
const {
|
|
2615
|
-
multipleSelectItemHeight: n,
|
|
2616
|
-
paddingXXS: t,
|
|
2617
|
-
lineWidth: r,
|
|
2618
|
-
INTERNAL_FIXED_ITEM_MARGIN: a
|
|
2619
|
-
} = e, i = e.max(e.calc(t).sub(r).equal(), 0), l = e.max(e.calc(i).sub(a).equal(), 0);
|
|
2620
|
-
return {
|
|
2621
|
-
basePadding: i,
|
|
2622
|
-
containerPadding: l,
|
|
2623
|
-
itemHeight: He(n),
|
|
2624
|
-
itemLineHeight: He(e.calc(n).sub(e.calc(e.lineWidth).mul(2)).equal())
|
|
2625
|
-
};
|
|
2626
|
-
}, la = (e) => {
|
|
2627
|
-
const {
|
|
2628
|
-
multipleSelectItemHeight: n,
|
|
2629
|
-
selectHeight: t,
|
|
2630
|
-
lineWidth: r
|
|
2631
|
-
} = e;
|
|
2632
|
-
return e.calc(t).sub(n).div(2).sub(r).equal();
|
|
2633
|
-
}, ua = (e) => {
|
|
2634
|
-
const {
|
|
2635
|
-
componentCls: n,
|
|
2636
|
-
iconCls: t,
|
|
2637
|
-
borderRadiusSM: r,
|
|
2638
|
-
motionDurationSlow: a,
|
|
2639
|
-
paddingXS: i,
|
|
2640
|
-
multipleItemColorDisabled: l,
|
|
2641
|
-
multipleItemBorderColorDisabled: u,
|
|
2642
|
-
colorIcon: d,
|
|
2643
|
-
colorIconHover: f,
|
|
2644
|
-
INTERNAL_FIXED_ITEM_MARGIN: v
|
|
2645
|
-
} = e;
|
|
2646
|
-
return {
|
|
2647
|
-
/**
|
|
2648
|
-
* Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
|
|
2649
|
-
* may update to redesign with its align logic.
|
|
2650
|
-
*/
|
|
2651
|
-
// =========================== Overflow ===========================
|
|
2652
|
-
[`${n}-selection-overflow`]: {
|
|
2653
|
-
position: "relative",
|
|
2654
|
-
display: "flex",
|
|
2655
|
-
flex: "auto",
|
|
2656
|
-
flexWrap: "wrap",
|
|
2657
|
-
maxWidth: "100%",
|
|
2658
|
-
"&-item": {
|
|
2659
|
-
flex: "none",
|
|
2660
|
-
alignSelf: "center",
|
|
2661
|
-
maxWidth: "100%",
|
|
2662
|
-
display: "inline-flex"
|
|
2663
|
-
},
|
|
2664
|
-
// ======================== Selections ==========================
|
|
2665
|
-
[`${n}-selection-item`]: {
|
|
2666
|
-
display: "flex",
|
|
2667
|
-
alignSelf: "center",
|
|
2668
|
-
flex: "none",
|
|
2669
|
-
boxSizing: "border-box",
|
|
2670
|
-
maxWidth: "100%",
|
|
2671
|
-
marginBlock: v,
|
|
2672
|
-
borderRadius: r,
|
|
2673
|
-
cursor: "default",
|
|
2674
|
-
transition: `font-size ${a}, line-height ${a}, height ${a}`,
|
|
2675
|
-
marginInlineEnd: e.calc(v).mul(2).equal(),
|
|
2676
|
-
paddingInlineStart: i,
|
|
2677
|
-
paddingInlineEnd: e.calc(i).div(2).equal(),
|
|
2678
|
-
[`${n}-disabled&`]: {
|
|
2679
|
-
color: l,
|
|
2680
|
-
borderColor: u,
|
|
2681
|
-
cursor: "not-allowed"
|
|
2682
|
-
},
|
|
2683
|
-
// It's ok not to do this, but 24px makes bottom narrow in view should adjust
|
|
2684
|
-
"&-content": {
|
|
2685
|
-
display: "inline-block",
|
|
2686
|
-
marginInlineEnd: e.calc(i).div(2).equal(),
|
|
2687
|
-
overflow: "hidden",
|
|
2688
|
-
whiteSpace: "pre",
|
|
2689
|
-
// fix whitespace wrapping. custom tags display all whitespace within.
|
|
2690
|
-
textOverflow: "ellipsis"
|
|
2691
|
-
},
|
|
2692
|
-
"&-remove": Object.assign(Object.assign({}, At()), {
|
|
2693
|
-
display: "inline-flex",
|
|
2694
|
-
alignItems: "center",
|
|
2695
|
-
color: d,
|
|
2696
|
-
fontWeight: "bold",
|
|
2697
|
-
fontSize: 10,
|
|
2698
|
-
lineHeight: "inherit",
|
|
2699
|
-
cursor: "pointer",
|
|
2700
|
-
[`> ${t}`]: {
|
|
2701
|
-
verticalAlign: "-0.2em"
|
|
2702
|
-
},
|
|
2703
|
-
"&:hover": {
|
|
2704
|
-
color: f
|
|
2705
|
-
}
|
|
2706
|
-
})
|
|
2707
|
-
}
|
|
2708
|
-
}
|
|
2709
|
-
};
|
|
2710
|
-
}, ca = (e, n) => {
|
|
2711
|
-
const {
|
|
2712
|
-
componentCls: t,
|
|
2713
|
-
INTERNAL_FIXED_ITEM_MARGIN: r
|
|
2714
|
-
} = e, a = `${t}-selection-overflow`, i = e.multipleSelectItemHeight, l = la(e), u = n ? `${t}-${n}` : "", d = ia(e);
|
|
2715
|
-
return {
|
|
2716
|
-
[`${t}-multiple${u}`]: Object.assign(Object.assign({}, ua(e)), {
|
|
2717
|
-
// ========================= Selector =========================
|
|
2718
|
-
[`${t}-selector`]: {
|
|
2719
|
-
display: "flex",
|
|
2720
|
-
alignItems: "center",
|
|
2721
|
-
width: "100%",
|
|
2722
|
-
height: "100%",
|
|
2723
|
-
// Multiple is little different that horizontal is follow the vertical
|
|
2724
|
-
paddingInline: d.basePadding,
|
|
2725
|
-
paddingBlock: d.containerPadding,
|
|
2726
|
-
borderRadius: e.borderRadius,
|
|
2727
|
-
[`${t}-disabled&`]: {
|
|
2728
|
-
background: e.multipleSelectorBgDisabled,
|
|
2729
|
-
cursor: "not-allowed"
|
|
2730
|
-
},
|
|
2731
|
-
"&:after": {
|
|
2732
|
-
display: "inline-block",
|
|
2733
|
-
width: 0,
|
|
2734
|
-
margin: `${He(r)} 0`,
|
|
2735
|
-
lineHeight: He(i),
|
|
2736
|
-
visibility: "hidden",
|
|
2737
|
-
content: '"\\a0"'
|
|
2738
|
-
}
|
|
2739
|
-
},
|
|
2740
|
-
// ======================== Selections ========================
|
|
2741
|
-
[`${t}-selection-item`]: {
|
|
2742
|
-
height: d.itemHeight,
|
|
2743
|
-
lineHeight: He(d.itemLineHeight)
|
|
2744
|
-
},
|
|
2745
|
-
// ========================== Wrap ===========================
|
|
2746
|
-
[`${t}-selection-wrap`]: {
|
|
2747
|
-
alignSelf: "flex-start",
|
|
2748
|
-
"&:after": {
|
|
2749
|
-
lineHeight: He(i),
|
|
2750
|
-
marginBlock: r
|
|
2751
|
-
}
|
|
2752
|
-
},
|
|
2753
|
-
// ========================== Input ==========================
|
|
2754
|
-
[`${t}-prefix`]: {
|
|
2755
|
-
marginInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(d.basePadding).equal()
|
|
2756
|
-
},
|
|
2757
|
-
[`${a}-item + ${a}-item,
|
|
2758
|
-
${t}-prefix + ${t}-selection-wrap
|
|
2759
|
-
`]: {
|
|
2760
|
-
[`${t}-selection-search`]: {
|
|
2761
|
-
marginInlineStart: 0
|
|
2762
|
-
},
|
|
2763
|
-
[`${t}-selection-placeholder`]: {
|
|
2764
|
-
insetInlineStart: 0
|
|
2765
|
-
}
|
|
2766
|
-
},
|
|
2767
|
-
// https://github.com/ant-design/ant-design/issues/44754
|
|
2768
|
-
// Same as `wrap:after`
|
|
2769
|
-
[`${a}-item-suffix`]: {
|
|
2770
|
-
minHeight: d.itemHeight,
|
|
2771
|
-
marginBlock: r
|
|
2772
|
-
},
|
|
2773
|
-
[`${t}-selection-search`]: {
|
|
2774
|
-
display: "inline-flex",
|
|
2775
|
-
position: "relative",
|
|
2776
|
-
maxWidth: "100%",
|
|
2777
|
-
marginInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(l).equal(),
|
|
2778
|
-
"\n &-input,\n &-mirror\n ": {
|
|
2779
|
-
height: i,
|
|
2780
|
-
fontFamily: e.fontFamily,
|
|
2781
|
-
lineHeight: He(i),
|
|
2782
|
-
transition: `all ${e.motionDurationSlow}`
|
|
2783
|
-
},
|
|
2784
|
-
"&-input": {
|
|
2785
|
-
width: "100%",
|
|
2786
|
-
minWidth: 4.1
|
|
2787
|
-
// fix search cursor missing
|
|
2788
|
-
},
|
|
2789
|
-
"&-mirror": {
|
|
2790
|
-
position: "absolute",
|
|
2791
|
-
top: 0,
|
|
2792
|
-
insetInlineStart: 0,
|
|
2793
|
-
insetInlineEnd: "auto",
|
|
2794
|
-
zIndex: 999,
|
|
2795
|
-
whiteSpace: "pre",
|
|
2796
|
-
// fix whitespace wrapping caused width calculation bug
|
|
2797
|
-
visibility: "hidden"
|
|
2798
|
-
}
|
|
2799
|
-
},
|
|
2800
|
-
// ======================= Placeholder =======================
|
|
2801
|
-
[`${t}-selection-placeholder`]: {
|
|
2802
|
-
position: "absolute",
|
|
2803
|
-
top: "50%",
|
|
2804
|
-
insetInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(d.basePadding).equal(),
|
|
2805
|
-
insetInlineEnd: e.inputPaddingHorizontalBase,
|
|
2806
|
-
transform: "translateY(-50%)",
|
|
2807
|
-
transition: `all ${e.motionDurationSlow}`
|
|
2808
|
-
}
|
|
2809
|
-
})
|
|
2810
|
-
};
|
|
2811
2610
|
};
|
|
2812
2611
|
function Gn(e, n) {
|
|
2813
|
-
const {
|
|
2814
|
-
componentCls: t
|
|
2815
|
-
} = e, r = n ? `${t}-${n}` : "", a = {
|
|
2816
|
-
[`${t}-multiple${r}`]: {
|
|
2817
|
-
fontSize: e.fontSize,
|
|
2818
|
-
// ========================= Selector =========================
|
|
2819
|
-
[`${t}-selector`]: {
|
|
2820
|
-
[`${t}-show-search&`]: {
|
|
2821
|
-
cursor: "text"
|
|
2822
|
-
}
|
|
2823
|
-
},
|
|
2824
|
-
[`
|
|
2825
|
-
&${t}-show-arrow ${t}-selector,
|
|
2826
|
-
&${t}-allow-clear ${t}-selector
|
|
2827
|
-
`]: {
|
|
2828
|
-
paddingInlineEnd: e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()
|
|
2829
|
-
}
|
|
2830
|
-
}
|
|
2831
|
-
};
|
|
2832
|
-
return [ca(e, n), a];
|
|
2833
|
-
}
|
|
2834
|
-
const sa = (e) => {
|
|
2835
|
-
const {
|
|
2836
|
-
componentCls: n
|
|
2837
|
-
} = e, t = Mn(e, {
|
|
2838
|
-
selectHeight: e.controlHeightSM,
|
|
2839
|
-
multipleSelectItemHeight: e.multipleItemHeightSM,
|
|
2840
|
-
borderRadius: e.borderRadiusSM,
|
|
2841
|
-
borderRadiusSM: e.borderRadiusXS
|
|
2842
|
-
}), r = Mn(e, {
|
|
2843
|
-
fontSize: e.fontSizeLG,
|
|
2844
|
-
selectHeight: e.controlHeightLG,
|
|
2845
|
-
multipleSelectItemHeight: e.multipleItemHeightLG,
|
|
2846
|
-
borderRadius: e.borderRadiusLG,
|
|
2847
|
-
borderRadiusSM: e.borderRadius
|
|
2848
|
-
});
|
|
2849
|
-
return [
|
|
2850
|
-
Gn(e),
|
|
2851
|
-
// ======================== Small ========================
|
|
2852
|
-
Gn(t, "sm"),
|
|
2853
|
-
// Padding
|
|
2854
|
-
{
|
|
2855
|
-
[`${n}-multiple${n}-sm`]: {
|
|
2856
|
-
[`${n}-selection-placeholder`]: {
|
|
2857
|
-
insetInline: e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()
|
|
2858
|
-
},
|
|
2859
|
-
// https://github.com/ant-design/ant-design/issues/29559
|
|
2860
|
-
[`${n}-selection-search`]: {
|
|
2861
|
-
marginInlineStart: 2
|
|
2862
|
-
// Magic Number
|
|
2863
|
-
}
|
|
2864
|
-
}
|
|
2865
|
-
},
|
|
2866
|
-
// ======================== Large ========================
|
|
2867
|
-
Gn(r, "lg")
|
|
2868
|
-
];
|
|
2869
|
-
};
|
|
2870
|
-
function Yn(e, n) {
|
|
2871
2612
|
const {
|
|
2872
2613
|
componentCls: t,
|
|
2873
2614
|
inputPaddingHorizontalBase: r,
|
|
2874
2615
|
borderRadius: a
|
|
2875
|
-
} = e,
|
|
2616
|
+
} = e, l = e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(), i = n ? `${t}-${n}` : "";
|
|
2876
2617
|
return {
|
|
2877
|
-
[`${t}-single${
|
|
2618
|
+
[`${t}-single${i}`]: {
|
|
2878
2619
|
fontSize: e.fontSize,
|
|
2879
2620
|
height: e.controlHeight,
|
|
2880
2621
|
// ========================= Selector =========================
|
|
2881
|
-
[`${t}-selector`]: Object.assign(Object.assign({},
|
|
2622
|
+
[`${t}-selector`]: Object.assign(Object.assign({}, ot(e, !0)), {
|
|
2882
2623
|
display: "flex",
|
|
2883
2624
|
borderRadius: a,
|
|
2884
2625
|
flex: "1 1 auto",
|
|
@@ -2897,7 +2638,7 @@ function Yn(e, n) {
|
|
|
2897
2638
|
`]: {
|
|
2898
2639
|
display: "block",
|
|
2899
2640
|
padding: 0,
|
|
2900
|
-
lineHeight:
|
|
2641
|
+
lineHeight: ke(l),
|
|
2901
2642
|
transition: `all ${e.motionDurationSlow}, visibility 0s`,
|
|
2902
2643
|
alignSelf: "center"
|
|
2903
2644
|
},
|
|
@@ -2938,12 +2679,12 @@ function Yn(e, n) {
|
|
|
2938
2679
|
width: "100%",
|
|
2939
2680
|
height: "100%",
|
|
2940
2681
|
alignItems: "center",
|
|
2941
|
-
padding: `0 ${
|
|
2682
|
+
padding: `0 ${ke(r)}`,
|
|
2942
2683
|
[`${t}-selection-search-input`]: {
|
|
2943
|
-
height:
|
|
2684
|
+
height: l
|
|
2944
2685
|
},
|
|
2945
2686
|
"&:after": {
|
|
2946
|
-
lineHeight:
|
|
2687
|
+
lineHeight: ke(l)
|
|
2947
2688
|
}
|
|
2948
2689
|
}
|
|
2949
2690
|
},
|
|
@@ -2960,7 +2701,7 @@ function Yn(e, n) {
|
|
|
2960
2701
|
position: "absolute",
|
|
2961
2702
|
insetInlineStart: 0,
|
|
2962
2703
|
insetInlineEnd: 0,
|
|
2963
|
-
padding: `0 ${
|
|
2704
|
+
padding: `0 ${ke(r)}`,
|
|
2964
2705
|
"&:after": {
|
|
2965
2706
|
display: "none"
|
|
2966
2707
|
}
|
|
@@ -2970,15 +2711,15 @@ function Yn(e, n) {
|
|
|
2970
2711
|
}
|
|
2971
2712
|
};
|
|
2972
2713
|
}
|
|
2973
|
-
function
|
|
2714
|
+
function na(e) {
|
|
2974
2715
|
const {
|
|
2975
2716
|
componentCls: n
|
|
2976
2717
|
} = e, t = e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();
|
|
2977
2718
|
return [
|
|
2978
|
-
|
|
2719
|
+
Gn(e),
|
|
2979
2720
|
// ======================== Small ========================
|
|
2980
2721
|
// Shared
|
|
2981
|
-
|
|
2722
|
+
Gn(Hn(e, {
|
|
2982
2723
|
controlHeight: e.controlHeightSM,
|
|
2983
2724
|
borderRadius: e.borderRadiusSM
|
|
2984
2725
|
}), "sm"),
|
|
@@ -2987,7 +2728,7 @@ function da(e) {
|
|
|
2987
2728
|
[`${n}-single${n}-sm`]: {
|
|
2988
2729
|
[`&:not(${n}-customize-input)`]: {
|
|
2989
2730
|
[`${n}-selector`]: {
|
|
2990
|
-
padding: `0 ${
|
|
2731
|
+
padding: `0 ${ke(t)}`
|
|
2991
2732
|
},
|
|
2992
2733
|
// With arrow should provides `padding-right` to show the arrow
|
|
2993
2734
|
[`&${n}-show-arrow ${n}-selection-search`]: {
|
|
@@ -3004,42 +2745,42 @@ function da(e) {
|
|
|
3004
2745
|
},
|
|
3005
2746
|
// ======================== Large ========================
|
|
3006
2747
|
// Shared
|
|
3007
|
-
|
|
2748
|
+
Gn(Hn(e, {
|
|
3008
2749
|
controlHeight: e.singleItemHeightLG,
|
|
3009
2750
|
fontSize: e.fontSizeLG,
|
|
3010
2751
|
borderRadius: e.borderRadiusLG
|
|
3011
2752
|
}), "lg")
|
|
3012
2753
|
];
|
|
3013
2754
|
}
|
|
3014
|
-
const
|
|
2755
|
+
const ta = (e) => {
|
|
3015
2756
|
const {
|
|
3016
2757
|
fontSize: n,
|
|
3017
2758
|
lineHeight: t,
|
|
3018
2759
|
lineWidth: r,
|
|
3019
2760
|
controlHeight: a,
|
|
3020
|
-
controlHeightSM:
|
|
3021
|
-
controlHeightLG:
|
|
2761
|
+
controlHeightSM: l,
|
|
2762
|
+
controlHeightLG: i,
|
|
3022
2763
|
paddingXXS: u,
|
|
3023
2764
|
controlPaddingHorizontal: d,
|
|
3024
2765
|
zIndexPopupBase: f,
|
|
3025
2766
|
colorText: v,
|
|
3026
2767
|
fontWeightStrong: s,
|
|
3027
|
-
controlItemBgActive:
|
|
2768
|
+
controlItemBgActive: h,
|
|
3028
2769
|
controlItemBgHover: c,
|
|
3029
2770
|
colorBgContainer: g,
|
|
3030
2771
|
colorFillSecondary: m,
|
|
3031
2772
|
colorBgContainerDisabled: S,
|
|
3032
|
-
colorTextDisabled:
|
|
3033
|
-
colorPrimaryHover:
|
|
3034
|
-
colorPrimary:
|
|
3035
|
-
controlOutline:
|
|
3036
|
-
} = e,
|
|
2773
|
+
colorTextDisabled: C,
|
|
2774
|
+
colorPrimaryHover: b,
|
|
2775
|
+
colorPrimary: x,
|
|
2776
|
+
controlOutline: w
|
|
2777
|
+
} = e, B = u * 2, p = r * 2, E = Math.min(a - B, a - p), L = Math.min(l - B, l - p), H = Math.min(i - B, i - p);
|
|
3037
2778
|
return {
|
|
3038
2779
|
INTERNAL_FIXED_ITEM_MARGIN: Math.floor(u / 2),
|
|
3039
2780
|
zIndexPopup: f + 50,
|
|
3040
2781
|
optionSelectedColor: v,
|
|
3041
2782
|
optionSelectedFontWeight: s,
|
|
3042
|
-
optionSelectedBg:
|
|
2783
|
+
optionSelectedBg: h,
|
|
3043
2784
|
optionActiveBg: c,
|
|
3044
2785
|
optionPadding: `${(a - n * t) / 2}px ${d}px`,
|
|
3045
2786
|
optionFontSize: n,
|
|
@@ -3047,22 +2788,22 @@ const fa = (e) => {
|
|
|
3047
2788
|
optionHeight: a,
|
|
3048
2789
|
selectorBg: g,
|
|
3049
2790
|
clearBg: g,
|
|
3050
|
-
singleItemHeightLG:
|
|
2791
|
+
singleItemHeightLG: i,
|
|
3051
2792
|
multipleItemBg: m,
|
|
3052
2793
|
multipleItemBorderColor: "transparent",
|
|
3053
|
-
multipleItemHeight:
|
|
3054
|
-
multipleItemHeightSM:
|
|
3055
|
-
multipleItemHeightLG:
|
|
2794
|
+
multipleItemHeight: E,
|
|
2795
|
+
multipleItemHeightSM: L,
|
|
2796
|
+
multipleItemHeightLG: H,
|
|
3056
2797
|
multipleSelectorBgDisabled: S,
|
|
3057
|
-
multipleItemColorDisabled:
|
|
2798
|
+
multipleItemColorDisabled: C,
|
|
3058
2799
|
multipleItemBorderColorDisabled: "transparent",
|
|
3059
2800
|
showArrowPaddingInlineEnd: Math.ceil(e.fontSize * 1.25),
|
|
3060
|
-
hoverBorderColor:
|
|
3061
|
-
activeBorderColor:
|
|
3062
|
-
activeOutlineColor:
|
|
2801
|
+
hoverBorderColor: b,
|
|
2802
|
+
activeBorderColor: x,
|
|
2803
|
+
activeOutlineColor: w,
|
|
3063
2804
|
selectAffixPadding: u
|
|
3064
2805
|
};
|
|
3065
|
-
},
|
|
2806
|
+
}, rr = (e, n) => {
|
|
3066
2807
|
const {
|
|
3067
2808
|
componentCls: t,
|
|
3068
2809
|
antCls: r,
|
|
@@ -3070,7 +2811,7 @@ const fa = (e) => {
|
|
|
3070
2811
|
} = e;
|
|
3071
2812
|
return {
|
|
3072
2813
|
[`&:not(${t}-customize-input) ${t}-selector`]: {
|
|
3073
|
-
border: `${
|
|
2814
|
+
border: `${ke(e.lineWidth)} ${e.lineType} ${n.borderColor}`,
|
|
3074
2815
|
background: e.selectorBg
|
|
3075
2816
|
},
|
|
3076
2817
|
[`&:not(${t}-disabled):not(${t}-customize-input):not(${r}-pagination-size-changer)`]: {
|
|
@@ -3079,7 +2820,7 @@ const fa = (e) => {
|
|
|
3079
2820
|
},
|
|
3080
2821
|
[`${t}-focused& ${t}-selector`]: {
|
|
3081
2822
|
borderColor: n.activeBorderColor,
|
|
3082
|
-
boxShadow: `0 0 0 ${
|
|
2823
|
+
boxShadow: `0 0 0 ${ke(a)} ${n.activeOutlineColor}`,
|
|
3083
2824
|
outline: 0
|
|
3084
2825
|
},
|
|
3085
2826
|
[`${t}-prefix`]: {
|
|
@@ -3087,23 +2828,23 @@ const fa = (e) => {
|
|
|
3087
2828
|
}
|
|
3088
2829
|
}
|
|
3089
2830
|
};
|
|
3090
|
-
},
|
|
3091
|
-
[`&${e.componentCls}-status-${n.status}`]: Object.assign({},
|
|
3092
|
-
}),
|
|
3093
|
-
"&-outlined": Object.assign(Object.assign(Object.assign(Object.assign({},
|
|
2831
|
+
}, Vt = (e, n) => ({
|
|
2832
|
+
[`&${e.componentCls}-status-${n.status}`]: Object.assign({}, rr(e, n))
|
|
2833
|
+
}), ra = (e) => ({
|
|
2834
|
+
"&-outlined": Object.assign(Object.assign(Object.assign(Object.assign({}, rr(e, {
|
|
3094
2835
|
borderColor: e.colorBorder,
|
|
3095
2836
|
hoverBorderHover: e.hoverBorderColor,
|
|
3096
2837
|
activeBorderColor: e.activeBorderColor,
|
|
3097
2838
|
activeOutlineColor: e.activeOutlineColor,
|
|
3098
2839
|
color: e.colorText
|
|
3099
|
-
})),
|
|
2840
|
+
})), Vt(e, {
|
|
3100
2841
|
status: "error",
|
|
3101
2842
|
borderColor: e.colorError,
|
|
3102
2843
|
hoverBorderHover: e.colorErrorHover,
|
|
3103
2844
|
activeBorderColor: e.colorError,
|
|
3104
2845
|
activeOutlineColor: e.colorErrorOutline,
|
|
3105
2846
|
color: e.colorError
|
|
3106
|
-
})),
|
|
2847
|
+
})), Vt(e, {
|
|
3107
2848
|
status: "warning",
|
|
3108
2849
|
borderColor: e.colorWarning,
|
|
3109
2850
|
hoverBorderHover: e.colorWarningHover,
|
|
@@ -3119,10 +2860,10 @@ const fa = (e) => {
|
|
|
3119
2860
|
},
|
|
3120
2861
|
[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
|
|
3121
2862
|
background: e.multipleItemBg,
|
|
3122
|
-
border: `${
|
|
2863
|
+
border: `${ke(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
|
|
3123
2864
|
}
|
|
3124
2865
|
})
|
|
3125
|
-
}),
|
|
2866
|
+
}), or = (e, n) => {
|
|
3126
2867
|
const {
|
|
3127
2868
|
componentCls: t,
|
|
3128
2869
|
antCls: r
|
|
@@ -3130,7 +2871,7 @@ const fa = (e) => {
|
|
|
3130
2871
|
return {
|
|
3131
2872
|
[`&:not(${t}-customize-input) ${t}-selector`]: {
|
|
3132
2873
|
background: n.bg,
|
|
3133
|
-
border: `${
|
|
2874
|
+
border: `${ke(e.lineWidth)} ${e.lineType} transparent`,
|
|
3134
2875
|
color: n.color
|
|
3135
2876
|
},
|
|
3136
2877
|
[`&:not(${t}-disabled):not(${t}-customize-input):not(${r}-pagination-size-changer)`]: {
|
|
@@ -3144,21 +2885,21 @@ const fa = (e) => {
|
|
|
3144
2885
|
}
|
|
3145
2886
|
}
|
|
3146
2887
|
};
|
|
3147
|
-
},
|
|
3148
|
-
[`&${e.componentCls}-status-${n.status}`]: Object.assign({},
|
|
3149
|
-
}),
|
|
3150
|
-
"&-filled": Object.assign(Object.assign(Object.assign(Object.assign({},
|
|
2888
|
+
}, Lt = (e, n) => ({
|
|
2889
|
+
[`&${e.componentCls}-status-${n.status}`]: Object.assign({}, or(e, n))
|
|
2890
|
+
}), oa = (e) => ({
|
|
2891
|
+
"&-filled": Object.assign(Object.assign(Object.assign(Object.assign({}, or(e, {
|
|
3151
2892
|
bg: e.colorFillTertiary,
|
|
3152
2893
|
hoverBg: e.colorFillSecondary,
|
|
3153
2894
|
activeBorderColor: e.activeBorderColor,
|
|
3154
2895
|
color: e.colorText
|
|
3155
|
-
})),
|
|
2896
|
+
})), Lt(e, {
|
|
3156
2897
|
status: "error",
|
|
3157
2898
|
bg: e.colorErrorBg,
|
|
3158
2899
|
hoverBg: e.colorErrorBgHover,
|
|
3159
2900
|
activeBorderColor: e.colorError,
|
|
3160
2901
|
color: e.colorError
|
|
3161
|
-
})),
|
|
2902
|
+
})), Lt(e, {
|
|
3162
2903
|
status: "warning",
|
|
3163
2904
|
bg: e.colorWarningBg,
|
|
3164
2905
|
hoverBg: e.colorWarningBgHover,
|
|
@@ -3174,14 +2915,14 @@ const fa = (e) => {
|
|
|
3174
2915
|
},
|
|
3175
2916
|
[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
|
|
3176
2917
|
background: e.colorBgContainer,
|
|
3177
|
-
border: `${
|
|
2918
|
+
border: `${ke(e.lineWidth)} ${e.lineType} ${e.colorSplit}`
|
|
3178
2919
|
}
|
|
3179
2920
|
})
|
|
3180
|
-
}),
|
|
2921
|
+
}), aa = (e) => ({
|
|
3181
2922
|
"&-borderless": {
|
|
3182
2923
|
[`${e.componentCls}-selector`]: {
|
|
3183
2924
|
background: "transparent",
|
|
3184
|
-
border: `${
|
|
2925
|
+
border: `${ke(e.lineWidth)} ${e.lineType} transparent`
|
|
3185
2926
|
},
|
|
3186
2927
|
[`&${e.componentCls}-disabled`]: {
|
|
3187
2928
|
[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]: {
|
|
@@ -3190,7 +2931,7 @@ const fa = (e) => {
|
|
|
3190
2931
|
},
|
|
3191
2932
|
[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
|
|
3192
2933
|
background: e.multipleItemBg,
|
|
3193
|
-
border: `${
|
|
2934
|
+
border: `${ke(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
|
|
3194
2935
|
},
|
|
3195
2936
|
// Status
|
|
3196
2937
|
[`&${e.componentCls}-status-error`]: {
|
|
@@ -3204,9 +2945,9 @@ const fa = (e) => {
|
|
|
3204
2945
|
}
|
|
3205
2946
|
}
|
|
3206
2947
|
}
|
|
3207
|
-
}),
|
|
3208
|
-
[e.componentCls]: Object.assign(Object.assign(Object.assign({},
|
|
3209
|
-
}),
|
|
2948
|
+
}), ia = (e) => ({
|
|
2949
|
+
[e.componentCls]: Object.assign(Object.assign(Object.assign({}, ra(e)), oa(e)), aa(e))
|
|
2950
|
+
}), la = (e) => {
|
|
3210
2951
|
const {
|
|
3211
2952
|
componentCls: n
|
|
3212
2953
|
} = e;
|
|
@@ -3231,7 +2972,7 @@ const fa = (e) => {
|
|
|
3231
2972
|
}
|
|
3232
2973
|
}
|
|
3233
2974
|
};
|
|
3234
|
-
},
|
|
2975
|
+
}, ua = (e) => {
|
|
3235
2976
|
const {
|
|
3236
2977
|
componentCls: n
|
|
3237
2978
|
} = e;
|
|
@@ -3250,7 +2991,7 @@ const fa = (e) => {
|
|
|
3250
2991
|
}
|
|
3251
2992
|
}
|
|
3252
2993
|
};
|
|
3253
|
-
},
|
|
2994
|
+
}, ca = (e) => {
|
|
3254
2995
|
const {
|
|
3255
2996
|
antCls: n,
|
|
3256
2997
|
componentCls: t,
|
|
@@ -3258,31 +2999,31 @@ const fa = (e) => {
|
|
|
3258
2999
|
iconCls: a
|
|
3259
3000
|
} = e;
|
|
3260
3001
|
return {
|
|
3261
|
-
[t]: Object.assign(Object.assign({},
|
|
3002
|
+
[t]: Object.assign(Object.assign({}, ot(e)), {
|
|
3262
3003
|
position: "relative",
|
|
3263
3004
|
display: "inline-flex",
|
|
3264
3005
|
cursor: "pointer",
|
|
3265
|
-
[`&:not(${t}-customize-input) ${t}-selector`]: Object.assign(Object.assign({},
|
|
3006
|
+
[`&:not(${t}-customize-input) ${t}-selector`]: Object.assign(Object.assign({}, la(e)), ua(e)),
|
|
3266
3007
|
// ======================== Selection ========================
|
|
3267
3008
|
[`${t}-selection-item`]: Object.assign(Object.assign({
|
|
3268
3009
|
flex: 1,
|
|
3269
3010
|
fontWeight: "normal",
|
|
3270
3011
|
position: "relative",
|
|
3271
3012
|
userSelect: "none"
|
|
3272
|
-
},
|
|
3013
|
+
}, qn), {
|
|
3273
3014
|
// https://github.com/ant-design/ant-design/issues/40421
|
|
3274
3015
|
[`> ${n}-typography`]: {
|
|
3275
3016
|
display: "inline"
|
|
3276
3017
|
}
|
|
3277
3018
|
}),
|
|
3278
3019
|
// ======================= Placeholder =======================
|
|
3279
|
-
[`${t}-selection-placeholder`]: Object.assign(Object.assign({},
|
|
3020
|
+
[`${t}-selection-placeholder`]: Object.assign(Object.assign({}, qn), {
|
|
3280
3021
|
flex: 1,
|
|
3281
3022
|
color: e.colorTextPlaceholder,
|
|
3282
3023
|
pointerEvents: "none"
|
|
3283
3024
|
}),
|
|
3284
3025
|
// ========================== Arrow ==========================
|
|
3285
|
-
[`${t}-arrow`]: Object.assign(Object.assign({},
|
|
3026
|
+
[`${t}-arrow`]: Object.assign(Object.assign({}, Er()), {
|
|
3286
3027
|
position: "absolute",
|
|
3287
3028
|
top: "50%",
|
|
3288
3029
|
insetInlineStart: "auto",
|
|
@@ -3378,7 +3119,7 @@ const fa = (e) => {
|
|
|
3378
3119
|
}
|
|
3379
3120
|
}
|
|
3380
3121
|
};
|
|
3381
|
-
},
|
|
3122
|
+
}, sa = (e) => {
|
|
3382
3123
|
const {
|
|
3383
3124
|
componentCls: n
|
|
3384
3125
|
} = e;
|
|
@@ -3395,13 +3136,13 @@ const fa = (e) => {
|
|
|
3395
3136
|
// == LTR ==
|
|
3396
3137
|
// =====================================================
|
|
3397
3138
|
// Base
|
|
3398
|
-
|
|
3139
|
+
ca(e),
|
|
3399
3140
|
// Single
|
|
3400
|
-
|
|
3141
|
+
na(e),
|
|
3401
3142
|
// Multiple
|
|
3402
|
-
|
|
3143
|
+
Wr(e),
|
|
3403
3144
|
// Dropdown
|
|
3404
|
-
|
|
3145
|
+
ea(e),
|
|
3405
3146
|
// =====================================================
|
|
3406
3147
|
// == RTL ==
|
|
3407
3148
|
// =====================================================
|
|
@@ -3413,216 +3154,168 @@ const fa = (e) => {
|
|
|
3413
3154
|
// =====================================================
|
|
3414
3155
|
// == Space Compact ==
|
|
3415
3156
|
// =====================================================
|
|
3416
|
-
|
|
3157
|
+
jr(e, {
|
|
3417
3158
|
borderElCls: `${n}-selector`,
|
|
3418
3159
|
focusElCls: `${n}-focused`
|
|
3419
3160
|
})
|
|
3420
3161
|
];
|
|
3421
|
-
},
|
|
3162
|
+
}, da = Bt("Select", (e, n) => {
|
|
3422
3163
|
let {
|
|
3423
3164
|
rootPrefixCls: t
|
|
3424
3165
|
} = n;
|
|
3425
|
-
const r =
|
|
3166
|
+
const r = Hn(e, {
|
|
3426
3167
|
rootPrefixCls: t,
|
|
3427
3168
|
inputPaddingHorizontalBase: e.calc(e.paddingSM).sub(1).equal(),
|
|
3428
3169
|
multipleSelectItemHeight: e.multipleItemHeight,
|
|
3429
3170
|
selectHeight: e.controlHeight
|
|
3430
3171
|
});
|
|
3431
|
-
return [
|
|
3432
|
-
},
|
|
3172
|
+
return [sa(r), ia(r)];
|
|
3173
|
+
}, ta, {
|
|
3433
3174
|
unitless: {
|
|
3434
3175
|
optionLineHeight: !0,
|
|
3435
3176
|
optionSelectedFontWeight: !0
|
|
3436
3177
|
}
|
|
3437
3178
|
});
|
|
3438
|
-
function
|
|
3439
|
-
let {
|
|
3440
|
-
suffixIcon: n,
|
|
3441
|
-
clearIcon: t,
|
|
3442
|
-
menuItemSelectedIcon: r,
|
|
3443
|
-
removeIcon: a,
|
|
3444
|
-
loading: i,
|
|
3445
|
-
multiple: l,
|
|
3446
|
-
hasFeedback: u,
|
|
3447
|
-
prefixCls: d,
|
|
3448
|
-
showSuffixIcon: f,
|
|
3449
|
-
feedbackIcon: v,
|
|
3450
|
-
showArrow: s,
|
|
3451
|
-
componentName: b
|
|
3452
|
-
} = e;
|
|
3453
|
-
process.env.NODE_ENV !== "production" && at(b).deprecated(!t, "clearIcon", "allowClear={{ clearIcon: React.ReactNode }}");
|
|
3454
|
-
const c = t ?? /* @__PURE__ */ o.createElement(Ur, null), g = (h) => n === null && !u && !s ? null : /* @__PURE__ */ o.createElement(o.Fragment, null, f !== !1 && h, u && v);
|
|
3455
|
-
let m = null;
|
|
3456
|
-
if (n !== void 0)
|
|
3457
|
-
m = g(n);
|
|
3458
|
-
else if (i)
|
|
3459
|
-
m = g(/* @__PURE__ */ o.createElement(Yr, {
|
|
3460
|
-
spin: !0
|
|
3461
|
-
}));
|
|
3462
|
-
else {
|
|
3463
|
-
const h = `${d}-suffix`;
|
|
3464
|
-
m = (E) => {
|
|
3465
|
-
let {
|
|
3466
|
-
open: C,
|
|
3467
|
-
showSearch: T
|
|
3468
|
-
} = E;
|
|
3469
|
-
return g(C && T ? /* @__PURE__ */ o.createElement(qr, {
|
|
3470
|
-
className: h
|
|
3471
|
-
}) : /* @__PURE__ */ o.createElement(Lr, {
|
|
3472
|
-
className: h
|
|
3473
|
-
}));
|
|
3474
|
-
};
|
|
3475
|
-
}
|
|
3476
|
-
let S = null;
|
|
3477
|
-
r !== void 0 ? S = r : l ? S = /* @__PURE__ */ o.createElement(Xr, null) : S = null;
|
|
3478
|
-
let w = null;
|
|
3479
|
-
return a !== void 0 ? w = a : w = /* @__PURE__ */ o.createElement(Gr, null), {
|
|
3480
|
-
clearIcon: c,
|
|
3481
|
-
suffixIcon: m,
|
|
3482
|
-
itemIcon: S,
|
|
3483
|
-
removeIcon: w
|
|
3484
|
-
};
|
|
3485
|
-
}
|
|
3486
|
-
function Ea(e, n) {
|
|
3179
|
+
function fa(e, n) {
|
|
3487
3180
|
return n !== void 0 ? n : e !== null;
|
|
3488
3181
|
}
|
|
3489
|
-
var
|
|
3182
|
+
var ma = function(e, n) {
|
|
3490
3183
|
var t = {};
|
|
3491
3184
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]);
|
|
3492
3185
|
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
|
|
3493
3186
|
n.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (t[r[a]] = e[r[a]]);
|
|
3494
3187
|
return t;
|
|
3495
3188
|
};
|
|
3496
|
-
const
|
|
3189
|
+
const ar = "SECRET_COMBOBOX_MODE_DO_NOT_USE", ir = (e, n) => {
|
|
3497
3190
|
var t;
|
|
3498
3191
|
const {
|
|
3499
3192
|
prefixCls: r,
|
|
3500
3193
|
bordered: a,
|
|
3501
|
-
className:
|
|
3502
|
-
rootClassName:
|
|
3194
|
+
className: l,
|
|
3195
|
+
rootClassName: i,
|
|
3503
3196
|
getPopupContainer: u,
|
|
3504
3197
|
popupClassName: d,
|
|
3505
3198
|
dropdownClassName: f,
|
|
3506
3199
|
listHeight: v = 256,
|
|
3507
3200
|
placement: s,
|
|
3508
|
-
listItemHeight:
|
|
3201
|
+
listItemHeight: h,
|
|
3509
3202
|
size: c,
|
|
3510
3203
|
disabled: g,
|
|
3511
3204
|
notFoundContent: m,
|
|
3512
3205
|
status: S,
|
|
3513
|
-
builtinPlacements:
|
|
3514
|
-
dropdownMatchSelectWidth:
|
|
3515
|
-
popupMatchSelectWidth:
|
|
3516
|
-
direction:
|
|
3517
|
-
style:
|
|
3206
|
+
builtinPlacements: C,
|
|
3207
|
+
dropdownMatchSelectWidth: b,
|
|
3208
|
+
popupMatchSelectWidth: x,
|
|
3209
|
+
direction: w,
|
|
3210
|
+
style: B,
|
|
3518
3211
|
allowClear: p,
|
|
3519
|
-
variant:
|
|
3520
|
-
dropdownStyle:
|
|
3521
|
-
transitionName:
|
|
3212
|
+
variant: E,
|
|
3213
|
+
dropdownStyle: L,
|
|
3214
|
+
transitionName: H,
|
|
3522
3215
|
tagRender: q,
|
|
3523
3216
|
maxCount: _,
|
|
3524
|
-
prefix:
|
|
3525
|
-
} = e,
|
|
3217
|
+
prefix: A
|
|
3218
|
+
} = e, X = ma(e, ["prefixCls", "bordered", "className", "rootClassName", "getPopupContainer", "popupClassName", "dropdownClassName", "listHeight", "placement", "listItemHeight", "size", "disabled", "notFoundContent", "status", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "direction", "style", "allowClear", "variant", "dropdownStyle", "transitionName", "tagRender", "maxCount", "prefix"]), {
|
|
3526
3219
|
getPopupContainer: Q,
|
|
3527
3220
|
getPrefixCls: G,
|
|
3528
3221
|
renderEmpty: j,
|
|
3529
3222
|
direction: ne,
|
|
3530
3223
|
virtual: Z,
|
|
3531
3224
|
popupMatchSelectWidth: Y,
|
|
3532
|
-
popupOverflow:
|
|
3533
|
-
select:
|
|
3534
|
-
} = o.useContext(
|
|
3225
|
+
popupOverflow: I,
|
|
3226
|
+
select: D
|
|
3227
|
+
} = o.useContext(rt), [, fe] = tt(), ie = h ?? (fe == null ? void 0 : fe.controlHeight), J = G("select", r), se = G(), ye = w ?? ne, {
|
|
3535
3228
|
compactSize: ge,
|
|
3536
|
-
compactItemClassnames:
|
|
3537
|
-
} =
|
|
3229
|
+
compactItemClassnames: Re
|
|
3230
|
+
} = Ar(J, ye), [ce, pe] = Vr("select", E, a), R = zr(J), [y, $, K] = da(J, R), O = o.useMemo(() => {
|
|
3538
3231
|
const {
|
|
3539
3232
|
mode: _e
|
|
3540
3233
|
} = e;
|
|
3541
3234
|
if (_e !== "combobox")
|
|
3542
|
-
return _e ===
|
|
3543
|
-
}, [e.mode]),
|
|
3235
|
+
return _e === ar ? "combobox" : _e;
|
|
3236
|
+
}, [e.mode]), F = O === "multiple" || O === "tags", le = fa(e.suffixIcon, e.showArrow), me = (t = x ?? b) !== null && t !== void 0 ? t : Y, {
|
|
3544
3237
|
status: re,
|
|
3545
|
-
hasFeedback:
|
|
3546
|
-
isFormItemInput:
|
|
3238
|
+
hasFeedback: Ce,
|
|
3239
|
+
isFormItemInput: Le,
|
|
3547
3240
|
feedbackIcon: xe
|
|
3548
|
-
} = o.useContext(
|
|
3241
|
+
} = o.useContext(Fr), Ne = Br(re, S);
|
|
3549
3242
|
let de;
|
|
3550
|
-
m !== void 0 ? de = m :
|
|
3243
|
+
m !== void 0 ? de = m : O === "combobox" ? de = null : de = (j == null ? void 0 : j("Select")) || /* @__PURE__ */ o.createElement(Zo, {
|
|
3551
3244
|
componentName: "Select"
|
|
3552
3245
|
});
|
|
3553
3246
|
const {
|
|
3554
|
-
suffixIcon:
|
|
3555
|
-
itemIcon:
|
|
3247
|
+
suffixIcon: Xe,
|
|
3248
|
+
itemIcon: Ge,
|
|
3556
3249
|
removeIcon: Se,
|
|
3557
|
-
clearIcon:
|
|
3558
|
-
} =
|
|
3559
|
-
multiple:
|
|
3560
|
-
hasFeedback:
|
|
3250
|
+
clearIcon: Me
|
|
3251
|
+
} = Kr(Object.assign(Object.assign({}, X), {
|
|
3252
|
+
multiple: F,
|
|
3253
|
+
hasFeedback: Ce,
|
|
3561
3254
|
feedbackIcon: xe,
|
|
3562
3255
|
showSuffixIcon: le,
|
|
3563
3256
|
prefixCls: J,
|
|
3564
3257
|
componentName: "Select"
|
|
3565
|
-
})),
|
|
3566
|
-
clearIcon:
|
|
3567
|
-
} : p,
|
|
3568
|
-
[`${J}-dropdown-${
|
|
3569
|
-
},
|
|
3570
|
-
var
|
|
3571
|
-
return (
|
|
3572
|
-
}),
|
|
3258
|
+
})), we = p === !0 ? {
|
|
3259
|
+
clearIcon: Me
|
|
3260
|
+
} : p, Oe = Ht(X, ["suffixIcon", "itemIcon"]), Pe = Be(d || f, {
|
|
3261
|
+
[`${J}-dropdown-${ye}`]: ye === "rtl"
|
|
3262
|
+
}, i, K, R, $), en = Hr((_e) => {
|
|
3263
|
+
var $e;
|
|
3264
|
+
return ($e = c ?? ge) !== null && $e !== void 0 ? $e : _e;
|
|
3265
|
+
}), Ae = o.useContext(Ir), He = g ?? Ae, Ee = Be({
|
|
3573
3266
|
[`${J}-lg`]: en === "large",
|
|
3574
3267
|
[`${J}-sm`]: en === "small",
|
|
3575
|
-
[`${J}-rtl`]:
|
|
3268
|
+
[`${J}-rtl`]: ye === "rtl",
|
|
3576
3269
|
[`${J}-${ce}`]: pe,
|
|
3577
|
-
[`${J}-in-form-item`]:
|
|
3578
|
-
},
|
|
3270
|
+
[`${J}-in-form-item`]: Le
|
|
3271
|
+
}, Lr(J, Ne, Ce), Re, D == null ? void 0 : D.className, l, i, K, R, $), hn = o.useMemo(() => s !== void 0 ? s : ye === "rtl" ? "bottomRight" : "bottomLeft", [s, ye]);
|
|
3579
3272
|
if (process.env.NODE_ENV !== "production") {
|
|
3580
|
-
const _e =
|
|
3581
|
-
_e.deprecated(!f, "dropdownClassName", "popupClassName"), _e.deprecated(
|
|
3273
|
+
const _e = zt("Select");
|
|
3274
|
+
_e.deprecated(!f, "dropdownClassName", "popupClassName"), _e.deprecated(b === void 0, "dropdownMatchSelectWidth", "popupMatchSelectWidth"), process.env.NODE_ENV !== "production" && _e(!("showArrow" in e), "deprecated", "`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."), _e.deprecated(!("bordered" in e), "bordered", "variant"), process.env.NODE_ENV !== "production" && _e(!(typeof _ < "u" && !F), "usage", "`maxCount` only works with mode `multiple` or `tags`");
|
|
3582
3275
|
}
|
|
3583
|
-
const [Fe] =
|
|
3584
|
-
return y(/* @__PURE__ */ o.createElement(
|
|
3276
|
+
const [Fe] = Pr("SelectLike", L == null ? void 0 : L.zIndex);
|
|
3277
|
+
return y(/* @__PURE__ */ o.createElement(ft, Object.assign({
|
|
3585
3278
|
ref: n,
|
|
3586
3279
|
virtual: Z,
|
|
3587
|
-
showSearch:
|
|
3588
|
-
},
|
|
3589
|
-
style: Object.assign(Object.assign({},
|
|
3280
|
+
showSearch: D == null ? void 0 : D.showSearch
|
|
3281
|
+
}, Oe, {
|
|
3282
|
+
style: Object.assign(Object.assign({}, D == null ? void 0 : D.style), B),
|
|
3590
3283
|
dropdownMatchSelectWidth: me,
|
|
3591
|
-
transitionName:
|
|
3592
|
-
builtinPlacements:
|
|
3284
|
+
transitionName: _r(se, "slide-up", H),
|
|
3285
|
+
builtinPlacements: ko(C, I),
|
|
3593
3286
|
listHeight: v,
|
|
3594
3287
|
listItemHeight: ie,
|
|
3595
|
-
mode:
|
|
3288
|
+
mode: O,
|
|
3596
3289
|
prefixCls: J,
|
|
3597
3290
|
placement: hn,
|
|
3598
|
-
direction:
|
|
3599
|
-
prefix:
|
|
3600
|
-
suffixIcon:
|
|
3601
|
-
menuItemSelectedIcon:
|
|
3291
|
+
direction: ye,
|
|
3292
|
+
prefix: A,
|
|
3293
|
+
suffixIcon: Xe,
|
|
3294
|
+
menuItemSelectedIcon: Ge,
|
|
3602
3295
|
removeIcon: Se,
|
|
3603
|
-
allowClear:
|
|
3296
|
+
allowClear: we,
|
|
3604
3297
|
notFoundContent: de,
|
|
3605
3298
|
className: Ee,
|
|
3606
3299
|
getPopupContainer: u || Q,
|
|
3607
3300
|
dropdownClassName: Pe,
|
|
3608
|
-
disabled:
|
|
3609
|
-
dropdownStyle: Object.assign(Object.assign({},
|
|
3301
|
+
disabled: He,
|
|
3302
|
+
dropdownStyle: Object.assign(Object.assign({}, L), {
|
|
3610
3303
|
zIndex: Fe
|
|
3611
3304
|
}),
|
|
3612
|
-
maxCount:
|
|
3613
|
-
tagRender:
|
|
3305
|
+
maxCount: F ? _ : void 0,
|
|
3306
|
+
tagRender: F ? q : void 0
|
|
3614
3307
|
})));
|
|
3615
3308
|
};
|
|
3616
|
-
process.env.NODE_ENV !== "production" && (
|
|
3617
|
-
const Dn = /* @__PURE__ */ o.forwardRef(
|
|
3618
|
-
Dn.SECRET_COMBOBOX_MODE_DO_NOT_USE =
|
|
3619
|
-
Dn.Option =
|
|
3620
|
-
Dn.OptGroup =
|
|
3621
|
-
Dn._InternalPanelDoNotUseOrYouWillBeFired =
|
|
3309
|
+
process.env.NODE_ENV !== "production" && (ir.displayName = "Select");
|
|
3310
|
+
const Dn = /* @__PURE__ */ o.forwardRef(ir), va = Tr(Dn, "dropdownAlign");
|
|
3311
|
+
Dn.SECRET_COMBOBOX_MODE_DO_NOT_USE = ar;
|
|
3312
|
+
Dn.Option = st;
|
|
3313
|
+
Dn.OptGroup = ct;
|
|
3314
|
+
Dn._InternalPanelDoNotUseOrYouWillBeFired = va;
|
|
3622
3315
|
process.env.NODE_ENV !== "production" && (Dn.displayName = "Select");
|
|
3623
3316
|
export {
|
|
3624
|
-
|
|
3317
|
+
Zo as D,
|
|
3625
3318
|
gn as E,
|
|
3626
|
-
|
|
3319
|
+
Qt as L,
|
|
3627
3320
|
Dn as S
|
|
3628
3321
|
};
|