@opengeoweb/theme 2.1.4 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -72,6 +72,89 @@ function _nonIterableRest() {
72
72
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
73
73
  }
74
74
 
75
+ var buttonStyle = function buttonStyle(button) {
76
+ return {
77
+ // default styling
78
+ color: button["default"].color,
79
+ backgroundColor: button["default"].fill,
80
+ textTransform: 'capitalize',
81
+ padding: '12px 8px',
82
+ height: '40px',
83
+ borderStyle: 'solid',
84
+ borderWidth: '1px',
85
+ borderColor: button["default"].borderColor,
86
+ borderRadius: '5px',
87
+ // hover styling
88
+ '&:hover': {
89
+ backgroundColor: button.mouseOver.fill,
90
+ borderColor: button.mouseOver.borderColor
91
+ },
92
+ // active styling
93
+ '&.Mui-selected': {
94
+ backgroundColor: button.active.fill,
95
+ color: button.active.color,
96
+ borderColor: button.active.borderColor,
97
+ '&:hover': {
98
+ backgroundColor: button.activeMouseOver.fill
99
+ }
100
+ },
101
+ // disabled styling
102
+ '&.Mui-disabled': {
103
+ backgroundColor: button.disabled.fill,
104
+ color: button.disabled.color,
105
+ borderColor: button.disabled.borderColor
106
+ },
107
+ // size styling
108
+ '&[class*="sizeSmall"]': {
109
+ fontSize: '12px',
110
+ height: '32px',
111
+ lineHeight: '12px'
112
+ },
113
+ // icon styling
114
+ '& .MuiButton-startIcon': {
115
+ marginRight: '2px',
116
+ '& .MuiSvgIcon-root': {
117
+ fontSize: '26px'
118
+ }
119
+ }
120
+ };
121
+ };
122
+ var toggleButtonStyle = function toggleButtonStyle(buttonVariants) {
123
+ return buttonVariants.reduce(function (variants, _ref) {
124
+ var variant = _ref.props.variant,
125
+ style = _ref.style;
126
+ return Object.assign(Object.assign({}, variants), _defineProperty({}, "&.".concat(variant), style));
127
+ }, {});
128
+ };
129
+ var buttonVariants = function buttonVariants(buttons) {
130
+ return [{
131
+ props: {
132
+ variant: 'primary'
133
+ },
134
+ style: buttonStyle(buttons.primary)
135
+ }, {
136
+ props: {
137
+ variant: 'secondary'
138
+ },
139
+ style: buttonStyle(buttons.secondary)
140
+ }, {
141
+ props: {
142
+ variant: 'tertiary'
143
+ },
144
+ style: buttonStyle(buttons.tertiary)
145
+ }, {
146
+ props: {
147
+ variant: 'flat'
148
+ },
149
+ style: buttonStyle(buttons.flat)
150
+ }, {
151
+ props: {
152
+ variant: 'tool'
153
+ },
154
+ style: buttonStyle(buttons.tool)
155
+ }];
156
+ };
157
+
75
158
  var hex2rgba = function hex2rgba(hex) {
76
159
  var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
77
160
 
@@ -146,6 +229,14 @@ var createTheme = function createTheme(paletteType, geowebColors, shadows) {
146
229
  },
147
230
  shadows: shadows,
148
231
  components: {
232
+ MuiButton: {
233
+ variants: buttonVariants(geowebColors.buttons)
234
+ },
235
+ MuiToggleButton: {
236
+ styleOverrides: {
237
+ root: toggleButtonStyle(buttonVariants(geowebColors.buttons))
238
+ }
239
+ },
149
240
  MuiCssBaseline: {
150
241
  styleOverrides: "\n html {\n -webkit-font-smoothing: auto;\n }\n "
151
242
  },
@@ -477,7 +568,131 @@ var colors$1 = {
477
568
  },
478
569
  buttons: {
479
570
  primary: {
480
- fill: '#186DFF'
571
+ "default": {
572
+ fill: '#186DFF',
573
+ color: '#FFFFFF',
574
+ borderColor: 'transparent'
575
+ },
576
+ mouseOver: {
577
+ fill: '#1047B0',
578
+ color: '#FFFFFF',
579
+ borderColor: '#71A6FF'
580
+ },
581
+ active: {
582
+ fill: '#186DFF',
583
+ color: '#FFFFFF',
584
+ borderColor: 'transparent'
585
+ },
586
+ activeMouseOver: {},
587
+ disabled: {
588
+ fill: 'transparent',
589
+ color: '#707070',
590
+ borderColor: 'transparent'
591
+ }
592
+ },
593
+ secondary: {
594
+ "default": {
595
+ fill: '#0876b6',
596
+ color: '#FFFFFF',
597
+ borderColor: 'transparent'
598
+ },
599
+ mouseOver: {
600
+ fill: '#064c84',
601
+ color: '#FFFFFF',
602
+ borderColor: '#3DA6FF'
603
+ },
604
+ active: {
605
+ fill: '#0876b6',
606
+ color: '#FFFFFF',
607
+ borderColor: 'transparent'
608
+ },
609
+ activeMouseOver: {},
610
+ disabled: {
611
+ fill: 'transparent',
612
+ color: '#707070',
613
+ borderColor: 'transparent'
614
+ }
615
+ },
616
+ tertiary: {
617
+ "default": {
618
+ fill: 'transparent',
619
+ color: '#575F7A',
620
+ borderColor: '#575F7A'
621
+ },
622
+ mouseOver: {
623
+ fill: '#E3E4E7',
624
+ color: '#575F7A',
625
+ borderColor: '#575F7A'
626
+ },
627
+ active: {
628
+ fill: 'transparent',
629
+ color: '#186DFF',
630
+ borderColor: '#186DFF'
631
+ },
632
+ activeMouseOver: {
633
+ fill: 'rgba(24, 109, 255, 0.1)',
634
+ color: '#186DFF',
635
+ borderColor: '#186DFF'
636
+ },
637
+ disabled: {
638
+ fill: 'transparent',
639
+ color: '#707070',
640
+ borderColor: 'transparent'
641
+ }
642
+ },
643
+ flat: {
644
+ "default": {
645
+ fill: 'transparent',
646
+ color: '#575F7A',
647
+ borderColor: 'transparent'
648
+ },
649
+ mouseOver: {
650
+ fill: '#E3E4E7',
651
+ color: '#575F7A',
652
+ borderColor: 'transparent'
653
+ },
654
+ active: {
655
+ fill: 'transparent',
656
+ color: '#186DFF',
657
+ borderColor: 'transparent'
658
+ },
659
+ activeMouseOver: {
660
+ fill: 'rgba(24, 109, 255, 0.1)',
661
+ color: '#186DFF',
662
+ borderColor: 'transparent'
663
+ },
664
+ disabled: {
665
+ fill: 'transparent',
666
+ color: '#707070',
667
+ borderColor: 'transparent'
668
+ }
669
+ },
670
+ tool: {
671
+ "default": {
672
+ fill: '#ECEDEE',
673
+ color: '#575F7A',
674
+ borderColor: 'transparent'
675
+ },
676
+ mouseOver: {
677
+ fill: '#E3E4E7',
678
+ color: '#575F7A',
679
+ borderColor: 'transparent'
680
+ },
681
+ active: {
682
+ fill: '#186DFF',
683
+ color: '#FFFFFF',
684
+ borderColor: 'transparent'
685
+ },
686
+ activeMouseOver: {
687
+ fill: '#1047B0',
688
+ color: '#FFFFFF',
689
+ borderColor: 'transparent'
690
+ },
691
+ disabled: {
692
+ fill: 'transparent',
693
+ color: '#707070',
694
+ borderColor: 'transparent'
695
+ }
481
696
  },
482
697
  primaryMouseover: {
483
698
  fill: '#1047B0'
@@ -701,7 +916,7 @@ var colors$1 = {
701
916
  opacity: 1
702
917
  },
703
918
  captionDisabled: {
704
- color: '#767676',
919
+ color: '#707070',
705
920
  opacity: 1
706
921
  }
707
922
  }
@@ -1071,7 +1286,131 @@ var colors = {
1071
1286
  },
1072
1287
  buttons: {
1073
1288
  primary: {
1074
- fill: '#186DFF'
1289
+ "default": {
1290
+ fill: '#186DFF',
1291
+ color: '#FFFFFF',
1292
+ borderColor: 'transparent'
1293
+ },
1294
+ mouseOver: {
1295
+ fill: '#1047B0',
1296
+ color: '#FFFFFF',
1297
+ borderColor: '#71A6FF'
1298
+ },
1299
+ active: {
1300
+ fill: '#186DFF',
1301
+ color: '#FFFFFF',
1302
+ borderColor: 'transparent'
1303
+ },
1304
+ activeMouseOver: {},
1305
+ disabled: {
1306
+ fill: 'transparent',
1307
+ color: '#B0B0B0',
1308
+ borderColor: 'transparent'
1309
+ }
1310
+ },
1311
+ secondary: {
1312
+ "default": {
1313
+ fill: '#0876b6',
1314
+ color: '#FFFFFF',
1315
+ borderColor: 'transparent'
1316
+ },
1317
+ mouseOver: {
1318
+ fill: '#064C84',
1319
+ color: '#FFFFFF',
1320
+ borderColor: '#3DA6FF'
1321
+ },
1322
+ active: {
1323
+ fill: '#0876B6',
1324
+ color: '#FFFFFF',
1325
+ borderColor: 'transparent'
1326
+ },
1327
+ activeMouseOver: {},
1328
+ disabled: {
1329
+ fill: 'transparent',
1330
+ color: '#707070',
1331
+ borderColor: 'transparent'
1332
+ }
1333
+ },
1334
+ tertiary: {
1335
+ "default": {
1336
+ fill: 'transparent',
1337
+ color: '#E5E5E5',
1338
+ borderColor: '#E5E5E5'
1339
+ },
1340
+ mouseOver: {
1341
+ fill: '#494949',
1342
+ color: '#E5E5E5',
1343
+ borderColor: '#E5E5E5'
1344
+ },
1345
+ active: {
1346
+ fill: 'transparent',
1347
+ color: '#488BFD',
1348
+ borderColor: '#48A8FA'
1349
+ },
1350
+ activeMouseOver: {
1351
+ fill: 'rgba(24, 109, 255, 0.1)',
1352
+ color: '#488BFD',
1353
+ borderColor: '#488BFD'
1354
+ },
1355
+ disabled: {
1356
+ fill: 'transparent',
1357
+ color: '#B0B0B0',
1358
+ borderColor: 'transparent'
1359
+ }
1360
+ },
1361
+ flat: {
1362
+ "default": {
1363
+ fill: 'transparent',
1364
+ color: '#E5E5E5',
1365
+ borderColor: 'transparent'
1366
+ },
1367
+ mouseOver: {
1368
+ fill: '#494949',
1369
+ color: '#E5E5E5',
1370
+ borderColor: 'transparent'
1371
+ },
1372
+ active: {
1373
+ fill: 'transparent',
1374
+ color: '#488BFD',
1375
+ borderColor: 'transparent'
1376
+ },
1377
+ activeMouseOver: {
1378
+ fill: 'rgba(24, 109, 255, 0.1)',
1379
+ color: '#488BFD',
1380
+ borderColor: 'transparent'
1381
+ },
1382
+ disabled: {
1383
+ fill: 'transparent',
1384
+ color: '#B0B0B0',
1385
+ borderColor: 'transparent'
1386
+ }
1387
+ },
1388
+ tool: {
1389
+ "default": {
1390
+ fill: '#393939',
1391
+ color: '#E5E5E5',
1392
+ borderColor: 'transparent'
1393
+ },
1394
+ mouseOver: {
1395
+ fill: '#494949',
1396
+ color: '#E5E5E5',
1397
+ borderColor: 'transparent'
1398
+ },
1399
+ active: {
1400
+ fill: '#186DFF',
1401
+ color: '#FFFFFF',
1402
+ borderColor: 'transparent'
1403
+ },
1404
+ activeMouseOver: {
1405
+ fill: '#1047B0',
1406
+ color: '#FFFFFF',
1407
+ borderColor: 'transparent'
1408
+ },
1409
+ disabled: {
1410
+ fill: 'transparent',
1411
+ color: '#B0B0B0',
1412
+ borderColor: 'transparent'
1413
+ }
1075
1414
  },
1076
1415
  primaryMouseover: {
1077
1416
  fill: '#1047B0'
@@ -1295,7 +1634,7 @@ var colors = {
1295
1634
  opacity: 1
1296
1635
  },
1297
1636
  captionDisabled: {
1298
- color: '#909090',
1637
+ color: '#B0B0B0',
1299
1638
  opacity: 1
1300
1639
  }
1301
1640
  }
package/index.umd.js CHANGED
@@ -79,6 +79,91 @@
79
79
  return ar;
80
80
  }
81
81
 
82
+ var buttonStyle = function buttonStyle(button) {
83
+ return {
84
+ // default styling
85
+ color: button["default"].color,
86
+ backgroundColor: button["default"].fill,
87
+ textTransform: 'capitalize',
88
+ padding: '12px 8px',
89
+ height: '40px',
90
+ borderStyle: 'solid',
91
+ borderWidth: '1px',
92
+ borderColor: button["default"].borderColor,
93
+ borderRadius: '5px',
94
+ // hover styling
95
+ '&:hover': {
96
+ backgroundColor: button.mouseOver.fill,
97
+ borderColor: button.mouseOver.borderColor
98
+ },
99
+ // active styling
100
+ '&.Mui-selected': {
101
+ backgroundColor: button.active.fill,
102
+ color: button.active.color,
103
+ borderColor: button.active.borderColor,
104
+ '&:hover': {
105
+ backgroundColor: button.activeMouseOver.fill
106
+ }
107
+ },
108
+ // disabled styling
109
+ '&.Mui-disabled': {
110
+ backgroundColor: button.disabled.fill,
111
+ color: button.disabled.color,
112
+ borderColor: button.disabled.borderColor
113
+ },
114
+ // size styling
115
+ '&[class*="sizeSmall"]': {
116
+ fontSize: '12px',
117
+ height: '32px',
118
+ lineHeight: '12px'
119
+ },
120
+ // icon styling
121
+ '& .MuiButton-startIcon': {
122
+ marginRight: '2px',
123
+ '& .MuiSvgIcon-root': {
124
+ fontSize: '26px'
125
+ }
126
+ }
127
+ };
128
+ };
129
+ var toggleButtonStyle = function toggleButtonStyle(buttonVariants) {
130
+ return buttonVariants.reduce(function (variants, _a) {
131
+ var _b;
132
+
133
+ var variant = _a.props.variant,
134
+ style = _a.style;
135
+ return __assign(__assign({}, variants), (_b = {}, _b["&." + variant] = style, _b));
136
+ }, {});
137
+ };
138
+ var buttonVariants = function buttonVariants(buttons) {
139
+ return [{
140
+ props: {
141
+ variant: 'primary'
142
+ },
143
+ style: buttonStyle(buttons.primary)
144
+ }, {
145
+ props: {
146
+ variant: 'secondary'
147
+ },
148
+ style: buttonStyle(buttons.secondary)
149
+ }, {
150
+ props: {
151
+ variant: 'tertiary'
152
+ },
153
+ style: buttonStyle(buttons.tertiary)
154
+ }, {
155
+ props: {
156
+ variant: 'flat'
157
+ },
158
+ style: buttonStyle(buttons.flat)
159
+ }, {
160
+ props: {
161
+ variant: 'tool'
162
+ },
163
+ style: buttonStyle(buttons.tool)
164
+ }];
165
+ };
166
+
82
167
  var hex2rgba = function hex2rgba(hex, alpha) {
83
168
  if (alpha === void 0) {
84
169
  alpha = 1;
@@ -158,6 +243,14 @@
158
243
  },
159
244
  shadows: shadows,
160
245
  components: {
246
+ MuiButton: {
247
+ variants: buttonVariants(geowebColors.buttons)
248
+ },
249
+ MuiToggleButton: {
250
+ styleOverrides: {
251
+ root: toggleButtonStyle(buttonVariants(geowebColors.buttons))
252
+ }
253
+ },
161
254
  MuiCssBaseline: {
162
255
  styleOverrides: "\n html {\n -webkit-font-smoothing: auto;\n }\n "
163
256
  },
@@ -489,7 +582,131 @@
489
582
  },
490
583
  buttons: {
491
584
  primary: {
492
- 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
+ }
606
+ },
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
+ }
629
+ },
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
+ }
656
+ },
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
+ }
683
+ },
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
+ }
493
710
  },
494
711
  primaryMouseover: {
495
712
  fill: '#1047B0'
@@ -713,7 +930,7 @@
713
930
  opacity: 1
714
931
  },
715
932
  captionDisabled: {
716
- color: '#767676',
933
+ color: '#707070',
717
934
  opacity: 1
718
935
  }
719
936
  }
@@ -1040,7 +1257,131 @@
1040
1257
  },
1041
1258
  buttons: {
1042
1259
  primary: {
1043
- fill: '#186DFF'
1260
+ "default": {
1261
+ fill: '#186DFF',
1262
+ color: '#FFFFFF',
1263
+ borderColor: 'transparent'
1264
+ },
1265
+ mouseOver: {
1266
+ fill: '#1047B0',
1267
+ color: '#FFFFFF',
1268
+ borderColor: '#71A6FF'
1269
+ },
1270
+ active: {
1271
+ fill: '#186DFF',
1272
+ color: '#FFFFFF',
1273
+ borderColor: 'transparent'
1274
+ },
1275
+ activeMouseOver: {},
1276
+ disabled: {
1277
+ fill: 'transparent',
1278
+ color: '#B0B0B0',
1279
+ borderColor: 'transparent'
1280
+ }
1281
+ },
1282
+ secondary: {
1283
+ "default": {
1284
+ fill: '#0876b6',
1285
+ color: '#FFFFFF',
1286
+ borderColor: 'transparent'
1287
+ },
1288
+ mouseOver: {
1289
+ fill: '#064C84',
1290
+ color: '#FFFFFF',
1291
+ borderColor: '#3DA6FF'
1292
+ },
1293
+ active: {
1294
+ fill: '#0876B6',
1295
+ color: '#FFFFFF',
1296
+ borderColor: 'transparent'
1297
+ },
1298
+ activeMouseOver: {},
1299
+ disabled: {
1300
+ fill: 'transparent',
1301
+ color: '#707070',
1302
+ borderColor: 'transparent'
1303
+ }
1304
+ },
1305
+ tertiary: {
1306
+ "default": {
1307
+ fill: 'transparent',
1308
+ color: '#E5E5E5',
1309
+ borderColor: '#E5E5E5'
1310
+ },
1311
+ mouseOver: {
1312
+ fill: '#494949',
1313
+ color: '#E5E5E5',
1314
+ borderColor: '#E5E5E5'
1315
+ },
1316
+ active: {
1317
+ fill: 'transparent',
1318
+ color: '#488BFD',
1319
+ borderColor: '#48A8FA'
1320
+ },
1321
+ activeMouseOver: {
1322
+ fill: 'rgba(24, 109, 255, 0.1)',
1323
+ color: '#488BFD',
1324
+ borderColor: '#488BFD'
1325
+ },
1326
+ disabled: {
1327
+ fill: 'transparent',
1328
+ color: '#B0B0B0',
1329
+ borderColor: 'transparent'
1330
+ }
1331
+ },
1332
+ flat: {
1333
+ "default": {
1334
+ fill: 'transparent',
1335
+ color: '#E5E5E5',
1336
+ borderColor: 'transparent'
1337
+ },
1338
+ mouseOver: {
1339
+ fill: '#494949',
1340
+ color: '#E5E5E5',
1341
+ borderColor: 'transparent'
1342
+ },
1343
+ active: {
1344
+ fill: 'transparent',
1345
+ color: '#488BFD',
1346
+ borderColor: 'transparent'
1347
+ },
1348
+ activeMouseOver: {
1349
+ fill: 'rgba(24, 109, 255, 0.1)',
1350
+ color: '#488BFD',
1351
+ borderColor: 'transparent'
1352
+ },
1353
+ disabled: {
1354
+ fill: 'transparent',
1355
+ color: '#B0B0B0',
1356
+ borderColor: 'transparent'
1357
+ }
1358
+ },
1359
+ tool: {
1360
+ "default": {
1361
+ fill: '#393939',
1362
+ color: '#E5E5E5',
1363
+ borderColor: 'transparent'
1364
+ },
1365
+ mouseOver: {
1366
+ fill: '#494949',
1367
+ color: '#E5E5E5',
1368
+ borderColor: 'transparent'
1369
+ },
1370
+ active: {
1371
+ fill: '#186DFF',
1372
+ color: '#FFFFFF',
1373
+ borderColor: 'transparent'
1374
+ },
1375
+ activeMouseOver: {
1376
+ fill: '#1047B0',
1377
+ color: '#FFFFFF',
1378
+ borderColor: 'transparent'
1379
+ },
1380
+ disabled: {
1381
+ fill: 'transparent',
1382
+ color: '#B0B0B0',
1383
+ borderColor: 'transparent'
1384
+ }
1044
1385
  },
1045
1386
  primaryMouseover: {
1046
1387
  fill: '#1047B0'
@@ -1264,7 +1605,7 @@
1264
1605
  opacity: 1
1265
1606
  },
1266
1607
  captionDisabled: {
1267
- color: '#909090',
1608
+ color: '#B0B0B0',
1268
1609
  opacity: 1
1269
1610
  }
1270
1611
  }
@@ -0,0 +1,5 @@
1
+ import { ComponentsVariants, CSSInterpolation } from '@mui/material';
2
+ import { ButtonStyles, ButtonStyle } from './types';
3
+ export declare const buttonStyle: (button: ButtonStyle) => CSSInterpolation;
4
+ export declare const toggleButtonStyle: (buttonVariants: ComponentsVariants['MuiButton']) => CSSInterpolation;
5
+ export declare const buttonVariants: (buttons: ButtonStyles) => ComponentsVariants['MuiButton'];
@@ -0,0 +1 @@
1
+ export {};
@@ -2,6 +2,26 @@
2
2
  interface CSSProperties extends React.CSSProperties {
3
3
  rgba?: string;
4
4
  }
5
+ export interface ButtonStyle {
6
+ default: CSSProperties;
7
+ mouseOver: CSSProperties;
8
+ active: CSSProperties;
9
+ activeMouseOver: CSSProperties;
10
+ disabled: CSSProperties;
11
+ }
12
+ export interface ButtonStyles {
13
+ primary: ButtonStyle;
14
+ secondary: ButtonStyle;
15
+ tertiary: ButtonStyle;
16
+ flat: ButtonStyle;
17
+ tool: ButtonStyle;
18
+ primaryMouseover: CSSProperties;
19
+ primaryActive: CSSProperties;
20
+ flatMouseover: CSSProperties;
21
+ focusDefault: CSSProperties;
22
+ disabled: CSSProperties;
23
+ surfaceIconDefault: CSSProperties;
24
+ }
5
25
  export declare type GeowebColorPalette = {
6
26
  background: {
7
27
  surface: CSSProperties['color'];
@@ -11,15 +31,7 @@ export declare type GeowebColorPalette = {
11
31
  brand: {
12
32
  brand: CSSProperties['color'];
13
33
  };
14
- buttons: {
15
- primary: CSSProperties;
16
- primaryMouseover: CSSProperties;
17
- primaryActive: CSSProperties;
18
- flatMouseover: CSSProperties;
19
- focusDefault: CSSProperties;
20
- disabled: CSSProperties;
21
- surfaceIconDefault: CSSProperties;
22
- };
34
+ buttons: ButtonStyles;
23
35
  typographyAndIcons: {
24
36
  text: CSSProperties['color'];
25
37
  icon: CSSProperties['color'];
@@ -118,4 +130,13 @@ declare module '@mui/material/styles' {
118
130
  geowebColors: GeowebColorPalette;
119
131
  }
120
132
  }
133
+ declare module '@mui/material/Button' {
134
+ interface ButtonPropsVariantOverrides {
135
+ primary: true;
136
+ secondary: true;
137
+ tertiary: true;
138
+ flat: true;
139
+ tool: true;
140
+ }
141
+ }
121
142
  export {};
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export declare const ButtonDemo: React.FC;
3
+ export declare const Buttons: {
4
+ (): React.ReactElement;
5
+ storyName: string;
6
+ };
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export declare const ToggleButtonDemo: React.FC;
3
+ export declare const ToggleButtons: {
4
+ (): React.ReactElement;
5
+ storyName: string;
6
+ };
@@ -8,6 +8,8 @@ export { Table } from './Table.stories';
8
8
  export { Tabs } from './Tabs.stories';
9
9
  export { Typography, TypographyGWTheme } from './Typography.stories';
10
10
  export { Tooltips } from './Tooltip.stories';
11
+ export { Buttons } from './Button.stories';
12
+ export { ToggleButtons } from './ToggleButton.stories';
11
13
  export { FormElementsGWTheme, FormElements } from './FormElements.stories';
12
14
  declare const _default: {
13
15
  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 ToggleButtonLight: () => React.ReactElement;
7
+ export declare const ToggleButtonDark: () => React.ReactElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/theme",
3
- "version": "2.1.4",
3
+ "version": "2.2.0",
4
4
  "description": "GeoWeb Theme library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {