@carbonplan/components 11.0.0-alpha.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dst/index.esm.js CHANGED
@@ -1,9 +1,10 @@
1
- import React, { forwardRef, cloneElement, useCallback, useState, useEffect, useRef } from 'react';
2
- import { Box, Link as Link$2, Flex, Grid, IconButton, useColorMode, Container, useThemeUI, Text, Styled, Input as Input$1, Slider as Slider$1 } from 'theme-ui';
1
+ import React, { forwardRef, cloneElement, useRef, useState, useEffect, useCallback } from 'react';
2
+ import { Box, Link as Link$2, Flex, Grid, IconButton, Container, useColorMode, 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';
6
6
  import { PoopSad } from '@carbonplan/emoji';
7
+ import { useBreakpointIndex } from '@theme-ui/match-media';
7
8
  import Head from 'next/head';
8
9
  import { keyframes } from '@emotion/react';
9
10
 
@@ -40,12 +41,10 @@ function _objectWithoutPropertiesLoose(source, excluded) {
40
41
  return target;
41
42
  }
42
43
 
43
- var _excluded$g = ["sx", "children"];
44
-
45
44
  var Badge = function Badge(_ref) {
46
45
  var sx = _ref.sx,
47
46
  children = _ref.children,
48
- props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
47
+ props = _objectWithoutPropertiesLoose(_ref, ["sx", "children"]);
49
48
 
50
49
  var color = sx && sx.color ? sx.color : 'primary';
51
50
  return /*#__PURE__*/React.createElement(Box, _extends({
@@ -70,8 +69,6 @@ var Badge = function Badge(_ref) {
70
69
  }, children));
71
70
  };
72
71
 
73
- var _excluded$f = ["href", "children", "internal", "tracking"];
74
-
75
72
  var event = function event(_ref) {
76
73
  var action = _ref.action,
77
74
  category = _ref.category,
@@ -97,7 +94,7 @@ var Link = function Link(_ref2, ref) {
97
94
  internal = _ref2$internal === void 0 ? false : _ref2$internal,
98
95
  _ref2$tracking = _ref2.tracking,
99
96
  tracking = _ref2$tracking === void 0 ? false : _ref2$tracking,
100
- props = _objectWithoutPropertiesLoose(_ref2, _excluded$f);
97
+ props = _objectWithoutPropertiesLoose(_ref2, ["href", "children", "internal", "tracking"]);
101
98
 
102
99
  if (internal || href && href.startsWith('/')) {
103
100
  return /*#__PURE__*/React.createElement(NextLink, {
@@ -192,8 +189,6 @@ var getSizeStyles = function getSizeStyles(size) {
192
189
  };
193
190
  };
194
191
 
195
- var _excluded$e = ["size", "prefix", "suffix", "inverted", "sx", "children", "align", "href", "internal", "tracking"];
196
-
197
192
  var Button = function Button(_ref, ref) {
198
193
  var _ref$size = _ref.size,
199
194
  size = _ref$size === void 0 ? 'sm' : _ref$size,
@@ -206,7 +201,7 @@ var Button = function Button(_ref, ref) {
206
201
  href = _ref.href,
207
202
  internal = _ref.internal,
208
203
  tracking = _ref.tracking,
209
- props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
204
+ props = _objectWithoutPropertiesLoose(_ref, ["size", "prefix", "suffix", "inverted", "sx", "children", "align", "href", "internal", "tracking"]);
210
205
 
211
206
  if (!['xs', 'sm', 'md', 'lg', 'xl'].includes(size)) {
212
207
  throw new Error('Size must be xs, sm, md, lg, or xl');
@@ -384,8 +379,6 @@ var Button = function Button(_ref, ref) {
384
379
 
385
380
  var button = forwardRef(Button);
386
381
 
387
- var _excluded$d = ["label", "children", "inverted", "color", "href", "internal", "tracking", "sx"];
388
-
389
382
  var Callout = function Callout(_ref, ref) {
390
383
  var label = _ref.label,
391
384
  children = _ref.children,
@@ -395,7 +388,7 @@ var Callout = function Callout(_ref, ref) {
395
388
  internal = _ref.internal,
396
389
  tracking = _ref.tracking,
397
390
  sx = _ref.sx,
398
- props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
391
+ props = _objectWithoutPropertiesLoose(_ref, ["label", "children", "inverted", "color", "href", "internal", "tracking", "sx"]);
399
392
 
400
393
  var baseColor = color || (inverted ? 'secondary' : 'primary');
401
394
  var hoverColor = color ? 'primary' : inverted ? 'primary' : 'secondary';
@@ -478,13 +471,33 @@ var Callout = function Callout(_ref, ref) {
478
471
 
479
472
  var callout = forwardRef(Callout);
480
473
 
481
- var _excluded$c = ["colormap", "label", "clim", "discrete", "units", "width", "height", "format", "horizontal"];
482
- var sx$2 = {
483
- clim: {
484
- fontFamily: 'mono',
485
- fontSize: ['9px', 0, 0, 1],
486
- letterSpacing: 'smallcaps',
487
- textTransform: 'uppercase'
474
+ var styles = {
475
+ clim: function clim(setClim) {
476
+ return {
477
+ fontFamily: 'mono',
478
+ fontSize: ['9px', 0, 0, 1],
479
+ letterSpacing: 'smallcaps',
480
+ textTransform: 'uppercase',
481
+ '@media (hover: hover) and (pointer: fine)': {
482
+ '&:hover': {
483
+ borderBottom: setClim ? function (_ref) {
484
+ var colors = _ref.colors;
485
+ return "solid 1px " + colors.primary + " !important";
486
+ } : 'unset'
487
+ }
488
+ },
489
+ '&:focus': {
490
+ outline: 'none',
491
+ borderBottom: setClim ? function (_ref2) {
492
+ var colors = _ref2.colors;
493
+ return "solid 1px " + colors.primary + " !important";
494
+ } : 'unset'
495
+ },
496
+ transition: 'border 0.15s',
497
+ userSelect: setClim ? 'none !important' : 'unset',
498
+ width: 'fit-content',
499
+ minWidth: 'fit-content'
500
+ };
488
501
  }
489
502
  };
490
503
  var DIMENSIONS = {
@@ -492,12 +505,12 @@ var DIMENSIONS = {
492
505
  height: ['80px', '110px', '110px', '130px']
493
506
  };
494
507
 
495
- var Gradient = function Gradient(_ref) {
496
- var colormap = _ref.colormap,
497
- discrete = _ref.discrete,
498
- horizontal = _ref.horizontal,
499
- width = _ref.width,
500
- height = _ref.height;
508
+ var Gradient = function Gradient(_ref3) {
509
+ var colormap = _ref3.colormap,
510
+ discrete = _ref3.discrete,
511
+ horizontal = _ref3.horizontal,
512
+ width = _ref3.width,
513
+ height = _ref3.height;
501
514
  var step = 1 / colormap.length * 100;
502
515
  var values = colormap.map(function (d, i) {
503
516
  return "rgb(" + d + ") " + i * step + "% " + (discrete && i < colormap.length - 1 ? (i + 1) * step + "%" : '');
@@ -512,8 +525,8 @@ var Gradient = function Gradient(_ref) {
512
525
  minHeight: height || DIMENSIONS.height
513
526
  }, {
514
527
  mt: horizontal ? [0, '1px', '1px', 0] : 0,
515
- border: function border(_ref2) {
516
- var colors = _ref2.colors;
528
+ border: function border(_ref4) {
529
+ var colors = _ref4.colors;
517
530
  return "solid 1px " + colors.hinted;
518
531
  },
519
532
  background: css
@@ -521,10 +534,10 @@ var Gradient = function Gradient(_ref) {
521
534
  });
522
535
  };
523
536
 
524
- var Label = function Label(_ref3) {
525
- var label = _ref3.label,
526
- units = _ref3.units,
527
- horizontal = _ref3.horizontal;
537
+ var Label = function Label(_ref5) {
538
+ var label = _ref5.label,
539
+ units = _ref5.units,
540
+ horizontal = _ref5.horizontal;
528
541
  return /*#__PURE__*/React.createElement(Box, {
529
542
  sx: !horizontal && {
530
543
  alignSelf: 'flex-end'
@@ -553,63 +566,230 @@ var Label = function Label(_ref3) {
553
566
  }, units)));
554
567
  };
555
568
 
556
- var Colorbar = function Colorbar(_ref4) {
557
- var colormap = _ref4.colormap,
558
- label = _ref4.label,
559
- clim = _ref4.clim,
560
- discrete = _ref4.discrete,
561
- units = _ref4.units,
562
- width = _ref4.width,
563
- height = _ref4.height,
564
- _ref4$format = _ref4.format,
565
- format = _ref4$format === void 0 ? function (d) {
569
+ var Colorbar = function Colorbar(_ref6) {
570
+ var colormap = _ref6.colormap,
571
+ label = _ref6.label,
572
+ clim = _ref6.clim,
573
+ setClim = _ref6.setClim,
574
+ _ref6$setClimStep = _ref6.setClimStep,
575
+ setClimStep = _ref6$setClimStep === void 0 ? 1 : _ref6$setClimStep,
576
+ discrete = _ref6.discrete,
577
+ units = _ref6.units,
578
+ width = _ref6.width,
579
+ height = _ref6.height,
580
+ _ref6$format = _ref6.format,
581
+ format = _ref6$format === void 0 ? function (d) {
566
582
  return d;
567
- } : _ref4$format,
568
- _ref4$horizontal = _ref4.horizontal,
569
- horizontal = _ref4$horizontal === void 0 ? false : _ref4$horizontal,
570
- props = _objectWithoutPropertiesLoose(_ref4, _excluded$c);
583
+ } : _ref6$format,
584
+ _ref6$horizontal = _ref6.horizontal,
585
+ horizontal = _ref6$horizontal === void 0 ? false : _ref6$horizontal,
586
+ _ref6$bottom = _ref6.bottom,
587
+ bottom = _ref6$bottom === void 0 ? false : _ref6$bottom,
588
+ sx = _ref6.sx,
589
+ sxClim = _ref6.sxClim,
590
+ props = _objectWithoutPropertiesLoose(_ref6, ["colormap", "label", "clim", "setClim", "setClimStep", "discrete", "units", "width", "height", "format", "horizontal", "bottom", "sx", "sxClim"]);
571
591
 
572
592
  if (!Array.isArray(colormap)) {
573
593
  throw new Error("expected array for colormap, got '" + colormap + "'.");
574
594
  }
575
595
 
596
+ var climRef = [useRef(), useRef()];
597
+
598
+ var _useState = useState(false),
599
+ climMinDragging = _useState[0],
600
+ setClimMinDragging = _useState[1];
601
+
602
+ var _useState2 = useState(false),
603
+ climMaxDragging = _useState2[0],
604
+ setClimMaxDragging = _useState2[1];
605
+
606
+ var x,
607
+ y,
608
+ dx,
609
+ dy = 0;
610
+ var id = null;
611
+ var init = [0, 0];
612
+ var scale = setClimStep;
613
+
614
+ var draggingFunction = function draggingFunction(e) {
615
+ if (id === 'min' && !climMinDragging) setClimMinDragging(true);
616
+ if (id === 'max' && !climMaxDragging) setClimMaxDragging(true);
617
+ dx = e.pageX - x;
618
+ dy = e.pageY - y;
619
+
620
+ if (horizontal) {
621
+ if (id === 'min') setClim(function (prev) {
622
+ return [Math.min(init[0] + dx * scale, init[1]), prev[1]];
623
+ });
624
+ if (id === 'max') setClim(function (prev) {
625
+ return [prev[0], Math.max(init[1] + dx * scale, init[0])];
626
+ });
627
+ } else {
628
+ if (id === 'min') setClim(function (prev) {
629
+ return [Math.min(init[0] - dy * scale, init[1]), prev[1]];
630
+ });
631
+ if (id === 'max') setClim(function (prev) {
632
+ return [prev[0], Math.max(init[1] - dy * scale, init[0])];
633
+ });
634
+ }
635
+ };
636
+
637
+ var handleMouseDown = function handleMouseDown(e) {
638
+ y = e.pageY;
639
+ x = e.pageX;
640
+ id = e.target.id;
641
+ init = clim;
642
+ document.body.setAttribute('style', horizontal ? 'cursor: ew-resize !important' : 'cursor: ns-resize !important');
643
+ document.addEventListener('mousemove', draggingFunction);
644
+
645
+ var updater = function updater() {
646
+ document.body.setAttribute('style', 'cursor: unset');
647
+ document.removeEventListener('mousemove', draggingFunction);
648
+ window.removeEventListener('mouseup', updater);
649
+ if (id === 'min') setClimMinDragging(false);
650
+ if (id === 'max') setClimMaxDragging(false);
651
+ };
652
+
653
+ window.addEventListener('mouseup', updater);
654
+ };
655
+
656
+ var increment = function increment(e) {
657
+ if (climRef[0].current === document.activeElement) {
658
+ e.preventDefault();
659
+ setClim(function (prev) {
660
+ return [Math.min(prev[0] + scale, prev[1]), prev[1]];
661
+ });
662
+ climRef[0].current.focus();
663
+ }
664
+
665
+ if (climRef[1].current === document.activeElement) {
666
+ e.preventDefault();
667
+ setClim(function (prev) {
668
+ return [prev[0], Math.max(prev[1] + scale, prev[0])];
669
+ });
670
+ climRef[1].current.focus();
671
+ }
672
+ };
673
+
674
+ var decrement = function decrement(e) {
675
+ if (climRef[0].current === document.activeElement) {
676
+ e.preventDefault();
677
+ setClim(function (prev) {
678
+ return [Math.min(prev[0] - scale, prev[1]), prev[1]];
679
+ });
680
+ climRef[0].current.focus();
681
+ }
682
+
683
+ if (climRef[1].current === document.activeElement) {
684
+ e.preventDefault();
685
+ setClim(function (prev) {
686
+ return [prev[0], Math.max(prev[1] - scale, prev[0])];
687
+ });
688
+ climRef[1].current.focus();
689
+ }
690
+ };
691
+
692
+ useEffect(function () {
693
+ var listener = function listener(e) {
694
+ if (['ArrowUp', 'ArrowRight'].includes(e.code) || ['ArrowUp', 'ArrowRight'].includes(e.key)) {
695
+ increment(e);
696
+ }
697
+
698
+ if (['ArrowDown', 'ArrowLeft'].includes(e.code) || ['ArrowDown', 'ArrowLeft'].includes(e.key)) {
699
+ decrement(e);
700
+ }
701
+ };
702
+
703
+ window.addEventListener('keydown', listener);
704
+ return function () {
705
+ window.removeEventListener('keydown', listener);
706
+ };
707
+ }, [clim]);
708
+
576
709
  var ClimMin = function ClimMin() {
577
710
  return /*#__PURE__*/React.createElement(Box, {
578
- sx: _extends({}, sx$2.clim, {
579
- ml: label ? horizontal ? '10px' : '2px' : 0,
711
+ id: "min",
712
+ ref: climRef[0],
713
+ tabIndex: 0,
714
+ sx: _extends({}, styles.clim(setClim), {
715
+ ml: label ? horizontal ? bottom ? '0px' : '10px' : '2px' : 0,
580
716
  mr: horizontal ? ['2px', '1px', '1px', '2px'] : 0,
581
- mb: horizontal ? 0 : ['-2px', '-2px', '-2px', '-3px']
582
- })
717
+ mb: horizontal ? 0 : ['-2px', '-2px', '-2px', '-3px'],
718
+ borderBottom: setClim ? climMinDragging ? function (_ref7) {
719
+ var colors = _ref7.colors;
720
+ return "solid 1px " + colors.primary;
721
+ } : function (_ref8) {
722
+ var colors = _ref8.colors;
723
+ return "solid 1px " + colors.secondary;
724
+ } : 'unset',
725
+ cursor: setClim ? horizontal ? 'ew-resize' : 'ns-resize' : 'default'
726
+ }, sxClim),
727
+ onMouseDown: setClim ? handleMouseDown : function () {},
728
+ onClick: function onClick() {
729
+ return climRef[0].current.focus();
730
+ }
583
731
  }, format(clim[0]));
584
732
  };
585
733
 
586
734
  var ClimMax = function ClimMax() {
587
735
  return /*#__PURE__*/React.createElement(Box, {
588
- sx: _extends({}, sx$2.clim, {
736
+ id: "max",
737
+ ref: climRef[1],
738
+ tabIndex: 0,
739
+ sx: _extends({}, styles.clim(setClim), {
589
740
  ml: horizontal ? ['2px', '1px', '1px', '2px'] : '2px',
590
- mt: horizontal ? 0 : ['-2px', '-3px', '-3px', '-3px']
591
- })
741
+ mt: horizontal ? 0 : ['-2px', '-3px', '-3px', '-3px'],
742
+ borderBottom: setClim ? climMaxDragging ? function (_ref9) {
743
+ var colors = _ref9.colors;
744
+ return "solid 1px " + colors.primary;
745
+ } : function (_ref10) {
746
+ var colors = _ref10.colors;
747
+ return "solid 1px " + colors.secondary;
748
+ } : 'unset',
749
+ cursor: setClim ? horizontal ? 'ew-resize' : 'ns-resize' : 'default'
750
+ }, sxClim),
751
+ onMouseDown: setClim ? handleMouseDown : function () {},
752
+ onClick: function onClick() {
753
+ return climRef[1].current.focus();
754
+ }
592
755
  }, format(clim[1]));
593
756
  };
594
757
 
595
- return /*#__PURE__*/React.createElement(Flex, {
596
- sx: _extends({}, props.sx, {
758
+ return /*#__PURE__*/React.createElement(Flex, _extends({}, props, {
759
+ sx: _extends({
597
760
  flexDirection: 'row',
598
- alignItems: 'center',
761
+ alignItems: 'start',
599
762
  justifyContent: 'flex-start',
600
- gap: ['3px', '6px', '6px', '7px']
601
- })
602
- }, label && /*#__PURE__*/React.createElement(Label, {
763
+ gap: ['3px', '6px', '6px', '7px'],
764
+ height: !horizontal ? '100%' : 'unset'
765
+ }, sx)
766
+ }), label && /*#__PURE__*/React.createElement(Label, {
603
767
  label: label,
604
768
  units: units,
605
769
  horizontal: horizontal
606
- }), horizontal && clim && /*#__PURE__*/React.createElement(ClimMin, null), /*#__PURE__*/React.createElement(Gradient, {
770
+ }), /*#__PURE__*/React.createElement(Flex, {
771
+ sx: {
772
+ flexGrow: horizontal ? 1 : 'unset',
773
+ flexDirection: 'column',
774
+ ml: bottom && label ? '4px' : '0px',
775
+ height: !horizontal ? '100%' : 'unset'
776
+ }
777
+ }, /*#__PURE__*/React.createElement(Flex, {
778
+ sx: {
779
+ gap: ['3px', '6px', '6px', '7px'],
780
+ height: !horizontal ? '100%' : 'unset'
781
+ }
782
+ }, horizontal && clim && !bottom && /*#__PURE__*/React.createElement(ClimMin, null), /*#__PURE__*/React.createElement(Gradient, {
607
783
  colormap: colormap,
608
784
  horizontal: horizontal,
609
785
  discrete: discrete,
610
786
  width: width,
611
787
  height: height
612
- }), horizontal && clim && /*#__PURE__*/React.createElement(ClimMax, null), !horizontal && /*#__PURE__*/React.createElement(Flex, {
788
+ }), horizontal && clim && !bottom && /*#__PURE__*/React.createElement(ClimMax, null)), horizontal && clim && bottom && /*#__PURE__*/React.createElement(Flex, {
789
+ sx: {
790
+ justifyContent: 'space-between'
791
+ }
792
+ }, /*#__PURE__*/React.createElement(ClimMin, null), /*#__PURE__*/React.createElement(ClimMax, null))), !horizontal && /*#__PURE__*/React.createElement(Flex, {
613
793
  sx: {
614
794
  flexDirection: 'column-reverse',
615
795
  justifyContent: 'space-between',
@@ -618,8 +798,6 @@ var Colorbar = function Colorbar(_ref4) {
618
798
  }, clim && /*#__PURE__*/React.createElement(ClimMin, null), clim && /*#__PURE__*/React.createElement(ClimMax, null)));
619
799
  };
620
800
 
621
- var _excluded$b = ["start", "width", "dl", "dr", "children", "sx"];
622
-
623
801
  var Column = function Column(_ref) {
624
802
  var start = _ref.start,
625
803
  width = _ref.width,
@@ -627,7 +805,7 @@ var Column = function Column(_ref) {
627
805
  dr = _ref.dr,
628
806
  children = _ref.children,
629
807
  sx = _ref.sx,
630
- props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
808
+ props = _objectWithoutPropertiesLoose(_ref, ["start", "width", "dl", "dr", "children", "sx"]);
631
809
 
632
810
  start = start || 'auto';
633
811
  width = width || 'auto';
@@ -834,14 +1012,12 @@ var Logo = function Logo(_ref) {
834
1012
  })));
835
1013
  };
836
1014
 
837
- var _excluded$a = ["children", "sx", "columns", "gap"];
838
-
839
1015
  var Row = function Row(_ref) {
840
1016
  var children = _ref.children,
841
1017
  sx = _ref.sx,
842
1018
  columns = _ref.columns,
843
1019
  gap = _ref.gap,
844
- props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
1020
+ props = _objectWithoutPropertiesLoose(_ref, ["children", "sx", "columns", "gap"]);
845
1021
 
846
1022
  var makeArray = function makeArray(input) {
847
1023
  if (!Array.isArray(input)) {
@@ -893,12 +1069,10 @@ var Row = function Row(_ref) {
893
1069
  }), children);
894
1070
  };
895
1071
 
896
- var _excluded$9 = ["value", "sx"];
897
-
898
1072
  var Menu = function Menu(_ref) {
899
1073
  var value = _ref.value,
900
1074
  sx = _ref.sx,
901
- props = _objectWithoutPropertiesLoose(_ref, _excluded$9);
1075
+ props = _objectWithoutPropertiesLoose(_ref, ["value", "sx"]);
902
1076
 
903
1077
  return /*#__PURE__*/React.createElement(IconButton, _extends({
904
1078
  sx: _extends({
@@ -986,150 +1160,7 @@ var Menu = function Menu(_ref) {
986
1160
  })));
987
1161
  };
988
1162
 
989
- var _excluded$8 = ["value", "sx"];
990
-
991
- var Settings = function Settings(_ref) {
992
- var value = _ref.value,
993
- sx = _ref.sx,
994
- props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
995
-
996
- return /*#__PURE__*/React.createElement(IconButton, _extends({
997
- sx: _extends({
998
- cursor: 'pointer',
999
- fill: 'none',
1000
- strokeWidth: '2px',
1001
- stroke: 'text',
1002
- '.paren': {
1003
- opacity: '0'
1004
- },
1005
- '@media (hover: hover) and (pointer: fine)': {
1006
- '&:hover .paren': {
1007
- opacity: '1'
1008
- }
1009
- }
1010
- }, sx),
1011
- "aria-label": "Toggle Menu"
1012
- }, props), !value && /*#__PURE__*/React.createElement("svg", {
1013
- style: {
1014
- width: '50px',
1015
- height: '30px',
1016
- transform: 'scale(2)',
1017
- marginTop: '-3px'
1018
- },
1019
- xmlns: "http://www.w3.org/2000/svg",
1020
- viewBox: "0 0 68 36"
1021
- }, /*#__PURE__*/React.createElement("line", {
1022
- x1: "24",
1023
- y1: "2.1",
1024
- x2: "24",
1025
- y2: "6.1"
1026
- }), /*#__PURE__*/React.createElement("line", {
1027
- x1: "24",
1028
- y1: "24.1",
1029
- x2: "24",
1030
- y2: "33.9"
1031
- }), /*#__PURE__*/React.createElement("line", {
1032
- x1: "44",
1033
- y1: "2.1",
1034
- x2: "44",
1035
- y2: "12.1"
1036
- }), /*#__PURE__*/React.createElement("line", {
1037
- x1: "44",
1038
- y1: "30.1",
1039
- x2: "44",
1040
- y2: "33.9"
1041
- }), /*#__PURE__*/React.createElement("circle", {
1042
- cx: "24",
1043
- cy: "15.1",
1044
- r: "5"
1045
- }), /*#__PURE__*/React.createElement("circle", {
1046
- cx: "44",
1047
- cy: "21.1",
1048
- r: "5"
1049
- }), /*#__PURE__*/React.createElement("path", {
1050
- style: {
1051
- transition: 'all 0.2s'
1052
- },
1053
- className: "paren",
1054
- d: "M6.4,1.2c-6.3,10.3-6.3,23.3,0,33.6"
1055
- }), /*#__PURE__*/React.createElement("path", {
1056
- style: {
1057
- transition: 'all 0.2s'
1058
- },
1059
- className: "paren",
1060
- d: "M61.6,34.8c6.3-10.3,6.3-23.3,0-33.6"
1061
- })), value && /*#__PURE__*/React.createElement("svg", {
1062
- style: {
1063
- width: '50px',
1064
- height: '30px',
1065
- transform: 'scale(2)',
1066
- marginTop: '-3px'
1067
- },
1068
- xmlns: "http://www.w3.org/2000/svg",
1069
- viewBox: "0 0 68 36"
1070
- }, /*#__PURE__*/React.createElement("line", {
1071
- x1: "50.85",
1072
- y1: "29.79",
1073
- x2: "17.15",
1074
- y2: "6.21"
1075
- }), /*#__PURE__*/React.createElement("line", {
1076
- x1: "17.15",
1077
- y1: "29.79",
1078
- x2: "50.85",
1079
- y2: "6.21"
1080
- }), /*#__PURE__*/React.createElement("path", {
1081
- style: {
1082
- transition: 'all 0.2s'
1083
- },
1084
- className: "paren",
1085
- d: "M6.4,1.2c-6.3,10.3-6.3,23.3,0,33.6"
1086
- }), /*#__PURE__*/React.createElement("path", {
1087
- style: {
1088
- transition: 'all 0.2s'
1089
- },
1090
- className: "paren",
1091
- d: "M61.6,34.8c6.3-10.3,6.3-23.3,0-33.6"
1092
- })));
1093
- };
1094
-
1095
- var _excluded$7 = ["sx"];
1096
-
1097
- var Dimmer = function Dimmer(_ref) {
1098
- var sx = _ref.sx,
1099
- props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
1100
-
1101
- var _useColorMode = useColorMode(),
1102
- colorMode = _useColorMode[0],
1103
- setColorMode = _useColorMode[1];
1104
-
1105
- var toggle = useCallback(function () {
1106
- setColorMode(colorMode === 'light' ? 'dark' : 'light');
1107
- }, [colorMode]);
1108
- return /*#__PURE__*/React.createElement(IconButton, _extends({
1109
- "aria-label": "Toggle dark mode",
1110
- onClick: toggle,
1111
- role: "checkbox",
1112
- sx: _extends({
1113
- width: 32,
1114
- height: 32,
1115
- display: 'inline-block',
1116
- cursor: 'pointer',
1117
- color: 'secondary'
1118
- }, sx)
1119
- }, props), /*#__PURE__*/React.createElement(Sun, {
1120
- sx: {
1121
- strokeWidth: '1.75',
1122
- transition: 'stroke 0.15s',
1123
- '@media (hover: hover) and (pointer: fine)': {
1124
- '&:hover': {
1125
- stroke: 'primary'
1126
- }
1127
- }
1128
- }
1129
- }));
1130
- };
1131
-
1132
- var sx$1 = {
1163
+ var sx = {
1133
1164
  link: function link(current, label, first) {
1134
1165
  if (first === void 0) {
1135
1166
  first = false;
@@ -1212,12 +1243,12 @@ var Nav = function Nav(_ref) {
1212
1243
  onClick: function onClick() {
1213
1244
  if (nav === url) setExpanded(false);
1214
1245
  },
1215
- sx: sx$1.link(nav, url, first)
1246
+ sx: sx.link(nav, url, first)
1216
1247
  }, /*#__PURE__*/React.createElement(HoverArrow, null), display));
1217
1248
  } else {
1218
1249
  return /*#__PURE__*/React.createElement(Link$2, {
1219
1250
  href: href,
1220
- sx: sx$1.link(nav, url, first)
1251
+ sx: sx.link(nav, url, first)
1221
1252
  }, /*#__PURE__*/React.createElement(HoverArrow, null), display);
1222
1253
  }
1223
1254
  };
@@ -1243,8 +1274,7 @@ var Header = function Header(_ref3) {
1243
1274
  var status = _ref3.status,
1244
1275
  mode = _ref3.mode,
1245
1276
  nav = _ref3.nav,
1246
- dimmer = _ref3.dimmer,
1247
- settings = _ref3.settings;
1277
+ menuItems = _ref3.menuItems;
1248
1278
 
1249
1279
  var _useState = useState(false),
1250
1280
  expanded = _useState[0],
@@ -1256,7 +1286,6 @@ var Header = function Header(_ref3) {
1256
1286
 
1257
1287
  return /*#__PURE__*/React.createElement(Row, {
1258
1288
  sx: {
1259
- width: '100%',
1260
1289
  pt: ['12px'],
1261
1290
  pb: [3]
1262
1291
  }
@@ -1308,53 +1337,31 @@ var Header = function Header(_ref3) {
1308
1337
  top: ['-2px', '-3px', '-3px']
1309
1338
  }
1310
1339
  }, status ? "(" + status + ")" : '')), /*#__PURE__*/React.createElement(Column, {
1311
- start: [status ? 6 : 4, 6, 12, 12],
1340
+ start: [status ? 6 : 4, 6, 11, 11],
1312
1341
  width: [status ? 1 : 3, 3, 2, 2],
1313
1342
  sx: {
1314
- display: 'flex',
1315
- alignItems: 'center',
1316
- justifyContent: 'flex-end'
1317
- }
1318
- }, /*#__PURE__*/React.createElement(Box, {
1319
- sx: {
1320
- mr: ['18px'],
1321
- position: 'relative',
1322
- top: ['-1px'],
1323
- pointerEvents: expanded || settings && settings.value ? 'none' : 'all',
1324
- transition: 'opacity 0.15s',
1325
- display: [status ? 'none' : 'block', 'block', dimmer === 'top' ? 'block' : 'none', dimmer === 'top' ? 'block' : 'none']
1326
- }
1327
- }, /*#__PURE__*/React.createElement(Dimmer, {
1328
- sx: {
1329
- opacity: expanded || settings && settings.value ? 0 : 1,
1330
- color: 'primary'
1343
+ zIndex: 5000
1331
1344
  }
1332
- })), settings && /*#__PURE__*/React.createElement(Box, {
1345
+ }, /*#__PURE__*/React.createElement(Flex, {
1333
1346
  sx: {
1334
- mr: ['21px'],
1335
- position: 'relative',
1336
- pointerEvents: expanded ? 'none' : 'all',
1337
- transition: 'opacity 0.15s',
1338
- display: [status ? 'none' : 'block', 'block', 'none', 'none']
1347
+ justifyContent: 'flex-end'
1339
1348
  }
1340
- }, /*#__PURE__*/React.createElement(Settings, {
1341
- value: settings.value,
1342
- onClick: settings.onClick,
1349
+ }, /*#__PURE__*/React.createElement(Flex, {
1343
1350
  sx: {
1351
+ mr: '18px',
1352
+ gap: '18px',
1344
1353
  opacity: expanded ? 0 : 1,
1345
- stroke: 'primary'
1354
+ transition: 'opacity 0.15s',
1355
+ justifyContent: 'space-between',
1356
+ alignItems: 'center'
1346
1357
  }
1347
- })), /*#__PURE__*/React.createElement(Menu, {
1358
+ }, menuItems), /*#__PURE__*/React.createElement(Menu, {
1348
1359
  sx: {
1349
- transition: 'opacity 0.15s',
1350
- pointerEvents: settings && settings.value ? 'none' : 'all',
1351
- opacity: settings && settings.value ? 0 : 1,
1352
- mr: ['-2px'],
1353
- zIndex: 5000
1360
+ mr: ['-2px']
1354
1361
  },
1355
1362
  value: expanded,
1356
1363
  onClick: toggle
1357
- })), /*#__PURE__*/React.createElement(Box, {
1364
+ }))), /*#__PURE__*/React.createElement(Box, {
1358
1365
  sx: {
1359
1366
  opacity: expanded ? 1 : 0,
1360
1367
  pointerEvents: expanded ? 'all' : 'none',
@@ -1554,6 +1561,41 @@ var Footer = function Footer() {
1554
1561
  }))));
1555
1562
  };
1556
1563
 
1564
+ var Dimmer = function Dimmer(_ref) {
1565
+ var sx = _ref.sx,
1566
+ props = _objectWithoutPropertiesLoose(_ref, ["sx"]);
1567
+
1568
+ var _useColorMode = useColorMode(),
1569
+ colorMode = _useColorMode[0],
1570
+ setColorMode = _useColorMode[1];
1571
+
1572
+ var toggle = useCallback(function () {
1573
+ setColorMode(colorMode === 'light' ? 'dark' : 'light');
1574
+ }, [colorMode]);
1575
+ return /*#__PURE__*/React.createElement(IconButton, _extends({
1576
+ "aria-label": "Toggle dark mode",
1577
+ onClick: toggle,
1578
+ role: "checkbox",
1579
+ sx: _extends({
1580
+ width: 32,
1581
+ height: 32,
1582
+ display: 'inline-block',
1583
+ cursor: 'pointer',
1584
+ color: 'secondary'
1585
+ }, sx)
1586
+ }, props), /*#__PURE__*/React.createElement(Sun, {
1587
+ sx: {
1588
+ strokeWidth: '1.75',
1589
+ transition: 'stroke 0.15s',
1590
+ '@media (hover: hover) and (pointer: fine)': {
1591
+ '&:hover': {
1592
+ stroke: 'primary'
1593
+ }
1594
+ }
1595
+ }
1596
+ }));
1597
+ };
1598
+
1557
1599
  var GitSha = function GitSha() {
1558
1600
  var sha = process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA;
1559
1601
  var owner = process.env.NEXT_PUBLIC_VERCEL_GIT_REPO_OWNER;
@@ -1707,7 +1749,6 @@ function scrollFraction(window, documnt) {
1707
1749
  return Math.min(window.scrollY / (document.body.offsetHeight - 770), 0.99);
1708
1750
  }
1709
1751
 
1710
- var _excluded$6 = ["duration", "delay", "children"];
1711
1752
  var fade = keyframes({
1712
1753
  from: {
1713
1754
  opacity: 0
@@ -1723,7 +1764,7 @@ var FadeIn = function FadeIn(_ref) {
1723
1764
  _ref$delay = _ref.delay,
1724
1765
  delay = _ref$delay === void 0 ? 0 : _ref$delay,
1725
1766
  children = _ref.children,
1726
- delegated = _objectWithoutPropertiesLoose(_ref, _excluded$6);
1767
+ delegated = _objectWithoutPropertiesLoose(_ref, ["duration", "delay", "children"]);
1727
1768
 
1728
1769
  return /*#__PURE__*/React.createElement(Box, _extends({}, delegated, {
1729
1770
  sx: {
@@ -1866,6 +1907,110 @@ function GuideColumns(_ref2) {
1866
1907
  }));
1867
1908
  }
1868
1909
 
1910
+ var Settings = function Settings(_ref) {
1911
+ var value = _ref.value,
1912
+ sx = _ref.sx,
1913
+ props = _objectWithoutPropertiesLoose(_ref, ["value", "sx"]);
1914
+
1915
+ return /*#__PURE__*/React.createElement(IconButton, _extends({
1916
+ sx: _extends({
1917
+ cursor: 'pointer',
1918
+ fill: 'none',
1919
+ strokeWidth: '2px',
1920
+ stroke: 'text',
1921
+ '.paren': {
1922
+ opacity: '0'
1923
+ },
1924
+ '@media (hover: hover) and (pointer: fine)': {
1925
+ '&:hover .paren': {
1926
+ opacity: '1'
1927
+ }
1928
+ }
1929
+ }, sx),
1930
+ "aria-label": "Toggle Menu"
1931
+ }, props), !value && /*#__PURE__*/React.createElement("svg", {
1932
+ style: {
1933
+ width: '50px',
1934
+ height: '30px',
1935
+ transform: 'scale(2)',
1936
+ marginTop: '-3px'
1937
+ },
1938
+ xmlns: "http://www.w3.org/2000/svg",
1939
+ viewBox: "0 0 68 36"
1940
+ }, /*#__PURE__*/React.createElement("line", {
1941
+ x1: "24",
1942
+ y1: "2.1",
1943
+ x2: "24",
1944
+ y2: "6.1"
1945
+ }), /*#__PURE__*/React.createElement("line", {
1946
+ x1: "24",
1947
+ y1: "24.1",
1948
+ x2: "24",
1949
+ y2: "33.9"
1950
+ }), /*#__PURE__*/React.createElement("line", {
1951
+ x1: "44",
1952
+ y1: "2.1",
1953
+ x2: "44",
1954
+ y2: "12.1"
1955
+ }), /*#__PURE__*/React.createElement("line", {
1956
+ x1: "44",
1957
+ y1: "30.1",
1958
+ x2: "44",
1959
+ y2: "33.9"
1960
+ }), /*#__PURE__*/React.createElement("circle", {
1961
+ cx: "24",
1962
+ cy: "15.1",
1963
+ r: "5"
1964
+ }), /*#__PURE__*/React.createElement("circle", {
1965
+ cx: "44",
1966
+ cy: "21.1",
1967
+ r: "5"
1968
+ }), /*#__PURE__*/React.createElement("path", {
1969
+ style: {
1970
+ transition: 'all 0.2s'
1971
+ },
1972
+ className: "paren",
1973
+ d: "M6.4,1.2c-6.3,10.3-6.3,23.3,0,33.6"
1974
+ }), /*#__PURE__*/React.createElement("path", {
1975
+ style: {
1976
+ transition: 'all 0.2s'
1977
+ },
1978
+ className: "paren",
1979
+ d: "M61.6,34.8c6.3-10.3,6.3-23.3,0-33.6"
1980
+ })), value && /*#__PURE__*/React.createElement("svg", {
1981
+ style: {
1982
+ width: '50px',
1983
+ height: '30px',
1984
+ transform: 'scale(2)',
1985
+ marginTop: '-3px'
1986
+ },
1987
+ xmlns: "http://www.w3.org/2000/svg",
1988
+ viewBox: "0 0 68 36"
1989
+ }, /*#__PURE__*/React.createElement("line", {
1990
+ x1: "50.85",
1991
+ y1: "29.79",
1992
+ x2: "17.15",
1993
+ y2: "6.21"
1994
+ }), /*#__PURE__*/React.createElement("line", {
1995
+ x1: "17.15",
1996
+ y1: "29.79",
1997
+ x2: "50.85",
1998
+ y2: "6.21"
1999
+ }), /*#__PURE__*/React.createElement("path", {
2000
+ style: {
2001
+ transition: 'all 0.2s'
2002
+ },
2003
+ className: "paren",
2004
+ d: "M6.4,1.2c-6.3,10.3-6.3,23.3,0,33.6"
2005
+ }), /*#__PURE__*/React.createElement("path", {
2006
+ style: {
2007
+ transition: 'all 0.2s'
2008
+ },
2009
+ className: "paren",
2010
+ d: "M61.6,34.8c6.3-10.3,6.3-23.3,0-33.6"
2011
+ })));
2012
+ };
2013
+
1869
2014
  var Layout = function Layout(_ref) {
1870
2015
  var title = _ref.title,
1871
2016
  description = _ref.description,
@@ -1893,6 +2038,7 @@ var Layout = function Layout(_ref) {
1893
2038
  _ref$container = _ref.container,
1894
2039
  container = _ref$container === void 0 ? true : _ref$container;
1895
2040
  var content = children;
2041
+ var index = useBreakpointIndex();
1896
2042
 
1897
2043
  if (fade) {
1898
2044
  content = /*#__PURE__*/React.createElement(FadeIn, {
@@ -1901,7 +2047,34 @@ var Layout = function Layout(_ref) {
1901
2047
  }
1902
2048
 
1903
2049
  if (container) {
1904
- content = /*#__PURE__*/React.createElement(Container, null, content);
2050
+ content = /*#__PURE__*/React.createElement(Box, {
2051
+ sx: {
2052
+ mb: [8, 8, 9, 10]
2053
+ }
2054
+ }, /*#__PURE__*/React.createElement(Container, null, content));
2055
+ }
2056
+
2057
+ useEffect(function () {
2058
+ if (index > 2 && settings != null && settings.value && settings != null && settings.onClick) {
2059
+ settings == null ? void 0 : settings.onClick();
2060
+ }
2061
+ }, [index, settings == null ? void 0 : settings.value, settings == null ? void 0 : settings.onClick]);
2062
+ var menuItems = [/*#__PURE__*/React.createElement(Dimmer, {
2063
+ key: "dimmer",
2064
+ sx: {
2065
+ color: 'primary',
2066
+ mt: '-2px',
2067
+ display: ['block', 'block', dimmer === 'top' ? 'block' : 'none', dimmer === 'top' ? 'block' : 'none']
2068
+ }
2069
+ })];
2070
+
2071
+ if (settings) {
2072
+ menuItems.push( /*#__PURE__*/React.createElement(Settings, _extends({
2073
+ key: "settings",
2074
+ sx: {
2075
+ display: ['inherit', 'inherit', 'none', 'none']
2076
+ }
2077
+ }, settings)));
1905
2078
  }
1906
2079
 
1907
2080
  return /*#__PURE__*/React.createElement(React.Fragment, null, guide && /*#__PURE__*/React.createElement(Guide, {
@@ -1933,8 +2106,7 @@ var Layout = function Layout(_ref) {
1933
2106
  mode: links,
1934
2107
  status: status,
1935
2108
  nav: nav,
1936
- settings: settings,
1937
- dimmer: dimmer
2109
+ menuItems: menuItems
1938
2110
  }))), /*#__PURE__*/React.createElement(Box, {
1939
2111
  sx: {
1940
2112
  width: '100%',
@@ -2045,14 +2217,12 @@ var Expander = function Expander(_ref) {
2045
2217
  })));
2046
2218
  };
2047
2219
 
2048
- var _excluded$5 = ["label", "value", "sx", "children"];
2049
-
2050
2220
  var Tag = function Tag(_ref) {
2051
2221
  var label = _ref.label,
2052
2222
  value = _ref.value,
2053
2223
  sx = _ref.sx,
2054
2224
  children = _ref.children,
2055
- props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
2225
+ props = _objectWithoutPropertiesLoose(_ref, ["label", "value", "sx", "children"]);
2056
2226
 
2057
2227
  var color = sx && sx.color ? sx.color : 'primary';
2058
2228
  var isClickable = props && (props.onClick || props.onDoubleClick);
@@ -2086,8 +2256,7 @@ var Tag = function Tag(_ref) {
2086
2256
  }, props), children);
2087
2257
  };
2088
2258
 
2089
- var _excluded$4 = ["values", "setValues", "label", "colors", "showAll", "multiSelect"];
2090
- var sx = {
2259
+ var sx$1 = {
2091
2260
  label: {
2092
2261
  fontFamily: 'mono',
2093
2262
  letterSpacing: 'mono',
@@ -2164,10 +2333,10 @@ var Filter = function Filter(_ref2) {
2164
2333
  showAll = _ref2$showAll === void 0 ? false : _ref2$showAll,
2165
2334
  _ref2$multiSelect = _ref2.multiSelect,
2166
2335
  multiSelect = _ref2$multiSelect === void 0 ? false : _ref2$multiSelect,
2167
- props = _objectWithoutPropertiesLoose(_ref2, _excluded$4);
2336
+ props = _objectWithoutPropertiesLoose(_ref2, ["values", "setValues", "label", "colors", "showAll", "multiSelect"]);
2168
2337
 
2169
2338
  return /*#__PURE__*/React.createElement(Box, props, label && /*#__PURE__*/React.createElement(Box, {
2170
- sx: sx.label
2339
+ sx: sx$1.label
2171
2340
  }, label), /*#__PURE__*/React.createElement(Box, {
2172
2341
  sx: {
2173
2342
  mt: label ? [3] : 0
@@ -2262,8 +2431,6 @@ var Group = function Group(_ref) {
2262
2431
  }));
2263
2432
  };
2264
2433
 
2265
- var _excluded$3 = ["size", "inverted", "sx"];
2266
-
2267
2434
  var Input = function Input(_ref, ref) {
2268
2435
  var _extends2;
2269
2436
 
@@ -2271,7 +2438,7 @@ var Input = function Input(_ref, ref) {
2271
2438
  size = _ref$size === void 0 ? 'sm' : _ref$size,
2272
2439
  inverted = _ref.inverted,
2273
2440
  sx = _ref.sx,
2274
- props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
2441
+ props = _objectWithoutPropertiesLoose(_ref, ["size", "inverted", "sx"]);
2275
2442
 
2276
2443
  var defaultColor = inverted ? 'secondary' : 'primary';
2277
2444
 
@@ -2316,8 +2483,6 @@ var getProps = function getProps(test) {
2316
2483
  };
2317
2484
  };
2318
2485
 
2319
- var _excluded$2 = ["children", "size", "sx"];
2320
-
2321
2486
  var Select = function Select(_ref) {
2322
2487
  var _extends2;
2323
2488
 
@@ -2325,7 +2490,8 @@ var Select = function Select(_ref) {
2325
2490
  _ref$size = _ref.size,
2326
2491
  size = _ref$size === void 0 ? 'sm' : _ref$size,
2327
2492
  sx = _ref.sx,
2328
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
2493
+ sxSelect = _ref.sxSelect,
2494
+ props = _objectWithoutPropertiesLoose(_ref, ["children", "size", "sx", "sxSelect"]);
2329
2495
 
2330
2496
  var color = sx && sx.color ? sx.color : 'primary';
2331
2497
  var sizeStyles = getSizeStyles(size);
@@ -2396,7 +2562,7 @@ var Select = function Select(_ref) {
2396
2562
  outline: 'none !important',
2397
2563
  background: 'transparent !important'
2398
2564
  }
2399
- }, _extends2))
2565
+ }, _extends2), sxSelect)
2400
2566
  }, omitOnChange), children), /*#__PURE__*/React.createElement(Arrow, {
2401
2567
  sx: {
2402
2568
  width: width,
@@ -2411,11 +2577,9 @@ var Select = function Select(_ref) {
2411
2577
  }));
2412
2578
  };
2413
2579
 
2414
- var _excluded$1 = ["sx"];
2415
-
2416
2580
  var Slider = function Slider(_ref, ref) {
2417
2581
  var sx = _ref.sx,
2418
- props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
2582
+ props = _objectWithoutPropertiesLoose(_ref, ["sx"]);
2419
2583
 
2420
2584
  var color = sx && sx.color ? sx.color : 'primary';
2421
2585
 
@@ -2457,7 +2621,7 @@ var Slider = function Slider(_ref, ref) {
2457
2621
 
2458
2622
  var slider = forwardRef(Slider);
2459
2623
 
2460
- var styles = {
2624
+ var styles$1 = {
2461
2625
  reset: {
2462
2626
  verticalAlign: 'baseline',
2463
2627
  border: 0,
@@ -2529,7 +2693,7 @@ var Table = function Table(_ref) {
2529
2693
  }
2530
2694
  }, header && /*#__PURE__*/React.createElement(Row, {
2531
2695
  as: "tr",
2532
- sx: _extends({}, styles.reset, styles.header, styles.row, {
2696
+ sx: _extends({}, styles$1.reset, styles$1.header, styles$1.row, {
2533
2697
  color: color,
2534
2698
  borderTopWidth: !borderTop ? '0px' : '1px'
2535
2699
  })
@@ -2537,13 +2701,13 @@ var Table = function Table(_ref) {
2537
2701
  as: "td",
2538
2702
  start: [1],
2539
2703
  width: columns,
2540
- sx: styles.index
2704
+ sx: styles$1.index
2541
2705
  }, header)), data.map(function (row, i) {
2542
2706
  return /*#__PURE__*/React.createElement(Row, {
2543
2707
  as: "tr",
2544
2708
  columns: columns,
2545
2709
  key: i,
2546
- sx: _extends({}, styles.reset, styles.row, {
2710
+ sx: _extends({}, styles$1.reset, styles$1.row, {
2547
2711
  pb: borderBottom && i === data.length - 1 ? ['18px', '18px', '18px', '22px'] : [3, 3, 3, '20px'],
2548
2712
  borderBottomWidth: borderBottom && i === data.length - 1 ? '1px' : '0px',
2549
2713
  borderTopWidth: !borderTop && i === 0 && !header ? '0px' : '1px'
@@ -2554,20 +2718,18 @@ var Table = function Table(_ref) {
2554
2718
  key: j,
2555
2719
  start: start[j],
2556
2720
  width: width[j],
2557
- sx: j == 0 && index ? _extends({}, styles.reset, styles.index) : _extends({}, styles.reset, styles.entry)
2721
+ sx: j == 0 && index ? _extends({}, styles$1.reset, styles$1.index) : _extends({}, styles$1.reset, styles$1.entry)
2558
2722
  }, column);
2559
2723
  }));
2560
2724
  })));
2561
2725
  };
2562
2726
 
2563
- var _excluded = ["value", "onClick", "disabled", "sx"];
2564
-
2565
2727
  var Toggle = function Toggle(_ref, ref) {
2566
2728
  var value = _ref.value,
2567
2729
  onClick = _ref.onClick,
2568
2730
  disabled = _ref.disabled,
2569
2731
  sx = _ref.sx,
2570
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
2732
+ props = _objectWithoutPropertiesLoose(_ref, ["value", "onClick", "disabled", "sx"]);
2571
2733
 
2572
2734
  var color = sx && sx.color ? sx.color : 'primary';
2573
2735
  value = disabled ? false : value;
@@ -2635,7 +2797,6 @@ var Tray = function Tray(_ref) {
2635
2797
  children = _ref.children;
2636
2798
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
2637
2799
  sx: {
2638
- display: ['initial', 'initial', 'none', 'none'],
2639
2800
  position: 'fixed',
2640
2801
  top: '56px',
2641
2802
  bottom: '0px',
@@ -2650,7 +2811,6 @@ var Tray = function Tray(_ref) {
2650
2811
  }
2651
2812
  }), /*#__PURE__*/React.createElement(Box, {
2652
2813
  sx: _extends({
2653
- display: ['initial', 'initial', 'none', 'none'],
2654
2814
  position: 'fixed',
2655
2815
  width: 'calc(100vw)',
2656
2816
  top: '0px',