@stackshift-ui/social-icons 7.0.0-beta.1 → 7.0.0-beta.4
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/package.json +6 -6
- package/src/social-icons.tsx +34 -57
- package/dist/chunk-XFFQXQTM.mjs +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -2
- package/dist/index.mjs +0 -2
- package/dist/social-icons.d.ts +0 -10
- package/dist/social-icons.js +0 -1
- package/dist/social-icons.mjs +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/social-icons",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.4",
|
|
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/eslint-config": "6.0.10",
|
|
33
|
+
"@stackshift-ui/typescript-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/system": "
|
|
39
|
-
"@stackshift-ui/scripts": "
|
|
38
|
+
"@stackshift-ui/system": "7.0.0-beta.4",
|
|
39
|
+
"@stackshift-ui/scripts": "7.0.0-beta.3"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@stackshift-ui/system": ">=
|
|
42
|
+
"@stackshift-ui/system": ">=7.0.0-beta.4",
|
|
43
43
|
"@types/react": "16.8 - 19",
|
|
44
44
|
"next": "10 - 14",
|
|
45
45
|
"react": "16.8 - 19",
|
package/src/social-icons.tsx
CHANGED
|
@@ -1,65 +1,42 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
2
2
|
import cn from "classnames";
|
|
3
3
|
import type { ElementType, HTMLProps, ReactNode } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
FaDiscord,
|
|
6
|
+
FaFacebook,
|
|
7
|
+
FaGithub,
|
|
8
|
+
FaInstagram,
|
|
9
|
+
FaLinkedin,
|
|
10
|
+
FaPinterest,
|
|
11
|
+
FaTiktok,
|
|
12
|
+
FaXTwitter,
|
|
13
|
+
FaYoutube,
|
|
14
|
+
FaThreads,
|
|
15
|
+
} from "react-icons/fa6";
|
|
5
16
|
|
|
6
|
-
type Socials =
|
|
17
|
+
type Socials =
|
|
18
|
+
| "facebook"
|
|
19
|
+
| "instagram"
|
|
20
|
+
| "youtube"
|
|
21
|
+
| "linkedin"
|
|
22
|
+
| "twitter"
|
|
23
|
+
| "tiktok"
|
|
24
|
+
| "pinterest"
|
|
25
|
+
| "github"
|
|
26
|
+
| "discord"
|
|
27
|
+
| "threads";
|
|
7
28
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
x="0px"
|
|
13
|
-
y="0px"
|
|
14
|
-
width="24"
|
|
15
|
-
height="24"
|
|
16
|
-
viewBox="0 0 30 30">
|
|
17
|
-
<path
|
|
18
|
-
fill="#0045d8"
|
|
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"
|
|
20
|
-
/>
|
|
21
|
-
</svg>
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
const XIcon = (props: any) => {
|
|
25
|
-
return (
|
|
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">
|
|
33
|
-
<path
|
|
34
|
-
fill="#0045d8"
|
|
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"
|
|
36
|
-
/>
|
|
37
|
-
</svg>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
const InstagramIcon = (props: any) => {
|
|
41
|
-
return (
|
|
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">
|
|
49
|
-
<path
|
|
50
|
-
fill="#0045d8"
|
|
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"
|
|
52
|
-
/>
|
|
53
|
-
</svg>
|
|
54
|
-
);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const SocialIconMap: Record<Socials, (x: any) => JSX.Element> = {
|
|
58
|
-
facebook: FacebookIcon,
|
|
59
|
-
twitter: XIcon,
|
|
60
|
-
instagram: InstagramIcon,
|
|
29
|
+
const SocialIconMap: Record<Socials, React.ComponentType<any>> = {
|
|
30
|
+
facebook: FaFacebook,
|
|
31
|
+
twitter: FaXTwitter,
|
|
32
|
+
instagram: FaInstagram,
|
|
61
33
|
youtube: FaYoutube,
|
|
62
34
|
linkedin: FaLinkedin,
|
|
35
|
+
tiktok: FaTiktok,
|
|
36
|
+
pinterest: FaPinterest,
|
|
37
|
+
github: FaGithub,
|
|
38
|
+
discord: FaDiscord,
|
|
39
|
+
threads: FaThreads,
|
|
63
40
|
};
|
|
64
41
|
|
|
65
42
|
export interface SocialIconsProps extends Omit<HTMLProps<HTMLElement>, "as"> {
|
|
@@ -82,7 +59,7 @@ export const SocialIcons: React.FC<SocialIconsProps> = ({
|
|
|
82
59
|
|
|
83
60
|
const { [displayName]: Component = SocialIconMap[social] } = useStackShiftUIComponents();
|
|
84
61
|
|
|
85
|
-
const commonClass = `w-8 h-8
|
|
62
|
+
const commonClass = `w-8 h-8`;
|
|
86
63
|
|
|
87
64
|
return (
|
|
88
65
|
<Component
|
package/dist/chunk-XFFQXQTM.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./social-icons";
|
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
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
DELETED
package/dist/social-icons.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ElementType, HTMLProps, ReactNode } from "react";
|
|
2
|
-
type Socials = "facebook" | "instagram" | "youtube" | "linkedin" | "twitter";
|
|
3
|
-
export interface SocialIconsProps extends Omit<HTMLProps<HTMLElement>, "as"> {
|
|
4
|
-
social?: Socials;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
className?: string;
|
|
7
|
-
as?: ElementType;
|
|
8
|
-
}
|
|
9
|
-
export declare const SocialIcons: React.FC<SocialIconsProps>;
|
|
10
|
-
export {};
|
package/dist/social-icons.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-XFFQXQTM.mjs";export{a as SocialIcons};
|