@carbonplan/components 10.2.0 → 10.5.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.
@@ -1,5 +1,5 @@
1
1
  import React, { cloneElement, useCallback, useState, useEffect, useRef } from 'react';
2
- import { Box, Link as Link$1, Grid, IconButton, useColorMode, Container, useThemeUI, Text, Flex, Styled, Input as Input$1, Slider as Slider$1 } from 'theme-ui';
2
+ import { Box, Link as Link$1, Flex, Grid, IconButton, useColorMode, Container, useThemeUI, Text, Styled, Input as Input$1, Slider as Slider$1 } from 'theme-ui';
3
3
  import { transparentize } from '@theme-ui/color';
4
4
  import NextLink from 'next/link';
5
5
  import { Arrow, Sun } from '@carbonplan/icons';
@@ -40,12 +40,14 @@ function _objectWithoutPropertiesLoose(source, excluded) {
40
40
  return target;
41
41
  }
42
42
 
43
- const Badge = (_ref) => {
43
+ const _excluded$g = ["sx", "children"];
44
+
45
+ const Badge = _ref => {
44
46
  let {
45
47
  sx,
46
48
  children
47
49
  } = _ref,
48
- props = _objectWithoutPropertiesLoose(_ref, ["sx", "children"]);
50
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
49
51
 
50
52
  const color = sx && sx.color ? sx.color : 'primary';
51
53
  return /*#__PURE__*/React.createElement(Box, _extends({
@@ -70,12 +72,19 @@ const Badge = (_ref) => {
70
72
  }, children));
71
73
  };
72
74
 
75
+ const _excluded$f = ["href", "children", "internal", "tracking"];
76
+
73
77
  const event = ({
74
78
  action,
75
79
  category,
76
80
  label,
77
81
  value
78
82
  }) => {
83
+ if (typeof window.gtag !== 'function') {
84
+ console.warn(`Missing window.gtag, skipping analytics action: '${action}'.`);
85
+ return;
86
+ }
87
+
79
88
  window.gtag('event', action, {
80
89
  event_category: category,
81
90
  event_label: label,
@@ -83,14 +92,14 @@ const event = ({
83
92
  });
84
93
  };
85
94
 
86
- const Link = (_ref) => {
95
+ const Link = _ref => {
87
96
  let {
88
97
  href,
89
98
  children,
90
99
  internal = false,
91
100
  tracking = false
92
101
  } = _ref,
93
- props = _objectWithoutPropertiesLoose(_ref, ["href", "children", "internal", "tracking"]);
102
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
94
103
 
95
104
  if (internal || href && href.startsWith('/')) {
96
105
  return /*#__PURE__*/React.createElement(NextLink, {
@@ -179,7 +188,9 @@ const getSizeStyles = size => {
179
188
  };
180
189
  };
181
190
 
182
- const Button = (_ref) => {
191
+ const _excluded$e = ["size", "prefix", "suffix", "inverted", "sx", "children", "align", "href", "internal", "tracking"];
192
+
193
+ const Button = _ref => {
183
194
  let {
184
195
  size = 'sm',
185
196
  prefix,
@@ -192,7 +203,7 @@ const Button = (_ref) => {
192
203
  internal,
193
204
  tracking
194
205
  } = _ref,
195
- props = _objectWithoutPropertiesLoose(_ref, ["size", "prefix", "suffix", "inverted", "sx", "children", "align", "href", "internal", "tracking"]);
206
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
196
207
 
197
208
  if (!['xs', 'sm', 'md', 'lg', 'xl'].includes(size)) {
198
209
  throw new Error('Size must be xs, sm, md, lg, or xl');
@@ -366,7 +377,9 @@ const Button = (_ref) => {
366
377
  }
367
378
  };
368
379
 
369
- const Callout = (_ref) => {
380
+ const _excluded$d = ["label", "children", "inverted", "color", "href", "internal", "tracking", "sx"];
381
+
382
+ const Callout = _ref => {
370
383
  let {
371
384
  label,
372
385
  children,
@@ -377,7 +390,7 @@ const Callout = (_ref) => {
377
390
  tracking,
378
391
  sx
379
392
  } = _ref,
380
- props = _objectWithoutPropertiesLoose(_ref, ["label", "children", "inverted", "color", "href", "internal", "tracking", "sx"]);
393
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
381
394
 
382
395
  const baseColor = color || (inverted ? 'secondary' : 'primary');
383
396
  const hoverColor = color ? 'primary' : inverted ? 'primary' : 'secondary';
@@ -456,7 +469,146 @@ const Callout = (_ref) => {
456
469
  }
457
470
  };
458
471
 
459
- const Column = (_ref) => {
472
+ const _excluded$c = ["colormap", "label", "clim", "discrete", "units", "width", "height", "format", "horizontal"];
473
+ const sx$2 = {
474
+ clim: {
475
+ fontFamily: 'mono',
476
+ fontSize: ['9px', 0, 0, 1],
477
+ letterSpacing: 'smallcaps',
478
+ textTransform: 'uppercase'
479
+ }
480
+ };
481
+ const DIMENSIONS = {
482
+ width: ['10px', '16px', '16px', '17px'],
483
+ height: ['80px', '110px', '110px', '130px']
484
+ };
485
+
486
+ const Gradient = ({
487
+ colormap,
488
+ discrete,
489
+ horizontal,
490
+ width,
491
+ height
492
+ }) => {
493
+ const step = 1 / colormap.length * 100;
494
+ const values = colormap.map((d, i) => {
495
+ return `rgb(${d}) ${i * step}% ${discrete && i < colormap.length - 1 ? `${(i + 1) * step}%` : ''}`;
496
+ });
497
+ const css = `linear-gradient(to ${horizontal ? 'right' : 'top'}, ${values.join(',')})`;
498
+ return /*#__PURE__*/React.createElement(Box, {
499
+ sx: _extends({}, horizontal ? {
500
+ width: width || DIMENSIONS.height,
501
+ height: height || DIMENSIONS.width
502
+ } : {
503
+ width: width || DIMENSIONS.width,
504
+ minHeight: height || DIMENSIONS.height
505
+ }, {
506
+ mt: horizontal ? [0, '1px', '1px', 0] : 0,
507
+ border: ({
508
+ colors
509
+ }) => `solid 1px ${colors.hinted}`,
510
+ background: css
511
+ })
512
+ });
513
+ };
514
+
515
+ const Label = ({
516
+ label,
517
+ units,
518
+ horizontal
519
+ }) => /*#__PURE__*/React.createElement(Box, {
520
+ sx: !horizontal && {
521
+ alignSelf: 'flex-end'
522
+ }
523
+ }, /*#__PURE__*/React.createElement(Box, {
524
+ sx: _extends({
525
+ mb: horizontal ? 0 : ['-4px', '-4px', '-4px', '-3px'],
526
+ fontFamily: 'mono',
527
+ fontSize: ['9px', 0, 0, 1],
528
+ letterSpacing: 'smallcaps',
529
+ textTransform: 'uppercase'
530
+ }, horizontal ? {} : {
531
+ writingMode: 'vertical-rl',
532
+ transform: 'rotate(180deg)',
533
+ whiteSpace: 'nowrap',
534
+ display: 'inline-block',
535
+ overflow: 'visible'
536
+ })
537
+ }, label, ' ', /*#__PURE__*/React.createElement(Box, {
538
+ as: "span",
539
+ sx: {
540
+ textTransform: 'none',
541
+ color: 'secondary',
542
+ display: 'inline-block'
543
+ }
544
+ }, units)));
545
+
546
+ const Colorbar = _ref => {
547
+ let {
548
+ colormap,
549
+ label,
550
+ clim,
551
+ discrete,
552
+ units,
553
+ width,
554
+ height,
555
+ format = d => d,
556
+ horizontal = false
557
+ } = _ref,
558
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
559
+
560
+ if (!Array.isArray(colormap)) {
561
+ throw new Error(`expected array for colormap, got '${colormap}'.`);
562
+ }
563
+
564
+ const ClimMin = () => {
565
+ return /*#__PURE__*/React.createElement(Box, {
566
+ sx: _extends({}, sx$2.clim, {
567
+ ml: label ? horizontal ? '10px' : '2px' : 0,
568
+ mr: horizontal ? ['2px', '1px', '1px', '2px'] : 0,
569
+ mb: horizontal ? 0 : ['-2px', '-2px', '-2px', '-3px']
570
+ })
571
+ }, format(clim[0]));
572
+ };
573
+
574
+ const ClimMax = () => {
575
+ return /*#__PURE__*/React.createElement(Box, {
576
+ sx: _extends({}, sx$2.clim, {
577
+ ml: horizontal ? ['2px', '1px', '1px', '2px'] : '2px',
578
+ mt: horizontal ? 0 : ['-2px', '-3px', '-3px', '-3px']
579
+ })
580
+ }, format(clim[1]));
581
+ };
582
+
583
+ return /*#__PURE__*/React.createElement(Flex, {
584
+ sx: _extends({}, props.sx, {
585
+ flexDirection: 'row',
586
+ alignItems: 'center',
587
+ justifyContent: 'flex-start',
588
+ gap: ['3px', '6px', '6px', '7px']
589
+ })
590
+ }, label && /*#__PURE__*/React.createElement(Label, {
591
+ label: label,
592
+ units: units,
593
+ horizontal: horizontal
594
+ }), horizontal && clim && /*#__PURE__*/React.createElement(ClimMin, null), /*#__PURE__*/React.createElement(Gradient, {
595
+ colormap: colormap,
596
+ horizontal: horizontal,
597
+ discrete: discrete,
598
+ width: width,
599
+ height: height
600
+ }), horizontal && clim && /*#__PURE__*/React.createElement(ClimMax, null), !horizontal && /*#__PURE__*/React.createElement(Flex, {
601
+ sx: {
602
+ flexDirection: 'column-reverse',
603
+ justifyContent: 'space-between',
604
+ height: height || DIMENSIONS.height
605
+ }
606
+ }, clim && /*#__PURE__*/React.createElement(ClimMin, null), clim && /*#__PURE__*/React.createElement(ClimMax, null)));
607
+ };
608
+
609
+ const _excluded$b = ["start", "width", "dl", "dr", "children", "sx"];
610
+
611
+ const Column = _ref => {
460
612
  let {
461
613
  start,
462
614
  width,
@@ -465,7 +617,7 @@ const Column = (_ref) => {
465
617
  children,
466
618
  sx
467
619
  } = _ref,
468
- props = _objectWithoutPropertiesLoose(_ref, ["start", "width", "dl", "dr", "children", "sx"]);
620
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
469
621
 
470
622
  start = start || 'auto';
471
623
  width = width || 'auto';
@@ -633,7 +785,7 @@ const Meta = ({
633
785
  }));
634
786
  };
635
787
 
636
- const Logo = (_ref) => {
788
+ const Logo = _ref => {
637
789
  let props = _extends({}, _ref);
638
790
 
639
791
  return /*#__PURE__*/React.createElement(Box, _extends({
@@ -669,14 +821,16 @@ const Logo = (_ref) => {
669
821
  })));
670
822
  };
671
823
 
672
- const Row = (_ref) => {
824
+ const _excluded$a = ["children", "sx", "columns", "gap"];
825
+
826
+ const Row = _ref => {
673
827
  let {
674
828
  children,
675
829
  sx,
676
830
  columns,
677
831
  gap
678
832
  } = _ref,
679
- props = _objectWithoutPropertiesLoose(_ref, ["children", "sx", "columns", "gap"]);
833
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
680
834
 
681
835
  const makeArray = input => {
682
836
  if (!Array.isArray(input)) {
@@ -724,12 +878,14 @@ const Row = (_ref) => {
724
878
  }), children);
725
879
  };
726
880
 
727
- const Menu = (_ref) => {
881
+ const _excluded$9 = ["value", "sx"];
882
+
883
+ const Menu = _ref => {
728
884
  let {
729
885
  value,
730
886
  sx
731
887
  } = _ref,
732
- props = _objectWithoutPropertiesLoose(_ref, ["value", "sx"]);
888
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$9);
733
889
 
734
890
  return /*#__PURE__*/React.createElement(IconButton, _extends({
735
891
  sx: _extends({
@@ -817,12 +973,14 @@ const Menu = (_ref) => {
817
973
  })));
818
974
  };
819
975
 
820
- const Settings = (_ref) => {
976
+ const _excluded$8 = ["value", "sx"];
977
+
978
+ const Settings = _ref => {
821
979
  let {
822
980
  value,
823
981
  sx
824
982
  } = _ref,
825
- props = _objectWithoutPropertiesLoose(_ref, ["value", "sx"]);
983
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
826
984
 
827
985
  return /*#__PURE__*/React.createElement(IconButton, _extends({
828
986
  sx: _extends({
@@ -830,7 +988,6 @@ const Settings = (_ref) => {
830
988
  fill: 'none',
831
989
  strokeWidth: '2px',
832
990
  stroke: 'text',
833
- fill: 'background',
834
991
  '.paren': {
835
992
  opacity: '0'
836
993
  },
@@ -854,22 +1011,22 @@ const Settings = (_ref) => {
854
1011
  x1: "24",
855
1012
  y1: "2.1",
856
1013
  x2: "24",
1014
+ y2: "6.1"
1015
+ }), /*#__PURE__*/React.createElement("line", {
1016
+ x1: "24",
1017
+ y1: "24.1",
1018
+ x2: "24",
857
1019
  y2: "33.9"
858
1020
  }), /*#__PURE__*/React.createElement("line", {
859
1021
  x1: "44",
860
1022
  y1: "2.1",
861
1023
  x2: "44",
1024
+ y2: "12.1"
1025
+ }), /*#__PURE__*/React.createElement("line", {
1026
+ x1: "44",
1027
+ y1: "30.1",
1028
+ x2: "44",
862
1029
  y2: "33.9"
863
- }), /*#__PURE__*/React.createElement("circle", {
864
- cx: "24",
865
- cy: "15.1",
866
- r: "9",
867
- stroke: "none"
868
- }), /*#__PURE__*/React.createElement("circle", {
869
- cx: "44",
870
- cy: "21.1",
871
- r: "9",
872
- stroke: "none"
873
1030
  }), /*#__PURE__*/React.createElement("circle", {
874
1031
  cx: "24",
875
1032
  cy: "15.1",
@@ -924,11 +1081,13 @@ const Settings = (_ref) => {
924
1081
  })));
925
1082
  };
926
1083
 
927
- const Dimmer = (_ref) => {
1084
+ const _excluded$7 = ["sx"];
1085
+
1086
+ const Dimmer = _ref => {
928
1087
  let {
929
1088
  sx
930
1089
  } = _ref,
931
- props = _objectWithoutPropertiesLoose(_ref, ["sx"]);
1090
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
932
1091
 
933
1092
  const [colorMode, setColorMode] = useColorMode();
934
1093
  const toggle = useCallback(() => {
@@ -958,7 +1117,7 @@ const Dimmer = (_ref) => {
958
1117
  }));
959
1118
  };
960
1119
 
961
- const sx = {
1120
+ const sx$1 = {
962
1121
  link: (current, label, first = false) => {
963
1122
  return {
964
1123
  width: 'auto',
@@ -1041,12 +1200,12 @@ const Nav = ({
1041
1200
  onClick: () => {
1042
1201
  if (nav === url) setExpanded(false);
1043
1202
  },
1044
- sx: sx.link(nav, url, first)
1203
+ sx: sx$1.link(nav, url, first)
1045
1204
  }, /*#__PURE__*/React.createElement(HoverArrow, null), display));
1046
1205
  } else {
1047
1206
  return /*#__PURE__*/React.createElement(Link$1, {
1048
1207
  href: href,
1049
- sx: sx.link(nav, url, first)
1208
+ sx: sx$1.link(nav, url, first)
1050
1209
  }, /*#__PURE__*/React.createElement(HoverArrow, null), display);
1051
1210
  }
1052
1211
  };
@@ -1215,7 +1374,7 @@ const Header = ({
1215
1374
  })))))));
1216
1375
  };
1217
1376
 
1218
- const Monogram = (_ref) => {
1377
+ const Monogram = _ref => {
1219
1378
  let props = _extends({}, _ref);
1220
1379
 
1221
1380
  return /*#__PURE__*/React.createElement(Box, _extends({
@@ -1382,6 +1541,77 @@ const Footer = () => {
1382
1541
  }))));
1383
1542
  };
1384
1543
 
1544
+ const GitSha = () => {
1545
+ const sha = process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA;
1546
+ const owner = process.env.NEXT_PUBLIC_VERCEL_GIT_REPO_OWNER;
1547
+ const slug = process.env.NEXT_PUBLIC_VERCEL_GIT_REPO_SLUG;
1548
+ const {
1549
+ theme
1550
+ } = useThemeUI();
1551
+ const color = theme.rawColors.secondary;
1552
+
1553
+ if (sha && owner && slug) {
1554
+ const shortSha = sha.substring(0, 7);
1555
+ const href = 'https://github.com/' + owner + '/' + slug + '/tree/' + sha;
1556
+ return /*#__PURE__*/React.createElement(Box, {
1557
+ sx: {
1558
+ display: 'inline-block'
1559
+ }
1560
+ }, /*#__PURE__*/React.createElement(Separator, {
1561
+ color: color
1562
+ }), /*#__PURE__*/React.createElement(Link$1, {
1563
+ href: href,
1564
+ sx: {
1565
+ whiteSpace: 'nowrap',
1566
+ display: 'inline-block',
1567
+ ml: [2],
1568
+ fontFamily: 'mono',
1569
+ letterSpacing: 'body',
1570
+ color: color,
1571
+ fontSize: [1],
1572
+ textTransform: 'uppercase',
1573
+ textDecoration: 'none'
1574
+ }
1575
+ }, shortSha));
1576
+ } else {
1577
+ // fallback
1578
+ return /*#__PURE__*/React.createElement(Box, {
1579
+ sx: {
1580
+ display: 'inline-block'
1581
+ }
1582
+ }, /*#__PURE__*/React.createElement(Separator, {
1583
+ color: color
1584
+ }), /*#__PURE__*/React.createElement(Text, {
1585
+ sx: {
1586
+ whiteSpace: 'nowrap',
1587
+ display: 'inline-block',
1588
+ ml: [2],
1589
+ fontFamily: 'mono',
1590
+ letterSpacing: 'body',
1591
+ color: color,
1592
+ fontSize: [1],
1593
+ textTransform: 'uppercase'
1594
+ }
1595
+ }, color));
1596
+ }
1597
+ };
1598
+
1599
+ const Separator = ({
1600
+ color
1601
+ }) => {
1602
+ return /*#__PURE__*/React.createElement("svg", {
1603
+ fill: color,
1604
+ opacity: "0.8",
1605
+ viewBox: "0 0 24 24",
1606
+ width: "24",
1607
+ height: "24"
1608
+ }, /*#__PURE__*/React.createElement("circle", {
1609
+ r: 5,
1610
+ cx: 19,
1611
+ cy: 19
1612
+ }));
1613
+ };
1614
+
1385
1615
  const Value = ({
1386
1616
  mode
1387
1617
  }) => {
@@ -1429,10 +1659,6 @@ const Value = ({
1429
1659
  const Metadata = ({
1430
1660
  mode
1431
1661
  }) => {
1432
- const {
1433
- theme
1434
- } = useThemeUI();
1435
- const color = theme.rawColors.secondary;
1436
1662
  return /*#__PURE__*/React.createElement(Box, {
1437
1663
  sx: {
1438
1664
  userSelect: 'none',
@@ -1445,28 +1671,7 @@ const Metadata = ({
1445
1671
  }
1446
1672
  }, /*#__PURE__*/React.createElement(Value, {
1447
1673
  mode: mode
1448
- }), /*#__PURE__*/React.createElement("svg", {
1449
- fill: color,
1450
- opacity: "0.8",
1451
- viewBox: "0 0 24 24",
1452
- width: "24",
1453
- height: "24"
1454
- }, /*#__PURE__*/React.createElement("circle", {
1455
- r: 5,
1456
- cx: 19,
1457
- cy: 19
1458
- })), /*#__PURE__*/React.createElement(Text, {
1459
- sx: {
1460
- whiteSpace: 'nowrap',
1461
- display: 'inline-block',
1462
- ml: [2],
1463
- fontFamily: 'mono',
1464
- letterSpacing: 'body',
1465
- color: 'secondary',
1466
- fontSize: [1],
1467
- textTransform: 'uppercase'
1468
- }
1469
- }, color));
1674
+ }), /*#__PURE__*/React.createElement(GitSha, null));
1470
1675
  };
1471
1676
 
1472
1677
  function init(mode) {
@@ -1487,6 +1692,7 @@ function scrollFraction(window, documnt) {
1487
1692
  return Math.min(window.scrollY / (document.body.offsetHeight - 770), 0.99);
1488
1693
  }
1489
1694
 
1695
+ const _excluded$6 = ["duration", "delay", "children"];
1490
1696
  const fade = keyframes({
1491
1697
  from: {
1492
1698
  opacity: 0
@@ -1496,13 +1702,13 @@ const fade = keyframes({
1496
1702
  }
1497
1703
  });
1498
1704
 
1499
- const FadeIn = (_ref) => {
1705
+ const FadeIn = _ref => {
1500
1706
  let {
1501
1707
  duration = 300,
1502
1708
  delay = 0,
1503
1709
  children
1504
1710
  } = _ref,
1505
- delegated = _objectWithoutPropertiesLoose(_ref, ["duration", "delay", "children"]);
1711
+ delegated = _objectWithoutPropertiesLoose(_ref, _excluded$6);
1506
1712
 
1507
1713
  return /*#__PURE__*/React.createElement(Box, _extends({}, delegated, {
1508
1714
  sx: {
@@ -1815,14 +2021,16 @@ const Expander = ({
1815
2021
  })));
1816
2022
  };
1817
2023
 
1818
- const Tag = (_ref) => {
2024
+ const _excluded$5 = ["label", "value", "sx", "children"];
2025
+
2026
+ const Tag = _ref => {
1819
2027
  let {
1820
2028
  label,
1821
2029
  value,
1822
2030
  sx,
1823
2031
  children
1824
2032
  } = _ref,
1825
- props = _objectWithoutPropertiesLoose(_ref, ["label", "value", "sx", "children"]);
2033
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
1826
2034
 
1827
2035
  const color = sx && sx.color ? sx.color : 'primary';
1828
2036
  const isClickable = props && (props.onClick || props.onDoubleClick);
@@ -1856,7 +2064,8 @@ const Tag = (_ref) => {
1856
2064
  }, props), children);
1857
2065
  };
1858
2066
 
1859
- const sx$1 = {
2067
+ const _excluded$4 = ["values", "setValues", "label", "colors", "showAll", "multiSelect"];
2068
+ const sx = {
1860
2069
  label: {
1861
2070
  fontFamily: 'mono',
1862
2071
  letterSpacing: 'mono',
@@ -1917,7 +2126,7 @@ const updateValues = ({
1917
2126
  }
1918
2127
  };
1919
2128
 
1920
- const Filter = (_ref) => {
2129
+ const Filter = _ref => {
1921
2130
  let {
1922
2131
  values,
1923
2132
  setValues,
@@ -1926,10 +2135,10 @@ const Filter = (_ref) => {
1926
2135
  showAll = false,
1927
2136
  multiSelect = false
1928
2137
  } = _ref,
1929
- props = _objectWithoutPropertiesLoose(_ref, ["values", "setValues", "label", "colors", "showAll", "multiSelect"]);
2138
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
1930
2139
 
1931
2140
  return /*#__PURE__*/React.createElement(Box, props, label && /*#__PURE__*/React.createElement(Box, {
1932
- sx: sx$1.label
2141
+ sx: sx.label
1933
2142
  }, label), /*#__PURE__*/React.createElement(Box, {
1934
2143
  sx: {
1935
2144
  mt: label ? [3] : 0
@@ -2013,13 +2222,15 @@ const Group = ({
2013
2222
  }));
2014
2223
  };
2015
2224
 
2016
- const Input = (_ref) => {
2225
+ const _excluded$3 = ["size", "inverted", "sx"];
2226
+
2227
+ const Input = _ref => {
2017
2228
  let {
2018
2229
  size = 'sm',
2019
2230
  inverted,
2020
2231
  sx
2021
2232
  } = _ref,
2022
- props = _objectWithoutPropertiesLoose(_ref, ["size", "inverted", "sx"]);
2233
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
2023
2234
 
2024
2235
  const defaultColor = inverted ? 'secondary' : 'primary';
2025
2236
 
@@ -2067,13 +2278,15 @@ const getProps = test => props => {
2067
2278
  return next;
2068
2279
  };
2069
2280
 
2070
- const Select = (_ref) => {
2281
+ const _excluded$2 = ["children", "size", "sx"];
2282
+
2283
+ const Select = _ref => {
2071
2284
  let {
2072
2285
  children,
2073
2286
  size = 'sm',
2074
2287
  sx
2075
2288
  } = _ref,
2076
- props = _objectWithoutPropertiesLoose(_ref, ["children", "size", "sx"]);
2289
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
2077
2290
 
2078
2291
  const color = sx && sx.color ? sx.color : 'primary';
2079
2292
  const sizeStyles = getSizeStyles(size);
@@ -2160,11 +2373,13 @@ const Select = (_ref) => {
2160
2373
  }));
2161
2374
  };
2162
2375
 
2163
- const Slider = (_ref) => {
2376
+ const _excluded$1 = ["sx"];
2377
+
2378
+ const Slider = _ref => {
2164
2379
  let {
2165
2380
  sx
2166
2381
  } = _ref,
2167
- props = _objectWithoutPropertiesLoose(_ref, ["sx"]);
2382
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
2168
2383
 
2169
2384
  const color = sx && sx.color ? sx.color : 'primary';
2170
2385
  const {
@@ -2304,14 +2519,16 @@ const Table = ({
2304
2519
  })));
2305
2520
  };
2306
2521
 
2307
- const Toggle = (_ref) => {
2522
+ const _excluded = ["value", "onClick", "disabled", "sx"];
2523
+
2524
+ const Toggle = _ref => {
2308
2525
  let {
2309
2526
  value,
2310
2527
  onClick,
2311
2528
  disabled,
2312
2529
  sx
2313
2530
  } = _ref,
2314
- props = _objectWithoutPropertiesLoose(_ref, ["value", "onClick", "disabled", "sx"]);
2531
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
2315
2532
 
2316
2533
  const color = sx && sx.color ? sx.color : 'primary';
2317
2534
  value = disabled ? false : value;
@@ -2416,7 +2633,7 @@ const Tray = ({
2416
2633
  ml: [-3, -4, -5, -6],
2417
2634
  pl: [3, 4, 5, 6],
2418
2635
  pr: [3, 4, 5, 6],
2419
- transform: expanded ? 'translateY(0)' : 'translateY(-400px)'
2636
+ transform: expanded ? 'translateY(0)' : 'translateY(-100%)'
2420
2637
  }, sx)
2421
2638
  }, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Column, {
2422
2639
  start: [1, 1, 1, 1],
@@ -2455,5 +2672,5 @@ const formatDate = (date, options = defaultOptions) => {
2455
2672
  return [month, day, year].filter(Boolean).join(' ');
2456
2673
  };
2457
2674
 
2458
- export { Badge, Button, Callout, Column, Custom404, Dimmer, Expander, FadeIn, Filter, Footer, Group, Guide, Header, Input, Layout, Link, Logo, Menu, Meta, Monogram, Row, Scrollbar, Select, Slider, Table, Tag, Toggle, Tracking, Tray, formatDate, getScrollbarWidth };
2675
+ export { Badge, Button, Callout, Colorbar, Column, Custom404, Dimmer, Expander, FadeIn, Filter, Footer, Group, Guide, Header, Input, Layout, Link, Logo, Menu, Meta, Monogram, Row, Scrollbar, Select, Settings, Slider, Table, Tag, Toggle, Tracking, Tray, formatDate, getScrollbarWidth };
2459
2676
  //# sourceMappingURL=index.modern.js.map