biggerui 1.0.2 → 1.0.4
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/biggerui.cjs.js +78 -1433
- package/dist/biggerui.cjs.js.map +1 -1
- package/dist/biggerui.css +60 -0
- package/dist/biggerui.es.js +81 -1436
- package/dist/biggerui.es.js.map +1 -1
- package/package.json +1 -1
package/dist/biggerui.es.js
CHANGED
|
@@ -1,1370 +1,8 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
|
-
import
|
|
3
|
+
import { createContext, useRef, useLayoutEffect, useEffect, useId, useContext, useInsertionEffect, useMemo, useCallback, Children, isValidElement, useState, Fragment as Fragment$1, createElement, forwardRef, Component } from 'react';
|
|
3
4
|
import { createPortal } from 'react-dom';
|
|
4
5
|
|
|
5
|
-
var jsxRuntime = {exports: {}};
|
|
6
|
-
|
|
7
|
-
var reactJsxRuntime_production_min = {};
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
var hasRequiredReactJsxRuntime_production_min;
|
|
20
|
-
|
|
21
|
-
function requireReactJsxRuntime_production_min () {
|
|
22
|
-
if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
|
|
23
|
-
hasRequiredReactJsxRuntime_production_min = 1;
|
|
24
|
-
var f=React__default,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:true,ref:true,__self:true,__source:true};
|
|
25
|
-
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a) void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
|
|
26
|
-
return reactJsxRuntime_production_min;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var reactJsxRuntime_development = {};
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @license React
|
|
33
|
-
* react-jsx-runtime.development.js
|
|
34
|
-
*
|
|
35
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
36
|
-
*
|
|
37
|
-
* This source code is licensed under the MIT license found in the
|
|
38
|
-
* LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
var hasRequiredReactJsxRuntime_development;
|
|
42
|
-
|
|
43
|
-
function requireReactJsxRuntime_development () {
|
|
44
|
-
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
45
|
-
hasRequiredReactJsxRuntime_development = 1;
|
|
46
|
-
|
|
47
|
-
if (process.env.NODE_ENV !== "production") {
|
|
48
|
-
(function() {
|
|
49
|
-
|
|
50
|
-
var React = React__default;
|
|
51
|
-
|
|
52
|
-
// ATTENTION
|
|
53
|
-
// When adding new symbols to this file,
|
|
54
|
-
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
55
|
-
// The Symbol used to tag the ReactElement-like types.
|
|
56
|
-
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
57
|
-
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
58
|
-
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
59
|
-
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
60
|
-
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
61
|
-
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
62
|
-
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
63
|
-
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
64
|
-
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
65
|
-
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
66
|
-
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
67
|
-
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
68
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
69
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
70
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
71
|
-
function getIteratorFn(maybeIterable) {
|
|
72
|
-
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
77
|
-
|
|
78
|
-
if (typeof maybeIterator === 'function') {
|
|
79
|
-
return maybeIterator;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
86
|
-
|
|
87
|
-
function error(format) {
|
|
88
|
-
{
|
|
89
|
-
{
|
|
90
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
91
|
-
args[_key2 - 1] = arguments[_key2];
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
printWarning('error', format, args);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function printWarning(level, format, args) {
|
|
100
|
-
// When changing this logic, you might want to also
|
|
101
|
-
// update consoleWithStackDev.www.js as well.
|
|
102
|
-
{
|
|
103
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
104
|
-
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
105
|
-
|
|
106
|
-
if (stack !== '') {
|
|
107
|
-
format += '%s';
|
|
108
|
-
args = args.concat([stack]);
|
|
109
|
-
} // eslint-disable-next-line react-internal/safe-string-coercion
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
var argsWithFormat = args.map(function (item) {
|
|
113
|
-
return String(item);
|
|
114
|
-
}); // Careful: RN currently depends on this prefix
|
|
115
|
-
|
|
116
|
-
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
117
|
-
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
118
|
-
// eslint-disable-next-line react-internal/no-production-logging
|
|
119
|
-
|
|
120
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// -----------------------------------------------------------------------------
|
|
125
|
-
|
|
126
|
-
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
127
|
-
var enableCacheElement = false;
|
|
128
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
129
|
-
|
|
130
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
131
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
132
|
-
// issues in DEV builds.
|
|
133
|
-
|
|
134
|
-
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
135
|
-
|
|
136
|
-
var REACT_MODULE_REFERENCE;
|
|
137
|
-
|
|
138
|
-
{
|
|
139
|
-
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function isValidElementType(type) {
|
|
143
|
-
if (typeof type === 'string' || typeof type === 'function') {
|
|
144
|
-
return true;
|
|
145
|
-
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
|
|
149
|
-
return true;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (typeof type === 'object' && type !== null) {
|
|
153
|
-
if (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 || // This needs to include all possible module reference object
|
|
154
|
-
// types supported by any Flight configuration anywhere since
|
|
155
|
-
// we don't know which Flight build this will end up being used
|
|
156
|
-
// with.
|
|
157
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
158
|
-
return true;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
return false;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
166
|
-
var displayName = outerType.displayName;
|
|
167
|
-
|
|
168
|
-
if (displayName) {
|
|
169
|
-
return displayName;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
var functionName = innerType.displayName || innerType.name || '';
|
|
173
|
-
return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
174
|
-
} // Keep in sync with react-reconciler/getComponentNameFromFiber
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
function getContextName(type) {
|
|
178
|
-
return type.displayName || 'Context';
|
|
179
|
-
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
function getComponentNameFromType(type) {
|
|
183
|
-
if (type == null) {
|
|
184
|
-
// Host root, text node or just invalid type.
|
|
185
|
-
return null;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
{
|
|
189
|
-
if (typeof type.tag === 'number') {
|
|
190
|
-
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
if (typeof type === 'function') {
|
|
195
|
-
return type.displayName || type.name || null;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (typeof type === 'string') {
|
|
199
|
-
return type;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
switch (type) {
|
|
203
|
-
case REACT_FRAGMENT_TYPE:
|
|
204
|
-
return 'Fragment';
|
|
205
|
-
|
|
206
|
-
case REACT_PORTAL_TYPE:
|
|
207
|
-
return 'Portal';
|
|
208
|
-
|
|
209
|
-
case REACT_PROFILER_TYPE:
|
|
210
|
-
return 'Profiler';
|
|
211
|
-
|
|
212
|
-
case REACT_STRICT_MODE_TYPE:
|
|
213
|
-
return 'StrictMode';
|
|
214
|
-
|
|
215
|
-
case REACT_SUSPENSE_TYPE:
|
|
216
|
-
return 'Suspense';
|
|
217
|
-
|
|
218
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
219
|
-
return 'SuspenseList';
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
if (typeof type === 'object') {
|
|
224
|
-
switch (type.$$typeof) {
|
|
225
|
-
case REACT_CONTEXT_TYPE:
|
|
226
|
-
var context = type;
|
|
227
|
-
return getContextName(context) + '.Consumer';
|
|
228
|
-
|
|
229
|
-
case REACT_PROVIDER_TYPE:
|
|
230
|
-
var provider = type;
|
|
231
|
-
return getContextName(provider._context) + '.Provider';
|
|
232
|
-
|
|
233
|
-
case REACT_FORWARD_REF_TYPE:
|
|
234
|
-
return getWrappedName(type, type.render, 'ForwardRef');
|
|
235
|
-
|
|
236
|
-
case REACT_MEMO_TYPE:
|
|
237
|
-
var outerName = type.displayName || null;
|
|
238
|
-
|
|
239
|
-
if (outerName !== null) {
|
|
240
|
-
return outerName;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
return getComponentNameFromType(type.type) || 'Memo';
|
|
244
|
-
|
|
245
|
-
case REACT_LAZY_TYPE:
|
|
246
|
-
{
|
|
247
|
-
var lazyComponent = type;
|
|
248
|
-
var payload = lazyComponent._payload;
|
|
249
|
-
var init = lazyComponent._init;
|
|
250
|
-
|
|
251
|
-
try {
|
|
252
|
-
return getComponentNameFromType(init(payload));
|
|
253
|
-
} catch (x) {
|
|
254
|
-
return null;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
// eslint-disable-next-line no-fallthrough
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
return null;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
var assign = Object.assign;
|
|
266
|
-
|
|
267
|
-
// Helpers to patch console.logs to avoid logging during side-effect free
|
|
268
|
-
// replaying on render function. This currently only patches the object
|
|
269
|
-
// lazily which won't cover if the log function was extracted eagerly.
|
|
270
|
-
// We could also eagerly patch the method.
|
|
271
|
-
var disabledDepth = 0;
|
|
272
|
-
var prevLog;
|
|
273
|
-
var prevInfo;
|
|
274
|
-
var prevWarn;
|
|
275
|
-
var prevError;
|
|
276
|
-
var prevGroup;
|
|
277
|
-
var prevGroupCollapsed;
|
|
278
|
-
var prevGroupEnd;
|
|
279
|
-
|
|
280
|
-
function disabledLog() {}
|
|
281
|
-
|
|
282
|
-
disabledLog.__reactDisabledLog = true;
|
|
283
|
-
function disableLogs() {
|
|
284
|
-
{
|
|
285
|
-
if (disabledDepth === 0) {
|
|
286
|
-
/* eslint-disable react-internal/no-production-logging */
|
|
287
|
-
prevLog = console.log;
|
|
288
|
-
prevInfo = console.info;
|
|
289
|
-
prevWarn = console.warn;
|
|
290
|
-
prevError = console.error;
|
|
291
|
-
prevGroup = console.group;
|
|
292
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
293
|
-
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
|
|
294
|
-
|
|
295
|
-
var props = {
|
|
296
|
-
configurable: true,
|
|
297
|
-
enumerable: true,
|
|
298
|
-
value: disabledLog,
|
|
299
|
-
writable: true
|
|
300
|
-
}; // $FlowFixMe Flow thinks console is immutable.
|
|
301
|
-
|
|
302
|
-
Object.defineProperties(console, {
|
|
303
|
-
info: props,
|
|
304
|
-
log: props,
|
|
305
|
-
warn: props,
|
|
306
|
-
error: props,
|
|
307
|
-
group: props,
|
|
308
|
-
groupCollapsed: props,
|
|
309
|
-
groupEnd: props
|
|
310
|
-
});
|
|
311
|
-
/* eslint-enable react-internal/no-production-logging */
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
disabledDepth++;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
function reenableLogs() {
|
|
318
|
-
{
|
|
319
|
-
disabledDepth--;
|
|
320
|
-
|
|
321
|
-
if (disabledDepth === 0) {
|
|
322
|
-
/* eslint-disable react-internal/no-production-logging */
|
|
323
|
-
var props = {
|
|
324
|
-
configurable: true,
|
|
325
|
-
enumerable: true,
|
|
326
|
-
writable: true
|
|
327
|
-
}; // $FlowFixMe Flow thinks console is immutable.
|
|
328
|
-
|
|
329
|
-
Object.defineProperties(console, {
|
|
330
|
-
log: assign({}, props, {
|
|
331
|
-
value: prevLog
|
|
332
|
-
}),
|
|
333
|
-
info: assign({}, props, {
|
|
334
|
-
value: prevInfo
|
|
335
|
-
}),
|
|
336
|
-
warn: assign({}, props, {
|
|
337
|
-
value: prevWarn
|
|
338
|
-
}),
|
|
339
|
-
error: assign({}, props, {
|
|
340
|
-
value: prevError
|
|
341
|
-
}),
|
|
342
|
-
group: assign({}, props, {
|
|
343
|
-
value: prevGroup
|
|
344
|
-
}),
|
|
345
|
-
groupCollapsed: assign({}, props, {
|
|
346
|
-
value: prevGroupCollapsed
|
|
347
|
-
}),
|
|
348
|
-
groupEnd: assign({}, props, {
|
|
349
|
-
value: prevGroupEnd
|
|
350
|
-
})
|
|
351
|
-
});
|
|
352
|
-
/* eslint-enable react-internal/no-production-logging */
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
if (disabledDepth < 0) {
|
|
356
|
-
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
|
362
|
-
var prefix;
|
|
363
|
-
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
364
|
-
{
|
|
365
|
-
if (prefix === undefined) {
|
|
366
|
-
// Extract the VM specific prefix used by each line.
|
|
367
|
-
try {
|
|
368
|
-
throw Error();
|
|
369
|
-
} catch (x) {
|
|
370
|
-
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
371
|
-
prefix = match && match[1] || '';
|
|
372
|
-
}
|
|
373
|
-
} // We use the prefix to ensure our stacks line up with native stack frames.
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
return '\n' + prefix + name;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
var reentry = false;
|
|
380
|
-
var componentFrameCache;
|
|
381
|
-
|
|
382
|
-
{
|
|
383
|
-
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
|
|
384
|
-
componentFrameCache = new PossiblyWeakMap();
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
function describeNativeComponentFrame(fn, construct) {
|
|
388
|
-
// If something asked for a stack inside a fake render, it should get ignored.
|
|
389
|
-
if ( !fn || reentry) {
|
|
390
|
-
return '';
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
{
|
|
394
|
-
var frame = componentFrameCache.get(fn);
|
|
395
|
-
|
|
396
|
-
if (frame !== undefined) {
|
|
397
|
-
return frame;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
var control;
|
|
402
|
-
reentry = true;
|
|
403
|
-
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
|
|
404
|
-
|
|
405
|
-
Error.prepareStackTrace = undefined;
|
|
406
|
-
var previousDispatcher;
|
|
407
|
-
|
|
408
|
-
{
|
|
409
|
-
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
|
|
410
|
-
// for warnings.
|
|
411
|
-
|
|
412
|
-
ReactCurrentDispatcher.current = null;
|
|
413
|
-
disableLogs();
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
try {
|
|
417
|
-
// This should throw.
|
|
418
|
-
if (construct) {
|
|
419
|
-
// Something should be setting the props in the constructor.
|
|
420
|
-
var Fake = function () {
|
|
421
|
-
throw Error();
|
|
422
|
-
}; // $FlowFixMe
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
Object.defineProperty(Fake.prototype, 'props', {
|
|
426
|
-
set: function () {
|
|
427
|
-
// We use a throwing setter instead of frozen or non-writable props
|
|
428
|
-
// because that won't throw in a non-strict mode function.
|
|
429
|
-
throw Error();
|
|
430
|
-
}
|
|
431
|
-
});
|
|
432
|
-
|
|
433
|
-
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
434
|
-
// We construct a different control for this case to include any extra
|
|
435
|
-
// frames added by the construct call.
|
|
436
|
-
try {
|
|
437
|
-
Reflect.construct(Fake, []);
|
|
438
|
-
} catch (x) {
|
|
439
|
-
control = x;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
Reflect.construct(fn, [], Fake);
|
|
443
|
-
} else {
|
|
444
|
-
try {
|
|
445
|
-
Fake.call();
|
|
446
|
-
} catch (x) {
|
|
447
|
-
control = x;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
fn.call(Fake.prototype);
|
|
451
|
-
}
|
|
452
|
-
} else {
|
|
453
|
-
try {
|
|
454
|
-
throw Error();
|
|
455
|
-
} catch (x) {
|
|
456
|
-
control = x;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
fn();
|
|
460
|
-
}
|
|
461
|
-
} catch (sample) {
|
|
462
|
-
// This is inlined manually because closure doesn't do it for us.
|
|
463
|
-
if (sample && control && typeof sample.stack === 'string') {
|
|
464
|
-
// This extracts the first frame from the sample that isn't also in the control.
|
|
465
|
-
// Skipping one frame that we assume is the frame that calls the two.
|
|
466
|
-
var sampleLines = sample.stack.split('\n');
|
|
467
|
-
var controlLines = control.stack.split('\n');
|
|
468
|
-
var s = sampleLines.length - 1;
|
|
469
|
-
var c = controlLines.length - 1;
|
|
470
|
-
|
|
471
|
-
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
472
|
-
// We expect at least one stack frame to be shared.
|
|
473
|
-
// Typically this will be the root most one. However, stack frames may be
|
|
474
|
-
// cut off due to maximum stack limits. In this case, one maybe cut off
|
|
475
|
-
// earlier than the other. We assume that the sample is longer or the same
|
|
476
|
-
// and there for cut off earlier. So we should find the root most frame in
|
|
477
|
-
// the sample somewhere in the control.
|
|
478
|
-
c--;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
for (; s >= 1 && c >= 0; s--, c--) {
|
|
482
|
-
// Next we find the first one that isn't the same which should be the
|
|
483
|
-
// frame that called our sample function and the control.
|
|
484
|
-
if (sampleLines[s] !== controlLines[c]) {
|
|
485
|
-
// In V8, the first line is describing the message but other VMs don't.
|
|
486
|
-
// If we're about to return the first line, and the control is also on the same
|
|
487
|
-
// line, that's a pretty good indicator that our sample threw at same line as
|
|
488
|
-
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
|
489
|
-
// This can happen if you passed a class to function component, or non-function.
|
|
490
|
-
if (s !== 1 || c !== 1) {
|
|
491
|
-
do {
|
|
492
|
-
s--;
|
|
493
|
-
c--; // We may still have similar intermediate frames from the construct call.
|
|
494
|
-
// The next one that isn't the same should be our match though.
|
|
495
|
-
|
|
496
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
497
|
-
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
|
498
|
-
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
|
|
499
|
-
// but we have a user-provided "displayName"
|
|
500
|
-
// splice it in to make the stack more readable.
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
if (fn.displayName && _frame.includes('<anonymous>')) {
|
|
504
|
-
_frame = _frame.replace('<anonymous>', fn.displayName);
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
{
|
|
508
|
-
if (typeof fn === 'function') {
|
|
509
|
-
componentFrameCache.set(fn, _frame);
|
|
510
|
-
}
|
|
511
|
-
} // Return the line we found.
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
return _frame;
|
|
515
|
-
}
|
|
516
|
-
} while (s >= 1 && c >= 0);
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
break;
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
} finally {
|
|
524
|
-
reentry = false;
|
|
525
|
-
|
|
526
|
-
{
|
|
527
|
-
ReactCurrentDispatcher.current = previousDispatcher;
|
|
528
|
-
reenableLogs();
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
532
|
-
} // Fallback to just using the name if we couldn't make it throw.
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
var name = fn ? fn.displayName || fn.name : '';
|
|
536
|
-
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
|
537
|
-
|
|
538
|
-
{
|
|
539
|
-
if (typeof fn === 'function') {
|
|
540
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
return syntheticFrame;
|
|
545
|
-
}
|
|
546
|
-
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
547
|
-
{
|
|
548
|
-
return describeNativeComponentFrame(fn, false);
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
function shouldConstruct(Component) {
|
|
553
|
-
var prototype = Component.prototype;
|
|
554
|
-
return !!(prototype && prototype.isReactComponent);
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
558
|
-
|
|
559
|
-
if (type == null) {
|
|
560
|
-
return '';
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
if (typeof type === 'function') {
|
|
564
|
-
{
|
|
565
|
-
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
if (typeof type === 'string') {
|
|
570
|
-
return describeBuiltInComponentFrame(type);
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
switch (type) {
|
|
574
|
-
case REACT_SUSPENSE_TYPE:
|
|
575
|
-
return describeBuiltInComponentFrame('Suspense');
|
|
576
|
-
|
|
577
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
578
|
-
return describeBuiltInComponentFrame('SuspenseList');
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
if (typeof type === 'object') {
|
|
582
|
-
switch (type.$$typeof) {
|
|
583
|
-
case REACT_FORWARD_REF_TYPE:
|
|
584
|
-
return describeFunctionComponentFrame(type.render);
|
|
585
|
-
|
|
586
|
-
case REACT_MEMO_TYPE:
|
|
587
|
-
// Memo may contain any component type so we recursively resolve it.
|
|
588
|
-
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
589
|
-
|
|
590
|
-
case REACT_LAZY_TYPE:
|
|
591
|
-
{
|
|
592
|
-
var lazyComponent = type;
|
|
593
|
-
var payload = lazyComponent._payload;
|
|
594
|
-
var init = lazyComponent._init;
|
|
595
|
-
|
|
596
|
-
try {
|
|
597
|
-
// Lazy may contain any component type so we recursively resolve it.
|
|
598
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
599
|
-
} catch (x) {}
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
return '';
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
608
|
-
|
|
609
|
-
var loggedTypeFailures = {};
|
|
610
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
611
|
-
|
|
612
|
-
function setCurrentlyValidatingElement(element) {
|
|
613
|
-
{
|
|
614
|
-
if (element) {
|
|
615
|
-
var owner = element._owner;
|
|
616
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
617
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
618
|
-
} else {
|
|
619
|
-
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
625
|
-
{
|
|
626
|
-
// $FlowFixMe This is okay but Flow doesn't know it.
|
|
627
|
-
var has = Function.call.bind(hasOwnProperty);
|
|
628
|
-
|
|
629
|
-
for (var typeSpecName in typeSpecs) {
|
|
630
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
631
|
-
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
|
|
632
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
633
|
-
// After these have been cleaned up, we'll let them throw.
|
|
634
|
-
|
|
635
|
-
try {
|
|
636
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
637
|
-
// behavior as without this statement except with a better message.
|
|
638
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
639
|
-
// eslint-disable-next-line react-internal/prod-error-codes
|
|
640
|
-
var err = Error((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`.');
|
|
641
|
-
err.name = 'Invariant Violation';
|
|
642
|
-
throw err;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
|
646
|
-
} catch (ex) {
|
|
647
|
-
error$1 = ex;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
651
|
-
setCurrentlyValidatingElement(element);
|
|
652
|
-
|
|
653
|
-
error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
|
|
654
|
-
|
|
655
|
-
setCurrentlyValidatingElement(null);
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
659
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
660
|
-
// same error.
|
|
661
|
-
loggedTypeFailures[error$1.message] = true;
|
|
662
|
-
setCurrentlyValidatingElement(element);
|
|
663
|
-
|
|
664
|
-
error('Failed %s type: %s', location, error$1.message);
|
|
665
|
-
|
|
666
|
-
setCurrentlyValidatingElement(null);
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
|
674
|
-
|
|
675
|
-
function isArray(a) {
|
|
676
|
-
return isArrayImpl(a);
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
/*
|
|
680
|
-
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
|
|
681
|
-
* and Temporal.* types. See https://github.com/facebook/react/pull/22064.
|
|
682
|
-
*
|
|
683
|
-
* The functions in this module will throw an easier-to-understand,
|
|
684
|
-
* easier-to-debug exception with a clear errors message message explaining the
|
|
685
|
-
* problem. (Instead of a confusing exception thrown inside the implementation
|
|
686
|
-
* of the `value` object).
|
|
687
|
-
*/
|
|
688
|
-
// $FlowFixMe only called in DEV, so void return is not possible.
|
|
689
|
-
function typeName(value) {
|
|
690
|
-
{
|
|
691
|
-
// toStringTag is needed for namespaced types like Temporal.Instant
|
|
692
|
-
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
|
|
693
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
|
|
694
|
-
return type;
|
|
695
|
-
}
|
|
696
|
-
} // $FlowFixMe only called in DEV, so void return is not possible.
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
function willCoercionThrow(value) {
|
|
700
|
-
{
|
|
701
|
-
try {
|
|
702
|
-
testStringCoercion(value);
|
|
703
|
-
return false;
|
|
704
|
-
} catch (e) {
|
|
705
|
-
return true;
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
function testStringCoercion(value) {
|
|
711
|
-
// If you ended up here by following an exception call stack, here's what's
|
|
712
|
-
// happened: you supplied an object or symbol value to React (as a prop, key,
|
|
713
|
-
// DOM attribute, CSS property, string ref, etc.) and when React tried to
|
|
714
|
-
// coerce it to a string using `'' + value`, an exception was thrown.
|
|
715
|
-
//
|
|
716
|
-
// The most common types that will cause this exception are `Symbol` instances
|
|
717
|
-
// and Temporal objects like `Temporal.Instant`. But any object that has a
|
|
718
|
-
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
|
|
719
|
-
// exception. (Library authors do this to prevent users from using built-in
|
|
720
|
-
// numeric operators like `+` or comparison operators like `>=` because custom
|
|
721
|
-
// methods are needed to perform accurate arithmetic or comparison.)
|
|
722
|
-
//
|
|
723
|
-
// To fix the problem, coerce this object or symbol value to a string before
|
|
724
|
-
// passing it to React. The most reliable way is usually `String(value)`.
|
|
725
|
-
//
|
|
726
|
-
// To find which value is throwing, check the browser or debugger console.
|
|
727
|
-
// Before this exception was thrown, there should be `console.error` output
|
|
728
|
-
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
|
|
729
|
-
// problem and how that type was used: key, atrribute, input value prop, etc.
|
|
730
|
-
// In most cases, this console output also shows the component and its
|
|
731
|
-
// ancestor components where the exception happened.
|
|
732
|
-
//
|
|
733
|
-
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
734
|
-
return '' + value;
|
|
735
|
-
}
|
|
736
|
-
function checkKeyStringCoercion(value) {
|
|
737
|
-
{
|
|
738
|
-
if (willCoercionThrow(value)) {
|
|
739
|
-
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
|
|
740
|
-
|
|
741
|
-
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
747
|
-
var RESERVED_PROPS = {
|
|
748
|
-
key: true,
|
|
749
|
-
ref: true,
|
|
750
|
-
__self: true,
|
|
751
|
-
__source: true
|
|
752
|
-
};
|
|
753
|
-
var specialPropKeyWarningShown;
|
|
754
|
-
var specialPropRefWarningShown;
|
|
755
|
-
|
|
756
|
-
function hasValidRef(config) {
|
|
757
|
-
{
|
|
758
|
-
if (hasOwnProperty.call(config, 'ref')) {
|
|
759
|
-
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
|
760
|
-
|
|
761
|
-
if (getter && getter.isReactWarning) {
|
|
762
|
-
return false;
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
return config.ref !== undefined;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
function hasValidKey(config) {
|
|
771
|
-
{
|
|
772
|
-
if (hasOwnProperty.call(config, 'key')) {
|
|
773
|
-
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
|
774
|
-
|
|
775
|
-
if (getter && getter.isReactWarning) {
|
|
776
|
-
return false;
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
return config.key !== undefined;
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
785
|
-
{
|
|
786
|
-
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self) ;
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
791
|
-
{
|
|
792
|
-
var warnAboutAccessingKey = function () {
|
|
793
|
-
if (!specialPropKeyWarningShown) {
|
|
794
|
-
specialPropKeyWarningShown = true;
|
|
795
|
-
|
|
796
|
-
error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
|
|
797
|
-
}
|
|
798
|
-
};
|
|
799
|
-
|
|
800
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
801
|
-
Object.defineProperty(props, 'key', {
|
|
802
|
-
get: warnAboutAccessingKey,
|
|
803
|
-
configurable: true
|
|
804
|
-
});
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
function defineRefPropWarningGetter(props, displayName) {
|
|
809
|
-
{
|
|
810
|
-
var warnAboutAccessingRef = function () {
|
|
811
|
-
if (!specialPropRefWarningShown) {
|
|
812
|
-
specialPropRefWarningShown = true;
|
|
813
|
-
|
|
814
|
-
error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
|
|
815
|
-
}
|
|
816
|
-
};
|
|
817
|
-
|
|
818
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
819
|
-
Object.defineProperty(props, 'ref', {
|
|
820
|
-
get: warnAboutAccessingRef,
|
|
821
|
-
configurable: true
|
|
822
|
-
});
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
/**
|
|
826
|
-
* Factory method to create a new React element. This no longer adheres to
|
|
827
|
-
* the class pattern, so do not use new to call it. Also, instanceof check
|
|
828
|
-
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
|
829
|
-
* if something is a React Element.
|
|
830
|
-
*
|
|
831
|
-
* @param {*} type
|
|
832
|
-
* @param {*} props
|
|
833
|
-
* @param {*} key
|
|
834
|
-
* @param {string|object} ref
|
|
835
|
-
* @param {*} owner
|
|
836
|
-
* @param {*} self A *temporary* helper to detect places where `this` is
|
|
837
|
-
* different from the `owner` when React.createElement is called, so that we
|
|
838
|
-
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
|
839
|
-
* functions, and as long as `this` and owner are the same, there will be no
|
|
840
|
-
* change in behavior.
|
|
841
|
-
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
|
842
|
-
* indicating filename, line number, and/or other information.
|
|
843
|
-
* @internal
|
|
844
|
-
*/
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
848
|
-
var element = {
|
|
849
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
850
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
851
|
-
// Built-in properties that belong on the element
|
|
852
|
-
type: type,
|
|
853
|
-
key: key,
|
|
854
|
-
ref: ref,
|
|
855
|
-
props: props,
|
|
856
|
-
// Record the component responsible for creating this element.
|
|
857
|
-
_owner: owner
|
|
858
|
-
};
|
|
859
|
-
|
|
860
|
-
{
|
|
861
|
-
// The validation flag is currently mutative. We put it on
|
|
862
|
-
// an external backing store so that we can freeze the whole object.
|
|
863
|
-
// This can be replaced with a WeakMap once they are implemented in
|
|
864
|
-
// commonly used development environments.
|
|
865
|
-
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
|
866
|
-
// the validation flag non-enumerable (where possible, which should
|
|
867
|
-
// include every environment we run tests in), so the test framework
|
|
868
|
-
// ignores it.
|
|
869
|
-
|
|
870
|
-
Object.defineProperty(element._store, 'validated', {
|
|
871
|
-
configurable: false,
|
|
872
|
-
enumerable: false,
|
|
873
|
-
writable: true,
|
|
874
|
-
value: false
|
|
875
|
-
}); // self and source are DEV only properties.
|
|
876
|
-
|
|
877
|
-
Object.defineProperty(element, '_self', {
|
|
878
|
-
configurable: false,
|
|
879
|
-
enumerable: false,
|
|
880
|
-
writable: false,
|
|
881
|
-
value: self
|
|
882
|
-
}); // Two elements created in two different places should be considered
|
|
883
|
-
// equal for testing purposes and therefore we hide it from enumeration.
|
|
884
|
-
|
|
885
|
-
Object.defineProperty(element, '_source', {
|
|
886
|
-
configurable: false,
|
|
887
|
-
enumerable: false,
|
|
888
|
-
writable: false,
|
|
889
|
-
value: source
|
|
890
|
-
});
|
|
891
|
-
|
|
892
|
-
if (Object.freeze) {
|
|
893
|
-
Object.freeze(element.props);
|
|
894
|
-
Object.freeze(element);
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
return element;
|
|
899
|
-
};
|
|
900
|
-
/**
|
|
901
|
-
* https://github.com/reactjs/rfcs/pull/107
|
|
902
|
-
* @param {*} type
|
|
903
|
-
* @param {object} props
|
|
904
|
-
* @param {string} key
|
|
905
|
-
*/
|
|
906
|
-
|
|
907
|
-
function jsxDEV(type, config, maybeKey, source, self) {
|
|
908
|
-
{
|
|
909
|
-
var propName; // Reserved names are extracted
|
|
910
|
-
|
|
911
|
-
var props = {};
|
|
912
|
-
var key = null;
|
|
913
|
-
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
|
914
|
-
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
|
915
|
-
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
|
916
|
-
// but as an intermediary step, we will use jsxDEV for everything except
|
|
917
|
-
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
|
918
|
-
// key is explicitly declared to be undefined or not.
|
|
919
|
-
|
|
920
|
-
if (maybeKey !== undefined) {
|
|
921
|
-
{
|
|
922
|
-
checkKeyStringCoercion(maybeKey);
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
key = '' + maybeKey;
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
if (hasValidKey(config)) {
|
|
929
|
-
{
|
|
930
|
-
checkKeyStringCoercion(config.key);
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
key = '' + config.key;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
if (hasValidRef(config)) {
|
|
937
|
-
ref = config.ref;
|
|
938
|
-
warnIfStringRefCannotBeAutoConverted(config, self);
|
|
939
|
-
} // Remaining properties are added to a new props object
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
for (propName in config) {
|
|
943
|
-
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
944
|
-
props[propName] = config[propName];
|
|
945
|
-
}
|
|
946
|
-
} // Resolve default props
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
if (type && type.defaultProps) {
|
|
950
|
-
var defaultProps = type.defaultProps;
|
|
951
|
-
|
|
952
|
-
for (propName in defaultProps) {
|
|
953
|
-
if (props[propName] === undefined) {
|
|
954
|
-
props[propName] = defaultProps[propName];
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
if (key || ref) {
|
|
960
|
-
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
961
|
-
|
|
962
|
-
if (key) {
|
|
963
|
-
defineKeyPropWarningGetter(props, displayName);
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
if (ref) {
|
|
967
|
-
defineRefPropWarningGetter(props, displayName);
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
976
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
977
|
-
|
|
978
|
-
function setCurrentlyValidatingElement$1(element) {
|
|
979
|
-
{
|
|
980
|
-
if (element) {
|
|
981
|
-
var owner = element._owner;
|
|
982
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
983
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
984
|
-
} else {
|
|
985
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
var propTypesMisspellWarningShown;
|
|
991
|
-
|
|
992
|
-
{
|
|
993
|
-
propTypesMisspellWarningShown = false;
|
|
994
|
-
}
|
|
995
|
-
/**
|
|
996
|
-
* Verifies the object is a ReactElement.
|
|
997
|
-
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
998
|
-
* @param {?object} object
|
|
999
|
-
* @return {boolean} True if `object` is a ReactElement.
|
|
1000
|
-
* @final
|
|
1001
|
-
*/
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
function isValidElement(object) {
|
|
1005
|
-
{
|
|
1006
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
function getDeclarationErrorAddendum() {
|
|
1011
|
-
{
|
|
1012
|
-
if (ReactCurrentOwner$1.current) {
|
|
1013
|
-
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
1014
|
-
|
|
1015
|
-
if (name) {
|
|
1016
|
-
return '\n\nCheck the render method of `' + name + '`.';
|
|
1017
|
-
}
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
return '';
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
function getSourceInfoErrorAddendum(source) {
|
|
1025
|
-
{
|
|
1026
|
-
|
|
1027
|
-
return '';
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
/**
|
|
1031
|
-
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
1032
|
-
* object keys are not valid. This allows us to keep track of children between
|
|
1033
|
-
* updates.
|
|
1034
|
-
*/
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
var ownerHasKeyUseWarning = {};
|
|
1038
|
-
|
|
1039
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
1040
|
-
{
|
|
1041
|
-
var info = getDeclarationErrorAddendum();
|
|
1042
|
-
|
|
1043
|
-
if (!info) {
|
|
1044
|
-
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
|
1045
|
-
|
|
1046
|
-
if (parentName) {
|
|
1047
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
return info;
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
/**
|
|
1055
|
-
* Warn if the element doesn't have an explicit key assigned to it.
|
|
1056
|
-
* This element is in an array. The array could grow and shrink or be
|
|
1057
|
-
* reordered. All children that haven't already been validated are required to
|
|
1058
|
-
* have a "key" property assigned to it. Error statuses are cached so a warning
|
|
1059
|
-
* will only be shown once.
|
|
1060
|
-
*
|
|
1061
|
-
* @internal
|
|
1062
|
-
* @param {ReactElement} element Element that requires a key.
|
|
1063
|
-
* @param {*} parentType element's parent's type.
|
|
1064
|
-
*/
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
function validateExplicitKey(element, parentType) {
|
|
1068
|
-
{
|
|
1069
|
-
if (!element._store || element._store.validated || element.key != null) {
|
|
1070
|
-
return;
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
element._store.validated = true;
|
|
1074
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
1075
|
-
|
|
1076
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
1077
|
-
return;
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
|
1081
|
-
// property, it may be the creator of the child that's responsible for
|
|
1082
|
-
// assigning it a key.
|
|
1083
|
-
|
|
1084
|
-
var childOwner = '';
|
|
1085
|
-
|
|
1086
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
|
1087
|
-
// Give the component that originally created this child.
|
|
1088
|
-
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
setCurrentlyValidatingElement$1(element);
|
|
1092
|
-
|
|
1093
|
-
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
1094
|
-
|
|
1095
|
-
setCurrentlyValidatingElement$1(null);
|
|
1096
|
-
}
|
|
1097
|
-
}
|
|
1098
|
-
/**
|
|
1099
|
-
* Ensure that every element either is passed in a static location, in an
|
|
1100
|
-
* array with an explicit keys property defined, or in an object literal
|
|
1101
|
-
* with valid key property.
|
|
1102
|
-
*
|
|
1103
|
-
* @internal
|
|
1104
|
-
* @param {ReactNode} node Statically passed child of any type.
|
|
1105
|
-
* @param {*} parentType node's parent's type.
|
|
1106
|
-
*/
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
function validateChildKeys(node, parentType) {
|
|
1110
|
-
{
|
|
1111
|
-
if (typeof node !== 'object') {
|
|
1112
|
-
return;
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
if (isArray(node)) {
|
|
1116
|
-
for (var i = 0; i < node.length; i++) {
|
|
1117
|
-
var child = node[i];
|
|
1118
|
-
|
|
1119
|
-
if (isValidElement(child)) {
|
|
1120
|
-
validateExplicitKey(child, parentType);
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
} else if (isValidElement(node)) {
|
|
1124
|
-
// This element was passed in a valid location.
|
|
1125
|
-
if (node._store) {
|
|
1126
|
-
node._store.validated = true;
|
|
1127
|
-
}
|
|
1128
|
-
} else if (node) {
|
|
1129
|
-
var iteratorFn = getIteratorFn(node);
|
|
1130
|
-
|
|
1131
|
-
if (typeof iteratorFn === 'function') {
|
|
1132
|
-
// Entry iterators used to provide implicit keys,
|
|
1133
|
-
// but now we print a separate warning for them later.
|
|
1134
|
-
if (iteratorFn !== node.entries) {
|
|
1135
|
-
var iterator = iteratorFn.call(node);
|
|
1136
|
-
var step;
|
|
1137
|
-
|
|
1138
|
-
while (!(step = iterator.next()).done) {
|
|
1139
|
-
if (isValidElement(step.value)) {
|
|
1140
|
-
validateExplicitKey(step.value, parentType);
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
/**
|
|
1149
|
-
* Given an element, validate that its props follow the propTypes definition,
|
|
1150
|
-
* provided by the type.
|
|
1151
|
-
*
|
|
1152
|
-
* @param {ReactElement} element
|
|
1153
|
-
*/
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
function validatePropTypes(element) {
|
|
1157
|
-
{
|
|
1158
|
-
var type = element.type;
|
|
1159
|
-
|
|
1160
|
-
if (type === null || type === undefined || typeof type === 'string') {
|
|
1161
|
-
return;
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
var propTypes;
|
|
1165
|
-
|
|
1166
|
-
if (typeof type === 'function') {
|
|
1167
|
-
propTypes = type.propTypes;
|
|
1168
|
-
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
1169
|
-
// Inner props are checked in the reconciler.
|
|
1170
|
-
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
1171
|
-
propTypes = type.propTypes;
|
|
1172
|
-
} else {
|
|
1173
|
-
return;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
if (propTypes) {
|
|
1177
|
-
// Intentionally inside to avoid triggering lazy initializers:
|
|
1178
|
-
var name = getComponentNameFromType(type);
|
|
1179
|
-
checkPropTypes(propTypes, element.props, 'prop', name, element);
|
|
1180
|
-
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
1181
|
-
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
|
|
1182
|
-
|
|
1183
|
-
var _name = getComponentNameFromType(type);
|
|
1184
|
-
|
|
1185
|
-
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
|
|
1189
|
-
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
/**
|
|
1194
|
-
* Given a fragment, validate that it can only be provided with fragment props
|
|
1195
|
-
* @param {ReactElement} fragment
|
|
1196
|
-
*/
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
function validateFragmentProps(fragment) {
|
|
1200
|
-
{
|
|
1201
|
-
var keys = Object.keys(fragment.props);
|
|
1202
|
-
|
|
1203
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1204
|
-
var key = keys[i];
|
|
1205
|
-
|
|
1206
|
-
if (key !== 'children' && key !== 'key') {
|
|
1207
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1208
|
-
|
|
1209
|
-
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
|
1210
|
-
|
|
1211
|
-
setCurrentlyValidatingElement$1(null);
|
|
1212
|
-
break;
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
if (fragment.ref !== null) {
|
|
1217
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1218
|
-
|
|
1219
|
-
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
|
1220
|
-
|
|
1221
|
-
setCurrentlyValidatingElement$1(null);
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
var didWarnAboutKeySpread = {};
|
|
1227
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
1228
|
-
{
|
|
1229
|
-
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
|
|
1230
|
-
// succeed and there will likely be errors in render.
|
|
1231
|
-
|
|
1232
|
-
if (!validType) {
|
|
1233
|
-
var info = '';
|
|
1234
|
-
|
|
1235
|
-
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
1236
|
-
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
var sourceInfo = getSourceInfoErrorAddendum();
|
|
1240
|
-
|
|
1241
|
-
if (sourceInfo) {
|
|
1242
|
-
info += sourceInfo;
|
|
1243
|
-
} else {
|
|
1244
|
-
info += getDeclarationErrorAddendum();
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
var typeString;
|
|
1248
|
-
|
|
1249
|
-
if (type === null) {
|
|
1250
|
-
typeString = 'null';
|
|
1251
|
-
} else if (isArray(type)) {
|
|
1252
|
-
typeString = 'array';
|
|
1253
|
-
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1254
|
-
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
|
|
1255
|
-
info = ' Did you accidentally export a JSX literal instead of a component?';
|
|
1256
|
-
} else {
|
|
1257
|
-
typeString = typeof type;
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
|
|
1264
|
-
// TODO: Drop this when these are no longer allowed as the type argument.
|
|
1265
|
-
|
|
1266
|
-
if (element == null) {
|
|
1267
|
-
return element;
|
|
1268
|
-
} // Skip key warning if the type isn't valid since our key validation logic
|
|
1269
|
-
// doesn't expect a non-string/function type and can throw confusing errors.
|
|
1270
|
-
// We don't want exception behavior to differ between dev and prod.
|
|
1271
|
-
// (Rendering will throw with a helpful message and as soon as the type is
|
|
1272
|
-
// fixed, the key warnings will appear.)
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
if (validType) {
|
|
1276
|
-
var children = props.children;
|
|
1277
|
-
|
|
1278
|
-
if (children !== undefined) {
|
|
1279
|
-
if (isStaticChildren) {
|
|
1280
|
-
if (isArray(children)) {
|
|
1281
|
-
for (var i = 0; i < children.length; i++) {
|
|
1282
|
-
validateChildKeys(children[i], type);
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
if (Object.freeze) {
|
|
1286
|
-
Object.freeze(children);
|
|
1287
|
-
}
|
|
1288
|
-
} else {
|
|
1289
|
-
error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
|
|
1290
|
-
}
|
|
1291
|
-
} else {
|
|
1292
|
-
validateChildKeys(children, type);
|
|
1293
|
-
}
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
{
|
|
1298
|
-
if (hasOwnProperty.call(props, 'key')) {
|
|
1299
|
-
var componentName = getComponentNameFromType(type);
|
|
1300
|
-
var keys = Object.keys(props).filter(function (k) {
|
|
1301
|
-
return k !== 'key';
|
|
1302
|
-
});
|
|
1303
|
-
var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
|
|
1304
|
-
|
|
1305
|
-
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
|
1306
|
-
var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
|
|
1307
|
-
|
|
1308
|
-
error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
|
|
1309
|
-
|
|
1310
|
-
didWarnAboutKeySpread[componentName + beforeExample] = true;
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
if (type === REACT_FRAGMENT_TYPE) {
|
|
1316
|
-
validateFragmentProps(element);
|
|
1317
|
-
} else {
|
|
1318
|
-
validatePropTypes(element);
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
return element;
|
|
1322
|
-
}
|
|
1323
|
-
} // These two functions exist to still get child warnings in dev
|
|
1324
|
-
// even with the prod transform. This means that jsxDEV is purely
|
|
1325
|
-
// opt-in behavior for better messages but that we won't stop
|
|
1326
|
-
// giving you warnings if you use production apis.
|
|
1327
|
-
|
|
1328
|
-
function jsxWithValidationStatic(type, props, key) {
|
|
1329
|
-
{
|
|
1330
|
-
return jsxWithValidation(type, props, key, true);
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
function jsxWithValidationDynamic(type, props, key) {
|
|
1334
|
-
{
|
|
1335
|
-
return jsxWithValidation(type, props, key, false);
|
|
1336
|
-
}
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
|
|
1340
|
-
// for now we can ship identical prod functions
|
|
1341
|
-
|
|
1342
|
-
var jsxs = jsxWithValidationStatic ;
|
|
1343
|
-
|
|
1344
|
-
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
1345
|
-
reactJsxRuntime_development.jsx = jsx;
|
|
1346
|
-
reactJsxRuntime_development.jsxs = jsxs;
|
|
1347
|
-
})();
|
|
1348
|
-
}
|
|
1349
|
-
return reactJsxRuntime_development;
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
var hasRequiredJsxRuntime;
|
|
1353
|
-
|
|
1354
|
-
function requireJsxRuntime () {
|
|
1355
|
-
if (hasRequiredJsxRuntime) return jsxRuntime.exports;
|
|
1356
|
-
hasRequiredJsxRuntime = 1;
|
|
1357
|
-
|
|
1358
|
-
if (process.env.NODE_ENV === 'production') {
|
|
1359
|
-
jsxRuntime.exports = requireReactJsxRuntime_production_min();
|
|
1360
|
-
} else {
|
|
1361
|
-
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
1362
|
-
}
|
|
1363
|
-
return jsxRuntime.exports;
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
var jsxRuntimeExports = requireJsxRuntime();
|
|
1367
|
-
|
|
1368
6
|
const button = "_button_1cxsm_1";
|
|
1369
7
|
const fullWidth = "_fullWidth_1cxsm_21";
|
|
1370
8
|
const destructive = "_destructive_1cxsm_34";
|
|
@@ -1406,10 +44,10 @@ function Button({
|
|
|
1406
44
|
disabled ? styles$5.disabled : "",
|
|
1407
45
|
className
|
|
1408
46
|
].filter(Boolean).join(" ");
|
|
1409
|
-
return /* @__PURE__ */
|
|
1410
|
-
leftIcon && /* @__PURE__ */
|
|
1411
|
-
/* @__PURE__ */
|
|
1412
|
-
rightIcon && /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ jsxs("button", { className: classes, disabled, ...props, children: [
|
|
48
|
+
leftIcon && /* @__PURE__ */ jsx("span", { className: styles$5.iconLeft, children: leftIcon }),
|
|
49
|
+
/* @__PURE__ */ jsx("span", { className: styles$5.label, children }),
|
|
50
|
+
rightIcon && /* @__PURE__ */ jsx("span", { className: styles$5.iconRight, children: rightIcon })
|
|
1413
51
|
] });
|
|
1414
52
|
}
|
|
1415
53
|
|
|
@@ -1436,8 +74,8 @@ const Checkbox = ({ checked, onChange, label, className = "", ...props }) => {
|
|
|
1436
74
|
onChange(e.target.checked);
|
|
1437
75
|
}
|
|
1438
76
|
};
|
|
1439
|
-
return /* @__PURE__ */
|
|
1440
|
-
/* @__PURE__ */
|
|
77
|
+
return /* @__PURE__ */ jsxs("label", { className: wrapperClass, children: [
|
|
78
|
+
/* @__PURE__ */ jsx("span", { className: boxClass, children: /* @__PURE__ */ jsx(
|
|
1441
79
|
"svg",
|
|
1442
80
|
{
|
|
1443
81
|
width: "11",
|
|
@@ -1445,7 +83,7 @@ const Checkbox = ({ checked, onChange, label, className = "", ...props }) => {
|
|
|
1445
83
|
viewBox: "0 0 11 8",
|
|
1446
84
|
fill: "none",
|
|
1447
85
|
className: styles$4.checkIcon,
|
|
1448
|
-
children: /* @__PURE__ */
|
|
86
|
+
children: /* @__PURE__ */ jsx(
|
|
1449
87
|
"path",
|
|
1450
88
|
{
|
|
1451
89
|
d: "M9.99837 0.665039L3.58171 7.08171L0.665039 4.16504",
|
|
@@ -1457,8 +95,8 @@ const Checkbox = ({ checked, onChange, label, className = "", ...props }) => {
|
|
|
1457
95
|
)
|
|
1458
96
|
}
|
|
1459
97
|
) }),
|
|
1460
|
-
label && /* @__PURE__ */
|
|
1461
|
-
/* @__PURE__ */
|
|
98
|
+
label && /* @__PURE__ */ jsx("span", { className: styles$4.text, children: label }),
|
|
99
|
+
/* @__PURE__ */ jsx(
|
|
1462
100
|
"input",
|
|
1463
101
|
{
|
|
1464
102
|
type: "checkbox",
|
|
@@ -5377,7 +4015,7 @@ function PopChild({ children, isPresent, anchorX, root }) {
|
|
|
5377
4015
|
}
|
|
5378
4016
|
};
|
|
5379
4017
|
}, [isPresent]);
|
|
5380
|
-
return (
|
|
4018
|
+
return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, children: React.cloneElement(children, { ref: composedRef }) }));
|
|
5381
4019
|
}
|
|
5382
4020
|
|
|
5383
4021
|
const PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, root }) => {
|
|
@@ -5427,9 +4065,9 @@ const PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, p
|
|
|
5427
4065
|
onExitComplete();
|
|
5428
4066
|
}, [isPresent]);
|
|
5429
4067
|
if (mode === "popLayout") {
|
|
5430
|
-
children = (
|
|
4068
|
+
children = (jsx(PopChild, { isPresent: isPresent, anchorX: anchorX, root: root, children: children }));
|
|
5431
4069
|
}
|
|
5432
|
-
return (
|
|
4070
|
+
return (jsx(PresenceContext.Provider, { value: context, children: children }));
|
|
5433
4071
|
};
|
|
5434
4072
|
function newChildrenMap() {
|
|
5435
4073
|
return new Map();
|
|
@@ -5610,7 +4248,7 @@ const AnimatePresence = ({ children, custom, initial = true, onExitComplete, pre
|
|
|
5610
4248
|
* all components have finished animating out.
|
|
5611
4249
|
*/
|
|
5612
4250
|
const { forceRender } = useContext(LayoutGroupContext);
|
|
5613
|
-
return (
|
|
4251
|
+
return (jsx(Fragment, { children: renderedChildren.map((child) => {
|
|
5614
4252
|
const key = getChildKey(child);
|
|
5615
4253
|
const isPresent = propagate && !isParentPresent
|
|
5616
4254
|
? false
|
|
@@ -5635,7 +4273,7 @@ const AnimatePresence = ({ children, custom, initial = true, onExitComplete, pre
|
|
|
5635
4273
|
onExitComplete && onExitComplete();
|
|
5636
4274
|
}
|
|
5637
4275
|
};
|
|
5638
|
-
return (
|
|
4276
|
+
return (jsx(PresenceChild, { isPresent: isPresent, initial: !isInitialRender.current || initial
|
|
5639
4277
|
? undefined
|
|
5640
4278
|
: false, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, root: root, onExitComplete: isPresent ? undefined : onExit, anchorX: anchorX, children: child }, key));
|
|
5641
4279
|
}) }));
|
|
@@ -6206,7 +4844,7 @@ function useRender(Component, props, ref, { latestValues, }, isStatic, forwardMo
|
|
|
6206
4844
|
: useHTMLProps;
|
|
6207
4845
|
const visualProps = useVisualProps(props, latestValues, isStatic, Component);
|
|
6208
4846
|
const filteredProps = filterProps(props, typeof Component === "string", forwardMotionProps);
|
|
6209
|
-
const elementProps = Component !== Fragment ? { ...filteredProps, ...visualProps, ref } : {};
|
|
4847
|
+
const elementProps = Component !== Fragment$1 ? { ...filteredProps, ...visualProps, ref } : {};
|
|
6210
4848
|
/**
|
|
6211
4849
|
* If component has been handed a motion value as its child,
|
|
6212
4850
|
* memoise its initial value and render that. Subsequent updates
|
|
@@ -6598,7 +5236,7 @@ function createMotionComponent(Component, { forwardMotionProps = false } = {}, p
|
|
|
6598
5236
|
* The mount order and hierarchy is specific to ensure our element ref
|
|
6599
5237
|
* is hydrated by the time features fire their effects.
|
|
6600
5238
|
*/
|
|
6601
|
-
return (
|
|
5239
|
+
return (jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, forwardMotionProps)] }));
|
|
6602
5240
|
}
|
|
6603
5241
|
MotionDOMComponent.displayName = `motion.${typeof Component === "string"
|
|
6604
5242
|
? Component
|
|
@@ -7577,7 +6215,7 @@ const createDomVisualElement = (Component, options) => {
|
|
|
7577
6215
|
return isSVGComponent(Component)
|
|
7578
6216
|
? new SVGVisualElement(options)
|
|
7579
6217
|
: new HTMLVisualElement(options, {
|
|
7580
|
-
allowProjection: Component !== Fragment,
|
|
6218
|
+
allowProjection: Component !== Fragment$1,
|
|
7581
6219
|
});
|
|
7582
6220
|
};
|
|
7583
6221
|
|
|
@@ -9529,7 +8167,7 @@ class MeasureLayoutWithContext extends Component {
|
|
|
9529
8167
|
function MeasureLayout(props) {
|
|
9530
8168
|
const [isPresent, safeToRemove] = usePresence();
|
|
9531
8169
|
const layoutGroup = useContext(LayoutGroupContext);
|
|
9532
|
-
return (
|
|
8170
|
+
return (jsx(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove }));
|
|
9533
8171
|
}
|
|
9534
8172
|
const defaultScaleCorrectors = {
|
|
9535
8173
|
borderRadius: {
|
|
@@ -10072,6 +8710,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
10072
8710
|
*/
|
|
10073
8711
|
this.eventHandlers = new Map();
|
|
10074
8712
|
this.hasTreeAnimated = false;
|
|
8713
|
+
this.layoutVersion = 0;
|
|
10075
8714
|
// Note: Currently only running on root node
|
|
10076
8715
|
this.updateScheduled = false;
|
|
10077
8716
|
this.scheduleUpdate = () => this.update();
|
|
@@ -10098,6 +8737,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
10098
8737
|
* Frame calculations
|
|
10099
8738
|
*/
|
|
10100
8739
|
this.resolvedRelativeTargetAt = 0.0;
|
|
8740
|
+
this.linkedParentVersion = 0;
|
|
10101
8741
|
this.hasProjected = false;
|
|
10102
8742
|
this.isVisible = true;
|
|
10103
8743
|
this.animationProgress = 0;
|
|
@@ -10451,6 +9091,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
10451
9091
|
}
|
|
10452
9092
|
const prevLayout = this.layout;
|
|
10453
9093
|
this.layout = this.measure(false);
|
|
9094
|
+
this.layoutVersion++;
|
|
10454
9095
|
this.layoutCorrected = createBox();
|
|
10455
9096
|
this.isLayoutDirty = false;
|
|
10456
9097
|
this.projectionDelta = undefined;
|
|
@@ -10670,25 +9311,23 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
10670
9311
|
if (!this.layout || !(layout || layoutId))
|
|
10671
9312
|
return;
|
|
10672
9313
|
this.resolvedRelativeTargetAt = frameData.timestamp;
|
|
9314
|
+
const relativeParent = this.getClosestProjectingParent();
|
|
9315
|
+
if (relativeParent &&
|
|
9316
|
+
this.linkedParentVersion !== relativeParent.layoutVersion &&
|
|
9317
|
+
!relativeParent.options.layoutRoot) {
|
|
9318
|
+
this.removeRelativeTarget();
|
|
9319
|
+
}
|
|
10673
9320
|
/**
|
|
10674
9321
|
* If we don't have a targetDelta but do have a layout, we can attempt to resolve
|
|
10675
9322
|
* a relativeParent. This will allow a component to perform scale correction
|
|
10676
9323
|
* even if no animation has started.
|
|
10677
9324
|
*/
|
|
10678
9325
|
if (!this.targetDelta && !this.relativeTarget) {
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
relativeParent.layout &&
|
|
10682
|
-
this.animationProgress !== 1) {
|
|
10683
|
-
this.relativeParent = relativeParent;
|
|
10684
|
-
this.forceRelativeParentToResolveTarget();
|
|
10685
|
-
this.relativeTarget = createBox();
|
|
10686
|
-
this.relativeTargetOrigin = createBox();
|
|
10687
|
-
calcRelativePosition(this.relativeTargetOrigin, this.layout.layoutBox, relativeParent.layout.layoutBox);
|
|
10688
|
-
copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);
|
|
9326
|
+
if (relativeParent && relativeParent.layout) {
|
|
9327
|
+
this.createRelativeTarget(relativeParent, this.layout.layoutBox, relativeParent.layout.layoutBox);
|
|
10689
9328
|
}
|
|
10690
9329
|
else {
|
|
10691
|
-
this.
|
|
9330
|
+
this.removeRelativeTarget();
|
|
10692
9331
|
}
|
|
10693
9332
|
}
|
|
10694
9333
|
/**
|
|
@@ -10738,19 +9377,13 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
10738
9377
|
*/
|
|
10739
9378
|
if (this.attemptToResolveRelativeTarget) {
|
|
10740
9379
|
this.attemptToResolveRelativeTarget = false;
|
|
10741
|
-
const relativeParent = this.getClosestProjectingParent();
|
|
10742
9380
|
if (relativeParent &&
|
|
10743
9381
|
Boolean(relativeParent.resumingFrom) ===
|
|
10744
9382
|
Boolean(this.resumingFrom) &&
|
|
10745
9383
|
!relativeParent.options.layoutScroll &&
|
|
10746
9384
|
relativeParent.target &&
|
|
10747
9385
|
this.animationProgress !== 1) {
|
|
10748
|
-
this.relativeParent
|
|
10749
|
-
this.forceRelativeParentToResolveTarget();
|
|
10750
|
-
this.relativeTarget = createBox();
|
|
10751
|
-
this.relativeTargetOrigin = createBox();
|
|
10752
|
-
calcRelativePosition(this.relativeTargetOrigin, this.target, relativeParent.target);
|
|
10753
|
-
copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);
|
|
9386
|
+
this.createRelativeTarget(relativeParent, this.target, relativeParent.target);
|
|
10754
9387
|
}
|
|
10755
9388
|
else {
|
|
10756
9389
|
this.relativeParent = this.relativeTarget = undefined;
|
|
@@ -10776,6 +9409,18 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
10776
9409
|
this.options.layoutRoot) &&
|
|
10777
9410
|
this.layout);
|
|
10778
9411
|
}
|
|
9412
|
+
createRelativeTarget(relativeParent, layout, parentLayout) {
|
|
9413
|
+
this.relativeParent = relativeParent;
|
|
9414
|
+
this.linkedParentVersion = relativeParent.layoutVersion;
|
|
9415
|
+
this.forceRelativeParentToResolveTarget();
|
|
9416
|
+
this.relativeTarget = createBox();
|
|
9417
|
+
this.relativeTargetOrigin = createBox();
|
|
9418
|
+
calcRelativePosition(this.relativeTargetOrigin, layout, parentLayout);
|
|
9419
|
+
copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);
|
|
9420
|
+
}
|
|
9421
|
+
removeRelativeTarget() {
|
|
9422
|
+
this.relativeParent = this.relativeTarget = undefined;
|
|
9423
|
+
}
|
|
10779
9424
|
calcProjection() {
|
|
10780
9425
|
const lead = this.getLead();
|
|
10781
9426
|
const isShared = Boolean(this.resumingFrom) || this !== lead;
|
|
@@ -11785,7 +10430,7 @@ const styles$3 = {
|
|
|
11785
10430
|
closeButton: closeButton};
|
|
11786
10431
|
|
|
11787
10432
|
function DialogCloseIcon() {
|
|
11788
|
-
return /* @__PURE__ */
|
|
10433
|
+
return /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx("g", { opacity: "0.7", children: /* @__PURE__ */ jsx(
|
|
11789
10434
|
"path",
|
|
11790
10435
|
{
|
|
11791
10436
|
d: "M12 4L4 12M4 4L12 12",
|
|
@@ -11824,7 +10469,7 @@ function Dialog({ open, onClose, children }) {
|
|
|
11824
10469
|
const handleOverlayClick = () => {
|
|
11825
10470
|
if (onClose) onClose();
|
|
11826
10471
|
};
|
|
11827
|
-
return /* @__PURE__ */
|
|
10472
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(DialogPortal, { children: /* @__PURE__ */ jsx(
|
|
11828
10473
|
motion.div,
|
|
11829
10474
|
{
|
|
11830
10475
|
className: styles$3.overlay,
|
|
@@ -11835,7 +10480,7 @@ function Dialog({ open, onClose, children }) {
|
|
|
11835
10480
|
animate: { opacity: 1 },
|
|
11836
10481
|
exit: { opacity: 0 },
|
|
11837
10482
|
transition: { duration: 0.15 },
|
|
11838
|
-
children: /* @__PURE__ */
|
|
10483
|
+
children: /* @__PURE__ */ jsxs(
|
|
11839
10484
|
motion.div,
|
|
11840
10485
|
{
|
|
11841
10486
|
className: styles$3.content,
|
|
@@ -11846,14 +10491,14 @@ function Dialog({ open, onClose, children }) {
|
|
|
11846
10491
|
onClick: (e) => e.stopPropagation(),
|
|
11847
10492
|
children: [
|
|
11848
10493
|
children,
|
|
11849
|
-
onClose && /* @__PURE__ */
|
|
10494
|
+
onClose && /* @__PURE__ */ jsx(
|
|
11850
10495
|
"button",
|
|
11851
10496
|
{
|
|
11852
10497
|
type: "button",
|
|
11853
10498
|
className: styles$3.closeButton,
|
|
11854
10499
|
onClick: onClose,
|
|
11855
10500
|
"aria-label": "Close",
|
|
11856
|
-
children: /* @__PURE__ */
|
|
10501
|
+
children: /* @__PURE__ */ jsx(DialogCloseIcon, {})
|
|
11857
10502
|
}
|
|
11858
10503
|
)
|
|
11859
10504
|
]
|
|
@@ -11864,19 +10509,19 @@ function Dialog({ open, onClose, children }) {
|
|
|
11864
10509
|
}
|
|
11865
10510
|
function DialogHeader({ children, className = "" }) {
|
|
11866
10511
|
const classes = [styles$3.header, className].filter(Boolean).join(" ");
|
|
11867
|
-
return /* @__PURE__ */
|
|
10512
|
+
return /* @__PURE__ */ jsx("div", { className: classes, children });
|
|
11868
10513
|
}
|
|
11869
10514
|
function DialogTitle({ children, className = "" }) {
|
|
11870
10515
|
const classes = [styles$3.title, className].filter(Boolean).join(" ");
|
|
11871
|
-
return /* @__PURE__ */
|
|
10516
|
+
return /* @__PURE__ */ jsx("h2", { className: classes, children });
|
|
11872
10517
|
}
|
|
11873
10518
|
function DialogBody({ children, className = "" }) {
|
|
11874
10519
|
const classes = [styles$3.body, className].filter(Boolean).join(" ");
|
|
11875
|
-
return /* @__PURE__ */
|
|
10520
|
+
return /* @__PURE__ */ jsx("div", { className: classes, children });
|
|
11876
10521
|
}
|
|
11877
10522
|
function DialogFooter({ children, className = "" }) {
|
|
11878
10523
|
const classes = [styles$3.footer, className].filter(Boolean).join(" ");
|
|
11879
|
-
return /* @__PURE__ */
|
|
10524
|
+
return /* @__PURE__ */ jsx("div", { className: classes, children });
|
|
11880
10525
|
}
|
|
11881
10526
|
|
|
11882
10527
|
const wrapper$2 = "_wrapper_x822s_1";
|
|
@@ -11906,9 +10551,9 @@ const Input = ({
|
|
|
11906
10551
|
}) => {
|
|
11907
10552
|
const wrapperClass = [styles$2.wrapper, className].filter(Boolean).join(" ");
|
|
11908
10553
|
const containerClass = [styles$2.container, error ? styles$2.containerError : ""].filter(Boolean).join(" ");
|
|
11909
|
-
return /* @__PURE__ */
|
|
11910
|
-
label && /* @__PURE__ */
|
|
11911
|
-
/* @__PURE__ */
|
|
10554
|
+
return /* @__PURE__ */ jsxs("div", { className: wrapperClass, children: [
|
|
10555
|
+
label && /* @__PURE__ */ jsx("div", { className: styles$2.label, children: label }),
|
|
10556
|
+
/* @__PURE__ */ jsx("div", { className: containerClass, children: /* @__PURE__ */ jsx(
|
|
11912
10557
|
"input",
|
|
11913
10558
|
{
|
|
11914
10559
|
type,
|
|
@@ -11920,7 +10565,7 @@ const Input = ({
|
|
|
11920
10565
|
...props
|
|
11921
10566
|
}
|
|
11922
10567
|
) }),
|
|
11923
|
-
error && /* @__PURE__ */
|
|
10568
|
+
error && /* @__PURE__ */ jsx("div", { className: styles$2.errorText, children: error })
|
|
11924
10569
|
] });
|
|
11925
10570
|
};
|
|
11926
10571
|
|
|
@@ -12036,7 +10681,7 @@ function useSelect(props) {
|
|
|
12036
10681
|
}
|
|
12037
10682
|
|
|
12038
10683
|
function ChevronDown() {
|
|
12039
|
-
return /* @__PURE__ */
|
|
10684
|
+
return /* @__PURE__ */ jsx("svg", { width: "10", height: "6", viewBox: "0 0 10 6", fill: "none", children: /* @__PURE__ */ jsx(
|
|
12040
10685
|
"path",
|
|
12041
10686
|
{
|
|
12042
10687
|
d: "M0.665 0.665L4.665 4.665L8.665 0.665",
|
|
@@ -12074,10 +10719,10 @@ const Select = forwardRef(function Select2(props, ref) {
|
|
|
12074
10719
|
open ? styles$1.triggerOpen : "",
|
|
12075
10720
|
disabled ? styles$1.triggerDisabled : ""
|
|
12076
10721
|
].filter(Boolean).join(" ");
|
|
12077
|
-
/* @__PURE__ */
|
|
10722
|
+
/* @__PURE__ */ jsx("div", { className: styles$1.dropdown, children: /* @__PURE__ */ jsx("div", { className: styles$1.dropdownInner, role: "listbox", children: options.map((option) => {
|
|
12078
10723
|
const isActive = option.value === (selected && selected.value);
|
|
12079
10724
|
const optionClass = isActive ? `${styles$1.option} ${styles$1.optionActive}` : styles$1.option;
|
|
12080
|
-
return /* @__PURE__ */
|
|
10725
|
+
return /* @__PURE__ */ jsxs(
|
|
12081
10726
|
"button",
|
|
12082
10727
|
{
|
|
12083
10728
|
type: "button",
|
|
@@ -12086,16 +10731,16 @@ const Select = forwardRef(function Select2(props, ref) {
|
|
|
12086
10731
|
className: optionClass,
|
|
12087
10732
|
onClick: () => handleSelect(option),
|
|
12088
10733
|
children: [
|
|
12089
|
-
/* @__PURE__ */
|
|
12090
|
-
option.hint && /* @__PURE__ */
|
|
10734
|
+
/* @__PURE__ */ jsx("span", { className: styles$1.optionLabel, children: option.label }),
|
|
10735
|
+
option.hint && /* @__PURE__ */ jsx("span", { className: styles$1.optionHint, children: option.hint })
|
|
12091
10736
|
]
|
|
12092
10737
|
},
|
|
12093
10738
|
option.value
|
|
12094
10739
|
);
|
|
12095
10740
|
}) }) });
|
|
12096
|
-
return /* @__PURE__ */
|
|
12097
|
-
label && /* @__PURE__ */
|
|
12098
|
-
/* @__PURE__ */
|
|
10741
|
+
return /* @__PURE__ */ jsxs("div", { className: wrapperClass, ref: wrapperRef, children: [
|
|
10742
|
+
label && /* @__PURE__ */ jsx("div", { className: styles$1.label, children: label }),
|
|
10743
|
+
/* @__PURE__ */ jsxs(
|
|
12099
10744
|
"button",
|
|
12100
10745
|
{
|
|
12101
10746
|
type: "button",
|
|
@@ -12106,18 +10751,18 @@ const Select = forwardRef(function Select2(props, ref) {
|
|
|
12106
10751
|
"aria-haspopup": "listbox",
|
|
12107
10752
|
"aria-expanded": open,
|
|
12108
10753
|
children: [
|
|
12109
|
-
/* @__PURE__ */
|
|
10754
|
+
/* @__PURE__ */ jsx("span", { className: selected ? styles$1.value : styles$1.placeholder, children: selected ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12110
10755
|
selected.label,
|
|
12111
|
-
selected.hint && /* @__PURE__ */
|
|
10756
|
+
selected.hint && /* @__PURE__ */ jsx("span", { className: styles$1.hint, children: selected.hint })
|
|
12112
10757
|
] }) : placeholder }),
|
|
12113
|
-
/* @__PURE__ */
|
|
10758
|
+
/* @__PURE__ */ jsx("span", { className: styles$1.icon, children: /* @__PURE__ */ jsx(ChevronDown, {}) })
|
|
12114
10759
|
]
|
|
12115
10760
|
}
|
|
12116
10761
|
),
|
|
12117
|
-
disableAnimation ? open && /* @__PURE__ */
|
|
10762
|
+
disableAnimation ? open && /* @__PURE__ */ jsx("div", { className: styles$1.dropdown, children: /* @__PURE__ */ jsx("div", { className: styles$1.dropdownInner, role: "listbox", children: options.map((option) => {
|
|
12118
10763
|
const isActive = option.value === (selected && selected.value);
|
|
12119
10764
|
const optionClass = isActive ? `${styles$1.option} ${styles$1.optionActive}` : styles$1.option;
|
|
12120
|
-
return /* @__PURE__ */
|
|
10765
|
+
return /* @__PURE__ */ jsxs(
|
|
12121
10766
|
"button",
|
|
12122
10767
|
{
|
|
12123
10768
|
type: "button",
|
|
@@ -12126,13 +10771,13 @@ const Select = forwardRef(function Select2(props, ref) {
|
|
|
12126
10771
|
className: optionClass,
|
|
12127
10772
|
onClick: () => handleSelect(option),
|
|
12128
10773
|
children: [
|
|
12129
|
-
/* @__PURE__ */
|
|
12130
|
-
option.hint && /* @__PURE__ */
|
|
10774
|
+
/* @__PURE__ */ jsx("span", { className: styles$1.optionLabel, children: option.label }),
|
|
10775
|
+
option.hint && /* @__PURE__ */ jsx("span", { className: styles$1.optionHint, children: option.hint })
|
|
12131
10776
|
]
|
|
12132
10777
|
},
|
|
12133
10778
|
option.value
|
|
12134
10779
|
);
|
|
12135
|
-
}) }) }) : /* @__PURE__ */
|
|
10780
|
+
}) }) }) : /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(
|
|
12136
10781
|
motion.div,
|
|
12137
10782
|
{
|
|
12138
10783
|
className: styles$1.dropdown,
|
|
@@ -12140,10 +10785,10 @@ const Select = forwardRef(function Select2(props, ref) {
|
|
|
12140
10785
|
animate: { opacity: 1, y: 0 },
|
|
12141
10786
|
exit: { opacity: 0, y: -4 },
|
|
12142
10787
|
transition: { duration: 0.12, ease: "easeOut" },
|
|
12143
|
-
children: /* @__PURE__ */
|
|
10788
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$1.dropdownInner, role: "listbox", children: options.map((option) => {
|
|
12144
10789
|
const isActive = option.value === (selected && selected.value);
|
|
12145
10790
|
const optionClass = isActive ? `${styles$1.option} ${styles$1.optionActive}` : styles$1.option;
|
|
12146
|
-
return /* @__PURE__ */
|
|
10791
|
+
return /* @__PURE__ */ jsxs(
|
|
12147
10792
|
"button",
|
|
12148
10793
|
{
|
|
12149
10794
|
type: "button",
|
|
@@ -12152,8 +10797,8 @@ const Select = forwardRef(function Select2(props, ref) {
|
|
|
12152
10797
|
className: optionClass,
|
|
12153
10798
|
onClick: () => handleSelect(option),
|
|
12154
10799
|
children: [
|
|
12155
|
-
/* @__PURE__ */
|
|
12156
|
-
option.hint && /* @__PURE__ */
|
|
10800
|
+
/* @__PURE__ */ jsx("span", { className: styles$1.optionLabel, children: option.label }),
|
|
10801
|
+
option.hint && /* @__PURE__ */ jsx("span", { className: styles$1.optionHint, children: option.hint })
|
|
12157
10802
|
]
|
|
12158
10803
|
},
|
|
12159
10804
|
option.value
|
|
@@ -12176,9 +10821,9 @@ const styles = {
|
|
|
12176
10821
|
const Textarea = ({ label, className = "", ...props }) => {
|
|
12177
10822
|
const wrapperClass = [styles.wrapper].filter(Boolean).join(" ");
|
|
12178
10823
|
const textareaClass = [styles.textarea, className].filter(Boolean).join(" ");
|
|
12179
|
-
return /* @__PURE__ */
|
|
12180
|
-
label && /* @__PURE__ */
|
|
12181
|
-
/* @__PURE__ */
|
|
10824
|
+
return /* @__PURE__ */ jsxs("div", { className: wrapperClass, children: [
|
|
10825
|
+
label && /* @__PURE__ */ jsx("div", { className: styles.label, children: label }),
|
|
10826
|
+
/* @__PURE__ */ jsx("textarea", { className: textareaClass, ...props })
|
|
12182
10827
|
] });
|
|
12183
10828
|
};
|
|
12184
10829
|
|