@carbonplan/components 11.0.0-alpha.0 → 11.0.3
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 +450 -289
- package/dst/index.esm.js.map +1 -1
- package/dst/index.js +640 -479
- package/dst/index.js.map +1 -1
- package/dst/index.modern.js +404 -279
- package/dst/index.modern.js.map +1 -1
- package/package.json +3 -2
package/dst/index.esm.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React, { forwardRef, cloneElement,
|
|
2
|
-
import { Box, Link as Link$2, Flex, Grid, IconButton,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
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(
|
|
496
|
-
var colormap =
|
|
497
|
-
discrete =
|
|
498
|
-
horizontal =
|
|
499
|
-
width =
|
|
500
|
-
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 + "%" : '');
|
|
@@ -511,9 +524,9 @@ var Gradient = function Gradient(_ref) {
|
|
|
511
524
|
width: width || DIMENSIONS.width,
|
|
512
525
|
minHeight: height || DIMENSIONS.height
|
|
513
526
|
}, {
|
|
514
|
-
mt: horizontal ? [
|
|
515
|
-
border: function border(
|
|
516
|
-
var colors =
|
|
527
|
+
mt: horizontal ? ['1px', '1px', '1px', 0] : 0,
|
|
528
|
+
border: function border(_ref4) {
|
|
529
|
+
var colors = _ref4.colors;
|
|
517
530
|
return "solid 1px " + colors.hinted;
|
|
518
531
|
},
|
|
519
532
|
background: css
|
|
@@ -521,12 +534,13 @@ var Gradient = function Gradient(_ref) {
|
|
|
521
534
|
});
|
|
522
535
|
};
|
|
523
536
|
|
|
524
|
-
var Label = function Label(
|
|
525
|
-
var label =
|
|
526
|
-
units =
|
|
527
|
-
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 && {
|
|
543
|
+
width: ['13px', '17px', '17px', '19px'],
|
|
530
544
|
alignSelf: 'flex-end'
|
|
531
545
|
}
|
|
532
546
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -553,63 +567,230 @@ var Label = function Label(_ref3) {
|
|
|
553
567
|
}, units)));
|
|
554
568
|
};
|
|
555
569
|
|
|
556
|
-
var Colorbar = function Colorbar(
|
|
557
|
-
var colormap =
|
|
558
|
-
label =
|
|
559
|
-
clim =
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
570
|
+
var Colorbar = function Colorbar(_ref6) {
|
|
571
|
+
var colormap = _ref6.colormap,
|
|
572
|
+
label = _ref6.label,
|
|
573
|
+
clim = _ref6.clim,
|
|
574
|
+
setClim = _ref6.setClim,
|
|
575
|
+
_ref6$setClimStep = _ref6.setClimStep,
|
|
576
|
+
setClimStep = _ref6$setClimStep === void 0 ? 1 : _ref6$setClimStep,
|
|
577
|
+
discrete = _ref6.discrete,
|
|
578
|
+
units = _ref6.units,
|
|
579
|
+
width = _ref6.width,
|
|
580
|
+
height = _ref6.height,
|
|
581
|
+
_ref6$format = _ref6.format,
|
|
582
|
+
format = _ref6$format === void 0 ? function (d) {
|
|
566
583
|
return d;
|
|
567
|
-
} :
|
|
568
|
-
|
|
569
|
-
horizontal =
|
|
570
|
-
|
|
584
|
+
} : _ref6$format,
|
|
585
|
+
_ref6$horizontal = _ref6.horizontal,
|
|
586
|
+
horizontal = _ref6$horizontal === void 0 ? false : _ref6$horizontal,
|
|
587
|
+
_ref6$bottom = _ref6.bottom,
|
|
588
|
+
bottom = _ref6$bottom === void 0 ? false : _ref6$bottom,
|
|
589
|
+
sx = _ref6.sx,
|
|
590
|
+
sxClim = _ref6.sxClim,
|
|
591
|
+
props = _objectWithoutPropertiesLoose(_ref6, ["colormap", "label", "clim", "setClim", "setClimStep", "discrete", "units", "width", "height", "format", "horizontal", "bottom", "sx", "sxClim"]);
|
|
571
592
|
|
|
572
593
|
if (!Array.isArray(colormap)) {
|
|
573
594
|
throw new Error("expected array for colormap, got '" + colormap + "'.");
|
|
574
595
|
}
|
|
575
596
|
|
|
597
|
+
var climRef = [useRef(), useRef()];
|
|
598
|
+
|
|
599
|
+
var _useState = useState(false),
|
|
600
|
+
climMinDragging = _useState[0],
|
|
601
|
+
setClimMinDragging = _useState[1];
|
|
602
|
+
|
|
603
|
+
var _useState2 = useState(false),
|
|
604
|
+
climMaxDragging = _useState2[0],
|
|
605
|
+
setClimMaxDragging = _useState2[1];
|
|
606
|
+
|
|
607
|
+
var x,
|
|
608
|
+
y,
|
|
609
|
+
dx,
|
|
610
|
+
dy = 0;
|
|
611
|
+
var id = null;
|
|
612
|
+
var init = [0, 0];
|
|
613
|
+
var scale = setClimStep;
|
|
614
|
+
|
|
615
|
+
var draggingFunction = function draggingFunction(e) {
|
|
616
|
+
if (id === 'min' && !climMinDragging) setClimMinDragging(true);
|
|
617
|
+
if (id === 'max' && !climMaxDragging) setClimMaxDragging(true);
|
|
618
|
+
dx = e.pageX - x;
|
|
619
|
+
dy = e.pageY - y;
|
|
620
|
+
|
|
621
|
+
if (horizontal) {
|
|
622
|
+
if (id === 'min') setClim(function (prev) {
|
|
623
|
+
return [Math.min(init[0] + dx * scale, init[1]), prev[1]];
|
|
624
|
+
});
|
|
625
|
+
if (id === 'max') setClim(function (prev) {
|
|
626
|
+
return [prev[0], Math.max(init[1] + dx * scale, init[0])];
|
|
627
|
+
});
|
|
628
|
+
} else {
|
|
629
|
+
if (id === 'min') setClim(function (prev) {
|
|
630
|
+
return [Math.min(init[0] - dy * scale, init[1]), prev[1]];
|
|
631
|
+
});
|
|
632
|
+
if (id === 'max') setClim(function (prev) {
|
|
633
|
+
return [prev[0], Math.max(init[1] - dy * scale, init[0])];
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
var handleMouseDown = function handleMouseDown(e) {
|
|
639
|
+
y = e.pageY;
|
|
640
|
+
x = e.pageX;
|
|
641
|
+
id = e.target.id;
|
|
642
|
+
init = clim;
|
|
643
|
+
document.body.setAttribute('style', horizontal ? 'cursor: ew-resize !important' : 'cursor: ns-resize !important');
|
|
644
|
+
document.addEventListener('mousemove', draggingFunction);
|
|
645
|
+
|
|
646
|
+
var updater = function updater() {
|
|
647
|
+
document.body.setAttribute('style', 'cursor: unset');
|
|
648
|
+
document.removeEventListener('mousemove', draggingFunction);
|
|
649
|
+
window.removeEventListener('mouseup', updater);
|
|
650
|
+
if (id === 'min') setClimMinDragging(false);
|
|
651
|
+
if (id === 'max') setClimMaxDragging(false);
|
|
652
|
+
};
|
|
653
|
+
|
|
654
|
+
window.addEventListener('mouseup', updater);
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
var increment = function increment(e) {
|
|
658
|
+
if (climRef[0].current === document.activeElement) {
|
|
659
|
+
e.preventDefault();
|
|
660
|
+
setClim(function (prev) {
|
|
661
|
+
return [Math.min(prev[0] + scale, prev[1]), prev[1]];
|
|
662
|
+
});
|
|
663
|
+
climRef[0].current.focus();
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
if (climRef[1].current === document.activeElement) {
|
|
667
|
+
e.preventDefault();
|
|
668
|
+
setClim(function (prev) {
|
|
669
|
+
return [prev[0], Math.max(prev[1] + scale, prev[0])];
|
|
670
|
+
});
|
|
671
|
+
climRef[1].current.focus();
|
|
672
|
+
}
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
var decrement = function decrement(e) {
|
|
676
|
+
if (climRef[0].current === document.activeElement) {
|
|
677
|
+
e.preventDefault();
|
|
678
|
+
setClim(function (prev) {
|
|
679
|
+
return [Math.min(prev[0] - scale, prev[1]), prev[1]];
|
|
680
|
+
});
|
|
681
|
+
climRef[0].current.focus();
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
if (climRef[1].current === document.activeElement) {
|
|
685
|
+
e.preventDefault();
|
|
686
|
+
setClim(function (prev) {
|
|
687
|
+
return [prev[0], Math.max(prev[1] - scale, prev[0])];
|
|
688
|
+
});
|
|
689
|
+
climRef[1].current.focus();
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
useEffect(function () {
|
|
694
|
+
var listener = function listener(e) {
|
|
695
|
+
if (['ArrowUp', 'ArrowRight'].includes(e.code) || ['ArrowUp', 'ArrowRight'].includes(e.key)) {
|
|
696
|
+
increment(e);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
if (['ArrowDown', 'ArrowLeft'].includes(e.code) || ['ArrowDown', 'ArrowLeft'].includes(e.key)) {
|
|
700
|
+
decrement(e);
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
|
|
704
|
+
window.addEventListener('keydown', listener);
|
|
705
|
+
return function () {
|
|
706
|
+
window.removeEventListener('keydown', listener);
|
|
707
|
+
};
|
|
708
|
+
}, [clim]);
|
|
709
|
+
|
|
576
710
|
var ClimMin = function ClimMin() {
|
|
577
711
|
return /*#__PURE__*/React.createElement(Box, {
|
|
578
|
-
|
|
579
|
-
|
|
712
|
+
id: "min",
|
|
713
|
+
ref: climRef[0],
|
|
714
|
+
tabIndex: 0,
|
|
715
|
+
sx: _extends({}, styles.clim(setClim), {
|
|
716
|
+
ml: label ? horizontal ? bottom ? '0px' : '10px' : ['2px', '1px', '1px', '2px'] : 0,
|
|
580
717
|
mr: horizontal ? ['2px', '1px', '1px', '2px'] : 0,
|
|
581
|
-
mb: horizontal ? 0 : ['-2px', '-2px', '-2px', '-3px']
|
|
582
|
-
|
|
718
|
+
mb: horizontal ? 0 : ['-2px', '-2px', '-2px', '-3px'],
|
|
719
|
+
borderBottom: setClim ? climMinDragging ? function (_ref7) {
|
|
720
|
+
var colors = _ref7.colors;
|
|
721
|
+
return "solid 1px " + colors.primary;
|
|
722
|
+
} : function (_ref8) {
|
|
723
|
+
var colors = _ref8.colors;
|
|
724
|
+
return "solid 1px " + colors.secondary;
|
|
725
|
+
} : 'unset',
|
|
726
|
+
cursor: setClim ? horizontal ? 'ew-resize' : 'ns-resize' : 'default'
|
|
727
|
+
}, sxClim),
|
|
728
|
+
onMouseDown: setClim ? handleMouseDown : function () {},
|
|
729
|
+
onClick: function onClick() {
|
|
730
|
+
return climRef[0].current.focus();
|
|
731
|
+
}
|
|
583
732
|
}, format(clim[0]));
|
|
584
733
|
};
|
|
585
734
|
|
|
586
735
|
var ClimMax = function ClimMax() {
|
|
587
736
|
return /*#__PURE__*/React.createElement(Box, {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
})
|
|
737
|
+
id: "max",
|
|
738
|
+
ref: climRef[1],
|
|
739
|
+
tabIndex: 0,
|
|
740
|
+
sx: _extends({}, styles.clim(setClim), {
|
|
741
|
+
ml: horizontal ? ['2px', '1px', '1px', '2px'] : ['2px', '1px', '1px', '2px'],
|
|
742
|
+
mt: horizontal ? 0 : ['-2px', '-3px', '-3px', '-3px'],
|
|
743
|
+
borderBottom: setClim ? climMaxDragging ? function (_ref9) {
|
|
744
|
+
var colors = _ref9.colors;
|
|
745
|
+
return "solid 1px " + colors.primary;
|
|
746
|
+
} : function (_ref10) {
|
|
747
|
+
var colors = _ref10.colors;
|
|
748
|
+
return "solid 1px " + colors.secondary;
|
|
749
|
+
} : 'unset',
|
|
750
|
+
cursor: setClim ? horizontal ? 'ew-resize' : 'ns-resize' : 'default'
|
|
751
|
+
}, sxClim),
|
|
752
|
+
onMouseDown: setClim ? handleMouseDown : function () {},
|
|
753
|
+
onClick: function onClick() {
|
|
754
|
+
return climRef[1].current.focus();
|
|
755
|
+
}
|
|
592
756
|
}, format(clim[1]));
|
|
593
757
|
};
|
|
594
758
|
|
|
595
|
-
return /*#__PURE__*/React.createElement(Flex, {
|
|
596
|
-
sx: _extends({
|
|
759
|
+
return /*#__PURE__*/React.createElement(Flex, _extends({}, props, {
|
|
760
|
+
sx: _extends({
|
|
597
761
|
flexDirection: 'row',
|
|
598
|
-
alignItems: '
|
|
762
|
+
alignItems: 'start',
|
|
599
763
|
justifyContent: 'flex-start',
|
|
600
|
-
gap: ['3px', '6px', '6px', '7px']
|
|
601
|
-
|
|
602
|
-
|
|
764
|
+
gap: ['3px', '6px', '6px', '7px'],
|
|
765
|
+
height: !horizontal ? '100%' : 'unset'
|
|
766
|
+
}, sx)
|
|
767
|
+
}), label && /*#__PURE__*/React.createElement(Label, {
|
|
603
768
|
label: label,
|
|
604
769
|
units: units,
|
|
605
770
|
horizontal: horizontal
|
|
606
|
-
}),
|
|
771
|
+
}), /*#__PURE__*/React.createElement(Flex, {
|
|
772
|
+
sx: {
|
|
773
|
+
flexGrow: horizontal ? 1 : 'unset',
|
|
774
|
+
flexDirection: 'column',
|
|
775
|
+
ml: bottom && label ? '4px' : '0px',
|
|
776
|
+
height: !horizontal ? '100%' : 'unset'
|
|
777
|
+
}
|
|
778
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
779
|
+
sx: {
|
|
780
|
+
gap: ['3px', '6px', '6px', '7px'],
|
|
781
|
+
height: !horizontal ? '100%' : 'unset'
|
|
782
|
+
}
|
|
783
|
+
}, horizontal && clim && !bottom && /*#__PURE__*/React.createElement(ClimMin, null), /*#__PURE__*/React.createElement(Gradient, {
|
|
607
784
|
colormap: colormap,
|
|
608
785
|
horizontal: horizontal,
|
|
609
786
|
discrete: discrete,
|
|
610
787
|
width: width,
|
|
611
788
|
height: height
|
|
612
|
-
}), horizontal && clim && /*#__PURE__*/React.createElement(ClimMax, null),
|
|
789
|
+
}), horizontal && clim && !bottom && /*#__PURE__*/React.createElement(ClimMax, null)), horizontal && clim && bottom && /*#__PURE__*/React.createElement(Flex, {
|
|
790
|
+
sx: {
|
|
791
|
+
justifyContent: 'space-between'
|
|
792
|
+
}
|
|
793
|
+
}, /*#__PURE__*/React.createElement(ClimMin, null), /*#__PURE__*/React.createElement(ClimMax, null))), !horizontal && /*#__PURE__*/React.createElement(Flex, {
|
|
613
794
|
sx: {
|
|
614
795
|
flexDirection: 'column-reverse',
|
|
615
796
|
justifyContent: 'space-between',
|
|
@@ -618,8 +799,6 @@ var Colorbar = function Colorbar(_ref4) {
|
|
|
618
799
|
}, clim && /*#__PURE__*/React.createElement(ClimMin, null), clim && /*#__PURE__*/React.createElement(ClimMax, null)));
|
|
619
800
|
};
|
|
620
801
|
|
|
621
|
-
var _excluded$b = ["start", "width", "dl", "dr", "children", "sx"];
|
|
622
|
-
|
|
623
802
|
var Column = function Column(_ref) {
|
|
624
803
|
var start = _ref.start,
|
|
625
804
|
width = _ref.width,
|
|
@@ -627,7 +806,7 @@ var Column = function Column(_ref) {
|
|
|
627
806
|
dr = _ref.dr,
|
|
628
807
|
children = _ref.children,
|
|
629
808
|
sx = _ref.sx,
|
|
630
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
809
|
+
props = _objectWithoutPropertiesLoose(_ref, ["start", "width", "dl", "dr", "children", "sx"]);
|
|
631
810
|
|
|
632
811
|
start = start || 'auto';
|
|
633
812
|
width = width || 'auto';
|
|
@@ -834,14 +1013,12 @@ var Logo = function Logo(_ref) {
|
|
|
834
1013
|
})));
|
|
835
1014
|
};
|
|
836
1015
|
|
|
837
|
-
var _excluded$a = ["children", "sx", "columns", "gap"];
|
|
838
|
-
|
|
839
1016
|
var Row = function Row(_ref) {
|
|
840
1017
|
var children = _ref.children,
|
|
841
1018
|
sx = _ref.sx,
|
|
842
1019
|
columns = _ref.columns,
|
|
843
1020
|
gap = _ref.gap,
|
|
844
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
1021
|
+
props = _objectWithoutPropertiesLoose(_ref, ["children", "sx", "columns", "gap"]);
|
|
845
1022
|
|
|
846
1023
|
var makeArray = function makeArray(input) {
|
|
847
1024
|
if (!Array.isArray(input)) {
|
|
@@ -893,12 +1070,10 @@ var Row = function Row(_ref) {
|
|
|
893
1070
|
}), children);
|
|
894
1071
|
};
|
|
895
1072
|
|
|
896
|
-
var _excluded$9 = ["value", "sx"];
|
|
897
|
-
|
|
898
1073
|
var Menu = function Menu(_ref) {
|
|
899
1074
|
var value = _ref.value,
|
|
900
1075
|
sx = _ref.sx,
|
|
901
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
1076
|
+
props = _objectWithoutPropertiesLoose(_ref, ["value", "sx"]);
|
|
902
1077
|
|
|
903
1078
|
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
904
1079
|
sx: _extends({
|
|
@@ -986,150 +1161,7 @@ var Menu = function Menu(_ref) {
|
|
|
986
1161
|
})));
|
|
987
1162
|
};
|
|
988
1163
|
|
|
989
|
-
var
|
|
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 = {
|
|
1164
|
+
var sx = {
|
|
1133
1165
|
link: function link(current, label, first) {
|
|
1134
1166
|
if (first === void 0) {
|
|
1135
1167
|
first = false;
|
|
@@ -1212,12 +1244,12 @@ var Nav = function Nav(_ref) {
|
|
|
1212
1244
|
onClick: function onClick() {
|
|
1213
1245
|
if (nav === url) setExpanded(false);
|
|
1214
1246
|
},
|
|
1215
|
-
sx: sx
|
|
1247
|
+
sx: sx.link(nav, url, first)
|
|
1216
1248
|
}, /*#__PURE__*/React.createElement(HoverArrow, null), display));
|
|
1217
1249
|
} else {
|
|
1218
1250
|
return /*#__PURE__*/React.createElement(Link$2, {
|
|
1219
1251
|
href: href,
|
|
1220
|
-
sx: sx
|
|
1252
|
+
sx: sx.link(nav, url, first)
|
|
1221
1253
|
}, /*#__PURE__*/React.createElement(HoverArrow, null), display);
|
|
1222
1254
|
}
|
|
1223
1255
|
};
|
|
@@ -1243,8 +1275,7 @@ var Header = function Header(_ref3) {
|
|
|
1243
1275
|
var status = _ref3.status,
|
|
1244
1276
|
mode = _ref3.mode,
|
|
1245
1277
|
nav = _ref3.nav,
|
|
1246
|
-
|
|
1247
|
-
settings = _ref3.settings;
|
|
1278
|
+
menuItems = _ref3.menuItems;
|
|
1248
1279
|
|
|
1249
1280
|
var _useState = useState(false),
|
|
1250
1281
|
expanded = _useState[0],
|
|
@@ -1256,7 +1287,6 @@ var Header = function Header(_ref3) {
|
|
|
1256
1287
|
|
|
1257
1288
|
return /*#__PURE__*/React.createElement(Row, {
|
|
1258
1289
|
sx: {
|
|
1259
|
-
width: '100%',
|
|
1260
1290
|
pt: ['12px'],
|
|
1261
1291
|
pb: [3]
|
|
1262
1292
|
}
|
|
@@ -1308,53 +1338,31 @@ var Header = function Header(_ref3) {
|
|
|
1308
1338
|
top: ['-2px', '-3px', '-3px']
|
|
1309
1339
|
}
|
|
1310
1340
|
}, status ? "(" + status + ")" : '')), /*#__PURE__*/React.createElement(Column, {
|
|
1311
|
-
start: [status ? 6 : 4, 6,
|
|
1341
|
+
start: [status ? 6 : 4, 6, 11, 11],
|
|
1312
1342
|
width: [status ? 1 : 3, 3, 2, 2],
|
|
1313
1343
|
sx: {
|
|
1314
|
-
|
|
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'
|
|
1344
|
+
zIndex: 5000
|
|
1331
1345
|
}
|
|
1332
|
-
}
|
|
1346
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
1333
1347
|
sx: {
|
|
1334
|
-
|
|
1335
|
-
position: 'relative',
|
|
1336
|
-
pointerEvents: expanded ? 'none' : 'all',
|
|
1337
|
-
transition: 'opacity 0.15s',
|
|
1338
|
-
display: [status ? 'none' : 'block', 'block', 'none', 'none']
|
|
1348
|
+
justifyContent: 'flex-end'
|
|
1339
1349
|
}
|
|
1340
|
-
}, /*#__PURE__*/React.createElement(
|
|
1341
|
-
value: settings.value,
|
|
1342
|
-
onClick: settings.onClick,
|
|
1350
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
1343
1351
|
sx: {
|
|
1352
|
+
mr: '18px',
|
|
1353
|
+
gap: '18px',
|
|
1344
1354
|
opacity: expanded ? 0 : 1,
|
|
1345
|
-
|
|
1355
|
+
transition: 'opacity 0.15s',
|
|
1356
|
+
justifyContent: 'space-between',
|
|
1357
|
+
alignItems: 'center'
|
|
1346
1358
|
}
|
|
1347
|
-
})
|
|
1359
|
+
}, menuItems), /*#__PURE__*/React.createElement(Menu, {
|
|
1348
1360
|
sx: {
|
|
1349
|
-
|
|
1350
|
-
pointerEvents: settings && settings.value ? 'none' : 'all',
|
|
1351
|
-
opacity: settings && settings.value ? 0 : 1,
|
|
1352
|
-
mr: ['-2px'],
|
|
1353
|
-
zIndex: 5000
|
|
1361
|
+
mr: ['-2px']
|
|
1354
1362
|
},
|
|
1355
1363
|
value: expanded,
|
|
1356
1364
|
onClick: toggle
|
|
1357
|
-
})), /*#__PURE__*/React.createElement(Box, {
|
|
1365
|
+
}))), /*#__PURE__*/React.createElement(Box, {
|
|
1358
1366
|
sx: {
|
|
1359
1367
|
opacity: expanded ? 1 : 0,
|
|
1360
1368
|
pointerEvents: expanded ? 'all' : 'none',
|
|
@@ -1554,6 +1562,41 @@ var Footer = function Footer() {
|
|
|
1554
1562
|
}))));
|
|
1555
1563
|
};
|
|
1556
1564
|
|
|
1565
|
+
var Dimmer = function Dimmer(_ref) {
|
|
1566
|
+
var sx = _ref.sx,
|
|
1567
|
+
props = _objectWithoutPropertiesLoose(_ref, ["sx"]);
|
|
1568
|
+
|
|
1569
|
+
var _useColorMode = useColorMode(),
|
|
1570
|
+
colorMode = _useColorMode[0],
|
|
1571
|
+
setColorMode = _useColorMode[1];
|
|
1572
|
+
|
|
1573
|
+
var toggle = useCallback(function () {
|
|
1574
|
+
setColorMode(colorMode === 'light' ? 'dark' : 'light');
|
|
1575
|
+
}, [colorMode]);
|
|
1576
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
1577
|
+
"aria-label": "Toggle dark mode",
|
|
1578
|
+
onClick: toggle,
|
|
1579
|
+
role: "checkbox",
|
|
1580
|
+
sx: _extends({
|
|
1581
|
+
width: 32,
|
|
1582
|
+
height: 32,
|
|
1583
|
+
display: 'inline-block',
|
|
1584
|
+
cursor: 'pointer',
|
|
1585
|
+
color: 'secondary'
|
|
1586
|
+
}, sx)
|
|
1587
|
+
}, props), /*#__PURE__*/React.createElement(Sun, {
|
|
1588
|
+
sx: {
|
|
1589
|
+
strokeWidth: '1.75',
|
|
1590
|
+
transition: 'stroke 0.15s',
|
|
1591
|
+
'@media (hover: hover) and (pointer: fine)': {
|
|
1592
|
+
'&:hover': {
|
|
1593
|
+
stroke: 'primary'
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
}));
|
|
1598
|
+
};
|
|
1599
|
+
|
|
1557
1600
|
var GitSha = function GitSha() {
|
|
1558
1601
|
var sha = process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA;
|
|
1559
1602
|
var owner = process.env.NEXT_PUBLIC_VERCEL_GIT_REPO_OWNER;
|
|
@@ -1707,7 +1750,6 @@ function scrollFraction(window, documnt) {
|
|
|
1707
1750
|
return Math.min(window.scrollY / (document.body.offsetHeight - 770), 0.99);
|
|
1708
1751
|
}
|
|
1709
1752
|
|
|
1710
|
-
var _excluded$6 = ["duration", "delay", "children"];
|
|
1711
1753
|
var fade = keyframes({
|
|
1712
1754
|
from: {
|
|
1713
1755
|
opacity: 0
|
|
@@ -1723,7 +1765,7 @@ var FadeIn = function FadeIn(_ref) {
|
|
|
1723
1765
|
_ref$delay = _ref.delay,
|
|
1724
1766
|
delay = _ref$delay === void 0 ? 0 : _ref$delay,
|
|
1725
1767
|
children = _ref.children,
|
|
1726
|
-
delegated = _objectWithoutPropertiesLoose(_ref,
|
|
1768
|
+
delegated = _objectWithoutPropertiesLoose(_ref, ["duration", "delay", "children"]);
|
|
1727
1769
|
|
|
1728
1770
|
return /*#__PURE__*/React.createElement(Box, _extends({}, delegated, {
|
|
1729
1771
|
sx: {
|
|
@@ -1866,6 +1908,110 @@ function GuideColumns(_ref2) {
|
|
|
1866
1908
|
}));
|
|
1867
1909
|
}
|
|
1868
1910
|
|
|
1911
|
+
var Settings = function Settings(_ref) {
|
|
1912
|
+
var value = _ref.value,
|
|
1913
|
+
sx = _ref.sx,
|
|
1914
|
+
props = _objectWithoutPropertiesLoose(_ref, ["value", "sx"]);
|
|
1915
|
+
|
|
1916
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
1917
|
+
sx: _extends({
|
|
1918
|
+
cursor: 'pointer',
|
|
1919
|
+
fill: 'none',
|
|
1920
|
+
strokeWidth: '2px',
|
|
1921
|
+
stroke: 'text',
|
|
1922
|
+
'.paren': {
|
|
1923
|
+
opacity: '0'
|
|
1924
|
+
},
|
|
1925
|
+
'@media (hover: hover) and (pointer: fine)': {
|
|
1926
|
+
'&:hover .paren': {
|
|
1927
|
+
opacity: '1'
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
}, sx),
|
|
1931
|
+
"aria-label": "Toggle Menu"
|
|
1932
|
+
}, props), !value && /*#__PURE__*/React.createElement("svg", {
|
|
1933
|
+
style: {
|
|
1934
|
+
width: '50px',
|
|
1935
|
+
height: '30px',
|
|
1936
|
+
transform: 'scale(2)',
|
|
1937
|
+
marginTop: '-3px'
|
|
1938
|
+
},
|
|
1939
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1940
|
+
viewBox: "0 0 68 36"
|
|
1941
|
+
}, /*#__PURE__*/React.createElement("line", {
|
|
1942
|
+
x1: "24",
|
|
1943
|
+
y1: "2.1",
|
|
1944
|
+
x2: "24",
|
|
1945
|
+
y2: "6.1"
|
|
1946
|
+
}), /*#__PURE__*/React.createElement("line", {
|
|
1947
|
+
x1: "24",
|
|
1948
|
+
y1: "24.1",
|
|
1949
|
+
x2: "24",
|
|
1950
|
+
y2: "33.9"
|
|
1951
|
+
}), /*#__PURE__*/React.createElement("line", {
|
|
1952
|
+
x1: "44",
|
|
1953
|
+
y1: "2.1",
|
|
1954
|
+
x2: "44",
|
|
1955
|
+
y2: "12.1"
|
|
1956
|
+
}), /*#__PURE__*/React.createElement("line", {
|
|
1957
|
+
x1: "44",
|
|
1958
|
+
y1: "30.1",
|
|
1959
|
+
x2: "44",
|
|
1960
|
+
y2: "33.9"
|
|
1961
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
1962
|
+
cx: "24",
|
|
1963
|
+
cy: "15.1",
|
|
1964
|
+
r: "5"
|
|
1965
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
1966
|
+
cx: "44",
|
|
1967
|
+
cy: "21.1",
|
|
1968
|
+
r: "5"
|
|
1969
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1970
|
+
style: {
|
|
1971
|
+
transition: 'all 0.2s'
|
|
1972
|
+
},
|
|
1973
|
+
className: "paren",
|
|
1974
|
+
d: "M6.4,1.2c-6.3,10.3-6.3,23.3,0,33.6"
|
|
1975
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1976
|
+
style: {
|
|
1977
|
+
transition: 'all 0.2s'
|
|
1978
|
+
},
|
|
1979
|
+
className: "paren",
|
|
1980
|
+
d: "M61.6,34.8c6.3-10.3,6.3-23.3,0-33.6"
|
|
1981
|
+
})), value && /*#__PURE__*/React.createElement("svg", {
|
|
1982
|
+
style: {
|
|
1983
|
+
width: '50px',
|
|
1984
|
+
height: '30px',
|
|
1985
|
+
transform: 'scale(2)',
|
|
1986
|
+
marginTop: '-3px'
|
|
1987
|
+
},
|
|
1988
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1989
|
+
viewBox: "0 0 68 36"
|
|
1990
|
+
}, /*#__PURE__*/React.createElement("line", {
|
|
1991
|
+
x1: "50.85",
|
|
1992
|
+
y1: "29.79",
|
|
1993
|
+
x2: "17.15",
|
|
1994
|
+
y2: "6.21"
|
|
1995
|
+
}), /*#__PURE__*/React.createElement("line", {
|
|
1996
|
+
x1: "17.15",
|
|
1997
|
+
y1: "29.79",
|
|
1998
|
+
x2: "50.85",
|
|
1999
|
+
y2: "6.21"
|
|
2000
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2001
|
+
style: {
|
|
2002
|
+
transition: 'all 0.2s'
|
|
2003
|
+
},
|
|
2004
|
+
className: "paren",
|
|
2005
|
+
d: "M6.4,1.2c-6.3,10.3-6.3,23.3,0,33.6"
|
|
2006
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2007
|
+
style: {
|
|
2008
|
+
transition: 'all 0.2s'
|
|
2009
|
+
},
|
|
2010
|
+
className: "paren",
|
|
2011
|
+
d: "M61.6,34.8c6.3-10.3,6.3-23.3,0-33.6"
|
|
2012
|
+
})));
|
|
2013
|
+
};
|
|
2014
|
+
|
|
1869
2015
|
var Layout = function Layout(_ref) {
|
|
1870
2016
|
var title = _ref.title,
|
|
1871
2017
|
description = _ref.description,
|
|
@@ -1893,6 +2039,7 @@ var Layout = function Layout(_ref) {
|
|
|
1893
2039
|
_ref$container = _ref.container,
|
|
1894
2040
|
container = _ref$container === void 0 ? true : _ref$container;
|
|
1895
2041
|
var content = children;
|
|
2042
|
+
var index = useBreakpointIndex();
|
|
1896
2043
|
|
|
1897
2044
|
if (fade) {
|
|
1898
2045
|
content = /*#__PURE__*/React.createElement(FadeIn, {
|
|
@@ -1901,7 +2048,34 @@ var Layout = function Layout(_ref) {
|
|
|
1901
2048
|
}
|
|
1902
2049
|
|
|
1903
2050
|
if (container) {
|
|
1904
|
-
content = /*#__PURE__*/React.createElement(
|
|
2051
|
+
content = /*#__PURE__*/React.createElement(Box, {
|
|
2052
|
+
sx: {
|
|
2053
|
+
mb: [8, 8, 9, 10]
|
|
2054
|
+
}
|
|
2055
|
+
}, /*#__PURE__*/React.createElement(Container, null, content));
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
useEffect(function () {
|
|
2059
|
+
if (index > 2 && settings != null && settings.value && settings != null && settings.onClick) {
|
|
2060
|
+
settings == null ? void 0 : settings.onClick();
|
|
2061
|
+
}
|
|
2062
|
+
}, [index, settings == null ? void 0 : settings.value, settings == null ? void 0 : settings.onClick]);
|
|
2063
|
+
var menuItems = [/*#__PURE__*/React.createElement(Dimmer, {
|
|
2064
|
+
key: "dimmer",
|
|
2065
|
+
sx: {
|
|
2066
|
+
color: 'primary',
|
|
2067
|
+
mt: '-2px',
|
|
2068
|
+
display: ['block', 'block', dimmer === 'top' ? 'block' : 'none', dimmer === 'top' ? 'block' : 'none']
|
|
2069
|
+
}
|
|
2070
|
+
})];
|
|
2071
|
+
|
|
2072
|
+
if (settings) {
|
|
2073
|
+
menuItems.push( /*#__PURE__*/React.createElement(Settings, _extends({
|
|
2074
|
+
key: "settings",
|
|
2075
|
+
sx: {
|
|
2076
|
+
display: ['inherit', 'inherit', 'none', 'none']
|
|
2077
|
+
}
|
|
2078
|
+
}, settings)));
|
|
1905
2079
|
}
|
|
1906
2080
|
|
|
1907
2081
|
return /*#__PURE__*/React.createElement(React.Fragment, null, guide && /*#__PURE__*/React.createElement(Guide, {
|
|
@@ -1933,8 +2107,7 @@ var Layout = function Layout(_ref) {
|
|
|
1933
2107
|
mode: links,
|
|
1934
2108
|
status: status,
|
|
1935
2109
|
nav: nav,
|
|
1936
|
-
|
|
1937
|
-
dimmer: dimmer
|
|
2110
|
+
menuItems: menuItems
|
|
1938
2111
|
}))), /*#__PURE__*/React.createElement(Box, {
|
|
1939
2112
|
sx: {
|
|
1940
2113
|
width: '100%',
|
|
@@ -2045,14 +2218,12 @@ var Expander = function Expander(_ref) {
|
|
|
2045
2218
|
})));
|
|
2046
2219
|
};
|
|
2047
2220
|
|
|
2048
|
-
var _excluded$5 = ["label", "value", "sx", "children"];
|
|
2049
|
-
|
|
2050
2221
|
var Tag = function Tag(_ref) {
|
|
2051
2222
|
var label = _ref.label,
|
|
2052
2223
|
value = _ref.value,
|
|
2053
2224
|
sx = _ref.sx,
|
|
2054
2225
|
children = _ref.children,
|
|
2055
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
2226
|
+
props = _objectWithoutPropertiesLoose(_ref, ["label", "value", "sx", "children"]);
|
|
2056
2227
|
|
|
2057
2228
|
var color = sx && sx.color ? sx.color : 'primary';
|
|
2058
2229
|
var isClickable = props && (props.onClick || props.onDoubleClick);
|
|
@@ -2086,8 +2257,7 @@ var Tag = function Tag(_ref) {
|
|
|
2086
2257
|
}, props), children);
|
|
2087
2258
|
};
|
|
2088
2259
|
|
|
2089
|
-
var
|
|
2090
|
-
var sx = {
|
|
2260
|
+
var sx$1 = {
|
|
2091
2261
|
label: {
|
|
2092
2262
|
fontFamily: 'mono',
|
|
2093
2263
|
letterSpacing: 'mono',
|
|
@@ -2164,10 +2334,10 @@ var Filter = function Filter(_ref2) {
|
|
|
2164
2334
|
showAll = _ref2$showAll === void 0 ? false : _ref2$showAll,
|
|
2165
2335
|
_ref2$multiSelect = _ref2.multiSelect,
|
|
2166
2336
|
multiSelect = _ref2$multiSelect === void 0 ? false : _ref2$multiSelect,
|
|
2167
|
-
props = _objectWithoutPropertiesLoose(_ref2,
|
|
2337
|
+
props = _objectWithoutPropertiesLoose(_ref2, ["values", "setValues", "label", "colors", "showAll", "multiSelect"]);
|
|
2168
2338
|
|
|
2169
2339
|
return /*#__PURE__*/React.createElement(Box, props, label && /*#__PURE__*/React.createElement(Box, {
|
|
2170
|
-
sx: sx.label
|
|
2340
|
+
sx: sx$1.label
|
|
2171
2341
|
}, label), /*#__PURE__*/React.createElement(Box, {
|
|
2172
2342
|
sx: {
|
|
2173
2343
|
mt: label ? [3] : 0
|
|
@@ -2262,8 +2432,6 @@ var Group = function Group(_ref) {
|
|
|
2262
2432
|
}));
|
|
2263
2433
|
};
|
|
2264
2434
|
|
|
2265
|
-
var _excluded$3 = ["size", "inverted", "sx"];
|
|
2266
|
-
|
|
2267
2435
|
var Input = function Input(_ref, ref) {
|
|
2268
2436
|
var _extends2;
|
|
2269
2437
|
|
|
@@ -2271,7 +2439,7 @@ var Input = function Input(_ref, ref) {
|
|
|
2271
2439
|
size = _ref$size === void 0 ? 'sm' : _ref$size,
|
|
2272
2440
|
inverted = _ref.inverted,
|
|
2273
2441
|
sx = _ref.sx,
|
|
2274
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
2442
|
+
props = _objectWithoutPropertiesLoose(_ref, ["size", "inverted", "sx"]);
|
|
2275
2443
|
|
|
2276
2444
|
var defaultColor = inverted ? 'secondary' : 'primary';
|
|
2277
2445
|
|
|
@@ -2316,8 +2484,6 @@ var getProps = function getProps(test) {
|
|
|
2316
2484
|
};
|
|
2317
2485
|
};
|
|
2318
2486
|
|
|
2319
|
-
var _excluded$2 = ["children", "size", "sx"];
|
|
2320
|
-
|
|
2321
2487
|
var Select = function Select(_ref) {
|
|
2322
2488
|
var _extends2;
|
|
2323
2489
|
|
|
@@ -2325,7 +2491,8 @@ var Select = function Select(_ref) {
|
|
|
2325
2491
|
_ref$size = _ref.size,
|
|
2326
2492
|
size = _ref$size === void 0 ? 'sm' : _ref$size,
|
|
2327
2493
|
sx = _ref.sx,
|
|
2328
|
-
|
|
2494
|
+
sxSelect = _ref.sxSelect,
|
|
2495
|
+
props = _objectWithoutPropertiesLoose(_ref, ["children", "size", "sx", "sxSelect"]);
|
|
2329
2496
|
|
|
2330
2497
|
var color = sx && sx.color ? sx.color : 'primary';
|
|
2331
2498
|
var sizeStyles = getSizeStyles(size);
|
|
@@ -2396,7 +2563,7 @@ var Select = function Select(_ref) {
|
|
|
2396
2563
|
outline: 'none !important',
|
|
2397
2564
|
background: 'transparent !important'
|
|
2398
2565
|
}
|
|
2399
|
-
}, _extends2))
|
|
2566
|
+
}, _extends2), sxSelect)
|
|
2400
2567
|
}, omitOnChange), children), /*#__PURE__*/React.createElement(Arrow, {
|
|
2401
2568
|
sx: {
|
|
2402
2569
|
width: width,
|
|
@@ -2411,11 +2578,9 @@ var Select = function Select(_ref) {
|
|
|
2411
2578
|
}));
|
|
2412
2579
|
};
|
|
2413
2580
|
|
|
2414
|
-
var _excluded$1 = ["sx"];
|
|
2415
|
-
|
|
2416
2581
|
var Slider = function Slider(_ref, ref) {
|
|
2417
2582
|
var sx = _ref.sx,
|
|
2418
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
2583
|
+
props = _objectWithoutPropertiesLoose(_ref, ["sx"]);
|
|
2419
2584
|
|
|
2420
2585
|
var color = sx && sx.color ? sx.color : 'primary';
|
|
2421
2586
|
|
|
@@ -2457,7 +2622,7 @@ var Slider = function Slider(_ref, ref) {
|
|
|
2457
2622
|
|
|
2458
2623
|
var slider = forwardRef(Slider);
|
|
2459
2624
|
|
|
2460
|
-
var styles = {
|
|
2625
|
+
var styles$1 = {
|
|
2461
2626
|
reset: {
|
|
2462
2627
|
verticalAlign: 'baseline',
|
|
2463
2628
|
border: 0,
|
|
@@ -2529,7 +2694,7 @@ var Table = function Table(_ref) {
|
|
|
2529
2694
|
}
|
|
2530
2695
|
}, header && /*#__PURE__*/React.createElement(Row, {
|
|
2531
2696
|
as: "tr",
|
|
2532
|
-
sx: _extends({}, styles.reset, styles.header, styles.row, {
|
|
2697
|
+
sx: _extends({}, styles$1.reset, styles$1.header, styles$1.row, {
|
|
2533
2698
|
color: color,
|
|
2534
2699
|
borderTopWidth: !borderTop ? '0px' : '1px'
|
|
2535
2700
|
})
|
|
@@ -2537,13 +2702,13 @@ var Table = function Table(_ref) {
|
|
|
2537
2702
|
as: "td",
|
|
2538
2703
|
start: [1],
|
|
2539
2704
|
width: columns,
|
|
2540
|
-
sx: styles.index
|
|
2705
|
+
sx: styles$1.index
|
|
2541
2706
|
}, header)), data.map(function (row, i) {
|
|
2542
2707
|
return /*#__PURE__*/React.createElement(Row, {
|
|
2543
2708
|
as: "tr",
|
|
2544
2709
|
columns: columns,
|
|
2545
2710
|
key: i,
|
|
2546
|
-
sx: _extends({}, styles.reset, styles.row, {
|
|
2711
|
+
sx: _extends({}, styles$1.reset, styles$1.row, {
|
|
2547
2712
|
pb: borderBottom && i === data.length - 1 ? ['18px', '18px', '18px', '22px'] : [3, 3, 3, '20px'],
|
|
2548
2713
|
borderBottomWidth: borderBottom && i === data.length - 1 ? '1px' : '0px',
|
|
2549
2714
|
borderTopWidth: !borderTop && i === 0 && !header ? '0px' : '1px'
|
|
@@ -2554,20 +2719,18 @@ var Table = function Table(_ref) {
|
|
|
2554
2719
|
key: j,
|
|
2555
2720
|
start: start[j],
|
|
2556
2721
|
width: width[j],
|
|
2557
|
-
sx: j == 0 && index ? _extends({}, styles.reset, styles.index) : _extends({}, styles.reset, styles.entry)
|
|
2722
|
+
sx: j == 0 && index ? _extends({}, styles$1.reset, styles$1.index) : _extends({}, styles$1.reset, styles$1.entry)
|
|
2558
2723
|
}, column);
|
|
2559
2724
|
}));
|
|
2560
2725
|
})));
|
|
2561
2726
|
};
|
|
2562
2727
|
|
|
2563
|
-
var _excluded = ["value", "onClick", "disabled", "sx"];
|
|
2564
|
-
|
|
2565
2728
|
var Toggle = function Toggle(_ref, ref) {
|
|
2566
2729
|
var value = _ref.value,
|
|
2567
2730
|
onClick = _ref.onClick,
|
|
2568
2731
|
disabled = _ref.disabled,
|
|
2569
2732
|
sx = _ref.sx,
|
|
2570
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
2733
|
+
props = _objectWithoutPropertiesLoose(_ref, ["value", "onClick", "disabled", "sx"]);
|
|
2571
2734
|
|
|
2572
2735
|
var color = sx && sx.color ? sx.color : 'primary';
|
|
2573
2736
|
value = disabled ? false : value;
|
|
@@ -2635,7 +2798,6 @@ var Tray = function Tray(_ref) {
|
|
|
2635
2798
|
children = _ref.children;
|
|
2636
2799
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
|
|
2637
2800
|
sx: {
|
|
2638
|
-
display: ['initial', 'initial', 'none', 'none'],
|
|
2639
2801
|
position: 'fixed',
|
|
2640
2802
|
top: '56px',
|
|
2641
2803
|
bottom: '0px',
|
|
@@ -2650,7 +2812,6 @@ var Tray = function Tray(_ref) {
|
|
|
2650
2812
|
}
|
|
2651
2813
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
2652
2814
|
sx: _extends({
|
|
2653
|
-
display: ['initial', 'initial', 'none', 'none'],
|
|
2654
2815
|
position: 'fixed',
|
|
2655
2816
|
width: 'calc(100vw)',
|
|
2656
2817
|
top: '0px',
|