@opengeoweb/theme 2.0.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +459 -63
  2. package/index.d.ts +1 -1
  3. package/lib/components/Theme/ThemeContext.d.ts +17 -0
  4. package/{theme.test.d.ts → lib/components/Theme/ThemeContext.spec.d.ts} +1 -1
  5. package/lib/components/Theme/darkTheme.d.ts +3 -0
  6. package/{theme.d.ts → lib/components/Theme/gwTheme.d.ts} +7 -7
  7. package/lib/components/Theme/index.d.ts +5 -0
  8. package/lib/components/Theme/lightTheme.d.ts +3 -0
  9. package/lib/components/Theme/types.d.ts +121 -0
  10. package/lib/components/Theme/utils.d.ts +7 -0
  11. package/lib/components/Theme/utils.spec.d.ts +1 -0
  12. package/lib/stories/Backdrop.stories.d.ts +7 -0
  13. package/lib/stories/Card.stories.d.ts +3 -0
  14. package/lib/stories/Colors.stories.d.ts +7 -0
  15. package/lib/stories/Elevation.stories.d.ts +3 -0
  16. package/lib/stories/FormElements.stories.d.ts +4 -0
  17. package/lib/stories/List.stories.d.ts +3 -0
  18. package/lib/stories/Slider.stories.d.ts +3 -0
  19. package/lib/stories/StoryWrapper.d.ts +9 -0
  20. package/lib/stories/Table.stories.d.ts +3 -0
  21. package/lib/stories/Tabs.stories.d.ts +8 -0
  22. package/lib/stories/Tooltip.stories.d.ts +3 -0
  23. package/lib/stories/Typography.stories.d.ts +4 -0
  24. package/lib/stories/index.stories.d.ts +15 -0
  25. package/lib/stories/snapshots/Backdrop.stories.d.ts +17 -0
  26. package/lib/stories/snapshots/Card.stories.d.ts +17 -0
  27. package/lib/stories/snapshots/Colors.stories.d.ts +17 -0
  28. package/lib/stories/snapshots/Elevation.stories.d.ts +17 -0
  29. package/lib/stories/snapshots/FormElements.stories.d.ts +7 -0
  30. package/lib/stories/snapshots/List.stories.d.ts +7 -0
  31. package/lib/stories/snapshots/Slider.stories.d.ts +7 -0
  32. package/lib/stories/snapshots/Table.stories.d.ts +17 -0
  33. package/lib/stories/snapshots/Tabs.stories.d.ts +7 -0
  34. package/lib/stories/snapshots/Tooltip.stories.d.ts +17 -0
  35. package/lib/stories/snapshots/Typography.stories.d.ts +7 -0
  36. package/lib/storyshots/Storyshots.spec.d.ts +1 -0
  37. package/package.json +11 -121
  38. package/theme.esm.js +1247 -0
  39. package/theme.umd.js +1226 -0
  40. package/AUTHORS +0 -14
  41. package/LICENCE +0 -13
  42. package/index.js +0 -13
  43. package/theme.js +0 -206
  44. package/theme.stories.d.ts +0 -7
  45. package/theme.stories.js +0 -255
  46. package/theme.test.js +0 -44
package/theme.esm.js ADDED
@@ -0,0 +1,1247 @@
1
+ import { createMuiTheme, ThemeProvider as ThemeProvider$1, CssBaseline } from '@material-ui/core';
2
+ import * as React from 'react';
3
+
4
+ function _defineProperty(obj, key, value) {
5
+ if (key in obj) {
6
+ Object.defineProperty(obj, key, {
7
+ value: value,
8
+ enumerable: true,
9
+ configurable: true,
10
+ writable: true
11
+ });
12
+ } else {
13
+ obj[key] = value;
14
+ }
15
+
16
+ return obj;
17
+ }
18
+
19
+ function _slicedToArray(arr, i) {
20
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
21
+ }
22
+
23
+ function _arrayWithHoles(arr) {
24
+ if (Array.isArray(arr)) return arr;
25
+ }
26
+
27
+ function _iterableToArrayLimit(arr, i) {
28
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
29
+ var _arr = [];
30
+ var _n = true;
31
+ var _d = false;
32
+ var _e = undefined;
33
+
34
+ try {
35
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
36
+ _arr.push(_s.value);
37
+
38
+ if (i && _arr.length === i) break;
39
+ }
40
+ } catch (err) {
41
+ _d = true;
42
+ _e = err;
43
+ } finally {
44
+ try {
45
+ if (!_n && _i["return"] != null) _i["return"]();
46
+ } finally {
47
+ if (_d) throw _e;
48
+ }
49
+ }
50
+
51
+ return _arr;
52
+ }
53
+
54
+ function _unsupportedIterableToArray(o, minLen) {
55
+ if (!o) return;
56
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
57
+ var n = Object.prototype.toString.call(o).slice(8, -1);
58
+ if (n === "Object" && o.constructor) n = o.constructor.name;
59
+ if (n === "Map" || n === "Set") return Array.from(o);
60
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
61
+ }
62
+
63
+ function _arrayLikeToArray(arr, len) {
64
+ if (len == null || len > arr.length) len = arr.length;
65
+
66
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
67
+
68
+ return arr2;
69
+ }
70
+
71
+ function _nonIterableRest() {
72
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
73
+ }
74
+
75
+ var hex2rgba = function hex2rgba(hex) {
76
+ var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
77
+
78
+ var _hex$match$map = hex.match(/\w\w/g).map(function (x) {
79
+ return parseInt(x, 16);
80
+ }),
81
+ _hex$match$map2 = _slicedToArray(_hex$match$map, 3),
82
+ r = _hex$match$map2[0],
83
+ g = _hex$match$map2[1],
84
+ b = _hex$match$map2[2];
85
+
86
+ return "rgba(".concat(r, ",").concat(g, ",").concat(b, ",").concat(alpha, ")");
87
+ };
88
+ var parseColors = function parseColors(colors) {
89
+ return Object.keys(colors).reduce(function (segmentList, key) {
90
+ var segment = colors[key];
91
+ var parsedSegment = Object.keys(segment).reduce(function (list, name) {
92
+ var value = segment[name];
93
+ var color = value.fill || value.color; // converts hex to rgba value if color and opacity property has been set
94
+
95
+ if (value && color && (value.opacity || value.opacity === 0)) {
96
+ return Object.assign(Object.assign({}, list), _defineProperty({}, name, Object.assign(Object.assign({}, value), {
97
+ rgba: hex2rgba(color, value.opacity)
98
+ })));
99
+ }
100
+
101
+ return Object.assign(Object.assign({}, list), _defineProperty({}, name, value));
102
+ }, {});
103
+ return Object.assign(Object.assign({}, segmentList), _defineProperty({}, key, parsedSegment));
104
+ }, {});
105
+ };
106
+ var createShadows = function createShadows(elevations) {
107
+ var SHADOW_LIST_SIZE = 25;
108
+ var elevationList = Object.keys(elevations).map(function (elevationName) {
109
+ return elevations[elevationName];
110
+ });
111
+ return Array(SHADOW_LIST_SIZE).fill('none').map(function (value, index) {
112
+ if (index > 0) {
113
+ var elevationIndex = index - 1;
114
+
115
+ if (elevationList[elevationIndex]) {
116
+ return elevationList[elevationIndex];
117
+ }
118
+ }
119
+
120
+ return value;
121
+ });
122
+ };
123
+ var BORDER_RADIUS = 3;
124
+ var createTheme = function createTheme(paletteType, geowebColors, shadows) {
125
+ return createMuiTheme({
126
+ palette: {
127
+ type: paletteType,
128
+ secondary: {
129
+ main: geowebColors.typographyAndIcons.iconLinkActive
130
+ },
131
+ background: {
132
+ paper: geowebColors.background.surfaceApp,
133
+ "default": geowebColors.background.surfaceBrowser
134
+ },
135
+ text: {
136
+ primary: geowebColors.typographyAndIcons.text
137
+ },
138
+ // geoweb color palette
139
+ geowebColors: geowebColors
140
+ },
141
+ shape: {
142
+ borderRadius: BORDER_RADIUS
143
+ },
144
+ typography: {
145
+ fontFamily: ['Roboto', 'Helvetica', 'Arial', 'sans-serif'].join(',')
146
+ },
147
+ shadows: shadows,
148
+ overrides: {
149
+ MuiCssBaseline: {
150
+ '@global': {
151
+ body: {
152
+ fontSmoothing: 'auto'
153
+ }
154
+ }
155
+ },
156
+ MuiMenuItem: {
157
+ root: {
158
+ fontSize: '0.875rem',
159
+ letterSpacing: '0.25px',
160
+ ':not(:last-child)&:after': {
161
+ content: '""',
162
+ position: 'absolute',
163
+ width: '100%',
164
+ height: 1,
165
+ background: geowebColors.greys.accessible,
166
+ bottom: 0,
167
+ left: 0,
168
+ opacity: 0.5
169
+ },
170
+ '&.Mui-selected': {
171
+ background: 'none',
172
+ boxShadow: "inset 4px 0px 0px 0px ".concat(geowebColors.typographyAndIcons.iconLinkActive)
173
+ }
174
+ }
175
+ },
176
+ MuiRadio: {
177
+ root: {
178
+ color: geowebColors.typographyAndIcons.iconLinkActive
179
+ }
180
+ },
181
+ MuiPaper: {
182
+ outlined: {
183
+ borderColor: geowebColors.cards.cardContainerBorder
184
+ }
185
+ },
186
+ MuiCard: {
187
+ root: {
188
+ backgroundColor: geowebColors.cards.cardContainer
189
+ }
190
+ },
191
+ MuiSlider: {
192
+ root: {
193
+ color: geowebColors.typographyAndIcons.iconLinkActive
194
+ }
195
+ },
196
+ MuiTable: {
197
+ root: {
198
+ borderSpacing: '0 0.25rem',
199
+ borderCollapse: 'separate'
200
+ }
201
+ },
202
+ MuiTableRow: {
203
+ head: {
204
+ '&:hover': {
205
+ boxShadow: shadows[0]
206
+ }
207
+ },
208
+ root: {
209
+ transition: 'box-shadow 100ms ease-out',
210
+ boxShadow: shadows[0],
211
+ borderRadius: BORDER_RADIUS,
212
+ '&:hover': {
213
+ boxShadow: shadows[1]
214
+ },
215
+ position: 'relative'
216
+ }
217
+ },
218
+ MuiTableCell: {
219
+ head: {
220
+ borderBottom: 'none',
221
+ fontSize: '0.875rem',
222
+ fontWeight: 400
223
+ },
224
+ body: {
225
+ padding: 12,
226
+ fontWeight: 500,
227
+ backgroundColor: geowebColors.background.surface,
228
+ borderStyle: 'solid',
229
+ borderColor: 'transparent',
230
+ borderWidth: 1,
231
+ borderTopColor: geowebColors.cards.cardContainerBorder,
232
+ borderBottomColor: geowebColors.cards.cardContainerBorder,
233
+ '&:first-child': {
234
+ borderLeftColor: geowebColors.cards.cardContainerBorder,
235
+ borderRadius: "".concat(BORDER_RADIUS, "px 0px 0px ").concat(BORDER_RADIUS, "px")
236
+ },
237
+ '&:last-child': {
238
+ borderRightColor: geowebColors.cards.cardContainerBorder,
239
+ borderRadius: "0px ".concat(BORDER_RADIUS, "px ").concat(BORDER_RADIUS, "px 0px")
240
+ }
241
+ }
242
+ },
243
+ MuiTabs: {
244
+ root: {
245
+ position: 'relative',
246
+ '&:after': {
247
+ content: '""',
248
+ position: 'absolute',
249
+ bottom: 0,
250
+ height: 1,
251
+ width: '100%',
252
+ zIndex: 0,
253
+ backgroundColor: hex2rgba(geowebColors.greys.accessible, 0.2)
254
+ }
255
+ },
256
+ indicator: {
257
+ zIndex: 1,
258
+ backgroundColor: geowebColors.typographyAndIcons.iconLinkActive
259
+ }
260
+ },
261
+ MuiTab: {
262
+ root: {
263
+ textTransform: 'initial',
264
+ '&.Mui-selected': {
265
+ color: geowebColors.typographyAndIcons.iconLinkActive
266
+ },
267
+ '&:hover': {
268
+ opacity: 1,
269
+ color: geowebColors.typographyAndIcons.iconLinkActive,
270
+ backgroundColor: geowebColors.tab.mouseOver.rgba
271
+ }
272
+ }
273
+ },
274
+ MuiListItem: {
275
+ root: {
276
+ color: geowebColors.typographyAndIcons.text
277
+ },
278
+ divider: {
279
+ borderBottomColor: hex2rgba(geowebColors.greys.accessible, 0.2)
280
+ }
281
+ },
282
+ MuiBackdrop: {
283
+ root: {
284
+ backgroundColor: geowebColors.backdrops.black.rgba
285
+ }
286
+ },
287
+ MuiTooltip: {
288
+ tooltip: {
289
+ backgroundColor: geowebColors.tooltips.tooltipContainer.rgba,
290
+ color: geowebColors.tooltips.tooltipText.color,
291
+ padding: '8px 12px',
292
+ fontSize: 16,
293
+ fontWeight: 400,
294
+ fontStretch: 'normal',
295
+ fontStyle: 'normal',
296
+ letterSpacing: 0.44,
297
+ lineHeight: 1.56
298
+ }
299
+ },
300
+ MuiLink: {
301
+ root: {
302
+ color: geowebColors.typographyAndIcons.textLinkActive
303
+ }
304
+ },
305
+ // TODO: implement correct theming values https://gitlab.com/opengeoweb/opengeoweb/-/issues/1369
306
+ MuiAlert: {
307
+ standardError: {
308
+ border: '1px solid #c00000',
309
+ borderRadius: '0px',
310
+ backgroundColor: '#fff0ea'
311
+ },
312
+ standardWarning: {
313
+ border: '1px solid #ffa800',
314
+ borderRadius: '0px',
315
+ backgroundColor: '#fff8eb'
316
+ },
317
+ standardInfo: {
318
+ border: '1px solid #0062e6',
319
+ borderRadius: '0px',
320
+ backgroundColor: '#eaf3ff'
321
+ },
322
+ standardSuccess: {
323
+ border: '1px solid #72bb23',
324
+ borderRadius: '0px',
325
+ backgroundColor: '#fcffeb'
326
+ },
327
+ action: {
328
+ color: '#0075a9'
329
+ },
330
+ message: {
331
+ fontSize: '14px',
332
+ lineHeight: 1.43,
333
+ letterSpacing: '0.25px',
334
+ color: '#051039'
335
+ }
336
+ },
337
+ MuiFilledInput: {
338
+ root: {
339
+ backgroundColor: geowebColors.textInputField["default"].rgba,
340
+ '&.Mui-focused': {
341
+ backgroundColor: geowebColors.textInputField.active.rgba
342
+ },
343
+ '&.Mui-disabled': {
344
+ backgroundColor: geowebColors.textInputField.disabled.rgba
345
+ }
346
+ },
347
+ underline: {
348
+ '&:after': {
349
+ borderBottom: 'transparent'
350
+ },
351
+ '&.Mui-disabled:before': {
352
+ borderBottomStyle: 'solid'
353
+ }
354
+ }
355
+ },
356
+ MuiFormLabel: {
357
+ root: {
358
+ color: geowebColors.captions.captionStatus.color,
359
+ opacity: geowebColors.captions.captionStatus.opacity,
360
+ '&.Mui-focused': {
361
+ color: geowebColors.captions.captionInformation.color,
362
+ opacity: geowebColors.captions.captionInformation.opacity
363
+ },
364
+ '&.Mui-error': {
365
+ color: geowebColors.captions.captionError.color,
366
+ opacity: geowebColors.captions.captionError.opacity
367
+ },
368
+ '&.Mui-disabled': {
369
+ color: geowebColors.captions.captionDisabled.color,
370
+ opacity: geowebColors.captions.captionDisabled.opacity
371
+ }
372
+ }
373
+ },
374
+ MuiFormHelperText: {
375
+ root: {
376
+ color: geowebColors.captions.captionStatus.color,
377
+ opacity: geowebColors.captions.captionStatus.opacity,
378
+ '&.Mui-error': {
379
+ color: geowebColors.captions.captionError.color,
380
+ opacity: geowebColors.captions.captionError.opacity
381
+ },
382
+ '&.Mui-disabled': {
383
+ color: geowebColors.captions.captionDisabled.color,
384
+ opacity: geowebColors.captions.captionDisabled.opacity
385
+ }
386
+ }
387
+ }
388
+ }
389
+ });
390
+ };
391
+
392
+ /* *
393
+ * Licensed under the Apache License, Version 2.0 (the "License");
394
+ * you may not use this file except in compliance with the License.
395
+ * You may obtain a copy of the License at
396
+ *
397
+ * http://www.apache.org/licenses/LICENSE-2.0
398
+ *
399
+ * Unless required by applicable law or agreed to in writing, software
400
+ * distributed under the License is distributed on an "AS IS" BASIS,
401
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
402
+ * See the License for the specific language governing permissions and
403
+ * limitations under the License.
404
+ *
405
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
406
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
407
+ * */
408
+
409
+ var colors$1 = {
410
+ background: {
411
+ surface: '#FFFFFF',
412
+ surfaceApp: '#F5F5F5',
413
+ surfaceBrowser: '#CFCFCF'
414
+ },
415
+ brand: {
416
+ brand: '#00547d'
417
+ },
418
+ buttons: {
419
+ primary: {
420
+ fill: '#186DFF'
421
+ },
422
+ primaryMouseover: {
423
+ fill: '#1047B0'
424
+ },
425
+ primaryActive: {
426
+ fill: '#186DFF'
427
+ },
428
+ flatMouseover: {
429
+ fill: '#E3E4E7'
430
+ },
431
+ focusDefault: {
432
+ outline: 'solid 2px #419cfe'
433
+ },
434
+ disabled: {
435
+ fill: '#E8E5E5'
436
+ },
437
+ surfaceIconDefault: {
438
+ fill: '#F5F5F5'
439
+ }
440
+ },
441
+ typographyAndIcons: {
442
+ text: '#051039',
443
+ icon: '#051039',
444
+ buttonIcon: '#FFFFFF',
445
+ iconLinkActive: '#186DFF',
446
+ iconLinkDisabled: '#CCCCCC',
447
+ textLinkActive: '#186DFF',
448
+ buttonIconTertiaryFlat: '#575F7A'
449
+ },
450
+ textInputField: {
451
+ "default": {
452
+ fill: '#051039',
453
+ opacity: 0.07
454
+ },
455
+ active: {
456
+ fill: '#051039',
457
+ opacity: 0.02
458
+ },
459
+ disabled: {
460
+ fill: '#000000',
461
+ opacity: 0
462
+ }
463
+ },
464
+ tab: {
465
+ mouseOver: {
466
+ fill: '#051039',
467
+ opacity: 0.07
468
+ }
469
+ },
470
+ greys: {
471
+ accessible: '#767676'
472
+ },
473
+ cards: {
474
+ cardContainer: '#FFFFFF',
475
+ cardContainerBorder: '#EEEEEE'
476
+ },
477
+ backdrops: {
478
+ black: {
479
+ fill: '#000000',
480
+ opacity: 0.5
481
+ },
482
+ white: {
483
+ fill: '#FFFFFF',
484
+ opacity: 0.24
485
+ }
486
+ },
487
+ timeSlider: {
488
+ // player
489
+ playerNeedleTimeTop: {
490
+ fill: '#E3004F',
491
+ opacity: 100
492
+ },
493
+ playerNeedleTime: {
494
+ fill: '#FFD523',
495
+ opacity: 0.75
496
+ },
497
+ playerNeedlePlayerTop: {
498
+ fill: '#051039',
499
+ opacity: 100
500
+ },
501
+ playerNeedlePlayer: {
502
+ fill: '#67F0FF',
503
+ opacity: 0.75
504
+ },
505
+ playerRailObservation: {
506
+ fill: '#0876B6',
507
+ opacity: 100
508
+ },
509
+ playerRailSelection: {
510
+ fill: '#C6D111',
511
+ opacity: 0.5
512
+ },
513
+ playerRailForecastData: {
514
+ fill: '#FD64FF',
515
+ opacity: 0.6
516
+ },
517
+ playerRailForecastNoData: {
518
+ fill: '#051039',
519
+ opacity: 0.67
520
+ },
521
+ playerTimeMarkers: {
522
+ fill: '#2C2C2C'
523
+ },
524
+ playerTimeText: {
525
+ color: '#FFFFFF',
526
+ fontFamily: 'Roboto',
527
+ fontSize: 14
528
+ },
529
+ // timeline
530
+ timelineIndicator: {
531
+ fill: '#767676'
532
+ },
533
+ timelineText: {
534
+ fontSize: 14,
535
+ color: '#051039',
536
+ fontFamily: 'Roboto'
537
+ },
538
+ timelineTimeScale: {
539
+ fill: '#979797'
540
+ },
541
+ timelineNightTime: {
542
+ fill: '#070808',
543
+ opacity: 0.1
544
+ },
545
+ timelineTimelineSurface: {
546
+ fill: '#FFFFFF'
547
+ },
548
+ timelineMonthChangeDash: {
549
+ fill: '#767676',
550
+ opacity: 0.5
551
+ },
552
+ // time scale
553
+ timeScaleText: {
554
+ fontSize: 12
555
+ },
556
+ timeScalePointer: {
557
+ fill: '#F8F9F9'
558
+ },
559
+ timeScaleHorizontalScale: {
560
+ fill: '#070808',
561
+ opacity: 0.2
562
+ },
563
+ timeScaleTimeIndicators: {
564
+ fill: '#767676'
565
+ },
566
+ timeScaleTimeIndicatorsActive: {
567
+ fill: '#051039'
568
+ },
569
+ timeScaleShadowButtonScale: {
570
+ filter: 'drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.28)) drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.24)) drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.40))'
571
+ }
572
+ },
573
+ customSlider: {
574
+ rail: '#488BFD',
575
+ railDisabled: '#CCCCCC',
576
+ track: '#186DFF',
577
+ trackDisabled: '#CCCCCC',
578
+ thumb: '#F8F9F9',
579
+ thumbDisabled: '#CCCCCC',
580
+ mark: '#FFFFFF',
581
+ markDisabled: '#FFFFFF',
582
+ switchTrack: '#72BB23',
583
+ switchTrackDisabled: '#767676'
584
+ },
585
+ syncGroups: {
586
+ drawerOpen: {
587
+ fill: '#E8E5E5'
588
+ }
589
+ },
590
+ layerManager: {
591
+ tableRowDefaultIcon: {
592
+ fill: '#051039',
593
+ opacity: 0.67
594
+ },
595
+ tableRowDefaultText: {
596
+ color: '#051039',
597
+ opacity: 0.87,
598
+ fontSize: 12
599
+ },
600
+ tableRowDefaultCardContainer: {
601
+ fill: '#FFFFFF',
602
+ border: '1px solid #EEEEEE'
603
+ },
604
+ tableRowMouseover: {
605
+ fill: '#051039',
606
+ opacity: 0.07
607
+ },
608
+ tableRowDisabledIcon: {
609
+ fill: '#767676'
610
+ },
611
+ tableRowDisabledText: {
612
+ color: '#767676',
613
+ opacity: 0.87,
614
+ fontSize: 12
615
+ },
616
+ tableRowDisabledCardContainer: {
617
+ fill: '#F5F5F5',
618
+ border: '1px solid #EEEEEE'
619
+ }
620
+ },
621
+ tooltips: {
622
+ tooltipContainer: {
623
+ fill: '#232323',
624
+ opacity: 1
625
+ },
626
+ tooltipText: {
627
+ color: '#FFFFFF'
628
+ }
629
+ },
630
+ captions: {
631
+ captionStatus: {
632
+ color: '#051039',
633
+ opacity: 0.67
634
+ },
635
+ captionInformation: {
636
+ color: '#1100FF',
637
+ opacity: 1
638
+ },
639
+ captionError: {
640
+ color: '#C00000',
641
+ opacity: 1
642
+ },
643
+ captionDisabled: {
644
+ color: '#767676',
645
+ opacity: 1
646
+ }
647
+ }
648
+ }; // https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/609bb6a5287bd1abe0de39a7
649
+
650
+ var elevations$1 = {
651
+ elevation_01: '0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)',
652
+ elevation_02: '0 1px 5px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.14)',
653
+ elevation_03: '0 1px 8px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 3px 3px 0 rgba(0, 0, 0, 0.14)',
654
+ elevation_04: '0 1px 10px 0 rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.14)',
655
+ elevation_06: '0 3px 5px 0 rgba(0, 0, 0, 0.2), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 6px 10px 0 rgba(0, 0, 0, 0.14)',
656
+ elevation_08: '0 4px 5px 0 rgba(0, 0, 0, 0.2), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 8px 10px 1px rgba(0, 0, 0, 0.14)',
657
+ elevation_09: '0 5px 6px 0 rgba(0, 0, 0, 0.2), 0 3px 16px 2px rgba(0, 0, 0, 0.12), 0 9px 12px 1px rgba(0, 0, 0, 0.14)',
658
+ elevation_12: '0 7px 8px 0 rgba(0, 0, 0, 0.2), 0 5px 22px 4px rgba(0, 0, 0, 0.12), 0 12px 17px 2px rgba(0, 0, 0, 0.14)',
659
+ elevation_16: '0 8px 10px 0 rgba(0, 0, 0, 0.2), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 16px 24px 2px rgba(0, 0, 0, 0.14)',
660
+ elevation_24: '0 11px 15px 0 rgba(0, 0, 0, 0.2), 0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 24px 38px 3px rgba(0, 0, 0, 0.14)'
661
+ };
662
+ var lightTheme = createTheme('light', parseColors(colors$1), createShadows(elevations$1));
663
+
664
+ /* *
665
+ * Licensed under the Apache License, Version 2.0 (the "License");
666
+ * you may not use this file except in compliance with the License.
667
+ * You may obtain a copy of the License at
668
+ *
669
+ * http://www.apache.org/licenses/LICENSE-2.0
670
+ *
671
+ * Unless required by applicable law or agreed to in writing, software
672
+ * distributed under the License is distributed on an "AS IS" BASIS,
673
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
674
+ * See the License for the specific language governing permissions and
675
+ * limitations under the License.
676
+ *
677
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
678
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
679
+ * */
680
+
681
+ var geowebColors = Object.assign({}, colors$1);
682
+ var GWTheme = createMuiTheme({
683
+ palette: {
684
+ secondary: {
685
+ main: '#0075a9'
686
+ },
687
+ action: {
688
+ active: '#ffa800'
689
+ },
690
+ text: {
691
+ disabled: '#051039'
692
+ },
693
+ geowebColors: parseColors(geowebColors)
694
+ },
695
+ shape: {
696
+ borderRadius: 3
697
+ },
698
+ typography: {
699
+ h6: {
700
+ fontSize: '16px'
701
+ },
702
+ subtitle1: {
703
+ fontSize: '16px',
704
+ fontWeight: 500,
705
+ lineHeight: 1.5,
706
+ letterSpacing: '0.15px',
707
+ opacity: 0.87,
708
+ color: '#051039'
709
+ },
710
+ subtitle2: {
711
+ fontSize: '14px',
712
+ fontWeight: 500,
713
+ lineHeight: 1.71,
714
+ letterSpacing: '0.1px',
715
+ opacity: 0.87,
716
+ color: '#051039'
717
+ },
718
+ body1: {
719
+ fontSize: '16px',
720
+ lineHeight: 1.56,
721
+ letterSpacing: '0.44px',
722
+ color: '#051039'
723
+ },
724
+ body2: {
725
+ fontSize: '14px',
726
+ lineHeight: 1.43,
727
+ letterSpacing: '0.25px',
728
+ color: '#051039'
729
+ },
730
+ overline: {
731
+ textTransform: 'none',
732
+ fontSize: '12px',
733
+ lineHeight: 1.43,
734
+ letterSpacing: '0.25px',
735
+ color: '#051039',
736
+ opacity: 0.7
737
+ },
738
+ caption: {
739
+ fontSize: '12px',
740
+ lineHeight: 1.33,
741
+ letterSpacing: '0.4px',
742
+ color: '#051039',
743
+ opacity: 0.7
744
+ },
745
+ button: {
746
+ fontWeight: 500,
747
+ fontSize: '14px',
748
+ color: '0075a9'
749
+ }
750
+ },
751
+ overrides: {
752
+ MuiTooltip: {
753
+ tooltip: {
754
+ borderRadius: '2px',
755
+ fontSize: '16px',
756
+ fontWeight: 'normal',
757
+ padding: '10px',
758
+ backgroundColor: '#232323'
759
+ }
760
+ },
761
+ MuiIconButton: {
762
+ root: {
763
+ color: '#0075a9'
764
+ }
765
+ },
766
+ MuiCheckbox: {
767
+ root: {
768
+ color: '#0075a9'
769
+ }
770
+ },
771
+ MuiSelect: {
772
+ icon: {
773
+ color: '#0075a9'
774
+ },
775
+ select: {
776
+ '&:focus': {
777
+ backgroundColor: 'rgba(0, 117, 169, 0.05)'
778
+ }
779
+ }
780
+ },
781
+ MuiAlert: {
782
+ standardError: {
783
+ border: '1px solid #c00000',
784
+ borderRadius: '0px',
785
+ backgroundColor: '#fff0ea'
786
+ },
787
+ standardWarning: {
788
+ border: '1px solid #ffa800',
789
+ borderRadius: '0px',
790
+ backgroundColor: '#fff8eb'
791
+ },
792
+ standardInfo: {
793
+ border: '1px solid #0062e6',
794
+ borderRadius: '0px',
795
+ backgroundColor: '#eaf3ff'
796
+ },
797
+ standardSuccess: {
798
+ border: '1px solid #72bb23',
799
+ borderRadius: '0px',
800
+ backgroundColor: '#fcffeb'
801
+ },
802
+ action: {
803
+ color: '#0075a9'
804
+ },
805
+ message: {
806
+ fontSize: '14px',
807
+ lineHeight: 1.43,
808
+ letterSpacing: '0.25px',
809
+ color: '#051039'
810
+ }
811
+ },
812
+ MuiTabs: {
813
+ root: {
814
+ backgroundColor: '#ffffff',
815
+ minHeight: '30px'
816
+ },
817
+ scrollButtons: {
818
+ width: '20px'
819
+ }
820
+ },
821
+ MuiTab: {
822
+ root: {
823
+ minHeight: '30px',
824
+ textTransform: 'none',
825
+ minWidth: '76px',
826
+ '@media (min-width: 600px)': {
827
+ minWidth: '76px'
828
+ }
829
+ },
830
+ labelIcon: {
831
+ minHeight: '30px'
832
+ }
833
+ },
834
+ MuiListItem: {
835
+ root: {
836
+ '&$selected': {
837
+ backgroundColor: 'rgba(0, 117, 169, 0.15)',
838
+ borderLeft: '4px solid #0075a9',
839
+ '&:hover': {
840
+ backgroundColor: 'rgba(0, 117, 169, 0.10)'
841
+ }
842
+ }
843
+ },
844
+ button: {
845
+ '&:hover': {
846
+ backgroundColor: 'rgba(0, 117, 169, 0.15)'
847
+ }
848
+ }
849
+ },
850
+ MuiFormLabel: {
851
+ root: {
852
+ color: 'rgba(5, 16, 57, 0.7)',
853
+ '&$focused': {
854
+ color: '#0075a9'
855
+ }
856
+ }
857
+ },
858
+ MuiOutlinedInput: {
859
+ root: {
860
+ '&$focused $notchedOutline': {
861
+ borderColor: '#0075a9'
862
+ }
863
+ }
864
+ },
865
+ MuiFilledInput: {
866
+ root: {
867
+ backgroundColor: 'rgba(0, 117, 169, 0.05)',
868
+ color: '#051039',
869
+ '&$disabled': {
870
+ backgroundColor: 'transparent'
871
+ }
872
+ },
873
+ underline: {
874
+ '&$disabled:before': {
875
+ borderBottomStyle: 'none'
876
+ }
877
+ }
878
+ },
879
+ MuiCardContent: {
880
+ root: {
881
+ '&:last-child': {
882
+ paddingBottom: 0
883
+ }
884
+ }
885
+ }
886
+ }
887
+ });
888
+
889
+ /*! *****************************************************************************
890
+ Copyright (c) Microsoft Corporation.
891
+
892
+ Permission to use, copy, modify, and/or distribute this software for any
893
+ purpose with or without fee is hereby granted.
894
+
895
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
896
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
897
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
898
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
899
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
900
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
901
+ PERFORMANCE OF THIS SOFTWARE.
902
+ ***************************************************************************** */
903
+
904
+ function __rest(s, e) {
905
+ var t = {};
906
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
907
+ t[p] = s[p];
908
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
909
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
910
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
911
+ t[p[i]] = s[p[i]];
912
+ }
913
+ return t;
914
+ }
915
+
916
+ /* *
917
+ * Licensed under the Apache License, Version 2.0 (the "License");
918
+ * you may not use this file except in compliance with the License.
919
+ * You may obtain a copy of the License at
920
+ *
921
+ * http://www.apache.org/licenses/LICENSE-2.0
922
+ *
923
+ * Unless required by applicable law or agreed to in writing, software
924
+ * distributed under the License is distributed on an "AS IS" BASIS,
925
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
926
+ * See the License for the specific language governing permissions and
927
+ * limitations under the License.
928
+ *
929
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
930
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
931
+ * */
932
+
933
+ var colors = {
934
+ background: {
935
+ surface: '#303030',
936
+ surfaceApp: '#2B2B2B',
937
+ surfaceBrowser: '#181818'
938
+ },
939
+ brand: {
940
+ brand: '#404040'
941
+ },
942
+ buttons: {
943
+ primary: {
944
+ fill: '#186DFF'
945
+ },
946
+ primaryMouseover: {
947
+ fill: '#1047B0'
948
+ },
949
+ primaryActive: {
950
+ fill: '#186DFF'
951
+ },
952
+ flatMouseover: {
953
+ fill: '#242424'
954
+ },
955
+ focusDefault: {
956
+ outline: 'solid 2px #419cfe'
957
+ },
958
+ disabled: {
959
+ fill: '#303030'
960
+ },
961
+ surfaceIconDefault: {
962
+ fill: '#2B2B2B'
963
+ }
964
+ },
965
+ typographyAndIcons: {
966
+ text: '#FFFFFF',
967
+ icon: '#FFFFFF',
968
+ buttonIcon: '#FFFFFF',
969
+ iconLinkActive: '#488BFD',
970
+ iconLinkDisabled: '#5E5E5E',
971
+ textLinkActive: '#488BFD',
972
+ buttonIconTertiaryFlat: '#C5C5C5'
973
+ },
974
+ textInputField: {
975
+ "default": {
976
+ fill: '#000000',
977
+ opacity: 0.15
978
+ },
979
+ active: {
980
+ fill: '#909090',
981
+ opacity: 0.2
982
+ },
983
+ disabled: {
984
+ color: '#000000',
985
+ opacity: 0
986
+ }
987
+ },
988
+ tab: {
989
+ mouseOver: {
990
+ fill: '#000000',
991
+ opacity: 0.17
992
+ }
993
+ },
994
+ greys: {
995
+ accessible: '#A2A2A2'
996
+ },
997
+ cards: {
998
+ cardContainer: '#303030',
999
+ cardContainerBorder: '#404040'
1000
+ },
1001
+ backdrops: {
1002
+ black: {
1003
+ fill: '#000000',
1004
+ opacity: 0.5
1005
+ },
1006
+ white: {
1007
+ fill: '#FFFFFF',
1008
+ opacity: 0.24
1009
+ }
1010
+ },
1011
+ timeSlider: {
1012
+ // player
1013
+ playerNeedleTimeTop: {
1014
+ fill: '#E3004F',
1015
+ opacity: 100
1016
+ },
1017
+ playerNeedleTime: {
1018
+ fill: '#FFD523',
1019
+ opacity: 0.75
1020
+ },
1021
+ playerNeedlePlayerTop: {
1022
+ fill: '#051039',
1023
+ opacity: 100
1024
+ },
1025
+ playerNeedlePlayer: {
1026
+ fill: '#67F0FF',
1027
+ opacity: 0.75
1028
+ },
1029
+ playerRailObservation: {
1030
+ fill: '#0876B6',
1031
+ opacity: 100
1032
+ },
1033
+ playerRailSelection: {
1034
+ fill: '#C6D111',
1035
+ opacity: 0.5
1036
+ },
1037
+ playerRailForecastData: {
1038
+ fill: '#FD64FF',
1039
+ opacity: 0.6
1040
+ },
1041
+ playerRailForecastNoData: {
1042
+ fill: '#051039',
1043
+ opacity: 0.67
1044
+ },
1045
+ playerTimeMarkers: {
1046
+ fill: '#2C2C2C'
1047
+ },
1048
+ playerTimeText: {
1049
+ color: '#FFFFFF',
1050
+ fontFamily: 'Roboto',
1051
+ fontSize: 14
1052
+ },
1053
+ // timeline
1054
+ timelineIndicator: {
1055
+ fill: '#A2A2A2'
1056
+ },
1057
+ timelineText: {
1058
+ fontSize: 14,
1059
+ color: '#FFFFFF',
1060
+ fontFamily: 'Roboto'
1061
+ },
1062
+ timelineTimeScale: {
1063
+ fill: '#979797'
1064
+ },
1065
+ timelineNightTime: {
1066
+ fill: '#070808',
1067
+ opacity: 0.3
1068
+ },
1069
+ timelineTimelineSurface: {
1070
+ fill: '#303030'
1071
+ },
1072
+ timelineMonthChangeDash: {
1073
+ fill: '#A2A2A2',
1074
+ opacity: 0.5
1075
+ },
1076
+ // time scale
1077
+ timeScaleText: {
1078
+ fontSize: 12
1079
+ },
1080
+ timeScalePointer: {
1081
+ fill: '#F8F9F9'
1082
+ },
1083
+ timeScaleHorizontalScale: {
1084
+ fill: '#000000',
1085
+ opacity: 0.8
1086
+ },
1087
+ timeScaleTimeIndicators: {
1088
+ fill: '#A2A2A2'
1089
+ },
1090
+ timeScaleTimeIndicatorsActive: {
1091
+ fill: '#FFFFFF'
1092
+ },
1093
+ timeScaleShadowButtonScale: {
1094
+ filter: 'drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.28)) drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.24)) drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.40))'
1095
+ }
1096
+ },
1097
+ customSlider: {
1098
+ rail: '#488BFD',
1099
+ railDisabled: '#5E5E5E',
1100
+ track: '#186DFF',
1101
+ trackDisabled: '#5E5E5E',
1102
+ thumb: '#F8F9F9',
1103
+ thumbDisabled: '#5E5E5E',
1104
+ mark: '#FFFFFF',
1105
+ markDisabled: '#303030',
1106
+ switchTrack: '#72BB23',
1107
+ switchTrackDisabled: '#E8E5E5'
1108
+ },
1109
+ syncGroups: {
1110
+ drawerOpen: {
1111
+ fill: '#232323'
1112
+ }
1113
+ },
1114
+ layerManager: {
1115
+ tableRowDefaultIcon: {
1116
+ fill: '#C5C5C5',
1117
+ opacity: 1
1118
+ },
1119
+ tableRowDefaultText: {
1120
+ color: '#FFFFFF',
1121
+ opacity: 0.87,
1122
+ fontSize: 12
1123
+ },
1124
+ tableRowDefaultCardContainer: {
1125
+ fill: '#303030',
1126
+ border: '1px solid #404040'
1127
+ },
1128
+ tableRowMouseover: {
1129
+ fill: '#000000',
1130
+ opacity: 0.15
1131
+ },
1132
+ tableRowDisabledIcon: {
1133
+ fill: '#A2A2A2'
1134
+ },
1135
+ tableRowDisabledText: {
1136
+ color: '#909090',
1137
+ opacity: 0.87,
1138
+ fontSize: 12
1139
+ },
1140
+ tableRowDisabledCardContainer: {
1141
+ fill: '#2B2B2B',
1142
+ border: '1px solid #404040'
1143
+ }
1144
+ },
1145
+ tooltips: {
1146
+ tooltipContainer: {
1147
+ fill: '#232323',
1148
+ opacity: 1
1149
+ },
1150
+ tooltipText: {
1151
+ color: '#FFFFFF'
1152
+ }
1153
+ },
1154
+ captions: {
1155
+ captionStatus: {
1156
+ color: '#FFFFFF',
1157
+ opacity: 0.7
1158
+ },
1159
+ captionInformation: {
1160
+ color: '#9EC2FF',
1161
+ opacity: 1
1162
+ },
1163
+ captionError: {
1164
+ color: '#FF8F8F',
1165
+ opacity: 1
1166
+ },
1167
+ captionDisabled: {
1168
+ color: '#909090',
1169
+ opacity: 1
1170
+ }
1171
+ }
1172
+ }; // https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/6093e694124ecf3886de76d4
1173
+
1174
+ var elevations = {
1175
+ elevation_01: '0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)',
1176
+ elevation_02: '0 1px 5px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.14)',
1177
+ elevation_03: '0 1px 8px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 3px 3px 0 rgba(0, 0, 0, 0.14)',
1178
+ elevation_04: '0 1px 10px 0 rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.14)',
1179
+ elevation_06: '0 3px 5px 0 rgba(0, 0, 0, 0.2), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 6px 10px 0 rgba(0, 0, 0, 0.14)',
1180
+ elevation_08: '0 4px 5px 0 rgba(0, 0, 0, 0.2), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 8px 10px 1px rgba(0, 0, 0, 0.14)',
1181
+ elevation_09: '0 5px 6px 0 rgba(0, 0, 0, 0.2), 0 3px 16px 2px rgba(0, 0, 0, 0.12), 0 9px 12px 1px rgba(0, 0, 0, 0.14)',
1182
+ elevation_12: '0 7px 8px 0 rgba(0, 0, 0, 0.2), 0 5px 22px 4px rgba(0, 0, 0, 0.12), 0 12px 17px 2px rgba(0, 0, 0, 0.14)',
1183
+ elevation_16: '0 8px 10px 0 rgba(0, 0, 0, 0.2), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 16px 24px 2px rgba(0, 0, 0, 0.14)',
1184
+ elevation_24: '0 11px 15px 0 rgba(0, 0, 0, 0.2), 0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 24px 38px 3px rgba(0, 0, 0, 0.14)'
1185
+ };
1186
+ var darkTheme = createTheme('dark', parseColors(colors), createShadows(elevations));
1187
+
1188
+ var ThemeContext = /*#__PURE__*/React.createContext({
1189
+ toggleTheme: null,
1190
+ isDark: null
1191
+ });
1192
+ var ThemeProvider = function ThemeProvider(_ref) {
1193
+ var children = _ref.children,
1194
+ _ref$theme = _ref.theme,
1195
+ defaultTheme = _ref$theme === void 0 ? lightTheme : _ref$theme,
1196
+ _ref$disableCssBaseli = _ref.disableCssBaseline,
1197
+ disableCssBaseline = _ref$disableCssBaseli === void 0 ? false : _ref$disableCssBaseli;
1198
+
1199
+ var _React$useState = React.useState(false),
1200
+ _React$useState2 = _slicedToArray(_React$useState, 2),
1201
+ isDark = _React$useState2[0],
1202
+ setDark = _React$useState2[1];
1203
+
1204
+ var currentTheme = React.useMemo(function () {
1205
+ return isDark ? darkTheme : defaultTheme;
1206
+ }, [isDark, defaultTheme]);
1207
+
1208
+ var toggleTheme = function toggleTheme() {
1209
+ return setDark(!isDark);
1210
+ };
1211
+
1212
+ return /*#__PURE__*/React.createElement(ThemeContext.Provider, {
1213
+ value: {
1214
+ toggleTheme: toggleTheme,
1215
+ isDark: isDark
1216
+ }
1217
+ }, /*#__PURE__*/React.createElement(ThemeProvider$1, {
1218
+ theme: currentTheme
1219
+ }, !disableCssBaseline && /*#__PURE__*/React.createElement(CssBaseline, null), children));
1220
+ };
1221
+ var useThemeContext = function useThemeContext() {
1222
+ return React.useContext(ThemeContext);
1223
+ }; // Wrapper for storybook stories. Will include later an additional wrapper after upgrade to MUI5
1224
+
1225
+ var ThemeWrapper = function ThemeWrapper(_ref2) {
1226
+ var children = _ref2.children,
1227
+ _ref2$theme = _ref2.theme,
1228
+ theme = _ref2$theme === void 0 ? lightTheme : _ref2$theme,
1229
+ _ref2$disableCssBasel = _ref2.disableCssBaseline,
1230
+ disableCssBaseline = _ref2$disableCssBasel === void 0 ? false : _ref2$disableCssBasel;
1231
+ return /*#__PURE__*/React.createElement(ThemeProvider, {
1232
+ theme: theme,
1233
+ disableCssBaseline: disableCssBaseline
1234
+ }, children);
1235
+ }; // Wrapper for storybook stories with GWTheme. Will be deprecated
1236
+
1237
+ var ThemeWrapperOldTheme = function ThemeWrapperOldTheme(_a) {
1238
+ var children = _a.children,
1239
+ props = __rest(_a, ["children"]);
1240
+
1241
+ return /*#__PURE__*/React.createElement(ThemeWrapper, Object.assign({
1242
+ theme: GWTheme,
1243
+ disableCssBaseline: true
1244
+ }, props), children);
1245
+ };
1246
+
1247
+ export { GWTheme, ThemeContext, ThemeProvider, ThemeWrapper, ThemeWrapperOldTheme, darkTheme, lightTheme, useThemeContext };