@ledgerhq/lumen-ui-rnative 0.1.3 → 0.1.5
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/package.json +1 -1
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.js +5 -1
- package/dist/src/lib/Components/TabBar/TabBar.d.ts.map +1 -1
- package/dist/src/lib/Components/TabBar/TabBar.js +9 -4
- package/jest.config.ts +0 -1
- package/package.json +1 -1
- package/src/lib/Components/AmountDisplay/AmountDisplay.tsx +8 -1
- package/src/lib/Components/TabBar/TabBar.tsx +27 -12
- package/src/lib/Components/Utility/Gradient/LinearGradient/LinearGradient.stories.tsx +1 -1
- package/tsconfig.json +3 -16
- package/tsconfig.lib.json +5 -0
- package/dist/src/lib/Animations/Pulse/Pulse.stories.d.ts +0 -9
- package/dist/src/lib/Animations/Pulse/Pulse.stories.d.ts.map +0 -1
- package/dist/src/lib/Animations/Pulse/Pulse.stories.js +0 -38
- package/dist/src/lib/Animations/Spin/Spin.stories.d.ts +0 -9
- package/dist/src/lib/Animations/Spin/Spin.stories.d.ts.map +0 -1
- package/dist/src/lib/Animations/Spin/Spin.stories.js +0 -27
- package/dist/src/lib/Components/AddressInput/AddressInput.stories.d.ts +0 -13
- package/dist/src/lib/Components/AddressInput/AddressInput.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/AddressInput/AddressInput.stories.js +0 -128
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.stories.d.ts +0 -10
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.stories.js +0 -127
- package/dist/src/lib/Components/AmountInput/AmountInput.stories.d.ts +0 -16
- package/dist/src/lib/Components/AmountInput/AmountInput.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/AmountInput/AmountInput.stories.js +0 -186
- package/dist/src/lib/Components/Avatar/Avatar.stories.d.ts +0 -22
- package/dist/src/lib/Components/Avatar/Avatar.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Avatar/Avatar.stories.js +0 -72
- package/dist/src/lib/Components/Banner/Banner.stories.d.ts +0 -16
- package/dist/src/lib/Components/Banner/Banner.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Banner/Banner.stories.js +0 -268
- package/dist/src/lib/Components/BottomSheet/BottomSheet.stories.d.ts +0 -87
- package/dist/src/lib/Components/BottomSheet/BottomSheet.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/BottomSheet/BottomSheet.stories.js +0 -266
- package/dist/src/lib/Components/Button/Button.stories.d.ts +0 -16
- package/dist/src/lib/Components/Button/Button.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Button/Button.stories.js +0 -143
- package/dist/src/lib/Components/CardButton/CardButton.stories.d.ts +0 -16
- package/dist/src/lib/Components/CardButton/CardButton.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/CardButton/CardButton.stories.js +0 -208
- package/dist/src/lib/Components/Checkbox/Checkbox.stories.d.ts +0 -14
- package/dist/src/lib/Components/Checkbox/Checkbox.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Checkbox/Checkbox.stories.js +0 -72
- package/dist/src/lib/Components/ContentBanner/ContentBanner.stories.d.ts +0 -11
- package/dist/src/lib/Components/ContentBanner/ContentBanner.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/ContentBanner/ContentBanner.stories.js +0 -91
- package/dist/src/lib/Components/Divider/Divider.stories.d.ts +0 -9
- package/dist/src/lib/Components/Divider/Divider.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Divider/Divider.stories.js +0 -51
- package/dist/src/lib/Components/Icon/Icon.stories.d.ts +0 -15
- package/dist/src/lib/Components/Icon/Icon.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Icon/Icon.stories.js +0 -137
- package/dist/src/lib/Components/IconButton/IconButton.stories.d.ts +0 -10
- package/dist/src/lib/Components/IconButton/IconButton.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/IconButton/IconButton.stories.js +0 -74
- package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.d.ts +0 -11
- package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.js +0 -90
- package/dist/src/lib/Components/Link/Link.stories.d.ts +0 -17
- package/dist/src/lib/Components/Link/Link.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Link/Link.stories.js +0 -275
- package/dist/src/lib/Components/ListItem/ListItem.stories.d.ts +0 -10
- package/dist/src/lib/Components/ListItem/ListItem.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/ListItem/ListItem.stories.js +0 -106
- package/dist/src/lib/Components/NavBar/NavBar.stories.d.ts +0 -10
- package/dist/src/lib/Components/NavBar/NavBar.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/NavBar/NavBar.stories.js +0 -72
- package/dist/src/lib/Components/PageIndicator/PageIndicator.stories.d.ts +0 -27
- package/dist/src/lib/Components/PageIndicator/PageIndicator.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/PageIndicator/PageIndicator.stories.js +0 -42
- package/dist/src/lib/Components/SearchInput/SearchInput.stories.d.ts +0 -12
- package/dist/src/lib/Components/SearchInput/SearchInput.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/SearchInput/SearchInput.stories.js +0 -98
- package/dist/src/lib/Components/SegmentedControl/SegmentedControl.stories.d.ts +0 -58
- package/dist/src/lib/Components/SegmentedControl/SegmentedControl.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/SegmentedControl/SegmentedControl.stories.js +0 -61
- package/dist/src/lib/Components/Select/Select.stories.d.ts +0 -11
- package/dist/src/lib/Components/Select/Select.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Select/Select.stories.js +0 -83
- package/dist/src/lib/Components/Skeleton/Skeleton.stories.d.ts +0 -11
- package/dist/src/lib/Components/Skeleton/Skeleton.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Skeleton/Skeleton.stories.js +0 -49
- package/dist/src/lib/Components/Spinner/Spinner.stories.d.ts +0 -9
- package/dist/src/lib/Components/Spinner/Spinner.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Spinner/Spinner.stories.js +0 -50
- package/dist/src/lib/Components/Spot/Spot.stories.d.ts +0 -12
- package/dist/src/lib/Components/Spot/Spot.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Spot/Spot.stories.js +0 -156
- package/dist/src/lib/Components/Stepper/Stepper.stories.d.ts +0 -9
- package/dist/src/lib/Components/Stepper/Stepper.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Stepper/Stepper.stories.js +0 -35
- package/dist/src/lib/Components/Subheader/Subheader.stories.d.ts +0 -10
- package/dist/src/lib/Components/Subheader/Subheader.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Subheader/Subheader.stories.js +0 -34
- package/dist/src/lib/Components/Switch/Switch.stories.d.ts +0 -14
- package/dist/src/lib/Components/Switch/Switch.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Switch/Switch.stories.js +0 -65
- package/dist/src/lib/Components/TabBar/TabBar.stories.d.ts +0 -50
- package/dist/src/lib/Components/TabBar/TabBar.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/TabBar/TabBar.stories.js +0 -60
- package/dist/src/lib/Components/Tag/Tag.stories.d.ts +0 -10
- package/dist/src/lib/Components/Tag/Tag.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Tag/Tag.stories.js +0 -45
- package/dist/src/lib/Components/TextInput/TextInput.stories.d.ts +0 -14
- package/dist/src/lib/Components/TextInput/TextInput.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/TextInput/TextInput.stories.js +0 -128
- package/dist/src/lib/Components/Tile/Tile.stories.d.ts +0 -14
- package/dist/src/lib/Components/Tile/Tile.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Tile/Tile.stories.js +0 -117
- package/dist/src/lib/Components/TileButton/TileButton.stories.d.ts +0 -12
- package/dist/src/lib/Components/TileButton/TileButton.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/TileButton/TileButton.stories.js +0 -63
- package/dist/src/lib/Components/Tooltip/Tooltip.stories.d.ts +0 -10
- package/dist/src/lib/Components/Tooltip/Tooltip.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Tooltip/Tooltip.stories.js +0 -50
- package/dist/src/lib/Components/Utility/Box/Box.stories.d.ts +0 -7
- package/dist/src/lib/Components/Utility/Box/Box.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Utility/Box/Box.stories.js +0 -42
- package/dist/src/lib/Components/Utility/Gradient/LinearGradient/LinearGradient.stories.d.ts +0 -11
- package/dist/src/lib/Components/Utility/Gradient/LinearGradient/LinearGradient.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Utility/Gradient/LinearGradient/LinearGradient.stories.js +0 -105
- package/dist/src/lib/Components/Utility/Gradient/RadialGradient/RadialGradient.stories.d.ts +0 -10
- package/dist/src/lib/Components/Utility/Gradient/RadialGradient/RadialGradient.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Utility/Gradient/RadialGradient/RadialGradient.stories.js +0 -101
- package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts +0 -7
- package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.js +0 -47
- package/dist/src/lib/Components/Utility/Text/Text.stories.d.ts +0 -7
- package/dist/src/lib/Components/Utility/Text/Text.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Utility/Text/Text.stories.js +0 -33
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Settings, Information, ArrowRight } from '../../Symbols';
|
|
3
|
-
import { Box, Text } from '../Utility';
|
|
4
|
-
import { Link } from './Link';
|
|
5
|
-
const meta = {
|
|
6
|
-
component: Link,
|
|
7
|
-
title: 'Action/Link',
|
|
8
|
-
parameters: {
|
|
9
|
-
docs: {
|
|
10
|
-
source: {
|
|
11
|
-
language: 'tsx',
|
|
12
|
-
format: true,
|
|
13
|
-
type: 'code',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
argTypes: {
|
|
18
|
-
appearance: {
|
|
19
|
-
control: 'select',
|
|
20
|
-
options: ['base', 'accent'],
|
|
21
|
-
description: 'The visual style appearance of the link',
|
|
22
|
-
},
|
|
23
|
-
size: {
|
|
24
|
-
control: 'select',
|
|
25
|
-
options: ['sm', 'md'],
|
|
26
|
-
description: 'The size of the link',
|
|
27
|
-
},
|
|
28
|
-
underline: {
|
|
29
|
-
control: 'boolean',
|
|
30
|
-
description: 'Whether to underline the link text',
|
|
31
|
-
},
|
|
32
|
-
icon: {
|
|
33
|
-
control: 'select',
|
|
34
|
-
description: 'Optional icon component to display',
|
|
35
|
-
options: ['None', 'Information', 'Settings', 'ArrowRight'],
|
|
36
|
-
mapping: {
|
|
37
|
-
None: undefined,
|
|
38
|
-
Information: Information,
|
|
39
|
-
Settings: Settings,
|
|
40
|
-
ArrowRight: ArrowRight,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
isExternal: {
|
|
44
|
-
control: 'boolean',
|
|
45
|
-
description: 'Whether to display external link icon',
|
|
46
|
-
},
|
|
47
|
-
children: {
|
|
48
|
-
control: 'text',
|
|
49
|
-
description: 'The content to be displayed inside the link',
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
export default meta;
|
|
54
|
-
export const Base = {
|
|
55
|
-
args: {
|
|
56
|
-
appearance: 'base',
|
|
57
|
-
size: 'md',
|
|
58
|
-
children: 'Base Link',
|
|
59
|
-
href: 'https://ledger.com',
|
|
60
|
-
},
|
|
61
|
-
parameters: {
|
|
62
|
-
docs: {
|
|
63
|
-
source: {
|
|
64
|
-
code: `
|
|
65
|
-
<Link appearance="base" href="https://ledger.com">
|
|
66
|
-
Base Link
|
|
67
|
-
</Link>
|
|
68
|
-
`,
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
export const WithIcon = {
|
|
74
|
-
args: {
|
|
75
|
-
appearance: 'base',
|
|
76
|
-
children: 'Link with Icon',
|
|
77
|
-
icon: Information,
|
|
78
|
-
href: 'https://ledger.com',
|
|
79
|
-
},
|
|
80
|
-
parameters: {
|
|
81
|
-
docs: {
|
|
82
|
-
source: {
|
|
83
|
-
code: `
|
|
84
|
-
<Link
|
|
85
|
-
appearance="base"
|
|
86
|
-
icon={Information}
|
|
87
|
-
href="https://ledger.com"
|
|
88
|
-
>
|
|
89
|
-
Link with Icon
|
|
90
|
-
</Link>
|
|
91
|
-
`,
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
export const External = {
|
|
97
|
-
args: {
|
|
98
|
-
appearance: 'base',
|
|
99
|
-
children: 'External Link',
|
|
100
|
-
isExternal: true,
|
|
101
|
-
href: 'https://ledger.com',
|
|
102
|
-
},
|
|
103
|
-
parameters: {
|
|
104
|
-
docs: {
|
|
105
|
-
source: {
|
|
106
|
-
code: `
|
|
107
|
-
<Link
|
|
108
|
-
appearance="base"
|
|
109
|
-
isExternal
|
|
110
|
-
href="https://ledger.com"
|
|
111
|
-
>
|
|
112
|
-
External Link
|
|
113
|
-
</Link>
|
|
114
|
-
`,
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
export const ExternalLinkWithIcon = {
|
|
120
|
-
args: {
|
|
121
|
-
appearance: 'base',
|
|
122
|
-
size: 'md',
|
|
123
|
-
children: 'External Link with Icon',
|
|
124
|
-
icon: Information,
|
|
125
|
-
isExternal: true,
|
|
126
|
-
href: 'https://ledger.com',
|
|
127
|
-
},
|
|
128
|
-
parameters: {
|
|
129
|
-
docs: {
|
|
130
|
-
source: {
|
|
131
|
-
code: `
|
|
132
|
-
<Link
|
|
133
|
-
appearance="base"
|
|
134
|
-
size="md"
|
|
135
|
-
icon={Information}
|
|
136
|
-
isExternal
|
|
137
|
-
href="https://ledger.com"
|
|
138
|
-
>
|
|
139
|
-
External Link with Icon
|
|
140
|
-
</Link>
|
|
141
|
-
`,
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
};
|
|
146
|
-
export const AppearanceShowcase = {
|
|
147
|
-
render: () => {
|
|
148
|
-
const appearances = [
|
|
149
|
-
{ name: 'Base', appearance: 'base' },
|
|
150
|
-
{ name: 'Accent', appearance: 'accent' },
|
|
151
|
-
];
|
|
152
|
-
return (_jsx(Box, { lx: { flexDirection: 'row', gap: 's32', padding: 's8' }, children: appearances.map(({ name, appearance }) => (_jsx(Link, { size: 'md', appearance: appearance, href: 'https://ledger.com', icon: Information, isExternal: true, children: name }, appearance))) }));
|
|
153
|
-
},
|
|
154
|
-
};
|
|
155
|
-
export const UnderlineShowcase = {
|
|
156
|
-
render: () => (_jsxs(Box, { lx: { flexDirection: 'column', gap: 's16', padding: 's8' }, children: [_jsx(Link, { appearance: 'accent', size: 'md', href: 'https://ledger.com', children: "With underline" }), _jsx(Link, { appearance: 'accent', size: 'md', underline: false, href: 'https://ledger.com', children: "Without underline" })] })),
|
|
157
|
-
};
|
|
158
|
-
export const SizesShowcase = {
|
|
159
|
-
render: () => (_jsxs(Box, { lx: { flexDirection: 'column', gap: 's16' }, children: [_jsxs(Box, { lx: {
|
|
160
|
-
flexDirection: 'row',
|
|
161
|
-
alignItems: 'center',
|
|
162
|
-
gap: 's32',
|
|
163
|
-
padding: 's8',
|
|
164
|
-
}, children: [_jsx(Link, { appearance: 'base', size: 'sm', href: 'https://ledger.com', icon: Information, isExternal: true, children: "Small" }), _jsx(Link, { appearance: 'base', size: 'md', href: 'https://ledger.com', icon: Information, isExternal: true, children: "Medium" })] }), _jsxs(Box, { lx: {
|
|
165
|
-
flexDirection: 'row',
|
|
166
|
-
alignItems: 'center',
|
|
167
|
-
gap: 's32',
|
|
168
|
-
padding: 's8',
|
|
169
|
-
}, children: [_jsx(Link, { appearance: 'accent', size: 'sm', href: 'https://ledger.com', icon: Information, isExternal: true, children: "Small Accent" }), _jsx(Link, { appearance: 'accent', size: 'md', href: 'https://ledger.com', icon: Information, isExternal: true, children: "Medium Accent" })] })] })),
|
|
170
|
-
};
|
|
171
|
-
export const StatesShowcase = {
|
|
172
|
-
render: () => (_jsxs(Box, { lx: {
|
|
173
|
-
flexDirection: 'row',
|
|
174
|
-
alignItems: 'center',
|
|
175
|
-
gap: 's16',
|
|
176
|
-
padding: 's8',
|
|
177
|
-
}, children: [_jsx(Link, { appearance: 'base', href: 'https://ledger.com', children: "Default" }), _jsx(Link, { appearance: 'accent', href: 'https://ledger.com', icon: ArrowRight, children: "With Icon" })] })),
|
|
178
|
-
};
|
|
179
|
-
export const ResponsiveLayout = {
|
|
180
|
-
render: () => (_jsxs(Box, { lx: {
|
|
181
|
-
width: 's256',
|
|
182
|
-
flexDirection: 'column',
|
|
183
|
-
gap: 's8',
|
|
184
|
-
borderRadius: 'sm',
|
|
185
|
-
borderColor: 'mutedSubtle',
|
|
186
|
-
borderWidth: 's1',
|
|
187
|
-
padding: 's8',
|
|
188
|
-
}, children: [_jsx(Link, { underline: true, href: 'https://ledger.com', children: "Short Link" }), _jsx(Link, { appearance: 'base', href: 'https://ledger.com', children: "This is a longer link text that will be truncated with ellipsis when it exceeds the container width" }), _jsx(Link, { appearance: 'base', href: 'https://ledger.com', icon: Information, isExternal: true, children: "Base with long text that is cut off" })] })),
|
|
189
|
-
};
|
|
190
|
-
export const WithCustomNavigation = {
|
|
191
|
-
render: () => {
|
|
192
|
-
const handlePress = () => {
|
|
193
|
-
console.log('Custom navigation triggered');
|
|
194
|
-
// In a real app: navigation.navigate('Dashboard')
|
|
195
|
-
};
|
|
196
|
-
return (_jsxs(Box, { lx: { flexDirection: 'column', gap: 's16', padding: 's8' }, children: [_jsx(Link, { appearance: 'base', size: 'md', onPress: handlePress, children: "Navigate to Dashboard" }), _jsx(Link, { appearance: 'accent', size: 'md', icon: ArrowRight, onPress: handlePress, children: "Continue to Next Screen" })] }));
|
|
197
|
-
},
|
|
198
|
-
parameters: {
|
|
199
|
-
docs: {
|
|
200
|
-
source: {
|
|
201
|
-
code: `
|
|
202
|
-
import { useNavigation } from '@react-navigation/native';
|
|
203
|
-
|
|
204
|
-
function MyComponent() {
|
|
205
|
-
const navigation = useNavigation();
|
|
206
|
-
|
|
207
|
-
return (
|
|
208
|
-
<>
|
|
209
|
-
<Link
|
|
210
|
-
appearance="base"
|
|
211
|
-
size="md"
|
|
212
|
-
onPress={() => navigation.navigate('Dashboard')}
|
|
213
|
-
>
|
|
214
|
-
Navigate to Dashboard
|
|
215
|
-
</Link>
|
|
216
|
-
|
|
217
|
-
<Link
|
|
218
|
-
appearance="accent"
|
|
219
|
-
size="md"
|
|
220
|
-
icon={ArrowRight}
|
|
221
|
-
onPress={() => navigation.navigate('Next')}
|
|
222
|
-
>
|
|
223
|
-
Continue to Next Screen
|
|
224
|
-
</Link>
|
|
225
|
-
</>
|
|
226
|
-
);
|
|
227
|
-
}
|
|
228
|
-
`,
|
|
229
|
-
},
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
};
|
|
233
|
-
export const InTextUsage = {
|
|
234
|
-
render: () => (_jsxs(Box, { lx: { flexDirection: 'column', gap: 's32', padding: 's8' }, children: [_jsxs(Text, { typography: 'body2', lx: { color: 'base' }, children: ["By continuing, you agree to our", ' ', _jsx(Link, { appearance: 'base', size: 'sm', href: 'https://ledger.com/terms', children: "Terms & Conditions" }), ' ', "and", ' ', _jsx(Link, { appearance: 'base', size: 'sm', href: 'https://ledger.com/privacy', children: "Privacy Policy" }), "."] }), _jsxs(Text, { typography: 'body1SemiBold', lx: { color: 'interactive' }, children: ["Need help?", ' ', _jsx(Link, { appearance: 'accent', size: 'md', href: 'https://ledger.com/support', children: "Contact Support" })] }), _jsxs(Text, { typography: 'body1SemiBold', lx: { color: 'base' }, children: ["Already have an account?", ' ', _jsx(Link, { appearance: 'accent', size: 'md', underline: false, href: 'https://ledger.com/signin', children: "Sign in" })] })] })),
|
|
235
|
-
parameters: {
|
|
236
|
-
docs: {
|
|
237
|
-
source: {
|
|
238
|
-
code: `
|
|
239
|
-
// Links within text content
|
|
240
|
-
<Text typography='body2' lx={{ color: 'base' }}>
|
|
241
|
-
By continuing, you agree to our{' '}
|
|
242
|
-
<Link appearance='base' size='sm' href='https://ledger.com/terms'>
|
|
243
|
-
Terms & Conditions
|
|
244
|
-
</Link>{' '}
|
|
245
|
-
and{' '}
|
|
246
|
-
<Link appearance='base' size='sm' href='https://ledger.com/privacy'>
|
|
247
|
-
Privacy Policy
|
|
248
|
-
</Link>.
|
|
249
|
-
</Text>
|
|
250
|
-
|
|
251
|
-
// Heading with inline link
|
|
252
|
-
<Text typography='body1SemiBold' lx={{ color: 'interactive' }}>
|
|
253
|
-
Need help?{' '}
|
|
254
|
-
<Link appearance='accent' size='md' href='https://ledger.com/support'>
|
|
255
|
-
Contact Support
|
|
256
|
-
</Link>
|
|
257
|
-
</Text>
|
|
258
|
-
|
|
259
|
-
// Bold text with ununderlined link
|
|
260
|
-
<Text typography='body1SemiBold' lx={{ color: 'base' }}>
|
|
261
|
-
Already have an account?{' '}
|
|
262
|
-
<Link
|
|
263
|
-
appearance='accent'
|
|
264
|
-
size='md'
|
|
265
|
-
underline={false}
|
|
266
|
-
href='https://ledger.com/signin'
|
|
267
|
-
>
|
|
268
|
-
Sign in
|
|
269
|
-
</Link>
|
|
270
|
-
</Text>
|
|
271
|
-
`,
|
|
272
|
-
},
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { ListItem } from './ListItem';
|
|
3
|
-
declare const meta: Meta<typeof ListItem>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof ListItem>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const VariantsShowcase: Story;
|
|
8
|
-
export declare const DisabledState: Story;
|
|
9
|
-
export declare const ResponsiveLayout: Story;
|
|
10
|
-
//# sourceMappingURL=ListItem.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/ListItem/ListItem.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAMvE,OAAO,EACL,QAAQ,EAST,MAAM,YAAY,CAAC;AAEpB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAkC/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEvC,eAAO,MAAM,IAAI,EAAE,KAgClB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAqK9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA+E3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAuE9B,CAAC"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { Settings, ChevronRight, Wallet } from '../../Symbols';
|
|
4
|
-
import { Switch } from '../Switch/Switch';
|
|
5
|
-
import { Tag } from '../Tag/Tag';
|
|
6
|
-
import { Box } from '../Utility';
|
|
7
|
-
import { ListItem, ListItemLeading, ListItemContent, ListItemTitle, ListItemDescription, ListItemTrailing, ListItemSpot, ListItemIcon, ListItemTruncate, } from './ListItem';
|
|
8
|
-
const meta = {
|
|
9
|
-
component: ListItem,
|
|
10
|
-
title: 'Containment/ListItem',
|
|
11
|
-
subcomponents: {
|
|
12
|
-
ListItemLeading,
|
|
13
|
-
ListItemContent,
|
|
14
|
-
ListItemTitle,
|
|
15
|
-
ListItemDescription,
|
|
16
|
-
ListItemTrailing,
|
|
17
|
-
ListItemSpot,
|
|
18
|
-
ListItemIcon,
|
|
19
|
-
ListItemTruncate,
|
|
20
|
-
},
|
|
21
|
-
parameters: {
|
|
22
|
-
layout: 'padded',
|
|
23
|
-
backgrounds: { default: 'light' },
|
|
24
|
-
docs: {
|
|
25
|
-
source: {
|
|
26
|
-
language: 'tsx',
|
|
27
|
-
format: true,
|
|
28
|
-
type: 'code',
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
argTypes: {
|
|
33
|
-
disabled: {
|
|
34
|
-
control: 'boolean',
|
|
35
|
-
description: 'Whether the list item is disabled',
|
|
36
|
-
},
|
|
37
|
-
onPress: {
|
|
38
|
-
action: 'pressed',
|
|
39
|
-
description: 'The function to be called when the list item is pressed',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
export default meta;
|
|
44
|
-
export const Base = {
|
|
45
|
-
args: {
|
|
46
|
-
lx: { maxWidth: 's320' },
|
|
47
|
-
},
|
|
48
|
-
render: (args) => (_jsx(ListItem, { ...args, children: _jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Settings }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Item with Icon and Description" }), _jsx(ListItemDescription, { children: "Additional information" })] })] }) })),
|
|
49
|
-
parameters: {
|
|
50
|
-
docs: {
|
|
51
|
-
source: {
|
|
52
|
-
code: `
|
|
53
|
-
<ListItem>
|
|
54
|
-
<ListItemLeading>
|
|
55
|
-
<ListItemSpot appearance="icon" icon={Settings} />
|
|
56
|
-
<ListItemContent>
|
|
57
|
-
<ListItemTitle>Item with Icon and Description</ListItemTitle>
|
|
58
|
-
<ListItemDescription>Additional information</ListItemDescription>
|
|
59
|
-
</ListItemContent>
|
|
60
|
-
</ListItemLeading>
|
|
61
|
-
</ListItem>
|
|
62
|
-
`,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
export const VariantsShowcase = {
|
|
68
|
-
render: () => {
|
|
69
|
-
const [selected, setSelected] = useState(false);
|
|
70
|
-
return (_jsxs(Box, { lx: { flexDirection: 'column', maxWidth: 's320', gap: 's8' }, children: [_jsx(ListItem, { children: _jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Settings }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Simple composition" }), _jsx(ListItemDescription, { children: "With description" })] })] }) }), _jsxs(ListItem, { onPress: () => setSelected(!selected), children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Wallet }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Switch Variant" }), _jsx(ListItemDescription, { children: "With description" })] })] }), _jsx(ListItemTrailing, { children: _jsx(Switch, { checked: selected, onCheckedChange: setSelected }) })] }), _jsxs(ListItem, { children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Wallet }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Content Variant" }), _jsx(ListItemDescription, { children: "With description" })] })] }), _jsx(ListItemTrailing, { children: _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "42.10" }), _jsx(ListItemDescription, { children: "USD" })] }) })] }), _jsxs(ListItem, { children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Wallet }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Content Variant" }), _jsx(ListItemDescription, { children: "Custom style" })] })] }), _jsx(ListItemTrailing, { children: _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "USD" }), _jsx(ListItemDescription, { lx: { color: 'error' }, children: "-7.53%" })] }) })] }), _jsxs(ListItem, { children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Wallet }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Content Variant" }), _jsx(ListItemDescription, { children: "Custom style" })] })] }), _jsx(ListItemTrailing, { children: _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "USD" }), _jsx(ListItemDescription, { lx: { color: 'success' }, children: "+7.53%" })] }) })] }), _jsxs(ListItem, { children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Settings }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Tag Variant" }), _jsx(ListItemDescription, { children: "Custom style" })] })] }), _jsx(ListItemTrailing, { children: _jsx(Tag, { size: 'sm', label: 'New', appearance: 'accent' }) })] }), _jsxs(ListItem, { children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Settings }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Icon Variant" }), _jsx(ListItemDescription, { children: "With description" })] })] }), _jsx(ListItemTrailing, { children: _jsx(ListItemIcon, { icon: ChevronRight }) })] }), _jsxs(ListItem, { children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemIcon, { icon: Wallet }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Icon without Spot" }), _jsx(ListItemDescription, { children: "Using ListItemIcon" })] })] }), _jsx(ListItemTrailing, { children: _jsx(ListItemIcon, { icon: ChevronRight }) })] }), _jsxs(ListItem, { children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Wallet }), _jsxs(ListItemContent, { children: [_jsxs(ListItemTitle, { children: [_jsx(ListItemTruncate, { variant: 'title', children: "Complex 1" }), _jsx(Tag, { size: 'sm', label: 'New', appearance: 'base' })] }), _jsxs(ListItemDescription, { children: [_jsx(ListItemTruncate, { children: "With description" }), _jsx(Tag, { size: 'sm', label: 'Custom Tag', appearance: 'gray' })] })] })] }), _jsx(ListItemTrailing, { children: _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "42.10" }), _jsx(ListItemDescription, { children: "USD" })] }) })] }), _jsxs(ListItem, { children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Wallet }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Complex 2" }), _jsx(ListItemDescription, { children: "With description" })] })] }), _jsx(ListItemTrailing, { children: _jsxs(ListItemContent, { children: [_jsxs(ListItemTitle, { children: [_jsx(Tag, { size: 'sm', label: 'New', appearance: 'base' }), _jsx(ListItemTruncate, { variant: 'title', children: "1200.12" })] }), _jsx(ListItemDescription, { children: _jsx(Tag, { size: 'sm', label: 'BTC', appearance: 'gray' }) })] }) })] })] }));
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
export const DisabledState = {
|
|
74
|
-
args: {
|
|
75
|
-
disabled: true,
|
|
76
|
-
},
|
|
77
|
-
render: (args) => (_jsxs(Box, { lx: { flexDirection: 'column', width: 's320' }, children: [_jsxs(ListItem, { ...args, children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Settings }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Disabled Item" }), _jsx(ListItemDescription, { children: "This item is disabled" })] })] }), _jsx(ListItemTrailing, { children: _jsx(Switch, { checked: false, disabled: args.disabled }) })] }), _jsxs(ListItem, { ...args, children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Settings }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Disabled Item" }), _jsx(ListItemDescription, { children: "This item is disabled" })] })] }), _jsx(ListItemTrailing, { children: _jsx(ListItemIcon, { icon: ChevronRight }) })] }), _jsxs(ListItem, { ...args, children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Wallet }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Content Variant" }), _jsx(ListItemDescription, { children: "With description" })] })] }), _jsx(ListItemTrailing, { children: _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "42.10" }), _jsx(ListItemDescription, { children: "USD" })] }) })] }), _jsx(ListItem, { ...args, children: _jsxs(ListItemLeading, { children: [_jsx(ListItemIcon, { icon: Wallet }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Icon without Spot" }), _jsx(ListItemDescription, { children: "Using ListItemIcon" })] })] }) })] })),
|
|
78
|
-
parameters: {
|
|
79
|
-
docs: {
|
|
80
|
-
source: {
|
|
81
|
-
code: `
|
|
82
|
-
<ListItem disabled>
|
|
83
|
-
<ListItemLeading>
|
|
84
|
-
<ListItemSpot appearance="icon" icon={Settings} />
|
|
85
|
-
<ListItemContent>
|
|
86
|
-
<ListItemTitle>Disabled Item</ListItemTitle>
|
|
87
|
-
<ListItemDescription>This item is disabled</ListItemDescription>
|
|
88
|
-
</ListItemContent>
|
|
89
|
-
</ListItemLeading>
|
|
90
|
-
<ListItemTrailing>
|
|
91
|
-
<ChevronRight size={24} />
|
|
92
|
-
</ListItemTrailing>
|
|
93
|
-
</ListItem>
|
|
94
|
-
`,
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
export const ResponsiveLayout = {
|
|
100
|
-
render: () => (_jsx(Box, { lx: {
|
|
101
|
-
width: 's400',
|
|
102
|
-
borderWidth: 's1',
|
|
103
|
-
borderColor: 'mutedSubtle',
|
|
104
|
-
padding: 's16',
|
|
105
|
-
}, children: _jsxs(Box, { lx: { flexDirection: 'column' }, children: [_jsxs(ListItem, { children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Settings }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Short Title" }), _jsx(ListItemDescription, { children: "Short description" })] })] }), _jsx(ListItemTrailing, { children: _jsx(ListItemIcon, { icon: ChevronRight }) })] }), _jsxs(ListItem, { children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Settings }), _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Long Title that should truncate appropriately" }), _jsx(ListItemDescription, { children: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos." })] })] }), _jsx(ListItemTrailing, { children: _jsx(ListItemIcon, { icon: ChevronRight }) })] }), _jsxs(ListItem, { children: [_jsxs(ListItemLeading, { children: [_jsx(ListItemSpot, { appearance: 'icon', icon: Wallet }), _jsxs(ListItemContent, { children: [_jsxs(ListItemTitle, { children: [_jsx(ListItemTruncate, { variant: 'title', children: "Long Title that should truncate appropriately" }), _jsx(Tag, { size: 'sm', label: 'New', appearance: 'base' })] }), _jsxs(ListItemDescription, { children: [_jsx(ListItemTruncate, { children: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos." }), _jsx(Tag, { size: 'sm', label: 'Custom Tag', appearance: 'gray' })] })] })] }), _jsx(ListItemTrailing, { children: _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "42.10" }), _jsx(ListItemDescription, { children: "USD" })] }) })] })] }) })),
|
|
106
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { NavBar } from './NavBar';
|
|
3
|
-
declare const meta: Meta<typeof NavBar>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof NavBar>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const Expanded: Story;
|
|
8
|
-
export declare const WithCoinCapsule: Story;
|
|
9
|
-
export declare const WithMultipleTrailingActions: Story;
|
|
10
|
-
//# sourceMappingURL=NavBar.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NavBar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/NavBar/NavBar.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EACL,MAAM,EAOP,MAAM,UAAU,CAAC;AAElB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CA6B7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,IAAI,EAAE,KAwBlB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAwBtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA0B7B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,KA8BzC,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CryptoIcon } from '@ledgerhq/crypto-icons';
|
|
3
|
-
import { MoreHorizontal, Settings } from '../../Symbols';
|
|
4
|
-
import { IconButton } from '../IconButton';
|
|
5
|
-
import { NavBar, NavBarBackButton, NavBarCoinCapsule, NavBarContent, NavBarDescription, NavBarTitle, NavBarTrailing, } from './NavBar';
|
|
6
|
-
const meta = {
|
|
7
|
-
component: NavBar,
|
|
8
|
-
title: 'Navigation/NavBar',
|
|
9
|
-
subcomponents: {
|
|
10
|
-
NavBarBackButton,
|
|
11
|
-
NavBarContent,
|
|
12
|
-
NavBarTitle,
|
|
13
|
-
NavBarDescription,
|
|
14
|
-
NavBarCoinCapsule,
|
|
15
|
-
NavBarTrailing,
|
|
16
|
-
},
|
|
17
|
-
parameters: {
|
|
18
|
-
layout: 'centered',
|
|
19
|
-
backgrounds: { default: 'light' },
|
|
20
|
-
docs: {
|
|
21
|
-
source: {
|
|
22
|
-
language: 'tsx',
|
|
23
|
-
format: true,
|
|
24
|
-
type: 'code',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
argTypes: {
|
|
29
|
-
appearance: {
|
|
30
|
-
control: 'select',
|
|
31
|
-
options: ['compact', 'expanded'],
|
|
32
|
-
description: 'Controls the appearance/layout of the NavBar',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
export default meta;
|
|
37
|
-
export const Base = {
|
|
38
|
-
args: {
|
|
39
|
-
appearance: 'compact',
|
|
40
|
-
lx: {
|
|
41
|
-
width: 's480',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
render: (args) => (_jsxs(NavBar, { ...args, children: [_jsx(NavBarBackButton, { onPress: () => console.log('Back pressed') }), _jsxs(NavBarContent, { children: [_jsx(NavBarTitle, { children: "Title" }), _jsx(NavBarDescription, { children: "Description" })] }), _jsx(NavBarTrailing, { children: _jsx(IconButton, { appearance: 'no-background', size: 'md', icon: MoreHorizontal, accessibilityLabel: 'More options' }) })] })),
|
|
45
|
-
};
|
|
46
|
-
export const Expanded = {
|
|
47
|
-
args: {
|
|
48
|
-
appearance: 'expanded',
|
|
49
|
-
lx: {
|
|
50
|
-
width: 's480',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
render: (args) => (_jsxs(NavBar, { ...args, children: [_jsx(NavBarBackButton, { onPress: () => console.log('Back pressed') }), _jsxs(NavBarContent, { children: [_jsx(NavBarTitle, { children: "Account Details" }), _jsx(NavBarDescription, { children: "View and manage your account" })] }), _jsx(NavBarTrailing, { children: _jsx(IconButton, { appearance: 'no-background', size: 'md', icon: Settings, accessibilityLabel: 'Settings' }) })] })),
|
|
54
|
-
};
|
|
55
|
-
export const WithCoinCapsule = {
|
|
56
|
-
args: {
|
|
57
|
-
appearance: 'compact',
|
|
58
|
-
lx: {
|
|
59
|
-
width: 's480',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
render: (args) => (_jsxs(NavBar, { ...args, children: [_jsx(NavBarBackButton, { onPress: () => console.log('Back pressed') }), _jsx(NavBarContent, { children: _jsx(NavBarCoinCapsule, { ticker: 'BTC', icon: _jsx(CryptoIcon, { ledgerId: 'bitcoin', ticker: 'BTC', size: '24px' }) }) }), _jsx(NavBarTrailing, { children: _jsx(IconButton, { appearance: 'no-background', size: 'md', icon: MoreHorizontal, accessibilityLabel: 'More options' }) })] })),
|
|
63
|
-
};
|
|
64
|
-
export const WithMultipleTrailingActions = {
|
|
65
|
-
args: {
|
|
66
|
-
appearance: 'compact',
|
|
67
|
-
lx: {
|
|
68
|
-
width: 's480',
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
render: (args) => (_jsxs(NavBar, { ...args, children: [_jsx(NavBarBackButton, { onPress: () => console.log('Back pressed') }), _jsxs(NavBarContent, { children: [_jsx(NavBarTitle, { children: "Portfolio" }), _jsx(NavBarDescription, { children: "Manage your assets" })] }), _jsxs(NavBarTrailing, { children: [_jsx(IconButton, { appearance: 'no-background', size: 'md', icon: Settings, accessibilityLabel: 'Settings' }), _jsx(IconButton, { appearance: 'no-background', size: 'md', icon: MoreHorizontal, accessibilityLabel: 'More options' })] })] })),
|
|
72
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: {
|
|
5
|
-
({ currentPage, totalPages, lx, ref, ...props }: import("./types").PageIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
displayName: string;
|
|
7
|
-
};
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: string;
|
|
10
|
-
backgrounds: {
|
|
11
|
-
default: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
argTypes: {
|
|
15
|
-
currentPage: {
|
|
16
|
-
control: "number";
|
|
17
|
-
};
|
|
18
|
-
totalPages: {
|
|
19
|
-
control: "number";
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export default meta;
|
|
24
|
-
type Story = StoryObj<typeof meta>;
|
|
25
|
-
export declare const Base: Story;
|
|
26
|
-
export declare const Interactive: Story;
|
|
27
|
-
//# sourceMappingURL=PageIndicator.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageIndicator.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/PageIndicator/PageIndicator.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAOvE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;CAW4B,CAAC;AAEvC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,IAAI,EAAE,KAKlB,CAAC;AA0CF,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { Box, Text, IconButton } from '../';
|
|
4
|
-
import { useTheme } from '../../../styles';
|
|
5
|
-
import { ArrowLeft, ArrowRight } from '../../Symbols';
|
|
6
|
-
import { PageIndicator } from './PageIndicator';
|
|
7
|
-
const meta = {
|
|
8
|
-
title: 'Communication/PageIndicator',
|
|
9
|
-
component: PageIndicator,
|
|
10
|
-
parameters: {
|
|
11
|
-
layout: 'centered',
|
|
12
|
-
backgrounds: { default: 'light' },
|
|
13
|
-
},
|
|
14
|
-
argTypes: {
|
|
15
|
-
currentPage: { control: 'number' },
|
|
16
|
-
totalPages: { control: 'number' },
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
export default meta;
|
|
20
|
-
export const Base = {
|
|
21
|
-
args: {
|
|
22
|
-
currentPage: 1,
|
|
23
|
-
totalPages: 5,
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
const InteractiveComponent = ({ totalPages }) => {
|
|
27
|
-
const [page, setPage] = useState(1);
|
|
28
|
-
const { theme } = useTheme();
|
|
29
|
-
return (_jsxs(Box, { lx: { gap: 's16', alignItems: 'center', width: 'full' }, children: [_jsxs(Box, { lx: {
|
|
30
|
-
flexDirection: 'row',
|
|
31
|
-
gap: 's16',
|
|
32
|
-
alignItems: 'center',
|
|
33
|
-
justifyContent: 'center',
|
|
34
|
-
}, children: [_jsx(IconButton, { icon: ArrowLeft, size: 'xs', accessibilityLabel: 'Previous page', appearance: 'transparent', onPress: () => setPage((v) => Math.max(1, v - 1)) }), _jsx(Text, { lx: { color: 'base', width: 's28', textAlign: 'center' }, style: { ...theme.typographies.heading2SemiBold }, children: page }), _jsx(IconButton, { icon: ArrowRight, size: 'xs', accessibilityLabel: 'Next page', appearance: 'transparent', onPress: () => setPage((v) => Math.min(totalPages, v + 1)) })] }), _jsx(PageIndicator, { currentPage: page, totalPages: totalPages })] }));
|
|
35
|
-
};
|
|
36
|
-
export const Interactive = {
|
|
37
|
-
args: {
|
|
38
|
-
currentPage: 1,
|
|
39
|
-
totalPages: 9,
|
|
40
|
-
},
|
|
41
|
-
render: (args) => _jsx(InteractiveComponent, { totalPages: args.totalPages }),
|
|
42
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { SearchInput } from './SearchInput';
|
|
3
|
-
declare const meta: Meta<typeof SearchInput>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof SearchInput>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const WithContent: Story;
|
|
8
|
-
export declare const WithError: Story;
|
|
9
|
-
export declare const DisabledSearchInput: Story;
|
|
10
|
-
export declare const WithHiddenClearButton: Story;
|
|
11
|
-
export declare const WithClearCallback: Story;
|
|
12
|
-
//# sourceMappingURL=SearchInput.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/SearchInput/SearchInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAiClC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AA6B1C,eAAO,MAAM,IAAI,EAAE,KAOlB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KASjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAOnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAa/B,CAAC"}
|