@dynamic-labs/iconic 0.1.12 → 0.1.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/iconic",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "A library of icons used by Dynamic Lab's SDK, served via CDN",
5
5
  "main": "dist/src/index.js",
6
6
  "scripts": {
@@ -22,6 +22,7 @@
22
22
  "homepage": "https://github.com/dynamic-labs/iconic#readme",
23
23
  "devDependencies": {
24
24
  "@babel/preset-react": "^7.18.6",
25
+ "@testing-library/jest-dom": "^5.16.5",
25
26
  "@testing-library/react": "^13.4.0",
26
27
  "@types/fs-extra": "^11.0.1",
27
28
  "@types/jest": "^29.4.0",
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ type SocialIconProps = React.SVGProps<SVGSVGElement> & {
3
+ name: string;
4
+ };
5
+ export declare const SocialIcon: ({ name, ...props }: SocialIconProps) => JSX.Element;
6
+ export {};
@@ -0,0 +1,48 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __rest = (this && this.__rest) || function (s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
+ t[p] = s[p];
29
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
+ t[p[i]] = s[p[i]];
33
+ }
34
+ return t;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.SocialIcon = void 0;
38
+ const jsx_runtime_1 = require("react/jsx-runtime");
39
+ const socials = __importStar(require("../icons/social"));
40
+ const SocialIcon = (_a) => {
41
+ var { name } = _a, props = __rest(_a, ["name"]);
42
+ const map = Object.fromEntries(Object.values(socials).map((icon) => [icon.iconName, icon]));
43
+ const Icon = map[name.toLowerCase()];
44
+ if (!Icon)
45
+ return null;
46
+ return (0, jsx_runtime_1.jsx)(Icon, Object.assign({}, props));
47
+ };
48
+ exports.SocialIcon = SocialIcon;
@@ -0,0 +1 @@
1
+ export * from './SocialIcon';
@@ -0,0 +1,17 @@
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
+ __exportStar(require("./SocialIcon"), exports);
@@ -1,5 +1,9 @@
1
1
  import { type Iconic } from '../../Iconic';
2
2
  export declare const DiscordIcon: Iconic;
3
+ export declare const FacebookIcon: Iconic;
4
+ export declare const GithubIcon: Iconic;
5
+ export declare const GoogleIcon: Iconic;
3
6
  export declare const HelpdeskIcon: Iconic;
4
7
  export declare const SlackIcon: Iconic;
8
+ export declare const TelegramIcon: Iconic;
5
9
  export declare const TwitterIcon: Iconic;
@@ -1,12 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TwitterIcon = exports.SlackIcon = exports.HelpdeskIcon = exports.DiscordIcon = void 0;
3
+ exports.TwitterIcon = exports.TelegramIcon = exports.SlackIcon = exports.HelpdeskIcon = exports.GoogleIcon = exports.GithubIcon = exports.FacebookIcon = exports.DiscordIcon = void 0;
4
4
  const Iconic_1 = require("../../Iconic");
5
5
  exports.DiscordIcon = (0, Iconic_1.createIconic)({
6
6
  iconName: 'discord',
7
7
  alt: 'Discord',
8
8
  sourcePath: 'icons/social/discord.svg'
9
9
  });
10
+ exports.FacebookIcon = (0, Iconic_1.createIconic)({
11
+ iconName: 'facebook',
12
+ alt: 'Facebook',
13
+ sourcePath: 'icons/social/facebook.svg'
14
+ });
15
+ exports.GithubIcon = (0, Iconic_1.createIconic)({
16
+ iconName: 'github',
17
+ alt: 'Github',
18
+ sourcePath: 'icons/social/github.svg'
19
+ });
20
+ exports.GoogleIcon = (0, Iconic_1.createIconic)({
21
+ iconName: 'google',
22
+ alt: 'Google',
23
+ sourcePath: 'icons/social/google.svg'
24
+ });
10
25
  exports.HelpdeskIcon = (0, Iconic_1.createIconic)({
11
26
  iconName: 'helpdesk',
12
27
  alt: 'Helpdesk',
@@ -17,6 +32,11 @@ exports.SlackIcon = (0, Iconic_1.createIconic)({
17
32
  alt: 'Slack',
18
33
  sourcePath: 'icons/social/slack.svg'
19
34
  });
35
+ exports.TelegramIcon = (0, Iconic_1.createIconic)({
36
+ iconName: 'telegram',
37
+ alt: 'Telegram',
38
+ sourcePath: 'icons/social/telegram.svg'
39
+ });
20
40
  exports.TwitterIcon = (0, Iconic_1.createIconic)({
21
41
  iconName: 'twitter',
22
42
  alt: 'Twitter',
@@ -1,2 +1,3 @@
1
1
  export * from './icons';
2
2
  export { type Iconic, ICONIC_SPRITE_URL } from './Iconic';
3
+ export * from './components';
package/dist/src/index.js CHANGED
@@ -18,3 +18,4 @@ exports.ICONIC_SPRITE_URL = void 0;
18
18
  __exportStar(require("./icons"), exports);
19
19
  var Iconic_1 = require("./Iconic");
20
20
  Object.defineProperty(exports, "ICONIC_SPRITE_URL", { enumerable: true, get: function () { return Iconic_1.ICONIC_SPRITE_URL; } });
21
+ __exportStar(require("./components"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/iconic",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "A library of icons used by Dynamic Lab's SDK, served via CDN",
5
5
  "main": "dist/src/index.js",
6
6
  "scripts": {
@@ -22,6 +22,7 @@
22
22
  "homepage": "https://github.com/dynamic-labs/iconic#readme",
23
23
  "devDependencies": {
24
24
  "@babel/preset-react": "^7.18.6",
25
+ "@testing-library/jest-dom": "^5.16.5",
25
26
  "@testing-library/react": "^13.4.0",
26
27
  "@types/fs-extra": "^11.0.1",
27
28
  "@types/jest": "^29.4.0",