@opengeoweb/theme 2.1.3 → 2.2.1

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
+ /* *
76
+ * Licensed under the Apache License, Version 2.0 (the "License");
77
+ * you may not use this file except in compliance with the License.
78
+ * You may obtain a copy of the License at
79
+ *
80
+ * http://www.apache.org/licenses/LICENSE-2.0
81
+ *
82
+ * Unless required by applicable law or agreed to in writing, software
83
+ * distributed under the License is distributed on an "AS IS" BASIS,
84
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
85
+ * See the License for the specific language governing permissions and
86
+ * limitations under the License.
87
+ *
88
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
89
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
90
+ * */
91
+ var gwButtonVariants = ['primary', 'secondary', 'tertiary', 'flat', 'tool', 'boxed'];
92
+
93
+ var buttonStyle = function buttonStyle(button) {
94
+ return {
95
+ // default styling
96
+ color: button["default"].color,
97
+ backgroundColor: button["default"].fill,
98
+ textTransform: 'capitalize',
99
+ padding: '12px 8px',
100
+ height: '40px',
101
+ borderStyle: 'solid',
102
+ borderWidth: '1px',
103
+ borderColor: button["default"].borderColor,
104
+ borderRadius: '5px',
105
+ // hover styling
106
+ '&:hover': {
107
+ backgroundColor: button.mouseOver.fill,
108
+ borderColor: button.mouseOver.borderColor
109
+ },
110
+ // active styling
111
+ '&.Mui-selected': {
112
+ backgroundColor: button.active.fill,
113
+ color: button.active.color,
114
+ borderColor: button.active.borderColor,
115
+ '&:hover': {
116
+ backgroundColor: button.activeMouseOver.fill
117
+ }
118
+ },
119
+ // disabled styling
120
+ '&.Mui-disabled': {
121
+ backgroundColor: button.disabled.fill,
122
+ color: button.disabled.color,
123
+ borderColor: button.disabled.borderColor
124
+ },
125
+ // size styling
126
+ '&[class*="sizeSmall"]': {
127
+ fontSize: '12px',
128
+ height: '32px',
129
+ lineHeight: '12px'
130
+ },
131
+ // icon styling
132
+ '& .MuiButton-startIcon': {
133
+ marginRight: '2px',
134
+ '& .MuiSvgIcon-root': {
135
+ fontSize: '26px'
136
+ }
137
+ }
138
+ };
139
+ };
140
+ var toggleButtonStyle = function toggleButtonStyle(buttonVariants) {
141
+ return buttonVariants.reduce(function (variants, _ref) {
142
+ var variant = _ref.props.variant,
143
+ style = _ref.style;
144
+ return Object.assign(Object.assign({}, variants), _defineProperty({}, "&.".concat(variant), style));
145
+ }, {});
146
+ };
147
+ var buttonVariants = function buttonVariants(buttons) {
148
+ return gwButtonVariants.map(function (variant) {
149
+ return {
150
+ props: {
151
+ variant: variant
152
+ },
153
+ style: buttonStyle(buttons[variant])
154
+ };
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,25 +568,161 @@ 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
+ }
421
642
  },
422
- primaryMouseover: {
423
- fill: '#1047B0'
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
+ }
424
669
  },
425
- primaryActive: {
426
- fill: '#186DFF'
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
+ }
427
696
  },
428
- flatMouseover: {
429
- fill: '#E3E4E7'
697
+ boxed: {
698
+ "default": {
699
+ fill: 'transparent',
700
+ color: '#575F7A',
701
+ borderColor: '#575f7a'
702
+ },
703
+ mouseOver: {
704
+ fill: '#E3E4E7',
705
+ color: '#575F7A',
706
+ borderColor: '#575f7a'
707
+ },
708
+ active: {
709
+ fill: '#186DFF',
710
+ color: '#FFFFFF',
711
+ borderColor: 'transparent'
712
+ },
713
+ activeMouseOver: {
714
+ fill: '#1047B0',
715
+ color: '#FFFFFF',
716
+ borderColor: 'transparent'
717
+ },
718
+ disabled: {
719
+ fill: 'transparent',
720
+ color: '#707070',
721
+ borderColor: 'transparent'
722
+ }
430
723
  },
431
724
  focusDefault: {
432
725
  outline: 'solid 2px #419cfe'
433
- },
434
- disabled: {
435
- fill: '#E8E5E5'
436
- },
437
- surfaceIconDefault: {
438
- fill: '#F5F5F5'
439
726
  }
440
727
  },
441
728
  typographyAndIcons: {
@@ -641,7 +928,7 @@ var colors$1 = {
641
928
  opacity: 1
642
929
  },
643
930
  captionDisabled: {
644
- color: '#767676',
931
+ color: '#707070',
645
932
  opacity: 1
646
933
  }
647
934
  }
@@ -679,7 +966,7 @@ var lightTheme = createTheme('light', parseColors(colors$1), createShadows(eleva
679
966
  * */
680
967
 
681
968
  var geowebColors = Object.assign({}, colors$1);
682
- var GWTheme = createMuiTheme({
969
+ var GWTheme = createTheme$1({
683
970
  palette: {
684
971
  secondary: {
685
972
  main: '#0075a9'
@@ -748,140 +1035,218 @@ var GWTheme = createMuiTheme({
748
1035
  color: '0075a9'
749
1036
  }
750
1037
  },
751
- overrides: {
1038
+ components: {
752
1039
  MuiTooltip: {
753
- tooltip: {
754
- borderRadius: '2px',
755
- fontSize: '16px',
756
- fontWeight: 'normal',
757
- padding: '10px',
758
- backgroundColor: '#232323'
1040
+ styleOverrides: {
1041
+ tooltip: {
1042
+ borderRadius: '2px',
1043
+ fontSize: '16px',
1044
+ fontWeight: 'normal',
1045
+ padding: '10px',
1046
+ backgroundColor: '#232323'
1047
+ }
759
1048
  }
760
1049
  },
761
1050
  MuiIconButton: {
762
- root: {
763
- color: '#0075a9'
1051
+ styleOverrides: {
1052
+ root: {
1053
+ color: '#0075a9'
1054
+ }
764
1055
  }
765
1056
  },
766
1057
  MuiCheckbox: {
767
- root: {
768
- color: '#0075a9'
1058
+ styleOverrides: {
1059
+ root: {
1060
+ '&.Mui-disabled': {
1061
+ color: '#CCCCCC!important'
1062
+ },
1063
+ '&.Mui-checked': {
1064
+ color: '#0075a9'
1065
+ }
1066
+ }
769
1067
  }
770
1068
  },
771
1069
  MuiSelect: {
772
- icon: {
773
- color: '#0075a9'
774
- },
775
- select: {
776
- '&:focus': {
777
- backgroundColor: 'rgba(0, 117, 169, 0.05)'
1070
+ styleOverrides: {
1071
+ icon: {
1072
+ color: '#0075a9'
1073
+ },
1074
+ select: {
1075
+ '&:focus': {
1076
+ backgroundColor: 'rgba(0, 117, 169, 0.05)'
1077
+ }
778
1078
  }
779
1079
  }
780
1080
  },
781
1081
  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'
1082
+ styleOverrides: {
1083
+ standardError: {
1084
+ border: '1px solid #c00000',
1085
+ borderRadius: '0px',
1086
+ backgroundColor: '#fff0ea'
1087
+ },
1088
+ standardWarning: {
1089
+ border: '1px solid #ffa800',
1090
+ borderRadius: '0px',
1091
+ backgroundColor: '#fff8eb'
1092
+ },
1093
+ standardInfo: {
1094
+ border: '1px solid #0062e6',
1095
+ borderRadius: '0px',
1096
+ backgroundColor: '#eaf3ff'
1097
+ },
1098
+ standardSuccess: {
1099
+ border: '1px solid #72bb23',
1100
+ borderRadius: '0px',
1101
+ backgroundColor: '#fcffeb'
1102
+ },
1103
+ action: {
1104
+ color: '#0075a9'
1105
+ },
1106
+ message: {
1107
+ fontSize: '14px',
1108
+ lineHeight: 1.43,
1109
+ letterSpacing: '0.25px',
1110
+ color: '#051039'
1111
+ }
810
1112
  }
811
1113
  },
812
1114
  MuiTabs: {
813
- root: {
814
- backgroundColor: '#ffffff',
815
- minHeight: '30px'
816
- },
817
- scrollButtons: {
818
- width: '20px'
1115
+ styleOverrides: {
1116
+ root: {
1117
+ backgroundColor: '#ffffff',
1118
+ minHeight: '30px'
1119
+ },
1120
+ scrollButtons: {
1121
+ width: '20px'
1122
+ }
819
1123
  }
820
1124
  },
821
1125
  MuiTab: {
822
- root: {
823
- minHeight: '30px',
824
- textTransform: 'none',
825
- minWidth: '76px',
826
- '@media (min-width: 600px)': {
827
- minWidth: '76px'
1126
+ styleOverrides: {
1127
+ root: {
1128
+ minHeight: '30px',
1129
+ textTransform: 'none',
1130
+ minWidth: '76px',
1131
+ '@media (min-width: 600px)': {
1132
+ minWidth: '76px'
1133
+ }
1134
+ },
1135
+ labelIcon: {
1136
+ minHeight: '30px'
828
1137
  }
829
- },
830
- labelIcon: {
831
- minHeight: '30px'
832
1138
  }
833
1139
  },
834
1140
  MuiListItem: {
835
- root: {
836
- '&$selected': {
837
- backgroundColor: 'rgba(0, 117, 169, 0.15)',
838
- borderLeft: '4px solid #0075a9',
1141
+ styleOverrides: {
1142
+ root: {
1143
+ '&$selected': {
1144
+ backgroundColor: 'rgba(0, 117, 169, 0.15)',
1145
+ borderLeft: '4px solid #0075a9',
1146
+ '&:hover': {
1147
+ backgroundColor: 'rgba(0, 117, 169, 0.10)'
1148
+ }
1149
+ }
1150
+ },
1151
+ button: {
839
1152
  '&:hover': {
840
- backgroundColor: 'rgba(0, 117, 169, 0.10)'
1153
+ backgroundColor: 'rgba(0, 117, 169, 0.15)'
841
1154
  }
842
1155
  }
843
- },
844
- button: {
845
- '&:hover': {
846
- backgroundColor: 'rgba(0, 117, 169, 0.15)'
1156
+ }
1157
+ },
1158
+ MuiMenuItem: {
1159
+ styleOverrides: {
1160
+ root: {
1161
+ '&.Mui-selected': {
1162
+ backgroundColor: 'rgba(0, 117, 169, 0.15)',
1163
+ borderLeft: '4px solid #0075a9',
1164
+ '&:hover': {
1165
+ backgroundColor: 'rgba(0, 117, 169, 0.10)'
1166
+ }
1167
+ },
1168
+ '&:hover': {
1169
+ backgroundColor: 'rgba(0, 117, 169, 0.15)'
1170
+ }
847
1171
  }
848
1172
  }
849
1173
  },
850
1174
  MuiFormLabel: {
851
- root: {
852
- color: 'rgba(5, 16, 57, 0.7)',
853
- '&$focused': {
854
- color: '#0075a9'
1175
+ styleOverrides: {
1176
+ root: {
1177
+ color: 'rgba(5, 16, 57, 0.7)',
1178
+ '&.Mui-focused': {
1179
+ color: '#0075a9'
1180
+ },
1181
+ '&.Mui-error': {
1182
+ color: '#d32f2f!important'
1183
+ }
855
1184
  }
856
1185
  }
857
1186
  },
858
1187
  MuiOutlinedInput: {
859
- root: {
860
- '&$focused $notchedOutline': {
861
- borderColor: '#0075a9'
1188
+ styleOverrides: {
1189
+ root: {
1190
+ '&$focused $notchedOutline': {
1191
+ borderColor: '#0075a9'
1192
+ }
862
1193
  }
863
1194
  }
864
1195
  },
865
1196
  MuiFilledInput: {
866
- root: {
867
- backgroundColor: 'rgba(0, 117, 169, 0.05)',
868
- color: '#051039',
869
- '&$disabled': {
870
- backgroundColor: 'transparent'
1197
+ styleOverrides: {
1198
+ root: {
1199
+ backgroundColor: 'rgba(0, 117, 169, 0.05)',
1200
+ color: '#051039',
1201
+ '&.Mui-disabled': {
1202
+ backgroundColor: 'white'
1203
+ },
1204
+ '&.Mui-focused': {
1205
+ backgroundColor: 'rgba(0,0,0,0.09)'
1206
+ }
1207
+ },
1208
+ underline: {
1209
+ '&.Mui-disabled:before': {
1210
+ borderBottomStyle: 'none'
1211
+ }
871
1212
  }
872
- },
873
- underline: {
874
- '&$disabled:before': {
875
- borderBottomStyle: 'none'
1213
+ }
1214
+ },
1215
+ MuiRadio: {
1216
+ styleOverrides: {
1217
+ root: {
1218
+ '&.Mui-disabled': {
1219
+ color: '#CCCCCC!important'
1220
+ },
1221
+ '&.Mui-checked': {
1222
+ color: '#0075a9'
1223
+ }
876
1224
  }
877
1225
  }
878
1226
  },
879
1227
  MuiCardContent: {
880
- root: {
881
- '&:last-child': {
882
- paddingBottom: 0
1228
+ styleOverrides: {
1229
+ root: {
1230
+ '&:last-child': {
1231
+ paddingBottom: 0
1232
+ }
883
1233
  }
884
1234
  }
1235
+ },
1236
+ MuiDialog: {
1237
+ styleOverrides: {
1238
+ paperWidthLg: {
1239
+ maxWidth: '1280px'
1240
+ }
1241
+ }
1242
+ },
1243
+ MuiButton: {
1244
+ variants: buttonVariants(geowebColors.buttons)
1245
+ },
1246
+ MuiToggleButton: {
1247
+ styleOverrides: {
1248
+ root: toggleButtonStyle(buttonVariants(geowebColors.buttons))
1249
+ }
885
1250
  }
886
1251
  }
887
1252
  });
@@ -941,25 +1306,161 @@ var colors = {
941
1306
  },
942
1307
  buttons: {
943
1308
  primary: {
944
- fill: '#186DFF'
1309
+ "default": {
1310
+ fill: '#186DFF',
1311
+ color: '#FFFFFF',
1312
+ borderColor: 'transparent'
1313
+ },
1314
+ mouseOver: {
1315
+ fill: '#1047B0',
1316
+ color: '#FFFFFF',
1317
+ borderColor: '#71A6FF'
1318
+ },
1319
+ active: {
1320
+ fill: '#186DFF',
1321
+ color: '#FFFFFF',
1322
+ borderColor: 'transparent'
1323
+ },
1324
+ activeMouseOver: {},
1325
+ disabled: {
1326
+ fill: 'transparent',
1327
+ color: '#B0B0B0',
1328
+ borderColor: 'transparent'
1329
+ }
945
1330
  },
946
- primaryMouseover: {
947
- fill: '#1047B0'
1331
+ secondary: {
1332
+ "default": {
1333
+ fill: '#0876b6',
1334
+ color: '#FFFFFF',
1335
+ borderColor: 'transparent'
1336
+ },
1337
+ mouseOver: {
1338
+ fill: '#064C84',
1339
+ color: '#FFFFFF',
1340
+ borderColor: '#3DA6FF'
1341
+ },
1342
+ active: {
1343
+ fill: '#0876B6',
1344
+ color: '#FFFFFF',
1345
+ borderColor: 'transparent'
1346
+ },
1347
+ activeMouseOver: {},
1348
+ disabled: {
1349
+ fill: 'transparent',
1350
+ color: '#707070',
1351
+ borderColor: 'transparent'
1352
+ }
1353
+ },
1354
+ tertiary: {
1355
+ "default": {
1356
+ fill: 'transparent',
1357
+ color: '#E5E5E5',
1358
+ borderColor: '#E5E5E5'
1359
+ },
1360
+ mouseOver: {
1361
+ fill: '#494949',
1362
+ color: '#E5E5E5',
1363
+ borderColor: '#E5E5E5'
1364
+ },
1365
+ active: {
1366
+ fill: 'transparent',
1367
+ color: '#488BFD',
1368
+ borderColor: '#48A8FA'
1369
+ },
1370
+ activeMouseOver: {
1371
+ fill: 'rgba(24, 109, 255, 0.1)',
1372
+ color: '#488BFD',
1373
+ borderColor: '#488BFD'
1374
+ },
1375
+ disabled: {
1376
+ fill: 'transparent',
1377
+ color: '#B0B0B0',
1378
+ borderColor: 'transparent'
1379
+ }
1380
+ },
1381
+ flat: {
1382
+ "default": {
1383
+ fill: 'transparent',
1384
+ color: '#E5E5E5',
1385
+ borderColor: 'transparent'
1386
+ },
1387
+ mouseOver: {
1388
+ fill: '#494949',
1389
+ color: '#E5E5E5',
1390
+ borderColor: 'transparent'
1391
+ },
1392
+ active: {
1393
+ fill: 'transparent',
1394
+ color: '#488BFD',
1395
+ borderColor: 'transparent'
1396
+ },
1397
+ activeMouseOver: {
1398
+ fill: 'rgba(24, 109, 255, 0.1)',
1399
+ color: '#488BFD',
1400
+ borderColor: 'transparent'
1401
+ },
1402
+ disabled: {
1403
+ fill: 'transparent',
1404
+ color: '#B0B0B0',
1405
+ borderColor: 'transparent'
1406
+ }
948
1407
  },
949
- primaryActive: {
950
- fill: '#186DFF'
1408
+ tool: {
1409
+ "default": {
1410
+ fill: '#393939',
1411
+ color: '#E5E5E5',
1412
+ borderColor: 'transparent'
1413
+ },
1414
+ mouseOver: {
1415
+ fill: '#494949',
1416
+ color: '#E5E5E5',
1417
+ borderColor: 'transparent'
1418
+ },
1419
+ active: {
1420
+ fill: '#186DFF',
1421
+ color: '#FFFFFF',
1422
+ borderColor: 'transparent'
1423
+ },
1424
+ activeMouseOver: {
1425
+ fill: '#1047B0',
1426
+ color: '#FFFFFF',
1427
+ borderColor: 'transparent'
1428
+ },
1429
+ disabled: {
1430
+ fill: 'transparent',
1431
+ color: '#B0B0B0',
1432
+ borderColor: 'transparent'
1433
+ }
951
1434
  },
952
- flatMouseover: {
953
- fill: '#242424'
1435
+ boxed: {
1436
+ "default": {
1437
+ fill: 'transparent',
1438
+ color: '#E5E5E5',
1439
+ borderColor: '#e5e5e5'
1440
+ },
1441
+ mouseOver: {
1442
+ fill: '#494949',
1443
+ color: '#E5E5E5',
1444
+ borderColor: '#e5e5e5'
1445
+ },
1446
+ active: {
1447
+ fill: '#186DFF',
1448
+ color: '#FFFFFF',
1449
+ borderColor: 'transparent'
1450
+ },
1451
+ activeMouseOver: {
1452
+ fill: '#1047B0',
1453
+ color: '#FFFFFF',
1454
+ borderColor: 'transparent'
1455
+ },
1456
+ disabled: {
1457
+ fill: 'transparent',
1458
+ color: '#B0B0B0',
1459
+ borderColor: 'transparent'
1460
+ }
954
1461
  },
955
1462
  focusDefault: {
956
1463
  outline: 'solid 2px #419cfe'
957
- },
958
- disabled: {
959
- fill: '#303030'
960
- },
961
- surfaceIconDefault: {
962
- fill: '#2B2B2B'
963
1464
  }
964
1465
  },
965
1466
  typographyAndIcons: {
@@ -1165,7 +1666,7 @@ var colors = {
1165
1666
  opacity: 1
1166
1667
  },
1167
1668
  captionDisabled: {
1168
- color: '#909090',
1669
+ color: '#B0B0B0',
1169
1670
  opacity: 1
1170
1671
  }
1171
1672
  }
@@ -1228,10 +1729,12 @@ var ThemeWrapper = function ThemeWrapper(_ref2) {
1228
1729
  theme = _ref2$theme === void 0 ? lightTheme : _ref2$theme,
1229
1730
  _ref2$disableCssBasel = _ref2.disableCssBaseline,
1230
1731
  disableCssBaseline = _ref2$disableCssBasel === void 0 ? false : _ref2$disableCssBasel;
1231
- return /*#__PURE__*/React.createElement(ThemeProvider, {
1732
+ return /*#__PURE__*/React.createElement(StyledEngineProvider, {
1733
+ injectFirst: true
1734
+ }, /*#__PURE__*/React.createElement(ThemeProvider, {
1232
1735
  theme: theme,
1233
1736
  disableCssBaseline: disableCssBaseline
1234
- }, children);
1737
+ }, children));
1235
1738
  }; // Wrapper for storybook stories with GWTheme. Will be deprecated
1236
1739
 
1237
1740
  var ThemeWrapperOldTheme = function ThemeWrapperOldTheme(_a) {
@@ -1244,4 +1747,4 @@ var ThemeWrapperOldTheme = function ThemeWrapperOldTheme(_a) {
1244
1747
  }, props), children);
1245
1748
  };
1246
1749
 
1247
- export { GWTheme, ThemeContext, ThemeProvider, ThemeWrapper, ThemeWrapperOldTheme, darkTheme, lightTheme, useThemeContext };
1750
+ export { GWTheme, ThemeContext, ThemeProvider, ThemeWrapper, ThemeWrapperOldTheme, darkTheme, gwButtonVariants, lightTheme, useThemeContext };