magic-pill 6.1.4 → 6.1.5

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.
Files changed (2) hide show
  1. package/dist/magicpill.css +49 -5
  2. package/package.json +1 -1
@@ -40,7 +40,16 @@
40
40
  color: var(--themeLight);
41
41
  border-radius: 100px;
42
42
  align-items: center;
43
- justify-content: center;
43
+ justify-content: flex-start;
44
+ max-width: 104.5px;
45
+ overflow: hidden;
46
+ transform-origin: left;
47
+ transition: width 250ms ease-in-out, max-width 250ms ease-in-out;
48
+ >svg {
49
+ min-width: calc(110px / 2);
50
+ width: 100%;
51
+ transition: width 250ms ease-in-out, min-width 250ms ease-in-out;
52
+ }
44
53
 
45
54
  >.message,
46
55
  .info {
@@ -58,6 +67,7 @@
58
67
  border-left: 1px solid var(--themeLight);
59
68
  font-style: var(--italic);
60
69
  font-size: 19.4px;
70
+ min-width: max-content;
61
71
  }
62
72
 
63
73
  >.CTA {
@@ -70,12 +80,11 @@
70
80
  gap: 10px;
71
81
  padding: 15px;
72
82
  max-width: 54.5px;
73
- aspect-ratio: 1;
74
83
  overflow: hidden;
75
84
  background-color: var(--themeLight);
76
85
  border: transparent;
77
86
  border-radius: 100px;
78
- transition: width 250ms ease-in-out;
87
+ transition: width 250ms ease-in-out, max-width 250ms ease-in-out;
79
88
  cursor: pointer;
80
89
 
81
90
  >svg {
@@ -92,8 +101,6 @@
92
101
 
93
102
  >.CTA:hover {
94
103
  max-width: 300px;
95
- aspect-ratio: unset;
96
- transition: max-width 250ms ease-in-out;
97
104
  }
98
105
 
99
106
  >.info {
@@ -132,4 +139,41 @@
132
139
  >.info.active::after {
133
140
  height: 0%;
134
141
  }
142
+ }
143
+
144
+ .magicPill.active {
145
+ max-width: 1000px;
146
+ >svg {
147
+ min-width: unset;
148
+ width: unset;
149
+ }
150
+ }
151
+
152
+ .magicPill.entry {
153
+ max-width: 104.5px;
154
+ transition: max-width 1500ms ease-in-out, width 1500ms ease-in-out;
155
+ animation: entry 2500ms ease-in-out forwards;
156
+ }
157
+
158
+ .magicPill.out {
159
+ max-width: 104.5px;
160
+ transition: max-width 1500ms ease-in-out, width 1500ms ease-in-out;
161
+ animation: entry 2500ms 1500ms ease-in-out reverse forwards;
162
+ >svg {
163
+ min-width: calc(110px / 2);
164
+ width: 100%;
165
+ transition: width 250ms ease-in-out, min-width 250ms ease-in-out;
166
+ }
167
+ }
168
+
169
+ @keyframes entry {
170
+ 0% {
171
+ scale: 0;
172
+ }
173
+ 90% {
174
+ scale: 1.2;
175
+ }
176
+ 100% {
177
+ scale: 1;
178
+ }
135
179
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-pill",
3
- "version": "6.1.4",
3
+ "version": "6.1.5",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "index.d.ts",