igniteui-webcomponents 4.0.0-alpha.3 → 4.0.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/CHANGELOG.md +14 -0
- package/components/avatar/themes/avatar.base.css.js +6 -6
- package/components/avatar/themes/avatar.base.css.js.map +1 -1
- package/components/badge/themes/light/badge.base.css.js +6 -6
- package/components/badge/themes/light/badge.base.css.js.map +1 -1
- package/components/button/themes/button/light/button.base.css.js +6 -6
- package/components/button/themes/button/light/button.base.css.js.map +1 -1
- package/components/button/themes/button/light/button.material.css.js +6 -6
- package/components/button/themes/button/light/button.material.css.js.map +1 -1
- package/components/button/themes/icon-button/light/icon-button.base.css.js +6 -6
- package/components/button/themes/icon-button/light/icon-button.base.css.js.map +1 -1
- package/components/calendar/themes/calendar.base.css.js +6 -6
- package/components/calendar/themes/calendar.base.css.js.map +1 -1
- package/components/calendar/themes/fluent/calendar.fluent.css.js +6 -6
- package/components/calendar/themes/fluent/calendar.fluent.css.js.map +1 -1
- package/components/card/themes/light/card.actions.bootstrap.css.js +6 -6
- package/components/card/themes/light/card.actions.bootstrap.css.js.map +1 -1
- package/components/card/themes/light/card.actions.material.css.js +6 -6
- package/components/card/themes/light/card.actions.material.css.js.map +1 -1
- package/components/card/themes/light/card.content.bootstrap.css.js +6 -6
- package/components/card/themes/light/card.content.bootstrap.css.js.map +1 -1
- package/components/card/themes/light/card.content.indigo.css.js +6 -6
- package/components/card/themes/light/card.content.indigo.css.js.map +1 -1
- package/components/card/themes/light/card.content.material.css.js +6 -6
- package/components/card/themes/light/card.content.material.css.js.map +1 -1
- package/components/card/themes/light/card.header.bootstrap.css.js +6 -6
- package/components/card/themes/light/card.header.bootstrap.css.js.map +1 -1
- package/components/card/themes/light/card.header.fluent.css.js +6 -6
- package/components/card/themes/light/card.header.fluent.css.js.map +1 -1
- package/components/card/themes/light/card.header.indigo.css.js +6 -6
- package/components/card/themes/light/card.header.indigo.css.js.map +1 -1
- package/components/card/themes/light/card.header.material.css.js +6 -6
- package/components/card/themes/light/card.header.material.css.js.map +1 -1
- package/components/card/themes/light/card.material.css.js +6 -6
- package/components/card/themes/light/card.material.css.js.map +1 -1
- package/components/card/themes/light/card.media.material.css.js +6 -6
- package/components/card/themes/light/card.media.material.css.js.map +1 -1
- package/components/checkbox/checkbox-base.d.ts +2 -0
- package/components/checkbox/checkbox-base.js +3 -0
- package/components/checkbox/checkbox-base.js.map +1 -1
- package/components/checkbox/themes/light/checkbox.base.css.js +6 -6
- package/components/checkbox/themes/light/checkbox.base.css.js.map +1 -1
- package/components/checkbox/themes/light/switch.base.css.js +6 -6
- package/components/checkbox/themes/light/switch.base.css.js.map +1 -1
- package/components/chip/themes/chip.base.css.js +6 -6
- package/components/chip/themes/chip.base.css.js.map +1 -1
- package/components/chip/themes/chip.bootstrap.css.js +6 -6
- package/components/chip/themes/chip.bootstrap.css.js.map +1 -1
- package/components/chip/themes/chip.fluent.css.js +6 -6
- package/components/chip/themes/chip.fluent.css.js.map +1 -1
- package/components/chip/themes/chip.indigo.css.js +6 -6
- package/components/chip/themes/chip.indigo.css.js.map +1 -1
- package/components/chip/themes/chip.material.css.js +6 -6
- package/components/chip/themes/chip.material.css.js.map +1 -1
- package/components/dialog/themes/light/dialog.base.css.js +6 -6
- package/components/dialog/themes/light/dialog.base.css.js.map +1 -1
- package/components/dropdown/themes/light/dropdown-group.base.css.js +6 -6
- package/components/dropdown/themes/light/dropdown-group.base.css.js.map +1 -1
- package/components/dropdown/themes/light/dropdown-header.base.css.js +6 -6
- package/components/dropdown/themes/light/dropdown-header.base.css.js.map +1 -1
- package/components/dropdown/themes/light/dropdown-item.base.css.js +6 -6
- package/components/dropdown/themes/light/dropdown-item.base.css.js.map +1 -1
- package/components/dropdown/themes/light/dropdown.base.css.js +6 -6
- package/components/dropdown/themes/light/dropdown.base.css.js.map +1 -1
- package/components/icon/icon.material.css.js +6 -6
- package/components/icon/icon.material.css.js.map +1 -1
- package/components/input/input.d.ts +2 -0
- package/components/input/input.js +3 -0
- package/components/input/input.js.map +1 -1
- package/components/input/themes/light/input.base.css.js +6 -6
- package/components/input/themes/light/input.base.css.js.map +1 -1
- package/components/list/themes/light/list-header.base.css.js +6 -6
- package/components/list/themes/light/list-header.base.css.js.map +1 -1
- package/components/list/themes/light/list-item.base.css.js +6 -6
- package/components/list/themes/light/list-item.base.css.js.map +1 -1
- package/components/list/themes/light/list.base.css.js +6 -6
- package/components/list/themes/light/list.base.css.js.map +1 -1
- package/components/nav-drawer/themes/light/nav-drawer-header-item.base.css.js +6 -6
- package/components/nav-drawer/themes/light/nav-drawer-header-item.base.css.js.map +1 -1
- package/components/nav-drawer/themes/light/nav-drawer-item.base.css.js +6 -6
- package/components/nav-drawer/themes/light/nav-drawer-item.base.css.js.map +1 -1
- package/components/nav-drawer/themes/light/nav-drawer.base.css.js +6 -6
- package/components/nav-drawer/themes/light/nav-drawer.base.css.js.map +1 -1
- package/components/navbar/themes/light/navbar.base.css.js +6 -6
- package/components/navbar/themes/light/navbar.base.css.js.map +1 -1
- package/components/progress/themes/circular/circular.progress.base.css.js +32 -30
- package/components/progress/themes/circular/circular.progress.base.css.js.map +1 -1
- package/components/progress/themes/circular/circular.progress.bootstrap.css.js +2 -2
- package/components/progress/themes/circular/circular.progress.bootstrap.css.js.map +1 -1
- package/components/progress/themes/circular/circular.progress.fluent.css.js +1 -1
- package/components/progress/themes/circular/circular.progress.fluent.css.js.map +1 -1
- package/components/progress/themes/linear/linear.progress.base.css.js +22 -22
- package/components/progress/themes/linear/linear.progress.base.css.js.map +1 -1
- package/components/progress/themes/linear/linear.progress.bootstrap.css.js +22 -22
- package/components/progress/themes/linear/linear.progress.bootstrap.css.js.map +1 -1
- package/components/progress/themes/linear/linear.progress.indigo.css.js +6 -6
- package/components/progress/themes/linear/linear.progress.indigo.css.js.map +1 -1
- package/components/radio/radio.d.ts +3 -1
- package/components/radio/radio.js +4 -1
- package/components/radio/radio.js.map +1 -1
- package/components/radio/themes/light/radio.base.css.js +6 -6
- package/components/radio/themes/light/radio.base.css.js.map +1 -1
- package/components/radio-group/radio-group.base.css.js +6 -6
- package/components/radio-group/radio-group.base.css.js.map +1 -1
- package/components/rating/rating-symbol.base.css.js +6 -6
- package/components/rating/rating-symbol.base.css.js.map +1 -1
- package/components/rating/rating.base.css.js +6 -6
- package/components/rating/rating.base.css.js.map +1 -1
- package/components/ripple/ripple.material.css.js +6 -6
- package/components/ripple/ripple.material.css.js.map +1 -1
- package/components/select/select.d.ts +2 -0
- package/components/select/select.js +12 -6
- package/components/select/select.js.map +1 -1
- package/components/select/themes/light/select.base.css.js +13 -6
- package/components/select/themes/light/select.base.css.js.map +1 -1
- package/components/slider/themes/light/slider.base.css.js +6 -6
- package/components/slider/themes/light/slider.base.css.js.map +1 -1
- package/components/snackbar/themes/light/snackbar.base.css.js +6 -6
- package/components/snackbar/themes/light/snackbar.base.css.js.map +1 -1
- package/components/tabs/tab-panel.js +1 -0
- package/components/tabs/tab-panel.js.map +1 -1
- package/components/tabs/tabs.js +1 -3
- package/components/tabs/tabs.js.map +1 -1
- package/components/tabs/themes/light/tab-panel.base.css.js +6 -7
- package/components/tabs/themes/light/tab-panel.base.css.js.map +1 -1
- package/components/tabs/themes/light/tab.base.css.js +6 -6
- package/components/tabs/themes/light/tab.base.css.js.map +1 -1
- package/components/tabs/themes/light/tabs.base.css.js +6 -6
- package/components/tabs/themes/light/tabs.base.css.js.map +1 -1
- package/components/toggle/toggle.controller.d.ts +1 -1
- package/components/toggle/toggle.controller.js.map +1 -1
- package/components/toggle/toggle.directive.d.ts +2 -2
- package/components/toggle/toggle.directive.js.map +1 -1
- package/components/tree/themes/light/tree-item.base.css.js +6 -6
- package/components/tree/themes/light/tree-item.base.css.js.map +1 -1
- package/components/tree/themes/light/tree.base.css.js +6 -6
- package/components/tree/themes/light/tree.base.css.js.map +1 -1
- package/index.d.ts +2 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/themes/dark/bootstrap.css +152 -87
- package/themes/dark/fluent.css +152 -87
- package/themes/dark/indigo.css +72 -7
- package/themes/dark/material.css +152 -87
- package/themes/light/bootstrap.css +152 -87
- package/themes/light/fluent.css +152 -87
- package/themes/light/indigo.css +72 -7
- package/themes/light/material.css +152 -87
- package/theming/config.d.ts +1 -1
- package/theming/config.js +1 -2
- package/theming/config.js.map +1 -1
- package/theming/index.d.ts +1 -1
- package/theming/index.js +1 -1
- package/theming/index.js.map +1 -1
- package/theming/theming-controller.d.ts +1 -1
- package/theming/theming-controller.js.map +1 -1
- package/theming/theming-decorator.d.ts +1 -1
- package/theming/theming-decorator.js.map +1 -1
- package/theming/theming-event.d.ts +1 -1
- package/theming/theming-event.js.map +1 -1
package/themes/light/indigo.css
CHANGED
|
@@ -1,13 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @sass-export-section="light-material"
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @sass-export-section="light-bootstrap"
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* @sass-export-section="light-fluent"
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* @sass-export-section="light-indigo"
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* @sass-export-section="light"
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @sass-export-section="dark-material"
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* @sass-export-section="dark-bootstrap"
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* @sass-export-section="dark-fluent"
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* @sass-export-section="dark-indigo"
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* @sass-export-section="dark"
|
|
30
|
+
*/
|
|
31
|
+
/* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */
|
|
32
|
+
/**
|
|
33
|
+
* @sass-export-section="bootstrap"
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* @sass-export-section="material"
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* @sass-export-section="fluent"
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* @sass-export-section="indigo"
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* @sass-export-section="material"
|
|
46
|
+
*/
|
|
47
|
+
.ig-scrollbar {
|
|
48
|
+
--size: var(--ig-scrollbar-size, 1rem);
|
|
49
|
+
--thumb-background: var(--ig-scrollbar-thumb-background, hsla(var(--ig-gray-400), var(--ig-gray-a)));
|
|
50
|
+
--track-background: var(--ig-scrollbar-track-background, hsla(var(--ig-gray-100), var(--ig-gray-a)));
|
|
51
|
+
scrollbar-width: var(--size);
|
|
52
|
+
scrollbar-color: var(--thumb-background) var(--track-background);
|
|
7
53
|
}
|
|
8
54
|
|
|
55
|
+
.ig-scrollbar ::-webkit-scrollbar {
|
|
56
|
+
width: var(--size);
|
|
57
|
+
height: var(--size);
|
|
58
|
+
background: var(--track-background);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ig-scrollbar ::-webkit-scrollbar-thumb {
|
|
62
|
+
background: var(--thumb-background);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media (hover: none) {
|
|
66
|
+
.ig-scrollbar ::-webkit-scrollbar {
|
|
67
|
+
width: auto;
|
|
68
|
+
height: auto;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
9
71
|
:root {
|
|
10
|
-
--
|
|
72
|
+
--ig-theme: indigo;
|
|
11
73
|
--ig-radius-factor: 1;
|
|
12
74
|
--ig-spacing: 1;
|
|
13
75
|
--ig-spacing-inline: 1;
|
|
@@ -15,6 +77,9 @@
|
|
|
15
77
|
--ig-size-small: 1;
|
|
16
78
|
--ig-size-medium: 2;
|
|
17
79
|
--ig-size-large: 3;
|
|
80
|
+
--ig-scrollbar-size: 1rem;
|
|
81
|
+
--ig-scrollbar-thumb-background: hsla(var(--ig-gray-400), var(--ig-gray-a));
|
|
82
|
+
--ig-scrollbar-track-background: hsla(var(--ig-gray-200), var(--ig-gray-a));
|
|
18
83
|
}
|
|
19
84
|
:root {
|
|
20
85
|
--ig-primary-50-contrast: black;
|
|
@@ -1,13 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @sass-export-section="light-material"
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @sass-export-section="light-bootstrap"
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* @sass-export-section="light-fluent"
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* @sass-export-section="light-indigo"
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* @sass-export-section="light"
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @sass-export-section="dark-material"
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* @sass-export-section="dark-bootstrap"
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* @sass-export-section="dark-fluent"
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* @sass-export-section="dark-indigo"
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* @sass-export-section="dark"
|
|
30
|
+
*/
|
|
31
|
+
/* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */
|
|
32
|
+
/**
|
|
33
|
+
* @sass-export-section="bootstrap"
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* @sass-export-section="material"
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* @sass-export-section="fluent"
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* @sass-export-section="indigo"
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* @sass-export-section="material"
|
|
46
|
+
*/
|
|
47
|
+
.ig-scrollbar {
|
|
48
|
+
--size: var(--ig-scrollbar-size, 1rem);
|
|
49
|
+
--thumb-background: var(--ig-scrollbar-thumb-background, hsla(var(--ig-gray-400), var(--ig-gray-a)));
|
|
50
|
+
--track-background: var(--ig-scrollbar-track-background, hsla(var(--ig-gray-100), var(--ig-gray-a)));
|
|
51
|
+
scrollbar-width: var(--size);
|
|
52
|
+
scrollbar-color: var(--thumb-background) var(--track-background);
|
|
7
53
|
}
|
|
8
54
|
|
|
55
|
+
.ig-scrollbar ::-webkit-scrollbar {
|
|
56
|
+
width: var(--size);
|
|
57
|
+
height: var(--size);
|
|
58
|
+
background: var(--track-background);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ig-scrollbar ::-webkit-scrollbar-thumb {
|
|
62
|
+
background: var(--thumb-background);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media (hover: none) {
|
|
66
|
+
.ig-scrollbar ::-webkit-scrollbar {
|
|
67
|
+
width: auto;
|
|
68
|
+
height: auto;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
9
71
|
:root {
|
|
10
|
-
--
|
|
72
|
+
--ig-theme: material;
|
|
11
73
|
--ig-radius-factor: 1;
|
|
12
74
|
--ig-spacing: 1;
|
|
13
75
|
--ig-spacing-inline: 1;
|
|
@@ -15,6 +77,9 @@
|
|
|
15
77
|
--ig-size-small: 1;
|
|
16
78
|
--ig-size-medium: 2;
|
|
17
79
|
--ig-size-large: 3;
|
|
80
|
+
--ig-scrollbar-size: 1rem;
|
|
81
|
+
--ig-scrollbar-thumb-background: hsla(var(--ig-gray-400), var(--ig-gray-a));
|
|
82
|
+
--ig-scrollbar-track-background: hsla(var(--ig-gray-100), var(--ig-gray-a));
|
|
18
83
|
}
|
|
19
84
|
|
|
20
85
|
:root {
|
|
@@ -417,7 +482,7 @@
|
|
|
417
482
|
--ig-overline-margin-bottom: 0;
|
|
418
483
|
}
|
|
419
484
|
|
|
420
|
-
.ig-
|
|
485
|
+
.ig-typography h1 {
|
|
421
486
|
font-family: var(--ig-h1-font-family);
|
|
422
487
|
font-size: var(--ig-h1-font-size);
|
|
423
488
|
font-weight: var(--ig-h1-font-weight);
|
|
@@ -428,7 +493,7 @@
|
|
|
428
493
|
margin-top: var(--ig-h1-margin-top);
|
|
429
494
|
margin-bottom: var(--ig-h1-margin-bottom);
|
|
430
495
|
}
|
|
431
|
-
.ig-
|
|
496
|
+
.ig-typography h2 {
|
|
432
497
|
font-family: var(--ig-h2-font-family);
|
|
433
498
|
font-size: var(--ig-h2-font-size);
|
|
434
499
|
font-weight: var(--ig-h2-font-weight);
|
|
@@ -439,7 +504,7 @@
|
|
|
439
504
|
margin-top: var(--ig-h2-margin-top);
|
|
440
505
|
margin-bottom: var(--ig-h2-margin-bottom);
|
|
441
506
|
}
|
|
442
|
-
.ig-
|
|
507
|
+
.ig-typography h3 {
|
|
443
508
|
font-family: var(--ig-h3-font-family);
|
|
444
509
|
font-size: var(--ig-h3-font-size);
|
|
445
510
|
font-weight: var(--ig-h3-font-weight);
|
|
@@ -450,7 +515,7 @@
|
|
|
450
515
|
margin-top: var(--ig-h3-margin-top);
|
|
451
516
|
margin-bottom: var(--ig-h3-margin-bottom);
|
|
452
517
|
}
|
|
453
|
-
.ig-
|
|
518
|
+
.ig-typography h4 {
|
|
454
519
|
font-family: var(--ig-h4-font-family);
|
|
455
520
|
font-size: var(--ig-h4-font-size);
|
|
456
521
|
font-weight: var(--ig-h4-font-weight);
|
|
@@ -461,7 +526,7 @@
|
|
|
461
526
|
margin-top: var(--ig-h4-margin-top);
|
|
462
527
|
margin-bottom: var(--ig-h4-margin-bottom);
|
|
463
528
|
}
|
|
464
|
-
.ig-
|
|
529
|
+
.ig-typography h5 {
|
|
465
530
|
font-family: var(--ig-h5-font-family);
|
|
466
531
|
font-size: var(--ig-h5-font-size);
|
|
467
532
|
font-weight: var(--ig-h5-font-weight);
|
|
@@ -472,7 +537,7 @@
|
|
|
472
537
|
margin-top: var(--ig-h5-margin-top);
|
|
473
538
|
margin-bottom: var(--ig-h5-margin-bottom);
|
|
474
539
|
}
|
|
475
|
-
.ig-
|
|
540
|
+
.ig-typography h6 {
|
|
476
541
|
font-family: var(--ig-h6-font-family);
|
|
477
542
|
font-size: var(--ig-h6-font-size);
|
|
478
543
|
font-weight: var(--ig-h6-font-weight);
|
|
@@ -483,29 +548,7 @@
|
|
|
483
548
|
margin-top: var(--ig-h6-margin-top);
|
|
484
549
|
margin-bottom: var(--ig-h6-margin-bottom);
|
|
485
550
|
}
|
|
486
|
-
.ig-
|
|
487
|
-
font-family: var(--ig-subtitle-1-font-family);
|
|
488
|
-
font-size: var(--ig-subtitle-1-font-size);
|
|
489
|
-
font-weight: var(--ig-subtitle-1-font-weight);
|
|
490
|
-
font-style: var(--ig-subtitle-1-font-style);
|
|
491
|
-
line-height: var(--ig-subtitle-1-line-height);
|
|
492
|
-
letter-spacing: var(--ig-subtitle-1-letter-spacing);
|
|
493
|
-
text-transform: var(--ig-subtitle-1-text-transform);
|
|
494
|
-
margin-top: var(--ig-subtitle-1-margin-top);
|
|
495
|
-
margin-bottom: var(--ig-subtitle-1-margin-bottom);
|
|
496
|
-
}
|
|
497
|
-
.ig-typography__subtitle-2 {
|
|
498
|
-
font-family: var(--ig-subtitle-2-font-family);
|
|
499
|
-
font-size: var(--ig-subtitle-2-font-size);
|
|
500
|
-
font-weight: var(--ig-subtitle-2-font-weight);
|
|
501
|
-
font-style: var(--ig-subtitle-2-font-style);
|
|
502
|
-
line-height: var(--ig-subtitle-2-line-height);
|
|
503
|
-
letter-spacing: var(--ig-subtitle-2-letter-spacing);
|
|
504
|
-
text-transform: var(--ig-subtitle-2-text-transform);
|
|
505
|
-
margin-top: var(--ig-subtitle-2-margin-top);
|
|
506
|
-
margin-bottom: var(--ig-subtitle-2-margin-bottom);
|
|
507
|
-
}
|
|
508
|
-
.ig-typography__body-1 {
|
|
551
|
+
.ig-typography p {
|
|
509
552
|
font-family: var(--ig-body-1-font-family);
|
|
510
553
|
font-size: var(--ig-body-1-font-size);
|
|
511
554
|
font-weight: var(--ig-body-1-font-weight);
|
|
@@ -516,51 +559,7 @@
|
|
|
516
559
|
margin-top: var(--ig-body-1-margin-top);
|
|
517
560
|
margin-bottom: var(--ig-body-1-margin-bottom);
|
|
518
561
|
}
|
|
519
|
-
.ig-
|
|
520
|
-
font-family: var(--ig-body-2-font-family);
|
|
521
|
-
font-size: var(--ig-body-2-font-size);
|
|
522
|
-
font-weight: var(--ig-body-2-font-weight);
|
|
523
|
-
font-style: var(--ig-body-2-font-style);
|
|
524
|
-
line-height: var(--ig-body-2-line-height);
|
|
525
|
-
letter-spacing: var(--ig-body-2-letter-spacing);
|
|
526
|
-
text-transform: var(--ig-body-2-text-transform);
|
|
527
|
-
margin-top: var(--ig-body-2-margin-top);
|
|
528
|
-
margin-bottom: var(--ig-body-2-margin-bottom);
|
|
529
|
-
}
|
|
530
|
-
.ig-typography__button {
|
|
531
|
-
font-family: var(--ig-button-font-family);
|
|
532
|
-
font-size: var(--ig-button-font-size);
|
|
533
|
-
font-weight: var(--ig-button-font-weight);
|
|
534
|
-
font-style: var(--ig-button-font-style);
|
|
535
|
-
line-height: var(--ig-button-line-height);
|
|
536
|
-
letter-spacing: var(--ig-button-letter-spacing);
|
|
537
|
-
text-transform: var(--ig-button-text-transform);
|
|
538
|
-
margin-top: var(--ig-button-margin-top);
|
|
539
|
-
margin-bottom: var(--ig-button-margin-bottom);
|
|
540
|
-
}
|
|
541
|
-
.ig-typography__caption {
|
|
542
|
-
font-family: var(--ig-caption-font-family);
|
|
543
|
-
font-size: var(--ig-caption-font-size);
|
|
544
|
-
font-weight: var(--ig-caption-font-weight);
|
|
545
|
-
font-style: var(--ig-caption-font-style);
|
|
546
|
-
line-height: var(--ig-caption-line-height);
|
|
547
|
-
letter-spacing: var(--ig-caption-letter-spacing);
|
|
548
|
-
text-transform: var(--ig-caption-text-transform);
|
|
549
|
-
margin-top: var(--ig-caption-margin-top);
|
|
550
|
-
margin-bottom: var(--ig-caption-margin-bottom);
|
|
551
|
-
}
|
|
552
|
-
.ig-typography__overline {
|
|
553
|
-
font-family: var(--ig-overline-font-family);
|
|
554
|
-
font-size: var(--ig-overline-font-size);
|
|
555
|
-
font-weight: var(--ig-overline-font-weight);
|
|
556
|
-
font-style: var(--ig-overline-font-style);
|
|
557
|
-
line-height: var(--ig-overline-line-height);
|
|
558
|
-
letter-spacing: var(--ig-overline-letter-spacing);
|
|
559
|
-
text-transform: var(--ig-overline-text-transform);
|
|
560
|
-
margin-top: var(--ig-overline-margin-top);
|
|
561
|
-
margin-bottom: var(--ig-overline-margin-bottom);
|
|
562
|
-
}
|
|
563
|
-
.ig-typography h1 {
|
|
562
|
+
.ig-typography .ig-typography__h1 {
|
|
564
563
|
font-family: var(--ig-h1-font-family);
|
|
565
564
|
font-size: var(--ig-h1-font-size);
|
|
566
565
|
font-weight: var(--ig-h1-font-weight);
|
|
@@ -571,7 +570,7 @@
|
|
|
571
570
|
margin-top: var(--ig-h1-margin-top);
|
|
572
571
|
margin-bottom: var(--ig-h1-margin-bottom);
|
|
573
572
|
}
|
|
574
|
-
.ig-typography
|
|
573
|
+
.ig-typography .ig-typography__h2 {
|
|
575
574
|
font-family: var(--ig-h2-font-family);
|
|
576
575
|
font-size: var(--ig-h2-font-size);
|
|
577
576
|
font-weight: var(--ig-h2-font-weight);
|
|
@@ -582,7 +581,7 @@
|
|
|
582
581
|
margin-top: var(--ig-h2-margin-top);
|
|
583
582
|
margin-bottom: var(--ig-h2-margin-bottom);
|
|
584
583
|
}
|
|
585
|
-
.ig-typography
|
|
584
|
+
.ig-typography .ig-typography__h3 {
|
|
586
585
|
font-family: var(--ig-h3-font-family);
|
|
587
586
|
font-size: var(--ig-h3-font-size);
|
|
588
587
|
font-weight: var(--ig-h3-font-weight);
|
|
@@ -593,7 +592,7 @@
|
|
|
593
592
|
margin-top: var(--ig-h3-margin-top);
|
|
594
593
|
margin-bottom: var(--ig-h3-margin-bottom);
|
|
595
594
|
}
|
|
596
|
-
.ig-typography
|
|
595
|
+
.ig-typography .ig-typography__h4 {
|
|
597
596
|
font-family: var(--ig-h4-font-family);
|
|
598
597
|
font-size: var(--ig-h4-font-size);
|
|
599
598
|
font-weight: var(--ig-h4-font-weight);
|
|
@@ -604,7 +603,7 @@
|
|
|
604
603
|
margin-top: var(--ig-h4-margin-top);
|
|
605
604
|
margin-bottom: var(--ig-h4-margin-bottom);
|
|
606
605
|
}
|
|
607
|
-
.ig-typography
|
|
606
|
+
.ig-typography .ig-typography__h5 {
|
|
608
607
|
font-family: var(--ig-h5-font-family);
|
|
609
608
|
font-size: var(--ig-h5-font-size);
|
|
610
609
|
font-weight: var(--ig-h5-font-weight);
|
|
@@ -615,7 +614,7 @@
|
|
|
615
614
|
margin-top: var(--ig-h5-margin-top);
|
|
616
615
|
margin-bottom: var(--ig-h5-margin-bottom);
|
|
617
616
|
}
|
|
618
|
-
.ig-typography
|
|
617
|
+
.ig-typography .ig-typography__h6 {
|
|
619
618
|
font-family: var(--ig-h6-font-family);
|
|
620
619
|
font-size: var(--ig-h6-font-size);
|
|
621
620
|
font-weight: var(--ig-h6-font-weight);
|
|
@@ -626,7 +625,29 @@
|
|
|
626
625
|
margin-top: var(--ig-h6-margin-top);
|
|
627
626
|
margin-bottom: var(--ig-h6-margin-bottom);
|
|
628
627
|
}
|
|
629
|
-
.ig-typography
|
|
628
|
+
.ig-typography .ig-typography__subtitle-1 {
|
|
629
|
+
font-family: var(--ig-subtitle-1-font-family);
|
|
630
|
+
font-size: var(--ig-subtitle-1-font-size);
|
|
631
|
+
font-weight: var(--ig-subtitle-1-font-weight);
|
|
632
|
+
font-style: var(--ig-subtitle-1-font-style);
|
|
633
|
+
line-height: var(--ig-subtitle-1-line-height);
|
|
634
|
+
letter-spacing: var(--ig-subtitle-1-letter-spacing);
|
|
635
|
+
text-transform: var(--ig-subtitle-1-text-transform);
|
|
636
|
+
margin-top: var(--ig-subtitle-1-margin-top);
|
|
637
|
+
margin-bottom: var(--ig-subtitle-1-margin-bottom);
|
|
638
|
+
}
|
|
639
|
+
.ig-typography .ig-typography__subtitle-2 {
|
|
640
|
+
font-family: var(--ig-subtitle-2-font-family);
|
|
641
|
+
font-size: var(--ig-subtitle-2-font-size);
|
|
642
|
+
font-weight: var(--ig-subtitle-2-font-weight);
|
|
643
|
+
font-style: var(--ig-subtitle-2-font-style);
|
|
644
|
+
line-height: var(--ig-subtitle-2-line-height);
|
|
645
|
+
letter-spacing: var(--ig-subtitle-2-letter-spacing);
|
|
646
|
+
text-transform: var(--ig-subtitle-2-text-transform);
|
|
647
|
+
margin-top: var(--ig-subtitle-2-margin-top);
|
|
648
|
+
margin-bottom: var(--ig-subtitle-2-margin-bottom);
|
|
649
|
+
}
|
|
650
|
+
.ig-typography .ig-typography__body-1 {
|
|
630
651
|
font-family: var(--ig-body-1-font-family);
|
|
631
652
|
font-size: var(--ig-body-1-font-size);
|
|
632
653
|
font-weight: var(--ig-body-1-font-weight);
|
|
@@ -636,4 +657,48 @@
|
|
|
636
657
|
text-transform: var(--ig-body-1-text-transform);
|
|
637
658
|
margin-top: var(--ig-body-1-margin-top);
|
|
638
659
|
margin-bottom: var(--ig-body-1-margin-bottom);
|
|
660
|
+
}
|
|
661
|
+
.ig-typography .ig-typography__body-2 {
|
|
662
|
+
font-family: var(--ig-body-2-font-family);
|
|
663
|
+
font-size: var(--ig-body-2-font-size);
|
|
664
|
+
font-weight: var(--ig-body-2-font-weight);
|
|
665
|
+
font-style: var(--ig-body-2-font-style);
|
|
666
|
+
line-height: var(--ig-body-2-line-height);
|
|
667
|
+
letter-spacing: var(--ig-body-2-letter-spacing);
|
|
668
|
+
text-transform: var(--ig-body-2-text-transform);
|
|
669
|
+
margin-top: var(--ig-body-2-margin-top);
|
|
670
|
+
margin-bottom: var(--ig-body-2-margin-bottom);
|
|
671
|
+
}
|
|
672
|
+
.ig-typography .ig-typography__button {
|
|
673
|
+
font-family: var(--ig-button-font-family);
|
|
674
|
+
font-size: var(--ig-button-font-size);
|
|
675
|
+
font-weight: var(--ig-button-font-weight);
|
|
676
|
+
font-style: var(--ig-button-font-style);
|
|
677
|
+
line-height: var(--ig-button-line-height);
|
|
678
|
+
letter-spacing: var(--ig-button-letter-spacing);
|
|
679
|
+
text-transform: var(--ig-button-text-transform);
|
|
680
|
+
margin-top: var(--ig-button-margin-top);
|
|
681
|
+
margin-bottom: var(--ig-button-margin-bottom);
|
|
682
|
+
}
|
|
683
|
+
.ig-typography .ig-typography__caption {
|
|
684
|
+
font-family: var(--ig-caption-font-family);
|
|
685
|
+
font-size: var(--ig-caption-font-size);
|
|
686
|
+
font-weight: var(--ig-caption-font-weight);
|
|
687
|
+
font-style: var(--ig-caption-font-style);
|
|
688
|
+
line-height: var(--ig-caption-line-height);
|
|
689
|
+
letter-spacing: var(--ig-caption-letter-spacing);
|
|
690
|
+
text-transform: var(--ig-caption-text-transform);
|
|
691
|
+
margin-top: var(--ig-caption-margin-top);
|
|
692
|
+
margin-bottom: var(--ig-caption-margin-bottom);
|
|
693
|
+
}
|
|
694
|
+
.ig-typography .ig-typography__overline {
|
|
695
|
+
font-family: var(--ig-overline-font-family);
|
|
696
|
+
font-size: var(--ig-overline-font-size);
|
|
697
|
+
font-weight: var(--ig-overline-font-weight);
|
|
698
|
+
font-style: var(--ig-overline-font-style);
|
|
699
|
+
line-height: var(--ig-overline-line-height);
|
|
700
|
+
letter-spacing: var(--ig-overline-letter-spacing);
|
|
701
|
+
text-transform: var(--ig-overline-text-transform);
|
|
702
|
+
margin-top: var(--ig-overline-margin-top);
|
|
703
|
+
margin-bottom: var(--ig-overline-margin-bottom);
|
|
639
704
|
}
|
package/theming/config.d.ts
CHANGED
package/theming/config.js
CHANGED
|
@@ -9,8 +9,7 @@ function isOfTypeTheme(theme) {
|
|
|
9
9
|
}
|
|
10
10
|
export const getTheme = () => {
|
|
11
11
|
if (!theme) {
|
|
12
|
-
const [_, t] = Object.entries(getAllCSSVariables()).find(([v]) => v === '
|
|
13
|
-
[];
|
|
12
|
+
const [_, t] = Object.entries(getAllCSSVariables()).find(([v]) => v === 'igTheme') || [];
|
|
14
13
|
theme = t && isOfTypeTheme(t) ? t : 'bootstrap';
|
|
15
14
|
}
|
|
16
15
|
return theme;
|
package/theming/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/theming/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,IAAI,KAAY,CAAC;AAKjB,SAAS,oBAAoB,CAAC,MAA8B;IAC1D,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,kBAAkB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,CAAC,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAgB,GAAG,EAAE;IACxC,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GACV,MAAM,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/theming/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,IAAI,KAAY,CAAC;AAKjB,SAAS,oBAAoB,CAAC,MAA8B;IAC1D,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,kBAAkB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,CAAC,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAgB,GAAG,EAAE;IACxC,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GACV,MAAM,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,IAAI,EAAE,CAAC;QAE5E,KAAK,GAAG,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAW,CAAC,CAAC,CAAC,WAAW,CAAC;KAC5D;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAY,EAAE,EAAE;IACvC,KAAK,GAAG,KAAK,CAAC;AAChB,CAAC,CAAC;AAYF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAQ,EAAE,EAAE;IACzC,IAAI,aAAa,CAAC,CAAC,CAAC,EAAE;QACpB,QAAQ,CAAC,CAAC,CAAC,CAAC;KACb;IAED,oBAAoB,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAClC,CAAC,CAAC","sourcesContent":["import { ChangeThemeEventDetail, CHANGE_THEME_EVENT } from './theming-event.js';\nimport type { Theme } from './types.js';\nimport { getAllCSSVariables } from './utils.js';\n\nlet theme: Theme;\n\n/**\n * Dispatch an \"igc-change-theme\" event to `window` with the given detail.\n */\nfunction dispatchThemingEvent(detail: ChangeThemeEventDetail) {\n window.dispatchEvent(new CustomEvent(CHANGE_THEME_EVENT, { detail }));\n}\n\nfunction isOfTypeTheme(theme: string): theme is Theme {\n return ['bootstrap', 'material', 'indigo', 'fluent'].includes(theme);\n}\n\nexport const getTheme: () => Theme = () => {\n if (!theme) {\n const [_, t] =\n Object.entries(getAllCSSVariables()).find(([v]) => v === 'igTheme') || [];\n\n theme = t && isOfTypeTheme(t) ? (t as Theme) : 'bootstrap';\n }\n\n return theme;\n};\n\nexport const setTheme = (value: Theme) => {\n theme = value;\n};\n\n/**\n * Allows the global configuration of the active theme.\n *\n * Usage:\n * ```ts\n * import { configureTheme } from 'igniteui-webcomponents';\n *\n * configureTheme({ theme: 'material' });\n * ```\n */\nexport const configureTheme = (t: Theme) => {\n if (isOfTypeTheme(t)) {\n setTheme(t);\n }\n\n dispatchThemingEvent({ theme });\n};\n"]}
|
package/theming/index.d.ts
CHANGED
package/theming/index.js
CHANGED
package/theming/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC","sourcesContent":["export * from './config.js';\nexport * from './theming-controller.js';\nexport * from './theming-decorator.js';\nexport * from './types.js';\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactiveController, ReactiveControllerHost, ReactiveElement } from 'lit';
|
|
2
|
-
import type { Theme, ThemeController, Themes } from './types';
|
|
2
|
+
import type { Theme, ThemeController, Themes } from './types.js';
|
|
3
3
|
declare class ThemingController implements ReactiveController, ThemeController {
|
|
4
4
|
private themes;
|
|
5
5
|
private host;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theming-controller.js","sourceRoot":"","sources":["../../src/theming/theming-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,GAAG,GAKJ,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,MAAM,iBAAiB;IAKrB,YAAY,IAA8C,EAAE,MAAc;QAKzD,0BAAqB,GAAG,GAAG,EAAE;YAC5C,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;QAC5B,CAAC,CAAC;QAPA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAOM,aAAa;QAClB,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAC1E,CAAC;IAEM,gBAAgB;QACrB,MAAM,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAC7E,CAAC;IAES,WAAW;QACnB,IAAI,CAAC,KAAK,GAAG,QAAQ,EAAE,CAAC;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,WAAgC,CAAC;QACxD,MAAM,2BAA2B,GAC/B,MAAM,CAAC,UAAU;YACjB,oBAAoB,IAAI,QAAQ,CAAC,SAAS;YAC1C,SAAS,IAAI,aAAa,CAAC,SAAS,CAAC;QAEvC,IAAI,UAAU,GAAG,GAAG,CAAA,EAAE,CAAC;QAEvB,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAChD,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,CAChC,CAAC;QAEF,IAAI,KAAK,EAAE;YACT,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC;YAC7B,UAAU,GAAG,SAAS,CAAC;SACxB;QAOD,IAAI,CAAC,2BAA2B,EAAE;YAChC,CAAC,GAAG,IAAI,CAAC,IAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;iBACjD,KAAK,CAAC,CAAC,CAAC;iBACR,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;SACnC;QAED,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,UAAwB,EAAE;YAC9C,GAAG,IAAI,CAAC,aAAa;YACrB,UAAU;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,uBAAuB,GAAG,CAC9B,IAA8C,EAC9C,MAAc,EACd,EAAE;IACF,MAAM,UAAU,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACvD,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC/B,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAE/B,uBAAuB,CAAC","sourcesContent":["import {\n adoptStyles,\n css,\n LitElement,\n ReactiveController,\n ReactiveControllerHost,\n ReactiveElement,\n} from 'lit';\nimport { getTheme } from './config.js';\nimport { CHANGE_THEME_EVENT } from './theming-event.js';\nimport type { Theme, ThemeController, Themes } from './types';\n\nclass ThemingController implements ReactiveController, ThemeController {\n private themes: Themes;\n private host: ReactiveControllerHost & ReactiveElement;\n public theme!: Theme;\n\n constructor(host: ReactiveControllerHost & ReactiveElement, themes: Themes) {\n this.host = host;\n this.themes = themes;\n }\n\n private readonly __themingEventHandler = () => {\n this.adoptStyles();\n this.host.requestUpdate();\n };\n\n public hostConnected() {\n this.adoptStyles();\n window.addEventListener(CHANGE_THEME_EVENT, this.__themingEventHandler);\n }\n\n public hostDisconnected() {\n window.removeEventListener(CHANGE_THEME_EVENT, this.__themingEventHandler);\n }\n\n protected adoptStyles() {\n this.theme = getTheme();\n const ctor = this.host.constructor as typeof LitElement;\n const supportsAdoptingStyleSheets =\n window.ShadowRoot &&\n 'adoptedStyleSheets' in Document.prototype &&\n 'replace' in CSSStyleSheet.prototype;\n\n let styleSheet = css``;\n\n const [theme] = Object.entries(this.themes).filter(\n ([name]) => name === this.theme\n );\n\n if (theme) {\n const [_, cssResult] = theme;\n styleSheet = cssResult;\n }\n\n // Firefox and Safari don't support the adoptedStyleSheets API yet,\n // and the lit framework appends the resolved stylesheets indiscriminately\n // when using the adoptStyles API below. Hence, we need to remove all previously\n // defined style tags in the shadow root as changing the themes at runtime just\n // keeps stacking the resolved styles one over the other, resulting in broken themes.\n if (!supportsAdoptingStyleSheets) {\n [...this.host!.renderRoot.querySelectorAll('style')]\n .slice(1)\n .forEach((tag) => tag.remove());\n }\n\n adoptStyles(this.host.shadowRoot as ShadowRoot, [\n ...ctor.elementStyles,\n styleSheet,\n ]);\n }\n}\n\nconst _updateWhenThemeChanges = (\n host: ReactiveControllerHost & ReactiveElement,\n themes: Themes\n) => {\n const controller = new ThemingController(host, themes);\n host.addController(controller);\n return controller;\n};\n\nexport const updateWhenThemeChanges: typeof _updateWhenThemeChanges & {\n _THEMING_CONTROLLER_FN_?: never;\n} = _updateWhenThemeChanges;\n"]}
|
|
1
|
+
{"version":3,"file":"theming-controller.js","sourceRoot":"","sources":["../../src/theming/theming-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,GAAG,GAKJ,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,MAAM,iBAAiB;IAKrB,YAAY,IAA8C,EAAE,MAAc;QAKzD,0BAAqB,GAAG,GAAG,EAAE;YAC5C,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;QAC5B,CAAC,CAAC;QAPA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAOM,aAAa;QAClB,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAC1E,CAAC;IAEM,gBAAgB;QACrB,MAAM,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAC7E,CAAC;IAES,WAAW;QACnB,IAAI,CAAC,KAAK,GAAG,QAAQ,EAAE,CAAC;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,WAAgC,CAAC;QACxD,MAAM,2BAA2B,GAC/B,MAAM,CAAC,UAAU;YACjB,oBAAoB,IAAI,QAAQ,CAAC,SAAS;YAC1C,SAAS,IAAI,aAAa,CAAC,SAAS,CAAC;QAEvC,IAAI,UAAU,GAAG,GAAG,CAAA,EAAE,CAAC;QAEvB,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAChD,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,CAChC,CAAC;QAEF,IAAI,KAAK,EAAE;YACT,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC;YAC7B,UAAU,GAAG,SAAS,CAAC;SACxB;QAOD,IAAI,CAAC,2BAA2B,EAAE;YAChC,CAAC,GAAG,IAAI,CAAC,IAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;iBACjD,KAAK,CAAC,CAAC,CAAC;iBACR,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;SACnC;QAED,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,UAAwB,EAAE;YAC9C,GAAG,IAAI,CAAC,aAAa;YACrB,UAAU;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,uBAAuB,GAAG,CAC9B,IAA8C,EAC9C,MAAc,EACd,EAAE;IACF,MAAM,UAAU,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACvD,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC/B,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAE/B,uBAAuB,CAAC","sourcesContent":["import {\n adoptStyles,\n css,\n LitElement,\n ReactiveController,\n ReactiveControllerHost,\n ReactiveElement,\n} from 'lit';\nimport { getTheme } from './config.js';\nimport { CHANGE_THEME_EVENT } from './theming-event.js';\nimport type { Theme, ThemeController, Themes } from './types.js';\n\nclass ThemingController implements ReactiveController, ThemeController {\n private themes: Themes;\n private host: ReactiveControllerHost & ReactiveElement;\n public theme!: Theme;\n\n constructor(host: ReactiveControllerHost & ReactiveElement, themes: Themes) {\n this.host = host;\n this.themes = themes;\n }\n\n private readonly __themingEventHandler = () => {\n this.adoptStyles();\n this.host.requestUpdate();\n };\n\n public hostConnected() {\n this.adoptStyles();\n window.addEventListener(CHANGE_THEME_EVENT, this.__themingEventHandler);\n }\n\n public hostDisconnected() {\n window.removeEventListener(CHANGE_THEME_EVENT, this.__themingEventHandler);\n }\n\n protected adoptStyles() {\n this.theme = getTheme();\n const ctor = this.host.constructor as typeof LitElement;\n const supportsAdoptingStyleSheets =\n window.ShadowRoot &&\n 'adoptedStyleSheets' in Document.prototype &&\n 'replace' in CSSStyleSheet.prototype;\n\n let styleSheet = css``;\n\n const [theme] = Object.entries(this.themes).filter(\n ([name]) => name === this.theme\n );\n\n if (theme) {\n const [_, cssResult] = theme;\n styleSheet = cssResult;\n }\n\n // Firefox and Safari don't support the adoptedStyleSheets API yet,\n // and the lit framework appends the resolved stylesheets indiscriminately\n // when using the adoptStyles API below. Hence, we need to remove all previously\n // defined style tags in the shadow root as changing the themes at runtime just\n // keeps stacking the resolved styles one over the other, resulting in broken themes.\n if (!supportsAdoptingStyleSheets) {\n [...this.host!.renderRoot.querySelectorAll('style')]\n .slice(1)\n .forEach((tag) => tag.remove());\n }\n\n adoptStyles(this.host.shadowRoot as ShadowRoot, [\n ...ctor.elementStyles,\n styleSheet,\n ]);\n }\n}\n\nconst _updateWhenThemeChanges = (\n host: ReactiveControllerHost & ReactiveElement,\n themes: Themes\n) => {\n const controller = new ThemingController(host, themes);\n host.addController(controller);\n return controller;\n};\n\nexport const updateWhenThemeChanges: typeof _updateWhenThemeChanges & {\n _THEMING_CONTROLLER_FN_?: never;\n} = _updateWhenThemeChanges;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theming-decorator.js","sourceRoot":"","sources":["../../src/theming/theming-decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAyBjE,MAAM,UAAU,MAAM,CAAC,MAAc;IACnC,OAAO,CAAC,KAAU,EAAE,EAAE;QACpB,KAAK,CAAC,cAAc,CAAC,CAAC,QAAyC,EAAE,EAAE;YACjE,MAAM,UAAU,GAAG,sBAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAE5D,IAAI,cAAc,IAAI,QAAQ,EAAE;gBAC9B,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;aACnC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { ReactiveElement } from 'lit';\nimport { updateWhenThemeChanges } from './theming-controller.js';\nimport { ReactiveTheme, Themes } from './types';\n\n/**\n * Class decorator to enable multiple theme support for a component.\n * The component will re-render on theme changes.\n *\n * See also {@link updateWhenThemeChanges} for the same functionallity\n * without the use of this decorator.\n *\n * Usage:\n * ```ts\n * import { LitElement, html } from 'lit';\n * import { themes } from 'igniteui-webcomponents/themes';\n * import { styles } from './themes/my-element.base.css';\n * import { styles as material } from './themes/my-element.material.css';\n * import { styles as bootstrap } from './themes/my-element.bootstrap.css';\n * import { styles as indigo } from './themes/my-element.indigo.css';\n *\n * @themes({ material, bootstrap, indigo })\n * class MyElement extends LitElement {\n * public static styles = styles;\n * }\n * ```\n */\nexport function themes(themes: Themes) {\n return (clazz: any) => {\n clazz.addInitializer((instance: ReactiveElement & ReactiveTheme) => {\n const controller = updateWhenThemeChanges(instance, themes);\n\n if ('themeAdopted' in instance) {\n instance.themeAdopted(controller);\n }\n });\n return clazz;\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"theming-decorator.js","sourceRoot":"","sources":["../../src/theming/theming-decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAyBjE,MAAM,UAAU,MAAM,CAAC,MAAc;IACnC,OAAO,CAAC,KAAU,EAAE,EAAE;QACpB,KAAK,CAAC,cAAc,CAAC,CAAC,QAAyC,EAAE,EAAE;YACjE,MAAM,UAAU,GAAG,sBAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAE5D,IAAI,cAAc,IAAI,QAAQ,EAAE;gBAC9B,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;aACnC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { ReactiveElement } from 'lit';\nimport { updateWhenThemeChanges } from './theming-controller.js';\nimport { ReactiveTheme, Themes } from './types.js';\n\n/**\n * Class decorator to enable multiple theme support for a component.\n * The component will re-render on theme changes.\n *\n * See also {@link updateWhenThemeChanges} for the same functionallity\n * without the use of this decorator.\n *\n * Usage:\n * ```ts\n * import { LitElement, html } from 'lit';\n * import { themes } from 'igniteui-webcomponents/themes';\n * import { styles } from './themes/my-element.base.css';\n * import { styles as material } from './themes/my-element.material.css';\n * import { styles as bootstrap } from './themes/my-element.bootstrap.css';\n * import { styles as indigo } from './themes/my-element.indigo.css';\n *\n * @themes({ material, bootstrap, indigo })\n * class MyElement extends LitElement {\n * public static styles = styles;\n * }\n * ```\n */\nexport function themes(themes: Themes) {\n return (clazz: any) => {\n clazz.addInitializer((instance: ReactiveElement & ReactiveTheme) => {\n const controller = updateWhenThemeChanges(instance, themes);\n\n if ('themeAdopted' in instance) {\n instance.themeAdopted(controller);\n }\n });\n return clazz;\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theming-event.js","sourceRoot":"","sources":["../../src/theming/theming-event.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC","sourcesContent":["import type { Theme } from './types';\n\nexport const CHANGE_THEME_EVENT = 'igc-change-theme';\n\n// Misfiring eslint rule\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare global {\n interface WindowEventMap {\n [CHANGE_THEME_EVENT]: CustomEvent<ChangeThemeEventDetail>;\n }\n}\n\n/**\n * The possible details of the \"igc-change-theme\" event.\n */\nexport type ChangeThemeEventDetail = {\n theme: Theme;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"theming-event.js","sourceRoot":"","sources":["../../src/theming/theming-event.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC","sourcesContent":["import type { Theme } from './types.js';\n\nexport const CHANGE_THEME_EVENT = 'igc-change-theme';\n\n// Misfiring eslint rule\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare global {\n interface WindowEventMap {\n [CHANGE_THEME_EVENT]: CustomEvent<ChangeThemeEventDetail>;\n }\n}\n\n/**\n * The possible details of the \"igc-change-theme\" event.\n */\nexport type ChangeThemeEventDetail = {\n theme: Theme;\n};\n"]}
|