@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,98 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { View } from 'react-native';
|
|
4
|
-
import { SearchInput } from './SearchInput';
|
|
5
|
-
const meta = {
|
|
6
|
-
component: SearchInput,
|
|
7
|
-
title: 'Input/SearchInput',
|
|
8
|
-
args: {
|
|
9
|
-
appearance: 'plain',
|
|
10
|
-
},
|
|
11
|
-
parameters: {
|
|
12
|
-
docs: {
|
|
13
|
-
source: {
|
|
14
|
-
language: 'tsx',
|
|
15
|
-
format: true,
|
|
16
|
-
type: 'code',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
argTypes: {
|
|
21
|
-
placeholder: {
|
|
22
|
-
control: 'text',
|
|
23
|
-
description: 'Placeholder text when input is empty',
|
|
24
|
-
},
|
|
25
|
-
errorMessage: {
|
|
26
|
-
control: 'text',
|
|
27
|
-
description: 'Error message to display below input',
|
|
28
|
-
},
|
|
29
|
-
editable: {
|
|
30
|
-
control: 'boolean',
|
|
31
|
-
description: 'Whether the input is editable',
|
|
32
|
-
},
|
|
33
|
-
hideClearButton: {
|
|
34
|
-
control: 'boolean',
|
|
35
|
-
description: 'Hide the clear button',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
export default meta;
|
|
40
|
-
const SearchInputStory = (args) => {
|
|
41
|
-
const [query, setQuery] = useState(args.initialValue ?? '');
|
|
42
|
-
return (_jsx(View, { style: {
|
|
43
|
-
flex: 1,
|
|
44
|
-
minHeight: 96,
|
|
45
|
-
alignItems: 'center',
|
|
46
|
-
justifyContent: 'center',
|
|
47
|
-
padding: 24,
|
|
48
|
-
}, children: _jsx(View, { style: { width: '100%', maxWidth: 400 }, children: _jsx(SearchInput, { ...args, value: query, onChangeText: setQuery, onClear: args.onClear }) }) }));
|
|
49
|
-
};
|
|
50
|
-
export const Base = {
|
|
51
|
-
render: (args) => _jsx(SearchInputStory, { ...args }),
|
|
52
|
-
args: {
|
|
53
|
-
placeholder: 'Search products',
|
|
54
|
-
editable: true,
|
|
55
|
-
hideClearButton: false,
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
export const WithContent = {
|
|
59
|
-
render: (args) => _jsx(SearchInputStory, { ...args, initialValue: 'Search text' }),
|
|
60
|
-
args: {
|
|
61
|
-
placeholder: 'Search products',
|
|
62
|
-
editable: true,
|
|
63
|
-
hideClearButton: false,
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
export const WithError = {
|
|
67
|
-
render: (args) => (_jsx(SearchInputStory, { ...args, initialValue: 'Invalid search' })),
|
|
68
|
-
args: {
|
|
69
|
-
placeholder: 'Search products',
|
|
70
|
-
errorMessage: 'Search term is invalid',
|
|
71
|
-
editable: true,
|
|
72
|
-
hideClearButton: false,
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
export const DisabledSearchInput = {
|
|
76
|
-
render: (args) => (_jsx(SearchInputStory, { ...args, initialValue: 'Disabled search' })),
|
|
77
|
-
args: {
|
|
78
|
-
placeholder: 'Search products',
|
|
79
|
-
editable: false,
|
|
80
|
-
hideClearButton: false,
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
export const WithHiddenClearButton = {
|
|
84
|
-
render: (args) => _jsx(SearchInputStory, { ...args, initialValue: 'Search text' }),
|
|
85
|
-
args: {
|
|
86
|
-
placeholder: 'Search products',
|
|
87
|
-
editable: true,
|
|
88
|
-
hideClearButton: true,
|
|
89
|
-
},
|
|
90
|
-
};
|
|
91
|
-
export const WithClearCallback = {
|
|
92
|
-
render: (args) => (_jsx(SearchInputStory, { ...args, initialValue: 'Click clear to see callback', onClear: () => alert('Search cleared!') })),
|
|
93
|
-
args: {
|
|
94
|
-
placeholder: 'Search products',
|
|
95
|
-
editable: true,
|
|
96
|
-
hideClearButton: false,
|
|
97
|
-
},
|
|
98
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { SegmentedControl, SegmentedControlButton } from './SegmentedControl';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof SegmentedControl;
|
|
6
|
-
subcomponents: {
|
|
7
|
-
SegmentedControlButton: typeof SegmentedControlButton;
|
|
8
|
-
};
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: string;
|
|
11
|
-
backgrounds: {
|
|
12
|
-
default: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
argTypes: {
|
|
16
|
-
onSelectedChange: {
|
|
17
|
-
action: string;
|
|
18
|
-
description: string;
|
|
19
|
-
table: {
|
|
20
|
-
type: {
|
|
21
|
-
summary: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
accessibilityLabel: {
|
|
26
|
-
control: "text";
|
|
27
|
-
description: string;
|
|
28
|
-
table: {
|
|
29
|
-
type: {
|
|
30
|
-
summary: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
selectedValue: {
|
|
35
|
-
control: "text";
|
|
36
|
-
description: string;
|
|
37
|
-
table: {
|
|
38
|
-
type: {
|
|
39
|
-
summary: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
children: {
|
|
44
|
-
control: false;
|
|
45
|
-
description: string;
|
|
46
|
-
table: {
|
|
47
|
-
type: {
|
|
48
|
-
summary: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
export default meta;
|
|
55
|
-
type Story = StoryObj<typeof meta>;
|
|
56
|
-
export declare const Base: Story;
|
|
57
|
-
export declare const WithIcons: Story;
|
|
58
|
-
//# sourceMappingURL=SegmentedControl.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/SegmentedControl/SegmentedControl.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAIvE,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE9E,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC+B,CAAC;AAE1C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,IAAI,EAAE,KAqBlB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KA0BvB,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { Coins, Nft, TransferHorizontal, Settings } from '../../Symbols';
|
|
4
|
-
import { Box } from '../Utility';
|
|
5
|
-
import { SegmentedControl, SegmentedControlButton } from './SegmentedControl';
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'Navigation/SegmentedControl',
|
|
8
|
-
component: SegmentedControl,
|
|
9
|
-
subcomponents: {
|
|
10
|
-
SegmentedControlButton,
|
|
11
|
-
},
|
|
12
|
-
parameters: {
|
|
13
|
-
layout: 'centered',
|
|
14
|
-
backgrounds: { default: 'light' },
|
|
15
|
-
},
|
|
16
|
-
argTypes: {
|
|
17
|
-
onSelectedChange: {
|
|
18
|
-
action: 'change',
|
|
19
|
-
description: 'Callback when the selected value changes',
|
|
20
|
-
table: {
|
|
21
|
-
type: { summary: '(value: string) => void' },
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
accessibilityLabel: {
|
|
25
|
-
control: 'text',
|
|
26
|
-
description: 'Accessible label for the control',
|
|
27
|
-
table: {
|
|
28
|
-
type: { summary: 'string' },
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
selectedValue: {
|
|
32
|
-
control: 'text',
|
|
33
|
-
description: 'The value of the currently selected segment (drives the sliding pill)',
|
|
34
|
-
table: {
|
|
35
|
-
type: { summary: 'string' },
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
children: {
|
|
39
|
-
control: false,
|
|
40
|
-
description: 'SegmentedControlButton elements',
|
|
41
|
-
table: {
|
|
42
|
-
type: { summary: 'ReactNode' },
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
export default meta;
|
|
48
|
-
export const Base = {
|
|
49
|
-
args: {},
|
|
50
|
-
render: () => {
|
|
51
|
-
const [state, setState] = useState('send');
|
|
52
|
-
return (_jsx(Box, { lx: { width: 's256' }, children: _jsxs(SegmentedControl, { selectedValue: state, onSelectedChange: setState, accessibilityLabel: 'Transaction type', children: [_jsx(SegmentedControlButton, { value: 'send', children: "Send" }), _jsx(SegmentedControlButton, { value: 'receive', children: "Receive" }), _jsx(SegmentedControlButton, { value: 'buy', children: "Buy" })] }) }));
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
export const WithIcons = {
|
|
56
|
-
args: {},
|
|
57
|
-
render: () => {
|
|
58
|
-
const [state, setState] = useState('tokens');
|
|
59
|
-
return (_jsxs(SegmentedControl, { selectedValue: state, onSelectedChange: setState, accessibilityLabel: 'Asset section', children: [_jsx(SegmentedControlButton, { value: 'tokens', icon: Coins, children: "Tokens" }), _jsx(SegmentedControlButton, { value: 'nfts', icon: Nft, children: "NFTs" }), _jsx(SegmentedControlButton, { value: 'activity', icon: TransferHorizontal, children: "Activity" }), _jsx(SegmentedControlButton, { value: 'settings', icon: Settings, children: "Settings" })] }));
|
|
60
|
-
},
|
|
61
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { Select } from './Select';
|
|
3
|
-
declare const meta: Meta<typeof Select>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Select>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const WithGroups: Story;
|
|
8
|
-
export declare const WithDisabledItems: Story;
|
|
9
|
-
export declare const DisabledSelect: Story;
|
|
10
|
-
export declare const WithChangeCallback: Story;
|
|
11
|
-
//# sourceMappingURL=Select.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Select/Select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAIvE,OAAO,EACL,MAAM,EASP,MAAM,UAAU,CAAC;AAElB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAgB7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,IAAI,EAAE,KA2ClB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAkDxB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KA2C/B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAqC5B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KA8ChC,CAAC"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { Box } from '../Utility';
|
|
4
|
-
import { GlobalSelectBottomSheet } from './GlobalSelectBottomSheet';
|
|
5
|
-
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem, SelectItemText, SelectGroup, SelectLabel, SelectSeparator, } from './Select';
|
|
6
|
-
const meta = {
|
|
7
|
-
component: Select,
|
|
8
|
-
subcomponents: {
|
|
9
|
-
SelectTrigger,
|
|
10
|
-
SelectValue,
|
|
11
|
-
SelectContent,
|
|
12
|
-
SelectItem,
|
|
13
|
-
SelectItemText,
|
|
14
|
-
SelectGroup,
|
|
15
|
-
SelectLabel,
|
|
16
|
-
SelectSeparator,
|
|
17
|
-
},
|
|
18
|
-
title: 'Selection/Select',
|
|
19
|
-
parameters: {
|
|
20
|
-
layout: 'fullscreen',
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
export default meta;
|
|
24
|
-
export const Base = {
|
|
25
|
-
render: () => {
|
|
26
|
-
const [value, setValue] = useState('apple');
|
|
27
|
-
return (_jsxs(_Fragment, { children: [_jsx(Box, { style: {
|
|
28
|
-
flex: 1,
|
|
29
|
-
minHeight: 400,
|
|
30
|
-
padding: 24,
|
|
31
|
-
width: '100%',
|
|
32
|
-
}, children: _jsx(Box, { style: { width: '100%', maxWidth: 400 }, children: _jsxs(Select, { value: value, onValueChange: setValue, children: [_jsx(SelectTrigger, { label: 'Choose a fruit', children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: 'apple', children: _jsx(SelectItemText, { children: "Apple" }) }), _jsx(SelectItem, { value: 'banana', children: _jsx(SelectItemText, { children: "Banana" }) }), _jsx(SelectItem, { value: 'orange', children: _jsx(SelectItemText, { children: "Orange" }) }), _jsx(SelectItem, { value: 'grape', children: _jsx(SelectItemText, { children: "Grape" }) }), _jsx(SelectItem, { value: 'mango', children: _jsx(SelectItemText, { children: "Mango" }) })] })] }) }) }), _jsx(GlobalSelectBottomSheet, {})] }));
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
export const WithGroups = {
|
|
36
|
-
render: () => {
|
|
37
|
-
const [value, setValue] = useState('btc');
|
|
38
|
-
return (_jsxs(_Fragment, { children: [_jsx(Box, { style: {
|
|
39
|
-
flex: 1,
|
|
40
|
-
minHeight: 400,
|
|
41
|
-
padding: 24,
|
|
42
|
-
width: '100%',
|
|
43
|
-
}, children: _jsx(Box, { style: { width: '100%', maxWidth: 400 }, children: _jsxs(Select, { value: value, onValueChange: setValue, children: [_jsx(SelectTrigger, { label: 'Select cryptocurrency', children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsxs(SelectGroup, { children: [_jsx(SelectLabel, { children: "Popular" }), _jsx(SelectItem, { value: 'btc', children: _jsx(SelectItemText, { children: "Bitcoin" }) }), _jsx(SelectItem, { value: 'eth', children: _jsx(SelectItemText, { children: "Ethereum" }) })] }), _jsx(SelectSeparator, {}), _jsxs(SelectGroup, { children: [_jsx(SelectLabel, { children: "Altcoins" }), _jsx(SelectItem, { value: 'ada', children: _jsx(SelectItemText, { children: "Cardano" }) }), _jsx(SelectItem, { value: 'dot', children: _jsx(SelectItemText, { children: "Polkadot" }) }), _jsx(SelectItem, { value: 'sol', children: _jsx(SelectItemText, { children: "Solana" }) })] })] })] }) }) }), _jsx(GlobalSelectBottomSheet, {})] }));
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
export const WithDisabledItems = {
|
|
47
|
-
render: () => {
|
|
48
|
-
const [value, setValue] = useState('option1');
|
|
49
|
-
return (_jsxs(_Fragment, { children: [_jsx(Box, { style: {
|
|
50
|
-
flex: 1,
|
|
51
|
-
minHeight: 400,
|
|
52
|
-
padding: 24,
|
|
53
|
-
width: '100%',
|
|
54
|
-
}, children: _jsx(Box, { style: { width: '100%', maxWidth: 400 }, children: _jsxs(Select, { value: value, onValueChange: setValue, children: [_jsx(SelectTrigger, { label: 'Select option', children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: 'option1', children: _jsx(SelectItemText, { children: "Option 1" }) }), _jsx(SelectItem, { value: 'option2', disabled: true, children: _jsx(SelectItemText, { children: "Option 2 (Disabled)" }) }), _jsx(SelectItem, { value: 'option3', children: _jsx(SelectItemText, { children: "Option 3" }) }), _jsx(SelectItem, { value: 'option4', disabled: true, children: _jsx(SelectItemText, { children: "Option 4 (Disabled)" }) }), _jsx(SelectItem, { value: 'option5', children: _jsx(SelectItemText, { children: "Option 5" }) })] })] }) }) }), _jsx(GlobalSelectBottomSheet, {})] }));
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
export const DisabledSelect = {
|
|
58
|
-
render: () => {
|
|
59
|
-
const [value, setValue] = useState('apple');
|
|
60
|
-
return (_jsxs(_Fragment, { children: [_jsx(Box, { style: {
|
|
61
|
-
flex: 1,
|
|
62
|
-
minHeight: 400,
|
|
63
|
-
padding: 24,
|
|
64
|
-
width: '100%',
|
|
65
|
-
}, children: _jsx(Box, { style: { width: '100%', maxWidth: 400 }, children: _jsxs(Select, { value: value, onValueChange: setValue, disabled: true, children: [_jsx(SelectTrigger, { label: 'Disabled select', children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: 'apple', children: _jsx(SelectItemText, { children: "Apple" }) }), _jsx(SelectItem, { value: 'banana', children: _jsx(SelectItemText, { children: "Banana" }) }), _jsx(SelectItem, { value: 'orange', children: _jsx(SelectItemText, { children: "Orange" }) })] })] }) }) }), _jsx(GlobalSelectBottomSheet, {})] }));
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
export const WithChangeCallback = {
|
|
69
|
-
render: () => {
|
|
70
|
-
const [value, setValue] = useState('option1');
|
|
71
|
-
return (_jsxs(_Fragment, { children: [_jsx(Box, { style: {
|
|
72
|
-
flex: 1,
|
|
73
|
-
minHeight: 400,
|
|
74
|
-
padding: 24,
|
|
75
|
-
width: '100%',
|
|
76
|
-
}, children: _jsx(Box, { style: { width: '100%', maxWidth: 400 }, children: _jsxs(Select, { value: value, onValueChange: (newValue) => {
|
|
77
|
-
setValue(newValue);
|
|
78
|
-
alert(`Selected: ${newValue}`);
|
|
79
|
-
}, onOpenChange: (open) => {
|
|
80
|
-
alert(`Select ${open ? 'opened' : 'closed'}`);
|
|
81
|
-
}, children: [_jsx(SelectTrigger, { label: 'Select with callbacks', children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: 'option1', children: _jsx(SelectItemText, { children: "Option 1" }) }), _jsx(SelectItem, { value: 'option2', children: _jsx(SelectItemText, { children: "Option 2" }) }), _jsx(SelectItem, { value: 'option3', children: _jsx(SelectItemText, { children: "Option 3" }) })] })] }) }) }), _jsx(GlobalSelectBottomSheet, {})] }));
|
|
82
|
-
},
|
|
83
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { Skeleton } from './Skeleton';
|
|
3
|
-
declare const meta: Meta<typeof Skeleton>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Skeleton>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const WithListItem: Story;
|
|
8
|
-
export declare const WithTile: Story;
|
|
9
|
-
export declare const SizeShowcase: Story;
|
|
10
|
-
export declare const ShapeShowcase: Story;
|
|
11
|
-
//# sourceMappingURL=Skeleton.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Skeleton/Skeleton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAa/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEvC,eAAO,MAAM,IAAI,EAAE,KAelB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAe1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAgB3B,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box } from '../Utility/Box';
|
|
3
|
-
import { Skeleton } from './Skeleton';
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Communication/Skeleton',
|
|
6
|
-
component: Skeleton,
|
|
7
|
-
parameters: {
|
|
8
|
-
actions: { disable: true },
|
|
9
|
-
},
|
|
10
|
-
argTypes: {
|
|
11
|
-
component: {
|
|
12
|
-
control: 'select',
|
|
13
|
-
options: [undefined, 'list-item', 'tile'],
|
|
14
|
-
description: 'Pre-built skeleton component variant',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
export default meta;
|
|
19
|
-
export const Base = {
|
|
20
|
-
args: {
|
|
21
|
-
lx: {
|
|
22
|
-
height: 's16',
|
|
23
|
-
width: 's256',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
render: (args) => (_jsx(Box, { lx: { padding: 's16', backgroundColor: 'canvas', borderRadius: 'md' }, children: _jsx(Skeleton, { component: args.component, lx: args.component ? undefined : args.lx }) })),
|
|
27
|
-
};
|
|
28
|
-
export const WithListItem = {
|
|
29
|
-
render: () => (_jsx(Box, { lx: { padding: 's16', backgroundColor: 'canvas', borderRadius: 'md' }, children: _jsx(Skeleton, { component: 'list-item' }) })),
|
|
30
|
-
};
|
|
31
|
-
export const WithTile = {
|
|
32
|
-
render: () => (_jsx(Box, { lx: { padding: 's16', backgroundColor: 'canvas', borderRadius: 'md' }, children: _jsx(Skeleton, { component: 'tile' }) })),
|
|
33
|
-
};
|
|
34
|
-
export const SizeShowcase = {
|
|
35
|
-
render: () => (_jsxs(Box, { lx: {
|
|
36
|
-
padding: 's16',
|
|
37
|
-
backgroundColor: 'canvas',
|
|
38
|
-
borderRadius: 'md',
|
|
39
|
-
gap: 's4',
|
|
40
|
-
}, children: [_jsx(Skeleton, { lx: { height: 's40', width: 's56' } }), _jsx(Skeleton, { lx: { height: 's12', width: 's112' } }), _jsx(Skeleton, { lx: { height: 's128', width: 's256' } })] })),
|
|
41
|
-
};
|
|
42
|
-
export const ShapeShowcase = {
|
|
43
|
-
render: () => (_jsxs(Box, { lx: {
|
|
44
|
-
padding: 's16',
|
|
45
|
-
backgroundColor: 'canvas',
|
|
46
|
-
borderRadius: 'md',
|
|
47
|
-
gap: 's4',
|
|
48
|
-
}, children: [_jsx(Skeleton, { lx: { height: 's40', width: 's256', borderRadius: 'none' } }), _jsx(Skeleton, { lx: { height: 's40', width: 's256', borderRadius: 'lg' } }), _jsx(Skeleton, { lx: { width: 's48', height: 's48', borderRadius: 'full' } }), _jsx(Skeleton, { lx: { width: 's48', height: 's48', borderRadius: 'md' } })] })),
|
|
49
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { Spinner } from './Spinner';
|
|
3
|
-
declare const meta: Meta<typeof Spinner>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Spinner>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const Sizes: Story;
|
|
8
|
-
export declare const Colors: Story;
|
|
9
|
-
//# sourceMappingURL=Spinner.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Spinner/Spinner.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAY9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAEtC,eAAO,MAAM,IAAI,EAAE,KAKlB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KA2DnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAmCpB,CAAC"}
|
|
@@ -1,50 +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 { Spinner } from './Spinner';
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'Communication/Spinner',
|
|
7
|
-
component: Spinner,
|
|
8
|
-
parameters: {
|
|
9
|
-
actions: { disable: true },
|
|
10
|
-
},
|
|
11
|
-
argTypes: {
|
|
12
|
-
size: {
|
|
13
|
-
control: 'select',
|
|
14
|
-
options: [12, 16, 20, 24, 40, 48, 56],
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
export default meta;
|
|
19
|
-
export const Base = {
|
|
20
|
-
args: {
|
|
21
|
-
size: 40,
|
|
22
|
-
},
|
|
23
|
-
render: (args) => _jsx(Spinner, { ...args }),
|
|
24
|
-
};
|
|
25
|
-
export const Sizes = {
|
|
26
|
-
argTypes: {
|
|
27
|
-
size: {
|
|
28
|
-
control: false,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
render: () => (_jsxs(Box, { lx: {
|
|
32
|
-
flexDirection: 'row',
|
|
33
|
-
alignItems: 'center',
|
|
34
|
-
justifyContent: 'center',
|
|
35
|
-
gap: 's32',
|
|
36
|
-
}, children: [_jsxs(Box, { lx: { alignItems: 'center', gap: 's4' }, children: [_jsx(Spinner, { size: 12 }), _jsx(Text, { typography: 'body4', lx: { color: 'muted' }, children: "12" })] }), _jsxs(Box, { lx: { alignItems: 'center', gap: 's4' }, children: [_jsx(Spinner, { size: 16 }), _jsx(Text, { typography: 'body4', lx: { color: 'muted' }, children: "16" })] }), _jsxs(Box, { lx: { alignItems: 'center', gap: 's4' }, children: [_jsx(Spinner, { size: 20 }), _jsx(Text, { typography: 'body4', lx: { color: 'muted' }, children: "20" })] }), _jsxs(Box, { lx: { alignItems: 'center', gap: 's4' }, children: [_jsx(Spinner, { size: 24 }), _jsx(Text, { typography: 'body4', lx: { color: 'muted' }, children: "24" })] }), _jsxs(Box, { lx: { alignItems: 'center', gap: 's4' }, children: [_jsx(Spinner, { size: 40 }), _jsx(Text, { typography: 'body4', lx: { color: 'muted' }, children: "40" })] }), _jsxs(Box, { lx: { alignItems: 'center', gap: 's4' }, children: [_jsx(Spinner, { size: 48 }), _jsx(Text, { typography: 'body4', lx: { color: 'muted' }, children: "48" })] }), _jsxs(Box, { lx: { alignItems: 'center', gap: 's4' }, children: [_jsx(Spinner, { size: 56 }), _jsx(Text, { typography: 'body4', lx: { color: 'muted' }, children: "56" })] })] })),
|
|
37
|
-
};
|
|
38
|
-
export const Colors = {
|
|
39
|
-
argTypes: {
|
|
40
|
-
size: {
|
|
41
|
-
control: false,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
render: () => (_jsxs(Box, { lx: {
|
|
45
|
-
flexDirection: 'row',
|
|
46
|
-
alignItems: 'center',
|
|
47
|
-
justifyContent: 'center',
|
|
48
|
-
gap: 's32',
|
|
49
|
-
}, children: [_jsxs(Box, { lx: { alignItems: 'center', gap: 's4' }, children: [_jsx(Spinner, { size: 40, color: 'base' }), _jsx(Text, { typography: 'body4', lx: { color: 'muted' }, children: "base" })] }), _jsxs(Box, { lx: { alignItems: 'center', gap: 's4' }, children: [_jsx(Spinner, { size: 40, color: 'muted' }), _jsx(Text, { typography: 'body4', lx: { color: 'muted' }, children: "muted" })] }), _jsxs(Box, { lx: { alignItems: 'center', gap: 's4' }, children: [_jsx(Spinner, { size: 40, color: 'interactive' }), _jsx(Text, { typography: 'body4', lx: { color: 'muted' }, children: "interactive" })] })] })),
|
|
50
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { Spot } from './Spot';
|
|
3
|
-
declare const meta: Meta<typeof Spot>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Spot>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const AppearanceShowcase: Story;
|
|
8
|
-
export declare const IconVariants: Story;
|
|
9
|
-
export declare const NumberVariants: Story;
|
|
10
|
-
export declare const SizesShowcase: Story;
|
|
11
|
-
export declare const StatesShowcase: Story;
|
|
12
|
-
//# sourceMappingURL=Spot.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Spot.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Spot/Spot.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAKvE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CAsD3B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,IAAI,EAAE,KAiBlB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAkDhC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAiB1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAmB5B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAmB3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAyD5B,CAAC"}
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Settings, Plus, Heart, Star } from '../../Symbols';
|
|
3
|
-
import { Box, Text } from '../Utility';
|
|
4
|
-
import { Spot } from './Spot';
|
|
5
|
-
const meta = {
|
|
6
|
-
component: Spot,
|
|
7
|
-
title: 'Communication/Spot',
|
|
8
|
-
parameters: {
|
|
9
|
-
docs: {
|
|
10
|
-
source: {
|
|
11
|
-
language: 'tsx',
|
|
12
|
-
format: true,
|
|
13
|
-
type: 'code',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
argTypes: {
|
|
18
|
-
appearance: {
|
|
19
|
-
control: 'select',
|
|
20
|
-
options: [
|
|
21
|
-
'icon',
|
|
22
|
-
'bluetooth',
|
|
23
|
-
'check',
|
|
24
|
-
'error',
|
|
25
|
-
'warning',
|
|
26
|
-
'info',
|
|
27
|
-
'loader',
|
|
28
|
-
'number',
|
|
29
|
-
],
|
|
30
|
-
description: 'The visual appearance and behavior of the spot',
|
|
31
|
-
},
|
|
32
|
-
size: {
|
|
33
|
-
control: 'select',
|
|
34
|
-
options: [32, 40, 48, 56, 72],
|
|
35
|
-
description: 'The size of the spot',
|
|
36
|
-
},
|
|
37
|
-
disabled: {
|
|
38
|
-
control: 'boolean',
|
|
39
|
-
description: 'Whether the spot looks disabled',
|
|
40
|
-
},
|
|
41
|
-
icon: {
|
|
42
|
-
control: 'select',
|
|
43
|
-
description: 'Icon component to display (required for icon appearance)',
|
|
44
|
-
options: ['None', 'Settings', 'Plus', 'Heart', 'Star'],
|
|
45
|
-
mapping: {
|
|
46
|
-
None: undefined,
|
|
47
|
-
Settings: Settings,
|
|
48
|
-
Plus: Plus,
|
|
49
|
-
Heart: Heart,
|
|
50
|
-
Star: Star,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
number: {
|
|
54
|
-
control: 'select',
|
|
55
|
-
options: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
|
|
56
|
-
description: 'Number to display (required for number appearance)',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
export default meta;
|
|
61
|
-
export const Base = {
|
|
62
|
-
args: {
|
|
63
|
-
appearance: 'icon',
|
|
64
|
-
icon: Settings,
|
|
65
|
-
},
|
|
66
|
-
parameters: {
|
|
67
|
-
docs: {
|
|
68
|
-
source: {
|
|
69
|
-
code: `
|
|
70
|
-
<Spot
|
|
71
|
-
appearance="icon"
|
|
72
|
-
icon={Settings}
|
|
73
|
-
/>
|
|
74
|
-
`,
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
export const AppearanceShowcase = {
|
|
80
|
-
render: () => {
|
|
81
|
-
const appearances = [
|
|
82
|
-
{ name: 'Icon', appearance: 'icon', icon: Settings },
|
|
83
|
-
{ name: 'Bluetooth', appearance: 'bluetooth' },
|
|
84
|
-
{ name: 'Check', appearance: 'check' },
|
|
85
|
-
{ name: 'Error', appearance: 'error' },
|
|
86
|
-
{ name: 'Warning', appearance: 'warning' },
|
|
87
|
-
{ name: 'Info', appearance: 'info' },
|
|
88
|
-
{ name: 'Loader', appearance: 'loader' },
|
|
89
|
-
{ name: 'Number', appearance: 'number', number: 3 },
|
|
90
|
-
];
|
|
91
|
-
return (_jsx(Box, { lx: {
|
|
92
|
-
flexDirection: 'row',
|
|
93
|
-
flexWrap: 'wrap',
|
|
94
|
-
gap: 's16',
|
|
95
|
-
padding: 's8',
|
|
96
|
-
}, children: appearances.map(({ name, appearance, icon, number }) => (_jsxs(Box, { lx: {
|
|
97
|
-
width: 's64',
|
|
98
|
-
flexDirection: 'column',
|
|
99
|
-
alignItems: 'center',
|
|
100
|
-
gap: 's4',
|
|
101
|
-
}, children: [_jsx(Spot, { appearance: appearance, icon: icon, number: number }), _jsx(Text, { typography: 'body3', lx: { color: 'muted' }, children: name })] }, appearance))) }));
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
export const IconVariants = {
|
|
105
|
-
render: () => {
|
|
106
|
-
const icons = [
|
|
107
|
-
{ name: 'Settings', component: Settings },
|
|
108
|
-
{ name: 'Plus', component: Plus },
|
|
109
|
-
{ name: 'Heart', component: Heart },
|
|
110
|
-
{ name: 'Star', component: Star },
|
|
111
|
-
];
|
|
112
|
-
return (_jsx(Box, { lx: { flexDirection: 'row', gap: 's8', padding: 's8' }, children: icons.map(({ name, component: Icon }) => (_jsx(Spot, { appearance: 'icon', icon: Icon }, name))) }));
|
|
113
|
-
},
|
|
114
|
-
};
|
|
115
|
-
export const NumberVariants = {
|
|
116
|
-
render: () => {
|
|
117
|
-
const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
118
|
-
return (_jsx(Box, { lx: {
|
|
119
|
-
flexDirection: 'row',
|
|
120
|
-
flexWrap: 'wrap',
|
|
121
|
-
gap: 's8',
|
|
122
|
-
padding: 's8',
|
|
123
|
-
}, children: numbers.map((num) => (_jsx(Spot, { appearance: 'number', number: num }, num))) }));
|
|
124
|
-
},
|
|
125
|
-
};
|
|
126
|
-
export const SizesShowcase = {
|
|
127
|
-
render: () => {
|
|
128
|
-
const sizes = [32, 40, 48, 56, 72];
|
|
129
|
-
return (_jsx(Box, { lx: { flexDirection: 'column', gap: 's32', padding: 's16' }, children: sizes.map((size) => (_jsxs(Box, { lx: { flexDirection: 'column', gap: 's16' }, children: [_jsxs(Text, { typography: 'heading5SemiBold', children: [size, "px"] }), _jsxs(Box, { lx: { flexDirection: 'row', gap: 's12' }, children: [_jsx(Spot, { appearance: 'icon', icon: Settings, size: size }), _jsx(Spot, { appearance: 'info', size: size }), _jsx(Spot, { appearance: 'number', number: 5, size: size })] })] }, size))) }));
|
|
130
|
-
},
|
|
131
|
-
};
|
|
132
|
-
export const StatesShowcase = {
|
|
133
|
-
render: () => {
|
|
134
|
-
return (_jsxs(Box, { lx: { flexDirection: 'column', gap: 's16' }, children: [_jsxs(Box, { lx: { flexDirection: 'column', gap: 's8' }, children: [_jsx(Text, { typography: 'body2', children: "Default" }), _jsxs(Box, { lx: { flexDirection: 'row', flexWrap: 'wrap', gap: 's16' }, children: [_jsx(Box, { lx: {
|
|
135
|
-
width: 's64',
|
|
136
|
-
flexDirection: 'column',
|
|
137
|
-
alignItems: 'center',
|
|
138
|
-
gap: 's4',
|
|
139
|
-
}, children: _jsx(Spot, { appearance: 'icon', icon: Settings }) }), _jsx(Box, { lx: {
|
|
140
|
-
width: 's64',
|
|
141
|
-
flexDirection: 'column',
|
|
142
|
-
alignItems: 'center',
|
|
143
|
-
gap: 's4',
|
|
144
|
-
}, children: _jsx(Spot, { appearance: 'bluetooth' }) })] })] }), _jsxs(Box, { lx: { flexDirection: 'column', gap: 's8' }, children: [_jsx(Text, { typography: 'body2', children: "Disabled" }), _jsxs(Box, { lx: { flexDirection: 'row', flexWrap: 'wrap', gap: 's16' }, children: [_jsx(Box, { lx: {
|
|
145
|
-
width: 's64',
|
|
146
|
-
flexDirection: 'column',
|
|
147
|
-
alignItems: 'center',
|
|
148
|
-
gap: 's4',
|
|
149
|
-
}, children: _jsx(Spot, { appearance: 'icon', icon: Settings, disabled: true }) }), _jsx(Box, { lx: {
|
|
150
|
-
width: 's64',
|
|
151
|
-
flexDirection: 'column',
|
|
152
|
-
alignItems: 'center',
|
|
153
|
-
gap: 's4',
|
|
154
|
-
}, children: _jsx(Spot, { appearance: 'bluetooth', disabled: true }) })] })] })] }));
|
|
155
|
-
},
|
|
156
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { Stepper } from './Stepper';
|
|
3
|
-
declare const meta: Meta<typeof Stepper>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Stepper>;
|
|
6
|
-
export declare const Base: Story;
|
|
7
|
-
export declare const DisabledShowcase: Story;
|
|
8
|
-
export declare const WithCustomLabel: Story;
|
|
9
|
-
//# sourceMappingURL=Stepper.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Stepper/Stepper.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAW9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAEtC,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAuB9B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAO7B,CAAC"}
|