magic-pill 6.1.3 → 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 +160 -90
  2. package/package.json +1 -1
@@ -3,107 +3,177 @@
3
3
 
4
4
  /* CSS variables */
5
5
  :root {
6
- --themeDark: #141414;
7
- --themeLight: #F9F9F9;
8
- --font-text: "Overlock", sans-serif;
9
- --font-accent: "Lexend", sans-serif;
10
- --normal: normal;
11
- --italic: italic;
12
- --medium: 400;
13
- --bold: 700;
14
- --black: 900;
15
- --success: #3F7253;
16
- --danger: #FC5D6A;
17
- --textSize: 19.4px;
18
- --titleSize: 31.42px;
6
+ --themeDark: #141414;
7
+ --themeLight: #F9F9F9;
8
+ --font-text: "Overlock", sans-serif;
9
+ --font-accent: "Lexend", sans-serif;
10
+ --normal: normal;
11
+ --italic: italic;
12
+ --medium: 400;
13
+ --bold: 700;
14
+ --black: 900;
15
+ --success: #3F7253;
16
+ --danger: #FC5D6A;
17
+ --textSize: 19.4px;
18
+ --titleSize: 31.42px;
19
19
  }
20
20
 
21
21
  /* General */
22
22
  *,
23
23
  *::before,
24
24
  *::after {
25
- box-sizing: border-box;
26
- margin: 0;
27
- padding: 0;
28
- font-family: var(--font-text);
25
+ box-sizing: border-box;
26
+ margin: 0;
27
+ padding: 0;
28
+ font-family: var(--font-text);
29
29
  }
30
30
 
31
31
  .magicPill {
32
- position: absolute;
33
- top: calc(95dvh - 110px);
34
- left: 50%;
35
- transform: translateX(-50%);
36
- padding: 25px;
37
- display: flex;
38
- gap: 25px;
39
- background-color: var(--themeDark);
40
- color: var(--themeLight);
41
- border-radius: 100px;
42
- align-items: center;
43
- justify-content: center;
44
-
45
- >.message,
46
- .info {
47
- font-style: var(--italic);
48
- font-size: var(--textSize);
49
-
50
- >.title {
51
- font-weight: var(--black);
52
- font-size: var(--titleSize);
53
- }
54
- }
55
-
56
- >.message {
57
- padding-left: 25px;
58
- border-left: 1px solid var(--themeLight);
59
- font-style: var(--italic);
60
- font-size: 19.4px;
61
- }
62
-
63
- >.CTA {
64
- font-family: var(--font-accent);
65
- font-size: var(--textSize);
66
- font-weight: var(--bold);
32
+ position: absolute;
33
+ top: calc(95dvh - 110px);
34
+ left: 50%;
35
+ transform: translateX(-50%);
36
+ padding: 25px;
67
37
  display: flex;
68
- justify-content: center;
69
- align-items: center;
70
- gap: 10px;
71
- padding: 15px;
72
- }
73
-
74
- >.info {
75
- display: grid;
76
38
  gap: 25px;
77
- padding: 50px;
78
- z-index: -1;
79
- position: absolute;
80
- width: 100%;
81
- height: 100%;
82
39
  background-color: var(--themeDark);
83
- border-radius: 55px;
84
- bottom: 0px;
85
- transition: height 250ms ease-in-out, bottom 250ms ease-in-out, border-radius 250ms ease-in-out;
86
- }
40
+ color: var(--themeLight);
41
+ border-radius: 100px;
42
+ align-items: 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
+ }
87
53
 
88
- >.info::after {
89
- content: '';
90
- position: absolute;
91
- width: 100%;
92
- height: 100%;
93
- top: 0;
94
- left: 0;
95
- background-color: var(--themeDark);
96
- border-radius: 55px;
97
- transition: height 250ms 250ms ease-in-out;
98
- }
99
-
100
- >.info.active {
101
- border-radius: 50px 50px 0px 0px;
102
- bottom: calc(106.5px / 2);
103
- height: fit-content !important;
104
- }
105
-
106
- >.info.active::after {
107
- height: 0%;
108
- }
54
+ >.message,
55
+ .info {
56
+ font-style: var(--italic);
57
+ font-size: var(--textSize);
58
+
59
+ >.title {
60
+ font-weight: var(--black);
61
+ font-size: var(--titleSize);
62
+ }
63
+ }
64
+
65
+ >.message {
66
+ padding-left: 25px;
67
+ border-left: 1px solid var(--themeLight);
68
+ font-style: var(--italic);
69
+ font-size: 19.4px;
70
+ min-width: max-content;
71
+ }
72
+
73
+ >.CTA {
74
+ font-family: var(--font-accent);
75
+ font-size: var(--textSize);
76
+ font-weight: var(--bold);
77
+ display: flex;
78
+ justify-content: flex-start;
79
+ align-items: center;
80
+ gap: 10px;
81
+ padding: 15px;
82
+ max-width: 54.5px;
83
+ overflow: hidden;
84
+ background-color: var(--themeLight);
85
+ border: transparent;
86
+ border-radius: 100px;
87
+ transition: width 250ms ease-in-out, max-width 250ms ease-in-out;
88
+ cursor: pointer;
89
+
90
+ >svg {
91
+ min-width: calc(54.5px / 2);
92
+ width: 100%;
93
+ z-index: 1;
94
+ }
95
+
96
+ >span {
97
+ z-index: 1;
98
+ font-family: var(--font-accent);
99
+ }
100
+ }
101
+
102
+ >.CTA:hover {
103
+ max-width: 300px;
104
+ }
105
+
106
+ >.info {
107
+ display: grid;
108
+ gap: 25px;
109
+ padding: 50px;
110
+ z-index: -1;
111
+ position: absolute;
112
+ width: 100%;
113
+ height: 100%;
114
+ background-color: var(--themeDark);
115
+ border-radius: 55px;
116
+ bottom: 0px;
117
+ transition: height 250ms ease-in-out, bottom 250ms ease-in-out, border-radius 250ms ease-in-out;
118
+ }
119
+
120
+ >.info::after {
121
+ content: '';
122
+ position: absolute;
123
+ width: 95%;
124
+ height: 95%;
125
+ top: 50%;
126
+ left: 50%;
127
+ transform: translateX(-50%) translateY(-50%);
128
+ background-color: var(--themeDark);
129
+ border-radius: 55px;
130
+ transition: height 250ms 250ms ease-in-out;
131
+ }
132
+
133
+ >.info.active {
134
+ border-radius: 50px 50px 0px 0px;
135
+ bottom: calc(106.5px / 2);
136
+ height: fit-content !important;
137
+ }
138
+
139
+ >.info.active::after {
140
+ height: 0%;
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
+ }
109
179
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-pill",
3
- "version": "6.1.3",
3
+ "version": "6.1.5",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "index.d.ts",