@@ -23,38 +23,43 @@ export const transformPlaceholder: AnimationTriggerMetadata = trigger('transform
23
23
state ( 'floating-ltr' , style ( {
24
24
top : '-22px' ,
25
25
left : '-2px' ,
26
- transform : ` scale(0.75)`
26
+ transform : ' scale(0.75)'
27
27
} ) ) ,
28
28
state ( 'floating-rtl' , style ( {
29
29
top : '-22px' ,
30
30
left : '2px' ,
31
- transform : ` scale(0.75)`
31
+ transform : ' scale(0.75)'
32
32
} ) ) ,
33
- transition ( '* => *' , animate ( ` 400ms cubic-bezier(0.25, 0.8, 0.25, 1)` ) )
33
+ transition ( '* => *' , animate ( ' 400ms cubic-bezier(0.25, 0.8, 0.25, 1)' ) )
34
34
] ) ;
35
35
36
36
/**
37
37
* This animation transforms the select's overlay panel on and off the page.
38
38
*
39
- * When the panel is attached to the DOM, it expands its width 32px , scales it up to
40
- * 100% on the Y axis, fades in its border, and translates slightly up and to the
39
+ * When the panel is attached to the DOM, it expands its width by the amount of padding , scales it
40
+ * up to 100% on the Y axis, fades in its border, and translates slightly up and to the
41
41
* side to ensure the option text correctly overlaps the trigger text.
42
42
*
43
43
* When the panel is removed from the DOM, it simply fades out linearly.
44
44
*/
45
45
export const transformPanel : AnimationTriggerMetadata = trigger ( 'transformPanel' , [
46
46
state ( 'showing' , style ( {
47
47
opacity : 1 ,
48
- minWidth : 'calc(100% + 32px)' ,
49
- transform : `scaleY(1)`
48
+ minWidth : 'calc(100% + 32px)' , // 32px = 2 * 16px padding
49
+ transform : 'scaleY(1)'
50
+ } ) ) ,
51
+ state ( 'showing-multiple' , style ( {
52
+ opacity : 1 ,
53
+ minWidth : 'calc(100% + 64px)' , // 64px = 48px padding on the left + 16px padding on the right
54
+ transform : 'scaleY(1)'
50
55
} ) ) ,
51
56
transition ( 'void => *' , [
52
57
style ( {
53
58
opacity : 0 ,
54
59
minWidth : '100%' ,
55
- transform : ` scaleY(0)`
60
+ transform : ' scaleY(0)'
56
61
} ) ,
57
- animate ( ` 150ms cubic-bezier(0.25, 0.8, 0.25, 1)` )
62
+ animate ( ' 150ms cubic-bezier(0.25, 0.8, 0.25, 1)' )
58
63
] ) ,
59
64
transition ( '* => void' , [
60
65
animate ( '250ms 100ms linear' , style ( { opacity : 0 } ) )
@@ -66,10 +71,10 @@ export const transformPanel: AnimationTriggerMetadata = trigger('transformPanel'
66
71
* select's options. It is time delayed to occur 100ms after the overlay
67
72
* panel has transformed in.
68
73
*/
69
- export const fadeInContent : AnimationTriggerMetadata = trigger ( 'fadeInContent' , [
74
+ export const fadeInContent : AnimationTriggerMetadata = trigger ( 'fadeInContent' , [
70
75
state ( 'showing' , style ( { opacity : 1 } ) ) ,
71
76
transition ( 'void => showing' , [
72
77
style ( { opacity : 0 } ) ,
73
- animate ( ` 150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)` )
78
+ animate ( ' 150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)' )
74
79
] )
75
80
] ) ;
0 commit comments