@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,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@material-ui/core'), require('react')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@material-ui/core', 'react'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Theme = {}, global.core, global.React));
5
- })(this, (function (exports, core, React) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@mui/material'), require('react')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@mui/material', 'react'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Theme = {}, global.material, global.React));
5
+ })(this, (function (exports, material, React) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -79,6 +79,91 @@
79
79
  return ar;
80
80
  }
81
81
 
82
+ /* *
83
+ * Licensed under the Apache License, Version 2.0 (the "License");
84
+ * you may not use this file except in compliance with the License.
85
+ * You may obtain a copy of the License at
86
+ *
87
+ * http://www.apache.org/licenses/LICENSE-2.0
88
+ *
89
+ * Unless required by applicable law or agreed to in writing, software
90
+ * distributed under the License is distributed on an "AS IS" BASIS,
91
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
92
+ * See the License for the specific language governing permissions and
93
+ * limitations under the License.
94
+ *
95
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
96
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
97
+ * */
98
+ var gwButtonVariants = ['primary', 'secondary', 'tertiary', 'flat', 'tool', 'boxed'];
99
+
100
+ var buttonStyle = function buttonStyle(button) {
101
+ return {
102
+ // default styling
103
+ color: button["default"].color,
104
+ backgroundColor: button["default"].fill,
105
+ textTransform: 'capitalize',
106
+ padding: '12px 8px',
107
+ height: '40px',
108
+ borderStyle: 'solid',
109
+ borderWidth: '1px',
110
+ borderColor: button["default"].borderColor,
111
+ borderRadius: '5px',
112
+ // hover styling
113
+ '&:hover': {
114
+ backgroundColor: button.mouseOver.fill,
115
+ borderColor: button.mouseOver.borderColor
116
+ },
117
+ // active styling
118
+ '&.Mui-selected': {
119
+ backgroundColor: button.active.fill,
120
+ color: button.active.color,
121
+ borderColor: button.active.borderColor,
122
+ '&:hover': {
123
+ backgroundColor: button.activeMouseOver.fill
124
+ }
125
+ },
126
+ // disabled styling
127
+ '&.Mui-disabled': {
128
+ backgroundColor: button.disabled.fill,
129
+ color: button.disabled.color,
130
+ borderColor: button.disabled.borderColor
131
+ },
132
+ // size styling
133
+ '&[class*="sizeSmall"]': {
134
+ fontSize: '12px',
135
+ height: '32px',
136
+ lineHeight: '12px'
137
+ },
138
+ // icon styling
139
+ '& .MuiButton-startIcon': {
140
+ marginRight: '2px',
141
+ '& .MuiSvgIcon-root': {
142
+ fontSize: '26px'
143
+ }
144
+ }
145
+ };
146
+ };
147
+ var toggleButtonStyle = function toggleButtonStyle(buttonVariants) {
148
+ return buttonVariants.reduce(function (variants, _a) {
149
+ var _b;
150
+
151
+ var variant = _a.props.variant,
152
+ style = _a.style;
153
+ return __assign(__assign({}, variants), (_b = {}, _b["&." + variant] = style, _b));
154
+ }, {});
155
+ };
156
+ var buttonVariants = function buttonVariants(buttons) {
157
+ return gwButtonVariants.map(function (variant) {
158
+ return {
159
+ props: {
160
+ variant: variant
161
+ },
162
+ style: buttonStyle(buttons[variant])
163
+ };
164
+ });
165
+ };
166
+
82
167
  var hex2rgba = function hex2rgba(hex, alpha) {
83
168
  if (alpha === void 0) {
84
169
  alpha = 1;
@@ -134,9 +219,9 @@
134
219
  };
135
220
  var BORDER_RADIUS = 3;
136
221
  var createTheme = function createTheme(paletteType, geowebColors, shadows) {
137
- return core.createMuiTheme({
222
+ return material.createTheme({
138
223
  palette: {
139
- type: paletteType,
224
+ mode: paletteType,
140
225
  secondary: {
141
226
  main: geowebColors.typographyAndIcons.iconLinkActive
142
227
  },
@@ -157,243 +242,311 @@
157
242
  fontFamily: ['Roboto', 'Helvetica', 'Arial', 'sans-serif'].join(',')
158
243
  },
159
244
  shadows: shadows,
160
- overrides: {
161
- MuiCssBaseline: {
162
- '@global': {
163
- body: {
164
- fontSmoothing: 'auto'
165
- }
245
+ components: {
246
+ MuiButton: {
247
+ variants: buttonVariants(geowebColors.buttons)
248
+ },
249
+ MuiToggleButton: {
250
+ styleOverrides: {
251
+ root: toggleButtonStyle(buttonVariants(geowebColors.buttons))
166
252
  }
167
253
  },
254
+ MuiCssBaseline: {
255
+ styleOverrides: "\n html {\n -webkit-font-smoothing: auto;\n }\n "
256
+ },
168
257
  MuiMenuItem: {
169
- root: {
170
- fontSize: '0.875rem',
171
- letterSpacing: '0.25px',
172
- ':not(:last-child)&:after': {
173
- content: '""',
174
- position: 'absolute',
175
- width: '100%',
176
- height: 1,
177
- background: geowebColors.greys.accessible,
178
- bottom: 0,
179
- left: 0,
180
- opacity: 0.5
181
- },
182
- '&.Mui-selected': {
183
- background: 'none',
184
- boxShadow: "inset 4px 0px 0px 0px " + geowebColors.typographyAndIcons.iconLinkActive
258
+ styleOverrides: {
259
+ root: {
260
+ fontSize: '0.875rem',
261
+ letterSpacing: '0.25px',
262
+ ':not(:last-child)&:after': {
263
+ content: '""',
264
+ position: 'absolute',
265
+ width: '100%',
266
+ height: 1,
267
+ background: geowebColors.greys.accessible,
268
+ bottom: 0,
269
+ left: 0,
270
+ opacity: 0.5
271
+ },
272
+ '&.Mui-selected': {
273
+ background: 'none',
274
+ boxShadow: "inset 4px 0px 0px 0px " + geowebColors.typographyAndIcons.iconLinkActive
275
+ }
185
276
  }
186
277
  }
187
278
  },
188
279
  MuiRadio: {
189
- root: {
190
- color: geowebColors.typographyAndIcons.iconLinkActive
280
+ styleOverrides: {
281
+ root: {
282
+ color: geowebColors.typographyAndIcons.iconLinkActive,
283
+ '&.Mui-disabled': {
284
+ color: geowebColors.typographyAndIcons.iconLinkDisabled + "!important"
285
+ },
286
+ '&.Mui-checked': {
287
+ color: geowebColors.typographyAndIcons.iconLinkActive
288
+ }
289
+ }
290
+ }
291
+ },
292
+ MuiCheckbox: {
293
+ styleOverrides: {
294
+ root: {
295
+ color: geowebColors.typographyAndIcons.iconLinkActive,
296
+ '&.Mui-disabled': {
297
+ color: geowebColors.typographyAndIcons.iconLinkDisabled + "!important"
298
+ },
299
+ '&.Mui-checked': {
300
+ color: geowebColors.typographyAndIcons.iconLinkActive
301
+ }
302
+ }
191
303
  }
192
304
  },
193
305
  MuiPaper: {
194
- outlined: {
195
- borderColor: geowebColors.cards.cardContainerBorder
306
+ styleOverrides: {
307
+ root: {
308
+ backgroundImage: 'unset'
309
+ },
310
+ outlined: {
311
+ borderColor: geowebColors.cards.cardContainerBorder
312
+ }
196
313
  }
197
314
  },
198
315
  MuiCard: {
199
- root: {
200
- backgroundColor: geowebColors.cards.cardContainer
316
+ styleOverrides: {
317
+ root: {
318
+ backgroundColor: geowebColors.cards.cardContainer
319
+ }
201
320
  }
202
321
  },
203
322
  MuiSlider: {
204
- root: {
205
- color: geowebColors.typographyAndIcons.iconLinkActive
323
+ styleOverrides: {
324
+ root: {
325
+ color: geowebColors.typographyAndIcons.iconLinkActive
326
+ }
206
327
  }
207
328
  },
208
329
  MuiTable: {
209
- root: {
210
- borderSpacing: '0 0.25rem',
211
- borderCollapse: 'separate'
330
+ styleOverrides: {
331
+ root: {
332
+ borderSpacing: '0 0.25rem',
333
+ borderCollapse: 'separate'
334
+ }
212
335
  }
213
336
  },
214
337
  MuiTableRow: {
215
- head: {
216
- '&:hover': {
217
- boxShadow: shadows[0]
218
- }
219
- },
220
- root: {
221
- transition: 'box-shadow 100ms ease-out',
222
- boxShadow: shadows[0],
223
- borderRadius: BORDER_RADIUS,
224
- '&:hover': {
225
- boxShadow: shadows[1]
338
+ styleOverrides: {
339
+ head: {
340
+ '&:hover': {
341
+ boxShadow: shadows[0]
342
+ }
226
343
  },
227
- position: 'relative'
344
+ root: {
345
+ transition: 'box-shadow 100ms ease-out',
346
+ boxShadow: shadows[0],
347
+ borderRadius: BORDER_RADIUS,
348
+ '&:hover': {
349
+ boxShadow: shadows[1]
350
+ },
351
+ position: 'relative'
352
+ }
228
353
  }
229
354
  },
230
355
  MuiTableCell: {
231
- head: {
232
- borderBottom: 'none',
233
- fontSize: '0.875rem',
234
- fontWeight: 400
235
- },
236
- body: {
237
- padding: 12,
238
- fontWeight: 500,
239
- backgroundColor: geowebColors.background.surface,
240
- borderStyle: 'solid',
241
- borderColor: 'transparent',
242
- borderWidth: 1,
243
- borderTopColor: geowebColors.cards.cardContainerBorder,
244
- borderBottomColor: geowebColors.cards.cardContainerBorder,
245
- '&:first-child': {
246
- borderLeftColor: geowebColors.cards.cardContainerBorder,
247
- borderRadius: BORDER_RADIUS + "px 0px 0px " + BORDER_RADIUS + "px"
356
+ styleOverrides: {
357
+ head: {
358
+ borderBottom: 'none',
359
+ fontSize: '0.875rem',
360
+ fontWeight: 400
248
361
  },
249
- '&:last-child': {
250
- borderRightColor: geowebColors.cards.cardContainerBorder,
251
- borderRadius: "0px " + BORDER_RADIUS + "px " + BORDER_RADIUS + "px 0px"
362
+ body: {
363
+ padding: 12,
364
+ fontWeight: 500,
365
+ backgroundColor: geowebColors.background.surface,
366
+ borderStyle: 'solid',
367
+ borderColor: 'transparent',
368
+ borderWidth: 1,
369
+ borderTopColor: geowebColors.cards.cardContainerBorder,
370
+ borderBottomColor: geowebColors.cards.cardContainerBorder,
371
+ '&:first-child': {
372
+ borderLeftColor: geowebColors.cards.cardContainerBorder,
373
+ borderRadius: BORDER_RADIUS + "px 0px 0px " + BORDER_RADIUS + "px"
374
+ },
375
+ '&:last-child': {
376
+ borderRightColor: geowebColors.cards.cardContainerBorder,
377
+ borderRadius: "0px " + BORDER_RADIUS + "px " + BORDER_RADIUS + "px 0px"
378
+ }
252
379
  }
253
380
  }
254
381
  },
255
382
  MuiTabs: {
256
- root: {
257
- position: 'relative',
258
- '&:after': {
259
- content: '""',
260
- position: 'absolute',
261
- bottom: 0,
262
- height: 1,
263
- width: '100%',
264
- zIndex: 0,
265
- backgroundColor: hex2rgba(geowebColors.greys.accessible, 0.2)
383
+ styleOverrides: {
384
+ root: {
385
+ position: 'relative',
386
+ '&:after': {
387
+ content: '""',
388
+ position: 'absolute',
389
+ bottom: 0,
390
+ height: 1,
391
+ width: '100%',
392
+ zIndex: 0,
393
+ backgroundColor: hex2rgba(geowebColors.greys.accessible, 0.2)
394
+ }
395
+ },
396
+ indicator: {
397
+ zIndex: 1,
398
+ backgroundColor: geowebColors.typographyAndIcons.iconLinkActive
266
399
  }
267
- },
268
- indicator: {
269
- zIndex: 1,
270
- backgroundColor: geowebColors.typographyAndIcons.iconLinkActive
271
400
  }
272
401
  },
273
402
  MuiTab: {
274
- root: {
275
- textTransform: 'initial',
276
- '&.Mui-selected': {
277
- color: geowebColors.typographyAndIcons.iconLinkActive
278
- },
279
- '&:hover': {
280
- opacity: 1,
281
- color: geowebColors.typographyAndIcons.iconLinkActive,
282
- backgroundColor: geowebColors.tab.mouseOver.rgba
403
+ styleOverrides: {
404
+ root: {
405
+ textTransform: 'initial',
406
+ '&.Mui-selected': {
407
+ color: geowebColors.typographyAndIcons.iconLinkActive
408
+ },
409
+ '&:hover': {
410
+ opacity: 1,
411
+ color: geowebColors.typographyAndIcons.iconLinkActive,
412
+ backgroundColor: geowebColors.tab.mouseOver.rgba
413
+ }
283
414
  }
284
415
  }
285
416
  },
286
417
  MuiListItem: {
287
- root: {
288
- color: geowebColors.typographyAndIcons.text
289
- },
290
- divider: {
291
- borderBottomColor: hex2rgba(geowebColors.greys.accessible, 0.2)
418
+ styleOverrides: {
419
+ root: {
420
+ color: geowebColors.typographyAndIcons.text,
421
+ fontSize: '14px'
422
+ },
423
+ divider: {
424
+ borderBottomColor: hex2rgba(geowebColors.greys.accessible, 0.2)
425
+ }
292
426
  }
293
427
  },
294
428
  MuiBackdrop: {
295
- root: {
296
- backgroundColor: geowebColors.backdrops.black.rgba
429
+ styleOverrides: {
430
+ root: {
431
+ backgroundColor: geowebColors.backdrops.black.rgba
432
+ }
297
433
  }
298
434
  },
299
435
  MuiTooltip: {
300
- tooltip: {
301
- backgroundColor: geowebColors.tooltips.tooltipContainer.rgba,
302
- color: geowebColors.tooltips.tooltipText.color,
303
- padding: '8px 12px',
304
- fontSize: 16,
305
- fontWeight: 400,
306
- fontStretch: 'normal',
307
- fontStyle: 'normal',
308
- letterSpacing: 0.44,
309
- lineHeight: 1.56
436
+ styleOverrides: {
437
+ tooltip: {
438
+ backgroundColor: geowebColors.tooltips.tooltipContainer.rgba,
439
+ color: geowebColors.tooltips.tooltipText.color,
440
+ padding: '8px 12px',
441
+ fontSize: 16,
442
+ fontWeight: 400,
443
+ fontStretch: 'normal',
444
+ fontStyle: 'normal',
445
+ letterSpacing: 0.44,
446
+ lineHeight: 1.56
447
+ }
310
448
  }
311
449
  },
312
450
  MuiLink: {
313
- root: {
314
- color: geowebColors.typographyAndIcons.textLinkActive
451
+ styleOverrides: {
452
+ root: {
453
+ color: geowebColors.typographyAndIcons.textLinkActive,
454
+ textDecoration: 'none',
455
+ '&:hover': {
456
+ textDecoration: 'underline',
457
+ textDecorationColor: geowebColors.typographyAndIcons.textLinkActive
458
+ }
459
+ }
315
460
  }
316
461
  },
317
462
  // TODO: implement correct theming values https://gitlab.com/opengeoweb/opengeoweb/-/issues/1369
318
463
  MuiAlert: {
319
- standardError: {
320
- border: '1px solid #c00000',
321
- borderRadius: '0px',
322
- backgroundColor: '#fff0ea'
323
- },
324
- standardWarning: {
325
- border: '1px solid #ffa800',
326
- borderRadius: '0px',
327
- backgroundColor: '#fff8eb'
328
- },
329
- standardInfo: {
330
- border: '1px solid #0062e6',
331
- borderRadius: '0px',
332
- backgroundColor: '#eaf3ff'
333
- },
334
- standardSuccess: {
335
- border: '1px solid #72bb23',
336
- borderRadius: '0px',
337
- backgroundColor: '#fcffeb'
338
- },
339
- action: {
340
- color: '#0075a9'
341
- },
342
- message: {
343
- fontSize: '14px',
344
- lineHeight: 1.43,
345
- letterSpacing: '0.25px',
346
- color: '#051039'
464
+ styleOverrides: {
465
+ standardError: {
466
+ border: '1px solid #c00000',
467
+ borderRadius: '0px',
468
+ backgroundColor: '#fff0ea'
469
+ },
470
+ standardWarning: {
471
+ border: '1px solid #ffa800',
472
+ borderRadius: '0px',
473
+ backgroundColor: '#fff8eb'
474
+ },
475
+ standardInfo: {
476
+ border: '1px solid #0062e6',
477
+ borderRadius: '0px',
478
+ backgroundColor: '#eaf3ff'
479
+ },
480
+ standardSuccess: {
481
+ border: '1px solid #72bb23',
482
+ borderRadius: '0px',
483
+ backgroundColor: '#fcffeb'
484
+ },
485
+ action: {
486
+ color: '#0075a9'
487
+ },
488
+ message: {
489
+ fontSize: '14px',
490
+ lineHeight: 1.43,
491
+ letterSpacing: '0.25px',
492
+ color: '#051039'
493
+ }
347
494
  }
348
495
  },
349
496
  MuiFilledInput: {
350
- root: {
351
- backgroundColor: geowebColors.textInputField["default"].rgba,
352
- '&.Mui-focused': {
353
- backgroundColor: geowebColors.textInputField.active.rgba
354
- },
355
- '&.Mui-disabled': {
356
- backgroundColor: geowebColors.textInputField.disabled.rgba
357
- }
358
- },
359
- underline: {
360
- '&:after': {
361
- borderBottom: 'transparent'
497
+ styleOverrides: {
498
+ root: {
499
+ backgroundColor: geowebColors.textInputField["default"].rgba,
500
+ '&.Mui-focused': {
501
+ backgroundColor: geowebColors.textInputField.active.rgba
502
+ },
503
+ '&.Mui-disabled': {
504
+ backgroundColor: geowebColors.textInputField.disabled.rgba
505
+ }
362
506
  },
363
- '&.Mui-disabled:before': {
364
- borderBottomStyle: 'solid'
507
+ underline: {
508
+ '&:after': {
509
+ borderBottom: 'transparent'
510
+ },
511
+ '&.Mui-disabled:before': {
512
+ borderBottomStyle: 'solid'
513
+ }
365
514
  }
366
515
  }
367
516
  },
368
517
  MuiFormLabel: {
369
- root: {
370
- color: geowebColors.captions.captionStatus.color,
371
- opacity: geowebColors.captions.captionStatus.opacity,
372
- '&.Mui-focused': {
373
- color: geowebColors.captions.captionInformation.color,
374
- opacity: geowebColors.captions.captionInformation.opacity
375
- },
376
- '&.Mui-error': {
377
- color: geowebColors.captions.captionError.color,
378
- opacity: geowebColors.captions.captionError.opacity
379
- },
380
- '&.Mui-disabled': {
381
- color: geowebColors.captions.captionDisabled.color,
382
- opacity: geowebColors.captions.captionDisabled.opacity
518
+ styleOverrides: {
519
+ root: {
520
+ color: geowebColors.captions.captionStatus.color,
521
+ opacity: geowebColors.captions.captionStatus.opacity,
522
+ '&.Mui-focused': {
523
+ color: geowebColors.captions.captionInformation.color,
524
+ opacity: geowebColors.captions.captionInformation.opacity
525
+ },
526
+ '&.Mui-error': {
527
+ color: geowebColors.captions.captionError.color,
528
+ opacity: geowebColors.captions.captionError.opacity
529
+ },
530
+ '&.Mui-disabled': {
531
+ color: geowebColors.captions.captionDisabled.color,
532
+ opacity: geowebColors.captions.captionDisabled.opacity
533
+ }
383
534
  }
384
535
  }
385
536
  },
386
537
  MuiFormHelperText: {
387
- root: {
388
- color: geowebColors.captions.captionStatus.color,
389
- opacity: geowebColors.captions.captionStatus.opacity,
390
- '&.Mui-error': {
391
- color: geowebColors.captions.captionError.color,
392
- opacity: geowebColors.captions.captionError.opacity
393
- },
394
- '&.Mui-disabled': {
395
- color: geowebColors.captions.captionDisabled.color,
396
- opacity: geowebColors.captions.captionDisabled.opacity
538
+ styleOverrides: {
539
+ root: {
540
+ color: geowebColors.captions.captionStatus.color,
541
+ opacity: geowebColors.captions.captionStatus.opacity,
542
+ '&.Mui-error': {
543
+ color: geowebColors.captions.captionError.color,
544
+ opacity: geowebColors.captions.captionError.opacity
545
+ },
546
+ '&.Mui-disabled': {
547
+ color: geowebColors.captions.captionDisabled.color,
548
+ opacity: geowebColors.captions.captionDisabled.opacity
549
+ }
397
550
  }
398
551
  }
399
552
  }
@@ -429,25 +582,161 @@
429
582
  },
430
583
  buttons: {
431
584
  primary: {
432
- fill: '#186DFF'
585
+ "default": {
586
+ fill: '#186DFF',
587
+ color: '#FFFFFF',
588
+ borderColor: 'transparent'
589
+ },
590
+ mouseOver: {
591
+ fill: '#1047B0',
592
+ color: '#FFFFFF',
593
+ borderColor: '#71A6FF'
594
+ },
595
+ active: {
596
+ fill: '#186DFF',
597
+ color: '#FFFFFF',
598
+ borderColor: 'transparent'
599
+ },
600
+ activeMouseOver: {},
601
+ disabled: {
602
+ fill: 'transparent',
603
+ color: '#707070',
604
+ borderColor: 'transparent'
605
+ }
433
606
  },
434
- primaryMouseover: {
435
- fill: '#1047B0'
607
+ secondary: {
608
+ "default": {
609
+ fill: '#0876b6',
610
+ color: '#FFFFFF',
611
+ borderColor: 'transparent'
612
+ },
613
+ mouseOver: {
614
+ fill: '#064c84',
615
+ color: '#FFFFFF',
616
+ borderColor: '#3DA6FF'
617
+ },
618
+ active: {
619
+ fill: '#0876b6',
620
+ color: '#FFFFFF',
621
+ borderColor: 'transparent'
622
+ },
623
+ activeMouseOver: {},
624
+ disabled: {
625
+ fill: 'transparent',
626
+ color: '#707070',
627
+ borderColor: 'transparent'
628
+ }
436
629
  },
437
- primaryActive: {
438
- fill: '#186DFF'
630
+ tertiary: {
631
+ "default": {
632
+ fill: 'transparent',
633
+ color: '#575F7A',
634
+ borderColor: '#575F7A'
635
+ },
636
+ mouseOver: {
637
+ fill: '#E3E4E7',
638
+ color: '#575F7A',
639
+ borderColor: '#575F7A'
640
+ },
641
+ active: {
642
+ fill: 'transparent',
643
+ color: '#186DFF',
644
+ borderColor: '#186DFF'
645
+ },
646
+ activeMouseOver: {
647
+ fill: 'rgba(24, 109, 255, 0.1)',
648
+ color: '#186DFF',
649
+ borderColor: '#186DFF'
650
+ },
651
+ disabled: {
652
+ fill: 'transparent',
653
+ color: '#707070',
654
+ borderColor: 'transparent'
655
+ }
439
656
  },
440
- flatMouseover: {
441
- fill: '#E3E4E7'
657
+ flat: {
658
+ "default": {
659
+ fill: 'transparent',
660
+ color: '#575F7A',
661
+ borderColor: 'transparent'
662
+ },
663
+ mouseOver: {
664
+ fill: '#E3E4E7',
665
+ color: '#575F7A',
666
+ borderColor: 'transparent'
667
+ },
668
+ active: {
669
+ fill: 'transparent',
670
+ color: '#186DFF',
671
+ borderColor: 'transparent'
672
+ },
673
+ activeMouseOver: {
674
+ fill: 'rgba(24, 109, 255, 0.1)',
675
+ color: '#186DFF',
676
+ borderColor: 'transparent'
677
+ },
678
+ disabled: {
679
+ fill: 'transparent',
680
+ color: '#707070',
681
+ borderColor: 'transparent'
682
+ }
442
683
  },
443
- focusDefault: {
444
- outline: 'solid 2px #419cfe'
684
+ tool: {
685
+ "default": {
686
+ fill: '#ECEDEE',
687
+ color: '#575F7A',
688
+ borderColor: 'transparent'
689
+ },
690
+ mouseOver: {
691
+ fill: '#E3E4E7',
692
+ color: '#575F7A',
693
+ borderColor: 'transparent'
694
+ },
695
+ active: {
696
+ fill: '#186DFF',
697
+ color: '#FFFFFF',
698
+ borderColor: 'transparent'
699
+ },
700
+ activeMouseOver: {
701
+ fill: '#1047B0',
702
+ color: '#FFFFFF',
703
+ borderColor: 'transparent'
704
+ },
705
+ disabled: {
706
+ fill: 'transparent',
707
+ color: '#707070',
708
+ borderColor: 'transparent'
709
+ }
445
710
  },
446
- disabled: {
447
- fill: '#E8E5E5'
711
+ boxed: {
712
+ "default": {
713
+ fill: 'transparent',
714
+ color: '#575F7A',
715
+ borderColor: '#575f7a'
716
+ },
717
+ mouseOver: {
718
+ fill: '#E3E4E7',
719
+ color: '#575F7A',
720
+ borderColor: '#575f7a'
721
+ },
722
+ active: {
723
+ fill: '#186DFF',
724
+ color: '#FFFFFF',
725
+ borderColor: 'transparent'
726
+ },
727
+ activeMouseOver: {
728
+ fill: '#1047B0',
729
+ color: '#FFFFFF',
730
+ borderColor: 'transparent'
731
+ },
732
+ disabled: {
733
+ fill: 'transparent',
734
+ color: '#707070',
735
+ borderColor: 'transparent'
736
+ }
448
737
  },
449
- surfaceIconDefault: {
450
- fill: '#F5F5F5'
738
+ focusDefault: {
739
+ outline: 'solid 2px #419cfe'
451
740
  }
452
741
  },
453
742
  typographyAndIcons: {
@@ -653,7 +942,7 @@
653
942
  opacity: 1
654
943
  },
655
944
  captionDisabled: {
656
- color: '#767676',
945
+ color: '#707070',
657
946
  opacity: 1
658
947
  }
659
948
  }
@@ -675,7 +964,7 @@
675
964
 
676
965
  var geowebColors = __assign({}, colors$1);
677
966
 
678
- var GWTheme = core.createMuiTheme({
967
+ var GWTheme = material.createTheme({
679
968
  palette: {
680
969
  secondary: {
681
970
  main: '#0075a9'
@@ -744,140 +1033,218 @@
744
1033
  color: '0075a9'
745
1034
  }
746
1035
  },
747
- overrides: {
1036
+ components: {
748
1037
  MuiTooltip: {
749
- tooltip: {
750
- borderRadius: '2px',
751
- fontSize: '16px',
752
- fontWeight: 'normal',
753
- padding: '10px',
754
- backgroundColor: '#232323'
1038
+ styleOverrides: {
1039
+ tooltip: {
1040
+ borderRadius: '2px',
1041
+ fontSize: '16px',
1042
+ fontWeight: 'normal',
1043
+ padding: '10px',
1044
+ backgroundColor: '#232323'
1045
+ }
755
1046
  }
756
1047
  },
757
1048
  MuiIconButton: {
758
- root: {
759
- color: '#0075a9'
1049
+ styleOverrides: {
1050
+ root: {
1051
+ color: '#0075a9'
1052
+ }
760
1053
  }
761
1054
  },
762
1055
  MuiCheckbox: {
763
- root: {
764
- color: '#0075a9'
1056
+ styleOverrides: {
1057
+ root: {
1058
+ '&.Mui-disabled': {
1059
+ color: '#CCCCCC!important'
1060
+ },
1061
+ '&.Mui-checked': {
1062
+ color: '#0075a9'
1063
+ }
1064
+ }
765
1065
  }
766
1066
  },
767
1067
  MuiSelect: {
768
- icon: {
769
- color: '#0075a9'
770
- },
771
- select: {
772
- '&:focus': {
773
- backgroundColor: 'rgba(0, 117, 169, 0.05)'
1068
+ styleOverrides: {
1069
+ icon: {
1070
+ color: '#0075a9'
1071
+ },
1072
+ select: {
1073
+ '&:focus': {
1074
+ backgroundColor: 'rgba(0, 117, 169, 0.05)'
1075
+ }
774
1076
  }
775
1077
  }
776
1078
  },
777
1079
  MuiAlert: {
778
- standardError: {
779
- border: '1px solid #c00000',
780
- borderRadius: '0px',
781
- backgroundColor: '#fff0ea'
782
- },
783
- standardWarning: {
784
- border: '1px solid #ffa800',
785
- borderRadius: '0px',
786
- backgroundColor: '#fff8eb'
787
- },
788
- standardInfo: {
789
- border: '1px solid #0062e6',
790
- borderRadius: '0px',
791
- backgroundColor: '#eaf3ff'
792
- },
793
- standardSuccess: {
794
- border: '1px solid #72bb23',
795
- borderRadius: '0px',
796
- backgroundColor: '#fcffeb'
797
- },
798
- action: {
799
- color: '#0075a9'
800
- },
801
- message: {
802
- fontSize: '14px',
803
- lineHeight: 1.43,
804
- letterSpacing: '0.25px',
805
- color: '#051039'
1080
+ styleOverrides: {
1081
+ standardError: {
1082
+ border: '1px solid #c00000',
1083
+ borderRadius: '0px',
1084
+ backgroundColor: '#fff0ea'
1085
+ },
1086
+ standardWarning: {
1087
+ border: '1px solid #ffa800',
1088
+ borderRadius: '0px',
1089
+ backgroundColor: '#fff8eb'
1090
+ },
1091
+ standardInfo: {
1092
+ border: '1px solid #0062e6',
1093
+ borderRadius: '0px',
1094
+ backgroundColor: '#eaf3ff'
1095
+ },
1096
+ standardSuccess: {
1097
+ border: '1px solid #72bb23',
1098
+ borderRadius: '0px',
1099
+ backgroundColor: '#fcffeb'
1100
+ },
1101
+ action: {
1102
+ color: '#0075a9'
1103
+ },
1104
+ message: {
1105
+ fontSize: '14px',
1106
+ lineHeight: 1.43,
1107
+ letterSpacing: '0.25px',
1108
+ color: '#051039'
1109
+ }
806
1110
  }
807
1111
  },
808
1112
  MuiTabs: {
809
- root: {
810
- backgroundColor: '#ffffff',
811
- minHeight: '30px'
812
- },
813
- scrollButtons: {
814
- width: '20px'
1113
+ styleOverrides: {
1114
+ root: {
1115
+ backgroundColor: '#ffffff',
1116
+ minHeight: '30px'
1117
+ },
1118
+ scrollButtons: {
1119
+ width: '20px'
1120
+ }
815
1121
  }
816
1122
  },
817
1123
  MuiTab: {
818
- root: {
819
- minHeight: '30px',
820
- textTransform: 'none',
821
- minWidth: '76px',
822
- '@media (min-width: 600px)': {
823
- minWidth: '76px'
1124
+ styleOverrides: {
1125
+ root: {
1126
+ minHeight: '30px',
1127
+ textTransform: 'none',
1128
+ minWidth: '76px',
1129
+ '@media (min-width: 600px)': {
1130
+ minWidth: '76px'
1131
+ }
1132
+ },
1133
+ labelIcon: {
1134
+ minHeight: '30px'
824
1135
  }
825
- },
826
- labelIcon: {
827
- minHeight: '30px'
828
1136
  }
829
1137
  },
830
1138
  MuiListItem: {
831
- root: {
832
- '&$selected': {
833
- backgroundColor: 'rgba(0, 117, 169, 0.15)',
834
- borderLeft: '4px solid #0075a9',
1139
+ styleOverrides: {
1140
+ root: {
1141
+ '&$selected': {
1142
+ backgroundColor: 'rgba(0, 117, 169, 0.15)',
1143
+ borderLeft: '4px solid #0075a9',
1144
+ '&:hover': {
1145
+ backgroundColor: 'rgba(0, 117, 169, 0.10)'
1146
+ }
1147
+ }
1148
+ },
1149
+ button: {
835
1150
  '&:hover': {
836
- backgroundColor: 'rgba(0, 117, 169, 0.10)'
1151
+ backgroundColor: 'rgba(0, 117, 169, 0.15)'
837
1152
  }
838
1153
  }
839
- },
840
- button: {
841
- '&:hover': {
842
- backgroundColor: 'rgba(0, 117, 169, 0.15)'
1154
+ }
1155
+ },
1156
+ MuiMenuItem: {
1157
+ styleOverrides: {
1158
+ root: {
1159
+ '&.Mui-selected': {
1160
+ backgroundColor: 'rgba(0, 117, 169, 0.15)',
1161
+ borderLeft: '4px solid #0075a9',
1162
+ '&:hover': {
1163
+ backgroundColor: 'rgba(0, 117, 169, 0.10)'
1164
+ }
1165
+ },
1166
+ '&:hover': {
1167
+ backgroundColor: 'rgba(0, 117, 169, 0.15)'
1168
+ }
843
1169
  }
844
1170
  }
845
1171
  },
846
1172
  MuiFormLabel: {
847
- root: {
848
- color: 'rgba(5, 16, 57, 0.7)',
849
- '&$focused': {
850
- color: '#0075a9'
1173
+ styleOverrides: {
1174
+ root: {
1175
+ color: 'rgba(5, 16, 57, 0.7)',
1176
+ '&.Mui-focused': {
1177
+ color: '#0075a9'
1178
+ },
1179
+ '&.Mui-error': {
1180
+ color: '#d32f2f!important'
1181
+ }
851
1182
  }
852
1183
  }
853
1184
  },
854
1185
  MuiOutlinedInput: {
855
- root: {
856
- '&$focused $notchedOutline': {
857
- borderColor: '#0075a9'
1186
+ styleOverrides: {
1187
+ root: {
1188
+ '&$focused $notchedOutline': {
1189
+ borderColor: '#0075a9'
1190
+ }
858
1191
  }
859
1192
  }
860
1193
  },
861
1194
  MuiFilledInput: {
862
- root: {
863
- backgroundColor: 'rgba(0, 117, 169, 0.05)',
864
- color: '#051039',
865
- '&$disabled': {
866
- backgroundColor: 'transparent'
1195
+ styleOverrides: {
1196
+ root: {
1197
+ backgroundColor: 'rgba(0, 117, 169, 0.05)',
1198
+ color: '#051039',
1199
+ '&.Mui-disabled': {
1200
+ backgroundColor: 'white'
1201
+ },
1202
+ '&.Mui-focused': {
1203
+ backgroundColor: 'rgba(0,0,0,0.09)'
1204
+ }
1205
+ },
1206
+ underline: {
1207
+ '&.Mui-disabled:before': {
1208
+ borderBottomStyle: 'none'
1209
+ }
867
1210
  }
868
- },
869
- underline: {
870
- '&$disabled:before': {
871
- borderBottomStyle: 'none'
1211
+ }
1212
+ },
1213
+ MuiRadio: {
1214
+ styleOverrides: {
1215
+ root: {
1216
+ '&.Mui-disabled': {
1217
+ color: '#CCCCCC!important'
1218
+ },
1219
+ '&.Mui-checked': {
1220
+ color: '#0075a9'
1221
+ }
872
1222
  }
873
1223
  }
874
1224
  },
875
1225
  MuiCardContent: {
876
- root: {
877
- '&:last-child': {
878
- paddingBottom: 0
1226
+ styleOverrides: {
1227
+ root: {
1228
+ '&:last-child': {
1229
+ paddingBottom: 0
1230
+ }
1231
+ }
1232
+ }
1233
+ },
1234
+ MuiDialog: {
1235
+ styleOverrides: {
1236
+ paperWidthLg: {
1237
+ maxWidth: '1280px'
879
1238
  }
880
1239
  }
1240
+ },
1241
+ MuiButton: {
1242
+ variants: buttonVariants(geowebColors.buttons)
1243
+ },
1244
+ MuiToggleButton: {
1245
+ styleOverrides: {
1246
+ root: toggleButtonStyle(buttonVariants(geowebColors.buttons))
1247
+ }
881
1248
  }
882
1249
  }
883
1250
  });
@@ -910,25 +1277,161 @@
910
1277
  },
911
1278
  buttons: {
912
1279
  primary: {
913
- fill: '#186DFF'
1280
+ "default": {
1281
+ fill: '#186DFF',
1282
+ color: '#FFFFFF',
1283
+ borderColor: 'transparent'
1284
+ },
1285
+ mouseOver: {
1286
+ fill: '#1047B0',
1287
+ color: '#FFFFFF',
1288
+ borderColor: '#71A6FF'
1289
+ },
1290
+ active: {
1291
+ fill: '#186DFF',
1292
+ color: '#FFFFFF',
1293
+ borderColor: 'transparent'
1294
+ },
1295
+ activeMouseOver: {},
1296
+ disabled: {
1297
+ fill: 'transparent',
1298
+ color: '#B0B0B0',
1299
+ borderColor: 'transparent'
1300
+ }
914
1301
  },
915
- primaryMouseover: {
916
- fill: '#1047B0'
1302
+ secondary: {
1303
+ "default": {
1304
+ fill: '#0876b6',
1305
+ color: '#FFFFFF',
1306
+ borderColor: 'transparent'
1307
+ },
1308
+ mouseOver: {
1309
+ fill: '#064C84',
1310
+ color: '#FFFFFF',
1311
+ borderColor: '#3DA6FF'
1312
+ },
1313
+ active: {
1314
+ fill: '#0876B6',
1315
+ color: '#FFFFFF',
1316
+ borderColor: 'transparent'
1317
+ },
1318
+ activeMouseOver: {},
1319
+ disabled: {
1320
+ fill: 'transparent',
1321
+ color: '#707070',
1322
+ borderColor: 'transparent'
1323
+ }
917
1324
  },
918
- primaryActive: {
919
- fill: '#186DFF'
1325
+ tertiary: {
1326
+ "default": {
1327
+ fill: 'transparent',
1328
+ color: '#E5E5E5',
1329
+ borderColor: '#E5E5E5'
1330
+ },
1331
+ mouseOver: {
1332
+ fill: '#494949',
1333
+ color: '#E5E5E5',
1334
+ borderColor: '#E5E5E5'
1335
+ },
1336
+ active: {
1337
+ fill: 'transparent',
1338
+ color: '#488BFD',
1339
+ borderColor: '#48A8FA'
1340
+ },
1341
+ activeMouseOver: {
1342
+ fill: 'rgba(24, 109, 255, 0.1)',
1343
+ color: '#488BFD',
1344
+ borderColor: '#488BFD'
1345
+ },
1346
+ disabled: {
1347
+ fill: 'transparent',
1348
+ color: '#B0B0B0',
1349
+ borderColor: 'transparent'
1350
+ }
920
1351
  },
921
- flatMouseover: {
922
- fill: '#242424'
1352
+ flat: {
1353
+ "default": {
1354
+ fill: 'transparent',
1355
+ color: '#E5E5E5',
1356
+ borderColor: 'transparent'
1357
+ },
1358
+ mouseOver: {
1359
+ fill: '#494949',
1360
+ color: '#E5E5E5',
1361
+ borderColor: 'transparent'
1362
+ },
1363
+ active: {
1364
+ fill: 'transparent',
1365
+ color: '#488BFD',
1366
+ borderColor: 'transparent'
1367
+ },
1368
+ activeMouseOver: {
1369
+ fill: 'rgba(24, 109, 255, 0.1)',
1370
+ color: '#488BFD',
1371
+ borderColor: 'transparent'
1372
+ },
1373
+ disabled: {
1374
+ fill: 'transparent',
1375
+ color: '#B0B0B0',
1376
+ borderColor: 'transparent'
1377
+ }
923
1378
  },
924
- focusDefault: {
925
- outline: 'solid 2px #419cfe'
1379
+ tool: {
1380
+ "default": {
1381
+ fill: '#393939',
1382
+ color: '#E5E5E5',
1383
+ borderColor: 'transparent'
1384
+ },
1385
+ mouseOver: {
1386
+ fill: '#494949',
1387
+ color: '#E5E5E5',
1388
+ borderColor: 'transparent'
1389
+ },
1390
+ active: {
1391
+ fill: '#186DFF',
1392
+ color: '#FFFFFF',
1393
+ borderColor: 'transparent'
1394
+ },
1395
+ activeMouseOver: {
1396
+ fill: '#1047B0',
1397
+ color: '#FFFFFF',
1398
+ borderColor: 'transparent'
1399
+ },
1400
+ disabled: {
1401
+ fill: 'transparent',
1402
+ color: '#B0B0B0',
1403
+ borderColor: 'transparent'
1404
+ }
926
1405
  },
927
- disabled: {
928
- fill: '#303030'
1406
+ boxed: {
1407
+ "default": {
1408
+ fill: 'transparent',
1409
+ color: '#E5E5E5',
1410
+ borderColor: '#e5e5e5'
1411
+ },
1412
+ mouseOver: {
1413
+ fill: '#494949',
1414
+ color: '#E5E5E5',
1415
+ borderColor: '#e5e5e5'
1416
+ },
1417
+ active: {
1418
+ fill: '#186DFF',
1419
+ color: '#FFFFFF',
1420
+ borderColor: 'transparent'
1421
+ },
1422
+ activeMouseOver: {
1423
+ fill: '#1047B0',
1424
+ color: '#FFFFFF',
1425
+ borderColor: 'transparent'
1426
+ },
1427
+ disabled: {
1428
+ fill: 'transparent',
1429
+ color: '#B0B0B0',
1430
+ borderColor: 'transparent'
1431
+ }
929
1432
  },
930
- surfaceIconDefault: {
931
- fill: '#2B2B2B'
1433
+ focusDefault: {
1434
+ outline: 'solid 2px #419cfe'
932
1435
  }
933
1436
  },
934
1437
  typographyAndIcons: {
@@ -1134,7 +1637,7 @@
1134
1637
  opacity: 1
1135
1638
  },
1136
1639
  captionDisabled: {
1137
- color: '#909090',
1640
+ color: '#B0B0B0',
1138
1641
  opacity: 1
1139
1642
  }
1140
1643
  }
@@ -1182,9 +1685,9 @@
1182
1685
  toggleTheme: toggleTheme,
1183
1686
  isDark: isDark
1184
1687
  }
1185
- }, /*#__PURE__*/React__namespace.createElement(core.ThemeProvider, {
1688
+ }, /*#__PURE__*/React__namespace.createElement(material.ThemeProvider, {
1186
1689
  theme: currentTheme
1187
- }, !disableCssBaseline && /*#__PURE__*/React__namespace.createElement(core.CssBaseline, null), children));
1690
+ }, !disableCssBaseline && /*#__PURE__*/React__namespace.createElement(material.CssBaseline, null), children));
1188
1691
  };
1189
1692
  var useThemeContext = function useThemeContext() {
1190
1693
  return React__namespace.useContext(ThemeContext);
@@ -1196,10 +1699,12 @@
1196
1699
  theme = _b === void 0 ? lightTheme : _b,
1197
1700
  _c = _a.disableCssBaseline,
1198
1701
  disableCssBaseline = _c === void 0 ? false : _c;
1199
- return /*#__PURE__*/React__namespace.createElement(ThemeProvider, {
1702
+ return /*#__PURE__*/React__namespace.createElement(material.StyledEngineProvider, {
1703
+ injectFirst: true
1704
+ }, /*#__PURE__*/React__namespace.createElement(ThemeProvider, {
1200
1705
  theme: theme,
1201
1706
  disableCssBaseline: disableCssBaseline
1202
- }, children);
1707
+ }, children));
1203
1708
  }; // Wrapper for storybook stories with GWTheme. Will be deprecated
1204
1709
 
1205
1710
  var ThemeWrapperOldTheme = function ThemeWrapperOldTheme(_a) {
@@ -1218,6 +1723,7 @@
1218
1723
  exports.ThemeWrapper = ThemeWrapper;
1219
1724
  exports.ThemeWrapperOldTheme = ThemeWrapperOldTheme;
1220
1725
  exports.darkTheme = darkTheme;
1726
+ exports.gwButtonVariants = gwButtonVariants;
1221
1727
  exports.lightTheme = lightTheme;
1222
1728
  exports.useThemeContext = useThemeContext;
1223
1729