@dynamic-labs/iconic 0.1.22 → 0.1.24

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.22",
3
+ "version": "0.1.24",
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": {
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
+ import type { ThemeVariant } from '../types';
2
3
  type SocialIconProps = React.SVGProps<SVGSVGElement> & {
3
4
  name: string;
5
+ variant?: ThemeVariant;
4
6
  };
5
- export declare const SocialIcon: ({ name, ...props }: SocialIconProps) => JSX.Element;
7
+ export declare const SocialIcon: ({ name, variant, ...props }: SocialIconProps) => JSX.Element;
6
8
  export {};
@@ -1,27 +1,4 @@
1
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
2
  var __rest = (this && this.__rest) || function (s, e) {
26
3
  var t = {};
27
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -36,11 +13,10 @@ var __rest = (this && this.__rest) || function (s, e) {
36
13
  Object.defineProperty(exports, "__esModule", { value: true });
37
14
  exports.SocialIcon = void 0;
38
15
  const jsx_runtime_1 = require("react/jsx-runtime");
39
- const socials = __importStar(require("../icons/social"));
16
+ const getSocialIcon_1 = require("./getSocialIcon");
40
17
  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()];
18
+ var { name, variant } = _a, props = __rest(_a, ["name", "variant"]);
19
+ const Icon = (0, getSocialIcon_1.getSocialIcon)(name, variant);
44
20
  if (!Icon)
45
21
  return null;
46
22
  return (0, jsx_runtime_1.jsx)(Icon, Object.assign({}, props));
@@ -0,0 +1,3 @@
1
+ import type { ThemeVariant } from '../types';
2
+ import type { Iconic } from '../Iconic';
3
+ export declare const getSocialIcon: (name: string, variant?: ThemeVariant) => Iconic;
@@ -0,0 +1,40 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.getSocialIcon = void 0;
27
+ const socials = __importStar(require("../icons/social"));
28
+ const getSocialIcon = (name, variant = 'light') => {
29
+ const map = Object.fromEntries(Object.values(socials).map((icon) => [icon.iconName, icon]));
30
+ if (variant === 'dark') {
31
+ const darkIcon = map[`${name.toLowerCase()}-dark`];
32
+ if (darkIcon)
33
+ return darkIcon;
34
+ }
35
+ const icon = map[name.toLowerCase()];
36
+ if (icon)
37
+ return icon;
38
+ return null;
39
+ };
40
+ exports.getSocialIcon = getSocialIcon;
@@ -1 +1,2 @@
1
1
  export * from './SocialIcon';
2
+ export * from './getSocialIcon';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./SocialIcon"), exports);
18
+ __exportStar(require("./getSocialIcon"), exports);
@@ -3,6 +3,7 @@ export declare const BitbucketIcon: Iconic;
3
3
  export declare const DiscordIcon: Iconic;
4
4
  export declare const FacebookIcon: Iconic;
5
5
  export declare const GithubIcon: Iconic;
6
+ export declare const GithubDarkIcon: Iconic;
6
7
  export declare const GitlabIcon: Iconic;
7
8
  export declare const GoogleIcon: Iconic;
8
9
  export declare const HelpdeskIcon: Iconic;
@@ -11,6 +12,7 @@ export declare const MicrosoftIcon: Iconic;
11
12
  export declare const SlackIcon: Iconic;
12
13
  export declare const TelegramIcon: Iconic;
13
14
  export declare const TwitchIcon: Iconic;
15
+ export declare const TwitchDarkIcon: Iconic;
14
16
  export declare const TwitterIcon: Iconic;
15
17
  export declare const AppleSocialIcon: Iconic;
16
18
  export declare const AppleDarkSocialIcon: Iconic;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.YouTubeIcon = exports.InstagramIcon = exports.AppleDarkSocialIcon = exports.AppleSocialIcon = exports.TwitterIcon = exports.TwitchIcon = exports.TelegramIcon = exports.SlackIcon = exports.MicrosoftIcon = exports.LinkedinIcon = exports.HelpdeskIcon = exports.GoogleIcon = exports.GitlabIcon = exports.GithubIcon = exports.FacebookIcon = exports.DiscordIcon = exports.BitbucketIcon = void 0;
3
+ exports.YouTubeIcon = exports.InstagramIcon = exports.AppleDarkSocialIcon = exports.AppleSocialIcon = exports.TwitterIcon = exports.TwitchDarkIcon = exports.TwitchIcon = exports.TelegramIcon = exports.SlackIcon = exports.MicrosoftIcon = exports.LinkedinIcon = exports.HelpdeskIcon = exports.GoogleIcon = exports.GitlabIcon = exports.GithubDarkIcon = exports.GithubIcon = exports.FacebookIcon = exports.DiscordIcon = exports.BitbucketIcon = void 0;
4
4
  const Iconic_1 = require("../../Iconic");
5
5
  exports.BitbucketIcon = (0, Iconic_1.createIconic)({
6
6
  iconName: 'bitbucket',
@@ -22,6 +22,11 @@ exports.GithubIcon = (0, Iconic_1.createIconic)({
22
22
  alt: 'Github',
23
23
  sourcePath: 'icons/social/github.svg'
24
24
  });
25
+ exports.GithubDarkIcon = (0, Iconic_1.createIconic)({
26
+ iconName: 'github-dark',
27
+ alt: 'Github',
28
+ sourcePath: 'icons/social/github-dark.svg'
29
+ });
25
30
  exports.GitlabIcon = (0, Iconic_1.createIconic)({
26
31
  iconName: 'gitlab',
27
32
  alt: 'Gitlab',
@@ -62,6 +67,11 @@ exports.TwitchIcon = (0, Iconic_1.createIconic)({
62
67
  alt: 'Twitch',
63
68
  sourcePath: 'icons/social/twitch.svg'
64
69
  });
70
+ exports.TwitchDarkIcon = (0, Iconic_1.createIconic)({
71
+ iconName: 'twitch-dark',
72
+ alt: 'Twitch',
73
+ sourcePath: 'icons/social/twitch-dark.svg'
74
+ });
65
75
  exports.TwitterIcon = (0, Iconic_1.createIconic)({
66
76
  iconName: 'twitter',
67
77
  alt: 'Twitter',
@@ -1,6 +1,7 @@
1
1
  import { type Iconic } from '../../Iconic';
2
2
  export declare const OneInchIcon: Iconic;
3
3
  export declare const ArgentXIcon: Iconic;
4
+ export declare const BackpackIcon: Iconic;
4
5
  export declare const BinanceIcon: Iconic;
5
6
  export declare const BitPayIcon: Iconic;
6
7
  export declare const BloctoIcon: Iconic;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SuperbIcon = exports.ZengoIcon = exports.MagicLinkIcon = exports.WalletConnectIcon = exports.VenlyIcon = exports.UnstoppableIcon = exports.TrustIcon = exports.TorusIcon = exports.TerraIcon = exports.TallyCashIcon = exports.StrokeIcon = exports.SpotIcon = exports.SolflareIcon = exports.SlopeIcon = exports.SequenceIcon = exports.SafeIcon = exports.RainbowIcon = exports.PhantomIcon = exports.OpeanSeaIcon = exports.OmniIcon = exports.MyalgoIcon = exports.MissingIcon = exports.MetaMaskIcon = exports.MaticIcon = exports.LinenIcon = exports.LilicoIcon = exports.LedgerIcon = exports.KeplrIcon = exports.InjectedWalletIcon = exports.ImTokenWallet = exports.GlowIcon = exports.GamestopIcon = exports.FrameIcon = exports.FortmaticIcon = exports.FireblocksIcon = exports.ExodusIcon = exports.SignInWithEmailIcon = exports.EmailSignIcon = exports.DawnIcon = exports.DapperIcon = exports.CryptoIcon = exports.CoinbaseIcon = exports.Coin90Icon = exports.BraavosIcon = exports.BloctoIcon = exports.BitPayIcon = exports.BinanceIcon = exports.ArgentXIcon = exports.OneInchIcon = void 0;
3
+ exports.SuperbIcon = exports.ZengoIcon = exports.MagicLinkIcon = exports.WalletConnectIcon = exports.VenlyIcon = exports.UnstoppableIcon = exports.TrustIcon = exports.TorusIcon = exports.TerraIcon = exports.TallyCashIcon = exports.StrokeIcon = exports.SpotIcon = exports.SolflareIcon = exports.SlopeIcon = exports.SequenceIcon = exports.SafeIcon = exports.RainbowIcon = exports.PhantomIcon = exports.OpeanSeaIcon = exports.OmniIcon = exports.MyalgoIcon = exports.MissingIcon = exports.MetaMaskIcon = exports.MaticIcon = exports.LinenIcon = exports.LilicoIcon = exports.LedgerIcon = exports.KeplrIcon = exports.InjectedWalletIcon = exports.ImTokenWallet = exports.GlowIcon = exports.GamestopIcon = exports.FrameIcon = exports.FortmaticIcon = exports.FireblocksIcon = exports.ExodusIcon = exports.SignInWithEmailIcon = exports.EmailSignIcon = exports.DawnIcon = exports.DapperIcon = exports.CryptoIcon = exports.CoinbaseIcon = exports.Coin90Icon = exports.BraavosIcon = exports.BloctoIcon = exports.BitPayIcon = exports.BinanceIcon = exports.BackpackIcon = exports.ArgentXIcon = exports.OneInchIcon = void 0;
4
4
  const Iconic_1 = require("../../Iconic");
5
5
  exports.OneInchIcon = (0, Iconic_1.createIconic)({
6
6
  iconName: '1inch.svg',
@@ -12,6 +12,11 @@ exports.ArgentXIcon = (0, Iconic_1.createIconic)({
12
12
  alt: 'Argent X Wallet',
13
13
  sourcePath: 'icons/wallets/argentx.svg'
14
14
  });
15
+ exports.BackpackIcon = (0, Iconic_1.createIconic)({
16
+ iconName: 'backpack',
17
+ alt: 'Backpack Wallet',
18
+ sourcePath: 'icons/wallets/backpack.svg'
19
+ });
15
20
  exports.BinanceIcon = (0, Iconic_1.createIconic)({
16
21
  iconName: 'binance.svg',
17
22
  alt: 'Binance Wallet',
@@ -0,0 +1 @@
1
+ export type ThemeVariant = 'light' | 'dark';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/iconic",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
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": {