igniteui-angular 20.0.0 → 20.0.2
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/fesm2022/igniteui-angular.mjs +9 -11
- package/fesm2022/igniteui-angular.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/lib/core/styles/components/_common/_igx-vhelper.scss +1 -0
- package/lib/core/styles/components/action-strip/_action-strip-theme.scss +2 -7
- package/lib/core/styles/components/avatar/_avatar-theme.scss +7 -8
- package/lib/core/styles/components/badge/_badge-theme.scss +3 -8
- package/lib/core/styles/components/banner/_banner-theme.scss +6 -7
- package/lib/core/styles/components/bottom-nav/_bottom-nav-theme.scss +17 -28
- package/lib/core/styles/components/button/_button-theme.scss +219 -158
- package/lib/core/styles/components/button/_contained-button-theme.scss +302 -0
- package/lib/core/styles/components/button/_fab-button-theme.scss +296 -0
- package/lib/core/styles/components/button/_flat-button-theme.scss +356 -0
- package/lib/core/styles/components/button/_outlined-button-theme.scss +419 -0
- package/lib/core/styles/components/button-group/_button-group-theme.scss +113 -29
- package/lib/core/styles/components/calendar/_calendar-theme.scss +502 -112
- package/lib/core/styles/components/card/_card-theme.scss +5 -16
- package/lib/core/styles/components/carousel/_carousel-theme.scss +103 -23
- package/lib/core/styles/components/checkbox/_checkbox-component.scss +1 -1
- package/lib/core/styles/components/checkbox/_checkbox-theme.scss +63 -11
- package/lib/core/styles/components/chip/_chip-theme.scss +64 -47
- package/lib/core/styles/components/column-actions/_column-actions-theme.scss +2 -7
- package/lib/core/styles/components/combo/_combo-theme.scss +54 -12
- package/lib/core/styles/components/dialog/_dialog-theme.scss +9 -12
- package/lib/core/styles/components/divider/_divider-theme.scss +1 -6
- package/lib/core/styles/components/drop-down/_drop-down-theme.scss +52 -32
- package/lib/core/styles/components/expansion-panel/_expansion-panel-theme.scss +18 -13
- package/lib/core/styles/components/grid/_grid-theme.scss +115 -94
- package/lib/core/styles/components/grid/_pivot-data-selector-theme.scss +1 -6
- package/lib/core/styles/components/grid-summary/_grid-summary-theme.scss +12 -13
- package/lib/core/styles/components/grid-toolbar/_grid-toolbar-theme.scss +7 -12
- package/lib/core/styles/components/highlight/highlight-theme.scss +2 -3
- package/lib/core/styles/components/icon/_icon-theme.scss +0 -1
- package/lib/core/styles/components/icon-button/_contained-icon-button-theme.scss +196 -0
- package/lib/core/styles/components/icon-button/_flat-icon-button-theme.scss +188 -0
- package/lib/core/styles/components/icon-button/_icon-button-theme.scss +45 -32
- package/lib/core/styles/components/icon-button/_outlined-icon-button-theme.scss +232 -0
- package/lib/core/styles/components/input/_input-group-theme.scss +272 -21
- package/lib/core/styles/components/label/_label-theme.scss +2 -4
- package/lib/core/styles/components/list/_list-theme.scss +42 -66
- package/lib/core/styles/components/navbar/_navbar-theme.scss +25 -15
- package/lib/core/styles/components/navdrawer/_navdrawer-theme.scss +24 -22
- package/lib/core/styles/components/overlay/_overlay-theme.scss +0 -1
- package/lib/core/styles/components/paginator/_paginator-theme.scss +2 -7
- package/lib/core/styles/components/progress/circular/_circular-theme.scss +3 -8
- package/lib/core/styles/components/progress/linear/_linear-theme.scss +1 -6
- package/lib/core/styles/components/query-builder/_query-builder-theme.scss +28 -11
- package/lib/core/styles/components/radio/_radio-theme.scss +54 -10
- package/lib/core/styles/components/ripple/_ripple-theme.scss +0 -1
- package/lib/core/styles/components/scrollbar/scrollbar-theme.scss +0 -1
- package/lib/core/styles/components/select/_select-theme.scss +35 -7
- package/lib/core/styles/components/slider/_slider-theme.scss +92 -7
- package/lib/core/styles/components/snackbar/_snackbar-theme.scss +3 -8
- package/lib/core/styles/components/splitter/_splitter-theme.scss +15 -8
- package/lib/core/styles/components/stepper/_stepper-theme.scss +190 -22
- package/lib/core/styles/components/switch/_switch-theme.scss +112 -8
- package/lib/core/styles/components/tabs/_tabs-theme.scss +124 -56
- package/lib/core/styles/components/time-picker/_time-picker-theme.scss +35 -18
- package/lib/core/styles/components/toast/_toast-theme.scss +9 -10
- package/lib/core/styles/components/tooltip/_tooltip-theme.scss +2 -7
- package/lib/core/styles/components/tree/_tree-theme.scss +33 -10
- package/lib/core/styles/components/watermark/_watermark-theme.scss +0 -1
- package/lib/core/styles/themes/_core.scss +6 -0
- package/lib/core/styles/themes/generators/_base.scss +146 -58
- package/migrations/migration-collection.json +5 -0
- package/migrations/update-20_0_2/changes/theme-changes.json +11 -0
- package/migrations/update-20_0_2/index.d.ts +3 -0
- package/migrations/update-20_0_2/index.js +18 -0
- package/package.json +1 -1
- package/styles/igniteui-angular-dark.css +1 -1
- package/styles/igniteui-angular.css +1 -1
- package/styles/igniteui-bootstrap-dark.css +1 -1
- package/styles/igniteui-bootstrap-light.css +1 -1
- package/styles/igniteui-dark-green.css +1 -1
- package/styles/igniteui-fluent-dark-excel.css +1 -1
- package/styles/igniteui-fluent-dark-word.css +1 -1
- package/styles/igniteui-fluent-dark.css +1 -1
- package/styles/igniteui-fluent-light-excel.css +1 -1
- package/styles/igniteui-fluent-light-word.css +1 -1
- package/styles/igniteui-fluent-light.css +1 -1
- package/styles/igniteui-indigo-dark.css +1 -1
- package/styles/igniteui-indigo-light.css +1 -1
- package/styles/maps/igniteui-angular-dark.css.map +1 -1
- package/styles/maps/igniteui-angular.css.map +1 -1
- package/styles/maps/igniteui-bootstrap-dark.css.map +1 -1
- package/styles/maps/igniteui-bootstrap-light.css.map +1 -1
- package/styles/maps/igniteui-dark-green.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark-excel.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark-word.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark.css.map +1 -1
- package/styles/maps/igniteui-fluent-light-excel.css.map +1 -1
- package/styles/maps/igniteui-fluent-light-word.css.map +1 -1
- package/styles/maps/igniteui-fluent-light.css.map +1 -1
- package/styles/maps/igniteui-indigo-dark.css.map +1 -1
- package/styles/maps/igniteui-indigo-light.css.map +1 -1
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../base' as *;
|
|
3
|
+
@use '../../themes/schemas' as *;
|
|
4
|
+
|
|
5
|
+
@function contained-icon-button-theme(
|
|
6
|
+
$schema: $light-material-schema,
|
|
7
|
+
|
|
8
|
+
$background: null,
|
|
9
|
+
$foreground: null,
|
|
10
|
+
$shadow-color: null,
|
|
11
|
+
|
|
12
|
+
$hover-background: null,
|
|
13
|
+
$hover-foreground: null,
|
|
14
|
+
|
|
15
|
+
$focus-background: null,
|
|
16
|
+
$focus-foreground: null,
|
|
17
|
+
|
|
18
|
+
$focus-hover-background: null,
|
|
19
|
+
$focus-hover-foreground: null,
|
|
20
|
+
|
|
21
|
+
$active-background: null,
|
|
22
|
+
$active-foreground: null,
|
|
23
|
+
|
|
24
|
+
$border-radius: null,
|
|
25
|
+
$border-color: null,
|
|
26
|
+
$focus-border-color: null,
|
|
27
|
+
|
|
28
|
+
$disabled-background: null,
|
|
29
|
+
$disabled-foreground: null,
|
|
30
|
+
$disabled-border-color: null,
|
|
31
|
+
|
|
32
|
+
$size: null,
|
|
33
|
+
) {
|
|
34
|
+
$name: 'igx-contained-icon-button';
|
|
35
|
+
$icon-button-schema: ();
|
|
36
|
+
|
|
37
|
+
@if map.has-key($schema, 'icon-button') {
|
|
38
|
+
$icon-button-schema: map.get($schema, 'icon-button');
|
|
39
|
+
@if map.has-key($icon-button-schema, 'contained') {
|
|
40
|
+
$icon-button-schema: map.get($icon-button-schema, 'contained');
|
|
41
|
+
} @else {
|
|
42
|
+
$icon-button-schema: $schema;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
$theme: digest-schema($icon-button-schema);
|
|
47
|
+
$variant: map.get($schema, '_meta', 'theme');
|
|
48
|
+
|
|
49
|
+
@if not($hover-foreground) and $foreground {
|
|
50
|
+
$hover-foreground: var(--foreground);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@if not($focus-foreground) and $foreground {
|
|
54
|
+
$focus-foreground: var(--foreground);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@if not($focus-hover-foreground) and $foreground {
|
|
58
|
+
$focus-hover-foreground: var(--foreground);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@if not($active-foreground) and $foreground {
|
|
62
|
+
$active-foreground: var(--foreground);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@if $variant == 'indigo' {
|
|
66
|
+
@if not($foreground) and $background {
|
|
67
|
+
$foreground: hsla(from adaptive-contrast(var(--background)) h s l / 0.8);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@if not($hover-background) and $background {
|
|
71
|
+
$hover-background: hsl(from var(--background) h s calc(l * 1.1));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@if not($focus-background) and $background {
|
|
75
|
+
$focus-background: var(--background);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@if not($focus-foreground) and $foreground {
|
|
79
|
+
$focus-foreground: var(--foreground);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@if not($focus-hover-background) and $focus-background {
|
|
83
|
+
$focus-hover-background: hsl(from var(--focus-background) h s calc(l * 1.1));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@if not($active-background) and $background {
|
|
87
|
+
$active-background: hsl(from var(--background) h s calc(l * 1.1));
|
|
88
|
+
}
|
|
89
|
+
} @else {
|
|
90
|
+
@if not($foreground) and $background {
|
|
91
|
+
$foreground: adaptive-contrast(var(--background));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@if not($hover-background) and $background {
|
|
95
|
+
$hover-background: hsl(from var(--background) h s calc(l * 0.9));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@if not($focus-background) and $background {
|
|
99
|
+
@if $variant == 'fluent' or $variant == 'bootstrap' {
|
|
100
|
+
$focus-background: var(--background);
|
|
101
|
+
} @else {
|
|
102
|
+
$focus-background: hsl(from var(--background) h s calc(l * 0.8));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@if not($focus-foreground) and $focus-background {
|
|
107
|
+
$focus-foreground: adaptive-contrast(var(--focus-background));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@if not($focus-hover-background) and $focus-background {
|
|
111
|
+
$focus-hover-background: hsl(from var(--focus-background) h s calc(l * 0.9));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@if not($active-background) and $background {
|
|
115
|
+
$active-background: hsl(from var(--background) h s calc(l * 0.8));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@if not($hover-foreground) and $hover-background {
|
|
120
|
+
$hover-foreground: adaptive-contrast(var(--hover-background));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@if not($focus-hover-foreground) and $focus-hover-background {
|
|
124
|
+
$focus-hover-foreground: adaptive-contrast(var(--focus-hover-background));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@if not($active-foreground) and $active-background {
|
|
128
|
+
$active-foreground: adaptive-contrast(var(--active-background));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@if not($shadow-color) and $focus-background {
|
|
132
|
+
$shadow-color: hsla(from var(--focus-background) h s l / 0.5);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@if $variant == 'fluent' {
|
|
136
|
+
@if not($focus-border-color) and $foreground {
|
|
137
|
+
$focus-border-color: var(--foreground);
|
|
138
|
+
}
|
|
139
|
+
} @else {
|
|
140
|
+
@if not($focus-border-color) and $border-color {
|
|
141
|
+
$focus-border-color: hsl(from var(--border-color) h s calc(l * 0.8));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@if $variant == 'indigo' {
|
|
146
|
+
@if not($disabled-background) and $background {
|
|
147
|
+
$disabled-background: hsla(from var(--background) h s l / 0.4);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@if not($disabled-foreground) and $foreground {
|
|
151
|
+
$disabled-foreground: hsla(from var(--foreground) h s l / 0.5);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@if not($focus-border-color) and $focus-background {
|
|
155
|
+
$focus-border-color: hsla(from var(--focus-background) h s l / 0.3);
|
|
156
|
+
}
|
|
157
|
+
} @else if $variant == 'bootstrap' {
|
|
158
|
+
@if not($disabled-background) and $background {
|
|
159
|
+
$disabled-background: hsla(from var(--background) h s l / 0.2);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@if not($disabled-foreground) and $disabled-background {
|
|
163
|
+
$disabled-foreground: hsla(from var(--disabled-background) h s l / 0.7);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@return extend(
|
|
168
|
+
$theme,
|
|
169
|
+
(
|
|
170
|
+
name: $name,
|
|
171
|
+
background: $background,
|
|
172
|
+
foreground: $foreground,
|
|
173
|
+
shadow-color: $shadow-color,
|
|
174
|
+
|
|
175
|
+
hover-background: $hover-background,
|
|
176
|
+
hover-foreground: $hover-foreground,
|
|
177
|
+
|
|
178
|
+
focus-background: $focus-background,
|
|
179
|
+
focus-foreground: $focus-foreground,
|
|
180
|
+
|
|
181
|
+
focus-hover-background: $focus-hover-background,
|
|
182
|
+
focus-hover-foreground: $focus-hover-foreground,
|
|
183
|
+
|
|
184
|
+
active-background: $active-background,
|
|
185
|
+
active-foreground: $active-foreground,
|
|
186
|
+
|
|
187
|
+
border-radius: $border-radius,
|
|
188
|
+
border-color: $border-color,
|
|
189
|
+
focus-border-color: $focus-border-color,
|
|
190
|
+
|
|
191
|
+
disabled-background: $disabled-background,
|
|
192
|
+
disabled-foreground: $disabled-foreground,
|
|
193
|
+
disabled-border-color: $disabled-border-color,
|
|
194
|
+
size: $size,
|
|
195
|
+
));
|
|
196
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../base' as *;
|
|
3
|
+
@use '../../themes/schemas' as *;
|
|
4
|
+
|
|
5
|
+
@function flat-icon-button-theme(
|
|
6
|
+
$schema: $light-material-schema,
|
|
7
|
+
|
|
8
|
+
$background: null,
|
|
9
|
+
$foreground: null,
|
|
10
|
+
$shadow-color: null,
|
|
11
|
+
|
|
12
|
+
$hover-background: null,
|
|
13
|
+
$hover-foreground: null,
|
|
14
|
+
|
|
15
|
+
$focus-background: null,
|
|
16
|
+
$focus-foreground: null,
|
|
17
|
+
|
|
18
|
+
$focus-hover-background: null,
|
|
19
|
+
$focus-hover-foreground: null,
|
|
20
|
+
|
|
21
|
+
$active-background: null,
|
|
22
|
+
$active-foreground: null,
|
|
23
|
+
|
|
24
|
+
$border-radius: null,
|
|
25
|
+
$border-color: null,
|
|
26
|
+
$focus-border-color: null,
|
|
27
|
+
|
|
28
|
+
$disabled-background: null,
|
|
29
|
+
$disabled-foreground: null,
|
|
30
|
+
$disabled-border-color: null,
|
|
31
|
+
|
|
32
|
+
$size: null,
|
|
33
|
+
) {
|
|
34
|
+
$name: 'igx-flat-icon-button';
|
|
35
|
+
$icon-button-schema: ();
|
|
36
|
+
|
|
37
|
+
@if map.has-key($schema, 'icon-button') {
|
|
38
|
+
$icon-button-schema: map.get($schema, 'icon-button');
|
|
39
|
+
@if map.has-key($icon-button-schema, 'flat') {
|
|
40
|
+
$icon-button-schema: map.get($icon-button-schema, 'flat');
|
|
41
|
+
} @else {
|
|
42
|
+
$icon-button-schema: $schema;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
$theme: digest-schema($icon-button-schema);
|
|
47
|
+
$variant: map.get($schema, '_meta', 'theme');
|
|
48
|
+
|
|
49
|
+
@if not($hover-foreground) and $hover-background {
|
|
50
|
+
$hover-foreground: adaptive-contrast(var(--hover-background));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@if not($focus-foreground) and $focus-background {
|
|
54
|
+
$focus-foreground: adaptive-contrast(var(--focus-background));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@if not($focus-hover-foreground) and $focus-hover-background {
|
|
58
|
+
$focus-hover-foreground: adaptive-contrast(var(--focus-hover-background));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@if not($active-foreground) and $active-background {
|
|
62
|
+
$active-foreground: adaptive-contrast(var(--active-background));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@if $variant == 'material' or $variant == 'fluent' {
|
|
66
|
+
@if not($hover-foreground) and $foreground {
|
|
67
|
+
$hover-foreground: var(--foreground);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@if not($focus-foreground) and $foreground {
|
|
71
|
+
$focus-foreground: var(--foreground);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@if not($focus-hover-foreground) and $foreground {
|
|
75
|
+
$focus-hover-foreground: var(--foreground);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@if not($active-foreground) and $foreground {
|
|
79
|
+
$active-foreground: var(--foreground);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@if not($hover-background) and $foreground {
|
|
83
|
+
$hover-background: hsla(from var(--foreground) h s l / 0.08);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@if $variant == 'material' {
|
|
87
|
+
@if not($focus-background) and $foreground {
|
|
88
|
+
$focus-background: hsla(from var(--foreground) h s l / 0.16);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@if not($focus-hover-background) and $foreground {
|
|
92
|
+
$focus-hover-background: hsla(from var(--foreground) h s l / 0.24);
|
|
93
|
+
}
|
|
94
|
+
} @else {
|
|
95
|
+
@if not($focus-hover-background) and $hover-background {
|
|
96
|
+
$focus-hover-background: var(--hover-background);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@if not($active-background) and $foreground {
|
|
101
|
+
$active-background: hsla(from var(--foreground) h s l / 0.24);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@if $variant == 'indigo' {
|
|
106
|
+
@if not($hover-background) and $foreground {
|
|
107
|
+
$hover-background: hsla(from var(--foreground) h s l / 0.15);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@if not($focus-background) and $foreground {
|
|
111
|
+
$focus-background: hsla(from var(--foreground) h s l / 0.15);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@if not($focus-hover-background) and $foreground {
|
|
115
|
+
$focus-hover-background: hsla(from var(--foreground) h s l / 0.15);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@if not($active-background) and $foreground {
|
|
119
|
+
$active-background: hsla(from var(--foreground) h s l / 0.15);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@if $variant == 'bootstrap'or $variant == 'indigo' {
|
|
124
|
+
@if not($hover-foreground) and $foreground {
|
|
125
|
+
$hover-foreground: hsl(from var(--foreground) h s calc(l * 0.9));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@if not($focus-foreground) and $foreground {
|
|
129
|
+
$focus-foreground: var(--foreground);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@if not($focus-hover-foreground) and $hover-foreground {
|
|
133
|
+
$focus-hover-foreground: var(--hover-foreground);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@if not($disabled-foreground) and $foreground {
|
|
137
|
+
$disabled-foreground: hsla(from var(--foreground) h s l / 0.5);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@if $variant == 'bootstrap' {
|
|
141
|
+
@if not($active-foreground) and $foreground {
|
|
142
|
+
$active-foreground: hsl(from var(--foreground) h s calc(l * 0.7));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@if not($shadow-color) and $foreground {
|
|
146
|
+
$shadow-color: hsla(from var(--foreground) h s l / 0.5);
|
|
147
|
+
}
|
|
148
|
+
} @else {
|
|
149
|
+
@if not($active-foreground) and $hover-foreground {
|
|
150
|
+
$active-foreground: var(--hover-foreground);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@if not($focus-border-color) and $foreground {
|
|
154
|
+
$focus-border-color: hsla(from var(--foreground) h s l / 0.3);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@return extend(
|
|
160
|
+
$theme,
|
|
161
|
+
(
|
|
162
|
+
name: $name,
|
|
163
|
+
background: $background,
|
|
164
|
+
foreground: $foreground,
|
|
165
|
+
shadow-color: $shadow-color,
|
|
166
|
+
|
|
167
|
+
hover-background: $hover-background,
|
|
168
|
+
hover-foreground: $hover-foreground,
|
|
169
|
+
|
|
170
|
+
focus-background: $focus-background,
|
|
171
|
+
focus-foreground: $focus-foreground,
|
|
172
|
+
|
|
173
|
+
focus-hover-background: $focus-hover-background,
|
|
174
|
+
focus-hover-foreground: $focus-hover-foreground,
|
|
175
|
+
|
|
176
|
+
active-background: $active-background,
|
|
177
|
+
active-foreground: $active-foreground,
|
|
178
|
+
|
|
179
|
+
border-radius: $border-radius,
|
|
180
|
+
border-color: $border-color,
|
|
181
|
+
focus-border-color: $focus-border-color,
|
|
182
|
+
|
|
183
|
+
disabled-background: $disabled-background,
|
|
184
|
+
disabled-foreground: $disabled-foreground,
|
|
185
|
+
disabled-border-color: $disabled-border-color,
|
|
186
|
+
size: $size,
|
|
187
|
+
));
|
|
188
|
+
}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use 'sass:meta';
|
|
3
|
+
@use 'sass:list';
|
|
3
4
|
@use 'sass:color';
|
|
4
5
|
@use '../../base' as *;
|
|
5
6
|
@use '../../themes/schemas' as *;
|
|
6
7
|
|
|
8
|
+
@forward './flat-icon-button-theme';
|
|
9
|
+
@forward './contained-icon-button-theme';
|
|
10
|
+
@forward './outlined-icon-button-theme';
|
|
11
|
+
|
|
7
12
|
////
|
|
8
13
|
/// @group themes
|
|
9
14
|
/// @access public
|
|
@@ -57,37 +62,19 @@
|
|
|
57
62
|
}
|
|
58
63
|
|
|
59
64
|
@if not($foreground) and $background {
|
|
60
|
-
$foreground:
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
@if not($hover-background) and $background {
|
|
64
|
-
@if meta.type-of($background) == 'color' {
|
|
65
|
-
$hover-background: color.scale($background, $lightness: 5%);
|
|
66
|
-
}
|
|
65
|
+
$foreground: adaptive-contrast(var(--background));
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
@if not($hover-foreground) and $hover-background {
|
|
70
|
-
|
|
71
|
-
$hover-foreground: text-contrast($hover-background);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@if not($focus-background) and $background {
|
|
76
|
-
$focus-background: color.scale($background, $lightness: 5%);
|
|
69
|
+
$hover-foreground: adaptive-contrast(var(--hover-background));
|
|
77
70
|
}
|
|
78
71
|
|
|
79
72
|
@if not($focus-foreground) and $focus-background {
|
|
80
|
-
$focus-foreground:
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@if not($focus-hover-background) and $background {
|
|
84
|
-
@if meta.type-of($background) == 'color' {
|
|
85
|
-
$focus-hover-background: color.scale($background, $lightness: 5%);
|
|
86
|
-
}
|
|
73
|
+
$focus-foreground: adaptive-contrast(var(--focus-background));
|
|
87
74
|
}
|
|
88
75
|
|
|
89
76
|
@if not($focus-hover-foreground) and $focus-hover-background {
|
|
90
|
-
$focus-hover-foreground:
|
|
77
|
+
$focus-hover-foreground: adaptive-contrast(var(--focus-hover-background));
|
|
91
78
|
}
|
|
92
79
|
|
|
93
80
|
$themes: map.merge($themes, (
|
|
@@ -117,7 +104,6 @@
|
|
|
117
104
|
disabled-foreground: $disabled-foreground,
|
|
118
105
|
disabled-border-color: $disabled-border-color,
|
|
119
106
|
size: $size,
|
|
120
|
-
theme: map.get($schema, '_meta', 'theme'),
|
|
121
107
|
))
|
|
122
108
|
));
|
|
123
109
|
}
|
|
@@ -132,15 +118,42 @@
|
|
|
132
118
|
/// @deprecated Use the `css-vars` mixin instead.
|
|
133
119
|
/// @see {mixin} css-vars
|
|
134
120
|
/// @param {Map} $theme - The theme used to style the component.
|
|
135
|
-
@mixin icon-button($
|
|
136
|
-
$
|
|
137
|
-
$
|
|
138
|
-
$outlined-theme:
|
|
139
|
-
$
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
121
|
+
@mixin icon-button($themes...) {
|
|
122
|
+
$flat-theme: null;
|
|
123
|
+
$contained-theme: null;
|
|
124
|
+
$outlined-theme: null;
|
|
125
|
+
$variant: 'material';
|
|
126
|
+
|
|
127
|
+
$required: ('flat', 'contained', 'outlined');
|
|
128
|
+
$added: ();
|
|
129
|
+
$missing: ();
|
|
130
|
+
|
|
131
|
+
@each $key, $theme in meta.keywords($themes) {
|
|
132
|
+
$type: map.get($theme, _meta, type);
|
|
133
|
+
|
|
134
|
+
$added: list.append($added, $key);
|
|
135
|
+
|
|
136
|
+
@if $type == 'flat' {
|
|
137
|
+
$flat-theme: $theme;
|
|
138
|
+
} @else if $type == 'contained' {
|
|
139
|
+
$contained-theme: $theme;
|
|
140
|
+
} @else if $type == 'outlined' {
|
|
141
|
+
$outlined-theme: $theme;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
$variant: map.get($theme, '_meta', 'theme');
|
|
145
|
+
@include css-vars($theme);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@each $item in $required {
|
|
149
|
+
@if not(list.index($added, $item)) {
|
|
150
|
+
$missing: list.append($missing, '$#{$item}', $separator: comma);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@if list.length($missing) != 0 {
|
|
155
|
+
@error meta.inspect(string.unquote("Missing theme properties:") #{$missing});
|
|
156
|
+
}
|
|
144
157
|
|
|
145
158
|
$icon-sizes: map.get((
|
|
146
159
|
'material': rem(18px),
|