@wise/art 2.5.0 → 2.6.0-beta.10
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/README.md +0 -1
- package/dist/CheckMark-31f05a78.js +39 -0
- package/dist/CheckMark-31f05a78.js.map +1 -0
- package/dist/CheckMark-ea1e541e.mjs +37 -0
- package/dist/CheckMark-ea1e541e.mjs.map +1 -0
- package/dist/Confetti-6061205f.mjs +34 -0
- package/dist/Confetti-6061205f.mjs.map +1 -0
- package/dist/Confetti-8a609ba7.js +36 -0
- package/dist/Confetti-8a609ba7.js.map +1 -0
- package/dist/Flower-15fbd072.mjs +27 -0
- package/dist/Flower-15fbd072.mjs.map +1 -0
- package/dist/Flower-7efb2e8a.js +29 -0
- package/dist/Flower-7efb2e8a.js.map +1 -0
- package/dist/Globe-2ce3125a.mjs +43 -0
- package/dist/Globe-2ce3125a.mjs.map +1 -0
- package/dist/Globe-8ffb1711.js +45 -0
- package/dist/Globe-8ffb1711.js.map +1 -0
- package/dist/Graph-031f065a.js +33 -0
- package/dist/Graph-031f065a.js.map +1 -0
- package/dist/Graph-93475293.mjs +31 -0
- package/dist/Graph-93475293.mjs.map +1 -0
- package/dist/Illustration.css +19 -0
- package/dist/Jars-6a7a4725.mjs +50 -0
- package/dist/Jars-6a7a4725.mjs.map +1 -0
- package/dist/Jars-e516b2e0.js +52 -0
- package/dist/Jars-e516b2e0.js.map +1 -0
- package/dist/Lock-2aa09874.js +43 -0
- package/dist/Lock-2aa09874.js.map +1 -0
- package/dist/Lock-adefc539.mjs +41 -0
- package/dist/Lock-adefc539.mjs.map +1 -0
- package/dist/MagnifyingGlass-11ae91ce.mjs +30 -0
- package/dist/MagnifyingGlass-11ae91ce.mjs.map +1 -0
- package/dist/MagnifyingGlass-c2cb3012.js +32 -0
- package/dist/MagnifyingGlass-c2cb3012.js.map +1 -0
- package/dist/Marble-894fdc66.mjs +42 -0
- package/dist/Marble-894fdc66.mjs.map +1 -0
- package/dist/Marble-b62c2381.js +44 -0
- package/dist/Marble-b62c2381.js.map +1 -0
- package/dist/MarbleCard-5bab8f72.mjs +45 -0
- package/dist/MarbleCard-5bab8f72.mjs.map +1 -0
- package/dist/MarbleCard-89edbd62.js +47 -0
- package/dist/MarbleCard-89edbd62.js.map +1 -0
- package/dist/MultiCurrency-705852bd.js +63 -0
- package/dist/MultiCurrency-705852bd.js.map +1 -0
- package/dist/MultiCurrency-b663ef12.mjs +61 -0
- package/dist/MultiCurrency-b663ef12.mjs.map +1 -0
- package/dist/Plane-2f1801cc.mjs +37 -0
- package/dist/Plane-2f1801cc.mjs.map +1 -0
- package/dist/Plane-ce2952f8.js +39 -0
- package/dist/Plane-ce2952f8.js.map +1 -0
- package/dist/Scene-05003c4d.js +50 -0
- package/dist/Scene-05003c4d.js.map +1 -0
- package/dist/Scene-3ce02f6d.mjs +48 -0
- package/dist/Scene-3ce02f6d.mjs.map +1 -0
- package/dist/common.d.ts +15 -9
- package/dist/common.d.ts.map +1 -0
- package/dist/flags/Flag.d.ts +13 -12
- package/dist/flags/Flag.d.ts.map +1 -0
- package/dist/flags/index.d.ts +3 -2
- package/dist/flags/index.d.ts.map +1 -0
- package/dist/illustrations/Illustration.d.ts +21 -20
- package/dist/illustrations/Illustration.d.ts.map +1 -0
- package/dist/illustrations/index.d.ts +5 -4
- package/dist/illustrations/index.d.ts.map +1 -0
- package/dist/illustrations/metadata.d.ts +69 -68
- package/dist/illustrations/metadata.d.ts.map +1 -0
- package/dist/illustrations3d/Illustration3d.d.ts +11 -0
- package/dist/illustrations3d/Illustration3d.d.ts.map +1 -0
- package/dist/illustrations3d/Scene.d.ts +9 -0
- package/dist/illustrations3d/Scene.d.ts.map +1 -0
- package/dist/illustrations3d/index.d.ts +5 -0
- package/dist/illustrations3d/index.d.ts.map +1 -0
- package/dist/illustrations3d/models/CheckMark.d.ts +4 -0
- package/dist/illustrations3d/models/CheckMark.d.ts.map +1 -0
- package/dist/illustrations3d/models/Confetti.d.ts +4 -0
- package/dist/illustrations3d/models/Confetti.d.ts.map +1 -0
- package/dist/illustrations3d/models/Flower.d.ts +4 -0
- package/dist/illustrations3d/models/Flower.d.ts.map +1 -0
- package/dist/illustrations3d/models/Globe.d.ts +4 -0
- package/dist/illustrations3d/models/Globe.d.ts.map +1 -0
- package/dist/illustrations3d/models/Graph.d.ts +4 -0
- package/dist/illustrations3d/models/Graph.d.ts.map +1 -0
- package/dist/illustrations3d/models/Jars.d.ts +4 -0
- package/dist/illustrations3d/models/Jars.d.ts.map +1 -0
- package/dist/illustrations3d/models/Lock.d.ts +4 -0
- package/dist/illustrations3d/models/Lock.d.ts.map +1 -0
- package/dist/illustrations3d/models/MagnifyingGlass.d.ts +4 -0
- package/dist/illustrations3d/models/MagnifyingGlass.d.ts.map +1 -0
- package/dist/illustrations3d/models/Marble.d.ts +4 -0
- package/dist/illustrations3d/models/Marble.d.ts.map +1 -0
- package/dist/illustrations3d/models/MarbleCard.d.ts +4 -0
- package/dist/illustrations3d/models/MarbleCard.d.ts.map +1 -0
- package/dist/illustrations3d/models/MultiCurrency.d.ts +4 -0
- package/dist/illustrations3d/models/MultiCurrency.d.ts.map +1 -0
- package/dist/illustrations3d/models/Plane.d.ts +4 -0
- package/dist/illustrations3d/models/Plane.d.ts.map +1 -0
- package/dist/illustrations3d/utils.d.ts +9 -0
- package/dist/illustrations3d/utils.d.ts.map +1 -0
- package/dist/index-65e9686e.mjs +325 -0
- package/dist/index-65e9686e.mjs.map +1 -0
- package/dist/index-897e0762.js +332 -0
- package/dist/index-897e0762.js.map +1 -0
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +48 -24
- package/src/common.ts +17 -0
- package/src/flags/Flag.stories.tsx +19 -0
- package/src/flags/Flag.tsx +40 -0
- package/src/flags/index.ts +2 -0
- package/src/illustrations/Illustration.css +27 -0
- package/src/illustrations/Illustration.stories.tsx +33 -0
- package/src/illustrations/Illustration.tsx +95 -0
- package/src/illustrations/index.ts +5 -0
- package/src/illustrations/metadata.ts +141 -0
- package/src/illustrations3d/Illustration3d.stories.tsx +89 -0
- package/src/illustrations3d/Illustration3d.tsx +133 -0
- package/src/illustrations3d/Scene.tsx +54 -0
- package/src/illustrations3d/index.ts +6 -0
- package/src/illustrations3d/models/CheckMark.tsx +30 -0
- package/src/illustrations3d/models/Confetti.tsx +29 -0
- package/src/illustrations3d/models/Flower.tsx +24 -0
- package/src/illustrations3d/models/Globe.tsx +41 -0
- package/src/illustrations3d/models/Graph.tsx +26 -0
- package/src/illustrations3d/models/Jars.tsx +46 -0
- package/src/illustrations3d/models/Lock.tsx +38 -0
- package/src/illustrations3d/models/MagnifyingGlass.tsx +30 -0
- package/src/illustrations3d/models/Marble.tsx +56 -0
- package/src/illustrations3d/models/MarbleCard.tsx +61 -0
- package/src/illustrations3d/models/MultiCurrency.tsx +57 -0
- package/src/illustrations3d/models/Plane.tsx +32 -0
- package/src/illustrations3d/utils.ts +68 -0
- package/src/index.ts +12 -0
- package/dist/flags/Flag.stories.d.ts +0 -6
- package/dist/illustrations/Illustration.stories.d.ts +0 -19
- package/dist/index.modern.mjs +0 -2
- package/dist/index.modern.mjs.map +0 -1
- package/dist/index.module.js +0 -2
- package/dist/index.module.js.map +0 -1
- package/dist/index.umd.js +0 -2
- package/dist/index.umd.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
export { Flag } from './flags';
|
|
2
|
-
export { default as Illustration } from './illustrations';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export
|
|
6
|
-
export type {
|
|
1
|
+
export { Flag } from './flags';
|
|
2
|
+
export { default as Illustration } from './illustrations';
|
|
3
|
+
export { default as Illustration3d } from './illustrations3d';
|
|
4
|
+
export { Assets } from './illustrations';
|
|
5
|
+
export { Sizes } from './common';
|
|
6
|
+
export type { FlagProps } from './flags';
|
|
7
|
+
export type { IllustrationNames, IllustrationProps } from './illustrations';
|
|
8
|
+
export type { Illustration3dNames, Illustration3dProps } from './illustrations3d';
|
|
9
|
+
export { is3dIllustrationSupported } from './illustrations3d';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAElF,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-897e0762.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('react/jsx-runtime');
|
|
6
|
+
require('clsx');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, 'Assets', {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return index.Assets; }
|
|
13
|
+
});
|
|
14
|
+
exports.Flag = index.Flag;
|
|
15
|
+
exports.Illustration = index.Illustration;
|
|
16
|
+
exports.Illustration3d = index.Illustration3d;
|
|
17
|
+
Object.defineProperty(exports, 'Sizes', {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return index.Sizes; }
|
|
20
|
+
});
|
|
21
|
+
exports.is3dIllustrationSupported = index.is3dIllustrationSupported;
|
|
2
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/common.ts","../src/illustrations/Illustration.tsx","../src/illustrations/metadata.ts","../src/flags/Flag.tsx"],"sourcesContent":["export enum Sizes {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\nexport type LargeSize = 'large';\nexport type MediumSize = 'medium';\nexport type SmallSize = 'small';\n\nexport type Descriptors = '1x' | '1.5x' | '2x' | '3x' | '4x';\n","import classNames from 'classnames';\nimport React, { forwardRef, ImgHTMLAttributes } from 'react';\n\nimport { LargeSize, MediumSize, SmallSize, Descriptors, Sizes } from './../common';\nimport { IllustrationNames } from './metadata';\n\n// Picking only a few props from Image element to avoid breaking change\n// as in future underlying element might change\ntype ImgProps = Pick<ImgHTMLAttributes<HTMLImageElement>, 'id' | 'className'>;\n\nexport type IllustrationSizes = LargeSize | MediumSize | SmallSize;\n\nexport type Props = {\n name: IllustrationNames;\n alt: string;\n size?: IllustrationSizes;\n loading?: 'eager' | 'lazy';\n disablePadding?: boolean;\n} & ImgProps;\n\nconst imageSizes = {\n [Sizes.SMALL]: 200,\n [Sizes.MEDIUM]: 300,\n [Sizes.LARGE]: 500,\n};\n\nconst Illustration = forwardRef<HTMLImageElement, Props>(\n (\n {\n id,\n name,\n alt,\n loading = 'eager',\n className,\n size = Sizes.MEDIUM,\n disablePadding = false,\n }: Props,\n ref,\n ) => {\n const { SMALL, MEDIUM } = Sizes;\n\n return name ? (\n <picture>\n {size === Sizes.LARGE || size === Sizes.MEDIUM ? (\n <>\n <source\n width={imageSizes[SMALL]}\n height={imageSizes[SMALL]}\n media=\"(max-width: 575px)\"\n srcSet={`${defineSrc(name, SMALL, '1x')}, ${defineSrc(name, SMALL, '2x')} 2x`}\n />\n {size !== Sizes.MEDIUM ? (\n <source\n width={imageSizes[MEDIUM]}\n height={imageSizes[MEDIUM]}\n media=\"(max-width: 992px)\"\n srcSet={`${defineSrc(name, MEDIUM, '1x')}, ${defineSrc(name, MEDIUM, '2x')} 2x`}\n />\n ) : null}\n </>\n ) : null}\n\n <img\n id={id}\n ref={ref}\n alt={alt ?? name.replace('-', ' ')}\n data-testid={`wds-${name}-illustration`}\n className={classNames(\n 'wds-illustration',\n `wds-illustration-${name}`,\n { 'wds-illustration-padding': !disablePadding },\n className,\n )}\n loading={loading}\n src={defineSrc(name, size, '1x')}\n srcSet={`${defineSrc(name, size, '2x')} 2x`}\n width={imageSizes[size]}\n height={imageSizes[size]}\n />\n </picture>\n ) : null;\n },\n);\n\nfunction defineSrc(illustration: string, size: IllustrationSizes, descriptor: Descriptors) {\n return `https://wise.com/web-art/assets/illustrations/${illustration}-${size}@${descriptor}.webp`;\n}\n\nexport default Illustration;\n","/*\n *\n * DON'T MODIFY THIS FILE IT'S AUTO GENERATED\n * See: `scripts/generate-i10s-metadata.mjs`\n *\n */\n\nexport enum Assets {\n BELL = 'bell',\n BRIEFCASE = 'briefcase',\n BUSINESS_CARD = 'business-card',\n CALENDAR = 'calendar',\n CHECK_MARK = 'check-mark',\n CLOSED_WINDOW = 'closed-window',\n COIN_PILE_DOWN = 'coin-pile-down',\n COIN_PILE_UP = 'coin-pile-up',\n CONFETTI = 'confetti',\n CONSTRUCTION_FENCE = 'construction-fence',\n CONVERT = 'convert',\n COOKIE = 'cookie',\n DIGITAL_CARD_2 = 'digital-card-2',\n DIGITAL_CARD = 'digital-card',\n DOCUMENTS = 'documents',\n DOOR = 'door',\n ECO_CARD = 'eco-card',\n ELECTRIC_PLUG = 'electric-plug',\n EMAIL_SUCCESS = 'email-success',\n EMAIL = 'email',\n EXCLAMATION_MARK = 'exclamation-mark',\n FLAG = 'flag',\n FLOWER = 'flower',\n GEAR = 'gear',\n GLOBE = 'globe',\n GRAPH = 'graph',\n HEART_2 = 'heart-2',\n HEART_3 = 'heart-3',\n HEART_4 = 'heart-4',\n HEART_5 = 'heart-5',\n HEART = 'heart',\n HOUSE = 'house',\n ID_CARD = 'id-card',\n INFINITE = 'infinite',\n INVITE_LETTER = 'invite-letter',\n JARS = 'jars',\n KEY = 'key',\n LIGHT_BULB = 'light-bulb',\n LOCK = 'lock',\n MAGNIFYING_GLASS = 'magnifying-glass',\n MAP = 'map',\n MARBLE_CARD_BUSINESS = 'marble-card-business',\n MARBLE_CARD = 'marble-card',\n MARBLE = 'marble',\n MEGAPHONE = 'megaphone',\n MULTI_CURRENCY = 'multi-currency',\n ONE_INVITE_LETTER_OPENED = 'one-invite-letter-opened',\n PALM_TREE = 'palm-tree',\n PERCENTAGE = 'percentage',\n PERSONAL_CARD = 'personal-card',\n PHONES = 'phones',\n PIE_CHART = 'pie-chart',\n PLANE_2 = 'plane-2',\n PLANE = 'plane',\n PUZZLE_PIECES = 'puzzle-pieces',\n QUESTION_MARK = 'question-mark',\n RECEIVE = 'receive',\n REMINDER_LETTER = 'reminder-letter',\n SAND_TIMER = 'sand-timer',\n SHOPPING_BAG = 'shopping-bag',\n SKIP_AUTHENTICATION = 'skip-authentication',\n SPEECH_BUBBLE = 'speech-bubble',\n TOOL = 'tool',\n TWO_INVITE_LETTERS_OPENED = 'two-invite-letters-opened',\n WALLET = 'wallet',\n}\n\nexport type IllustrationNames =\n | 'bell'\n | 'briefcase'\n | 'business-card'\n | 'calendar'\n | 'check-mark'\n | 'closed-window'\n | 'coin-pile-down'\n | 'coin-pile-up'\n | 'confetti'\n | 'construction-fence'\n | 'convert'\n | 'cookie'\n | 'digital-card-2'\n | 'digital-card'\n | 'documents'\n | 'door'\n | 'eco-card'\n | 'electric-plug'\n | 'email-success'\n | 'email'\n | 'exclamation-mark'\n | 'flag'\n | 'flower'\n | 'gear'\n | 'globe'\n | 'graph'\n | 'heart-2'\n | 'heart-3'\n | 'heart-4'\n | 'heart-5'\n | 'heart'\n | 'house'\n | 'id-card'\n | 'infinite'\n | 'invite-letter'\n | 'jars'\n | 'key'\n | 'light-bulb'\n | 'lock'\n | 'magnifying-glass'\n | 'map'\n | 'marble-card-business'\n | 'marble-card'\n | 'marble'\n | 'megaphone'\n | 'multi-currency'\n | 'one-invite-letter-opened'\n | 'palm-tree'\n | 'percentage'\n | 'personal-card'\n | 'phones'\n | 'pie-chart'\n | 'plane-2'\n | 'plane'\n | 'puzzle-pieces'\n | 'question-mark'\n | 'receive'\n | 'reminder-letter'\n | 'sand-timer'\n | 'shopping-bag'\n | 'skip-authentication'\n | 'speech-bubble'\n | 'tool'\n | 'two-invite-letters-opened'\n | 'wallet';\n","import { useEffect, useState } from 'react';\n\nexport interface FlagProps {\n /**\n * Two-letter country code (ISO 3166-1 alpha-2) or three-letter currency code (ISO 4217).\n */\n code: string;\n\n /**\n * Width and height to reserve for the underlying image, in pixels. A detailed variant is shown from 150px and above.\n */\n intrinsicSize?: number;\n}\n\nconst unknownFlagName = 'wise';\n\nexport const Flag = ({ code, intrinsicSize = 64 }: FlagProps) => {\n const [fallback, setFallback] = useState<'simple' | 'unknown' | null>(null);\n useEffect(() => {\n setFallback(null);\n }, [code]);\n\n const detailed = intrinsicSize >= 150;\n const name =\n fallback !== 'unknown'\n ? `${code.toLowerCase()}${fallback == null && detailed ? '-detailed' : ''}`\n : unknownFlagName;\n\n return (\n <img\n src={`https://wise.com/web-art/assets/flags/${name}.svg`}\n alt=\"\"\n width={intrinsicSize}\n height={intrinsicSize}\n onError={() => {\n setFallback((prev) => (prev == null && detailed ? 'simple' : 'unknown'));\n }}\n />\n );\n};\n"],"names":["Sizes","_imageSizes","Assets","imageSizes","SMALL","MEDIUM","LARGE","Illustration","forwardRef","ref","id","name","_ref","alt","loading","_ref$loading","className","size","_ref$size","disablePadding","_ref$disablePadding","React","createElement","Fragment","width","height","media","srcSet","defineSrc","replace","classNames","src","illustration","descriptor","code","intrinsicSize","_ref$intrinsicSize","_useState","useState","fallback","setFallback","useEffect","detailed","toLowerCase","onError","prev"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/art",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0-beta.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React library for art elements in UI",
|
|
6
6
|
"homepage": "https://github.com/transferwise/web-art#readme",
|
|
@@ -8,16 +8,26 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/transferwise/web-art.git"
|
|
10
10
|
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
"author": "Wise Payments Ltd.",
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.mjs",
|
|
17
|
+
"require": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./dist/Illustration.css": "./dist/Illustration.css"
|
|
20
|
+
},
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
16
23
|
"files": [
|
|
17
|
-
"dist"
|
|
24
|
+
"dist/",
|
|
25
|
+
"src/",
|
|
26
|
+
"!**/*.tsbuildinfo"
|
|
18
27
|
],
|
|
19
28
|
"scripts": {
|
|
20
29
|
"setup": "yarn && yarn build",
|
|
30
|
+
"load-3d-i10s": "node ./scripts/load-3d-i10s.mjs",
|
|
21
31
|
"load-i10s": "copyfiles -u 3 node_modules/wise-atoms/illustrations/**/*.png temp",
|
|
22
32
|
"load-flags": "yarn load-country-flags && yarn load-currency-flags && yarn transform-flags && yarn convert-flags-svg-to-png",
|
|
23
33
|
"load-country-flags": "copyfiles -u 3 node_modules/wise-atoms/flags/*.svg s3-bucket/flags && node ./scripts/generate-country-flags.mjs",
|
|
@@ -26,44 +36,56 @@
|
|
|
26
36
|
"convert-flags-svg-to-png": "node ./scripts/convert-flags-svg-to-png.mjs",
|
|
27
37
|
"convert-i10s-png-to-webp": "rm -rf s3-bucket/illustrations/ && copyfiles --f node_modules/wise-atoms/illustrations/**/*.png s3-bucket/illustrations && node ./scripts/convert-png-to-webp.mjs",
|
|
28
38
|
"generate-i10s-metadata": "node ./scripts/generate-i10s-metadata.mjs && eslint 'src/illustrations/metadata.ts' --fix",
|
|
29
|
-
"bundle": "rm -rf dist &&
|
|
39
|
+
"bundle": "rm -rf dist && rollup --config --sourcemap && cpx src/illustrations/Illustration.css dist/",
|
|
30
40
|
"cleanup": "rm -rf temp",
|
|
31
|
-
"build": "yarn load-i10s && yarn convert-i10s-png-to-webp && yarn generate-i10s-metadata && yarn load-flags && yarn bundle && yarn cleanup",
|
|
41
|
+
"build": "yarn load-i10s && yarn load-3d-i10s && yarn convert-i10s-png-to-webp && yarn generate-i10s-metadata && yarn load-flags && yarn bundle && yarn cleanup",
|
|
32
42
|
"start": "storybook dev -p 3001",
|
|
33
43
|
"dev": "yarn start",
|
|
34
|
-
"test": "release-to-github-with-changelog-pre-release-checks",
|
|
44
|
+
"test": "echo 'release-to-github-with-changelog-pre-release-checks'",
|
|
35
45
|
"lint-fix": "eslint 'src/**/*.{js,ts,tsx}' 'scripts/*.{mjs,js,ts,tsx}' --fix",
|
|
36
|
-
"build-docs": "storybook build -o docs"
|
|
37
|
-
|
|
46
|
+
"build-docs": "storybook build -o docs && touch ./docs/.nojekyll"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@babel/runtime": "^7.22.15",
|
|
50
|
+
"clsx": "^2.0.0",
|
|
51
|
+
"three": "^0.154.0",
|
|
52
|
+
"@react-three/fiber": "^8.13.5",
|
|
53
|
+
"@react-three/drei": "^9.78.2"
|
|
38
54
|
},
|
|
39
55
|
"devDependencies": {
|
|
40
|
-
"@babel/
|
|
41
|
-
"@babel/
|
|
42
|
-
"@babel/preset-
|
|
56
|
+
"@babel/core": "^7.22.15",
|
|
57
|
+
"@babel/plugin-transform-runtime": "^7.22.15",
|
|
58
|
+
"@babel/preset-env": "^7.22.15",
|
|
59
|
+
"@babel/preset-react": "^7.22.15",
|
|
60
|
+
"@babel/preset-typescript": "^7.22.15",
|
|
61
|
+
"@rollup/plugin-babel": "^6.0.3",
|
|
62
|
+
"@rollup/plugin-typescript": "^11.1.3",
|
|
43
63
|
"@storybook/addon-essentials": "^7.4.0",
|
|
44
64
|
"@storybook/react": "^7.4.0",
|
|
45
65
|
"@storybook/react-vite": "^7.4.0",
|
|
46
66
|
"@transferwise/eslint-config": "^8.0.0",
|
|
67
|
+
"@tsconfig/recommended": "^1.0.2",
|
|
68
|
+
"@types/babel__core": "^7.20.1",
|
|
47
69
|
"@types/glob": "^8.1.0",
|
|
48
70
|
"@types/imagemin": "^8.0.1",
|
|
49
71
|
"@types/imagemin-webp": "^7.0.0",
|
|
50
|
-
"@types/jest": "^28.1.
|
|
72
|
+
"@types/jest": "^28.1.8",
|
|
51
73
|
"@types/jsdom": "^21.1.2",
|
|
52
74
|
"@types/react": "^18.2.21",
|
|
53
75
|
"@types/react-dom": "^18.2.7",
|
|
54
|
-
"
|
|
76
|
+
"@types/three": "^0.154.0",
|
|
77
|
+
"babel-plugin-optimize-clsx": "^2.6.2",
|
|
55
78
|
"copyfiles": "^2.4.1",
|
|
56
79
|
"cpx": "^1.5.0",
|
|
57
|
-
"deploy-to-github-pages": "^1.0.1",
|
|
58
80
|
"eslint": "^8.48.0",
|
|
59
|
-
"glob": "^8.0
|
|
81
|
+
"glob": "^8.1.0",
|
|
60
82
|
"imagemin": "^8.0.1",
|
|
61
83
|
"imagemin-webp": "^7.0.0",
|
|
84
|
+
"gltf-pipeline": "^4.1.0",
|
|
62
85
|
"jest": "^28.1.3",
|
|
63
86
|
"jest-environment-jsdom": "^28.1.3",
|
|
64
|
-
"jsdom": "~21.1.
|
|
65
|
-
"
|
|
66
|
-
"prettier": "^2.7.1",
|
|
87
|
+
"jsdom": "~21.1.2",
|
|
88
|
+
"prettier": "^2.8.8",
|
|
67
89
|
"react": "^18.2.0",
|
|
68
90
|
"react-dom": "^18.2.0",
|
|
69
91
|
"release-to-github-with-changelog": "^1.2.4",
|
|
@@ -72,15 +94,17 @@
|
|
|
72
94
|
"ts-node": "10.9.1",
|
|
73
95
|
"typescript": "^4.9.5",
|
|
74
96
|
"vite": "^4.4.9",
|
|
75
|
-
"wise-atoms": "git+ssh://git@github.com:transferwise/wise-atoms.git#
|
|
97
|
+
"wise-atoms": "git+ssh://git@github.com:transferwise/wise-atoms.git#c2683d557cf6f7b4f6226ea8f0e67bc797e7fb2e"
|
|
76
98
|
},
|
|
77
99
|
"peerDependencies": {
|
|
78
|
-
"classnames": "^2.3",
|
|
79
100
|
"react": ">=17",
|
|
80
101
|
"react-dom": ">=17"
|
|
81
102
|
},
|
|
82
103
|
"prettier": "@transferwise/eslint-config/.prettierrc.js",
|
|
83
104
|
"publishConfig": {
|
|
84
105
|
"access": "public"
|
|
106
|
+
},
|
|
107
|
+
"resolutions": {
|
|
108
|
+
"jackspeak": "2.1.1"
|
|
85
109
|
}
|
|
86
110
|
}
|
package/src/common.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export enum Sizes {
|
|
2
|
+
SMALL = 'small',
|
|
3
|
+
MEDIUM = 'medium',
|
|
4
|
+
LARGE = 'large',
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const ImageSizes = {
|
|
8
|
+
[Sizes.SMALL]: 200,
|
|
9
|
+
[Sizes.MEDIUM]: 300,
|
|
10
|
+
[Sizes.LARGE]: 500,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type LargeSize = 'large';
|
|
14
|
+
export type MediumSize = 'medium';
|
|
15
|
+
export type SmallSize = 'small';
|
|
16
|
+
|
|
17
|
+
export type Descriptors = '1x' | '1.5x' | '2x' | '3x' | '4x';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { Flag } from './Flag';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Flag> = {
|
|
6
|
+
component: Flag,
|
|
7
|
+
title: 'Flag',
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
|
|
11
|
+
type Story = StoryObj<typeof Flag>;
|
|
12
|
+
|
|
13
|
+
export const Basic: Story = {
|
|
14
|
+
render: (args) => <Flag {...args} />,
|
|
15
|
+
args: {
|
|
16
|
+
code: 'GBP',
|
|
17
|
+
intrinsicSize: 64,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface FlagProps {
|
|
4
|
+
/**
|
|
5
|
+
* Two-letter country code (ISO 3166-1 alpha-2) or three-letter currency code (ISO 4217).
|
|
6
|
+
*/
|
|
7
|
+
code: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Width and height to reserve for the underlying image, in pixels. A detailed variant is shown from 150px and above.
|
|
11
|
+
*/
|
|
12
|
+
intrinsicSize?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const unknownFlagName = 'wise';
|
|
16
|
+
|
|
17
|
+
export const Flag = ({ code, intrinsicSize = 64 }: FlagProps) => {
|
|
18
|
+
const [fallback, setFallback] = useState<'simple' | 'unknown' | null>(null);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
setFallback(null);
|
|
21
|
+
}, [code]);
|
|
22
|
+
|
|
23
|
+
const detailed = intrinsicSize >= 150;
|
|
24
|
+
const name =
|
|
25
|
+
fallback !== 'unknown'
|
|
26
|
+
? `${code.toLowerCase()}${fallback == null && detailed ? '-detailed' : ''}`
|
|
27
|
+
: unknownFlagName;
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<img
|
|
31
|
+
src={`https://wise.com/web-art/assets/flags/${name}.svg`}
|
|
32
|
+
alt=""
|
|
33
|
+
width={intrinsicSize}
|
|
34
|
+
height={intrinsicSize}
|
|
35
|
+
onError={() => {
|
|
36
|
+
setFallback((prev) => (prev == null && detailed ? 'simple' : 'unknown'));
|
|
37
|
+
}}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* Prevent image overflow viewport or container element */
|
|
2
|
+
img.wds-illustration {
|
|
3
|
+
max-width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.wds-illustration-padding {
|
|
7
|
+
padding: 24px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.wds-illustration-3d {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.wds-illustration-3d-small {
|
|
15
|
+
width: 200px;
|
|
16
|
+
height: 200px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.wds-illustration-3d-medium {
|
|
20
|
+
width: 300px;
|
|
21
|
+
height: 300px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.wds-illustration-3d-large {
|
|
25
|
+
width: 500px;
|
|
26
|
+
height: 500px;
|
|
27
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* eslint-disable react/forbid-dom-props */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import Illustration, { Props as IllustrationProps } from './Illustration';
|
|
5
|
+
import { Assets, IllustrationNames } from './metadata';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
component: Illustration,
|
|
9
|
+
title: 'Illustration',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const All = () => {
|
|
13
|
+
const assetNames = Object.values(Assets);
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<div>Total number of illustrations: {assetNames.length}</div>
|
|
17
|
+
{Object.values(Assets).map((assetName) => (
|
|
18
|
+
<p key={assetName}>
|
|
19
|
+
Asset: <code>{assetName}</code>
|
|
20
|
+
<Illustration alt={assetName} key={assetName} name={assetName as IllustrationNames} />
|
|
21
|
+
</p>
|
|
22
|
+
))}
|
|
23
|
+
</>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const Individual = ({ name = Assets.CHECK_MARK, ...props }: IllustrationProps) => {
|
|
28
|
+
return (
|
|
29
|
+
<>
|
|
30
|
+
<Illustration name={name} {...props} />
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
type LargeSize,
|
|
6
|
+
type MediumSize,
|
|
7
|
+
type SmallSize,
|
|
8
|
+
type Descriptors,
|
|
9
|
+
Sizes,
|
|
10
|
+
} from './../common';
|
|
11
|
+
import type { IllustrationNames } from './metadata';
|
|
12
|
+
|
|
13
|
+
// Picking only a few props from Image element to avoid breaking change
|
|
14
|
+
// as in future underlying element might change
|
|
15
|
+
type ImgProps = Pick<React.ImgHTMLAttributes<HTMLImageElement>, 'id' | 'className'>;
|
|
16
|
+
|
|
17
|
+
export type IllustrationSizes = LargeSize | MediumSize | SmallSize;
|
|
18
|
+
|
|
19
|
+
export type Props = {
|
|
20
|
+
name: IllustrationNames;
|
|
21
|
+
alt: string;
|
|
22
|
+
size?: IllustrationSizes;
|
|
23
|
+
loading?: 'eager' | 'lazy';
|
|
24
|
+
disablePadding?: boolean;
|
|
25
|
+
} & ImgProps;
|
|
26
|
+
|
|
27
|
+
const imageSizes = {
|
|
28
|
+
[Sizes.SMALL]: 200,
|
|
29
|
+
[Sizes.MEDIUM]: 300,
|
|
30
|
+
[Sizes.LARGE]: 500,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const Illustration = forwardRef<HTMLImageElement, Props>(
|
|
34
|
+
(
|
|
35
|
+
{
|
|
36
|
+
id,
|
|
37
|
+
name,
|
|
38
|
+
alt,
|
|
39
|
+
loading = 'eager',
|
|
40
|
+
className,
|
|
41
|
+
size = Sizes.MEDIUM,
|
|
42
|
+
disablePadding = false,
|
|
43
|
+
}: Props,
|
|
44
|
+
ref,
|
|
45
|
+
) => {
|
|
46
|
+
const { SMALL, MEDIUM } = Sizes;
|
|
47
|
+
|
|
48
|
+
return name ? (
|
|
49
|
+
<picture>
|
|
50
|
+
{size === Sizes.LARGE || size === Sizes.MEDIUM ? (
|
|
51
|
+
<>
|
|
52
|
+
<source
|
|
53
|
+
width={imageSizes[SMALL]}
|
|
54
|
+
height={imageSizes[SMALL]}
|
|
55
|
+
media="(max-width: 575px)"
|
|
56
|
+
srcSet={`${defineSrc(name, SMALL, '1x')}, ${defineSrc(name, SMALL, '2x')} 2x`}
|
|
57
|
+
/>
|
|
58
|
+
{size !== Sizes.MEDIUM ? (
|
|
59
|
+
<source
|
|
60
|
+
width={imageSizes[MEDIUM]}
|
|
61
|
+
height={imageSizes[MEDIUM]}
|
|
62
|
+
media="(max-width: 992px)"
|
|
63
|
+
srcSet={`${defineSrc(name, MEDIUM, '1x')}, ${defineSrc(name, MEDIUM, '2x')} 2x`}
|
|
64
|
+
/>
|
|
65
|
+
) : null}
|
|
66
|
+
</>
|
|
67
|
+
) : null}
|
|
68
|
+
|
|
69
|
+
<img
|
|
70
|
+
id={id}
|
|
71
|
+
ref={ref}
|
|
72
|
+
alt={alt ?? name.replace('-', ' ')}
|
|
73
|
+
data-testid={`wds-${name}-illustration`}
|
|
74
|
+
className={clsx(
|
|
75
|
+
'wds-illustration',
|
|
76
|
+
`wds-illustration-${name}`,
|
|
77
|
+
{ 'wds-illustration-padding': !disablePadding },
|
|
78
|
+
className,
|
|
79
|
+
)}
|
|
80
|
+
loading={loading}
|
|
81
|
+
src={defineSrc(name, size, '1x')}
|
|
82
|
+
srcSet={`${defineSrc(name, size, '2x')} 2x`}
|
|
83
|
+
width={imageSizes[size]}
|
|
84
|
+
height={imageSizes[size]}
|
|
85
|
+
/>
|
|
86
|
+
</picture>
|
|
87
|
+
) : null;
|
|
88
|
+
},
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
function defineSrc(illustration: string, size: IllustrationSizes, descriptor: Descriptors) {
|
|
92
|
+
return `https://wise.com/web-art/assets/illustrations/${illustration}-${size}@${descriptor}.webp`;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export default Illustration;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* DON'T MODIFY THIS FILE IT'S AUTO GENERATED
|
|
4
|
+
* See: `scripts/generate-i10s-metadata.mjs`
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export enum Assets {
|
|
9
|
+
BELL = 'bell',
|
|
10
|
+
BRIEFCASE = 'briefcase',
|
|
11
|
+
BUSINESS_CARD = 'business-card',
|
|
12
|
+
CALENDAR = 'calendar',
|
|
13
|
+
CHECK_MARK = 'check-mark',
|
|
14
|
+
CLOSED_WINDOW = 'closed-window',
|
|
15
|
+
COIN_PILE_DOWN = 'coin-pile-down',
|
|
16
|
+
COIN_PILE_UP = 'coin-pile-up',
|
|
17
|
+
CONFETTI = 'confetti',
|
|
18
|
+
CONSTRUCTION_FENCE = 'construction-fence',
|
|
19
|
+
CONVERT = 'convert',
|
|
20
|
+
COOKIE = 'cookie',
|
|
21
|
+
DIGITAL_CARD_2 = 'digital-card-2',
|
|
22
|
+
DIGITAL_CARD = 'digital-card',
|
|
23
|
+
DOCUMENTS = 'documents',
|
|
24
|
+
DOOR = 'door',
|
|
25
|
+
ECO_CARD = 'eco-card',
|
|
26
|
+
ELECTRIC_PLUG = 'electric-plug',
|
|
27
|
+
EMAIL_SUCCESS = 'email-success',
|
|
28
|
+
EMAIL = 'email',
|
|
29
|
+
EXCLAMATION_MARK = 'exclamation-mark',
|
|
30
|
+
FLAG = 'flag',
|
|
31
|
+
FLOWER = 'flower',
|
|
32
|
+
GEAR = 'gear',
|
|
33
|
+
GLOBE = 'globe',
|
|
34
|
+
GRAPH = 'graph',
|
|
35
|
+
HEART_2 = 'heart-2',
|
|
36
|
+
HEART_3 = 'heart-3',
|
|
37
|
+
HEART_4 = 'heart-4',
|
|
38
|
+
HEART_5 = 'heart-5',
|
|
39
|
+
HEART = 'heart',
|
|
40
|
+
HOUSE = 'house',
|
|
41
|
+
ID_CARD = 'id-card',
|
|
42
|
+
INFINITE = 'infinite',
|
|
43
|
+
INVITE_LETTER = 'invite-letter',
|
|
44
|
+
JARS = 'jars',
|
|
45
|
+
KEY = 'key',
|
|
46
|
+
LIGHT_BULB = 'light-bulb',
|
|
47
|
+
LOCK = 'lock',
|
|
48
|
+
MAGNIFYING_GLASS = 'magnifying-glass',
|
|
49
|
+
MAP = 'map',
|
|
50
|
+
MARBLE_CARD_BUSINESS = 'marble-card-business',
|
|
51
|
+
MARBLE_CARD = 'marble-card',
|
|
52
|
+
MARBLE = 'marble',
|
|
53
|
+
MEGAPHONE = 'megaphone',
|
|
54
|
+
MULTI_CURRENCY = 'multi-currency',
|
|
55
|
+
ONE_INVITE_LETTER_OPENED = 'one-invite-letter-opened',
|
|
56
|
+
PALM_TREE = 'palm-tree',
|
|
57
|
+
PERCENTAGE = 'percentage',
|
|
58
|
+
PERSONAL_CARD = 'personal-card',
|
|
59
|
+
PHONES = 'phones',
|
|
60
|
+
PIE_CHART = 'pie-chart',
|
|
61
|
+
PLANE_2 = 'plane-2',
|
|
62
|
+
PLANE = 'plane',
|
|
63
|
+
PUZZLE_PIECES = 'puzzle-pieces',
|
|
64
|
+
QUESTION_MARK = 'question-mark',
|
|
65
|
+
RECEIVE = 'receive',
|
|
66
|
+
REMINDER_LETTER = 'reminder-letter',
|
|
67
|
+
SAND_TIMER = 'sand-timer',
|
|
68
|
+
SHOPPING_BAG = 'shopping-bag',
|
|
69
|
+
SKIP_AUTHENTICATION = 'skip-authentication',
|
|
70
|
+
SPEECH_BUBBLE = 'speech-bubble',
|
|
71
|
+
TOOL = 'tool',
|
|
72
|
+
TWO_INVITE_LETTERS_OPENED = 'two-invite-letters-opened',
|
|
73
|
+
WALLET = 'wallet',
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type IllustrationNames =
|
|
77
|
+
| 'bell'
|
|
78
|
+
| 'briefcase'
|
|
79
|
+
| 'business-card'
|
|
80
|
+
| 'calendar'
|
|
81
|
+
| 'check-mark'
|
|
82
|
+
| 'closed-window'
|
|
83
|
+
| 'coin-pile-down'
|
|
84
|
+
| 'coin-pile-up'
|
|
85
|
+
| 'confetti'
|
|
86
|
+
| 'construction-fence'
|
|
87
|
+
| 'convert'
|
|
88
|
+
| 'cookie'
|
|
89
|
+
| 'digital-card-2'
|
|
90
|
+
| 'digital-card'
|
|
91
|
+
| 'documents'
|
|
92
|
+
| 'door'
|
|
93
|
+
| 'eco-card'
|
|
94
|
+
| 'electric-plug'
|
|
95
|
+
| 'email-success'
|
|
96
|
+
| 'email'
|
|
97
|
+
| 'exclamation-mark'
|
|
98
|
+
| 'flag'
|
|
99
|
+
| 'flower'
|
|
100
|
+
| 'gear'
|
|
101
|
+
| 'globe'
|
|
102
|
+
| 'graph'
|
|
103
|
+
| 'heart-2'
|
|
104
|
+
| 'heart-3'
|
|
105
|
+
| 'heart-4'
|
|
106
|
+
| 'heart-5'
|
|
107
|
+
| 'heart'
|
|
108
|
+
| 'house'
|
|
109
|
+
| 'id-card'
|
|
110
|
+
| 'infinite'
|
|
111
|
+
| 'invite-letter'
|
|
112
|
+
| 'jars'
|
|
113
|
+
| 'key'
|
|
114
|
+
| 'light-bulb'
|
|
115
|
+
| 'lock'
|
|
116
|
+
| 'magnifying-glass'
|
|
117
|
+
| 'map'
|
|
118
|
+
| 'marble-card-business'
|
|
119
|
+
| 'marble-card'
|
|
120
|
+
| 'marble'
|
|
121
|
+
| 'megaphone'
|
|
122
|
+
| 'multi-currency'
|
|
123
|
+
| 'one-invite-letter-opened'
|
|
124
|
+
| 'palm-tree'
|
|
125
|
+
| 'percentage'
|
|
126
|
+
| 'personal-card'
|
|
127
|
+
| 'phones'
|
|
128
|
+
| 'pie-chart'
|
|
129
|
+
| 'plane-2'
|
|
130
|
+
| 'plane'
|
|
131
|
+
| 'puzzle-pieces'
|
|
132
|
+
| 'question-mark'
|
|
133
|
+
| 'receive'
|
|
134
|
+
| 'reminder-letter'
|
|
135
|
+
| 'sand-timer'
|
|
136
|
+
| 'shopping-bag'
|
|
137
|
+
| 'skip-authentication'
|
|
138
|
+
| 'speech-bubble'
|
|
139
|
+
| 'tool'
|
|
140
|
+
| 'two-invite-letters-opened'
|
|
141
|
+
| 'wallet';
|