@bace51/cocktailjs-react 1.0.0 → 1.0.1
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.cjs.js +34 -2246
- package/dist/index.mjs +31 -44
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,164 +1,151 @@
|
|
|
1
|
-
|
|
2
|
-
M26 50 Q32 50 38 50 L36 60 L28 60 Z`,transform:"scale(0.98)",idBase:"AbsintheGlassGrad",opacity:.7,liquidFill:
|
|
3
|
-
M26 50 Q32 50 38 50 L36 60 L28 60 Z`,stroke:"currentColor",strokeWidth:
|
|
1
|
+
import m from"react";function i({d:t,transform:o,liquidFill:r=null,liquidStyle:l=null,gradientAttr:d=null,opacity:Br=.7,idBase:qr="liquidGrad",highlight:Zr=null,highlightColor:Fr="#fff7c0",level:Sr=1,stopPositions:V=null}){let O=!1,s=null;if(typeof d=="string"){let e=d.trim();if(e.startsWith("#"))O=!0;else if(e.startsWith("["))try{s=JSON.parse(e)}catch{s=null}else s=[e]}else Array.isArray(d)&&(s=d);(!s||!s.length)&&(r?s=Array.isArray(r)?r:[r]:s=["#93d3d8"]);let v=Zr==="liquid"||Zr==="all"?[Fr,...s]:[...s],P;if(Array.isArray(V)&&V.length===v.length)P=V.map(e=>{let u=Number(e)||0;return Math.round(Math.max(0,Math.min(1,u))*100)});else{let e=Math.max(0,Math.min(1,Number(Sr)||0)),u=1-e;v.length===1?P=[100]:P=v.map((Dr,Wr)=>{let $r=Wr/Math.max(1,v.length-1);return Math.round((u+$r*e)*100)})}let Qr=qr;return m.createElement(m.Fragment,null,!O&&m.createElement("defs",null,m.createElement("linearGradient",{id:Qr,x1:"0",y1:"0",x2:"0",y2:"1"},v.map((e,u)=>m.createElement("stop",{key:u,offset:`${P[u]}%`,stopColor:e,stopOpacity:1})))),m.createElement("path",{d:t,transform:o,className:"liquid",style:l||void 0,fill:l?void 0:O?`url(${d})`:`url(#${Qr})`,opacity:Br}))}import Z from"react";function _({liquidFill:t=["#A8E6CF","#DCEDC2","#FFD3B6"],size:o=80,strokeWidth:r=.5}){let l=Math.floor(o*1.125);return Z.createElement("svg",{width:o,height:l,viewBox:"0 0 64 90"},Z.createElement(i,{d:`M20 35 L44 35 L42 49 Q32 52 22 49 Z
|
|
2
|
+
M26 50 Q32 50 38 50 L36 60 L28 60 Z`,transform:"scale(0.98)",idBase:"AbsintheGlassGrad",opacity:.7,liquidFill:t}),Z.createElement("path",{d:`M20 35 L44 35 L42 49 Q32 52 22 49 Z
|
|
3
|
+
M26 50 Q32 50 38 50 L36 60 L28 60 Z`,stroke:"currentColor",strokeWidth:r,fill:"none"}),Z.createElement("rect",{x:31,y:60,width:2,height:16,fill:"black",stroke:"currentColor",strokeWidth:r}),Z.createElement("path",{d:" M24 77 Q32 76 40 77 L40 77 L24 77 Z ",fill:"currentColor",stroke:"currentColor",strokeWidth:r,rx:r}))}import p from"react";function K({liquidFill:t=["#F6D29A","#D98F3A"],strokeWidth:o=1}){return p.createElement("svg",{viewBox:"0 0 64 64"},p.createElement(i,{d:`M22 28
|
|
4
4
|
L42 28
|
|
5
5
|
L44 48
|
|
6
6
|
Q32 52 20 48
|
|
7
|
-
Z`,transform:"scale(0.98)",idBase:"BrandySnifterGlassGrad",opacity:.7,liquidFill:
|
|
7
|
+
Z`,transform:"scale(0.98)",idBase:"BrandySnifterGlassGrad",opacity:.7,liquidFill:t}),p.createElement("path",{d:`
|
|
8
8
|
M22 28
|
|
9
9
|
L42 28
|
|
10
10
|
L44 48
|
|
11
11
|
Q32 52 20 48
|
|
12
12
|
Z
|
|
13
|
-
`,fill:"none",stroke:"currentColor",strokeWidth:
|
|
13
|
+
`,fill:"none",stroke:"currentColor",strokeWidth:o}),p.createElement("line",{x1:22,y1:28,x2:42,y2:28,stroke:"currentColor",strokeWidth:o}),p.createElement("rect",{x:30,y:50,width:4,height:5,fill:"currentColor",stroke:"currentColor",strokeWidth:o}),p.createElement("path",{d:"M24 55 Q32 54 40 55 L40 55 L24 55 Z",fill:"currentColor",stroke:"currentColor",strokeWidth:o}))}import C from"react";function U({liquidFill:t=["#FFF7C0","#FFD27A"],strokeWidth:o=.5}){return C.createElement("svg",{viewBox:"0 0 64 64"},C.createElement(i,{d:"M22 10 L42 10 L42 54 L22 54 Z",transform:"scale(0.98)",idBase:"CollinsGlassGrad",opacity:.7,liquidFill:t}),C.createElement("line",{x1:22,y1:10,x2:22,y2:54,stroke:"currentColor",strokeWidth:o}),C.createElement("line",{x1:42,y1:10,x2:42,y2:54,stroke:"currentColor",strokeWidth:o}),C.createElement("line",{x1:21.76,y1:10,x2:42.24,y2:10,stroke:"currentColor",strokeWidth:o}),C.createElement("rect",{x:22,y:54,width:20,height:2,fill:"currentColor",stroke:"currentColor",strokeWidth:o}))}import Q from"react";function X({size:t=80,strokeWidth:o=.5,fill:r="#B87333"}){return Q.createElement("svg",{width:t,height:t,viewBox:"0 0 64 64"},Q.createElement("path",{d:"M47 23 C68 23 68 52 46.5 50",fill:"none",stroke:r,strokeWidth:o+2}),Q.createElement("path",{d:`
|
|
14
14
|
M18 16
|
|
15
15
|
L46 16
|
|
16
16
|
C48 24 48 40 46 56
|
|
17
17
|
L18 56
|
|
18
18
|
C16 40 16 24 18 16
|
|
19
19
|
Z
|
|
20
|
-
`,transform:"scale(0.98)",fill:
|
|
20
|
+
`,transform:"scale(0.98)",fill:r}),Q.createElement("path",{d:`
|
|
21
21
|
M18 16
|
|
22
22
|
L46 16
|
|
23
23
|
C48 24 48 40 46 56
|
|
24
24
|
L18 56
|
|
25
25
|
C16 40 16 24 18 16
|
|
26
26
|
Z
|
|
27
|
-
`,fill:"none",stroke:
|
|
27
|
+
`,fill:"none",stroke:r,strokeWidth:o}),Q.createElement("line",{x1:18,y1:16,x2:46,y2:16,stroke:r,strokeWidth:o}))}import L from"react";var br={colors:{accent:{200:"#ffd180",500:"#e67e22"},warning:"#ffb300",success:"#4caf50",error:"#e53935",dark:{400:"#616161",700:"#212121",900:"#121212"}}};try{global.theme=br}catch{}function Y({liquidFill:t=null,strokeWidth:o=.5}){return L.createElement("svg",{viewBox:"0 0 64 64"},L.createElement(i,{d:"M30 16 L35 16 Q34 25 31 26 Q30 26 28 16 Z",transform:"scale(0.98)",idBase:"CordialGlassGrad",opacity:.7,liquidFill:t}),L.createElement("path",{d:"M28 16 L36 16 Q34 26 32 26 Q30 26 28 16 Z",stroke:"currentColor",strokeWidth:o,fill:"none"}),L.createElement("rect",{x:31.8,y:26,width:.5,height:6,fill:"currentColor",stroke:"currentColor",strokeWidth:o}),L.createElement("path",{d:"M28.5 17 L35.5 17 Q34 25 32 25 Q30 25 28.5 17 Z",fill:"rgba(255,255,255,0.06)"}),L.createElement("path",{d:"M28 32 Q32 31 36 32 L36 32 L28 32 Z",fill:"currentColor",stroke:"currentColor",strokeWidth:o}))}import B from"react";function z({liquidFill:t=null,size:o=80,strokeWidth:r=1}){return B.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},B.createElement(i,{d:`
|
|
28
28
|
M12 32 Q32 36 52 32 L52 18 Q32 18 12 18 Z
|
|
29
|
-
`,transform:"scale(0.98)",idBase:"CoupeGlassGrad",opacity:.7,liquidFill:
|
|
29
|
+
`,transform:"scale(0.98)",idBase:"CoupeGlassGrad",opacity:.7,liquidFill:t}),B.createElement("path",{d:`
|
|
30
30
|
M12 32 Q32 36 52 32 L52 18 Q32 18 12 18 Z
|
|
31
|
-
`,fill:"none",stroke:"currentColor",strokeWidth:
|
|
31
|
+
`,fill:"none",stroke:"currentColor",strokeWidth:r}),B.createElement("path",{d:"M32 34 L32 60",stroke:"currentColor",strokeWidth:r}),B.createElement("path",{d:"M24 60 Q32 59 40 60 L40 60 L24 60 Z",fill:"currentColor",stroke:"currentColor",strokeWidth:r}))}import q from"react";function R({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){return q.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},q.createElement("path",{d:"M20 24 L24 45 L40 45 L44 24 Z",fill:"none",stroke:"currentColor",strokeLinejoin:"miter",strokeWidth:r}),q.createElement(i,{d:"M20 24 L24 45 L40 45 L44 24 Z",transform:"scale(0.98)",idBase:"DemitasseGlassGrad",opacity:.7,liquidFill:t}),q.createElement("path",{d:"M43 30 Q55 30 41 40",stroke:"currentColor",fill:"none",strokeWidth:r}),q.createElement("path",{d:"M24 45 Q32 45 40 45 L40 48 L24 48 Z",fill:"currentColor",stroke:"currentColor",strokeWidth:r}))}import H from"react";function rr({liquidFill:t=["#FFF7C0","#FFD27A"],size:o=64,strokeWidth:r=.5}){return H.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},H.createElement("path",{d:"M20 18 C22 30 22 46 22.5 58 L41.5 58 C42.5 46 42.5 30 44 18 Z",stroke:"currentColor",fill:"none",strokeWidth:r}),H.createElement(i,{d:"M20 18 C22 30 22 46 22.5 58 L41.5 58 C42.5 46 42.5 30 44 18 Z",transform:"scale(0.98)",idBase:"DoubleShotGlassGrad",opacity:.7,liquidFill:t}),H.createElement("rect",{x:22.5,y:58,width:19,height:3,fill:"none",stroke:"currentColor",strokeWidth:r}))}import c from"react";function or({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){return c.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},c.createElement("path",{d:"M22 10 L42 10",stroke:"currentColor",strokeWidth:r}),c.createElement(i,{d:`
|
|
32
32
|
M22 10 L24 23 L40 23 L42 10 Z
|
|
33
|
-
`,transform:"scale(0.98)",idBase:"FizzGlassGrad",opacity:.7,liquidFill:
|
|
33
|
+
`,transform:"scale(0.98)",idBase:"FizzGlassGrad",opacity:.7,liquidFill:t}),c.createElement("path",{d:`
|
|
34
34
|
M22 10 L24 23 L40 23 L42 10 Z
|
|
35
|
-
`,fill:"none",stroke:"currentColor",strokeWidth:
|
|
35
|
+
`,fill:"none",stroke:"currentColor",strokeWidth:r}),c.createElement("rect",{x:32,y:23,width:1,height:10,fill:"currentColor",stroke:"currentColor",strokeWidth:r}),c.createElement("path",{d:"M26 33 Q32 32 38 33 L38 33 L26 33 Z",fill:"currentColor",stroke:"currentColor",strokeWidth:r}))}import F from"react";function tr({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){return F.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},F.createElement(i,{d:`
|
|
36
36
|
M30 12
|
|
37
37
|
L34 12
|
|
38
38
|
L36 36
|
|
39
39
|
Q32 38 28 36
|
|
40
40
|
Z
|
|
41
|
-
`,transform:"scale(0.98)",idBase:"FluteGlassGrad",opacity:.7,liquidFill:
|
|
41
|
+
`,transform:"scale(0.98)",idBase:"FluteGlassGrad",opacity:.7,liquidFill:t}),F.createElement("path",{d:`
|
|
42
42
|
M30 12
|
|
43
43
|
L34 12
|
|
44
44
|
L36 36
|
|
45
45
|
Q32 38 28 36
|
|
46
46
|
Z
|
|
47
|
-
`,fill:"none",stroke:"currentColor",strokeWidth:
|
|
47
|
+
`,fill:"none",stroke:"currentColor",strokeWidth:r}),F.createElement("rect",{x:32,y:37,width:r,height:16,fill:"currentColor",stroke:"currentColor",strokeWidth:r}),F.createElement("path",{d:"M26 53 Q32 52 38 53 L38 53 L26 53 Z",fill:"currentColor",stroke:"currentColor",strokeWidth:r}))}import g from"react";function ir({liquidFill:t=null,size:o=80,strokeWidth:r=2}){let l=Math.round(o*90/80);return g.createElement("svg",{width:o,height:l,viewBox:"0 0 64 90"},g.createElement("rect",{x:30.5,y:69,width:3,height:8,fill:"currentColor",stroke:"currentColor",strokeWidth:r}),g.createElement(i,{d:" M19 28 L46 28 Q52 58 32 70 Q12 58 16 28 Z ",transform:"scale(0.98)",idBase:"GobletGlassGrad",opacity:.7,liquidFill:t}),g.createElement("path",{d:`
|
|
48
48
|
M16 28
|
|
49
49
|
L48 28
|
|
50
50
|
Q52 58 32 70
|
|
51
51
|
Q12 58 16 28
|
|
52
52
|
Z
|
|
53
|
-
`,fill:"none",stroke:"currentColor",strokeWidth:
|
|
53
|
+
`,fill:"none",stroke:"currentColor",strokeWidth:r}),g.createElement("line",{x1:16,y1:28,x2:48,y2:28,stroke:"currentColor",strokeWidth:r}),g.createElement("path",{d:" M24 77 Q32 76 40 77 L40 77 L24 77 Z ",fill:"currentColor",stroke:"currentColor",strokeWidth:r}))}import N from"react";function lr({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){return N.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},N.createElement(i,{d:"M18 10 L46 10 L46 60 L18 60 Z",transform:"scale(0.98)",idBase:"HighballGlassGrad",opacity:.7,liquidFill:t}),N.createElement("rect",{x:18,y:10,width:28,height:50,stroke:"currentColor",strokeWidth:r,fill:"none"}),N.createElement("rect",{x:18,y:60,width:28,height:2,fill:"currentColor",stroke:"currentColor",strokeWidth:r}))}import S from"react";function er({liquidFill:t=null,garnish:o=null,size:r=80,strokeWidth:l=.5}){return S.createElement("svg",{width:r,height:r,viewBox:"0 0 64 64"},S.createElement(i,{d:"M24 10 C16 22, 24 38, 28 44 C30 48, 34 48, 36 44 C40 38, 48 22, 40 10 Z",transform:"scale(0.98)",idBase:"HurricaneGlassGrad",opacity:.7,liquidFill:t}),S.createElement("path",{d:"M24 10 C16 22, 24 38, 28 44 C30 48, 34 48, 36 44 C40 38, 48 22, 40 10 Z",stroke:"currentColor",fill:"none",strokeWidth:l}),S.createElement("rect",{x:30.5,y:47,width:3,height:10,fill:"currentColor",stroke:"currentColor",strokeWidth:l}),S.createElement("path",{d:"M26 57 Q32 56 38 57 L38 57 L26 57 Z",fill:"currentColor",stroke:"currentColor",strokeWidth:l}))}import x from"react";function sr({liquidFill:t=null,size:o=80,strokeWidth:r=2}){return x.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},x.createElement("path",{d:" M42 18 Q60 20 44 30 ",stroke:"currentColor",strokeWidth:r,fill:"none"}),x.createElement(i,{d:`
|
|
54
54
|
M22 16
|
|
55
55
|
L42 16
|
|
56
56
|
L44 30
|
|
57
57
|
Q44 38 32 42
|
|
58
58
|
Q20 38 20 30
|
|
59
59
|
Z
|
|
60
|
-
`,transform:"scale(0.98)",idBase:"IrishCoffeeGlassGrad",opacity:.7,liquidFill:
|
|
60
|
+
`,transform:"scale(0.98)",idBase:"IrishCoffeeGlassGrad",opacity:.7,liquidFill:t}),x.createElement("path",{d:`
|
|
61
61
|
M22 16
|
|
62
62
|
L42 16
|
|
63
63
|
L44 30
|
|
64
64
|
Q44 38 32 42
|
|
65
65
|
Q20 38 20 30
|
|
66
66
|
Z
|
|
67
|
-
`,stroke:"currentColor",strokeWidth:
|
|
67
|
+
`,stroke:"currentColor",strokeWidth:r-1,fill:"none"}),x.createElement("rect",{x:31,y:42,width:2,height:2,fill:"currentColor",stroke:"currentColor",strokeWidth:r}),x.createElement("path",{d:" M24 44 Q32 43 40 44 L40 44 L24 44 Z ",fill:"currentColor",stroke:"currentColor",strokeWidth:r}))}import n from"react";function nr({fill:t="#a1a1a1",size:o=80,strokeWidth:r=.5}){return n.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},n.createElement("rect",{x:17,y:21,width:30,height:1,rx:1,fill:"none",stroke:t,strokeWidth:r}),n.createElement("rect",{x:17,y:21,width:30,height:1,rx:1,transform:"scale(0.98)",opacity:.7,fill:t,strokeWidth:0}),n.createElement("path",{d:`
|
|
68
68
|
M18 22
|
|
69
69
|
L46 22
|
|
70
70
|
L42 54
|
|
71
71
|
L22 54
|
|
72
72
|
Z
|
|
73
|
-
`,fill:"none",stroke:
|
|
73
|
+
`,fill:"none",stroke:t,strokeWidth:r}),n.createElement("path",{d:`
|
|
74
74
|
M18 22
|
|
75
75
|
L46 22
|
|
76
76
|
L42 54
|
|
77
77
|
L22 54
|
|
78
78
|
Z
|
|
79
|
-
`,transform:"scale(0.98)",fill:
|
|
80
|
-
M28 29 Q32 29 36 29 Q38 34 32 36 Q26 34 28 29 Z`,fill:"none",stroke:"currentColor",strokeWidth:
|
|
79
|
+
`,transform:"scale(0.98)",fill:t}),n.createElement("rect",{x:20,y:53,width:24,height:1,rx:r,fill:"none",stroke:t,strokeWidth:r}),n.createElement("rect",{x:20,y:53,width:24,height:1,rx:r,transform:"scale(0.98)",fill:t,strokeWidth:0}),n.createElement("rect",{x:18.8,y:54,width:26,height:1,rx:r,fill:"none",stroke:t,strokeWidth:r}),n.createElement("rect",{x:18.8,y:54,width:26,height:1,rx:r,transform:"scale(0.98)",fill:t,strokeWidth:0}))}import W from"react";function dr({liquidFill:t=["#A8E063","#56AB2F"],size:o=80,strokeWidth:r=.5}){let l=t;return W.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},W.createElement(i,{d:"M14 18 L50 18 Q46 28 36 29 Q30 30 28 29 Q18 28 14 18 Z M28 29 Q32 29 36 29 Q38 34 32 36 Q26 34 28 29 Z",transform:"scale(0.98)",idBase:"MargaritaGlassGrad",opacity:.7,liquidFill:t}),W.createElement("path",{d:`M14 18 L50 18 Q46 28 36 29 Q30 30 28 29 Q18 28 14 18 Z
|
|
80
|
+
M28 29 Q32 29 36 29 Q38 34 32 36 Q26 34 28 29 Z`,fill:"none",stroke:"currentColor",strokeWidth:r}),W.createElement("rect",{x:31.5,y:36,width:1,height:10,fill:"currentColor",stroke:"currentColor",strokeWidth:r}),W.createElement("path",{d:" M24 46 Q32 45 40 46 L40 47 L24 47 Z ",fill:"currentColor",strokeWidth:0}))}import $ from"react";function ur({liquidFill:t=null,garnish:o=null,size:r=80,strokeWidth:l=1}){return $.createElement("svg",{width:r,height:r,viewBox:"0 0 64 64"},$.createElement(i,{d:"M10 10 L54 10 L32 40 Z",transform:"scale(0.98)",idBase:"MartiniGlassGrad",opacity:.7,liquidFill:t}),$.createElement("path",{d:"M10 10 L54 10 L32 40 Z",stroke:"currentColor",fill:"none",strokeWidth:l}),$.createElement("path",{d:"M32 40 L32 58",stroke:"currentColor",strokeWidth:l}),$.createElement("path",{d:" M24 58 Q32 57 40 58 L40 59 L24 59 Z ",fill:"currentColor"}))}import b from"react";function fr({liquidFill:t=null,garnish:o=null,size:r=80,strokeWidth:l=.5}){return b.createElement("svg",{width:r,height:r,viewBox:"0 0 64 64"},b.createElement(i,{d:"M24 38 L24 24 L40 24 L40 38 Q32 40 24 38 Z",transform:"scale(0.98)",idBase:"NickAndNoraGlassGrad",opacity:.7,liquidFill:t}),b.createElement("path",{d:"M24 38 L24 24 L40 24 L40 38 Q32 40 24 38 Z",fill:"none",stroke:"currentColor",strokeWidth:l}),b.createElement("rect",{x:32,y:39,width:1,height:16,fill:"currentColor",stroke:"currentColor",strokeWidth:l}),b.createElement("path",{d:" M24 55 Q32 54 40 55 L40 55 L24 55 Z ",fill:"currentColor",stroke:"currentColor",strokeWidth:l}))}import A from"react";function hr({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){return A.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},A.createElement(i,{d:`
|
|
81
81
|
M22 12
|
|
82
82
|
L42 12
|
|
83
83
|
Q40 30 38 44
|
|
84
84
|
Q32 50 26 44
|
|
85
85
|
Q24 30 22 12
|
|
86
86
|
Z
|
|
87
|
-
`,transform:"scale(0.98)",idBase:"ParfaitGlassGrad",opacity:.7,liquidFill:
|
|
87
|
+
`,transform:"scale(0.98)",idBase:"ParfaitGlassGrad",opacity:.7,liquidFill:t}),A.createElement("path",{d:`
|
|
88
88
|
M22 12
|
|
89
89
|
L42 12
|
|
90
90
|
Q40 30 38 44
|
|
91
91
|
Q32 50 26 44
|
|
92
92
|
Q24 30 22 12
|
|
93
93
|
Z
|
|
94
|
-
`,stroke:"currentColor",strokeWidth:
|
|
94
|
+
`,stroke:"currentColor",strokeWidth:r,fill:"none"}),A.createElement("rect",{x:31,y:47,width:2,height:8,fill:"currentColor"}),A.createElement("path",{d:`
|
|
95
95
|
M22 57 Q32 53 42 57 L42 57.5 L22 57.5 Z
|
|
96
|
-
`,fill:"currentColor"}))}
|
|
96
|
+
`,fill:"currentColor"}))}import E from"react";function ar({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){return E.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},E.createElement(i,{d:"M24 10 L40 10 Q38 36 36 50 Q32 54 28 50 Q26 36 24 10 Z",transform:"scale(0.98)",idBase:"PilsnerGlassGrad",opacity:.7,liquidFill:t}),E.createElement("path",{d:"M28 50 Q32 55 37 51 L37 56 Q35 56 28.5 56 Z",transform:"scale(0.98)",fill:"currentColor",className:"base"}),E.createElement("path",{d:"M24 10 L40 10 Q38 36 36 55 Q32 55 28 55 Q26 36 24 10 Z",stroke:"currentColor",strokeWidth:r,fill:"none"}))}import T from"react";function mr({liquidFill:t=null,garnish:o=null,size:r=80,strokeWidth:l=.5}){return T.createElement("svg",{width:r,height:r,viewBox:"0 0 64 64"},T.createElement(i,{d:"M18 10 L46 10 L42 54 L22 54 Z",transform:"scale(0.98)",idBase:"PintGlassGrad",opacity:.7,liquidFill:t}),T.createElement("path",{d:"M18 10 L46 10 L42 54 L22 54 Z",stroke:"currentColor",strokeWidth:l,fill:"none"}),T.createElement("rect",{x:22,y:54,width:20,height:2,fill:"currentColor",stroke:"currentColor",strokeWidth:l}))}import f from"react";function pr({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){let d=Math.floor(o*1.125);return f.createElement("svg",{width:o,height:d,viewBox:"0 0 64 90"},f.createElement("g",null,f.createElement(i,{d:`
|
|
97
97
|
M ${32-11} 12
|
|
98
98
|
L ${32+11} 12
|
|
99
99
|
L ${32+9} 38
|
|
100
100
|
Q 32 42 ${32-9} 38
|
|
101
101
|
Z
|
|
102
|
-
`,transform:"scale(0.98)",idBase:"PousseCafeGlassGrad",opacity:.7,liquidFill:
|
|
102
|
+
`,transform:"scale(0.98)",idBase:"PousseCafeGlassGrad",opacity:.7,liquidFill:t}),f.createElement("path",{d:`
|
|
103
103
|
M ${32-11} 12
|
|
104
104
|
L ${32+11} 12
|
|
105
105
|
L ${32+9} 38
|
|
106
106
|
Q 32 42 ${32-9} 38
|
|
107
107
|
Z
|
|
108
|
-
`,stroke:"currentColor",strokeWidth:
|
|
108
|
+
`,stroke:"currentColor",strokeWidth:r,fill:"none"}),f.createElement("path",{d:`
|
|
109
109
|
M ${32-8} 18
|
|
110
110
|
L ${32+8} 18
|
|
111
111
|
L ${32+6} 30
|
|
112
112
|
Q 32 33 ${32-6} 30
|
|
113
113
|
Z
|
|
114
|
-
`,fill:"rgba(255,255,255,0.06)"}),
|
|
114
|
+
`,fill:"rgba(255,255,255,0.06)"}),f.createElement("rect",{x:32-1,y:40,width:2,height:10,fill:"currentColor",stroke:"currentColor",strokeWidth:r}),f.createElement("path",{d:`M ${32-6} 50 Q 32 48 ${32+6} 50 L ${32+6} 50 L ${32-6} 50 Z`,fill:"currentColor",stroke:"currentColor",strokeWidth:r})))}import h from"react";function Cr({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){return h.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},h.createElement("g",null,h.createElement(i,{d:`
|
|
115
115
|
M22 18
|
|
116
116
|
L42 18
|
|
117
117
|
L38 30
|
|
118
118
|
Q32 34 26 30
|
|
119
119
|
L22 18
|
|
120
120
|
Z
|
|
121
|
-
`,transform:"scale(0.98)",idBase:"PunchGlassGrad",opacity:.7,liquidFill:
|
|
121
|
+
`,transform:"scale(0.98)",idBase:"PunchGlassGrad",opacity:.7,liquidFill:t}),h.createElement("path",{d:`
|
|
122
122
|
M22 18
|
|
123
123
|
L42 18
|
|
124
124
|
L38 30
|
|
125
125
|
Q32 34 26 30
|
|
126
126
|
L22 18
|
|
127
127
|
Z
|
|
128
|
-
`,stroke:"currentColor",strokeWidth:
|
|
128
|
+
`,stroke:"currentColor",strokeWidth:r,fill:"none"}),h.createElement("path",{d:"M28 20 L28 28 M32 20 L32 30 M36 20 L36 28",stroke:"currentColor",strokeWidth:.6,strokeLinecap:"round",opacity:.06}),h.createElement("rect",{x:31,y:32,width:2,height:6,fill:"currentColor",stroke:"currentColor",strokeWidth:r}),h.createElement("path",{d:"M26 38 Q32 37 38 38 L38 38 L26 38 Z",fill:"currentColor",stroke:"currentColor",strokeWidth:r})))}import j from"react";function Lr({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){return j.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},j.createElement(i,{d:"M14 24 L50 24 L50 58 L14 58 Z",transform:"scale(0.98)",idBase:"RocksGlassGrad",opacity:.7,liquidFill:t}),j.createElement("rect",{x:14,y:24,width:36,height:34,stroke:"currentColor",strokeWidth:r,fill:"none"}),j.createElement("line",{x1:13.7,y1:59,x2:50.2,y2:59,stroke:"currentColor",strokeWidth:"2"}))}import I from"react";function cr({liquidFill:t=["#FFFFFF","#E0E0E0"],size:o=64,strokeWidth:r=.5}){return I.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},I.createElement("path",{d:"M23 28 C24.5 36 24.5 40 25 48 L39 48 C39.5 40 39.5 36 41 28 Z",stroke:"currentColor",fill:"none",strokeWidth:r}),I.createElement(i,{d:"M23 28 C24.5 36 24.5 40 25 48 L39 48 C39.5 40 39.5 36 41 28 Z",transform:"scale(0.98)",idBase:"SingleShotGlassGrad",opacity:.7,liquidFill:t}),I.createElement("rect",{x:25,y:48,width:14,height:3,stroke:"currentColor",strokeWidth:r,fill:"none"}))}import k from"react";function gr({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){return k.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},k.createElement("line",{x1:24,y1:12,x2:40,y2:12,stroke:"currentColor",strokeWidth:r}),k.createElement(i,{d:"M25 12 L40 12 C41 29 40 46 32 55 C24 46 24 28 24 12 Z",transform:"scale(0.98)",idBase:"SlingGlassGrad",opacity:.7,liquidFill:t}),k.createElement("path",{d:"M25 12 L40 12 C41 29 40 46 32 55 C24 46 24 28 24 12 Z",stroke:"currentColor",strokeWidth:r,fill:"none"}),k.createElement("rect",{x:31,y:54,width:2,height:2,fill:"currentColor"}),k.createElement("path",{d:"M29 56 Q32 55 35 56 L35 56 L29 56 Z",fill:"currentColor",stroke:"currentColor",strokeWidth:r,rx:1}))}import G from"react";function xr({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){return G.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},G.createElement("line",{x1:22,y1:18,x2:42,y2:18,stroke:"currentColor",strokeWidth:r}),G.createElement("path",{d:`
|
|
129
129
|
M22 18
|
|
130
130
|
C16 32, 16 46, 32 52
|
|
131
131
|
C48 46, 48 32, 42 18
|
|
132
132
|
Z
|
|
133
|
-
`,stroke:"currentColor",strokeWidth:
|
|
133
|
+
`,stroke:"currentColor",strokeWidth:r,fill:"none"}),G.createElement(i,{d:" M22 18 C16 32, 16 46, 32 52 C48 46, 48 32, 42 18 Z ",transform:"scale(0.98)",idBase:"SnifterGlassGrad",opacity:.7,liquidFill:t}),G.createElement("rect",{x:30,y:51,width:4,height:4,fill:"currentColor",stroke:"currentColor",strokeWidth:r}),G.createElement("path",{d:"M26 54 Q32 51 38 54 L38 55 L26 55 Z",fill:"currentColor",stroke:"currentColor",strokeWidth:r}))}import y from"react";function kr({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){return y.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},y.createElement("line",{x1:16,y1:18,x2:48,y2:18,stroke:"currentColor",strokeWidth:r}),y.createElement(i,{d:`
|
|
134
134
|
M16 18
|
|
135
135
|
L48 18
|
|
136
136
|
C46 30, 46 38, 32 42
|
|
137
137
|
C18 38, 18 30, 16 18
|
|
138
138
|
Z
|
|
139
|
-
`,transform:"scale(0.98)",idBase:"SourGlassGrad",opacity:.7,liquidFill:
|
|
139
|
+
`,transform:"scale(0.98)",idBase:"SourGlassGrad",opacity:.7,liquidFill:t}),y.createElement("path",{d:`
|
|
140
140
|
M16 18
|
|
141
141
|
L48 18
|
|
142
142
|
C46 30, 46 38, 32 42
|
|
143
143
|
C18 38, 18 30, 16 18
|
|
144
144
|
Z
|
|
145
|
-
`,stroke:"currentColor",strokeWidth:
|
|
145
|
+
`,stroke:"currentColor",strokeWidth:r,fill:"none"}),y.createElement("rect",{x:31,y:42,width:2,height:12,fill:"currentColor"}),y.createElement("path",{d:`
|
|
146
146
|
M22 54
|
|
147
147
|
C22 52, 42 52, 42 54
|
|
148
148
|
L42 54
|
|
149
149
|
L22 54
|
|
150
150
|
Z
|
|
151
|
-
`,fill:"currentColor"}))}
|
|
152
|
-
/*! Bundled license information:
|
|
153
|
-
|
|
154
|
-
react/cjs/react.production.min.js:
|
|
155
|
-
(**
|
|
156
|
-
* @license React
|
|
157
|
-
* react.production.min.js
|
|
158
|
-
*
|
|
159
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
160
|
-
*
|
|
161
|
-
* This source code is licensed under the MIT license found in the
|
|
162
|
-
* LICENSE file in the root directory of this source tree.
|
|
163
|
-
*)
|
|
164
|
-
*/
|
|
151
|
+
`,fill:"currentColor"}))}import M from"react";function Gr({liquidFill:t=null,size:o=80,strokeWidth:r=1}){return M.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},M.createElement("rect",{x:13,y:44,width:36,height:4,fill:"currentColor"}),M.createElement(i,{d:"M14 10 L48 10 L48 44 L14 44 Z",transform:"scale(0.98)",idBase:"TankardGlassGrad",opacity:.7,liquidFill:t}),M.createElement("rect",{x:14,y:10,width:34,height:34,fill:"none",stroke:"currentColor",strokeWidth:r*1.4}),M.createElement("g",null,M.createElement("path",{d:"M49 17 C60 19 60 34 49 37",stroke:"currentColor",strokeWidth:r*3,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})))}import w from"react";function yr({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){return w.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},w.createElement("rect",{x:21.75,y:52,width:20.5,height:2,fill:"currentColor"}),w.createElement("rect",{x:20,y:50,width:24,height:4,rx:2,fill:"currentColor",opacity:.06}),w.createElement("rect",{x:22,y:10,width:20,height:42,stroke:"currentColor",strokeWidth:r,fill:"none",opacity:.9}),w.createElement(i,{d:"M21 9 L41 9 L41 51 L21 51 Z",transform:"scale(0.98)",idBase:"TikiGlassGrad",opacity:.7,liquidFill:t}),w.createElement("ellipse",{cx:32,cy:32,rx:6,ry:3,fill:"currentColor"}))}import a from"react";function Mr({liquidFill:t=null,size:o=80,strokeWidth:r=.8}){return a.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},a.createElement(i,{d:"M22 12 H42 V40 H22 Z",transform:"scale(0.98)",idBase:"ToddyGlassGrad",opacity:.7,liquidFill:t}),a.createElement("path",{d:"M22 12 H42 V40 H22 Z",fill:"none",stroke:"currentColor",strokeWidth:r,strokeLinejoin:"round"}),a.createElement("g",null,a.createElement("path",{d:"M43 16 C52 18 52 34 43 36",stroke:"currentColor",strokeWidth:r*2.4,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})),a.createElement("rect",{x:30,y:40,width:4,height:6,fill:"currentColor"}),a.createElement("path",{d:"M22 47 Q32 43 42 47 L42 48 L22 48 Z",fill:"currentColor"}))}import J from"react";function wr({liquidFill:t=["#FFFFFF","#E0E0E0"],size:o=80,strokeWidth:r=.5}){return J.createElement("svg",{width:o,height:o,viewBox:"0 0 64 64"},J.createElement("rect",{x:22,y:30,width:20,height:18,stroke:"currentColor",fill:"none",strokeWidth:r}),J.createElement(i,{d:"M22 30 L42 30 L42 48 L22 48 Z",transform:"scale(0.98)",idBase:"ShotGlassGrad",opacity:.7,liquidFill:t}),J.createElement("rect",{x:22,y:48,width:20,height:3,fill:"none",stroke:"currentColor",strokeWidth:r}))}import D from"react";function vr({liquidFill:t=null,size:o=80,strokeWidth:r=.5}){let l=Math.round(o*90/80);return D.createElement("svg",{width:o,height:l,viewBox:"0 0 64 90"},D.createElement(i,{d:"M26 26 L38 26 Q44 62 32 62 Q20 62 26 26 Z",transform:"scale(0.98)",idBase:"WineGlassGrad",opacity:.7,liquidFill:t}),D.createElement("path",{d:"M26 26 L38 26 Q44 62 32 62 Q20 62 26 26 Z",fill:"none",stroke:"currentColor",strokeWidth:r}),D.createElement("rect",{x:31.5,y:62,width:1,height:25,fill:"currentColor"}),D.createElement("path",{d:"M24 86 Q32 84 40 86 L40 87 L24 87 Z",fill:"currentColor"}))}var Ki={Liquid:i,AbsintheGlass:_,BrandySnifterGlass:K,CollinsGlass:U,CopperMug:X,CordialGlass:Y,CoupeGlass:z,DemitasseGlass:R,DoubleShotGlass:rr,FizzGlass:or,FluteGlass:tr,GobletGlass:ir,HighballGlass:lr,HurricaneGlass:er,IrishCoffeeGlass:sr,JulepCup:nr,MargaritaGlass:dr,MartiniGlass:ur,NickAndNoraGlass:fr,ParfaitGlass:hr,PilsnerGlass:ar,PintGlass:mr,PousseCafeGlass:pr,PunchGlass:Cr,RocksGlass:Lr,SingleShotGlass:cr,SlingGlass:gr,SnifterGlass:xr,SourGlass:kr,TankardGlass:Gr,TikiGlass:yr,ToddyGlass:Mr,WhiskeyShotGlass:wr,WineGlass:vr};export{_ as AbsintheGlass,K as BrandySnifterGlass,U as CollinsGlass,X as CopperMug,Y as CordialGlass,z as CoupeGlass,R as DemitasseGlass,rr as DoubleShotGlass,or as FizzGlass,tr as FluteGlass,ir as GobletGlass,lr as HighballGlass,er as HurricaneGlass,sr as IrishCoffeeGlass,nr as JulepCup,i as Liquid,dr as MargaritaGlass,ur as MartiniGlass,fr as NickAndNoraGlass,hr as ParfaitGlass,ar as PilsnerGlass,mr as PintGlass,pr as PousseCafeGlass,Cr as PunchGlass,Lr as RocksGlass,cr as SingleShotGlass,gr as SlingGlass,xr as SnifterGlass,kr as SourGlass,Gr as TankardGlass,yr as TikiGlass,Mr as ToddyGlass,wr as WhiskeyShotGlass,vr as WineGlass,Ki as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bace51/cocktailjs-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Lightweight React components for rendering cocktail glasses and liquids as SVG.",
|
|
6
6
|
"keywords": [
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@vitejs/plugin-react": "^4.0.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"react": "^16.8 || ^17 || ^18"
|
|
39
|
+
"react": "^16.8 || ^17 || ^18 || ^19"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"./dist/*": "./dist/*"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
|
-
"build": "esbuild src/index.js --bundle --outfile=dist/index.mjs --format=esm --platform=browser --minify",
|
|
57
|
-
"build:cjs": "esbuild src/index.js --bundle --outfile=dist/index.cjs.js --format=cjs --platform=node",
|
|
56
|
+
"build": "esbuild src/index.js --bundle --outfile=dist/index.mjs --format=esm --platform=browser --minify --external:react --external:react-dom --external:react/jsx-runtime",
|
|
57
|
+
"build:cjs": "esbuild src/index.js --bundle --outfile=dist/index.cjs.js --format=cjs --platform=node --external:react --external:react-dom --external:react/jsx-runtime",
|
|
58
58
|
"dev": "vite --config playground/vite.config.js",
|
|
59
59
|
"dev:dist": "USE_DIST=1 vite --config playground/vite.config.js"
|
|
60
60
|
}
|