@opengeoweb/theme 2.1.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { createMuiTheme, ThemeProvider as ThemeProvider$1, CssBaseline } from '@material-ui/core';
1
+ import { createTheme as createTheme$1, ThemeProvider as ThemeProvider$1, CssBaseline, StyledEngineProvider } from '@mui/material';
2
2
  import * as React from 'react';
3
3
 
4
4
  function _defineProperty(obj, key, value) {
@@ -72,6 +72,89 @@ function _nonIterableRest() {
72
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
73
  }
74
74
 
75
+ var buttonStyle = function buttonStyle(button) {
76
+ return {
77
+ // default styling
78
+ color: button["default"].color,
79
+ backgroundColor: button["default"].fill,
80
+ textTransform: 'capitalize',
81
+ padding: '12px 8px',
82
+ height: '40px',
83
+ borderStyle: 'solid',
84
+ borderWidth: '1px',
85
+ borderColor: button["default"].borderColor,
86
+ borderRadius: '5px',
87
+ // hover styling
88
+ '&:hover': {
89
+ backgroundColor: button.mouseOver.fill,
90
+ borderColor: button.mouseOver.borderColor
91
+ },
92
+ // active styling
93
+ '&.Mui-selected': {
94
+ backgroundColor: button.active.fill,
95
+ color: button.active.color,
96
+ borderColor: button.active.borderColor,
97
+ '&:hover': {
98
+ backgroundColor: button.activeMouseOver.fill
99
+ }
100
+ },
101
+ // disabled styling
102
+ '&.Mui-disabled': {
103
+ backgroundColor: button.disabled.fill,
104
+ color: button.disabled.color,
105
+ borderColor: button.disabled.borderColor
106
+ },
107
+ // size styling
108
+ '&[class*="sizeSmall"]': {
109
+ fontSize: '12px',
110
+ height: '32px',
111
+ lineHeight: '12px'
112
+ },
113
+ // icon styling
114
+ '& .MuiButton-startIcon': {
115
+ marginRight: '2px',
116
+ '& .MuiSvgIcon-root': {
117
+ fontSize: '26px'
118
+ }
119
+ }
120
+ };
121
+ };
122
+ var toggleButtonStyle = function toggleButtonStyle(buttonVariants) {
123
+ return buttonVariants.reduce(function (variants, _ref) {
124
+ var variant = _ref.props.variant,
125
+ style = _ref.style;
126
+ return Object.assign(Object.assign({}, variants), _defineProperty({}, "&.".concat(variant), style));
127
+ }, {});
128
+ };
129
+ var buttonVariants = function buttonVariants(buttons) {
130
+ return [{
131
+ props: {
132
+ variant: 'primary'
133
+ },
134
+ style: buttonStyle(buttons.primary)
135
+ }, {
136
+ props: {
137
+ variant: 'secondary'
138
+ },
139
+ style: buttonStyle(buttons.secondary)
140
+ }, {
141
+ props: {
142
+ variant: 'tertiary'
143
+ },
144
+ style: buttonStyle(buttons.tertiary)
145
+ }, {
146
+ props: {
147
+ variant: 'flat'
148
+ },
149
+ style: buttonStyle(buttons.flat)
150
+ }, {
151
+ props: {
152
+ variant: 'tool'
153
+ },
154
+ style: buttonStyle(buttons.tool)
155
+ }];
156
+ };
157
+
75
158
  var hex2rgba = function hex2rgba(hex) {
76
159
  var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
77
160
 
@@ -122,9 +205,9 @@ var createShadows = function createShadows(elevations) {
122
205
  };
123
206
  var BORDER_RADIUS = 3;
124
207
  var createTheme = function createTheme(paletteType, geowebColors, shadows) {
125
- return createMuiTheme({
208
+ return createTheme$1({
126
209
  palette: {
127
- type: paletteType,
210
+ mode: paletteType,
128
211
  secondary: {
129
212
  main: geowebColors.typographyAndIcons.iconLinkActive
130
213
  },
@@ -145,243 +228,311 @@ var createTheme = function createTheme(paletteType, geowebColors, shadows) {
145
228
  fontFamily: ['Roboto', 'Helvetica', 'Arial', 'sans-serif'].join(',')
146
229
  },
147
230
  shadows: shadows,
148
- overrides: {
149
- MuiCssBaseline: {
150
- '@global': {
151
- body: {
152
- fontSmoothing: 'auto'
153
- }
231
+ components: {
232
+ MuiButton: {
233
+ variants: buttonVariants(geowebColors.buttons)
234
+ },
235
+ MuiToggleButton: {
236
+ styleOverrides: {
237
+ root: toggleButtonStyle(buttonVariants(geowebColors.buttons))
154
238
  }
155
239
  },
240
+ MuiCssBaseline: {
241
+ styleOverrides: "\n html {\n -webkit-font-smoothing: auto;\n }\n "
242
+ },
156
243
  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)
244
+ styleOverrides: {
245
+ root: {
246
+ fontSize: '0.875rem',
247
+ letterSpacing: '0.25px',
248
+ ':not(:last-child)&:after': {
249
+ content: '""',
250
+ position: 'absolute',
251
+ width: '100%',
252
+ height: 1,
253
+ background: geowebColors.greys.accessible,
254
+ bottom: 0,
255
+ left: 0,
256
+ opacity: 0.5
257
+ },
258
+ '&.Mui-selected': {
259
+ background: 'none',
260
+ boxShadow: "inset 4px 0px 0px 0px ".concat(geowebColors.typographyAndIcons.iconLinkActive)
261
+ }
173
262
  }
174
263
  }
175
264
  },
176
265
  MuiRadio: {
177
- root: {
178
- color: geowebColors.typographyAndIcons.iconLinkActive
266
+ styleOverrides: {
267
+ root: {
268
+ color: geowebColors.typographyAndIcons.iconLinkActive,
269
+ '&.Mui-disabled': {
270
+ color: "".concat(geowebColors.typographyAndIcons.iconLinkDisabled, "!important")
271
+ },
272
+ '&.Mui-checked': {
273
+ color: geowebColors.typographyAndIcons.iconLinkActive
274
+ }
275
+ }
276
+ }
277
+ },
278
+ MuiCheckbox: {
279
+ styleOverrides: {
280
+ root: {
281
+ color: geowebColors.typographyAndIcons.iconLinkActive,
282
+ '&.Mui-disabled': {
283
+ color: "".concat(geowebColors.typographyAndIcons.iconLinkDisabled, "!important")
284
+ },
285
+ '&.Mui-checked': {
286
+ color: geowebColors.typographyAndIcons.iconLinkActive
287
+ }
288
+ }
179
289
  }
180
290
  },
181
291
  MuiPaper: {
182
- outlined: {
183
- borderColor: geowebColors.cards.cardContainerBorder
292
+ styleOverrides: {
293
+ root: {
294
+ backgroundImage: 'unset'
295
+ },
296
+ outlined: {
297
+ borderColor: geowebColors.cards.cardContainerBorder
298
+ }
184
299
  }
185
300
  },
186
301
  MuiCard: {
187
- root: {
188
- backgroundColor: geowebColors.cards.cardContainer
302
+ styleOverrides: {
303
+ root: {
304
+ backgroundColor: geowebColors.cards.cardContainer
305
+ }
189
306
  }
190
307
  },
191
308
  MuiSlider: {
192
- root: {
193
- color: geowebColors.typographyAndIcons.iconLinkActive
309
+ styleOverrides: {
310
+ root: {
311
+ color: geowebColors.typographyAndIcons.iconLinkActive
312
+ }
194
313
  }
195
314
  },
196
315
  MuiTable: {
197
- root: {
198
- borderSpacing: '0 0.25rem',
199
- borderCollapse: 'separate'
316
+ styleOverrides: {
317
+ root: {
318
+ borderSpacing: '0 0.25rem',
319
+ borderCollapse: 'separate'
320
+ }
200
321
  }
201
322
  },
202
323
  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]
324
+ styleOverrides: {
325
+ head: {
326
+ '&:hover': {
327
+ boxShadow: shadows[0]
328
+ }
214
329
  },
215
- position: 'relative'
330
+ root: {
331
+ transition: 'box-shadow 100ms ease-out',
332
+ boxShadow: shadows[0],
333
+ borderRadius: BORDER_RADIUS,
334
+ '&:hover': {
335
+ boxShadow: shadows[1]
336
+ },
337
+ position: 'relative'
338
+ }
216
339
  }
217
340
  },
218
341
  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")
342
+ styleOverrides: {
343
+ head: {
344
+ borderBottom: 'none',
345
+ fontSize: '0.875rem',
346
+ fontWeight: 400
236
347
  },
237
- '&:last-child': {
238
- borderRightColor: geowebColors.cards.cardContainerBorder,
239
- borderRadius: "0px ".concat(BORDER_RADIUS, "px ").concat(BORDER_RADIUS, "px 0px")
348
+ body: {
349
+ padding: 12,
350
+ fontWeight: 500,
351
+ backgroundColor: geowebColors.background.surface,
352
+ borderStyle: 'solid',
353
+ borderColor: 'transparent',
354
+ borderWidth: 1,
355
+ borderTopColor: geowebColors.cards.cardContainerBorder,
356
+ borderBottomColor: geowebColors.cards.cardContainerBorder,
357
+ '&:first-child': {
358
+ borderLeftColor: geowebColors.cards.cardContainerBorder,
359
+ borderRadius: "".concat(BORDER_RADIUS, "px 0px 0px ").concat(BORDER_RADIUS, "px")
360
+ },
361
+ '&:last-child': {
362
+ borderRightColor: geowebColors.cards.cardContainerBorder,
363
+ borderRadius: "0px ".concat(BORDER_RADIUS, "px ").concat(BORDER_RADIUS, "px 0px")
364
+ }
240
365
  }
241
366
  }
242
367
  },
243
368
  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)
369
+ styleOverrides: {
370
+ root: {
371
+ position: 'relative',
372
+ '&:after': {
373
+ content: '""',
374
+ position: 'absolute',
375
+ bottom: 0,
376
+ height: 1,
377
+ width: '100%',
378
+ zIndex: 0,
379
+ backgroundColor: hex2rgba(geowebColors.greys.accessible, 0.2)
380
+ }
381
+ },
382
+ indicator: {
383
+ zIndex: 1,
384
+ backgroundColor: geowebColors.typographyAndIcons.iconLinkActive
254
385
  }
255
- },
256
- indicator: {
257
- zIndex: 1,
258
- backgroundColor: geowebColors.typographyAndIcons.iconLinkActive
259
386
  }
260
387
  },
261
388
  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
389
+ styleOverrides: {
390
+ root: {
391
+ textTransform: 'initial',
392
+ '&.Mui-selected': {
393
+ color: geowebColors.typographyAndIcons.iconLinkActive
394
+ },
395
+ '&:hover': {
396
+ opacity: 1,
397
+ color: geowebColors.typographyAndIcons.iconLinkActive,
398
+ backgroundColor: geowebColors.tab.mouseOver.rgba
399
+ }
271
400
  }
272
401
  }
273
402
  },
274
403
  MuiListItem: {
275
- root: {
276
- color: geowebColors.typographyAndIcons.text
277
- },
278
- divider: {
279
- borderBottomColor: hex2rgba(geowebColors.greys.accessible, 0.2)
404
+ styleOverrides: {
405
+ root: {
406
+ color: geowebColors.typographyAndIcons.text,
407
+ fontSize: '14px'
408
+ },
409
+ divider: {
410
+ borderBottomColor: hex2rgba(geowebColors.greys.accessible, 0.2)
411
+ }
280
412
  }
281
413
  },
282
414
  MuiBackdrop: {
283
- root: {
284
- backgroundColor: geowebColors.backdrops.black.rgba
415
+ styleOverrides: {
416
+ root: {
417
+ backgroundColor: geowebColors.backdrops.black.rgba
418
+ }
285
419
  }
286
420
  },
287
421
  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
422
+ styleOverrides: {
423
+ tooltip: {
424
+ backgroundColor: geowebColors.tooltips.tooltipContainer.rgba,
425
+ color: geowebColors.tooltips.tooltipText.color,
426
+ padding: '8px 12px',
427
+ fontSize: 16,
428
+ fontWeight: 400,
429
+ fontStretch: 'normal',
430
+ fontStyle: 'normal',
431
+ letterSpacing: 0.44,
432
+ lineHeight: 1.56
433
+ }
298
434
  }
299
435
  },
300
436
  MuiLink: {
301
- root: {
302
- color: geowebColors.typographyAndIcons.textLinkActive
437
+ styleOverrides: {
438
+ root: {
439
+ color: geowebColors.typographyAndIcons.textLinkActive,
440
+ textDecoration: 'none',
441
+ '&:hover': {
442
+ textDecoration: 'underline',
443
+ textDecorationColor: geowebColors.typographyAndIcons.textLinkActive
444
+ }
445
+ }
303
446
  }
304
447
  },
305
448
  // TODO: implement correct theming values https://gitlab.com/opengeoweb/opengeoweb/-/issues/1369
306
449
  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'
450
+ styleOverrides: {
451
+ standardError: {
452
+ border: '1px solid #c00000',
453
+ borderRadius: '0px',
454
+ backgroundColor: '#fff0ea'
455
+ },
456
+ standardWarning: {
457
+ border: '1px solid #ffa800',
458
+ borderRadius: '0px',
459
+ backgroundColor: '#fff8eb'
460
+ },
461
+ standardInfo: {
462
+ border: '1px solid #0062e6',
463
+ borderRadius: '0px',
464
+ backgroundColor: '#eaf3ff'
465
+ },
466
+ standardSuccess: {
467
+ border: '1px solid #72bb23',
468
+ borderRadius: '0px',
469
+ backgroundColor: '#fcffeb'
470
+ },
471
+ action: {
472
+ color: '#0075a9'
473
+ },
474
+ message: {
475
+ fontSize: '14px',
476
+ lineHeight: 1.43,
477
+ letterSpacing: '0.25px',
478
+ color: '#051039'
479
+ }
335
480
  }
336
481
  },
337
482
  MuiFilledInput: {
338
- root: {
339
- backgroundColor: geowebColors.textInputField["default"].rgba,
340
- '&.Mui-focused': {
341
- backgroundColor: geowebColors.textInputField.active.rgba
483
+ styleOverrides: {
484
+ root: {
485
+ backgroundColor: geowebColors.textInputField["default"].rgba,
486
+ '&.Mui-focused': {
487
+ backgroundColor: geowebColors.textInputField.active.rgba
488
+ },
489
+ '&.Mui-disabled': {
490
+ backgroundColor: geowebColors.textInputField.disabled.rgba
491
+ }
342
492
  },
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'
493
+ underline: {
494
+ '&:after': {
495
+ borderBottom: 'transparent'
496
+ },
497
+ '&.Mui-disabled:before': {
498
+ borderBottomStyle: 'solid'
499
+ }
353
500
  }
354
501
  }
355
502
  },
356
503
  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
504
+ styleOverrides: {
505
+ root: {
506
+ color: geowebColors.captions.captionStatus.color,
507
+ opacity: geowebColors.captions.captionStatus.opacity,
508
+ '&.Mui-focused': {
509
+ color: geowebColors.captions.captionInformation.color,
510
+ opacity: geowebColors.captions.captionInformation.opacity
511
+ },
512
+ '&.Mui-error': {
513
+ color: geowebColors.captions.captionError.color,
514
+ opacity: geowebColors.captions.captionError.opacity
515
+ },
516
+ '&.Mui-disabled': {
517
+ color: geowebColors.captions.captionDisabled.color,
518
+ opacity: geowebColors.captions.captionDisabled.opacity
519
+ }
371
520
  }
372
521
  }
373
522
  },
374
523
  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
524
+ styleOverrides: {
525
+ root: {
526
+ color: geowebColors.captions.captionStatus.color,
527
+ opacity: geowebColors.captions.captionStatus.opacity,
528
+ '&.Mui-error': {
529
+ color: geowebColors.captions.captionError.color,
530
+ opacity: geowebColors.captions.captionError.opacity
531
+ },
532
+ '&.Mui-disabled': {
533
+ color: geowebColors.captions.captionDisabled.color,
534
+ opacity: geowebColors.captions.captionDisabled.opacity
535
+ }
385
536
  }
386
537
  }
387
538
  }
@@ -417,7 +568,131 @@ var colors$1 = {
417
568
  },
418
569
  buttons: {
419
570
  primary: {
420
- fill: '#186DFF'
571
+ "default": {
572
+ fill: '#186DFF',
573
+ color: '#FFFFFF',
574
+ borderColor: 'transparent'
575
+ },
576
+ mouseOver: {
577
+ fill: '#1047B0',
578
+ color: '#FFFFFF',
579
+ borderColor: '#71A6FF'
580
+ },
581
+ active: {
582
+ fill: '#186DFF',
583
+ color: '#FFFFFF',
584
+ borderColor: 'transparent'
585
+ },
586
+ activeMouseOver: {},
587
+ disabled: {
588
+ fill: 'transparent',
589
+ color: '#707070',
590
+ borderColor: 'transparent'
591
+ }
592
+ },
593
+ secondary: {
594
+ "default": {
595
+ fill: '#0876b6',
596
+ color: '#FFFFFF',
597
+ borderColor: 'transparent'
598
+ },
599
+ mouseOver: {
600
+ fill: '#064c84',
601
+ color: '#FFFFFF',
602
+ borderColor: '#3DA6FF'
603
+ },
604
+ active: {
605
+ fill: '#0876b6',
606
+ color: '#FFFFFF',
607
+ borderColor: 'transparent'
608
+ },
609
+ activeMouseOver: {},
610
+ disabled: {
611
+ fill: 'transparent',
612
+ color: '#707070',
613
+ borderColor: 'transparent'
614
+ }
615
+ },
616
+ tertiary: {
617
+ "default": {
618
+ fill: 'transparent',
619
+ color: '#575F7A',
620
+ borderColor: '#575F7A'
621
+ },
622
+ mouseOver: {
623
+ fill: '#E3E4E7',
624
+ color: '#575F7A',
625
+ borderColor: '#575F7A'
626
+ },
627
+ active: {
628
+ fill: 'transparent',
629
+ color: '#186DFF',
630
+ borderColor: '#186DFF'
631
+ },
632
+ activeMouseOver: {
633
+ fill: 'rgba(24, 109, 255, 0.1)',
634
+ color: '#186DFF',
635
+ borderColor: '#186DFF'
636
+ },
637
+ disabled: {
638
+ fill: 'transparent',
639
+ color: '#707070',
640
+ borderColor: 'transparent'
641
+ }
642
+ },
643
+ flat: {
644
+ "default": {
645
+ fill: 'transparent',
646
+ color: '#575F7A',
647
+ borderColor: 'transparent'
648
+ },
649
+ mouseOver: {
650
+ fill: '#E3E4E7',
651
+ color: '#575F7A',
652
+ borderColor: 'transparent'
653
+ },
654
+ active: {
655
+ fill: 'transparent',
656
+ color: '#186DFF',
657
+ borderColor: 'transparent'
658
+ },
659
+ activeMouseOver: {
660
+ fill: 'rgba(24, 109, 255, 0.1)',
661
+ color: '#186DFF',
662
+ borderColor: 'transparent'
663
+ },
664
+ disabled: {
665
+ fill: 'transparent',
666
+ color: '#707070',
667
+ borderColor: 'transparent'
668
+ }
669
+ },
670
+ tool: {
671
+ "default": {
672
+ fill: '#ECEDEE',
673
+ color: '#575F7A',
674
+ borderColor: 'transparent'
675
+ },
676
+ mouseOver: {
677
+ fill: '#E3E4E7',
678
+ color: '#575F7A',
679
+ borderColor: 'transparent'
680
+ },
681
+ active: {
682
+ fill: '#186DFF',
683
+ color: '#FFFFFF',
684
+ borderColor: 'transparent'
685
+ },
686
+ activeMouseOver: {
687
+ fill: '#1047B0',
688
+ color: '#FFFFFF',
689
+ borderColor: 'transparent'
690
+ },
691
+ disabled: {
692
+ fill: 'transparent',
693
+ color: '#707070',
694
+ borderColor: 'transparent'
695
+ }
421
696
  },
422
697
  primaryMouseover: {
423
698
  fill: '#1047B0'
@@ -641,7 +916,7 @@ var colors$1 = {
641
916
  opacity: 1
642
917
  },
643
918
  captionDisabled: {
644
- color: '#767676',
919
+ color: '#707070',
645
920
  opacity: 1
646
921
  }
647
922
  }
@@ -679,7 +954,7 @@ var lightTheme = createTheme('light', parseColors(colors$1), createShadows(eleva
679
954
  * */
680
955
 
681
956
  var geowebColors = Object.assign({}, colors$1);
682
- var GWTheme = createMuiTheme({
957
+ var GWTheme = createTheme$1({
683
958
  palette: {
684
959
  secondary: {
685
960
  main: '#0075a9'
@@ -748,138 +1023,208 @@ var GWTheme = createMuiTheme({
748
1023
  color: '0075a9'
749
1024
  }
750
1025
  },
751
- overrides: {
1026
+ components: {
752
1027
  MuiTooltip: {
753
- tooltip: {
754
- borderRadius: '2px',
755
- fontSize: '16px',
756
- fontWeight: 'normal',
757
- padding: '10px',
758
- backgroundColor: '#232323'
1028
+ styleOverrides: {
1029
+ tooltip: {
1030
+ borderRadius: '2px',
1031
+ fontSize: '16px',
1032
+ fontWeight: 'normal',
1033
+ padding: '10px',
1034
+ backgroundColor: '#232323'
1035
+ }
759
1036
  }
760
1037
  },
761
1038
  MuiIconButton: {
762
- root: {
763
- color: '#0075a9'
1039
+ styleOverrides: {
1040
+ root: {
1041
+ color: '#0075a9'
1042
+ }
764
1043
  }
765
1044
  },
766
1045
  MuiCheckbox: {
767
- root: {
768
- color: '#0075a9'
1046
+ styleOverrides: {
1047
+ root: {
1048
+ '&.Mui-disabled': {
1049
+ color: '#CCCCCC!important'
1050
+ },
1051
+ '&.Mui-checked': {
1052
+ color: '#0075a9'
1053
+ }
1054
+ }
769
1055
  }
770
1056
  },
771
1057
  MuiSelect: {
772
- icon: {
773
- color: '#0075a9'
774
- },
775
- select: {
776
- '&:focus': {
777
- backgroundColor: 'rgba(0, 117, 169, 0.05)'
1058
+ styleOverrides: {
1059
+ icon: {
1060
+ color: '#0075a9'
1061
+ },
1062
+ select: {
1063
+ '&:focus': {
1064
+ backgroundColor: 'rgba(0, 117, 169, 0.05)'
1065
+ }
778
1066
  }
779
1067
  }
780
1068
  },
781
1069
  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'
1070
+ styleOverrides: {
1071
+ standardError: {
1072
+ border: '1px solid #c00000',
1073
+ borderRadius: '0px',
1074
+ backgroundColor: '#fff0ea'
1075
+ },
1076
+ standardWarning: {
1077
+ border: '1px solid #ffa800',
1078
+ borderRadius: '0px',
1079
+ backgroundColor: '#fff8eb'
1080
+ },
1081
+ standardInfo: {
1082
+ border: '1px solid #0062e6',
1083
+ borderRadius: '0px',
1084
+ backgroundColor: '#eaf3ff'
1085
+ },
1086
+ standardSuccess: {
1087
+ border: '1px solid #72bb23',
1088
+ borderRadius: '0px',
1089
+ backgroundColor: '#fcffeb'
1090
+ },
1091
+ action: {
1092
+ color: '#0075a9'
1093
+ },
1094
+ message: {
1095
+ fontSize: '14px',
1096
+ lineHeight: 1.43,
1097
+ letterSpacing: '0.25px',
1098
+ color: '#051039'
1099
+ }
810
1100
  }
811
1101
  },
812
1102
  MuiTabs: {
813
- root: {
814
- backgroundColor: '#ffffff',
815
- minHeight: '30px'
816
- },
817
- scrollButtons: {
818
- width: '20px'
1103
+ styleOverrides: {
1104
+ root: {
1105
+ backgroundColor: '#ffffff',
1106
+ minHeight: '30px'
1107
+ },
1108
+ scrollButtons: {
1109
+ width: '20px'
1110
+ }
819
1111
  }
820
1112
  },
821
1113
  MuiTab: {
822
- root: {
823
- minHeight: '30px',
824
- textTransform: 'none',
825
- minWidth: '76px',
826
- '@media (min-width: 600px)': {
827
- minWidth: '76px'
1114
+ styleOverrides: {
1115
+ root: {
1116
+ minHeight: '30px',
1117
+ textTransform: 'none',
1118
+ minWidth: '76px',
1119
+ '@media (min-width: 600px)': {
1120
+ minWidth: '76px'
1121
+ }
1122
+ },
1123
+ labelIcon: {
1124
+ minHeight: '30px'
828
1125
  }
829
- },
830
- labelIcon: {
831
- minHeight: '30px'
832
1126
  }
833
1127
  },
834
1128
  MuiListItem: {
835
- root: {
836
- '&$selected': {
837
- backgroundColor: 'rgba(0, 117, 169, 0.15)',
838
- borderLeft: '4px solid #0075a9',
1129
+ styleOverrides: {
1130
+ root: {
1131
+ '&$selected': {
1132
+ backgroundColor: 'rgba(0, 117, 169, 0.15)',
1133
+ borderLeft: '4px solid #0075a9',
1134
+ '&:hover': {
1135
+ backgroundColor: 'rgba(0, 117, 169, 0.10)'
1136
+ }
1137
+ }
1138
+ },
1139
+ button: {
839
1140
  '&:hover': {
840
- backgroundColor: 'rgba(0, 117, 169, 0.10)'
1141
+ backgroundColor: 'rgba(0, 117, 169, 0.15)'
841
1142
  }
842
1143
  }
843
- },
844
- button: {
845
- '&:hover': {
846
- backgroundColor: 'rgba(0, 117, 169, 0.15)'
1144
+ }
1145
+ },
1146
+ MuiMenuItem: {
1147
+ styleOverrides: {
1148
+ root: {
1149
+ '&.Mui-selected': {
1150
+ backgroundColor: 'rgba(0, 117, 169, 0.15)',
1151
+ borderLeft: '4px solid #0075a9',
1152
+ '&:hover': {
1153
+ backgroundColor: 'rgba(0, 117, 169, 0.10)'
1154
+ }
1155
+ },
1156
+ '&:hover': {
1157
+ backgroundColor: 'rgba(0, 117, 169, 0.15)'
1158
+ }
847
1159
  }
848
1160
  }
849
1161
  },
850
1162
  MuiFormLabel: {
851
- root: {
852
- color: 'rgba(5, 16, 57, 0.7)',
853
- '&$focused': {
854
- color: '#0075a9'
1163
+ styleOverrides: {
1164
+ root: {
1165
+ color: 'rgba(5, 16, 57, 0.7)',
1166
+ '&.Mui-focused': {
1167
+ color: '#0075a9'
1168
+ },
1169
+ '&.Mui-error': {
1170
+ color: '#d32f2f!important'
1171
+ }
855
1172
  }
856
1173
  }
857
1174
  },
858
1175
  MuiOutlinedInput: {
859
- root: {
860
- '&$focused $notchedOutline': {
861
- borderColor: '#0075a9'
1176
+ styleOverrides: {
1177
+ root: {
1178
+ '&$focused $notchedOutline': {
1179
+ borderColor: '#0075a9'
1180
+ }
862
1181
  }
863
1182
  }
864
1183
  },
865
1184
  MuiFilledInput: {
866
- root: {
867
- backgroundColor: 'rgba(0, 117, 169, 0.05)',
868
- color: '#051039',
869
- '&$disabled': {
870
- backgroundColor: 'transparent'
1185
+ styleOverrides: {
1186
+ root: {
1187
+ backgroundColor: 'rgba(0, 117, 169, 0.05)',
1188
+ color: '#051039',
1189
+ '&.Mui-disabled': {
1190
+ backgroundColor: 'white'
1191
+ },
1192
+ '&.Mui-focused': {
1193
+ backgroundColor: 'rgba(0,0,0,0.09)'
1194
+ }
1195
+ },
1196
+ underline: {
1197
+ '&.Mui-disabled:before': {
1198
+ borderBottomStyle: 'none'
1199
+ }
871
1200
  }
872
- },
873
- underline: {
874
- '&$disabled:before': {
875
- borderBottomStyle: 'none'
1201
+ }
1202
+ },
1203
+ MuiRadio: {
1204
+ styleOverrides: {
1205
+ root: {
1206
+ '&.Mui-disabled': {
1207
+ color: '#CCCCCC!important'
1208
+ },
1209
+ '&.Mui-checked': {
1210
+ color: '#0075a9'
1211
+ }
876
1212
  }
877
1213
  }
878
1214
  },
879
1215
  MuiCardContent: {
880
- root: {
881
- '&:last-child': {
882
- paddingBottom: 0
1216
+ styleOverrides: {
1217
+ root: {
1218
+ '&:last-child': {
1219
+ paddingBottom: 0
1220
+ }
1221
+ }
1222
+ }
1223
+ },
1224
+ MuiDialog: {
1225
+ styleOverrides: {
1226
+ paperWidthLg: {
1227
+ maxWidth: '1280px'
883
1228
  }
884
1229
  }
885
1230
  }
@@ -941,7 +1286,131 @@ var colors = {
941
1286
  },
942
1287
  buttons: {
943
1288
  primary: {
944
- fill: '#186DFF'
1289
+ "default": {
1290
+ fill: '#186DFF',
1291
+ color: '#FFFFFF',
1292
+ borderColor: 'transparent'
1293
+ },
1294
+ mouseOver: {
1295
+ fill: '#1047B0',
1296
+ color: '#FFFFFF',
1297
+ borderColor: '#71A6FF'
1298
+ },
1299
+ active: {
1300
+ fill: '#186DFF',
1301
+ color: '#FFFFFF',
1302
+ borderColor: 'transparent'
1303
+ },
1304
+ activeMouseOver: {},
1305
+ disabled: {
1306
+ fill: 'transparent',
1307
+ color: '#B0B0B0',
1308
+ borderColor: 'transparent'
1309
+ }
1310
+ },
1311
+ secondary: {
1312
+ "default": {
1313
+ fill: '#0876b6',
1314
+ color: '#FFFFFF',
1315
+ borderColor: 'transparent'
1316
+ },
1317
+ mouseOver: {
1318
+ fill: '#064C84',
1319
+ color: '#FFFFFF',
1320
+ borderColor: '#3DA6FF'
1321
+ },
1322
+ active: {
1323
+ fill: '#0876B6',
1324
+ color: '#FFFFFF',
1325
+ borderColor: 'transparent'
1326
+ },
1327
+ activeMouseOver: {},
1328
+ disabled: {
1329
+ fill: 'transparent',
1330
+ color: '#707070',
1331
+ borderColor: 'transparent'
1332
+ }
1333
+ },
1334
+ tertiary: {
1335
+ "default": {
1336
+ fill: 'transparent',
1337
+ color: '#E5E5E5',
1338
+ borderColor: '#E5E5E5'
1339
+ },
1340
+ mouseOver: {
1341
+ fill: '#494949',
1342
+ color: '#E5E5E5',
1343
+ borderColor: '#E5E5E5'
1344
+ },
1345
+ active: {
1346
+ fill: 'transparent',
1347
+ color: '#488BFD',
1348
+ borderColor: '#48A8FA'
1349
+ },
1350
+ activeMouseOver: {
1351
+ fill: 'rgba(24, 109, 255, 0.1)',
1352
+ color: '#488BFD',
1353
+ borderColor: '#488BFD'
1354
+ },
1355
+ disabled: {
1356
+ fill: 'transparent',
1357
+ color: '#B0B0B0',
1358
+ borderColor: 'transparent'
1359
+ }
1360
+ },
1361
+ flat: {
1362
+ "default": {
1363
+ fill: 'transparent',
1364
+ color: '#E5E5E5',
1365
+ borderColor: 'transparent'
1366
+ },
1367
+ mouseOver: {
1368
+ fill: '#494949',
1369
+ color: '#E5E5E5',
1370
+ borderColor: 'transparent'
1371
+ },
1372
+ active: {
1373
+ fill: 'transparent',
1374
+ color: '#488BFD',
1375
+ borderColor: 'transparent'
1376
+ },
1377
+ activeMouseOver: {
1378
+ fill: 'rgba(24, 109, 255, 0.1)',
1379
+ color: '#488BFD',
1380
+ borderColor: 'transparent'
1381
+ },
1382
+ disabled: {
1383
+ fill: 'transparent',
1384
+ color: '#B0B0B0',
1385
+ borderColor: 'transparent'
1386
+ }
1387
+ },
1388
+ tool: {
1389
+ "default": {
1390
+ fill: '#393939',
1391
+ color: '#E5E5E5',
1392
+ borderColor: 'transparent'
1393
+ },
1394
+ mouseOver: {
1395
+ fill: '#494949',
1396
+ color: '#E5E5E5',
1397
+ borderColor: 'transparent'
1398
+ },
1399
+ active: {
1400
+ fill: '#186DFF',
1401
+ color: '#FFFFFF',
1402
+ borderColor: 'transparent'
1403
+ },
1404
+ activeMouseOver: {
1405
+ fill: '#1047B0',
1406
+ color: '#FFFFFF',
1407
+ borderColor: 'transparent'
1408
+ },
1409
+ disabled: {
1410
+ fill: 'transparent',
1411
+ color: '#B0B0B0',
1412
+ borderColor: 'transparent'
1413
+ }
945
1414
  },
946
1415
  primaryMouseover: {
947
1416
  fill: '#1047B0'
@@ -950,7 +1419,7 @@ var colors = {
950
1419
  fill: '#186DFF'
951
1420
  },
952
1421
  flatMouseover: {
953
- fill: '#242424'
1422
+ fill: '#494949'
954
1423
  },
955
1424
  focusDefault: {
956
1425
  outline: 'solid 2px #419cfe'
@@ -1165,7 +1634,7 @@ var colors = {
1165
1634
  opacity: 1
1166
1635
  },
1167
1636
  captionDisabled: {
1168
- color: '#909090',
1637
+ color: '#B0B0B0',
1169
1638
  opacity: 1
1170
1639
  }
1171
1640
  }
@@ -1228,10 +1697,12 @@ var ThemeWrapper = function ThemeWrapper(_ref2) {
1228
1697
  theme = _ref2$theme === void 0 ? lightTheme : _ref2$theme,
1229
1698
  _ref2$disableCssBasel = _ref2.disableCssBaseline,
1230
1699
  disableCssBaseline = _ref2$disableCssBasel === void 0 ? false : _ref2$disableCssBasel;
1231
- return /*#__PURE__*/React.createElement(ThemeProvider, {
1700
+ return /*#__PURE__*/React.createElement(StyledEngineProvider, {
1701
+ injectFirst: true
1702
+ }, /*#__PURE__*/React.createElement(ThemeProvider, {
1232
1703
  theme: theme,
1233
1704
  disableCssBaseline: disableCssBaseline
1234
- }, children);
1705
+ }, children));
1235
1706
  }; // Wrapper for storybook stories with GWTheme. Will be deprecated
1236
1707
 
1237
1708
  var ThemeWrapperOldTheme = function ThemeWrapperOldTheme(_a) {