social-logos 3.0.0 → 3.0.2
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 +26 -0
- package/build/react/example.d.ts +8 -0
- package/build/react/example.js +32 -0
- package/build/react/index.d.ts +6 -0
- package/build/react/index.js +25 -0
- package/build/react/social-logo-data.d.ts +188 -0
- package/build/react/social-logo-data.js +255 -0
- package/build/react/social-logo.d.ts +18 -0
- package/build/react/social-logo.js +68 -0
- package/build/svg-sprite/example.html +1 -1
- package/build/svg-sprite/social-logos.svg +1 -1
- package/package.json +6 -2
- package/build/font/codepoints.json +0 -65
- package/build/font/social-logos.css +0 -75
- package/build/font/social-logos.woff2 +0 -0
- package/build/react/example.css +0 -135
- package/build/react/example.jsx +0 -74
- package/build/react/index.jsx +0 -5
- package/build/react/social-logo-data.jsx +0 -251
- package/build/react/social-logo.jsx +0 -39
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [3.0.2] - 2024-06-05
|
|
2
|
+
### Changed
|
|
3
|
+
- Updated package dependencies. [#37706]
|
|
4
|
+
|
|
5
|
+
## [3.0.1] - 2024-05-27
|
|
6
|
+
### Added
|
|
7
|
+
- Added TypeScript support. [#37528]
|
|
8
|
+
|
|
1
9
|
## [3.0.0] - 2024-05-23
|
|
2
10
|
### Added
|
|
3
11
|
- CSS file with encoded inline font is now automatically generated. [#36964]
|
|
@@ -21,61 +29,79 @@
|
|
|
21
29
|
- Example files are rewritten. [#36964]
|
|
22
30
|
|
|
23
31
|
## 2.5.9 - 2024-03-05
|
|
32
|
+
|
|
24
33
|
- New icon: `sms`
|
|
25
34
|
|
|
26
35
|
## 2.5.8 - 2023-12-20
|
|
36
|
+
|
|
27
37
|
- New icon: `bluesky`
|
|
28
38
|
|
|
29
39
|
## 2.5.7 - 2023-12-11
|
|
40
|
+
|
|
30
41
|
- Updated icon: `patreon`
|
|
31
42
|
|
|
32
43
|
## 2.5.6 - 2023-10-13
|
|
44
|
+
|
|
33
45
|
- Updated icon: `x`
|
|
34
46
|
- Removed unnecessary aria label attributes from Threads and X SVGs.
|
|
35
47
|
|
|
36
48
|
## 2.5.5 - 2023-09-15
|
|
49
|
+
|
|
37
50
|
- New icon: `x`
|
|
38
51
|
|
|
39
52
|
## 2.5.4 - 2023-07-10
|
|
53
|
+
|
|
40
54
|
- New icon: `threads`
|
|
41
55
|
|
|
42
56
|
## 2.5.3 - 2023-06-15
|
|
57
|
+
|
|
43
58
|
- New icon: `fediverse`
|
|
44
59
|
- New icon: `nextdoor`
|
|
45
60
|
- Updated dev dependencies and build tools.
|
|
46
61
|
- Updated icon font.
|
|
47
62
|
|
|
48
63
|
## 2.5.2 - 2023-02-01
|
|
64
|
+
|
|
49
65
|
- New icon: `mastadon`
|
|
50
66
|
|
|
51
67
|
## 2.5.1 - 2023-01-13
|
|
68
|
+
|
|
52
69
|
- React 18 support.
|
|
53
70
|
|
|
54
71
|
## 2.5.0 - 2022-02-01
|
|
72
|
+
|
|
55
73
|
- Added copy post url button.
|
|
56
74
|
|
|
57
75
|
## 2.4.0 - 2021-09-01
|
|
76
|
+
|
|
58
77
|
- Updated icon: `medium`
|
|
59
78
|
- Updated icon: `facebook`
|
|
60
79
|
- React 17 support.
|
|
61
80
|
- Update dev dependencies and build tools.
|
|
62
81
|
|
|
63
82
|
## 2.3.0 - 2021-01-27
|
|
83
|
+
|
|
64
84
|
- New icon: `medium-alt`
|
|
65
85
|
- New icon: `tiktok`
|
|
66
86
|
- New icon: `tiktok-alt`
|
|
67
87
|
- Updated icon: `medium`
|
|
68
88
|
|
|
69
89
|
## 2.2.0 - 2021-01-19
|
|
90
|
+
|
|
70
91
|
- New icon: `patreon`
|
|
71
92
|
|
|
72
93
|
## 2.1.2 - 2020-03-12
|
|
94
|
+
|
|
73
95
|
- Built the package with updated dependencies.
|
|
74
96
|
|
|
75
97
|
## 2.1.1 - 2020-03-10
|
|
98
|
+
|
|
76
99
|
- Build: Fixed bug where React component would render no icon at all (despite properly passed properties).
|
|
77
100
|
|
|
78
101
|
## 2.1.0 - 2018-01-31
|
|
102
|
+
|
|
79
103
|
- Build: Refactored (aligned build system with Gridicons).
|
|
80
104
|
|
|
105
|
+
[3.0.2]: https://github.com/Automattic/social-logos/compare/v3.0.1...v3.0.2
|
|
106
|
+
[3.0.1]: https://github.com/Automattic/social-logos/compare/v3.0.0...v3.0.1
|
|
81
107
|
[3.0.0]: https://github.com/Automattic/social-logos/compare/v2.5.9...v3.0.0
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './example.css';
|
|
2
|
+
/**
|
|
3
|
+
* An example React component that displays all the social logos.
|
|
4
|
+
*
|
|
5
|
+
* @returns {React.Component} The `SocialLogosExample` component.
|
|
6
|
+
*/
|
|
7
|
+
declare function SocialLogosExample(): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default SocialLogosExample;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const social_logo_1 = require("./social-logo");
|
|
6
|
+
const social_logo_data_1 = require("./social-logo-data");
|
|
7
|
+
require("./example.css");
|
|
8
|
+
/**
|
|
9
|
+
* An example React component that displays all the social logos.
|
|
10
|
+
*
|
|
11
|
+
* @returns {React.Component} The `SocialLogosExample` component.
|
|
12
|
+
*/
|
|
13
|
+
function SocialLogosExample() {
|
|
14
|
+
const [useSmallIcons, setUseSmallIcons] = (0, react_1.useState)(false);
|
|
15
|
+
const [showIconNames, setShowIconNames] = (0, react_1.useState)(true);
|
|
16
|
+
const iconSize = useSmallIcons ? 24 : 48;
|
|
17
|
+
const handleClick = name => {
|
|
18
|
+
const code = `<SocialLogo icon="${name}" size="${iconSize}" />`;
|
|
19
|
+
window.prompt('Copy component code:', code);
|
|
20
|
+
};
|
|
21
|
+
const handleSmallIconsToggle = e => {
|
|
22
|
+
setUseSmallIcons(e.target.checked);
|
|
23
|
+
};
|
|
24
|
+
const handleIconNamesToggle = e => {
|
|
25
|
+
setShowIconNames(e.target.checked);
|
|
26
|
+
};
|
|
27
|
+
const allSocialLogos = social_logo_data_1.SocialLogoData.map(logo => {
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(social_logo_1.SocialLogo, { icon: logo.name, size: iconSize, onClick: handleClick.bind(this, logo.name) }), showIconNames && (0, jsx_runtime_1.jsx)("p", { children: logo.name })] }, logo.name));
|
|
29
|
+
});
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "social-logos-example" }, { children: [(0, jsx_runtime_1.jsx)("h1", { children: "Social Logos" }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "display-control-group" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "display-control" }, { children: [(0, jsx_runtime_1.jsx)("h4", { children: "Small icons" }), (0, jsx_runtime_1.jsxs)("label", Object.assign({ className: "switch" }, { children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", onChange: handleSmallIconsToggle, checked: useSmallIcons }), (0, jsx_runtime_1.jsx)("span", { className: "handle" })] }))] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "display-control" }, { children: [(0, jsx_runtime_1.jsx)("h4", { children: "Icon names" }), (0, jsx_runtime_1.jsxs)("label", Object.assign({ className: "switch" }, { children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", onChange: handleIconNamesToggle, checked: showIconNames }), (0, jsx_runtime_1.jsx)("span", { className: "handle" }), (0, jsx_runtime_1.jsx)("span", { className: "switch-label", "data-on": "On", "data-off": "Off" })] }))] }))] })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "icons" }, { children: allSocialLogos })), (0, jsx_runtime_1.jsx)("p", { children: (0, jsx_runtime_1.jsx)("a", Object.assign({ href: "https://github.com/Automattic/social-logos" }, { children: "GitHub" })) })] })));
|
|
31
|
+
}
|
|
32
|
+
exports.default = SocialLogosExample;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.SocialLogoData = exports.default = void 0;
|
|
18
|
+
/**
|
|
19
|
+
* Export components.
|
|
20
|
+
*/
|
|
21
|
+
__exportStar(require("./social-logo"), exports);
|
|
22
|
+
var social_logo_1 = require("./social-logo");
|
|
23
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return social_logo_1.SocialLogo; } });
|
|
24
|
+
var social_logo_data_1 = require("./social-logo-data");
|
|
25
|
+
Object.defineProperty(exports, "SocialLogoData", { enumerable: true, get: function () { return social_logo_data_1.SocialLogoData; } });
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/** This is a generated file. Do not edit. */
|
|
2
|
+
export declare const SocialLogoData: readonly [{
|
|
3
|
+
readonly name: "amazon";
|
|
4
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}, {
|
|
6
|
+
readonly name: "behance";
|
|
7
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
}, {
|
|
9
|
+
readonly name: "blogger";
|
|
10
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
}, {
|
|
12
|
+
readonly name: "blogger-alt";
|
|
13
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
}, {
|
|
15
|
+
readonly name: "bluesky";
|
|
16
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "codepen";
|
|
19
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
}, {
|
|
21
|
+
readonly name: "dribbble";
|
|
22
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
}, {
|
|
24
|
+
readonly name: "dropbox";
|
|
25
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "eventbrite";
|
|
28
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "facebook";
|
|
31
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
}, {
|
|
33
|
+
readonly name: "fediverse";
|
|
34
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
}, {
|
|
36
|
+
readonly name: "feed";
|
|
37
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
}, {
|
|
39
|
+
readonly name: "flickr";
|
|
40
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
}, {
|
|
42
|
+
readonly name: "foursquare";
|
|
43
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
}, {
|
|
45
|
+
readonly name: "ghost";
|
|
46
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
}, {
|
|
48
|
+
readonly name: "github";
|
|
49
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
}, {
|
|
51
|
+
readonly name: "google";
|
|
52
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "google-alt";
|
|
55
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
}, {
|
|
57
|
+
readonly name: "google-plus";
|
|
58
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
}, {
|
|
60
|
+
readonly name: "google-plus-alt";
|
|
61
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
}, {
|
|
63
|
+
readonly name: "instagram";
|
|
64
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "json-feed";
|
|
67
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
}, {
|
|
69
|
+
readonly name: "link";
|
|
70
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
}, {
|
|
72
|
+
readonly name: "linkedin";
|
|
73
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
}, {
|
|
75
|
+
readonly name: "mail";
|
|
76
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "mastodon";
|
|
79
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
}, {
|
|
81
|
+
readonly name: "medium";
|
|
82
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
}, {
|
|
84
|
+
readonly name: "medium-alt";
|
|
85
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "microblog";
|
|
88
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
}, {
|
|
90
|
+
readonly name: "nextdoor";
|
|
91
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
92
|
+
}, {
|
|
93
|
+
readonly name: "patreon";
|
|
94
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
}, {
|
|
96
|
+
readonly name: "pinterest";
|
|
97
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
98
|
+
}, {
|
|
99
|
+
readonly name: "pinterest-alt";
|
|
100
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "pocket";
|
|
103
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
104
|
+
}, {
|
|
105
|
+
readonly name: "polldaddy";
|
|
106
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
107
|
+
}, {
|
|
108
|
+
readonly name: "print";
|
|
109
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
110
|
+
}, {
|
|
111
|
+
readonly name: "reddit";
|
|
112
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
113
|
+
}, {
|
|
114
|
+
readonly name: "share";
|
|
115
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
116
|
+
}, {
|
|
117
|
+
readonly name: "skype";
|
|
118
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
119
|
+
}, {
|
|
120
|
+
readonly name: "sms";
|
|
121
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
122
|
+
}, {
|
|
123
|
+
readonly name: "spotify";
|
|
124
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
125
|
+
}, {
|
|
126
|
+
readonly name: "squarespace";
|
|
127
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
128
|
+
}, {
|
|
129
|
+
readonly name: "stackexchange";
|
|
130
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
131
|
+
}, {
|
|
132
|
+
readonly name: "stackoverflow";
|
|
133
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
134
|
+
}, {
|
|
135
|
+
readonly name: "stumbleupon";
|
|
136
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
137
|
+
}, {
|
|
138
|
+
readonly name: "telegram";
|
|
139
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "threads";
|
|
142
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
143
|
+
}, {
|
|
144
|
+
readonly name: "tiktok";
|
|
145
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
146
|
+
}, {
|
|
147
|
+
readonly name: "tiktok-alt";
|
|
148
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "tripadvisor";
|
|
151
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
152
|
+
}, {
|
|
153
|
+
readonly name: "tumblr";
|
|
154
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
155
|
+
}, {
|
|
156
|
+
readonly name: "tumblr-alt";
|
|
157
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
158
|
+
}, {
|
|
159
|
+
readonly name: "twitch";
|
|
160
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
161
|
+
}, {
|
|
162
|
+
readonly name: "twitter";
|
|
163
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
164
|
+
}, {
|
|
165
|
+
readonly name: "twitter-alt";
|
|
166
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
167
|
+
}, {
|
|
168
|
+
readonly name: "vimeo";
|
|
169
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
170
|
+
}, {
|
|
171
|
+
readonly name: "whatsapp";
|
|
172
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
173
|
+
}, {
|
|
174
|
+
readonly name: "woocommerce";
|
|
175
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
176
|
+
}, {
|
|
177
|
+
readonly name: "wordpress";
|
|
178
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
179
|
+
}, {
|
|
180
|
+
readonly name: "x";
|
|
181
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
182
|
+
}, {
|
|
183
|
+
readonly name: "xanga";
|
|
184
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
185
|
+
}, {
|
|
186
|
+
readonly name: "youtube";
|
|
187
|
+
readonly svg: import("react/jsx-runtime").JSX.Element;
|
|
188
|
+
}];
|