@spothero/ui 25.4.0 → 25.5.1
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/components/Accordion/styles/index.d.ts +2 -2
- package/dist/components/Badge/styles/index.d.ts +78 -0
- package/dist/components/Button/Button.styles.d.ts +601 -0
- package/dist/components/Card/Card.d.ts +4 -0
- package/dist/components/Checkbox/styles/index.d.ts +200 -0
- package/dist/components/Container/Container.d.ts +4 -0
- package/dist/components/Container/Container.styles.d.ts +10 -0
- package/dist/components/Divider/Divider.d.ts +11 -0
- package/dist/components/Divider/Divider.styles.d.ts +40 -0
- package/dist/components/Drawer/styles/index.d.ts +149 -0
- package/dist/components/FormControl/FormControl.d.ts +13 -0
- package/dist/components/Grid/GridItem.styles.d.ts +4 -0
- package/dist/components/Heading/Heading.styles.d.ts +66 -0
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Input/styles/index.d.ts +217 -0
- package/dist/components/Link/Link.styles.d.ts +102 -0
- package/dist/components/List/styles/index.d.ts +32 -0
- package/dist/components/List/styles/item.styles.d.ts +4 -0
- package/dist/components/Menu/Menu.styles.d.ts +258 -0
- package/dist/components/Modal/styles/body.d.ts +30 -0
- package/dist/components/Modal/styles/closeButton.d.ts +18 -0
- package/dist/components/Modal/styles/dialog.d.ts +16 -0
- package/dist/components/Modal/styles/dialogContainer.d.ts +12 -0
- package/dist/components/Modal/styles/footer.d.ts +6 -0
- package/dist/components/Modal/styles/header.d.ts +10 -0
- package/dist/components/Modal/styles/index.d.ts +227 -0
- package/dist/components/Modal/styles/overlay.d.ts +5 -0
- package/dist/components/Popover/styles/index.d.ts +100 -0
- package/dist/components/Popover/styles/popover-body.d.ts +4 -0
- package/dist/components/Popover/styles/popover-content.d.ts +20 -0
- package/dist/components/Popover/styles/popover-header.d.ts +5 -0
- package/dist/components/Popover/styles/popper.d.ts +4 -0
- package/dist/components/Progress/Progress.styles.d.ts +75 -0
- package/dist/components/Radio/styles/index.d.ts +292 -0
- package/dist/components/RefreshedInput/Button/styles/index.d.ts +413 -0
- package/dist/components/RefreshedInput/Input/styles/index.d.ts +260 -0
- package/dist/components/Select/styles/index.d.ts +2 -2
- package/dist/components/Skeleton/Skeleton.styles.d.ts +26 -0
- package/dist/components/Spinner/Spinner.d.ts +12 -0
- package/dist/components/Spinner/Spinner.styles.d.ts +144 -0
- package/dist/components/Switch/styles/index.d.ts +116 -0
- package/dist/components/Table/Table.styles.d.ts +69 -0
- package/dist/components/Tabs/styles/index.d.ts +308 -0
- package/dist/components/Text/Text.styles.d.ts +30 -0
- package/dist/components/styles.d.ts +26 -0
- package/dist/index.cjs.js +1824 -713
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +248 -0
- package/dist/index.esm.js +1824 -713
- package/dist/index.esm.js.map +1 -1
- package/dist/theme/base/breakpoints.d.ts +6 -6
- package/dist/theme/base/colors.d.ts +106 -116
- package/dist/theme/base/index.d.ts +7 -7
- package/dist/theme/base/notifications.d.ts +80 -104
- package/dist/theme/base/sizes.d.ts +41 -41
- package/dist/theme/base/typography.d.ts +22 -22
- package/dist/theme/base/zindices.d.ts +15 -15
- package/dist/theme/global.d.ts +21 -0
- package/dist/theme/index.d.ts +2 -0
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
|
@@ -256,87 +256,51 @@ AlwaysMountedModal.propTypes = {
|
|
|
256
256
|
};
|
|
257
257
|
|
|
258
258
|
const container = {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
// 720px
|
|
263
|
-
desktop: '72rem' // 1152px
|
|
259
|
+
base: '100%', // 640px
|
|
260
|
+
tablet: '45rem', // 720px
|
|
261
|
+
desktop: '72rem', // 1152px
|
|
264
262
|
};
|
|
265
263
|
const sizes$6 = {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
20: '5rem',
|
|
307
|
-
// 80px
|
|
308
|
-
24: '6rem',
|
|
309
|
-
// 96px
|
|
310
|
-
28: '7rem',
|
|
311
|
-
// 112px
|
|
312
|
-
32: '8rem',
|
|
313
|
-
// 128px
|
|
314
|
-
36: '9rem',
|
|
315
|
-
// 144px
|
|
316
|
-
40: '10rem',
|
|
317
|
-
// 160px
|
|
318
|
-
44: '11rem',
|
|
319
|
-
// 176px
|
|
320
|
-
48: '12rem',
|
|
321
|
-
// 192px
|
|
322
|
-
52: '13rem',
|
|
323
|
-
// 208px
|
|
324
|
-
56: '14rem',
|
|
325
|
-
// 224px
|
|
326
|
-
60: '15rem',
|
|
327
|
-
// 240px
|
|
328
|
-
64: '16rem',
|
|
329
|
-
// 256px
|
|
330
|
-
72: '18rem',
|
|
331
|
-
// 272px
|
|
332
|
-
80: '20rem',
|
|
333
|
-
// 288px
|
|
334
|
-
96: '24rem',
|
|
335
|
-
// 384px
|
|
336
|
-
px: '1px',
|
|
337
|
-
full: '100%',
|
|
338
|
-
max: 'max-content',
|
|
339
|
-
min: 'min-content'
|
|
264
|
+
container,
|
|
265
|
+
0: '0',
|
|
266
|
+
0.5: '0.125rem', // 2px
|
|
267
|
+
1: '0.25rem', // 4px
|
|
268
|
+
1.5: '0.375rem', // 6px
|
|
269
|
+
2: '0.5rem', // 8px
|
|
270
|
+
2.5: '0.625rem', // 10px
|
|
271
|
+
3: '0.75rem', // 12px
|
|
272
|
+
3.5: '0.875rem', // 14px
|
|
273
|
+
4: '1rem', // 16px
|
|
274
|
+
4.5: '1.125rem', // 18px
|
|
275
|
+
5: '1.25rem', // 20px
|
|
276
|
+
5.5: '1.375rem', // 22px
|
|
277
|
+
6: '1.5rem', // 24px
|
|
278
|
+
7: '1.75rem', // 28px
|
|
279
|
+
8: '2rem', // 32px
|
|
280
|
+
9: '2.25rem', // 36px
|
|
281
|
+
10: '2.5rem', // 40px
|
|
282
|
+
12: '3rem', // 48px
|
|
283
|
+
14: '3.5rem', // 56px
|
|
284
|
+
16: '4rem', // 64px
|
|
285
|
+
20: '5rem', // 80px
|
|
286
|
+
24: '6rem', // 96px
|
|
287
|
+
28: '7rem', // 112px
|
|
288
|
+
32: '8rem', // 128px
|
|
289
|
+
36: '9rem', // 144px
|
|
290
|
+
40: '10rem', // 160px
|
|
291
|
+
44: '11rem', // 176px
|
|
292
|
+
48: '12rem', // 192px
|
|
293
|
+
52: '13rem', // 208px
|
|
294
|
+
56: '14rem', // 224px
|
|
295
|
+
60: '15rem', // 240px
|
|
296
|
+
64: '16rem', // 256px
|
|
297
|
+
72: '18rem', // 272px
|
|
298
|
+
80: '20rem', // 288px
|
|
299
|
+
96: '24rem', // 384px
|
|
300
|
+
px: '1px',
|
|
301
|
+
full: '100%',
|
|
302
|
+
max: 'max-content',
|
|
303
|
+
min: 'min-content',
|
|
340
304
|
};
|
|
341
305
|
|
|
342
306
|
const white = '#ffffff';
|
|
@@ -344,394 +308,376 @@ const black = '#000000';
|
|
|
344
308
|
const brandBlue = '#0082ff';
|
|
345
309
|
const modalOverlay = '#21212160';
|
|
346
310
|
const gray = {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
311
|
+
50: '#f6f7f9',
|
|
312
|
+
100: '#e1e6ec',
|
|
313
|
+
200: '#cbd4de',
|
|
314
|
+
300: '#afbdcc',
|
|
315
|
+
400: '#94a7ba',
|
|
316
|
+
500: '#7890a8',
|
|
317
|
+
600: '#537495',
|
|
318
|
+
700: '#3b5261',
|
|
319
|
+
800: '#2f3f4b',
|
|
320
|
+
900: '#26323c',
|
|
357
321
|
};
|
|
358
322
|
const blue = {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
323
|
+
50: '#f1fcff',
|
|
324
|
+
100: '#e6f8fd',
|
|
325
|
+
200: '#c0e9fb',
|
|
326
|
+
300: '#96d3fa',
|
|
327
|
+
400: '#5baafa',
|
|
328
|
+
500: '#1271eb',
|
|
329
|
+
600: '#1d58f2',
|
|
330
|
+
700: '#1b46da',
|
|
331
|
+
800: '#1735a6',
|
|
332
|
+
900: '#132b7f',
|
|
369
333
|
};
|
|
370
334
|
const navy = {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
335
|
+
50: '#f4fafc',
|
|
336
|
+
100: '#e4f7fb',
|
|
337
|
+
200: '#bfebf6',
|
|
338
|
+
300: '#92d9f4',
|
|
339
|
+
400: '#51b7f0',
|
|
340
|
+
500: '#2590ea',
|
|
341
|
+
600: '#1a6cda',
|
|
342
|
+
700: '#1b55b6',
|
|
343
|
+
800: '#194185',
|
|
344
|
+
900: '#002d5b',
|
|
381
345
|
};
|
|
382
346
|
const green = {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
347
|
+
50: '#e9fbf9',
|
|
348
|
+
100: '#d3f7ef',
|
|
349
|
+
200: '#a4f3d9',
|
|
350
|
+
300: '#65eabf',
|
|
351
|
+
400: '#1edb96',
|
|
352
|
+
500: '#09c66a',
|
|
353
|
+
600: '#08ad50',
|
|
354
|
+
700: '#008547',
|
|
355
|
+
800: '#11703e',
|
|
356
|
+
900: '#115a35',
|
|
393
357
|
};
|
|
394
358
|
const yellow = {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
359
|
+
50: '#fff9e5',
|
|
360
|
+
100: '#faf0bd',
|
|
361
|
+
200: '#f6e67c',
|
|
362
|
+
300: '#f1d439',
|
|
363
|
+
400: '#ffbf02',
|
|
364
|
+
500: '#e19706',
|
|
365
|
+
600: '#cf7404',
|
|
366
|
+
700: '#ae5708',
|
|
367
|
+
800: '#8e440e',
|
|
368
|
+
900: '#743710',
|
|
405
369
|
};
|
|
406
370
|
const red = {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
371
|
+
50: '#fff3f0',
|
|
372
|
+
100: '#fdeef3',
|
|
373
|
+
200: '#fbcee6',
|
|
374
|
+
300: '#fba4d1',
|
|
375
|
+
400: '#fc6bad',
|
|
376
|
+
500: '#fc4086',
|
|
377
|
+
600: '#f7265f',
|
|
378
|
+
700: '#e01438',
|
|
379
|
+
800: '#b4193c',
|
|
380
|
+
900: '#901530',
|
|
417
381
|
};
|
|
418
382
|
const colors = {
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
secondary: _objectSpread2(_objectSpread2({}, navy), {}, {
|
|
440
|
-
default: navy['900']
|
|
441
|
-
}),
|
|
442
|
-
success: green['700'],
|
|
443
|
-
warning: yellow['400'],
|
|
444
|
-
error: red['700'],
|
|
445
|
-
accent: gray['200'],
|
|
446
|
-
text: {
|
|
383
|
+
gray: {
|
|
384
|
+
...gray,
|
|
385
|
+
light: gray['50'],
|
|
386
|
+
medium: gray['200'],
|
|
387
|
+
dark: gray['600'],
|
|
388
|
+
},
|
|
389
|
+
blue,
|
|
390
|
+
navy,
|
|
391
|
+
red: {
|
|
392
|
+
...red,
|
|
393
|
+
default: red['700'],
|
|
394
|
+
},
|
|
395
|
+
green: {
|
|
396
|
+
...green,
|
|
397
|
+
default: green['700'],
|
|
398
|
+
},
|
|
399
|
+
yellow: {
|
|
400
|
+
...yellow,
|
|
401
|
+
default: yellow['400'],
|
|
402
|
+
},
|
|
447
403
|
primary: {
|
|
448
|
-
|
|
449
|
-
|
|
404
|
+
...blue,
|
|
405
|
+
default: blue['500'],
|
|
406
|
+
brand: blue['500'],
|
|
450
407
|
},
|
|
451
408
|
secondary: {
|
|
452
|
-
|
|
409
|
+
...navy,
|
|
410
|
+
default: navy['900'],
|
|
453
411
|
},
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
412
|
+
success: green['700'],
|
|
413
|
+
warning: yellow['400'],
|
|
414
|
+
error: red['700'],
|
|
415
|
+
accent: gray['200'],
|
|
416
|
+
text: {
|
|
417
|
+
primary: {
|
|
418
|
+
light: black,
|
|
419
|
+
dark: white,
|
|
420
|
+
},
|
|
421
|
+
secondary: {
|
|
422
|
+
light: gray['600'],
|
|
423
|
+
},
|
|
424
|
+
link: {
|
|
425
|
+
light: blue['500'],
|
|
426
|
+
dark: white,
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
background: {
|
|
430
|
+
gray: gray['50'],
|
|
431
|
+
white,
|
|
432
|
+
},
|
|
433
|
+
white,
|
|
434
|
+
black,
|
|
435
|
+
brandBlue,
|
|
436
|
+
modalOverlay,
|
|
467
437
|
};
|
|
468
438
|
|
|
469
439
|
const shadows = {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
drawer: '-8px 0 16px 0 rgba(33,33,33,.1)'
|
|
440
|
+
outline: '0 0 0 3px rgba(29, 88, 242, 0.7)', // primary.600, 70% opacity
|
|
441
|
+
drawer: '-8px 0 16px 0 rgba(33,33,33,.1)',
|
|
473
442
|
};
|
|
474
443
|
var shadows$1 = merge(theme$2.shadows, shadows);
|
|
475
444
|
|
|
476
445
|
const indices = {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
layer5: 500,
|
|
491
|
-
// equivalent to $z-index-layer3 in fe-core
|
|
492
|
-
layer6: 600,
|
|
493
|
-
// equivalent to $z-index-layer4 in fe-core
|
|
494
|
-
layer7: 700,
|
|
495
|
-
// equivalent to $z-index-modal-shim in fe-core
|
|
496
|
-
layer8: 800,
|
|
497
|
-
// equivalent to $z-index-modal in fe-core
|
|
498
|
-
layer9: 900,
|
|
499
|
-
// equivalent to $z-index-notification in fe-core
|
|
500
|
-
layer10: 1000 // equivalent to $z-index-top in fe-core
|
|
446
|
+
hide: -100, // equivalent to $z-index-negative in fe-core (https://github.com/spothero/fe-core/blob/main/utils/_defaults.scss)
|
|
447
|
+
auto: 'auto',
|
|
448
|
+
base: 0, // equivalent to $z-index-back in fe-core
|
|
449
|
+
layer1: 100, // equivalent to $z-index-mid in fe-core
|
|
450
|
+
layer2: 200, // equivalent to $z-index-fore in fe-core
|
|
451
|
+
layer3: 300, // equivalent to $z-index-layer1 in fe-core
|
|
452
|
+
layer4: 400, // equivalent to $z-index-layer2 in fe-core
|
|
453
|
+
layer5: 500, // equivalent to $z-index-layer3 in fe-core
|
|
454
|
+
layer6: 600, // equivalent to $z-index-layer4 in fe-core
|
|
455
|
+
layer7: 700, // equivalent to $z-index-modal-shim in fe-core
|
|
456
|
+
layer8: 800, // equivalent to $z-index-modal in fe-core
|
|
457
|
+
layer9: 900, // equivalent to $z-index-notification in fe-core
|
|
458
|
+
layer10: 1000, // equivalent to $z-index-top in fe-core
|
|
501
459
|
};
|
|
502
460
|
|
|
503
461
|
const breakpoints = {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
desktop: '64rem',
|
|
509
|
-
// 1024px
|
|
510
|
-
desktopXL: '90rem' // 1440px
|
|
462
|
+
mobileXL: '30rem', // 480px
|
|
463
|
+
tablet: '48rem', // 768px
|
|
464
|
+
desktop: '64rem', // 1024px
|
|
465
|
+
desktopXL: '90rem', // 1440px
|
|
511
466
|
};
|
|
512
467
|
|
|
513
468
|
const fonts = {
|
|
514
|
-
|
|
515
|
-
|
|
469
|
+
heading: `"Plus Jakarta Sans", sans-serif`,
|
|
470
|
+
body: `"Plus Jakarta Sans", sans-serif`,
|
|
516
471
|
};
|
|
517
472
|
const fontSizes = {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
lg: '1.25rem',
|
|
529
|
-
// 20px
|
|
530
|
-
md: '1.125rem',
|
|
531
|
-
// 18px
|
|
532
|
-
base: '1rem',
|
|
533
|
-
// 16px
|
|
534
|
-
sm: '0.875rem',
|
|
535
|
-
// 14px
|
|
536
|
-
xs: '0.75rem' // 12px
|
|
473
|
+
'5xl': '3.5rem', // 56px
|
|
474
|
+
'4xl': '3rem', // 48px
|
|
475
|
+
'3xl': '2.5rem', // 40px
|
|
476
|
+
'2xl': '2rem', // 32px
|
|
477
|
+
xl: '1.5rem', // 24px
|
|
478
|
+
lg: '1.25rem', // 20px
|
|
479
|
+
md: '1.125rem', // 18px
|
|
480
|
+
base: '1rem', // 16px
|
|
481
|
+
sm: '0.875rem', // 14px
|
|
482
|
+
xs: '0.75rem', // 12px
|
|
537
483
|
};
|
|
538
484
|
const fontWeights = {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
485
|
+
light: 300,
|
|
486
|
+
normal: 400,
|
|
487
|
+
medium: 500,
|
|
488
|
+
semibold: 600,
|
|
489
|
+
bold: 700,
|
|
544
490
|
};
|
|
545
491
|
|
|
546
492
|
const NOTIFICATION_STATUSES = {
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
493
|
+
NEUTRAL: 'neutral',
|
|
494
|
+
ERROR: 'error',
|
|
495
|
+
WARNING: 'warning',
|
|
496
|
+
SUCCESS: 'success',
|
|
551
497
|
};
|
|
552
498
|
const NOTIFICATION_SIZES = {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
499
|
+
SM: 'sm',
|
|
500
|
+
MD: 'md',
|
|
501
|
+
LG: 'lg',
|
|
556
502
|
};
|
|
557
503
|
const notificationBaseStyle = {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
},
|
|
562
|
-
actionButton: {
|
|
563
|
-
fontSize: 'sm',
|
|
564
|
-
height: 'fit-content',
|
|
565
|
-
lineHeight: '1.4',
|
|
566
|
-
color: 'primary.600',
|
|
567
|
-
_hover: {
|
|
568
|
-
color: 'primary.700'
|
|
569
|
-
}
|
|
570
|
-
},
|
|
571
|
-
dismissButton: {
|
|
572
|
-
color: 'gray.600',
|
|
573
|
-
borderColor: 'transparent',
|
|
574
|
-
borderWidth: '2px',
|
|
575
|
-
padding: 0,
|
|
576
|
-
width: 10,
|
|
577
|
-
height: 10,
|
|
578
|
-
backgroundColor: 'transparent',
|
|
579
|
-
borderRadius: 'base',
|
|
580
|
-
marginLeft: 2,
|
|
581
|
-
_hover: {
|
|
582
|
-
color: 'gray.700'
|
|
583
|
-
},
|
|
584
|
-
_focus: {
|
|
585
|
-
color: 'gray.700',
|
|
586
|
-
borderColor: 'white',
|
|
587
|
-
boxShadow: 'outline'
|
|
588
|
-
}
|
|
589
|
-
},
|
|
590
|
-
icon: {
|
|
591
|
-
width: 6,
|
|
592
|
-
marginRight: 2,
|
|
593
|
-
height: 'auto'
|
|
594
|
-
},
|
|
595
|
-
description: {
|
|
596
|
-
lineHeight: 1.4
|
|
597
|
-
},
|
|
598
|
-
title: {
|
|
599
|
-
lineHeight: 1.4
|
|
600
|
-
},
|
|
601
|
-
variants: {},
|
|
602
|
-
sizes: {
|
|
603
|
-
sm: {
|
|
604
|
-
title: {
|
|
605
|
-
fontSize: 'xs'
|
|
606
|
-
},
|
|
607
|
-
description: {
|
|
608
|
-
fontSize: 'xs'
|
|
609
|
-
}
|
|
610
|
-
},
|
|
611
|
-
md: {
|
|
612
|
-
title: {
|
|
613
|
-
fontSize: 'sm'
|
|
614
|
-
},
|
|
615
|
-
description: {
|
|
616
|
-
fontSize: 'sm'
|
|
617
|
-
}
|
|
504
|
+
container: {
|
|
505
|
+
paddingY: 2,
|
|
506
|
+
borderRadius: 'base',
|
|
618
507
|
},
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
};
|
|
629
|
-
const notificationStatusStyles = status => {
|
|
630
|
-
switch (status) {
|
|
631
|
-
case NOTIFICATION_STATUSES.NEUTRAL:
|
|
632
|
-
return {
|
|
633
|
-
container: {
|
|
634
|
-
background: 'blue.50'
|
|
635
|
-
},
|
|
636
|
-
icon: {
|
|
637
|
-
color: 'blue.500'
|
|
638
|
-
},
|
|
639
|
-
dismissButton: {
|
|
640
|
-
_hover: {
|
|
641
|
-
background: 'blue.200'
|
|
642
|
-
},
|
|
643
|
-
_focus: {
|
|
644
|
-
background: 'blue.200'
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
};
|
|
648
|
-
case NOTIFICATION_STATUSES.WARNING:
|
|
649
|
-
return {
|
|
650
|
-
container: {
|
|
651
|
-
background: 'yellow.50'
|
|
508
|
+
actionButton: {
|
|
509
|
+
fontSize: 'sm',
|
|
510
|
+
height: 'fit-content',
|
|
511
|
+
lineHeight: '1.4',
|
|
512
|
+
color: 'primary.600',
|
|
513
|
+
_hover: {
|
|
514
|
+
color: 'primary.700',
|
|
652
515
|
},
|
|
653
|
-
|
|
654
|
-
|
|
516
|
+
},
|
|
517
|
+
dismissButton: {
|
|
518
|
+
color: 'gray.600',
|
|
519
|
+
borderColor: 'transparent',
|
|
520
|
+
borderWidth: '2px',
|
|
521
|
+
padding: 0,
|
|
522
|
+
width: 10,
|
|
523
|
+
height: 10,
|
|
524
|
+
backgroundColor: 'transparent',
|
|
525
|
+
borderRadius: 'base',
|
|
526
|
+
marginLeft: 2,
|
|
527
|
+
_hover: {
|
|
528
|
+
color: 'gray.700',
|
|
655
529
|
},
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
_focus: {
|
|
661
|
-
background: 'yellow.200'
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
};
|
|
665
|
-
case NOTIFICATION_STATUSES.ERROR:
|
|
666
|
-
return {
|
|
667
|
-
container: {
|
|
668
|
-
background: 'red.50'
|
|
530
|
+
_focus: {
|
|
531
|
+
color: 'gray.700',
|
|
532
|
+
borderColor: 'white',
|
|
533
|
+
boxShadow: 'outline',
|
|
669
534
|
},
|
|
670
|
-
|
|
671
|
-
|
|
535
|
+
},
|
|
536
|
+
icon: {
|
|
537
|
+
width: 6,
|
|
538
|
+
marginRight: 2,
|
|
539
|
+
height: 'auto',
|
|
540
|
+
},
|
|
541
|
+
description: {
|
|
542
|
+
lineHeight: 1.4,
|
|
543
|
+
},
|
|
544
|
+
title: {
|
|
545
|
+
lineHeight: 1.4,
|
|
546
|
+
},
|
|
547
|
+
variants: {},
|
|
548
|
+
sizes: {
|
|
549
|
+
sm: {
|
|
550
|
+
title: {
|
|
551
|
+
fontSize: 'xs',
|
|
552
|
+
},
|
|
553
|
+
description: {
|
|
554
|
+
fontSize: 'xs',
|
|
555
|
+
},
|
|
672
556
|
},
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
}
|
|
681
|
-
};
|
|
682
|
-
case NOTIFICATION_STATUSES.SUCCESS:
|
|
683
|
-
return {
|
|
684
|
-
container: {
|
|
685
|
-
background: 'green.50'
|
|
557
|
+
md: {
|
|
558
|
+
title: {
|
|
559
|
+
fontSize: 'sm',
|
|
560
|
+
},
|
|
561
|
+
description: {
|
|
562
|
+
fontSize: 'sm',
|
|
563
|
+
},
|
|
686
564
|
},
|
|
687
|
-
|
|
688
|
-
|
|
565
|
+
lg: {
|
|
566
|
+
title: {
|
|
567
|
+
fontSize: 'base',
|
|
568
|
+
},
|
|
569
|
+
description: {
|
|
570
|
+
fontSize: 'base',
|
|
571
|
+
},
|
|
689
572
|
},
|
|
690
|
-
|
|
691
|
-
_hover: {
|
|
692
|
-
background: 'green.200'
|
|
693
|
-
},
|
|
694
|
-
_focus: {
|
|
695
|
-
background: 'green.200'
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
};
|
|
699
|
-
default:
|
|
700
|
-
return {};
|
|
701
|
-
}
|
|
573
|
+
},
|
|
702
574
|
};
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
575
|
+
const notificationStatusStyles = (status) => {
|
|
576
|
+
switch (status) {
|
|
577
|
+
case NOTIFICATION_STATUSES.NEUTRAL:
|
|
578
|
+
return {
|
|
579
|
+
container: {
|
|
580
|
+
background: 'blue.50',
|
|
581
|
+
},
|
|
582
|
+
icon: {
|
|
583
|
+
color: 'blue.500',
|
|
584
|
+
},
|
|
585
|
+
dismissButton: {
|
|
586
|
+
_hover: {
|
|
587
|
+
background: 'blue.200',
|
|
588
|
+
},
|
|
589
|
+
_focus: {
|
|
590
|
+
background: 'blue.200',
|
|
591
|
+
},
|
|
592
|
+
},
|
|
593
|
+
};
|
|
594
|
+
case NOTIFICATION_STATUSES.WARNING:
|
|
595
|
+
return {
|
|
596
|
+
container: {
|
|
597
|
+
background: 'yellow.50',
|
|
598
|
+
},
|
|
599
|
+
icon: {
|
|
600
|
+
color: 'yellow.400',
|
|
601
|
+
},
|
|
602
|
+
dismissButton: {
|
|
603
|
+
_hover: {
|
|
604
|
+
background: 'yellow.200',
|
|
605
|
+
},
|
|
606
|
+
_focus: {
|
|
607
|
+
background: 'yellow.200',
|
|
608
|
+
},
|
|
609
|
+
},
|
|
610
|
+
};
|
|
611
|
+
case NOTIFICATION_STATUSES.ERROR:
|
|
612
|
+
return {
|
|
613
|
+
container: {
|
|
614
|
+
background: 'red.50',
|
|
615
|
+
},
|
|
616
|
+
icon: {
|
|
617
|
+
color: 'red.700',
|
|
618
|
+
},
|
|
619
|
+
dismissButton: {
|
|
620
|
+
_hover: {
|
|
621
|
+
background: 'red.200',
|
|
622
|
+
},
|
|
623
|
+
_focus: {
|
|
624
|
+
background: 'red.200',
|
|
625
|
+
},
|
|
626
|
+
},
|
|
627
|
+
};
|
|
628
|
+
case NOTIFICATION_STATUSES.SUCCESS:
|
|
629
|
+
return {
|
|
630
|
+
container: {
|
|
631
|
+
background: 'green.50',
|
|
632
|
+
},
|
|
633
|
+
icon: {
|
|
634
|
+
color: 'green.700',
|
|
635
|
+
},
|
|
636
|
+
dismissButton: {
|
|
637
|
+
_hover: {
|
|
638
|
+
background: 'green.200',
|
|
639
|
+
},
|
|
640
|
+
_focus: {
|
|
641
|
+
background: 'green.200',
|
|
642
|
+
},
|
|
643
|
+
},
|
|
644
|
+
};
|
|
645
|
+
default:
|
|
646
|
+
return {};
|
|
647
|
+
}
|
|
648
|
+
};
|
|
649
|
+
const notificationSizeStyles = (size) => {
|
|
650
|
+
switch (size) {
|
|
651
|
+
case NOTIFICATION_SIZES.SM:
|
|
652
|
+
return {
|
|
653
|
+
title: {
|
|
654
|
+
fontSize: 'xs',
|
|
655
|
+
},
|
|
656
|
+
description: {
|
|
657
|
+
fontSize: 'xs',
|
|
658
|
+
},
|
|
659
|
+
};
|
|
660
|
+
case NOTIFICATION_SIZES.MD:
|
|
661
|
+
return {
|
|
662
|
+
title: {
|
|
663
|
+
fontSize: 'sm',
|
|
664
|
+
},
|
|
665
|
+
description: {
|
|
666
|
+
fontSize: 'sm',
|
|
667
|
+
},
|
|
668
|
+
};
|
|
669
|
+
case NOTIFICATION_SIZES.LG:
|
|
670
|
+
return {
|
|
671
|
+
title: {
|
|
672
|
+
fontSize: 'base',
|
|
673
|
+
},
|
|
674
|
+
description: {
|
|
675
|
+
fontSize: 'base',
|
|
676
|
+
},
|
|
677
|
+
};
|
|
678
|
+
default:
|
|
679
|
+
return {};
|
|
680
|
+
}
|
|
735
681
|
};
|
|
736
682
|
|
|
737
683
|
var base = /*#__PURE__*/Object.freeze({
|
|
@@ -831,6 +777,10 @@ const hoverSecondaryColor = generateOklchColor('white', '- 0.03');
|
|
|
831
777
|
const activeSecondaryColor = generateOklchColor('white', '- 0.06');
|
|
832
778
|
// 10% lighter (lightness)
|
|
833
779
|
const hoverDarkColor = generateOklchColor('yellow-default', '+ 0.1');
|
|
780
|
+
// 10% lighter (lightness) — for black variant hover
|
|
781
|
+
const hoverBlackColor = generateOklchColor('black', '+ 0.1');
|
|
782
|
+
// 15% lighter (lightness) — for black variant active
|
|
783
|
+
const activeBlackColor = generateOklchColor('black', '+ 0.15');
|
|
834
784
|
|
|
835
785
|
/**
|
|
836
786
|
* Button Variants - Simplified Color System Using OKLCH
|
|
@@ -953,6 +903,41 @@ const variants$d = {
|
|
|
953
903
|
}
|
|
954
904
|
}
|
|
955
905
|
},
|
|
906
|
+
black: {
|
|
907
|
+
bg: 'black',
|
|
908
|
+
borderColor: 'black',
|
|
909
|
+
color: 'white',
|
|
910
|
+
py: 2,
|
|
911
|
+
_hover: _objectSpread2({
|
|
912
|
+
bg: hoverBlackColor,
|
|
913
|
+
borderColor: hoverBlackColor,
|
|
914
|
+
color: 'white'
|
|
915
|
+
}, disabledButtonHoverStyle),
|
|
916
|
+
_active: {
|
|
917
|
+
bg: activeBlackColor,
|
|
918
|
+
borderColor: activeBlackColor,
|
|
919
|
+
color: 'white'
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
blackOnDark: {
|
|
923
|
+
bg: 'white',
|
|
924
|
+
borderColor: 'white',
|
|
925
|
+
color: 'black',
|
|
926
|
+
py: 2,
|
|
927
|
+
_hover: _objectSpread2({
|
|
928
|
+
bg: hoverSecondaryColor,
|
|
929
|
+
borderColor: hoverSecondaryColor,
|
|
930
|
+
color: 'black'
|
|
931
|
+
}, disabledButtonHoverStyle),
|
|
932
|
+
_active: {
|
|
933
|
+
bg: activeSecondaryColor,
|
|
934
|
+
borderColor: activeSecondaryColor,
|
|
935
|
+
color: 'black'
|
|
936
|
+
},
|
|
937
|
+
_focus: {
|
|
938
|
+
boxShadow: '0 0 0 3px rgba(255, 255, 255, 0.7)'
|
|
939
|
+
}
|
|
940
|
+
},
|
|
956
941
|
destructive: _objectSpread2({}, destructiveButtonStyles),
|
|
957
942
|
destructiveOnDark: _objectSpread2({}, destructiveButtonStyles)
|
|
958
943
|
};
|
|
@@ -1023,7 +1008,7 @@ const props = {
|
|
|
1023
1008
|
variant: PropTypes.oneOf(Object.keys(variants$d))
|
|
1024
1009
|
};
|
|
1025
1010
|
|
|
1026
|
-
const _excluded$
|
|
1011
|
+
const _excluded$q = ["asAnchor", "isExternal", "height"];
|
|
1027
1012
|
const anchorProps = function () {
|
|
1028
1013
|
let isExternal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
1029
1014
|
return _objectSpread2({
|
|
@@ -1040,7 +1025,7 @@ const Button$1 = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1040
1025
|
isExternal,
|
|
1041
1026
|
height = 'md'
|
|
1042
1027
|
} = _ref,
|
|
1043
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1028
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
1044
1029
|
return /*#__PURE__*/React__default.createElement(Button$2, _extends$6({
|
|
1045
1030
|
iconSpacing: 2
|
|
1046
1031
|
}, props, heightProps(height), (asAnchor || props.as === 'a') && anchorProps(isExternal), {
|
|
@@ -1053,7 +1038,7 @@ Button$1.defaultProps = {
|
|
|
1053
1038
|
type: 'button'
|
|
1054
1039
|
};
|
|
1055
1040
|
|
|
1056
|
-
const _excluded$
|
|
1041
|
+
const _excluded$p = ["header", "drawerCloseButton", "children", "headerProps"];
|
|
1057
1042
|
const Drawer = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
1058
1043
|
let {
|
|
1059
1044
|
header,
|
|
@@ -1061,7 +1046,7 @@ const Drawer = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1061
1046
|
children,
|
|
1062
1047
|
headerProps
|
|
1063
1048
|
} = _ref,
|
|
1064
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1049
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
1065
1050
|
return /*#__PURE__*/React__default.createElement(Drawer$1, _extends$6({
|
|
1066
1051
|
placement: "right"
|
|
1067
1052
|
}, props, {
|
|
@@ -1193,7 +1178,7 @@ var SvgCheckmarkCircleFilled = function SvgCheckmarkCircleFilled(props, ref) {
|
|
|
1193
1178
|
};
|
|
1194
1179
|
var ForwardRef$2 = /*#__PURE__*/forwardRef(SvgCheckmarkCircleFilled);
|
|
1195
1180
|
|
|
1196
|
-
const _excluded$
|
|
1181
|
+
const _excluded$o = ["status", "title", "buttonProps", "buttonText", "buttonOnBottom", "showDismiss", "onDismissClick", "showIcon", "description", "icon"];
|
|
1197
1182
|
const statusIconMapping = {
|
|
1198
1183
|
[NOTIFICATION_STATUSES.WARNING]: ForwardRef$3,
|
|
1199
1184
|
[NOTIFICATION_STATUSES.SUCCESS]: ForwardRef$2,
|
|
@@ -1213,7 +1198,7 @@ const Alert = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1213
1198
|
description,
|
|
1214
1199
|
icon
|
|
1215
1200
|
} = _ref,
|
|
1216
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1201
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
1217
1202
|
const IconVariant = icon || statusIconMapping[status];
|
|
1218
1203
|
// the issue with storybook breaking with hooks is still a problem, but once that's resolved this should be memoized
|
|
1219
1204
|
const style = merge(_objectSpread2({}, theme$2.components.Alert.baseStyle), notificationBaseStyle, notificationStatusStyles(status), notificationSizeStyles(props.size));
|
|
@@ -1372,7 +1357,7 @@ const combineSizeWithVariant = _ref => {
|
|
|
1372
1357
|
return styleProps;
|
|
1373
1358
|
};
|
|
1374
1359
|
|
|
1375
|
-
const _excluded$
|
|
1360
|
+
const _excluded$n = ["size"];
|
|
1376
1361
|
const sizeMapping = {
|
|
1377
1362
|
[SIZE_SMALL]: 'sm',
|
|
1378
1363
|
[SIZE_BODY]: 'md',
|
|
@@ -1382,7 +1367,7 @@ const Tabs = forwardRef$1((_ref, ref) => {
|
|
|
1382
1367
|
let {
|
|
1383
1368
|
size
|
|
1384
1369
|
} = _ref,
|
|
1385
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1370
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
1386
1371
|
return /*#__PURE__*/React__default.createElement(Tabs$1, _extends$6({
|
|
1387
1372
|
size: sizeMapping[size]
|
|
1388
1373
|
}, props, combineSizeWithVariant({
|
|
@@ -1425,65 +1410,1206 @@ var SvgChevronDown = function SvgChevronDown(props, ref) {
|
|
|
1425
1410
|
};
|
|
1426
1411
|
var ForwardRef$1 = /*#__PURE__*/forwardRef(SvgChevronDown);
|
|
1427
1412
|
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
children,
|
|
1432
|
-
label,
|
|
1433
|
-
inputId,
|
|
1434
|
-
helperText,
|
|
1435
|
-
errorMessage,
|
|
1436
|
-
isFieldset,
|
|
1437
|
-
isOptional,
|
|
1438
|
-
customRequiredText
|
|
1439
|
-
} = _ref,
|
|
1440
|
-
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
1441
|
-
return /*#__PURE__*/React__default.createElement(FormControl$2, _extends$6({}, props, {
|
|
1442
|
-
ref: ref,
|
|
1443
|
-
as: isFieldset ? 'fieldset' : 'div',
|
|
1444
|
-
borderWidth: "0"
|
|
1445
|
-
}), label && /*#__PURE__*/React__default.createElement(FormLabel, {
|
|
1446
|
-
color: "gray.600",
|
|
1447
|
-
fontWeight: "semibold",
|
|
1448
|
-
marginBottom: helperText ? 0 : 1,
|
|
1449
|
-
fontSize: "sm",
|
|
1450
|
-
htmlFor: inputId,
|
|
1451
|
-
as: isFieldset ? 'legend' : 'label',
|
|
1452
|
-
requiredIndicator: props !== null && props !== void 0 && props.isRequired && customRequiredText ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
1453
|
-
marginLeft: 1,
|
|
1454
|
-
as: "span",
|
|
1455
|
-
variant: "caption",
|
|
1456
|
-
color: "text.secondary.light"
|
|
1457
|
-
}, customRequiredText) : null,
|
|
1458
|
-
optionalIndicator: isOptional && !(props !== null && props !== void 0 && props.isRequired) ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
1459
|
-
marginLeft: 1,
|
|
1460
|
-
as: "span",
|
|
1461
|
-
variant: "caption",
|
|
1462
|
-
color: "text.secondary.light"
|
|
1463
|
-
}, "Optional") : null
|
|
1464
|
-
}, label), helperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
|
|
1465
|
-
color: "gray.600",
|
|
1466
|
-
marginBottom: 1,
|
|
1467
|
-
fontSize: "xs"
|
|
1468
|
-
}, helperText), children, /*#__PURE__*/React__default.createElement(FormErrorMessage, {
|
|
1469
|
-
color: "error",
|
|
1470
|
-
mt: 1,
|
|
1471
|
-
fontSize: "xs"
|
|
1472
|
-
}, errorMessage));
|
|
1473
|
-
});
|
|
1474
|
-
FormControl$1.propTypes = {
|
|
1475
|
-
inputId: PropTypes.string.isRequired,
|
|
1476
|
-
label: PropTypes.string,
|
|
1477
|
-
helperText: PropTypes.string,
|
|
1478
|
-
errorMessage: PropTypes.string,
|
|
1479
|
-
children: PropTypes.element,
|
|
1480
|
-
isFieldset: PropTypes.bool,
|
|
1481
|
-
isOptional: PropTypes.bool,
|
|
1482
|
-
isRequired: PropTypes.bool,
|
|
1483
|
-
customRequiredText: PropTypes.string
|
|
1484
|
-
};
|
|
1413
|
+
var jsxRuntime = {exports: {}};
|
|
1414
|
+
|
|
1415
|
+
var reactJsxRuntime_production_min = {};
|
|
1485
1416
|
|
|
1486
|
-
|
|
1417
|
+
/**
|
|
1418
|
+
* @license React
|
|
1419
|
+
* react-jsx-runtime.production.min.js
|
|
1420
|
+
*
|
|
1421
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1422
|
+
*
|
|
1423
|
+
* This source code is licensed under the MIT license found in the
|
|
1424
|
+
* LICENSE file in the root directory of this source tree.
|
|
1425
|
+
*/
|
|
1426
|
+
var hasRequiredReactJsxRuntime_production_min;
|
|
1427
|
+
function requireReactJsxRuntime_production_min() {
|
|
1428
|
+
if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
|
|
1429
|
+
hasRequiredReactJsxRuntime_production_min = 1;
|
|
1430
|
+
var f = React__default,
|
|
1431
|
+
k = Symbol.for("react.element"),
|
|
1432
|
+
l = Symbol.for("react.fragment"),
|
|
1433
|
+
m = Object.prototype.hasOwnProperty,
|
|
1434
|
+
n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
|
|
1435
|
+
p = {
|
|
1436
|
+
key: !0,
|
|
1437
|
+
ref: !0,
|
|
1438
|
+
__self: !0,
|
|
1439
|
+
__source: !0
|
|
1440
|
+
};
|
|
1441
|
+
function q(c, a, g) {
|
|
1442
|
+
var b,
|
|
1443
|
+
d = {},
|
|
1444
|
+
e = null,
|
|
1445
|
+
h = null;
|
|
1446
|
+
void 0 !== g && (e = "" + g);
|
|
1447
|
+
void 0 !== a.key && (e = "" + a.key);
|
|
1448
|
+
void 0 !== a.ref && (h = a.ref);
|
|
1449
|
+
for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
|
|
1450
|
+
if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
|
|
1451
|
+
return {
|
|
1452
|
+
$$typeof: k,
|
|
1453
|
+
type: c,
|
|
1454
|
+
key: e,
|
|
1455
|
+
ref: h,
|
|
1456
|
+
props: d,
|
|
1457
|
+
_owner: n.current
|
|
1458
|
+
};
|
|
1459
|
+
}
|
|
1460
|
+
reactJsxRuntime_production_min.Fragment = l;
|
|
1461
|
+
reactJsxRuntime_production_min.jsx = q;
|
|
1462
|
+
reactJsxRuntime_production_min.jsxs = q;
|
|
1463
|
+
return reactJsxRuntime_production_min;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
var reactJsxRuntime_development = {};
|
|
1467
|
+
|
|
1468
|
+
/**
|
|
1469
|
+
* @license React
|
|
1470
|
+
* react-jsx-runtime.development.js
|
|
1471
|
+
*
|
|
1472
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1473
|
+
*
|
|
1474
|
+
* This source code is licensed under the MIT license found in the
|
|
1475
|
+
* LICENSE file in the root directory of this source tree.
|
|
1476
|
+
*/
|
|
1477
|
+
var hasRequiredReactJsxRuntime_development;
|
|
1478
|
+
function requireReactJsxRuntime_development() {
|
|
1479
|
+
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
1480
|
+
hasRequiredReactJsxRuntime_development = 1;
|
|
1481
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1482
|
+
(function () {
|
|
1483
|
+
|
|
1484
|
+
var React = React__default;
|
|
1485
|
+
|
|
1486
|
+
// ATTENTION
|
|
1487
|
+
// When adding new symbols to this file,
|
|
1488
|
+
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
1489
|
+
// The Symbol used to tag the ReactElement-like types.
|
|
1490
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
1491
|
+
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
1492
|
+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
1493
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
1494
|
+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
1495
|
+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
1496
|
+
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
1497
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
1498
|
+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
1499
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
1500
|
+
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
1501
|
+
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
1502
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
1503
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
1504
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
1505
|
+
function getIteratorFn(maybeIterable) {
|
|
1506
|
+
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
1507
|
+
return null;
|
|
1508
|
+
}
|
|
1509
|
+
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
1510
|
+
if (typeof maybeIterator === 'function') {
|
|
1511
|
+
return maybeIterator;
|
|
1512
|
+
}
|
|
1513
|
+
return null;
|
|
1514
|
+
}
|
|
1515
|
+
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1516
|
+
function error(format) {
|
|
1517
|
+
{
|
|
1518
|
+
{
|
|
1519
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
1520
|
+
args[_key2 - 1] = arguments[_key2];
|
|
1521
|
+
}
|
|
1522
|
+
printWarning('error', format, args);
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
function printWarning(level, format, args) {
|
|
1527
|
+
// When changing this logic, you might want to also
|
|
1528
|
+
// update consoleWithStackDev.www.js as well.
|
|
1529
|
+
{
|
|
1530
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
1531
|
+
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
1532
|
+
if (stack !== '') {
|
|
1533
|
+
format += '%s';
|
|
1534
|
+
args = args.concat([stack]);
|
|
1535
|
+
} // eslint-disable-next-line react-internal/safe-string-coercion
|
|
1536
|
+
|
|
1537
|
+
var argsWithFormat = args.map(function (item) {
|
|
1538
|
+
return String(item);
|
|
1539
|
+
}); // Careful: RN currently depends on this prefix
|
|
1540
|
+
|
|
1541
|
+
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
1542
|
+
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
1543
|
+
// eslint-disable-next-line react-internal/no-production-logging
|
|
1544
|
+
|
|
1545
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
// -----------------------------------------------------------------------------
|
|
1550
|
+
|
|
1551
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
1552
|
+
var enableCacheElement = false;
|
|
1553
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
1554
|
+
|
|
1555
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
1556
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
1557
|
+
// issues in DEV builds.
|
|
1558
|
+
|
|
1559
|
+
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
1560
|
+
|
|
1561
|
+
var REACT_MODULE_REFERENCE;
|
|
1562
|
+
{
|
|
1563
|
+
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
1564
|
+
}
|
|
1565
|
+
function isValidElementType(type) {
|
|
1566
|
+
if (typeof type === 'string' || typeof type === 'function') {
|
|
1567
|
+
return true;
|
|
1568
|
+
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
1569
|
+
|
|
1570
|
+
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) {
|
|
1571
|
+
return true;
|
|
1572
|
+
}
|
|
1573
|
+
if (typeof type === 'object' && type !== null) {
|
|
1574
|
+
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 ||
|
|
1575
|
+
// This needs to include all possible module reference object
|
|
1576
|
+
// types supported by any Flight configuration anywhere since
|
|
1577
|
+
// we don't know which Flight build this will end up being used
|
|
1578
|
+
// with.
|
|
1579
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
1580
|
+
return true;
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
return false;
|
|
1584
|
+
}
|
|
1585
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
|
1586
|
+
var displayName = outerType.displayName;
|
|
1587
|
+
if (displayName) {
|
|
1588
|
+
return displayName;
|
|
1589
|
+
}
|
|
1590
|
+
var functionName = innerType.displayName || innerType.name || '';
|
|
1591
|
+
return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
1592
|
+
} // Keep in sync with react-reconciler/getComponentNameFromFiber
|
|
1593
|
+
|
|
1594
|
+
function getContextName(type) {
|
|
1595
|
+
return type.displayName || 'Context';
|
|
1596
|
+
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
|
|
1597
|
+
|
|
1598
|
+
function getComponentNameFromType(type) {
|
|
1599
|
+
if (type == null) {
|
|
1600
|
+
// Host root, text node or just invalid type.
|
|
1601
|
+
return null;
|
|
1602
|
+
}
|
|
1603
|
+
{
|
|
1604
|
+
if (typeof type.tag === 'number') {
|
|
1605
|
+
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
if (typeof type === 'function') {
|
|
1609
|
+
return type.displayName || type.name || null;
|
|
1610
|
+
}
|
|
1611
|
+
if (typeof type === 'string') {
|
|
1612
|
+
return type;
|
|
1613
|
+
}
|
|
1614
|
+
switch (type) {
|
|
1615
|
+
case REACT_FRAGMENT_TYPE:
|
|
1616
|
+
return 'Fragment';
|
|
1617
|
+
case REACT_PORTAL_TYPE:
|
|
1618
|
+
return 'Portal';
|
|
1619
|
+
case REACT_PROFILER_TYPE:
|
|
1620
|
+
return 'Profiler';
|
|
1621
|
+
case REACT_STRICT_MODE_TYPE:
|
|
1622
|
+
return 'StrictMode';
|
|
1623
|
+
case REACT_SUSPENSE_TYPE:
|
|
1624
|
+
return 'Suspense';
|
|
1625
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
1626
|
+
return 'SuspenseList';
|
|
1627
|
+
}
|
|
1628
|
+
if (typeof type === 'object') {
|
|
1629
|
+
switch (type.$$typeof) {
|
|
1630
|
+
case REACT_CONTEXT_TYPE:
|
|
1631
|
+
var context = type;
|
|
1632
|
+
return getContextName(context) + '.Consumer';
|
|
1633
|
+
case REACT_PROVIDER_TYPE:
|
|
1634
|
+
var provider = type;
|
|
1635
|
+
return getContextName(provider._context) + '.Provider';
|
|
1636
|
+
case REACT_FORWARD_REF_TYPE:
|
|
1637
|
+
return getWrappedName(type, type.render, 'ForwardRef');
|
|
1638
|
+
case REACT_MEMO_TYPE:
|
|
1639
|
+
var outerName = type.displayName || null;
|
|
1640
|
+
if (outerName !== null) {
|
|
1641
|
+
return outerName;
|
|
1642
|
+
}
|
|
1643
|
+
return getComponentNameFromType(type.type) || 'Memo';
|
|
1644
|
+
case REACT_LAZY_TYPE:
|
|
1645
|
+
{
|
|
1646
|
+
var lazyComponent = type;
|
|
1647
|
+
var payload = lazyComponent._payload;
|
|
1648
|
+
var init = lazyComponent._init;
|
|
1649
|
+
try {
|
|
1650
|
+
return getComponentNameFromType(init(payload));
|
|
1651
|
+
} catch (x) {
|
|
1652
|
+
return null;
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
// eslint-disable-next-line no-fallthrough
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
return null;
|
|
1660
|
+
}
|
|
1661
|
+
var assign = Object.assign;
|
|
1662
|
+
|
|
1663
|
+
// Helpers to patch console.logs to avoid logging during side-effect free
|
|
1664
|
+
// replaying on render function. This currently only patches the object
|
|
1665
|
+
// lazily which won't cover if the log function was extracted eagerly.
|
|
1666
|
+
// We could also eagerly patch the method.
|
|
1667
|
+
var disabledDepth = 0;
|
|
1668
|
+
var prevLog;
|
|
1669
|
+
var prevInfo;
|
|
1670
|
+
var prevWarn;
|
|
1671
|
+
var prevError;
|
|
1672
|
+
var prevGroup;
|
|
1673
|
+
var prevGroupCollapsed;
|
|
1674
|
+
var prevGroupEnd;
|
|
1675
|
+
function disabledLog() {}
|
|
1676
|
+
disabledLog.__reactDisabledLog = true;
|
|
1677
|
+
function disableLogs() {
|
|
1678
|
+
{
|
|
1679
|
+
if (disabledDepth === 0) {
|
|
1680
|
+
/* eslint-disable react-internal/no-production-logging */
|
|
1681
|
+
prevLog = console.log;
|
|
1682
|
+
prevInfo = console.info;
|
|
1683
|
+
prevWarn = console.warn;
|
|
1684
|
+
prevError = console.error;
|
|
1685
|
+
prevGroup = console.group;
|
|
1686
|
+
prevGroupCollapsed = console.groupCollapsed;
|
|
1687
|
+
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
|
|
1688
|
+
|
|
1689
|
+
var props = {
|
|
1690
|
+
configurable: true,
|
|
1691
|
+
enumerable: true,
|
|
1692
|
+
value: disabledLog,
|
|
1693
|
+
writable: true
|
|
1694
|
+
}; // $FlowFixMe Flow thinks console is immutable.
|
|
1695
|
+
|
|
1696
|
+
Object.defineProperties(console, {
|
|
1697
|
+
info: props,
|
|
1698
|
+
log: props,
|
|
1699
|
+
warn: props,
|
|
1700
|
+
error: props,
|
|
1701
|
+
group: props,
|
|
1702
|
+
groupCollapsed: props,
|
|
1703
|
+
groupEnd: props
|
|
1704
|
+
});
|
|
1705
|
+
/* eslint-enable react-internal/no-production-logging */
|
|
1706
|
+
}
|
|
1707
|
+
disabledDepth++;
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
function reenableLogs() {
|
|
1711
|
+
{
|
|
1712
|
+
disabledDepth--;
|
|
1713
|
+
if (disabledDepth === 0) {
|
|
1714
|
+
/* eslint-disable react-internal/no-production-logging */
|
|
1715
|
+
var props = {
|
|
1716
|
+
configurable: true,
|
|
1717
|
+
enumerable: true,
|
|
1718
|
+
writable: true
|
|
1719
|
+
}; // $FlowFixMe Flow thinks console is immutable.
|
|
1720
|
+
|
|
1721
|
+
Object.defineProperties(console, {
|
|
1722
|
+
log: assign({}, props, {
|
|
1723
|
+
value: prevLog
|
|
1724
|
+
}),
|
|
1725
|
+
info: assign({}, props, {
|
|
1726
|
+
value: prevInfo
|
|
1727
|
+
}),
|
|
1728
|
+
warn: assign({}, props, {
|
|
1729
|
+
value: prevWarn
|
|
1730
|
+
}),
|
|
1731
|
+
error: assign({}, props, {
|
|
1732
|
+
value: prevError
|
|
1733
|
+
}),
|
|
1734
|
+
group: assign({}, props, {
|
|
1735
|
+
value: prevGroup
|
|
1736
|
+
}),
|
|
1737
|
+
groupCollapsed: assign({}, props, {
|
|
1738
|
+
value: prevGroupCollapsed
|
|
1739
|
+
}),
|
|
1740
|
+
groupEnd: assign({}, props, {
|
|
1741
|
+
value: prevGroupEnd
|
|
1742
|
+
})
|
|
1743
|
+
});
|
|
1744
|
+
/* eslint-enable react-internal/no-production-logging */
|
|
1745
|
+
}
|
|
1746
|
+
if (disabledDepth < 0) {
|
|
1747
|
+
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
|
1752
|
+
var prefix;
|
|
1753
|
+
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
1754
|
+
{
|
|
1755
|
+
if (prefix === undefined) {
|
|
1756
|
+
// Extract the VM specific prefix used by each line.
|
|
1757
|
+
try {
|
|
1758
|
+
throw Error();
|
|
1759
|
+
} catch (x) {
|
|
1760
|
+
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
1761
|
+
prefix = match && match[1] || '';
|
|
1762
|
+
}
|
|
1763
|
+
} // We use the prefix to ensure our stacks line up with native stack frames.
|
|
1764
|
+
|
|
1765
|
+
return '\n' + prefix + name;
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
var reentry = false;
|
|
1769
|
+
var componentFrameCache;
|
|
1770
|
+
{
|
|
1771
|
+
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
|
|
1772
|
+
componentFrameCache = new PossiblyWeakMap();
|
|
1773
|
+
}
|
|
1774
|
+
function describeNativeComponentFrame(fn, construct) {
|
|
1775
|
+
// If something asked for a stack inside a fake render, it should get ignored.
|
|
1776
|
+
if (!fn || reentry) {
|
|
1777
|
+
return '';
|
|
1778
|
+
}
|
|
1779
|
+
{
|
|
1780
|
+
var frame = componentFrameCache.get(fn);
|
|
1781
|
+
if (frame !== undefined) {
|
|
1782
|
+
return frame;
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
var control;
|
|
1786
|
+
reentry = true;
|
|
1787
|
+
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
|
|
1788
|
+
|
|
1789
|
+
Error.prepareStackTrace = undefined;
|
|
1790
|
+
var previousDispatcher;
|
|
1791
|
+
{
|
|
1792
|
+
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
|
|
1793
|
+
// for warnings.
|
|
1794
|
+
|
|
1795
|
+
ReactCurrentDispatcher.current = null;
|
|
1796
|
+
disableLogs();
|
|
1797
|
+
}
|
|
1798
|
+
try {
|
|
1799
|
+
// This should throw.
|
|
1800
|
+
if (construct) {
|
|
1801
|
+
// Something should be setting the props in the constructor.
|
|
1802
|
+
var Fake = function () {
|
|
1803
|
+
throw Error();
|
|
1804
|
+
}; // $FlowFixMe
|
|
1805
|
+
|
|
1806
|
+
Object.defineProperty(Fake.prototype, 'props', {
|
|
1807
|
+
set: function () {
|
|
1808
|
+
// We use a throwing setter instead of frozen or non-writable props
|
|
1809
|
+
// because that won't throw in a non-strict mode function.
|
|
1810
|
+
throw Error();
|
|
1811
|
+
}
|
|
1812
|
+
});
|
|
1813
|
+
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
1814
|
+
// We construct a different control for this case to include any extra
|
|
1815
|
+
// frames added by the construct call.
|
|
1816
|
+
try {
|
|
1817
|
+
Reflect.construct(Fake, []);
|
|
1818
|
+
} catch (x) {
|
|
1819
|
+
control = x;
|
|
1820
|
+
}
|
|
1821
|
+
Reflect.construct(fn, [], Fake);
|
|
1822
|
+
} else {
|
|
1823
|
+
try {
|
|
1824
|
+
Fake.call();
|
|
1825
|
+
} catch (x) {
|
|
1826
|
+
control = x;
|
|
1827
|
+
}
|
|
1828
|
+
fn.call(Fake.prototype);
|
|
1829
|
+
}
|
|
1830
|
+
} else {
|
|
1831
|
+
try {
|
|
1832
|
+
throw Error();
|
|
1833
|
+
} catch (x) {
|
|
1834
|
+
control = x;
|
|
1835
|
+
}
|
|
1836
|
+
fn();
|
|
1837
|
+
}
|
|
1838
|
+
} catch (sample) {
|
|
1839
|
+
// This is inlined manually because closure doesn't do it for us.
|
|
1840
|
+
if (sample && control && typeof sample.stack === 'string') {
|
|
1841
|
+
// This extracts the first frame from the sample that isn't also in the control.
|
|
1842
|
+
// Skipping one frame that we assume is the frame that calls the two.
|
|
1843
|
+
var sampleLines = sample.stack.split('\n');
|
|
1844
|
+
var controlLines = control.stack.split('\n');
|
|
1845
|
+
var s = sampleLines.length - 1;
|
|
1846
|
+
var c = controlLines.length - 1;
|
|
1847
|
+
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
1848
|
+
// We expect at least one stack frame to be shared.
|
|
1849
|
+
// Typically this will be the root most one. However, stack frames may be
|
|
1850
|
+
// cut off due to maximum stack limits. In this case, one maybe cut off
|
|
1851
|
+
// earlier than the other. We assume that the sample is longer or the same
|
|
1852
|
+
// and there for cut off earlier. So we should find the root most frame in
|
|
1853
|
+
// the sample somewhere in the control.
|
|
1854
|
+
c--;
|
|
1855
|
+
}
|
|
1856
|
+
for (; s >= 1 && c >= 0; s--, c--) {
|
|
1857
|
+
// Next we find the first one that isn't the same which should be the
|
|
1858
|
+
// frame that called our sample function and the control.
|
|
1859
|
+
if (sampleLines[s] !== controlLines[c]) {
|
|
1860
|
+
// In V8, the first line is describing the message but other VMs don't.
|
|
1861
|
+
// If we're about to return the first line, and the control is also on the same
|
|
1862
|
+
// line, that's a pretty good indicator that our sample threw at same line as
|
|
1863
|
+
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
|
1864
|
+
// This can happen if you passed a class to function component, or non-function.
|
|
1865
|
+
if (s !== 1 || c !== 1) {
|
|
1866
|
+
do {
|
|
1867
|
+
s--;
|
|
1868
|
+
c--; // We may still have similar intermediate frames from the construct call.
|
|
1869
|
+
// The next one that isn't the same should be our match though.
|
|
1870
|
+
|
|
1871
|
+
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
1872
|
+
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
|
1873
|
+
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
|
|
1874
|
+
// but we have a user-provided "displayName"
|
|
1875
|
+
// splice it in to make the stack more readable.
|
|
1876
|
+
|
|
1877
|
+
if (fn.displayName && _frame.includes('<anonymous>')) {
|
|
1878
|
+
_frame = _frame.replace('<anonymous>', fn.displayName);
|
|
1879
|
+
}
|
|
1880
|
+
{
|
|
1881
|
+
if (typeof fn === 'function') {
|
|
1882
|
+
componentFrameCache.set(fn, _frame);
|
|
1883
|
+
}
|
|
1884
|
+
} // Return the line we found.
|
|
1885
|
+
|
|
1886
|
+
return _frame;
|
|
1887
|
+
}
|
|
1888
|
+
} while (s >= 1 && c >= 0);
|
|
1889
|
+
}
|
|
1890
|
+
break;
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
} finally {
|
|
1895
|
+
reentry = false;
|
|
1896
|
+
{
|
|
1897
|
+
ReactCurrentDispatcher.current = previousDispatcher;
|
|
1898
|
+
reenableLogs();
|
|
1899
|
+
}
|
|
1900
|
+
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
1901
|
+
} // Fallback to just using the name if we couldn't make it throw.
|
|
1902
|
+
|
|
1903
|
+
var name = fn ? fn.displayName || fn.name : '';
|
|
1904
|
+
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
|
1905
|
+
{
|
|
1906
|
+
if (typeof fn === 'function') {
|
|
1907
|
+
componentFrameCache.set(fn, syntheticFrame);
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
return syntheticFrame;
|
|
1911
|
+
}
|
|
1912
|
+
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
1913
|
+
{
|
|
1914
|
+
return describeNativeComponentFrame(fn, false);
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
function shouldConstruct(Component) {
|
|
1918
|
+
var prototype = Component.prototype;
|
|
1919
|
+
return !!(prototype && prototype.isReactComponent);
|
|
1920
|
+
}
|
|
1921
|
+
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
1922
|
+
if (type == null) {
|
|
1923
|
+
return '';
|
|
1924
|
+
}
|
|
1925
|
+
if (typeof type === 'function') {
|
|
1926
|
+
{
|
|
1927
|
+
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
if (typeof type === 'string') {
|
|
1931
|
+
return describeBuiltInComponentFrame(type);
|
|
1932
|
+
}
|
|
1933
|
+
switch (type) {
|
|
1934
|
+
case REACT_SUSPENSE_TYPE:
|
|
1935
|
+
return describeBuiltInComponentFrame('Suspense');
|
|
1936
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
1937
|
+
return describeBuiltInComponentFrame('SuspenseList');
|
|
1938
|
+
}
|
|
1939
|
+
if (typeof type === 'object') {
|
|
1940
|
+
switch (type.$$typeof) {
|
|
1941
|
+
case REACT_FORWARD_REF_TYPE:
|
|
1942
|
+
return describeFunctionComponentFrame(type.render);
|
|
1943
|
+
case REACT_MEMO_TYPE:
|
|
1944
|
+
// Memo may contain any component type so we recursively resolve it.
|
|
1945
|
+
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
1946
|
+
case REACT_LAZY_TYPE:
|
|
1947
|
+
{
|
|
1948
|
+
var lazyComponent = type;
|
|
1949
|
+
var payload = lazyComponent._payload;
|
|
1950
|
+
var init = lazyComponent._init;
|
|
1951
|
+
try {
|
|
1952
|
+
// Lazy may contain any component type so we recursively resolve it.
|
|
1953
|
+
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
1954
|
+
} catch (x) {}
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
return '';
|
|
1959
|
+
}
|
|
1960
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1961
|
+
var loggedTypeFailures = {};
|
|
1962
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
1963
|
+
function setCurrentlyValidatingElement(element) {
|
|
1964
|
+
{
|
|
1965
|
+
if (element) {
|
|
1966
|
+
var owner = element._owner;
|
|
1967
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
1968
|
+
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
1969
|
+
} else {
|
|
1970
|
+
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
1975
|
+
{
|
|
1976
|
+
// $FlowFixMe This is okay but Flow doesn't know it.
|
|
1977
|
+
var has = Function.call.bind(hasOwnProperty);
|
|
1978
|
+
for (var typeSpecName in typeSpecs) {
|
|
1979
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
1980
|
+
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
|
|
1981
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
1982
|
+
// After these have been cleaned up, we'll let them throw.
|
|
1983
|
+
|
|
1984
|
+
try {
|
|
1985
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
1986
|
+
// behavior as without this statement except with a better message.
|
|
1987
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
1988
|
+
// eslint-disable-next-line react-internal/prod-error-codes
|
|
1989
|
+
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`.');
|
|
1990
|
+
err.name = 'Invariant Violation';
|
|
1991
|
+
throw err;
|
|
1992
|
+
}
|
|
1993
|
+
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
|
1994
|
+
} catch (ex) {
|
|
1995
|
+
error$1 = ex;
|
|
1996
|
+
}
|
|
1997
|
+
if (error$1 && !(error$1 instanceof Error)) {
|
|
1998
|
+
setCurrentlyValidatingElement(element);
|
|
1999
|
+
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);
|
|
2000
|
+
setCurrentlyValidatingElement(null);
|
|
2001
|
+
}
|
|
2002
|
+
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
2003
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
2004
|
+
// same error.
|
|
2005
|
+
loggedTypeFailures[error$1.message] = true;
|
|
2006
|
+
setCurrentlyValidatingElement(element);
|
|
2007
|
+
error('Failed %s type: %s', location, error$1.message);
|
|
2008
|
+
setCurrentlyValidatingElement(null);
|
|
2009
|
+
}
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
|
2015
|
+
|
|
2016
|
+
function isArray(a) {
|
|
2017
|
+
return isArrayImpl(a);
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
/*
|
|
2021
|
+
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
|
|
2022
|
+
* and Temporal.* types. See https://github.com/facebook/react/pull/22064.
|
|
2023
|
+
*
|
|
2024
|
+
* The functions in this module will throw an easier-to-understand,
|
|
2025
|
+
* easier-to-debug exception with a clear errors message message explaining the
|
|
2026
|
+
* problem. (Instead of a confusing exception thrown inside the implementation
|
|
2027
|
+
* of the `value` object).
|
|
2028
|
+
*/
|
|
2029
|
+
// $FlowFixMe only called in DEV, so void return is not possible.
|
|
2030
|
+
function typeName(value) {
|
|
2031
|
+
{
|
|
2032
|
+
// toStringTag is needed for namespaced types like Temporal.Instant
|
|
2033
|
+
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
|
|
2034
|
+
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
|
|
2035
|
+
return type;
|
|
2036
|
+
}
|
|
2037
|
+
} // $FlowFixMe only called in DEV, so void return is not possible.
|
|
2038
|
+
|
|
2039
|
+
function willCoercionThrow(value) {
|
|
2040
|
+
{
|
|
2041
|
+
try {
|
|
2042
|
+
testStringCoercion(value);
|
|
2043
|
+
return false;
|
|
2044
|
+
} catch (e) {
|
|
2045
|
+
return true;
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
function testStringCoercion(value) {
|
|
2050
|
+
// If you ended up here by following an exception call stack, here's what's
|
|
2051
|
+
// happened: you supplied an object or symbol value to React (as a prop, key,
|
|
2052
|
+
// DOM attribute, CSS property, string ref, etc.) and when React tried to
|
|
2053
|
+
// coerce it to a string using `'' + value`, an exception was thrown.
|
|
2054
|
+
//
|
|
2055
|
+
// The most common types that will cause this exception are `Symbol` instances
|
|
2056
|
+
// and Temporal objects like `Temporal.Instant`. But any object that has a
|
|
2057
|
+
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
|
|
2058
|
+
// exception. (Library authors do this to prevent users from using built-in
|
|
2059
|
+
// numeric operators like `+` or comparison operators like `>=` because custom
|
|
2060
|
+
// methods are needed to perform accurate arithmetic or comparison.)
|
|
2061
|
+
//
|
|
2062
|
+
// To fix the problem, coerce this object or symbol value to a string before
|
|
2063
|
+
// passing it to React. The most reliable way is usually `String(value)`.
|
|
2064
|
+
//
|
|
2065
|
+
// To find which value is throwing, check the browser or debugger console.
|
|
2066
|
+
// Before this exception was thrown, there should be `console.error` output
|
|
2067
|
+
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
|
|
2068
|
+
// problem and how that type was used: key, atrribute, input value prop, etc.
|
|
2069
|
+
// In most cases, this console output also shows the component and its
|
|
2070
|
+
// ancestor components where the exception happened.
|
|
2071
|
+
//
|
|
2072
|
+
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
2073
|
+
return '' + value;
|
|
2074
|
+
}
|
|
2075
|
+
function checkKeyStringCoercion(value) {
|
|
2076
|
+
{
|
|
2077
|
+
if (willCoercionThrow(value)) {
|
|
2078
|
+
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
|
|
2079
|
+
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
2084
|
+
var RESERVED_PROPS = {
|
|
2085
|
+
key: true,
|
|
2086
|
+
ref: true,
|
|
2087
|
+
__self: true,
|
|
2088
|
+
__source: true
|
|
2089
|
+
};
|
|
2090
|
+
var specialPropKeyWarningShown;
|
|
2091
|
+
var specialPropRefWarningShown;
|
|
2092
|
+
var didWarnAboutStringRefs;
|
|
2093
|
+
{
|
|
2094
|
+
didWarnAboutStringRefs = {};
|
|
2095
|
+
}
|
|
2096
|
+
function hasValidRef(config) {
|
|
2097
|
+
{
|
|
2098
|
+
if (hasOwnProperty.call(config, 'ref')) {
|
|
2099
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
|
2100
|
+
if (getter && getter.isReactWarning) {
|
|
2101
|
+
return false;
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
return config.ref !== undefined;
|
|
2106
|
+
}
|
|
2107
|
+
function hasValidKey(config) {
|
|
2108
|
+
{
|
|
2109
|
+
if (hasOwnProperty.call(config, 'key')) {
|
|
2110
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
|
2111
|
+
if (getter && getter.isReactWarning) {
|
|
2112
|
+
return false;
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
return config.key !== undefined;
|
|
2117
|
+
}
|
|
2118
|
+
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
2119
|
+
{
|
|
2120
|
+
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
|
2121
|
+
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
2122
|
+
if (!didWarnAboutStringRefs[componentName]) {
|
|
2123
|
+
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
|
|
2124
|
+
didWarnAboutStringRefs[componentName] = true;
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
2130
|
+
{
|
|
2131
|
+
var warnAboutAccessingKey = function () {
|
|
2132
|
+
if (!specialPropKeyWarningShown) {
|
|
2133
|
+
specialPropKeyWarningShown = true;
|
|
2134
|
+
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);
|
|
2135
|
+
}
|
|
2136
|
+
};
|
|
2137
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
2138
|
+
Object.defineProperty(props, 'key', {
|
|
2139
|
+
get: warnAboutAccessingKey,
|
|
2140
|
+
configurable: true
|
|
2141
|
+
});
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
function defineRefPropWarningGetter(props, displayName) {
|
|
2145
|
+
{
|
|
2146
|
+
var warnAboutAccessingRef = function () {
|
|
2147
|
+
if (!specialPropRefWarningShown) {
|
|
2148
|
+
specialPropRefWarningShown = true;
|
|
2149
|
+
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);
|
|
2150
|
+
}
|
|
2151
|
+
};
|
|
2152
|
+
warnAboutAccessingRef.isReactWarning = true;
|
|
2153
|
+
Object.defineProperty(props, 'ref', {
|
|
2154
|
+
get: warnAboutAccessingRef,
|
|
2155
|
+
configurable: true
|
|
2156
|
+
});
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
/**
|
|
2160
|
+
* Factory method to create a new React element. This no longer adheres to
|
|
2161
|
+
* the class pattern, so do not use new to call it. Also, instanceof check
|
|
2162
|
+
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
|
2163
|
+
* if something is a React Element.
|
|
2164
|
+
*
|
|
2165
|
+
* @param {*} type
|
|
2166
|
+
* @param {*} props
|
|
2167
|
+
* @param {*} key
|
|
2168
|
+
* @param {string|object} ref
|
|
2169
|
+
* @param {*} owner
|
|
2170
|
+
* @param {*} self A *temporary* helper to detect places where `this` is
|
|
2171
|
+
* different from the `owner` when React.createElement is called, so that we
|
|
2172
|
+
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
|
2173
|
+
* functions, and as long as `this` and owner are the same, there will be no
|
|
2174
|
+
* change in behavior.
|
|
2175
|
+
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
|
2176
|
+
* indicating filename, line number, and/or other information.
|
|
2177
|
+
* @internal
|
|
2178
|
+
*/
|
|
2179
|
+
|
|
2180
|
+
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
2181
|
+
var element = {
|
|
2182
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
2183
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
2184
|
+
// Built-in properties that belong on the element
|
|
2185
|
+
type: type,
|
|
2186
|
+
key: key,
|
|
2187
|
+
ref: ref,
|
|
2188
|
+
props: props,
|
|
2189
|
+
// Record the component responsible for creating this element.
|
|
2190
|
+
_owner: owner
|
|
2191
|
+
};
|
|
2192
|
+
{
|
|
2193
|
+
// The validation flag is currently mutative. We put it on
|
|
2194
|
+
// an external backing store so that we can freeze the whole object.
|
|
2195
|
+
// This can be replaced with a WeakMap once they are implemented in
|
|
2196
|
+
// commonly used development environments.
|
|
2197
|
+
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
|
2198
|
+
// the validation flag non-enumerable (where possible, which should
|
|
2199
|
+
// include every environment we run tests in), so the test framework
|
|
2200
|
+
// ignores it.
|
|
2201
|
+
|
|
2202
|
+
Object.defineProperty(element._store, 'validated', {
|
|
2203
|
+
configurable: false,
|
|
2204
|
+
enumerable: false,
|
|
2205
|
+
writable: true,
|
|
2206
|
+
value: false
|
|
2207
|
+
}); // self and source are DEV only properties.
|
|
2208
|
+
|
|
2209
|
+
Object.defineProperty(element, '_self', {
|
|
2210
|
+
configurable: false,
|
|
2211
|
+
enumerable: false,
|
|
2212
|
+
writable: false,
|
|
2213
|
+
value: self
|
|
2214
|
+
}); // Two elements created in two different places should be considered
|
|
2215
|
+
// equal for testing purposes and therefore we hide it from enumeration.
|
|
2216
|
+
|
|
2217
|
+
Object.defineProperty(element, '_source', {
|
|
2218
|
+
configurable: false,
|
|
2219
|
+
enumerable: false,
|
|
2220
|
+
writable: false,
|
|
2221
|
+
value: source
|
|
2222
|
+
});
|
|
2223
|
+
if (Object.freeze) {
|
|
2224
|
+
Object.freeze(element.props);
|
|
2225
|
+
Object.freeze(element);
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
return element;
|
|
2229
|
+
};
|
|
2230
|
+
/**
|
|
2231
|
+
* https://github.com/reactjs/rfcs/pull/107
|
|
2232
|
+
* @param {*} type
|
|
2233
|
+
* @param {object} props
|
|
2234
|
+
* @param {string} key
|
|
2235
|
+
*/
|
|
2236
|
+
|
|
2237
|
+
function jsxDEV(type, config, maybeKey, source, self) {
|
|
2238
|
+
{
|
|
2239
|
+
var propName; // Reserved names are extracted
|
|
2240
|
+
|
|
2241
|
+
var props = {};
|
|
2242
|
+
var key = null;
|
|
2243
|
+
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
|
2244
|
+
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
|
2245
|
+
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
|
2246
|
+
// but as an intermediary step, we will use jsxDEV for everything except
|
|
2247
|
+
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
|
2248
|
+
// key is explicitly declared to be undefined or not.
|
|
2249
|
+
|
|
2250
|
+
if (maybeKey !== undefined) {
|
|
2251
|
+
{
|
|
2252
|
+
checkKeyStringCoercion(maybeKey);
|
|
2253
|
+
}
|
|
2254
|
+
key = '' + maybeKey;
|
|
2255
|
+
}
|
|
2256
|
+
if (hasValidKey(config)) {
|
|
2257
|
+
{
|
|
2258
|
+
checkKeyStringCoercion(config.key);
|
|
2259
|
+
}
|
|
2260
|
+
key = '' + config.key;
|
|
2261
|
+
}
|
|
2262
|
+
if (hasValidRef(config)) {
|
|
2263
|
+
ref = config.ref;
|
|
2264
|
+
warnIfStringRefCannotBeAutoConverted(config, self);
|
|
2265
|
+
} // Remaining properties are added to a new props object
|
|
2266
|
+
|
|
2267
|
+
for (propName in config) {
|
|
2268
|
+
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
2269
|
+
props[propName] = config[propName];
|
|
2270
|
+
}
|
|
2271
|
+
} // Resolve default props
|
|
2272
|
+
|
|
2273
|
+
if (type && type.defaultProps) {
|
|
2274
|
+
var defaultProps = type.defaultProps;
|
|
2275
|
+
for (propName in defaultProps) {
|
|
2276
|
+
if (props[propName] === undefined) {
|
|
2277
|
+
props[propName] = defaultProps[propName];
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
if (key || ref) {
|
|
2282
|
+
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
2283
|
+
if (key) {
|
|
2284
|
+
defineKeyPropWarningGetter(props, displayName);
|
|
2285
|
+
}
|
|
2286
|
+
if (ref) {
|
|
2287
|
+
defineRefPropWarningGetter(props, displayName);
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
2294
|
+
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
2295
|
+
function setCurrentlyValidatingElement$1(element) {
|
|
2296
|
+
{
|
|
2297
|
+
if (element) {
|
|
2298
|
+
var owner = element._owner;
|
|
2299
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
2300
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
2301
|
+
} else {
|
|
2302
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2306
|
+
var propTypesMisspellWarningShown;
|
|
2307
|
+
{
|
|
2308
|
+
propTypesMisspellWarningShown = false;
|
|
2309
|
+
}
|
|
2310
|
+
/**
|
|
2311
|
+
* Verifies the object is a ReactElement.
|
|
2312
|
+
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
2313
|
+
* @param {?object} object
|
|
2314
|
+
* @return {boolean} True if `object` is a ReactElement.
|
|
2315
|
+
* @final
|
|
2316
|
+
*/
|
|
2317
|
+
|
|
2318
|
+
function isValidElement(object) {
|
|
2319
|
+
{
|
|
2320
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
function getDeclarationErrorAddendum() {
|
|
2324
|
+
{
|
|
2325
|
+
if (ReactCurrentOwner$1.current) {
|
|
2326
|
+
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
2327
|
+
if (name) {
|
|
2328
|
+
return '\n\nCheck the render method of `' + name + '`.';
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
return '';
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
function getSourceInfoErrorAddendum(source) {
|
|
2335
|
+
{
|
|
2336
|
+
return '';
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
/**
|
|
2340
|
+
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
2341
|
+
* object keys are not valid. This allows us to keep track of children between
|
|
2342
|
+
* updates.
|
|
2343
|
+
*/
|
|
2344
|
+
|
|
2345
|
+
var ownerHasKeyUseWarning = {};
|
|
2346
|
+
function getCurrentComponentErrorInfo(parentType) {
|
|
2347
|
+
{
|
|
2348
|
+
var info = getDeclarationErrorAddendum();
|
|
2349
|
+
if (!info) {
|
|
2350
|
+
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
|
2351
|
+
if (parentName) {
|
|
2352
|
+
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
return info;
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
/**
|
|
2359
|
+
* Warn if the element doesn't have an explicit key assigned to it.
|
|
2360
|
+
* This element is in an array. The array could grow and shrink or be
|
|
2361
|
+
* reordered. All children that haven't already been validated are required to
|
|
2362
|
+
* have a "key" property assigned to it. Error statuses are cached so a warning
|
|
2363
|
+
* will only be shown once.
|
|
2364
|
+
*
|
|
2365
|
+
* @internal
|
|
2366
|
+
* @param {ReactElement} element Element that requires a key.
|
|
2367
|
+
* @param {*} parentType element's parent's type.
|
|
2368
|
+
*/
|
|
2369
|
+
|
|
2370
|
+
function validateExplicitKey(element, parentType) {
|
|
2371
|
+
{
|
|
2372
|
+
if (!element._store || element._store.validated || element.key != null) {
|
|
2373
|
+
return;
|
|
2374
|
+
}
|
|
2375
|
+
element._store.validated = true;
|
|
2376
|
+
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
2377
|
+
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
2378
|
+
return;
|
|
2379
|
+
}
|
|
2380
|
+
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
|
2381
|
+
// property, it may be the creator of the child that's responsible for
|
|
2382
|
+
// assigning it a key.
|
|
2383
|
+
|
|
2384
|
+
var childOwner = '';
|
|
2385
|
+
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
|
2386
|
+
// Give the component that originally created this child.
|
|
2387
|
+
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
2388
|
+
}
|
|
2389
|
+
setCurrentlyValidatingElement$1(element);
|
|
2390
|
+
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);
|
|
2391
|
+
setCurrentlyValidatingElement$1(null);
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
/**
|
|
2395
|
+
* Ensure that every element either is passed in a static location, in an
|
|
2396
|
+
* array with an explicit keys property defined, or in an object literal
|
|
2397
|
+
* with valid key property.
|
|
2398
|
+
*
|
|
2399
|
+
* @internal
|
|
2400
|
+
* @param {ReactNode} node Statically passed child of any type.
|
|
2401
|
+
* @param {*} parentType node's parent's type.
|
|
2402
|
+
*/
|
|
2403
|
+
|
|
2404
|
+
function validateChildKeys(node, parentType) {
|
|
2405
|
+
{
|
|
2406
|
+
if (typeof node !== 'object') {
|
|
2407
|
+
return;
|
|
2408
|
+
}
|
|
2409
|
+
if (isArray(node)) {
|
|
2410
|
+
for (var i = 0; i < node.length; i++) {
|
|
2411
|
+
var child = node[i];
|
|
2412
|
+
if (isValidElement(child)) {
|
|
2413
|
+
validateExplicitKey(child, parentType);
|
|
2414
|
+
}
|
|
2415
|
+
}
|
|
2416
|
+
} else if (isValidElement(node)) {
|
|
2417
|
+
// This element was passed in a valid location.
|
|
2418
|
+
if (node._store) {
|
|
2419
|
+
node._store.validated = true;
|
|
2420
|
+
}
|
|
2421
|
+
} else if (node) {
|
|
2422
|
+
var iteratorFn = getIteratorFn(node);
|
|
2423
|
+
if (typeof iteratorFn === 'function') {
|
|
2424
|
+
// Entry iterators used to provide implicit keys,
|
|
2425
|
+
// but now we print a separate warning for them later.
|
|
2426
|
+
if (iteratorFn !== node.entries) {
|
|
2427
|
+
var iterator = iteratorFn.call(node);
|
|
2428
|
+
var step;
|
|
2429
|
+
while (!(step = iterator.next()).done) {
|
|
2430
|
+
if (isValidElement(step.value)) {
|
|
2431
|
+
validateExplicitKey(step.value, parentType);
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
/**
|
|
2440
|
+
* Given an element, validate that its props follow the propTypes definition,
|
|
2441
|
+
* provided by the type.
|
|
2442
|
+
*
|
|
2443
|
+
* @param {ReactElement} element
|
|
2444
|
+
*/
|
|
2445
|
+
|
|
2446
|
+
function validatePropTypes(element) {
|
|
2447
|
+
{
|
|
2448
|
+
var type = element.type;
|
|
2449
|
+
if (type === null || type === undefined || typeof type === 'string') {
|
|
2450
|
+
return;
|
|
2451
|
+
}
|
|
2452
|
+
var propTypes;
|
|
2453
|
+
if (typeof type === 'function') {
|
|
2454
|
+
propTypes = type.propTypes;
|
|
2455
|
+
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE ||
|
|
2456
|
+
// Note: Memo only checks outer props here.
|
|
2457
|
+
// Inner props are checked in the reconciler.
|
|
2458
|
+
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
2459
|
+
propTypes = type.propTypes;
|
|
2460
|
+
} else {
|
|
2461
|
+
return;
|
|
2462
|
+
}
|
|
2463
|
+
if (propTypes) {
|
|
2464
|
+
// Intentionally inside to avoid triggering lazy initializers:
|
|
2465
|
+
var name = getComponentNameFromType(type);
|
|
2466
|
+
checkPropTypes(propTypes, element.props, 'prop', name, element);
|
|
2467
|
+
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
2468
|
+
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
|
|
2469
|
+
|
|
2470
|
+
var _name = getComponentNameFromType(type);
|
|
2471
|
+
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
|
2472
|
+
}
|
|
2473
|
+
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
|
|
2474
|
+
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
/**
|
|
2479
|
+
* Given a fragment, validate that it can only be provided with fragment props
|
|
2480
|
+
* @param {ReactElement} fragment
|
|
2481
|
+
*/
|
|
2482
|
+
|
|
2483
|
+
function validateFragmentProps(fragment) {
|
|
2484
|
+
{
|
|
2485
|
+
var keys = Object.keys(fragment.props);
|
|
2486
|
+
for (var i = 0; i < keys.length; i++) {
|
|
2487
|
+
var key = keys[i];
|
|
2488
|
+
if (key !== 'children' && key !== 'key') {
|
|
2489
|
+
setCurrentlyValidatingElement$1(fragment);
|
|
2490
|
+
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
|
2491
|
+
setCurrentlyValidatingElement$1(null);
|
|
2492
|
+
break;
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
if (fragment.ref !== null) {
|
|
2496
|
+
setCurrentlyValidatingElement$1(fragment);
|
|
2497
|
+
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
|
2498
|
+
setCurrentlyValidatingElement$1(null);
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
2503
|
+
{
|
|
2504
|
+
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
|
|
2505
|
+
// succeed and there will likely be errors in render.
|
|
2506
|
+
|
|
2507
|
+
if (!validType) {
|
|
2508
|
+
var info = '';
|
|
2509
|
+
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
2510
|
+
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.";
|
|
2511
|
+
}
|
|
2512
|
+
var sourceInfo = getSourceInfoErrorAddendum();
|
|
2513
|
+
if (sourceInfo) {
|
|
2514
|
+
info += sourceInfo;
|
|
2515
|
+
} else {
|
|
2516
|
+
info += getDeclarationErrorAddendum();
|
|
2517
|
+
}
|
|
2518
|
+
var typeString;
|
|
2519
|
+
if (type === null) {
|
|
2520
|
+
typeString = 'null';
|
|
2521
|
+
} else if (isArray(type)) {
|
|
2522
|
+
typeString = 'array';
|
|
2523
|
+
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
2524
|
+
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
|
|
2525
|
+
info = ' Did you accidentally export a JSX literal instead of a component?';
|
|
2526
|
+
} else {
|
|
2527
|
+
typeString = typeof type;
|
|
2528
|
+
}
|
|
2529
|
+
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);
|
|
2530
|
+
}
|
|
2531
|
+
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
|
|
2532
|
+
// TODO: Drop this when these are no longer allowed as the type argument.
|
|
2533
|
+
|
|
2534
|
+
if (element == null) {
|
|
2535
|
+
return element;
|
|
2536
|
+
} // Skip key warning if the type isn't valid since our key validation logic
|
|
2537
|
+
// doesn't expect a non-string/function type and can throw confusing errors.
|
|
2538
|
+
// We don't want exception behavior to differ between dev and prod.
|
|
2539
|
+
// (Rendering will throw with a helpful message and as soon as the type is
|
|
2540
|
+
// fixed, the key warnings will appear.)
|
|
2541
|
+
|
|
2542
|
+
if (validType) {
|
|
2543
|
+
var children = props.children;
|
|
2544
|
+
if (children !== undefined) {
|
|
2545
|
+
if (isStaticChildren) {
|
|
2546
|
+
if (isArray(children)) {
|
|
2547
|
+
for (var i = 0; i < children.length; i++) {
|
|
2548
|
+
validateChildKeys(children[i], type);
|
|
2549
|
+
}
|
|
2550
|
+
if (Object.freeze) {
|
|
2551
|
+
Object.freeze(children);
|
|
2552
|
+
}
|
|
2553
|
+
} else {
|
|
2554
|
+
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.');
|
|
2555
|
+
}
|
|
2556
|
+
} else {
|
|
2557
|
+
validateChildKeys(children, type);
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
}
|
|
2561
|
+
if (type === REACT_FRAGMENT_TYPE) {
|
|
2562
|
+
validateFragmentProps(element);
|
|
2563
|
+
} else {
|
|
2564
|
+
validatePropTypes(element);
|
|
2565
|
+
}
|
|
2566
|
+
return element;
|
|
2567
|
+
}
|
|
2568
|
+
} // These two functions exist to still get child warnings in dev
|
|
2569
|
+
// even with the prod transform. This means that jsxDEV is purely
|
|
2570
|
+
// opt-in behavior for better messages but that we won't stop
|
|
2571
|
+
// giving you warnings if you use production apis.
|
|
2572
|
+
|
|
2573
|
+
function jsxWithValidationStatic(type, props, key) {
|
|
2574
|
+
{
|
|
2575
|
+
return jsxWithValidation(type, props, key, true);
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2578
|
+
function jsxWithValidationDynamic(type, props, key) {
|
|
2579
|
+
{
|
|
2580
|
+
return jsxWithValidation(type, props, key, false);
|
|
2581
|
+
}
|
|
2582
|
+
}
|
|
2583
|
+
var jsx = jsxWithValidationDynamic; // we may want to special case jsxs internally to take advantage of static children.
|
|
2584
|
+
// for now we can ship identical prod functions
|
|
2585
|
+
|
|
2586
|
+
var jsxs = jsxWithValidationStatic;
|
|
2587
|
+
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
2588
|
+
reactJsxRuntime_development.jsx = jsx;
|
|
2589
|
+
reactJsxRuntime_development.jsxs = jsxs;
|
|
2590
|
+
})();
|
|
2591
|
+
}
|
|
2592
|
+
return reactJsxRuntime_development;
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
var hasRequiredJsxRuntime;
|
|
2596
|
+
function requireJsxRuntime() {
|
|
2597
|
+
if (hasRequiredJsxRuntime) return jsxRuntime.exports;
|
|
2598
|
+
hasRequiredJsxRuntime = 1;
|
|
2599
|
+
if (process.env.NODE_ENV === 'production') {
|
|
2600
|
+
jsxRuntime.exports = requireReactJsxRuntime_production_min();
|
|
2601
|
+
} else {
|
|
2602
|
+
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
2603
|
+
}
|
|
2604
|
+
return jsxRuntime.exports;
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
var jsxRuntimeExports = requireJsxRuntime();
|
|
2608
|
+
|
|
2609
|
+
const FormControl$1 = forwardRef(({ children, label, inputId, helperText, errorMessage, isFieldset, isOptional, customRequiredText, ...props }, ref) => (jsxRuntimeExports.jsxs(FormControl$2, { ...props, ref: ref, as: isFieldset ? 'fieldset' : 'div', borderWidth: "0", children: [label && (jsxRuntimeExports.jsx(FormLabel, { color: "gray.600", fontWeight: "semibold", marginBottom: helperText ? 0 : 1, fontSize: "sm", htmlFor: inputId, as: isFieldset ? 'legend' : 'label', requiredIndicator: props?.isRequired && customRequiredText ? (jsxRuntimeExports.jsx(Text$1, { marginLeft: 1, as: "span", variant: "caption", color: "text.secondary.light", children: customRequiredText })) : null, optionalIndicator: isOptional && !props?.isRequired ? (jsxRuntimeExports.jsx(Text$1, { marginLeft: 1, as: "span", variant: "caption", color: "text.secondary.light", children: "Optional" })) : null, children: label })), helperText && (jsxRuntimeExports.jsx(FormHelperText, { color: "gray.600", marginBottom: 1, fontSize: "xs", children: helperText })), children, jsxRuntimeExports.jsx(FormErrorMessage, { color: "error", mt: 1, fontSize: "xs", children: errorMessage })] })));
|
|
2610
|
+
FormControl$1.displayName = 'FormControl';
|
|
2611
|
+
|
|
2612
|
+
const _excluded$m = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional"];
|
|
1487
2613
|
const Select$1 = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
1488
2614
|
let {
|
|
1489
2615
|
label,
|
|
@@ -1494,7 +2620,7 @@ const Select$1 = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1494
2620
|
isRequired,
|
|
1495
2621
|
isOptional
|
|
1496
2622
|
} = _ref,
|
|
1497
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2623
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
1498
2624
|
const classes = cn({
|
|
1499
2625
|
'FormElement-contains-error': isInvalid
|
|
1500
2626
|
});
|
|
@@ -1529,7 +2655,7 @@ Select$1.propTypes = {
|
|
|
1529
2655
|
isOptional: PropTypes.bool
|
|
1530
2656
|
};
|
|
1531
2657
|
|
|
1532
|
-
const _excluded$
|
|
2658
|
+
const _excluded$l = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired"];
|
|
1533
2659
|
const Switch = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
1534
2660
|
let {
|
|
1535
2661
|
label,
|
|
@@ -1539,7 +2665,7 @@ const Switch = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1539
2665
|
isDisabled,
|
|
1540
2666
|
isRequired
|
|
1541
2667
|
} = _ref,
|
|
1542
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2668
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
1543
2669
|
const classes = cn({
|
|
1544
2670
|
'FormElement-contains-error': isInvalid
|
|
1545
2671
|
});
|
|
@@ -1687,13 +2813,13 @@ const combineAsWithVariant = _ref => {
|
|
|
1687
2813
|
return styleProps;
|
|
1688
2814
|
};
|
|
1689
2815
|
|
|
1690
|
-
const _excluded$
|
|
2816
|
+
const _excluded$k = ["as", "variant"];
|
|
1691
2817
|
const Text = forwardRef$1((_ref, ref) => {
|
|
1692
2818
|
let {
|
|
1693
2819
|
as,
|
|
1694
2820
|
variant
|
|
1695
2821
|
} = _ref,
|
|
1696
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2822
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
1697
2823
|
return /*#__PURE__*/React__default.createElement(Text$1, _extends$6({
|
|
1698
2824
|
variant: variant,
|
|
1699
2825
|
as: as
|
|
@@ -1729,12 +2855,12 @@ const compactStyles = {
|
|
|
1729
2855
|
gap: 4
|
|
1730
2856
|
};
|
|
1731
2857
|
|
|
1732
|
-
const _excluded$
|
|
2858
|
+
const _excluded$j = ["isCompact"];
|
|
1733
2859
|
const Grid = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
1734
2860
|
let {
|
|
1735
2861
|
isCompact
|
|
1736
2862
|
} = _ref,
|
|
1737
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2863
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
1738
2864
|
return /*#__PURE__*/React__default.createElement(Grid$1, _extends$6({}, baseStyles, isCompact && compactStyles, props, {
|
|
1739
2865
|
ref: ref
|
|
1740
2866
|
}));
|
|
@@ -1758,7 +2884,7 @@ const GridItem = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__def
|
|
|
1758
2884
|
ref: ref
|
|
1759
2885
|
})));
|
|
1760
2886
|
|
|
1761
|
-
const _excluded$
|
|
2887
|
+
const _excluded$i = ["type"];
|
|
1762
2888
|
const unorderedProps = {
|
|
1763
2889
|
as: 'ul',
|
|
1764
2890
|
styleType: 'disc'
|
|
@@ -1794,7 +2920,7 @@ const List = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1794
2920
|
let {
|
|
1795
2921
|
type
|
|
1796
2922
|
} = _ref,
|
|
1797
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2923
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
1798
2924
|
return /*#__PURE__*/React__default.createElement(List$1, _extends$6({}, getListProps(type), props, {
|
|
1799
2925
|
ref: ref
|
|
1800
2926
|
}));
|
|
@@ -1812,110 +2938,63 @@ List.propTypes = {
|
|
|
1812
2938
|
|
|
1813
2939
|
const spinnerStyles = theme$2.components.Spinner;
|
|
1814
2940
|
const SIZE_MAP = {
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
2941
|
+
xs: 'xs',
|
|
2942
|
+
sm: 'sm',
|
|
2943
|
+
md: 'md',
|
|
2944
|
+
lg: 'lg',
|
|
2945
|
+
xl: 'xl',
|
|
2946
|
+
'2xl': '2xl',
|
|
2947
|
+
'3xl': '3xl',
|
|
2948
|
+
'4xl': '4xl',
|
|
2949
|
+
'5xl': '5xl',
|
|
2950
|
+
'6xl': '6xl',
|
|
2951
|
+
'7xl': '7xl',
|
|
2952
|
+
'8xl': '8xl',
|
|
2953
|
+
'9xl': '9xl',
|
|
2954
|
+
'10xl': '10xl',
|
|
1829
2955
|
};
|
|
1830
2956
|
const sizes$5 = merge(spinnerStyles.sizes, {
|
|
1831
|
-
|
|
1832
|
-
w: '
|
|
1833
|
-
h: '
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
w: '
|
|
1837
|
-
h: '
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
w: '6rem',
|
|
1841
|
-
h: '6rem'
|
|
1842
|
-
},
|
|
1843
|
-
[SIZE_MAP['5xl']]: {
|
|
1844
|
-
w: '7rem',
|
|
1845
|
-
h: '7rem'
|
|
1846
|
-
},
|
|
1847
|
-
[SIZE_MAP['6xl']]: {
|
|
1848
|
-
w: '8rem',
|
|
1849
|
-
h: '8rem'
|
|
1850
|
-
},
|
|
1851
|
-
[SIZE_MAP['7xl']]: {
|
|
1852
|
-
w: '9rem',
|
|
1853
|
-
h: '9rem'
|
|
1854
|
-
},
|
|
1855
|
-
[SIZE_MAP['8xl']]: {
|
|
1856
|
-
w: '10rem',
|
|
1857
|
-
h: '10rem'
|
|
1858
|
-
},
|
|
1859
|
-
[SIZE_MAP['9xl']]: {
|
|
1860
|
-
w: '11rem',
|
|
1861
|
-
h: '11rem'
|
|
1862
|
-
},
|
|
1863
|
-
[SIZE_MAP['10xl']]: {
|
|
1864
|
-
w: '12rem',
|
|
1865
|
-
h: '12rem'
|
|
1866
|
-
}
|
|
2957
|
+
[SIZE_MAP['2xl']]: { w: '4rem', h: '4rem' },
|
|
2958
|
+
[SIZE_MAP['3xl']]: { w: '5rem', h: '5rem' },
|
|
2959
|
+
[SIZE_MAP['4xl']]: { w: '6rem', h: '6rem' },
|
|
2960
|
+
[SIZE_MAP['5xl']]: { w: '7rem', h: '7rem' },
|
|
2961
|
+
[SIZE_MAP['6xl']]: { w: '8rem', h: '8rem' },
|
|
2962
|
+
[SIZE_MAP['7xl']]: { w: '9rem', h: '9rem' },
|
|
2963
|
+
[SIZE_MAP['8xl']]: { w: '10rem', h: '10rem' },
|
|
2964
|
+
[SIZE_MAP['9xl']]: { w: '11rem', h: '11rem' },
|
|
2965
|
+
[SIZE_MAP['10xl']]: { w: '12rem', h: '12rem' },
|
|
1867
2966
|
});
|
|
1868
2967
|
const thicknesses = {
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
2968
|
+
[SIZE_MAP.xl]: 3,
|
|
2969
|
+
[SIZE_MAP['2xl']]: 4,
|
|
2970
|
+
[SIZE_MAP['3xl']]: 5,
|
|
2971
|
+
[SIZE_MAP['4xl']]: 6,
|
|
2972
|
+
[SIZE_MAP['5xl']]: 7,
|
|
2973
|
+
[SIZE_MAP['6xl']]: 8,
|
|
2974
|
+
[SIZE_MAP['7xl']]: 9,
|
|
2975
|
+
[SIZE_MAP['8xl']]: 10,
|
|
2976
|
+
[SIZE_MAP['9xl']]: 11,
|
|
2977
|
+
[SIZE_MAP['10xl']]: 12,
|
|
1879
2978
|
};
|
|
1880
2979
|
const defaultProps$8 = {
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
2980
|
+
speed: '2s',
|
|
2981
|
+
size: SIZE_MAP['2xl'],
|
|
2982
|
+
thickness: thicknesses[SIZE_MAP['2xl']],
|
|
1884
2983
|
};
|
|
1885
2984
|
var Spinner_styles = {
|
|
1886
|
-
|
|
1887
|
-
|
|
2985
|
+
sizes: sizes$5,
|
|
2986
|
+
defaultProps: defaultProps$8,
|
|
1888
2987
|
};
|
|
1889
2988
|
|
|
1890
|
-
const
|
|
1891
|
-
const
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
const thicknessString = thickness ? "".concat(thickness, "px") : thicknesses[size] ? "".concat(thicknesses[size], "px") : '2px';
|
|
1898
|
-
return /*#__PURE__*/React__default.createElement(Spinner$1, _extends$6({
|
|
1899
|
-
ref: ref,
|
|
1900
|
-
role: "status",
|
|
1901
|
-
color: "primary.default",
|
|
1902
|
-
emptyColor: "gray.medium",
|
|
1903
|
-
thickness: thicknessString,
|
|
1904
|
-
size: size || SIZE_MAP['2xl']
|
|
1905
|
-
}, props));
|
|
2989
|
+
const Spinner = forwardRef(({ size, thickness, ...props }, ref) => {
|
|
2990
|
+
const thicknessString = thickness
|
|
2991
|
+
? `${thickness}px`
|
|
2992
|
+
: thicknesses[size]
|
|
2993
|
+
? `${thicknesses[size]}px`
|
|
2994
|
+
: '2px';
|
|
2995
|
+
return (jsxRuntimeExports.jsx(Spinner$1, { ref: ref, role: "status", color: "primary.default", emptyColor: "gray.medium", thickness: thicknessString, size: size || SIZE_MAP['2xl'], ...props }));
|
|
1906
2996
|
});
|
|
1907
|
-
Spinner.
|
|
1908
|
-
/** The main fill color of the spinner */
|
|
1909
|
-
color: PropTypes.string,
|
|
1910
|
-
/** The diameter of the spinner ring in pixels */
|
|
1911
|
-
thickness: PropTypes.number,
|
|
1912
|
-
/** The empty color of the spinner */
|
|
1913
|
-
emptyColor: PropTypes.string,
|
|
1914
|
-
/** The size of the spinner */
|
|
1915
|
-
size: PropTypes.oneOf(Object.keys(SIZE_MAP)),
|
|
1916
|
-
/** The speed of the spinner, ex: 10s, 0.1s, 250ms */
|
|
1917
|
-
speed: PropTypes.string
|
|
1918
|
-
};
|
|
2997
|
+
Spinner.displayName = 'Spinner';
|
|
1919
2998
|
|
|
1920
2999
|
const baseStyle$d = {
|
|
1921
3000
|
lineHeight: 1.5,
|
|
@@ -1982,56 +3061,117 @@ Heading.propTypes = {
|
|
|
1982
3061
|
};
|
|
1983
3062
|
|
|
1984
3063
|
const styles = {
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
3064
|
+
px: 4,
|
|
3065
|
+
mx: 'auto',
|
|
3066
|
+
maxW: {
|
|
3067
|
+
base: 'container.base',
|
|
3068
|
+
tablet: 'container.tablet',
|
|
3069
|
+
desktop: 'container.desktop',
|
|
3070
|
+
},
|
|
1992
3071
|
};
|
|
1993
3072
|
|
|
1994
|
-
const Container =
|
|
1995
|
-
|
|
1996
|
-
})));
|
|
3073
|
+
const Container = forwardRef((props, ref) => (jsxRuntimeExports.jsx(Container$1, { ...styles, ...props, ref: ref })));
|
|
3074
|
+
Container.displayName = 'Container';
|
|
1997
3075
|
|
|
1998
3076
|
const global = {
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
};
|
|
2020
|
-
const Fonts = () => /*#__PURE__*/React__default.createElement(Global, {
|
|
2021
|
-
styles: "\n @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');\n /* latin-ext */\n @font-face {\n font-family: \"Plus Jakarta Sans\", sans-serif;\n font-style: normal;\n font-weight: 700;\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin-ext */\n @font-face {\n font-family: \"Plus Jakarta Sans\", sans-serif;\n font-style: normal;\n font-weight: 600;\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin-ext */\n @font-face {\n font-family: \"Plus Jakarta Sans\", sans-serif;\n font-style: normal;\n font-weight: 400;\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin-ext */\n @font-face {\n font-family: \"Plus Jakarta Sans\", sans-serif;\n font-style: normal;\n font-weight: 300;\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n "
|
|
2022
|
-
});
|
|
2023
|
-
const LegacyOverrides = _ref => {
|
|
2024
|
-
let {
|
|
2025
|
-
useLegacyOverrides
|
|
2026
|
-
} = _ref;
|
|
2027
|
-
return useLegacyOverrides ? /*#__PURE__*/React__default.createElement(Global, {
|
|
2028
|
-
styles: "\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n font-weight: ".concat(fontWeights.semibold, ";\n }\n\n .heading-sm {\n font-size: ").concat(fontSizes.base, ";\n }\n .heading-md {\n font-size: ").concat(fontSizes.md, ";\n }\n .heading-lg {\n font-size: ").concat(fontSizes['5xl'], ";\n }\n\n p {\n line-height: 1.5;\n }\n\n a {\n outline: none;\n text-align: left;\n color: ").concat(colors.primary.default, ";\n text-decoration: none;\n\n &:active,\n &:focus {\n outline: none;\n }\n\n &:hover {\n color: ").concat(colors.primary['700'], ";\n }\n }\n\n small {\n font-size: ").concat(fontSizes.xs, ";\n }\n\n ")
|
|
2029
|
-
}) : null;
|
|
2030
|
-
};
|
|
2031
|
-
LegacyOverrides.propTypes = {
|
|
2032
|
-
/** If true, this will use the old `spothero-html` base styles */
|
|
2033
|
-
useLegacyOverrides: PropTypes.bool
|
|
3077
|
+
'html, body': {
|
|
3078
|
+
color: 'text.primary.light',
|
|
3079
|
+
},
|
|
3080
|
+
// By default, Chakra has all svgs set to 'display: block',
|
|
3081
|
+
// this breaks the layout of some older components, so now
|
|
3082
|
+
// we set all svgs to 'display: inline-block;' and only set
|
|
3083
|
+
// 'display: block;' on the components that need it
|
|
3084
|
+
// (as of 3/9/2021 only the v1 AutoSuggestInput component
|
|
3085
|
+
// needed this update)
|
|
3086
|
+
svg: {
|
|
3087
|
+
display: 'inline-block',
|
|
3088
|
+
},
|
|
3089
|
+
// starting in Chakra version 2 they introduced this isolation style that messes with dropdowns being able to appear on top of elements underneath them
|
|
3090
|
+
'.chakra-input__group': {
|
|
3091
|
+
isolation: 'auto !important',
|
|
3092
|
+
},
|
|
3093
|
+
// Starting in Chakra version 2 they have incorporated normalize.css which may resulf in some unexpected default styles
|
|
3094
|
+
'h1, h2, h3, h4, h5, h6': {
|
|
3095
|
+
margin: 0,
|
|
3096
|
+
},
|
|
2034
3097
|
};
|
|
3098
|
+
const Fonts = () => (jsxRuntimeExports.jsx(Global, { styles: `
|
|
3099
|
+
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');
|
|
3100
|
+
/* latin-ext */
|
|
3101
|
+
@font-face {
|
|
3102
|
+
font-family: "Plus Jakarta Sans", sans-serif;
|
|
3103
|
+
font-style: normal;
|
|
3104
|
+
font-weight: 700;
|
|
3105
|
+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
3106
|
+
}
|
|
3107
|
+
/* latin-ext */
|
|
3108
|
+
@font-face {
|
|
3109
|
+
font-family: "Plus Jakarta Sans", sans-serif;
|
|
3110
|
+
font-style: normal;
|
|
3111
|
+
font-weight: 600;
|
|
3112
|
+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
3113
|
+
}
|
|
3114
|
+
/* latin-ext */
|
|
3115
|
+
@font-face {
|
|
3116
|
+
font-family: "Plus Jakarta Sans", sans-serif;
|
|
3117
|
+
font-style: normal;
|
|
3118
|
+
font-weight: 400;
|
|
3119
|
+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
3120
|
+
}
|
|
3121
|
+
/* latin-ext */
|
|
3122
|
+
@font-face {
|
|
3123
|
+
font-family: "Plus Jakarta Sans", sans-serif;
|
|
3124
|
+
font-style: normal;
|
|
3125
|
+
font-weight: 300;
|
|
3126
|
+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
3127
|
+
}
|
|
3128
|
+
` }));
|
|
3129
|
+
const LegacyOverrides = ({ useLegacyOverrides }) => useLegacyOverrides ? (jsxRuntimeExports.jsx(Global, { styles: `
|
|
3130
|
+
h1,
|
|
3131
|
+
h2,
|
|
3132
|
+
h3,
|
|
3133
|
+
h4,
|
|
3134
|
+
h5,
|
|
3135
|
+
h6 {
|
|
3136
|
+
margin-top: 0;
|
|
3137
|
+
font-weight: ${fontWeights.semibold};
|
|
3138
|
+
}
|
|
3139
|
+
|
|
3140
|
+
.heading-sm {
|
|
3141
|
+
font-size: ${fontSizes.base};
|
|
3142
|
+
}
|
|
3143
|
+
.heading-md {
|
|
3144
|
+
font-size: ${fontSizes.md};
|
|
3145
|
+
}
|
|
3146
|
+
.heading-lg {
|
|
3147
|
+
font-size: ${fontSizes['5xl']};
|
|
3148
|
+
}
|
|
3149
|
+
|
|
3150
|
+
p {
|
|
3151
|
+
line-height: 1.5;
|
|
3152
|
+
}
|
|
3153
|
+
|
|
3154
|
+
a {
|
|
3155
|
+
outline: none;
|
|
3156
|
+
text-align: left;
|
|
3157
|
+
color: ${colors.primary.default};
|
|
3158
|
+
text-decoration: none;
|
|
3159
|
+
|
|
3160
|
+
&:active,
|
|
3161
|
+
&:focus {
|
|
3162
|
+
outline: none;
|
|
3163
|
+
}
|
|
3164
|
+
|
|
3165
|
+
&:hover {
|
|
3166
|
+
color: ${colors.primary['700']};
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
3169
|
+
|
|
3170
|
+
small {
|
|
3171
|
+
font-size: ${fontSizes.xs};
|
|
3172
|
+
}
|
|
3173
|
+
|
|
3174
|
+
` })) : null;
|
|
2035
3175
|
|
|
2036
3176
|
const item = {
|
|
2037
3177
|
mb: 2
|
|
@@ -2234,15 +3374,15 @@ const theme$1 = extendTheme({
|
|
|
2234
3374
|
});
|
|
2235
3375
|
|
|
2236
3376
|
const colorScheme = {
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
3377
|
+
low: {
|
|
3378
|
+
borderColor: 'gray.100',
|
|
3379
|
+
},
|
|
3380
|
+
medium: {
|
|
3381
|
+
borderColor: 'gray.200',
|
|
3382
|
+
},
|
|
2243
3383
|
};
|
|
2244
3384
|
var Divider_styles = merge(theme$2.components.Divider, {
|
|
2245
|
-
|
|
3385
|
+
colorScheme,
|
|
2246
3386
|
});
|
|
2247
3387
|
|
|
2248
3388
|
const baseStyle$8 = {
|
|
@@ -2824,12 +3964,12 @@ var index$1 = merge(theme$2.components.Badge, {
|
|
|
2824
3964
|
defaultProps: defaultProps$2
|
|
2825
3965
|
});
|
|
2826
3966
|
|
|
2827
|
-
const _excluded$
|
|
3967
|
+
const _excluded$h = ["hasFooter"];
|
|
2828
3968
|
const body = _ref => {
|
|
2829
3969
|
let {
|
|
2830
3970
|
hasFooter
|
|
2831
3971
|
} = _ref;
|
|
2832
|
-
_objectWithoutProperties(_ref, _excluded$
|
|
3972
|
+
_objectWithoutProperties(_ref, _excluded$h);
|
|
2833
3973
|
return {
|
|
2834
3974
|
overflowY: 'auto',
|
|
2835
3975
|
padding: 6,
|
|
@@ -3227,26 +4367,23 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
3227
4367
|
|
|
3228
4368
|
// use this to extend the base theme of chakra, this adds on top of what is defined in baseConfig
|
|
3229
4369
|
const extendedTheme = {
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
let baseSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 16;
|
|
3237
|
-
return !rem ? 0 : "".concat(baseSize * Number(rem.replace('rem', '')));
|
|
3238
|
-
}
|
|
4370
|
+
initialColorMode: 'light',
|
|
4371
|
+
useSystemColorMode: false,
|
|
4372
|
+
styles: {
|
|
4373
|
+
global,
|
|
4374
|
+
},
|
|
4375
|
+
remToPixels: (rem, baseSize = 16) => !rem ? 0 : `${baseSize * Number(rem.replace('rem', ''))}`,
|
|
3239
4376
|
};
|
|
3240
|
-
|
|
3241
4377
|
// use this to override base themes from Chakra
|
|
3242
|
-
const baseConfig =
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
4378
|
+
const baseConfig = {
|
|
4379
|
+
...theme$2,
|
|
4380
|
+
breakpoints,
|
|
4381
|
+
...base,
|
|
4382
|
+
components,
|
|
4383
|
+
};
|
|
3247
4384
|
var THEME = extendTheme(extendedTheme, baseConfig);
|
|
3248
4385
|
|
|
3249
|
-
const _excluded$
|
|
4386
|
+
const _excluded$g = ["theme", "useLegacyOverrides", "disableExternalFonts", "children"];
|
|
3250
4387
|
const ThemeProvider = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
3251
4388
|
let {
|
|
3252
4389
|
theme,
|
|
@@ -3254,7 +4391,7 @@ const ThemeProvider = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3254
4391
|
disableExternalFonts = false,
|
|
3255
4392
|
children
|
|
3256
4393
|
} = _ref,
|
|
3257
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4394
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
3258
4395
|
return /*#__PURE__*/React__default.createElement(ChakraProvider, _extends$6({}, props, {
|
|
3259
4396
|
ref: ref,
|
|
3260
4397
|
theme: merge({}, THEME, theme)
|
|
@@ -3273,17 +4410,10 @@ ThemeProvider.propTypes = {
|
|
|
3273
4410
|
theme: PropTypes.object
|
|
3274
4411
|
};
|
|
3275
4412
|
|
|
3276
|
-
const Card =
|
|
3277
|
-
|
|
3278
|
-
padding: 4,
|
|
3279
|
-
bgColor: "background.white",
|
|
3280
|
-
borderRadius: "lg",
|
|
3281
|
-
boxShadow: "md"
|
|
3282
|
-
}, props, {
|
|
3283
|
-
ref: ref
|
|
3284
|
-
})));
|
|
4413
|
+
const Card = forwardRef((props, ref) => (jsxRuntimeExports.jsx(Box, { position: "relative", padding: 4, bgColor: "background.white", borderRadius: "lg", boxShadow: "md", ...props, ref: ref })));
|
|
4414
|
+
Card.displayName = 'Card';
|
|
3285
4415
|
|
|
3286
|
-
const _excluded$
|
|
4416
|
+
const _excluded$f = ["isSSR", "cloudinaryImageId", "cloudinaryTemplate", "cloudinaryCloudName", "htmlWidth", "htmlHeight", "quality", "lazyLoad"];
|
|
3287
4417
|
|
|
3288
4418
|
// This code is copied from fe-utils https://github.com/spothero/fe-monorepo/blob/a0e06482e74dcb5502b21c5fbf0a679752a1f8ce/packages/fe-utils/src/environment/environment.js#L391
|
|
3289
4419
|
function isHighDensityDisplay() {
|
|
@@ -3322,7 +4452,7 @@ const Image = _ref2 => {
|
|
|
3322
4452
|
quality,
|
|
3323
4453
|
lazyLoad
|
|
3324
4454
|
} = _ref2,
|
|
3325
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded$
|
|
4455
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded$f);
|
|
3326
4456
|
const hasValidCloudinarySrc = (cloudinaryImageId || cloudinaryTemplate) && Boolean(htmlWidth) && Boolean(htmlHeight);
|
|
3327
4457
|
let cloudinarySrc;
|
|
3328
4458
|
if (hasValidCloudinarySrc) {
|
|
@@ -3372,7 +4502,7 @@ Image.defaultProps = {
|
|
|
3372
4502
|
cloudinaryCloudName: 'spothero'
|
|
3373
4503
|
};
|
|
3374
4504
|
|
|
3375
|
-
const _excluded$
|
|
4505
|
+
const _excluded$e = ["color", "loaderBackgroundColor", "isInfinite", "size", "thickness", "trackColor", "value"];
|
|
3376
4506
|
const Loader = _ref => {
|
|
3377
4507
|
let {
|
|
3378
4508
|
color = 'success',
|
|
@@ -3383,7 +4513,7 @@ const Loader = _ref => {
|
|
|
3383
4513
|
trackColor = 'gray.medium',
|
|
3384
4514
|
value = 0
|
|
3385
4515
|
} = _ref,
|
|
3386
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4516
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
3387
4517
|
/* -------------------------------------------------------------------- *\
|
|
3388
4518
|
Note: Since most of the props for this component control multiple
|
|
3389
4519
|
styles at a time, it was decided that it made the most sense to set
|
|
@@ -3438,12 +4568,12 @@ Loader.propTypes = {
|
|
|
3438
4568
|
value: PropTypes.number
|
|
3439
4569
|
};
|
|
3440
4570
|
|
|
3441
|
-
const _excluded$
|
|
4571
|
+
const _excluded$d = ["isRounded"];
|
|
3442
4572
|
const Progress = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
3443
4573
|
let {
|
|
3444
4574
|
isRounded
|
|
3445
4575
|
} = _ref,
|
|
3446
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4576
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
3447
4577
|
// Passing `isRounded` in as a prop throws a 'React does not recognize the X prop on a DOM element' error. Passing `isRounded` through `sx` instead, allows for the prop to be utilized by the theme without being set on the DOM element, avoiding the error.
|
|
3448
4578
|
return /*#__PURE__*/React__default.createElement(Progress$1, _extends$6({
|
|
3449
4579
|
ref: ref,
|
|
@@ -3487,7 +4617,7 @@ Progress.defaultProps = {
|
|
|
3487
4617
|
variant: 'solid'
|
|
3488
4618
|
};
|
|
3489
4619
|
|
|
3490
|
-
const _excluded$
|
|
4620
|
+
const _excluded$c = ["defaultChecked", "isChecked", "isDisabled", "value", "helperText", "children", "size"];
|
|
3491
4621
|
const Checkbox = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
3492
4622
|
let {
|
|
3493
4623
|
defaultChecked,
|
|
@@ -3498,7 +4628,7 @@ const Checkbox = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3498
4628
|
children,
|
|
3499
4629
|
size = 'md'
|
|
3500
4630
|
} = _ref,
|
|
3501
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4631
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
3502
4632
|
const helperTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
3503
4633
|
return /*#__PURE__*/React__default.createElement(Checkbox$1, _extends$6({
|
|
3504
4634
|
ref: ref,
|
|
@@ -3524,7 +4654,7 @@ Checkbox.propTypes = {
|
|
|
3524
4654
|
size: PropTypes.oneOf(['sm', 'md', 'lg'])
|
|
3525
4655
|
};
|
|
3526
4656
|
|
|
3527
|
-
const _excluded$
|
|
4657
|
+
const _excluded$b = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "customRequiredText"];
|
|
3528
4658
|
const Input$1 = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
3529
4659
|
let {
|
|
3530
4660
|
label,
|
|
@@ -3536,7 +4666,7 @@ const Input$1 = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3536
4666
|
isOptional,
|
|
3537
4667
|
customRequiredText
|
|
3538
4668
|
} = _ref,
|
|
3539
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4669
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
3540
4670
|
const classes = cn({
|
|
3541
4671
|
'FormElement-contains-error': isInvalid
|
|
3542
4672
|
});
|
|
@@ -3567,7 +4697,7 @@ Input$1.propTypes = {
|
|
|
3567
4697
|
customRequiredText: PropTypes.string
|
|
3568
4698
|
};
|
|
3569
4699
|
|
|
3570
|
-
const _excluded$
|
|
4700
|
+
const _excluded$a = ["label", "helperText", "errorMessage", "id", "children", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles"];
|
|
3571
4701
|
|
|
3572
4702
|
// No clue how to move these into the style file so just co-located to keep from slowing down
|
|
3573
4703
|
// Chakra V2 will heavily impact this component
|
|
@@ -3691,7 +4821,7 @@ const FormControl = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3691
4821
|
rightElementStyles,
|
|
3692
4822
|
leftElementStyles
|
|
3693
4823
|
} = _ref,
|
|
3694
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4824
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
3695
4825
|
return /*#__PURE__*/React__default.createElement(FormControl$2, _extends$6({}, props, {
|
|
3696
4826
|
ref: ref
|
|
3697
4827
|
}, controlStyles), /*#__PURE__*/React__default.createElement(InputGroup, null, leftElement && /*#__PURE__*/React__default.createElement(InputLeftElement, _extends$6({
|
|
@@ -3733,7 +4863,7 @@ FormControl.propTypes = {
|
|
|
3733
4863
|
isInvalid: PropTypes.bool
|
|
3734
4864
|
};
|
|
3735
4865
|
|
|
3736
|
-
const _excluded$
|
|
4866
|
+
const _excluded$9 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "placeholder"];
|
|
3737
4867
|
|
|
3738
4868
|
/**
|
|
3739
4869
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -3754,7 +4884,7 @@ const Input = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3754
4884
|
leftElementStyles,
|
|
3755
4885
|
placeholder = ' '
|
|
3756
4886
|
} = _ref,
|
|
3757
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4887
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
3758
4888
|
const classes = cn({
|
|
3759
4889
|
'FormElement-contains-error': isInvalid
|
|
3760
4890
|
}); //Historic carry over
|
|
@@ -3797,7 +4927,7 @@ Input.propTypes = {
|
|
|
3797
4927
|
leftElementStyles: PropTypes.object
|
|
3798
4928
|
};
|
|
3799
4929
|
|
|
3800
|
-
const _excluded$
|
|
4930
|
+
const _excluded$8 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "formControlStyles"];
|
|
3801
4931
|
|
|
3802
4932
|
//For select left is static arrow,
|
|
3803
4933
|
/**
|
|
@@ -3821,7 +4951,7 @@ const Select = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3821
4951
|
leftElementStyles,
|
|
3822
4952
|
formControlStyles
|
|
3823
4953
|
} = _ref,
|
|
3824
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4954
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
3825
4955
|
const classes = cn({
|
|
3826
4956
|
'FormElement-contains-error': isInvalid
|
|
3827
4957
|
});
|
|
@@ -3862,7 +4992,7 @@ Select.propTypes = {
|
|
|
3862
4992
|
rightElementStyles: PropTypes.object
|
|
3863
4993
|
};
|
|
3864
4994
|
|
|
3865
|
-
const _excluded$
|
|
4995
|
+
const _excluded$7 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isHighlighted", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
|
|
3866
4996
|
|
|
3867
4997
|
/**
|
|
3868
4998
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -3886,7 +5016,7 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3886
5016
|
leftElementStyles,
|
|
3887
5017
|
buttonValue
|
|
3888
5018
|
} = _ref,
|
|
3889
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5019
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
3890
5020
|
const classes = cn({
|
|
3891
5021
|
'FormElement-contains-error': isInvalid
|
|
3892
5022
|
}); //Historic carry over
|
|
@@ -4130,7 +5260,7 @@ AutoSuggestSelect$1.propTypes = {
|
|
|
4130
5260
|
leftElementStyles: PropTypes.object
|
|
4131
5261
|
};
|
|
4132
5262
|
|
|
4133
|
-
const _excluded$
|
|
5263
|
+
const _excluded$6 = ["defaultChecked", "isChecked", "isDisabled", "value", "helperText", "children", "size"];
|
|
4134
5264
|
const Radio = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
4135
5265
|
let {
|
|
4136
5266
|
defaultChecked,
|
|
@@ -4141,7 +5271,7 @@ const Radio = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4141
5271
|
children,
|
|
4142
5272
|
size = 'md'
|
|
4143
5273
|
} = _ref,
|
|
4144
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5274
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
4145
5275
|
const helperTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
4146
5276
|
return /*#__PURE__*/React__default.createElement(Radio$1, _extends$6({
|
|
4147
5277
|
ref: ref,
|
|
@@ -4166,7 +5296,7 @@ Radio.propTypes = {
|
|
|
4166
5296
|
size: PropTypes.oneOf(['sm', 'md', 'lg'])
|
|
4167
5297
|
};
|
|
4168
5298
|
|
|
4169
|
-
const _excluded$
|
|
5299
|
+
const _excluded$5 = ["label", "errorMessage", "defaultValue", "isDisabled", "isInvalid", "isRequired", "name", "onChange", "value", "children", "direction"];
|
|
4170
5300
|
const RadioGroup = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
4171
5301
|
let {
|
|
4172
5302
|
label,
|
|
@@ -4181,7 +5311,7 @@ const RadioGroup = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4181
5311
|
children,
|
|
4182
5312
|
direction
|
|
4183
5313
|
} = _ref,
|
|
4184
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5314
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
4185
5315
|
return /*#__PURE__*/React__default.createElement(FormControl$1, {
|
|
4186
5316
|
isInvalid: isInvalid,
|
|
4187
5317
|
isDisabled: isDisabled,
|
|
@@ -4216,7 +5346,7 @@ RadioGroup.propTypes = {
|
|
|
4216
5346
|
direction: PropTypes.oneOf(['row', 'column'])
|
|
4217
5347
|
};
|
|
4218
5348
|
|
|
4219
|
-
const _excluded$
|
|
5349
|
+
const _excluded$4 = ["isChecked", "isDisabled", "value", "helperText", "expandableChildren", "defaultChecked", "isRadio", "label", "isExpandable", "size", "expandableChildrenStyles", "topChild", "expandableContentKey"];
|
|
4220
5350
|
const SelectionCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
4221
5351
|
let {
|
|
4222
5352
|
isChecked,
|
|
@@ -4233,7 +5363,7 @@ const SelectionCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4233
5363
|
topChild,
|
|
4234
5364
|
expandableContentKey = 'selection-card-content'
|
|
4235
5365
|
} = _ref,
|
|
4236
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5366
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
4237
5367
|
const Component = isRadio ? Radio : Checkbox;
|
|
4238
5368
|
const expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
4239
5369
|
const hasExpandableContent = isExpandable && isChecked && expandableChildren;
|
|
@@ -4315,29 +5445,10 @@ SelectionCard.propTypes = {
|
|
|
4315
5445
|
expandableContentKey: PropTypes.string
|
|
4316
5446
|
};
|
|
4317
5447
|
|
|
4318
|
-
const
|
|
4319
|
-
|
|
4320
|
-
let {
|
|
4321
|
-
variant,
|
|
4322
|
-
colorScheme: borderColor
|
|
4323
|
-
} = _ref,
|
|
4324
|
-
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
4325
|
-
return /*#__PURE__*/React__default.createElement(Divider$1, _extends$6({}, colorScheme[borderColor], {
|
|
4326
|
-
variant: variant
|
|
4327
|
-
}, props, {
|
|
4328
|
-
ref: ref
|
|
4329
|
-
}));
|
|
5448
|
+
const Divider = forwardRef(({ variant = 'solid', colorScheme: borderColor = 'medium', ...props }, ref) => {
|
|
5449
|
+
return (jsxRuntimeExports.jsx(Divider$1, { ...colorScheme[borderColor], variant: variant, ...props, ref: ref }));
|
|
4330
5450
|
});
|
|
4331
|
-
Divider.
|
|
4332
|
-
/** Color scheme used */
|
|
4333
|
-
colorScheme: PropTypes.oneOf(['low', 'medium']),
|
|
4334
|
-
/** The styling that will be applied to the HR tag */
|
|
4335
|
-
variant: PropTypes.oneOf(['solid', 'dashed'])
|
|
4336
|
-
};
|
|
4337
|
-
Divider.defaultProps = {
|
|
4338
|
-
variant: 'solid',
|
|
4339
|
-
colorScheme: 'medium'
|
|
4340
|
-
};
|
|
5451
|
+
Divider.displayName = 'Divider';
|
|
4341
5452
|
|
|
4342
5453
|
const _excluded$3 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "customRequiredText"];
|
|
4343
5454
|
const Textarea = /*#__PURE__*/forwardRef((_ref, ref) => {
|