@opengeoweb/theme 4.4.0 → 4.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.
- package/index.d.ts +1 -0
- package/index.esm.js +136 -51
- package/index.umd.js +147 -56
- package/lib/components/Icons/Icons.d.ts +6 -1
- package/lib/components/Paths/Paths.d.ts +1 -0
- package/lib/components/Paths/index.d.ts +1 -0
- package/lib/components/Theme/ThemeContext.d.ts +2 -0
- package/lib/components/Theme/types.d.ts +4 -4
- package/lib/stories/Accordion.stories.d.ts +3 -0
- package/lib/stories/index.stories.d.ts +1 -0
- package/lib/stories/snapshots/Accordion.stories.d.ts +7 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
package/index.esm.js
CHANGED
|
@@ -28,6 +28,24 @@ function __rest(s, e) {
|
|
|
28
28
|
return t;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
/* *
|
|
32
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
33
|
+
* you may not use this file except in compliance with the License.
|
|
34
|
+
* You may obtain a copy of the License at
|
|
35
|
+
*
|
|
36
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
37
|
+
*
|
|
38
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
39
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
40
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
41
|
+
* See the License for the specific language governing permissions and
|
|
42
|
+
* limitations under the License.
|
|
43
|
+
*
|
|
44
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
45
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
46
|
+
* */
|
|
47
|
+
var dragHandlePath = 'M9.5 8a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm5 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm-5 5.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm5 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm-5 5.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm5 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z';
|
|
48
|
+
|
|
31
49
|
/* *
|
|
32
50
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
33
51
|
* you may not use this file except in compliance with the License.
|
|
@@ -297,7 +315,7 @@ var Cancel = function Cancel(props) {
|
|
|
297
315
|
};
|
|
298
316
|
var DragHandle = function DragHandle(props) {
|
|
299
317
|
return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("path", {
|
|
300
|
-
d:
|
|
318
|
+
d: dragHandlePath
|
|
301
319
|
}));
|
|
302
320
|
};
|
|
303
321
|
var AutoUpdateActive = function AutoUpdateActive(props) {
|
|
@@ -451,10 +469,11 @@ var Flag = function Flag(props) {
|
|
|
451
469
|
var Resize = function Resize(_a) {
|
|
452
470
|
var _a$isRightAligned = _a.isRightAligned,
|
|
453
471
|
isRightAligned = _a$isRightAligned === void 0 ? false : _a$isRightAligned,
|
|
454
|
-
|
|
472
|
+
sx = _a.sx,
|
|
473
|
+
props = __rest(_a, ["isRightAligned", "sx"]);
|
|
455
474
|
|
|
456
475
|
return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({
|
|
457
|
-
sx: Object.assign(Object.assign({
|
|
476
|
+
sx: Object.assign(Object.assign(Object.assign({
|
|
458
477
|
width: 20,
|
|
459
478
|
height: 20,
|
|
460
479
|
top: -10,
|
|
@@ -466,7 +485,7 @@ var Resize = function Resize(_a) {
|
|
|
466
485
|
left: -10
|
|
467
486
|
}), {
|
|
468
487
|
zIndex: 1
|
|
469
|
-
}),
|
|
488
|
+
}), sx),
|
|
470
489
|
"data-testid": "resizeHandle"
|
|
471
490
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
472
491
|
d: "M19.687 18.037v1h-6v-1h6zm3.5-3.5v1h-13v-1h13z",
|
|
@@ -594,6 +613,55 @@ var Picture = function Picture(props) {
|
|
|
594
613
|
transform: "translate(1 2)"
|
|
595
614
|
}));
|
|
596
615
|
};
|
|
616
|
+
var CollapseWindow = function CollapseWindow(props) {
|
|
617
|
+
return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("path", {
|
|
618
|
+
d: "M5,17 C4.43301962,17 4,17.4597824 4,18.0268006 C4,18.5938188 4.43301962,19 5,19 L19,19 C19.5669804,19 20,18.5938188 20,18.0268006 C20,17.4597824 19.5669804,17 19,17 L5,17 Z"
|
|
619
|
+
}));
|
|
620
|
+
};
|
|
621
|
+
var ExpandWindow = function ExpandWindow(props) {
|
|
622
|
+
return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("path", {
|
|
623
|
+
d: "M18,4.5 C18.81657,4.52323671 19.4399034,4.74990338 19.87,5.18 C20.3000966,5.61009662 20.5100966,6.21676329 20.5,7 L20.5,17 C20.4955176,17.7444824 20.2855176,18.3244824 19.87,18.74 C19.4544824,19.1555176 18.8311491,19.4088509 18,19.5 L6,19.5 C5.1805214,19.4148333 4.56096049,19.1624284 4.1413173,18.7427852 C3.7216741,18.323142 3.50790167,17.7422136 3.5,17 L3.5,7 C3.52565636,6.18855517 3.73942879,5.5818885 4.1413173,5.18 C4.5432058,4.7781115 5.1627667,4.55144483 6,4.5 L18,4.5 Z M17.6875,6.75 L6.3125,6.75 C5.85182844,6.75 5.5,7.20978239 5.5,7.77680061 C5.5,8.34381884 5.85182844,8.75 6.3125,8.75 L17.6875,8.75 C18.1481716,8.75 18.5,8.34381884 18.5,7.77680061 C18.5,7.20978239 18.1481716,6.75 17.6875,6.75 Z"
|
|
624
|
+
}));
|
|
625
|
+
};
|
|
626
|
+
var CollapseLarge = function CollapseLarge(props) {
|
|
627
|
+
return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("g", {
|
|
628
|
+
id: "Icons-/-Collapse-L",
|
|
629
|
+
stroke: "none",
|
|
630
|
+
strokeWidth: "1",
|
|
631
|
+
fill: "none",
|
|
632
|
+
fillRule: "evenodd"
|
|
633
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
634
|
+
d: "M18.0000715,4.5 C18.8166416,4.52323671 19.4399749,4.74990338 19.8700715,5.18 C20.3001681,5.61009662 20.5101681,6.21676329 20.5000715,7 L20.5000715,17 C20.4955891,17.7444824 20.2855891,18.3244824 19.8700715,18.74 C19.4545539,19.1555176 18.8312206,19.4088509 18.0000715,19.5 L6.00007152,19.5 C5.18059291,19.4148333 4.56103201,19.1624284 4.14138882,18.7427852 C3.72174562,18.323142 3.50797319,17.7422136 3.50007152,17 L3.50007152,7 C3.52572788,6.18855517 3.73950031,5.5818885 4.14138882,5.18 C4.54327732,4.7781115 5.16283822,4.55144483 6.00007152,4.5 L18.0000715,4.5 Z M17.5015692,6.5 L6.49857385,6.5 C5.94711624,6.5 5.50007152,6.94483697 5.50007152,7.4955775 L5.50007152,16.5044225 C5.50007152,17.0542648 5.94756094,17.5 6.49857385,17.5 L17.5015692,17.5 C18.0530268,17.5 18.5000715,17.055163 18.5000715,16.5044225 L18.5000715,7.4955775 C18.5000715,6.94573523 18.0525821,6.5 17.5015692,6.5 Z M11.51,8.14 L11.51,13.93 L14.4857761,13.93 L14.4857761,15.2471595 L9.79,15.2471595 L9.79,8.14 L11.51,8.14 Z",
|
|
635
|
+
id: "Icons-/-expand-L",
|
|
636
|
+
fill: "currentColor"
|
|
637
|
+
})));
|
|
638
|
+
};
|
|
639
|
+
var CollapseMedium = function CollapseMedium(props) {
|
|
640
|
+
return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("g", {
|
|
641
|
+
id: "Icons-/-Collapse-M",
|
|
642
|
+
stroke: "none",
|
|
643
|
+
strokeWidth: "1",
|
|
644
|
+
fill: "none",
|
|
645
|
+
fillRule: "evenodd"
|
|
646
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
647
|
+
d: "M18.0000715,4.5 C18.8166416,4.52323671 19.4399749,4.74990338 19.8700715,5.18 C20.3001681,5.61009662 20.5101681,6.21676329 20.5000715,7 L20.5000715,17 C20.4955891,17.7444824 20.2855891,18.3244824 19.8700715,18.74 C19.4545539,19.1555176 18.8312206,19.4088509 18.0000715,19.5 L6.00007152,19.5 C5.18059291,19.4148333 4.56103201,19.1624284 4.14138882,18.7427852 C3.72174562,18.323142 3.50797319,17.7422136 3.50007152,17 L3.50007152,7 C3.52572788,6.18855517 3.73950031,5.5818885 4.14138882,5.18 C4.54327732,4.7781115 5.16283822,4.55144483 6.00007152,4.5 L18.0000715,4.5 Z M17.5015692,6.5 L6.49857385,6.5 C5.94711624,6.5 5.50007152,6.94483697 5.50007152,7.4955775 L5.50007152,16.5044225 C5.50007152,17.0542648 5.94756094,17.5 6.49857385,17.5 L17.5015692,17.5 C18.0530268,17.5 18.5000715,17.055163 18.5000715,16.5044225 L18.5000715,7.4955775 C18.5000715,6.94573523 18.0525821,6.5 17.5015692,6.5 Z M10.3720217,8.13793154 L11.9560108,13.0709727 L13.54,8.13793154 L15.79,8.13793154 L15.79,15.25 L14.0828502,15.25 L14.0828502,13.5960917 L14.24,10.1828615 L12.52,15.25 L11.3929679,15.25 L9.66668436,10.1828615 L9.83,13.5960917 L9.83,15.25 L8.12,15.25 L8.12,8.13793154 L10.3720217,8.13793154 Z",
|
|
648
|
+
id: "Icons-/-expand-M",
|
|
649
|
+
fill: "currentColor"
|
|
650
|
+
})));
|
|
651
|
+
};
|
|
652
|
+
var CollapseSmall = function CollapseSmall(props) {
|
|
653
|
+
return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("g", {
|
|
654
|
+
id: "Icons-/-Collapse-S",
|
|
655
|
+
stroke: "none",
|
|
656
|
+
strokeWidth: "1",
|
|
657
|
+
fill: "none",
|
|
658
|
+
fillRule: "evenodd"
|
|
659
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
660
|
+
d: "M18.0000715,4.5 C18.8166416,4.52323671 19.4399749,4.74990338 19.8700715,5.18 C20.3001681,5.61009662 20.5101681,6.21676329 20.5000715,7 L20.5000715,17 C20.4955891,17.7444824 20.2855891,18.3244824 19.8700715,18.74 C19.4545539,19.1555176 18.8312206,19.4088509 18.0000715,19.5 L6.00007152,19.5 C5.18059291,19.4148333 4.56103201,19.1624284 4.14138882,18.7427852 C3.72174562,18.323142 3.50797319,17.7422136 3.50007152,17 L3.50007152,7 C3.52572788,6.18855517 3.73950031,5.5818885 4.14138882,5.18 C4.54327732,4.7781115 5.16283822,4.55144483 6.00007152,4.5 L18.0000715,4.5 Z M17.5015692,6.5 L6.49857385,6.5 C5.94711624,6.5 5.50007152,6.94483697 5.50007152,7.4955775 L5.50007152,16.5044225 C5.50007152,17.0542648 5.94756094,17.5 6.49857385,17.5 L17.5015692,17.5 C18.0530268,17.5 18.5000715,17.055163 18.5000715,16.5044225 L18.5000715,7.4955775 C18.5000715,6.94573523 18.0525821,6.5 17.5015692,6.5 Z M12,8.04223293 C12.3816424,8.04223293 12.7614621,8.07548514 13.1091818,8.18 C13.5650277,8.31701461 13.9657061,8.56252016 14.2430015,8.87556815 C14.5528447,9.22536046 14.7487564,9.63866568 14.7487564,10.2519529 L13.0420578,10.2519529 C13.0420578,10.1288369 13.0272095,9.87711169 12.8626035,9.66926494 C12.7706891,9.55320533 12.6320802,9.43866588 12.4232884,9.38 C12.3058648,9.34700656 12.1662431,9.34 12.0002452,9.34 C11.7669952,9.34 11.5569756,9.40134185 11.3953298,9.49974489 C11.191832,9.62362564 11.065,9.80624313 11.065,9.99915266 C11.065,10.4659624 11.5303207,10.7054039 12.0069825,10.88 C12.251836,10.9696872 12.4996821,11.0509766 12.6889856,11.1190164 C13.2468104,11.3195109 14.7487564,11.8079437 14.7487564,13.3345338 C14.7487564,14.1523847 14.3639594,14.7065019 13.71,15.0235466 C13.2549114,15.2441772 12.7956716,15.35 12,15.35 C11.5837341,15.35 11.0482218,15.2531638 10.57,15.0437157 C10.1291519,14.8506364 9.73916298,14.5618589 9.48671724,14.1650248 C9.25557241,13.8016749 9.14333333,13.3931427 9.15,12.939428 L10.8662463,12.939428 C10.8586095,13.2482201 10.923194,13.4935781 11.06,13.6755022 C11.265209,13.9483883 11.6785712,14.059404 12.0002452,14.059404 C12.416347,14.059404 13.0420578,13.9897611 13.0420578,13.3345338 C13.0420578,13.0169697 12.9081037,12.8095581 12.4695878,12.5923469 C12.3796921,12.5478187 12.2231629,12.4829201 12,12.3976512 C11.2094155,12.128282 10.6637991,11.8940163 10.3631508,11.6948541 C10.1074343,11.5254567 9.88191516,11.3372466 9.73293087,11.1353958 C9.51970344,10.8465054 9.36,10.5472019 9.36,9.99915266 C9.36,9.53454971 9.57462649,9.02233509 10.0735216,8.63036466 C10.4735262,8.31609021 11.2198472,8.04223293 12,8.04223293 Z",
|
|
661
|
+
id: "Icons-/-expand-S",
|
|
662
|
+
fill: "currentColor"
|
|
663
|
+
})));
|
|
664
|
+
};
|
|
597
665
|
|
|
598
666
|
/* *
|
|
599
667
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -688,7 +756,12 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
688
756
|
DimensionsTime: DimensionsTime,
|
|
689
757
|
DimensionsRefTime: DimensionsRefTime,
|
|
690
758
|
DimensionsOther: DimensionsOther,
|
|
691
|
-
Picture: Picture
|
|
759
|
+
Picture: Picture,
|
|
760
|
+
CollapseWindow: CollapseWindow,
|
|
761
|
+
ExpandWindow: ExpandWindow,
|
|
762
|
+
CollapseLarge: CollapseLarge,
|
|
763
|
+
CollapseMedium: CollapseMedium,
|
|
764
|
+
CollapseSmall: CollapseSmall
|
|
692
765
|
});
|
|
693
766
|
|
|
694
767
|
function _defineProperty(obj, key, value) {
|
|
@@ -778,6 +851,13 @@ function _nonIterableRest() {
|
|
|
778
851
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
779
852
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
780
853
|
* */
|
|
854
|
+
var ThemeTypes;
|
|
855
|
+
|
|
856
|
+
(function (ThemeTypes) {
|
|
857
|
+
ThemeTypes["DARK_THEME"] = "darkTheme";
|
|
858
|
+
ThemeTypes["LIGHT_THEME"] = "lightTheme";
|
|
859
|
+
})(ThemeTypes || (ThemeTypes = {}));
|
|
860
|
+
|
|
781
861
|
var gwButtonVariants = ['primary', 'secondary', 'tertiary', 'flat', 'tool', 'boxed', 'icon'];
|
|
782
862
|
|
|
783
863
|
var defaultButtonStyle = function defaultButtonStyle(button) {
|
|
@@ -1354,6 +1434,40 @@ var createTheme = function createTheme(paletteType, geowebColors, shadows) {
|
|
|
1354
1434
|
fontSize: 16
|
|
1355
1435
|
})
|
|
1356
1436
|
}
|
|
1437
|
+
},
|
|
1438
|
+
MuiAccordion: {
|
|
1439
|
+
styleOverrides: {
|
|
1440
|
+
root: {
|
|
1441
|
+
backgroundColor: geowebColors.cards.cardContainer,
|
|
1442
|
+
borderRadius: '3px',
|
|
1443
|
+
border: 'solid 1px',
|
|
1444
|
+
borderColor: geowebColors.cards.cardContainerBorder,
|
|
1445
|
+
color: geowebColors.buttons.flat["default"].color,
|
|
1446
|
+
padding: '0px',
|
|
1447
|
+
margin: '0px 12px 4px 12px',
|
|
1448
|
+
fontSize: '12px',
|
|
1449
|
+
'&:before': {
|
|
1450
|
+
display: 'none'
|
|
1451
|
+
},
|
|
1452
|
+
'& .MuiAccordionSummary-root.Mui-expanded': {
|
|
1453
|
+
borderBottom: 'solid 1px',
|
|
1454
|
+
borderColor: geowebColors.cards.cardContainerBorder
|
|
1455
|
+
},
|
|
1456
|
+
'& .MuiAccordionSummary-content': {
|
|
1457
|
+
margin: '2px',
|
|
1458
|
+
padding: '4px 4px 4px 10px'
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1463
|
+
MuiAccordionSummary: {
|
|
1464
|
+
styleOverrides: {
|
|
1465
|
+
root: {
|
|
1466
|
+
minHeight: '32px',
|
|
1467
|
+
padding: '0px',
|
|
1468
|
+
paddingRight: '5px'
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1357
1471
|
}
|
|
1358
1472
|
}
|
|
1359
1473
|
});
|
|
@@ -1645,24 +1759,8 @@ var colors$1 = {
|
|
|
1645
1759
|
fill: '#67F0FF',
|
|
1646
1760
|
opacity: 0.75
|
|
1647
1761
|
},
|
|
1648
|
-
playerRailObservation: {
|
|
1649
|
-
fill: '#0876B6',
|
|
1650
|
-
opacity: 100
|
|
1651
|
-
},
|
|
1652
|
-
playerRailSelection: {
|
|
1653
|
-
fill: '#C6D111',
|
|
1654
|
-
opacity: 0.5
|
|
1655
|
-
},
|
|
1656
|
-
playerRailForecastData: {
|
|
1657
|
-
fill: '#FD64FF',
|
|
1658
|
-
opacity: 0.6
|
|
1659
|
-
},
|
|
1660
|
-
playerRailForecastNoData: {
|
|
1661
|
-
fill: '#051039',
|
|
1662
|
-
opacity: 0.67
|
|
1663
|
-
},
|
|
1664
1762
|
playerTimeMarkers: {
|
|
1665
|
-
fill: '#
|
|
1763
|
+
fill: '#051039'
|
|
1666
1764
|
},
|
|
1667
1765
|
playerTimeText: {
|
|
1668
1766
|
color: '#FFFFFF',
|
|
@@ -1682,8 +1780,8 @@ var colors$1 = {
|
|
|
1682
1780
|
fill: '#979797'
|
|
1683
1781
|
},
|
|
1684
1782
|
timelineNightTime: {
|
|
1685
|
-
fill: '#
|
|
1686
|
-
opacity: 0.
|
|
1783
|
+
fill: '#051038',
|
|
1784
|
+
opacity: 0.67
|
|
1687
1785
|
},
|
|
1688
1786
|
timelineTimelineSurface: {
|
|
1689
1787
|
fill: '#FFFFFF'
|
|
@@ -2459,24 +2557,8 @@ var colors = {
|
|
|
2459
2557
|
fill: '#67F0FF',
|
|
2460
2558
|
opacity: 0.75
|
|
2461
2559
|
},
|
|
2462
|
-
playerRailObservation: {
|
|
2463
|
-
fill: '#0876B6',
|
|
2464
|
-
opacity: 100
|
|
2465
|
-
},
|
|
2466
|
-
playerRailSelection: {
|
|
2467
|
-
fill: '#C6D111',
|
|
2468
|
-
opacity: 0.5
|
|
2469
|
-
},
|
|
2470
|
-
playerRailForecastData: {
|
|
2471
|
-
fill: '#FD64FF',
|
|
2472
|
-
opacity: 0.6
|
|
2473
|
-
},
|
|
2474
|
-
playerRailForecastNoData: {
|
|
2475
|
-
fill: '#051039',
|
|
2476
|
-
opacity: 0.67
|
|
2477
|
-
},
|
|
2478
2560
|
playerTimeMarkers: {
|
|
2479
|
-
fill: '#
|
|
2561
|
+
fill: '#051039'
|
|
2480
2562
|
},
|
|
2481
2563
|
playerTimeText: {
|
|
2482
2564
|
color: '#FFFFFF',
|
|
@@ -2496,8 +2578,8 @@ var colors = {
|
|
|
2496
2578
|
fill: '#979797'
|
|
2497
2579
|
},
|
|
2498
2580
|
timelineNightTime: {
|
|
2499
|
-
fill: '#
|
|
2500
|
-
opacity: 0.
|
|
2581
|
+
fill: '#051038',
|
|
2582
|
+
opacity: 0.67
|
|
2501
2583
|
},
|
|
2502
2584
|
timelineTimelineSurface: {
|
|
2503
2585
|
fill: '#303030'
|
|
@@ -2682,19 +2764,21 @@ var ThemeContext = /*#__PURE__*/React.createContext({
|
|
|
2682
2764
|
});
|
|
2683
2765
|
var ThemeProvider = function ThemeProvider(_ref) {
|
|
2684
2766
|
var children = _ref.children,
|
|
2685
|
-
|
|
2686
|
-
|
|
2767
|
+
theme = _ref.theme,
|
|
2768
|
+
defaultThemeName = _ref.defaultThemeName,
|
|
2687
2769
|
_ref$disableCssBaseli = _ref.disableCssBaseline,
|
|
2688
2770
|
disableCssBaseline = _ref$disableCssBaseli === void 0 ? false : _ref$disableCssBaseli;
|
|
2771
|
+
var defaultTheme = defaultThemeName === ThemeTypes.DARK_THEME ? darkTheme : lightTheme;
|
|
2689
2772
|
|
|
2690
|
-
var _React$useState = React.useState(
|
|
2773
|
+
var _React$useState = React.useState(defaultTheme === darkTheme),
|
|
2691
2774
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
2692
2775
|
isDark = _React$useState2[0],
|
|
2693
2776
|
setDark = _React$useState2[1];
|
|
2694
2777
|
|
|
2778
|
+
var configuredTheme = isDark ? darkTheme : lightTheme;
|
|
2695
2779
|
var currentTheme = React.useMemo(function () {
|
|
2696
|
-
return
|
|
2697
|
-
}, [
|
|
2780
|
+
return theme || configuredTheme;
|
|
2781
|
+
}, [configuredTheme, theme]);
|
|
2698
2782
|
|
|
2699
2783
|
var toggleTheme = function toggleTheme() {
|
|
2700
2784
|
return setDark(!isDark);
|
|
@@ -2715,14 +2799,15 @@ var useThemeContext = function useThemeContext() {
|
|
|
2715
2799
|
|
|
2716
2800
|
var ThemeWrapper = function ThemeWrapper(_ref2) {
|
|
2717
2801
|
var children = _ref2.children,
|
|
2718
|
-
|
|
2719
|
-
|
|
2802
|
+
theme = _ref2.theme,
|
|
2803
|
+
defaultThemeName = _ref2.defaultThemeName,
|
|
2720
2804
|
_ref2$disableCssBasel = _ref2.disableCssBaseline,
|
|
2721
2805
|
disableCssBaseline = _ref2$disableCssBasel === void 0 ? false : _ref2$disableCssBasel;
|
|
2722
2806
|
return /*#__PURE__*/React.createElement(StyledEngineProvider, {
|
|
2723
2807
|
injectFirst: true
|
|
2724
2808
|
}, /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
2725
2809
|
theme: theme,
|
|
2810
|
+
defaultThemeName: defaultThemeName,
|
|
2726
2811
|
disableCssBaseline: disableCssBaseline
|
|
2727
2812
|
}, children));
|
|
2728
2813
|
}; // Wrapper for storybook stories with GWTheme. Will be deprecated
|
|
@@ -2737,4 +2822,4 @@ var ThemeWrapperOldTheme = function ThemeWrapperOldTheme(_a) {
|
|
|
2737
2822
|
}, props), children);
|
|
2738
2823
|
};
|
|
2739
2824
|
|
|
2740
|
-
export { Add, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, AutoUpdateActive, AutoUpdateInActive, Cached, CalendarToday, Cancel, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Clear, Clock, Close, Copy, Delete, DimensionsElevation, DimensionsOther, DimensionsRefTime, DimensionsTime, DragHandle, DrawFIRLand, DrawPolygon, DrawRegion, Edit, Equalizer, Exclamation, Expand, Export, FastForward, Filter, Flag, GWTheme, GeoWebLogo, HamburgerMenu, Home, index as Icons, Info, KeyCommand, KeyOption, Layers, Link, LinkOff, List, ListItem, Location, Minus, Notifications, Now, Options, Pause, Picture, Play, Preset, PresetTiles, PresetWorkspace, Resize, Search, SliderThumb, Speed, SplitHorizontal, SplitVertical, StepBackward, StepForward, SubdirectoryArrowRight, Success, TextIcon, ThemeContext, ThemeProvider, ThemeWrapper, ThemeWrapperOldTheme, ThumbsUp, TimeSeriesManager, UnExpand, Update, Visibility, VisibilityOff, WebAssetOff, darkTheme, gwButtonVariants, lightTheme, useThemeContext };
|
|
2825
|
+
export { Add, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, AutoUpdateActive, AutoUpdateInActive, Cached, CalendarToday, Cancel, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Clear, Clock, Close, CollapseLarge, CollapseMedium, CollapseSmall, CollapseWindow, Copy, Delete, DimensionsElevation, DimensionsOther, DimensionsRefTime, DimensionsTime, DragHandle, DrawFIRLand, DrawPolygon, DrawRegion, Edit, Equalizer, Exclamation, Expand, ExpandWindow, Export, FastForward, Filter, Flag, GWTheme, GeoWebLogo, HamburgerMenu, Home, index as Icons, Info, KeyCommand, KeyOption, Layers, Link, LinkOff, List, ListItem, Location, Minus, Notifications, Now, Options, Pause, Picture, Play, Preset, PresetTiles, PresetWorkspace, Resize, Search, SliderThumb, Speed, SplitHorizontal, SplitVertical, StepBackward, StepForward, SubdirectoryArrowRight, Success, TextIcon, ThemeContext, ThemeProvider, ThemeTypes, ThemeWrapper, ThemeWrapperOldTheme, ThumbsUp, TimeSeriesManager, UnExpand, Update, Visibility, VisibilityOff, WebAssetOff, darkTheme, dragHandlePath, gwButtonVariants, lightTheme, useThemeContext };
|
package/index.umd.js
CHANGED
|
@@ -79,6 +79,24 @@
|
|
|
79
79
|
return ar;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
/* *
|
|
83
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
84
|
+
* you may not use this file except in compliance with the License.
|
|
85
|
+
* You may obtain a copy of the License at
|
|
86
|
+
*
|
|
87
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
88
|
+
*
|
|
89
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
90
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
91
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
92
|
+
* See the License for the specific language governing permissions and
|
|
93
|
+
* limitations under the License.
|
|
94
|
+
*
|
|
95
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
96
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
97
|
+
* */
|
|
98
|
+
var dragHandlePath = 'M9.5 8a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm5 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm-5 5.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm5 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm-5 5.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm5 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z';
|
|
99
|
+
|
|
82
100
|
/* *
|
|
83
101
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
84
102
|
* you may not use this file except in compliance with the License.
|
|
@@ -348,7 +366,7 @@
|
|
|
348
366
|
};
|
|
349
367
|
var DragHandle = function DragHandle(props) {
|
|
350
368
|
return /*#__PURE__*/React__namespace.createElement(material.SvgIcon, __assign({}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
351
|
-
d:
|
|
369
|
+
d: dragHandlePath
|
|
352
370
|
}));
|
|
353
371
|
};
|
|
354
372
|
var AutoUpdateActive = function AutoUpdateActive(props) {
|
|
@@ -502,10 +520,11 @@
|
|
|
502
520
|
var Resize = function Resize(_a) {
|
|
503
521
|
var _b = _a.isRightAligned,
|
|
504
522
|
isRightAligned = _b === void 0 ? false : _b,
|
|
505
|
-
|
|
523
|
+
sx = _a.sx,
|
|
524
|
+
props = __rest(_a, ["isRightAligned", "sx"]);
|
|
506
525
|
|
|
507
526
|
return /*#__PURE__*/React__namespace.createElement(material.SvgIcon, __assign({
|
|
508
|
-
sx: __assign(__assign({
|
|
527
|
+
sx: __assign(__assign(__assign({
|
|
509
528
|
width: 20,
|
|
510
529
|
height: 20,
|
|
511
530
|
top: -10,
|
|
@@ -517,7 +536,7 @@
|
|
|
517
536
|
left: -10
|
|
518
537
|
}), {
|
|
519
538
|
zIndex: 1
|
|
520
|
-
}),
|
|
539
|
+
}), sx),
|
|
521
540
|
"data-testid": "resizeHandle"
|
|
522
541
|
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
523
542
|
d: "M19.687 18.037v1h-6v-1h6zm3.5-3.5v1h-13v-1h13z",
|
|
@@ -645,6 +664,55 @@
|
|
|
645
664
|
transform: "translate(1 2)"
|
|
646
665
|
}));
|
|
647
666
|
};
|
|
667
|
+
var CollapseWindow = function CollapseWindow(props) {
|
|
668
|
+
return /*#__PURE__*/React__namespace.createElement(material.SvgIcon, __assign({}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
669
|
+
d: "M5,17 C4.43301962,17 4,17.4597824 4,18.0268006 C4,18.5938188 4.43301962,19 5,19 L19,19 C19.5669804,19 20,18.5938188 20,18.0268006 C20,17.4597824 19.5669804,17 19,17 L5,17 Z"
|
|
670
|
+
}));
|
|
671
|
+
};
|
|
672
|
+
var ExpandWindow = function ExpandWindow(props) {
|
|
673
|
+
return /*#__PURE__*/React__namespace.createElement(material.SvgIcon, __assign({}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
674
|
+
d: "M18,4.5 C18.81657,4.52323671 19.4399034,4.74990338 19.87,5.18 C20.3000966,5.61009662 20.5100966,6.21676329 20.5,7 L20.5,17 C20.4955176,17.7444824 20.2855176,18.3244824 19.87,18.74 C19.4544824,19.1555176 18.8311491,19.4088509 18,19.5 L6,19.5 C5.1805214,19.4148333 4.56096049,19.1624284 4.1413173,18.7427852 C3.7216741,18.323142 3.50790167,17.7422136 3.5,17 L3.5,7 C3.52565636,6.18855517 3.73942879,5.5818885 4.1413173,5.18 C4.5432058,4.7781115 5.1627667,4.55144483 6,4.5 L18,4.5 Z M17.6875,6.75 L6.3125,6.75 C5.85182844,6.75 5.5,7.20978239 5.5,7.77680061 C5.5,8.34381884 5.85182844,8.75 6.3125,8.75 L17.6875,8.75 C18.1481716,8.75 18.5,8.34381884 18.5,7.77680061 C18.5,7.20978239 18.1481716,6.75 17.6875,6.75 Z"
|
|
675
|
+
}));
|
|
676
|
+
};
|
|
677
|
+
var CollapseLarge = function CollapseLarge(props) {
|
|
678
|
+
return /*#__PURE__*/React__namespace.createElement(material.SvgIcon, __assign({}, props), /*#__PURE__*/React__namespace.createElement("g", {
|
|
679
|
+
id: "Icons-/-Collapse-L",
|
|
680
|
+
stroke: "none",
|
|
681
|
+
strokeWidth: "1",
|
|
682
|
+
fill: "none",
|
|
683
|
+
fillRule: "evenodd"
|
|
684
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
685
|
+
d: "M18.0000715,4.5 C18.8166416,4.52323671 19.4399749,4.74990338 19.8700715,5.18 C20.3001681,5.61009662 20.5101681,6.21676329 20.5000715,7 L20.5000715,17 C20.4955891,17.7444824 20.2855891,18.3244824 19.8700715,18.74 C19.4545539,19.1555176 18.8312206,19.4088509 18.0000715,19.5 L6.00007152,19.5 C5.18059291,19.4148333 4.56103201,19.1624284 4.14138882,18.7427852 C3.72174562,18.323142 3.50797319,17.7422136 3.50007152,17 L3.50007152,7 C3.52572788,6.18855517 3.73950031,5.5818885 4.14138882,5.18 C4.54327732,4.7781115 5.16283822,4.55144483 6.00007152,4.5 L18.0000715,4.5 Z M17.5015692,6.5 L6.49857385,6.5 C5.94711624,6.5 5.50007152,6.94483697 5.50007152,7.4955775 L5.50007152,16.5044225 C5.50007152,17.0542648 5.94756094,17.5 6.49857385,17.5 L17.5015692,17.5 C18.0530268,17.5 18.5000715,17.055163 18.5000715,16.5044225 L18.5000715,7.4955775 C18.5000715,6.94573523 18.0525821,6.5 17.5015692,6.5 Z M11.51,8.14 L11.51,13.93 L14.4857761,13.93 L14.4857761,15.2471595 L9.79,15.2471595 L9.79,8.14 L11.51,8.14 Z",
|
|
686
|
+
id: "Icons-/-expand-L",
|
|
687
|
+
fill: "currentColor"
|
|
688
|
+
})));
|
|
689
|
+
};
|
|
690
|
+
var CollapseMedium = function CollapseMedium(props) {
|
|
691
|
+
return /*#__PURE__*/React__namespace.createElement(material.SvgIcon, __assign({}, props), /*#__PURE__*/React__namespace.createElement("g", {
|
|
692
|
+
id: "Icons-/-Collapse-M",
|
|
693
|
+
stroke: "none",
|
|
694
|
+
strokeWidth: "1",
|
|
695
|
+
fill: "none",
|
|
696
|
+
fillRule: "evenodd"
|
|
697
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
698
|
+
d: "M18.0000715,4.5 C18.8166416,4.52323671 19.4399749,4.74990338 19.8700715,5.18 C20.3001681,5.61009662 20.5101681,6.21676329 20.5000715,7 L20.5000715,17 C20.4955891,17.7444824 20.2855891,18.3244824 19.8700715,18.74 C19.4545539,19.1555176 18.8312206,19.4088509 18.0000715,19.5 L6.00007152,19.5 C5.18059291,19.4148333 4.56103201,19.1624284 4.14138882,18.7427852 C3.72174562,18.323142 3.50797319,17.7422136 3.50007152,17 L3.50007152,7 C3.52572788,6.18855517 3.73950031,5.5818885 4.14138882,5.18 C4.54327732,4.7781115 5.16283822,4.55144483 6.00007152,4.5 L18.0000715,4.5 Z M17.5015692,6.5 L6.49857385,6.5 C5.94711624,6.5 5.50007152,6.94483697 5.50007152,7.4955775 L5.50007152,16.5044225 C5.50007152,17.0542648 5.94756094,17.5 6.49857385,17.5 L17.5015692,17.5 C18.0530268,17.5 18.5000715,17.055163 18.5000715,16.5044225 L18.5000715,7.4955775 C18.5000715,6.94573523 18.0525821,6.5 17.5015692,6.5 Z M10.3720217,8.13793154 L11.9560108,13.0709727 L13.54,8.13793154 L15.79,8.13793154 L15.79,15.25 L14.0828502,15.25 L14.0828502,13.5960917 L14.24,10.1828615 L12.52,15.25 L11.3929679,15.25 L9.66668436,10.1828615 L9.83,13.5960917 L9.83,15.25 L8.12,15.25 L8.12,8.13793154 L10.3720217,8.13793154 Z",
|
|
699
|
+
id: "Icons-/-expand-M",
|
|
700
|
+
fill: "currentColor"
|
|
701
|
+
})));
|
|
702
|
+
};
|
|
703
|
+
var CollapseSmall = function CollapseSmall(props) {
|
|
704
|
+
return /*#__PURE__*/React__namespace.createElement(material.SvgIcon, __assign({}, props), /*#__PURE__*/React__namespace.createElement("g", {
|
|
705
|
+
id: "Icons-/-Collapse-S",
|
|
706
|
+
stroke: "none",
|
|
707
|
+
strokeWidth: "1",
|
|
708
|
+
fill: "none",
|
|
709
|
+
fillRule: "evenodd"
|
|
710
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
711
|
+
d: "M18.0000715,4.5 C18.8166416,4.52323671 19.4399749,4.74990338 19.8700715,5.18 C20.3001681,5.61009662 20.5101681,6.21676329 20.5000715,7 L20.5000715,17 C20.4955891,17.7444824 20.2855891,18.3244824 19.8700715,18.74 C19.4545539,19.1555176 18.8312206,19.4088509 18.0000715,19.5 L6.00007152,19.5 C5.18059291,19.4148333 4.56103201,19.1624284 4.14138882,18.7427852 C3.72174562,18.323142 3.50797319,17.7422136 3.50007152,17 L3.50007152,7 C3.52572788,6.18855517 3.73950031,5.5818885 4.14138882,5.18 C4.54327732,4.7781115 5.16283822,4.55144483 6.00007152,4.5 L18.0000715,4.5 Z M17.5015692,6.5 L6.49857385,6.5 C5.94711624,6.5 5.50007152,6.94483697 5.50007152,7.4955775 L5.50007152,16.5044225 C5.50007152,17.0542648 5.94756094,17.5 6.49857385,17.5 L17.5015692,17.5 C18.0530268,17.5 18.5000715,17.055163 18.5000715,16.5044225 L18.5000715,7.4955775 C18.5000715,6.94573523 18.0525821,6.5 17.5015692,6.5 Z M12,8.04223293 C12.3816424,8.04223293 12.7614621,8.07548514 13.1091818,8.18 C13.5650277,8.31701461 13.9657061,8.56252016 14.2430015,8.87556815 C14.5528447,9.22536046 14.7487564,9.63866568 14.7487564,10.2519529 L13.0420578,10.2519529 C13.0420578,10.1288369 13.0272095,9.87711169 12.8626035,9.66926494 C12.7706891,9.55320533 12.6320802,9.43866588 12.4232884,9.38 C12.3058648,9.34700656 12.1662431,9.34 12.0002452,9.34 C11.7669952,9.34 11.5569756,9.40134185 11.3953298,9.49974489 C11.191832,9.62362564 11.065,9.80624313 11.065,9.99915266 C11.065,10.4659624 11.5303207,10.7054039 12.0069825,10.88 C12.251836,10.9696872 12.4996821,11.0509766 12.6889856,11.1190164 C13.2468104,11.3195109 14.7487564,11.8079437 14.7487564,13.3345338 C14.7487564,14.1523847 14.3639594,14.7065019 13.71,15.0235466 C13.2549114,15.2441772 12.7956716,15.35 12,15.35 C11.5837341,15.35 11.0482218,15.2531638 10.57,15.0437157 C10.1291519,14.8506364 9.73916298,14.5618589 9.48671724,14.1650248 C9.25557241,13.8016749 9.14333333,13.3931427 9.15,12.939428 L10.8662463,12.939428 C10.8586095,13.2482201 10.923194,13.4935781 11.06,13.6755022 C11.265209,13.9483883 11.6785712,14.059404 12.0002452,14.059404 C12.416347,14.059404 13.0420578,13.9897611 13.0420578,13.3345338 C13.0420578,13.0169697 12.9081037,12.8095581 12.4695878,12.5923469 C12.3796921,12.5478187 12.2231629,12.4829201 12,12.3976512 C11.2094155,12.128282 10.6637991,11.8940163 10.3631508,11.6948541 C10.1074343,11.5254567 9.88191516,11.3372466 9.73293087,11.1353958 C9.51970344,10.8465054 9.36,10.5472019 9.36,9.99915266 C9.36,9.53454971 9.57462649,9.02233509 10.0735216,8.63036466 C10.4735262,8.31609021 11.2198472,8.04223293 12,8.04223293 Z",
|
|
712
|
+
id: "Icons-/-expand-S",
|
|
713
|
+
fill: "currentColor"
|
|
714
|
+
})));
|
|
715
|
+
};
|
|
648
716
|
|
|
649
717
|
/* *
|
|
650
718
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -739,7 +807,12 @@
|
|
|
739
807
|
DimensionsTime: DimensionsTime,
|
|
740
808
|
DimensionsRefTime: DimensionsRefTime,
|
|
741
809
|
DimensionsOther: DimensionsOther,
|
|
742
|
-
Picture: Picture
|
|
810
|
+
Picture: Picture,
|
|
811
|
+
CollapseWindow: CollapseWindow,
|
|
812
|
+
ExpandWindow: ExpandWindow,
|
|
813
|
+
CollapseLarge: CollapseLarge,
|
|
814
|
+
CollapseMedium: CollapseMedium,
|
|
815
|
+
CollapseSmall: CollapseSmall
|
|
743
816
|
});
|
|
744
817
|
|
|
745
818
|
/* *
|
|
@@ -758,6 +831,13 @@
|
|
|
758
831
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
759
832
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
760
833
|
* */
|
|
834
|
+
exports.ThemeTypes = void 0;
|
|
835
|
+
|
|
836
|
+
(function (ThemeTypes) {
|
|
837
|
+
ThemeTypes["DARK_THEME"] = "darkTheme";
|
|
838
|
+
ThemeTypes["LIGHT_THEME"] = "lightTheme";
|
|
839
|
+
})(exports.ThemeTypes || (exports.ThemeTypes = {}));
|
|
840
|
+
|
|
761
841
|
var gwButtonVariants = ['primary', 'secondary', 'tertiary', 'flat', 'tool', 'boxed', 'icon'];
|
|
762
842
|
|
|
763
843
|
var defaultButtonStyle = function defaultButtonStyle(button) {
|
|
@@ -1341,6 +1421,40 @@
|
|
|
1341
1421
|
fontSize: 16
|
|
1342
1422
|
})
|
|
1343
1423
|
}
|
|
1424
|
+
},
|
|
1425
|
+
MuiAccordion: {
|
|
1426
|
+
styleOverrides: {
|
|
1427
|
+
root: {
|
|
1428
|
+
backgroundColor: geowebColors.cards.cardContainer,
|
|
1429
|
+
borderRadius: '3px',
|
|
1430
|
+
border: 'solid 1px',
|
|
1431
|
+
borderColor: geowebColors.cards.cardContainerBorder,
|
|
1432
|
+
color: geowebColors.buttons.flat["default"].color,
|
|
1433
|
+
padding: '0px',
|
|
1434
|
+
margin: '0px 12px 4px 12px',
|
|
1435
|
+
fontSize: '12px',
|
|
1436
|
+
'&:before': {
|
|
1437
|
+
display: 'none'
|
|
1438
|
+
},
|
|
1439
|
+
'& .MuiAccordionSummary-root.Mui-expanded': {
|
|
1440
|
+
borderBottom: 'solid 1px',
|
|
1441
|
+
borderColor: geowebColors.cards.cardContainerBorder
|
|
1442
|
+
},
|
|
1443
|
+
'& .MuiAccordionSummary-content': {
|
|
1444
|
+
margin: '2px',
|
|
1445
|
+
padding: '4px 4px 4px 10px'
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
},
|
|
1450
|
+
MuiAccordionSummary: {
|
|
1451
|
+
styleOverrides: {
|
|
1452
|
+
root: {
|
|
1453
|
+
minHeight: '32px',
|
|
1454
|
+
padding: '0px',
|
|
1455
|
+
paddingRight: '5px'
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1344
1458
|
}
|
|
1345
1459
|
}
|
|
1346
1460
|
});
|
|
@@ -1632,24 +1746,8 @@
|
|
|
1632
1746
|
fill: '#67F0FF',
|
|
1633
1747
|
opacity: 0.75
|
|
1634
1748
|
},
|
|
1635
|
-
playerRailObservation: {
|
|
1636
|
-
fill: '#0876B6',
|
|
1637
|
-
opacity: 100
|
|
1638
|
-
},
|
|
1639
|
-
playerRailSelection: {
|
|
1640
|
-
fill: '#C6D111',
|
|
1641
|
-
opacity: 0.5
|
|
1642
|
-
},
|
|
1643
|
-
playerRailForecastData: {
|
|
1644
|
-
fill: '#FD64FF',
|
|
1645
|
-
opacity: 0.6
|
|
1646
|
-
},
|
|
1647
|
-
playerRailForecastNoData: {
|
|
1648
|
-
fill: '#051039',
|
|
1649
|
-
opacity: 0.67
|
|
1650
|
-
},
|
|
1651
1749
|
playerTimeMarkers: {
|
|
1652
|
-
fill: '#
|
|
1750
|
+
fill: '#051039'
|
|
1653
1751
|
},
|
|
1654
1752
|
playerTimeText: {
|
|
1655
1753
|
color: '#FFFFFF',
|
|
@@ -1669,8 +1767,8 @@
|
|
|
1669
1767
|
fill: '#979797'
|
|
1670
1768
|
},
|
|
1671
1769
|
timelineNightTime: {
|
|
1672
|
-
fill: '#
|
|
1673
|
-
opacity: 0.
|
|
1770
|
+
fill: '#051038',
|
|
1771
|
+
opacity: 0.67
|
|
1674
1772
|
},
|
|
1675
1773
|
timelineTimelineSurface: {
|
|
1676
1774
|
fill: '#FFFFFF'
|
|
@@ -2430,24 +2528,8 @@
|
|
|
2430
2528
|
fill: '#67F0FF',
|
|
2431
2529
|
opacity: 0.75
|
|
2432
2530
|
},
|
|
2433
|
-
playerRailObservation: {
|
|
2434
|
-
fill: '#0876B6',
|
|
2435
|
-
opacity: 100
|
|
2436
|
-
},
|
|
2437
|
-
playerRailSelection: {
|
|
2438
|
-
fill: '#C6D111',
|
|
2439
|
-
opacity: 0.5
|
|
2440
|
-
},
|
|
2441
|
-
playerRailForecastData: {
|
|
2442
|
-
fill: '#FD64FF',
|
|
2443
|
-
opacity: 0.6
|
|
2444
|
-
},
|
|
2445
|
-
playerRailForecastNoData: {
|
|
2446
|
-
fill: '#051039',
|
|
2447
|
-
opacity: 0.67
|
|
2448
|
-
},
|
|
2449
2531
|
playerTimeMarkers: {
|
|
2450
|
-
fill: '#
|
|
2532
|
+
fill: '#051039'
|
|
2451
2533
|
},
|
|
2452
2534
|
playerTimeText: {
|
|
2453
2535
|
color: '#FFFFFF',
|
|
@@ -2467,8 +2549,8 @@
|
|
|
2467
2549
|
fill: '#979797'
|
|
2468
2550
|
},
|
|
2469
2551
|
timelineNightTime: {
|
|
2470
|
-
fill: '#
|
|
2471
|
-
opacity: 0.
|
|
2552
|
+
fill: '#051038',
|
|
2553
|
+
opacity: 0.67
|
|
2472
2554
|
},
|
|
2473
2555
|
timelineTimelineSurface: {
|
|
2474
2556
|
fill: '#303030'
|
|
@@ -2653,18 +2735,20 @@
|
|
|
2653
2735
|
});
|
|
2654
2736
|
var ThemeProvider = function ThemeProvider(_a) {
|
|
2655
2737
|
var children = _a.children,
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
disableCssBaseline =
|
|
2738
|
+
theme = _a.theme,
|
|
2739
|
+
defaultThemeName = _a.defaultThemeName,
|
|
2740
|
+
_b = _a.disableCssBaseline,
|
|
2741
|
+
disableCssBaseline = _b === void 0 ? false : _b;
|
|
2742
|
+
var defaultTheme = defaultThemeName === exports.ThemeTypes.DARK_THEME ? darkTheme : lightTheme;
|
|
2660
2743
|
|
|
2661
|
-
var
|
|
2662
|
-
isDark =
|
|
2663
|
-
setDark =
|
|
2744
|
+
var _c = __read(React__namespace.useState(defaultTheme === darkTheme), 2),
|
|
2745
|
+
isDark = _c[0],
|
|
2746
|
+
setDark = _c[1];
|
|
2664
2747
|
|
|
2748
|
+
var configuredTheme = isDark ? darkTheme : lightTheme;
|
|
2665
2749
|
var currentTheme = React__namespace.useMemo(function () {
|
|
2666
|
-
return
|
|
2667
|
-
}, [
|
|
2750
|
+
return theme || configuredTheme;
|
|
2751
|
+
}, [configuredTheme, theme]);
|
|
2668
2752
|
|
|
2669
2753
|
var toggleTheme = function toggleTheme() {
|
|
2670
2754
|
return setDark(!isDark);
|
|
@@ -2685,14 +2769,15 @@
|
|
|
2685
2769
|
|
|
2686
2770
|
var ThemeWrapper = function ThemeWrapper(_a) {
|
|
2687
2771
|
var children = _a.children,
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
disableCssBaseline =
|
|
2772
|
+
theme = _a.theme,
|
|
2773
|
+
defaultThemeName = _a.defaultThemeName,
|
|
2774
|
+
_b = _a.disableCssBaseline,
|
|
2775
|
+
disableCssBaseline = _b === void 0 ? false : _b;
|
|
2692
2776
|
return /*#__PURE__*/React__namespace.createElement(material.StyledEngineProvider, {
|
|
2693
2777
|
injectFirst: true
|
|
2694
2778
|
}, /*#__PURE__*/React__namespace.createElement(ThemeProvider, {
|
|
2695
2779
|
theme: theme,
|
|
2780
|
+
defaultThemeName: defaultThemeName,
|
|
2696
2781
|
disableCssBaseline: disableCssBaseline
|
|
2697
2782
|
}, children));
|
|
2698
2783
|
}; // Wrapper for storybook stories with GWTheme. Will be deprecated
|
|
@@ -2724,6 +2809,10 @@
|
|
|
2724
2809
|
exports.Clear = Clear;
|
|
2725
2810
|
exports.Clock = Clock;
|
|
2726
2811
|
exports.Close = Close;
|
|
2812
|
+
exports.CollapseLarge = CollapseLarge;
|
|
2813
|
+
exports.CollapseMedium = CollapseMedium;
|
|
2814
|
+
exports.CollapseSmall = CollapseSmall;
|
|
2815
|
+
exports.CollapseWindow = CollapseWindow;
|
|
2727
2816
|
exports.Copy = Copy;
|
|
2728
2817
|
exports.Delete = Delete;
|
|
2729
2818
|
exports.DimensionsElevation = DimensionsElevation;
|
|
@@ -2738,6 +2827,7 @@
|
|
|
2738
2827
|
exports.Equalizer = Equalizer;
|
|
2739
2828
|
exports.Exclamation = Exclamation;
|
|
2740
2829
|
exports.Expand = Expand;
|
|
2830
|
+
exports.ExpandWindow = ExpandWindow;
|
|
2741
2831
|
exports.Export = Export;
|
|
2742
2832
|
exports.FastForward = FastForward;
|
|
2743
2833
|
exports.Filter = Filter;
|
|
@@ -2789,6 +2879,7 @@
|
|
|
2789
2879
|
exports.VisibilityOff = VisibilityOff;
|
|
2790
2880
|
exports.WebAssetOff = WebAssetOff;
|
|
2791
2881
|
exports.darkTheme = darkTheme;
|
|
2882
|
+
exports.dragHandlePath = dragHandlePath;
|
|
2792
2883
|
exports.gwButtonVariants = gwButtonVariants;
|
|
2793
2884
|
exports.lightTheme = lightTheme;
|
|
2794
2885
|
exports.useThemeContext = useThemeContext;
|
|
@@ -59,7 +59,7 @@ export declare const Flag: (props: SvgIconProps) => JSX.Element;
|
|
|
59
59
|
interface ResizeIconProps extends SvgIconProps {
|
|
60
60
|
isRightAligned?: boolean;
|
|
61
61
|
}
|
|
62
|
-
export declare const Resize: ({ isRightAligned, ...props }: ResizeIconProps) => JSX.Element;
|
|
62
|
+
export declare const Resize: ({ isRightAligned, sx, ...props }: ResizeIconProps) => JSX.Element;
|
|
63
63
|
export declare const PresetWorkspace: (props: SvgIconProps) => JSX.Element;
|
|
64
64
|
export declare const Preset: (props: SvgIconProps) => JSX.Element;
|
|
65
65
|
export declare const PresetTiles: (props: SvgIconProps) => JSX.Element;
|
|
@@ -81,4 +81,9 @@ export declare const DimensionsTime: (props: SvgIconProps) => JSX.Element;
|
|
|
81
81
|
export declare const DimensionsRefTime: (props: SvgIconProps) => JSX.Element;
|
|
82
82
|
export declare const DimensionsOther: (props: SvgIconProps) => JSX.Element;
|
|
83
83
|
export declare const Picture: (props: SvgIconProps) => JSX.Element;
|
|
84
|
+
export declare const CollapseWindow: (props: SvgIconProps) => JSX.Element;
|
|
85
|
+
export declare const ExpandWindow: (props: SvgIconProps) => JSX.Element;
|
|
86
|
+
export declare const CollapseLarge: (props: SvgIconProps) => JSX.Element;
|
|
87
|
+
export declare const CollapseMedium: (props: SvgIconProps) => JSX.Element;
|
|
88
|
+
export declare const CollapseSmall: (props: SvgIconProps) => JSX.Element;
|
|
84
89
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dragHandlePath = "M9.5 8a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm5 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm-5 5.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm5 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm-5 5.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm5 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Paths';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Theme as MUITheme } from '@mui/material';
|
|
3
|
+
import { ThemeTypes } from './types';
|
|
3
4
|
interface ThemeContextProps {
|
|
4
5
|
toggleTheme?: () => void;
|
|
5
6
|
isDark?: boolean;
|
|
@@ -8,6 +9,7 @@ export declare const ThemeContext: React.Context<Partial<ThemeContextProps>>;
|
|
|
8
9
|
export interface ThemeProviderProps {
|
|
9
10
|
children: React.ReactNode;
|
|
10
11
|
theme?: MUITheme;
|
|
12
|
+
defaultThemeName?: ThemeTypes;
|
|
11
13
|
disableCssBaseline?: boolean;
|
|
12
14
|
}
|
|
13
15
|
export declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
interface CSSProperties extends React.CSSProperties {
|
|
3
3
|
rgba?: string;
|
|
4
4
|
}
|
|
5
|
+
export declare enum ThemeTypes {
|
|
6
|
+
DARK_THEME = "darkTheme",
|
|
7
|
+
LIGHT_THEME = "lightTheme"
|
|
8
|
+
}
|
|
5
9
|
export declare const gwButtonVariants: readonly ["primary", "secondary", "tertiary", "flat", "tool", "boxed", "icon"];
|
|
6
10
|
export declare type ButtonVariant = typeof gwButtonVariants[number];
|
|
7
11
|
export interface ButtonStyle {
|
|
@@ -71,10 +75,6 @@ export declare type GeowebColorPalette = {
|
|
|
71
75
|
playerNeedleTime: CSSProperties;
|
|
72
76
|
playerNeedlePlayerTop: CSSProperties;
|
|
73
77
|
playerNeedlePlayer: CSSProperties;
|
|
74
|
-
playerRailObservation: CSSProperties;
|
|
75
|
-
playerRailSelection: CSSProperties;
|
|
76
|
-
playerRailForecastData: CSSProperties;
|
|
77
|
-
playerRailForecastNoData: CSSProperties;
|
|
78
78
|
playerTimeMarkers: CSSProperties;
|
|
79
79
|
playerTimeText: CSSProperties;
|
|
80
80
|
timelineIndicator: CSSProperties;
|