@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAsC/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,KAkBlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAwCvB,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from '../Utility';
|
|
3
|
-
import { Checkbox } from './Checkbox';
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Selection/Checkbox',
|
|
6
|
-
component: Checkbox,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'fullscreen',
|
|
9
|
-
docs: {
|
|
10
|
-
source: {
|
|
11
|
-
language: 'tsx',
|
|
12
|
-
format: true,
|
|
13
|
-
type: 'code',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
args: {
|
|
18
|
-
label: 'Checkbox',
|
|
19
|
-
},
|
|
20
|
-
argTypes: {
|
|
21
|
-
checked: {
|
|
22
|
-
control: 'boolean',
|
|
23
|
-
description: 'The controlled checked state of the checkbox',
|
|
24
|
-
},
|
|
25
|
-
defaultChecked: {
|
|
26
|
-
control: 'boolean',
|
|
27
|
-
description: 'The default checked state (uncontrolled)',
|
|
28
|
-
},
|
|
29
|
-
disabled: {
|
|
30
|
-
control: 'boolean',
|
|
31
|
-
description: 'If true, the checkbox is disabled',
|
|
32
|
-
},
|
|
33
|
-
onCheckedChange: {
|
|
34
|
-
action: 'checked changed',
|
|
35
|
-
description: 'Callback function called when the checked state changes',
|
|
36
|
-
},
|
|
37
|
-
label: {
|
|
38
|
-
control: 'text',
|
|
39
|
-
description: 'The label text of the checkbox',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
export default meta;
|
|
44
|
-
/**
|
|
45
|
-
* The base checkbox in its normal state.
|
|
46
|
-
*/
|
|
47
|
-
export const Base = {
|
|
48
|
-
render: (args) => {
|
|
49
|
-
return (_jsx(Box, { style: {
|
|
50
|
-
flex: 1,
|
|
51
|
-
minHeight: 96,
|
|
52
|
-
alignItems: 'center',
|
|
53
|
-
justifyContent: 'center',
|
|
54
|
-
padding: 24,
|
|
55
|
-
}, children: _jsx(Box, { style: { width: '100%', maxWidth: 400 }, children: _jsx(Checkbox, { ...args }) }) }));
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Interactive example showing all states.
|
|
60
|
-
*/
|
|
61
|
-
export const AllStates = {
|
|
62
|
-
render: () => (_jsx(Box, { style: {
|
|
63
|
-
flex: 1,
|
|
64
|
-
minHeight: 96,
|
|
65
|
-
alignItems: 'center',
|
|
66
|
-
justifyContent: 'center',
|
|
67
|
-
padding: 24,
|
|
68
|
-
}, children: _jsx(Box, { style: { width: '100%', maxWidth: 400 }, children: _jsxs(Box, { style: {
|
|
69
|
-
flexDirection: 'row',
|
|
70
|
-
gap: 48,
|
|
71
|
-
}, children: [_jsxs(Box, { style: { gap: 16 }, children: [_jsx(Text, { typography: 'heading5', children: "Enabled" }), _jsxs(Box, { style: { gap: 8 }, children: [_jsx(Checkbox, { label: 'Unchecked', accessibilityLabel: 'Unchecked', defaultChecked: false }), _jsx(Checkbox, { label: 'Checked', defaultChecked: true })] })] }), _jsxs(Box, { style: { gap: 16 }, children: [_jsx(Text, { typography: 'heading5', children: "Disabled" }), _jsxs(Box, { style: { gap: 8 }, children: [_jsx(Checkbox, { label: 'Unchecked', disabled: true, defaultChecked: false }), _jsx(Checkbox, { label: 'Checked', disabled: true, defaultChecked: true })] })] })] }) }) })),
|
|
72
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { ContentBanner } from './ContentBanner';
|
|
3
|
-
declare const meta: Meta<typeof ContentBanner>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof ContentBanner>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const WithClose: Story;
|
|
8
|
-
export declare const ContentVariationsShowcase: Story;
|
|
9
|
-
export declare const WithStepper: Story;
|
|
10
|
-
export declare const ResponsiveLayout: Story;
|
|
11
|
-
//# sourceMappingURL=ContentBanner.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentBanner.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/ContentBanner/ContentBanner.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAOvE,OAAO,EACL,aAAa,EAId,MAAM,iBAAiB,CAAC;AAEzB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CA6BpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5C,eAAO,MAAM,IAAI,EAAE,KAkClB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAiCvB,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAoDvC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAczB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAoC9B,CAAC"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Settings, Wallet } from '../../Symbols';
|
|
4
|
-
import { Button } from '../Button';
|
|
5
|
-
import { Spot } from '../Spot';
|
|
6
|
-
import { Stepper } from '../Stepper';
|
|
7
|
-
import { Box, Text } from '../Utility';
|
|
8
|
-
import { ContentBanner, ContentBannerContent, ContentBannerDescription, ContentBannerTitle, } from './ContentBanner';
|
|
9
|
-
const meta = {
|
|
10
|
-
component: ContentBanner,
|
|
11
|
-
title: 'Communication/ContentBanner',
|
|
12
|
-
parameters: {
|
|
13
|
-
docs: {
|
|
14
|
-
source: {
|
|
15
|
-
language: 'tsx',
|
|
16
|
-
format: true,
|
|
17
|
-
type: 'code',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
argTypes: {
|
|
22
|
-
onClose: {
|
|
23
|
-
control: 'select',
|
|
24
|
-
description: 'Close action callback',
|
|
25
|
-
options: ['With Close', 'None'],
|
|
26
|
-
mapping: {
|
|
27
|
-
'With Close': () => {
|
|
28
|
-
console.log('Close clicked');
|
|
29
|
-
},
|
|
30
|
-
None: undefined,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
closeAccessibilityLabel: {
|
|
34
|
-
control: 'text',
|
|
35
|
-
description: 'Accessibility label for the close button',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
export default meta;
|
|
40
|
-
export const Base = {
|
|
41
|
-
args: {
|
|
42
|
-
closeAccessibilityLabel: 'Close content banner',
|
|
43
|
-
},
|
|
44
|
-
render: (args) => (_jsx(Box, { lx: { maxWidth: 's400' }, children: _jsxs(ContentBanner, { ...args, children: [_jsx(Spot, { appearance: 'icon', icon: Settings, size: 48 }), _jsxs(ContentBannerContent, { children: [_jsx(ContentBannerTitle, { children: "Content Banner" }), _jsx(ContentBannerDescription, { children: "This is a description for the content banner." })] })] }) })),
|
|
45
|
-
parameters: {
|
|
46
|
-
docs: {
|
|
47
|
-
source: {
|
|
48
|
-
code: `
|
|
49
|
-
<ContentBanner>
|
|
50
|
-
<Spot appearance="icon" icon={Settings} size={48} />
|
|
51
|
-
<ContentBannerContent>
|
|
52
|
-
<ContentBannerTitle>Content Banner</ContentBannerTitle>
|
|
53
|
-
<ContentBannerDescription>
|
|
54
|
-
This is a description for the content banner.
|
|
55
|
-
</ContentBannerDescription>
|
|
56
|
-
</ContentBannerContent>
|
|
57
|
-
</ContentBanner>
|
|
58
|
-
`,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
export const WithClose = {
|
|
64
|
-
render: () => {
|
|
65
|
-
const [visible, setVisible] = React.useState(true);
|
|
66
|
-
if (!visible) {
|
|
67
|
-
return (_jsx(Button, { appearance: 'transparent', size: 'sm', onPress: () => setVisible(true), children: "Show banner again" }));
|
|
68
|
-
}
|
|
69
|
-
return (_jsx(Box, { lx: { maxWidth: 's400' }, children: _jsxs(ContentBanner, { onClose: () => setVisible(false), closeAccessibilityLabel: 'Close content banner', children: [_jsx(Spot, { appearance: 'icon', icon: Settings, size: 48 }), _jsxs(ContentBannerContent, { children: [_jsx(ContentBannerTitle, { children: "Dismissible Banner" }), _jsx(ContentBannerDescription, { children: "Press the close button to dismiss this banner." })] })] }) }));
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
export const ContentVariationsShowcase = {
|
|
73
|
-
render: () => (_jsxs(Box, { lx: {
|
|
74
|
-
flexDirection: 'column',
|
|
75
|
-
maxWidth: 's400',
|
|
76
|
-
gap: 's16',
|
|
77
|
-
padding: 's8',
|
|
78
|
-
}, children: [_jsxs(ContentBanner, { children: [_jsx(Spot, { appearance: 'icon', icon: Settings, size: 48 }), _jsx(ContentBannerContent, { children: _jsx(ContentBannerTitle, { children: "Title Only" }) })] }), _jsxs(ContentBanner, { children: [_jsx(Spot, { appearance: 'icon', icon: Wallet, size: 48 }), _jsxs(ContentBannerContent, { children: [_jsx(ContentBannerTitle, { children: "Title with Description" }), _jsx(ContentBannerDescription, { children: "This is a description for the content banner." })] })] }), _jsxs(ContentBanner, { onClose: () => console.log('close'), children: [_jsx(Spot, { appearance: 'icon', icon: Wallet, size: 48 }), _jsxs(ContentBannerContent, { children: [_jsx(ContentBannerTitle, { children: "With Close Button" }), _jsx(ContentBannerDescription, { children: "A content banner with a leading icon and close button." })] })] }), _jsxs(ContentBanner, { onClose: () => console.log('close'), children: [_jsx(Spot, { appearance: 'icon', icon: Settings, size: 48 }), _jsxs(ContentBannerContent, { children: [_jsx(ContentBannerTitle, { children: "Longer Title That Demonstrates Clamping Behavior With a Long Description" }), _jsx(ContentBannerDescription, { children: "This is a longer description that demonstrates how the content banner handles overflow. It should be clamped at two lines." })] })] })] })),
|
|
79
|
-
};
|
|
80
|
-
export const WithStepper = {
|
|
81
|
-
render: () => (_jsx(Box, { lx: { maxWidth: 's400' }, children: _jsxs(ContentBanner, { onClose: () => console.log('close'), children: [_jsx(Stepper, { currentStep: 2, totalSteps: 4 }), _jsxs(ContentBannerContent, { children: [_jsx(ContentBannerTitle, { children: "Setup your wallet" }), _jsx(ContentBannerDescription, { children: "Complete all steps to secure your wallet." })] })] }) })),
|
|
82
|
-
};
|
|
83
|
-
export const ResponsiveLayout = {
|
|
84
|
-
render: () => (_jsxs(Box, { lx: {
|
|
85
|
-
width: 's400',
|
|
86
|
-
flexDirection: 'column',
|
|
87
|
-
gap: 's16',
|
|
88
|
-
backgroundColor: 'mutedPressed',
|
|
89
|
-
padding: 's16',
|
|
90
|
-
}, children: [_jsx(Text, { typography: 'body4SemiBold', lx: { color: 'muted' }, children: "Container with a fixed width" }), _jsxs(ContentBanner, { children: [_jsx(Spot, { appearance: 'icon', icon: Settings, size: 48 }), _jsxs(ContentBannerContent, { children: [_jsx(ContentBannerTitle, { children: "Short Title" }), _jsx(ContentBannerDescription, { children: "Short description" })] })] }), _jsxs(ContentBanner, { onClose: () => console.log('close'), children: [_jsx(Spot, { appearance: 'icon', icon: Wallet, size: 48 }), _jsxs(ContentBannerContent, { children: [_jsx(ContentBannerTitle, { children: "Longer Title That Might Overflow When Container is Smaller" }), _jsx(ContentBannerDescription, { children: "This is a longer description that demonstrates how the content banner handles longer content within its constraints. It should be clamped at two lines with an ellipsis." })] })] })] })),
|
|
91
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { Divider } from './Divider';
|
|
3
|
-
declare const meta: Meta<typeof Divider>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Divider>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const OrientationShowcase: Story;
|
|
8
|
-
export declare const InList: Story;
|
|
9
|
-
//# sourceMappingURL=Divider.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Divider/Divider.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAM9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAEtC,eAAO,MAAM,IAAI,EAAE,KAwBlB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAkCjC,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KA6DpB,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box } from '../Utility/Box';
|
|
3
|
-
import { Text } from '../Utility/Text';
|
|
4
|
-
import { Divider } from './Divider';
|
|
5
|
-
const meta = {
|
|
6
|
-
component: Divider,
|
|
7
|
-
title: 'Layout/Divider',
|
|
8
|
-
parameters: {
|
|
9
|
-
actions: { disable: true },
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
export const Base = {
|
|
14
|
-
args: {
|
|
15
|
-
orientation: 'horizontal',
|
|
16
|
-
},
|
|
17
|
-
render: (args) => {
|
|
18
|
-
const isVertical = args.orientation === 'vertical';
|
|
19
|
-
return (_jsxs(Box, { lx: isVertical
|
|
20
|
-
? { flexDirection: 'row', alignItems: 'center', gap: 's16' }
|
|
21
|
-
: { width: 'full', gap: 's16' }, children: [_jsx(Text, { typography: 'body2', lx: { color: 'base' }, children: isVertical ? 'Left content' : 'Content above' }), _jsx(Divider, { ...args, lx: isVertical ? { height: 's48' } : undefined }), _jsx(Text, { typography: 'body2', lx: { color: 'base' }, children: isVertical ? 'Right content' : 'Content below' })] }));
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
export const OrientationShowcase = {
|
|
25
|
-
render: () => (_jsxs(Box, { lx: { gap: 's32' }, children: [_jsxs(Box, { lx: { gap: 's8' }, children: [_jsx(Text, { typography: 'body3', lx: { color: 'muted' }, children: "Horizontal (default)" }), _jsxs(Box, { lx: { width: 'full', gap: 's16' }, children: [_jsx(Text, { typography: 'body2', lx: { color: 'base' }, children: "Content above" }), _jsx(Divider, { orientation: 'horizontal' }), _jsx(Text, { typography: 'body2', lx: { color: 'base' }, children: "Content below" })] })] }), _jsxs(Box, { lx: { gap: 's8' }, children: [_jsx(Text, { typography: 'body3', lx: { color: 'muted' }, children: "Vertical" }), _jsxs(Box, { lx: { flexDirection: 'row', alignItems: 'center', gap: 's16' }, children: [_jsx(Text, { typography: 'body2', lx: { color: 'base' }, children: "Left content" }), _jsx(Divider, { orientation: 'vertical', lx: { height: 's48' } }), _jsx(Text, { typography: 'body2', lx: { color: 'base' }, children: "Right content" })] })] })] })),
|
|
26
|
-
};
|
|
27
|
-
export const InList = {
|
|
28
|
-
render: () => (_jsxs(Box, { lx: {
|
|
29
|
-
width: 'full',
|
|
30
|
-
maxWidth: 's400',
|
|
31
|
-
backgroundColor: 'canvas',
|
|
32
|
-
borderRadius: 'lg',
|
|
33
|
-
borderWidth: 's1',
|
|
34
|
-
borderColor: 'muted',
|
|
35
|
-
}, children: [_jsxs(Box, { lx: {
|
|
36
|
-
flexDirection: 'row',
|
|
37
|
-
justifyContent: 'space-between',
|
|
38
|
-
alignItems: 'center',
|
|
39
|
-
padding: 's16',
|
|
40
|
-
}, children: [_jsx(Text, { typography: 'body2', lx: { color: 'base' }, children: "Item 1" }), _jsx(Text, { typography: 'body3', lx: { color: 'muted' }, children: "$100" })] }), _jsx(Divider, {}), _jsxs(Box, { lx: {
|
|
41
|
-
flexDirection: 'row',
|
|
42
|
-
justifyContent: 'space-between',
|
|
43
|
-
alignItems: 'center',
|
|
44
|
-
padding: 's16',
|
|
45
|
-
}, children: [_jsx(Text, { typography: 'body2', lx: { color: 'base' }, children: "Item 2" }), _jsx(Text, { typography: 'body3', lx: { color: 'muted' }, children: "$200" })] }), _jsx(Divider, {}), _jsxs(Box, { lx: {
|
|
46
|
-
flexDirection: 'row',
|
|
47
|
-
justifyContent: 'space-between',
|
|
48
|
-
alignItems: 'center',
|
|
49
|
-
padding: 's16',
|
|
50
|
-
}, children: [_jsx(Text, { typography: 'body2', lx: { color: 'base' }, children: "Item 3" }), _jsx(Text, { typography: 'body3', lx: { color: 'muted' }, children: "$300" })] })] })),
|
|
51
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import * as Icons from '../../Symbols';
|
|
3
|
-
import type { IconSize } from './types';
|
|
4
|
-
declare const meta: Meta;
|
|
5
|
-
export default meta;
|
|
6
|
-
type IconName = keyof typeof Icons;
|
|
7
|
-
type IconStoryProps = {
|
|
8
|
-
size: IconSize;
|
|
9
|
-
name: IconName;
|
|
10
|
-
color?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const Icon: StoryObj<IconStoryProps>;
|
|
13
|
-
export declare const IconSizes: StoryObj;
|
|
14
|
-
export declare const Gallery: StoryObj;
|
|
15
|
-
//# sourceMappingURL=Icon.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Icon/Icon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAGvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,QAAA,MAAM,IAAI,EAAE,IAEX,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,KAAK,QAAQ,GAAG,MAAM,OAAO,KAAK,CAAC;AAGnC,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAoEF,eAAO,MAAM,IAAI,EAAE,QAAQ,CAAC,cAAc,CA4CzC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,QA0CvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,QA+ErB,CAAC"}
|
|
@@ -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"}
|