magic-pill 6.1.11 → 6.1.13

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.1.13]
4
+ ### Fixed
5
+ - Fixed the definition of CSS vairables which conflicted with the project's global stylesheet, now everything only extends to the scope of the Magic Pill
6
+
7
+ ## [6.1.12]
8
+ ### Fixed
9
+ - Fixed a wrong import line in the README file
10
+
11
+ ### Removed
12
+ - Removed prefered theme based light/dark mode as it was conflincting with the rest of the project's stylesheet
13
+
14
+ ## [6.1.11]
15
+ ### Added
16
+ - Added prefered theme based light/dark mode
17
+
18
+ ### Fixed
19
+ - Fixed a display issue regarding CTA labels
20
+
3
21
  ## [6.1.10]
4
22
  ### Added
5
23
  - Added the changelog file to the package
package/README.md CHANGED
@@ -39,7 +39,7 @@ import 'magic-pill/dist/magicpill.css';
39
39
  Add Magic Pill to any project simply by importing it into your app and calling it inside the component :
40
40
  ```js
41
41
  import React from 'react';
42
- import { MagicPill } from 'magic-pill';
42
+ import MagicPill from 'magic-pill';
43
43
 
44
44
  export default function App() {
45
45
  // pillData would be stored in a global Context and updated dynamically through other components
@@ -2,7 +2,7 @@
2
2
  @import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&family=Overlock:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&display=swap');
3
3
 
4
4
  /* CSS variables */
5
- :root {
5
+ .magicPill {
6
6
  --themeDark: #141414;
7
7
  --themeLight: #F9F9F9;
8
8
  --font-text: "Overlock", sans-serif;
@@ -18,17 +18,10 @@
18
18
  --titleSize: 31.42px;
19
19
  }
20
20
 
21
- @media (prefers-color-scheme: dark) {
22
- :root {
23
- --themeDark: #F9F9F9;
24
- --themeLight: #141414;
25
- }
26
- }
27
-
28
21
  /* General */
29
- *,
30
- *::before,
31
- *::after {
22
+ .magicPill,
23
+ .magicPill::before,
24
+ .magicPill::after {
32
25
  box-sizing: border-box;
33
26
  margin: 0;
34
27
  padding: 0;
@@ -53,6 +46,7 @@
53
46
  overflow: hidden;
54
47
  transform-origin: left;
55
48
  transition: width 250ms ease-in-out, max-width 250ms ease-in-out;
49
+
56
50
  >svg {
57
51
  min-width: calc(110px / 2);
58
52
  width: 100%;
@@ -154,6 +148,7 @@
154
148
 
155
149
  .magicPill.active {
156
150
  max-width: 1000px;
151
+
157
152
  >svg {
158
153
  min-width: unset;
159
154
  width: unset;
@@ -171,6 +166,7 @@
171
166
  max-width: 104.5px;
172
167
  transition: max-width 1500ms ease-in-out, width 1500ms ease-in-out;
173
168
  animation: entry 2500ms 1500ms ease-in-out reverse forwards;
169
+
174
170
  >svg {
175
171
  min-width: calc(110px / 2);
176
172
  width: 100%;
@@ -180,7 +176,9 @@
180
176
 
181
177
  .magicPill:has(.info.active) {
182
178
  overflow: unset;
183
- >svg, p {
179
+
180
+ >svg,
181
+ p {
184
182
  z-index: -1;
185
183
  }
186
184
  }
@@ -189,9 +187,11 @@
189
187
  0% {
190
188
  scale: 0;
191
189
  }
190
+
192
191
  90% {
193
192
  scale: 1.2;
194
193
  }
194
+
195
195
  100% {
196
196
  scale: 1;
197
197
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-pill",
3
- "version": "6.1.11",
3
+ "version": "6.1.13",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "index.d.ts",