@ledgerhq/lumen-ui-rnative 0.1.66 → 0.1.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/lib/Components/core/BottomSheet/BottomSheet.stories.js +6 -3
- package/dist/module/lib/Components/core/BottomSheet/BottomSheet.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Card/Card.figma.js +0 -1
- package/dist/module/lib/Components/core/Card/Card.figma.js.map +1 -1
- package/dist/module/lib/Components/core/Card/Card.stories.js +0 -2
- package/dist/module/lib/Components/core/Card/Card.stories.js.map +1 -1
- package/dist/module/lib/Components/core/ContentBanner/ContentBanner.figma.js +0 -1
- package/dist/module/lib/Components/core/ContentBanner/ContentBanner.figma.js.map +1 -1
- package/dist/module/lib/Components/core/ContentBanner/ContentBanner.js +1 -1
- package/dist/module/lib/Components/core/ContentBanner/ContentBanner.mdx +4 -4
- package/dist/module/lib/Components/core/ContentBanner/ContentBanner.stories.js +1 -9
- package/dist/module/lib/Components/core/ContentBanner/ContentBanner.stories.js.map +1 -1
- package/dist/module/lib/Components/core/ContentBanner/ContentBanner.test.js +0 -1
- package/dist/module/lib/Components/core/ContentBanner/ContentBanner.test.js.map +1 -1
- package/dist/module/lib/Components/core/DotSymbol/DotSymbol.stories.js +0 -5
- package/dist/module/lib/Components/core/DotSymbol/DotSymbol.stories.js.map +1 -1
- package/dist/module/lib/Components/core/ListItem/ListItem.figma.js +0 -1
- package/dist/module/lib/Components/core/ListItem/ListItem.figma.js.map +1 -1
- package/dist/module/lib/Components/core/ListItem/ListItem.js +1 -1
- package/dist/module/lib/Components/core/ListItem/ListItem.mdx +10 -10
- package/dist/module/lib/Components/core/ListItem/ListItem.stories.js +2 -29
- package/dist/module/lib/Components/core/ListItem/ListItem.stories.js.map +1 -1
- package/dist/module/lib/Components/core/SelectList/SelectList.mdx +1 -1
- package/dist/module/lib/Components/core/SelectList/SelectList.stories.js +0 -1
- package/dist/module/lib/Components/core/SelectList/SelectList.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Spot/Spot.figma.js +31 -16
- package/dist/module/lib/Components/core/Spot/Spot.figma.js.map +1 -1
- package/dist/module/lib/Components/core/Spot/Spot.js +24 -146
- package/dist/module/lib/Components/core/Spot/Spot.js.map +1 -1
- package/dist/module/lib/Components/core/Spot/Spot.mdx +47 -108
- package/dist/module/lib/Components/core/Spot/Spot.stories.js +108 -215
- package/dist/module/lib/Components/core/Spot/Spot.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Spot/Spot.test.js +61 -0
- package/dist/module/lib/Components/core/Spot/Spot.test.js.map +1 -0
- package/dist/module/lib/Components/core/Spot/SpotNumber.js +56 -0
- package/dist/module/lib/Components/core/Spot/SpotNumber.js.map +1 -0
- package/dist/module/lib/Components/core/Spot/SpotNumber.test.js +72 -0
- package/dist/module/lib/Components/core/Spot/SpotNumber.test.js.map +1 -0
- package/dist/module/lib/Components/core/Spot/index.js +1 -0
- package/dist/module/lib/Components/core/Spot/index.js.map +1 -1
- package/dist/module/lib/Components/core/Spot/useSpotStyles.js +93 -0
- package/dist/module/lib/Components/core/Spot/useSpotStyles.js.map +1 -0
- package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.test.js +0 -1
- package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.test.js.map +1 -1
- package/dist/module/lib/Components/core/Tile/Tile.figma.js +0 -1
- package/dist/module/lib/Components/core/Tile/Tile.figma.js.map +1 -1
- package/dist/module/lib/Components/core/Tile/Tile.js +3 -3
- package/dist/module/lib/Components/core/Tile/Tile.mdx +8 -8
- package/dist/module/lib/Components/core/Tile/Tile.stories.js +7 -25
- package/dist/module/lib/Components/core/Tile/Tile.stories.js.map +1 -1
- package/dist/module/lib/Components/symbols/icons/AiBubble.js +60 -0
- package/dist/module/lib/Components/symbols/icons/AiBubble.js.map +1 -0
- package/dist/module/lib/Components/symbols/icons/ArrowBottomLeft.js +49 -0
- package/dist/module/lib/Components/symbols/icons/ArrowBottomLeft.js.map +1 -0
- package/dist/module/lib/Components/symbols/icons/Bug.js +1 -1
- package/dist/module/lib/Components/symbols/icons/Bug.js.map +1 -1
- package/dist/module/lib/Components/symbols/icons/Hourglass.js +49 -0
- package/dist/module/lib/Components/symbols/icons/Hourglass.js.map +1 -0
- package/dist/module/lib/Components/symbols/icons/Repeat.js +49 -0
- package/dist/module/lib/Components/symbols/icons/Repeat.js.map +1 -0
- package/dist/module/lib/Components/symbols/icons/Robot.js +57 -0
- package/dist/module/lib/Components/symbols/icons/Robot.js.map +1 -0
- package/dist/module/lib/Components/symbols/icons/Switch.js +11 -5
- package/dist/module/lib/Components/symbols/icons/Switch.js.map +1 -1
- package/dist/module/lib/Components/symbols/icons/Wifi.js +52 -0
- package/dist/module/lib/Components/symbols/icons/Wifi.js.map +1 -0
- package/dist/module/lib/Components/symbols/index.js +6 -0
- package/dist/module/lib/Components/symbols/index.js.map +1 -1
- package/dist/typescript/src/lib/Components/core/ContentBanner/ContentBanner.d.ts +1 -1
- package/dist/typescript/src/lib/Components/core/ListItem/ListItem.d.ts +1 -1
- package/dist/typescript/src/lib/Components/core/Spot/Spot.d.ts +7 -25
- package/dist/typescript/src/lib/Components/core/Spot/Spot.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Spot/SpotNumber.d.ts +16 -0
- package/dist/typescript/src/lib/Components/core/Spot/SpotNumber.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Spot/index.d.ts +1 -0
- package/dist/typescript/src/lib/Components/core/Spot/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Spot/types.d.ts +29 -29
- package/dist/typescript/src/lib/Components/core/Spot/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Spot/useSpotStyles.d.ts +14 -0
- package/dist/typescript/src/lib/Components/core/Spot/useSpotStyles.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Tile/Tile.d.ts +3 -3
- package/dist/typescript/src/lib/Components/symbols/icons/AiBubble.d.ts +35 -0
- package/dist/typescript/src/lib/Components/symbols/icons/AiBubble.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/symbols/icons/ArrowBottomLeft.d.ts +35 -0
- package/dist/typescript/src/lib/Components/symbols/icons/ArrowBottomLeft.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/symbols/icons/Hourglass.d.ts +35 -0
- package/dist/typescript/src/lib/Components/symbols/icons/Hourglass.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/symbols/icons/Repeat.d.ts +35 -0
- package/dist/typescript/src/lib/Components/symbols/icons/Repeat.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/symbols/icons/Robot.d.ts +35 -0
- package/dist/typescript/src/lib/Components/symbols/icons/Robot.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/symbols/icons/Switch.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/symbols/icons/Wifi.d.ts +35 -0
- package/dist/typescript/src/lib/Components/symbols/icons/Wifi.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/symbols/index.d.ts +6 -0
- package/dist/typescript/src/lib/Components/symbols/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/lib/Components/core/BottomSheet/BottomSheet.stories.tsx +12 -4
- package/src/lib/Components/core/Card/Card.figma.tsx +1 -1
- package/src/lib/Components/core/Card/Card.stories.tsx +2 -2
- package/src/lib/Components/core/ContentBanner/ContentBanner.figma.tsx +1 -1
- package/src/lib/Components/core/ContentBanner/ContentBanner.mdx +4 -4
- package/src/lib/Components/core/ContentBanner/ContentBanner.stories.tsx +9 -9
- package/src/lib/Components/core/ContentBanner/ContentBanner.test.tsx +1 -1
- package/src/lib/Components/core/ContentBanner/ContentBanner.tsx +1 -1
- package/src/lib/Components/core/DotSymbol/DotSymbol.stories.tsx +5 -5
- package/src/lib/Components/core/ListItem/ListItem.figma.tsx +1 -1
- package/src/lib/Components/core/ListItem/ListItem.mdx +10 -10
- package/src/lib/Components/core/ListItem/ListItem.stories.tsx +29 -33
- package/src/lib/Components/core/ListItem/ListItem.tsx +1 -1
- package/src/lib/Components/core/SelectList/SelectList.mdx +1 -1
- package/src/lib/Components/core/SelectList/SelectList.stories.tsx +1 -1
- package/src/lib/Components/core/Spot/Spot.figma.tsx +42 -21
- package/src/lib/Components/core/Spot/Spot.mdx +47 -108
- package/src/lib/Components/core/Spot/Spot.stories.tsx +114 -175
- package/src/lib/Components/core/Spot/Spot.test.tsx +71 -0
- package/src/lib/Components/core/Spot/Spot.tsx +21 -163
- package/src/lib/Components/core/Spot/SpotNumber.test.tsx +93 -0
- package/src/lib/Components/core/Spot/SpotNumber.tsx +48 -0
- package/src/lib/Components/core/Spot/index.ts +1 -0
- package/src/lib/Components/core/Spot/types.ts +39 -41
- package/src/lib/Components/core/Spot/useSpotStyles.ts +119 -0
- package/src/lib/Components/core/ThemeProvider/ThemeProvider.test.tsx +1 -1
- package/src/lib/Components/core/Tile/Tile.figma.tsx +1 -1
- package/src/lib/Components/core/Tile/Tile.mdx +8 -8
- package/src/lib/Components/core/Tile/Tile.stories.tsx +32 -25
- package/src/lib/Components/core/Tile/Tile.tsx +3 -3
- package/src/lib/Components/symbols/icons/AiBubble.tsx +51 -0
- package/src/lib/Components/symbols/icons/ArrowBottomLeft.tsx +44 -0
- package/src/lib/Components/symbols/icons/Bug.tsx +1 -1
- package/src/lib/Components/symbols/icons/Hourglass.tsx +44 -0
- package/src/lib/Components/symbols/icons/Repeat.tsx +44 -0
- package/src/lib/Components/symbols/icons/Robot.tsx +44 -0
- package/src/lib/Components/symbols/icons/Switch.tsx +8 -1
- package/src/lib/Components/symbols/icons/Wifi.tsx +48 -0
- package/src/lib/Components/symbols/index.ts +6 -0
|
@@ -64,11 +64,7 @@ export const Base: Story = {
|
|
|
64
64
|
render: (args) => (
|
|
65
65
|
<ListItem {...args}>
|
|
66
66
|
<ListItemLeading>
|
|
67
|
-
<Spot
|
|
68
|
-
appearance='icon'
|
|
69
|
-
icon={Settings}
|
|
70
|
-
size={args.density === 'compact' ? 32 : 48}
|
|
71
|
-
/>
|
|
67
|
+
<Spot icon={Settings} size={args.density === 'compact' ? 32 : 48} />
|
|
72
68
|
<ListItemContent>
|
|
73
69
|
<ListItemTitle>Item with Icon and Description</ListItemTitle>
|
|
74
70
|
{args.density === 'expanded' && (
|
|
@@ -84,7 +80,7 @@ export const Base: Story = {
|
|
|
84
80
|
code: `
|
|
85
81
|
<ListItem>
|
|
86
82
|
<ListItemLeading>
|
|
87
|
-
<Spot
|
|
83
|
+
<Spot icon={Settings} size={density === 'compact' ? 32 : 48} />
|
|
88
84
|
<ListItemContent>
|
|
89
85
|
<ListItemTitle>Item with Icon and Description</ListItemTitle>
|
|
90
86
|
{density === 'expanded' && (
|
|
@@ -119,7 +115,7 @@ export const DensityShowcase: Story = {
|
|
|
119
115
|
|
|
120
116
|
<ListItem density='compact'>
|
|
121
117
|
<ListItemLeading>
|
|
122
|
-
<Spot size={32}
|
|
118
|
+
<Spot size={32} icon={Wallet} />
|
|
123
119
|
<ListItemContent>
|
|
124
120
|
<ListItemTitle>Compact with value</ListItemTitle>
|
|
125
121
|
</ListItemContent>
|
|
@@ -144,7 +140,7 @@ export const DensityShowcase: Story = {
|
|
|
144
140
|
|
|
145
141
|
<ListItem density='expanded'>
|
|
146
142
|
<ListItemLeading>
|
|
147
|
-
<Spot size={48}
|
|
143
|
+
<Spot size={48} icon={Wallet} />
|
|
148
144
|
<ListItemContent>
|
|
149
145
|
<ListItemTitle>Expanded with value</ListItemTitle>
|
|
150
146
|
<ListItemDescription>With description</ListItemDescription>
|
|
@@ -173,7 +169,7 @@ export const InteractiveShowcase: Story = {
|
|
|
173
169
|
</Text>
|
|
174
170
|
<ListItem>
|
|
175
171
|
<ListItemLeading>
|
|
176
|
-
<Spot size={48}
|
|
172
|
+
<Spot size={48} icon={Settings} />
|
|
177
173
|
<ListItemContent>
|
|
178
174
|
<ListItemTitle>Display only</ListItemTitle>
|
|
179
175
|
<ListItemDescription>No press feedback</ListItemDescription>
|
|
@@ -189,7 +185,7 @@ export const InteractiveShowcase: Story = {
|
|
|
189
185
|
|
|
190
186
|
<ListItem>
|
|
191
187
|
<ListItemLeading>
|
|
192
|
-
<Spot size={48}
|
|
188
|
+
<Spot size={48} icon={Wallet} />
|
|
193
189
|
<ListItemContent>
|
|
194
190
|
<ListItemTitle>Static item</ListItemTitle>
|
|
195
191
|
<ListItemDescription>Not pressable</ListItemDescription>
|
|
@@ -207,7 +203,7 @@ export const InteractiveShowcase: Story = {
|
|
|
207
203
|
</Text>
|
|
208
204
|
<ListItem onPress={() => {}}>
|
|
209
205
|
<ListItemLeading>
|
|
210
|
-
<Spot size={48}
|
|
206
|
+
<Spot size={48} icon={Settings} />
|
|
211
207
|
<ListItemContent>
|
|
212
208
|
<ListItemTitle>Navigation</ListItemTitle>
|
|
213
209
|
<ListItemDescription>Press feedback styles</ListItemDescription>
|
|
@@ -220,7 +216,7 @@ export const InteractiveShowcase: Story = {
|
|
|
220
216
|
|
|
221
217
|
<ListItem onPress={() => setSelected(!selected)}>
|
|
222
218
|
<ListItemLeading>
|
|
223
|
-
<Spot size={48}
|
|
219
|
+
<Spot size={48} icon={Wallet} />
|
|
224
220
|
<ListItemContent>
|
|
225
221
|
<ListItemTitle>Toggle</ListItemTitle>
|
|
226
222
|
<ListItemDescription>Press to toggle</ListItemDescription>
|
|
@@ -258,7 +254,7 @@ export const DisabledState: Story = {
|
|
|
258
254
|
<Box lx={{ flexDirection: 'column', width: 's320' }}>
|
|
259
255
|
<ListItem {...args}>
|
|
260
256
|
<ListItemLeading>
|
|
261
|
-
<Spot size={48}
|
|
257
|
+
<Spot size={48} icon={Settings} />
|
|
262
258
|
<ListItemContent>
|
|
263
259
|
<ListItemTitle>Disabled Item</ListItemTitle>
|
|
264
260
|
<ListItemDescription>This item is disabled</ListItemDescription>
|
|
@@ -271,7 +267,7 @@ export const DisabledState: Story = {
|
|
|
271
267
|
|
|
272
268
|
<ListItem {...args} onPress={() => {}}>
|
|
273
269
|
<ListItemLeading>
|
|
274
|
-
<Spot size={48}
|
|
270
|
+
<Spot size={48} icon={Settings} />
|
|
275
271
|
<ListItemContent>
|
|
276
272
|
<ListItemTitle>Disabled Item</ListItemTitle>
|
|
277
273
|
<ListItemDescription>This item is disabled</ListItemDescription>
|
|
@@ -284,7 +280,7 @@ export const DisabledState: Story = {
|
|
|
284
280
|
|
|
285
281
|
<ListItem {...args}>
|
|
286
282
|
<ListItemLeading>
|
|
287
|
-
<Spot size={48}
|
|
283
|
+
<Spot size={48} icon={Wallet} />
|
|
288
284
|
<ListItemContent>
|
|
289
285
|
<ListItemTitle>Content Variant</ListItemTitle>
|
|
290
286
|
<ListItemDescription>With description</ListItemDescription>
|
|
@@ -315,7 +311,7 @@ export const DisabledState: Story = {
|
|
|
315
311
|
code: `
|
|
316
312
|
<ListItem disabled>
|
|
317
313
|
<ListItemLeading>
|
|
318
|
-
<Spot
|
|
314
|
+
<Spot icon={Settings} />
|
|
319
315
|
<ListItemContent>
|
|
320
316
|
<ListItemTitle>Disabled Item</ListItemTitle>
|
|
321
317
|
<ListItemDescription>This item is disabled</ListItemDescription>
|
|
@@ -340,7 +336,7 @@ export const ActiveState: Story = {
|
|
|
340
336
|
<Box lx={{ flexDirection: 'column', width: 's320', gap: 's8' }}>
|
|
341
337
|
<ListItem {...args}>
|
|
342
338
|
<ListItemLeading>
|
|
343
|
-
<Spot size={48}
|
|
339
|
+
<Spot size={48} icon={Settings} />
|
|
344
340
|
<ListItemContent>
|
|
345
341
|
<ListItemTitle>Active Item</ListItemTitle>
|
|
346
342
|
<ListItemDescription>
|
|
@@ -352,7 +348,7 @@ export const ActiveState: Story = {
|
|
|
352
348
|
|
|
353
349
|
<ListItem {...args} onPress={() => {}}>
|
|
354
350
|
<ListItemLeading>
|
|
355
|
-
<Spot size={48}
|
|
351
|
+
<Spot size={48} icon={Settings} />
|
|
356
352
|
<ListItemContent>
|
|
357
353
|
<ListItemTitle>Active Interactive</ListItemTitle>
|
|
358
354
|
<ListItemDescription>Press for muted-pressed</ListItemDescription>
|
|
@@ -365,7 +361,7 @@ export const ActiveState: Story = {
|
|
|
365
361
|
|
|
366
362
|
<ListItem {...args} disabled>
|
|
367
363
|
<ListItemLeading>
|
|
368
|
-
<Spot size={48}
|
|
364
|
+
<Spot size={48} icon={Wallet} />
|
|
369
365
|
<ListItemContent>
|
|
370
366
|
<ListItemTitle>Active Disabled</ListItemTitle>
|
|
371
367
|
<ListItemDescription>Uses disabled background</ListItemDescription>
|
|
@@ -384,7 +380,7 @@ export const ResponsiveLayout: Story = {
|
|
|
384
380
|
<Box lx={{ flexDirection: 'column', width: 's480', gap: 's32' }}>
|
|
385
381
|
<ListItem lx={{ alignSelf: 'flex-start' }} onPress={() => {}}>
|
|
386
382
|
<ListItemLeading>
|
|
387
|
-
<Spot size={48}
|
|
383
|
+
<Spot size={48} icon={Settings} />
|
|
388
384
|
<ListItemContent>
|
|
389
385
|
<ListItemTitle>Fit content</ListItemTitle>
|
|
390
386
|
<ListItemDescription>Short</ListItemDescription>
|
|
@@ -397,7 +393,7 @@ export const ResponsiveLayout: Story = {
|
|
|
397
393
|
|
|
398
394
|
<ListItem lx={{ width: 's320' }} onPress={() => {}}>
|
|
399
395
|
<ListItemLeading>
|
|
400
|
-
<Spot size={48}
|
|
396
|
+
<Spot size={48} icon={Settings} />
|
|
401
397
|
<ListItemContent>
|
|
402
398
|
<ListItemTitle>
|
|
403
399
|
Defined width (320px) with a long title that truncates
|
|
@@ -415,7 +411,7 @@ export const ResponsiveLayout: Story = {
|
|
|
415
411
|
|
|
416
412
|
<ListItem lx={{ width: 's320' }}>
|
|
417
413
|
<ListItemLeading>
|
|
418
|
-
<Spot size={48}
|
|
414
|
+
<Spot size={48} icon={Wallet} />
|
|
419
415
|
<ListItemContent>
|
|
420
416
|
<ListItemContentRow>
|
|
421
417
|
<ListItemTitle>
|
|
@@ -442,7 +438,7 @@ export const ResponsiveLayout: Story = {
|
|
|
442
438
|
|
|
443
439
|
<ListItem lx={{ width: 'full' }} onPress={() => {}}>
|
|
444
440
|
<ListItemLeading>
|
|
445
|
-
<Spot size={48}
|
|
441
|
+
<Spot size={48} icon={Settings} />
|
|
446
442
|
<ListItemContent>
|
|
447
443
|
<ListItemTitle>Full width (fills parent)</ListItemTitle>
|
|
448
444
|
<ListItemDescription>
|
|
@@ -469,7 +465,7 @@ export const PriorityShowcase: Story = {
|
|
|
469
465
|
</Text>
|
|
470
466
|
<ListItem priority='end'>
|
|
471
467
|
<ListItemLeading>
|
|
472
|
-
<Spot size={48}
|
|
468
|
+
<Spot size={48} icon={Wallet} />
|
|
473
469
|
<ListItemContent>
|
|
474
470
|
<ListItemTitle>
|
|
475
471
|
Long title competing with trailing value content
|
|
@@ -490,7 +486,7 @@ export const PriorityShowcase: Story = {
|
|
|
490
486
|
</Text>
|
|
491
487
|
<ListItem priority='start'>
|
|
492
488
|
<ListItemLeading>
|
|
493
|
-
<Spot size={48}
|
|
489
|
+
<Spot size={48} icon={Wallet} />
|
|
494
490
|
<ListItemContent>
|
|
495
491
|
<ListItemTitle>
|
|
496
492
|
Long title competing with trailing value content
|
|
@@ -517,7 +513,7 @@ export const CompositionShowcase: Story = {
|
|
|
517
513
|
<Box lx={{ flexDirection: 'column', maxWidth: 's320', gap: 's8' }}>
|
|
518
514
|
<ListItem>
|
|
519
515
|
<ListItemLeading>
|
|
520
|
-
<Spot size={48}
|
|
516
|
+
<Spot size={48} icon={Settings} />
|
|
521
517
|
<ListItemContent>
|
|
522
518
|
<ListItemTitle>Simple composition</ListItemTitle>
|
|
523
519
|
</ListItemContent>
|
|
@@ -526,7 +522,7 @@ export const CompositionShowcase: Story = {
|
|
|
526
522
|
|
|
527
523
|
<ListItem>
|
|
528
524
|
<ListItemLeading>
|
|
529
|
-
<Spot size={48}
|
|
525
|
+
<Spot size={48} icon={Settings} />
|
|
530
526
|
<ListItemContent>
|
|
531
527
|
<ListItemTitle>Crypto icon</ListItemTitle>
|
|
532
528
|
<ListItemContentRow>
|
|
@@ -543,7 +539,7 @@ export const CompositionShowcase: Story = {
|
|
|
543
539
|
|
|
544
540
|
<ListItem>
|
|
545
541
|
<ListItemLeading>
|
|
546
|
-
<Spot size={48}
|
|
542
|
+
<Spot size={48} icon={Wallet} />
|
|
547
543
|
<ListItemContent>
|
|
548
544
|
<ListItemTitle>Content Variant</ListItemTitle>
|
|
549
545
|
<ListItemDescription>With description</ListItemDescription>
|
|
@@ -559,7 +555,7 @@ export const CompositionShowcase: Story = {
|
|
|
559
555
|
|
|
560
556
|
<ListItem>
|
|
561
557
|
<ListItemLeading>
|
|
562
|
-
<Spot size={48}
|
|
558
|
+
<Spot size={48} icon={Wallet} />
|
|
563
559
|
<ListItemContent>
|
|
564
560
|
<ListItemTitle>Content Variant</ListItemTitle>
|
|
565
561
|
<ListItemDescription>Custom style</ListItemDescription>
|
|
@@ -577,7 +573,7 @@ export const CompositionShowcase: Story = {
|
|
|
577
573
|
|
|
578
574
|
<ListItem>
|
|
579
575
|
<ListItemLeading>
|
|
580
|
-
<Spot size={48}
|
|
576
|
+
<Spot size={48} icon={Wallet} />
|
|
581
577
|
<ListItemContent>
|
|
582
578
|
<ListItemTitle>Content Variant</ListItemTitle>
|
|
583
579
|
<ListItemDescription>Custom style</ListItemDescription>
|
|
@@ -595,7 +591,7 @@ export const CompositionShowcase: Story = {
|
|
|
595
591
|
|
|
596
592
|
<ListItem>
|
|
597
593
|
<ListItemLeading>
|
|
598
|
-
<Spot size={48}
|
|
594
|
+
<Spot size={48} icon={Settings} />
|
|
599
595
|
<ListItemContent>
|
|
600
596
|
<ListItemTitle>Tag Variant</ListItemTitle>
|
|
601
597
|
<ListItemDescription>With description</ListItemDescription>
|
|
@@ -608,7 +604,7 @@ export const CompositionShowcase: Story = {
|
|
|
608
604
|
|
|
609
605
|
<ListItem>
|
|
610
606
|
<ListItemLeading>
|
|
611
|
-
<Spot size={48}
|
|
607
|
+
<Spot size={48} icon={Wallet} />
|
|
612
608
|
<ListItemContent>
|
|
613
609
|
<ListItemContentRow>
|
|
614
610
|
<ListItemTitle>Complex 1</ListItemTitle>
|
|
@@ -630,7 +626,7 @@ export const CompositionShowcase: Story = {
|
|
|
630
626
|
|
|
631
627
|
<ListItem>
|
|
632
628
|
<ListItemLeading>
|
|
633
|
-
<Spot size={48}
|
|
629
|
+
<Spot size={48} icon={Wallet} />
|
|
634
630
|
<ListItemContent>
|
|
635
631
|
<ListItemTitle>Complex 2</ListItemTitle>
|
|
636
632
|
<ListItemDescription>With description</ListItemDescription>
|
|
@@ -88,7 +88,7 @@ const useRootStyles = ({
|
|
|
88
88
|
*
|
|
89
89
|
* <ListItem onPress={() => console.log('Clicked!')}>
|
|
90
90
|
* <ListItemLeading>
|
|
91
|
-
* <Spot size={48}
|
|
91
|
+
* <Spot size={48} icon={Wallet} />
|
|
92
92
|
* <ListItemContent>
|
|
93
93
|
* <ListItemTitle>Balance</ListItemTitle>
|
|
94
94
|
* <ListItemDescription>Optional description</ListItemDescription>
|
|
@@ -258,7 +258,7 @@ const items = [
|
|
|
258
258
|
return (
|
|
259
259
|
<SelectListItem value={item.value}>
|
|
260
260
|
<SelectListItemLeading>
|
|
261
|
-
<Spot
|
|
261
|
+
<Spot icon={Wallet} />
|
|
262
262
|
</SelectListItemLeading>
|
|
263
263
|
<SelectListItemContent>
|
|
264
264
|
<SelectListItemContentRow>
|
|
@@ -376,7 +376,7 @@ export const WithDisabledItems: Story = {
|
|
|
376
376
|
renderItem={(item) => (
|
|
377
377
|
<SelectListItem value={item.value} disabled={item.disabled}>
|
|
378
378
|
<SelectListItemLeading>
|
|
379
|
-
<Spot
|
|
379
|
+
<Spot icon={Settings} />
|
|
380
380
|
</SelectListItemLeading>
|
|
381
381
|
<SelectListItemContent>
|
|
382
382
|
<SelectListItemText>{item.label}</SelectListItemText>
|
|
@@ -1,48 +1,69 @@
|
|
|
1
1
|
import figma from '@figma/code-connect';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
CheckmarkCircleFill,
|
|
4
|
+
ClockFill,
|
|
5
|
+
DeleteCircleFill,
|
|
6
|
+
InformationFill,
|
|
7
|
+
Placeholder,
|
|
8
|
+
WarningFill,
|
|
9
|
+
} from '../../symbols';
|
|
10
|
+
import { Spinner } from '../Spinner';
|
|
3
11
|
import { Spot } from './Spot';
|
|
4
|
-
import type { SpotAppearance } from './types';
|
|
12
|
+
import type { SpotAppearance, SpotFill, SpotProps } from './types';
|
|
5
13
|
|
|
6
14
|
figma.connect(
|
|
7
15
|
Spot,
|
|
8
16
|
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=6786%3A4738',
|
|
9
17
|
{
|
|
10
18
|
imports: [
|
|
11
|
-
"import { Spot } from '@ledgerhq/lumen-ui-rnative'",
|
|
12
|
-
"import { Placeholder } from '@ledgerhq/lumen-ui-rnative/symbols'",
|
|
19
|
+
"import { Spot, Spinner } from '@ledgerhq/lumen-ui-rnative'",
|
|
20
|
+
"import { CheckmarkCircleFill, ClockFill, DeleteCircleFill, InformationFill, Placeholder, WarningFill } from '@ledgerhq/lumen-ui-rnative/symbols'",
|
|
13
21
|
],
|
|
14
22
|
props: {
|
|
15
23
|
disabled: figma.enum('state', {
|
|
16
24
|
disabled: true,
|
|
17
25
|
}),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
number: 'number',
|
|
22
|
-
'info-muted': 'info',
|
|
23
|
-
warning: 'warning',
|
|
24
|
-
error: 'error',
|
|
25
|
-
check: 'check',
|
|
26
|
-
bluetooth: 'bluetooth',
|
|
26
|
+
fill: figma.enum('appearance', {
|
|
27
|
+
transparent: 'transparent',
|
|
28
|
+
plain: 'plain',
|
|
27
29
|
}),
|
|
28
|
-
|
|
29
|
-
'
|
|
30
|
+
appearance: figma.enum('color', {
|
|
31
|
+
base: 'base',
|
|
32
|
+
success: 'success',
|
|
33
|
+
error: 'error',
|
|
34
|
+
warning: 'warning',
|
|
35
|
+
muted: 'muted',
|
|
36
|
+
'decorative-blue': 'decorative-blue',
|
|
37
|
+
'decorative-pink': 'decorative-pink',
|
|
38
|
+
'decorative-purple': 'decorative-purple',
|
|
39
|
+
'decorative-green': 'decorative-green',
|
|
40
|
+
'decorative-turquoise': 'decorative-turquoise',
|
|
41
|
+
'decorative-yellow': 'decorative-yellow',
|
|
42
|
+
'decorative-orange': 'decorative-orange',
|
|
43
|
+
'decorative-red': 'decorative-red',
|
|
30
44
|
}),
|
|
31
|
-
|
|
32
|
-
|
|
45
|
+
icon: figma.enum('content', {
|
|
46
|
+
'interface-icon': figma.enum('preset', {
|
|
47
|
+
none: Placeholder,
|
|
48
|
+
success: CheckmarkCircleFill,
|
|
49
|
+
error: DeleteCircleFill,
|
|
50
|
+
warning: WarningFill,
|
|
51
|
+
info: InformationFill,
|
|
52
|
+
pending: ClockFill,
|
|
53
|
+
}),
|
|
54
|
+
loader: Spinner,
|
|
33
55
|
}),
|
|
34
56
|
},
|
|
35
57
|
example: (props: {
|
|
36
58
|
disabled: boolean;
|
|
59
|
+
fill: SpotFill;
|
|
37
60
|
appearance: SpotAppearance;
|
|
38
|
-
|
|
39
|
-
icon: any;
|
|
40
|
-
number: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
61
|
+
icon: SpotProps['icon'];
|
|
41
62
|
}) => (
|
|
42
63
|
<Spot
|
|
43
64
|
appearance={props.appearance}
|
|
65
|
+
fill={props.fill}
|
|
44
66
|
icon={props.icon}
|
|
45
|
-
number={props.number}
|
|
46
67
|
disabled={props.disabled}
|
|
47
68
|
/>
|
|
48
69
|
),
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, Canvas, Controls, Source } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as SpotStories from './Spot.stories';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import {
|
|
4
|
+
CustomTabs,
|
|
5
|
+
Tab,
|
|
6
|
+
SetupNote,
|
|
7
|
+
} from '../../../../../.storybook/components';
|
|
6
8
|
|
|
7
9
|
<Meta title='Core/Spot' of={SpotStories} />
|
|
8
10
|
|
|
@@ -13,7 +15,7 @@ import { CustomTabs, Tab } from '../../../../../.storybook/components';
|
|
|
13
15
|
|
|
14
16
|
## Introduction
|
|
15
17
|
|
|
16
|
-
Spots are circular
|
|
18
|
+
Spots are circular icon containers. `appearance` selects a color palette. `fill` chooses whether that palette paints only the icon, or the circle as well.
|
|
17
19
|
|
|
18
20
|
> View in [Figma](https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7/2.-Components-Library?node-id=6786-4738).
|
|
19
21
|
|
|
@@ -21,154 +23,91 @@ Spots are circular status indicators that provide visual feedback about differen
|
|
|
21
23
|
|
|
22
24
|
<Canvas of={SpotStories.Base} />
|
|
23
25
|
|
|
24
|
-
- **Circular
|
|
25
|
-
- **
|
|
26
|
+
- **Circular container**: Transparent muted fill, or a solid fill from the palette
|
|
27
|
+
- **Icon**: Status spots pass a filled symbol such as `CheckmarkCircleFill`
|
|
26
28
|
|
|
27
|
-
## Properties
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
## Properties
|
|
30
31
|
|
|
31
32
|
<Canvas of={SpotStories.Base} />
|
|
32
33
|
<Controls of={SpotStories.Base} />
|
|
33
34
|
|
|
34
|
-
### Appearance
|
|
35
|
-
|
|
36
|
-
There are 8 predefined spot appearances, each serving different purposes:
|
|
35
|
+
### Appearance
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
- **bluetooth**: Bluetooth connectivity indicator
|
|
40
|
-
- **check**: Success/completion state
|
|
41
|
-
- **error**: Error or failure state
|
|
42
|
-
- **warning**: Warning or caution state
|
|
43
|
-
- **info**: Information state
|
|
44
|
-
- **loader**: Loading or processing state
|
|
45
|
-
- **number**: Numeric display (0-9)
|
|
37
|
+
`appearance` is the color palette. On a transparent fill it colors the icon. On a plain fill it also paints the circle, using the palette's paired text color.
|
|
46
38
|
|
|
47
39
|
<Canvas of={SpotStories.AppearanceShowcase} />
|
|
48
40
|
|
|
49
|
-
###
|
|
41
|
+
### Fill
|
|
50
42
|
|
|
51
|
-
|
|
43
|
+
`transparent` keeps the muted transparent circle. `plain` uses the palette's solid background.
|
|
52
44
|
|
|
53
|
-
<Canvas of={SpotStories.
|
|
45
|
+
<Canvas of={SpotStories.FillShowcase} />
|
|
54
46
|
|
|
55
|
-
###
|
|
47
|
+
### Size
|
|
56
48
|
|
|
57
|
-
|
|
49
|
+
<Canvas of={SpotStories.SizeShowcase} />
|
|
58
50
|
|
|
59
|
-
<Canvas of={SpotStories.StatesShowcase} />
|
|
60
51
|
|
|
61
|
-
###
|
|
52
|
+
### Loading
|
|
62
53
|
|
|
63
|
-
|
|
54
|
+
Pass `Spinner` as the icon to keep the circle around a loading indicator. Spot sizes the spinner from its own size.
|
|
64
55
|
|
|
65
|
-
|
|
66
|
-
- `appearance: 'number'` requires a `number` prop (0-9)
|
|
67
|
-
- All other appearances are self-contained
|
|
56
|
+
<Canvas of={SpotStories.WithSpinner} />
|
|
68
57
|
|
|
69
|
-
|
|
58
|
+
### Number
|
|
70
59
|
|
|
71
|
-
|
|
60
|
+
A single digit uses `SpotNumber`. It follows the same `appearance`, `fill`, and `size`.
|
|
72
61
|
|
|
73
|
-
|
|
74
|
-
- Screen reader support for status descriptions
|
|
75
|
-
- Keyboard navigation considerations
|
|
76
|
-
- Semantic labeling for different states
|
|
62
|
+
<Canvas of={SpotStories.WithNumber} />
|
|
77
63
|
|
|
78
|
-
|
|
79
|
-
<Tab label="Implementation">
|
|
80
|
-
|
|
81
|
-
## Setup
|
|
64
|
+
### With DotSymbol
|
|
82
65
|
|
|
83
|
-
|
|
66
|
+
A coin badge stays a `DotSymbol` wrapped around the spot.
|
|
84
67
|
|
|
85
|
-
|
|
68
|
+
<Canvas of={SpotStories.WithDotSymbol} />
|
|
86
69
|
|
|
87
|
-
|
|
88
|
-
import { Spot } from '@ledgerhq/lumen-ui-rnative';
|
|
89
|
-
|
|
90
|
-
function MyComponent() {
|
|
91
|
-
return <Spot appearance='check' />;
|
|
92
|
-
}
|
|
93
|
-
```
|
|
70
|
+
## Accessibility
|
|
94
71
|
|
|
95
|
-
|
|
72
|
+
When a spot conveys status, label the Spot container (for example, `<Spot accessible accessibilityLabel='Success' ... />`). Color alone does not communicate the state.
|
|
96
73
|
|
|
97
|
-
|
|
74
|
+
</Tab>
|
|
75
|
+
<Tab label="Implementation">
|
|
98
76
|
|
|
99
|
-
```
|
|
100
|
-
|
|
77
|
+
```bash
|
|
78
|
+
npm install @ledgerhq/lumen-ui-rnative
|
|
101
79
|
```
|
|
102
80
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
The Spot component supports custom icons through the discriminated union type system:
|
|
81
|
+
<SetupNote />
|
|
106
82
|
|
|
107
|
-
|
|
108
|
-
import { Spot, Box } from '@ledgerhq/lumen-ui-rnative';
|
|
109
|
-
import { Settings, Heart, Star } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
83
|
+
## Basic usage
|
|
110
84
|
|
|
111
|
-
|
|
112
|
-
return (
|
|
113
|
-
<Box lx={{ flexDirection: 'row', gap: 's16' }}>
|
|
114
|
-
<Spot appearance='icon' icon={Settings} />
|
|
115
|
-
<Spot appearance='icon' icon={Heart} />
|
|
116
|
-
<Spot appearance='icon' icon={Star} />
|
|
117
|
-
</Box>
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### With Numbers
|
|
85
|
+
<Source of={SpotStories.Base} />
|
|
123
86
|
|
|
124
|
-
|
|
87
|
+
## Appearance
|
|
125
88
|
|
|
126
|
-
|
|
127
|
-
import { Spot, Box } from '@ledgerhq/lumen-ui-rnative';
|
|
89
|
+
<Source of={SpotStories.AppearanceShowcase} />
|
|
128
90
|
|
|
129
|
-
|
|
130
|
-
return (
|
|
131
|
-
<Box lx={{ flexDirection: 'row', gap: 's16' }}>
|
|
132
|
-
<Spot appearance='number' number={1} />
|
|
133
|
-
<Spot appearance='number' number={2} />
|
|
134
|
-
<Spot appearance='number' number={3} />
|
|
135
|
-
</Box>
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
```
|
|
91
|
+
## Fill
|
|
139
92
|
|
|
140
|
-
|
|
93
|
+
<Source of={SpotStories.FillShowcase} />
|
|
141
94
|
|
|
142
|
-
|
|
95
|
+
## Size
|
|
143
96
|
|
|
144
|
-
|
|
145
|
-
import { Spot, Box } from '@ledgerhq/lumen-ui-rnative';
|
|
97
|
+
<Source of={SpotStories.SizeShowcase} />
|
|
146
98
|
|
|
147
|
-
function StatusIndicators() {
|
|
148
|
-
return (
|
|
149
|
-
<Box lx={{ flexDirection: 'row', gap: 's16' }}>
|
|
150
|
-
{/* Success state */}
|
|
151
|
-
<Spot appearance='check' />
|
|
152
99
|
|
|
153
|
-
|
|
154
|
-
<Spot appearance='error' />
|
|
100
|
+
## Loading
|
|
155
101
|
|
|
156
|
-
|
|
157
|
-
<Spot appearance='warning' />
|
|
102
|
+
<Source of={SpotStories.WithSpinner} />
|
|
158
103
|
|
|
159
|
-
|
|
160
|
-
<Spot appearance='info' />
|
|
104
|
+
## Number
|
|
161
105
|
|
|
162
|
-
|
|
163
|
-
<Spot appearance='loader' />
|
|
106
|
+
<Source of={SpotStories.WithNumber} />
|
|
164
107
|
|
|
165
|
-
|
|
166
|
-
<Spot appearance='bluetooth' />
|
|
167
|
-
</Box>
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
```
|
|
108
|
+
## With DotSymbol
|
|
171
109
|
|
|
110
|
+
<Source of={SpotStories.WithDotSymbol} />
|
|
172
111
|
|
|
173
112
|
</Tab>
|
|
174
113
|
</CustomTabs>
|