@dynamic-labs/iconic 0.0.0-exp20240808.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/CHANGELOG.md +3746 -0
- package/LICENSE +21 -0
- package/README.md +21 -0
- package/_virtual/_tslib.cjs +38 -0
- package/_virtual/_tslib.js +34 -0
- package/package.json +36 -0
- package/src/Iconic.cjs +24 -0
- package/src/Iconic.d.ts +13 -0
- package/src/Iconic.js +19 -0
- package/src/components/SocialIcon.cjs +18 -0
- package/src/components/SocialIcon.d.ts +8 -0
- package/src/components/SocialIcon.js +14 -0
- package/src/components/findSocialIcon.cjs +19 -0
- package/src/components/findSocialIcon.d.ts +3 -0
- package/src/components/findSocialIcon.js +15 -0
- package/src/components/getSocialIcon.cjs +21 -0
- package/src/components/getSocialIcon.d.ts +3 -0
- package/src/components/getSocialIcon.js +17 -0
- package/src/components/index.d.ts +3 -0
- package/src/helpers/getIconicSpriteUrl.cjs +18 -0
- package/src/helpers/getIconicSpriteUrl.d.ts +1 -0
- package/src/helpers/getIconicSpriteUrl.js +14 -0
- package/src/helpers/index.d.ts +1 -0
- package/src/icons/browsers/index.cjs +44 -0
- package/src/icons/browsers/index.d.ts +7 -0
- package/src/icons/browsers/index.js +35 -0
- package/src/icons/chains/index.cjs +128 -0
- package/src/icons/chains/index.d.ts +21 -0
- package/src/icons/chains/index.js +105 -0
- package/src/icons/index.d.ts +6 -0
- package/src/icons/misc/index.cjs +26 -0
- package/src/icons/misc/index.d.ts +4 -0
- package/src/icons/misc/index.js +20 -0
- package/src/icons/mobile/index.cjs +20 -0
- package/src/icons/mobile/index.d.ts +3 -0
- package/src/icons/mobile/index.js +15 -0
- package/src/icons/social/index.cjs +158 -0
- package/src/icons/social/index.d.ts +26 -0
- package/src/icons/social/index.js +130 -0
- package/src/icons/wallets/index.cjs +428 -0
- package/src/icons/wallets/index.d.ts +71 -0
- package/src/icons/wallets/index.js +355 -0
- package/src/index.cjs +148 -0
- package/src/index.d.ts +4 -0
- package/src/index.js +11 -0
- package/src/logger.cjs +10 -0
- package/src/logger.d.ts +2 -0
- package/src/logger.js +6 -0
- package/src/types.d.ts +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Dynamic Labs, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
### Adding an icon
|
|
2
|
+
|
|
3
|
+
1. Add the SVG file to the appropriate folder
|
|
4
|
+
1. Add a `createIconic` component to the `index.ts` in that folder for that icon (iconName should be lowercase)
|
|
5
|
+
1. run `nvm use`
|
|
6
|
+
1. run `npx nx run iconic:build` to update the sprite.svg
|
|
7
|
+
1. run `npx nx run iconic:test -u` to update the snapshot
|
|
8
|
+
1. Open a PR
|
|
9
|
+
1. After merge, release (see below)
|
|
10
|
+
|
|
11
|
+
### Updating an icon
|
|
12
|
+
|
|
13
|
+
1. Update SVG file with new data
|
|
14
|
+
1. Open a PR
|
|
15
|
+
1. After merge Release (see below), which will update the sprite.svg
|
|
16
|
+
|
|
17
|
+
_It will take up to 24 hours for new icon to be seen due to cache_
|
|
18
|
+
|
|
19
|
+
### Releasing
|
|
20
|
+
|
|
21
|
+
This process updates Dynamic's sprite.svg
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
Copyright (c) Microsoft Corporation.
|
|
8
|
+
|
|
9
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
10
|
+
purpose with or without fee is hereby granted.
|
|
11
|
+
|
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
13
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
14
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
15
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
16
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
17
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
18
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
19
|
+
***************************************************************************** */
|
|
20
|
+
|
|
21
|
+
function __rest(s, e) {
|
|
22
|
+
var t = {};
|
|
23
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
24
|
+
t[p] = s[p];
|
|
25
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
26
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
28
|
+
t[p[i]] = s[p[i]];
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
34
|
+
var e = new Error(message);
|
|
35
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.__rest = __rest;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
/******************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */
|
|
16
|
+
|
|
17
|
+
function __rest(s, e) {
|
|
18
|
+
var t = {};
|
|
19
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
+
t[p] = s[p];
|
|
21
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
+
t[p[i]] = s[p[i]];
|
|
25
|
+
}
|
|
26
|
+
return t;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
30
|
+
var e = new Error(message);
|
|
31
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { __rest };
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dynamic-labs/iconic",
|
|
3
|
+
"version": "0.0.0-exp20240808.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
7
|
+
"directory": "packages/iconic"
|
|
8
|
+
},
|
|
9
|
+
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/dynamic-labs/DynamicAuth/issues"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/dynamic-labs/DynamicAuth#readme",
|
|
14
|
+
"author": "Dynamic Labs, Inc.",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"main": "./src/index.cjs",
|
|
17
|
+
"module": "./src/index.js",
|
|
18
|
+
"types": "./src/index.d.ts",
|
|
19
|
+
"type": "module",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./src/index.d.ts",
|
|
23
|
+
"import": "./src/index.js",
|
|
24
|
+
"require": "./src/index.cjs"
|
|
25
|
+
},
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"react": "^18.0.0",
|
|
30
|
+
"react-dom": "^18.0.0"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@dynamic-labs/logger": "0.0.0-exp20240808.0",
|
|
34
|
+
"sharp": "0.33.2"
|
|
35
|
+
}
|
|
36
|
+
}
|
package/src/Iconic.cjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var react = require('react');
|
|
7
|
+
var getIconicSpriteUrl = require('./helpers/getIconicSpriteUrl.cjs');
|
|
8
|
+
|
|
9
|
+
const ICONIC_SPRITE_URL = getIconicSpriteUrl.getIconicSpriteUrl();
|
|
10
|
+
const createIconic = (props) => {
|
|
11
|
+
const Icon = Object.assign(Object.assign({}, props), { function: (props) => {
|
|
12
|
+
const url = `${ICONIC_SPRITE_URL}#${Icon.iconName}`;
|
|
13
|
+
return react.createElement('img', Object.assign(Object.assign({ 'data-testid': `iconic-${Icon.iconName}` }, props), { alt: Icon.alt, src: url }));
|
|
14
|
+
} });
|
|
15
|
+
const IconicComponent = Icon.function.bind(Icon);
|
|
16
|
+
Object.assign(IconicComponent, {
|
|
17
|
+
iconName: Icon.iconName,
|
|
18
|
+
sourcePath: Icon.sourcePath,
|
|
19
|
+
});
|
|
20
|
+
return IconicComponent;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.ICONIC_SPRITE_URL = ICONIC_SPRITE_URL;
|
|
24
|
+
exports.createIconic = createIconic;
|
package/src/Iconic.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { type FC } from 'react';
|
|
2
|
+
export declare const ICONIC_SPRITE_URL: string;
|
|
3
|
+
export type Iconic = FC<React.SVGProps<SVGSVGElement> & {
|
|
4
|
+
title?: string | undefined;
|
|
5
|
+
}> & {
|
|
6
|
+
iconName: string;
|
|
7
|
+
sourcePath: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const createIconic: (props: {
|
|
10
|
+
sourcePath: string;
|
|
11
|
+
iconName: string;
|
|
12
|
+
alt: string;
|
|
13
|
+
}) => Iconic;
|
package/src/Iconic.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { getIconicSpriteUrl } from './helpers/getIconicSpriteUrl.js';
|
|
4
|
+
|
|
5
|
+
const ICONIC_SPRITE_URL = getIconicSpriteUrl();
|
|
6
|
+
const createIconic = (props) => {
|
|
7
|
+
const Icon = Object.assign(Object.assign({}, props), { function: (props) => {
|
|
8
|
+
const url = `${ICONIC_SPRITE_URL}#${Icon.iconName}`;
|
|
9
|
+
return createElement('img', Object.assign(Object.assign({ 'data-testid': `iconic-${Icon.iconName}` }, props), { alt: Icon.alt, src: url }));
|
|
10
|
+
} });
|
|
11
|
+
const IconicComponent = Icon.function.bind(Icon);
|
|
12
|
+
Object.assign(IconicComponent, {
|
|
13
|
+
iconName: Icon.iconName,
|
|
14
|
+
sourcePath: Icon.sourcePath,
|
|
15
|
+
});
|
|
16
|
+
return IconicComponent;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { ICONIC_SPRITE_URL, createIconic };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var _tslib = require('../../_virtual/_tslib.cjs');
|
|
7
|
+
var react = require('react');
|
|
8
|
+
var findSocialIcon = require('./findSocialIcon.cjs');
|
|
9
|
+
|
|
10
|
+
const SocialIcon = (_a) => {
|
|
11
|
+
var { name, variant } = _a, props = _tslib.__rest(_a, ["name", "variant"]);
|
|
12
|
+
const Icon = findSocialIcon.findSocialIcon(name, variant);
|
|
13
|
+
if (!Icon)
|
|
14
|
+
return null;
|
|
15
|
+
return react.createElement(Icon, props, null);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.SocialIcon = SocialIcon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ThemeVariant } from '../types';
|
|
3
|
+
type SocialIconProps = React.SVGProps<SVGSVGElement> & {
|
|
4
|
+
name: string;
|
|
5
|
+
variant?: ThemeVariant;
|
|
6
|
+
};
|
|
7
|
+
export declare const SocialIcon: ({ name, variant, ...props }: SocialIconProps) => JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { __rest } from '../../_virtual/_tslib.js';
|
|
3
|
+
import { createElement } from 'react';
|
|
4
|
+
import { findSocialIcon } from './findSocialIcon.js';
|
|
5
|
+
|
|
6
|
+
const SocialIcon = (_a) => {
|
|
7
|
+
var { name, variant } = _a, props = __rest(_a, ["name", "variant"]);
|
|
8
|
+
const Icon = findSocialIcon(name, variant);
|
|
9
|
+
if (!Icon)
|
|
10
|
+
return null;
|
|
11
|
+
return createElement(Icon, props, null);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { SocialIcon };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var logger = require('../logger.cjs');
|
|
7
|
+
var getSocialIcon = require('./getSocialIcon.cjs');
|
|
8
|
+
|
|
9
|
+
const findSocialIcon = (name, variant = 'light') => {
|
|
10
|
+
try {
|
|
11
|
+
return getSocialIcon.getSocialIcon(name, variant);
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
logger.logger.error(e);
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.findSocialIcon = findSocialIcon;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { logger } from '../logger.js';
|
|
3
|
+
import { getSocialIcon } from './getSocialIcon.js';
|
|
4
|
+
|
|
5
|
+
const findSocialIcon = (name, variant = 'light') => {
|
|
6
|
+
try {
|
|
7
|
+
return getSocialIcon(name, variant);
|
|
8
|
+
}
|
|
9
|
+
catch (e) {
|
|
10
|
+
logger.error(e);
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { findSocialIcon };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var index = require('../icons/social/index.cjs');
|
|
7
|
+
|
|
8
|
+
const getSocialIcon = (name, variant = 'light') => {
|
|
9
|
+
const map = Object.fromEntries(Object.values(index).map((icon) => [icon.iconName, icon]));
|
|
10
|
+
if (variant === 'dark') {
|
|
11
|
+
const darkIcon = map[`${name.toLowerCase()}-dark`];
|
|
12
|
+
if (darkIcon)
|
|
13
|
+
return darkIcon;
|
|
14
|
+
}
|
|
15
|
+
const icon = map[name.toLowerCase()];
|
|
16
|
+
if (icon)
|
|
17
|
+
return icon;
|
|
18
|
+
throw new Error(`Icon ${name}, not found`);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.getSocialIcon = getSocialIcon;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import * as index from '../icons/social/index.js';
|
|
3
|
+
|
|
4
|
+
const getSocialIcon = (name, variant = 'light') => {
|
|
5
|
+
const map = Object.fromEntries(Object.values(index).map((icon) => [icon.iconName, icon]));
|
|
6
|
+
if (variant === 'dark') {
|
|
7
|
+
const darkIcon = map[`${name.toLowerCase()}-dark`];
|
|
8
|
+
if (darkIcon)
|
|
9
|
+
return darkIcon;
|
|
10
|
+
}
|
|
11
|
+
const icon = map[name.toLowerCase()];
|
|
12
|
+
if (icon)
|
|
13
|
+
return icon;
|
|
14
|
+
throw new Error(`Icon ${name}, not found`);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { getSocialIcon };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
/* eslint-disable arrow-body-style */
|
|
7
|
+
// This method needs to be wrapped correctly to avoid bundler issues
|
|
8
|
+
// that may update process.env variable via custom configs in customers apps
|
|
9
|
+
const DEFAULT_ICONIC_SPRITE_URL = 'https://iconic.dynamic-static-assets.com/icons/sprite.svg';
|
|
10
|
+
const getIconicSpriteUrl = () => {
|
|
11
|
+
var _a, _b, _c;
|
|
12
|
+
if (typeof process !== 'undefined' && process.env) {
|
|
13
|
+
return ((_c = (_b = (_a = process.env['ICONIC_SPRITE_CDN_URL']) !== null && _a !== void 0 ? _a : process.env['NEXT_PUBLIC_ICONIC_SPRITE_CDN_URL']) !== null && _b !== void 0 ? _b : process.env['REACT_APP_ICONIC_SPRITE_CDN_URLL']) !== null && _c !== void 0 ? _c : DEFAULT_ICONIC_SPRITE_URL);
|
|
14
|
+
}
|
|
15
|
+
return DEFAULT_ICONIC_SPRITE_URL;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.getIconicSpriteUrl = getIconicSpriteUrl;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getIconicSpriteUrl: () => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
/* eslint-disable arrow-body-style */
|
|
3
|
+
// This method needs to be wrapped correctly to avoid bundler issues
|
|
4
|
+
// that may update process.env variable via custom configs in customers apps
|
|
5
|
+
const DEFAULT_ICONIC_SPRITE_URL = 'https://iconic.dynamic-static-assets.com/icons/sprite.svg';
|
|
6
|
+
const getIconicSpriteUrl = () => {
|
|
7
|
+
var _a, _b, _c;
|
|
8
|
+
if (typeof process !== 'undefined' && process.env) {
|
|
9
|
+
return ((_c = (_b = (_a = process.env['ICONIC_SPRITE_CDN_URL']) !== null && _a !== void 0 ? _a : process.env['NEXT_PUBLIC_ICONIC_SPRITE_CDN_URL']) !== null && _b !== void 0 ? _b : process.env['REACT_APP_ICONIC_SPRITE_CDN_URLL']) !== null && _c !== void 0 ? _c : DEFAULT_ICONIC_SPRITE_URL);
|
|
10
|
+
}
|
|
11
|
+
return DEFAULT_ICONIC_SPRITE_URL;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { getIconicSpriteUrl };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './getIconicSpriteUrl';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var Iconic = require('../../Iconic.cjs');
|
|
7
|
+
|
|
8
|
+
const BraveIcon = Iconic.createIconic({
|
|
9
|
+
alt: 'Brave Browser',
|
|
10
|
+
iconName: 'brave',
|
|
11
|
+
sourcePath: 'icons/browsers/brave.svg',
|
|
12
|
+
});
|
|
13
|
+
const ChromeIcon = Iconic.createIconic({
|
|
14
|
+
alt: 'Chrome Browser',
|
|
15
|
+
iconName: 'chrome',
|
|
16
|
+
sourcePath: 'icons/browsers/chrome.svg',
|
|
17
|
+
});
|
|
18
|
+
const EdgeIcon = Iconic.createIconic({
|
|
19
|
+
alt: 'Edge Browser',
|
|
20
|
+
iconName: 'edge',
|
|
21
|
+
sourcePath: 'icons/browsers/edge.svg',
|
|
22
|
+
});
|
|
23
|
+
const FirefoxIcon = Iconic.createIconic({
|
|
24
|
+
alt: 'Firefox Browser',
|
|
25
|
+
iconName: 'firefox',
|
|
26
|
+
sourcePath: 'icons/browsers/firefox.svg',
|
|
27
|
+
});
|
|
28
|
+
const OperaIcon = Iconic.createIconic({
|
|
29
|
+
alt: 'Opera Browser',
|
|
30
|
+
iconName: 'opera',
|
|
31
|
+
sourcePath: 'icons/browsers/opera.svg',
|
|
32
|
+
});
|
|
33
|
+
const SafariIcon = Iconic.createIconic({
|
|
34
|
+
alt: 'Opera Browser',
|
|
35
|
+
iconName: 'safari',
|
|
36
|
+
sourcePath: 'icons/browsers/safari.svg',
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
exports.BraveIcon = BraveIcon;
|
|
40
|
+
exports.ChromeIcon = ChromeIcon;
|
|
41
|
+
exports.EdgeIcon = EdgeIcon;
|
|
42
|
+
exports.FirefoxIcon = FirefoxIcon;
|
|
43
|
+
exports.OperaIcon = OperaIcon;
|
|
44
|
+
exports.SafariIcon = SafariIcon;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Iconic } from '../../Iconic';
|
|
2
|
+
export declare const BraveIcon: Iconic;
|
|
3
|
+
export declare const ChromeIcon: Iconic;
|
|
4
|
+
export declare const EdgeIcon: Iconic;
|
|
5
|
+
export declare const FirefoxIcon: Iconic;
|
|
6
|
+
export declare const OperaIcon: Iconic;
|
|
7
|
+
export declare const SafariIcon: Iconic;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { createIconic } from '../../Iconic.js';
|
|
3
|
+
|
|
4
|
+
const BraveIcon = createIconic({
|
|
5
|
+
alt: 'Brave Browser',
|
|
6
|
+
iconName: 'brave',
|
|
7
|
+
sourcePath: 'icons/browsers/brave.svg',
|
|
8
|
+
});
|
|
9
|
+
const ChromeIcon = createIconic({
|
|
10
|
+
alt: 'Chrome Browser',
|
|
11
|
+
iconName: 'chrome',
|
|
12
|
+
sourcePath: 'icons/browsers/chrome.svg',
|
|
13
|
+
});
|
|
14
|
+
const EdgeIcon = createIconic({
|
|
15
|
+
alt: 'Edge Browser',
|
|
16
|
+
iconName: 'edge',
|
|
17
|
+
sourcePath: 'icons/browsers/edge.svg',
|
|
18
|
+
});
|
|
19
|
+
const FirefoxIcon = createIconic({
|
|
20
|
+
alt: 'Firefox Browser',
|
|
21
|
+
iconName: 'firefox',
|
|
22
|
+
sourcePath: 'icons/browsers/firefox.svg',
|
|
23
|
+
});
|
|
24
|
+
const OperaIcon = createIconic({
|
|
25
|
+
alt: 'Opera Browser',
|
|
26
|
+
iconName: 'opera',
|
|
27
|
+
sourcePath: 'icons/browsers/opera.svg',
|
|
28
|
+
});
|
|
29
|
+
const SafariIcon = createIconic({
|
|
30
|
+
alt: 'Opera Browser',
|
|
31
|
+
iconName: 'safari',
|
|
32
|
+
sourcePath: 'icons/browsers/safari.svg',
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export { BraveIcon, ChromeIcon, EdgeIcon, FirefoxIcon, OperaIcon, SafariIcon };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var Iconic = require('../../Iconic.cjs');
|
|
7
|
+
|
|
8
|
+
const AlgorandIcon = Iconic.createIconic({
|
|
9
|
+
alt: 'Algorand Chain',
|
|
10
|
+
iconName: 'algorand',
|
|
11
|
+
sourcePath: 'icons/chains/algorand.svg',
|
|
12
|
+
});
|
|
13
|
+
const ArbitrumIcon = Iconic.createIconic({
|
|
14
|
+
alt: 'Arbitrum Chain',
|
|
15
|
+
iconName: 'arbitrum',
|
|
16
|
+
sourcePath: 'icons/chains/arbitrum.svg',
|
|
17
|
+
});
|
|
18
|
+
const AuroraIcon = Iconic.createIconic({
|
|
19
|
+
alt: 'Aurora Chain',
|
|
20
|
+
iconName: 'aurora',
|
|
21
|
+
sourcePath: 'icons/chains/aurora.svg',
|
|
22
|
+
});
|
|
23
|
+
const BaseChainIcon = Iconic.createIconic({
|
|
24
|
+
alt: 'Base Chain',
|
|
25
|
+
iconName: 'base',
|
|
26
|
+
sourcePath: 'icons/chains/base.svg',
|
|
27
|
+
});
|
|
28
|
+
const BerachainIcon = Iconic.createIconic({
|
|
29
|
+
alt: 'Berachain Chain',
|
|
30
|
+
iconName: 'berachain',
|
|
31
|
+
sourcePath: 'icons/chains/berachain.svg',
|
|
32
|
+
});
|
|
33
|
+
const BitcoinIcon = Iconic.createIconic({
|
|
34
|
+
alt: 'Bitcoin Chain',
|
|
35
|
+
iconName: 'bitcoin',
|
|
36
|
+
sourcePath: 'icons/chains/bitcoin.svg',
|
|
37
|
+
});
|
|
38
|
+
const BnbIcon = Iconic.createIconic({
|
|
39
|
+
alt: 'BNB Chain',
|
|
40
|
+
iconName: 'bnb',
|
|
41
|
+
sourcePath: 'icons/chains/bnb.svg',
|
|
42
|
+
});
|
|
43
|
+
const CosmosIcon = Iconic.createIconic({
|
|
44
|
+
alt: 'Cosmos Chain',
|
|
45
|
+
iconName: 'cosmos',
|
|
46
|
+
sourcePath: 'icons/chains/cosmos.svg',
|
|
47
|
+
});
|
|
48
|
+
const OsmosisIcon = Iconic.createIconic({
|
|
49
|
+
alt: 'Osmosis Chain',
|
|
50
|
+
iconName: 'osmosis',
|
|
51
|
+
sourcePath: 'icons/chains/osmosis.svg',
|
|
52
|
+
});
|
|
53
|
+
const AxelarIcon = Iconic.createIconic({
|
|
54
|
+
alt: 'Axelar Chain',
|
|
55
|
+
iconName: 'axelar',
|
|
56
|
+
sourcePath: 'icons/chains/axelar.svg',
|
|
57
|
+
});
|
|
58
|
+
const EthereumIcon = Iconic.createIconic({
|
|
59
|
+
alt: 'Ethereum Chain',
|
|
60
|
+
iconName: 'ethereum',
|
|
61
|
+
sourcePath: 'icons/chains/ethereum.svg',
|
|
62
|
+
});
|
|
63
|
+
const GoerliIcon = Iconic.createIconic({
|
|
64
|
+
alt: 'Goerli Chain',
|
|
65
|
+
iconName: 'goerli',
|
|
66
|
+
sourcePath: 'icons/chains/goerli.svg',
|
|
67
|
+
});
|
|
68
|
+
const ZkSyncIcon = Iconic.createIconic({
|
|
69
|
+
alt: 'zkSync Era Chain',
|
|
70
|
+
iconName: 'zkSync',
|
|
71
|
+
sourcePath: 'icons/chains/zkSync.svg',
|
|
72
|
+
});
|
|
73
|
+
const FlowIcon = Iconic.createIconic({
|
|
74
|
+
alt: 'Flow Chain',
|
|
75
|
+
iconName: 'flow',
|
|
76
|
+
sourcePath: 'icons/chains/flow.svg',
|
|
77
|
+
});
|
|
78
|
+
const GnosisIcon = Iconic.createIconic({
|
|
79
|
+
alt: 'Gnosis Chain',
|
|
80
|
+
iconName: 'gnosis',
|
|
81
|
+
sourcePath: 'icons/chains/gnosis.svg',
|
|
82
|
+
});
|
|
83
|
+
const OptimismIcon = Iconic.createIconic({
|
|
84
|
+
alt: 'Optimism Chain',
|
|
85
|
+
iconName: 'optimism',
|
|
86
|
+
sourcePath: 'icons/chains/optimism.svg',
|
|
87
|
+
});
|
|
88
|
+
const PalmIcon = Iconic.createIconic({
|
|
89
|
+
alt: 'Palm Chain',
|
|
90
|
+
iconName: 'palm',
|
|
91
|
+
sourcePath: 'icons/chains/palm.svg',
|
|
92
|
+
});
|
|
93
|
+
const PolygonIcon = Iconic.createIconic({
|
|
94
|
+
alt: 'Polygon Chain',
|
|
95
|
+
iconName: 'polygon',
|
|
96
|
+
sourcePath: 'icons/chains/polygon.svg',
|
|
97
|
+
});
|
|
98
|
+
const SolanaIcon = Iconic.createIconic({
|
|
99
|
+
alt: 'Solana Chain',
|
|
100
|
+
iconName: 'solana',
|
|
101
|
+
sourcePath: 'icons/chains/solana.svg',
|
|
102
|
+
});
|
|
103
|
+
const StarknetIcon = Iconic.createIconic({
|
|
104
|
+
alt: 'Starknet Chain',
|
|
105
|
+
iconName: 'starknet',
|
|
106
|
+
sourcePath: 'icons/chains/starknet.svg',
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
exports.AlgorandIcon = AlgorandIcon;
|
|
110
|
+
exports.ArbitrumIcon = ArbitrumIcon;
|
|
111
|
+
exports.AuroraIcon = AuroraIcon;
|
|
112
|
+
exports.AxelarIcon = AxelarIcon;
|
|
113
|
+
exports.BaseChainIcon = BaseChainIcon;
|
|
114
|
+
exports.BerachainIcon = BerachainIcon;
|
|
115
|
+
exports.BitcoinIcon = BitcoinIcon;
|
|
116
|
+
exports.BnbIcon = BnbIcon;
|
|
117
|
+
exports.CosmosIcon = CosmosIcon;
|
|
118
|
+
exports.EthereumIcon = EthereumIcon;
|
|
119
|
+
exports.FlowIcon = FlowIcon;
|
|
120
|
+
exports.GnosisIcon = GnosisIcon;
|
|
121
|
+
exports.GoerliIcon = GoerliIcon;
|
|
122
|
+
exports.OptimismIcon = OptimismIcon;
|
|
123
|
+
exports.OsmosisIcon = OsmosisIcon;
|
|
124
|
+
exports.PalmIcon = PalmIcon;
|
|
125
|
+
exports.PolygonIcon = PolygonIcon;
|
|
126
|
+
exports.SolanaIcon = SolanaIcon;
|
|
127
|
+
exports.StarknetIcon = StarknetIcon;
|
|
128
|
+
exports.ZkSyncIcon = ZkSyncIcon;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Iconic } from '../../Iconic';
|
|
2
|
+
export declare const AlgorandIcon: Iconic;
|
|
3
|
+
export declare const ArbitrumIcon: Iconic;
|
|
4
|
+
export declare const AuroraIcon: Iconic;
|
|
5
|
+
export declare const BaseChainIcon: Iconic;
|
|
6
|
+
export declare const BerachainIcon: Iconic;
|
|
7
|
+
export declare const BitcoinIcon: Iconic;
|
|
8
|
+
export declare const BnbIcon: Iconic;
|
|
9
|
+
export declare const CosmosIcon: Iconic;
|
|
10
|
+
export declare const OsmosisIcon: Iconic;
|
|
11
|
+
export declare const AxelarIcon: Iconic;
|
|
12
|
+
export declare const EthereumIcon: Iconic;
|
|
13
|
+
export declare const GoerliIcon: Iconic;
|
|
14
|
+
export declare const ZkSyncIcon: Iconic;
|
|
15
|
+
export declare const FlowIcon: Iconic;
|
|
16
|
+
export declare const GnosisIcon: Iconic;
|
|
17
|
+
export declare const OptimismIcon: Iconic;
|
|
18
|
+
export declare const PalmIcon: Iconic;
|
|
19
|
+
export declare const PolygonIcon: Iconic;
|
|
20
|
+
export declare const SolanaIcon: Iconic;
|
|
21
|
+
export declare const StarknetIcon: Iconic;
|