welcome-ui 9.0.0-alpha.2 → 9.0.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 +47 -3
- package/dist/2W3RN7C5-bkX-rIa3.js +61 -0
- package/dist/4I4MLMKD-BLxAidnq.js +43 -0
- package/dist/Accordion.js +6 -6
- package/dist/Alert.js +1 -1
- package/dist/AspectRatio.js +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/{4CMBR7SL-Dhp8uJop.js → B7UTNDHN-BlIblHCu.js} +59 -59
- package/dist/Badge.js +1 -1
- package/dist/Breadcrumb.css +1 -1
- package/dist/Breadcrumb.js +27 -27
- package/dist/Button.js +2 -2
- package/dist/ButtonGroup.js +1 -1
- package/dist/Card.js +1 -1
- package/dist/Checkbox.css +1 -1
- package/dist/Checkbox.js +22 -22
- package/dist/CloseButton.js +3 -3
- package/dist/{SYRFVSLH-CHNUB1rW.js → DSAASPLT-BaaCUKsb.js} +7 -7
- package/dist/DatePicker.js +5 -5
- package/dist/DateTimePicker.js +2 -2
- package/dist/Drawer.css +1 -1
- package/dist/Drawer.js +67 -67
- package/dist/DropdownMenu.js +261 -259
- package/dist/Field.js +1 -1
- package/dist/FieldGroup.js +1 -1
- package/dist/FileDrop.js +194 -221
- package/dist/FileUpload.js +2 -2
- package/dist/GVVKDT6A-bET6V7Py.js +724 -0
- package/dist/Hint.js +1 -1
- package/dist/{Icon-BisRi8B3.js → Icon-EG7O4YwD.js} +1 -1
- package/dist/Icon.js +12 -12
- package/dist/InputText.js +1 -1
- package/dist/{ASMQKSDT-SH1qSiMi.js → KPUWHTQJ-D2TPji47.js} +30 -30
- package/dist/Label.js +3 -3
- package/dist/Link.css +1 -1
- package/dist/Link.js +27 -27
- package/dist/Loader.js +1 -1
- package/dist/Logo.js +1 -1
- package/dist/Modal.js +10 -10
- package/dist/{JC64G2H7-DPy9R0De.js → NI3IVY7K-Ztb3-XAv.js} +571 -571
- package/dist/{P4IRICAX-7kH4HzWI.js → NMGNQVTG-C6TqBngP.js} +5 -5
- package/dist/{LVA2YJMS-NUHCRwFZ.js → OE2EFRVA-C3721cM3.js} +316 -315
- package/dist/{ITI7HKP4-C5xLpoVY.js → OLVWQA7U-DysaSaZj.js} +59 -59
- package/dist/Pagination.css +1 -1
- package/dist/Pagination.js +81 -73
- package/dist/PasswordInput.js +17 -18
- package/dist/Popover.js +14 -14
- package/dist/{YV4JVR4I-CVFstk2K.js → RTNCFSKZ-qpPg689E.js} +75 -73
- package/dist/Radio.css +1 -1
- package/dist/Radio.js +29 -29
- package/dist/RadioGroup.js +21 -21
- package/dist/RadioTab.js +2 -2
- package/dist/{P2CTZE2T-D1TepwxQ.js → SBSPVDDI-DJKkC1eb.js} +43 -43
- package/dist/{NLEBE274-B4zy25kL.js → SQZLCNLX-CHDXnZ16.js} +16 -16
- package/dist/Search.js +2 -2
- package/dist/Select.js +170 -181
- package/dist/Slider.js +1 -1
- package/dist/Swiper.css +1 -1
- package/dist/Swiper.js +151 -151
- package/dist/{VGCJ63VH-CVhs4PYt.js → T22PY7TE-C1N0q8Kn.js} +109 -109
- package/dist/Table.js +1 -1
- package/dist/Tabs.js +303 -308
- package/dist/Tag.js +3 -3
- package/dist/Text.js +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/TimePicker.js +2 -2
- package/dist/Toast.js +1 -1
- package/dist/Toggle.js +2 -2
- package/dist/Tooltip.js +72 -72
- package/dist/VariantIcon.js +3 -3
- package/dist/WelcomeLoader.js +1 -1
- package/dist/XCKGTAUF-DkxWCbaW.js +25 -0
- package/dist/Y67KZUMI-DFEgrUv2.js +15 -0
- package/dist/{AXB53BZF-BHeessqV.js → ZTXFEM5L-CkrIQCN1.js} +7 -7
- package/dist/{field-icon-size-Du58qHNC.js → field-icon-size-Z5NulTSk.js} +216 -224
- package/dist/{index-5rXezknO.js → index-BC2bF45u.js} +1 -1
- package/dist/{index-C8GsqBDe.js → index-BeetbagJ.js} +1 -1
- package/dist/{index-BJLXLdM3.js → index-Bt79XJ8R.js} +1 -1
- package/dist/{index-Dcq5gh3E.js → index-BtwrJ6N4.js} +1 -1
- package/dist/{index-DL4-ut3P.js → index-CCASZBtz.js} +1 -1
- package/dist/{index-lbUBMgHp.js → index-CPqDZeah.js} +2 -2
- package/dist/{index-CTgip19b.js → index-CQEPCbEE.js} +1 -1
- package/dist/{index-CnxSNAPH.js → index-Crpe9CvH.js} +1 -1
- package/dist/{index-CWVOLBDY.js → index-D5a8Oe6k.js} +1 -1
- package/dist/{index-C1jjVTAc.js → index-D8dq-I5s.js} +1 -1
- package/dist/{index-Cvtm6uuS.js → index-DkwTwo3z.js} +1 -1
- package/dist/{index-BG2aV9o8.js → index-DnO8yBVT.js} +1 -1
- package/dist/index.css +0 -0
- package/dist/tslib.es6-DpB4Y59c.js +683 -0
- package/dist/types/components/Pagination/index.d.ts +1 -2
- package/dist/types/components/Pagination/types.d.ts +5 -2
- package/dist/types/components/PasswordInput/ToggleButton.d.ts +1 -1
- package/dist/types/components/PasswordInput/types.d.ts +1 -1
- package/dist/types/components/Tabs/components/TabList/index.d.ts +1 -1
- package/dist/types/components/Tabs/index.d.ts +1 -1
- package/dist/types/components/Tabs/types.d.ts +1 -2
- package/dist/types/components/Tabs/utils.d.ts +1 -2
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/theme/index.d.ts +0 -0
- package/dist/types/utils/useForkRef.d.ts +7 -1
- package/dist/useForkRef-D807AV7D.js +22 -0
- package/dist/{utils-BNMgUIHQ.js → utils-BpbIqM56.js} +1 -1
- package/dist/utils.js +2 -2
- package/package.json +5 -5
- package/dist/BYC7LY2E-DbSoi9cN.js +0 -673
- package/dist/KUU7WJ55-CsIy9XMu.js +0 -61
- package/dist/MTZPJQMC-D_TnSwZf.js +0 -15
- package/dist/QYJ6MIDR-Dm7lYMh6.js +0 -43
- package/dist/X5NMLKT6-PeY306ft.js +0 -25
- package/dist/index--0U5Rubs.js +0 -644
- /package/dist/{index-PAaZGbyz.js → index-CdiHdiVB.js} +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { P as
|
|
2
|
+
import { P as n, a as ve } from "./tslib.es6-DpB4Y59c.js";
|
|
3
3
|
import { cloneElement as et, Component as tt } from "react";
|
|
4
|
-
function Z(t,
|
|
4
|
+
function Z(t, o) {
|
|
5
5
|
if (t == null) return {};
|
|
6
6
|
var r = {};
|
|
7
7
|
for (var s in t) if ({}.hasOwnProperty.call(t, s)) {
|
|
8
|
-
if (
|
|
8
|
+
if (o.indexOf(s) !== -1) continue;
|
|
9
9
|
r[s] = t[s];
|
|
10
10
|
}
|
|
11
11
|
return r;
|
|
12
12
|
}
|
|
13
13
|
function M() {
|
|
14
14
|
return M = Object.assign ? Object.assign.bind() : function(t) {
|
|
15
|
-
for (var
|
|
16
|
-
var r = arguments[
|
|
15
|
+
for (var o = 1; o < arguments.length; o++) {
|
|
16
|
+
var r = arguments[o];
|
|
17
17
|
for (var s in r) ({}).hasOwnProperty.call(r, s) && (t[s] = r[s]);
|
|
18
18
|
}
|
|
19
19
|
return t;
|
|
@@ -23,22 +23,22 @@ function me(t) {
|
|
|
23
23
|
if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
24
24
|
return t;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
26
|
+
function pe(t, o) {
|
|
27
|
+
return pe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, s) {
|
|
28
28
|
return r.__proto__ = s, r;
|
|
29
|
-
},
|
|
29
|
+
}, pe(t, o);
|
|
30
30
|
}
|
|
31
|
-
function nt(t,
|
|
32
|
-
t.prototype = Object.create(
|
|
31
|
+
function nt(t, o) {
|
|
32
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, pe(t, o);
|
|
33
33
|
}
|
|
34
34
|
var ie = { exports: {} }, O = {}, Ee;
|
|
35
35
|
function ot() {
|
|
36
36
|
if (Ee) return O;
|
|
37
37
|
Ee = 1;
|
|
38
|
-
var t = 60103,
|
|
38
|
+
var t = 60103, o = 60106, r = 60107, s = 60108, d = 60114, e = 60109, l = 60110, v = 60112, y = 60113, C = 60120, S = 60115, N = 60116, V = 60121, P = 60122, b = 60117, H = 60129, T = 60131;
|
|
39
39
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
40
40
|
var f = Symbol.for;
|
|
41
|
-
t = f("react.element"),
|
|
41
|
+
t = f("react.element"), o = f("react.portal"), r = f("react.fragment"), s = f("react.strict_mode"), d = f("react.profiler"), e = f("react.provider"), l = f("react.context"), v = f("react.forward_ref"), y = f("react.suspense"), C = f("react.suspense_list"), S = f("react.memo"), N = f("react.lazy"), V = f("react.block"), P = f("react.server.block"), b = f("react.fundamental"), H = f("react.debug_trace_mode"), T = f("react.legacy_hidden");
|
|
42
42
|
}
|
|
43
43
|
function i(a) {
|
|
44
44
|
if (typeof a == "object" && a !== null) {
|
|
@@ -47,14 +47,14 @@ function ot() {
|
|
|
47
47
|
case t:
|
|
48
48
|
switch (a = a.type, a) {
|
|
49
49
|
case r:
|
|
50
|
-
case
|
|
50
|
+
case d:
|
|
51
51
|
case s:
|
|
52
52
|
case y:
|
|
53
53
|
case C:
|
|
54
54
|
return a;
|
|
55
55
|
default:
|
|
56
56
|
switch (a = a && a.$$typeof, a) {
|
|
57
|
-
case
|
|
57
|
+
case l:
|
|
58
58
|
case v:
|
|
59
59
|
case N:
|
|
60
60
|
case S:
|
|
@@ -64,18 +64,18 @@ function ot() {
|
|
|
64
64
|
return R;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
case
|
|
67
|
+
case o:
|
|
68
68
|
return R;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
var c = e, u = t, _ = v, m = r, E = N, g = S, h =
|
|
73
|
-
return O.ContextConsumer =
|
|
72
|
+
var c = e, u = t, _ = v, m = r, E = N, g = S, h = o, I = d, w = s, x = y;
|
|
73
|
+
return O.ContextConsumer = l, O.ContextProvider = c, O.Element = u, O.ForwardRef = _, O.Fragment = m, O.Lazy = E, O.Memo = g, O.Portal = h, O.Profiler = I, O.StrictMode = w, O.Suspense = x, O.isAsyncMode = function() {
|
|
74
74
|
return !1;
|
|
75
75
|
}, O.isConcurrentMode = function() {
|
|
76
76
|
return !1;
|
|
77
77
|
}, O.isContextConsumer = function(a) {
|
|
78
|
-
return i(a) ===
|
|
78
|
+
return i(a) === l;
|
|
79
79
|
}, O.isContextProvider = function(a) {
|
|
80
80
|
return i(a) === e;
|
|
81
81
|
}, O.isElement = function(a) {
|
|
@@ -89,28 +89,28 @@ function ot() {
|
|
|
89
89
|
}, O.isMemo = function(a) {
|
|
90
90
|
return i(a) === S;
|
|
91
91
|
}, O.isPortal = function(a) {
|
|
92
|
-
return i(a) ===
|
|
92
|
+
return i(a) === o;
|
|
93
93
|
}, O.isProfiler = function(a) {
|
|
94
|
-
return i(a) ===
|
|
94
|
+
return i(a) === d;
|
|
95
95
|
}, O.isStrictMode = function(a) {
|
|
96
96
|
return i(a) === s;
|
|
97
97
|
}, O.isSuspense = function(a) {
|
|
98
98
|
return i(a) === y;
|
|
99
99
|
}, O.isValidElementType = function(a) {
|
|
100
|
-
return typeof a == "string" || typeof a == "function" || a === r || a ===
|
|
100
|
+
return typeof a == "string" || typeof a == "function" || a === r || a === d || a === H || a === s || a === y || a === C || a === T || typeof a == "object" && a !== null && (a.$$typeof === N || a.$$typeof === S || a.$$typeof === e || a.$$typeof === l || a.$$typeof === v || a.$$typeof === b || a.$$typeof === V || a[0] === P);
|
|
101
101
|
}, O.typeOf = i, O;
|
|
102
102
|
}
|
|
103
103
|
var D = {}, Ie;
|
|
104
104
|
function rt() {
|
|
105
105
|
return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
|
|
106
|
-
var t = 60103,
|
|
106
|
+
var t = 60103, o = 60106, r = 60107, s = 60108, d = 60114, e = 60109, l = 60110, v = 60112, y = 60113, C = 60120, S = 60115, N = 60116, V = 60121, P = 60122, b = 60117, H = 60129, T = 60131;
|
|
107
107
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
108
108
|
var f = Symbol.for;
|
|
109
|
-
t = f("react.element"),
|
|
109
|
+
t = f("react.element"), o = f("react.portal"), r = f("react.fragment"), s = f("react.strict_mode"), d = f("react.profiler"), e = f("react.provider"), l = f("react.context"), v = f("react.forward_ref"), y = f("react.suspense"), C = f("react.suspense_list"), S = f("react.memo"), N = f("react.lazy"), V = f("react.block"), P = f("react.server.block"), b = f("react.fundamental"), f("react.scope"), f("react.opaque.id"), H = f("react.debug_trace_mode"), f("react.offscreen"), T = f("react.legacy_hidden");
|
|
110
110
|
}
|
|
111
111
|
var i = !1;
|
|
112
112
|
function c(p) {
|
|
113
|
-
return !!(typeof p == "string" || typeof p == "function" || p === r || p ===
|
|
113
|
+
return !!(typeof p == "string" || typeof p == "function" || p === r || p === d || p === H || p === s || p === y || p === C || p === T || i || typeof p == "object" && p !== null && (p.$$typeof === N || p.$$typeof === S || p.$$typeof === e || p.$$typeof === l || p.$$typeof === v || p.$$typeof === b || p.$$typeof === V || p[0] === P));
|
|
114
114
|
}
|
|
115
115
|
function u(p) {
|
|
116
116
|
if (typeof p == "object" && p !== null) {
|
|
@@ -120,30 +120,30 @@ function rt() {
|
|
|
120
120
|
var re = p.type;
|
|
121
121
|
switch (re) {
|
|
122
122
|
case r:
|
|
123
|
-
case
|
|
123
|
+
case d:
|
|
124
124
|
case s:
|
|
125
125
|
case y:
|
|
126
126
|
case C:
|
|
127
127
|
return re;
|
|
128
128
|
default:
|
|
129
|
-
var
|
|
130
|
-
switch (
|
|
131
|
-
case
|
|
129
|
+
var he = re && re.$$typeof;
|
|
130
|
+
switch (he) {
|
|
131
|
+
case l:
|
|
132
132
|
case v:
|
|
133
133
|
case N:
|
|
134
134
|
case S:
|
|
135
135
|
case e:
|
|
136
|
-
return
|
|
136
|
+
return he;
|
|
137
137
|
default:
|
|
138
138
|
return F;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
case
|
|
141
|
+
case o:
|
|
142
142
|
return F;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
var _ =
|
|
146
|
+
var _ = l, m = e, E = t, g = v, h = r, I = N, w = S, x = o, a = d, R = s, A = y, B = !1, Y = !1;
|
|
147
147
|
function ee(p) {
|
|
148
148
|
return B || (B = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
149
149
|
}
|
|
@@ -151,7 +151,7 @@ function rt() {
|
|
|
151
151
|
return Y || (Y = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
152
152
|
}
|
|
153
153
|
function U(p) {
|
|
154
|
-
return u(p) ===
|
|
154
|
+
return u(p) === l;
|
|
155
155
|
}
|
|
156
156
|
function j(p) {
|
|
157
157
|
return u(p) === e;
|
|
@@ -172,10 +172,10 @@ function rt() {
|
|
|
172
172
|
return u(p) === S;
|
|
173
173
|
}
|
|
174
174
|
function z(p) {
|
|
175
|
-
return u(p) ===
|
|
175
|
+
return u(p) === o;
|
|
176
176
|
}
|
|
177
177
|
function te(p) {
|
|
178
|
-
return u(p) ===
|
|
178
|
+
return u(p) === d;
|
|
179
179
|
}
|
|
180
180
|
function ne(p) {
|
|
181
181
|
return u(p) === s;
|
|
@@ -191,11 +191,11 @@ function it() {
|
|
|
191
191
|
return ye || (ye = 1, process.env.NODE_ENV === "production" ? ie.exports = ot() : ie.exports = rt()), ie.exports;
|
|
192
192
|
}
|
|
193
193
|
var we = it();
|
|
194
|
-
let Ne = (t) => typeof t == "object" && t != null && t.nodeType === 1, Oe = (t,
|
|
194
|
+
let Ne = (t) => typeof t == "object" && t != null && t.nodeType === 1, Oe = (t, o) => (!o || t !== "hidden") && t !== "visible" && t !== "clip", le = (t, o) => {
|
|
195
195
|
if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
|
|
196
196
|
let r = getComputedStyle(t, null);
|
|
197
|
-
return Oe(r.overflowY,
|
|
198
|
-
let
|
|
197
|
+
return Oe(r.overflowY, o) || Oe(r.overflowX, o) || ((s) => {
|
|
198
|
+
let d = ((e) => {
|
|
199
199
|
if (!e.ownerDocument || !e.ownerDocument.defaultView) return null;
|
|
200
200
|
try {
|
|
201
201
|
return e.ownerDocument.defaultView.frameElement;
|
|
@@ -203,18 +203,18 @@ let Ne = (t) => typeof t == "object" && t != null && t.nodeType === 1, Oe = (t,
|
|
|
203
203
|
return null;
|
|
204
204
|
}
|
|
205
205
|
})(s);
|
|
206
|
-
return !!
|
|
206
|
+
return !!d && (d.clientHeight < s.scrollHeight || d.clientWidth < s.scrollWidth);
|
|
207
207
|
})(t);
|
|
208
208
|
}
|
|
209
209
|
return !1;
|
|
210
|
-
}, se = (t,
|
|
211
|
-
let
|
|
212
|
-
return
|
|
210
|
+
}, se = (t, o, r, s, d, e, l, v) => e < t && l > o || e > t && l < o ? 0 : e <= t && v <= r || l >= o && v >= r ? e - t - s : l > o && v < r || e < t && v > r ? l - o + d : 0, st = (t) => {
|
|
211
|
+
let o = t.parentElement;
|
|
212
|
+
return o ?? (t.getRootNode().host || null);
|
|
213
213
|
};
|
|
214
|
-
var ut = (t,
|
|
215
|
-
var r, s,
|
|
214
|
+
var ut = (t, o) => {
|
|
215
|
+
var r, s, d, e, l, v;
|
|
216
216
|
if (typeof document > "u") return [];
|
|
217
|
-
let { inline: y, boundary: C, skipOverflowHiddenElements: S } =
|
|
217
|
+
let { inline: y, boundary: C, skipOverflowHiddenElements: S } = o, N = typeof C == "function" ? C : (x) => x !== C;
|
|
218
218
|
if (!Ne(t)) throw new TypeError("Invalid target");
|
|
219
219
|
let V = document.scrollingElement || document.documentElement, P = [], b = t;
|
|
220
220
|
for (; Ne(b) && N(b); ) {
|
|
@@ -222,9 +222,9 @@ var ut = (t, n) => {
|
|
|
222
222
|
P.push(b);
|
|
223
223
|
break;
|
|
224
224
|
}
|
|
225
|
-
b != null && b === document.body &&
|
|
225
|
+
b != null && b === document.body && le(b) && !le(document.documentElement) || b != null && le(b, S) && P.push(b);
|
|
226
226
|
}
|
|
227
|
-
let H = (s = (r = window.visualViewport) == null ? void 0 : r.width) != null ? s : innerWidth, T = (e = (
|
|
227
|
+
let H = (s = (r = window.visualViewport) == null ? void 0 : r.width) != null ? s : innerWidth, T = (e = (d = window.visualViewport) == null ? void 0 : d.height) != null ? e : innerHeight, f = (l = window.scrollX) != null ? l : pageXOffset, i = (v = window.scrollY) != null ? v : pageYOffset, { height: c, width: u, top: _, right: m, bottom: E, left: g } = t.getBoundingClientRect(), h = _, I = y === "center" ? g + u / 2 : y === "end" ? m : g, w = [];
|
|
228
228
|
for (let x = 0; x < P.length; x++) {
|
|
229
229
|
let a = P[x], { height: R, width: A, top: B, right: Y, bottom: ee, left: W } = a.getBoundingClientRect();
|
|
230
230
|
if (_ >= 0 && g >= 0 && E <= T && m <= H && _ >= B && E <= ee && g >= W && m <= Y) return w;
|
|
@@ -238,66 +238,58 @@ var ut = (t, n) => {
|
|
|
238
238
|
w.push({ el: a, top: k, left: $ });
|
|
239
239
|
}
|
|
240
240
|
return w;
|
|
241
|
-
}, le = function() {
|
|
242
|
-
return le = Object.assign || function(n) {
|
|
243
|
-
for (var r, s = 1, l = arguments.length; s < l; s++) {
|
|
244
|
-
r = arguments[s];
|
|
245
|
-
for (var e in r) Object.prototype.hasOwnProperty.call(r, e) && (n[e] = r[e]);
|
|
246
|
-
}
|
|
247
|
-
return n;
|
|
248
|
-
}, le.apply(this, arguments);
|
|
249
241
|
}, at = 0;
|
|
250
242
|
function De(t) {
|
|
251
243
|
return typeof t == "function" ? t : K;
|
|
252
244
|
}
|
|
253
245
|
function K() {
|
|
254
246
|
}
|
|
255
|
-
function Pe(t,
|
|
247
|
+
function Pe(t, o) {
|
|
256
248
|
if (t) {
|
|
257
249
|
var r = ut(t, {
|
|
258
|
-
boundary:
|
|
250
|
+
boundary: o
|
|
259
251
|
});
|
|
260
252
|
r.forEach(function(s) {
|
|
261
|
-
var
|
|
262
|
-
|
|
253
|
+
var d = s.el, e = s.top, l = s.left;
|
|
254
|
+
d.scrollTop = e, d.scrollLeft = l;
|
|
263
255
|
});
|
|
264
256
|
}
|
|
265
257
|
}
|
|
266
|
-
function be(t,
|
|
267
|
-
var s = t ===
|
|
258
|
+
function be(t, o, r) {
|
|
259
|
+
var s = t === o || o instanceof r.Node && t.contains && t.contains(o);
|
|
268
260
|
return s;
|
|
269
261
|
}
|
|
270
|
-
function
|
|
262
|
+
function ge(t, o) {
|
|
271
263
|
var r;
|
|
272
264
|
function s() {
|
|
273
265
|
r && clearTimeout(r);
|
|
274
266
|
}
|
|
275
|
-
function
|
|
276
|
-
for (var e = arguments.length,
|
|
277
|
-
|
|
267
|
+
function d() {
|
|
268
|
+
for (var e = arguments.length, l = new Array(e), v = 0; v < e; v++)
|
|
269
|
+
l[v] = arguments[v];
|
|
278
270
|
s(), r = setTimeout(function() {
|
|
279
|
-
r = null, t.apply(void 0,
|
|
280
|
-
},
|
|
271
|
+
r = null, t.apply(void 0, l);
|
|
272
|
+
}, o);
|
|
281
273
|
}
|
|
282
|
-
return
|
|
274
|
+
return d.cancel = s, d;
|
|
283
275
|
}
|
|
284
276
|
function L() {
|
|
285
|
-
for (var t = arguments.length,
|
|
286
|
-
|
|
277
|
+
for (var t = arguments.length, o = new Array(t), r = 0; r < t; r++)
|
|
278
|
+
o[r] = arguments[r];
|
|
287
279
|
return function(s) {
|
|
288
|
-
for (var
|
|
289
|
-
e[
|
|
290
|
-
return
|
|
280
|
+
for (var d = arguments.length, e = new Array(d > 1 ? d - 1 : 0), l = 1; l < d; l++)
|
|
281
|
+
e[l - 1] = arguments[l];
|
|
282
|
+
return o.some(function(v) {
|
|
291
283
|
return v && v.apply(void 0, [s].concat(e)), s.preventDownshiftDefault || s.hasOwnProperty("nativeEvent") && s.nativeEvent.preventDownshiftDefault;
|
|
292
284
|
});
|
|
293
285
|
};
|
|
294
286
|
}
|
|
295
287
|
function Se() {
|
|
296
|
-
for (var t = arguments.length,
|
|
297
|
-
|
|
288
|
+
for (var t = arguments.length, o = new Array(t), r = 0; r < t; r++)
|
|
289
|
+
o[r] = arguments[r];
|
|
298
290
|
return function(s) {
|
|
299
|
-
|
|
300
|
-
typeof
|
|
291
|
+
o.forEach(function(d) {
|
|
292
|
+
typeof d == "function" ? d(s) : d && (d.current = s);
|
|
301
293
|
});
|
|
302
294
|
};
|
|
303
295
|
}
|
|
@@ -305,14 +297,14 @@ function ct() {
|
|
|
305
297
|
return String(at++);
|
|
306
298
|
}
|
|
307
299
|
function Me(t) {
|
|
308
|
-
var
|
|
309
|
-
return
|
|
300
|
+
var o = t.isOpen, r = t.resultCount, s = t.previousResultCount;
|
|
301
|
+
return o ? r ? r !== s ? r + " result" + (r === 1 ? " is" : "s are") + " available, use up and down arrow keys to navigate. Press Enter key to select." : "" : "No results are available." : "";
|
|
310
302
|
}
|
|
311
|
-
function Ce(t,
|
|
303
|
+
function Ce(t, o) {
|
|
312
304
|
return t = Array.isArray(t) ? (
|
|
313
305
|
/* istanbul ignore next (preact) */
|
|
314
306
|
t[0]
|
|
315
|
-
) : t, !t &&
|
|
307
|
+
) : t, !t && o ? o : t;
|
|
316
308
|
}
|
|
317
309
|
function He(t) {
|
|
318
310
|
return typeof t.type == "string";
|
|
@@ -320,79 +312,79 @@ function He(t) {
|
|
|
320
312
|
function Ae(t) {
|
|
321
313
|
return t.props;
|
|
322
314
|
}
|
|
323
|
-
function lt(t,
|
|
324
|
-
console.error('The property "' +
|
|
315
|
+
function lt(t, o) {
|
|
316
|
+
console.error('The property "' + o + '" is required in "' + t + '"');
|
|
325
317
|
}
|
|
326
318
|
var dt = ["highlightedIndex", "inputValue", "isOpen", "selectedItem", "type"];
|
|
327
319
|
function ue(t) {
|
|
328
320
|
t === void 0 && (t = {});
|
|
329
|
-
var
|
|
321
|
+
var o = {};
|
|
330
322
|
return dt.forEach(function(r) {
|
|
331
|
-
t.hasOwnProperty(r) && (
|
|
332
|
-
}),
|
|
323
|
+
t.hasOwnProperty(r) && (o[r] = t[r]);
|
|
324
|
+
}), o;
|
|
333
325
|
}
|
|
334
|
-
function pt(t,
|
|
326
|
+
function pt(t, o) {
|
|
335
327
|
return Object.keys(t).reduce(function(r, s) {
|
|
336
|
-
return r[s] =
|
|
328
|
+
return r[s] = fe(o, s) ? o[s] : t[s], r;
|
|
337
329
|
}, {});
|
|
338
330
|
}
|
|
339
|
-
function
|
|
340
|
-
return t[
|
|
331
|
+
function fe(t, o) {
|
|
332
|
+
return t[o] !== void 0;
|
|
341
333
|
}
|
|
342
334
|
function Ve(t) {
|
|
343
|
-
var
|
|
344
|
-
return r >= 37 && r <= 40 &&
|
|
335
|
+
var o = t.key, r = t.keyCode;
|
|
336
|
+
return r >= 37 && r <= 40 && o.indexOf("Arrow") !== 0 ? "Arrow" + o : o;
|
|
345
337
|
}
|
|
346
338
|
function ft(t) {
|
|
347
339
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
348
340
|
}
|
|
349
|
-
function
|
|
350
|
-
if (
|
|
341
|
+
function de(t, o, r, s, d) {
|
|
342
|
+
if (d === void 0 && (d = !0), r === 0)
|
|
351
343
|
return -1;
|
|
352
344
|
var e = r - 1;
|
|
353
|
-
(typeof
|
|
354
|
-
var
|
|
355
|
-
|
|
356
|
-
var v = Q(t,
|
|
357
|
-
return v === -1 ?
|
|
345
|
+
(typeof o != "number" || o < 0 || o >= r) && (o = t > 0 ? -1 : e + 1);
|
|
346
|
+
var l = o + t;
|
|
347
|
+
l < 0 ? l = d ? e : 0 : l > e && (l = d ? 0 : e);
|
|
348
|
+
var v = Q(t, l, r, s, d);
|
|
349
|
+
return v === -1 ? o >= r ? -1 : o : v;
|
|
358
350
|
}
|
|
359
|
-
function Q(t,
|
|
360
|
-
var e = s(
|
|
351
|
+
function Q(t, o, r, s, d) {
|
|
352
|
+
var e = s(o);
|
|
361
353
|
if (!e || !e.hasAttribute("disabled"))
|
|
362
|
-
return
|
|
354
|
+
return o;
|
|
363
355
|
if (t > 0) {
|
|
364
|
-
for (var
|
|
365
|
-
if (!s(
|
|
366
|
-
return
|
|
356
|
+
for (var l = o + 1; l < r; l++)
|
|
357
|
+
if (!s(l).hasAttribute("disabled"))
|
|
358
|
+
return l;
|
|
367
359
|
} else
|
|
368
|
-
for (var v =
|
|
360
|
+
for (var v = o - 1; v >= 0; v--)
|
|
369
361
|
if (!s(v).hasAttribute("disabled"))
|
|
370
362
|
return v;
|
|
371
|
-
return
|
|
363
|
+
return d ? t > 0 ? Q(1, 0, r, s, !1) : Q(-1, r - 1, r, s, !1) : -1;
|
|
372
364
|
}
|
|
373
|
-
function xe(t,
|
|
374
|
-
return s === void 0 && (s = !0),
|
|
375
|
-
return
|
|
365
|
+
function xe(t, o, r, s) {
|
|
366
|
+
return s === void 0 && (s = !0), o.some(function(d) {
|
|
367
|
+
return d && (be(d, t, r) || s && be(d, r.document.activeElement, r));
|
|
376
368
|
});
|
|
377
369
|
}
|
|
378
370
|
var Te = K;
|
|
379
|
-
process.env.NODE_ENV !== "production" && (Te = function(
|
|
380
|
-
var
|
|
381
|
-
Object.keys(
|
|
382
|
-
r[e] !== void 0 && s[e] === void 0 ? console.error('downshift: A component has changed the controlled prop "' + e + '" to be uncontrolled. ' +
|
|
371
|
+
process.env.NODE_ENV !== "production" && (Te = function(o, r, s) {
|
|
372
|
+
var d = "This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";
|
|
373
|
+
Object.keys(o).forEach(function(e) {
|
|
374
|
+
r[e] !== void 0 && s[e] === void 0 ? console.error('downshift: A component has changed the controlled prop "' + e + '" to be uncontrolled. ' + d) : r[e] === void 0 && s[e] !== void 0 && console.error('downshift: A component has changed the uncontrolled prop "' + e + '" to be controlled. ' + d);
|
|
383
375
|
});
|
|
384
376
|
});
|
|
385
|
-
var _t =
|
|
377
|
+
var _t = ge(function(t) {
|
|
386
378
|
$e(t).textContent = "";
|
|
387
379
|
}, 500);
|
|
388
|
-
function ke(t,
|
|
389
|
-
var r = $e(
|
|
390
|
-
t && (r.textContent = t, _t(
|
|
380
|
+
function ke(t, o) {
|
|
381
|
+
var r = $e(o);
|
|
382
|
+
t && (r.textContent = t, _t(o));
|
|
391
383
|
}
|
|
392
384
|
function $e(t) {
|
|
393
385
|
t === void 0 && (t = document);
|
|
394
|
-
var
|
|
395
|
-
return
|
|
386
|
+
var o = t.getElementById("a11y-status-message");
|
|
387
|
+
return o || (o = t.createElement("div"), o.setAttribute("id", "a11y-status-message"), o.setAttribute("role", "status"), o.setAttribute("aria-live", "polite"), o.setAttribute("aria-relevant", "additions text"), Object.assign(o.style, {
|
|
396
388
|
border: "0",
|
|
397
389
|
clip: "rect(0 0 0 0)",
|
|
398
390
|
height: "1px",
|
|
@@ -401,9 +393,9 @@ function $e(t) {
|
|
|
401
393
|
padding: "0",
|
|
402
394
|
position: "absolute",
|
|
403
395
|
width: "1px"
|
|
404
|
-
}), t.body.appendChild(
|
|
396
|
+
}), t.body.appendChild(o), o);
|
|
405
397
|
}
|
|
406
|
-
var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0, Ke = process.env.NODE_ENV !== "production" ? "__autocomplete_mouseup__" : 1, Be = process.env.NODE_ENV !== "production" ? "__autocomplete_item_mouseenter__" : 2, ae = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_arrow_up__" : 3, ce = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_arrow_down__" : 4, Ye = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_escape__" : 5, We = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_enter__" : 6, Ue = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_home__" : 7, je = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_end__" : 8, qe = process.env.NODE_ENV !== "production" ? "__autocomplete_click_item__" : 9, ze = process.env.NODE_ENV !== "production" ? "__autocomplete_blur_input__" : 10, Fe = process.env.NODE_ENV !== "production" ? "__autocomplete_change_input__" : 11, Ge = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_space_button__" : 12,
|
|
398
|
+
var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0, Ke = process.env.NODE_ENV !== "production" ? "__autocomplete_mouseup__" : 1, Be = process.env.NODE_ENV !== "production" ? "__autocomplete_item_mouseenter__" : 2, ae = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_arrow_up__" : 3, ce = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_arrow_down__" : 4, Ye = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_escape__" : 5, We = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_enter__" : 6, Ue = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_home__" : 7, je = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_end__" : 8, qe = process.env.NODE_ENV !== "production" ? "__autocomplete_click_item__" : 9, ze = process.env.NODE_ENV !== "production" ? "__autocomplete_blur_input__" : 10, Fe = process.env.NODE_ENV !== "production" ? "__autocomplete_change_input__" : 11, Ge = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_space_button__" : 12, _e = process.env.NODE_ENV !== "production" ? "__autocomplete_click_button__" : 13, Xe = process.env.NODE_ENV !== "production" ? "__autocomplete_blur_button__" : 14, Ze = process.env.NODE_ENV !== "production" ? "__autocomplete_controlled_prop_updated_selected_item__" : 15, Je = process.env.NODE_ENV !== "production" ? "__autocomplete_touchend__" : 16, gt = /* @__PURE__ */ Object.freeze({
|
|
407
399
|
__proto__: null,
|
|
408
400
|
unknown: Le,
|
|
409
401
|
mouseUp: Ke,
|
|
@@ -418,16 +410,16 @@ var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
418
410
|
blurInput: ze,
|
|
419
411
|
changeInput: Fe,
|
|
420
412
|
keyDownSpaceButton: Ge,
|
|
421
|
-
clickButton:
|
|
413
|
+
clickButton: _e,
|
|
422
414
|
blurButton: Xe,
|
|
423
415
|
controlledPropUpdatedSelectedItem: Ze,
|
|
424
416
|
touchEnd: Je
|
|
425
417
|
}), ht = ["refKey", "ref"], vt = ["onClick", "onPress", "onKeyDown", "onKeyUp", "onBlur"], mt = ["onKeyDown", "onBlur", "onChange", "onInput", "onChangeText"], Et = ["refKey", "ref"], It = ["onMouseMove", "onMouseDown", "onClick", "onPress", "index", "item"], Qe = /* @__PURE__ */ function() {
|
|
426
|
-
var t = /* @__PURE__ */ function(
|
|
427
|
-
nt(r,
|
|
428
|
-
function r(
|
|
418
|
+
var t = /* @__PURE__ */ function(o) {
|
|
419
|
+
nt(r, o);
|
|
420
|
+
function r(d) {
|
|
429
421
|
var e;
|
|
430
|
-
e =
|
|
422
|
+
e = o.call(this, d) || this, e.id = e.props.id || "downshift-" + ct(), e.menuId = e.props.menuId || e.id + "-menu", e.labelId = e.props.labelId || e.id + "-label", e.inputId = e.props.inputId || e.id + "-input", e.getItemId = e.props.getItemId || function(i) {
|
|
431
423
|
return e.id + "-item-" + i;
|
|
432
424
|
}, e.input = null, e.items = [], e.itemCount = null, e.previousResultCount = 0, e.timeoutIds = [], e.internalSetTimeout = function(i, c) {
|
|
433
425
|
var u = setTimeout(function() {
|
|
@@ -471,7 +463,7 @@ var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
471
463
|
h = e.props.stateReducer(g, h), u = h.hasOwnProperty("selectedItem");
|
|
472
464
|
var I = {};
|
|
473
465
|
return u && h.selectedItem !== g.selectedItem && (_ = h.selectedItem), h.type = h.type || Le, Object.keys(h).forEach(function(w) {
|
|
474
|
-
g[w] !== h[w] && (m[w] = h[w]), w !== "type" && (h[w],
|
|
466
|
+
g[w] !== h[w] && (m[w] = h[w]), w !== "type" && (h[w], fe(e.props, w) || (I[w] = h[w]));
|
|
475
467
|
}), E && h.hasOwnProperty("inputValue") && e.props.onInputValueChange(h.inputValue, M({}, e.getStateAndHelpers(), h)), I;
|
|
476
468
|
}, function() {
|
|
477
469
|
De(c)();
|
|
@@ -500,7 +492,7 @@ var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
500
492
|
}, function() {
|
|
501
493
|
var m = u.getItemCount();
|
|
502
494
|
if (m > 0) {
|
|
503
|
-
var E = u.getState(), g = E.highlightedIndex, h =
|
|
495
|
+
var E = u.getState(), g = E.highlightedIndex, h = de(1, g, m, function(I) {
|
|
504
496
|
return u.getItemNodeFromIndex(I);
|
|
505
497
|
});
|
|
506
498
|
u.setHighlightedIndex(h, {
|
|
@@ -523,7 +515,7 @@ var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
523
515
|
}, function() {
|
|
524
516
|
var m = u.getItemCount();
|
|
525
517
|
if (m > 0) {
|
|
526
|
-
var E = u.getState(), g = E.highlightedIndex, h =
|
|
518
|
+
var E = u.getState(), g = E.highlightedIndex, h = de(-1, g, m, function(I) {
|
|
527
519
|
return u.getItemNodeFromIndex(I);
|
|
528
520
|
});
|
|
529
521
|
u.setHighlightedIndex(h, {
|
|
@@ -614,10 +606,10 @@ var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
614
606
|
e.buttonKeyDownHandlers[c] && e.buttonKeyDownHandlers[c].call(me(e), i);
|
|
615
607
|
}, e.buttonHandleClick = function(i) {
|
|
616
608
|
i.preventDefault(), e.props.environment.document.activeElement === e.props.environment.document.body && i.target.focus(), process.env.NODE_ENV === "test" ? e.toggleMenu({
|
|
617
|
-
type:
|
|
609
|
+
type: _e
|
|
618
610
|
}) : e.internalSetTimeout(function() {
|
|
619
611
|
return e.toggleMenu({
|
|
620
|
-
type:
|
|
612
|
+
type: _e
|
|
621
613
|
});
|
|
622
614
|
});
|
|
623
615
|
}, e.buttonHandleBlur = function(i) {
|
|
@@ -740,7 +732,7 @@ var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
740
732
|
e.internalSetState({
|
|
741
733
|
isOpen: !1
|
|
742
734
|
}, i);
|
|
743
|
-
}, e.updateStatus =
|
|
735
|
+
}, e.updateStatus = ge(function() {
|
|
744
736
|
var i = e.getState(), c = e.items[i.highlightedIndex], u = e.getItemCount(), _ = e.props.getA11yStatusMessage(M({
|
|
745
737
|
itemToString: e.props.itemToString,
|
|
746
738
|
previousResultCount: e.previousResultCount,
|
|
@@ -749,7 +741,7 @@ var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
749
741
|
}, i));
|
|
750
742
|
e.previousResultCount = u, ke(_, e.props.environment.document);
|
|
751
743
|
}, 200);
|
|
752
|
-
var
|
|
744
|
+
var l = e.props, v = l.defaultHighlightedIndex, y = l.initialHighlightedIndex, C = y === void 0 ? v : y, S = l.defaultIsOpen, N = l.initialIsOpen, V = N === void 0 ? S : N, P = l.initialInputValue, b = P === void 0 ? "" : P, H = l.initialSelectedItem, T = H === void 0 ? null : H, f = e.getState({
|
|
753
745
|
highlightedIndex: C,
|
|
754
746
|
isOpen: V,
|
|
755
747
|
inputValue: b,
|
|
@@ -774,16 +766,16 @@ var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
774
766
|
var e = this.getItemNodeFromIndex(this.getState().highlightedIndex);
|
|
775
767
|
this.props.scrollIntoView(e, this._menuNode);
|
|
776
768
|
}
|
|
777
|
-
}, s.moveHighlightedIndex = function(e,
|
|
769
|
+
}, s.moveHighlightedIndex = function(e, l) {
|
|
778
770
|
var v = this, y = this.getItemCount(), C = this.getState(), S = C.highlightedIndex;
|
|
779
771
|
if (y > 0) {
|
|
780
|
-
var N =
|
|
772
|
+
var N = de(e, S, y, function(V) {
|
|
781
773
|
return v.getItemNodeFromIndex(V);
|
|
782
774
|
});
|
|
783
|
-
this.setHighlightedIndex(N,
|
|
775
|
+
this.setHighlightedIndex(N, l);
|
|
784
776
|
}
|
|
785
777
|
}, s.getStateAndHelpers = function() {
|
|
786
|
-
var e = this.getState(),
|
|
778
|
+
var e = this.getState(), l = e.highlightedIndex, v = e.inputValue, y = e.selectedItem, C = e.isOpen, S = this.props.itemToString, N = this.id, V = this.getRootProps, P = this.getToggleButtonProps, b = this.getLabelProps, H = this.getMenuProps, T = this.getInputProps, f = this.getItemProps, i = this.openMenu, c = this.closeMenu, u = this.toggleMenu, _ = this.selectItem, m = this.selectItemAtIndex, E = this.selectHighlightedItem, g = this.setHighlightedIndex, h = this.clearSelection, I = this.clearItems, w = this.reset, x = this.setItemCount, a = this.unsetItemCount, R = this.internalSetState;
|
|
787
779
|
return {
|
|
788
780
|
// prop getters
|
|
789
781
|
getRootProps: V,
|
|
@@ -811,7 +803,7 @@ var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
811
803
|
// derived
|
|
812
804
|
id: N,
|
|
813
805
|
// state
|
|
814
|
-
highlightedIndex:
|
|
806
|
+
highlightedIndex: l,
|
|
815
807
|
inputValue: v,
|
|
816
808
|
isOpen: C,
|
|
817
809
|
selectedItem: y
|
|
@@ -820,7 +812,7 @@ var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
820
812
|
var e = this;
|
|
821
813
|
process.env.NODE_ENV !== "production" && this.getMenuProps.called && !this.getMenuProps.suppressRefError && Re(this._menuNode, this.getMenuProps);
|
|
822
814
|
{
|
|
823
|
-
var
|
|
815
|
+
var l = function() {
|
|
824
816
|
e.isMouseDown = !0;
|
|
825
817
|
}, v = function(P) {
|
|
826
818
|
e.isMouseDown = !1;
|
|
@@ -842,30 +834,30 @@ var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
842
834
|
return e.props.onOuterClick(e.getStateAndHelpers());
|
|
843
835
|
});
|
|
844
836
|
}, N = this.props.environment;
|
|
845
|
-
N.addEventListener("mousedown",
|
|
846
|
-
e.internalClearTimeouts(), e.updateStatus.cancel(), N.removeEventListener("mousedown",
|
|
837
|
+
N.addEventListener("mousedown", l), N.addEventListener("mouseup", v), N.addEventListener("touchstart", y), N.addEventListener("touchmove", C), N.addEventListener("touchend", S), this.cleanup = function() {
|
|
838
|
+
e.internalClearTimeouts(), e.updateStatus.cancel(), N.removeEventListener("mousedown", l), N.removeEventListener("mouseup", v), N.removeEventListener("touchstart", y), N.removeEventListener("touchmove", C), N.removeEventListener("touchend", S);
|
|
847
839
|
};
|
|
848
840
|
}
|
|
849
|
-
}, s.shouldScroll = function(e,
|
|
850
|
-
var v = this.props.highlightedIndex === void 0 ? this.getState() : this.props, y = v.highlightedIndex, C =
|
|
841
|
+
}, s.shouldScroll = function(e, l) {
|
|
842
|
+
var v = this.props.highlightedIndex === void 0 ? this.getState() : this.props, y = v.highlightedIndex, C = l.highlightedIndex === void 0 ? e : l, S = C.highlightedIndex, N = y && this.getState().isOpen && !e.isOpen, V = y !== S;
|
|
851
843
|
return N || V;
|
|
852
|
-
}, s.componentDidUpdate = function(e,
|
|
853
|
-
process.env.NODE_ENV !== "production" && (Te(this.state, e, this.props), this.getMenuProps.called && !this.getMenuProps.suppressRefError && Re(this._menuNode, this.getMenuProps)),
|
|
844
|
+
}, s.componentDidUpdate = function(e, l) {
|
|
845
|
+
process.env.NODE_ENV !== "production" && (Te(this.state, e, this.props), this.getMenuProps.called && !this.getMenuProps.suppressRefError && Re(this._menuNode, this.getMenuProps)), fe(this.props, "selectedItem") && this.props.selectedItemChanged(e.selectedItem, this.props.selectedItem) && this.internalSetState({
|
|
854
846
|
type: Ze,
|
|
855
847
|
inputValue: this.props.itemToString(this.props.selectedItem)
|
|
856
|
-
}), !this.avoidScrolling && this.shouldScroll(
|
|
848
|
+
}), !this.avoidScrolling && this.shouldScroll(l, e) && this.scrollHighlightedItemIntoView(), this.updateStatus();
|
|
857
849
|
}, s.componentWillUnmount = function() {
|
|
858
850
|
this.cleanup();
|
|
859
851
|
}, s.render = function() {
|
|
860
852
|
var e = Ce(this.props.children, K);
|
|
861
853
|
this.clearItems(), this.getRootProps.called = !1, this.getRootProps.refKey = void 0, this.getRootProps.suppressRefError = void 0, this.getMenuProps.called = !1, this.getMenuProps.refKey = void 0, this.getMenuProps.suppressRefError = void 0, this.getLabelProps.called = !1, this.getInputProps.called = !1;
|
|
862
|
-
var
|
|
863
|
-
if (!
|
|
854
|
+
var l = Ce(e(this.getStateAndHelpers()));
|
|
855
|
+
if (!l)
|
|
864
856
|
return null;
|
|
865
857
|
if (this.getRootProps.called || this.props.suppressRefError)
|
|
866
|
-
return process.env.NODE_ENV !== "production" && !this.getRootProps.suppressRefError && !this.props.suppressRefError && yt(
|
|
867
|
-
if (He(
|
|
868
|
-
return /* @__PURE__ */ et(
|
|
858
|
+
return process.env.NODE_ENV !== "production" && !this.getRootProps.suppressRefError && !this.props.suppressRefError && yt(l, this.getRootProps), l;
|
|
859
|
+
if (He(l))
|
|
860
|
+
return /* @__PURE__ */ et(l, this.getRootProps(Ae(l)));
|
|
869
861
|
if (process.env.NODE_ENV !== "production")
|
|
870
862
|
throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function");
|
|
871
863
|
}, r;
|
|
@@ -898,67 +890,67 @@ var Le = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
898
890
|
}, t.stateChangeTypes = gt, t;
|
|
899
891
|
}();
|
|
900
892
|
process.env.NODE_ENV !== "production" && (Qe.propTypes = {
|
|
901
|
-
children:
|
|
902
|
-
defaultHighlightedIndex:
|
|
903
|
-
defaultIsOpen:
|
|
904
|
-
initialHighlightedIndex:
|
|
905
|
-
initialSelectedItem:
|
|
906
|
-
initialInputValue:
|
|
907
|
-
initialIsOpen:
|
|
908
|
-
getA11yStatusMessage:
|
|
909
|
-
itemToString:
|
|
910
|
-
onChange:
|
|
911
|
-
onSelect:
|
|
912
|
-
onStateChange:
|
|
913
|
-
onInputValueChange:
|
|
914
|
-
onUserAction:
|
|
915
|
-
onOuterClick:
|
|
916
|
-
selectedItemChanged:
|
|
917
|
-
stateReducer:
|
|
918
|
-
itemCount:
|
|
919
|
-
id:
|
|
920
|
-
environment:
|
|
921
|
-
addEventListener:
|
|
922
|
-
removeEventListener:
|
|
923
|
-
document:
|
|
924
|
-
getElementById:
|
|
925
|
-
activeElement:
|
|
926
|
-
body:
|
|
893
|
+
children: n.func,
|
|
894
|
+
defaultHighlightedIndex: n.number,
|
|
895
|
+
defaultIsOpen: n.bool,
|
|
896
|
+
initialHighlightedIndex: n.number,
|
|
897
|
+
initialSelectedItem: n.any,
|
|
898
|
+
initialInputValue: n.string,
|
|
899
|
+
initialIsOpen: n.bool,
|
|
900
|
+
getA11yStatusMessage: n.func,
|
|
901
|
+
itemToString: n.func,
|
|
902
|
+
onChange: n.func,
|
|
903
|
+
onSelect: n.func,
|
|
904
|
+
onStateChange: n.func,
|
|
905
|
+
onInputValueChange: n.func,
|
|
906
|
+
onUserAction: n.func,
|
|
907
|
+
onOuterClick: n.func,
|
|
908
|
+
selectedItemChanged: n.func,
|
|
909
|
+
stateReducer: n.func,
|
|
910
|
+
itemCount: n.number,
|
|
911
|
+
id: n.string,
|
|
912
|
+
environment: n.shape({
|
|
913
|
+
addEventListener: n.func,
|
|
914
|
+
removeEventListener: n.func,
|
|
915
|
+
document: n.shape({
|
|
916
|
+
getElementById: n.func,
|
|
917
|
+
activeElement: n.any,
|
|
918
|
+
body: n.any
|
|
927
919
|
})
|
|
928
920
|
}),
|
|
929
|
-
suppressRefError:
|
|
930
|
-
scrollIntoView:
|
|
921
|
+
suppressRefError: n.bool,
|
|
922
|
+
scrollIntoView: n.func,
|
|
931
923
|
// things we keep in state for uncontrolled components
|
|
932
924
|
// but can accept as props for controlled components
|
|
933
925
|
/* eslint-disable react/no-unused-prop-types */
|
|
934
|
-
selectedItem:
|
|
935
|
-
isOpen:
|
|
936
|
-
inputValue:
|
|
937
|
-
highlightedIndex:
|
|
938
|
-
labelId:
|
|
939
|
-
inputId:
|
|
940
|
-
menuId:
|
|
941
|
-
getItemId:
|
|
926
|
+
selectedItem: n.any,
|
|
927
|
+
isOpen: n.bool,
|
|
928
|
+
inputValue: n.string,
|
|
929
|
+
highlightedIndex: n.number,
|
|
930
|
+
labelId: n.string,
|
|
931
|
+
inputId: n.string,
|
|
932
|
+
menuId: n.string,
|
|
933
|
+
getItemId: n.func
|
|
942
934
|
/* eslint-enable react/no-unused-prop-types */
|
|
943
935
|
});
|
|
944
936
|
var Ct = Qe;
|
|
945
|
-
function Re(t,
|
|
946
|
-
var r =
|
|
937
|
+
function Re(t, o) {
|
|
938
|
+
var r = o.refKey;
|
|
947
939
|
t || console.error('downshift: The ref prop "' + r + '" from getMenuProps was not applied correctly on your menu element.');
|
|
948
940
|
}
|
|
949
|
-
function yt(t,
|
|
950
|
-
var r =
|
|
951
|
-
|
|
941
|
+
function yt(t, o) {
|
|
942
|
+
var r = o.refKey, s = r !== "ref", d = !He(t);
|
|
943
|
+
d && !s && !we.isForwardRef(t) ? console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps") : !d && s && console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "' + r + '"'), !we.isForwardRef(t) && !Ae(t)[r] && console.error('downshift: You must apply the ref prop "' + r + '" from getRootProps onto your root element.');
|
|
952
944
|
}
|
|
953
|
-
function wt(t,
|
|
954
|
-
return
|
|
945
|
+
function wt(t, o) {
|
|
946
|
+
return o.changes;
|
|
955
947
|
}
|
|
956
948
|
function Nt(t) {
|
|
957
|
-
var
|
|
958
|
-
return
|
|
949
|
+
var o = t.selectedItem, r = t.itemToString;
|
|
950
|
+
return o ? r(o) + " has been selected." : "";
|
|
959
951
|
}
|
|
960
|
-
|
|
961
|
-
ke(t(),
|
|
952
|
+
ge(function(t, o) {
|
|
953
|
+
ke(t(), o);
|
|
962
954
|
}, 200);
|
|
963
955
|
function Ot(t) {
|
|
964
956
|
return t ? String(t) : "";
|
|
@@ -975,20 +967,20 @@ var J = {
|
|
|
975
967
|
};
|
|
976
968
|
process.env.NODE_ENV;
|
|
977
969
|
process.env.NODE_ENV;
|
|
978
|
-
|
|
979
|
-
addEventListener:
|
|
980
|
-
removeEventListener:
|
|
981
|
-
document:
|
|
982
|
-
getElementById:
|
|
983
|
-
activeElement:
|
|
984
|
-
body:
|
|
970
|
+
n.array.isRequired, n.func, n.func, n.func, n.number, n.number, n.number, n.bool, n.bool, n.bool, n.any, n.any, n.any, n.string, n.string, n.string, n.func, n.string, n.func, n.func, n.func, n.func, n.func, n.shape({
|
|
971
|
+
addEventListener: n.func,
|
|
972
|
+
removeEventListener: n.func,
|
|
973
|
+
document: n.shape({
|
|
974
|
+
getElementById: n.func,
|
|
975
|
+
activeElement: n.any,
|
|
976
|
+
body: n.any
|
|
985
977
|
})
|
|
986
978
|
});
|
|
987
979
|
function Dt(t) {
|
|
988
|
-
var
|
|
989
|
-
return
|
|
980
|
+
var o = t.isOpen, r = t.resultCount, s = t.previousResultCount;
|
|
981
|
+
return o ? r ? r !== s ? "".concat(r, " result").concat(r === 1 ? " is" : "s are", " available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.") : "" : "No results are available." : "";
|
|
990
982
|
}
|
|
991
|
-
|
|
983
|
+
ve(ve({}, J), { getA11yStatusMessage: Dt });
|
|
992
984
|
process.env.NODE_ENV;
|
|
993
985
|
process.env.NODE_ENV;
|
|
994
986
|
process.env.NODE_ENV;
|
|
@@ -1035,29 +1027,29 @@ process.env.NODE_ENV;
|
|
|
1035
1027
|
process.env.NODE_ENV;
|
|
1036
1028
|
process.env.NODE_ENV;
|
|
1037
1029
|
process.env.NODE_ENV;
|
|
1038
|
-
|
|
1039
|
-
addEventListener:
|
|
1040
|
-
removeEventListener:
|
|
1041
|
-
document:
|
|
1042
|
-
getElementById:
|
|
1043
|
-
activeElement:
|
|
1044
|
-
body:
|
|
1030
|
+
n.array.isRequired, n.func, n.func, n.func, n.func, n.number, n.number, n.number, n.bool, n.bool, n.bool, n.any, n.any, n.any, n.string, n.string, n.string, n.string, n.string, n.string, n.func, n.string, n.string, n.func, n.func, n.func, n.func, n.func, n.func, n.shape({
|
|
1031
|
+
addEventListener: n.func,
|
|
1032
|
+
removeEventListener: n.func,
|
|
1033
|
+
document: n.shape({
|
|
1034
|
+
getElementById: n.func,
|
|
1035
|
+
activeElement: n.any,
|
|
1036
|
+
body: n.any
|
|
1045
1037
|
})
|
|
1046
1038
|
});
|
|
1047
1039
|
process.env.NODE_ENV;
|
|
1048
1040
|
M({}, J, {
|
|
1049
|
-
selectedItemChanged: function(
|
|
1050
|
-
return
|
|
1041
|
+
selectedItemChanged: function(o, r) {
|
|
1042
|
+
return o !== r;
|
|
1051
1043
|
},
|
|
1052
1044
|
getA11yStatusMessage: Me
|
|
1053
1045
|
});
|
|
1054
|
-
|
|
1055
|
-
addEventListener:
|
|
1056
|
-
removeEventListener:
|
|
1057
|
-
document:
|
|
1058
|
-
getElementById:
|
|
1059
|
-
activeElement:
|
|
1060
|
-
body:
|
|
1046
|
+
n.array, n.array, n.array, n.func, n.func, n.func, n.number, n.number, n.number, n.func, n.func, n.string, n.string, n.shape({
|
|
1047
|
+
addEventListener: n.func,
|
|
1048
|
+
removeEventListener: n.func,
|
|
1049
|
+
document: n.shape({
|
|
1050
|
+
getElementById: n.func,
|
|
1051
|
+
activeElement: n.any,
|
|
1052
|
+
body: n.any
|
|
1061
1053
|
})
|
|
1062
1054
|
});
|
|
1063
1055
|
J.itemToString, J.stateReducer, J.environment;
|