@opengeoweb/theme 2.2.1 → 2.4.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.
package/index.esm.js CHANGED
@@ -90,18 +90,12 @@ function _nonIterableRest() {
90
90
  * */
91
91
  var gwButtonVariants = ['primary', 'secondary', 'tertiary', 'flat', 'tool', 'boxed'];
92
92
 
93
- var buttonStyle = function buttonStyle(button) {
93
+ var defaultButtonStyle = function defaultButtonStyle(button) {
94
94
  return {
95
95
  // default styling
96
96
  color: button["default"].color,
97
97
  backgroundColor: button["default"].fill,
98
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
99
  // hover styling
106
100
  '&:hover': {
107
101
  backgroundColor: button.mouseOver.fill,
@@ -121,7 +115,17 @@ var buttonStyle = function buttonStyle(button) {
121
115
  backgroundColor: button.disabled.fill,
122
116
  color: button.disabled.color,
123
117
  borderColor: button.disabled.borderColor
124
- },
118
+ }
119
+ };
120
+ };
121
+ var buttonStyle = function buttonStyle(button) {
122
+ return Object.assign(Object.assign({}, defaultButtonStyle(button)), {
123
+ padding: '12px 8px',
124
+ height: '40px',
125
+ borderStyle: 'solid',
126
+ borderWidth: '1px',
127
+ borderColor: button["default"].borderColor,
128
+ borderRadius: '5px',
125
129
  // size styling
126
130
  '&[class*="sizeSmall"]': {
127
131
  fontSize: '12px',
@@ -135,9 +139,9 @@ var buttonStyle = function buttonStyle(button) {
135
139
  fontSize: '26px'
136
140
  }
137
141
  }
138
- };
142
+ });
139
143
  };
140
- var toggleButtonStyle = function toggleButtonStyle(buttonVariants) {
144
+ var variantsToClassName = function variantsToClassName(buttonVariants) {
141
145
  return buttonVariants.reduce(function (variants, _ref) {
142
146
  var variant = _ref.props.variant,
143
147
  style = _ref.style;
@@ -204,8 +208,24 @@ var createShadows = function createShadows(elevations) {
204
208
  });
205
209
  };
206
210
  var BORDER_RADIUS = 3;
211
+ var breakpoints = {
212
+ mobile: 0,
213
+ tablet: 768,
214
+ desktop: 1024,
215
+ dekstopHD: 1440,
216
+ dekstopHDWide: 1920
217
+ };
207
218
  var createTheme = function createTheme(paletteType, geowebColors, shadows) {
208
219
  return createTheme$1({
220
+ breakpoints: {
221
+ values: {
222
+ xs: breakpoints.mobile,
223
+ sm: breakpoints.tablet,
224
+ md: breakpoints.desktop,
225
+ lg: breakpoints.dekstopHD,
226
+ xl: breakpoints.dekstopHDWide
227
+ }
228
+ },
209
229
  palette: {
210
230
  mode: paletteType,
211
231
  secondary: {
@@ -234,7 +254,13 @@ var createTheme = function createTheme(paletteType, geowebColors, shadows) {
234
254
  },
235
255
  MuiToggleButton: {
236
256
  styleOverrides: {
237
- root: toggleButtonStyle(buttonVariants(geowebColors.buttons))
257
+ root: variantsToClassName(buttonVariants(geowebColors.buttons))
258
+ }
259
+ },
260
+ MuiIconButton: {
261
+ // TODO: https://gitlab.com/opengeoweb/opengeoweb/-/issues/1926 remove default styling and create CustomIconButton
262
+ styleOverrides: {
263
+ root: defaultButtonStyle(geowebColors.buttons.flat)
238
264
  }
239
265
  },
240
266
  MuiCssBaseline: {
@@ -243,17 +269,16 @@ var createTheme = function createTheme(paletteType, geowebColors, shadows) {
243
269
  MuiMenuItem: {
244
270
  styleOverrides: {
245
271
  root: {
272
+ minHeight: '48px!important',
246
273
  fontSize: '0.875rem',
247
274
  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
275
+ divider: {
276
+ borderBottomColor: geowebColors.greys.accessibleLight
277
+ },
278
+ li: {
279
+ '&:hover': {
280
+ backgroundColor: geowebColors.tab.mouseOver.rgba
281
+ }
257
282
  },
258
283
  '&.Mui-selected': {
259
284
  background: 'none',
@@ -404,13 +429,23 @@ var createTheme = function createTheme(paletteType, geowebColors, shadows) {
404
429
  styleOverrides: {
405
430
  root: {
406
431
  color: geowebColors.typographyAndIcons.text,
407
- fontSize: '14px'
432
+ fontSize: '14px',
433
+ minHeight: '36px'
408
434
  },
409
435
  divider: {
410
436
  borderBottomColor: hex2rgba(geowebColors.greys.accessible, 0.2)
411
437
  }
412
438
  }
413
439
  },
440
+ MuiListItemIcon: {
441
+ styleOverrides: {
442
+ root: {
443
+ color: geowebColors.typographyAndIcons.icon,
444
+ width: '24px',
445
+ height: '24px'
446
+ }
447
+ }
448
+ },
414
449
  MuiBackdrop: {
415
450
  styleOverrides: {
416
451
  root: {
@@ -445,54 +480,82 @@ var createTheme = function createTheme(paletteType, geowebColors, shadows) {
445
480
  }
446
481
  }
447
482
  },
448
- // TODO: implement correct theming values https://gitlab.com/opengeoweb/opengeoweb/-/issues/1369
449
483
  MuiAlert: {
450
484
  styleOverrides: {
451
485
  standardError: {
452
- border: '1px solid #c00000',
486
+ border: geowebColors.functional.errorOutline.border,
453
487
  borderRadius: '0px',
454
- backgroundColor: '#fff0ea'
488
+ backgroundColor: geowebColors.functional.errorOutline.fill,
489
+ '& .MuiAlert-icon': {
490
+ color: geowebColors.functional.error,
491
+ opacity: 1
492
+ }
455
493
  },
456
494
  standardWarning: {
457
- border: '1px solid #ffa800',
495
+ border: geowebColors.functional.warningOutline.border,
458
496
  borderRadius: '0px',
459
- backgroundColor: '#fff8eb'
497
+ backgroundColor: geowebColors.functional.warningOutline.fill,
498
+ '& .MuiAlert-icon': {
499
+ color: geowebColors.functional.warning,
500
+ opacity: 1
501
+ }
460
502
  },
461
503
  standardInfo: {
462
- border: '1px solid #0062e6',
504
+ border: geowebColors.functional.notificationOutline.border,
463
505
  borderRadius: '0px',
464
- backgroundColor: '#eaf3ff'
506
+ backgroundColor: geowebColors.functional.notificationOutline.fill,
507
+ '& .MuiAlert-icon': {
508
+ color: geowebColors.functional.notification,
509
+ opacity: 1
510
+ }
465
511
  },
466
512
  standardSuccess: {
467
- border: '1px solid #72bb23',
513
+ border: geowebColors.functional.successOutline.border,
468
514
  borderRadius: '0px',
469
- backgroundColor: '#fcffeb'
515
+ backgroundColor: geowebColors.functional.successOutline.fill,
516
+ '& .MuiAlert-icon': {
517
+ color: geowebColors.functional.success,
518
+ opacity: 1
519
+ }
470
520
  },
471
521
  action: {
472
- color: '#0075a9'
522
+ color: geowebColors.buttons.tertiary["default"].color
473
523
  },
474
524
  message: {
475
525
  fontSize: '14px',
476
526
  lineHeight: 1.43,
477
527
  letterSpacing: '0.25px',
478
- color: '#051039'
528
+ color: geowebColors.typographyAndIcons.text
479
529
  }
480
530
  }
481
531
  },
532
+ MuiTextField: {
533
+ defaultProps: {
534
+ variant: 'filled'
535
+ }
536
+ },
482
537
  MuiFilledInput: {
483
538
  styleOverrides: {
484
539
  root: {
485
540
  backgroundColor: geowebColors.textInputField["default"].rgba,
486
541
  '&.Mui-focused': {
487
- backgroundColor: geowebColors.textInputField.active.rgba
542
+ backgroundColor: geowebColors.textInputField.active.rgba,
543
+ '&:after': {
544
+ borderColor: 'transparent'
545
+ }
488
546
  },
489
547
  '&.Mui-disabled': {
490
548
  backgroundColor: geowebColors.textInputField.disabled.rgba
549
+ },
550
+ '&.Mui-error': {
551
+ '&:after': {
552
+ borderColor: geowebColors.captions.captionError.color
553
+ }
491
554
  }
492
555
  },
493
556
  underline: {
494
557
  '&:after': {
495
- borderBottom: 'transparent'
558
+ borderWidth: '1px'
496
559
  },
497
560
  '&.Mui-disabled:before': {
498
561
  borderBottomStyle: 'solid'
@@ -755,7 +818,8 @@ var colors$1 = {
755
818
  }
756
819
  },
757
820
  greys: {
758
- accessible: '#767676'
821
+ accessible: '#767676',
822
+ accessibleLight: '#C5C5C5'
759
823
  },
760
824
  cards: {
761
825
  cardContainer: '#FFFFFF',
@@ -836,6 +900,10 @@ var colors$1 = {
836
900
  fill: '#767676',
837
901
  opacity: 0.5
838
902
  },
903
+ timelineSelectionBackground: {
904
+ fill: '#11D1C6',
905
+ opacity: 0.25
906
+ },
839
907
  // time scale
840
908
  timeScaleText: {
841
909
  fontSize: 12
@@ -875,10 +943,6 @@ var colors$1 = {
875
943
  }
876
944
  },
877
945
  layerManager: {
878
- tableRowDefaultIcon: {
879
- fill: '#051039',
880
- opacity: 0.67
881
- },
882
946
  tableRowDefaultText: {
883
947
  color: '#051039',
884
948
  opacity: 0.87,
@@ -888,13 +952,6 @@ var colors$1 = {
888
952
  fill: '#FFFFFF',
889
953
  border: '1px solid #EEEEEE'
890
954
  },
891
- tableRowMouseover: {
892
- fill: '#051039',
893
- opacity: 0.07
894
- },
895
- tableRowDisabledIcon: {
896
- fill: '#767676'
897
- },
898
955
  tableRowDisabledText: {
899
956
  color: '#767676',
900
957
  opacity: 0.87,
@@ -931,6 +988,32 @@ var colors$1 = {
931
988
  color: '#707070',
932
989
  opacity: 1
933
990
  }
991
+ },
992
+ functional: {
993
+ success: '#72BB23',
994
+ successOutline: {
995
+ fill: '#FCFFEB',
996
+ border: ' 1px solid #72BB23'
997
+ },
998
+ error: '#C00000',
999
+ errorOutline: {
1000
+ fill: '#F9E8EA',
1001
+ border: '1px solid #C00000'
1002
+ },
1003
+ warning: '#FFA800',
1004
+ warningOutline: {
1005
+ fill: '#FFF8EB',
1006
+ border: '1px solid #FFA800'
1007
+ },
1008
+ warningHighlight: {
1009
+ fill: '#FFA800',
1010
+ opacity: 0.2
1011
+ },
1012
+ notification: '#0062E6',
1013
+ notificationOutline: {
1014
+ fill: '#DFF2FD',
1015
+ border: '1px solid #0062E6'
1016
+ }
934
1017
  }
935
1018
  }; // https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/609bb6a5287bd1abe0de39a7
936
1019
 
@@ -1245,7 +1328,7 @@ var GWTheme = createTheme$1({
1245
1328
  },
1246
1329
  MuiToggleButton: {
1247
1330
  styleOverrides: {
1248
- root: toggleButtonStyle(buttonVariants(geowebColors.buttons))
1331
+ root: variantsToClassName(buttonVariants(geowebColors.buttons))
1249
1332
  }
1250
1333
  }
1251
1334
  }
@@ -1493,7 +1576,8 @@ var colors = {
1493
1576
  }
1494
1577
  },
1495
1578
  greys: {
1496
- accessible: '#A2A2A2'
1579
+ accessible: '#A2A2A2',
1580
+ accessibleLight: '#6F6F6F'
1497
1581
  },
1498
1582
  cards: {
1499
1583
  cardContainer: '#303030',
@@ -1574,6 +1658,10 @@ var colors = {
1574
1658
  fill: '#A2A2A2',
1575
1659
  opacity: 0.5
1576
1660
  },
1661
+ timelineSelectionBackground: {
1662
+ fill: '#11D1C6',
1663
+ opacity: 0.25
1664
+ },
1577
1665
  // time scale
1578
1666
  timeScaleText: {
1579
1667
  fontSize: 12
@@ -1613,10 +1701,6 @@ var colors = {
1613
1701
  }
1614
1702
  },
1615
1703
  layerManager: {
1616
- tableRowDefaultIcon: {
1617
- fill: '#C5C5C5',
1618
- opacity: 1
1619
- },
1620
1704
  tableRowDefaultText: {
1621
1705
  color: '#FFFFFF',
1622
1706
  opacity: 0.87,
@@ -1626,13 +1710,6 @@ var colors = {
1626
1710
  fill: '#303030',
1627
1711
  border: '1px solid #404040'
1628
1712
  },
1629
- tableRowMouseover: {
1630
- fill: '#000000',
1631
- opacity: 0.15
1632
- },
1633
- tableRowDisabledIcon: {
1634
- fill: '#A2A2A2'
1635
- },
1636
1713
  tableRowDisabledText: {
1637
1714
  color: '#909090',
1638
1715
  opacity: 0.87,
@@ -1669,6 +1746,32 @@ var colors = {
1669
1746
  color: '#B0B0B0',
1670
1747
  opacity: 1
1671
1748
  }
1749
+ },
1750
+ functional: {
1751
+ success: '#72BB23',
1752
+ successOutline: {
1753
+ fill: 'rgba(114, 187, 35, 0.25)',
1754
+ border: ' 1px solid #72BB23'
1755
+ },
1756
+ error: '#C00000',
1757
+ errorOutline: {
1758
+ fill: 'rgba(192, 0, 0, 0.25)',
1759
+ border: '1px solid #C00000'
1760
+ },
1761
+ warning: '#FFA800',
1762
+ warningOutline: {
1763
+ fill: 'rgba(255, 168, 0, 0.25)',
1764
+ border: '1px solid #FFA800'
1765
+ },
1766
+ warningHighlight: {
1767
+ fill: '#FFA800',
1768
+ opacity: 0.2
1769
+ },
1770
+ notification: '#186DFF',
1771
+ notificationOutline: {
1772
+ fill: 'rgba(24, 109, 255, 0.25)',
1773
+ border: '1px solid #186DFF'
1774
+ }
1672
1775
  }
1673
1776
  }; // https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/6093e694124ecf3886de76d4
1674
1777
 
package/index.umd.js CHANGED
@@ -97,18 +97,12 @@
97
97
  * */
98
98
  var gwButtonVariants = ['primary', 'secondary', 'tertiary', 'flat', 'tool', 'boxed'];
99
99
 
100
- var buttonStyle = function buttonStyle(button) {
100
+ var defaultButtonStyle = function defaultButtonStyle(button) {
101
101
  return {
102
102
  // default styling
103
103
  color: button["default"].color,
104
104
  backgroundColor: button["default"].fill,
105
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
106
  // hover styling
113
107
  '&:hover': {
114
108
  backgroundColor: button.mouseOver.fill,
@@ -128,7 +122,17 @@
128
122
  backgroundColor: button.disabled.fill,
129
123
  color: button.disabled.color,
130
124
  borderColor: button.disabled.borderColor
131
- },
125
+ }
126
+ };
127
+ };
128
+ var buttonStyle = function buttonStyle(button) {
129
+ return __assign(__assign({}, defaultButtonStyle(button)), {
130
+ padding: '12px 8px',
131
+ height: '40px',
132
+ borderStyle: 'solid',
133
+ borderWidth: '1px',
134
+ borderColor: button["default"].borderColor,
135
+ borderRadius: '5px',
132
136
  // size styling
133
137
  '&[class*="sizeSmall"]': {
134
138
  fontSize: '12px',
@@ -142,9 +146,9 @@
142
146
  fontSize: '26px'
143
147
  }
144
148
  }
145
- };
149
+ });
146
150
  };
147
- var toggleButtonStyle = function toggleButtonStyle(buttonVariants) {
151
+ var variantsToClassName = function variantsToClassName(buttonVariants) {
148
152
  return buttonVariants.reduce(function (variants, _a) {
149
153
  var _b;
150
154
 
@@ -218,8 +222,24 @@
218
222
  });
219
223
  };
220
224
  var BORDER_RADIUS = 3;
225
+ var breakpoints = {
226
+ mobile: 0,
227
+ tablet: 768,
228
+ desktop: 1024,
229
+ dekstopHD: 1440,
230
+ dekstopHDWide: 1920
231
+ };
221
232
  var createTheme = function createTheme(paletteType, geowebColors, shadows) {
222
233
  return material.createTheme({
234
+ breakpoints: {
235
+ values: {
236
+ xs: breakpoints.mobile,
237
+ sm: breakpoints.tablet,
238
+ md: breakpoints.desktop,
239
+ lg: breakpoints.dekstopHD,
240
+ xl: breakpoints.dekstopHDWide
241
+ }
242
+ },
223
243
  palette: {
224
244
  mode: paletteType,
225
245
  secondary: {
@@ -248,7 +268,13 @@
248
268
  },
249
269
  MuiToggleButton: {
250
270
  styleOverrides: {
251
- root: toggleButtonStyle(buttonVariants(geowebColors.buttons))
271
+ root: variantsToClassName(buttonVariants(geowebColors.buttons))
272
+ }
273
+ },
274
+ MuiIconButton: {
275
+ // TODO: https://gitlab.com/opengeoweb/opengeoweb/-/issues/1926 remove default styling and create CustomIconButton
276
+ styleOverrides: {
277
+ root: defaultButtonStyle(geowebColors.buttons.flat)
252
278
  }
253
279
  },
254
280
  MuiCssBaseline: {
@@ -257,17 +283,16 @@
257
283
  MuiMenuItem: {
258
284
  styleOverrides: {
259
285
  root: {
286
+ minHeight: '48px!important',
260
287
  fontSize: '0.875rem',
261
288
  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
289
+ divider: {
290
+ borderBottomColor: geowebColors.greys.accessibleLight
291
+ },
292
+ li: {
293
+ '&:hover': {
294
+ backgroundColor: geowebColors.tab.mouseOver.rgba
295
+ }
271
296
  },
272
297
  '&.Mui-selected': {
273
298
  background: 'none',
@@ -418,13 +443,23 @@
418
443
  styleOverrides: {
419
444
  root: {
420
445
  color: geowebColors.typographyAndIcons.text,
421
- fontSize: '14px'
446
+ fontSize: '14px',
447
+ minHeight: '36px'
422
448
  },
423
449
  divider: {
424
450
  borderBottomColor: hex2rgba(geowebColors.greys.accessible, 0.2)
425
451
  }
426
452
  }
427
453
  },
454
+ MuiListItemIcon: {
455
+ styleOverrides: {
456
+ root: {
457
+ color: geowebColors.typographyAndIcons.icon,
458
+ width: '24px',
459
+ height: '24px'
460
+ }
461
+ }
462
+ },
428
463
  MuiBackdrop: {
429
464
  styleOverrides: {
430
465
  root: {
@@ -459,54 +494,82 @@
459
494
  }
460
495
  }
461
496
  },
462
- // TODO: implement correct theming values https://gitlab.com/opengeoweb/opengeoweb/-/issues/1369
463
497
  MuiAlert: {
464
498
  styleOverrides: {
465
499
  standardError: {
466
- border: '1px solid #c00000',
500
+ border: geowebColors.functional.errorOutline.border,
467
501
  borderRadius: '0px',
468
- backgroundColor: '#fff0ea'
502
+ backgroundColor: geowebColors.functional.errorOutline.fill,
503
+ '& .MuiAlert-icon': {
504
+ color: geowebColors.functional.error,
505
+ opacity: 1
506
+ }
469
507
  },
470
508
  standardWarning: {
471
- border: '1px solid #ffa800',
509
+ border: geowebColors.functional.warningOutline.border,
472
510
  borderRadius: '0px',
473
- backgroundColor: '#fff8eb'
511
+ backgroundColor: geowebColors.functional.warningOutline.fill,
512
+ '& .MuiAlert-icon': {
513
+ color: geowebColors.functional.warning,
514
+ opacity: 1
515
+ }
474
516
  },
475
517
  standardInfo: {
476
- border: '1px solid #0062e6',
518
+ border: geowebColors.functional.notificationOutline.border,
477
519
  borderRadius: '0px',
478
- backgroundColor: '#eaf3ff'
520
+ backgroundColor: geowebColors.functional.notificationOutline.fill,
521
+ '& .MuiAlert-icon': {
522
+ color: geowebColors.functional.notification,
523
+ opacity: 1
524
+ }
479
525
  },
480
526
  standardSuccess: {
481
- border: '1px solid #72bb23',
527
+ border: geowebColors.functional.successOutline.border,
482
528
  borderRadius: '0px',
483
- backgroundColor: '#fcffeb'
529
+ backgroundColor: geowebColors.functional.successOutline.fill,
530
+ '& .MuiAlert-icon': {
531
+ color: geowebColors.functional.success,
532
+ opacity: 1
533
+ }
484
534
  },
485
535
  action: {
486
- color: '#0075a9'
536
+ color: geowebColors.buttons.tertiary["default"].color
487
537
  },
488
538
  message: {
489
539
  fontSize: '14px',
490
540
  lineHeight: 1.43,
491
541
  letterSpacing: '0.25px',
492
- color: '#051039'
542
+ color: geowebColors.typographyAndIcons.text
493
543
  }
494
544
  }
495
545
  },
546
+ MuiTextField: {
547
+ defaultProps: {
548
+ variant: 'filled'
549
+ }
550
+ },
496
551
  MuiFilledInput: {
497
552
  styleOverrides: {
498
553
  root: {
499
554
  backgroundColor: geowebColors.textInputField["default"].rgba,
500
555
  '&.Mui-focused': {
501
- backgroundColor: geowebColors.textInputField.active.rgba
556
+ backgroundColor: geowebColors.textInputField.active.rgba,
557
+ '&:after': {
558
+ borderColor: 'transparent'
559
+ }
502
560
  },
503
561
  '&.Mui-disabled': {
504
562
  backgroundColor: geowebColors.textInputField.disabled.rgba
563
+ },
564
+ '&.Mui-error': {
565
+ '&:after': {
566
+ borderColor: geowebColors.captions.captionError.color
567
+ }
505
568
  }
506
569
  },
507
570
  underline: {
508
571
  '&:after': {
509
- borderBottom: 'transparent'
572
+ borderWidth: '1px'
510
573
  },
511
574
  '&.Mui-disabled:before': {
512
575
  borderBottomStyle: 'solid'
@@ -769,7 +832,8 @@
769
832
  }
770
833
  },
771
834
  greys: {
772
- accessible: '#767676'
835
+ accessible: '#767676',
836
+ accessibleLight: '#C5C5C5'
773
837
  },
774
838
  cards: {
775
839
  cardContainer: '#FFFFFF',
@@ -850,6 +914,10 @@
850
914
  fill: '#767676',
851
915
  opacity: 0.5
852
916
  },
917
+ timelineSelectionBackground: {
918
+ fill: '#11D1C6',
919
+ opacity: 0.25
920
+ },
853
921
  // time scale
854
922
  timeScaleText: {
855
923
  fontSize: 12
@@ -889,10 +957,6 @@
889
957
  }
890
958
  },
891
959
  layerManager: {
892
- tableRowDefaultIcon: {
893
- fill: '#051039',
894
- opacity: 0.67
895
- },
896
960
  tableRowDefaultText: {
897
961
  color: '#051039',
898
962
  opacity: 0.87,
@@ -902,13 +966,6 @@
902
966
  fill: '#FFFFFF',
903
967
  border: '1px solid #EEEEEE'
904
968
  },
905
- tableRowMouseover: {
906
- fill: '#051039',
907
- opacity: 0.07
908
- },
909
- tableRowDisabledIcon: {
910
- fill: '#767676'
911
- },
912
969
  tableRowDisabledText: {
913
970
  color: '#767676',
914
971
  opacity: 0.87,
@@ -945,6 +1002,32 @@
945
1002
  color: '#707070',
946
1003
  opacity: 1
947
1004
  }
1005
+ },
1006
+ functional: {
1007
+ success: '#72BB23',
1008
+ successOutline: {
1009
+ fill: '#FCFFEB',
1010
+ border: ' 1px solid #72BB23'
1011
+ },
1012
+ error: '#C00000',
1013
+ errorOutline: {
1014
+ fill: '#F9E8EA',
1015
+ border: '1px solid #C00000'
1016
+ },
1017
+ warning: '#FFA800',
1018
+ warningOutline: {
1019
+ fill: '#FFF8EB',
1020
+ border: '1px solid #FFA800'
1021
+ },
1022
+ warningHighlight: {
1023
+ fill: '#FFA800',
1024
+ opacity: 0.2
1025
+ },
1026
+ notification: '#0062E6',
1027
+ notificationOutline: {
1028
+ fill: '#DFF2FD',
1029
+ border: '1px solid #0062E6'
1030
+ }
948
1031
  }
949
1032
  }; // https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/609bb6a5287bd1abe0de39a7
950
1033
 
@@ -1243,7 +1326,7 @@
1243
1326
  },
1244
1327
  MuiToggleButton: {
1245
1328
  styleOverrides: {
1246
- root: toggleButtonStyle(buttonVariants(geowebColors.buttons))
1329
+ root: variantsToClassName(buttonVariants(geowebColors.buttons))
1247
1330
  }
1248
1331
  }
1249
1332
  }
@@ -1464,7 +1547,8 @@
1464
1547
  }
1465
1548
  },
1466
1549
  greys: {
1467
- accessible: '#A2A2A2'
1550
+ accessible: '#A2A2A2',
1551
+ accessibleLight: '#6F6F6F'
1468
1552
  },
1469
1553
  cards: {
1470
1554
  cardContainer: '#303030',
@@ -1545,6 +1629,10 @@
1545
1629
  fill: '#A2A2A2',
1546
1630
  opacity: 0.5
1547
1631
  },
1632
+ timelineSelectionBackground: {
1633
+ fill: '#11D1C6',
1634
+ opacity: 0.25
1635
+ },
1548
1636
  // time scale
1549
1637
  timeScaleText: {
1550
1638
  fontSize: 12
@@ -1584,10 +1672,6 @@
1584
1672
  }
1585
1673
  },
1586
1674
  layerManager: {
1587
- tableRowDefaultIcon: {
1588
- fill: '#C5C5C5',
1589
- opacity: 1
1590
- },
1591
1675
  tableRowDefaultText: {
1592
1676
  color: '#FFFFFF',
1593
1677
  opacity: 0.87,
@@ -1597,13 +1681,6 @@
1597
1681
  fill: '#303030',
1598
1682
  border: '1px solid #404040'
1599
1683
  },
1600
- tableRowMouseover: {
1601
- fill: '#000000',
1602
- opacity: 0.15
1603
- },
1604
- tableRowDisabledIcon: {
1605
- fill: '#A2A2A2'
1606
- },
1607
1684
  tableRowDisabledText: {
1608
1685
  color: '#909090',
1609
1686
  opacity: 0.87,
@@ -1640,6 +1717,32 @@
1640
1717
  color: '#B0B0B0',
1641
1718
  opacity: 1
1642
1719
  }
1720
+ },
1721
+ functional: {
1722
+ success: '#72BB23',
1723
+ successOutline: {
1724
+ fill: 'rgba(114, 187, 35, 0.25)',
1725
+ border: ' 1px solid #72BB23'
1726
+ },
1727
+ error: '#C00000',
1728
+ errorOutline: {
1729
+ fill: 'rgba(192, 0, 0, 0.25)',
1730
+ border: '1px solid #C00000'
1731
+ },
1732
+ warning: '#FFA800',
1733
+ warningOutline: {
1734
+ fill: 'rgba(255, 168, 0, 0.25)',
1735
+ border: '1px solid #FFA800'
1736
+ },
1737
+ warningHighlight: {
1738
+ fill: '#FFA800',
1739
+ opacity: 0.2
1740
+ },
1741
+ notification: '#186DFF',
1742
+ notificationOutline: {
1743
+ fill: 'rgba(24, 109, 255, 0.25)',
1744
+ border: '1px solid #186DFF'
1745
+ }
1643
1746
  }
1644
1747
  }; // https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/6093e694124ecf3886de76d4
1645
1748
 
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ interface StoryHeaderProps {
3
+ title: string;
4
+ }
5
+ export declare const StoryHeader: React.FC<StoryHeaderProps>;
6
+ export default StoryHeader;
@@ -0,0 +1 @@
1
+ export * from './StoryHeader';
@@ -1,5 +1,6 @@
1
- import { ComponentsVariants, CSSInterpolation } from '@mui/material';
1
+ import { ComponentsVariants, CSSInterpolation, CSSObject } from '@mui/material';
2
2
  import { ButtonStyles, ButtonStyle } from './types';
3
+ export declare const defaultButtonStyle: (button: ButtonStyle) => CSSObject;
3
4
  export declare const buttonStyle: (button: ButtonStyle) => CSSInterpolation;
4
- export declare const toggleButtonStyle: (buttonVariants: ComponentsVariants['MuiButton']) => CSSInterpolation;
5
+ export declare const variantsToClassName: (buttonVariants: ComponentsVariants['MuiButton']) => CSSInterpolation;
5
6
  export declare const buttonVariants: (buttons: ButtonStyles) => ComponentsVariants['MuiButton'];
@@ -49,6 +49,7 @@ export declare type GeowebColorPalette = {
49
49
  };
50
50
  greys: {
51
51
  accessible: CSSProperties['color'];
52
+ accessibleLight: CSSProperties['color'];
52
53
  };
53
54
  cards: {
54
55
  cardContainer: CSSProperties['color'];
@@ -75,6 +76,7 @@ export declare type GeowebColorPalette = {
75
76
  timelineNightTime: CSSProperties;
76
77
  timelineTimelineSurface: CSSProperties;
77
78
  timelineMonthChangeDash: CSSProperties;
79
+ timelineSelectionBackground: CSSProperties;
78
80
  timeScaleText: CSSProperties;
79
81
  timeScalePointer: CSSProperties;
80
82
  timeScaleHorizontalScale: CSSProperties;
@@ -98,11 +100,8 @@ export declare type GeowebColorPalette = {
98
100
  drawerOpen: CSSProperties;
99
101
  };
100
102
  layerManager: {
101
- tableRowDefaultIcon: CSSProperties;
102
103
  tableRowDefaultText: CSSProperties;
103
104
  tableRowDefaultCardContainer: CSSProperties;
104
- tableRowMouseover: CSSProperties;
105
- tableRowDisabledIcon: CSSProperties;
106
105
  tableRowDisabledText: CSSProperties;
107
106
  tableRowDisabledCardContainer: CSSProperties;
108
107
  };
@@ -116,6 +115,17 @@ export declare type GeowebColorPalette = {
116
115
  captionError: CSSProperties;
117
116
  captionDisabled: CSSProperties;
118
117
  };
118
+ functional: {
119
+ success: CSSProperties['color'];
120
+ successOutline: CSSProperties;
121
+ error: CSSProperties['color'];
122
+ errorOutline: CSSProperties;
123
+ warning: CSSProperties['color'];
124
+ warningOutline: CSSProperties;
125
+ warningHighlight: CSSProperties;
126
+ notification: CSSProperties['color'];
127
+ notificationOutline: CSSProperties;
128
+ };
119
129
  };
120
130
  export declare type Elevations = {
121
131
  [id: string]: string;
@@ -4,4 +4,11 @@ import { Elevations, GeowebColorPalette } from './types';
4
4
  export declare const hex2rgba: (hex: string, alpha?: number) => string;
5
5
  export declare const parseColors: (colors: GeowebColorPalette) => GeowebColorPalette;
6
6
  export declare const createShadows: (elevations: Elevations) => Shadows;
7
+ export declare const breakpoints: {
8
+ mobile: number;
9
+ tablet: number;
10
+ desktop: number;
11
+ dekstopHD: number;
12
+ dekstopHDWide: number;
13
+ };
7
14
  export declare const createTheme: (paletteType: PaletteMode, geowebColors: GeowebColorPalette, shadows: Shadows) => Theme;
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ export declare const BreakpointDemo: React.FC;
3
+ export declare const Breakpoints: React.FC;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export declare const IconButtonDemo: React.FC;
3
+ export declare const IconButtons: {
4
+ (): React.ReactElement;
5
+ storyName: string;
6
+ };
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ export declare const MenuItemDemo: React.FC;
3
+ export declare const MenuItem: () => React.ReactElement;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export declare const TextFieldDemo: React.FC;
3
+ export declare const TextFields: {
4
+ (): React.ReactElement;
5
+ storyName: string;
6
+ };
@@ -10,6 +10,10 @@ export { Typography, TypographyGWTheme } from './Typography.stories';
10
10
  export { Tooltips } from './Tooltip.stories';
11
11
  export { Buttons } from './Button.stories';
12
12
  export { ToggleButtons } from './ToggleButton.stories';
13
+ export { IconButtons } from './IconButton.stories';
14
+ export { MenuItem } from './MenuItem.stories';
15
+ export { TextFields } from './TextField.stories';
16
+ export { Breakpoints } from './Breakpoints';
13
17
  export { FormElementsGWTheme, FormElements } from './FormElements.stories';
14
18
  declare const _default: {
15
19
  title: string;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const ButtonLight: () => React.ReactElement;
7
+ export declare const ButtonDark: () => React.ReactElement;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const MenuItemLight: () => React.ReactElement;
7
+ export declare const MenuItemDark: () => React.ReactElement;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const TextFieldLight: () => React.ReactElement;
7
+ export declare const TextFieldDark: () => React.ReactElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/theme",
3
- "version": "2.2.1",
3
+ "version": "2.4.1",
4
4
  "description": "GeoWeb Theme library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -12,8 +12,8 @@
12
12
  "typings": "./index.d.ts",
13
13
  "dependencies": {},
14
14
  "peerDependencies": {
15
- "@mui/material": "^5.2.8",
16
15
  "react": "^17.0.2",
16
+ "@mui/material": "^5.2.8",
17
17
  "@mui/styles": "^5.2.3",
18
18
  "@mui/icons-material": "^5.2.5"
19
19
  }