@ledgerhq/lumen-ui-rnative 0.1.4 → 0.1.6
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/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/src/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/src/lib/Components/SegmentedControl/SegmentedControl.js +34 -61
- package/dist/src/lib/Components/SegmentedControl/SegmentedControlContext.d.ts +1 -0
- package/dist/src/lib/Components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/src/lib/Components/SegmentedControl/types.d.ts +12 -2
- package/dist/src/lib/Components/SegmentedControl/types.d.ts.map +1 -1
- package/dist/src/lib/Components/SegmentedControl/usePillLayout.d.ts +19 -0
- package/dist/src/lib/Components/SegmentedControl/usePillLayout.d.ts.map +1 -0
- package/dist/src/lib/Components/SegmentedControl/usePillLayout.js +46 -0
- package/dist/src/lib/Components/TileButton/TileButton.js +2 -2
- package/jest.config.ts +0 -1
- package/package.json +1 -1
- package/src/lib/Components/AmountDisplay/AmountDisplay.tsx +8 -1
- package/src/lib/Components/SegmentedControl/SegmentedControl.mdx +1 -38
- package/src/lib/Components/SegmentedControl/SegmentedControl.stories.tsx +35 -19
- package/src/lib/Components/SegmentedControl/SegmentedControl.tsx +61 -77
- package/src/lib/Components/SegmentedControl/SegmentedControlContext.tsx +1 -0
- package/src/lib/Components/SegmentedControl/types.ts +12 -2
- package/src/lib/Components/SegmentedControl/usePillLayout.ts +76 -0
- package/src/lib/Components/TileButton/TileButton.tsx +2 -2
- 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,137 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { useTheme } from '../../../styles';
|
|
4
|
-
import * as Icons from '../../Symbols';
|
|
5
|
-
import { SearchInput } from '../SearchInput/SearchInput';
|
|
6
|
-
import { Box, Text, Pressable } from '../Utility';
|
|
7
|
-
const meta = {
|
|
8
|
-
title: 'Symbols/Interface Icons',
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
const sizes = [12, 16, 20, 24, 32, 40, 48, 56];
|
|
12
|
-
const iconNames = Object.keys(Icons);
|
|
13
|
-
const IconCard = ({ name, size = 24, color }) => {
|
|
14
|
-
const { theme } = useTheme();
|
|
15
|
-
const [copied, setCopied] = useState(false);
|
|
16
|
-
const IconComponent = Icons[name];
|
|
17
|
-
const iconColor = color ?? theme.colors.text.base;
|
|
18
|
-
const handleClick = async () => {
|
|
19
|
-
try {
|
|
20
|
-
await navigator.clipboard.writeText(name);
|
|
21
|
-
setCopied(true);
|
|
22
|
-
setTimeout(() => setCopied(false), 1500);
|
|
23
|
-
}
|
|
24
|
-
catch (err) {
|
|
25
|
-
console.error('Failed to copy:', err);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
return (_jsxs(Pressable, { onPress: handleClick, lx: {
|
|
29
|
-
position: 'relative',
|
|
30
|
-
flexDirection: 'column',
|
|
31
|
-
alignItems: 'center',
|
|
32
|
-
gap: 's8',
|
|
33
|
-
borderRadius: 'sm',
|
|
34
|
-
padding: 's16',
|
|
35
|
-
width: 's96',
|
|
36
|
-
}, style: ({ pressed }) => ({
|
|
37
|
-
backgroundColor: pressed ? theme.colors.bg.mutedPressed : 'transparent',
|
|
38
|
-
}), children: [_jsx(IconComponent, { size: size, style: { color: iconColor } }), _jsx(Text, { typography: 'body4', lx: { color: 'muted' }, children: name }), copied && (_jsx(Box, { lx: {
|
|
39
|
-
position: 'absolute',
|
|
40
|
-
top: 's0',
|
|
41
|
-
left: 's0',
|
|
42
|
-
right: 's0',
|
|
43
|
-
bottom: 's0',
|
|
44
|
-
alignItems: 'center',
|
|
45
|
-
justifyContent: 'center',
|
|
46
|
-
borderRadius: 'sm',
|
|
47
|
-
backgroundColor: 'muted',
|
|
48
|
-
}, children: _jsx(Text, { typography: 'body4', lx: { color: 'onAccent' }, children: "Copied!" }) }))] }, name));
|
|
49
|
-
};
|
|
50
|
-
export const Icon = {
|
|
51
|
-
args: {
|
|
52
|
-
size: 24,
|
|
53
|
-
name: 'Home',
|
|
54
|
-
},
|
|
55
|
-
argTypes: {
|
|
56
|
-
size: {
|
|
57
|
-
control: 'select',
|
|
58
|
-
options: sizes,
|
|
59
|
-
description: 'The size of the icon in pixels',
|
|
60
|
-
},
|
|
61
|
-
name: {
|
|
62
|
-
control: 'select',
|
|
63
|
-
options: iconNames,
|
|
64
|
-
description: 'The name of the icon to display',
|
|
65
|
-
},
|
|
66
|
-
color: {
|
|
67
|
-
control: 'color',
|
|
68
|
-
description: 'The color of the icon',
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
render: (args) => {
|
|
72
|
-
const { theme } = useTheme();
|
|
73
|
-
const IconComponent = Icons[args.name];
|
|
74
|
-
const iconColor = args.color ?? theme.colors.text.base;
|
|
75
|
-
return (_jsx(Box, { lx: { padding: 's8' }, children: _jsxs(Box, { lx: { flexDirection: 'column', alignItems: 'center', gap: 's4' }, children: [_jsx(IconComponent, { size: args.size, style: { color: iconColor } }), _jsx(Text, { lx: { color: 'base' }, children: args.name })] }) }));
|
|
76
|
-
},
|
|
77
|
-
parameters: {
|
|
78
|
-
docs: {
|
|
79
|
-
source: {
|
|
80
|
-
code: `
|
|
81
|
-
<Information size={24} style={{ color: theme.colors.text.base }} />
|
|
82
|
-
`,
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
};
|
|
87
|
-
export const IconSizes = {
|
|
88
|
-
render: () => {
|
|
89
|
-
const { theme } = useTheme();
|
|
90
|
-
return (_jsx(Box, { lx: { flexDirection: 'column', gap: 's16' }, children: sizes.map((size) => (_jsxs(Box, { lx: { flexDirection: 'column' }, children: [_jsxs(Text, { typography: 'heading4', lx: { marginBottom: 's16' }, children: ["Size ", size, "px"] }), _jsx(Box, { lx: {
|
|
91
|
-
flexDirection: 'row',
|
|
92
|
-
flexWrap: 'wrap',
|
|
93
|
-
gap: 's8',
|
|
94
|
-
borderRadius: 'sm',
|
|
95
|
-
padding: 's8',
|
|
96
|
-
}, style: {
|
|
97
|
-
borderWidth: 1,
|
|
98
|
-
borderColor: theme.colors.border.mutedSubtle,
|
|
99
|
-
}, children: [
|
|
100
|
-
'Home',
|
|
101
|
-
'Settings',
|
|
102
|
-
'Heart',
|
|
103
|
-
'Star',
|
|
104
|
-
'ArrowDown',
|
|
105
|
-
'ArrowLeft',
|
|
106
|
-
'ArrowRight',
|
|
107
|
-
'ArrowUp',
|
|
108
|
-
].map((iconName) => (_jsx(IconCard, { name: iconName, size: size }, iconName))) })] }, size))) }));
|
|
109
|
-
},
|
|
110
|
-
};
|
|
111
|
-
export const Gallery = {
|
|
112
|
-
parameters: {
|
|
113
|
-
layout: 'fullscreen',
|
|
114
|
-
},
|
|
115
|
-
render: () => {
|
|
116
|
-
const { theme } = useTheme();
|
|
117
|
-
const [searchTerm, setSearchTerm] = useState('');
|
|
118
|
-
// Filter icons based on search term
|
|
119
|
-
const filteredIcons = Object.entries(Icons).filter(([name]) => name.toLowerCase().includes(searchTerm.toLowerCase()));
|
|
120
|
-
return (_jsxs(Box, { lx: {
|
|
121
|
-
width: 'full',
|
|
122
|
-
flexDirection: 'column',
|
|
123
|
-
alignItems: 'stretch',
|
|
124
|
-
padding: 's8',
|
|
125
|
-
}, children: [_jsxs(Box, { lx: { marginBottom: 's32' }, children: [_jsx(Box, { lx: { marginBottom: 's8', maxWidth: 's320' }, children: _jsx(SearchInput, { placeholder: 'Search icons...', value: searchTerm, onChangeText: setSearchTerm }) }), _jsx(Box, { lx: { marginBottom: 's4' }, children: _jsxs(Text, { typography: 'body3', lx: { marginLeft: 's8', color: 'muted' }, children: [filteredIcons.length, " of ", Object.keys(Icons).length, " icons", searchTerm && ` matching "${searchTerm}"`] }) })] }), _jsx(Box, { lx: { flexDirection: 'row', flexWrap: 'wrap', gap: 's8' }, children: filteredIcons.map(([name]) => (_jsx(IconCard, { name: name }, name))) }), filteredIcons.length === 0 && searchTerm && (_jsxs(Box, { lx: {
|
|
126
|
-
flexDirection: 'column',
|
|
127
|
-
alignItems: 'center',
|
|
128
|
-
justifyContent: 'center',
|
|
129
|
-
paddingVertical: 's16',
|
|
130
|
-
}, children: [_jsxs(Text, { typography: 'body2', lx: { color: 'muted' }, children: ["No icons found matching \"", searchTerm, "\""] }), _jsx(Pressable, { onPress: () => setSearchTerm(''), style: ({ pressed }) => ({
|
|
131
|
-
marginTop: 16,
|
|
132
|
-
color: pressed
|
|
133
|
-
? theme.colors.text.interactivePressed
|
|
134
|
-
: theme.colors.text.interactive,
|
|
135
|
-
}), children: _jsx(Text, { typography: 'body2', lx: { color: 'interactive' }, children: "Clear search" }) })] }))] }));
|
|
136
|
-
},
|
|
137
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { IconButton } from './IconButton';
|
|
3
|
-
declare const meta: Meta<typeof IconButton>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof IconButton>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const AppearanceShowcase: Story;
|
|
8
|
-
export declare const SizesShowcase: Story;
|
|
9
|
-
export declare const StatesShowcase: Story;
|
|
10
|
-
//# sourceMappingURL=IconButton.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/IconButton/IconButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAU1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAyCjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC,eAAO,MAAM,IAAI,EAAE,KAOlB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAmBhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAyB3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAoB5B,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Close, Heart, Plus, Settings, Share } from '../../Symbols';
|
|
3
|
-
import { Box } from '../Utility';
|
|
4
|
-
import { IconButton } from './IconButton';
|
|
5
|
-
const iconMap = {
|
|
6
|
-
Heart,
|
|
7
|
-
Plus,
|
|
8
|
-
Settings,
|
|
9
|
-
Share,
|
|
10
|
-
Close,
|
|
11
|
-
};
|
|
12
|
-
const meta = {
|
|
13
|
-
title: 'Action/IconButton',
|
|
14
|
-
component: IconButton,
|
|
15
|
-
argTypes: {
|
|
16
|
-
icon: {
|
|
17
|
-
options: Object.keys(iconMap),
|
|
18
|
-
mapping: iconMap,
|
|
19
|
-
control: {
|
|
20
|
-
type: 'select',
|
|
21
|
-
labels: {
|
|
22
|
-
Heart: 'Heart',
|
|
23
|
-
Plus: 'Plus',
|
|
24
|
-
Settings: 'Settings',
|
|
25
|
-
Share: 'Share',
|
|
26
|
-
Close: 'Close',
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
accessibilityLabel: {
|
|
31
|
-
control: 'text',
|
|
32
|
-
description: 'Accessibility label for screen readers',
|
|
33
|
-
},
|
|
34
|
-
appearance: {
|
|
35
|
-
control: 'select',
|
|
36
|
-
options: [
|
|
37
|
-
'base',
|
|
38
|
-
'gray',
|
|
39
|
-
'accent',
|
|
40
|
-
'transparent',
|
|
41
|
-
'no-background',
|
|
42
|
-
'red',
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
size: {
|
|
46
|
-
control: 'select',
|
|
47
|
-
options: ['xs', 'sm', 'md', 'lg'],
|
|
48
|
-
},
|
|
49
|
-
disabled: {
|
|
50
|
-
control: 'boolean',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
export default meta;
|
|
55
|
-
export const Base = {
|
|
56
|
-
args: {
|
|
57
|
-
accessibilityLabel: 'Settings',
|
|
58
|
-
icon: Settings,
|
|
59
|
-
size: 'md',
|
|
60
|
-
appearance: 'base',
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
export const AppearanceShowcase = {
|
|
64
|
-
render: () => (_jsxs(Box, { lx: { flexDirection: 'row', gap: 's8' }, children: [_jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'accent' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'base' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'gray' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'transparent' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'no-background' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'red' })] })),
|
|
65
|
-
};
|
|
66
|
-
export const SizesShowcase = {
|
|
67
|
-
render: () => (_jsxs(Box, { lx: { flexDirection: 'row', alignItems: 'center', gap: 's8' }, children: [_jsx(IconButton, { accessibilityLabel: 'Add to favorites', icon: Heart, size: 'xs' }), _jsx(IconButton, { accessibilityLabel: 'Add to favorites', icon: Heart, size: 'sm' }), _jsx(IconButton, { accessibilityLabel: 'Add to favorites', icon: Heart, size: 'md' }), _jsx(IconButton, { accessibilityLabel: 'Add to favorites', icon: Heart, size: 'lg' })] })),
|
|
68
|
-
};
|
|
69
|
-
export const StatesShowcase = {
|
|
70
|
-
args: {
|
|
71
|
-
appearance: 'base',
|
|
72
|
-
},
|
|
73
|
-
render: ({ appearance }) => (_jsxs(Box, { lx: { flexDirection: 'row', alignItems: 'flex-start', gap: 's8' }, children: [_jsx(IconButton, { accessibilityLabel: 'Settings', appearance: appearance, icon: Settings, disabled: true }), _jsx(IconButton, { accessibilityLabel: 'Settings', appearance: appearance, icon: Settings, loading: true })] })),
|
|
74
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native';
|
|
2
|
-
import { InteractiveIcon } from './InteractiveIcon';
|
|
3
|
-
declare const meta: Meta<typeof InteractiveIcon>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof InteractiveIcon>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const Stroked: Story;
|
|
8
|
-
export declare const IconTypeShowcase: Story;
|
|
9
|
-
export declare const SizesShowcase: Story;
|
|
10
|
-
export declare const StatesShowcase: Story;
|
|
11
|
-
//# sourceMappingURL=InteractiveIcon.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InteractiveIcon.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/InteractiveIcon/InteractiveIcon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAQ9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAuBtC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9C,eAAO,MAAM,IAAI,EAAE,KAiBlB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAuB9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA8B3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAsD5B,CAAC"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Settings, PenEdit, DeleteCircleFill, MoreVertical, } from '../../Symbols';
|
|
3
|
-
import { Box, Text } from '../Utility';
|
|
4
|
-
import { InteractiveIcon } from './InteractiveIcon';
|
|
5
|
-
const meta = {
|
|
6
|
-
component: InteractiveIcon,
|
|
7
|
-
title: 'Action/InteractiveIcon',
|
|
8
|
-
parameters: {
|
|
9
|
-
docs: {
|
|
10
|
-
source: {
|
|
11
|
-
language: 'tsx',
|
|
12
|
-
format: true,
|
|
13
|
-
type: 'code',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
argTypes: {
|
|
18
|
-
children: {
|
|
19
|
-
control: 'select',
|
|
20
|
-
options: ['Settings', 'PenEdit', 'DeleteCircleFill'],
|
|
21
|
-
mapping: {
|
|
22
|
-
Settings: _jsx(Settings, {}),
|
|
23
|
-
PenEdit: _jsx(PenEdit, {}),
|
|
24
|
-
DeleteCircleFill: _jsx(DeleteCircleFill, {}),
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
export default meta;
|
|
30
|
-
export const Base = {
|
|
31
|
-
args: {
|
|
32
|
-
iconType: 'filled',
|
|
33
|
-
children: _jsx(DeleteCircleFill, {}),
|
|
34
|
-
accessibilityLabel: 'Delete',
|
|
35
|
-
},
|
|
36
|
-
parameters: {
|
|
37
|
-
docs: {
|
|
38
|
-
source: {
|
|
39
|
-
code: `
|
|
40
|
-
<InteractiveIcon iconType="filled" accessibilityLabel="Delete">
|
|
41
|
-
<DeleteCircleFill />
|
|
42
|
-
</InteractiveIcon>
|
|
43
|
-
`,
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
export const Stroked = {
|
|
49
|
-
args: {
|
|
50
|
-
iconType: 'stroked',
|
|
51
|
-
children: _jsx(MoreVertical, {}),
|
|
52
|
-
accessibilityLabel: 'More actions',
|
|
53
|
-
},
|
|
54
|
-
parameters: {
|
|
55
|
-
docs: {
|
|
56
|
-
source: {
|
|
57
|
-
code: `
|
|
58
|
-
<InteractiveIcon iconType="stroked" accessibilityLabel="More actions">
|
|
59
|
-
<MoreVertical />
|
|
60
|
-
</InteractiveIcon>
|
|
61
|
-
`,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
export const IconTypeShowcase = {
|
|
67
|
-
render: () => {
|
|
68
|
-
return (_jsxs(Box, { lx: { flexDirection: 'row', gap: 's16', padding: 's8' }, children: [_jsxs(Box, { lx: { flexDirection: 'column', alignItems: 'center', gap: 's4' }, children: [_jsx(Text, { lx: { color: 'muted' }, typography: 'body3', children: "Filled" }), _jsx(InteractiveIcon, { iconType: 'filled', accessibilityLabel: 'Delete', children: _jsx(DeleteCircleFill, {}) })] }), _jsxs(Box, { lx: { flexDirection: 'column', alignItems: 'center', gap: 's4' }, children: [_jsx(Text, { lx: { color: 'muted' }, typography: 'body3', children: "Stroked" }), _jsx(InteractiveIcon, { iconType: 'stroked', accessibilityLabel: 'More actions', children: _jsx(MoreVertical, {}) })] })] }));
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
export const SizesShowcase = {
|
|
72
|
-
render: () => {
|
|
73
|
-
const iconSizes = [16, 20, 24, 40];
|
|
74
|
-
return (_jsx(Box, { lx: { flexDirection: 'row', gap: 's12', padding: 's8' }, children: iconSizes.map((size) => (_jsxs(Box, { lx: { flexDirection: 'column', gap: 's16' }, children: [_jsx(Box, { lx: {
|
|
75
|
-
width: 's72',
|
|
76
|
-
alignItems: 'center',
|
|
77
|
-
justifyContent: 'center',
|
|
78
|
-
}, children: _jsx(InteractiveIcon, { iconType: 'stroked', accessibilityLabel: 'More', children: _jsx(DeleteCircleFill, { size: size }) }, size) }), _jsxs(Text, { lx: { textAlign: 'center' }, typography: 'body3', children: [size, "px"] })] }, size))) }));
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
export const StatesShowcase = {
|
|
82
|
-
render: () => {
|
|
83
|
-
return (_jsxs(Box, { lx: {
|
|
84
|
-
flexDirection: 'row',
|
|
85
|
-
gap: 's16',
|
|
86
|
-
backgroundColor: 'base',
|
|
87
|
-
padding: 's8',
|
|
88
|
-
}, children: [_jsxs(Box, { lx: { flexDirection: 'column', alignItems: 'center', gap: 's4' }, children: [_jsx(Text, { lx: { color: 'muted' }, typography: 'body3', children: "Filled enabled" }), _jsx(InteractiveIcon, { iconType: 'filled', accessibilityLabel: 'Delete', children: _jsx(DeleteCircleFill, {}) })] }), _jsxs(Box, { lx: { flexDirection: 'column', alignItems: 'center', gap: 's4' }, children: [_jsx(Text, { lx: { color: 'muted' }, typography: 'body3', children: "Stroked enabled" }), _jsx(InteractiveIcon, { iconType: 'stroked', accessibilityLabel: 'More actions', children: _jsx(MoreVertical, {}) })] }), _jsxs(Box, { lx: { flexDirection: 'column', alignItems: 'center', gap: 's4' }, children: [_jsx(Text, { lx: { color: 'muted' }, typography: 'body3', children: "Filled disabled" }), _jsx(InteractiveIcon, { iconType: 'filled', accessibilityLabel: 'Delete', disabled: true, children: _jsx(DeleteCircleFill, {}) })] }), _jsxs(Box, { lx: { flexDirection: 'column', alignItems: 'center', gap: 's4' }, children: [_jsx(Text, { lx: { color: 'muted' }, typography: 'body3', children: "Stroked disabled" }), _jsx(InteractiveIcon, { iconType: 'stroked', accessibilityLabel: 'More actions', disabled: true, children: _jsx(MoreVertical, {}) })] })] }));
|
|
89
|
-
},
|
|
90
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { Link } from './Link';
|
|
3
|
-
declare const meta: Meta<typeof Link>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Link>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const WithIcon: Story;
|
|
8
|
-
export declare const External: Story;
|
|
9
|
-
export declare const ExternalLinkWithIcon: Story;
|
|
10
|
-
export declare const AppearanceShowcase: Story;
|
|
11
|
-
export declare const UnderlineShowcase: Story;
|
|
12
|
-
export declare const SizesShowcase: Story;
|
|
13
|
-
export declare const StatesShowcase: Story;
|
|
14
|
-
export declare const ResponsiveLayout: Story;
|
|
15
|
-
export declare const WithCustomNavigation: Story;
|
|
16
|
-
export declare const InTextUsage: Story;
|
|
17
|
-
//# sourceMappingURL=Link.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Link/Link.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CA+C3B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,IAAI,EAAE,KAkBlB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAsBtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAsBtB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KA0BlC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAwBhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAgB/B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA2D3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAkB5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KA8B9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAyDlC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA2EzB,CAAC"}
|
|
@@ -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"}
|