@stackshift-ui/social-icons 6.0.11 → 7.0.0-beta.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/chunk-XFFQXQTM.mjs +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/social-icons.js +1 -1
- package/dist/social-icons.mjs +1 -1
- package/package.json +6 -6
- package/src/social-icons.tsx +26 -7
- package/dist/chunk-4HOZLO4V.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useStackShiftUIComponents as p}from"@stackshift-ui/system";import l from"classnames";import{FaLinkedin as m,FaYoutube as C}from"react-icons/fa";import{jsx as o}from"react/jsx-runtime";var h=t=>o("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24",height:"24",viewBox:"0 0 30 30",children:o("path",{fill:"#0045d8",d:"M12,27V15H8v-4h4V8.852C12,4.785,13.981,3,17.361,3c1.619,0,2.475,0.12,2.88,0.175V7h-2.305C16.501,7,16,7.757,16,9.291V11 h4.205l-0.571,4H16v12H12z"})}),d=t=>o("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24",height:"24",viewBox:"0 0 30 30",children:o("path",{fill:"#0045d8",d:"M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z"})}),w=t=>o("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24",height:"24",viewBox:"0 0 50 50",children:o("path",{fill:"#0045d8",d:"M 16 3 C 8.8324839 3 3 8.8324839 3 16 L 3 34 C 3 41.167516 8.8324839 47 16 47 L 34 47 C 41.167516 47 47 41.167516 47 34 L 47 16 C 47 8.8324839 41.167516 3 34 3 L 16 3 z M 16 5 L 34 5 C 40.086484 5 45 9.9135161 45 16 L 45 34 C 45 40.086484 40.086484 45 34 45 L 16 45 C 9.9135161 45 5 40.086484 5 34 L 5 16 C 5 9.9135161 9.9135161 5 16 5 z M 37 11 A 2 2 0 0 0 35 13 A 2 2 0 0 0 37 15 A 2 2 0 0 0 39 13 A 2 2 0 0 0 37 11 z M 25 14 C 18.936712 14 14 18.936712 14 25 C 14 31.063288 18.936712 36 25 36 C 31.063288 36 36 31.063288 36 25 C 36 18.936712 31.063288 14 25 14 z M 25 16 C 29.982407 16 34 20.017593 34 25 C 34 29.982407 29.982407 34 25 34 C 20.017593 34 16 29.982407 16 25 C 16 20.017593 20.017593 16 25 16 z"})}),n={facebook:h,twitter:d,instagram:w,youtube:C,linkedin:m},e="SocialIcons",g=({social:t,children:s,className:a,as:r,...i})=>{if(!t||!n[t])return null;let{[e]:c=n[t]}=p();return o(c,{as:r,className:l("w-8 h-8 text-primary-foreground",a),...i,"data-testid":e.toLowerCase(),children:s})};g.displayName=e;export{g as a};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var w=Object.create;var
|
|
2
|
+
"use strict";var w=Object.create;var r=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var f=(o,t)=>{for(var e in t)r(o,e,{get:t[e],enumerable:!0})},p=(o,t,e,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of x(t))!y.call(o,s)&&s!==e&&r(o,s,{get:()=>t[s],enumerable:!(a=g(t,s))||a.enumerable});return o};var u=(o,t,e)=>(e=o!=null?w(L(o)):{},p(t||!o||!o.__esModule?r(e,"default",{value:o,enumerable:!0}):e,o)),v=o=>p(r({},"__esModule",{value:!0}),o);var H={};f(H,{SocialIcons:()=>h});module.exports=v(H);var m=require("@stackshift-ui/system"),C=u(require("classnames")),i=require("react-icons/fa"),n=require("react/jsx-runtime"),M=o=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24",height:"24",viewBox:"0 0 30 30",children:(0,n.jsx)("path",{fill:"#0045d8",d:"M12,27V15H8v-4h4V8.852C12,4.785,13.981,3,17.361,3c1.619,0,2.475,0.12,2.88,0.175V7h-2.305C16.501,7,16,7.757,16,9.291V11 h4.205l-0.571,4H16v12H12z"})}),S=o=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24",height:"24",viewBox:"0 0 30 30",children:(0,n.jsx)("path",{fill:"#0045d8",d:"M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z"})}),I=o=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24",height:"24",viewBox:"0 0 50 50",children:(0,n.jsx)("path",{fill:"#0045d8",d:"M 16 3 C 8.8324839 3 3 8.8324839 3 16 L 3 34 C 3 41.167516 8.8324839 47 16 47 L 34 47 C 41.167516 47 47 41.167516 47 34 L 47 16 C 47 8.8324839 41.167516 3 34 3 L 16 3 z M 16 5 L 34 5 C 40.086484 5 45 9.9135161 45 16 L 45 34 C 45 40.086484 40.086484 45 34 45 L 16 45 C 9.9135161 45 5 40.086484 5 34 L 5 16 C 5 9.9135161 9.9135161 5 16 5 z M 37 11 A 2 2 0 0 0 35 13 A 2 2 0 0 0 37 15 A 2 2 0 0 0 39 13 A 2 2 0 0 0 37 11 z M 25 14 C 18.936712 14 14 18.936712 14 25 C 14 31.063288 18.936712 36 25 36 C 31.063288 36 36 31.063288 36 25 C 36 18.936712 31.063288 14 25 14 z M 25 16 C 29.982407 16 34 20.017593 34 25 C 34 29.982407 29.982407 34 25 34 C 20.017593 34 16 29.982407 16 25 C 16 20.017593 20.017593 16 25 16 z"})}),l={facebook:M,twitter:S,instagram:I,youtube:i.FaYoutube,linkedin:i.FaLinkedin},c="SocialIcons",h=({social:o,children:t,className:e,as:a,...s})=>{if(!o||!l[o])return null;let{[c]:d=l[o]}=(0,m.useStackShiftUIComponents)();return(0,n.jsx)(d,{as:a,className:(0,C.default)("w-8 h-8 text-primary-foreground",e),...s,"data-testid":c.toLowerCase(),children:t})};h.displayName=c;0&&(module.exports={SocialIcons});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a as e}from"./chunk-
|
|
2
|
+
"use strict";import{a as e}from"./chunk-XFFQXQTM.mjs";export{e as SocialIcons};
|
package/dist/social-icons.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var w=Object.create;var
|
|
1
|
+
"use strict";var w=Object.create;var r=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var f=(o,t)=>{for(var e in t)r(o,e,{get:t[e],enumerable:!0})},p=(o,t,e,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of x(t))!y.call(o,s)&&s!==e&&r(o,s,{get:()=>t[s],enumerable:!(a=g(t,s))||a.enumerable});return o};var u=(o,t,e)=>(e=o!=null?w(L(o)):{},p(t||!o||!o.__esModule?r(e,"default",{value:o,enumerable:!0}):e,o)),v=o=>p(r({},"__esModule",{value:!0}),o);var H={};f(H,{SocialIcons:()=>h});module.exports=v(H);var m=require("@stackshift-ui/system"),C=u(require("classnames")),i=require("react-icons/fa"),n=require("react/jsx-runtime"),M=o=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24",height:"24",viewBox:"0 0 30 30",children:(0,n.jsx)("path",{fill:"#0045d8",d:"M12,27V15H8v-4h4V8.852C12,4.785,13.981,3,17.361,3c1.619,0,2.475,0.12,2.88,0.175V7h-2.305C16.501,7,16,7.757,16,9.291V11 h4.205l-0.571,4H16v12H12z"})}),S=o=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24",height:"24",viewBox:"0 0 30 30",children:(0,n.jsx)("path",{fill:"#0045d8",d:"M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z"})}),I=o=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24",height:"24",viewBox:"0 0 50 50",children:(0,n.jsx)("path",{fill:"#0045d8",d:"M 16 3 C 8.8324839 3 3 8.8324839 3 16 L 3 34 C 3 41.167516 8.8324839 47 16 47 L 34 47 C 41.167516 47 47 41.167516 47 34 L 47 16 C 47 8.8324839 41.167516 3 34 3 L 16 3 z M 16 5 L 34 5 C 40.086484 5 45 9.9135161 45 16 L 45 34 C 45 40.086484 40.086484 45 34 45 L 16 45 C 9.9135161 45 5 40.086484 5 34 L 5 16 C 5 9.9135161 9.9135161 5 16 5 z M 37 11 A 2 2 0 0 0 35 13 A 2 2 0 0 0 37 15 A 2 2 0 0 0 39 13 A 2 2 0 0 0 37 11 z M 25 14 C 18.936712 14 14 18.936712 14 25 C 14 31.063288 18.936712 36 25 36 C 31.063288 36 36 31.063288 36 25 C 36 18.936712 31.063288 14 25 14 z M 25 16 C 29.982407 16 34 20.017593 34 25 C 34 29.982407 29.982407 34 25 34 C 20.017593 34 16 29.982407 16 25 C 16 20.017593 20.017593 16 25 16 z"})}),l={facebook:M,twitter:S,instagram:I,youtube:i.FaYoutube,linkedin:i.FaLinkedin},c="SocialIcons",h=({social:o,children:t,className:e,as:a,...s})=>{if(!o||!l[o])return null;let{[c]:d=l[o]}=(0,m.useStackShiftUIComponents)();return(0,n.jsx)(d,{as:a,className:(0,C.default)("w-8 h-8 text-primary-foreground",e),...s,"data-testid":c.toLowerCase(),children:t})};h.displayName=c;0&&(module.exports={SocialIcons});
|
package/dist/social-icons.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-XFFQXQTM.mjs";export{a as SocialIcons};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/social-icons",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "7.0.0-beta.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
"typescript": "^5.6.2",
|
|
30
30
|
"vite-tsconfig-paths": "^5.0.1",
|
|
31
31
|
"vitest": "^2.1.1",
|
|
32
|
-
"@stackshift-ui/
|
|
33
|
-
"@stackshift-ui/
|
|
32
|
+
"@stackshift-ui/typescript-config": "6.0.10",
|
|
33
|
+
"@stackshift-ui/eslint-config": "6.0.10"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
37
|
"react-icons": "^5.3.0",
|
|
38
|
-
"@stackshift-ui/scripts": "6.0.
|
|
39
|
-
"@stackshift-ui/system": "6.0.
|
|
38
|
+
"@stackshift-ui/scripts": "6.1.0-beta.0",
|
|
39
|
+
"@stackshift-ui/system": "6.1.0-beta.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@stackshift-ui/system": ">=6.0.
|
|
42
|
+
"@stackshift-ui/system": ">=6.1.0-beta.0",
|
|
43
43
|
"@types/react": "16.8 - 19",
|
|
44
44
|
"next": "10 - 14",
|
|
45
45
|
"react": "16.8 - 19",
|
package/src/social-icons.tsx
CHANGED
|
@@ -7,17 +7,29 @@ type Socials = "facebook" | "instagram" | "youtube" | "linkedin" | "twitter";
|
|
|
7
7
|
|
|
8
8
|
const FacebookIcon = (props: any) => {
|
|
9
9
|
return (
|
|
10
|
-
<svg
|
|
10
|
+
<svg
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
+
x="0px"
|
|
13
|
+
y="0px"
|
|
14
|
+
width="24"
|
|
15
|
+
height="24"
|
|
16
|
+
viewBox="0 0 30 30">
|
|
11
17
|
<path
|
|
12
18
|
fill="#0045d8"
|
|
13
19
|
d="M12,27V15H8v-4h4V8.852C12,4.785,13.981,3,17.361,3c1.619,0,2.475,0.12,2.88,0.175V7h-2.305C16.501,7,16,7.757,16,9.291V11 h4.205l-0.571,4H16v12H12z"
|
|
14
20
|
/>
|
|
15
|
-
|
|
21
|
+
</svg>
|
|
16
22
|
);
|
|
17
23
|
};
|
|
18
24
|
const XIcon = (props: any) => {
|
|
19
25
|
return (
|
|
20
|
-
<svg
|
|
26
|
+
<svg
|
|
27
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
28
|
+
x="0px"
|
|
29
|
+
y="0px"
|
|
30
|
+
width="24"
|
|
31
|
+
height="24"
|
|
32
|
+
viewBox="0 0 30 30">
|
|
21
33
|
<path
|
|
22
34
|
fill="#0045d8"
|
|
23
35
|
d="M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z"
|
|
@@ -27,7 +39,13 @@ const XIcon = (props: any) => {
|
|
|
27
39
|
};
|
|
28
40
|
const InstagramIcon = (props: any) => {
|
|
29
41
|
return (
|
|
30
|
-
<svg
|
|
42
|
+
<svg
|
|
43
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
44
|
+
x="0px"
|
|
45
|
+
y="0px"
|
|
46
|
+
width="24"
|
|
47
|
+
height="24"
|
|
48
|
+
viewBox="0 0 50 50">
|
|
31
49
|
<path
|
|
32
50
|
fill="#0045d8"
|
|
33
51
|
d="M 16 3 C 8.8324839 3 3 8.8324839 3 16 L 3 34 C 3 41.167516 8.8324839 47 16 47 L 34 47 C 41.167516 47 47 41.167516 47 34 L 47 16 C 47 8.8324839 41.167516 3 34 3 L 16 3 z M 16 5 L 34 5 C 40.086484 5 45 9.9135161 45 16 L 45 34 C 45 40.086484 40.086484 45 34 45 L 16 45 C 9.9135161 45 5 40.086484 5 34 L 5 16 C 5 9.9135161 9.9135161 5 16 5 z M 37 11 A 2 2 0 0 0 35 13 A 2 2 0 0 0 37 15 A 2 2 0 0 0 39 13 A 2 2 0 0 0 37 11 z M 25 14 C 18.936712 14 14 18.936712 14 25 C 14 31.063288 18.936712 36 25 36 C 31.063288 36 36 31.063288 36 25 C 36 18.936712 31.063288 14 25 14 z M 25 16 C 29.982407 16 34 20.017593 34 25 C 34 29.982407 29.982407 34 25 34 C 20.017593 34 16 29.982407 16 25 C 16 20.017593 20.017593 16 25 16 z"
|
|
@@ -54,14 +72,15 @@ export interface SocialIconsProps extends Omit<HTMLProps<HTMLElement>, "as"> {
|
|
|
54
72
|
const displayName = "SocialIcons";
|
|
55
73
|
|
|
56
74
|
export const SocialIcons: React.FC<SocialIconsProps> = ({
|
|
57
|
-
social
|
|
75
|
+
social,
|
|
58
76
|
children,
|
|
59
77
|
className,
|
|
60
78
|
as,
|
|
61
79
|
...props
|
|
62
80
|
}) => {
|
|
63
|
-
|
|
64
|
-
|
|
81
|
+
if (!social || !SocialIconMap[social]) return null;
|
|
82
|
+
|
|
83
|
+
const { [displayName]: Component = SocialIconMap[social] } = useStackShiftUIComponents();
|
|
65
84
|
|
|
66
85
|
const commonClass = `w-8 h-8 text-primary-foreground`;
|
|
67
86
|
|
package/dist/chunk-4HOZLO4V.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useStackShiftUIComponents as p}from"@stackshift-ui/system";import l from"classnames";import{FaFacebook as m,FaLinkedin as C,FaYoutube as h}from"react-icons/fa";import{jsx as o}from"react/jsx-runtime";var d=t=>o("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24",height:"24",viewBox:"0 0 30 30",children:o("path",{fill:"#0045d8",d:"M12,27V15H8v-4h4V8.852C12,4.785,13.981,3,17.361,3c1.619,0,2.475,0.12,2.88,0.175V7h-2.305C16.501,7,16,7.757,16,9.291V11 h4.205l-0.571,4H16v12H12z"})}),w=t=>o("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24",height:"24",viewBox:"0 0 30 30",children:o("path",{fill:"#0045d8",d:"M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z"})}),g=t=>o("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24",height:"24",viewBox:"0 0 50 50",children:o("path",{fill:"#0045d8",d:"M 16 3 C 8.8324839 3 3 8.8324839 3 16 L 3 34 C 3 41.167516 8.8324839 47 16 47 L 34 47 C 41.167516 47 47 41.167516 47 34 L 47 16 C 47 8.8324839 41.167516 3 34 3 L 16 3 z M 16 5 L 34 5 C 40.086484 5 45 9.9135161 45 16 L 45 34 C 45 40.086484 40.086484 45 34 45 L 16 45 C 9.9135161 45 5 40.086484 5 34 L 5 16 C 5 9.9135161 9.9135161 5 16 5 z M 37 11 A 2 2 0 0 0 35 13 A 2 2 0 0 0 37 15 A 2 2 0 0 0 39 13 A 2 2 0 0 0 37 11 z M 25 14 C 18.936712 14 14 18.936712 14 25 C 14 31.063288 18.936712 36 25 36 C 31.063288 36 36 31.063288 36 25 C 36 18.936712 31.063288 14 25 14 z M 25 16 C 29.982407 16 34 20.017593 34 25 C 34 29.982407 29.982407 34 25 34 C 20.017593 34 16 29.982407 16 25 C 16 20.017593 20.017593 16 25 16 z"})}),x={facebook:d,twitter:w,instagram:g,youtube:h,linkedin:C},e="SocialIcons",L=({social:t="facebook",children:n,className:a,as:c,...i})=>{var s;let{[e]:r=(s=x[t])!=null?s:m}=p();return o(r,{as:c,className:l("w-8 h-8 text-primary-foreground",a),...i,"data-testid":e.toLowerCase(),children:n})};L.displayName=e;export{L as a};
|