@@ -14,74 +14,55 @@ import { NotificationService } from '@ever-co/notification-data-access';
1414import { CopyContextService } from './copy-context.service' ;
1515
1616@Component ( {
17- selector : 'lib-copy-context' ,
18- standalone : true ,
19- imports : [ CommonModule , MatButtonModule , MatIconModule ] ,
20- templateUrl : './copy-context-button.component.html' ,
21- styleUrl : './copy-context-button.component.scss' ,
22- animations : [
23- trigger ( 'iconState' , [
24- state (
25- 'copy' ,
26- style ( {
27- transform : 'scale(1)' ,
28- color : 'rgba(0, 0, 0, 0.87)' ,
29- } )
30- ) ,
31- state (
32- 'checked' ,
33- style ( {
34- transform : 'scale(1)' ,
35- } )
36- ) ,
37- transition ( 'copy => checked' , [
38- animate ( '300ms cubic-bezier(0.4, 0.0, 0.2, 1)' ) ,
39- ] ) ,
40- transition ( 'checked => copy' , [
41- animate ( '300ms cubic-bezier(0.4, 0.0, 0.2, 1)' ) ,
42- ] ) ,
43- ] ) ,
44- trigger ( 'iconRotate' , [
45- state (
46- 'copy' ,
47- style ( {
48- transform : 'rotate(0deg)' ,
49- } )
50- ) ,
51- state (
52- 'checked' ,
53- style ( {
54- transform : 'rotate(360deg)' ,
55- } )
56- ) ,
57- transition ( 'copy => checked' , [
58- animate ( '300ms cubic-bezier(0.4, 0.0, 0.2, 1)' ) ,
59- ] ) ,
60- transition ( 'checked => copy' , [
61- animate ( '300ms cubic-bezier(0.4, 0.0, 0.2, 1)' ) ,
62- ] ) ,
63- ] ) ,
64- trigger ( 'scaleButton' , [
65- state (
66- 'normal' ,
67- style ( {
68- transform : 'scale(1)' ,
69- } )
70- ) ,
71- state (
72- 'pressed' ,
73- style ( {
74- transform : 'scale(0.9)' ,
75- } )
76- ) ,
77- transition ( 'normal => pressed' , [
78- animate ( '100ms cubic-bezier(0.4, 0.0, 0.2, 1)' ) ,
79- ] ) ,
80- transition ( 'pressed => normal' , [
81- animate ( '100ms cubic-bezier(0.4, 0.0, 0.2, 1)' ) ,
82- ] ) ,
83- ] ) ,
84- ] ,
17+ selector : 'lib-copy-context' ,
18+ imports : [ CommonModule , MatButtonModule , MatIconModule ] ,
19+ templateUrl : './copy-context-button.component.html' ,
20+ styleUrl : './copy-context-button.component.scss' ,
21+ animations : [
22+ trigger ( 'iconState' , [
23+ state ( 'copy' , style ( {
24+ transform : 'scale(1)' ,
25+ color : 'rgba(0, 0, 0, 0.87)' ,
26+ } ) ) ,
27+ state ( 'checked' , style ( {
28+ transform : 'scale(1)' ,
29+ } ) ) ,
30+ transition ( 'copy => checked' , [
31+ animate ( '300ms cubic-bezier(0.4, 0.0, 0.2, 1)' ) ,
32+ ] ) ,
33+ transition ( 'checked => copy' , [
34+ animate ( '300ms cubic-bezier(0.4, 0.0, 0.2, 1)' ) ,
35+ ] ) ,
36+ ] ) ,
37+ trigger ( 'iconRotate' , [
38+ state ( 'copy' , style ( {
39+ transform : 'rotate(0deg)' ,
40+ } ) ) ,
41+ state ( 'checked' , style ( {
42+ transform : 'rotate(360deg)' ,
43+ } ) ) ,
44+ transition ( 'copy => checked' , [
45+ animate ( '300ms cubic-bezier(0.4, 0.0, 0.2, 1)' ) ,
46+ ] ) ,
47+ transition ( 'checked => copy' , [
48+ animate ( '300ms cubic-bezier(0.4, 0.0, 0.2, 1)' ) ,
49+ ] ) ,
50+ ] ) ,
51+ trigger ( 'scaleButton' , [
52+ state ( 'normal' , style ( {
53+ transform : 'scale(1)' ,
54+ } ) ) ,
55+ state ( 'pressed' , style ( {
56+ transform : 'scale(0.9)' ,
57+ } ) ) ,
58+ transition ( 'normal => pressed' , [
59+ animate ( '100ms cubic-bezier(0.4, 0.0, 0.2, 1)' ) ,
60+ ] ) ,
61+ transition ( 'pressed => normal' , [
62+ animate ( '100ms cubic-bezier(0.4, 0.0, 0.2, 1)' ) ,
63+ ] ) ,
64+ ] ) ,
65+ ]
8566} )
8667export class CopyContextButtonComponent {
8768 public copying = false ;
0 commit comments