@ledgerhq/lumen-ui-rnative 0.1.4 → 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/jest.config.ts +0 -1
- package/package.json +1 -1
- package/src/lib/Components/AmountDisplay/AmountDisplay.tsx +8 -1
- 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,35 +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 { Stepper } from './Stepper';
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'Communication/Stepper',
|
|
7
|
-
component: Stepper,
|
|
8
|
-
parameters: {
|
|
9
|
-
actions: { disable: true },
|
|
10
|
-
},
|
|
11
|
-
argTypes: {
|
|
12
|
-
currentStep: { control: 'number' },
|
|
13
|
-
totalSteps: { control: 'number' },
|
|
14
|
-
disabled: { control: 'boolean' },
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
export default meta;
|
|
18
|
-
export const Base = {
|
|
19
|
-
args: {
|
|
20
|
-
currentStep: 2,
|
|
21
|
-
totalSteps: 4,
|
|
22
|
-
},
|
|
23
|
-
render: (args) => _jsx(Stepper, { ...args }),
|
|
24
|
-
};
|
|
25
|
-
export const DisabledShowcase = {
|
|
26
|
-
render: () => (_jsxs(Box, { lx: { gap: 's32', alignItems: 'center' }, children: [_jsxs(Box, { lx: { alignItems: 'center', gap: 's8' }, children: [_jsx(Text, { typography: 'body3', lx: { color: 'muted' }, children: "Default (2/4)" }), _jsx(Stepper, { currentStep: 2, totalSteps: 4 })] }), _jsxs(Box, { lx: { alignItems: 'center', gap: 's8' }, children: [_jsx(Text, { typography: 'body3', lx: { color: 'muted' }, children: "Disabled (2/4)" }), _jsx(Stepper, { currentStep: 2, totalSteps: 4, disabled: true })] }), _jsxs(Box, { lx: { alignItems: 'center', gap: 's8' }, children: [_jsx(Text, { typography: 'body3', lx: { color: 'muted' }, children: "Unstarted (0/9)" }), _jsx(Stepper, { currentStep: 0, totalSteps: 9 })] })] })),
|
|
27
|
-
};
|
|
28
|
-
export const WithCustomLabel = {
|
|
29
|
-
args: {
|
|
30
|
-
currentStep: 5,
|
|
31
|
-
totalSteps: 5,
|
|
32
|
-
label: '🎉',
|
|
33
|
-
},
|
|
34
|
-
render: (args) => _jsx(Stepper, { ...args }),
|
|
35
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native';
|
|
2
|
-
import { Subheader } from './Subheader';
|
|
3
|
-
declare const meta: Meta<typeof Subheader>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Subheader>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const InteractiveRow: Story;
|
|
8
|
-
export declare const WithInfoIcon: Story;
|
|
9
|
-
export declare const WithAction: Story;
|
|
10
|
-
//# sourceMappingURL=Subheader.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Subheader.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Subheader/Subheader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAI9D,OAAO,EACL,SAAS,EAQV,MAAM,aAAa,CAAC;AAQrB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAmBhC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AAExC,eAAO,MAAM,IAAI,EAAE,KAYlB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAc5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAmB1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAcxB,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { View, Text } from 'react-native';
|
|
3
|
-
import { Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip';
|
|
4
|
-
import { Subheader, SubheaderRow, SubheaderTitle, SubheaderCount, SubheaderInfo, SubheaderShowMore, SubheaderDescription, SubheaderAction, } from './Subheader';
|
|
5
|
-
const Container = ({ children }) => (_jsx(View, { style: { padding: 8, backgroundColor: '#ffffff', width: '100%' }, children: children }));
|
|
6
|
-
const meta = {
|
|
7
|
-
component: Subheader,
|
|
8
|
-
title: 'Communication/Subheader',
|
|
9
|
-
subcomponents: {
|
|
10
|
-
SubheaderRow,
|
|
11
|
-
SubheaderTitle,
|
|
12
|
-
SubheaderDescription,
|
|
13
|
-
SubheaderCount,
|
|
14
|
-
SubheaderInfo,
|
|
15
|
-
SubheaderShowMore,
|
|
16
|
-
SubheaderAction,
|
|
17
|
-
},
|
|
18
|
-
decorators: [
|
|
19
|
-
(Story) => (_jsx(Container, { children: _jsx(Story, {}) })),
|
|
20
|
-
],
|
|
21
|
-
};
|
|
22
|
-
export default meta;
|
|
23
|
-
export const Base = {
|
|
24
|
-
render: () => (_jsxs(Subheader, { children: [_jsx(SubheaderRow, { children: _jsx(SubheaderTitle, { children: "Section Title" }) }), _jsx(SubheaderDescription, { children: "This is a detailed description that provides additional context about this section." })] })),
|
|
25
|
-
};
|
|
26
|
-
export const InteractiveRow = {
|
|
27
|
-
render: () => (_jsxs(Subheader, { children: [_jsxs(SubheaderRow, { onPress: () => console.log('Row clicked'), children: [_jsx(SubheaderTitle, { children: "Accounts" }), _jsx(SubheaderCount, { value: 5 }), _jsx(SubheaderShowMore, {})] }), _jsx(SubheaderDescription, { children: "Interactive rows always include the chevron to indicate they lead to more content" })] })),
|
|
28
|
-
};
|
|
29
|
-
export const WithInfoIcon = {
|
|
30
|
-
render: () => (_jsxs(Subheader, { children: [_jsxs(SubheaderRow, { children: [_jsx(SubheaderTitle, { children: "Section with Info" }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { children: _jsx(SubheaderInfo, {}) }), _jsx(TooltipContent, { content: _jsx(Text, { children: "Additional information about this section" }) })] })] }), _jsx(SubheaderDescription, { children: "Use the info icon to provide contextual help or additional details" })] })),
|
|
31
|
-
};
|
|
32
|
-
export const WithAction = {
|
|
33
|
-
render: () => (_jsxs(Subheader, { lx: { maxWidth: 's480' }, children: [_jsxs(SubheaderRow, { children: [_jsx(SubheaderTitle, { children: "Recent Activity" }), _jsx(SubheaderAction, { onPress: () => console.log('View all'), children: "View all" })] }), _jsx(SubheaderDescription, { children: "Use actions for quick access to related functionality" })] })),
|
|
34
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { Switch } from './Switch';
|
|
3
|
-
declare const meta: Meta<typeof Switch>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
/**
|
|
7
|
-
* The base switch in its normal state.
|
|
8
|
-
*/
|
|
9
|
-
export declare const Base: Story;
|
|
10
|
-
/**
|
|
11
|
-
* Interactive example showing all states.
|
|
12
|
-
*/
|
|
13
|
-
export declare const AllStates: Story;
|
|
14
|
-
//# sourceMappingURL=Switch.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Switch/Switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CA+B7B,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,KAoCvB,CAAC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from '../Utility';
|
|
3
|
-
import { Switch } from './Switch';
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Selection/Switch',
|
|
6
|
-
component: Switch,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'fullscreen',
|
|
9
|
-
docs: {
|
|
10
|
-
source: {
|
|
11
|
-
language: 'tsx',
|
|
12
|
-
format: true,
|
|
13
|
-
type: 'code',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
argTypes: {
|
|
18
|
-
checked: {
|
|
19
|
-
control: 'boolean',
|
|
20
|
-
description: 'The controlled checked state of the switch',
|
|
21
|
-
},
|
|
22
|
-
defaultChecked: {
|
|
23
|
-
control: 'boolean',
|
|
24
|
-
description: 'The default checked state (uncontrolled)',
|
|
25
|
-
},
|
|
26
|
-
disabled: {
|
|
27
|
-
control: 'boolean',
|
|
28
|
-
description: 'If true, the switch is disabled',
|
|
29
|
-
},
|
|
30
|
-
onCheckedChange: {
|
|
31
|
-
action: 'checked changed',
|
|
32
|
-
description: 'Callback function called when the checked state changes',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
export default meta;
|
|
37
|
-
/**
|
|
38
|
-
* The base switch in its normal state.
|
|
39
|
-
*/
|
|
40
|
-
export const Base = {
|
|
41
|
-
render: (args) => {
|
|
42
|
-
return (_jsx(Box, { style: {
|
|
43
|
-
flex: 1,
|
|
44
|
-
minHeight: 96,
|
|
45
|
-
alignItems: 'center',
|
|
46
|
-
justifyContent: 'center',
|
|
47
|
-
padding: 24,
|
|
48
|
-
}, children: _jsx(Box, { style: { width: '100%', maxWidth: 400 }, children: _jsx(Switch, { ...args }) }) }));
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Interactive example showing all states.
|
|
53
|
-
*/
|
|
54
|
-
export const AllStates = {
|
|
55
|
-
render: () => (_jsx(Box, { style: {
|
|
56
|
-
flex: 1,
|
|
57
|
-
minHeight: 96,
|
|
58
|
-
alignItems: 'center',
|
|
59
|
-
justifyContent: 'center',
|
|
60
|
-
padding: 24,
|
|
61
|
-
}, children: _jsx(Box, { style: { width: '100%', maxWidth: 400 }, children: _jsxs(Box, { style: {
|
|
62
|
-
flexDirection: 'row',
|
|
63
|
-
gap: 48,
|
|
64
|
-
}, children: [_jsxs(Box, { style: { gap: 16 }, children: [_jsx(Text, { typography: 'heading5', children: "Enabled" }), _jsxs(Box, { style: { gap: 8 }, children: [_jsx(Switch, { defaultChecked: false }), _jsx(Switch, { "aria-labelledby": '', defaultChecked: true })] })] }), _jsxs(Box, { style: { gap: 16 }, children: [_jsx(Text, { typography: 'heading5', children: "Disabled" }), _jsxs(Box, { style: { gap: 8 }, children: [_jsx(Switch, { disabled: true, defaultChecked: false }), _jsx(Switch, { disabled: true, defaultChecked: true })] })] })] }) }) })),
|
|
65
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { TabBar, TabBarItem } from './TabBar';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof TabBar;
|
|
6
|
-
subcomponents: {
|
|
7
|
-
TabBarItem: typeof TabBarItem;
|
|
8
|
-
};
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: string;
|
|
11
|
-
backgrounds: {
|
|
12
|
-
default: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
argTypes: {
|
|
16
|
-
active: {
|
|
17
|
-
control: "text";
|
|
18
|
-
description: string;
|
|
19
|
-
table: {
|
|
20
|
-
type: {
|
|
21
|
-
summary: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
onTabPress: {
|
|
26
|
-
action: string;
|
|
27
|
-
description: string;
|
|
28
|
-
table: {
|
|
29
|
-
type: {
|
|
30
|
-
summary: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
children: {
|
|
35
|
-
control: false;
|
|
36
|
-
description: string;
|
|
37
|
-
table: {
|
|
38
|
-
type: {
|
|
39
|
-
summary: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
export default meta;
|
|
46
|
-
type Story = StoryObj<typeof meta>;
|
|
47
|
-
export declare const Base: Story;
|
|
48
|
-
export declare const Complex: Story;
|
|
49
|
-
export declare const MissingLabel: Story;
|
|
50
|
-
//# sourceMappingURL=TabBar.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TabBar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/TabBar/TabBar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAiBvE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE9C,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,IAAI,EAAE,KA2BlB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAmBrB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAY1B,CAAC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { BasketPutIn, HomeFill, Settings, Placeholder, Chart1, Bell, CoinPercent, Home, LifeRing, LifeRingFill, Cart, CreditCard, CreditCardFill, } from '../../Symbols';
|
|
4
|
-
import { TabBar, TabBarItem } from './TabBar';
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'Navigation/TabBar',
|
|
7
|
-
component: TabBar,
|
|
8
|
-
subcomponents: {
|
|
9
|
-
TabBarItem,
|
|
10
|
-
},
|
|
11
|
-
parameters: {
|
|
12
|
-
layout: 'centered',
|
|
13
|
-
backgrounds: { default: 'light' },
|
|
14
|
-
},
|
|
15
|
-
argTypes: {
|
|
16
|
-
active: {
|
|
17
|
-
control: 'text',
|
|
18
|
-
description: 'The currently active tab value',
|
|
19
|
-
table: {
|
|
20
|
-
type: { summary: 'string' },
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
onTabPress: {
|
|
24
|
-
action: 'tab pressed',
|
|
25
|
-
description: 'Callback function when a tab is pressed',
|
|
26
|
-
table: {
|
|
27
|
-
type: { summary: '(active: string) => void' },
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
children: {
|
|
31
|
-
control: false,
|
|
32
|
-
description: 'TabBarItem children',
|
|
33
|
-
table: {
|
|
34
|
-
type: { summary: 'TabBarChildren' },
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
export default meta;
|
|
40
|
-
export const Base = {
|
|
41
|
-
args: {},
|
|
42
|
-
render: () => {
|
|
43
|
-
const [active, setActive] = useState('home');
|
|
44
|
-
return (_jsxs(TabBar, { active: active, onTabPress: setActive, lx: { width: 's320' }, children: [_jsx(TabBarItem, { value: 'home', label: 'Home', icon: Home, activeIcon: HomeFill }), _jsx(TabBarItem, { value: 'pay', label: 'Pay', icon: CreditCard, activeIcon: CreditCardFill }), _jsx(TabBarItem, { value: 'help', label: 'Help', icon: LifeRing, activeIcon: LifeRingFill })] }));
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
export const Complex = {
|
|
48
|
-
args: {},
|
|
49
|
-
render: () => {
|
|
50
|
-
const [active, setActive] = useState('portfolio');
|
|
51
|
-
return (_jsxs(TabBar, { active: active, onTabPress: setActive, lx: { width: 's320' }, children: [_jsx(TabBarItem, { value: 'market', label: 'Market', icon: Chart1 }), _jsx(TabBarItem, { value: 'portfolio', label: 'Portfolio', icon: CoinPercent, activeIcon: CoinPercent }), _jsx(TabBarItem, { value: 'shop', label: 'Shop', icon: BasketPutIn }), _jsx(TabBarItem, { value: 'notifications', label: 'Alerts', icon: Bell }), _jsx(TabBarItem, { value: 'settings', label: 'Settings', icon: Settings })] }));
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
export const MissingLabel = {
|
|
55
|
-
args: {},
|
|
56
|
-
render: () => {
|
|
57
|
-
const [active, setActive] = useState('tab1');
|
|
58
|
-
return (_jsxs(TabBar, { active: active, onTabPress: setActive, lx: { width: 's320' }, children: [_jsx(TabBarItem, { value: 'tab1' }), _jsx(TabBarItem, { value: 'tab2', label: 'Tab', icon: Placeholder }), _jsx(TabBarItem, { value: 'tab3', icon: Cart })] }));
|
|
59
|
-
},
|
|
60
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { Tag } from './Tag';
|
|
3
|
-
declare const meta: Meta<typeof Tag>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Tag>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const AppearanceShowcase: Story;
|
|
8
|
-
export declare const SizeShowcase: Story;
|
|
9
|
-
export declare const ContentTypeShowcase: Story;
|
|
10
|
-
//# sourceMappingURL=Tag.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Tag/Tag.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CAsB1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC;AAElC,eAAO,MAAM,IAAI,EAAE,KAOlB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAuBhC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAOjC,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Check } from '../../Symbols/Icons/Check';
|
|
3
|
-
import { Box } from '../Utility/Box';
|
|
4
|
-
import { Tag } from './Tag';
|
|
5
|
-
const meta = {
|
|
6
|
-
component: Tag,
|
|
7
|
-
title: 'Communication/Tag',
|
|
8
|
-
argTypes: {
|
|
9
|
-
appearance: {
|
|
10
|
-
control: 'select',
|
|
11
|
-
options: ['base', 'gray', 'accent', 'success', 'error', 'warning'],
|
|
12
|
-
},
|
|
13
|
-
size: {
|
|
14
|
-
control: 'radio',
|
|
15
|
-
options: ['sm', 'md'],
|
|
16
|
-
},
|
|
17
|
-
label: {
|
|
18
|
-
control: 'text',
|
|
19
|
-
},
|
|
20
|
-
icon: {
|
|
21
|
-
control: {
|
|
22
|
-
type: 'boolean',
|
|
23
|
-
},
|
|
24
|
-
description: 'Show icon',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
export default meta;
|
|
29
|
-
export const Base = {
|
|
30
|
-
args: {
|
|
31
|
-
label: 'Label',
|
|
32
|
-
appearance: 'accent',
|
|
33
|
-
size: 'md',
|
|
34
|
-
},
|
|
35
|
-
render: (args) => _jsx(Tag, { ...args, icon: args.icon ? Check : undefined }),
|
|
36
|
-
};
|
|
37
|
-
export const AppearanceShowcase = {
|
|
38
|
-
render: () => (_jsxs(Box, { lx: { flexDirection: 'column', gap: 's16' }, children: [_jsxs(Box, { lx: { flexDirection: 'row', gap: 's4' }, children: [_jsx(Tag, { appearance: 'base', label: 'Base' }), _jsx(Tag, { appearance: 'gray', label: 'Gray' }), _jsx(Tag, { appearance: 'accent', label: 'Accent' }), _jsx(Tag, { appearance: 'success', label: 'Success' }), _jsx(Tag, { appearance: 'error', label: 'Error' }), _jsx(Tag, { appearance: 'warning', label: 'Warning' }), _jsx(Tag, { label: 'Disabled', disabled: true })] }), _jsxs(Box, { lx: { flexDirection: 'row', gap: 's4' }, children: [_jsx(Tag, { appearance: 'base', label: 'Base', icon: Check }), _jsx(Tag, { appearance: 'gray', label: 'Gray', icon: Check }), _jsx(Tag, { appearance: 'accent', label: 'Accent', icon: Check }), _jsx(Tag, { appearance: 'success', label: 'Success', icon: Check }), _jsx(Tag, { appearance: 'error', label: 'Error', icon: Check }), _jsx(Tag, { appearance: 'warning', label: 'Warning', icon: Check }), _jsx(Tag, { label: 'Disabled', icon: Check, disabled: true })] })] })),
|
|
39
|
-
};
|
|
40
|
-
export const SizeShowcase = {
|
|
41
|
-
render: () => (_jsxs(Box, { lx: { flexDirection: 'row', alignItems: 'center', gap: 's4' }, children: [_jsx(Tag, { size: 'md', label: 'Large Tag' }), _jsx(Tag, { size: 'sm', label: 'Small Tag' })] })),
|
|
42
|
-
};
|
|
43
|
-
export const ContentTypeShowcase = {
|
|
44
|
-
render: () => (_jsxs(Box, { lx: { flexDirection: 'row', alignItems: 'center', gap: 's4' }, children: [_jsx(Tag, { label: 'Label only' }), _jsx(Tag, { icon: Check, label: 'Icon and Label' })] })),
|
|
45
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { TextInput } from './TextInput';
|
|
3
|
-
declare const meta: Meta<typeof TextInput>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof TextInput>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const WithContent: Story;
|
|
8
|
-
export declare const WithError: Story;
|
|
9
|
-
export declare const DisabledTextInput: Story;
|
|
10
|
-
export declare const WithHiddenClearButton: Story;
|
|
11
|
-
export declare const WithClearCallback: Story;
|
|
12
|
-
export declare const EmailKeyboard: Story;
|
|
13
|
-
export declare const PhoneKeyboard: Story;
|
|
14
|
-
//# sourceMappingURL=TextInput.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/TextInput/TextInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAuChC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AA2BxC,eAAO,MAAM,IAAI,EAAE,KAQlB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KASvB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAQ/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAUnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAc/B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC"}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { View } from 'react-native';
|
|
4
|
-
import { TextInput } from './TextInput';
|
|
5
|
-
const meta = {
|
|
6
|
-
component: TextInput,
|
|
7
|
-
title: 'Input/TextInput',
|
|
8
|
-
parameters: {
|
|
9
|
-
docs: {
|
|
10
|
-
source: {
|
|
11
|
-
language: 'tsx',
|
|
12
|
-
format: true,
|
|
13
|
-
type: 'code',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
argTypes: {
|
|
18
|
-
label: {
|
|
19
|
-
control: 'text',
|
|
20
|
-
description: 'Floating label text',
|
|
21
|
-
},
|
|
22
|
-
placeholder: {
|
|
23
|
-
control: 'text',
|
|
24
|
-
description: 'Placeholder text when input is empty',
|
|
25
|
-
},
|
|
26
|
-
errorMessage: {
|
|
27
|
-
control: 'text',
|
|
28
|
-
description: 'Error message to display below input',
|
|
29
|
-
},
|
|
30
|
-
editable: {
|
|
31
|
-
control: 'boolean',
|
|
32
|
-
description: 'Whether the input is editable',
|
|
33
|
-
},
|
|
34
|
-
hideClearButton: {
|
|
35
|
-
control: 'boolean',
|
|
36
|
-
description: 'Hide the clear button',
|
|
37
|
-
},
|
|
38
|
-
keyboardType: {
|
|
39
|
-
control: 'select',
|
|
40
|
-
options: ['default', 'email-address', 'numeric', 'phone-pad', 'url'],
|
|
41
|
-
description: 'Keyboard type for input',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
export default meta;
|
|
46
|
-
const TextInputStory = (args) => {
|
|
47
|
-
const [value, setValue] = useState(args.initialValue ?? '');
|
|
48
|
-
return (_jsx(View, { style: {
|
|
49
|
-
flex: 1,
|
|
50
|
-
minHeight: 96,
|
|
51
|
-
alignItems: 'center',
|
|
52
|
-
justifyContent: 'center',
|
|
53
|
-
padding: 24,
|
|
54
|
-
}, children: _jsx(View, { style: { width: '100%', maxWidth: 400 }, children: _jsx(TextInput, { ...args, value: value, onChangeText: setValue, onClear: args.onClear }) }) }));
|
|
55
|
-
};
|
|
56
|
-
export const Base = {
|
|
57
|
-
render: (args) => _jsx(TextInputStory, { ...args }),
|
|
58
|
-
args: {
|
|
59
|
-
label: 'Username',
|
|
60
|
-
editable: true,
|
|
61
|
-
hideClearButton: false,
|
|
62
|
-
keyboardType: 'default',
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
export const WithContent = {
|
|
66
|
-
render: (args) => _jsx(TextInputStory, { ...args, initialValue: 'johndoe' }),
|
|
67
|
-
args: {
|
|
68
|
-
label: 'Username',
|
|
69
|
-
editable: true,
|
|
70
|
-
hideClearButton: false,
|
|
71
|
-
keyboardType: 'default',
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
export const WithError = {
|
|
75
|
-
render: (args) => _jsx(TextInputStory, { ...args, initialValue: 'ab' }),
|
|
76
|
-
args: {
|
|
77
|
-
label: 'Username',
|
|
78
|
-
errorMessage: 'Username must be at least 3 characters',
|
|
79
|
-
editable: true,
|
|
80
|
-
hideClearButton: false,
|
|
81
|
-
keyboardType: 'default',
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
export const DisabledTextInput = {
|
|
85
|
-
render: (args) => _jsx(TextInputStory, { ...args, initialValue: 'johndoe' }),
|
|
86
|
-
args: {
|
|
87
|
-
label: 'Username',
|
|
88
|
-
editable: false,
|
|
89
|
-
hideClearButton: false,
|
|
90
|
-
keyboardType: 'default',
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
export const WithHiddenClearButton = {
|
|
94
|
-
render: (args) => (_jsx(TextInputStory, { ...args, initialValue: 'Content with hidden clear' })),
|
|
95
|
-
args: {
|
|
96
|
-
label: 'Label',
|
|
97
|
-
editable: true,
|
|
98
|
-
hideClearButton: true,
|
|
99
|
-
keyboardType: 'default',
|
|
100
|
-
},
|
|
101
|
-
};
|
|
102
|
-
export const WithClearCallback = {
|
|
103
|
-
render: (args) => (_jsx(TextInputStory, { ...args, initialValue: 'Click clear to see callback', onClear: () => alert('Input cleared!') })),
|
|
104
|
-
args: {
|
|
105
|
-
label: 'Label',
|
|
106
|
-
editable: true,
|
|
107
|
-
hideClearButton: false,
|
|
108
|
-
keyboardType: 'default',
|
|
109
|
-
},
|
|
110
|
-
};
|
|
111
|
-
export const EmailKeyboard = {
|
|
112
|
-
render: (args) => _jsx(TextInputStory, { ...args }),
|
|
113
|
-
args: {
|
|
114
|
-
label: 'Email',
|
|
115
|
-
editable: true,
|
|
116
|
-
hideClearButton: false,
|
|
117
|
-
keyboardType: 'email-address',
|
|
118
|
-
},
|
|
119
|
-
};
|
|
120
|
-
export const PhoneKeyboard = {
|
|
121
|
-
render: (args) => _jsx(TextInputStory, { ...args }),
|
|
122
|
-
args: {
|
|
123
|
-
label: 'Phone Number',
|
|
124
|
-
editable: true,
|
|
125
|
-
hideClearButton: false,
|
|
126
|
-
keyboardType: 'phone-pad',
|
|
127
|
-
},
|
|
128
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { Tile } from './Tile';
|
|
3
|
-
declare const meta: Meta<typeof Tile>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Tile>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const VariantsShowcase: Story;
|
|
8
|
-
export declare const WithSecondaryAction: Story;
|
|
9
|
-
export declare const HorizontalList: Story;
|
|
10
|
-
export declare const ResponsiveLayout: Story;
|
|
11
|
-
export declare const AppearanceShowcase: Story;
|
|
12
|
-
export declare const CenteredShowcase: Story;
|
|
13
|
-
export declare const SizeShowcase: Story;
|
|
14
|
-
//# sourceMappingURL=Tile.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Tile/Tile.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAIvE,OAAO,EACL,IAAI,EAML,MAAM,QAAQ,CAAC;AAEhB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CAqC3B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,IAAI,EAAE,KA8BlB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAwC9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KA+BjC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KA4C5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KA0B9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KA+ChC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAyC9B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KA+C1B,CAAC"}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Settings, Plus, User, Apps, ChevronRight } from '../../Symbols';
|
|
3
|
-
import { Tag } from '../Tag/Tag';
|
|
4
|
-
import { Box, Text } from '../Utility';
|
|
5
|
-
import { Tile, TileSpot, TileContent, TileTitle, TileDescription, TileTrailingContent, } from './Tile';
|
|
6
|
-
const meta = {
|
|
7
|
-
component: Tile,
|
|
8
|
-
subcomponents: {
|
|
9
|
-
TileSpot,
|
|
10
|
-
TileContent,
|
|
11
|
-
TileTitle,
|
|
12
|
-
TileDescription,
|
|
13
|
-
TileTrailingContent,
|
|
14
|
-
},
|
|
15
|
-
title: 'Containment/Tile',
|
|
16
|
-
parameters: {
|
|
17
|
-
docs: {
|
|
18
|
-
source: {
|
|
19
|
-
language: 'tsx',
|
|
20
|
-
format: true,
|
|
21
|
-
type: 'code',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
argTypes: {
|
|
26
|
-
onPress: {
|
|
27
|
-
action: 'pressed',
|
|
28
|
-
},
|
|
29
|
-
onLongPress: {
|
|
30
|
-
action: 'long pressed',
|
|
31
|
-
},
|
|
32
|
-
appearance: {
|
|
33
|
-
control: 'select',
|
|
34
|
-
options: ['no-background', 'card'],
|
|
35
|
-
},
|
|
36
|
-
disabled: {
|
|
37
|
-
control: 'boolean',
|
|
38
|
-
},
|
|
39
|
-
centered: {
|
|
40
|
-
control: 'boolean',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
export default meta;
|
|
45
|
-
export const Base = {
|
|
46
|
-
args: {
|
|
47
|
-
appearance: 'no-background',
|
|
48
|
-
disabled: false,
|
|
49
|
-
centered: false,
|
|
50
|
-
},
|
|
51
|
-
render: (args) => (_jsxs(Tile, { ...args, lx: { maxWidth: 's112' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Settings }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Item with Spot and Description" }), _jsx(TileDescription, { children: "Additional information" })] })] })),
|
|
52
|
-
parameters: {
|
|
53
|
-
docs: {
|
|
54
|
-
source: {
|
|
55
|
-
code: `
|
|
56
|
-
<Tile lx={{ maxWidth: 's112' }}>
|
|
57
|
-
<TileSpot appearance="icon" icon={Settings} />
|
|
58
|
-
<TileContent>
|
|
59
|
-
<TileTitle>Item with Spot and Description</TileTitle>
|
|
60
|
-
<TileDescription>Additional information</TileDescription>
|
|
61
|
-
</TileContent>
|
|
62
|
-
</Tile>
|
|
63
|
-
`,
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
export const VariantsShowcase = {
|
|
69
|
-
render: () => (_jsxs(Box, { lx: { flexDirection: 'column', gap: 's16' }, children: [_jsxs(Tile, { lx: { maxWidth: 's176' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: User }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "User" }), _jsx(TileDescription, { children: "With description" })] })] }), _jsxs(Tile, { lx: { maxWidth: 's176' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Plus }), _jsx(TileContent, { children: _jsx(TileTitle, { children: "Without Description" }) })] }), _jsxs(Tile, { lx: { maxWidth: 's176' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Settings }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "With Trailing Content" }), _jsx(TileDescription, { children: "Additional information" }), _jsx(TileTrailingContent, { children: _jsx(Tag, { label: 'Custom', appearance: 'base' }) })] })] }), _jsxs(Tile, { lx: { maxWidth: 's176' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Settings }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "With Trailing Content" }), _jsx(TileDescription, { children: "Additional information" }), _jsx(TileTrailingContent, { children: _jsx(Text, { typography: 'body2SemiBold', lx: { color: 'success' }, children: "+7.87%" }) })] })] })] })),
|
|
70
|
-
};
|
|
71
|
-
export const WithSecondaryAction = {
|
|
72
|
-
render: () => (_jsxs(Tile, { onLongPress: () => alert('Long press - secondary action triggered!'), lx: { maxWidth: 's176' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Settings }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Long Press Me" }), _jsx(TileDescription, { children: "Try long pressing this tile" })] })] })),
|
|
73
|
-
parameters: {
|
|
74
|
-
docs: {
|
|
75
|
-
source: {
|
|
76
|
-
code: `
|
|
77
|
-
<Tile
|
|
78
|
-
onLongPress={() => alert('Long press - secondary action triggered!')}
|
|
79
|
-
lx={{ maxWidth: 's160' }}
|
|
80
|
-
>
|
|
81
|
-
<TileSpot appearance="icon" icon={Settings} />
|
|
82
|
-
<TileContent>
|
|
83
|
-
<TileTitle>Long Press Me</TileTitle>
|
|
84
|
-
<TileDescription>Try long pressing this tile</TileDescription>
|
|
85
|
-
</TileContent>
|
|
86
|
-
</Tile>
|
|
87
|
-
`,
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
export const HorizontalList = {
|
|
93
|
-
render: () => (_jsxs(Box, { lx: { flexDirection: 'column', gap: 's16' }, children: [_jsx(Box, { lx: {
|
|
94
|
-
position: 'relative',
|
|
95
|
-
flexDirection: 'row',
|
|
96
|
-
width: 's480',
|
|
97
|
-
backgroundColor: 'base',
|
|
98
|
-
}, children: Array.from({ length: 3 }).map((_, i) => (_jsxs(Tile, { children: [_jsx(TileSpot, { appearance: 'icon', icon: Apps }), _jsxs(TileContent, { children: [_jsxs(TileTitle, { children: ["Item ", i + 1] }), _jsxs(TileDescription, { children: ["Description ", i + 1] })] })] }, `list-1-${i}`))) }), _jsx(Box, { lx: {
|
|
99
|
-
flexDirection: 'row',
|
|
100
|
-
width: 's480',
|
|
101
|
-
position: 'relative',
|
|
102
|
-
backgroundColor: 'base',
|
|
103
|
-
overflow: 'scroll',
|
|
104
|
-
}, children: Array.from({ length: 5 }).map((_, i) => (_jsxs(Tile, { lx: { width: 's128', flexShrink: 0 }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Apps }), _jsxs(TileContent, { children: [_jsxs(TileTitle, { children: ["Item ", i + 1] }), _jsx(TileDescription, { children: "Long description that should truncate appropriately" })] })] }, `list-2-${i}`))) })] })),
|
|
105
|
-
};
|
|
106
|
-
export const ResponsiveLayout = {
|
|
107
|
-
render: () => (_jsxs(Box, { lx: { width: 'full', flexDirection: 'column', gap: 's16' }, children: [_jsx(Box, { children: _jsxs(Tile, { children: [_jsx(TileSpot, { appearance: 'icon', icon: Apps }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Item fill width" }), _jsx(TileDescription, { children: "Description fill width" })] })] }) }), _jsx(Box, { lx: { alignItems: 'center', justifyContent: 'center' }, children: _jsxs(Tile, { lx: { width: 's224' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Plus }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Long Item with fixed width" }), _jsx(TileDescription, { children: "lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos." })] })] }) })] })),
|
|
108
|
-
};
|
|
109
|
-
export const AppearanceShowcase = {
|
|
110
|
-
render: () => (_jsxs(Box, { lx: { flexDirection: 'column', gap: 's24' }, children: [_jsxs(Box, { children: [_jsx(Box, { lx: { marginBottom: 's8' }, children: _jsx(Text, { typography: 'body2SemiBold', children: "No Background" }) }), _jsxs(Box, { lx: { flexDirection: 'row', gap: 's16' }, children: [_jsxs(Tile, { appearance: 'no-background', lx: { width: 's112' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Settings }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Press me" }), _jsx(TileDescription, { children: "Press state" })] })] }), _jsxs(Tile, { appearance: 'no-background', disabled: true, lx: { width: 's112' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Settings }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Disabled" }), _jsx(TileDescription, { children: "Disabled state" })] })] })] })] }), _jsxs(Box, { children: [_jsx(Box, { lx: { marginBottom: 's8' }, children: _jsx(Text, { typography: 'body2SemiBold', children: "Card" }) }), _jsxs(Box, { lx: { flexDirection: 'row', gap: 's16' }, children: [_jsxs(Tile, { appearance: 'card', lx: { width: 's112' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: User }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Press me" }), _jsx(TileDescription, { children: "Press state" })] })] }), _jsxs(Tile, { appearance: 'card', disabled: true, lx: { width: 's112' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: User }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Disabled" }), _jsx(TileDescription, { children: "Disabled state" })] })] })] })] })] })),
|
|
111
|
-
};
|
|
112
|
-
export const CenteredShowcase = {
|
|
113
|
-
render: () => (_jsxs(Box, { lx: { flexDirection: 'row', gap: 's8' }, children: [_jsxs(Tile, { appearance: 'card', lx: { width: 's128' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Apps }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Title" }), _jsx(TileDescription, { children: "Description" }), _jsx(TileTrailingContent, { children: _jsx(Tag, { label: 'Label', appearance: 'base' }) })] })] }), _jsxs(Tile, { appearance: 'card', lx: { width: 's128' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Apps }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Title" }), _jsx(TileDescription, { children: "Description" }), _jsx(TileTrailingContent, { children: _jsx(Tag, { label: 'Label', appearance: 'base' }) })] })] }), _jsxs(Tile, { appearance: 'card', lx: { width: 's128' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Apps }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Title" }), _jsx(TileDescription, { children: "Description" }), _jsx(TileTrailingContent, { children: _jsx(Tag, { label: 'Label', appearance: 'base' }) })] })] }), _jsxs(Tile, { appearance: 'card', centered: true, lx: { width: 's128' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: ChevronRight }), _jsx(TileContent, { children: _jsx(TileTitle, { children: "Show more" }) })] })] })),
|
|
114
|
-
};
|
|
115
|
-
export const SizeShowcase = {
|
|
116
|
-
render: () => (_jsxs(Box, { lx: { flexDirection: 'column', gap: 's24' }, children: [_jsxs(Box, { children: [_jsx(Box, { lx: { marginBottom: 's8' }, children: _jsx(Text, { typography: 'body2SemiBold', children: "Size 48 (default)" }) }), _jsxs(Box, { lx: { flexDirection: 'row', gap: 's16' }, children: [_jsxs(Tile, { appearance: 'card', lx: { width: 's112' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Settings, size: 48 }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Settings" }), _jsx(TileDescription, { children: "Size 48" })] })] }), _jsxs(Tile, { appearance: 'card', lx: { width: 's112' }, children: [_jsx(TileSpot, { appearance: 'check', size: 48 }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Check" }), _jsx(TileDescription, { children: "Size 48" })] })] })] })] }), _jsxs(Box, { children: [_jsx(Box, { lx: { marginBottom: 's8' }, children: _jsx(Text, { typography: 'body2SemiBold', children: "Size 40" }) }), _jsxs(Box, { lx: { flexDirection: 'row', gap: 's16' }, children: [_jsxs(Tile, { appearance: 'card', lx: { width: 's112' }, children: [_jsx(TileSpot, { appearance: 'icon', icon: Settings, size: 40 }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Settings" }), _jsx(TileDescription, { children: "Size 40" })] })] }), _jsxs(Tile, { appearance: 'card', lx: { width: 's112' }, children: [_jsx(TileSpot, { appearance: 'check', size: 40 }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: "Check" }), _jsx(TileDescription, { children: "Size 40" })] })] })] })] })] })),
|
|
117
|
-
};
|