@ledgerhq/lumen-ui-rnative 0.1.60 → 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/DotIcon.js +0 -13
- package/dist/module/lib/Components/core/DotIcon/DotIcon.js.map +1 -1
- package/dist/module/lib/Components/core/DotIcon/DotIcon.mdx +3 -3
- package/dist/module/lib/Components/core/DotIcon/DotIcon.stories.js +14 -13
- package/dist/module/lib/Components/core/DotIcon/DotIcon.stories.js.map +1 -1
- package/dist/module/lib/Components/core/DotIcon/DotIcon.test.js +22 -0
- package/dist/module/lib/Components/core/DotIcon/DotIcon.test.js.map +1 -1
- package/dist/module/lib/Components/core/DotIcon/getDotIconProps.js +37 -0
- package/dist/module/lib/Components/core/DotIcon/getDotIconProps.js.map +1 -0
- package/dist/module/lib/Components/core/DotIcon/getDotIconProps.test.js +38 -0
- package/dist/module/lib/Components/core/DotIcon/getDotIconProps.test.js.map +1 -0
- package/dist/module/lib/Components/core/DotIcon/index.js +2 -1
- package/dist/module/lib/Components/core/DotIcon/index.js.map +1 -1
- package/dist/module/lib/Components/core/DotSymbol/DotSymbol.js +0 -19
- package/dist/module/lib/Components/core/DotSymbol/DotSymbol.js.map +1 -1
- package/dist/module/lib/Components/core/DotSymbol/DotSymbol.mdx +3 -3
- package/dist/module/lib/Components/core/DotSymbol/DotSymbol.stories.js +18 -17
- package/dist/module/lib/Components/core/DotSymbol/DotSymbol.stories.js.map +1 -1
- package/dist/module/lib/Components/core/DotSymbol/getDotSymbolProps.js +55 -0
- package/dist/module/lib/Components/core/DotSymbol/getDotSymbolProps.js.map +1 -0
- package/dist/module/lib/Components/core/DotSymbol/getDotSymbolProps.test.js +56 -0
- package/dist/module/lib/Components/core/DotSymbol/getDotSymbolProps.test.js.map +1 -0
- package/dist/module/lib/Components/core/DotSymbol/index.js +2 -1
- 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/BaseInput/BaseInputLabel.js +2 -2
- package/dist/module/lib/Components/internal/BaseInput/BaseInputLabel.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/DotIcon.d.ts +0 -13
- package/dist/typescript/src/lib/Components/core/DotIcon/DotIcon.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/DotIcon/getDotIconProps.d.ts +66 -0
- package/dist/typescript/src/lib/Components/core/DotIcon/getDotIconProps.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/DotIcon/index.d.ts +2 -1
- package/dist/typescript/src/lib/Components/core/DotIcon/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/DotSymbol/DotSymbol.d.ts +1 -5
- package/dist/typescript/src/lib/Components/core/DotSymbol/DotSymbol.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/DotSymbol/getDotSymbolProps.d.ts +102 -0
- package/dist/typescript/src/lib/Components/core/DotSymbol/getDotSymbolProps.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/DotSymbol/index.d.ts +2 -1
- 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/internal/BaseInput/BaseInputLabel.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/DotIcon.mdx +3 -3
- package/src/lib/Components/core/DotIcon/DotIcon.stories.tsx +14 -13
- package/src/lib/Components/core/DotIcon/DotIcon.test.tsx +20 -0
- package/src/lib/Components/core/DotIcon/DotIcon.tsx +0 -15
- package/src/lib/Components/core/DotIcon/getDotIconProps.test.ts +19 -0
- package/src/lib/Components/core/DotIcon/getDotIconProps.ts +20 -0
- package/src/lib/Components/core/DotIcon/index.ts +2 -5
- package/src/lib/Components/core/DotSymbol/DotSymbol.mdx +3 -3
- package/src/lib/Components/core/DotSymbol/DotSymbol.stories.tsx +18 -17
- package/src/lib/Components/core/DotSymbol/DotSymbol.tsx +0 -23
- package/src/lib/Components/core/DotSymbol/getDotSymbolProps.test.ts +25 -0
- package/src/lib/Components/core/DotSymbol/getDotSymbolProps.ts +26 -0
- package/src/lib/Components/core/DotSymbol/index.ts +2 -1
- 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/BaseInput/BaseInputLabel.tsx +5 -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
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { describe, it, expect, jest } from '@jest/globals';
|
|
2
2
|
import { renderHook, act } from '@testing-library/react-native';
|
|
3
|
-
import type {
|
|
4
|
-
import {
|
|
3
|
+
import type { SelectListItemData } from '../types';
|
|
4
|
+
import { useSelectListItems } from './useSelectListItems';
|
|
5
5
|
|
|
6
|
-
const apple:
|
|
6
|
+
const apple: SelectListItemData = {
|
|
7
7
|
value: 'apple',
|
|
8
8
|
label: 'Apple',
|
|
9
9
|
group: 'Fruits',
|
|
10
10
|
};
|
|
11
|
-
const banana:
|
|
11
|
+
const banana: SelectListItemData = {
|
|
12
12
|
value: 'banana',
|
|
13
13
|
label: 'Banana',
|
|
14
14
|
group: 'Fruits',
|
|
15
15
|
};
|
|
16
|
-
const carrot:
|
|
16
|
+
const carrot: SelectListItemData = {
|
|
17
17
|
value: 'carrot',
|
|
18
18
|
label: 'Carrot',
|
|
19
19
|
group: 'Vegetables',
|
|
20
20
|
};
|
|
21
|
-
const spinach:
|
|
21
|
+
const spinach: SelectListItemData = {
|
|
22
22
|
value: 'spinach',
|
|
23
23
|
label: 'Spinach',
|
|
24
24
|
group: 'Vegetables',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
const btc:
|
|
28
|
-
const eth:
|
|
27
|
+
const btc: SelectListItemData = { value: 'btc', label: 'Bitcoin' };
|
|
28
|
+
const eth: SelectListItemData = { value: 'eth', label: 'Ethereum' };
|
|
29
29
|
|
|
30
|
-
describe('
|
|
30
|
+
describe('useSelectListItems', () => {
|
|
31
31
|
describe('flat items (no group field)', () => {
|
|
32
32
|
it('returns isGrouped false and flatItems as-is', () => {
|
|
33
33
|
const { result } = renderHook(() =>
|
|
34
|
-
|
|
34
|
+
useSelectListItems({ items: [btc, eth] }),
|
|
35
35
|
);
|
|
36
36
|
|
|
37
37
|
expect(result.current.isGrouped).toBe(false);
|
|
@@ -40,7 +40,7 @@ describe('useOptionListItems', () => {
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
it('returns empty flatItems for empty array', () => {
|
|
43
|
-
const { result } = renderHook(() =>
|
|
43
|
+
const { result } = renderHook(() => useSelectListItems({ items: [] }));
|
|
44
44
|
|
|
45
45
|
expect(result.current.isGrouped).toBe(false);
|
|
46
46
|
expect(result.current.flatItems).toEqual([]);
|
|
@@ -48,9 +48,9 @@ describe('useOptionListItems', () => {
|
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
describe('grouped items (group field present)', () => {
|
|
51
|
-
it('detects groups and builds
|
|
51
|
+
it('detects groups and builds SelectListItemGroup[]', () => {
|
|
52
52
|
const { result } = renderHook(() =>
|
|
53
|
-
|
|
53
|
+
useSelectListItems({ items: [apple, banana, carrot, spinach] }),
|
|
54
54
|
);
|
|
55
55
|
|
|
56
56
|
expect(result.current.isGrouped).toBe(true);
|
|
@@ -63,7 +63,7 @@ describe('useOptionListItems', () => {
|
|
|
63
63
|
|
|
64
64
|
it('preserves group order by first occurrence', () => {
|
|
65
65
|
const { result } = renderHook(() =>
|
|
66
|
-
|
|
66
|
+
useSelectListItems({ items: [carrot, apple, spinach, banana] }),
|
|
67
67
|
);
|
|
68
68
|
|
|
69
69
|
expect(result.current.groups[0].label).toBe('Vegetables');
|
|
@@ -74,7 +74,7 @@ describe('useOptionListItems', () => {
|
|
|
74
74
|
describe('filtering', () => {
|
|
75
75
|
it('applies the default case-insensitive label filter', () => {
|
|
76
76
|
const { result } = renderHook(() =>
|
|
77
|
-
|
|
77
|
+
useSelectListItems({ items: [btc, eth] }),
|
|
78
78
|
);
|
|
79
79
|
|
|
80
80
|
act(() => {
|
|
@@ -86,7 +86,7 @@ describe('useOptionListItems', () => {
|
|
|
86
86
|
|
|
87
87
|
it('filters within groups and removes empty groups', () => {
|
|
88
88
|
const { result } = renderHook(() =>
|
|
89
|
-
|
|
89
|
+
useSelectListItems({ items: [apple, banana, carrot, spinach] }),
|
|
90
90
|
);
|
|
91
91
|
|
|
92
92
|
act(() => {
|
|
@@ -99,11 +99,11 @@ describe('useOptionListItems', () => {
|
|
|
99
99
|
});
|
|
100
100
|
|
|
101
101
|
it('uses a custom filter when provided', () => {
|
|
102
|
-
const customFilter = (item:
|
|
102
|
+
const customFilter = (item: SelectListItemData, query: string): boolean =>
|
|
103
103
|
item.value.startsWith(query);
|
|
104
104
|
|
|
105
105
|
const { result } = renderHook(() =>
|
|
106
|
-
|
|
106
|
+
useSelectListItems({ items: [btc, eth], filter: customFilter }),
|
|
107
107
|
);
|
|
108
108
|
|
|
109
109
|
act(() => {
|
|
@@ -115,7 +115,7 @@ describe('useOptionListItems', () => {
|
|
|
115
115
|
|
|
116
116
|
it('disables filtering when filter is null', () => {
|
|
117
117
|
const { result } = renderHook(() =>
|
|
118
|
-
|
|
118
|
+
useSelectListItems({ items: [btc, eth], filter: null }),
|
|
119
119
|
);
|
|
120
120
|
|
|
121
121
|
act(() => {
|
|
@@ -127,7 +127,7 @@ describe('useOptionListItems', () => {
|
|
|
127
127
|
|
|
128
128
|
it('returns all items when the query is whitespace-only', () => {
|
|
129
129
|
const { result } = renderHook(() =>
|
|
130
|
-
|
|
130
|
+
useSelectListItems({ items: [btc, eth] }),
|
|
131
131
|
);
|
|
132
132
|
|
|
133
133
|
act(() => {
|
|
@@ -141,7 +141,7 @@ describe('useOptionListItems', () => {
|
|
|
141
141
|
describe('external filteredItems', () => {
|
|
142
142
|
it('uses filteredItems instead of internal filtering', () => {
|
|
143
143
|
const { result } = renderHook(() =>
|
|
144
|
-
|
|
144
|
+
useSelectListItems({
|
|
145
145
|
items: [btc, eth],
|
|
146
146
|
filteredItems: [eth],
|
|
147
147
|
}),
|
|
@@ -152,7 +152,7 @@ describe('useOptionListItems', () => {
|
|
|
152
152
|
|
|
153
153
|
it('groups filteredItems when items are grouped', () => {
|
|
154
154
|
const { result } = renderHook(() =>
|
|
155
|
-
|
|
155
|
+
useSelectListItems({
|
|
156
156
|
items: [apple, banana, carrot],
|
|
157
157
|
filteredItems: [apple, carrot],
|
|
158
158
|
}),
|
|
@@ -170,7 +170,7 @@ describe('useOptionListItems', () => {
|
|
|
170
170
|
it('calls onSearchValueChange with the new value', () => {
|
|
171
171
|
const onSearchValueChange = jest.fn();
|
|
172
172
|
const { result } = renderHook(() =>
|
|
173
|
-
|
|
173
|
+
useSelectListItems({ items: [btc, eth], onSearchValueChange }),
|
|
174
174
|
);
|
|
175
175
|
|
|
176
176
|
act(() => {
|
|
@@ -183,7 +183,7 @@ describe('useOptionListItems', () => {
|
|
|
183
183
|
|
|
184
184
|
it('uses defaultSearchValue as the initial uncontrolled value', () => {
|
|
185
185
|
const { result } = renderHook(() =>
|
|
186
|
-
|
|
186
|
+
useSelectListItems({
|
|
187
187
|
items: [btc, eth],
|
|
188
188
|
defaultSearchValue: 'default',
|
|
189
189
|
}),
|
|
@@ -2,19 +2,19 @@ import { useMemo } from 'react';
|
|
|
2
2
|
import { useControllableState } from '../../../../utils/useControllableState';
|
|
3
3
|
import type {
|
|
4
4
|
MetaShape,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
SelectListItemData,
|
|
6
|
+
SelectListItemGroup,
|
|
7
|
+
SelectListValue,
|
|
8
8
|
} from '../types';
|
|
9
9
|
|
|
10
10
|
const groupByField = <
|
|
11
|
-
T extends
|
|
11
|
+
T extends SelectListValue = SelectListValue,
|
|
12
12
|
TMeta extends MetaShape = MetaShape,
|
|
13
13
|
>(
|
|
14
|
-
items:
|
|
15
|
-
):
|
|
14
|
+
items: SelectListItemData<T, TMeta>[],
|
|
15
|
+
): SelectListItemGroup<T, TMeta>[] => {
|
|
16
16
|
const order: string[] = [];
|
|
17
|
-
const map: Record<string,
|
|
17
|
+
const map: Record<string, SelectListItemData<T, TMeta>[]> = {};
|
|
18
18
|
for (const item of items) {
|
|
19
19
|
const key = item.group ?? '';
|
|
20
20
|
if (!map[key]) {
|
|
@@ -26,41 +26,41 @@ const groupByField = <
|
|
|
26
26
|
return order.map((label) => ({ label, items: map[label] }));
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
const hasGroups = (items:
|
|
29
|
+
const hasGroups = (items: SelectListItemData[]): boolean =>
|
|
30
30
|
items.some((item) => item.group !== undefined);
|
|
31
31
|
|
|
32
32
|
export const defaultLabelFilter = (
|
|
33
|
-
item:
|
|
33
|
+
item: SelectListItemData,
|
|
34
34
|
query: string,
|
|
35
35
|
): boolean => item.label.toLowerCase().includes(query.toLowerCase());
|
|
36
36
|
|
|
37
|
-
type
|
|
38
|
-
T extends
|
|
37
|
+
type UseSelectListItemsParams<
|
|
38
|
+
T extends SelectListValue = SelectListValue,
|
|
39
39
|
TMeta extends MetaShape = MetaShape,
|
|
40
40
|
> = {
|
|
41
|
-
items:
|
|
41
|
+
items: SelectListItemData<T, TMeta>[];
|
|
42
42
|
filter?:
|
|
43
43
|
| null
|
|
44
|
-
| ((item:
|
|
45
|
-
filteredItems?:
|
|
44
|
+
| ((item: SelectListItemData<T, TMeta>, query: string) => boolean);
|
|
45
|
+
filteredItems?: SelectListItemData<T, TMeta>[];
|
|
46
46
|
searchValue?: string;
|
|
47
47
|
defaultSearchValue?: string;
|
|
48
48
|
onSearchValueChange?: (value: string) => void;
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
type
|
|
52
|
-
T extends
|
|
51
|
+
type UseSelectListItemsResult<
|
|
52
|
+
T extends SelectListValue = SelectListValue,
|
|
53
53
|
TMeta extends MetaShape = MetaShape,
|
|
54
54
|
> = {
|
|
55
55
|
isGrouped: boolean;
|
|
56
|
-
groups:
|
|
57
|
-
flatItems:
|
|
56
|
+
groups: SelectListItemGroup<T, TMeta>[];
|
|
57
|
+
flatItems: SelectListItemData<T, TMeta>[];
|
|
58
58
|
resolvedSearchValue: string;
|
|
59
59
|
handleSearchValueChange: (val: string) => void;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
export const
|
|
63
|
-
T extends
|
|
62
|
+
export const useSelectListItems = <
|
|
63
|
+
T extends SelectListValue = SelectListValue,
|
|
64
64
|
TMeta extends MetaShape = MetaShape,
|
|
65
65
|
>({
|
|
66
66
|
items,
|
|
@@ -69,7 +69,7 @@ export const useOptionListItems = <
|
|
|
69
69
|
searchValue: searchValueProp,
|
|
70
70
|
defaultSearchValue,
|
|
71
71
|
onSearchValueChange,
|
|
72
|
-
}:
|
|
72
|
+
}: UseSelectListItemsParams<T, TMeta>): UseSelectListItemsResult<T, TMeta> => {
|
|
73
73
|
const [searchValue, handleSearchValueChange] = useControllableState<string>({
|
|
74
74
|
prop: searchValueProp,
|
|
75
75
|
defaultProp: defaultSearchValue ?? '',
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
InformationFill,
|
|
12
12
|
WarningFill,
|
|
13
13
|
} from '../../symbols';
|
|
14
|
-
import type { IconSize } from '../../symbols/Icon
|
|
14
|
+
import type { IconSize } from '../../symbols/Icon';
|
|
15
15
|
import type { SpinnerProps } from '../Spinner';
|
|
16
16
|
import { Spinner } from '../Spinner';
|
|
17
17
|
import type { SpotAppearance, SpotProps, SpotSize } from './types';
|
|
@@ -25,12 +25,13 @@ export * from './MediaButton';
|
|
|
25
25
|
export * from './MediaCard';
|
|
26
26
|
export * from './MediaImage';
|
|
27
27
|
export * from './MediaTag';
|
|
28
|
+
export * from './MenuList';
|
|
28
29
|
export * from './NavBar';
|
|
29
|
-
export * from './OptionList';
|
|
30
30
|
export * from './PageIndicator';
|
|
31
31
|
export * from './SearchInput';
|
|
32
32
|
export * from './SectionHeader';
|
|
33
33
|
export * from './SegmentedControl';
|
|
34
|
+
export * from './SelectList';
|
|
34
35
|
export * from './Skeleton';
|
|
35
36
|
export * from './Spinner';
|
|
36
37
|
export * from './Spot';
|
|
@@ -55,7 +55,7 @@ const useStyles = ({
|
|
|
55
55
|
accent: t.colors.bg.accent,
|
|
56
56
|
transparent: t.colors.bg.mutedTransparent,
|
|
57
57
|
'no-background': 'transparent',
|
|
58
|
-
red: t.colors.bg.
|
|
58
|
+
red: t.colors.bg.errorTransparent,
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
const pressedBgColors: Record<Appearance, string> = {
|
|
@@ -64,7 +64,7 @@ const useStyles = ({
|
|
|
64
64
|
accent: t.colors.bg.accentPressed,
|
|
65
65
|
transparent: t.colors.bg.mutedTransparentPressed,
|
|
66
66
|
'no-background': t.colors.bg.baseTransparentPressed,
|
|
67
|
-
red: t.colors.bg.
|
|
67
|
+
red: t.colors.bg.errorTransparentPressed,
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
const textColors: Record<Appearance, string> = {
|
|
@@ -29,10 +29,13 @@ const useAnimatedFloatingLabel = ({
|
|
|
29
29
|
|
|
30
30
|
useEffect(() => {
|
|
31
31
|
floatingAnimation.value = withTiming(isFloatingLabel ? 1 : 0, timingConfig);
|
|
32
|
-
|
|
33
|
-
return () => cancelAnimation(floatingAnimation);
|
|
34
32
|
}, [isFloatingLabel, timingConfig, floatingAnimation]);
|
|
35
33
|
|
|
34
|
+
useEffect(
|
|
35
|
+
() => () => cancelAnimation(floatingAnimation),
|
|
36
|
+
[floatingAnimation],
|
|
37
|
+
);
|
|
38
|
+
|
|
36
39
|
const animatedStyle = useAnimatedStyle(
|
|
37
40
|
() => ({
|
|
38
41
|
top: interpolate(
|
|
@@ -58,9 +58,9 @@ describe('BaseTag Component', () => {
|
|
|
58
58
|
['gray', colors.bg.mutedTransparent],
|
|
59
59
|
['accent', colors.bg.accent],
|
|
60
60
|
['accent-subtle', colors.bg.activeSubtle],
|
|
61
|
-
['success', colors.bg.
|
|
62
|
-
['error', colors.bg.
|
|
63
|
-
['warning', colors.bg.
|
|
61
|
+
['success', colors.bg.successTransparent],
|
|
62
|
+
['error', colors.bg.errorTransparent],
|
|
63
|
+
['warning', colors.bg.warningTransparent],
|
|
64
64
|
['white', colors.bg.white],
|
|
65
65
|
];
|
|
66
66
|
|
|
@@ -26,9 +26,9 @@ const useBaseTagStyles = ({
|
|
|
26
26
|
gray: t.colors.bg.mutedTransparent,
|
|
27
27
|
accent: t.colors.bg.accent,
|
|
28
28
|
'accent-subtle': t.colors.bg.activeSubtle,
|
|
29
|
-
success: t.colors.bg.
|
|
30
|
-
error: t.colors.bg.
|
|
31
|
-
warning: t.colors.bg.
|
|
29
|
+
success: t.colors.bg.successTransparent,
|
|
30
|
+
error: t.colors.bg.errorTransparent,
|
|
31
|
+
warning: t.colors.bg.warningTransparent,
|
|
32
32
|
white: t.colors.bg.white,
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import Svg, { Path } from 'react-native-svg';
|
|
2
|
+
import createIcon from '../Icon/createIcon';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* CloudSync icon component for React Native.
|
|
6
|
+
*
|
|
7
|
+
* This icon component is automatically generated from SVG files and uses the createIcon utility
|
|
8
|
+
* to create a consistent icon interface. It supports all standard SVG props (from react-native-svg)
|
|
9
|
+
* and additional size variants defined in the Icon component.
|
|
10
|
+
*
|
|
11
|
+
* @component
|
|
12
|
+
* @param {16 | 20 | 24 | 40 | 48 | 56} [size=24] - The size of the icon in pixels.
|
|
13
|
+
* @param {string} [color] - The color of the icon.
|
|
14
|
+
* @param {SVGProps} [...props] - All standard SVG element props (from react-native-svg).
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Basic usage with default size (24px)
|
|
18
|
+
* import { CloudSync } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
19
|
+
*
|
|
20
|
+
* <CloudSync />
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // With custom size and style
|
|
24
|
+
* <CloudSync size={40} color="warning" lx={{ marginTop: 's4' }} />
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // Used within a Button component
|
|
28
|
+
* import { Button } from '@ledgerhq/lumen-ui-rnative';
|
|
29
|
+
*
|
|
30
|
+
* <Button icon={CloudSync} size="md">
|
|
31
|
+
* Click me
|
|
32
|
+
* </Button>
|
|
33
|
+
*/
|
|
34
|
+
export const CloudSync = createIcon(
|
|
35
|
+
'CloudSync',
|
|
36
|
+
<Svg width={24} height={24} fill='currentColor' viewBox='0 0 16 16'>
|
|
37
|
+
<Path
|
|
38
|
+
stroke='currentColor'
|
|
39
|
+
strokeLinecap='round'
|
|
40
|
+
strokeLinejoin='round'
|
|
41
|
+
strokeWidth={1.3}
|
|
42
|
+
d='m8.454 11.57 1.334-1.333 1.333 1.333m-1.333-1.333v3.698m-2.48-1.333-1.333 1.333-1.333-1.333m1.333 1.333v-3.698m-2.787.756A3.33 3.33 0 0 1 1.327 8a3.32 3.32 0 0 1 2.879-3.293V4.7a3.98 3.98 0 0 1 3.78-2.713c2.207 0 4 1.786 4 4a2.67 2.67 0 0 1 2.667 2.666 2.67 2.67 0 0 1-1.391 2.34'
|
|
43
|
+
/>
|
|
44
|
+
</Svg>,
|
|
45
|
+
);
|
|
@@ -39,7 +39,14 @@ export const Dollar = createIcon(
|
|
|
39
39
|
strokeLinecap='round'
|
|
40
40
|
strokeLinejoin='round'
|
|
41
41
|
strokeWidth={1.3}
|
|
42
|
-
d='
|
|
42
|
+
d='M3.522 3.515a6.333 6.333 0 1 1 8.956 8.957 6.333 6.333 0 0 1-8.956-8.957'
|
|
43
|
+
/>
|
|
44
|
+
<Path
|
|
45
|
+
stroke='currentColor'
|
|
46
|
+
strokeLinecap='round'
|
|
47
|
+
strokeLinejoin='round'
|
|
48
|
+
strokeWidth={1.3}
|
|
49
|
+
d='M8.02 4.103v.974m0 6.82v-.974M9.951 6.44A1.457 1.457 0 0 0 8.5 5.077H7.433c-.756 0-1.372.608-1.372 1.364 0 .624.427 1.17 1.03 1.325l1.825.452a1.35 1.35 0 0 1 1.029 1.325c0 .756-.616 1.364-1.372 1.364H7.505c-.779 0-1.402-.608-1.457-1.372'
|
|
43
50
|
/>
|
|
44
51
|
</Svg>,
|
|
45
52
|
);
|
|
@@ -39,7 +39,7 @@ export const DollarConvert = createIcon(
|
|
|
39
39
|
strokeLinecap='round'
|
|
40
40
|
strokeLinejoin='round'
|
|
41
41
|
strokeWidth={1.3}
|
|
42
|
-
d='
|
|
42
|
+
d='M3.913 3.913A5.76 5.76 0 0 1 8 2.22a5.784 5.784 0 0 1 5.781 5.779c0 .44-.06.873-.153 1.293m-.895-.89 1.04 1.04 1.04-1.047m-2.726 3.69a5.8 5.8 0 0 1-4.094 1.687A5.784 5.784 0 0 1 2.36 6.693m.903.906L2.215 6.552 1.17 7.592m6.85-3.489v.974m0 6.82v-.974M9.952 6.44a1.457 1.457 0 0 0-1.451-1.364H7.433c-.756 0-1.372.608-1.372 1.364 0 .624.427 1.17 1.03 1.325l1.825.452a1.35 1.35 0 0 1 1.029 1.325c0 .756-.616 1.364-1.372 1.364H7.506c-.78 0-1.403-.608-1.458-1.372'
|
|
43
43
|
/>
|
|
44
44
|
</Svg>,
|
|
45
45
|
);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import Svg, { Path } from 'react-native-svg';
|
|
2
|
+
import createIcon from '../Icon/createIcon';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* DollarFill icon component for React Native.
|
|
6
|
+
*
|
|
7
|
+
* This icon component is automatically generated from SVG files and uses the createIcon utility
|
|
8
|
+
* to create a consistent icon interface. It supports all standard SVG props (from react-native-svg)
|
|
9
|
+
* and additional size variants defined in the Icon component.
|
|
10
|
+
*
|
|
11
|
+
* @component
|
|
12
|
+
* @param {16 | 20 | 24 | 40 | 48 | 56} [size=24] - The size of the icon in pixels.
|
|
13
|
+
* @param {string} [color] - The color of the icon.
|
|
14
|
+
* @param {SVGProps} [...props] - All standard SVG element props (from react-native-svg).
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Basic usage with default size (24px)
|
|
18
|
+
* import { DollarFill } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
19
|
+
*
|
|
20
|
+
* <DollarFill />
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // With custom size and style
|
|
24
|
+
* <DollarFill size={40} color="warning" lx={{ marginTop: 's4' }} />
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // Used within a Button component
|
|
28
|
+
* import { Button } from '@ledgerhq/lumen-ui-rnative';
|
|
29
|
+
*
|
|
30
|
+
* <Button icon={DollarFill} size="md">
|
|
31
|
+
* Click me
|
|
32
|
+
* </Button>
|
|
33
|
+
*/
|
|
34
|
+
export const DollarFill = createIcon(
|
|
35
|
+
'DollarFill',
|
|
36
|
+
<Svg width={24} height={24} fill='currentColor' viewBox='0 0 16 16'>
|
|
37
|
+
<Path
|
|
38
|
+
fill='currentColor'
|
|
39
|
+
d='M8.127 1.019a6.982 6.982 0 1 1 0 13.963 6.982 6.982 0 0 1 0-13.963m-.116 2.434a.65.65 0 0 0-.65.65v.328a2.015 2.015 0 0 0-1.958 2.01c0 .923.63 1.725 1.516 1.955l.007.001 1.826.453h.002c.31.075.533.354.533.693 0 .392-.32.713-.722.714H7.497a.815.815 0 0 1-.809-.768.65.65 0 0 0-1.296.093 2.114 2.114 0 0 0 1.97 1.968v.348a.65.65 0 0 0 1.3 0v-.346a2.015 2.015 0 0 0 .4-3.965H9.06l-1.819-.45a.724.724 0 0 1-.539-.696c0-.392.32-.713.722-.713h1.068c.422 0 .772.327.803.76a.65.65 0 0 0 1.296-.092 2.11 2.11 0 0 0-1.93-1.96v-.332a.65.65 0 0 0-.651-.65'
|
|
40
|
+
/>
|
|
41
|
+
</Svg>,
|
|
42
|
+
);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import Svg, { Path } from 'react-native-svg';
|
|
2
|
+
import createIcon from '../Icon/createIcon';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* FaceId icon component for React Native.
|
|
6
|
+
*
|
|
7
|
+
* This icon component is automatically generated from SVG files and uses the createIcon utility
|
|
8
|
+
* to create a consistent icon interface. It supports all standard SVG props (from react-native-svg)
|
|
9
|
+
* and additional size variants defined in the Icon component.
|
|
10
|
+
*
|
|
11
|
+
* @component
|
|
12
|
+
* @param {16 | 20 | 24 | 40 | 48 | 56} [size=24] - The size of the icon in pixels.
|
|
13
|
+
* @param {string} [color] - The color of the icon.
|
|
14
|
+
* @param {SVGProps} [...props] - All standard SVG element props (from react-native-svg).
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Basic usage with default size (24px)
|
|
18
|
+
* import { FaceId } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
19
|
+
*
|
|
20
|
+
* <FaceId />
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // With custom size and style
|
|
24
|
+
* <FaceId size={40} color="warning" lx={{ marginTop: 's4' }} />
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // Used within a Button component
|
|
28
|
+
* import { Button } from '@ledgerhq/lumen-ui-rnative';
|
|
29
|
+
*
|
|
30
|
+
* <Button icon={FaceId} size="md">
|
|
31
|
+
* Click me
|
|
32
|
+
* </Button>
|
|
33
|
+
*/
|
|
34
|
+
export const FaceId = createIcon(
|
|
35
|
+
'FaceId',
|
|
36
|
+
<Svg width={24} height={24} fill='currentColor' viewBox='0 0 16 16'>
|
|
37
|
+
<Path
|
|
38
|
+
stroke='currentColor'
|
|
39
|
+
strokeLinecap='round'
|
|
40
|
+
strokeLinejoin='round'
|
|
41
|
+
strokeWidth={1.3}
|
|
42
|
+
d='M5 6.053v1m6-1v1M7.333 9.065h.334a.667.667 0 0 0 .666-.667V6.065m1.828 4.706a3.056 3.056 0 0 1-4.322 0M5.06 2H3.333C2.597 2 2 2.597 2 3.333V5.06M10.941 14h1.726c.736 0 1.333-.597 1.333-1.333V10.94m-12 0v1.726C2 13.403 2.597 14 3.333 14H5.06M14 5.059V3.333C14 2.597 13.403 2 12.667 2H10.94'
|
|
43
|
+
/>
|
|
44
|
+
</Svg>,
|
|
45
|
+
);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import Svg, { Path } from 'react-native-svg';
|
|
2
|
+
import createIcon from '../Icon/createIcon';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Fingerprint icon component for React Native.
|
|
6
|
+
*
|
|
7
|
+
* This icon component is automatically generated from SVG files and uses the createIcon utility
|
|
8
|
+
* to create a consistent icon interface. It supports all standard SVG props (from react-native-svg)
|
|
9
|
+
* and additional size variants defined in the Icon component.
|
|
10
|
+
*
|
|
11
|
+
* @component
|
|
12
|
+
* @param {16 | 20 | 24 | 40 | 48 | 56} [size=24] - The size of the icon in pixels.
|
|
13
|
+
* @param {string} [color] - The color of the icon.
|
|
14
|
+
* @param {SVGProps} [...props] - All standard SVG element props (from react-native-svg).
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Basic usage with default size (24px)
|
|
18
|
+
* import { Fingerprint } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
19
|
+
*
|
|
20
|
+
* <Fingerprint />
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // With custom size and style
|
|
24
|
+
* <Fingerprint size={40} color="warning" lx={{ marginTop: 's4' }} />
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // Used within a Button component
|
|
28
|
+
* import { Button } from '@ledgerhq/lumen-ui-rnative';
|
|
29
|
+
*
|
|
30
|
+
* <Button icon={Fingerprint} size="md">
|
|
31
|
+
* Click me
|
|
32
|
+
* </Button>
|
|
33
|
+
*/
|
|
34
|
+
export const Fingerprint = createIcon(
|
|
35
|
+
'Fingerprint',
|
|
36
|
+
<Svg width={24} height={24} fill='currentColor' viewBox='0 0 16 16'>
|
|
37
|
+
<Path
|
|
38
|
+
stroke='currentColor'
|
|
39
|
+
strokeLinecap='round'
|
|
40
|
+
strokeLinejoin='round'
|
|
41
|
+
strokeWidth={1.3}
|
|
42
|
+
d='M5.447 14.037A7.96 7.96 0 0 1 4 9.453a3.999 3.999 0 1 1 7.996 0m.217 3.989c-.072.004-.143.01-.215.01a4 4 0 0 1-3.998-4m.83 5.095a6 6 0 0 1-2.83-5.094 2 2 0 1 1 3.999 0 2 2 0 1 0 3.999 0 5.999 5.999 0 1 0-11.995 0c0 .738.083 1.458.235 2.151m11.343-7.622A7.42 7.42 0 0 0 8 1.452c-2.225 0-4.219.981-5.582 2.53'
|
|
43
|
+
/>
|
|
44
|
+
</Svg>,
|
|
45
|
+
);
|
|
@@ -37,8 +37,9 @@ export const Pause = createIcon(
|
|
|
37
37
|
<Path
|
|
38
38
|
stroke='currentColor'
|
|
39
39
|
strokeLinecap='round'
|
|
40
|
+
strokeLinejoin='round'
|
|
40
41
|
strokeWidth={1.3}
|
|
41
|
-
d='
|
|
42
|
+
d='M9.333 10V6m-2.666 4V6M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0'
|
|
42
43
|
/>
|
|
43
44
|
</Svg>,
|
|
44
45
|
);
|
|
@@ -35,11 +35,8 @@ export const Range = createIcon(
|
|
|
35
35
|
'Range',
|
|
36
36
|
<Svg width={24} height={24} fill='currentColor' viewBox='0 0 16 16'>
|
|
37
37
|
<Path
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
strokeLinejoin='round'
|
|
41
|
-
strokeWidth={1.3}
|
|
42
|
-
d='M2 13.333h5.333M2 10.667h4M2 8h5.333M2 5.333h4M2 2.667h5.333M12 13.333V2.667m-1.667 9L12 13.333l1.667-1.666m0-7.334L12 2.667l-1.667 1.666'
|
|
38
|
+
fill='currentColor'
|
|
39
|
+
d='m2.667 8-.46-.46-.46.46.46.459zm10.666 0 .46.459a.65.65 0 0 0 0-.92zm-3.126 2.207a.65.65 0 1 0 .92.92l-.46-.46zm.92-5.333a.65.65 0 1 0-.92.919l.46-.46zm-5.334.919a.65.65 0 0 0-.92-.92l.46.46zm-.92 5.333a.65.65 0 0 0 .92-.919l-.46.46zM2.668 8v.65h10.666v-1.3H2.667zm8 2.668.46.46 2.666-2.668-.46-.46-.46-.46-2.666 2.668zm2.666-2.668.46-.46-2.667-2.665-.46.46-.459.459 2.667 2.666zm-8-2.666-.46-.46L2.208 7.54l.46.46.46.459 2.666-2.666zM2.667 8l-.46.46 2.667 2.667.46-.46.459-.459L3.126 7.54z'
|
|
43
40
|
/>
|
|
44
41
|
</Svg>,
|
|
45
42
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Svg, { Path } from 'react-native-svg';
|
|
1
|
+
import Svg, { G, Path, Defs, ClipPath } from 'react-native-svg';
|
|
2
2
|
import createIcon from '../Icon/createIcon';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -34,11 +34,18 @@ import createIcon from '../Icon/createIcon';
|
|
|
34
34
|
export const Telegram = createIcon(
|
|
35
35
|
'Telegram',
|
|
36
36
|
<Svg width={24} height={24} fill='currentColor' viewBox='0 0 16 16'>
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
<G clipPath='url(#clip0_1202_653)'>
|
|
38
|
+
<Path
|
|
39
|
+
fill='currentColor'
|
|
40
|
+
fillRule='evenodd'
|
|
41
|
+
d='M.962 7.2Q6.6 4.768 8.48 3.99c3.58-1.475 4.324-1.731 4.81-1.74.106-.002.344.024.499.149.13.105.166.246.183.346s.039.326.022.503c-.194 2.02-1.034 6.923-1.46 9.186-.182.958-.537 1.279-.882 1.31-.748.069-1.317-.49-2.042-.961-1.135-.737-1.776-1.196-2.877-1.916-1.273-.831-.448-1.288.278-2.035.19-.195 3.488-3.169 3.552-3.439.008-.033.015-.16-.06-.226s-.187-.043-.267-.025q-.17.038-5.438 3.562-.771.525-1.398.512c-.46-.01-1.345-.258-2.004-.47-.807-.26-1.449-.398-1.393-.84q.044-.345.96-.705'
|
|
42
|
+
clipRule='evenodd'
|
|
43
|
+
/>
|
|
44
|
+
</G>
|
|
45
|
+
<Defs>
|
|
46
|
+
<ClipPath id='clip0_1202_653'>
|
|
47
|
+
<Path fill='#fff' d='M0 0h16v16H0z' />
|
|
48
|
+
</ClipPath>
|
|
49
|
+
</Defs>
|
|
43
50
|
</Svg>,
|
|
44
51
|
);
|
|
@@ -39,7 +39,7 @@ export const Usb = createIcon(
|
|
|
39
39
|
strokeLinecap='round'
|
|
40
40
|
strokeLinejoin='round'
|
|
41
41
|
strokeWidth={1.3}
|
|
42
|
-
d='M8 11.333a1.667 1.667 0 1 0 0 3.334 1.667 1.667 0 0 0 0-3.334m0 0v-10m-1.5 1.5 1.5-1.5 1.5 1.5M8 10.147 5.373 9.56a1.34 1.34 0 0 1-1.046-1.307V7.32M8 9.1l2.713-.82c.56-.173.947-.693.947-1.28v-.68M11.167 4h1c.368 0 .666.299.666.667v1a.667.667 0 0 1-.666.666h-1a.667.667 0 0 1-.667-.666v-1c0-.368.
|
|
42
|
+
d='M8 11.333a1.667 1.667 0 1 0 0 3.334 1.667 1.667 0 0 0 0-3.334m0 0v-10m-1.5 1.5 1.5-1.5 1.5 1.5M8 10.147 5.373 9.56a1.34 1.34 0 0 1-1.046-1.307V7.32M8 9.1l2.713-.82c.56-.173.947-.693.947-1.28v-.68M11.167 4h1c.368 0 .666.299.666.667v1a.667.667 0 0 1-.666.666h-1a.667.667 0 0 1-.667-.666v-1c0-.368.298-.667.667-.667M4.333 5a1.167 1.167 0 1 0 0 2.333 1.167 1.167 0 0 0 0-2.333'
|
|
43
43
|
/>
|
|
44
44
|
</Svg>,
|
|
45
45
|
);
|