magic-pill 5.0.0 → 6.0.0
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/dist/index.d.ts +42 -0
- package/package.json +4 -3
- package/dist/index.esm.css +0 -1
- /package/{src → dist}/magicpill.css +0 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare module 'magic-pill' {
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
// Déclaration des icônes comme composants React
|
|
5
|
+
export const ArrowLabel: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
6
|
+
export const BoxLabel: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
7
|
+
export const CheckmarkLabel: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
8
|
+
export const CrossLabel: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
9
|
+
export const MailLabel: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
10
|
+
export const PlusLabel: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
11
|
+
export const QuotationLabel: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
12
|
+
export const TelLabel: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
13
|
+
export const UndoLabel: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
14
|
+
|
|
15
|
+
export const CheckmarkIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
16
|
+
export const CouponIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
17
|
+
export const InfoIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
18
|
+
export const QuestionmarkIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
19
|
+
|
|
20
|
+
// Déclaration des types pour le props de MagicPill
|
|
21
|
+
export interface MagicPillProps {
|
|
22
|
+
pillData: {
|
|
23
|
+
icon: 'checkmark' | 'coupon' | 'info' | 'questionmark'; // Types d'icônes disponibles
|
|
24
|
+
message: string;
|
|
25
|
+
cta?: {
|
|
26
|
+
icon: 'arrow' | 'box' | 'checkmark' | 'cross' | 'mail' | 'plus' | 'quotation' | 'tel' | 'undo'; // Types d'icônes CTA disponibles
|
|
27
|
+
label: string;
|
|
28
|
+
link: string;
|
|
29
|
+
};
|
|
30
|
+
info?: {
|
|
31
|
+
title: string;
|
|
32
|
+
content: string;
|
|
33
|
+
closeLabel: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Déclaration du composant MagicPill
|
|
39
|
+
const MagicPill: React.FC<MagicPillProps>;
|
|
40
|
+
|
|
41
|
+
export default MagicPill;
|
|
42
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magic-pill",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
6
7
|
"description": "A new way to guide your audience and bring them contextual information through your app",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
9
10
|
"url": "https://github.com/CedricTheveneau/Magic-Pill"
|
|
10
11
|
},
|
|
11
12
|
"scripts": {
|
|
12
|
-
"build": "rollup -c",
|
|
13
|
+
"build": "rollup -c && cp src/index.d.ts dist/index.d.ts && cp src/magicpill.css dist/magicpill.css",
|
|
13
14
|
"prepare": "npm run build"
|
|
14
15
|
},
|
|
15
16
|
"peerDependencies": {
|
|
@@ -35,6 +36,6 @@
|
|
|
35
36
|
},
|
|
36
37
|
"files": [
|
|
37
38
|
"dist",
|
|
38
|
-
"
|
|
39
|
+
"index.d.ts"
|
|
39
40
|
]
|
|
40
41
|
}
|
package/dist/index.esm.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css2?family=Overlock:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&display=swap");:root{--themeDark:#141414;--themeLight:#f9f9f9;--font-family:"Overlock",sans-serif;--normal:normal;--italic:italic;--medium:400;--bold:700;--black:900}*,:after,:before{box-sizing:border-box;font-family:var(--font-family);margin:0;padding:0}.magicpill{background-color:var(--themeDark);border-radius:100px;color:var(--themeLight);display:flex;gap:25px;padding:25px}
|
|
File without changes
|