@wise/art 2.29.0 → 2.30.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.
Files changed (78) hide show
  1. package/README.md +16 -2
  2. package/dist/{CheckMark-rvEWLRq0.esm.js → CheckMark-BQNmIm2B.esm.js} +2 -2
  3. package/dist/{CheckMark-rvEWLRq0.esm.js.map → CheckMark-BQNmIm2B.esm.js.map} +1 -1
  4. package/dist/{CheckMark-BPrdh9Yt.js → CheckMark-D3EaG2T_.js} +2 -2
  5. package/dist/{CheckMark-BPrdh9Yt.js.map → CheckMark-D3EaG2T_.js.map} +1 -1
  6. package/dist/{Confetti-BF1v0OJk.esm.js → Confetti-CWZxburd.esm.js} +2 -2
  7. package/dist/{Confetti-BF1v0OJk.esm.js.map → Confetti-CWZxburd.esm.js.map} +1 -1
  8. package/dist/{Confetti-BCZWydPM.js → Confetti-Cw1UBA32.js} +2 -2
  9. package/dist/{Confetti-BCZWydPM.js.map → Confetti-Cw1UBA32.js.map} +1 -1
  10. package/dist/{Flower-BS56WNvp.esm.js → Flower-BiO5fjiT.esm.js} +2 -2
  11. package/dist/{Flower-BS56WNvp.esm.js.map → Flower-BiO5fjiT.esm.js.map} +1 -1
  12. package/dist/{Flower-4xUqkfW9.js → Flower-DqmGIwzj.js} +2 -2
  13. package/dist/{Flower-4xUqkfW9.js.map → Flower-DqmGIwzj.js.map} +1 -1
  14. package/dist/{Globe-DkoSAfVS.esm.js → Globe-CYz_m8qY.esm.js} +2 -2
  15. package/dist/{Globe-DkoSAfVS.esm.js.map → Globe-CYz_m8qY.esm.js.map} +1 -1
  16. package/dist/{Globe-B0GciImK.js → Globe-DsFAGK9m.js} +2 -2
  17. package/dist/{Globe-B0GciImK.js.map → Globe-DsFAGK9m.js.map} +1 -1
  18. package/dist/{Graph-C6HemiNj.esm.js → Graph-CFMO57zZ.esm.js} +2 -2
  19. package/dist/{Graph-C6HemiNj.esm.js.map → Graph-CFMO57zZ.esm.js.map} +1 -1
  20. package/dist/{Graph-BpBqjCfO.js → Graph-oX2v2pa8.js} +2 -2
  21. package/dist/{Graph-BpBqjCfO.js.map → Graph-oX2v2pa8.js.map} +1 -1
  22. package/dist/{Interest-ajjCA2ag.esm.js → Interest-CgYb6-wb.esm.js} +2 -2
  23. package/dist/{Interest-ajjCA2ag.esm.js.map → Interest-CgYb6-wb.esm.js.map} +1 -1
  24. package/dist/{Interest-bo-lZHQD.js → Interest-i6jC6aSF.js} +2 -2
  25. package/dist/{Interest-bo-lZHQD.js.map → Interest-i6jC6aSF.js.map} +1 -1
  26. package/dist/{Jars-BqCMK3LX.js → Jars-CMck5x4j.js} +2 -2
  27. package/dist/{Jars-BqCMK3LX.js.map → Jars-CMck5x4j.js.map} +1 -1
  28. package/dist/{Jars-Da1dK6qP.esm.js → Jars-KgfjDdIn.esm.js} +2 -2
  29. package/dist/{Jars-Da1dK6qP.esm.js.map → Jars-KgfjDdIn.esm.js.map} +1 -1
  30. package/dist/{Lock-dn_E6gBX.esm.js → Lock-DQdry3N8.esm.js} +2 -2
  31. package/dist/{Lock-dn_E6gBX.esm.js.map → Lock-DQdry3N8.esm.js.map} +1 -1
  32. package/dist/{Lock-CmQJK3R6.js → Lock-DX_eWy1s.js} +2 -2
  33. package/dist/{Lock-CmQJK3R6.js.map → Lock-DX_eWy1s.js.map} +1 -1
  34. package/dist/{MagnifyingGlass-CjkQ4cPC.esm.js → MagnifyingGlass-CirktDQ1.esm.js} +2 -2
  35. package/dist/{MagnifyingGlass-CjkQ4cPC.esm.js.map → MagnifyingGlass-CirktDQ1.esm.js.map} +1 -1
  36. package/dist/{MagnifyingGlass-BK2gAjPL.js → MagnifyingGlass-DGUjrJn_.js} +2 -2
  37. package/dist/{MagnifyingGlass-BK2gAjPL.js.map → MagnifyingGlass-DGUjrJn_.js.map} +1 -1
  38. package/dist/{Marble-c63Wodn4.js → Marble-C3qjd7S-.js} +2 -2
  39. package/dist/{Marble-c63Wodn4.js.map → Marble-C3qjd7S-.js.map} +1 -1
  40. package/dist/{Marble-FuB5ppSN.esm.js → Marble-cpxV1Xe8.esm.js} +2 -2
  41. package/dist/{Marble-FuB5ppSN.esm.js.map → Marble-cpxV1Xe8.esm.js.map} +1 -1
  42. package/dist/{MarbleCard-CZoh2t6z.esm.js → MarbleCard-BL4Z4p0q.esm.js} +2 -2
  43. package/dist/{MarbleCard-CZoh2t6z.esm.js.map → MarbleCard-BL4Z4p0q.esm.js.map} +1 -1
  44. package/dist/{MarbleCard-DJz4FeXq.js → MarbleCard-jsVusr4w.js} +2 -2
  45. package/dist/{MarbleCard-DJz4FeXq.js.map → MarbleCard-jsVusr4w.js.map} +1 -1
  46. package/dist/{MultiCurrency-CjBfwvd5.js → MultiCurrency-8CajY39s.js} +2 -2
  47. package/dist/{MultiCurrency-CjBfwvd5.js.map → MultiCurrency-8CajY39s.js.map} +1 -1
  48. package/dist/{MultiCurrency-CCkYpe4r.esm.js → MultiCurrency-Dug8SyTe.esm.js} +2 -2
  49. package/dist/{MultiCurrency-CCkYpe4r.esm.js.map → MultiCurrency-Dug8SyTe.esm.js.map} +1 -1
  50. package/dist/{Plane-B5wEFkN3.esm.js → Plane-BYWAvZ3D.esm.js} +2 -2
  51. package/dist/{Plane-B5wEFkN3.esm.js.map → Plane-BYWAvZ3D.esm.js.map} +1 -1
  52. package/dist/{Plane-CFix2lAc.js → Plane-UZhOEApb.js} +2 -2
  53. package/dist/{Plane-CFix2lAc.js.map → Plane-UZhOEApb.js.map} +1 -1
  54. package/dist/{Scene-de3i_19x.esm.js → Scene-BbP_hcsH.esm.js} +2 -2
  55. package/dist/{Scene-de3i_19x.esm.js.map → Scene-BbP_hcsH.esm.js.map} +1 -1
  56. package/dist/{Scene-BbWfekxg.js → Scene-Bre7riZ7.js} +2 -2
  57. package/dist/{Scene-BbWfekxg.js.map → Scene-Bre7riZ7.js.map} +1 -1
  58. package/dist/illustrations/metadata.d.ts +137 -112
  59. package/dist/illustrations/metadata.d.ts.map +1 -1
  60. package/dist/illustrations3d/Illustration3D.d.ts +2 -1
  61. package/dist/illustrations3d/Illustration3D.d.ts.map +1 -1
  62. package/dist/illustrations3d/utils.d.ts +1 -1
  63. package/dist/illustrations3d/utils.d.ts.map +1 -1
  64. package/dist/{index-BDrfcpm_.esm.js → index-CAxCDj_E.esm.js} +151 -128
  65. package/dist/index-CAxCDj_E.esm.js.map +1 -0
  66. package/dist/{index-CikWxxNh.js → index-DkSKmMSa.js} +151 -128
  67. package/dist/index-DkSKmMSa.js.map +1 -0
  68. package/dist/index.esm.js +1 -1
  69. package/dist/index.js +1 -1
  70. package/package.json +6 -6
  71. package/src/flags/AllFlagsAndSizes.stories.tsx +88 -41
  72. package/src/illustrations/Illustration.stories.tsx +38 -35
  73. package/src/illustrations/metadata.ts +293 -5
  74. package/src/illustrations3d/Illustration3D.stories.tsx +34 -1
  75. package/src/illustrations3d/Illustration3D.tsx +2 -15
  76. package/src/illustrations3d/utils.ts +3 -17
  77. package/dist/index-BDrfcpm_.esm.js.map +0 -1
  78. package/dist/index-CikWxxNh.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import flagRawMetaData from "wise-atoms/assets/flags/_metadata.json";
2
3
 
3
- import flagRawMetaData from '../../node_modules/wise-atoms/flags/.metadata.json';
4
4
  import { Flag } from './Flag';
5
5
 
6
6
  const meta: Meta<typeof Flag> = {
@@ -11,22 +11,60 @@ export default meta;
11
11
 
12
12
  type Story = StoryObj<typeof Flag>;
13
13
 
14
- // Helper function to render all flags and sizes for a given region
15
- const AllFlagsAndSizes = (region: string) => {
16
- const regionFlags = Object.entries(flagRawMetaData)
17
- .filter(([currentRegion]) => currentRegion === region)
18
- .flatMap(([, flags]) => flags)
19
- .reduce<{ country: string[]; currencies: string[][] }[]>((acc, flag) => {
20
- const existing = acc.find(
21
- (currentFlag) => currentFlag.country[0] && currentFlag.country[0] === flag.country[0],
22
- );
23
- if (existing) {
24
- existing.currencies.push(flag.currency);
14
+ interface GroupedFlag { name: string; countryCode?: string; currencyCodes: string[] }
15
+
16
+ const groupByCountry = (
17
+ entries: [string, (typeof flagRawMetaData)[keyof typeof flagRawMetaData]][],
18
+ ): GroupedFlag[] => {
19
+ const countryMap = new Map<string, GroupedFlag>();
20
+ const standaloneFlags: GroupedFlag[] = [];
21
+
22
+ for (const [slug, data] of entries) {
23
+ const isDetailed = 'detailed' in data && data.detailed;
24
+ if (!isDetailed) {
25
+ const name = 'name' in data ? data.name : slug;
26
+ const iso2 = 'iso2' in data ? data.iso2 : undefined;
27
+ const currencyCode = 'currencyCode' in data ? data.currencyCode : undefined;
28
+
29
+ if (iso2) {
30
+ const existing = countryMap.get(iso2);
31
+ if (existing) {
32
+ if (currencyCode) existing.currencyCodes.push(currencyCode);
33
+ } else {
34
+ countryMap.set(iso2, {
35
+ name,
36
+ countryCode: iso2,
37
+ currencyCodes: currencyCode ? [currencyCode] : [],
38
+ });
39
+ }
25
40
  } else {
26
- acc.push({ country: flag.country, currencies: [flag.currency] });
41
+ const code = currencyCode ?? slug;
42
+ standaloneFlags.push({
43
+ name,
44
+ countryCode: code,
45
+ currencyCodes: currencyCode ? [currencyCode] : [],
46
+ });
27
47
  }
28
- return acc;
29
- }, []);
48
+ }
49
+ }
50
+
51
+ return [...countryMap.values(), ...standaloneFlags];
52
+ };
53
+
54
+ const allEntries = Object.entries(flagRawMetaData);
55
+ const allFlagsSorted = groupByCountry(allEntries).sort((a, b) =>
56
+ a.name.localeCompare(b.name),
57
+ );
58
+
59
+ const getFlagsByRegion = (region: string): GroupedFlag[] =>
60
+ groupByCountry(allEntries.filter(([, data]) => data.group === region));
61
+
62
+ // Helper function to render all flags and sizes for a given region
63
+ const AllFlagsAndSizes = (
64
+ region: string,
65
+ flagsOverride?: GroupedFlag[],
66
+ ) => {
67
+ const regionFlags = flagsOverride ?? getFlagsByRegion(region);
30
68
 
31
69
  return (
32
70
  <>
@@ -45,54 +83,56 @@ const AllFlagsAndSizes = (region: string) => {
45
83
  <div
46
84
  style={{
47
85
  display: 'grid',
48
- gridTemplateColumns: 'repeat(auto-fill, minmax(350px, 1fr))',
49
- gap: 'var(--size-24)',
86
+ gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',
87
+ gap: 'var(--padding-small)',
50
88
  }}
51
89
  >
52
90
  {regionFlags.map((flag) => {
53
- const countryCode = flag.country[0]?.toUpperCase();
54
- const primaryCurrencyCode = flag.currencies[0]?.[0]?.toUpperCase();
55
- const flagCode = countryCode ?? primaryCurrencyCode;
56
- const currencyCodes = flag.currencies.map((currency) => currency[0]).filter(Boolean).map((code) => code.toUpperCase());
57
-
58
- // Covers cases where there's just a currency code and no country (e.g. Euro)
59
- const flagName = countryCode
60
- ? flag.country.at(-1)
61
- : flag.currencies[0]?.at(-1);
91
+ const flagCode = flag.countryCode ?? flag.currencyCodes[0];
62
92
 
63
93
  return (
64
94
  <div
65
- key={flagName}
95
+ key={flag.name}
66
96
  style={{
67
- display: 'grid',
68
- gridTemplateColumns: 'auto auto minmax(auto, 1fr)',
69
- gap: 'var(--size-12)',
97
+ display: 'flex',
98
+ flexDirection: 'column',
70
99
  alignItems: 'center',
100
+ gap: 'var(--padding-small)',
101
+ padding: 'var(--padding-small)',
102
+ border: '1px solid var(--color-border-neutral)',
103
+ borderRadius: 'var(--radius-large)',
71
104
  }}
72
105
  >
73
- <Flag code={flagCode} intrinsicSize={150} />
74
- <Flag code={flagCode} />
75
106
  <div
76
107
  style={{
77
108
  display: 'flex',
78
- flexWrap: 'wrap',
109
+ alignItems: 'center',
110
+ gap: 'var(--padding-small)',
111
+ }}
112
+ >
113
+ <Flag code={flagCode} />
114
+ <Flag code={flagCode} intrinsicSize={150} />
115
+ </div>
116
+ <div
117
+ style={{
118
+ display: 'flex',
79
119
  flexDirection: 'column',
80
120
  alignItems: 'flex-start',
81
121
  }}
82
122
  >
83
- <strong>{flagName}</strong>
123
+ <strong>{flag.name}</strong>
84
124
  <span>
85
- {countryCode && (
125
+ {flag.countryCode && (
86
126
  <>
87
- Country: <code>{countryCode}</code>
127
+ Country: <code>{flag.countryCode}</code>
88
128
  </>
89
129
  )}
90
- {currencyCodes.length > 0 && (
130
+ {flag.currencyCodes.length > 0 && (
91
131
  <>
92
132
  <br />
93
133
  <span>
94
- {`${currencyCodes.length === 1 ? 'Currency' : 'Currencies'}: `}
95
- {currencyCodes.map((currencyCode) => (
134
+ {`${flag.currencyCodes.length === 1 ? 'Currency' : 'Currencies'}: `}
135
+ {flag.currencyCodes.map((currencyCode) => (
96
136
  <code key={currencyCode}>{currencyCode}</code>
97
137
  ))}
98
138
  </span>
@@ -109,6 +149,13 @@ const AllFlagsAndSizes = (region: string) => {
109
149
  };
110
150
 
111
151
  // Stories for each region
152
+ export const World: Story = {
153
+ render: () => AllFlagsAndSizes('World', allFlagsSorted),
154
+ parameters: {
155
+ chromatic: { disableSnapshot: true },
156
+ },
157
+ };
158
+
112
159
  export const Africa: Story = {
113
160
  render: () => AllFlagsAndSizes('Africa'),
114
161
  };
@@ -141,6 +188,6 @@ export const SouthAmerica: Story = {
141
188
  render: () => AllFlagsAndSizes('South America'),
142
189
  };
143
190
 
144
- export const Fallback: Story = {
145
- render: () => AllFlagsAndSizes('Fallback'),
191
+ export const Misc: Story = {
192
+ render: () => AllFlagsAndSizes('Misc'),
146
193
  };
@@ -20,39 +20,42 @@ export const Basic: Story = {
20
20
  },
21
21
  };
22
22
 
23
- export const All = () => {
24
- const assetNames = Object.values(Assets);
25
- return (
26
- <>
27
- <span className="np-text-body-large-bold">
28
- Total number of illustrations: {assetNames.length}
29
- </span>
30
- <div
31
- style={{
32
- display: "grid",
33
- gridTemplateColumns: "repeat(auto-fill, minmax(250px, 1fr))",
34
- gap: "var(--padding-small)",
35
- }}
36
- >
37
- {Object.values(Assets).map((assetName) => (
38
- <div
39
- key={assetName}
40
- style={{
41
- display: "grid",
42
- alignItems: "center",
43
- justifyItems: "center",
44
- }}
45
- >
46
- <Illustration
47
- alt={assetName}
48
- name={assetName as IllustrationNames}
49
- />
50
- <span>
51
- <code>{assetName}</code>
52
- </span>
53
- </div>
54
- ))}
55
- </div>
56
- </>
57
- );
23
+ export const All: Story = {
24
+ tags: ["autodocs"],
25
+ render: () => {
26
+ const assetNames = Object.values(Assets);
27
+ return (
28
+ <>
29
+ <span className="np-text-body-large-bold">
30
+ Total number of illustrations: {assetNames.length}
31
+ </span>
32
+ <div
33
+ style={{
34
+ display: "grid",
35
+ gridTemplateColumns: "repeat(auto-fill, minmax(250px, 1fr))",
36
+ gap: "var(--padding-small)",
37
+ }}
38
+ >
39
+ {assetNames.map((assetName) => (
40
+ <div
41
+ key={assetName}
42
+ style={{
43
+ display: "grid",
44
+ alignItems: "center",
45
+ justifyItems: "center",
46
+ }}
47
+ >
48
+ <Illustration
49
+ alt={assetName}
50
+ name={assetName as IllustrationNames}
51
+ />
52
+ <span>
53
+ <code>{assetName}</code>
54
+ </span>
55
+ </div>
56
+ ))}
57
+ </div>
58
+ </>
59
+ );
60
+ },
58
61
  };
@@ -4,10 +4,298 @@
4
4
  * See: `scripts/generate-i10s-metadata.mjs`
5
5
  *
6
6
  */
7
-
8
-
7
+
8
+
9
9
  export enum Assets {
10
- WALLET = 'wallet',TWO_INVITE_LETTERS_OPENED = 'two-invite-letters-opened',TOOL = 'tool',TARGET_PLATFORM = 'target-platform',STOPWATCH_PLATFORM = 'stopwatch-platform',SPEECH_BUBBLE = 'speech-bubble',SKIP_AUTHENTICATION = 'skip-authentication',SHOPPING_BAG = 'shopping-bag',SATELLITE_PLATFORM = 'satellite-platform',SAND_TIMER_BUSINESS = 'sand-timer-business',SAND_TIMER = 'sand-timer',REMINDER_LETTER = 'reminder-letter',RED_PACKET = 'red-packet',RECEIVE_BUSINESS = 'receive-business',RECEIVE = 'receive',QUESTION_MARK_BUSINESS = 'question-mark-business',QUESTION_MARK = 'question-mark',PUZZLE_PIECES_BUSINESS = 'puzzle-pieces-business',PUZZLE_PIECES = 'puzzle-pieces',PLANE_BUSINESS = 'plane-business',PLANE_2 = 'plane-2',PLANE = 'plane',PIE_CHART_BUSINESS = 'pie-chart-business',PIE_CHART = 'pie-chart',PHONES = 'phones',PERSONAL_CARD = 'personal-card',PERCENTAGE_BUSINESS = 'percentage-business',PERCENTAGE = 'percentage',PASSKEY = 'passkey',PALM_TREE = 'palm-tree',ONE_INVITE_LETTER_OPENED = 'one-invite-letter-opened',MULTI_CURRENCY_BUSINESS = 'multi-currency-business',MULTI_CURRENCY = 'multi-currency',MEGAPHONE = 'megaphone',MARBLE_CARD_FLAG_ONLY_BUSINESS = 'marble-card-flag-only-business',MARBLE_CARD_FLAG_ONLY = 'marble-card-flag-only',MARBLE_CARD_BUSINESS_FLAG_ONLY = 'marble-card-business-flag-only',MARBLE_CARD_BUSINESS = 'marble-card-business',MARBLE_CARD = 'marble-card',MARBLE_BUSINESS = 'marble-business',MARBLE = 'marble',MAP = 'map',MAGNIFYING_GLASS_BUSINESS = 'magnifying-glass-business',MAGNIFYING_GLASS = 'magnifying-glass',LOCK_PLATFORM = 'lock-platform',LOCK_BUSINESS = 'lock-business',LOCK = 'lock',LIGHT_BULB_BUSINESS = 'light-bulb-business',LIGHT_BULB = 'light-bulb',KEY_BUSINESS = 'key-business',KEY = 'key',JARS = 'jars',INVITE_LETTER = 'invite-letter',INTEREST = 'interest',INFINITE = 'infinite',ID_CARD = 'id-card',HOUSE = 'house',HEART_5 = 'heart-5',HEART_4 = 'heart-4',HEART_3 = 'heart-3',HEART_2 = 'heart-2',HEART = 'heart',HEADSET_BUSINESS = 'headset-business',HEADSET = 'headset',GRAPH_BUSINESS = 'graph-business',GRAPH = 'graph',GLOBE = 'globe',GIFT_BOX = 'gift-box',GET_PAID_WITH_CARD_BUSINESS = 'get-paid-with-card-business',GEAR_BUSINESS = 'gear-business',GEAR = 'gear',FLOWER = 'flower',FLAG = 'flag',EXCLAMATION_MARK_BUSINESS = 'exclamation-mark-business',EXCLAMATION_MARK = 'exclamation-mark',EMAIL_SUCCESS_BUSINESS = 'email-success-business',EMAIL_SUCCESS = 'email-success',EMAIL = 'email',ELECTRIC_PLUG = 'electric-plug',ECO_CARD = 'eco-card',DOOR = 'door',DOCUMENTS_FOLDER_BUSINESS = 'documents-folder-business',DOCUMENTS = 'documents',DIGITAL_CARD_BUSINESS = 'digital-card-business',DIGITAL_CARD_2 = 'digital-card-2',DIGITAL_CARD = 'digital-card',COOKIE = 'cookie',CONVERT_BUSINESS = 'convert-business',CONVERT = 'convert',CONSTRUCTION_FENCE = 'construction-fence',CONFETTI_BUSINESS = 'confetti-business',CONFETTI = 'confetti',COIN_PILE_UP_BUSINESS = 'coin-pile-up-business',COIN_PILE_UP = 'coin-pile-up',COIN_PILE_DOWN_BUSINESS = 'coin-pile-down-business',COIN_PILE_DOWN = 'coin-pile-down',CLOSED_WINDOW = 'closed-window',CHECK_MARK_BUSINESS = 'check-mark-business',CHECK_MARK = 'check-mark',CALENDAR_BUSINESS = 'calendar-business',CALENDAR = 'calendar',CALCULATOR_BUSINESS = 'calculator-business',BUSINESS_CARD_BUSINESS = 'business-card-business',BUSINESS_CARD = 'business-card',BRIEFCASE_BUSINESS = 'briefcase-business',BRIEFCASE = 'briefcase',BELL_BUSINESS = 'bell-business',BELL = 'bell',BATCH_PAYMENTS_BUSINESS = 'batch-payments-business',BACKPACK = 'backpack',APP_MARKETPLACE_BUSINESS = 'app-marketplace-business',API_INTEGRATIONS_BUSINESS = 'api-integrations-business'
10
+ API_INTEGRATIONS_BUSINESS = 'api-integrations-business',
11
+ APP_MARKETPLACE_BUSINESS = 'app-marketplace-business',
12
+ BACKPACK = 'backpack',
13
+ BATCH_PAYMENTS_BUSINESS = 'batch-payments-business',
14
+ BELL = 'bell',
15
+ BELL_BUSINESS = 'bell-business',
16
+ BRIEFCASE = 'briefcase',
17
+ BRIEFCASE_BUSINESS = 'briefcase-business',
18
+ BRIEFCASE_SCAM = 'briefcase-scam',
19
+ BUSINESS_CARD = 'business-card',
20
+ BUSINESS_CARD_BUSINESS = 'business-card-business',
21
+ CALCULATOR_BUSINESS = 'calculator-business',
22
+ CALENDAR = 'calendar',
23
+ CALENDAR_BUSINESS = 'calendar-business',
24
+ CARD = 'card',
25
+ CARD_BUSINESS = 'card-business',
26
+ CHECK_MARK = 'check-mark',
27
+ CHECK_MARK_BUSINESS = 'check-mark-business',
28
+ CLOSED_WINDOW = 'closed-window',
29
+ COIN_PILE_DOWN = 'coin-pile-down',
30
+ COIN_PILE_DOWN_BUSINESS = 'coin-pile-down-business',
31
+ COIN_PILE_UP = 'coin-pile-up',
32
+ COIN_PILE_UP_BUSINESS = 'coin-pile-up-business',
33
+ COMPLIANCE_PLATFORM = 'compliance-platform',
34
+ CONFETTI = 'confetti',
35
+ CONFETTI_BUSINESS = 'confetti-business',
36
+ CONSTRUCTION_FENCE = 'construction-fence',
37
+ CONTROLS_PLATFORM = 'controls-platform',
38
+ CONVERT = 'convert',
39
+ CONVERT_BUSINESS = 'convert-business',
40
+ COOKIE = 'cookie',
41
+ DIGITAL_CARD = 'digital-card',
42
+ DIGITAL_CARD_2 = 'digital-card-2',
43
+ DIGITAL_CARD_BUSINESS = 'digital-card-business',
44
+ DOCUMENTS = 'documents',
45
+ DOCUMENTS_FOLDER_BUSINESS = 'documents-folder-business',
46
+ DOCUMENTS_SCAM = 'documents-scam',
47
+ DOOR = 'door',
48
+ ECO_CARD = 'eco-card',
49
+ ELECTRIC_PLUG = 'electric-plug',
50
+ EMAIL = 'email',
51
+ EMAIL_SCAM = 'email-scam',
52
+ EMAIL_SUCCESS = 'email-success',
53
+ EMAIL_SUCCESS_BUSINESS = 'email-success-business',
54
+ EXCLAMATION_MARK = 'exclamation-mark',
55
+ EXCLAMATION_MARK_BUSINESS = 'exclamation-mark-business',
56
+ FLAG = 'flag',
57
+ FLOWER = 'flower',
58
+ GEAR = 'gear',
59
+ GEAR_BUSINESS = 'gear-business',
60
+ GEAR_PLATFORM = 'gear-platform',
61
+ GET_PAID_WITH_CARD_BUSINESS = 'get-paid-with-card-business',
62
+ GIFT_BOX = 'gift-box',
63
+ GLOBE = 'globe',
64
+ GRAPH = 'graph',
65
+ GRAPH_BUSINESS = 'graph-business',
66
+ HEADSET = 'headset',
67
+ HEADSET_BUSINESS = 'headset-business',
68
+ HEADSET_SCAM = 'headset-scam',
69
+ HEART = 'heart',
70
+ HEART_2 = 'heart-2',
71
+ HEART_3 = 'heart-3',
72
+ HEART_4 = 'heart-4',
73
+ HEART_5 = 'heart-5',
74
+ HOUSE = 'house',
75
+ HOUSE_SCAM = 'house-scam',
76
+ ID_CARD = 'id-card',
77
+ ID_CARD_SCAM = 'id-card-scam',
78
+ INFINITE = 'infinite',
79
+ INTEREST = 'interest',
80
+ INVITE_LETTER = 'invite-letter',
81
+ JARS = 'jars',
82
+ KEY = 'key',
83
+ KEY_BUSINESS = 'key-business',
84
+ LIGHT_BULB = 'light-bulb',
85
+ LIGHT_BULB_BUSINESS = 'light-bulb-business',
86
+ LOCK = 'lock',
87
+ LOCK_BUSINESS = 'lock-business',
88
+ LOCK_PLATFORM = 'lock-platform',
89
+ MAGNIFYING_GLASS = 'magnifying-glass',
90
+ MAGNIFYING_GLASS_BUSINESS = 'magnifying-glass-business',
91
+ MAP = 'map',
92
+ MAP_BUSINESS = 'map-business',
93
+ MARBLE = 'marble',
94
+ MARBLE_BUSINESS = 'marble-business',
95
+ MARBLE_CARD = 'marble-card',
96
+ MARBLE_CARD_BUSINESS = 'marble-card-business',
97
+ MARBLE_CARD_BUSINESS_FLAG_ONLY = 'marble-card-business-flag-only',
98
+ MARBLE_CARD_FLAG_ONLY = 'marble-card-flag-only',
99
+ MARBLE_CARD_FLAG_ONLY_BUSINESS = 'marble-card-flag-only-business',
100
+ MEGAPHONE = 'megaphone',
101
+ MEGAPHONE_BUSINESS = 'megaphone-business',
102
+ MEGAPHONE_SCAM = 'megaphone-scam',
103
+ MULTI_CURRENCY = 'multi-currency',
104
+ MULTI_CURRENCY_BUSINESS = 'multi-currency-business',
105
+ ONE_INVITE_LETTER_OPENED = 'one-invite-letter-opened',
106
+ PALM_TREE = 'palm-tree',
107
+ PASSKEY = 'passkey',
108
+ PERCENTAGE = 'percentage',
109
+ PERCENTAGE_BUSINESS = 'percentage-business',
110
+ PERSON_RED_BLUE_SCAM = 'person-red-blue-scam',
111
+ PERSON_RED_SCAM = 'person-red-scam',
112
+ PERSONAL_CARD = 'personal-card',
113
+ PHONES = 'phones',
114
+ PIE_CHART = 'pie-chart',
115
+ PIE_CHART_BUSINESS = 'pie-chart-business',
116
+ PLANE = 'plane',
117
+ PLANE_2 = 'plane-2',
118
+ PLANE_BUSINESS = 'plane-business',
119
+ PUZZLE_PIECES = 'puzzle-pieces',
120
+ PUZZLE_PIECES_BUSINESS = 'puzzle-pieces-business',
121
+ QUESTION_MARK = 'question-mark',
122
+ QUESTION_MARK_BUSINESS = 'question-mark-business',
123
+ QUESTION_MARK_SCAM = 'question-mark-scam',
124
+ RECEIVE = 'receive',
125
+ RECEIVE_BUSINESS = 'receive-business',
126
+ RECEIVE_SCAM = 'receive-scam',
127
+ RED_PACKET = 'red-packet',
128
+ REMINDER_LETTER = 'reminder-letter',
129
+ ROCKET_PLATFORM = 'rocket-platform',
130
+ SAND_TIMER = 'sand-timer',
131
+ SAND_TIMER_BUSINESS = 'sand-timer-business',
132
+ SATELLITE_PLATFORM = 'satellite-platform',
133
+ SHOPPING_BAG = 'shopping-bag',
134
+ SKIP_AUTHENTICATION = 'skip-authentication',
135
+ SKIP_AUTHENTICATION_SCAM = 'skip-authentication-scam',
136
+ SPEECH_BUBBLE = 'speech-bubble',
137
+ SPEECH_BUBBLE_SCAM = 'speech-bubble-scam',
138
+ STOPWATCH_PLATFORM = 'stopwatch-platform',
139
+ TARGET_PLATFORM = 'target-platform',
140
+ TOOL = 'tool',
141
+ TREASURY_PLATFORM = 'treasury-platform',
142
+ TWO_INVITE_LETTERS_OPENED = 'two-invite-letters-opened',
143
+ WALLET = 'wallet',
11
144
  }
12
-
13
- export type IllustrationNames = 'wallet' | 'two-invite-letters-opened' | 'tool' | 'target-platform' | 'stopwatch-platform' | 'speech-bubble' | 'skip-authentication' | 'shopping-bag' | 'satellite-platform' | 'sand-timer-business' | 'sand-timer' | 'reminder-letter' | 'red-packet' | 'receive-business' | 'receive' | 'question-mark-business' | 'question-mark' | 'puzzle-pieces-business' | 'puzzle-pieces' | 'plane-business' | 'plane-2' | 'plane' | 'pie-chart-business' | 'pie-chart' | 'phones' | 'personal-card' | 'percentage-business' | 'percentage' | 'passkey' | 'palm-tree' | 'one-invite-letter-opened' | 'multi-currency-business' | 'multi-currency' | 'megaphone' | 'marble-card-flag-only-business' | 'marble-card-flag-only' | 'marble-card-business-flag-only' | 'marble-card-business' | 'marble-card' | 'marble-business' | 'marble' | 'map' | 'magnifying-glass-business' | 'magnifying-glass' | 'lock-platform' | 'lock-business' | 'lock' | 'light-bulb-business' | 'light-bulb' | 'key-business' | 'key' | 'jars' | 'invite-letter' | 'interest' | 'infinite' | 'id-card' | 'house' | 'heart-5' | 'heart-4' | 'heart-3' | 'heart-2' | 'heart' | 'headset-business' | 'headset' | 'graph-business' | 'graph' | 'globe' | 'gift-box' | 'get-paid-with-card-business' | 'gear-business' | 'gear' | 'flower' | 'flag' | 'exclamation-mark-business' | 'exclamation-mark' | 'email-success-business' | 'email-success' | 'email' | 'electric-plug' | 'eco-card' | 'door' | 'documents-folder-business' | 'documents' | 'digital-card-business' | 'digital-card-2' | 'digital-card' | 'cookie' | 'convert-business' | 'convert' | 'construction-fence' | 'confetti-business' | 'confetti' | 'coin-pile-up-business' | 'coin-pile-up' | 'coin-pile-down-business' | 'coin-pile-down' | 'closed-window' | 'check-mark-business' | 'check-mark' | 'calendar-business' | 'calendar' | 'calculator-business' | 'business-card-business' | 'business-card' | 'briefcase-business' | 'briefcase' | 'bell-business' | 'bell' | 'batch-payments-business' | 'backpack' | 'app-marketplace-business' | 'api-integrations-business'
145
+
146
+ export const illustrationNames = [
147
+ 'api-integrations-business',
148
+ 'app-marketplace-business',
149
+ 'backpack',
150
+ 'batch-payments-business',
151
+ 'bell',
152
+ 'bell-business',
153
+ 'briefcase',
154
+ 'briefcase-business',
155
+ 'briefcase-scam',
156
+ 'business-card',
157
+ 'business-card-business',
158
+ 'calculator-business',
159
+ 'calendar',
160
+ 'calendar-business',
161
+ 'card',
162
+ 'card-business',
163
+ 'check-mark',
164
+ 'check-mark-business',
165
+ 'closed-window',
166
+ 'coin-pile-down',
167
+ 'coin-pile-down-business',
168
+ 'coin-pile-up',
169
+ 'coin-pile-up-business',
170
+ 'compliance-platform',
171
+ 'confetti',
172
+ 'confetti-business',
173
+ 'construction-fence',
174
+ 'controls-platform',
175
+ 'convert',
176
+ 'convert-business',
177
+ 'cookie',
178
+ 'digital-card',
179
+ 'digital-card-2',
180
+ 'digital-card-business',
181
+ 'documents',
182
+ 'documents-folder-business',
183
+ 'documents-scam',
184
+ 'door',
185
+ 'eco-card',
186
+ 'electric-plug',
187
+ 'email',
188
+ 'email-scam',
189
+ 'email-success',
190
+ 'email-success-business',
191
+ 'exclamation-mark',
192
+ 'exclamation-mark-business',
193
+ 'flag',
194
+ 'flower',
195
+ 'gear',
196
+ 'gear-business',
197
+ 'gear-platform',
198
+ 'get-paid-with-card-business',
199
+ 'gift-box',
200
+ 'globe',
201
+ 'graph',
202
+ 'graph-business',
203
+ 'headset',
204
+ 'headset-business',
205
+ 'headset-scam',
206
+ 'heart',
207
+ 'heart-2',
208
+ 'heart-3',
209
+ 'heart-4',
210
+ 'heart-5',
211
+ 'house',
212
+ 'house-scam',
213
+ 'id-card',
214
+ 'id-card-scam',
215
+ 'infinite',
216
+ 'interest',
217
+ 'invite-letter',
218
+ 'jars',
219
+ 'key',
220
+ 'key-business',
221
+ 'light-bulb',
222
+ 'light-bulb-business',
223
+ 'lock',
224
+ 'lock-business',
225
+ 'lock-platform',
226
+ 'magnifying-glass',
227
+ 'magnifying-glass-business',
228
+ 'map',
229
+ 'map-business',
230
+ 'marble',
231
+ 'marble-business',
232
+ 'marble-card',
233
+ 'marble-card-business',
234
+ 'marble-card-business-flag-only',
235
+ 'marble-card-flag-only',
236
+ 'marble-card-flag-only-business',
237
+ 'megaphone',
238
+ 'megaphone-business',
239
+ 'megaphone-scam',
240
+ 'multi-currency',
241
+ 'multi-currency-business',
242
+ 'one-invite-letter-opened',
243
+ 'palm-tree',
244
+ 'passkey',
245
+ 'percentage',
246
+ 'percentage-business',
247
+ 'person-red-blue-scam',
248
+ 'person-red-scam',
249
+ 'personal-card',
250
+ 'phones',
251
+ 'pie-chart',
252
+ 'pie-chart-business',
253
+ 'plane',
254
+ 'plane-2',
255
+ 'plane-business',
256
+ 'puzzle-pieces',
257
+ 'puzzle-pieces-business',
258
+ 'question-mark',
259
+ 'question-mark-business',
260
+ 'question-mark-scam',
261
+ 'receive',
262
+ 'receive-business',
263
+ 'receive-scam',
264
+ 'red-packet',
265
+ 'reminder-letter',
266
+ 'rocket-platform',
267
+ 'sand-timer',
268
+ 'sand-timer-business',
269
+ 'satellite-platform',
270
+ 'shopping-bag',
271
+ 'skip-authentication',
272
+ 'skip-authentication-scam',
273
+ 'speech-bubble',
274
+ 'speech-bubble-scam',
275
+ 'stopwatch-platform',
276
+ 'target-platform',
277
+ 'tool',
278
+ 'treasury-platform',
279
+ 'two-invite-letters-opened',
280
+ 'wallet',
281
+ ] as const;
282
+
283
+ export type IllustrationNames = typeof illustrationNames[number];
284
+
285
+ export const illustration3DNames = [
286
+ 'check-mark',
287
+ 'confetti',
288
+ 'flower',
289
+ 'globe',
290
+ 'graph',
291
+ 'interest',
292
+ 'jars',
293
+ 'lock',
294
+ 'magnifying-glass',
295
+ 'marble',
296
+ 'marble-card',
297
+ 'multi-currency',
298
+ 'plane',
299
+ ] as const;
300
+
301
+ export type Illustration3DNames = typeof illustration3DNames[number];
@@ -2,7 +2,7 @@
2
2
  import React, { useEffect } from 'react';
3
3
 
4
4
  import { Sizes } from '../common';
5
- import { Assets } from '../illustrations/metadata';
5
+ import { Assets, illustration3DNames } from '../illustrations/metadata';
6
6
 
7
7
  import Illustration3D from './Illustration3D';
8
8
 
@@ -10,6 +10,39 @@ export default {
10
10
  title: '3D Illustrations',
11
11
  };
12
12
 
13
+ export const All = () => {
14
+ return (
15
+ <>
16
+ <span className="np-text-body-large-bold">
17
+ Total number of 3D illustrations: {illustration3DNames.length}
18
+ </span>
19
+ <div
20
+ style={{
21
+ display: 'grid',
22
+ gridTemplateColumns: 'repeat(auto-fill, minmax(250px, 1fr))',
23
+ gap: 'var(--padding-small)',
24
+ }}
25
+ >
26
+ {illustration3DNames.map((name) => (
27
+ <div
28
+ key={name}
29
+ style={{
30
+ display: 'grid',
31
+ alignItems: 'center',
32
+ justifyItems: 'center',
33
+ }}
34
+ >
35
+ <Illustration3D name={name} size={Sizes.SMALL} />
36
+ <span>
37
+ <code>{name}</code>
38
+ </span>
39
+ </div>
40
+ ))}
41
+ </div>
42
+ </>
43
+ );
44
+ };
45
+
13
46
  export const Confetti = () => {
14
47
  return (
15
48
  <>
@@ -4,24 +4,11 @@ import { lazy, Suspense, useEffect, useState, LazyExoticComponent } from 'react'
4
4
 
5
5
  import { LargeSize, MediumSize, SmallSize, Sizes } from '../common';
6
6
  import Illustration, { Assets } from '../illustrations';
7
+ import { type Illustration3DNames } from '../illustrations/metadata';
8
+ export type { Illustration3DNames };
7
9
 
8
10
  import { useBattery, isConnectionSlow, isBatteryLow, isWebGL2Available } from './utils';
9
11
 
10
- export type Illustration3DNames =
11
- | 'lock'
12
- | 'globe'
13
- | 'confetti'
14
- | 'check-mark'
15
- | 'flower'
16
- | 'graph'
17
- | 'jars'
18
- | 'magnifying-glass'
19
- | 'marble'
20
- | 'marble-card'
21
- | 'multi-currency'
22
- | 'plane'
23
- | 'interest';
24
-
25
12
  export type Props = {
26
13
  name: Illustration3DNames;
27
14
  size?: SmallSize | MediumSize | LargeSize;