@@ -31,6 +31,9 @@ export class ActionIcon extends LitElement {
31
31
/** highlight pane with dotted outline */
32
32
@property ( { type : Boolean } )
33
33
highlighted = false ;
34
+ /** disables CSS adoption to action buttons */
35
+ @property ( { type : Boolean } )
36
+ hideActions = false ;
34
37
35
38
async firstUpdated ( ) : Promise < void > {
36
39
this . tabIndex = 0 ;
@@ -75,16 +78,6 @@ export class ActionIcon extends LitElement {
75
78
--mdc-icon-size : 64px ;
76
79
}
77
80
78
- : host (: focus- within) ::slotted ([slot = 'icon' ]),
79
- : host (: focus-within ) mwc-icon {
80
- outline-style : solid;
81
- outline-width : 4px ;
82
- transform : scale (0.8 );
83
- transition : all 250ms linear;
84
- box-shadow : 0 8px 10px 1px rgba (0 , 0 , 0 , 0.14 ),
85
- 0 3px 14px 2px rgba (0 , 0 , 0 , 0.12 ), 0 5px 5px -3px rgba (0 , 0 , 0 , 0.2 );
86
- }
87
-
88
81
: host ([secondary ]) ::slotted ([slot = 'icon' ]),
89
82
: host ([secondary ]) mwc-icon {
90
83
outline-color : var (--mdc-theme-secondary );
@@ -96,6 +89,20 @@ export class ActionIcon extends LitElement {
96
89
outline-width : 2px ;
97
90
}
98
91
92
+ : host (: focus- within) ::slotted ([slot = 'icon' ]),
93
+ : host (: focus-within ) mwc-icon {
94
+ outline-style : solid;
95
+ outline-width : 4px ;
96
+ }
97
+
98
+ : host (: focus- within: not ([hideActions ])) ::slotted ([slot = 'icon' ]),
99
+ : host (: focus-within : not ([hideActions ])) mwc-icon {
100
+ transform : scale (0.8 );
101
+ transition : all 250ms linear;
102
+ box-shadow : 0 8px 10px 1px rgba (0 , 0 , 0 , 0.14 ),
103
+ 0 3px 14px 2px rgba (0 , 0 , 0 , 0.12 ), 0 5px 5px -3px rgba (0 , 0 , 0 , 0.2 );
104
+ }
105
+
99
106
::slotted ([slot = 'icon' ]: hover ),
100
107
mwc-icon : hover {
101
108
outline-style : dashed;
@@ -178,6 +185,10 @@ export class ActionIcon extends LitElement {
178
185
opacity 200ms linear;
179
186
}
180
187
188
+ : host ([secondary ]) header {
189
+ background-color : var (--mdc-theme-secondary );
190
+ }
191
+
181
192
: host (: hover ) header {
182
193
position : absolute;
183
194
opacity : 1 ;
@@ -191,11 +202,18 @@ export class ActionIcon extends LitElement {
191
202
: host (: focus-within ) header {
192
203
position : absolute;
193
204
opacity : 1 ;
194
- transform : translate (0 , -80px );
195
205
box-shadow : 0 8px 10px 1px rgba (0 , 0 , 0 , 0.14 ),
196
206
0 3px 14px 2px rgba (0 , 0 , 0 , 0.12 ), 0 5px 5px -3px rgba (0 , 0 , 0 , 0.2 );
197
207
transition : transform 250ms cubic-bezier (0.4 , 0 , 0.2 , 1 ),
198
208
opacity 250ms linear;
199
209
}
210
+
211
+ : host (: focus-within : not ([hideActions ])) header {
212
+ transform : translate (0 , -80px );
213
+ }
214
+
215
+ : host (: focus-within [hideActions ]) header {
216
+ transform : translate (0 , -40px );
217
+ }
200
218
` ;
201
219
}
0 commit comments