@ledgerhq/lumen-ui-rnative 0.1.66 → 0.1.68

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 (136) hide show
  1. package/dist/module/lib/Components/core/BottomSheet/BottomSheet.stories.js +6 -3
  2. package/dist/module/lib/Components/core/BottomSheet/BottomSheet.stories.js.map +1 -1
  3. package/dist/module/lib/Components/core/Card/Card.figma.js +0 -1
  4. package/dist/module/lib/Components/core/Card/Card.figma.js.map +1 -1
  5. package/dist/module/lib/Components/core/Card/Card.stories.js +0 -2
  6. package/dist/module/lib/Components/core/Card/Card.stories.js.map +1 -1
  7. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.figma.js +0 -1
  8. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.figma.js.map +1 -1
  9. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.js +1 -1
  10. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.mdx +4 -4
  11. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.stories.js +1 -9
  12. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.stories.js.map +1 -1
  13. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.test.js +0 -1
  14. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.test.js.map +1 -1
  15. package/dist/module/lib/Components/core/DotSymbol/DotSymbol.stories.js +0 -5
  16. package/dist/module/lib/Components/core/DotSymbol/DotSymbol.stories.js.map +1 -1
  17. package/dist/module/lib/Components/core/ListItem/ListItem.figma.js +0 -1
  18. package/dist/module/lib/Components/core/ListItem/ListItem.figma.js.map +1 -1
  19. package/dist/module/lib/Components/core/ListItem/ListItem.js +1 -1
  20. package/dist/module/lib/Components/core/ListItem/ListItem.mdx +10 -10
  21. package/dist/module/lib/Components/core/ListItem/ListItem.stories.js +2 -29
  22. package/dist/module/lib/Components/core/ListItem/ListItem.stories.js.map +1 -1
  23. package/dist/module/lib/Components/core/SelectList/SelectList.mdx +1 -1
  24. package/dist/module/lib/Components/core/SelectList/SelectList.stories.js +0 -1
  25. package/dist/module/lib/Components/core/SelectList/SelectList.stories.js.map +1 -1
  26. package/dist/module/lib/Components/core/Spot/Spot.figma.js +31 -16
  27. package/dist/module/lib/Components/core/Spot/Spot.figma.js.map +1 -1
  28. package/dist/module/lib/Components/core/Spot/Spot.js +24 -146
  29. package/dist/module/lib/Components/core/Spot/Spot.js.map +1 -1
  30. package/dist/module/lib/Components/core/Spot/Spot.mdx +47 -108
  31. package/dist/module/lib/Components/core/Spot/Spot.stories.js +108 -215
  32. package/dist/module/lib/Components/core/Spot/Spot.stories.js.map +1 -1
  33. package/dist/module/lib/Components/core/Spot/Spot.test.js +61 -0
  34. package/dist/module/lib/Components/core/Spot/Spot.test.js.map +1 -0
  35. package/dist/module/lib/Components/core/Spot/SpotNumber.js +56 -0
  36. package/dist/module/lib/Components/core/Spot/SpotNumber.js.map +1 -0
  37. package/dist/module/lib/Components/core/Spot/SpotNumber.test.js +72 -0
  38. package/dist/module/lib/Components/core/Spot/SpotNumber.test.js.map +1 -0
  39. package/dist/module/lib/Components/core/Spot/index.js +1 -0
  40. package/dist/module/lib/Components/core/Spot/index.js.map +1 -1
  41. package/dist/module/lib/Components/core/Spot/useSpotStyles.js +93 -0
  42. package/dist/module/lib/Components/core/Spot/useSpotStyles.js.map +1 -0
  43. package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.test.js +0 -1
  44. package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.test.js.map +1 -1
  45. package/dist/module/lib/Components/core/Tile/Tile.figma.js +0 -1
  46. package/dist/module/lib/Components/core/Tile/Tile.figma.js.map +1 -1
  47. package/dist/module/lib/Components/core/Tile/Tile.js +3 -3
  48. package/dist/module/lib/Components/core/Tile/Tile.mdx +8 -8
  49. package/dist/module/lib/Components/core/Tile/Tile.stories.js +7 -25
  50. package/dist/module/lib/Components/core/Tile/Tile.stories.js.map +1 -1
  51. package/dist/module/lib/Components/symbols/icons/AiBubble.js +60 -0
  52. package/dist/module/lib/Components/symbols/icons/AiBubble.js.map +1 -0
  53. package/dist/module/lib/Components/symbols/icons/ArrowBottomLeft.js +49 -0
  54. package/dist/module/lib/Components/symbols/icons/ArrowBottomLeft.js.map +1 -0
  55. package/dist/module/lib/Components/symbols/icons/Bug.js +1 -1
  56. package/dist/module/lib/Components/symbols/icons/Bug.js.map +1 -1
  57. package/dist/module/lib/Components/symbols/icons/Hourglass.js +49 -0
  58. package/dist/module/lib/Components/symbols/icons/Hourglass.js.map +1 -0
  59. package/dist/module/lib/Components/symbols/icons/Repeat.js +49 -0
  60. package/dist/module/lib/Components/symbols/icons/Repeat.js.map +1 -0
  61. package/dist/module/lib/Components/symbols/icons/Robot.js +57 -0
  62. package/dist/module/lib/Components/symbols/icons/Robot.js.map +1 -0
  63. package/dist/module/lib/Components/symbols/icons/Switch.js +11 -5
  64. package/dist/module/lib/Components/symbols/icons/Switch.js.map +1 -1
  65. package/dist/module/lib/Components/symbols/icons/Wifi.js +52 -0
  66. package/dist/module/lib/Components/symbols/icons/Wifi.js.map +1 -0
  67. package/dist/module/lib/Components/symbols/index.js +6 -0
  68. package/dist/module/lib/Components/symbols/index.js.map +1 -1
  69. package/dist/typescript/src/lib/Components/core/ContentBanner/ContentBanner.d.ts +1 -1
  70. package/dist/typescript/src/lib/Components/core/ListItem/ListItem.d.ts +1 -1
  71. package/dist/typescript/src/lib/Components/core/Spot/Spot.d.ts +7 -25
  72. package/dist/typescript/src/lib/Components/core/Spot/Spot.d.ts.map +1 -1
  73. package/dist/typescript/src/lib/Components/core/Spot/SpotNumber.d.ts +16 -0
  74. package/dist/typescript/src/lib/Components/core/Spot/SpotNumber.d.ts.map +1 -0
  75. package/dist/typescript/src/lib/Components/core/Spot/index.d.ts +1 -0
  76. package/dist/typescript/src/lib/Components/core/Spot/index.d.ts.map +1 -1
  77. package/dist/typescript/src/lib/Components/core/Spot/types.d.ts +29 -29
  78. package/dist/typescript/src/lib/Components/core/Spot/types.d.ts.map +1 -1
  79. package/dist/typescript/src/lib/Components/core/Spot/useSpotStyles.d.ts +14 -0
  80. package/dist/typescript/src/lib/Components/core/Spot/useSpotStyles.d.ts.map +1 -0
  81. package/dist/typescript/src/lib/Components/core/Tile/Tile.d.ts +3 -3
  82. package/dist/typescript/src/lib/Components/symbols/icons/AiBubble.d.ts +35 -0
  83. package/dist/typescript/src/lib/Components/symbols/icons/AiBubble.d.ts.map +1 -0
  84. package/dist/typescript/src/lib/Components/symbols/icons/ArrowBottomLeft.d.ts +35 -0
  85. package/dist/typescript/src/lib/Components/symbols/icons/ArrowBottomLeft.d.ts.map +1 -0
  86. package/dist/typescript/src/lib/Components/symbols/icons/Hourglass.d.ts +35 -0
  87. package/dist/typescript/src/lib/Components/symbols/icons/Hourglass.d.ts.map +1 -0
  88. package/dist/typescript/src/lib/Components/symbols/icons/Repeat.d.ts +35 -0
  89. package/dist/typescript/src/lib/Components/symbols/icons/Repeat.d.ts.map +1 -0
  90. package/dist/typescript/src/lib/Components/symbols/icons/Robot.d.ts +35 -0
  91. package/dist/typescript/src/lib/Components/symbols/icons/Robot.d.ts.map +1 -0
  92. package/dist/typescript/src/lib/Components/symbols/icons/Switch.d.ts.map +1 -1
  93. package/dist/typescript/src/lib/Components/symbols/icons/Wifi.d.ts +35 -0
  94. package/dist/typescript/src/lib/Components/symbols/icons/Wifi.d.ts.map +1 -0
  95. package/dist/typescript/src/lib/Components/symbols/index.d.ts +6 -0
  96. package/dist/typescript/src/lib/Components/symbols/index.d.ts.map +1 -1
  97. package/package.json +2 -2
  98. package/src/lib/Components/core/BottomSheet/BottomSheet.stories.tsx +12 -4
  99. package/src/lib/Components/core/Card/Card.figma.tsx +1 -1
  100. package/src/lib/Components/core/Card/Card.stories.tsx +2 -2
  101. package/src/lib/Components/core/ContentBanner/ContentBanner.figma.tsx +1 -1
  102. package/src/lib/Components/core/ContentBanner/ContentBanner.mdx +4 -4
  103. package/src/lib/Components/core/ContentBanner/ContentBanner.stories.tsx +9 -9
  104. package/src/lib/Components/core/ContentBanner/ContentBanner.test.tsx +1 -1
  105. package/src/lib/Components/core/ContentBanner/ContentBanner.tsx +1 -1
  106. package/src/lib/Components/core/DotSymbol/DotSymbol.stories.tsx +5 -5
  107. package/src/lib/Components/core/ListItem/ListItem.figma.tsx +1 -1
  108. package/src/lib/Components/core/ListItem/ListItem.mdx +10 -10
  109. package/src/lib/Components/core/ListItem/ListItem.stories.tsx +29 -33
  110. package/src/lib/Components/core/ListItem/ListItem.tsx +1 -1
  111. package/src/lib/Components/core/SelectList/SelectList.mdx +1 -1
  112. package/src/lib/Components/core/SelectList/SelectList.stories.tsx +1 -1
  113. package/src/lib/Components/core/Spot/Spot.figma.tsx +42 -21
  114. package/src/lib/Components/core/Spot/Spot.mdx +47 -108
  115. package/src/lib/Components/core/Spot/Spot.stories.tsx +114 -175
  116. package/src/lib/Components/core/Spot/Spot.test.tsx +71 -0
  117. package/src/lib/Components/core/Spot/Spot.tsx +21 -163
  118. package/src/lib/Components/core/Spot/SpotNumber.test.tsx +93 -0
  119. package/src/lib/Components/core/Spot/SpotNumber.tsx +48 -0
  120. package/src/lib/Components/core/Spot/index.ts +1 -0
  121. package/src/lib/Components/core/Spot/types.ts +39 -41
  122. package/src/lib/Components/core/Spot/useSpotStyles.ts +119 -0
  123. package/src/lib/Components/core/ThemeProvider/ThemeProvider.test.tsx +1 -1
  124. package/src/lib/Components/core/Tile/Tile.figma.tsx +1 -1
  125. package/src/lib/Components/core/Tile/Tile.mdx +8 -8
  126. package/src/lib/Components/core/Tile/Tile.stories.tsx +32 -25
  127. package/src/lib/Components/core/Tile/Tile.tsx +3 -3
  128. package/src/lib/Components/symbols/icons/AiBubble.tsx +51 -0
  129. package/src/lib/Components/symbols/icons/ArrowBottomLeft.tsx +44 -0
  130. package/src/lib/Components/symbols/icons/Bug.tsx +1 -1
  131. package/src/lib/Components/symbols/icons/Hourglass.tsx +44 -0
  132. package/src/lib/Components/symbols/icons/Repeat.tsx +44 -0
  133. package/src/lib/Components/symbols/icons/Robot.tsx +44 -0
  134. package/src/lib/Components/symbols/icons/Switch.tsx +8 -1
  135. package/src/lib/Components/symbols/icons/Wifi.tsx +48 -0
  136. package/src/lib/Components/symbols/index.ts +6 -0
@@ -1,8 +1,10 @@
1
- import { Meta, Story, Canvas, Controls } from '@storybook/addon-docs/blocks';
1
+ import { Meta, Canvas, Controls, Source } from '@storybook/addon-docs/blocks';
2
2
  import * as SpotStories from './Spot.stories';
3
- import { Spot } from './Spot';
4
- import { Box } from '../../primitives';
5
- import { CustomTabs, Tab } from '../../../../../.storybook/components';
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 status indicators that provide visual feedback about different states, actions, or information. They come in various predefined appearances and can display custom icons or numbers to convey specific meanings in the interface.
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 Container**: Circular background implemented with React Native View
25
- - **Content**: Icon, number, or loading indicator based on appearance type
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
- ### Overview
30
+ ## Properties
30
31
 
31
32
  <Canvas of={SpotStories.Base} />
32
33
  <Controls of={SpotStories.Base} />
33
34
 
34
- ### Appearance Types
35
-
36
- There are 8 predefined spot appearances, each serving different purposes:
35
+ ### Appearance
37
36
 
38
- - **icon**: Custom icon display
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
- ### Sizes
41
+ ### Fill
50
42
 
51
- There are 3 predefined spot sizes:
43
+ `transparent` keeps the muted transparent circle. `plain` uses the palette's solid background.
52
44
 
53
- <Canvas of={SpotStories.SizesShowcase} />
45
+ <Canvas of={SpotStories.FillShowcase} />
54
46
 
55
- ### States
47
+ ### Size
56
48
 
57
- The Spot component has an optional disabled state.
49
+ <Canvas of={SpotStories.SizeShowcase} />
58
50
 
59
- <Canvas of={SpotStories.StatesShowcase} />
60
51
 
61
- ### Discriminated Union Types
52
+ ### Loading
62
53
 
63
- The Spot component uses TypeScript's discriminated union pattern to ensure type safety:
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
- - `appearance: 'icon'` requires an `icon` prop
66
- - `appearance: 'number'` requires a `number` prop (0-9)
67
- - All other appearances are self-contained
56
+ <Canvas of={SpotStories.WithSpinner} />
68
57
 
69
- ## Accessibility
58
+ ### Number
70
59
 
71
- To be implemented:
60
+ A single digit uses `SpotNumber`. It follows the same `appearance`, `fill`, and `size`.
72
61
 
73
- - Color contrast verification
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
- </Tab>
79
- <Tab label="Implementation">
80
-
81
- ## Setup
64
+ ### With DotSymbol
82
65
 
83
- Install and set up the library with our [Setup Guide →](?path=/docs/getting-started-setup--docs).
66
+ A coin badge stays a `DotSymbol` wrapped around the spot.
84
67
 
85
- ### Basic Usage
68
+ <Canvas of={SpotStories.WithDotSymbol} />
86
69
 
87
- ```tsx
88
- import { Spot } from '@ledgerhq/lumen-ui-rnative';
89
-
90
- function MyComponent() {
91
- return <Spot appearance='check' />;
92
- }
93
- ```
70
+ ## Accessibility
94
71
 
95
- ### Layout Adjustments with lx
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
- Use the `lx` prop for layout adjustments like margins or positioning:
74
+ </Tab>
75
+ <Tab label="Implementation">
98
76
 
99
- ```tsx
100
- <Spot appearance='icon' icon={Settings} lx={{ marginTop: 's16', marginLeft: 's8' }} />
77
+ ```bash
78
+ npm install @ledgerhq/lumen-ui-rnative
101
79
  ```
102
80
 
103
- ### With Icons
104
-
105
- The Spot component supports custom icons through the discriminated union type system:
81
+ <SetupNote />
106
82
 
107
- ```tsx
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
- function MyComponent() {
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
- The Spot component can display numeric values from 0-9:
87
+ ## Appearance
125
88
 
126
- ```tsx
127
- import { Spot, Box } from '@ledgerhq/lumen-ui-rnative';
89
+ <Source of={SpotStories.AppearanceShowcase} />
128
90
 
129
- function MyComponent() {
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
- ### Status Indicators
93
+ <Source of={SpotStories.FillShowcase} />
141
94
 
142
- Spot is designed for status indication with predefined appearances:
95
+ ## Size
143
96
 
144
- ```tsx
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
- {/* Error state */}
154
- <Spot appearance='error' />
100
+ ## Loading
155
101
 
156
- {/* Warning state */}
157
- <Spot appearance='warning' />
102
+ <Source of={SpotStories.WithSpinner} />
158
103
 
159
- {/* Info state */}
160
- <Spot appearance='info' />
104
+ ## Number
161
105
 
162
- {/* Loading state */}
163
- <Spot appearance='loader' />
106
+ <Source of={SpotStories.WithNumber} />
164
107
 
165
- {/* Connectivity */}
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>
@@ -1,107 +1,73 @@
1
1
  "use strict";
2
2
 
3
3
  import { Box, Text } from "../../primitives/index.js";
4
- import { Settings, Plus, Heart, Star } from "../../symbols/index.js";
4
+ import { CheckmarkCircleFill, DeleteCircleFill, Heart, InformationFill, Settings, Star, WarningFill } from "../../symbols/index.js";
5
+ import { DotSymbol, getDotSymbolProps } from "../DotSymbol/index.js";
6
+ import { Spinner } from "../Spinner/index.js";
5
7
  import { Spot } from "./Spot.js";
8
+ import { SpotNumber } from "./SpotNumber.js";
6
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
10
  const meta = {
8
11
  component: Spot,
9
12
  id: 'rnative-spot',
10
13
  title: 'Core/Spot',
11
14
  parameters: {
15
+ layout: 'centered',
16
+ backgrounds: {
17
+ default: 'light'
18
+ },
12
19
  docs: {
13
20
  source: {
14
21
  language: 'tsx',
15
22
  format: true,
16
- type: 'code'
23
+ type: 'dynamic'
17
24
  }
18
25
  }
19
26
  },
20
27
  argTypes: {
21
- appearance: {
22
- control: 'select',
23
- options: ['icon', 'bluetooth', 'check', 'error', 'warning', 'info', 'loader', 'number'],
24
- description: 'The visual appearance and behavior of the spot'
25
- },
26
- size: {
27
- control: 'select',
28
- options: [32, 40, 48, 56, 72],
29
- description: 'The size of the spot'
30
- },
31
- disabled: {
32
- control: 'boolean',
33
- description: 'Whether the spot looks disabled'
34
- },
35
28
  icon: {
36
29
  control: 'select',
37
- description: 'Icon component to display (required for icon appearance)',
38
- options: ['None', 'Settings', 'Plus', 'Heart', 'Star'],
30
+ options: ['Settings', 'Heart', 'Star', 'CheckmarkCircleFill'],
39
31
  mapping: {
40
- None: undefined,
41
32
  Settings: Settings,
42
- Plus: Plus,
43
33
  Heart: Heart,
44
- Star: Star
34
+ Star: Star,
35
+ CheckmarkCircleFill: CheckmarkCircleFill
45
36
  }
46
- },
47
- number: {
48
- control: 'select',
49
- options: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
50
- description: 'Number to display (required for number appearance)'
51
37
  }
52
38
  }
53
39
  };
54
40
  export default meta;
55
41
  export const Base = {
56
42
  args: {
57
- appearance: 'icon',
58
43
  icon: Settings
59
44
  },
60
- parameters: {
61
- docs: {
62
- source: {
63
- code: `
64
- <Spot
65
- appearance="icon"
66
- icon={Settings}
67
- />
68
- `
69
- }
70
- }
71
- }
45
+ render: args => /*#__PURE__*/_jsx(Spot, {
46
+ ...args
47
+ })
72
48
  };
73
49
  export const AppearanceShowcase = {
74
- args: {
75
- appearance: 'icon',
76
- icon: Settings
77
- },
78
50
  render: () => {
79
51
  const appearances = [{
80
- name: 'Icon',
81
- appearance: 'icon',
52
+ name: 'Base',
53
+ appearance: 'base',
82
54
  icon: Settings
83
55
  }, {
84
- name: 'Bluetooth',
85
- appearance: 'bluetooth'
86
- }, {
87
- name: 'Check',
88
- appearance: 'check'
56
+ name: 'Success',
57
+ appearance: 'success',
58
+ icon: CheckmarkCircleFill
89
59
  }, {
90
60
  name: 'Error',
91
- appearance: 'error'
61
+ appearance: 'error',
62
+ icon: DeleteCircleFill
92
63
  }, {
93
64
  name: 'Warning',
94
- appearance: 'warning'
65
+ appearance: 'warning',
66
+ icon: WarningFill
95
67
  }, {
96
- name: 'Info',
97
- appearance: 'info'
98
- }, {
99
- name: 'Loader',
100
- appearance: 'loader'
101
- }, {
102
- name: 'Number',
103
- appearance: 'number',
104
- number: 3
68
+ name: 'Muted',
69
+ appearance: 'muted',
70
+ icon: InformationFill
105
71
  }];
106
72
  return /*#__PURE__*/_jsx(Box, {
107
73
  lx: {
@@ -113,122 +79,94 @@ export const AppearanceShowcase = {
113
79
  children: appearances.map(({
114
80
  name,
115
81
  appearance,
116
- icon,
117
- number
82
+ icon
118
83
  }) => /*#__PURE__*/_jsxs(Box, {
119
84
  lx: {
120
- width: 's64',
121
- flexDirection: 'column',
122
85
  alignItems: 'center',
123
- gap: 's4'
86
+ gap: 's4',
87
+ width: 's64'
124
88
  },
125
89
  children: [/*#__PURE__*/_jsx(Spot, {
126
90
  appearance: appearance,
127
- icon: icon,
128
- number: number
91
+ icon: icon
129
92
  }), /*#__PURE__*/_jsx(Text, {
130
93
  typography: "body3",
131
94
  lx: {
132
- color: 'muted'
95
+ color: 'muted',
96
+ textAlign: 'center'
133
97
  },
134
98
  children: name
135
99
  })]
136
- }, appearance))
137
- });
138
- }
139
- };
140
- export const IconVariants = {
141
- args: {
142
- appearance: 'icon',
143
- icon: Settings
144
- },
145
- render: () => {
146
- const icons = [{
147
- name: 'Settings',
148
- component: Settings
149
- }, {
150
- name: 'Plus',
151
- component: Plus
152
- }, {
153
- name: 'Heart',
154
- component: Heart
155
- }, {
156
- name: 'Star',
157
- component: Star
158
- }];
159
- return /*#__PURE__*/_jsx(Box, {
160
- lx: {
161
- flexDirection: 'row',
162
- gap: 's8',
163
- padding: 's8'
164
- },
165
- children: icons.map(({
166
- name,
167
- component: Icon
168
- }) => /*#__PURE__*/_jsx(Spot, {
169
- appearance: "icon",
170
- icon: Icon
171
100
  }, name))
172
101
  });
173
102
  }
174
103
  };
175
- export const NumberVariants = {
176
- args: {
177
- appearance: 'icon',
178
- icon: Settings
179
- },
104
+ export const FillShowcase = {
180
105
  render: () => {
181
- const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
106
+ const appearances = ['base', 'success', 'error', 'warning', 'muted', 'decorative-blue', 'decorative-pink', 'decorative-purple', 'decorative-green', 'decorative-turquoise', 'decorative-yellow', 'decorative-orange', 'decorative-red'];
182
107
  return /*#__PURE__*/_jsx(Box, {
183
108
  lx: {
184
- flexDirection: 'row',
185
- flexWrap: 'wrap',
186
- gap: 's8',
109
+ gap: 's16',
187
110
  padding: 's8'
188
111
  },
189
- children: numbers.map(num => /*#__PURE__*/_jsx(Spot, {
190
- appearance: "number",
191
- number: num
192
- }, num))
112
+ children: ['transparent', 'plain'].map(fill => /*#__PURE__*/_jsxs(Box, {
113
+ lx: {
114
+ gap: 's8'
115
+ },
116
+ children: [/*#__PURE__*/_jsx(Text, {
117
+ typography: "body2SemiBold",
118
+ lx: {
119
+ color: 'base'
120
+ },
121
+ children: fill
122
+ }), /*#__PURE__*/_jsx(Box, {
123
+ lx: {
124
+ flexDirection: 'row',
125
+ flexWrap: 'wrap',
126
+ gap: 's12'
127
+ },
128
+ children: appearances.map(appearance => /*#__PURE__*/_jsx(Spot, {
129
+ appearance: appearance,
130
+ fill: fill,
131
+ icon: Settings
132
+ }, appearance))
133
+ })]
134
+ }, fill))
193
135
  });
194
136
  }
195
137
  };
196
- export const SizesShowcase = {
197
- args: {
198
- appearance: 'icon',
199
- icon: Settings
200
- },
138
+ export const SizeShowcase = {
201
139
  render: () => {
202
140
  const sizes = [32, 40, 48, 56, 72];
203
141
  return /*#__PURE__*/_jsx(Box, {
204
142
  lx: {
205
- flexDirection: 'column',
206
143
  gap: 's32',
207
144
  padding: 's16'
208
145
  },
209
146
  children: sizes.map(size => /*#__PURE__*/_jsxs(Box, {
210
147
  lx: {
211
- flexDirection: 'column',
212
148
  gap: 's16'
213
149
  },
214
150
  children: [/*#__PURE__*/_jsxs(Text, {
215
- typography: "heading5SemiBold",
151
+ typography: "body2SemiBold",
216
152
  children: [size, "px"]
217
153
  }), /*#__PURE__*/_jsxs(Box, {
218
154
  lx: {
219
155
  flexDirection: 'row',
220
- gap: 's12'
156
+ gap: 's12',
157
+ alignItems: 'center'
221
158
  },
222
159
  children: [/*#__PURE__*/_jsx(Spot, {
223
- appearance: "icon",
224
160
  icon: Settings,
225
161
  size: size
226
162
  }), /*#__PURE__*/_jsx(Spot, {
227
- appearance: "info",
163
+ appearance: "muted",
164
+ icon: InformationFill,
228
165
  size: size
229
166
  }), /*#__PURE__*/_jsx(Spot, {
230
- appearance: "number",
231
- number: 5,
167
+ appearance: "success",
168
+ fill: "plain",
169
+ icon: Settings,
232
170
  size: size
233
171
  })]
234
172
  })]
@@ -236,94 +174,49 @@ export const SizesShowcase = {
236
174
  });
237
175
  }
238
176
  };
239
- export const StatesShowcase = {
240
- args: {
241
- appearance: 'icon',
242
- icon: Settings
243
- },
177
+ export const WithSpinner = {
244
178
  render: () => {
245
- return /*#__PURE__*/_jsxs(Box, {
179
+ const sizes = [32, 40, 48, 56, 72];
180
+ return /*#__PURE__*/_jsx(Box, {
246
181
  lx: {
247
- flexDirection: 'column',
248
- gap: 's16'
182
+ flexDirection: 'row',
183
+ alignItems: 'flex-end',
184
+ gap: 's16',
185
+ padding: 's16'
249
186
  },
250
- children: [/*#__PURE__*/_jsxs(Box, {
251
- lx: {
252
- flexDirection: 'column',
253
- gap: 's8'
254
- },
255
- children: [/*#__PURE__*/_jsx(Text, {
256
- typography: "body2",
257
- children: "Default"
258
- }), /*#__PURE__*/_jsxs(Box, {
259
- lx: {
260
- flexDirection: 'row',
261
- flexWrap: 'wrap',
262
- gap: 's16'
263
- },
264
- children: [/*#__PURE__*/_jsx(Box, {
265
- lx: {
266
- width: 's64',
267
- flexDirection: 'column',
268
- alignItems: 'center',
269
- gap: 's4'
270
- },
271
- children: /*#__PURE__*/_jsx(Spot, {
272
- appearance: "icon",
273
- icon: Settings
274
- })
275
- }), /*#__PURE__*/_jsx(Box, {
276
- lx: {
277
- width: 's64',
278
- flexDirection: 'column',
279
- alignItems: 'center',
280
- gap: 's4'
281
- },
282
- children: /*#__PURE__*/_jsx(Spot, {
283
- appearance: "bluetooth"
284
- })
285
- })]
286
- })]
287
- }), /*#__PURE__*/_jsxs(Box, {
288
- lx: {
289
- flexDirection: 'column',
290
- gap: 's8'
291
- },
292
- children: [/*#__PURE__*/_jsx(Text, {
293
- typography: "body2",
294
- children: "Disabled"
295
- }), /*#__PURE__*/_jsxs(Box, {
296
- lx: {
297
- flexDirection: 'row',
298
- flexWrap: 'wrap',
299
- gap: 's16'
300
- },
301
- children: [/*#__PURE__*/_jsx(Box, {
302
- lx: {
303
- width: 's64',
304
- flexDirection: 'column',
305
- alignItems: 'center',
306
- gap: 's4'
307
- },
308
- children: /*#__PURE__*/_jsx(Spot, {
309
- appearance: "icon",
310
- icon: Settings,
311
- disabled: true
312
- })
313
- }), /*#__PURE__*/_jsx(Box, {
314
- lx: {
315
- width: 's64',
316
- flexDirection: 'column',
317
- alignItems: 'center',
318
- gap: 's4'
319
- },
320
- children: /*#__PURE__*/_jsx(Spot, {
321
- appearance: "bluetooth",
322
- disabled: true
323
- })
324
- })]
325
- })]
326
- })]
187
+ children: sizes.map(size => /*#__PURE__*/_jsx(Spot, {
188
+ icon: Spinner,
189
+ size: size
190
+ }, size))
191
+ });
192
+ }
193
+ };
194
+ export const WithDotSymbol = {
195
+ render: () => {
196
+ return /*#__PURE__*/_jsx(Box, {
197
+ lx: {
198
+ padding: 's16'
199
+ },
200
+ children: /*#__PURE__*/_jsx(DotSymbol, {
201
+ src: "https://crypto-icons.ledger.com/BTC.png",
202
+ pin: "bottom-end",
203
+ ...getDotSymbolProps('spot', 48),
204
+ children: /*#__PURE__*/_jsx(Spot, {
205
+ icon: Settings
206
+ })
207
+ })
208
+ });
209
+ }
210
+ };
211
+ export const WithNumber = {
212
+ render: () => {
213
+ return /*#__PURE__*/_jsx(Box, {
214
+ lx: {
215
+ padding: 's16'
216
+ },
217
+ children: /*#__PURE__*/_jsx(SpotNumber, {
218
+ value: 9
219
+ })
327
220
  });
328
221
  }
329
222
  };