@spothero/ui 25.4.0 → 25.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +1992 -693
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +251 -0
- package/dist/index.esm.js +1990 -693
- 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 +13 -11
package/dist/index.cjs.js
CHANGED
|
@@ -10,8 +10,8 @@ var template = require('lodash/template');
|
|
|
10
10
|
var cn = require('classnames');
|
|
11
11
|
var AsyncSelect = require('react-select/async');
|
|
12
12
|
var framerMotion = require('framer-motion');
|
|
13
|
+
var Select$2 = require('react-select');
|
|
13
14
|
var Creatable = require('react-select/creatable');
|
|
14
|
-
var reactSelect = require('react-select');
|
|
15
15
|
|
|
16
16
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
17
|
|
|
@@ -39,6 +39,7 @@ var merge__default = /*#__PURE__*/_interopDefault(merge);
|
|
|
39
39
|
var template__default = /*#__PURE__*/_interopDefault(template);
|
|
40
40
|
var cn__default = /*#__PURE__*/_interopDefault(cn);
|
|
41
41
|
var AsyncSelect__default = /*#__PURE__*/_interopDefault(AsyncSelect);
|
|
42
|
+
var Select__default = /*#__PURE__*/_interopDefault(Select$2);
|
|
42
43
|
var Creatable__default = /*#__PURE__*/_interopDefault(Creatable);
|
|
43
44
|
|
|
44
45
|
function _defineProperty(e, r, t) {
|
|
@@ -284,87 +285,51 @@ AlwaysMountedModal.propTypes = {
|
|
|
284
285
|
};
|
|
285
286
|
|
|
286
287
|
const container = {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
// 720px
|
|
291
|
-
desktop: '72rem' // 1152px
|
|
288
|
+
base: '100%', // 640px
|
|
289
|
+
tablet: '45rem', // 720px
|
|
290
|
+
desktop: '72rem', // 1152px
|
|
292
291
|
};
|
|
293
292
|
const sizes$6 = {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
20: '5rem',
|
|
335
|
-
// 80px
|
|
336
|
-
24: '6rem',
|
|
337
|
-
// 96px
|
|
338
|
-
28: '7rem',
|
|
339
|
-
// 112px
|
|
340
|
-
32: '8rem',
|
|
341
|
-
// 128px
|
|
342
|
-
36: '9rem',
|
|
343
|
-
// 144px
|
|
344
|
-
40: '10rem',
|
|
345
|
-
// 160px
|
|
346
|
-
44: '11rem',
|
|
347
|
-
// 176px
|
|
348
|
-
48: '12rem',
|
|
349
|
-
// 192px
|
|
350
|
-
52: '13rem',
|
|
351
|
-
// 208px
|
|
352
|
-
56: '14rem',
|
|
353
|
-
// 224px
|
|
354
|
-
60: '15rem',
|
|
355
|
-
// 240px
|
|
356
|
-
64: '16rem',
|
|
357
|
-
// 256px
|
|
358
|
-
72: '18rem',
|
|
359
|
-
// 272px
|
|
360
|
-
80: '20rem',
|
|
361
|
-
// 288px
|
|
362
|
-
96: '24rem',
|
|
363
|
-
// 384px
|
|
364
|
-
px: '1px',
|
|
365
|
-
full: '100%',
|
|
366
|
-
max: 'max-content',
|
|
367
|
-
min: 'min-content'
|
|
293
|
+
container,
|
|
294
|
+
0: '0',
|
|
295
|
+
0.5: '0.125rem', // 2px
|
|
296
|
+
1: '0.25rem', // 4px
|
|
297
|
+
1.5: '0.375rem', // 6px
|
|
298
|
+
2: '0.5rem', // 8px
|
|
299
|
+
2.5: '0.625rem', // 10px
|
|
300
|
+
3: '0.75rem', // 12px
|
|
301
|
+
3.5: '0.875rem', // 14px
|
|
302
|
+
4: '1rem', // 16px
|
|
303
|
+
4.5: '1.125rem', // 18px
|
|
304
|
+
5: '1.25rem', // 20px
|
|
305
|
+
5.5: '1.375rem', // 22px
|
|
306
|
+
6: '1.5rem', // 24px
|
|
307
|
+
7: '1.75rem', // 28px
|
|
308
|
+
8: '2rem', // 32px
|
|
309
|
+
9: '2.25rem', // 36px
|
|
310
|
+
10: '2.5rem', // 40px
|
|
311
|
+
12: '3rem', // 48px
|
|
312
|
+
14: '3.5rem', // 56px
|
|
313
|
+
16: '4rem', // 64px
|
|
314
|
+
20: '5rem', // 80px
|
|
315
|
+
24: '6rem', // 96px
|
|
316
|
+
28: '7rem', // 112px
|
|
317
|
+
32: '8rem', // 128px
|
|
318
|
+
36: '9rem', // 144px
|
|
319
|
+
40: '10rem', // 160px
|
|
320
|
+
44: '11rem', // 176px
|
|
321
|
+
48: '12rem', // 192px
|
|
322
|
+
52: '13rem', // 208px
|
|
323
|
+
56: '14rem', // 224px
|
|
324
|
+
60: '15rem', // 240px
|
|
325
|
+
64: '16rem', // 256px
|
|
326
|
+
72: '18rem', // 272px
|
|
327
|
+
80: '20rem', // 288px
|
|
328
|
+
96: '24rem', // 384px
|
|
329
|
+
px: '1px',
|
|
330
|
+
full: '100%',
|
|
331
|
+
max: 'max-content',
|
|
332
|
+
min: 'min-content',
|
|
368
333
|
};
|
|
369
334
|
|
|
370
335
|
const white = '#ffffff';
|
|
@@ -372,394 +337,376 @@ const black = '#000000';
|
|
|
372
337
|
const brandBlue = '#0082ff';
|
|
373
338
|
const modalOverlay = '#21212160';
|
|
374
339
|
const gray = {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
340
|
+
50: '#f6f7f9',
|
|
341
|
+
100: '#e1e6ec',
|
|
342
|
+
200: '#cbd4de',
|
|
343
|
+
300: '#afbdcc',
|
|
344
|
+
400: '#94a7ba',
|
|
345
|
+
500: '#7890a8',
|
|
346
|
+
600: '#537495',
|
|
347
|
+
700: '#3b5261',
|
|
348
|
+
800: '#2f3f4b',
|
|
349
|
+
900: '#26323c',
|
|
385
350
|
};
|
|
386
351
|
const blue = {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
352
|
+
50: '#f1fcff',
|
|
353
|
+
100: '#e6f8fd',
|
|
354
|
+
200: '#c0e9fb',
|
|
355
|
+
300: '#96d3fa',
|
|
356
|
+
400: '#5baafa',
|
|
357
|
+
500: '#1271eb',
|
|
358
|
+
600: '#1d58f2',
|
|
359
|
+
700: '#1b46da',
|
|
360
|
+
800: '#1735a6',
|
|
361
|
+
900: '#132b7f',
|
|
397
362
|
};
|
|
398
363
|
const navy = {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
364
|
+
50: '#f4fafc',
|
|
365
|
+
100: '#e4f7fb',
|
|
366
|
+
200: '#bfebf6',
|
|
367
|
+
300: '#92d9f4',
|
|
368
|
+
400: '#51b7f0',
|
|
369
|
+
500: '#2590ea',
|
|
370
|
+
600: '#1a6cda',
|
|
371
|
+
700: '#1b55b6',
|
|
372
|
+
800: '#194185',
|
|
373
|
+
900: '#002d5b',
|
|
409
374
|
};
|
|
410
375
|
const green = {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
376
|
+
50: '#e9fbf9',
|
|
377
|
+
100: '#d3f7ef',
|
|
378
|
+
200: '#a4f3d9',
|
|
379
|
+
300: '#65eabf',
|
|
380
|
+
400: '#1edb96',
|
|
381
|
+
500: '#09c66a',
|
|
382
|
+
600: '#08ad50',
|
|
383
|
+
700: '#008547',
|
|
384
|
+
800: '#11703e',
|
|
385
|
+
900: '#115a35',
|
|
421
386
|
};
|
|
422
387
|
const yellow = {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
388
|
+
50: '#fff9e5',
|
|
389
|
+
100: '#faf0bd',
|
|
390
|
+
200: '#f6e67c',
|
|
391
|
+
300: '#f1d439',
|
|
392
|
+
400: '#ffbf02',
|
|
393
|
+
500: '#e19706',
|
|
394
|
+
600: '#cf7404',
|
|
395
|
+
700: '#ae5708',
|
|
396
|
+
800: '#8e440e',
|
|
397
|
+
900: '#743710',
|
|
433
398
|
};
|
|
434
399
|
const red = {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
400
|
+
50: '#fff3f0',
|
|
401
|
+
100: '#fdeef3',
|
|
402
|
+
200: '#fbcee6',
|
|
403
|
+
300: '#fba4d1',
|
|
404
|
+
400: '#fc6bad',
|
|
405
|
+
500: '#fc4086',
|
|
406
|
+
600: '#f7265f',
|
|
407
|
+
700: '#e01438',
|
|
408
|
+
800: '#b4193c',
|
|
409
|
+
900: '#901530',
|
|
445
410
|
};
|
|
446
411
|
const colors = {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
secondary: _objectSpread2(_objectSpread2({}, navy), {}, {
|
|
468
|
-
default: navy['900']
|
|
469
|
-
}),
|
|
470
|
-
success: green['700'],
|
|
471
|
-
warning: yellow['400'],
|
|
472
|
-
error: red['700'],
|
|
473
|
-
accent: gray['200'],
|
|
474
|
-
text: {
|
|
412
|
+
gray: {
|
|
413
|
+
...gray,
|
|
414
|
+
light: gray['50'],
|
|
415
|
+
medium: gray['200'],
|
|
416
|
+
dark: gray['600'],
|
|
417
|
+
},
|
|
418
|
+
blue,
|
|
419
|
+
navy,
|
|
420
|
+
red: {
|
|
421
|
+
...red,
|
|
422
|
+
default: red['700'],
|
|
423
|
+
},
|
|
424
|
+
green: {
|
|
425
|
+
...green,
|
|
426
|
+
default: green['700'],
|
|
427
|
+
},
|
|
428
|
+
yellow: {
|
|
429
|
+
...yellow,
|
|
430
|
+
default: yellow['400'],
|
|
431
|
+
},
|
|
475
432
|
primary: {
|
|
476
|
-
|
|
477
|
-
|
|
433
|
+
...blue,
|
|
434
|
+
default: blue['500'],
|
|
435
|
+
brand: blue['500'],
|
|
478
436
|
},
|
|
479
437
|
secondary: {
|
|
480
|
-
|
|
438
|
+
...navy,
|
|
439
|
+
default: navy['900'],
|
|
481
440
|
},
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
441
|
+
success: green['700'],
|
|
442
|
+
warning: yellow['400'],
|
|
443
|
+
error: red['700'],
|
|
444
|
+
accent: gray['200'],
|
|
445
|
+
text: {
|
|
446
|
+
primary: {
|
|
447
|
+
light: black,
|
|
448
|
+
dark: white,
|
|
449
|
+
},
|
|
450
|
+
secondary: {
|
|
451
|
+
light: gray['600'],
|
|
452
|
+
},
|
|
453
|
+
link: {
|
|
454
|
+
light: blue['500'],
|
|
455
|
+
dark: white,
|
|
456
|
+
},
|
|
457
|
+
},
|
|
458
|
+
background: {
|
|
459
|
+
gray: gray['50'],
|
|
460
|
+
white,
|
|
461
|
+
},
|
|
462
|
+
white,
|
|
463
|
+
black,
|
|
464
|
+
brandBlue,
|
|
465
|
+
modalOverlay,
|
|
495
466
|
};
|
|
496
467
|
|
|
497
468
|
const shadows = {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
drawer: '-8px 0 16px 0 rgba(33,33,33,.1)'
|
|
469
|
+
outline: '0 0 0 3px rgba(29, 88, 242, 0.7)', // primary.600, 70% opacity
|
|
470
|
+
drawer: '-8px 0 16px 0 rgba(33,33,33,.1)',
|
|
501
471
|
};
|
|
502
472
|
var shadows$1 = merge__default.default(react.theme.shadows, shadows);
|
|
503
473
|
|
|
504
474
|
const indices = {
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
layer5: 500,
|
|
519
|
-
// equivalent to $z-index-layer3 in fe-core
|
|
520
|
-
layer6: 600,
|
|
521
|
-
// equivalent to $z-index-layer4 in fe-core
|
|
522
|
-
layer7: 700,
|
|
523
|
-
// equivalent to $z-index-modal-shim in fe-core
|
|
524
|
-
layer8: 800,
|
|
525
|
-
// equivalent to $z-index-modal in fe-core
|
|
526
|
-
layer9: 900,
|
|
527
|
-
// equivalent to $z-index-notification in fe-core
|
|
528
|
-
layer10: 1000 // equivalent to $z-index-top in fe-core
|
|
475
|
+
hide: -100, // equivalent to $z-index-negative in fe-core (https://github.com/spothero/fe-core/blob/main/utils/_defaults.scss)
|
|
476
|
+
auto: 'auto',
|
|
477
|
+
base: 0, // equivalent to $z-index-back in fe-core
|
|
478
|
+
layer1: 100, // equivalent to $z-index-mid in fe-core
|
|
479
|
+
layer2: 200, // equivalent to $z-index-fore in fe-core
|
|
480
|
+
layer3: 300, // equivalent to $z-index-layer1 in fe-core
|
|
481
|
+
layer4: 400, // equivalent to $z-index-layer2 in fe-core
|
|
482
|
+
layer5: 500, // equivalent to $z-index-layer3 in fe-core
|
|
483
|
+
layer6: 600, // equivalent to $z-index-layer4 in fe-core
|
|
484
|
+
layer7: 700, // equivalent to $z-index-modal-shim in fe-core
|
|
485
|
+
layer8: 800, // equivalent to $z-index-modal in fe-core
|
|
486
|
+
layer9: 900, // equivalent to $z-index-notification in fe-core
|
|
487
|
+
layer10: 1000, // equivalent to $z-index-top in fe-core
|
|
529
488
|
};
|
|
530
489
|
|
|
531
490
|
const breakpoints = {
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
desktop: '64rem',
|
|
537
|
-
// 1024px
|
|
538
|
-
desktopXL: '90rem' // 1440px
|
|
491
|
+
mobileXL: '30rem', // 480px
|
|
492
|
+
tablet: '48rem', // 768px
|
|
493
|
+
desktop: '64rem', // 1024px
|
|
494
|
+
desktopXL: '90rem', // 1440px
|
|
539
495
|
};
|
|
540
496
|
|
|
541
497
|
const fonts = {
|
|
542
|
-
|
|
543
|
-
|
|
498
|
+
heading: `"Plus Jakarta Sans", sans-serif`,
|
|
499
|
+
body: `"Plus Jakarta Sans", sans-serif`,
|
|
544
500
|
};
|
|
545
501
|
const fontSizes = {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
lg: '1.25rem',
|
|
557
|
-
// 20px
|
|
558
|
-
md: '1.125rem',
|
|
559
|
-
// 18px
|
|
560
|
-
base: '1rem',
|
|
561
|
-
// 16px
|
|
562
|
-
sm: '0.875rem',
|
|
563
|
-
// 14px
|
|
564
|
-
xs: '0.75rem' // 12px
|
|
502
|
+
'5xl': '3.5rem', // 56px
|
|
503
|
+
'4xl': '3rem', // 48px
|
|
504
|
+
'3xl': '2.5rem', // 40px
|
|
505
|
+
'2xl': '2rem', // 32px
|
|
506
|
+
xl: '1.5rem', // 24px
|
|
507
|
+
lg: '1.25rem', // 20px
|
|
508
|
+
md: '1.125rem', // 18px
|
|
509
|
+
base: '1rem', // 16px
|
|
510
|
+
sm: '0.875rem', // 14px
|
|
511
|
+
xs: '0.75rem', // 12px
|
|
565
512
|
};
|
|
566
513
|
const fontWeights = {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
514
|
+
light: 300,
|
|
515
|
+
normal: 400,
|
|
516
|
+
medium: 500,
|
|
517
|
+
semibold: 600,
|
|
518
|
+
bold: 700,
|
|
572
519
|
};
|
|
573
520
|
|
|
574
521
|
const NOTIFICATION_STATUSES = {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
522
|
+
NEUTRAL: 'neutral',
|
|
523
|
+
ERROR: 'error',
|
|
524
|
+
WARNING: 'warning',
|
|
525
|
+
SUCCESS: 'success',
|
|
579
526
|
};
|
|
580
527
|
const NOTIFICATION_SIZES = {
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
528
|
+
SM: 'sm',
|
|
529
|
+
MD: 'md',
|
|
530
|
+
LG: 'lg',
|
|
584
531
|
};
|
|
585
532
|
const notificationBaseStyle = {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
},
|
|
590
|
-
actionButton: {
|
|
591
|
-
fontSize: 'sm',
|
|
592
|
-
height: 'fit-content',
|
|
593
|
-
lineHeight: '1.4',
|
|
594
|
-
color: 'primary.600',
|
|
595
|
-
_hover: {
|
|
596
|
-
color: 'primary.700'
|
|
597
|
-
}
|
|
598
|
-
},
|
|
599
|
-
dismissButton: {
|
|
600
|
-
color: 'gray.600',
|
|
601
|
-
borderColor: 'transparent',
|
|
602
|
-
borderWidth: '2px',
|
|
603
|
-
padding: 0,
|
|
604
|
-
width: 10,
|
|
605
|
-
height: 10,
|
|
606
|
-
backgroundColor: 'transparent',
|
|
607
|
-
borderRadius: 'base',
|
|
608
|
-
marginLeft: 2,
|
|
609
|
-
_hover: {
|
|
610
|
-
color: 'gray.700'
|
|
611
|
-
},
|
|
612
|
-
_focus: {
|
|
613
|
-
color: 'gray.700',
|
|
614
|
-
borderColor: 'white',
|
|
615
|
-
boxShadow: 'outline'
|
|
616
|
-
}
|
|
617
|
-
},
|
|
618
|
-
icon: {
|
|
619
|
-
width: 6,
|
|
620
|
-
marginRight: 2,
|
|
621
|
-
height: 'auto'
|
|
622
|
-
},
|
|
623
|
-
description: {
|
|
624
|
-
lineHeight: 1.4
|
|
625
|
-
},
|
|
626
|
-
title: {
|
|
627
|
-
lineHeight: 1.4
|
|
628
|
-
},
|
|
629
|
-
variants: {},
|
|
630
|
-
sizes: {
|
|
631
|
-
sm: {
|
|
632
|
-
title: {
|
|
633
|
-
fontSize: 'xs'
|
|
634
|
-
},
|
|
635
|
-
description: {
|
|
636
|
-
fontSize: 'xs'
|
|
637
|
-
}
|
|
638
|
-
},
|
|
639
|
-
md: {
|
|
640
|
-
title: {
|
|
641
|
-
fontSize: 'sm'
|
|
642
|
-
},
|
|
643
|
-
description: {
|
|
644
|
-
fontSize: 'sm'
|
|
645
|
-
}
|
|
533
|
+
container: {
|
|
534
|
+
paddingY: 2,
|
|
535
|
+
borderRadius: 'base',
|
|
646
536
|
},
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
};
|
|
657
|
-
const notificationStatusStyles = status => {
|
|
658
|
-
switch (status) {
|
|
659
|
-
case NOTIFICATION_STATUSES.NEUTRAL:
|
|
660
|
-
return {
|
|
661
|
-
container: {
|
|
662
|
-
background: 'blue.50'
|
|
663
|
-
},
|
|
664
|
-
icon: {
|
|
665
|
-
color: 'blue.500'
|
|
666
|
-
},
|
|
667
|
-
dismissButton: {
|
|
668
|
-
_hover: {
|
|
669
|
-
background: 'blue.200'
|
|
670
|
-
},
|
|
671
|
-
_focus: {
|
|
672
|
-
background: 'blue.200'
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
};
|
|
676
|
-
case NOTIFICATION_STATUSES.WARNING:
|
|
677
|
-
return {
|
|
678
|
-
container: {
|
|
679
|
-
background: 'yellow.50'
|
|
537
|
+
actionButton: {
|
|
538
|
+
fontSize: 'sm',
|
|
539
|
+
height: 'fit-content',
|
|
540
|
+
lineHeight: '1.4',
|
|
541
|
+
color: 'primary.600',
|
|
542
|
+
_hover: {
|
|
543
|
+
color: 'primary.700',
|
|
680
544
|
},
|
|
681
|
-
|
|
682
|
-
|
|
545
|
+
},
|
|
546
|
+
dismissButton: {
|
|
547
|
+
color: 'gray.600',
|
|
548
|
+
borderColor: 'transparent',
|
|
549
|
+
borderWidth: '2px',
|
|
550
|
+
padding: 0,
|
|
551
|
+
width: 10,
|
|
552
|
+
height: 10,
|
|
553
|
+
backgroundColor: 'transparent',
|
|
554
|
+
borderRadius: 'base',
|
|
555
|
+
marginLeft: 2,
|
|
556
|
+
_hover: {
|
|
557
|
+
color: 'gray.700',
|
|
683
558
|
},
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
_focus: {
|
|
689
|
-
background: 'yellow.200'
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
};
|
|
693
|
-
case NOTIFICATION_STATUSES.ERROR:
|
|
694
|
-
return {
|
|
695
|
-
container: {
|
|
696
|
-
background: 'red.50'
|
|
559
|
+
_focus: {
|
|
560
|
+
color: 'gray.700',
|
|
561
|
+
borderColor: 'white',
|
|
562
|
+
boxShadow: 'outline',
|
|
697
563
|
},
|
|
698
|
-
|
|
699
|
-
|
|
564
|
+
},
|
|
565
|
+
icon: {
|
|
566
|
+
width: 6,
|
|
567
|
+
marginRight: 2,
|
|
568
|
+
height: 'auto',
|
|
569
|
+
},
|
|
570
|
+
description: {
|
|
571
|
+
lineHeight: 1.4,
|
|
572
|
+
},
|
|
573
|
+
title: {
|
|
574
|
+
lineHeight: 1.4,
|
|
575
|
+
},
|
|
576
|
+
variants: {},
|
|
577
|
+
sizes: {
|
|
578
|
+
sm: {
|
|
579
|
+
title: {
|
|
580
|
+
fontSize: 'xs',
|
|
581
|
+
},
|
|
582
|
+
description: {
|
|
583
|
+
fontSize: 'xs',
|
|
584
|
+
},
|
|
700
585
|
},
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
}
|
|
709
|
-
};
|
|
710
|
-
case NOTIFICATION_STATUSES.SUCCESS:
|
|
711
|
-
return {
|
|
712
|
-
container: {
|
|
713
|
-
background: 'green.50'
|
|
586
|
+
md: {
|
|
587
|
+
title: {
|
|
588
|
+
fontSize: 'sm',
|
|
589
|
+
},
|
|
590
|
+
description: {
|
|
591
|
+
fontSize: 'sm',
|
|
592
|
+
},
|
|
714
593
|
},
|
|
715
|
-
|
|
716
|
-
|
|
594
|
+
lg: {
|
|
595
|
+
title: {
|
|
596
|
+
fontSize: 'base',
|
|
597
|
+
},
|
|
598
|
+
description: {
|
|
599
|
+
fontSize: 'base',
|
|
600
|
+
},
|
|
717
601
|
},
|
|
718
|
-
|
|
719
|
-
_hover: {
|
|
720
|
-
background: 'green.200'
|
|
721
|
-
},
|
|
722
|
-
_focus: {
|
|
723
|
-
background: 'green.200'
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
};
|
|
727
|
-
default:
|
|
728
|
-
return {};
|
|
729
|
-
}
|
|
602
|
+
},
|
|
730
603
|
};
|
|
731
|
-
const
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
604
|
+
const notificationStatusStyles = (status) => {
|
|
605
|
+
switch (status) {
|
|
606
|
+
case NOTIFICATION_STATUSES.NEUTRAL:
|
|
607
|
+
return {
|
|
608
|
+
container: {
|
|
609
|
+
background: 'blue.50',
|
|
610
|
+
},
|
|
611
|
+
icon: {
|
|
612
|
+
color: 'blue.500',
|
|
613
|
+
},
|
|
614
|
+
dismissButton: {
|
|
615
|
+
_hover: {
|
|
616
|
+
background: 'blue.200',
|
|
617
|
+
},
|
|
618
|
+
_focus: {
|
|
619
|
+
background: 'blue.200',
|
|
620
|
+
},
|
|
621
|
+
},
|
|
622
|
+
};
|
|
623
|
+
case NOTIFICATION_STATUSES.WARNING:
|
|
624
|
+
return {
|
|
625
|
+
container: {
|
|
626
|
+
background: 'yellow.50',
|
|
627
|
+
},
|
|
628
|
+
icon: {
|
|
629
|
+
color: 'yellow.400',
|
|
630
|
+
},
|
|
631
|
+
dismissButton: {
|
|
632
|
+
_hover: {
|
|
633
|
+
background: 'yellow.200',
|
|
634
|
+
},
|
|
635
|
+
_focus: {
|
|
636
|
+
background: 'yellow.200',
|
|
637
|
+
},
|
|
638
|
+
},
|
|
639
|
+
};
|
|
640
|
+
case NOTIFICATION_STATUSES.ERROR:
|
|
641
|
+
return {
|
|
642
|
+
container: {
|
|
643
|
+
background: 'red.50',
|
|
644
|
+
},
|
|
645
|
+
icon: {
|
|
646
|
+
color: 'red.700',
|
|
647
|
+
},
|
|
648
|
+
dismissButton: {
|
|
649
|
+
_hover: {
|
|
650
|
+
background: 'red.200',
|
|
651
|
+
},
|
|
652
|
+
_focus: {
|
|
653
|
+
background: 'red.200',
|
|
654
|
+
},
|
|
655
|
+
},
|
|
656
|
+
};
|
|
657
|
+
case NOTIFICATION_STATUSES.SUCCESS:
|
|
658
|
+
return {
|
|
659
|
+
container: {
|
|
660
|
+
background: 'green.50',
|
|
661
|
+
},
|
|
662
|
+
icon: {
|
|
663
|
+
color: 'green.700',
|
|
664
|
+
},
|
|
665
|
+
dismissButton: {
|
|
666
|
+
_hover: {
|
|
667
|
+
background: 'green.200',
|
|
668
|
+
},
|
|
669
|
+
_focus: {
|
|
670
|
+
background: 'green.200',
|
|
671
|
+
},
|
|
672
|
+
},
|
|
673
|
+
};
|
|
674
|
+
default:
|
|
675
|
+
return {};
|
|
676
|
+
}
|
|
677
|
+
};
|
|
678
|
+
const notificationSizeStyles = (size) => {
|
|
679
|
+
switch (size) {
|
|
680
|
+
case NOTIFICATION_SIZES.SM:
|
|
681
|
+
return {
|
|
682
|
+
title: {
|
|
683
|
+
fontSize: 'xs',
|
|
684
|
+
},
|
|
685
|
+
description: {
|
|
686
|
+
fontSize: 'xs',
|
|
687
|
+
},
|
|
688
|
+
};
|
|
689
|
+
case NOTIFICATION_SIZES.MD:
|
|
690
|
+
return {
|
|
691
|
+
title: {
|
|
692
|
+
fontSize: 'sm',
|
|
693
|
+
},
|
|
694
|
+
description: {
|
|
695
|
+
fontSize: 'sm',
|
|
696
|
+
},
|
|
697
|
+
};
|
|
698
|
+
case NOTIFICATION_SIZES.LG:
|
|
699
|
+
return {
|
|
700
|
+
title: {
|
|
701
|
+
fontSize: 'base',
|
|
702
|
+
},
|
|
703
|
+
description: {
|
|
704
|
+
fontSize: 'base',
|
|
705
|
+
},
|
|
706
|
+
};
|
|
707
|
+
default:
|
|
708
|
+
return {};
|
|
709
|
+
}
|
|
763
710
|
};
|
|
764
711
|
|
|
765
712
|
var base = /*#__PURE__*/Object.freeze({
|
|
@@ -859,6 +806,10 @@ const hoverSecondaryColor = generateOklchColor('white', '- 0.03');
|
|
|
859
806
|
const activeSecondaryColor = generateOklchColor('white', '- 0.06');
|
|
860
807
|
// 10% lighter (lightness)
|
|
861
808
|
const hoverDarkColor = generateOklchColor('yellow-default', '+ 0.1');
|
|
809
|
+
// 10% lighter (lightness) — for black variant hover
|
|
810
|
+
const hoverBlackColor = generateOklchColor('black', '+ 0.1');
|
|
811
|
+
// 15% lighter (lightness) — for black variant active
|
|
812
|
+
const activeBlackColor = generateOklchColor('black', '+ 0.15');
|
|
862
813
|
|
|
863
814
|
/**
|
|
864
815
|
* Button Variants - Simplified Color System Using OKLCH
|
|
@@ -981,6 +932,41 @@ const variants$d = {
|
|
|
981
932
|
}
|
|
982
933
|
}
|
|
983
934
|
},
|
|
935
|
+
black: {
|
|
936
|
+
bg: 'black',
|
|
937
|
+
borderColor: 'black',
|
|
938
|
+
color: 'white',
|
|
939
|
+
py: 2,
|
|
940
|
+
_hover: _objectSpread2({
|
|
941
|
+
bg: hoverBlackColor,
|
|
942
|
+
borderColor: hoverBlackColor,
|
|
943
|
+
color: 'white'
|
|
944
|
+
}, disabledButtonHoverStyle),
|
|
945
|
+
_active: {
|
|
946
|
+
bg: activeBlackColor,
|
|
947
|
+
borderColor: activeBlackColor,
|
|
948
|
+
color: 'white'
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
blackOnDark: {
|
|
952
|
+
bg: 'white',
|
|
953
|
+
borderColor: 'white',
|
|
954
|
+
color: 'black',
|
|
955
|
+
py: 2,
|
|
956
|
+
_hover: _objectSpread2({
|
|
957
|
+
bg: hoverSecondaryColor,
|
|
958
|
+
borderColor: hoverSecondaryColor,
|
|
959
|
+
color: 'black'
|
|
960
|
+
}, disabledButtonHoverStyle),
|
|
961
|
+
_active: {
|
|
962
|
+
bg: activeSecondaryColor,
|
|
963
|
+
borderColor: activeSecondaryColor,
|
|
964
|
+
color: 'black'
|
|
965
|
+
},
|
|
966
|
+
_focus: {
|
|
967
|
+
boxShadow: '0 0 0 3px rgba(255, 255, 255, 0.7)'
|
|
968
|
+
}
|
|
969
|
+
},
|
|
984
970
|
destructive: _objectSpread2({}, destructiveButtonStyles),
|
|
985
971
|
destructiveOnDark: _objectSpread2({}, destructiveButtonStyles)
|
|
986
972
|
};
|
|
@@ -1051,7 +1037,7 @@ const props = {
|
|
|
1051
1037
|
variant: PropTypes__default.default.oneOf(Object.keys(variants$d))
|
|
1052
1038
|
};
|
|
1053
1039
|
|
|
1054
|
-
const _excluded$
|
|
1040
|
+
const _excluded$r = ["asAnchor", "isExternal", "height"];
|
|
1055
1041
|
const anchorProps = function () {
|
|
1056
1042
|
let isExternal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
1057
1043
|
return _objectSpread2({
|
|
@@ -1068,7 +1054,7 @@ const Button$1 = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1068
1054
|
isExternal,
|
|
1069
1055
|
height = 'md'
|
|
1070
1056
|
} = _ref,
|
|
1071
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1057
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
1072
1058
|
return /*#__PURE__*/React__namespace.default.createElement(react.Button, _extends$6({
|
|
1073
1059
|
iconSpacing: 2
|
|
1074
1060
|
}, props, heightProps(height), (asAnchor || props.as === 'a') && anchorProps(isExternal), {
|
|
@@ -1081,7 +1067,7 @@ Button$1.defaultProps = {
|
|
|
1081
1067
|
type: 'button'
|
|
1082
1068
|
};
|
|
1083
1069
|
|
|
1084
|
-
const _excluded$
|
|
1070
|
+
const _excluded$q = ["header", "drawerCloseButton", "children", "headerProps"];
|
|
1085
1071
|
const Drawer = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1086
1072
|
let {
|
|
1087
1073
|
header,
|
|
@@ -1089,7 +1075,7 @@ const Drawer = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1089
1075
|
children,
|
|
1090
1076
|
headerProps
|
|
1091
1077
|
} = _ref,
|
|
1092
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1078
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
1093
1079
|
return /*#__PURE__*/React__namespace.default.createElement(react.Drawer, _extends$6({
|
|
1094
1080
|
placement: "right"
|
|
1095
1081
|
}, props, {
|
|
@@ -1221,7 +1207,7 @@ var SvgCheckmarkCircleFilled = function SvgCheckmarkCircleFilled(props, ref) {
|
|
|
1221
1207
|
};
|
|
1222
1208
|
var ForwardRef$2 = /*#__PURE__*/React.forwardRef(SvgCheckmarkCircleFilled);
|
|
1223
1209
|
|
|
1224
|
-
const _excluded$
|
|
1210
|
+
const _excluded$p = ["status", "title", "buttonProps", "buttonText", "buttonOnBottom", "showDismiss", "onDismissClick", "showIcon", "description", "icon"];
|
|
1225
1211
|
const statusIconMapping = {
|
|
1226
1212
|
[NOTIFICATION_STATUSES.WARNING]: ForwardRef$3,
|
|
1227
1213
|
[NOTIFICATION_STATUSES.SUCCESS]: ForwardRef$2,
|
|
@@ -1241,7 +1227,7 @@ const Alert = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1241
1227
|
description,
|
|
1242
1228
|
icon
|
|
1243
1229
|
} = _ref,
|
|
1244
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1230
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
1245
1231
|
const IconVariant = icon || statusIconMapping[status];
|
|
1246
1232
|
// the issue with storybook breaking with hooks is still a problem, but once that's resolved this should be memoized
|
|
1247
1233
|
const style = merge__default.default(_objectSpread2({}, react.theme.components.Alert.baseStyle), notificationBaseStyle, notificationStatusStyles(status), notificationSizeStyles(props.size));
|
|
@@ -1400,7 +1386,7 @@ const combineSizeWithVariant = _ref => {
|
|
|
1400
1386
|
return styleProps;
|
|
1401
1387
|
};
|
|
1402
1388
|
|
|
1403
|
-
const _excluded$
|
|
1389
|
+
const _excluded$o = ["size"];
|
|
1404
1390
|
const sizeMapping = {
|
|
1405
1391
|
[SIZE_SMALL]: 'sm',
|
|
1406
1392
|
[SIZE_BODY]: 'md',
|
|
@@ -1410,7 +1396,7 @@ const Tabs = react.forwardRef((_ref, ref) => {
|
|
|
1410
1396
|
let {
|
|
1411
1397
|
size
|
|
1412
1398
|
} = _ref,
|
|
1413
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1399
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
1414
1400
|
return /*#__PURE__*/React__namespace.default.createElement(react.Tabs, _extends$6({
|
|
1415
1401
|
size: sizeMapping[size]
|
|
1416
1402
|
}, props, combineSizeWithVariant({
|
|
@@ -1453,65 +1439,1206 @@ var SvgChevronDown = function SvgChevronDown(props, ref) {
|
|
|
1453
1439
|
};
|
|
1454
1440
|
var ForwardRef$1 = /*#__PURE__*/React.forwardRef(SvgChevronDown);
|
|
1455
1441
|
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1442
|
+
var jsxRuntime = {exports: {}};
|
|
1443
|
+
|
|
1444
|
+
var reactJsxRuntime_production_min = {};
|
|
1445
|
+
|
|
1446
|
+
/**
|
|
1447
|
+
* @license React
|
|
1448
|
+
* react-jsx-runtime.production.min.js
|
|
1449
|
+
*
|
|
1450
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1451
|
+
*
|
|
1452
|
+
* This source code is licensed under the MIT license found in the
|
|
1453
|
+
* LICENSE file in the root directory of this source tree.
|
|
1454
|
+
*/
|
|
1455
|
+
var hasRequiredReactJsxRuntime_production_min;
|
|
1456
|
+
function requireReactJsxRuntime_production_min() {
|
|
1457
|
+
if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
|
|
1458
|
+
hasRequiredReactJsxRuntime_production_min = 1;
|
|
1459
|
+
var f = React__namespace.default,
|
|
1460
|
+
k = Symbol.for("react.element"),
|
|
1461
|
+
l = Symbol.for("react.fragment"),
|
|
1462
|
+
m = Object.prototype.hasOwnProperty,
|
|
1463
|
+
n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
|
|
1464
|
+
p = {
|
|
1465
|
+
key: !0,
|
|
1466
|
+
ref: !0,
|
|
1467
|
+
__self: !0,
|
|
1468
|
+
__source: !0
|
|
1469
|
+
};
|
|
1470
|
+
function q(c, a, g) {
|
|
1471
|
+
var b,
|
|
1472
|
+
d = {},
|
|
1473
|
+
e = null,
|
|
1474
|
+
h = null;
|
|
1475
|
+
void 0 !== g && (e = "" + g);
|
|
1476
|
+
void 0 !== a.key && (e = "" + a.key);
|
|
1477
|
+
void 0 !== a.ref && (h = a.ref);
|
|
1478
|
+
for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
|
|
1479
|
+
if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
|
|
1480
|
+
return {
|
|
1481
|
+
$$typeof: k,
|
|
1482
|
+
type: c,
|
|
1483
|
+
key: e,
|
|
1484
|
+
ref: h,
|
|
1485
|
+
props: d,
|
|
1486
|
+
_owner: n.current
|
|
1487
|
+
};
|
|
1488
|
+
}
|
|
1489
|
+
reactJsxRuntime_production_min.Fragment = l;
|
|
1490
|
+
reactJsxRuntime_production_min.jsx = q;
|
|
1491
|
+
reactJsxRuntime_production_min.jsxs = q;
|
|
1492
|
+
return reactJsxRuntime_production_min;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
var reactJsxRuntime_development = {};
|
|
1496
|
+
|
|
1497
|
+
/**
|
|
1498
|
+
* @license React
|
|
1499
|
+
* react-jsx-runtime.development.js
|
|
1500
|
+
*
|
|
1501
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1502
|
+
*
|
|
1503
|
+
* This source code is licensed under the MIT license found in the
|
|
1504
|
+
* LICENSE file in the root directory of this source tree.
|
|
1505
|
+
*/
|
|
1506
|
+
var hasRequiredReactJsxRuntime_development;
|
|
1507
|
+
function requireReactJsxRuntime_development() {
|
|
1508
|
+
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
1509
|
+
hasRequiredReactJsxRuntime_development = 1;
|
|
1510
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1511
|
+
(function () {
|
|
1512
|
+
|
|
1513
|
+
var React = React__namespace.default;
|
|
1514
|
+
|
|
1515
|
+
// ATTENTION
|
|
1516
|
+
// When adding new symbols to this file,
|
|
1517
|
+
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
1518
|
+
// The Symbol used to tag the ReactElement-like types.
|
|
1519
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
1520
|
+
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
1521
|
+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
1522
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
1523
|
+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
1524
|
+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
1525
|
+
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
1526
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
1527
|
+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
1528
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
1529
|
+
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
1530
|
+
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
1531
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
1532
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
1533
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
1534
|
+
function getIteratorFn(maybeIterable) {
|
|
1535
|
+
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
1536
|
+
return null;
|
|
1537
|
+
}
|
|
1538
|
+
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
1539
|
+
if (typeof maybeIterator === 'function') {
|
|
1540
|
+
return maybeIterator;
|
|
1541
|
+
}
|
|
1542
|
+
return null;
|
|
1543
|
+
}
|
|
1544
|
+
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1545
|
+
function error(format) {
|
|
1546
|
+
{
|
|
1547
|
+
{
|
|
1548
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
1549
|
+
args[_key2 - 1] = arguments[_key2];
|
|
1550
|
+
}
|
|
1551
|
+
printWarning('error', format, args);
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
function printWarning(level, format, args) {
|
|
1556
|
+
// When changing this logic, you might want to also
|
|
1557
|
+
// update consoleWithStackDev.www.js as well.
|
|
1558
|
+
{
|
|
1559
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
1560
|
+
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
1561
|
+
if (stack !== '') {
|
|
1562
|
+
format += '%s';
|
|
1563
|
+
args = args.concat([stack]);
|
|
1564
|
+
} // eslint-disable-next-line react-internal/safe-string-coercion
|
|
1565
|
+
|
|
1566
|
+
var argsWithFormat = args.map(function (item) {
|
|
1567
|
+
return String(item);
|
|
1568
|
+
}); // Careful: RN currently depends on this prefix
|
|
1569
|
+
|
|
1570
|
+
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
1571
|
+
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
1572
|
+
// eslint-disable-next-line react-internal/no-production-logging
|
|
1573
|
+
|
|
1574
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
// -----------------------------------------------------------------------------
|
|
1579
|
+
|
|
1580
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
1581
|
+
var enableCacheElement = false;
|
|
1582
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
1583
|
+
|
|
1584
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
1585
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
1586
|
+
// issues in DEV builds.
|
|
1587
|
+
|
|
1588
|
+
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
1589
|
+
|
|
1590
|
+
var REACT_MODULE_REFERENCE;
|
|
1591
|
+
{
|
|
1592
|
+
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
1593
|
+
}
|
|
1594
|
+
function isValidElementType(type) {
|
|
1595
|
+
if (typeof type === 'string' || typeof type === 'function') {
|
|
1596
|
+
return true;
|
|
1597
|
+
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
1598
|
+
|
|
1599
|
+
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) {
|
|
1600
|
+
return true;
|
|
1601
|
+
}
|
|
1602
|
+
if (typeof type === 'object' && type !== null) {
|
|
1603
|
+
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 ||
|
|
1604
|
+
// This needs to include all possible module reference object
|
|
1605
|
+
// types supported by any Flight configuration anywhere since
|
|
1606
|
+
// we don't know which Flight build this will end up being used
|
|
1607
|
+
// with.
|
|
1608
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
1609
|
+
return true;
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
return false;
|
|
1613
|
+
}
|
|
1614
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
|
1615
|
+
var displayName = outerType.displayName;
|
|
1616
|
+
if (displayName) {
|
|
1617
|
+
return displayName;
|
|
1618
|
+
}
|
|
1619
|
+
var functionName = innerType.displayName || innerType.name || '';
|
|
1620
|
+
return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
1621
|
+
} // Keep in sync with react-reconciler/getComponentNameFromFiber
|
|
1622
|
+
|
|
1623
|
+
function getContextName(type) {
|
|
1624
|
+
return type.displayName || 'Context';
|
|
1625
|
+
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
|
|
1626
|
+
|
|
1627
|
+
function getComponentNameFromType(type) {
|
|
1628
|
+
if (type == null) {
|
|
1629
|
+
// Host root, text node or just invalid type.
|
|
1630
|
+
return null;
|
|
1631
|
+
}
|
|
1632
|
+
{
|
|
1633
|
+
if (typeof type.tag === 'number') {
|
|
1634
|
+
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
if (typeof type === 'function') {
|
|
1638
|
+
return type.displayName || type.name || null;
|
|
1639
|
+
}
|
|
1640
|
+
if (typeof type === 'string') {
|
|
1641
|
+
return type;
|
|
1642
|
+
}
|
|
1643
|
+
switch (type) {
|
|
1644
|
+
case REACT_FRAGMENT_TYPE:
|
|
1645
|
+
return 'Fragment';
|
|
1646
|
+
case REACT_PORTAL_TYPE:
|
|
1647
|
+
return 'Portal';
|
|
1648
|
+
case REACT_PROFILER_TYPE:
|
|
1649
|
+
return 'Profiler';
|
|
1650
|
+
case REACT_STRICT_MODE_TYPE:
|
|
1651
|
+
return 'StrictMode';
|
|
1652
|
+
case REACT_SUSPENSE_TYPE:
|
|
1653
|
+
return 'Suspense';
|
|
1654
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
1655
|
+
return 'SuspenseList';
|
|
1656
|
+
}
|
|
1657
|
+
if (typeof type === 'object') {
|
|
1658
|
+
switch (type.$$typeof) {
|
|
1659
|
+
case REACT_CONTEXT_TYPE:
|
|
1660
|
+
var context = type;
|
|
1661
|
+
return getContextName(context) + '.Consumer';
|
|
1662
|
+
case REACT_PROVIDER_TYPE:
|
|
1663
|
+
var provider = type;
|
|
1664
|
+
return getContextName(provider._context) + '.Provider';
|
|
1665
|
+
case REACT_FORWARD_REF_TYPE:
|
|
1666
|
+
return getWrappedName(type, type.render, 'ForwardRef');
|
|
1667
|
+
case REACT_MEMO_TYPE:
|
|
1668
|
+
var outerName = type.displayName || null;
|
|
1669
|
+
if (outerName !== null) {
|
|
1670
|
+
return outerName;
|
|
1671
|
+
}
|
|
1672
|
+
return getComponentNameFromType(type.type) || 'Memo';
|
|
1673
|
+
case REACT_LAZY_TYPE:
|
|
1674
|
+
{
|
|
1675
|
+
var lazyComponent = type;
|
|
1676
|
+
var payload = lazyComponent._payload;
|
|
1677
|
+
var init = lazyComponent._init;
|
|
1678
|
+
try {
|
|
1679
|
+
return getComponentNameFromType(init(payload));
|
|
1680
|
+
} catch (x) {
|
|
1681
|
+
return null;
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
// eslint-disable-next-line no-fallthrough
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
return null;
|
|
1689
|
+
}
|
|
1690
|
+
var assign = Object.assign;
|
|
1691
|
+
|
|
1692
|
+
// Helpers to patch console.logs to avoid logging during side-effect free
|
|
1693
|
+
// replaying on render function. This currently only patches the object
|
|
1694
|
+
// lazily which won't cover if the log function was extracted eagerly.
|
|
1695
|
+
// We could also eagerly patch the method.
|
|
1696
|
+
var disabledDepth = 0;
|
|
1697
|
+
var prevLog;
|
|
1698
|
+
var prevInfo;
|
|
1699
|
+
var prevWarn;
|
|
1700
|
+
var prevError;
|
|
1701
|
+
var prevGroup;
|
|
1702
|
+
var prevGroupCollapsed;
|
|
1703
|
+
var prevGroupEnd;
|
|
1704
|
+
function disabledLog() {}
|
|
1705
|
+
disabledLog.__reactDisabledLog = true;
|
|
1706
|
+
function disableLogs() {
|
|
1707
|
+
{
|
|
1708
|
+
if (disabledDepth === 0) {
|
|
1709
|
+
/* eslint-disable react-internal/no-production-logging */
|
|
1710
|
+
prevLog = console.log;
|
|
1711
|
+
prevInfo = console.info;
|
|
1712
|
+
prevWarn = console.warn;
|
|
1713
|
+
prevError = console.error;
|
|
1714
|
+
prevGroup = console.group;
|
|
1715
|
+
prevGroupCollapsed = console.groupCollapsed;
|
|
1716
|
+
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
|
|
1717
|
+
|
|
1718
|
+
var props = {
|
|
1719
|
+
configurable: true,
|
|
1720
|
+
enumerable: true,
|
|
1721
|
+
value: disabledLog,
|
|
1722
|
+
writable: true
|
|
1723
|
+
}; // $FlowFixMe Flow thinks console is immutable.
|
|
1724
|
+
|
|
1725
|
+
Object.defineProperties(console, {
|
|
1726
|
+
info: props,
|
|
1727
|
+
log: props,
|
|
1728
|
+
warn: props,
|
|
1729
|
+
error: props,
|
|
1730
|
+
group: props,
|
|
1731
|
+
groupCollapsed: props,
|
|
1732
|
+
groupEnd: props
|
|
1733
|
+
});
|
|
1734
|
+
/* eslint-enable react-internal/no-production-logging */
|
|
1735
|
+
}
|
|
1736
|
+
disabledDepth++;
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
function reenableLogs() {
|
|
1740
|
+
{
|
|
1741
|
+
disabledDepth--;
|
|
1742
|
+
if (disabledDepth === 0) {
|
|
1743
|
+
/* eslint-disable react-internal/no-production-logging */
|
|
1744
|
+
var props = {
|
|
1745
|
+
configurable: true,
|
|
1746
|
+
enumerable: true,
|
|
1747
|
+
writable: true
|
|
1748
|
+
}; // $FlowFixMe Flow thinks console is immutable.
|
|
1749
|
+
|
|
1750
|
+
Object.defineProperties(console, {
|
|
1751
|
+
log: assign({}, props, {
|
|
1752
|
+
value: prevLog
|
|
1753
|
+
}),
|
|
1754
|
+
info: assign({}, props, {
|
|
1755
|
+
value: prevInfo
|
|
1756
|
+
}),
|
|
1757
|
+
warn: assign({}, props, {
|
|
1758
|
+
value: prevWarn
|
|
1759
|
+
}),
|
|
1760
|
+
error: assign({}, props, {
|
|
1761
|
+
value: prevError
|
|
1762
|
+
}),
|
|
1763
|
+
group: assign({}, props, {
|
|
1764
|
+
value: prevGroup
|
|
1765
|
+
}),
|
|
1766
|
+
groupCollapsed: assign({}, props, {
|
|
1767
|
+
value: prevGroupCollapsed
|
|
1768
|
+
}),
|
|
1769
|
+
groupEnd: assign({}, props, {
|
|
1770
|
+
value: prevGroupEnd
|
|
1771
|
+
})
|
|
1772
|
+
});
|
|
1773
|
+
/* eslint-enable react-internal/no-production-logging */
|
|
1774
|
+
}
|
|
1775
|
+
if (disabledDepth < 0) {
|
|
1776
|
+
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
|
1781
|
+
var prefix;
|
|
1782
|
+
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
1783
|
+
{
|
|
1784
|
+
if (prefix === undefined) {
|
|
1785
|
+
// Extract the VM specific prefix used by each line.
|
|
1786
|
+
try {
|
|
1787
|
+
throw Error();
|
|
1788
|
+
} catch (x) {
|
|
1789
|
+
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
1790
|
+
prefix = match && match[1] || '';
|
|
1791
|
+
}
|
|
1792
|
+
} // We use the prefix to ensure our stacks line up with native stack frames.
|
|
1793
|
+
|
|
1794
|
+
return '\n' + prefix + name;
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
var reentry = false;
|
|
1798
|
+
var componentFrameCache;
|
|
1799
|
+
{
|
|
1800
|
+
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
|
|
1801
|
+
componentFrameCache = new PossiblyWeakMap();
|
|
1802
|
+
}
|
|
1803
|
+
function describeNativeComponentFrame(fn, construct) {
|
|
1804
|
+
// If something asked for a stack inside a fake render, it should get ignored.
|
|
1805
|
+
if (!fn || reentry) {
|
|
1806
|
+
return '';
|
|
1807
|
+
}
|
|
1808
|
+
{
|
|
1809
|
+
var frame = componentFrameCache.get(fn);
|
|
1810
|
+
if (frame !== undefined) {
|
|
1811
|
+
return frame;
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
var control;
|
|
1815
|
+
reentry = true;
|
|
1816
|
+
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
|
|
1817
|
+
|
|
1818
|
+
Error.prepareStackTrace = undefined;
|
|
1819
|
+
var previousDispatcher;
|
|
1820
|
+
{
|
|
1821
|
+
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
|
|
1822
|
+
// for warnings.
|
|
1823
|
+
|
|
1824
|
+
ReactCurrentDispatcher.current = null;
|
|
1825
|
+
disableLogs();
|
|
1826
|
+
}
|
|
1827
|
+
try {
|
|
1828
|
+
// This should throw.
|
|
1829
|
+
if (construct) {
|
|
1830
|
+
// Something should be setting the props in the constructor.
|
|
1831
|
+
var Fake = function () {
|
|
1832
|
+
throw Error();
|
|
1833
|
+
}; // $FlowFixMe
|
|
1834
|
+
|
|
1835
|
+
Object.defineProperty(Fake.prototype, 'props', {
|
|
1836
|
+
set: function () {
|
|
1837
|
+
// We use a throwing setter instead of frozen or non-writable props
|
|
1838
|
+
// because that won't throw in a non-strict mode function.
|
|
1839
|
+
throw Error();
|
|
1840
|
+
}
|
|
1841
|
+
});
|
|
1842
|
+
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
1843
|
+
// We construct a different control for this case to include any extra
|
|
1844
|
+
// frames added by the construct call.
|
|
1845
|
+
try {
|
|
1846
|
+
Reflect.construct(Fake, []);
|
|
1847
|
+
} catch (x) {
|
|
1848
|
+
control = x;
|
|
1849
|
+
}
|
|
1850
|
+
Reflect.construct(fn, [], Fake);
|
|
1851
|
+
} else {
|
|
1852
|
+
try {
|
|
1853
|
+
Fake.call();
|
|
1854
|
+
} catch (x) {
|
|
1855
|
+
control = x;
|
|
1856
|
+
}
|
|
1857
|
+
fn.call(Fake.prototype);
|
|
1858
|
+
}
|
|
1859
|
+
} else {
|
|
1860
|
+
try {
|
|
1861
|
+
throw Error();
|
|
1862
|
+
} catch (x) {
|
|
1863
|
+
control = x;
|
|
1864
|
+
}
|
|
1865
|
+
fn();
|
|
1866
|
+
}
|
|
1867
|
+
} catch (sample) {
|
|
1868
|
+
// This is inlined manually because closure doesn't do it for us.
|
|
1869
|
+
if (sample && control && typeof sample.stack === 'string') {
|
|
1870
|
+
// This extracts the first frame from the sample that isn't also in the control.
|
|
1871
|
+
// Skipping one frame that we assume is the frame that calls the two.
|
|
1872
|
+
var sampleLines = sample.stack.split('\n');
|
|
1873
|
+
var controlLines = control.stack.split('\n');
|
|
1874
|
+
var s = sampleLines.length - 1;
|
|
1875
|
+
var c = controlLines.length - 1;
|
|
1876
|
+
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
1877
|
+
// We expect at least one stack frame to be shared.
|
|
1878
|
+
// Typically this will be the root most one. However, stack frames may be
|
|
1879
|
+
// cut off due to maximum stack limits. In this case, one maybe cut off
|
|
1880
|
+
// earlier than the other. We assume that the sample is longer or the same
|
|
1881
|
+
// and there for cut off earlier. So we should find the root most frame in
|
|
1882
|
+
// the sample somewhere in the control.
|
|
1883
|
+
c--;
|
|
1884
|
+
}
|
|
1885
|
+
for (; s >= 1 && c >= 0; s--, c--) {
|
|
1886
|
+
// Next we find the first one that isn't the same which should be the
|
|
1887
|
+
// frame that called our sample function and the control.
|
|
1888
|
+
if (sampleLines[s] !== controlLines[c]) {
|
|
1889
|
+
// In V8, the first line is describing the message but other VMs don't.
|
|
1890
|
+
// If we're about to return the first line, and the control is also on the same
|
|
1891
|
+
// line, that's a pretty good indicator that our sample threw at same line as
|
|
1892
|
+
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
|
1893
|
+
// This can happen if you passed a class to function component, or non-function.
|
|
1894
|
+
if (s !== 1 || c !== 1) {
|
|
1895
|
+
do {
|
|
1896
|
+
s--;
|
|
1897
|
+
c--; // We may still have similar intermediate frames from the construct call.
|
|
1898
|
+
// The next one that isn't the same should be our match though.
|
|
1899
|
+
|
|
1900
|
+
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
1901
|
+
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
|
1902
|
+
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
|
|
1903
|
+
// but we have a user-provided "displayName"
|
|
1904
|
+
// splice it in to make the stack more readable.
|
|
1905
|
+
|
|
1906
|
+
if (fn.displayName && _frame.includes('<anonymous>')) {
|
|
1907
|
+
_frame = _frame.replace('<anonymous>', fn.displayName);
|
|
1908
|
+
}
|
|
1909
|
+
{
|
|
1910
|
+
if (typeof fn === 'function') {
|
|
1911
|
+
componentFrameCache.set(fn, _frame);
|
|
1912
|
+
}
|
|
1913
|
+
} // Return the line we found.
|
|
1914
|
+
|
|
1915
|
+
return _frame;
|
|
1916
|
+
}
|
|
1917
|
+
} while (s >= 1 && c >= 0);
|
|
1918
|
+
}
|
|
1919
|
+
break;
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
} finally {
|
|
1924
|
+
reentry = false;
|
|
1925
|
+
{
|
|
1926
|
+
ReactCurrentDispatcher.current = previousDispatcher;
|
|
1927
|
+
reenableLogs();
|
|
1928
|
+
}
|
|
1929
|
+
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
1930
|
+
} // Fallback to just using the name if we couldn't make it throw.
|
|
1931
|
+
|
|
1932
|
+
var name = fn ? fn.displayName || fn.name : '';
|
|
1933
|
+
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
|
1934
|
+
{
|
|
1935
|
+
if (typeof fn === 'function') {
|
|
1936
|
+
componentFrameCache.set(fn, syntheticFrame);
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
return syntheticFrame;
|
|
1940
|
+
}
|
|
1941
|
+
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
1942
|
+
{
|
|
1943
|
+
return describeNativeComponentFrame(fn, false);
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
function shouldConstruct(Component) {
|
|
1947
|
+
var prototype = Component.prototype;
|
|
1948
|
+
return !!(prototype && prototype.isReactComponent);
|
|
1949
|
+
}
|
|
1950
|
+
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
1951
|
+
if (type == null) {
|
|
1952
|
+
return '';
|
|
1953
|
+
}
|
|
1954
|
+
if (typeof type === 'function') {
|
|
1955
|
+
{
|
|
1956
|
+
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
if (typeof type === 'string') {
|
|
1960
|
+
return describeBuiltInComponentFrame(type);
|
|
1961
|
+
}
|
|
1962
|
+
switch (type) {
|
|
1963
|
+
case REACT_SUSPENSE_TYPE:
|
|
1964
|
+
return describeBuiltInComponentFrame('Suspense');
|
|
1965
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
1966
|
+
return describeBuiltInComponentFrame('SuspenseList');
|
|
1967
|
+
}
|
|
1968
|
+
if (typeof type === 'object') {
|
|
1969
|
+
switch (type.$$typeof) {
|
|
1970
|
+
case REACT_FORWARD_REF_TYPE:
|
|
1971
|
+
return describeFunctionComponentFrame(type.render);
|
|
1972
|
+
case REACT_MEMO_TYPE:
|
|
1973
|
+
// Memo may contain any component type so we recursively resolve it.
|
|
1974
|
+
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
1975
|
+
case REACT_LAZY_TYPE:
|
|
1976
|
+
{
|
|
1977
|
+
var lazyComponent = type;
|
|
1978
|
+
var payload = lazyComponent._payload;
|
|
1979
|
+
var init = lazyComponent._init;
|
|
1980
|
+
try {
|
|
1981
|
+
// Lazy may contain any component type so we recursively resolve it.
|
|
1982
|
+
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
1983
|
+
} catch (x) {}
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
return '';
|
|
1988
|
+
}
|
|
1989
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1990
|
+
var loggedTypeFailures = {};
|
|
1991
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
1992
|
+
function setCurrentlyValidatingElement(element) {
|
|
1993
|
+
{
|
|
1994
|
+
if (element) {
|
|
1995
|
+
var owner = element._owner;
|
|
1996
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
1997
|
+
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
1998
|
+
} else {
|
|
1999
|
+
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
2004
|
+
{
|
|
2005
|
+
// $FlowFixMe This is okay but Flow doesn't know it.
|
|
2006
|
+
var has = Function.call.bind(hasOwnProperty);
|
|
2007
|
+
for (var typeSpecName in typeSpecs) {
|
|
2008
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
2009
|
+
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
|
|
2010
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
2011
|
+
// After these have been cleaned up, we'll let them throw.
|
|
2012
|
+
|
|
2013
|
+
try {
|
|
2014
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
2015
|
+
// behavior as without this statement except with a better message.
|
|
2016
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
2017
|
+
// eslint-disable-next-line react-internal/prod-error-codes
|
|
2018
|
+
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`.');
|
|
2019
|
+
err.name = 'Invariant Violation';
|
|
2020
|
+
throw err;
|
|
2021
|
+
}
|
|
2022
|
+
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
|
2023
|
+
} catch (ex) {
|
|
2024
|
+
error$1 = ex;
|
|
2025
|
+
}
|
|
2026
|
+
if (error$1 && !(error$1 instanceof Error)) {
|
|
2027
|
+
setCurrentlyValidatingElement(element);
|
|
2028
|
+
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);
|
|
2029
|
+
setCurrentlyValidatingElement(null);
|
|
2030
|
+
}
|
|
2031
|
+
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
2032
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
2033
|
+
// same error.
|
|
2034
|
+
loggedTypeFailures[error$1.message] = true;
|
|
2035
|
+
setCurrentlyValidatingElement(element);
|
|
2036
|
+
error('Failed %s type: %s', location, error$1.message);
|
|
2037
|
+
setCurrentlyValidatingElement(null);
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
|
2044
|
+
|
|
2045
|
+
function isArray(a) {
|
|
2046
|
+
return isArrayImpl(a);
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
/*
|
|
2050
|
+
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
|
|
2051
|
+
* and Temporal.* types. See https://github.com/facebook/react/pull/22064.
|
|
2052
|
+
*
|
|
2053
|
+
* The functions in this module will throw an easier-to-understand,
|
|
2054
|
+
* easier-to-debug exception with a clear errors message message explaining the
|
|
2055
|
+
* problem. (Instead of a confusing exception thrown inside the implementation
|
|
2056
|
+
* of the `value` object).
|
|
2057
|
+
*/
|
|
2058
|
+
// $FlowFixMe only called in DEV, so void return is not possible.
|
|
2059
|
+
function typeName(value) {
|
|
2060
|
+
{
|
|
2061
|
+
// toStringTag is needed for namespaced types like Temporal.Instant
|
|
2062
|
+
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
|
|
2063
|
+
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
|
|
2064
|
+
return type;
|
|
2065
|
+
}
|
|
2066
|
+
} // $FlowFixMe only called in DEV, so void return is not possible.
|
|
2067
|
+
|
|
2068
|
+
function willCoercionThrow(value) {
|
|
2069
|
+
{
|
|
2070
|
+
try {
|
|
2071
|
+
testStringCoercion(value);
|
|
2072
|
+
return false;
|
|
2073
|
+
} catch (e) {
|
|
2074
|
+
return true;
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
function testStringCoercion(value) {
|
|
2079
|
+
// If you ended up here by following an exception call stack, here's what's
|
|
2080
|
+
// happened: you supplied an object or symbol value to React (as a prop, key,
|
|
2081
|
+
// DOM attribute, CSS property, string ref, etc.) and when React tried to
|
|
2082
|
+
// coerce it to a string using `'' + value`, an exception was thrown.
|
|
2083
|
+
//
|
|
2084
|
+
// The most common types that will cause this exception are `Symbol` instances
|
|
2085
|
+
// and Temporal objects like `Temporal.Instant`. But any object that has a
|
|
2086
|
+
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
|
|
2087
|
+
// exception. (Library authors do this to prevent users from using built-in
|
|
2088
|
+
// numeric operators like `+` or comparison operators like `>=` because custom
|
|
2089
|
+
// methods are needed to perform accurate arithmetic or comparison.)
|
|
2090
|
+
//
|
|
2091
|
+
// To fix the problem, coerce this object or symbol value to a string before
|
|
2092
|
+
// passing it to React. The most reliable way is usually `String(value)`.
|
|
2093
|
+
//
|
|
2094
|
+
// To find which value is throwing, check the browser or debugger console.
|
|
2095
|
+
// Before this exception was thrown, there should be `console.error` output
|
|
2096
|
+
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
|
|
2097
|
+
// problem and how that type was used: key, atrribute, input value prop, etc.
|
|
2098
|
+
// In most cases, this console output also shows the component and its
|
|
2099
|
+
// ancestor components where the exception happened.
|
|
2100
|
+
//
|
|
2101
|
+
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
2102
|
+
return '' + value;
|
|
2103
|
+
}
|
|
2104
|
+
function checkKeyStringCoercion(value) {
|
|
2105
|
+
{
|
|
2106
|
+
if (willCoercionThrow(value)) {
|
|
2107
|
+
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
|
|
2108
|
+
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2112
|
+
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
2113
|
+
var RESERVED_PROPS = {
|
|
2114
|
+
key: true,
|
|
2115
|
+
ref: true,
|
|
2116
|
+
__self: true,
|
|
2117
|
+
__source: true
|
|
2118
|
+
};
|
|
2119
|
+
var specialPropKeyWarningShown;
|
|
2120
|
+
var specialPropRefWarningShown;
|
|
2121
|
+
var didWarnAboutStringRefs;
|
|
2122
|
+
{
|
|
2123
|
+
didWarnAboutStringRefs = {};
|
|
2124
|
+
}
|
|
2125
|
+
function hasValidRef(config) {
|
|
2126
|
+
{
|
|
2127
|
+
if (hasOwnProperty.call(config, 'ref')) {
|
|
2128
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
|
2129
|
+
if (getter && getter.isReactWarning) {
|
|
2130
|
+
return false;
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
return config.ref !== undefined;
|
|
2135
|
+
}
|
|
2136
|
+
function hasValidKey(config) {
|
|
2137
|
+
{
|
|
2138
|
+
if (hasOwnProperty.call(config, 'key')) {
|
|
2139
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
|
2140
|
+
if (getter && getter.isReactWarning) {
|
|
2141
|
+
return false;
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
return config.key !== undefined;
|
|
2146
|
+
}
|
|
2147
|
+
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
2148
|
+
{
|
|
2149
|
+
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
|
2150
|
+
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
2151
|
+
if (!didWarnAboutStringRefs[componentName]) {
|
|
2152
|
+
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);
|
|
2153
|
+
didWarnAboutStringRefs[componentName] = true;
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
2159
|
+
{
|
|
2160
|
+
var warnAboutAccessingKey = function () {
|
|
2161
|
+
if (!specialPropKeyWarningShown) {
|
|
2162
|
+
specialPropKeyWarningShown = true;
|
|
2163
|
+
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);
|
|
2164
|
+
}
|
|
2165
|
+
};
|
|
2166
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
2167
|
+
Object.defineProperty(props, 'key', {
|
|
2168
|
+
get: warnAboutAccessingKey,
|
|
2169
|
+
configurable: true
|
|
2170
|
+
});
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
function defineRefPropWarningGetter(props, displayName) {
|
|
2174
|
+
{
|
|
2175
|
+
var warnAboutAccessingRef = function () {
|
|
2176
|
+
if (!specialPropRefWarningShown) {
|
|
2177
|
+
specialPropRefWarningShown = true;
|
|
2178
|
+
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);
|
|
2179
|
+
}
|
|
2180
|
+
};
|
|
2181
|
+
warnAboutAccessingRef.isReactWarning = true;
|
|
2182
|
+
Object.defineProperty(props, 'ref', {
|
|
2183
|
+
get: warnAboutAccessingRef,
|
|
2184
|
+
configurable: true
|
|
2185
|
+
});
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
/**
|
|
2189
|
+
* Factory method to create a new React element. This no longer adheres to
|
|
2190
|
+
* the class pattern, so do not use new to call it. Also, instanceof check
|
|
2191
|
+
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
|
2192
|
+
* if something is a React Element.
|
|
2193
|
+
*
|
|
2194
|
+
* @param {*} type
|
|
2195
|
+
* @param {*} props
|
|
2196
|
+
* @param {*} key
|
|
2197
|
+
* @param {string|object} ref
|
|
2198
|
+
* @param {*} owner
|
|
2199
|
+
* @param {*} self A *temporary* helper to detect places where `this` is
|
|
2200
|
+
* different from the `owner` when React.createElement is called, so that we
|
|
2201
|
+
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
|
2202
|
+
* functions, and as long as `this` and owner are the same, there will be no
|
|
2203
|
+
* change in behavior.
|
|
2204
|
+
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
|
2205
|
+
* indicating filename, line number, and/or other information.
|
|
2206
|
+
* @internal
|
|
2207
|
+
*/
|
|
2208
|
+
|
|
2209
|
+
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
2210
|
+
var element = {
|
|
2211
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
2212
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
2213
|
+
// Built-in properties that belong on the element
|
|
2214
|
+
type: type,
|
|
2215
|
+
key: key,
|
|
2216
|
+
ref: ref,
|
|
2217
|
+
props: props,
|
|
2218
|
+
// Record the component responsible for creating this element.
|
|
2219
|
+
_owner: owner
|
|
2220
|
+
};
|
|
2221
|
+
{
|
|
2222
|
+
// The validation flag is currently mutative. We put it on
|
|
2223
|
+
// an external backing store so that we can freeze the whole object.
|
|
2224
|
+
// This can be replaced with a WeakMap once they are implemented in
|
|
2225
|
+
// commonly used development environments.
|
|
2226
|
+
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
|
2227
|
+
// the validation flag non-enumerable (where possible, which should
|
|
2228
|
+
// include every environment we run tests in), so the test framework
|
|
2229
|
+
// ignores it.
|
|
2230
|
+
|
|
2231
|
+
Object.defineProperty(element._store, 'validated', {
|
|
2232
|
+
configurable: false,
|
|
2233
|
+
enumerable: false,
|
|
2234
|
+
writable: true,
|
|
2235
|
+
value: false
|
|
2236
|
+
}); // self and source are DEV only properties.
|
|
2237
|
+
|
|
2238
|
+
Object.defineProperty(element, '_self', {
|
|
2239
|
+
configurable: false,
|
|
2240
|
+
enumerable: false,
|
|
2241
|
+
writable: false,
|
|
2242
|
+
value: self
|
|
2243
|
+
}); // Two elements created in two different places should be considered
|
|
2244
|
+
// equal for testing purposes and therefore we hide it from enumeration.
|
|
2245
|
+
|
|
2246
|
+
Object.defineProperty(element, '_source', {
|
|
2247
|
+
configurable: false,
|
|
2248
|
+
enumerable: false,
|
|
2249
|
+
writable: false,
|
|
2250
|
+
value: source
|
|
2251
|
+
});
|
|
2252
|
+
if (Object.freeze) {
|
|
2253
|
+
Object.freeze(element.props);
|
|
2254
|
+
Object.freeze(element);
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
return element;
|
|
2258
|
+
};
|
|
2259
|
+
/**
|
|
2260
|
+
* https://github.com/reactjs/rfcs/pull/107
|
|
2261
|
+
* @param {*} type
|
|
2262
|
+
* @param {object} props
|
|
2263
|
+
* @param {string} key
|
|
2264
|
+
*/
|
|
2265
|
+
|
|
2266
|
+
function jsxDEV(type, config, maybeKey, source, self) {
|
|
2267
|
+
{
|
|
2268
|
+
var propName; // Reserved names are extracted
|
|
2269
|
+
|
|
2270
|
+
var props = {};
|
|
2271
|
+
var key = null;
|
|
2272
|
+
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
|
2273
|
+
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
|
2274
|
+
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
|
2275
|
+
// but as an intermediary step, we will use jsxDEV for everything except
|
|
2276
|
+
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
|
2277
|
+
// key is explicitly declared to be undefined or not.
|
|
2278
|
+
|
|
2279
|
+
if (maybeKey !== undefined) {
|
|
2280
|
+
{
|
|
2281
|
+
checkKeyStringCoercion(maybeKey);
|
|
2282
|
+
}
|
|
2283
|
+
key = '' + maybeKey;
|
|
2284
|
+
}
|
|
2285
|
+
if (hasValidKey(config)) {
|
|
2286
|
+
{
|
|
2287
|
+
checkKeyStringCoercion(config.key);
|
|
2288
|
+
}
|
|
2289
|
+
key = '' + config.key;
|
|
2290
|
+
}
|
|
2291
|
+
if (hasValidRef(config)) {
|
|
2292
|
+
ref = config.ref;
|
|
2293
|
+
warnIfStringRefCannotBeAutoConverted(config, self);
|
|
2294
|
+
} // Remaining properties are added to a new props object
|
|
2295
|
+
|
|
2296
|
+
for (propName in config) {
|
|
2297
|
+
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
2298
|
+
props[propName] = config[propName];
|
|
2299
|
+
}
|
|
2300
|
+
} // Resolve default props
|
|
2301
|
+
|
|
2302
|
+
if (type && type.defaultProps) {
|
|
2303
|
+
var defaultProps = type.defaultProps;
|
|
2304
|
+
for (propName in defaultProps) {
|
|
2305
|
+
if (props[propName] === undefined) {
|
|
2306
|
+
props[propName] = defaultProps[propName];
|
|
2307
|
+
}
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
if (key || ref) {
|
|
2311
|
+
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
2312
|
+
if (key) {
|
|
2313
|
+
defineKeyPropWarningGetter(props, displayName);
|
|
2314
|
+
}
|
|
2315
|
+
if (ref) {
|
|
2316
|
+
defineRefPropWarningGetter(props, displayName);
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
2323
|
+
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
2324
|
+
function setCurrentlyValidatingElement$1(element) {
|
|
2325
|
+
{
|
|
2326
|
+
if (element) {
|
|
2327
|
+
var owner = element._owner;
|
|
2328
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
2329
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
2330
|
+
} else {
|
|
2331
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
var propTypesMisspellWarningShown;
|
|
2336
|
+
{
|
|
2337
|
+
propTypesMisspellWarningShown = false;
|
|
2338
|
+
}
|
|
2339
|
+
/**
|
|
2340
|
+
* Verifies the object is a ReactElement.
|
|
2341
|
+
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
2342
|
+
* @param {?object} object
|
|
2343
|
+
* @return {boolean} True if `object` is a ReactElement.
|
|
2344
|
+
* @final
|
|
2345
|
+
*/
|
|
2346
|
+
|
|
2347
|
+
function isValidElement(object) {
|
|
2348
|
+
{
|
|
2349
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
2352
|
+
function getDeclarationErrorAddendum() {
|
|
2353
|
+
{
|
|
2354
|
+
if (ReactCurrentOwner$1.current) {
|
|
2355
|
+
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
2356
|
+
if (name) {
|
|
2357
|
+
return '\n\nCheck the render method of `' + name + '`.';
|
|
2358
|
+
}
|
|
2359
|
+
}
|
|
2360
|
+
return '';
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
function getSourceInfoErrorAddendum(source) {
|
|
2364
|
+
{
|
|
2365
|
+
return '';
|
|
2366
|
+
}
|
|
2367
|
+
}
|
|
2368
|
+
/**
|
|
2369
|
+
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
2370
|
+
* object keys are not valid. This allows us to keep track of children between
|
|
2371
|
+
* updates.
|
|
2372
|
+
*/
|
|
2373
|
+
|
|
2374
|
+
var ownerHasKeyUseWarning = {};
|
|
2375
|
+
function getCurrentComponentErrorInfo(parentType) {
|
|
2376
|
+
{
|
|
2377
|
+
var info = getDeclarationErrorAddendum();
|
|
2378
|
+
if (!info) {
|
|
2379
|
+
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
|
2380
|
+
if (parentName) {
|
|
2381
|
+
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
return info;
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
/**
|
|
2388
|
+
* Warn if the element doesn't have an explicit key assigned to it.
|
|
2389
|
+
* This element is in an array. The array could grow and shrink or be
|
|
2390
|
+
* reordered. All children that haven't already been validated are required to
|
|
2391
|
+
* have a "key" property assigned to it. Error statuses are cached so a warning
|
|
2392
|
+
* will only be shown once.
|
|
2393
|
+
*
|
|
2394
|
+
* @internal
|
|
2395
|
+
* @param {ReactElement} element Element that requires a key.
|
|
2396
|
+
* @param {*} parentType element's parent's type.
|
|
2397
|
+
*/
|
|
2398
|
+
|
|
2399
|
+
function validateExplicitKey(element, parentType) {
|
|
2400
|
+
{
|
|
2401
|
+
if (!element._store || element._store.validated || element.key != null) {
|
|
2402
|
+
return;
|
|
2403
|
+
}
|
|
2404
|
+
element._store.validated = true;
|
|
2405
|
+
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
2406
|
+
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
2407
|
+
return;
|
|
2408
|
+
}
|
|
2409
|
+
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
|
2410
|
+
// property, it may be the creator of the child that's responsible for
|
|
2411
|
+
// assigning it a key.
|
|
2412
|
+
|
|
2413
|
+
var childOwner = '';
|
|
2414
|
+
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
|
2415
|
+
// Give the component that originally created this child.
|
|
2416
|
+
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
2417
|
+
}
|
|
2418
|
+
setCurrentlyValidatingElement$1(element);
|
|
2419
|
+
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);
|
|
2420
|
+
setCurrentlyValidatingElement$1(null);
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
/**
|
|
2424
|
+
* Ensure that every element either is passed in a static location, in an
|
|
2425
|
+
* array with an explicit keys property defined, or in an object literal
|
|
2426
|
+
* with valid key property.
|
|
2427
|
+
*
|
|
2428
|
+
* @internal
|
|
2429
|
+
* @param {ReactNode} node Statically passed child of any type.
|
|
2430
|
+
* @param {*} parentType node's parent's type.
|
|
2431
|
+
*/
|
|
2432
|
+
|
|
2433
|
+
function validateChildKeys(node, parentType) {
|
|
2434
|
+
{
|
|
2435
|
+
if (typeof node !== 'object') {
|
|
2436
|
+
return;
|
|
2437
|
+
}
|
|
2438
|
+
if (isArray(node)) {
|
|
2439
|
+
for (var i = 0; i < node.length; i++) {
|
|
2440
|
+
var child = node[i];
|
|
2441
|
+
if (isValidElement(child)) {
|
|
2442
|
+
validateExplicitKey(child, parentType);
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
} else if (isValidElement(node)) {
|
|
2446
|
+
// This element was passed in a valid location.
|
|
2447
|
+
if (node._store) {
|
|
2448
|
+
node._store.validated = true;
|
|
2449
|
+
}
|
|
2450
|
+
} else if (node) {
|
|
2451
|
+
var iteratorFn = getIteratorFn(node);
|
|
2452
|
+
if (typeof iteratorFn === 'function') {
|
|
2453
|
+
// Entry iterators used to provide implicit keys,
|
|
2454
|
+
// but now we print a separate warning for them later.
|
|
2455
|
+
if (iteratorFn !== node.entries) {
|
|
2456
|
+
var iterator = iteratorFn.call(node);
|
|
2457
|
+
var step;
|
|
2458
|
+
while (!(step = iterator.next()).done) {
|
|
2459
|
+
if (isValidElement(step.value)) {
|
|
2460
|
+
validateExplicitKey(step.value, parentType);
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2465
|
+
}
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
/**
|
|
2469
|
+
* Given an element, validate that its props follow the propTypes definition,
|
|
2470
|
+
* provided by the type.
|
|
2471
|
+
*
|
|
2472
|
+
* @param {ReactElement} element
|
|
2473
|
+
*/
|
|
2474
|
+
|
|
2475
|
+
function validatePropTypes(element) {
|
|
2476
|
+
{
|
|
2477
|
+
var type = element.type;
|
|
2478
|
+
if (type === null || type === undefined || typeof type === 'string') {
|
|
2479
|
+
return;
|
|
2480
|
+
}
|
|
2481
|
+
var propTypes;
|
|
2482
|
+
if (typeof type === 'function') {
|
|
2483
|
+
propTypes = type.propTypes;
|
|
2484
|
+
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE ||
|
|
2485
|
+
// Note: Memo only checks outer props here.
|
|
2486
|
+
// Inner props are checked in the reconciler.
|
|
2487
|
+
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
2488
|
+
propTypes = type.propTypes;
|
|
2489
|
+
} else {
|
|
2490
|
+
return;
|
|
2491
|
+
}
|
|
2492
|
+
if (propTypes) {
|
|
2493
|
+
// Intentionally inside to avoid triggering lazy initializers:
|
|
2494
|
+
var name = getComponentNameFromType(type);
|
|
2495
|
+
checkPropTypes(propTypes, element.props, 'prop', name, element);
|
|
2496
|
+
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
2497
|
+
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
|
|
2498
|
+
|
|
2499
|
+
var _name = getComponentNameFromType(type);
|
|
2500
|
+
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
|
2501
|
+
}
|
|
2502
|
+
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
|
|
2503
|
+
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2507
|
+
/**
|
|
2508
|
+
* Given a fragment, validate that it can only be provided with fragment props
|
|
2509
|
+
* @param {ReactElement} fragment
|
|
2510
|
+
*/
|
|
2511
|
+
|
|
2512
|
+
function validateFragmentProps(fragment) {
|
|
2513
|
+
{
|
|
2514
|
+
var keys = Object.keys(fragment.props);
|
|
2515
|
+
for (var i = 0; i < keys.length; i++) {
|
|
2516
|
+
var key = keys[i];
|
|
2517
|
+
if (key !== 'children' && key !== 'key') {
|
|
2518
|
+
setCurrentlyValidatingElement$1(fragment);
|
|
2519
|
+
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
|
2520
|
+
setCurrentlyValidatingElement$1(null);
|
|
2521
|
+
break;
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
if (fragment.ref !== null) {
|
|
2525
|
+
setCurrentlyValidatingElement$1(fragment);
|
|
2526
|
+
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
|
2527
|
+
setCurrentlyValidatingElement$1(null);
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
2532
|
+
{
|
|
2533
|
+
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
|
|
2534
|
+
// succeed and there will likely be errors in render.
|
|
2535
|
+
|
|
2536
|
+
if (!validType) {
|
|
2537
|
+
var info = '';
|
|
2538
|
+
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
2539
|
+
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.";
|
|
2540
|
+
}
|
|
2541
|
+
var sourceInfo = getSourceInfoErrorAddendum();
|
|
2542
|
+
if (sourceInfo) {
|
|
2543
|
+
info += sourceInfo;
|
|
2544
|
+
} else {
|
|
2545
|
+
info += getDeclarationErrorAddendum();
|
|
2546
|
+
}
|
|
2547
|
+
var typeString;
|
|
2548
|
+
if (type === null) {
|
|
2549
|
+
typeString = 'null';
|
|
2550
|
+
} else if (isArray(type)) {
|
|
2551
|
+
typeString = 'array';
|
|
2552
|
+
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
2553
|
+
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
|
|
2554
|
+
info = ' Did you accidentally export a JSX literal instead of a component?';
|
|
2555
|
+
} else {
|
|
2556
|
+
typeString = typeof type;
|
|
2557
|
+
}
|
|
2558
|
+
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);
|
|
2559
|
+
}
|
|
2560
|
+
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
|
|
2561
|
+
// TODO: Drop this when these are no longer allowed as the type argument.
|
|
2562
|
+
|
|
2563
|
+
if (element == null) {
|
|
2564
|
+
return element;
|
|
2565
|
+
} // Skip key warning if the type isn't valid since our key validation logic
|
|
2566
|
+
// doesn't expect a non-string/function type and can throw confusing errors.
|
|
2567
|
+
// We don't want exception behavior to differ between dev and prod.
|
|
2568
|
+
// (Rendering will throw with a helpful message and as soon as the type is
|
|
2569
|
+
// fixed, the key warnings will appear.)
|
|
2570
|
+
|
|
2571
|
+
if (validType) {
|
|
2572
|
+
var children = props.children;
|
|
2573
|
+
if (children !== undefined) {
|
|
2574
|
+
if (isStaticChildren) {
|
|
2575
|
+
if (isArray(children)) {
|
|
2576
|
+
for (var i = 0; i < children.length; i++) {
|
|
2577
|
+
validateChildKeys(children[i], type);
|
|
2578
|
+
}
|
|
2579
|
+
if (Object.freeze) {
|
|
2580
|
+
Object.freeze(children);
|
|
2581
|
+
}
|
|
2582
|
+
} else {
|
|
2583
|
+
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.');
|
|
2584
|
+
}
|
|
2585
|
+
} else {
|
|
2586
|
+
validateChildKeys(children, type);
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
if (type === REACT_FRAGMENT_TYPE) {
|
|
2591
|
+
validateFragmentProps(element);
|
|
2592
|
+
} else {
|
|
2593
|
+
validatePropTypes(element);
|
|
2594
|
+
}
|
|
2595
|
+
return element;
|
|
2596
|
+
}
|
|
2597
|
+
} // These two functions exist to still get child warnings in dev
|
|
2598
|
+
// even with the prod transform. This means that jsxDEV is purely
|
|
2599
|
+
// opt-in behavior for better messages but that we won't stop
|
|
2600
|
+
// giving you warnings if you use production apis.
|
|
2601
|
+
|
|
2602
|
+
function jsxWithValidationStatic(type, props, key) {
|
|
2603
|
+
{
|
|
2604
|
+
return jsxWithValidation(type, props, key, true);
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
function jsxWithValidationDynamic(type, props, key) {
|
|
2608
|
+
{
|
|
2609
|
+
return jsxWithValidation(type, props, key, false);
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
var jsx = jsxWithValidationDynamic; // we may want to special case jsxs internally to take advantage of static children.
|
|
2613
|
+
// for now we can ship identical prod functions
|
|
2614
|
+
|
|
2615
|
+
var jsxs = jsxWithValidationStatic;
|
|
2616
|
+
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
2617
|
+
reactJsxRuntime_development.jsx = jsx;
|
|
2618
|
+
reactJsxRuntime_development.jsxs = jsxs;
|
|
2619
|
+
})();
|
|
2620
|
+
}
|
|
2621
|
+
return reactJsxRuntime_development;
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
var hasRequiredJsxRuntime;
|
|
2625
|
+
function requireJsxRuntime() {
|
|
2626
|
+
if (hasRequiredJsxRuntime) return jsxRuntime.exports;
|
|
2627
|
+
hasRequiredJsxRuntime = 1;
|
|
2628
|
+
if (process.env.NODE_ENV === 'production') {
|
|
2629
|
+
jsxRuntime.exports = requireReactJsxRuntime_production_min();
|
|
2630
|
+
} else {
|
|
2631
|
+
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
2632
|
+
}
|
|
2633
|
+
return jsxRuntime.exports;
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2636
|
+
var jsxRuntimeExports = requireJsxRuntime();
|
|
2637
|
+
|
|
2638
|
+
const FormControl$1 = React.forwardRef(({ children, label, inputId, helperText, errorMessage, isFieldset, isOptional, customRequiredText, ...props }, ref) => (jsxRuntimeExports.jsxs(react.FormControl, { ...props, ref: ref, as: isFieldset ? 'fieldset' : 'div', borderWidth: "0", children: [label && (jsxRuntimeExports.jsx(react.FormLabel, { color: "gray.600", fontWeight: "semibold", marginBottom: helperText ? 0 : 1, fontSize: "sm", htmlFor: inputId, as: isFieldset ? 'legend' : 'label', requiredIndicator: props?.isRequired && customRequiredText ? (jsxRuntimeExports.jsx(react.Text, { marginLeft: 1, as: "span", variant: "caption", color: "text.secondary.light", children: customRequiredText })) : null, optionalIndicator: isOptional && !props?.isRequired ? (jsxRuntimeExports.jsx(react.Text, { marginLeft: 1, as: "span", variant: "caption", color: "text.secondary.light", children: "Optional" })) : null, children: label })), helperText && (jsxRuntimeExports.jsx(react.FormHelperText, { color: "gray.600", marginBottom: 1, fontSize: "xs", children: helperText })), children, jsxRuntimeExports.jsx(react.FormErrorMessage, { color: "error", mt: 1, fontSize: "xs", children: errorMessage })] })));
|
|
2639
|
+
FormControl$1.displayName = 'FormControl';
|
|
1513
2640
|
|
|
1514
|
-
const _excluded$
|
|
2641
|
+
const _excluded$n = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional"];
|
|
1515
2642
|
const Select$1 = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1516
2643
|
let {
|
|
1517
2644
|
label,
|
|
@@ -1522,7 +2649,7 @@ const Select$1 = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1522
2649
|
isRequired,
|
|
1523
2650
|
isOptional
|
|
1524
2651
|
} = _ref,
|
|
1525
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2652
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
1526
2653
|
const classes = cn__default.default({
|
|
1527
2654
|
'FormElement-contains-error': isInvalid
|
|
1528
2655
|
});
|
|
@@ -1557,7 +2684,7 @@ Select$1.propTypes = {
|
|
|
1557
2684
|
isOptional: PropTypes__default.default.bool
|
|
1558
2685
|
};
|
|
1559
2686
|
|
|
1560
|
-
const _excluded$
|
|
2687
|
+
const _excluded$m = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired"];
|
|
1561
2688
|
const Switch = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1562
2689
|
let {
|
|
1563
2690
|
label,
|
|
@@ -1567,7 +2694,7 @@ const Switch = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1567
2694
|
isDisabled,
|
|
1568
2695
|
isRequired
|
|
1569
2696
|
} = _ref,
|
|
1570
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2697
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
1571
2698
|
const classes = cn__default.default({
|
|
1572
2699
|
'FormElement-contains-error': isInvalid
|
|
1573
2700
|
});
|
|
@@ -1715,13 +2842,13 @@ const combineAsWithVariant = _ref => {
|
|
|
1715
2842
|
return styleProps;
|
|
1716
2843
|
};
|
|
1717
2844
|
|
|
1718
|
-
const _excluded$
|
|
2845
|
+
const _excluded$l = ["as", "variant"];
|
|
1719
2846
|
const Text = react.forwardRef((_ref, ref) => {
|
|
1720
2847
|
let {
|
|
1721
2848
|
as,
|
|
1722
2849
|
variant
|
|
1723
2850
|
} = _ref,
|
|
1724
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2851
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
1725
2852
|
return /*#__PURE__*/React__namespace.default.createElement(react.Text, _extends$6({
|
|
1726
2853
|
variant: variant,
|
|
1727
2854
|
as: as
|
|
@@ -1757,12 +2884,12 @@ const compactStyles = {
|
|
|
1757
2884
|
gap: 4
|
|
1758
2885
|
};
|
|
1759
2886
|
|
|
1760
|
-
const _excluded$
|
|
2887
|
+
const _excluded$k = ["isCompact"];
|
|
1761
2888
|
const Grid = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1762
2889
|
let {
|
|
1763
2890
|
isCompact
|
|
1764
2891
|
} = _ref,
|
|
1765
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2892
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
1766
2893
|
return /*#__PURE__*/React__namespace.default.createElement(react.Grid, _extends$6({}, baseStyles, isCompact && compactStyles, props, {
|
|
1767
2894
|
ref: ref
|
|
1768
2895
|
}));
|
|
@@ -1786,7 +2913,7 @@ const GridItem = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/Reac
|
|
|
1786
2913
|
ref: ref
|
|
1787
2914
|
})));
|
|
1788
2915
|
|
|
1789
|
-
const _excluded$
|
|
2916
|
+
const _excluded$j = ["type"];
|
|
1790
2917
|
const unorderedProps = {
|
|
1791
2918
|
as: 'ul',
|
|
1792
2919
|
styleType: 'disc'
|
|
@@ -1822,7 +2949,7 @@ const List = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1822
2949
|
let {
|
|
1823
2950
|
type
|
|
1824
2951
|
} = _ref,
|
|
1825
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2952
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
1826
2953
|
return /*#__PURE__*/React__namespace.default.createElement(react.List, _extends$6({}, getListProps(type), props, {
|
|
1827
2954
|
ref: ref
|
|
1828
2955
|
}));
|
|
@@ -1840,110 +2967,63 @@ List.propTypes = {
|
|
|
1840
2967
|
|
|
1841
2968
|
const spinnerStyles = react.theme.components.Spinner;
|
|
1842
2969
|
const SIZE_MAP = {
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
2970
|
+
xs: 'xs',
|
|
2971
|
+
sm: 'sm',
|
|
2972
|
+
md: 'md',
|
|
2973
|
+
lg: 'lg',
|
|
2974
|
+
xl: 'xl',
|
|
2975
|
+
'2xl': '2xl',
|
|
2976
|
+
'3xl': '3xl',
|
|
2977
|
+
'4xl': '4xl',
|
|
2978
|
+
'5xl': '5xl',
|
|
2979
|
+
'6xl': '6xl',
|
|
2980
|
+
'7xl': '7xl',
|
|
2981
|
+
'8xl': '8xl',
|
|
2982
|
+
'9xl': '9xl',
|
|
2983
|
+
'10xl': '10xl',
|
|
1857
2984
|
};
|
|
1858
2985
|
const sizes$5 = merge__default.default(spinnerStyles.sizes, {
|
|
1859
|
-
|
|
1860
|
-
w: '
|
|
1861
|
-
h: '
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
w: '
|
|
1865
|
-
h: '
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
w: '6rem',
|
|
1869
|
-
h: '6rem'
|
|
1870
|
-
},
|
|
1871
|
-
[SIZE_MAP['5xl']]: {
|
|
1872
|
-
w: '7rem',
|
|
1873
|
-
h: '7rem'
|
|
1874
|
-
},
|
|
1875
|
-
[SIZE_MAP['6xl']]: {
|
|
1876
|
-
w: '8rem',
|
|
1877
|
-
h: '8rem'
|
|
1878
|
-
},
|
|
1879
|
-
[SIZE_MAP['7xl']]: {
|
|
1880
|
-
w: '9rem',
|
|
1881
|
-
h: '9rem'
|
|
1882
|
-
},
|
|
1883
|
-
[SIZE_MAP['8xl']]: {
|
|
1884
|
-
w: '10rem',
|
|
1885
|
-
h: '10rem'
|
|
1886
|
-
},
|
|
1887
|
-
[SIZE_MAP['9xl']]: {
|
|
1888
|
-
w: '11rem',
|
|
1889
|
-
h: '11rem'
|
|
1890
|
-
},
|
|
1891
|
-
[SIZE_MAP['10xl']]: {
|
|
1892
|
-
w: '12rem',
|
|
1893
|
-
h: '12rem'
|
|
1894
|
-
}
|
|
2986
|
+
[SIZE_MAP['2xl']]: { w: '4rem', h: '4rem' },
|
|
2987
|
+
[SIZE_MAP['3xl']]: { w: '5rem', h: '5rem' },
|
|
2988
|
+
[SIZE_MAP['4xl']]: { w: '6rem', h: '6rem' },
|
|
2989
|
+
[SIZE_MAP['5xl']]: { w: '7rem', h: '7rem' },
|
|
2990
|
+
[SIZE_MAP['6xl']]: { w: '8rem', h: '8rem' },
|
|
2991
|
+
[SIZE_MAP['7xl']]: { w: '9rem', h: '9rem' },
|
|
2992
|
+
[SIZE_MAP['8xl']]: { w: '10rem', h: '10rem' },
|
|
2993
|
+
[SIZE_MAP['9xl']]: { w: '11rem', h: '11rem' },
|
|
2994
|
+
[SIZE_MAP['10xl']]: { w: '12rem', h: '12rem' },
|
|
1895
2995
|
});
|
|
1896
2996
|
const thicknesses = {
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
2997
|
+
[SIZE_MAP.xl]: 3,
|
|
2998
|
+
[SIZE_MAP['2xl']]: 4,
|
|
2999
|
+
[SIZE_MAP['3xl']]: 5,
|
|
3000
|
+
[SIZE_MAP['4xl']]: 6,
|
|
3001
|
+
[SIZE_MAP['5xl']]: 7,
|
|
3002
|
+
[SIZE_MAP['6xl']]: 8,
|
|
3003
|
+
[SIZE_MAP['7xl']]: 9,
|
|
3004
|
+
[SIZE_MAP['8xl']]: 10,
|
|
3005
|
+
[SIZE_MAP['9xl']]: 11,
|
|
3006
|
+
[SIZE_MAP['10xl']]: 12,
|
|
1907
3007
|
};
|
|
1908
3008
|
const defaultProps$8 = {
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
3009
|
+
speed: '2s',
|
|
3010
|
+
size: SIZE_MAP['2xl'],
|
|
3011
|
+
thickness: thicknesses[SIZE_MAP['2xl']],
|
|
1912
3012
|
};
|
|
1913
3013
|
var Spinner_styles = {
|
|
1914
|
-
|
|
1915
|
-
|
|
3014
|
+
sizes: sizes$5,
|
|
3015
|
+
defaultProps: defaultProps$8,
|
|
1916
3016
|
};
|
|
1917
3017
|
|
|
1918
|
-
const
|
|
1919
|
-
const
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
const thicknessString = thickness ? "".concat(thickness, "px") : thicknesses[size] ? "".concat(thicknesses[size], "px") : '2px';
|
|
1926
|
-
return /*#__PURE__*/React__namespace.default.createElement(react.Spinner, _extends$6({
|
|
1927
|
-
ref: ref,
|
|
1928
|
-
role: "status",
|
|
1929
|
-
color: "primary.default",
|
|
1930
|
-
emptyColor: "gray.medium",
|
|
1931
|
-
thickness: thicknessString,
|
|
1932
|
-
size: size || SIZE_MAP['2xl']
|
|
1933
|
-
}, props));
|
|
3018
|
+
const Spinner = React.forwardRef(({ size, thickness, ...props }, ref) => {
|
|
3019
|
+
const thicknessString = thickness
|
|
3020
|
+
? `${thickness}px`
|
|
3021
|
+
: thicknesses[size]
|
|
3022
|
+
? `${thicknesses[size]}px`
|
|
3023
|
+
: '2px';
|
|
3024
|
+
return (jsxRuntimeExports.jsx(react.Spinner, { ref: ref, role: "status", color: "primary.default", emptyColor: "gray.medium", thickness: thicknessString, size: size || SIZE_MAP['2xl'], ...props }));
|
|
1934
3025
|
});
|
|
1935
|
-
Spinner.
|
|
1936
|
-
/** The main fill color of the spinner */
|
|
1937
|
-
color: PropTypes__default.default.string,
|
|
1938
|
-
/** The diameter of the spinner ring in pixels */
|
|
1939
|
-
thickness: PropTypes__default.default.number,
|
|
1940
|
-
/** The empty color of the spinner */
|
|
1941
|
-
emptyColor: PropTypes__default.default.string,
|
|
1942
|
-
/** The size of the spinner */
|
|
1943
|
-
size: PropTypes__default.default.oneOf(Object.keys(SIZE_MAP)),
|
|
1944
|
-
/** The speed of the spinner, ex: 10s, 0.1s, 250ms */
|
|
1945
|
-
speed: PropTypes__default.default.string
|
|
1946
|
-
};
|
|
3026
|
+
Spinner.displayName = 'Spinner';
|
|
1947
3027
|
|
|
1948
3028
|
const baseStyle$d = {
|
|
1949
3029
|
lineHeight: 1.5,
|
|
@@ -2010,56 +3090,117 @@ Heading.propTypes = {
|
|
|
2010
3090
|
};
|
|
2011
3091
|
|
|
2012
3092
|
const styles = {
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
3093
|
+
px: 4,
|
|
3094
|
+
mx: 'auto',
|
|
3095
|
+
maxW: {
|
|
3096
|
+
base: 'container.base',
|
|
3097
|
+
tablet: 'container.tablet',
|
|
3098
|
+
desktop: 'container.desktop',
|
|
3099
|
+
},
|
|
2020
3100
|
};
|
|
2021
3101
|
|
|
2022
|
-
const Container =
|
|
2023
|
-
|
|
2024
|
-
})));
|
|
3102
|
+
const Container = React.forwardRef((props, ref) => (jsxRuntimeExports.jsx(react.Container, { ...styles, ...props, ref: ref })));
|
|
3103
|
+
Container.displayName = 'Container';
|
|
2025
3104
|
|
|
2026
3105
|
const global = {
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
};
|
|
2048
|
-
const Fonts = () => /*#__PURE__*/React__namespace.default.createElement(react$1.Global, {
|
|
2049
|
-
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 "
|
|
2050
|
-
});
|
|
2051
|
-
const LegacyOverrides = _ref => {
|
|
2052
|
-
let {
|
|
2053
|
-
useLegacyOverrides
|
|
2054
|
-
} = _ref;
|
|
2055
|
-
return useLegacyOverrides ? /*#__PURE__*/React__namespace.default.createElement(react$1.Global, {
|
|
2056
|
-
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 ")
|
|
2057
|
-
}) : null;
|
|
2058
|
-
};
|
|
2059
|
-
LegacyOverrides.propTypes = {
|
|
2060
|
-
/** If true, this will use the old `spothero-html` base styles */
|
|
2061
|
-
useLegacyOverrides: PropTypes__default.default.bool
|
|
3106
|
+
'html, body': {
|
|
3107
|
+
color: 'text.primary.light',
|
|
3108
|
+
},
|
|
3109
|
+
// By default, Chakra has all svgs set to 'display: block',
|
|
3110
|
+
// this breaks the layout of some older components, so now
|
|
3111
|
+
// we set all svgs to 'display: inline-block;' and only set
|
|
3112
|
+
// 'display: block;' on the components that need it
|
|
3113
|
+
// (as of 3/9/2021 only the v1 AutoSuggestInput component
|
|
3114
|
+
// needed this update)
|
|
3115
|
+
svg: {
|
|
3116
|
+
display: 'inline-block',
|
|
3117
|
+
},
|
|
3118
|
+
// starting in Chakra version 2 they introduced this isolation style that messes with dropdowns being able to appear on top of elements underneath them
|
|
3119
|
+
'.chakra-input__group': {
|
|
3120
|
+
isolation: 'auto !important',
|
|
3121
|
+
},
|
|
3122
|
+
// Starting in Chakra version 2 they have incorporated normalize.css which may resulf in some unexpected default styles
|
|
3123
|
+
'h1, h2, h3, h4, h5, h6': {
|
|
3124
|
+
margin: 0,
|
|
3125
|
+
},
|
|
2062
3126
|
};
|
|
3127
|
+
const Fonts = () => (jsxRuntimeExports.jsx(react$1.Global, { styles: `
|
|
3128
|
+
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');
|
|
3129
|
+
/* latin-ext */
|
|
3130
|
+
@font-face {
|
|
3131
|
+
font-family: "Plus Jakarta Sans", sans-serif;
|
|
3132
|
+
font-style: normal;
|
|
3133
|
+
font-weight: 700;
|
|
3134
|
+
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;
|
|
3135
|
+
}
|
|
3136
|
+
/* latin-ext */
|
|
3137
|
+
@font-face {
|
|
3138
|
+
font-family: "Plus Jakarta Sans", sans-serif;
|
|
3139
|
+
font-style: normal;
|
|
3140
|
+
font-weight: 600;
|
|
3141
|
+
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;
|
|
3142
|
+
}
|
|
3143
|
+
/* latin-ext */
|
|
3144
|
+
@font-face {
|
|
3145
|
+
font-family: "Plus Jakarta Sans", sans-serif;
|
|
3146
|
+
font-style: normal;
|
|
3147
|
+
font-weight: 400;
|
|
3148
|
+
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;
|
|
3149
|
+
}
|
|
3150
|
+
/* latin-ext */
|
|
3151
|
+
@font-face {
|
|
3152
|
+
font-family: "Plus Jakarta Sans", sans-serif;
|
|
3153
|
+
font-style: normal;
|
|
3154
|
+
font-weight: 300;
|
|
3155
|
+
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;
|
|
3156
|
+
}
|
|
3157
|
+
` }));
|
|
3158
|
+
const LegacyOverrides = ({ useLegacyOverrides }) => useLegacyOverrides ? (jsxRuntimeExports.jsx(react$1.Global, { styles: `
|
|
3159
|
+
h1,
|
|
3160
|
+
h2,
|
|
3161
|
+
h3,
|
|
3162
|
+
h4,
|
|
3163
|
+
h5,
|
|
3164
|
+
h6 {
|
|
3165
|
+
margin-top: 0;
|
|
3166
|
+
font-weight: ${fontWeights.semibold};
|
|
3167
|
+
}
|
|
3168
|
+
|
|
3169
|
+
.heading-sm {
|
|
3170
|
+
font-size: ${fontSizes.base};
|
|
3171
|
+
}
|
|
3172
|
+
.heading-md {
|
|
3173
|
+
font-size: ${fontSizes.md};
|
|
3174
|
+
}
|
|
3175
|
+
.heading-lg {
|
|
3176
|
+
font-size: ${fontSizes['5xl']};
|
|
3177
|
+
}
|
|
3178
|
+
|
|
3179
|
+
p {
|
|
3180
|
+
line-height: 1.5;
|
|
3181
|
+
}
|
|
3182
|
+
|
|
3183
|
+
a {
|
|
3184
|
+
outline: none;
|
|
3185
|
+
text-align: left;
|
|
3186
|
+
color: ${colors.primary.default};
|
|
3187
|
+
text-decoration: none;
|
|
3188
|
+
|
|
3189
|
+
&:active,
|
|
3190
|
+
&:focus {
|
|
3191
|
+
outline: none;
|
|
3192
|
+
}
|
|
3193
|
+
|
|
3194
|
+
&:hover {
|
|
3195
|
+
color: ${colors.primary['700']};
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
|
|
3199
|
+
small {
|
|
3200
|
+
font-size: ${fontSizes.xs};
|
|
3201
|
+
}
|
|
3202
|
+
|
|
3203
|
+
` })) : null;
|
|
2063
3204
|
|
|
2064
3205
|
const item = {
|
|
2065
3206
|
mb: 2
|
|
@@ -2262,15 +3403,15 @@ const theme$1 = react.extendTheme({
|
|
|
2262
3403
|
});
|
|
2263
3404
|
|
|
2264
3405
|
const colorScheme = {
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
3406
|
+
low: {
|
|
3407
|
+
borderColor: 'gray.100',
|
|
3408
|
+
},
|
|
3409
|
+
medium: {
|
|
3410
|
+
borderColor: 'gray.200',
|
|
3411
|
+
},
|
|
2271
3412
|
};
|
|
2272
3413
|
var Divider_styles = merge__default.default(react.theme.components.Divider, {
|
|
2273
|
-
|
|
3414
|
+
colorScheme,
|
|
2274
3415
|
});
|
|
2275
3416
|
|
|
2276
3417
|
const baseStyle$8 = {
|
|
@@ -3255,23 +4396,20 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
3255
4396
|
|
|
3256
4397
|
// use this to extend the base theme of chakra, this adds on top of what is defined in baseConfig
|
|
3257
4398
|
const extendedTheme = {
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
let baseSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 16;
|
|
3265
|
-
return !rem ? 0 : "".concat(baseSize * Number(rem.replace('rem', '')));
|
|
3266
|
-
}
|
|
4399
|
+
initialColorMode: 'light',
|
|
4400
|
+
useSystemColorMode: false,
|
|
4401
|
+
styles: {
|
|
4402
|
+
global,
|
|
4403
|
+
},
|
|
4404
|
+
remToPixels: (rem, baseSize = 16) => !rem ? 0 : `${baseSize * Number(rem.replace('rem', ''))}`,
|
|
3267
4405
|
};
|
|
3268
|
-
|
|
3269
4406
|
// use this to override base themes from Chakra
|
|
3270
|
-
const baseConfig =
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
4407
|
+
const baseConfig = {
|
|
4408
|
+
...react.theme,
|
|
4409
|
+
breakpoints,
|
|
4410
|
+
...base,
|
|
4411
|
+
components,
|
|
4412
|
+
};
|
|
3275
4413
|
var THEME = react.extendTheme(extendedTheme, baseConfig);
|
|
3276
4414
|
|
|
3277
4415
|
const _excluded$h = ["theme", "useLegacyOverrides", "disableExternalFonts", "children"];
|
|
@@ -3301,15 +4439,8 @@ ThemeProvider.propTypes = {
|
|
|
3301
4439
|
theme: PropTypes__default.default.object
|
|
3302
4440
|
};
|
|
3303
4441
|
|
|
3304
|
-
const Card =
|
|
3305
|
-
|
|
3306
|
-
padding: 4,
|
|
3307
|
-
bgColor: "background.white",
|
|
3308
|
-
borderRadius: "lg",
|
|
3309
|
-
boxShadow: "md"
|
|
3310
|
-
}, props, {
|
|
3311
|
-
ref: ref
|
|
3312
|
-
})));
|
|
4442
|
+
const Card = React.forwardRef((props, ref) => (jsxRuntimeExports.jsx(react.Box, { position: "relative", padding: 4, bgColor: "background.white", borderRadius: "lg", boxShadow: "md", ...props, ref: ref })));
|
|
4443
|
+
Card.displayName = 'Card';
|
|
3313
4444
|
|
|
3314
4445
|
const _excluded$g = ["isSSR", "cloudinaryImageId", "cloudinaryTemplate", "cloudinaryCloudName", "htmlWidth", "htmlHeight", "quality", "lazyLoad"];
|
|
3315
4446
|
|
|
@@ -4343,31 +5474,12 @@ SelectionCard.propTypes = {
|
|
|
4343
5474
|
expandableContentKey: PropTypes__default.default.string
|
|
4344
5475
|
};
|
|
4345
5476
|
|
|
4346
|
-
const
|
|
4347
|
-
|
|
4348
|
-
let {
|
|
4349
|
-
variant,
|
|
4350
|
-
colorScheme: borderColor
|
|
4351
|
-
} = _ref,
|
|
4352
|
-
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
4353
|
-
return /*#__PURE__*/React__namespace.default.createElement(react.Divider, _extends$6({}, colorScheme[borderColor], {
|
|
4354
|
-
variant: variant
|
|
4355
|
-
}, props, {
|
|
4356
|
-
ref: ref
|
|
4357
|
-
}));
|
|
5477
|
+
const Divider = React.forwardRef(({ variant = 'solid', colorScheme: borderColor = 'medium', ...props }, ref) => {
|
|
5478
|
+
return (jsxRuntimeExports.jsx(react.Divider, { ...colorScheme[borderColor], variant: variant, ...props, ref: ref }));
|
|
4358
5479
|
});
|
|
4359
|
-
Divider.
|
|
4360
|
-
/** Color scheme used */
|
|
4361
|
-
colorScheme: PropTypes__default.default.oneOf(['low', 'medium']),
|
|
4362
|
-
/** The styling that will be applied to the HR tag */
|
|
4363
|
-
variant: PropTypes__default.default.oneOf(['solid', 'dashed'])
|
|
4364
|
-
};
|
|
4365
|
-
Divider.defaultProps = {
|
|
4366
|
-
variant: 'solid',
|
|
4367
|
-
colorScheme: 'medium'
|
|
4368
|
-
};
|
|
5480
|
+
Divider.displayName = 'Divider';
|
|
4369
5481
|
|
|
4370
|
-
const _excluded$
|
|
5482
|
+
const _excluded$4 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "customRequiredText"];
|
|
4371
5483
|
const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
4372
5484
|
let {
|
|
4373
5485
|
label,
|
|
@@ -4379,7 +5491,7 @@ const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4379
5491
|
isOptional,
|
|
4380
5492
|
customRequiredText
|
|
4381
5493
|
} = _ref,
|
|
4382
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5494
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
4383
5495
|
const classes = cn__default.default({
|
|
4384
5496
|
'FormElement-contains-error': isInvalid
|
|
4385
5497
|
});
|
|
@@ -4410,12 +5522,12 @@ Textarea.propTypes = {
|
|
|
4410
5522
|
customRequiredText: PropTypes__default.default.string
|
|
4411
5523
|
};
|
|
4412
5524
|
|
|
4413
|
-
const _excluded$
|
|
5525
|
+
const _excluded$3 = ["children"];
|
|
4414
5526
|
const Popover = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
4415
5527
|
const {
|
|
4416
5528
|
children
|
|
4417
5529
|
} = props,
|
|
4418
|
-
rest = _objectWithoutProperties(props, _excluded$
|
|
5530
|
+
rest = _objectWithoutProperties(props, _excluded$3);
|
|
4419
5531
|
return /*#__PURE__*/React__namespace.default.createElement(react.Popover, _extends$6({}, rest, {
|
|
4420
5532
|
ref: ref
|
|
4421
5533
|
}), React.Children.toArray(children).map((child, index) => /*#__PURE__*/React.cloneElement(child, {
|
|
@@ -4474,7 +5586,7 @@ const PopoverCloseButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
4474
5586
|
}, props, closeButtonStyles(props)));
|
|
4475
5587
|
});
|
|
4476
5588
|
|
|
4477
|
-
const _excluded$
|
|
5589
|
+
const _excluded$2 = ["header", "variant", "children", "hideCloseButton", "hideArrow", "popoverBodyProps"];
|
|
4478
5590
|
const PopoverContent = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
4479
5591
|
const {
|
|
4480
5592
|
header,
|
|
@@ -4484,7 +5596,7 @@ const PopoverContent = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
4484
5596
|
hideArrow,
|
|
4485
5597
|
popoverBodyProps
|
|
4486
5598
|
} = props,
|
|
4487
|
-
rest = _objectWithoutProperties(props, _excluded$
|
|
5599
|
+
rest = _objectWithoutProperties(props, _excluded$2);
|
|
4488
5600
|
return /*#__PURE__*/React__namespace.default.createElement(react.PopoverContent, _extends$6({}, rest, {
|
|
4489
5601
|
ref: ref
|
|
4490
5602
|
}), hideArrow ? null : /*#__PURE__*/React__namespace.default.createElement(PopoverArrow, {
|
|
@@ -4668,6 +5780,192 @@ AutoSuggestSelect.propTypes = {
|
|
|
4668
5780
|
innerProps: PropTypes__default.default.object
|
|
4669
5781
|
};
|
|
4670
5782
|
|
|
5783
|
+
const _excluded$1 = ["id", "label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "options", "onChange", "iconSrc", "placeholder", "defaultValue", "innerRef", "noOptionsMessage"];
|
|
5784
|
+
const DropdownIndicator$1 = props => {
|
|
5785
|
+
const {
|
|
5786
|
+
sizes
|
|
5787
|
+
} = react.useTheme();
|
|
5788
|
+
return /*#__PURE__*/React__namespace.default.createElement(Select$2.components.DropdownIndicator, props, /*#__PURE__*/React__namespace.default.createElement(react.Icon, {
|
|
5789
|
+
className: "FilterSelect-dropdown-icon",
|
|
5790
|
+
as: ForwardRef$1,
|
|
5791
|
+
boxSize: sizes['2.5']
|
|
5792
|
+
}));
|
|
5793
|
+
};
|
|
5794
|
+
const FilterSelectNode = _ref => {
|
|
5795
|
+
let {
|
|
5796
|
+
id,
|
|
5797
|
+
label,
|
|
5798
|
+
helperText,
|
|
5799
|
+
errorMessage,
|
|
5800
|
+
isInvalid,
|
|
5801
|
+
isDisabled,
|
|
5802
|
+
isRequired,
|
|
5803
|
+
options = [],
|
|
5804
|
+
onChange,
|
|
5805
|
+
iconSrc,
|
|
5806
|
+
placeholder,
|
|
5807
|
+
defaultValue = null,
|
|
5808
|
+
innerRef,
|
|
5809
|
+
noOptionsMessage = 'No Options'
|
|
5810
|
+
} = _ref,
|
|
5811
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
5812
|
+
const {
|
|
5813
|
+
colors,
|
|
5814
|
+
fontSizes,
|
|
5815
|
+
sizes
|
|
5816
|
+
} = react.useTheme();
|
|
5817
|
+
const handleChange = selectedOption => {
|
|
5818
|
+
onChange(selectedOption);
|
|
5819
|
+
};
|
|
5820
|
+
const icon = function () {
|
|
5821
|
+
let color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transparent';
|
|
5822
|
+
return {
|
|
5823
|
+
alignItems: 'center',
|
|
5824
|
+
display: 'flex',
|
|
5825
|
+
':before': {
|
|
5826
|
+
backgroundColor: color,
|
|
5827
|
+
content: '" "',
|
|
5828
|
+
display: 'block',
|
|
5829
|
+
marginRight: sizes['3'],
|
|
5830
|
+
height: sizes['4'],
|
|
5831
|
+
width: sizes['5'],
|
|
5832
|
+
mask: "url(".concat(iconSrc, ") no-repeat 50% 50%"),
|
|
5833
|
+
maskSize: 'contain'
|
|
5834
|
+
}
|
|
5835
|
+
};
|
|
5836
|
+
};
|
|
5837
|
+
const baseText = {
|
|
5838
|
+
fontSize: fontSizes.base,
|
|
5839
|
+
color: colors.black
|
|
5840
|
+
};
|
|
5841
|
+
const customStyles = {
|
|
5842
|
+
menu: provided => _objectSpread2(_objectSpread2({}, provided), baseText),
|
|
5843
|
+
control: (provided, state) => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5844
|
+
borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary.default : colors.gray['200'],
|
|
5845
|
+
borderWidth: '1px',
|
|
5846
|
+
boxShadow: 'none',
|
|
5847
|
+
'&:hover': {
|
|
5848
|
+
borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary.default : colors.gray['200']
|
|
5849
|
+
}
|
|
5850
|
+
}),
|
|
5851
|
+
input: (provided, state) => _objectSpread2(_objectSpread2(_objectSpread2({}, provided), baseText), {}, {
|
|
5852
|
+
padding: sizes['2'],
|
|
5853
|
+
backgroundColor: state.isDisabled ? colors.gray['200'] : 'transparent'
|
|
5854
|
+
}, iconSrc && icon(colors.gray['600'])),
|
|
5855
|
+
placeholder: provided => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5856
|
+
padding: sizes['2'],
|
|
5857
|
+
fontSize: fontSizes.base,
|
|
5858
|
+
color: colors.gray['600']
|
|
5859
|
+
}, iconSrc && icon()),
|
|
5860
|
+
singleValue: provided => _objectSpread2(_objectSpread2(_objectSpread2({}, provided), baseText), {}, {
|
|
5861
|
+
padding: sizes['2']
|
|
5862
|
+
}, iconSrc && icon()),
|
|
5863
|
+
option: (provided, state) => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5864
|
+
backgroundColor: state.isSelected ? colors.gray['200'] : state.isFocused ? colors.gray['50'] : 'transparent',
|
|
5865
|
+
color: colors.black
|
|
5866
|
+
}),
|
|
5867
|
+
clearIndicator: provided => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5868
|
+
color: colors.gray['400'],
|
|
5869
|
+
'&:hover': {
|
|
5870
|
+
color: colors.gray['600']
|
|
5871
|
+
}
|
|
5872
|
+
}),
|
|
5873
|
+
dropdownIndicator: provided => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5874
|
+
color: colors.brandBlue,
|
|
5875
|
+
'&:hover': {
|
|
5876
|
+
color: colors.brandBlue
|
|
5877
|
+
}
|
|
5878
|
+
}),
|
|
5879
|
+
indicatorSeparator: provided => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5880
|
+
display: 'none'
|
|
5881
|
+
})
|
|
5882
|
+
};
|
|
5883
|
+
return /*#__PURE__*/React__namespace.default.createElement(FormControl$1, {
|
|
5884
|
+
errorMessage: errorMessage,
|
|
5885
|
+
isRequired: isRequired,
|
|
5886
|
+
helperText: helperText,
|
|
5887
|
+
label: label,
|
|
5888
|
+
inputId: id,
|
|
5889
|
+
isInvalid: isInvalid
|
|
5890
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Select__default.default, _extends$6({
|
|
5891
|
+
ref: innerRef,
|
|
5892
|
+
classNamePrefix: "fe-ui-filter-select",
|
|
5893
|
+
closeMenuOnSelect: true,
|
|
5894
|
+
isClearable: true,
|
|
5895
|
+
components: {
|
|
5896
|
+
DropdownIndicator: DropdownIndicator$1
|
|
5897
|
+
},
|
|
5898
|
+
openMenuOnClick: true,
|
|
5899
|
+
options: options,
|
|
5900
|
+
onChange: handleChange,
|
|
5901
|
+
isDisabled: isDisabled,
|
|
5902
|
+
inputId: id,
|
|
5903
|
+
placeholder: placeholder,
|
|
5904
|
+
defaultValue: defaultValue,
|
|
5905
|
+
styles: customStyles,
|
|
5906
|
+
noOptionsMessage: () => noOptionsMessage
|
|
5907
|
+
}, props)));
|
|
5908
|
+
};
|
|
5909
|
+
const FilterSelect = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__namespace.default.createElement(FilterSelectNode, _extends$6({
|
|
5910
|
+
innerRef: ref
|
|
5911
|
+
}, props)));
|
|
5912
|
+
FilterSelect.propTypes = {
|
|
5913
|
+
/** ID applied to the select and label */
|
|
5914
|
+
id: PropTypes__default.default.string.isRequired,
|
|
5915
|
+
/** Label that describes the select */
|
|
5916
|
+
label: PropTypes__default.default.string,
|
|
5917
|
+
/** Text to use as placeholder in the input */
|
|
5918
|
+
placeholder: PropTypes__default.default.string,
|
|
5919
|
+
/** Optional helper text displayed below the select */
|
|
5920
|
+
helperText: PropTypes__default.default.string,
|
|
5921
|
+
/** Error message that would display under the select */
|
|
5922
|
+
errorMessage: PropTypes__default.default.string,
|
|
5923
|
+
/** Boolean that sets whether the select is valid */
|
|
5924
|
+
isInvalid: PropTypes__default.default.bool,
|
|
5925
|
+
/** Boolean that sets whether the select is disabled */
|
|
5926
|
+
isDisabled: PropTypes__default.default.bool,
|
|
5927
|
+
/** Boolean that sets whether the select is required */
|
|
5928
|
+
isRequired: PropTypes__default.default.bool,
|
|
5929
|
+
/** List of available options */
|
|
5930
|
+
options: PropTypes__default.default.arrayOf(PropTypes__default.default.shape({
|
|
5931
|
+
label: PropTypes__default.default.string.isRequired,
|
|
5932
|
+
value: PropTypes__default.default.any.isRequired
|
|
5933
|
+
})).isRequired,
|
|
5934
|
+
/** Function that is called when an option is selected, it returns the selected option */
|
|
5935
|
+
onChange: PropTypes__default.default.func.isRequired,
|
|
5936
|
+
/** Optional src to SVG to use as search icon */
|
|
5937
|
+
iconSrc: PropTypes__default.default.string,
|
|
5938
|
+
/** Optional default option for uncontrolled usage */
|
|
5939
|
+
defaultValue: PropTypes__default.default.shape({
|
|
5940
|
+
label: PropTypes__default.default.string,
|
|
5941
|
+
value: PropTypes__default.default.any
|
|
5942
|
+
}),
|
|
5943
|
+
/** Optional message to display when there are no options */
|
|
5944
|
+
noOptionsMessage: PropTypes__default.default.string
|
|
5945
|
+
};
|
|
5946
|
+
FilterSelectNode.propTypes = {
|
|
5947
|
+
id: PropTypes__default.default.string.isRequired,
|
|
5948
|
+
label: PropTypes__default.default.string,
|
|
5949
|
+
placeholder: PropTypes__default.default.string,
|
|
5950
|
+
helperText: PropTypes__default.default.string,
|
|
5951
|
+
errorMessage: PropTypes__default.default.string,
|
|
5952
|
+
isInvalid: PropTypes__default.default.bool,
|
|
5953
|
+
isDisabled: PropTypes__default.default.bool,
|
|
5954
|
+
isRequired: PropTypes__default.default.bool,
|
|
5955
|
+
options: PropTypes__default.default.arrayOf(PropTypes__default.default.shape({
|
|
5956
|
+
label: PropTypes__default.default.string.isRequired,
|
|
5957
|
+
value: PropTypes__default.default.any.isRequired
|
|
5958
|
+
})).isRequired,
|
|
5959
|
+
onChange: PropTypes__default.default.func.isRequired,
|
|
5960
|
+
iconSrc: PropTypes__default.default.string,
|
|
5961
|
+
defaultValue: PropTypes__default.default.shape({
|
|
5962
|
+
label: PropTypes__default.default.string,
|
|
5963
|
+
value: PropTypes__default.default.any
|
|
5964
|
+
}),
|
|
5965
|
+
innerRef: PropTypes__default.default.object,
|
|
5966
|
+
noOptionsMessage: PropTypes__default.default.string
|
|
5967
|
+
};
|
|
5968
|
+
|
|
4671
5969
|
const defaultStyles = {
|
|
4672
5970
|
border: 0,
|
|
4673
5971
|
borderRadius: '4px',
|
|
@@ -4761,7 +6059,7 @@ const DropdownIndicator = props => {
|
|
|
4761
6059
|
const {
|
|
4762
6060
|
sizes
|
|
4763
6061
|
} = react.useTheme();
|
|
4764
|
-
return /*#__PURE__*/React__namespace.default.createElement(
|
|
6062
|
+
return /*#__PURE__*/React__namespace.default.createElement(Select$2.components.DropdownIndicator, props, /*#__PURE__*/React__namespace.default.createElement(react.Icon, {
|
|
4765
6063
|
className: "CreatableSelect-dropdown-icon",
|
|
4766
6064
|
as: ForwardRef$1,
|
|
4767
6065
|
boxSize: sizes['2.5']
|
|
@@ -5271,6 +6569,7 @@ exports.Container = Container;
|
|
|
5271
6569
|
exports.CreatableSelect = CreatableSelect$1;
|
|
5272
6570
|
exports.Divider = Divider;
|
|
5273
6571
|
exports.Drawer = Drawer;
|
|
6572
|
+
exports.FilterSelect = FilterSelect;
|
|
5274
6573
|
exports.Grid = Grid;
|
|
5275
6574
|
exports.GridItem = GridItem;
|
|
5276
6575
|
exports.Heading = Heading;
|