@fixefy/fixefy-ui-utils 0.2.70 → 0.2.72

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,1000 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return getPageContext;
9
- }
10
- });
11
- const _styles = require("@mui/material/styles");
12
- const _createGenerateClassName = /*#__PURE__*/ _interop_require_default(require("@mui/styles/createGenerateClassName"));
13
- const _jssPreset = /*#__PURE__*/ _interop_require_default(require("@mui/styles/jssPreset"));
14
- const _jss = require("jss");
15
- function _define_property(obj, key, value) {
16
- if (key in obj) {
17
- Object.defineProperty(obj, key, {
18
- value: value,
19
- enumerable: true,
20
- configurable: true,
21
- writable: true
22
- });
23
- } else {
24
- obj[key] = value;
25
- }
26
- return obj;
27
- }
28
- function _interop_require_default(obj) {
29
- return obj && obj.__esModule ? obj : {
30
- default: obj
31
- };
32
- }
33
- function _object_spread(target) {
34
- for(var i = 1; i < arguments.length; i++){
35
- var source = arguments[i] != null ? arguments[i] : {};
36
- var ownKeys = Object.keys(source);
37
- if (typeof Object.getOwnPropertySymbols === "function") {
38
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
39
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
40
- }));
41
- }
42
- ownKeys.forEach(function(key) {
43
- _define_property(target, key, source[key]);
44
- });
45
- }
46
- return target;
47
- }
48
- function ownKeys(object, enumerableOnly) {
49
- var keys = Object.keys(object);
50
- if (Object.getOwnPropertySymbols) {
51
- var symbols = Object.getOwnPropertySymbols(object);
52
- if (enumerableOnly) {
53
- symbols = symbols.filter(function(sym) {
54
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
55
- });
56
- }
57
- keys.push.apply(keys, symbols);
58
- }
59
- return keys;
60
- }
61
- function _object_spread_props(target, source) {
62
- source = source != null ? source : {};
63
- if (Object.getOwnPropertyDescriptors) {
64
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
65
- } else {
66
- ownKeys(Object(source)).forEach(function(key) {
67
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
68
- });
69
- }
70
- return target;
71
- }
72
- const palette = {
73
- background: {
74
- paper: '#fff'
75
- },
76
- common: {
77
- black: '#323232',
78
- white: '#FFFFFF'
79
- },
80
- colors: {
81
- red: '#EB5757',
82
- lightRed: '#FEF6F6',
83
- orange: '#F2994A',
84
- lightOrange: '#FEF7F1',
85
- orangeHover: '#EC7A30',
86
- orangeFocused: '#E65C15',
87
- gold: '#C4A603',
88
- lightGold: '#FAF7E6',
89
- yellow: '#F2D74C',
90
- lightYellow: '#FEFCEE',
91
- yellowHover: '#ECC631',
92
- yellowFocused: '#E6B517',
93
- green1: '#88C00D',
94
- lightGreen1: '#F6FAEC',
95
- green2: '#27AE60',
96
- lightGreen2: '#EEF9F2',
97
- green2Hover: '#169242',
98
- green2Focused: '#067724',
99
- green3: '#6FCF97',
100
- blue: '#2D9CDB',
101
- lightBlue: '#F3F9FD',
102
- blueHover: '#2D9CDB',
103
- blueFocused: '#085FBC',
104
- blue1: '#56CCF2',
105
- lightBlue1: '#F1FBFE',
106
- blue1Hover: '#39B8EC',
107
- blue1Focused: '#1DA3E6',
108
- purple: '#BB6BD9',
109
- lightPurple: '#FBF6FD',
110
- silver: '#C5C5C5',
111
- silverPlatinum: '#E3E4E4',
112
- silverSand: '#C6C7C8',
113
- jetBlack: '#303030',
114
- gainsboro: '#D0D0D0',
115
- black: '#000000',
116
- gray_54: '#8A8A8A',
117
- azure: '#FAFCFC',
118
- aliceBlue: '#F6F9FA',
119
- lightGray: '#FCFCFB',
120
- charcoal: '#2B2B2B'
121
- },
122
- user_image_colors: {
123
- red: '#EB5757',
124
- orange: '#F2994A',
125
- orangeHover: '#EC7A30',
126
- orangeFocused: '#E65C15',
127
- gold: '#C4A603',
128
- yellow: '#F2D74C',
129
- yellowHover: '#ECC631',
130
- yellowFocused: '#E6B517',
131
- green1: '#88C00D',
132
- green2: '#27AE60',
133
- green2Hover: '#169242',
134
- green2Focused: '#067724',
135
- green3: '#6FCF97',
136
- blue: '#2D9CDB',
137
- blueHover: '#2D9CDB',
138
- blueFocused: '#085FBC',
139
- blue1: '#56CCF2',
140
- blue1Hover: '#39B8EC',
141
- blue1Focused: '#1DA3E6',
142
- purple: '#BB6BD9',
143
- silver: '#C5C5C5',
144
- gray_54: '#8A8A8A'
145
- },
146
- greyscale: {
147
- dark: '#636363',
148
- main: '#ababab',
149
- light: '#e2e2e2',
150
- contrastText: '#f7f7f7',
151
- '500': '#5C6467',
152
- '400': '#8B9092',
153
- '300': '#C5C8C9',
154
- '200': '#F0F0F0',
155
- '100': '#F7F7F7'
156
- },
157
- redscale: {
158
- main: '#EB5757',
159
- '500': '#EE6868',
160
- '400': '#F08989',
161
- '300': '#F4AAAA',
162
- '200': '#F8CCCC',
163
- '100': '#FEF6F6'
164
- },
165
- orangescale: {
166
- '700': '#E65C15',
167
- '600': '#EC7A30',
168
- main: '#F2994A',
169
- '100': '#FEF7F1'
170
- },
171
- goldscale: {
172
- main: '#C4A603',
173
- '100': '#FAF7E6'
174
- },
175
- yellowscale: {
176
- '700': '#E6B517',
177
- '600': '#ECC631',
178
- main: '#F2D74C',
179
- '100': '#FEFCEE'
180
- },
181
- purplescale: {
182
- main: '#BB6BD9',
183
- '100': '#FBF6FD'
184
- },
185
- green1scale: {
186
- main: '#88C00D',
187
- '100': '#F6FAEC'
188
- },
189
- green2scale: {
190
- '700': '#067724',
191
- '600': '#169242',
192
- main: '#27AE60',
193
- '100': '#EEF9F2'
194
- },
195
- green3scale: {
196
- main: '#6FCF97'
197
- },
198
- blue1scale: {
199
- '700': '#1DA3E6',
200
- '600': '#39B8EC',
201
- main: '#56CCF2',
202
- '100': '#F1FBFE'
203
- },
204
- blue2scale: {
205
- '700': '#085FBC',
206
- '600': '#1A7ECC',
207
- main: '#2D9CDB',
208
- '100': '#F3F9FD'
209
- },
210
- error: {
211
- main: '#f44336'
212
- },
213
- pending: {
214
- main: '#e7cc0e',
215
- dark: '#B09000'
216
- },
217
- primary: {
218
- main: '#365c65',
219
- '100': '#C6DDE2',
220
- '300': '#87ACB6',
221
- '400': '#749da8',
222
- '500': '#568793',
223
- '700': '#3C636C',
224
- '800': '#2F4F57'
225
- },
226
- priority: {
227
- critical: '#EB5757',
228
- high: '#F2994A',
229
- low: '#2D9CDB',
230
- medium: '#88C00D',
231
- marginal: '#56CCF2'
232
- },
233
- chipPriority: {
234
- critical: {
235
- label: '#EB5757',
236
- background: '#FEF6F6',
237
- border: '#EB5757'
238
- },
239
- high: {
240
- label: '#F2994A',
241
- background: '#FEF7F1',
242
- border: '#F2994A'
243
- },
244
- low: {
245
- label: '#2D9CDB',
246
- background: '#F1FBFE',
247
- border: '#2D9CDB'
248
- },
249
- medium: {
250
- label: '#88C00D',
251
- background: '#F6FAEC',
252
- border: '#88C00D'
253
- },
254
- marginal: {
255
- label: '#56CCF2',
256
- background: '#F1FBFE',
257
- border: '#56CCF2'
258
- }
259
- },
260
- typography: {
261
- title: '#172326',
262
- delete: '#EB5757'
263
- },
264
- values: {
265
- original_value: '#87ACB6',
266
- fair_value: '#2F4F57',
267
- expected_refund: '#56CCF2',
268
- actual_refund: '#EC6AC8'
269
- },
270
- statistics: {
271
- value: '#568793',
272
- label: '#8B9092'
273
- },
274
- success: {
275
- main: '#88c00d'
276
- },
277
- uploader: {
278
- processing: {
279
- border: '',
280
- bg: ''
281
- },
282
- pause: {
283
- border: '',
284
- bg: ''
285
- }
286
- },
287
- score: {
288
- excellent: '#27AE60',
289
- high: '#88C00D',
290
- medium: '#F2C94C',
291
- low: '#F2994A',
292
- bad: '#ED323B'
293
- },
294
- status: {
295
- active: {
296
- border: '#27AE60',
297
- background: '#EEF9F2'
298
- },
299
- approve: {
300
- border: '#88C00D',
301
- background: '#F9FCF3'
302
- },
303
- approved: {
304
- border: '#27AE60',
305
- background: '#EEF9F2'
306
- },
307
- challenge: {
308
- border: '#F7C08F',
309
- background: '#FEFAF6'
310
- },
311
- challenged: {
312
- border: '#F7C08F',
313
- background: '#FEFAF6'
314
- },
315
- closed: {
316
- border: '#8B9092',
317
- background: '#FAFAFA'
318
- },
319
- credited: {
320
- border: '#BB6BD9',
321
- background: '#FAF6FE'
322
- },
323
- credit_invoices: {
324
- border: '#6D60E8',
325
- background: '#F0EFFD'
326
- },
327
- declined: {
328
- border: '#F48085',
329
- background: '#FEF5F5'
330
- },
331
- discrepancy: {
332
- border: '#CEBA61',
333
- background: '#FBFAF2'
334
- },
335
- duplicate: {
336
- border: '#CEBA61',
337
- background: '#FBFAF2'
338
- },
339
- duplicated: {
340
- border: '#CEBA61',
341
- background: '#FBFAF2'
342
- },
343
- gold: {
344
- border: '#C4A603',
345
- background: '#FEFDF3'
346
- },
347
- in_dispute: {
348
- border: '#F2994A',
349
- background: '#FEF7F1'
350
- },
351
- in_progress: {
352
- border: '#56CCF2',
353
- background: '#F1FBFE'
354
- },
355
- in_review: {
356
- border: '#BB6BD9',
357
- background: '#FAF6FE'
358
- },
359
- no_pricing: {
360
- border: '#BBBBBB',
361
- background: '#FAFAFA'
362
- },
363
- pending: {
364
- border: '#2D9CDB',
365
- background: '#F3F9FD',
366
- light: '#F1FBFE'
367
- },
368
- pending_review: {
369
- border: '#2D9CDB',
370
- background: '#F1FBFE'
371
- },
372
- pending_refund: {
373
- border: '#2D9CDB',
374
- background: '#F1FBFE',
375
- light: '#F1FBFE'
376
- },
377
- resolved: {
378
- border: '#BB6BD9',
379
- background: '#FAF6FE'
380
- },
381
- submitted_for_billing: {
382
- border: '#88C00D',
383
- background: '#F1FBFE'
384
- },
385
- billed: {
386
- border: '#C4A603',
387
- background: '#FEFDF3'
388
- }
389
- },
390
- tag: {
391
- approved: {
392
- border: '#27AE60',
393
- background: '#27AE60'
394
- },
395
- pending: {
396
- border: '#ECC631',
397
- background: '#ECC631'
398
- },
399
- pending_review: {
400
- border: '#2D9CDB',
401
- background: '#2D9CDB'
402
- },
403
- credited: {
404
- border: '#BB6BD9',
405
- background: '#BB6BD9'
406
- },
407
- credit_invoices: {
408
- border: '#6D60E8',
409
- background: '#6D60E8'
410
- },
411
- created: {
412
- border: '#87ACB6',
413
- background: '#87ACB6'
414
- },
415
- declined: {
416
- border: '#EB5757',
417
- background: '#EB5757'
418
- },
419
- in_dispute: {
420
- border: '#EC6AC8',
421
- background: '#EC6AC8'
422
- },
423
- in_progress: {
424
- border: '#56CCF2',
425
- background: '#56CCF2'
426
- },
427
- paid: {
428
- border: '#BB6BD9',
429
- background: '#BB6BD9'
430
- },
431
- paid_and_refunded: {
432
- border: '#BB6BD9',
433
- background: '#BB6BD9'
434
- },
435
- pending_refund: {
436
- border: '#2D9CDB',
437
- background: '#2D9CDB',
438
- light: '#F1FBFE'
439
- },
440
- closed: {
441
- border: '#8B9092',
442
- background: '#8B9092'
443
- },
444
- refunded: {
445
- border: '#BB6BD9',
446
- background: '#BB6BD9'
447
- },
448
- resolved: {
449
- border: '#BB6BD9',
450
- background: '#BB6BD9'
451
- },
452
- low: {
453
- border: '#56CCF2',
454
- background: '#88C00D'
455
- }
456
- },
457
- invoiceState: {
458
- approved: {
459
- border: '#27AE60',
460
- background: '#27AE60',
461
- light: '#D4EFDF'
462
- },
463
- created: {
464
- border: '#87ACB6',
465
- background: '#87ACB6',
466
- light: '#FBF6FD'
467
- },
468
- credited: {
469
- border: '#EC6AC8',
470
- background: '#EC6AC8',
471
- light: '#FBF6FD'
472
- },
473
- credit_invoices: {
474
- border: '#6D60E8',
475
- background: '#6D60E8',
476
- light: '#F0EFFD'
477
- },
478
- in_dispute: {
479
- border: '#EB5757',
480
- background: '#EB5757',
481
- light: '#FCEBDB'
482
- },
483
- in_progress: {
484
- border: '#56CCF2',
485
- background: '#56CCF2',
486
- light: '#F1FBFE'
487
- },
488
- paid: {
489
- border: '#BB6BD9',
490
- background: '#BB6BD9',
491
- light: '#FBF6FD'
492
- },
493
- paid_and_refunded: {
494
- border: '#BB6BD9',
495
- background: '#BB6BD9',
496
- light: '#FBF6FD'
497
- },
498
- pending: {
499
- border: '#2D9CDB',
500
- background: '#2D9CDB',
501
- light: '#F1FBFE'
502
- },
503
- pending_review: {
504
- border: '#2D9CDB',
505
- background: '#2D9CDB',
506
- light: '#F1FBFE'
507
- },
508
- pending_refund: {
509
- border: '#88C00D',
510
- background: '#88C00D',
511
- light: '#F1FBFE'
512
- },
513
- closed: {
514
- border: '#8B9092',
515
- background: '#8B9092',
516
- light: '#FBF6FD'
517
- },
518
- submitted_for_billing: {
519
- border: '#88C00D',
520
- background: '#88C00D',
521
- light: '#F1FBFE'
522
- },
523
- billed: {
524
- border: '#C4A603',
525
- background: '#C4A603',
526
- light: '#FEFDF3'
527
- }
528
- },
529
- recoState: {
530
- created: {
531
- border: '#87ACB6',
532
- background: '#87ACB6'
533
- },
534
- in_progress: {
535
- border: '#EB5757',
536
- background: '#EB5757',
537
- light: '#FEF6F6'
538
- },
539
- pending: {
540
- border: '#ECC631',
541
- background: '#ECC631',
542
- light: '#FEFCEE'
543
- },
544
- approved: {
545
- border: '#88C00D',
546
- background: '#88C00D',
547
- light: '#D4EFDF'
548
- },
549
- declined: {
550
- border: '#C4A603',
551
- background: '#C4A603',
552
- light: '#FEF6F6'
553
- },
554
- refunded: {
555
- border: '#27AE60',
556
- background: '#27AE60',
557
- light: '#FBF6FD'
558
- },
559
- closed: {
560
- border: '#8B9092',
561
- background: '#8B9092'
562
- },
563
- resolved: {
564
- border: '#EC6AC8',
565
- background: '#EC6AC8',
566
- light: '#FBF6FD'
567
- },
568
- submitted_for_billing: {
569
- border: '#88C00D',
570
- background: '#88C00D',
571
- light: '#F1FBFE'
572
- },
573
- billed: {
574
- border: '#C4A603',
575
- background: '#C4A603',
576
- light: '#FEFDF3'
577
- }
578
- },
579
- trends: {
580
- positive: '#88C00D',
581
- negative: '#F2994A',
582
- critical: '#ED323B',
583
- percent: '#56CCF2',
584
- sum: '#BB6BD9'
585
- },
586
- invoiceAnalysis: {
587
- underCharges: '#C6DDE2',
588
- overCharges: '#F2994A',
589
- matching: '#568793',
590
- invalid: '#EB5757'
591
- },
592
- snackbar: {
593
- info: {
594
- icon: '#56CCF2',
595
- border: '#56CCF2'
596
- },
597
- success: {
598
- icon: '#27AE60',
599
- border: '#27AE60'
600
- },
601
- error: {
602
- icon: '#ED323B',
603
- border: '#ED323B'
604
- },
605
- warn: {
606
- icon: '#F7DD8D',
607
- border: '#F2C94C'
608
- },
609
- critical: {
610
- icon: '#ED323B',
611
- border: '#ED323B'
612
- },
613
- silent: {
614
- icon: '#56CCF2',
615
- border: '#56CCF2'
616
- },
617
- alert: {
618
- icon: '#56CCF2',
619
- border: '#56CCF2'
620
- }
621
- },
622
- notificationStatus: {
623
- unread: '#F7F9FA'
624
- }
625
- };
626
- const theme = (0, _styles.createTheme)({
627
- palette: _object_spread({}, palette),
628
- components: {
629
- MuiButton: {
630
- defaultProps: {
631
- disableRipple: true
632
- },
633
- variants: [
634
- {
635
- props: {
636
- variant: 'contained'
637
- },
638
- style: ({ theme })=>({
639
- background: theme.palette.primary[500],
640
- color: theme.palette.common.white,
641
- boxShadow: 'none',
642
- '&:hover': {
643
- background: theme.palette.primary['700'],
644
- boxShadow: 'none'
645
- },
646
- '&:focus': {
647
- background: theme.palette.primary['800'],
648
- boxShadow: 'none'
649
- },
650
- '&:disabled': {
651
- background: theme.palette.primary[500],
652
- color: theme.palette.common.white
653
- }
654
- })
655
- },
656
- {
657
- props: {
658
- variant: 'contained:rounded'
659
- },
660
- style: ({ theme })=>({
661
- borderRadius: 100,
662
- background: theme.palette.primary[500],
663
- color: theme.palette.common.white,
664
- '&:hover': {
665
- background: theme.palette.primary['700']
666
- },
667
- '&:focus': {
668
- background: theme.palette.primary['800']
669
- },
670
- '&:disabled': {
671
- background: theme.palette.primary[500],
672
- color: theme.palette.common.white
673
- }
674
- })
675
- },
676
- {
677
- props: {
678
- variant: 'outlined'
679
- },
680
- style: ({ theme })=>({
681
- borderRadius: 100,
682
- color: theme.palette.primary[500],
683
- borderColor: theme.palette.primary[500],
684
- '&:hover': {
685
- color: theme.palette.primary['700'],
686
- borderColor: theme.palette.primary['700'],
687
- background: 'transparent'
688
- },
689
- '&:focus': {
690
- color: theme.palette.primary['800'],
691
- borderColor: theme.palette.primary['800'],
692
- background: 'transparent'
693
- },
694
- '&:disabled': {
695
- color: theme.palette.primary[500],
696
- border: `1px solid ${theme.palette.primary[500]}`
697
- }
698
- })
699
- },
700
- {
701
- props: {
702
- variant: 'text'
703
- },
704
- style: ({ theme })=>({
705
- color: theme.palette.primary[500],
706
- '&:hover': {
707
- color: theme.palette.primary[700],
708
- background: 'transparent'
709
- },
710
- '&:focus': {
711
- color: theme.palette.primary[800],
712
- borderColor: theme.palette.primary[800],
713
- background: 'transparent'
714
- },
715
- '&:disabled': {
716
- color: theme.palette.primary[500]
717
- }
718
- })
719
- },
720
- {
721
- props: {
722
- variant: 'text',
723
- color: 'secondary'
724
- },
725
- style: ({ theme })=>({
726
- color: theme.palette.primary[500],
727
- '&:hover': {
728
- color: theme.palette.primary[400],
729
- background: 'transparent'
730
- },
731
- '&:focus': {
732
- color: theme.palette.primary[300],
733
- borderColor: theme.palette.primary[300],
734
- background: 'transparent'
735
- },
736
- '&:disabled': {
737
- color: theme.palette.primary[500]
738
- }
739
- })
740
- },
741
- {
742
- props: {
743
- variant: 'outlined',
744
- color: 'secondary'
745
- },
746
- style: ({ theme })=>({
747
- borderRadius: 100,
748
- color: theme.palette.primary[500],
749
- borderColor: theme.palette.primary[500],
750
- '&:hover': {
751
- color: theme.palette.primary[400],
752
- borderColor: theme.palette.primary[400],
753
- background: 'transparent'
754
- },
755
- '&:focus': {
756
- color: theme.palette.primary[300],
757
- borderColor: theme.palette.primary[300],
758
- background: 'transparent'
759
- },
760
- '&:disabled': {
761
- color: theme.palette.primary[500],
762
- border: `1px solid ${theme.palette.primary[500]}`
763
- }
764
- })
765
- }
766
- ],
767
- styleOverrides: {
768
- root: {
769
- fontWeight: 600,
770
- fontSize: 12,
771
- lineHeight: '24px',
772
- letterSpacing: '0.5px',
773
- height: 40
774
- }
775
- }
776
- },
777
- MuiInputBase: {
778
- styleOverrides: {
779
- root: ({ theme })=>({
780
- background: theme.palette.common.white,
781
- padding: theme.spacing(1, 2),
782
- height: 40,
783
- boxSizing: 'border-box',
784
- borderRadius: 4,
785
- border: '1px solid transparent',
786
- transition: '.2s',
787
- '&:focus-within': {
788
- borderColor: theme.palette.primary[100],
789
- '& input': {
790
- caretColor: theme.palette.primary[500]
791
- }
792
- },
793
- '&.Mui-error': {
794
- borderColor: theme.palette.redscale.main
795
- },
796
- 'label + &': {
797
- marginTop: theme.spacing(2.2),
798
- background: theme.palette.common.white
799
- },
800
- '& input': {
801
- color: theme.palette.typography.title,
802
- '&:placeholder': {
803
- color: theme.palette.greyscale[400]
804
- }
805
- },
806
- '&.MuiInputBase-adornedStart': {
807
- '& input': {
808
- paddingLeft: theme.spacing(2)
809
- }
810
- },
811
- '&.MuiInputBase-adornedEnd': {
812
- '& input': {
813
- paddingRight: theme.spacing(2)
814
- }
815
- }
816
- })
817
- }
818
- }
819
- },
820
- typography: {
821
- fontFamily: [
822
- 'Open Sans',
823
- 'OpenSans'
824
- ].join(','),
825
- body1: {
826
- fontWeight: 'normal',
827
- fontStyle: 'normal',
828
- fontSize: 14,
829
- lineHeight: '24px',
830
- letterSpacing: '0.15px'
831
- },
832
- button: {
833
- paddingLeft: 24,
834
- paddingRight: 24,
835
- color: 'white',
836
- fontWeight: 500,
837
- fontStyle: 'normal',
838
- fontSize: 14,
839
- lineHeight: '24px',
840
- letterSpacing: '0.5px'
841
- },
842
- table: {
843
- fontWeight: 'normal',
844
- fontStyle: 'normal',
845
- fontSize: 12,
846
- lineHeight: '16px',
847
- letterSpacing: '0.1px'
848
- },
849
- table2: {
850
- fontWeight: 900,
851
- fontStyle: 'normal',
852
- fontSize: 12,
853
- lineHeight: '16px',
854
- letterSpacing: '0.1px'
855
- },
856
- overLineCaption: {
857
- fontWeight: 'normal',
858
- fontStyle: 'normal',
859
- fontSize: 11,
860
- lineHeight: '16px',
861
- letterSpacing: '0.1px'
862
- },
863
- link: {
864
- fontWeight: 'normal',
865
- fontStyle: 'italic',
866
- fontSize: 12,
867
- lineHeight: '20px',
868
- letterSpacing: '0.15px'
869
- },
870
- h1: {
871
- fontWeight: 300,
872
- fontStyle: 'normal',
873
- fontSize: 59,
874
- lineHeight: '80px',
875
- letterSpacing: '-0.5px'
876
- },
877
- h2: {
878
- fontWeight: 'normal',
879
- fontStyle: 'normal',
880
- fontSize: 44,
881
- lineHeight: '64px',
882
- letterSpacing: '0px'
883
- },
884
- h3: {
885
- fontWeight: 'normal',
886
- fontStyle: 'normal',
887
- fontSize: 33,
888
- lineHeight: '48px',
889
- letterSpacing: '0.25px'
890
- },
891
- h4: {
892
- fontWeight: 'normal',
893
- fontStyle: 'normal',
894
- fontSize: 25,
895
- lineHeight: '40px',
896
- letterSpacing: '0px'
897
- },
898
- h5: {
899
- fontWeight: 500,
900
- fontStyle: 'normal',
901
- fontSize: 19,
902
- lineHeight: '28px',
903
- letterSpacing: '0.15px'
904
- },
905
- subtitle1: {
906
- fontWeight: 'normal',
907
- fontStyle: 'normal',
908
- fontSize: 16,
909
- lineHeight: '24px',
910
- letterSpacing: '0.15px'
911
- },
912
- subtitle2: {
913
- fontWeight: 500,
914
- fontStyle: 'normal',
915
- fontSize: 14,
916
- lineHeight: '24px',
917
- letterSpacing: '0.1px'
918
- }
919
- },
920
- sidebar: {
921
- width: 200
922
- },
923
- sizes: {
924
- sideMenu: {
925
- width: 70,
926
- itemHeight: 60,
927
- logoHeight: 60,
928
- paddingTop: 20,
929
- marginBottom: 20
930
- },
931
- hex: 80,
932
- hex_node: 60,
933
- hex_event: 60,
934
- hex_service: 60,
935
- hex_structure: 30,
936
- header: {
937
- iconTray: 200,
938
- height: 60
939
- }
940
- }
941
- });
942
- const lightTheme = (0, _styles.createTheme)(_object_spread_props(_object_spread({}, theme), {
943
- palette: _object_spread_props(_object_spread({}, palette), {
944
- mode: 'light',
945
- text: {
946
- primary: 'rgba(0, 0, 0, 0.87)',
947
- secondary: 'rgba(0, 0, 0, 0.54)',
948
- disabled: 'rgba(0, 0, 0, 0.38)'
949
- },
950
- divider: '#F0F0F0',
951
- background: {
952
- paper: '#fff',
953
- default: '#fafafa'
954
- }
955
- })
956
- }));
957
- const darkTheme = (0, _styles.createTheme)(_object_spread_props(_object_spread({}, theme), {
958
- palette: _object_spread_props(_object_spread({}, palette), {
959
- mode: 'dark',
960
- text: {
961
- primary: '#fff',
962
- secondary: 'rgba(255, 255, 255, 0.7)',
963
- disabled: 'rgba(255, 255, 255, 0.5)'
964
- },
965
- divider: 'rgba(255, 255, 255, 0.12)',
966
- background: {
967
- paper: '#323232',
968
- default: '#303030'
969
- }
970
- })
971
- }));
972
- // A theme with custom primary and secondary color.
973
- // It's optional.
974
- function createPageContext(darkMode = false) {
975
- // const theme = darkMode ? darkTheme : lightTheme;
976
- return {
977
- theme: darkMode ? darkTheme : lightTheme,
978
- darkMode,
979
- // This is needed in order to deduplicate the injection of CSS in the page.
980
- sheetsManager: new Map(),
981
- // This is needed in order to inject the critical CSS.
982
- jss: (0, _jss.create)(_object_spread({}, (0, _jssPreset.default)())),
983
- sheetsRegistry: new _jss.SheetsRegistry(),
984
- // The standard class name generator.
985
- generateClassName: (0, _createGenerateClassName.default)()
986
- };
987
- }
988
- let pageContext;
989
- function getPageContext(darkMode) {
990
- // Make sure to create a new context for every server-side request so that data
991
- // isn't shared between connections (which would be bad).
992
- if (typeof window === 'undefined') {
993
- return createPageContext(darkMode);
994
- }
995
- // Reuse context on the client-side.
996
- if (!pageContext) {
997
- pageContext = createPageContext(darkMode);
998
- }
999
- return pageContext;
1000
- }