@solexllc/usx-react 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +92 -1264
- package/dist/index.js +94 -1266
- package/package.json +4 -4
- package/src/components/accordion/Accordion.tsx +105 -0
- package/src/components/accordion/accordion.django.html +1 -1
- package/src/components/accordion/config.json +6 -1
- package/src/components/banner/Banner.tsx +35 -27
- package/src/components/banner/banner.django.html +1 -1
- package/src/components/banner/config.json +4 -0
- package/src/components/date-picker/{DatePicker.jsx → DatePicker.tsx} +12 -17
- package/src/components/date-range-picker/{DateRangePicker.jsx → DateRangePicker.tsx} +21 -21
- package/src/components/fieldset/Fieldset.tsx +1 -1
- package/src/components/file-input/{FileInput.jsx → FileInput.tsx} +31 -34
- package/src/components/file-list/{FileList.jsx → FileList.tsx} +24 -24
- package/src/components/header/{HeaderBranding.jsx → HeaderBranding.tsx} +0 -1
- package/src/components/hero/Hero.tsx +49 -7
- package/src/components/hero/config.json +45 -0
- package/src/components/hero/hero.django.html +16 -5
- package/src/components/hero/hero.html +19 -0
- package/src/components/in-page-nav/{InPageNav.jsx → InPageNav.tsx} +14 -18
- package/src/components/language-selector/{LanguageSelector.jsx → LanguageSelector.tsx} +40 -69
- package/src/components/legend/Legend.tsx +1 -1
- package/src/components/memorable-date/{MemorableDate.jsx → MemorableDate.tsx} +27 -27
- package/src/components/page/{Page.jsx → Page.tsx} +7 -11
- package/src/components/range-slider/{RangeSlider.jsx → RangeSlider.tsx} +13 -21
- package/src/components/select/Select.tsx +2 -2
- package/src/components/time-picker/{TimePicker.jsx → TimePicker.tsx} +14 -19
- package/src/index.js +11 -11
- package/src/components/accordion/Accordion.jsx +0 -170
package/dist/index.js
CHANGED
|
@@ -1,953 +1,8 @@
|
|
|
1
|
-
import { jsxs, Fragment
|
|
2
|
-
import React, { useState,
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React, { useState, useRef, useId, createContext, useContext, useEffect, useCallback, useMemo } from "react";
|
|
3
3
|
function getDefaultExportFromCjs(x) {
|
|
4
4
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
5
5
|
}
|
|
6
|
-
var propTypes = { exports: {} };
|
|
7
|
-
var reactIs = { exports: {} };
|
|
8
|
-
var reactIs_production_min = {};
|
|
9
|
-
/** @license React v16.13.1
|
|
10
|
-
* react-is.production.min.js
|
|
11
|
-
*
|
|
12
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the MIT license found in the
|
|
15
|
-
* LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/
|
|
17
|
-
var hasRequiredReactIs_production_min;
|
|
18
|
-
function requireReactIs_production_min() {
|
|
19
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
20
|
-
hasRequiredReactIs_production_min = 1;
|
|
21
|
-
var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
|
|
22
|
-
function z(a) {
|
|
23
|
-
if ("object" === typeof a && null !== a) {
|
|
24
|
-
var u = a.$$typeof;
|
|
25
|
-
switch (u) {
|
|
26
|
-
case c:
|
|
27
|
-
switch (a = a.type, a) {
|
|
28
|
-
case l:
|
|
29
|
-
case m:
|
|
30
|
-
case e:
|
|
31
|
-
case g:
|
|
32
|
-
case f:
|
|
33
|
-
case p:
|
|
34
|
-
return a;
|
|
35
|
-
default:
|
|
36
|
-
switch (a = a && a.$$typeof, a) {
|
|
37
|
-
case k:
|
|
38
|
-
case n:
|
|
39
|
-
case t:
|
|
40
|
-
case r:
|
|
41
|
-
case h:
|
|
42
|
-
return a;
|
|
43
|
-
default:
|
|
44
|
-
return u;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
case d:
|
|
48
|
-
return u;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function A(a) {
|
|
53
|
-
return z(a) === m;
|
|
54
|
-
}
|
|
55
|
-
reactIs_production_min.AsyncMode = l;
|
|
56
|
-
reactIs_production_min.ConcurrentMode = m;
|
|
57
|
-
reactIs_production_min.ContextConsumer = k;
|
|
58
|
-
reactIs_production_min.ContextProvider = h;
|
|
59
|
-
reactIs_production_min.Element = c;
|
|
60
|
-
reactIs_production_min.ForwardRef = n;
|
|
61
|
-
reactIs_production_min.Fragment = e;
|
|
62
|
-
reactIs_production_min.Lazy = t;
|
|
63
|
-
reactIs_production_min.Memo = r;
|
|
64
|
-
reactIs_production_min.Portal = d;
|
|
65
|
-
reactIs_production_min.Profiler = g;
|
|
66
|
-
reactIs_production_min.StrictMode = f;
|
|
67
|
-
reactIs_production_min.Suspense = p;
|
|
68
|
-
reactIs_production_min.isAsyncMode = function(a) {
|
|
69
|
-
return A(a) || z(a) === l;
|
|
70
|
-
};
|
|
71
|
-
reactIs_production_min.isConcurrentMode = A;
|
|
72
|
-
reactIs_production_min.isContextConsumer = function(a) {
|
|
73
|
-
return z(a) === k;
|
|
74
|
-
};
|
|
75
|
-
reactIs_production_min.isContextProvider = function(a) {
|
|
76
|
-
return z(a) === h;
|
|
77
|
-
};
|
|
78
|
-
reactIs_production_min.isElement = function(a) {
|
|
79
|
-
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
80
|
-
};
|
|
81
|
-
reactIs_production_min.isForwardRef = function(a) {
|
|
82
|
-
return z(a) === n;
|
|
83
|
-
};
|
|
84
|
-
reactIs_production_min.isFragment = function(a) {
|
|
85
|
-
return z(a) === e;
|
|
86
|
-
};
|
|
87
|
-
reactIs_production_min.isLazy = function(a) {
|
|
88
|
-
return z(a) === t;
|
|
89
|
-
};
|
|
90
|
-
reactIs_production_min.isMemo = function(a) {
|
|
91
|
-
return z(a) === r;
|
|
92
|
-
};
|
|
93
|
-
reactIs_production_min.isPortal = function(a) {
|
|
94
|
-
return z(a) === d;
|
|
95
|
-
};
|
|
96
|
-
reactIs_production_min.isProfiler = function(a) {
|
|
97
|
-
return z(a) === g;
|
|
98
|
-
};
|
|
99
|
-
reactIs_production_min.isStrictMode = function(a) {
|
|
100
|
-
return z(a) === f;
|
|
101
|
-
};
|
|
102
|
-
reactIs_production_min.isSuspense = function(a) {
|
|
103
|
-
return z(a) === p;
|
|
104
|
-
};
|
|
105
|
-
reactIs_production_min.isValidElementType = function(a) {
|
|
106
|
-
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
107
|
-
};
|
|
108
|
-
reactIs_production_min.typeOf = z;
|
|
109
|
-
return reactIs_production_min;
|
|
110
|
-
}
|
|
111
|
-
var reactIs_development = {};
|
|
112
|
-
/** @license React v16.13.1
|
|
113
|
-
* react-is.development.js
|
|
114
|
-
*
|
|
115
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
116
|
-
*
|
|
117
|
-
* This source code is licensed under the MIT license found in the
|
|
118
|
-
* LICENSE file in the root directory of this source tree.
|
|
119
|
-
*/
|
|
120
|
-
var hasRequiredReactIs_development;
|
|
121
|
-
function requireReactIs_development() {
|
|
122
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
123
|
-
hasRequiredReactIs_development = 1;
|
|
124
|
-
if (process.env.NODE_ENV !== "production") {
|
|
125
|
-
(function() {
|
|
126
|
-
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
127
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
|
|
128
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
|
|
129
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
|
|
130
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
|
|
131
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
|
|
132
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
|
|
133
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
|
|
134
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
|
|
135
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
|
|
136
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
|
|
137
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
|
|
138
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
|
|
139
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
|
|
140
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
|
|
141
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
|
|
142
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
|
|
143
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
|
|
144
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
|
|
145
|
-
function isValidElementType(type) {
|
|
146
|
-
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
147
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
148
|
-
}
|
|
149
|
-
function typeOf(object) {
|
|
150
|
-
if (typeof object === "object" && object !== null) {
|
|
151
|
-
var $$typeof = object.$$typeof;
|
|
152
|
-
switch ($$typeof) {
|
|
153
|
-
case REACT_ELEMENT_TYPE:
|
|
154
|
-
var type = object.type;
|
|
155
|
-
switch (type) {
|
|
156
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
157
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
158
|
-
case REACT_FRAGMENT_TYPE:
|
|
159
|
-
case REACT_PROFILER_TYPE:
|
|
160
|
-
case REACT_STRICT_MODE_TYPE:
|
|
161
|
-
case REACT_SUSPENSE_TYPE:
|
|
162
|
-
return type;
|
|
163
|
-
default:
|
|
164
|
-
var $$typeofType = type && type.$$typeof;
|
|
165
|
-
switch ($$typeofType) {
|
|
166
|
-
case REACT_CONTEXT_TYPE:
|
|
167
|
-
case REACT_FORWARD_REF_TYPE:
|
|
168
|
-
case REACT_LAZY_TYPE:
|
|
169
|
-
case REACT_MEMO_TYPE:
|
|
170
|
-
case REACT_PROVIDER_TYPE:
|
|
171
|
-
return $$typeofType;
|
|
172
|
-
default:
|
|
173
|
-
return $$typeof;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
case REACT_PORTAL_TYPE:
|
|
177
|
-
return $$typeof;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
return void 0;
|
|
181
|
-
}
|
|
182
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
183
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
184
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
185
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
186
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
187
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
188
|
-
var Fragment2 = REACT_FRAGMENT_TYPE;
|
|
189
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
190
|
-
var Memo = REACT_MEMO_TYPE;
|
|
191
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
192
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
193
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
194
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
195
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
196
|
-
function isAsyncMode(object) {
|
|
197
|
-
{
|
|
198
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
199
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
200
|
-
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
204
|
-
}
|
|
205
|
-
function isConcurrentMode(object) {
|
|
206
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
207
|
-
}
|
|
208
|
-
function isContextConsumer(object) {
|
|
209
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
210
|
-
}
|
|
211
|
-
function isContextProvider(object) {
|
|
212
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
213
|
-
}
|
|
214
|
-
function isElement(object) {
|
|
215
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
216
|
-
}
|
|
217
|
-
function isForwardRef(object) {
|
|
218
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
219
|
-
}
|
|
220
|
-
function isFragment(object) {
|
|
221
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
222
|
-
}
|
|
223
|
-
function isLazy(object) {
|
|
224
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
225
|
-
}
|
|
226
|
-
function isMemo(object) {
|
|
227
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
228
|
-
}
|
|
229
|
-
function isPortal(object) {
|
|
230
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
231
|
-
}
|
|
232
|
-
function isProfiler(object) {
|
|
233
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
234
|
-
}
|
|
235
|
-
function isStrictMode(object) {
|
|
236
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
237
|
-
}
|
|
238
|
-
function isSuspense(object) {
|
|
239
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
240
|
-
}
|
|
241
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
242
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
243
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
244
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
245
|
-
reactIs_development.Element = Element;
|
|
246
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
247
|
-
reactIs_development.Fragment = Fragment2;
|
|
248
|
-
reactIs_development.Lazy = Lazy;
|
|
249
|
-
reactIs_development.Memo = Memo;
|
|
250
|
-
reactIs_development.Portal = Portal;
|
|
251
|
-
reactIs_development.Profiler = Profiler;
|
|
252
|
-
reactIs_development.StrictMode = StrictMode;
|
|
253
|
-
reactIs_development.Suspense = Suspense;
|
|
254
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
255
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
256
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
257
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
258
|
-
reactIs_development.isElement = isElement;
|
|
259
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
260
|
-
reactIs_development.isFragment = isFragment;
|
|
261
|
-
reactIs_development.isLazy = isLazy;
|
|
262
|
-
reactIs_development.isMemo = isMemo;
|
|
263
|
-
reactIs_development.isPortal = isPortal;
|
|
264
|
-
reactIs_development.isProfiler = isProfiler;
|
|
265
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
266
|
-
reactIs_development.isSuspense = isSuspense;
|
|
267
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
268
|
-
reactIs_development.typeOf = typeOf;
|
|
269
|
-
})();
|
|
270
|
-
}
|
|
271
|
-
return reactIs_development;
|
|
272
|
-
}
|
|
273
|
-
var hasRequiredReactIs;
|
|
274
|
-
function requireReactIs() {
|
|
275
|
-
if (hasRequiredReactIs) return reactIs.exports;
|
|
276
|
-
hasRequiredReactIs = 1;
|
|
277
|
-
if (process.env.NODE_ENV === "production") {
|
|
278
|
-
reactIs.exports = requireReactIs_production_min();
|
|
279
|
-
} else {
|
|
280
|
-
reactIs.exports = requireReactIs_development();
|
|
281
|
-
}
|
|
282
|
-
return reactIs.exports;
|
|
283
|
-
}
|
|
284
|
-
/*
|
|
285
|
-
object-assign
|
|
286
|
-
(c) Sindre Sorhus
|
|
287
|
-
@license MIT
|
|
288
|
-
*/
|
|
289
|
-
var objectAssign;
|
|
290
|
-
var hasRequiredObjectAssign;
|
|
291
|
-
function requireObjectAssign() {
|
|
292
|
-
if (hasRequiredObjectAssign) return objectAssign;
|
|
293
|
-
hasRequiredObjectAssign = 1;
|
|
294
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
295
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
296
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
297
|
-
function toObject(val) {
|
|
298
|
-
if (val === null || val === void 0) {
|
|
299
|
-
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
300
|
-
}
|
|
301
|
-
return Object(val);
|
|
302
|
-
}
|
|
303
|
-
function shouldUseNative() {
|
|
304
|
-
try {
|
|
305
|
-
if (!Object.assign) {
|
|
306
|
-
return false;
|
|
307
|
-
}
|
|
308
|
-
var test1 = new String("abc");
|
|
309
|
-
test1[5] = "de";
|
|
310
|
-
if (Object.getOwnPropertyNames(test1)[0] === "5") {
|
|
311
|
-
return false;
|
|
312
|
-
}
|
|
313
|
-
var test2 = {};
|
|
314
|
-
for (var i = 0; i < 10; i++) {
|
|
315
|
-
test2["_" + String.fromCharCode(i)] = i;
|
|
316
|
-
}
|
|
317
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
|
|
318
|
-
return test2[n];
|
|
319
|
-
});
|
|
320
|
-
if (order2.join("") !== "0123456789") {
|
|
321
|
-
return false;
|
|
322
|
-
}
|
|
323
|
-
var test3 = {};
|
|
324
|
-
"abcdefghijklmnopqrst".split("").forEach(function(letter) {
|
|
325
|
-
test3[letter] = letter;
|
|
326
|
-
});
|
|
327
|
-
if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
|
|
328
|
-
return false;
|
|
329
|
-
}
|
|
330
|
-
return true;
|
|
331
|
-
} catch (err) {
|
|
332
|
-
return false;
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
objectAssign = shouldUseNative() ? Object.assign : function(target, source) {
|
|
336
|
-
var from;
|
|
337
|
-
var to = toObject(target);
|
|
338
|
-
var symbols;
|
|
339
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
340
|
-
from = Object(arguments[s]);
|
|
341
|
-
for (var key in from) {
|
|
342
|
-
if (hasOwnProperty.call(from, key)) {
|
|
343
|
-
to[key] = from[key];
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
if (getOwnPropertySymbols) {
|
|
347
|
-
symbols = getOwnPropertySymbols(from);
|
|
348
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
349
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
350
|
-
to[symbols[i]] = from[symbols[i]];
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
return to;
|
|
356
|
-
};
|
|
357
|
-
return objectAssign;
|
|
358
|
-
}
|
|
359
|
-
var ReactPropTypesSecret_1;
|
|
360
|
-
var hasRequiredReactPropTypesSecret;
|
|
361
|
-
function requireReactPropTypesSecret() {
|
|
362
|
-
if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
|
|
363
|
-
hasRequiredReactPropTypesSecret = 1;
|
|
364
|
-
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
365
|
-
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
366
|
-
return ReactPropTypesSecret_1;
|
|
367
|
-
}
|
|
368
|
-
var has;
|
|
369
|
-
var hasRequiredHas;
|
|
370
|
-
function requireHas() {
|
|
371
|
-
if (hasRequiredHas) return has;
|
|
372
|
-
hasRequiredHas = 1;
|
|
373
|
-
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
374
|
-
return has;
|
|
375
|
-
}
|
|
376
|
-
var checkPropTypes_1;
|
|
377
|
-
var hasRequiredCheckPropTypes;
|
|
378
|
-
function requireCheckPropTypes() {
|
|
379
|
-
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
380
|
-
hasRequiredCheckPropTypes = 1;
|
|
381
|
-
var printWarning = function() {
|
|
382
|
-
};
|
|
383
|
-
if (process.env.NODE_ENV !== "production") {
|
|
384
|
-
var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
|
|
385
|
-
var loggedTypeFailures = {};
|
|
386
|
-
var has2 = /* @__PURE__ */ requireHas();
|
|
387
|
-
printWarning = function(text) {
|
|
388
|
-
var message = "Warning: " + text;
|
|
389
|
-
if (typeof console !== "undefined") {
|
|
390
|
-
console.error(message);
|
|
391
|
-
}
|
|
392
|
-
try {
|
|
393
|
-
throw new Error(message);
|
|
394
|
-
} catch (x) {
|
|
395
|
-
}
|
|
396
|
-
};
|
|
397
|
-
}
|
|
398
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
399
|
-
if (process.env.NODE_ENV !== "production") {
|
|
400
|
-
for (var typeSpecName in typeSpecs) {
|
|
401
|
-
if (has2(typeSpecs, typeSpecName)) {
|
|
402
|
-
var error;
|
|
403
|
-
try {
|
|
404
|
-
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
405
|
-
var err = Error(
|
|
406
|
-
(componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
407
|
-
);
|
|
408
|
-
err.name = "Invariant Violation";
|
|
409
|
-
throw err;
|
|
410
|
-
}
|
|
411
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
412
|
-
} catch (ex) {
|
|
413
|
-
error = ex;
|
|
414
|
-
}
|
|
415
|
-
if (error && !(error instanceof Error)) {
|
|
416
|
-
printWarning(
|
|
417
|
-
(componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
418
|
-
);
|
|
419
|
-
}
|
|
420
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
421
|
-
loggedTypeFailures[error.message] = true;
|
|
422
|
-
var stack = getStack ? getStack() : "";
|
|
423
|
-
printWarning(
|
|
424
|
-
"Failed " + location + " type: " + error.message + (stack != null ? stack : "")
|
|
425
|
-
);
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
checkPropTypes.resetWarningCache = function() {
|
|
432
|
-
if (process.env.NODE_ENV !== "production") {
|
|
433
|
-
loggedTypeFailures = {};
|
|
434
|
-
}
|
|
435
|
-
};
|
|
436
|
-
checkPropTypes_1 = checkPropTypes;
|
|
437
|
-
return checkPropTypes_1;
|
|
438
|
-
}
|
|
439
|
-
var factoryWithTypeCheckers;
|
|
440
|
-
var hasRequiredFactoryWithTypeCheckers;
|
|
441
|
-
function requireFactoryWithTypeCheckers() {
|
|
442
|
-
if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
|
|
443
|
-
hasRequiredFactoryWithTypeCheckers = 1;
|
|
444
|
-
var ReactIs = requireReactIs();
|
|
445
|
-
var assign = requireObjectAssign();
|
|
446
|
-
var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
|
|
447
|
-
var has2 = /* @__PURE__ */ requireHas();
|
|
448
|
-
var checkPropTypes = /* @__PURE__ */ requireCheckPropTypes();
|
|
449
|
-
var printWarning = function() {
|
|
450
|
-
};
|
|
451
|
-
if (process.env.NODE_ENV !== "production") {
|
|
452
|
-
printWarning = function(text) {
|
|
453
|
-
var message = "Warning: " + text;
|
|
454
|
-
if (typeof console !== "undefined") {
|
|
455
|
-
console.error(message);
|
|
456
|
-
}
|
|
457
|
-
try {
|
|
458
|
-
throw new Error(message);
|
|
459
|
-
} catch (x) {
|
|
460
|
-
}
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
function emptyFunctionThatReturnsNull() {
|
|
464
|
-
return null;
|
|
465
|
-
}
|
|
466
|
-
factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
467
|
-
var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
|
|
468
|
-
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
469
|
-
function getIteratorFn(maybeIterable) {
|
|
470
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
471
|
-
if (typeof iteratorFn === "function") {
|
|
472
|
-
return iteratorFn;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
var ANONYMOUS = "<<anonymous>>";
|
|
476
|
-
var ReactPropTypes = {
|
|
477
|
-
array: createPrimitiveTypeChecker("array"),
|
|
478
|
-
bigint: createPrimitiveTypeChecker("bigint"),
|
|
479
|
-
bool: createPrimitiveTypeChecker("boolean"),
|
|
480
|
-
func: createPrimitiveTypeChecker("function"),
|
|
481
|
-
number: createPrimitiveTypeChecker("number"),
|
|
482
|
-
object: createPrimitiveTypeChecker("object"),
|
|
483
|
-
string: createPrimitiveTypeChecker("string"),
|
|
484
|
-
symbol: createPrimitiveTypeChecker("symbol"),
|
|
485
|
-
any: createAnyTypeChecker(),
|
|
486
|
-
arrayOf: createArrayOfTypeChecker,
|
|
487
|
-
element: createElementTypeChecker(),
|
|
488
|
-
elementType: createElementTypeTypeChecker(),
|
|
489
|
-
instanceOf: createInstanceTypeChecker,
|
|
490
|
-
node: createNodeChecker(),
|
|
491
|
-
objectOf: createObjectOfTypeChecker,
|
|
492
|
-
oneOf: createEnumTypeChecker,
|
|
493
|
-
oneOfType: createUnionTypeChecker,
|
|
494
|
-
shape: createShapeTypeChecker,
|
|
495
|
-
exact: createStrictShapeTypeChecker
|
|
496
|
-
};
|
|
497
|
-
function is(x, y) {
|
|
498
|
-
if (x === y) {
|
|
499
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
500
|
-
} else {
|
|
501
|
-
return x !== x && y !== y;
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
function PropTypeError(message, data) {
|
|
505
|
-
this.message = message;
|
|
506
|
-
this.data = data && typeof data === "object" ? data : {};
|
|
507
|
-
this.stack = "";
|
|
508
|
-
}
|
|
509
|
-
PropTypeError.prototype = Error.prototype;
|
|
510
|
-
function createChainableTypeChecker(validate) {
|
|
511
|
-
if (process.env.NODE_ENV !== "production") {
|
|
512
|
-
var manualPropTypeCallCache = {};
|
|
513
|
-
var manualPropTypeWarningCount = 0;
|
|
514
|
-
}
|
|
515
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
516
|
-
componentName = componentName || ANONYMOUS;
|
|
517
|
-
propFullName = propFullName || propName;
|
|
518
|
-
if (secret !== ReactPropTypesSecret) {
|
|
519
|
-
if (throwOnDirectAccess) {
|
|
520
|
-
var err = new Error(
|
|
521
|
-
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
522
|
-
);
|
|
523
|
-
err.name = "Invariant Violation";
|
|
524
|
-
throw err;
|
|
525
|
-
} else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
|
|
526
|
-
var cacheKey = componentName + ":" + propName;
|
|
527
|
-
if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
528
|
-
manualPropTypeWarningCount < 3) {
|
|
529
|
-
printWarning(
|
|
530
|
-
"You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
531
|
-
);
|
|
532
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
533
|
-
manualPropTypeWarningCount++;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
if (props[propName] == null) {
|
|
538
|
-
if (isRequired) {
|
|
539
|
-
if (props[propName] === null) {
|
|
540
|
-
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
|
|
541
|
-
}
|
|
542
|
-
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
|
|
543
|
-
}
|
|
544
|
-
return null;
|
|
545
|
-
} else {
|
|
546
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
550
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
551
|
-
return chainedCheckType;
|
|
552
|
-
}
|
|
553
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
554
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
555
|
-
var propValue = props[propName];
|
|
556
|
-
var propType = getPropType(propValue);
|
|
557
|
-
if (propType !== expectedType) {
|
|
558
|
-
var preciseType = getPreciseType(propValue);
|
|
559
|
-
return new PropTypeError(
|
|
560
|
-
"Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
|
|
561
|
-
{ expectedType }
|
|
562
|
-
);
|
|
563
|
-
}
|
|
564
|
-
return null;
|
|
565
|
-
}
|
|
566
|
-
return createChainableTypeChecker(validate);
|
|
567
|
-
}
|
|
568
|
-
function createAnyTypeChecker() {
|
|
569
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
570
|
-
}
|
|
571
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
572
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
573
|
-
if (typeof typeChecker !== "function") {
|
|
574
|
-
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
|
|
575
|
-
}
|
|
576
|
-
var propValue = props[propName];
|
|
577
|
-
if (!Array.isArray(propValue)) {
|
|
578
|
-
var propType = getPropType(propValue);
|
|
579
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
|
|
580
|
-
}
|
|
581
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
582
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
|
|
583
|
-
if (error instanceof Error) {
|
|
584
|
-
return error;
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
return null;
|
|
588
|
-
}
|
|
589
|
-
return createChainableTypeChecker(validate);
|
|
590
|
-
}
|
|
591
|
-
function createElementTypeChecker() {
|
|
592
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
593
|
-
var propValue = props[propName];
|
|
594
|
-
if (!isValidElement(propValue)) {
|
|
595
|
-
var propType = getPropType(propValue);
|
|
596
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
|
|
597
|
-
}
|
|
598
|
-
return null;
|
|
599
|
-
}
|
|
600
|
-
return createChainableTypeChecker(validate);
|
|
601
|
-
}
|
|
602
|
-
function createElementTypeTypeChecker() {
|
|
603
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
604
|
-
var propValue = props[propName];
|
|
605
|
-
if (!ReactIs.isValidElementType(propValue)) {
|
|
606
|
-
var propType = getPropType(propValue);
|
|
607
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
|
|
608
|
-
}
|
|
609
|
-
return null;
|
|
610
|
-
}
|
|
611
|
-
return createChainableTypeChecker(validate);
|
|
612
|
-
}
|
|
613
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
614
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
615
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
616
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
617
|
-
var actualClassName = getClassName(props[propName]);
|
|
618
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
|
|
619
|
-
}
|
|
620
|
-
return null;
|
|
621
|
-
}
|
|
622
|
-
return createChainableTypeChecker(validate);
|
|
623
|
-
}
|
|
624
|
-
function createEnumTypeChecker(expectedValues) {
|
|
625
|
-
if (!Array.isArray(expectedValues)) {
|
|
626
|
-
if (process.env.NODE_ENV !== "production") {
|
|
627
|
-
if (arguments.length > 1) {
|
|
628
|
-
printWarning(
|
|
629
|
-
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
630
|
-
);
|
|
631
|
-
} else {
|
|
632
|
-
printWarning("Invalid argument supplied to oneOf, expected an array.");
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
return emptyFunctionThatReturnsNull;
|
|
636
|
-
}
|
|
637
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
638
|
-
var propValue = props[propName];
|
|
639
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
640
|
-
if (is(propValue, expectedValues[i])) {
|
|
641
|
-
return null;
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
645
|
-
var type = getPreciseType(value);
|
|
646
|
-
if (type === "symbol") {
|
|
647
|
-
return String(value);
|
|
648
|
-
}
|
|
649
|
-
return value;
|
|
650
|
-
});
|
|
651
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
|
|
652
|
-
}
|
|
653
|
-
return createChainableTypeChecker(validate);
|
|
654
|
-
}
|
|
655
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
656
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
657
|
-
if (typeof typeChecker !== "function") {
|
|
658
|
-
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
|
|
659
|
-
}
|
|
660
|
-
var propValue = props[propName];
|
|
661
|
-
var propType = getPropType(propValue);
|
|
662
|
-
if (propType !== "object") {
|
|
663
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
|
|
664
|
-
}
|
|
665
|
-
for (var key in propValue) {
|
|
666
|
-
if (has2(propValue, key)) {
|
|
667
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
668
|
-
if (error instanceof Error) {
|
|
669
|
-
return error;
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
return null;
|
|
674
|
-
}
|
|
675
|
-
return createChainableTypeChecker(validate);
|
|
676
|
-
}
|
|
677
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
678
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
679
|
-
process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
|
|
680
|
-
return emptyFunctionThatReturnsNull;
|
|
681
|
-
}
|
|
682
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
683
|
-
var checker = arrayOfTypeCheckers[i];
|
|
684
|
-
if (typeof checker !== "function") {
|
|
685
|
-
printWarning(
|
|
686
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
|
|
687
|
-
);
|
|
688
|
-
return emptyFunctionThatReturnsNull;
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
692
|
-
var expectedTypes = [];
|
|
693
|
-
for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
|
|
694
|
-
var checker2 = arrayOfTypeCheckers[i2];
|
|
695
|
-
var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
696
|
-
if (checkerResult == null) {
|
|
697
|
-
return null;
|
|
698
|
-
}
|
|
699
|
-
if (checkerResult.data && has2(checkerResult.data, "expectedType")) {
|
|
700
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
|
|
704
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
|
|
705
|
-
}
|
|
706
|
-
return createChainableTypeChecker(validate);
|
|
707
|
-
}
|
|
708
|
-
function createNodeChecker() {
|
|
709
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
710
|
-
if (!isNode(props[propName])) {
|
|
711
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
|
|
712
|
-
}
|
|
713
|
-
return null;
|
|
714
|
-
}
|
|
715
|
-
return createChainableTypeChecker(validate);
|
|
716
|
-
}
|
|
717
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
718
|
-
return new PropTypeError(
|
|
719
|
-
(componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
|
|
720
|
-
);
|
|
721
|
-
}
|
|
722
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
723
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
724
|
-
var propValue = props[propName];
|
|
725
|
-
var propType = getPropType(propValue);
|
|
726
|
-
if (propType !== "object") {
|
|
727
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
728
|
-
}
|
|
729
|
-
for (var key in shapeTypes) {
|
|
730
|
-
var checker = shapeTypes[key];
|
|
731
|
-
if (typeof checker !== "function") {
|
|
732
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
733
|
-
}
|
|
734
|
-
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
735
|
-
if (error) {
|
|
736
|
-
return error;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
return null;
|
|
740
|
-
}
|
|
741
|
-
return createChainableTypeChecker(validate);
|
|
742
|
-
}
|
|
743
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
744
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
745
|
-
var propValue = props[propName];
|
|
746
|
-
var propType = getPropType(propValue);
|
|
747
|
-
if (propType !== "object") {
|
|
748
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
749
|
-
}
|
|
750
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
751
|
-
for (var key in allKeys) {
|
|
752
|
-
var checker = shapeTypes[key];
|
|
753
|
-
if (has2(shapeTypes, key) && typeof checker !== "function") {
|
|
754
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
755
|
-
}
|
|
756
|
-
if (!checker) {
|
|
757
|
-
return new PropTypeError(
|
|
758
|
-
"Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
|
|
759
|
-
);
|
|
760
|
-
}
|
|
761
|
-
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
762
|
-
if (error) {
|
|
763
|
-
return error;
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
return null;
|
|
767
|
-
}
|
|
768
|
-
return createChainableTypeChecker(validate);
|
|
769
|
-
}
|
|
770
|
-
function isNode(propValue) {
|
|
771
|
-
switch (typeof propValue) {
|
|
772
|
-
case "number":
|
|
773
|
-
case "string":
|
|
774
|
-
case "undefined":
|
|
775
|
-
return true;
|
|
776
|
-
case "boolean":
|
|
777
|
-
return !propValue;
|
|
778
|
-
case "object":
|
|
779
|
-
if (Array.isArray(propValue)) {
|
|
780
|
-
return propValue.every(isNode);
|
|
781
|
-
}
|
|
782
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
783
|
-
return true;
|
|
784
|
-
}
|
|
785
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
786
|
-
if (iteratorFn) {
|
|
787
|
-
var iterator = iteratorFn.call(propValue);
|
|
788
|
-
var step;
|
|
789
|
-
if (iteratorFn !== propValue.entries) {
|
|
790
|
-
while (!(step = iterator.next()).done) {
|
|
791
|
-
if (!isNode(step.value)) {
|
|
792
|
-
return false;
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
} else {
|
|
796
|
-
while (!(step = iterator.next()).done) {
|
|
797
|
-
var entry = step.value;
|
|
798
|
-
if (entry) {
|
|
799
|
-
if (!isNode(entry[1])) {
|
|
800
|
-
return false;
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
} else {
|
|
806
|
-
return false;
|
|
807
|
-
}
|
|
808
|
-
return true;
|
|
809
|
-
default:
|
|
810
|
-
return false;
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
function isSymbol(propType, propValue) {
|
|
814
|
-
if (propType === "symbol") {
|
|
815
|
-
return true;
|
|
816
|
-
}
|
|
817
|
-
if (!propValue) {
|
|
818
|
-
return false;
|
|
819
|
-
}
|
|
820
|
-
if (propValue["@@toStringTag"] === "Symbol") {
|
|
821
|
-
return true;
|
|
822
|
-
}
|
|
823
|
-
if (typeof Symbol === "function" && propValue instanceof Symbol) {
|
|
824
|
-
return true;
|
|
825
|
-
}
|
|
826
|
-
return false;
|
|
827
|
-
}
|
|
828
|
-
function getPropType(propValue) {
|
|
829
|
-
var propType = typeof propValue;
|
|
830
|
-
if (Array.isArray(propValue)) {
|
|
831
|
-
return "array";
|
|
832
|
-
}
|
|
833
|
-
if (propValue instanceof RegExp) {
|
|
834
|
-
return "object";
|
|
835
|
-
}
|
|
836
|
-
if (isSymbol(propType, propValue)) {
|
|
837
|
-
return "symbol";
|
|
838
|
-
}
|
|
839
|
-
return propType;
|
|
840
|
-
}
|
|
841
|
-
function getPreciseType(propValue) {
|
|
842
|
-
if (typeof propValue === "undefined" || propValue === null) {
|
|
843
|
-
return "" + propValue;
|
|
844
|
-
}
|
|
845
|
-
var propType = getPropType(propValue);
|
|
846
|
-
if (propType === "object") {
|
|
847
|
-
if (propValue instanceof Date) {
|
|
848
|
-
return "date";
|
|
849
|
-
} else if (propValue instanceof RegExp) {
|
|
850
|
-
return "regexp";
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
return propType;
|
|
854
|
-
}
|
|
855
|
-
function getPostfixForTypeWarning(value) {
|
|
856
|
-
var type = getPreciseType(value);
|
|
857
|
-
switch (type) {
|
|
858
|
-
case "array":
|
|
859
|
-
case "object":
|
|
860
|
-
return "an " + type;
|
|
861
|
-
case "boolean":
|
|
862
|
-
case "date":
|
|
863
|
-
case "regexp":
|
|
864
|
-
return "a " + type;
|
|
865
|
-
default:
|
|
866
|
-
return type;
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
function getClassName(propValue) {
|
|
870
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
871
|
-
return ANONYMOUS;
|
|
872
|
-
}
|
|
873
|
-
return propValue.constructor.name;
|
|
874
|
-
}
|
|
875
|
-
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
876
|
-
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
877
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
878
|
-
return ReactPropTypes;
|
|
879
|
-
};
|
|
880
|
-
return factoryWithTypeCheckers;
|
|
881
|
-
}
|
|
882
|
-
var factoryWithThrowingShims;
|
|
883
|
-
var hasRequiredFactoryWithThrowingShims;
|
|
884
|
-
function requireFactoryWithThrowingShims() {
|
|
885
|
-
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
886
|
-
hasRequiredFactoryWithThrowingShims = 1;
|
|
887
|
-
var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
|
|
888
|
-
function emptyFunction() {
|
|
889
|
-
}
|
|
890
|
-
function emptyFunctionWithReset() {
|
|
891
|
-
}
|
|
892
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
893
|
-
factoryWithThrowingShims = function() {
|
|
894
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
895
|
-
if (secret === ReactPropTypesSecret) {
|
|
896
|
-
return;
|
|
897
|
-
}
|
|
898
|
-
var err = new Error(
|
|
899
|
-
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
900
|
-
);
|
|
901
|
-
err.name = "Invariant Violation";
|
|
902
|
-
throw err;
|
|
903
|
-
}
|
|
904
|
-
shim.isRequired = shim;
|
|
905
|
-
function getShim() {
|
|
906
|
-
return shim;
|
|
907
|
-
}
|
|
908
|
-
var ReactPropTypes = {
|
|
909
|
-
array: shim,
|
|
910
|
-
bigint: shim,
|
|
911
|
-
bool: shim,
|
|
912
|
-
func: shim,
|
|
913
|
-
number: shim,
|
|
914
|
-
object: shim,
|
|
915
|
-
string: shim,
|
|
916
|
-
symbol: shim,
|
|
917
|
-
any: shim,
|
|
918
|
-
arrayOf: getShim,
|
|
919
|
-
element: shim,
|
|
920
|
-
elementType: shim,
|
|
921
|
-
instanceOf: getShim,
|
|
922
|
-
node: shim,
|
|
923
|
-
objectOf: getShim,
|
|
924
|
-
oneOf: getShim,
|
|
925
|
-
oneOfType: getShim,
|
|
926
|
-
shape: getShim,
|
|
927
|
-
exact: getShim,
|
|
928
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
929
|
-
resetWarningCache: emptyFunction
|
|
930
|
-
};
|
|
931
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
932
|
-
return ReactPropTypes;
|
|
933
|
-
};
|
|
934
|
-
return factoryWithThrowingShims;
|
|
935
|
-
}
|
|
936
|
-
var hasRequiredPropTypes;
|
|
937
|
-
function requirePropTypes() {
|
|
938
|
-
if (hasRequiredPropTypes) return propTypes.exports;
|
|
939
|
-
hasRequiredPropTypes = 1;
|
|
940
|
-
if (process.env.NODE_ENV !== "production") {
|
|
941
|
-
var ReactIs = requireReactIs();
|
|
942
|
-
var throwOnDirectAccess = true;
|
|
943
|
-
propTypes.exports = /* @__PURE__ */ requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
944
|
-
} else {
|
|
945
|
-
propTypes.exports = /* @__PURE__ */ requireFactoryWithThrowingShims()();
|
|
946
|
-
}
|
|
947
|
-
return propTypes.exports;
|
|
948
|
-
}
|
|
949
|
-
var propTypesExports = /* @__PURE__ */ requirePropTypes();
|
|
950
|
-
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
|
|
951
6
|
var classnames = { exports: {} };
|
|
952
7
|
/*!
|
|
953
8
|
Copyright (c) 2018 Jed Watson.
|
|
@@ -1017,9 +72,9 @@ function AccordionItem({
|
|
|
1017
72
|
title,
|
|
1018
73
|
id,
|
|
1019
74
|
content,
|
|
1020
|
-
expanded,
|
|
75
|
+
expanded = false,
|
|
1021
76
|
className,
|
|
1022
|
-
headingLevel,
|
|
77
|
+
headingLevel = "h3",
|
|
1023
78
|
handleToggle
|
|
1024
79
|
}) {
|
|
1025
80
|
const headingClasses = classNames("usa-accordion__heading", className);
|
|
@@ -1029,12 +84,6 @@ function AccordionItem({
|
|
|
1029
84
|
className
|
|
1030
85
|
);
|
|
1031
86
|
const Heading = headingLevel;
|
|
1032
|
-
const handleClick = (e) => {
|
|
1033
|
-
if (e && typeof e.preventDefault === "function") e.preventDefault();
|
|
1034
|
-
if (e && typeof e.stopImmediatePropagation === "function") e.stopImmediatePropagation();
|
|
1035
|
-
if (e && typeof e.stopPropagation === "function") e.stopPropagation();
|
|
1036
|
-
handleToggle(e);
|
|
1037
|
-
};
|
|
1038
87
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1039
88
|
/* @__PURE__ */ jsx(Heading, { id: `${id}-heading`, className: headingClasses, children: /* @__PURE__ */ jsx(
|
|
1040
89
|
"button",
|
|
@@ -1044,7 +93,7 @@ function AccordionItem({
|
|
|
1044
93
|
"aria-expanded": expanded,
|
|
1045
94
|
"aria-controls": `${id}-content`,
|
|
1046
95
|
"data-testid": `accordionButton_${id}`,
|
|
1047
|
-
|
|
96
|
+
onClick: handleToggle,
|
|
1048
97
|
children: title
|
|
1049
98
|
}
|
|
1050
99
|
) }),
|
|
@@ -1061,94 +110,34 @@ function AccordionItem({
|
|
|
1061
110
|
)
|
|
1062
111
|
] });
|
|
1063
112
|
}
|
|
1064
|
-
function buildExpansions(items, multiselectable, savedExpansions = /* @__PURE__ */ new Map()) {
|
|
1065
|
-
const lastExpandedItem = multiselectable ? void 0 : items.findLast((item) => item.expanded || savedExpansions.get(item.id));
|
|
1066
|
-
return items.reduce((map, item) => {
|
|
1067
|
-
map.set(
|
|
1068
|
-
item.id,
|
|
1069
|
-
multiselectable ? savedExpansions.get(item.id) ?? item.expanded : !!lastExpandedItem && item.id === lastExpandedItem.id
|
|
1070
|
-
);
|
|
1071
|
-
return map;
|
|
1072
|
-
}, /* @__PURE__ */ new Map());
|
|
1073
|
-
}
|
|
1074
|
-
AccordionItem.propTypes = {
|
|
1075
|
-
title: PropTypes.node.isRequired,
|
|
1076
|
-
id: PropTypes.string.isRequired,
|
|
1077
|
-
content: PropTypes.node.isRequired,
|
|
1078
|
-
expanded: PropTypes.bool,
|
|
1079
|
-
className: PropTypes.string,
|
|
1080
|
-
headingLevel: PropTypes.string,
|
|
1081
|
-
handleToggle: PropTypes.func
|
|
1082
|
-
};
|
|
1083
|
-
Accordion.propTypes = {
|
|
1084
|
-
id: PropTypes.string,
|
|
1085
|
-
bordered: PropTypes.bool,
|
|
1086
|
-
items: PropTypes.arrayOf(PropTypes.shape(AccordionItem.propTypes)),
|
|
1087
|
-
multiselectable: PropTypes.bool,
|
|
1088
|
-
headingLevel: PropTypes.string,
|
|
1089
|
-
className: PropTypes.string
|
|
1090
|
-
};
|
|
1091
113
|
function Accordion({
|
|
1092
114
|
id,
|
|
1093
115
|
bordered = false,
|
|
1094
116
|
items = [],
|
|
1095
117
|
multiselectable = false,
|
|
1096
118
|
headingLevel = "h3",
|
|
119
|
+
iconPosition,
|
|
1097
120
|
className = "",
|
|
1098
121
|
...props
|
|
1099
122
|
}) {
|
|
1100
|
-
const [savedExpansions, setSavedExpansions] = useState(
|
|
1101
|
-
() => buildExpansions(items, multiselectable)
|
|
1102
|
-
);
|
|
1103
|
-
const [prevItems, setPrevItems] = useState(items);
|
|
1104
|
-
useEffect(() => {
|
|
1105
|
-
if (items !== prevItems) {
|
|
1106
|
-
setPrevItems(items);
|
|
1107
|
-
}
|
|
1108
|
-
}, [items, prevItems]);
|
|
1109
|
-
useEffect(() => {
|
|
1110
|
-
if (items !== prevItems) {
|
|
1111
|
-
setSavedExpansions(
|
|
1112
|
-
(prevExpansions) => buildExpansions(items, multiselectable, prevExpansions)
|
|
1113
|
-
);
|
|
1114
|
-
}
|
|
1115
|
-
}, [items, multiselectable, prevItems]);
|
|
1116
123
|
const accordionClasses = classNames(
|
|
1117
124
|
"usa-accordion",
|
|
1118
125
|
"usx-accordion",
|
|
1119
126
|
bordered && "usa-accordion--bordered",
|
|
127
|
+
(iconPosition === "start" || iconPosition === "end") && `usa-accordion--icon-${iconPosition}`,
|
|
1120
128
|
className
|
|
1121
129
|
);
|
|
1122
|
-
const toggleItem = (itemId) => {
|
|
1123
|
-
setSavedExpansions((prevExpansions) => {
|
|
1124
|
-
const updatedExpansions = new Map(prevExpansions);
|
|
1125
|
-
if (updatedExpansions.get(itemId)) {
|
|
1126
|
-
updatedExpansions.set(itemId, false);
|
|
1127
|
-
} else {
|
|
1128
|
-
if (!multiselectable) {
|
|
1129
|
-
updatedExpansions.forEach((_val, key, map) => map.set(key, false));
|
|
1130
|
-
}
|
|
1131
|
-
updatedExpansions.set(itemId, true);
|
|
1132
|
-
}
|
|
1133
|
-
return updatedExpansions;
|
|
1134
|
-
});
|
|
1135
|
-
};
|
|
1136
130
|
return /* @__PURE__ */ jsx(
|
|
1137
131
|
"div",
|
|
1138
132
|
{
|
|
1139
133
|
id,
|
|
1140
134
|
className: accordionClasses,
|
|
1141
|
-
"data-allow-multiple": multiselectable,
|
|
135
|
+
"data-allow-multiple": multiselectable ? true : void 0,
|
|
1142
136
|
...props,
|
|
1143
137
|
children: items.map((item) => /* @__PURE__ */ jsx(
|
|
1144
138
|
AccordionItem,
|
|
1145
139
|
{
|
|
1146
140
|
...item,
|
|
1147
|
-
expanded: savedExpansions.get(item.id) ?? false,
|
|
1148
|
-
handleToggle: (e) => {
|
|
1149
|
-
if (item.handleToggle) item.handleToggle(e);
|
|
1150
|
-
toggleItem(item.id);
|
|
1151
|
-
},
|
|
1152
141
|
headingLevel,
|
|
1153
142
|
className
|
|
1154
143
|
},
|
|
@@ -1360,6 +349,7 @@ function BackToTop({
|
|
|
1360
349
|
function Banner({
|
|
1361
350
|
id = "gov-banner",
|
|
1362
351
|
ariaLabel = "Official government website",
|
|
352
|
+
flagSrc = (typeof window !== "undefined" && window.usxBaseUrl || "/") + "img/us_flag_small.png",
|
|
1363
353
|
tld = ".gov",
|
|
1364
354
|
bannerText = "An official website of the United States government",
|
|
1365
355
|
bannerActionText = "Here's how you know",
|
|
@@ -1380,12 +370,7 @@ function Banner({
|
|
|
1380
370
|
className = "",
|
|
1381
371
|
...props
|
|
1382
372
|
}) {
|
|
1383
|
-
const
|
|
1384
|
-
const toggleExpanded = (e) => {
|
|
1385
|
-
e.preventDefault();
|
|
1386
|
-
e.stopPropagation();
|
|
1387
|
-
setExpanded(!expanded);
|
|
1388
|
-
};
|
|
373
|
+
const assetBaseUrl = typeof window !== "undefined" && window.usxBaseUrl || "/";
|
|
1389
374
|
const classes = classNames(
|
|
1390
375
|
"usa-banner",
|
|
1391
376
|
"usx-banner",
|
|
@@ -1398,7 +383,7 @@ function Banner({
|
|
|
1398
383
|
{
|
|
1399
384
|
"aria-hidden": "true",
|
|
1400
385
|
className: "usa-banner__header-flag",
|
|
1401
|
-
src:
|
|
386
|
+
src: flagSrc,
|
|
1402
387
|
alt: ""
|
|
1403
388
|
}
|
|
1404
389
|
) }),
|
|
@@ -1418,9 +403,8 @@ function Banner({
|
|
|
1418
403
|
{
|
|
1419
404
|
type: "button",
|
|
1420
405
|
className: "usa-accordion__button usa-banner__button",
|
|
1421
|
-
"aria-expanded":
|
|
406
|
+
"aria-expanded": "false",
|
|
1422
407
|
"aria-controls": `${id}-content`,
|
|
1423
|
-
onClickCapture: toggleExpanded,
|
|
1424
408
|
children: /* @__PURE__ */ jsx("span", { className: "usa-banner__button-text", children: bannerActionText })
|
|
1425
409
|
}
|
|
1426
410
|
)
|
|
@@ -1430,18 +414,42 @@ function Banner({
|
|
|
1430
414
|
{
|
|
1431
415
|
id: `${id}-content`,
|
|
1432
416
|
className: "usa-banner__content usa-accordion__content",
|
|
1433
|
-
hidden:
|
|
417
|
+
hidden: true,
|
|
1434
418
|
children: /* @__PURE__ */ jsxs("div", { className: "grid-row grid-gap-lg", children: [
|
|
1435
|
-
/* @__PURE__ */
|
|
1436
|
-
/* @__PURE__ */ jsx(
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
419
|
+
/* @__PURE__ */ jsxs("div", { className: "usa-banner__guidance tablet:grid-col-6", children: [
|
|
420
|
+
/* @__PURE__ */ jsx(
|
|
421
|
+
"img",
|
|
422
|
+
{
|
|
423
|
+
className: "usa-banner__icon usa-media-block__img",
|
|
424
|
+
src: `${assetBaseUrl}img/icon-dot-gov.svg`,
|
|
425
|
+
role: "img",
|
|
426
|
+
alt: "",
|
|
427
|
+
"aria-hidden": "true"
|
|
428
|
+
}
|
|
429
|
+
),
|
|
430
|
+
/* @__PURE__ */ jsx("div", { className: "usa-media-block__body", children: /* @__PURE__ */ jsxs("p", { children: [
|
|
431
|
+
/* @__PURE__ */ jsx("strong", { children: domainHeading }),
|
|
432
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
433
|
+
domainText
|
|
434
|
+
] }) })
|
|
435
|
+
] }),
|
|
436
|
+
/* @__PURE__ */ jsxs("div", { className: "usa-banner__guidance tablet:grid-col-6", children: [
|
|
437
|
+
/* @__PURE__ */ jsx(
|
|
438
|
+
"img",
|
|
439
|
+
{
|
|
440
|
+
className: "usa-banner__icon usa-media-block__img",
|
|
441
|
+
src: `${assetBaseUrl}img/icon-https.svg`,
|
|
442
|
+
role: "img",
|
|
443
|
+
alt: "",
|
|
444
|
+
"aria-hidden": "true"
|
|
445
|
+
}
|
|
446
|
+
),
|
|
447
|
+
/* @__PURE__ */ jsx("div", { className: "usa-media-block__body", children: /* @__PURE__ */ jsxs("p", { children: [
|
|
448
|
+
/* @__PURE__ */ jsx("strong", { children: httpsHeading }),
|
|
449
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
450
|
+
httpsText
|
|
451
|
+
] }) })
|
|
452
|
+
] })
|
|
1445
453
|
] })
|
|
1446
454
|
}
|
|
1447
455
|
)
|
|
@@ -2538,21 +1546,6 @@ function DatePicker({
|
|
|
2538
1546
|
] });
|
|
2539
1547
|
return formGroup ? /* @__PURE__ */ jsx(FormGroup, { error: !!error, children: content }) : content;
|
|
2540
1548
|
}
|
|
2541
|
-
DatePicker.propTypes = {
|
|
2542
|
-
id: PropTypes.string,
|
|
2543
|
-
name: PropTypes.string,
|
|
2544
|
-
label: PropTypes.node,
|
|
2545
|
-
hint: PropTypes.node,
|
|
2546
|
-
error: PropTypes.node,
|
|
2547
|
-
disabled: PropTypes.bool,
|
|
2548
|
-
required: PropTypes.bool,
|
|
2549
|
-
defaultValue: PropTypes.string,
|
|
2550
|
-
minDate: PropTypes.string,
|
|
2551
|
-
maxDate: PropTypes.string,
|
|
2552
|
-
rangeDate: PropTypes.string,
|
|
2553
|
-
formGroup: PropTypes.bool,
|
|
2554
|
-
className: PropTypes.string
|
|
2555
|
-
};
|
|
2556
1549
|
function DateRangePicker({
|
|
2557
1550
|
startId = "event-date-start",
|
|
2558
1551
|
endId = "event-date-end",
|
|
@@ -2639,25 +1632,6 @@ function DateRangePicker({
|
|
|
2639
1632
|
}
|
|
2640
1633
|
);
|
|
2641
1634
|
}
|
|
2642
|
-
DateRangePicker.propTypes = {
|
|
2643
|
-
startId: PropTypes.string,
|
|
2644
|
-
endId: PropTypes.string,
|
|
2645
|
-
startName: PropTypes.string,
|
|
2646
|
-
endName: PropTypes.string,
|
|
2647
|
-
startLabel: PropTypes.node,
|
|
2648
|
-
endLabel: PropTypes.node,
|
|
2649
|
-
startHint: PropTypes.node,
|
|
2650
|
-
endHint: PropTypes.node,
|
|
2651
|
-
startError: PropTypes.node,
|
|
2652
|
-
endError: PropTypes.node,
|
|
2653
|
-
disabled: PropTypes.bool,
|
|
2654
|
-
required: PropTypes.bool,
|
|
2655
|
-
defaultStartDate: PropTypes.string,
|
|
2656
|
-
defaultEndDate: PropTypes.string,
|
|
2657
|
-
minDate: PropTypes.string,
|
|
2658
|
-
maxDate: PropTypes.string,
|
|
2659
|
-
className: PropTypes.string
|
|
2660
|
-
};
|
|
2661
1635
|
function Eyebrow({ children = null, className = "", ...props }) {
|
|
2662
1636
|
const classes = ["usx-eyebrow", className].filter(Boolean).join(" ");
|
|
2663
1637
|
return /* @__PURE__ */ jsx("span", { className: classes, ...props, children });
|
|
@@ -2726,7 +1700,7 @@ function FileList({ files, hint = "Selected files", onRemove = null, disabled =
|
|
|
2726
1700
|
type: "button",
|
|
2727
1701
|
variant: "secondary",
|
|
2728
1702
|
className: "usx-file-input__delete-button",
|
|
2729
|
-
tooltip: "Delete this file",
|
|
1703
|
+
extraAttributes: { tooltip: "Delete this file" },
|
|
2730
1704
|
ghost: true,
|
|
2731
1705
|
disabled,
|
|
2732
1706
|
onClick: () => handleRemove(entry),
|
|
@@ -2740,22 +1714,6 @@ function FileList({ files, hint = "Selected files", onRemove = null, disabled =
|
|
|
2740
1714
|
}) })
|
|
2741
1715
|
] });
|
|
2742
1716
|
}
|
|
2743
|
-
FileList.propTypes = {
|
|
2744
|
-
files: PropTypes.arrayOf(
|
|
2745
|
-
PropTypes.shape({
|
|
2746
|
-
key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
2747
|
-
file: PropTypes.object,
|
|
2748
|
-
name: PropTypes.string,
|
|
2749
|
-
size: PropTypes.number,
|
|
2750
|
-
url: PropTypes.string,
|
|
2751
|
-
onRemove: PropTypes.func
|
|
2752
|
-
})
|
|
2753
|
-
),
|
|
2754
|
-
hint: PropTypes.node,
|
|
2755
|
-
onRemove: PropTypes.func,
|
|
2756
|
-
disabled: PropTypes.bool,
|
|
2757
|
-
className: PropTypes.string
|
|
2758
|
-
};
|
|
2759
1717
|
function getDefaultFileInputAriaLabel() {
|
|
2760
1718
|
const dragTextIsVisible = typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(hover: hover) and (pointer: fine)").matches;
|
|
2761
1719
|
const chooseText = dragTextIsVisible ? "choose from folder" : "Choose from folder";
|
|
@@ -2788,17 +1746,17 @@ function FileInput({
|
|
|
2788
1746
|
const [managedFiles, setManagedFiles] = useState(
|
|
2789
1747
|
() => defaultFiles.map((entry) => ({ key: nextFileId.current++, file: null, ...entry }))
|
|
2790
1748
|
);
|
|
2791
|
-
const notify = (files) => onFilesChange && onFilesChange(files.filter((entry) => entry.file).map((entry) => entry.file));
|
|
2792
|
-
const addFiles = (
|
|
2793
|
-
const files = Array.from(
|
|
1749
|
+
const notify = (files) => onFilesChange && onFilesChange(files.filter((entry) => !!entry.file).map((entry) => entry.file));
|
|
1750
|
+
const addFiles = (event) => {
|
|
1751
|
+
const files = Array.from(event.target.files || []);
|
|
2794
1752
|
if (files.length === 0) return;
|
|
2795
1753
|
setManagedFiles((prev) => {
|
|
2796
1754
|
const next = [...prev, ...files.map((file) => ({ key: nextFileId.current++, file }))];
|
|
2797
1755
|
notify(next);
|
|
2798
1756
|
return next;
|
|
2799
1757
|
});
|
|
2800
|
-
|
|
2801
|
-
|
|
1758
|
+
event.target.value = "";
|
|
1759
|
+
event.target.setAttribute("aria-label", getDefaultFileInputAriaLabel());
|
|
2802
1760
|
};
|
|
2803
1761
|
const removeFile = (entry) => {
|
|
2804
1762
|
setManagedFiles((prev) => {
|
|
@@ -2859,30 +1817,6 @@ function FileInput({
|
|
|
2859
1817
|
] });
|
|
2860
1818
|
return formGroup ? /* @__PURE__ */ jsx(FormGroup, { error: !!error, children: content }) : content;
|
|
2861
1819
|
}
|
|
2862
|
-
FileInput.propTypes = {
|
|
2863
|
-
id: PropTypes.string,
|
|
2864
|
-
name: PropTypes.string,
|
|
2865
|
-
label: PropTypes.node,
|
|
2866
|
-
hint: PropTypes.node,
|
|
2867
|
-
fileListHint: PropTypes.node,
|
|
2868
|
-
error: PropTypes.node,
|
|
2869
|
-
disabled: PropTypes.bool,
|
|
2870
|
-
required: PropTypes.bool,
|
|
2871
|
-
accept: PropTypes.string,
|
|
2872
|
-
multiple: PropTypes.bool,
|
|
2873
|
-
manageIndividualFiles: PropTypes.bool,
|
|
2874
|
-
invalidFileTypeMessage: PropTypes.string,
|
|
2875
|
-
className: PropTypes.string,
|
|
2876
|
-
onFilesChange: PropTypes.func,
|
|
2877
|
-
defaultFiles: PropTypes.arrayOf(
|
|
2878
|
-
PropTypes.shape({
|
|
2879
|
-
name: PropTypes.string.isRequired,
|
|
2880
|
-
size: PropTypes.number,
|
|
2881
|
-
url: PropTypes.string
|
|
2882
|
-
})
|
|
2883
|
-
),
|
|
2884
|
-
formGroup: PropTypes.bool
|
|
2885
|
-
};
|
|
2886
1820
|
function BrandingContent({ config, projectUrl }) {
|
|
2887
1821
|
const { title, symbol, symbolInverse, logo, logoInverse, alt } = config;
|
|
2888
1822
|
const label = alt ?? title ?? "";
|
|
@@ -3329,26 +2263,53 @@ function Hero({
|
|
|
3329
2263
|
button = null,
|
|
3330
2264
|
searchProps = null,
|
|
3331
2265
|
backgroundImage = "",
|
|
2266
|
+
backgroundPosition,
|
|
2267
|
+
contentPosition = "left",
|
|
2268
|
+
boxed = true,
|
|
2269
|
+
calloutMaxWidth,
|
|
2270
|
+
headingLevel = "h1",
|
|
2271
|
+
secondaryContent = null,
|
|
3332
2272
|
overlay = true,
|
|
2273
|
+
overlayOpacity,
|
|
3333
2274
|
ariaLabel = "Introduction",
|
|
3334
2275
|
className = "",
|
|
2276
|
+
style,
|
|
3335
2277
|
...props
|
|
3336
2278
|
}) {
|
|
2279
|
+
const Heading = headingLevel;
|
|
2280
|
+
const secondaryHeadings = { h1: "h2", h2: "h3", h3: "h4", h4: "h5", h5: "h6" };
|
|
2281
|
+
const SecondaryHeading = secondaryHeadings[headingLevel];
|
|
3337
2282
|
const classes = [
|
|
3338
2283
|
"usx-hero",
|
|
3339
2284
|
overlay && "usx-hero--has-overlay",
|
|
2285
|
+
overlayOpacity !== void 0 && "usx-hero--custom-overlay",
|
|
2286
|
+
contentPosition !== "left" && `usx-hero--content-${contentPosition}`,
|
|
2287
|
+
!boxed && "usx-hero--unboxed",
|
|
2288
|
+
secondaryContent && "usx-hero--split",
|
|
3340
2289
|
className
|
|
3341
2290
|
].filter(Boolean).join(" ");
|
|
3342
|
-
const
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
2291
|
+
const heroStyle = {
|
|
2292
|
+
...backgroundImage ? { backgroundImage: `url('${backgroundImage}')` } : {},
|
|
2293
|
+
...backgroundPosition ? { backgroundPosition } : {},
|
|
2294
|
+
...overlayOpacity !== void 0 ? { "--hero-overlay-opacity": Math.min(1, Math.max(0, overlayOpacity)) } : {},
|
|
2295
|
+
...style
|
|
2296
|
+
};
|
|
2297
|
+
return /* @__PURE__ */ jsx("section", { className: classes, "aria-label": ariaLabel, style: heroStyle, ...props, children: /* @__PURE__ */ jsxs("div", { className: "usx-hero__inner", children: [
|
|
2298
|
+
/* @__PURE__ */ jsxs("div", { className: "usx-hero__callout", style: calloutMaxWidth ? { maxWidth: calloutMaxWidth } : void 0, children: [
|
|
2299
|
+
/* @__PURE__ */ jsxs(Heading, { className: "usx-hero__heading", children: [
|
|
2300
|
+
callout && /* @__PURE__ */ jsx("span", { className: "usx-hero__heading--alt", children: callout }),
|
|
2301
|
+
title
|
|
2302
|
+
] }),
|
|
2303
|
+
paragraph && /* @__PURE__ */ jsx("p", { className: "usx-hero__paragraph", children: paragraph }),
|
|
2304
|
+
searchProps && /* @__PURE__ */ jsx(Search, { ...searchProps }),
|
|
2305
|
+
!searchProps && button && /* @__PURE__ */ jsx(Button, { variant: "primary", href: button.href, onClick: button.onClick, children: button.text })
|
|
3347
2306
|
] }),
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
2307
|
+
secondaryContent && /* @__PURE__ */ jsxs("div", { className: "usx-hero__secondary", children: [
|
|
2308
|
+
secondaryContent.title && /* @__PURE__ */ jsx(SecondaryHeading, { className: "usx-hero__secondary-heading", children: secondaryContent.title }),
|
|
2309
|
+
secondaryContent.paragraph && /* @__PURE__ */ jsx("p", { className: "usx-hero__paragraph", children: secondaryContent.paragraph }),
|
|
2310
|
+
secondaryContent.link && /* @__PURE__ */ jsx("a", { className: "usx-hero__secondary-link", href: secondaryContent.link.href, children: secondaryContent.link.text })
|
|
2311
|
+
] })
|
|
2312
|
+
] }) });
|
|
3352
2313
|
}
|
|
3353
2314
|
function renderContent$1(content) {
|
|
3354
2315
|
if (typeof content === "string") {
|
|
@@ -3549,21 +2510,6 @@ function InPageNav({
|
|
|
3549
2510
|
)
|
|
3550
2511
|
] });
|
|
3551
2512
|
}
|
|
3552
|
-
InPageNav.propTypes = {
|
|
3553
|
-
id: PropTypes.string,
|
|
3554
|
-
headingElements: PropTypes.string,
|
|
3555
|
-
mainContentSelector: PropTypes.string,
|
|
3556
|
-
titleHeadingLevel: PropTypes.string,
|
|
3557
|
-
titleText: PropTypes.string,
|
|
3558
|
-
scrollOffset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
3559
|
-
rootMargin: PropTypes.string,
|
|
3560
|
-
threshold: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
3561
|
-
minimumHeadingCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
3562
|
-
content: PropTypes.string,
|
|
3563
|
-
children: PropTypes.node,
|
|
3564
|
-
className: PropTypes.string,
|
|
3565
|
-
contentClassName: PropTypes.string
|
|
3566
|
-
};
|
|
3567
2513
|
function Indicator({ items = [], children = null, className = "", ...props }) {
|
|
3568
2514
|
const classes = classNames("usx-indicator", className);
|
|
3569
2515
|
return /* @__PURE__ */ jsxs("div", { className: classes, ...props, children: [
|
|
@@ -3583,35 +2529,20 @@ function LanguageLabel({ code, label, description }) {
|
|
|
3583
2529
|
if (!code) {
|
|
3584
2530
|
return /* @__PURE__ */ jsx(Fragment, { children: label });
|
|
3585
2531
|
}
|
|
3586
|
-
return /* @__PURE__ */ jsxs("span", { lang: code, xmlLang: code, children: [
|
|
2532
|
+
return /* @__PURE__ */ jsxs("span", { ...{ lang: code, xmlLang: code }, children: [
|
|
3587
2533
|
/* @__PURE__ */ jsx("strong", { children: label }),
|
|
3588
2534
|
description ? ` (${description})` : null
|
|
3589
2535
|
] });
|
|
3590
2536
|
}
|
|
3591
|
-
LanguageLabel.propTypes = {
|
|
3592
|
-
code: PropTypes.string,
|
|
3593
|
-
label: PropTypes.node.isRequired,
|
|
3594
|
-
description: PropTypes.string
|
|
3595
|
-
};
|
|
3596
2537
|
function TwoLanguageSelector({ target, onSelect, className, navAriaLabel }) {
|
|
3597
|
-
const handleClick = (
|
|
3598
|
-
if (onSelect) onSelect(target,
|
|
3599
|
-
if (!target.href)
|
|
2538
|
+
const handleClick = (event) => {
|
|
2539
|
+
if (onSelect) onSelect(target, event);
|
|
2540
|
+
if (!target.href) event.preventDefault();
|
|
3600
2541
|
};
|
|
3601
2542
|
const Tag2 = target.href ? "a" : "button";
|
|
3602
2543
|
const tagProps = target.href ? { href: target.href } : { type: "button" };
|
|
3603
2544
|
return /* @__PURE__ */ jsx("nav", { "aria-label": navAriaLabel, className, children: /* @__PURE__ */ jsx("div", { className: "usa-language-container", children: /* @__PURE__ */ jsx(Tag2, { className: "usa-button usx-button usa-button--primary", onClick: handleClick, ...tagProps, children: /* @__PURE__ */ jsx(LanguageLabel, { code: target.code, label: target.label }) }) }) });
|
|
3604
2545
|
}
|
|
3605
|
-
TwoLanguageSelector.propTypes = {
|
|
3606
|
-
target: PropTypes.shape({
|
|
3607
|
-
code: PropTypes.string,
|
|
3608
|
-
label: PropTypes.node,
|
|
3609
|
-
href: PropTypes.string
|
|
3610
|
-
}).isRequired,
|
|
3611
|
-
onSelect: PropTypes.func,
|
|
3612
|
-
className: PropTypes.string,
|
|
3613
|
-
navAriaLabel: PropTypes.string
|
|
3614
|
-
};
|
|
3615
2546
|
function MenuLanguageSelector({
|
|
3616
2547
|
languages,
|
|
3617
2548
|
unstyled,
|
|
@@ -3654,28 +2585,9 @@ function MenuLanguageSelector({
|
|
|
3654
2585
|
},
|
|
3655
2586
|
children: lang.plain ? lang.label : /* @__PURE__ */ jsx(LanguageLabel, { code: lang.code, label: lang.label, description: lang.description })
|
|
3656
2587
|
}
|
|
3657
|
-
) }, lang.code || lang.label || idx)) })
|
|
2588
|
+
) }, lang.code || (typeof lang.label === "string" || typeof lang.label === "number" ? lang.label : void 0) || idx)) })
|
|
3658
2589
|
] }) }) }) });
|
|
3659
2590
|
}
|
|
3660
|
-
MenuLanguageSelector.propTypes = {
|
|
3661
|
-
languages: PropTypes.arrayOf(
|
|
3662
|
-
PropTypes.shape({
|
|
3663
|
-
code: PropTypes.string,
|
|
3664
|
-
label: PropTypes.node,
|
|
3665
|
-
description: PropTypes.string,
|
|
3666
|
-
href: PropTypes.string,
|
|
3667
|
-
current: PropTypes.bool,
|
|
3668
|
-
plain: PropTypes.bool
|
|
3669
|
-
})
|
|
3670
|
-
).isRequired,
|
|
3671
|
-
unstyled: PropTypes.bool,
|
|
3672
|
-
small: PropTypes.bool,
|
|
3673
|
-
label: PropTypes.string,
|
|
3674
|
-
id: PropTypes.string,
|
|
3675
|
-
onSelect: PropTypes.func,
|
|
3676
|
-
className: PropTypes.string,
|
|
3677
|
-
navAriaLabel: PropTypes.string
|
|
3678
|
-
};
|
|
3679
2591
|
function LanguageSelector({
|
|
3680
2592
|
languages = [],
|
|
3681
2593
|
variant = null,
|
|
@@ -3721,26 +2633,6 @@ function LanguageSelector({
|
|
|
3721
2633
|
}
|
|
3722
2634
|
);
|
|
3723
2635
|
}
|
|
3724
|
-
LanguageSelector.propTypes = {
|
|
3725
|
-
languages: PropTypes.arrayOf(
|
|
3726
|
-
PropTypes.shape({
|
|
3727
|
-
code: PropTypes.string,
|
|
3728
|
-
label: PropTypes.node,
|
|
3729
|
-
description: PropTypes.string,
|
|
3730
|
-
href: PropTypes.string,
|
|
3731
|
-
current: PropTypes.bool,
|
|
3732
|
-
plain: PropTypes.bool
|
|
3733
|
-
})
|
|
3734
|
-
),
|
|
3735
|
-
variant: PropTypes.oneOf(["two", "menu"]),
|
|
3736
|
-
unstyled: PropTypes.bool,
|
|
3737
|
-
small: PropTypes.bool,
|
|
3738
|
-
label: PropTypes.string,
|
|
3739
|
-
id: PropTypes.string,
|
|
3740
|
-
navAriaLabel: PropTypes.string,
|
|
3741
|
-
className: PropTypes.string,
|
|
3742
|
-
onSelect: PropTypes.func
|
|
3743
|
-
};
|
|
3744
2636
|
function SingleColumnLayout({ children, className = "", ...props }) {
|
|
3745
2637
|
const classes = ["usx-layout__single-column", className].filter(Boolean).join(" ");
|
|
3746
2638
|
return /* @__PURE__ */ jsx("div", { className: classes, ...props, children });
|
|
@@ -4015,28 +2907,6 @@ function MemorableDate({
|
|
|
4015
2907
|
] })
|
|
4016
2908
|
] }) });
|
|
4017
2909
|
}
|
|
4018
|
-
MemorableDate.propTypes = {
|
|
4019
|
-
id: PropTypes.string,
|
|
4020
|
-
legend: PropTypes.node,
|
|
4021
|
-
groupHint: PropTypes.node,
|
|
4022
|
-
monthLabel: PropTypes.node,
|
|
4023
|
-
dayLabel: PropTypes.node,
|
|
4024
|
-
yearLabel: PropTypes.node,
|
|
4025
|
-
monthHint: PropTypes.node,
|
|
4026
|
-
dayHint: PropTypes.node,
|
|
4027
|
-
yearHint: PropTypes.node,
|
|
4028
|
-
monthName: PropTypes.string,
|
|
4029
|
-
dayName: PropTypes.string,
|
|
4030
|
-
yearName: PropTypes.string,
|
|
4031
|
-
defaultMonth: PropTypes.string,
|
|
4032
|
-
defaultDay: PropTypes.string,
|
|
4033
|
-
defaultYear: PropTypes.string,
|
|
4034
|
-
disabled: PropTypes.bool,
|
|
4035
|
-
ariaDisabled: PropTypes.bool,
|
|
4036
|
-
required: PropTypes.bool,
|
|
4037
|
-
error: PropTypes.string,
|
|
4038
|
-
className: PropTypes.string
|
|
4039
|
-
};
|
|
4040
2910
|
function MiscBanner({
|
|
4041
2911
|
children = null,
|
|
4042
2912
|
className = "",
|
|
@@ -4193,14 +3063,6 @@ function Page({
|
|
|
4193
3063
|
/* @__PURE__ */ jsx("div", { className: "usx-page__content", children: pageContent })
|
|
4194
3064
|
] });
|
|
4195
3065
|
}
|
|
4196
|
-
Page.propTypes = {
|
|
4197
|
-
id: PropTypes.string,
|
|
4198
|
-
title: PropTypes.string,
|
|
4199
|
-
eyebrow: PropTypes.node,
|
|
4200
|
-
children: PropTypes.node,
|
|
4201
|
-
content: PropTypes.node,
|
|
4202
|
-
className: PropTypes.string
|
|
4203
|
-
};
|
|
4204
3066
|
function getPageItems(currentPage, totalPages) {
|
|
4205
3067
|
const page = (p) => ({ type: "page", page: p });
|
|
4206
3068
|
const ellipsis = (key) => ({ type: "ellipsis", key });
|
|
@@ -4647,24 +3509,6 @@ function RangeSlider({
|
|
|
4647
3509
|
] });
|
|
4648
3510
|
return formGroup ? /* @__PURE__ */ jsx(FormGroup, { error: !!error, children: content }) : content;
|
|
4649
3511
|
}
|
|
4650
|
-
RangeSlider.propTypes = {
|
|
4651
|
-
id: PropTypes.string,
|
|
4652
|
-
name: PropTypes.string,
|
|
4653
|
-
label: PropTypes.node,
|
|
4654
|
-
hint: PropTypes.node,
|
|
4655
|
-
error: PropTypes.node,
|
|
4656
|
-
disabled: PropTypes.bool,
|
|
4657
|
-
required: PropTypes.bool,
|
|
4658
|
-
min: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
4659
|
-
max: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
4660
|
-
step: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
4661
|
-
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
4662
|
-
defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
4663
|
-
textUnit: PropTypes.string,
|
|
4664
|
-
textPreposition: PropTypes.string,
|
|
4665
|
-
formGroup: PropTypes.bool,
|
|
4666
|
-
className: PropTypes.string
|
|
4667
|
-
};
|
|
4668
3512
|
const Section = ({
|
|
4669
3513
|
title = "",
|
|
4670
3514
|
children = null,
|
|
@@ -5902,22 +4746,6 @@ function TimePicker({
|
|
|
5902
4746
|
] });
|
|
5903
4747
|
return formGroup ? /* @__PURE__ */ jsx(FormGroup, { error: !!error, children: content }) : content;
|
|
5904
4748
|
}
|
|
5905
|
-
TimePicker.propTypes = {
|
|
5906
|
-
id: PropTypes.string,
|
|
5907
|
-
name: PropTypes.string,
|
|
5908
|
-
label: PropTypes.node,
|
|
5909
|
-
hint: PropTypes.node,
|
|
5910
|
-
error: PropTypes.node,
|
|
5911
|
-
disabled: PropTypes.bool,
|
|
5912
|
-
ariaDisabled: PropTypes.bool,
|
|
5913
|
-
required: PropTypes.bool,
|
|
5914
|
-
defaultValue: PropTypes.string,
|
|
5915
|
-
minTime: PropTypes.string,
|
|
5916
|
-
maxTime: PropTypes.string,
|
|
5917
|
-
step: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
5918
|
-
formGroup: PropTypes.bool,
|
|
5919
|
-
className: PropTypes.string
|
|
5920
|
-
};
|
|
5921
4749
|
const Toggle = ({
|
|
5922
4750
|
options = [],
|
|
5923
4751
|
value,
|