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