@ledgerhq/lumen-ui-rnative 0.1.61 → 0.1.62
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/module/lib/Components/core/Avatar/Avatar.js +17 -6
- package/dist/module/lib/Components/core/Avatar/Avatar.js.map +1 -1
- package/dist/module/lib/Components/core/Avatar/Avatar.mdx +10 -6
- package/dist/module/lib/Components/core/Avatar/Avatar.stories.js +15 -6
- package/dist/module/lib/Components/core/Avatar/Avatar.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Avatar/Avatar.test.js +56 -0
- package/dist/module/lib/Components/core/Avatar/Avatar.test.js.map +1 -1
- package/dist/module/lib/Components/core/Avatar/index.js +1 -1
- package/dist/module/lib/Components/core/Avatar/index.js.map +1 -1
- package/dist/module/lib/Components/core/Avatar/useResolveAvatarColor.js +21 -0
- package/dist/module/lib/Components/core/Avatar/useResolveAvatarColor.js.map +1 -0
- package/dist/module/lib/Components/core/Avatar/useResolveAvatarColor.test.js +88 -0
- package/dist/module/lib/Components/core/Avatar/useResolveAvatarColor.test.js.map +1 -0
- package/dist/module/lib/Components/core/Banner/Banner.js +3 -3
- package/dist/module/lib/Components/core/Banner/Banner.js.map +1 -1
- package/dist/module/lib/Components/core/Banner/Banner.test.js +3 -3
- package/dist/module/lib/Components/core/Banner/Banner.test.js.map +1 -1
- package/dist/module/lib/Components/core/DotIcon/getDotIconProps.test.js +1 -4
- package/dist/module/lib/Components/core/DotIcon/getDotIconProps.test.js.map +1 -1
- package/dist/module/lib/Components/core/DotIcon/index.js +0 -10
- package/dist/module/lib/Components/core/DotIcon/index.js.map +1 -1
- package/dist/module/lib/Components/core/DotSymbol/getDotSymbolProps.test.js +1 -4
- package/dist/module/lib/Components/core/DotSymbol/getDotSymbolProps.test.js.map +1 -1
- package/dist/module/lib/Components/core/DotSymbol/index.js +0 -15
- package/dist/module/lib/Components/core/DotSymbol/index.js.map +1 -1
- package/dist/module/lib/Components/core/MediaButton/MediaButton.js +2 -2
- package/dist/module/lib/Components/core/MediaButton/MediaButton.mdx +2 -2
- package/dist/module/lib/Components/core/MenuList/MenuList.figma.js +21 -0
- package/dist/module/lib/Components/core/MenuList/MenuList.figma.js.map +1 -0
- package/dist/module/lib/Components/core/MenuList/MenuList.js +143 -0
- package/dist/module/lib/Components/core/MenuList/MenuList.js.map +1 -0
- package/dist/module/lib/Components/core/MenuList/MenuList.mdx +66 -0
- package/dist/module/lib/Components/core/MenuList/MenuList.stories.js +139 -0
- package/dist/module/lib/Components/core/MenuList/MenuList.stories.js.map +1 -0
- package/dist/module/lib/Components/core/MenuList/MenuList.test.js +146 -0
- package/dist/module/lib/Components/core/MenuList/MenuList.test.js.map +1 -0
- package/dist/module/lib/Components/core/MenuList/index.js +5 -0
- package/dist/module/lib/Components/core/MenuList/index.js.map +1 -0
- package/dist/module/lib/Components/core/MenuList/types.js.map +1 -0
- package/dist/module/lib/Components/core/SelectList/SelectList.figma.js +28 -0
- package/dist/module/lib/Components/core/{OptionList/OptionList.figma.js.map → SelectList/SelectList.figma.js.map} +1 -1
- package/dist/module/lib/Components/core/{OptionList/OptionList.js → SelectList/SelectList.js} +46 -46
- package/dist/module/lib/Components/core/{OptionList/OptionList.js.map → SelectList/SelectList.js.map} +1 -1
- package/dist/module/lib/Components/core/{OptionList/OptionList.mdx → SelectList/SelectList.mdx} +81 -81
- package/dist/module/lib/Components/core/{OptionList/OptionList.stories.js → SelectList/SelectList.stories.js} +130 -130
- package/dist/module/lib/Components/core/{OptionList/OptionList.stories.js.map → SelectList/SelectList.stories.js.map} +1 -1
- package/dist/module/lib/Components/core/{OptionList/OptionList.test.js → SelectList/SelectList.test.js} +83 -83
- package/dist/module/lib/Components/core/{OptionList/OptionList.test.js.map → SelectList/SelectList.test.js.map} +1 -1
- package/dist/module/lib/Components/core/SelectList/index.js +5 -0
- package/dist/module/lib/Components/core/{OptionList → SelectList}/index.js.map +1 -1
- package/dist/module/lib/Components/core/SelectList/types.js +4 -0
- package/dist/module/lib/Components/core/{OptionList → SelectList}/types.js.map +1 -1
- package/dist/module/lib/Components/core/{OptionList/useOptionList/useOptionListItems.js → SelectList/useSelectList/useSelectListItems.js} +2 -2
- package/dist/module/lib/Components/core/{OptionList/useOptionList/useOptionListItems.js.map → SelectList/useSelectList/useSelectListItems.js.map} +1 -1
- package/dist/module/lib/Components/core/{OptionList/useOptionList/useOptionListItems.test.js → SelectList/useSelectList/useSelectListItems.test.js} +17 -17
- package/dist/module/lib/Components/core/{OptionList/useOptionList/useOptionListItems.test.js.map → SelectList/useSelectList/useSelectListItems.test.js.map} +1 -1
- package/dist/module/lib/Components/core/index.js +2 -1
- package/dist/module/lib/Components/core/index.js.map +1 -1
- package/dist/module/lib/Components/internal/BaseButton/BaseButton.js +2 -2
- package/dist/module/lib/Components/internal/BaseButton/BaseButton.js.map +1 -1
- package/dist/module/lib/Components/internal/BaseTag/BaseTag.js +3 -3
- package/dist/module/lib/Components/internal/BaseTag/BaseTag.js.map +1 -1
- package/dist/module/lib/Components/internal/BaseTag/BaseTag.test.js +1 -1
- package/dist/module/lib/Components/internal/BaseTag/BaseTag.test.js.map +1 -1
- package/dist/module/lib/Components/symbols/Icon/Icon.test.js +1 -1
- package/dist/module/lib/Components/symbols/icons/CloudSync.js +50 -0
- package/dist/module/lib/Components/symbols/icons/CloudSync.js.map +1 -0
- package/dist/module/lib/Components/symbols/icons/Dollar.js +11 -5
- package/dist/module/lib/Components/symbols/icons/Dollar.js.map +1 -1
- package/dist/module/lib/Components/symbols/icons/DollarConvert.js +1 -1
- package/dist/module/lib/Components/symbols/icons/DollarConvert.js.map +1 -1
- package/dist/module/lib/Components/symbols/icons/DollarFill.js +47 -0
- package/dist/module/lib/Components/symbols/icons/DollarFill.js.map +1 -0
- package/dist/module/lib/Components/symbols/icons/FaceId.js +50 -0
- package/dist/module/lib/Components/symbols/icons/FaceId.js.map +1 -0
- package/dist/module/lib/Components/symbols/icons/Fingerprint.js +50 -0
- package/dist/module/lib/Components/symbols/icons/Fingerprint.js.map +1 -0
- package/dist/module/lib/Components/symbols/icons/Pause.js +2 -1
- package/dist/module/lib/Components/symbols/icons/Pause.js.map +1 -1
- package/dist/module/lib/Components/symbols/icons/Range.js +2 -5
- package/dist/module/lib/Components/symbols/icons/Range.js.map +1 -1
- package/dist/module/lib/Components/symbols/icons/Telegram.js +20 -9
- package/dist/module/lib/Components/symbols/icons/Telegram.js.map +1 -1
- package/dist/module/lib/Components/symbols/icons/Usb.js +1 -1
- package/dist/module/lib/Components/symbols/index.js +4 -0
- package/dist/module/lib/Components/symbols/index.js.map +1 -1
- package/dist/typescript/src/lib/Components/core/Avatar/Avatar.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Avatar/index.d.ts +1 -1
- package/dist/typescript/src/lib/Components/core/Avatar/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Avatar/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/core/Avatar/useResolveAvatarColor.d.ts +10 -0
- package/dist/typescript/src/lib/Components/core/Avatar/useResolveAvatarColor.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/DotIcon/index.d.ts +0 -7
- package/dist/typescript/src/lib/Components/core/DotIcon/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/DotSymbol/index.d.ts +0 -12
- package/dist/typescript/src/lib/Components/core/DotSymbol/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/MediaButton/MediaButton.d.ts +2 -2
- package/dist/typescript/src/lib/Components/core/MenuList/MenuList.d.ts +29 -0
- package/dist/typescript/src/lib/Components/core/MenuList/MenuList.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/MenuList/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/core/MenuList/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/MenuList/types.d.ts +42 -0
- package/dist/typescript/src/lib/Components/core/MenuList/types.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/SelectList/SelectList.d.ts +27 -0
- package/dist/typescript/src/lib/Components/core/{OptionList/OptionList.d.ts.map → SelectList/SelectList.d.ts.map} +1 -1
- package/dist/typescript/src/lib/Components/core/SelectList/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/core/{OptionList → SelectList}/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/{OptionList → SelectList}/types.d.ts +24 -24
- package/dist/typescript/src/lib/Components/core/{OptionList → SelectList}/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/SelectList/useSelectList/useSelectListItems.d.ts +20 -0
- package/dist/typescript/src/lib/Components/core/{OptionList/useOptionList/useOptionListItems.d.ts.map → SelectList/useSelectList/useSelectListItems.d.ts.map} +1 -1
- package/dist/typescript/src/lib/Components/core/index.d.ts +2 -1
- package/dist/typescript/src/lib/Components/core/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/symbols/icons/CloudSync.d.ts +35 -0
- package/dist/typescript/src/lib/Components/symbols/icons/CloudSync.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/symbols/icons/Dollar.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/symbols/icons/DollarFill.d.ts +35 -0
- package/dist/typescript/src/lib/Components/symbols/icons/DollarFill.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/symbols/icons/FaceId.d.ts +35 -0
- package/dist/typescript/src/lib/Components/symbols/icons/FaceId.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/symbols/icons/Fingerprint.d.ts +35 -0
- package/dist/typescript/src/lib/Components/symbols/icons/Fingerprint.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/symbols/icons/Pause.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/symbols/icons/Range.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/symbols/icons/Telegram.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/symbols/index.d.ts +4 -0
- package/dist/typescript/src/lib/Components/symbols/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/lib/Components/core/Avatar/Avatar.mdx +10 -6
- package/src/lib/Components/core/Avatar/Avatar.stories.tsx +16 -9
- package/src/lib/Components/core/Avatar/Avatar.test.tsx +64 -0
- package/src/lib/Components/core/Avatar/Avatar.tsx +41 -8
- package/src/lib/Components/core/Avatar/index.ts +1 -1
- package/src/lib/Components/core/Avatar/types.ts +1 -1
- package/src/lib/Components/core/Avatar/useResolveAvatarColor.test.tsx +106 -0
- package/src/lib/Components/core/Avatar/useResolveAvatarColor.ts +25 -0
- package/src/lib/Components/core/Banner/Banner.test.tsx +3 -3
- package/src/lib/Components/core/Banner/Banner.tsx +3 -3
- package/src/lib/Components/core/DotIcon/getDotIconProps.test.ts +1 -5
- package/src/lib/Components/core/DotIcon/index.ts +0 -10
- package/src/lib/Components/core/DotSymbol/getDotSymbolProps.test.ts +1 -5
- package/src/lib/Components/core/DotSymbol/index.ts +0 -15
- package/src/lib/Components/core/MediaButton/MediaButton.mdx +2 -2
- package/src/lib/Components/core/MediaButton/MediaButton.tsx +2 -2
- package/src/lib/Components/core/MenuList/MenuList.figma.tsx +23 -0
- package/src/lib/Components/core/MenuList/MenuList.mdx +66 -0
- package/src/lib/Components/core/MenuList/MenuList.stories.tsx +114 -0
- package/src/lib/Components/core/MenuList/MenuList.test.tsx +135 -0
- package/src/lib/Components/core/MenuList/MenuList.tsx +162 -0
- package/src/lib/Components/core/MenuList/index.ts +2 -0
- package/src/lib/Components/core/MenuList/types.ts +49 -0
- package/src/lib/Components/core/SelectList/SelectList.figma.tsx +37 -0
- package/src/lib/Components/core/{OptionList/OptionList.mdx → SelectList/SelectList.mdx} +81 -81
- package/src/lib/Components/core/{OptionList/OptionList.stories.tsx → SelectList/SelectList.stories.tsx} +227 -227
- package/src/lib/Components/core/{OptionList/OptionList.test.tsx → SelectList/SelectList.test.tsx} +138 -138
- package/src/lib/Components/core/{OptionList/OptionList.tsx → SelectList/SelectList.tsx} +92 -92
- package/src/lib/Components/core/SelectList/index.ts +2 -0
- package/src/lib/Components/core/{OptionList → SelectList}/types.ts +28 -28
- package/src/lib/Components/core/{OptionList/useOptionList/useOptionListItems.test.ts → SelectList/useSelectList/useSelectListItems.test.ts} +24 -24
- package/src/lib/Components/core/{OptionList/useOptionList/useOptionListItems.ts → SelectList/useSelectList/useSelectListItems.ts} +21 -21
- package/src/lib/Components/core/Spot/Spot.tsx +1 -1
- package/src/lib/Components/core/index.ts +2 -1
- package/src/lib/Components/internal/BaseButton/BaseButton.tsx +2 -2
- package/src/lib/Components/internal/BaseTag/BaseTag.test.tsx +3 -3
- package/src/lib/Components/internal/BaseTag/BaseTag.tsx +3 -3
- package/src/lib/Components/symbols/Icon/Icon.test.tsx +1 -1
- package/src/lib/Components/symbols/icons/CloudSync.tsx +45 -0
- package/src/lib/Components/symbols/icons/Dollar.tsx +8 -1
- package/src/lib/Components/symbols/icons/DollarConvert.tsx +1 -1
- package/src/lib/Components/symbols/icons/DollarFill.tsx +42 -0
- package/src/lib/Components/symbols/icons/FaceId.tsx +45 -0
- package/src/lib/Components/symbols/icons/Fingerprint.tsx +45 -0
- package/src/lib/Components/symbols/icons/Pause.tsx +2 -1
- package/src/lib/Components/symbols/icons/Range.tsx +2 -5
- package/src/lib/Components/symbols/icons/Telegram.tsx +14 -7
- package/src/lib/Components/symbols/icons/Usb.tsx +1 -1
- package/src/lib/Components/symbols/index.ts +4 -0
- package/dist/module/lib/Components/core/Avatar/resolveAvatarColor.js +0 -18
- package/dist/module/lib/Components/core/Avatar/resolveAvatarColor.js.map +0 -1
- package/dist/module/lib/Components/core/OptionList/OptionList.figma.js +0 -28
- package/dist/module/lib/Components/core/OptionList/index.js +0 -5
- package/dist/typescript/src/lib/Components/core/Avatar/resolveAvatarColor.d.ts +0 -8
- package/dist/typescript/src/lib/Components/core/Avatar/resolveAvatarColor.d.ts.map +0 -1
- package/dist/typescript/src/lib/Components/core/OptionList/OptionList.d.ts +0 -27
- package/dist/typescript/src/lib/Components/core/OptionList/index.d.ts +0 -3
- package/dist/typescript/src/lib/Components/core/OptionList/useOptionList/useOptionListItems.d.ts +0 -20
- package/src/lib/Components/core/Avatar/resolveAvatarColor.ts +0 -19
- package/src/lib/Components/core/OptionList/OptionList.figma.tsx +0 -37
- package/src/lib/Components/core/OptionList/index.ts +0 -2
- /package/dist/module/lib/Components/core/{OptionList → MenuList}/types.js +0 -0
|
@@ -11,22 +11,22 @@ import { useBottomSheetRef } from "../BottomSheet/useBottomSheetRef.js";
|
|
|
11
11
|
import { MediaButton } from "../MediaButton/index.js";
|
|
12
12
|
import { Spot } from "../Spot/index.js";
|
|
13
13
|
import { Tag } from "../Tag/Tag.js";
|
|
14
|
-
import {
|
|
14
|
+
import { createSelectList, SelectList, SelectListContent, SelectListEmptyState, SelectListItem, SelectListItemLeading, SelectListItemContent, SelectListItemDescription, SelectListItemContentRow, SelectListSearch, SelectListTrigger, SelectListItemText } from "./SelectList.js";
|
|
15
15
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
16
|
const meta = {
|
|
17
|
-
component:
|
|
18
|
-
id: 'rnative-
|
|
19
|
-
title: 'Core/
|
|
17
|
+
component: SelectList,
|
|
18
|
+
id: 'rnative-selectlist',
|
|
19
|
+
title: 'Core/SelectList',
|
|
20
20
|
subcomponents: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
SelectListContent,
|
|
22
|
+
SelectListItem,
|
|
23
|
+
SelectListItemLeading,
|
|
24
|
+
SelectListItemContent,
|
|
25
|
+
SelectListItemText,
|
|
26
|
+
SelectListItemDescription,
|
|
27
|
+
SelectListItemContentRow,
|
|
28
|
+
SelectListSearch,
|
|
29
|
+
SelectListTrigger
|
|
30
30
|
},
|
|
31
31
|
decorators: [Story => /*#__PURE__*/_jsx("div", {
|
|
32
32
|
children: /*#__PURE__*/_jsx(Box, {
|
|
@@ -91,7 +91,7 @@ export const Base = {
|
|
|
91
91
|
const bottomSheetRef = useBottomSheetRef();
|
|
92
92
|
const selected = CURRENCIES.find(c => c.value === value);
|
|
93
93
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
94
|
-
children: [/*#__PURE__*/_jsx(
|
|
94
|
+
children: [/*#__PURE__*/_jsx(SelectListTrigger, {
|
|
95
95
|
label: "Currency",
|
|
96
96
|
onPress: () => bottomSheetRef.current?.present(),
|
|
97
97
|
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
@@ -108,28 +108,28 @@ export const Base = {
|
|
|
108
108
|
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
109
109
|
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
110
110
|
title: "Select currency"
|
|
111
|
-
}), /*#__PURE__*/_jsx(
|
|
111
|
+
}), /*#__PURE__*/_jsx(SelectList, {
|
|
112
112
|
items: CURRENCIES,
|
|
113
113
|
value: value,
|
|
114
114
|
onValueChange: v => {
|
|
115
115
|
setValue(v);
|
|
116
116
|
bottomSheetRef.current?.dismiss();
|
|
117
117
|
},
|
|
118
|
-
children: /*#__PURE__*/_jsx(
|
|
118
|
+
children: /*#__PURE__*/_jsx(SelectListContent, {
|
|
119
119
|
renderItem: item => {
|
|
120
120
|
const ticker = item.meta.ticker;
|
|
121
|
-
return /*#__PURE__*/_jsxs(
|
|
121
|
+
return /*#__PURE__*/_jsxs(SelectListItem, {
|
|
122
122
|
value: item.value,
|
|
123
|
-
children: [/*#__PURE__*/_jsx(
|
|
123
|
+
children: [/*#__PURE__*/_jsx(SelectListItemLeading, {
|
|
124
124
|
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
125
125
|
ledgerId: item.meta?.ledgerId ?? '',
|
|
126
126
|
ticker: ticker,
|
|
127
127
|
size: 32
|
|
128
128
|
})
|
|
129
|
-
}), /*#__PURE__*/_jsxs(
|
|
130
|
-
children: [/*#__PURE__*/_jsx(
|
|
129
|
+
}), /*#__PURE__*/_jsxs(SelectListItemContent, {
|
|
130
|
+
children: [/*#__PURE__*/_jsx(SelectListItemText, {
|
|
131
131
|
children: item.label
|
|
132
|
-
}), /*#__PURE__*/_jsx(
|
|
132
|
+
}), /*#__PURE__*/_jsx(SelectListItemDescription, {
|
|
133
133
|
children: ticker
|
|
134
134
|
})]
|
|
135
135
|
})]
|
|
@@ -177,7 +177,7 @@ export const WithGroups = {
|
|
|
177
177
|
const bottomSheetRef = useBottomSheetRef();
|
|
178
178
|
const selected = FOODS.find(f => f.value === value);
|
|
179
179
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
180
|
-
children: [/*#__PURE__*/_jsx(
|
|
180
|
+
children: [/*#__PURE__*/_jsx(SelectListTrigger, {
|
|
181
181
|
label: "Food",
|
|
182
182
|
onPress: () => bottomSheetRef.current?.present(),
|
|
183
183
|
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
@@ -194,18 +194,18 @@ export const WithGroups = {
|
|
|
194
194
|
children: /*#__PURE__*/_jsxs(BottomSheetScrollView, {
|
|
195
195
|
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
196
196
|
title: "Pick a food"
|
|
197
|
-
}), /*#__PURE__*/_jsx(
|
|
197
|
+
}), /*#__PURE__*/_jsx(SelectList, {
|
|
198
198
|
items: FOODS,
|
|
199
199
|
value: value,
|
|
200
200
|
onValueChange: v => {
|
|
201
201
|
setValue(v);
|
|
202
202
|
bottomSheetRef.current?.dismiss();
|
|
203
203
|
},
|
|
204
|
-
children: /*#__PURE__*/_jsx(
|
|
205
|
-
renderItem: item => /*#__PURE__*/_jsx(
|
|
204
|
+
children: /*#__PURE__*/_jsx(SelectListContent, {
|
|
205
|
+
renderItem: item => /*#__PURE__*/_jsx(SelectListItem, {
|
|
206
206
|
value: item.value,
|
|
207
|
-
children: /*#__PURE__*/_jsx(
|
|
208
|
-
children: /*#__PURE__*/_jsx(
|
|
207
|
+
children: /*#__PURE__*/_jsx(SelectListItemContent, {
|
|
208
|
+
children: /*#__PURE__*/_jsx(SelectListItemText, {
|
|
209
209
|
children: item.label
|
|
210
210
|
})
|
|
211
211
|
})
|
|
@@ -260,7 +260,7 @@ export const WithContentRow = {
|
|
|
260
260
|
const bottomSheetRef = useBottomSheetRef();
|
|
261
261
|
const selected = NETWORKS.find(n => n.value === value);
|
|
262
262
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
263
|
-
children: [/*#__PURE__*/_jsx(
|
|
263
|
+
children: [/*#__PURE__*/_jsx(SelectListTrigger, {
|
|
264
264
|
label: "Network",
|
|
265
265
|
onPress: () => bottomSheetRef.current?.present(),
|
|
266
266
|
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
@@ -277,34 +277,34 @@ export const WithContentRow = {
|
|
|
277
277
|
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
278
278
|
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
279
279
|
title: "Select network"
|
|
280
|
-
}), /*#__PURE__*/_jsx(
|
|
280
|
+
}), /*#__PURE__*/_jsx(SelectList, {
|
|
281
281
|
items: NETWORKS,
|
|
282
282
|
value: value,
|
|
283
283
|
onValueChange: v => {
|
|
284
284
|
setValue(v);
|
|
285
285
|
bottomSheetRef.current?.dismiss();
|
|
286
286
|
},
|
|
287
|
-
children: /*#__PURE__*/_jsx(
|
|
287
|
+
children: /*#__PURE__*/_jsx(SelectListContent, {
|
|
288
288
|
renderItem: item => {
|
|
289
289
|
const meta = item.meta;
|
|
290
|
-
return /*#__PURE__*/_jsxs(
|
|
290
|
+
return /*#__PURE__*/_jsxs(SelectListItem, {
|
|
291
291
|
value: item.value,
|
|
292
|
-
children: [/*#__PURE__*/_jsx(
|
|
292
|
+
children: [/*#__PURE__*/_jsx(SelectListItemLeading, {
|
|
293
293
|
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
294
294
|
ledgerId: meta.ledgerId,
|
|
295
295
|
ticker: meta.ticker,
|
|
296
296
|
size: 32
|
|
297
297
|
})
|
|
298
|
-
}), /*#__PURE__*/_jsxs(
|
|
299
|
-
children: [/*#__PURE__*/_jsxs(
|
|
300
|
-
children: [/*#__PURE__*/_jsx(
|
|
298
|
+
}), /*#__PURE__*/_jsxs(SelectListItemContent, {
|
|
299
|
+
children: [/*#__PURE__*/_jsxs(SelectListItemContentRow, {
|
|
300
|
+
children: [/*#__PURE__*/_jsx(SelectListItemText, {
|
|
301
301
|
children: item.label
|
|
302
302
|
}), /*#__PURE__*/_jsx(Tag, {
|
|
303
303
|
label: meta.tag,
|
|
304
304
|
appearance: "gray",
|
|
305
305
|
size: "sm"
|
|
306
306
|
})]
|
|
307
|
-
}), /*#__PURE__*/_jsx(
|
|
307
|
+
}), /*#__PURE__*/_jsx(SelectListItemDescription, {
|
|
308
308
|
children: meta.ticker
|
|
309
309
|
})]
|
|
310
310
|
})]
|
|
@@ -345,7 +345,7 @@ export const WithDisabledItems = {
|
|
|
345
345
|
const bottomSheetRef = useBottomSheetRef();
|
|
346
346
|
const selected = ACCOUNTS.find(a => a.value === value);
|
|
347
347
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
348
|
-
children: [/*#__PURE__*/_jsx(
|
|
348
|
+
children: [/*#__PURE__*/_jsx(SelectListTrigger, {
|
|
349
349
|
label: "Account",
|
|
350
350
|
onPress: () => bottomSheetRef.current?.present(),
|
|
351
351
|
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
@@ -362,26 +362,26 @@ export const WithDisabledItems = {
|
|
|
362
362
|
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
363
363
|
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
364
364
|
title: "Select account"
|
|
365
|
-
}), /*#__PURE__*/_jsx(
|
|
365
|
+
}), /*#__PURE__*/_jsx(SelectList, {
|
|
366
366
|
items: ACCOUNTS,
|
|
367
367
|
value: value,
|
|
368
368
|
onValueChange: v => {
|
|
369
369
|
setValue(v);
|
|
370
370
|
bottomSheetRef.current?.dismiss();
|
|
371
371
|
},
|
|
372
|
-
children: /*#__PURE__*/_jsx(
|
|
373
|
-
renderItem: item => /*#__PURE__*/_jsxs(
|
|
372
|
+
children: /*#__PURE__*/_jsx(SelectListContent, {
|
|
373
|
+
renderItem: item => /*#__PURE__*/_jsxs(SelectListItem, {
|
|
374
374
|
value: item.value,
|
|
375
375
|
disabled: item.disabled,
|
|
376
|
-
children: [/*#__PURE__*/_jsx(
|
|
376
|
+
children: [/*#__PURE__*/_jsx(SelectListItemLeading, {
|
|
377
377
|
children: /*#__PURE__*/_jsx(Spot, {
|
|
378
378
|
appearance: "icon",
|
|
379
379
|
icon: Settings
|
|
380
380
|
})
|
|
381
|
-
}), /*#__PURE__*/_jsxs(
|
|
382
|
-
children: [/*#__PURE__*/_jsx(
|
|
381
|
+
}), /*#__PURE__*/_jsxs(SelectListItemContent, {
|
|
382
|
+
children: [/*#__PURE__*/_jsx(SelectListItemText, {
|
|
383
383
|
children: item.label
|
|
384
|
-
}), item.description && /*#__PURE__*/_jsx(
|
|
384
|
+
}), item.description && /*#__PURE__*/_jsx(SelectListItemDescription, {
|
|
385
385
|
children: item.description
|
|
386
386
|
})]
|
|
387
387
|
})]
|
|
@@ -449,7 +449,7 @@ export const GroupedWithContentRow = {
|
|
|
449
449
|
const bottomSheetRef = useBottomSheetRef();
|
|
450
450
|
const selected = GROUPED_NETWORKS.find(n => n.value === value);
|
|
451
451
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
452
|
-
children: [/*#__PURE__*/_jsx(
|
|
452
|
+
children: [/*#__PURE__*/_jsx(SelectListTrigger, {
|
|
453
453
|
label: "Network",
|
|
454
454
|
onPress: () => bottomSheetRef.current?.present(),
|
|
455
455
|
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
@@ -466,34 +466,34 @@ export const GroupedWithContentRow = {
|
|
|
466
466
|
children: /*#__PURE__*/_jsxs(BottomSheetScrollView, {
|
|
467
467
|
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
468
468
|
title: "Select network"
|
|
469
|
-
}), /*#__PURE__*/_jsx(
|
|
469
|
+
}), /*#__PURE__*/_jsx(SelectList, {
|
|
470
470
|
items: GROUPED_NETWORKS,
|
|
471
471
|
value: value,
|
|
472
472
|
onValueChange: v => {
|
|
473
473
|
setValue(v);
|
|
474
474
|
bottomSheetRef.current?.dismiss();
|
|
475
475
|
},
|
|
476
|
-
children: /*#__PURE__*/_jsx(
|
|
476
|
+
children: /*#__PURE__*/_jsx(SelectListContent, {
|
|
477
477
|
renderItem: item => {
|
|
478
478
|
const meta = item.meta;
|
|
479
|
-
return /*#__PURE__*/_jsxs(
|
|
479
|
+
return /*#__PURE__*/_jsxs(SelectListItem, {
|
|
480
480
|
value: item.value,
|
|
481
|
-
children: [/*#__PURE__*/_jsx(
|
|
481
|
+
children: [/*#__PURE__*/_jsx(SelectListItemLeading, {
|
|
482
482
|
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
483
483
|
ledgerId: meta.ledgerId,
|
|
484
484
|
ticker: meta.ticker,
|
|
485
485
|
size: 32
|
|
486
486
|
})
|
|
487
|
-
}), /*#__PURE__*/_jsxs(
|
|
488
|
-
children: [/*#__PURE__*/_jsxs(
|
|
489
|
-
children: [/*#__PURE__*/_jsx(
|
|
487
|
+
}), /*#__PURE__*/_jsxs(SelectListItemContent, {
|
|
488
|
+
children: [/*#__PURE__*/_jsxs(SelectListItemContentRow, {
|
|
489
|
+
children: [/*#__PURE__*/_jsx(SelectListItemText, {
|
|
490
490
|
children: item.label
|
|
491
491
|
}), /*#__PURE__*/_jsx(Tag, {
|
|
492
492
|
label: meta.tag,
|
|
493
493
|
appearance: "gray",
|
|
494
494
|
size: "sm"
|
|
495
495
|
})]
|
|
496
|
-
}), /*#__PURE__*/_jsx(
|
|
496
|
+
}), /*#__PURE__*/_jsx(SelectListItemDescription, {
|
|
497
497
|
children: meta.ticker
|
|
498
498
|
})]
|
|
499
499
|
})]
|
|
@@ -516,7 +516,7 @@ export const WithSearch = {
|
|
|
516
516
|
const bottomSheetRef = useBottomSheetRef();
|
|
517
517
|
const selected = CURRENCIES.find(c => c.value === value);
|
|
518
518
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
519
|
-
children: [/*#__PURE__*/_jsx(
|
|
519
|
+
children: [/*#__PURE__*/_jsx(SelectListTrigger, {
|
|
520
520
|
label: "Currency",
|
|
521
521
|
onPress: () => bottomSheetRef.current?.present(),
|
|
522
522
|
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
@@ -533,36 +533,36 @@ export const WithSearch = {
|
|
|
533
533
|
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
534
534
|
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
535
535
|
title: "Select currency"
|
|
536
|
-
}), /*#__PURE__*/_jsxs(
|
|
536
|
+
}), /*#__PURE__*/_jsxs(SelectList, {
|
|
537
537
|
items: CURRENCIES,
|
|
538
538
|
value: value,
|
|
539
539
|
onValueChange: v => {
|
|
540
540
|
setValue(v);
|
|
541
541
|
bottomSheetRef.current?.dismiss();
|
|
542
542
|
},
|
|
543
|
-
children: [/*#__PURE__*/_jsx(
|
|
543
|
+
children: [/*#__PURE__*/_jsx(SelectListSearch, {
|
|
544
544
|
placeholder: "Search currencies"
|
|
545
|
-
}), /*#__PURE__*/_jsx(
|
|
545
|
+
}), /*#__PURE__*/_jsx(SelectListContent, {
|
|
546
546
|
renderItem: item => {
|
|
547
547
|
const ticker = item.meta.ticker;
|
|
548
|
-
return /*#__PURE__*/_jsxs(
|
|
548
|
+
return /*#__PURE__*/_jsxs(SelectListItem, {
|
|
549
549
|
value: item.value,
|
|
550
|
-
children: [/*#__PURE__*/_jsx(
|
|
550
|
+
children: [/*#__PURE__*/_jsx(SelectListItemLeading, {
|
|
551
551
|
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
552
552
|
ledgerId: item.meta?.ledgerId ?? '',
|
|
553
553
|
ticker: ticker,
|
|
554
554
|
size: 32
|
|
555
555
|
})
|
|
556
|
-
}), /*#__PURE__*/_jsxs(
|
|
557
|
-
children: [/*#__PURE__*/_jsx(
|
|
556
|
+
}), /*#__PURE__*/_jsxs(SelectListItemContent, {
|
|
557
|
+
children: [/*#__PURE__*/_jsx(SelectListItemText, {
|
|
558
558
|
children: item.label
|
|
559
|
-
}), /*#__PURE__*/_jsx(
|
|
559
|
+
}), /*#__PURE__*/_jsx(SelectListItemDescription, {
|
|
560
560
|
children: ticker
|
|
561
561
|
})]
|
|
562
562
|
})]
|
|
563
563
|
});
|
|
564
564
|
}
|
|
565
|
-
}), /*#__PURE__*/_jsx(
|
|
565
|
+
}), /*#__PURE__*/_jsx(SelectListEmptyState, {
|
|
566
566
|
title: "No currencies found",
|
|
567
567
|
description: "Try a different search term"
|
|
568
568
|
})]
|
|
@@ -582,7 +582,7 @@ export const WithSearchAndGroups = {
|
|
|
582
582
|
const bottomSheetRef = useBottomSheetRef();
|
|
583
583
|
const selected = GROUPED_NETWORKS.find(n => n.value === value);
|
|
584
584
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
585
|
-
children: [/*#__PURE__*/_jsx(
|
|
585
|
+
children: [/*#__PURE__*/_jsx(SelectListTrigger, {
|
|
586
586
|
label: "Network",
|
|
587
587
|
onPress: () => bottomSheetRef.current?.present(),
|
|
588
588
|
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
@@ -599,25 +599,25 @@ export const WithSearchAndGroups = {
|
|
|
599
599
|
children: /*#__PURE__*/_jsxs(BottomSheetScrollView, {
|
|
600
600
|
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
601
601
|
title: "Select network"
|
|
602
|
-
}), /*#__PURE__*/_jsxs(
|
|
602
|
+
}), /*#__PURE__*/_jsxs(SelectList, {
|
|
603
603
|
items: GROUPED_NETWORKS,
|
|
604
604
|
value: value,
|
|
605
605
|
onValueChange: v => {
|
|
606
606
|
setValue(v);
|
|
607
607
|
bottomSheetRef.current?.dismiss();
|
|
608
608
|
},
|
|
609
|
-
children: [/*#__PURE__*/_jsx(
|
|
609
|
+
children: [/*#__PURE__*/_jsx(SelectListSearch, {
|
|
610
610
|
placeholder: "Search networks"
|
|
611
|
-
}), /*#__PURE__*/_jsx(
|
|
612
|
-
renderItem: item => /*#__PURE__*/_jsx(
|
|
611
|
+
}), /*#__PURE__*/_jsx(SelectListContent, {
|
|
612
|
+
renderItem: item => /*#__PURE__*/_jsx(SelectListItem, {
|
|
613
613
|
value: item.value,
|
|
614
|
-
children: /*#__PURE__*/_jsx(
|
|
615
|
-
children: /*#__PURE__*/_jsx(
|
|
614
|
+
children: /*#__PURE__*/_jsx(SelectListItemContent, {
|
|
615
|
+
children: /*#__PURE__*/_jsx(SelectListItemText, {
|
|
616
616
|
children: item.label
|
|
617
617
|
})
|
|
618
618
|
})
|
|
619
619
|
})
|
|
620
|
-
}), /*#__PURE__*/_jsx(
|
|
620
|
+
}), /*#__PURE__*/_jsx(SelectListEmptyState, {
|
|
621
621
|
title: "No networks found"
|
|
622
622
|
})]
|
|
623
623
|
})]
|
|
@@ -636,7 +636,7 @@ export const WithCustomSearchFilter = {
|
|
|
636
636
|
const bottomSheetRef = useBottomSheetRef();
|
|
637
637
|
const selected = CURRENCIES.find(c => c.value === value);
|
|
638
638
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
639
|
-
children: [/*#__PURE__*/_jsx(
|
|
639
|
+
children: [/*#__PURE__*/_jsx(SelectListTrigger, {
|
|
640
640
|
label: "Currency",
|
|
641
641
|
onPress: () => bottomSheetRef.current?.present(),
|
|
642
642
|
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
@@ -653,7 +653,7 @@ export const WithCustomSearchFilter = {
|
|
|
653
653
|
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
654
654
|
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
655
655
|
title: "Select currency"
|
|
656
|
-
}), /*#__PURE__*/_jsxs(
|
|
656
|
+
}), /*#__PURE__*/_jsxs(SelectList, {
|
|
657
657
|
items: CURRENCIES,
|
|
658
658
|
value: value,
|
|
659
659
|
onValueChange: v => {
|
|
@@ -665,29 +665,29 @@ export const WithCustomSearchFilter = {
|
|
|
665
665
|
const ticker = item.meta.ticker;
|
|
666
666
|
return item.label.toLowerCase().includes(q) || ticker.toLowerCase().includes(q);
|
|
667
667
|
},
|
|
668
|
-
children: [/*#__PURE__*/_jsx(
|
|
668
|
+
children: [/*#__PURE__*/_jsx(SelectListSearch, {
|
|
669
669
|
placeholder: "Search by name or ticker"
|
|
670
|
-
}), /*#__PURE__*/_jsx(
|
|
670
|
+
}), /*#__PURE__*/_jsx(SelectListContent, {
|
|
671
671
|
renderItem: item => {
|
|
672
672
|
const ticker = item.meta.ticker;
|
|
673
|
-
return /*#__PURE__*/_jsxs(
|
|
673
|
+
return /*#__PURE__*/_jsxs(SelectListItem, {
|
|
674
674
|
value: item.value,
|
|
675
|
-
children: [/*#__PURE__*/_jsx(
|
|
675
|
+
children: [/*#__PURE__*/_jsx(SelectListItemLeading, {
|
|
676
676
|
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
677
677
|
ledgerId: item.meta?.ledgerId ?? '',
|
|
678
678
|
ticker: ticker,
|
|
679
679
|
size: 32
|
|
680
680
|
})
|
|
681
|
-
}), /*#__PURE__*/_jsxs(
|
|
682
|
-
children: [/*#__PURE__*/_jsx(
|
|
681
|
+
}), /*#__PURE__*/_jsxs(SelectListItemContent, {
|
|
682
|
+
children: [/*#__PURE__*/_jsx(SelectListItemText, {
|
|
683
683
|
children: item.label
|
|
684
|
-
}), /*#__PURE__*/_jsx(
|
|
684
|
+
}), /*#__PURE__*/_jsx(SelectListItemDescription, {
|
|
685
685
|
children: ticker
|
|
686
686
|
})]
|
|
687
687
|
})]
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
|
-
}), /*#__PURE__*/_jsx(
|
|
690
|
+
}), /*#__PURE__*/_jsx(SelectListEmptyState, {
|
|
691
691
|
title: "No currencies found"
|
|
692
692
|
})]
|
|
693
693
|
})]
|
|
@@ -707,7 +707,7 @@ export const WithControlledSearch = {
|
|
|
707
707
|
const bottomSheetRef = useBottomSheetRef();
|
|
708
708
|
const selected = CURRENCIES.find(c => c.value === value);
|
|
709
709
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
710
|
-
children: [/*#__PURE__*/_jsx(
|
|
710
|
+
children: [/*#__PURE__*/_jsx(SelectListTrigger, {
|
|
711
711
|
label: "Currency",
|
|
712
712
|
onPress: () => bottomSheetRef.current?.present(),
|
|
713
713
|
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
@@ -734,7 +734,7 @@ export const WithControlledSearch = {
|
|
|
734
734
|
},
|
|
735
735
|
children: ["Search: \"", searchValue, "\""]
|
|
736
736
|
})
|
|
737
|
-
}), /*#__PURE__*/_jsxs(
|
|
737
|
+
}), /*#__PURE__*/_jsxs(SelectList, {
|
|
738
738
|
items: CURRENCIES,
|
|
739
739
|
value: value,
|
|
740
740
|
onValueChange: v => {
|
|
@@ -743,29 +743,29 @@ export const WithControlledSearch = {
|
|
|
743
743
|
},
|
|
744
744
|
searchValue: searchValue,
|
|
745
745
|
onSearchValueChange: setSearchValue,
|
|
746
|
-
children: [/*#__PURE__*/_jsx(
|
|
746
|
+
children: [/*#__PURE__*/_jsx(SelectListSearch, {
|
|
747
747
|
placeholder: "Search currencies"
|
|
748
|
-
}), /*#__PURE__*/_jsx(
|
|
748
|
+
}), /*#__PURE__*/_jsx(SelectListContent, {
|
|
749
749
|
renderItem: item => {
|
|
750
750
|
const ticker = item.meta.ticker;
|
|
751
|
-
return /*#__PURE__*/_jsxs(
|
|
751
|
+
return /*#__PURE__*/_jsxs(SelectListItem, {
|
|
752
752
|
value: item.value,
|
|
753
|
-
children: [/*#__PURE__*/_jsx(
|
|
753
|
+
children: [/*#__PURE__*/_jsx(SelectListItemLeading, {
|
|
754
754
|
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
755
755
|
ledgerId: item.meta?.ledgerId ?? '',
|
|
756
756
|
ticker: ticker,
|
|
757
757
|
size: 32
|
|
758
758
|
})
|
|
759
|
-
}), /*#__PURE__*/_jsxs(
|
|
760
|
-
children: [/*#__PURE__*/_jsx(
|
|
759
|
+
}), /*#__PURE__*/_jsxs(SelectListItemContent, {
|
|
760
|
+
children: [/*#__PURE__*/_jsx(SelectListItemText, {
|
|
761
761
|
children: item.label
|
|
762
|
-
}), /*#__PURE__*/_jsx(
|
|
762
|
+
}), /*#__PURE__*/_jsx(SelectListItemDescription, {
|
|
763
763
|
children: ticker
|
|
764
764
|
})]
|
|
765
765
|
})]
|
|
766
766
|
});
|
|
767
767
|
}
|
|
768
|
-
}), /*#__PURE__*/_jsx(
|
|
768
|
+
}), /*#__PURE__*/_jsx(SelectListEmptyState, {
|
|
769
769
|
title: "No currencies found"
|
|
770
770
|
})]
|
|
771
771
|
})]
|
|
@@ -782,7 +782,7 @@ export const EmptyState = {
|
|
|
782
782
|
render: () => {
|
|
783
783
|
const bottomSheetRef = useBottomSheetRef();
|
|
784
784
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
785
|
-
children: [/*#__PURE__*/_jsx(
|
|
785
|
+
children: [/*#__PURE__*/_jsx(SelectListTrigger, {
|
|
786
786
|
label: "Currency",
|
|
787
787
|
onPress: () => bottomSheetRef.current?.present()
|
|
788
788
|
}), /*#__PURE__*/_jsx(BottomSheet, {
|
|
@@ -793,19 +793,19 @@ export const EmptyState = {
|
|
|
793
793
|
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
794
794
|
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
795
795
|
title: "Select currency"
|
|
796
|
-
}), /*#__PURE__*/_jsxs(
|
|
796
|
+
}), /*#__PURE__*/_jsxs(SelectList, {
|
|
797
797
|
items: [],
|
|
798
798
|
value: null,
|
|
799
|
-
children: [/*#__PURE__*/_jsx(
|
|
800
|
-
renderItem: item => /*#__PURE__*/_jsx(
|
|
799
|
+
children: [/*#__PURE__*/_jsx(SelectListContent, {
|
|
800
|
+
renderItem: item => /*#__PURE__*/_jsx(SelectListItem, {
|
|
801
801
|
value: item.value,
|
|
802
|
-
children: /*#__PURE__*/_jsx(
|
|
803
|
-
children: /*#__PURE__*/_jsx(
|
|
802
|
+
children: /*#__PURE__*/_jsx(SelectListItemContent, {
|
|
803
|
+
children: /*#__PURE__*/_jsx(SelectListItemText, {
|
|
804
804
|
children: item.label
|
|
805
805
|
})
|
|
806
806
|
})
|
|
807
807
|
})
|
|
808
|
-
}), /*#__PURE__*/_jsx(
|
|
808
|
+
}), /*#__PURE__*/_jsx(SelectListEmptyState, {
|
|
809
809
|
title: "No options available",
|
|
810
810
|
description: "There are no items to display"
|
|
811
811
|
})]
|
|
@@ -836,7 +836,7 @@ const SETTINGS_OPTIONS = [{
|
|
|
836
836
|
label: 'Notifications'
|
|
837
837
|
}];
|
|
838
838
|
const appearances = ['gray', 'transparent', 'no-background'];
|
|
839
|
-
const
|
|
839
|
+
const SimpleSelectListSheet = ({
|
|
840
840
|
sheetRef,
|
|
841
841
|
items,
|
|
842
842
|
title,
|
|
@@ -850,18 +850,18 @@ const SimpleOptionListSheet = ({
|
|
|
850
850
|
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
851
851
|
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
852
852
|
title: title
|
|
853
|
-
}), /*#__PURE__*/_jsx(
|
|
853
|
+
}), /*#__PURE__*/_jsx(SelectList, {
|
|
854
854
|
items: items,
|
|
855
855
|
value: value,
|
|
856
856
|
onValueChange: v => {
|
|
857
857
|
onValueChange(v);
|
|
858
858
|
sheetRef.current?.dismiss();
|
|
859
859
|
},
|
|
860
|
-
children: /*#__PURE__*/_jsx(
|
|
861
|
-
renderItem: item => /*#__PURE__*/_jsx(
|
|
860
|
+
children: /*#__PURE__*/_jsx(SelectListContent, {
|
|
861
|
+
renderItem: item => /*#__PURE__*/_jsx(SelectListItem, {
|
|
862
862
|
value: item.value,
|
|
863
|
-
children: /*#__PURE__*/_jsx(
|
|
864
|
-
children: /*#__PURE__*/_jsx(
|
|
863
|
+
children: /*#__PURE__*/_jsx(SelectListItemContent, {
|
|
864
|
+
children: /*#__PURE__*/_jsx(SelectListItemText, {
|
|
865
865
|
children: item.label
|
|
866
866
|
})
|
|
867
867
|
})
|
|
@@ -935,13 +935,13 @@ export const TriggerShowcase = {
|
|
|
935
935
|
children: selected?.label ?? appearance
|
|
936
936
|
}, appearance);
|
|
937
937
|
})
|
|
938
|
-
}), /*#__PURE__*/_jsx(
|
|
938
|
+
}), /*#__PURE__*/_jsx(SimpleSelectListSheet, {
|
|
939
939
|
sheetRef: buttonRef,
|
|
940
940
|
items: SIMPLE_OPTIONS,
|
|
941
941
|
title: "All accounts",
|
|
942
942
|
value: buttonValue,
|
|
943
943
|
onValueChange: setButtonValue
|
|
944
|
-
}), /*#__PURE__*/_jsx(
|
|
944
|
+
}), /*#__PURE__*/_jsx(SimpleSelectListSheet, {
|
|
945
945
|
sheetRef: iconRef,
|
|
946
946
|
items: SETTINGS_OPTIONS,
|
|
947
947
|
title: "Settings",
|
|
@@ -955,28 +955,28 @@ export const TriggerShowcase = {
|
|
|
955
955
|
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
956
956
|
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
957
957
|
title: "Select network"
|
|
958
|
-
}), /*#__PURE__*/_jsx(
|
|
958
|
+
}), /*#__PURE__*/_jsx(SelectList, {
|
|
959
959
|
items: CURRENCIES,
|
|
960
960
|
value: cryptoValue,
|
|
961
961
|
onValueChange: v => {
|
|
962
962
|
setCryptoValue(v);
|
|
963
963
|
cryptoRef.current?.dismiss();
|
|
964
964
|
},
|
|
965
|
-
children: /*#__PURE__*/_jsx(
|
|
965
|
+
children: /*#__PURE__*/_jsx(SelectListContent, {
|
|
966
966
|
renderItem: item => {
|
|
967
967
|
const ticker = item.meta.ticker;
|
|
968
|
-
return /*#__PURE__*/_jsxs(
|
|
968
|
+
return /*#__PURE__*/_jsxs(SelectListItem, {
|
|
969
969
|
value: item.value,
|
|
970
|
-
children: [/*#__PURE__*/_jsx(
|
|
970
|
+
children: [/*#__PURE__*/_jsx(SelectListItemLeading, {
|
|
971
971
|
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
972
972
|
ledgerId: item.meta?.ledgerId ?? '',
|
|
973
973
|
ticker: ticker,
|
|
974
974
|
size: 32
|
|
975
975
|
})
|
|
976
|
-
}), /*#__PURE__*/_jsxs(
|
|
977
|
-
children: [/*#__PURE__*/_jsx(
|
|
976
|
+
}), /*#__PURE__*/_jsxs(SelectListItemContent, {
|
|
977
|
+
children: [/*#__PURE__*/_jsx(SelectListItemText, {
|
|
978
978
|
children: item.label
|
|
979
|
-
}), /*#__PURE__*/_jsx(
|
|
979
|
+
}), /*#__PURE__*/_jsx(SelectListItemDescription, {
|
|
980
980
|
children: ticker
|
|
981
981
|
})]
|
|
982
982
|
})]
|
|
@@ -985,7 +985,7 @@ export const TriggerShowcase = {
|
|
|
985
985
|
})
|
|
986
986
|
})]
|
|
987
987
|
})
|
|
988
|
-
}), appearances.map(appearance => /*#__PURE__*/_jsx(
|
|
988
|
+
}), appearances.map(appearance => /*#__PURE__*/_jsx(SimpleSelectListSheet, {
|
|
989
989
|
sheetRef: appearanceRefs[appearance],
|
|
990
990
|
items: SIMPLE_OPTIONS,
|
|
991
991
|
title: appearance,
|
|
@@ -1007,24 +1007,24 @@ export const WithDefaultValue = {
|
|
|
1007
1007
|
lx: {
|
|
1008
1008
|
width: 's320'
|
|
1009
1009
|
},
|
|
1010
|
-
children: /*#__PURE__*/_jsx(
|
|
1010
|
+
children: /*#__PURE__*/_jsx(SelectList, {
|
|
1011
1011
|
items: CURRENCIES,
|
|
1012
1012
|
defaultValue: "eth",
|
|
1013
|
-
children: /*#__PURE__*/_jsx(
|
|
1013
|
+
children: /*#__PURE__*/_jsx(SelectListContent, {
|
|
1014
1014
|
renderItem: item => {
|
|
1015
1015
|
const meta = item.meta;
|
|
1016
|
-
return /*#__PURE__*/_jsxs(
|
|
1016
|
+
return /*#__PURE__*/_jsxs(SelectListItem, {
|
|
1017
1017
|
value: item.value,
|
|
1018
|
-
children: [/*#__PURE__*/_jsx(
|
|
1018
|
+
children: [/*#__PURE__*/_jsx(SelectListItemLeading, {
|
|
1019
1019
|
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
1020
1020
|
ledgerId: meta.ledgerId,
|
|
1021
1021
|
ticker: meta.ticker,
|
|
1022
1022
|
size: 32
|
|
1023
1023
|
})
|
|
1024
|
-
}), /*#__PURE__*/_jsxs(
|
|
1025
|
-
children: [/*#__PURE__*/_jsx(
|
|
1024
|
+
}), /*#__PURE__*/_jsxs(SelectListItemContent, {
|
|
1025
|
+
children: [/*#__PURE__*/_jsx(SelectListItemText, {
|
|
1026
1026
|
children: item.label
|
|
1027
|
-
}), /*#__PURE__*/_jsx(
|
|
1027
|
+
}), /*#__PURE__*/_jsx(SelectListItemDescription, {
|
|
1028
1028
|
children: meta.ticker
|
|
1029
1029
|
})]
|
|
1030
1030
|
})]
|
|
@@ -1034,7 +1034,7 @@ export const WithDefaultValue = {
|
|
|
1034
1034
|
})
|
|
1035
1035
|
})
|
|
1036
1036
|
};
|
|
1037
|
-
const NetworkList =
|
|
1037
|
+
const NetworkList = createSelectList();
|
|
1038
1038
|
const TYPED_NETWORKS = [{
|
|
1039
1039
|
value: 'eth',
|
|
1040
1040
|
label: 'Ethereum',
|
|
@@ -1068,27 +1068,27 @@ export const TypesafeFactory = {
|
|
|
1068
1068
|
lx: {
|
|
1069
1069
|
width: 's320'
|
|
1070
1070
|
},
|
|
1071
|
-
children: /*#__PURE__*/_jsx(NetworkList.
|
|
1071
|
+
children: /*#__PURE__*/_jsx(NetworkList.SelectList, {
|
|
1072
1072
|
items: TYPED_NETWORKS,
|
|
1073
1073
|
value: value,
|
|
1074
1074
|
onValueChange: setValue,
|
|
1075
|
-
children: /*#__PURE__*/_jsx(NetworkList.
|
|
1075
|
+
children: /*#__PURE__*/_jsx(NetworkList.SelectListContent, {
|
|
1076
1076
|
renderItem: ({
|
|
1077
1077
|
value,
|
|
1078
1078
|
label,
|
|
1079
1079
|
meta
|
|
1080
|
-
}) => meta ? /*#__PURE__*/_jsxs(NetworkList.
|
|
1080
|
+
}) => meta ? /*#__PURE__*/_jsxs(NetworkList.SelectListItem, {
|
|
1081
1081
|
value: value,
|
|
1082
|
-
children: [/*#__PURE__*/_jsx(NetworkList.
|
|
1082
|
+
children: [/*#__PURE__*/_jsx(NetworkList.SelectListItemLeading, {
|
|
1083
1083
|
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
1084
1084
|
ledgerId: meta.ledgerId,
|
|
1085
1085
|
ticker: meta.ticker,
|
|
1086
1086
|
size: 32
|
|
1087
1087
|
})
|
|
1088
|
-
}), /*#__PURE__*/_jsxs(NetworkList.
|
|
1089
|
-
children: [/*#__PURE__*/_jsx(NetworkList.
|
|
1088
|
+
}), /*#__PURE__*/_jsxs(NetworkList.SelectListItemContent, {
|
|
1089
|
+
children: [/*#__PURE__*/_jsx(NetworkList.SelectListItemText, {
|
|
1090
1090
|
children: label
|
|
1091
|
-
}), /*#__PURE__*/_jsx(NetworkList.
|
|
1091
|
+
}), /*#__PURE__*/_jsx(NetworkList.SelectListItemDescription, {
|
|
1092
1092
|
children: meta.ticker
|
|
1093
1093
|
})]
|
|
1094
1094
|
})]
|
|
@@ -1098,4 +1098,4 @@ export const TypesafeFactory = {
|
|
|
1098
1098
|
});
|
|
1099
1099
|
}
|
|
1100
1100
|
};
|
|
1101
|
-
//# sourceMappingURL=
|
|
1101
|
+
//# sourceMappingURL=SelectList.stories.js.map
|