@ledgerhq/lumen-ui-rnative 0.1.1 → 0.1.3
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 +3 -3
- package/dist/src/i18n/locales/de.json +3 -0
- package/dist/src/i18n/locales/en.json +3 -0
- package/dist/src/i18n/locales/es.json +3 -0
- package/dist/src/i18n/locales/fr.json +3 -0
- package/dist/src/i18n/locales/ja.json +3 -0
- package/dist/src/i18n/locales/ko.json +3 -0
- package/dist/src/i18n/locales/pt.json +3 -0
- package/dist/src/i18n/locales/ru.json +3 -0
- package/dist/src/i18n/locales/th.json +3 -0
- package/dist/src/i18n/locales/tr.json +3 -0
- package/dist/src/i18n/locales/zh.json +3 -0
- package/dist/src/lib/Animations/constants.d.ts +28 -0
- package/dist/src/lib/Animations/constants.d.ts.map +1 -0
- package/dist/src/lib/Animations/constants.js +27 -0
- package/dist/src/lib/Animations/index.d.ts +1 -0
- package/dist/src/lib/Animations/index.d.ts.map +1 -1
- package/dist/src/lib/Animations/index.js +1 -0
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.d.ts +1 -1
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.js +76 -5
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.stories.d.ts +1 -0
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.stories.d.ts.map +1 -1
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.stories.js +25 -2
- package/dist/src/lib/Components/AmountDisplay/types.d.ts +20 -25
- package/dist/src/lib/Components/AmountDisplay/types.d.ts.map +1 -1
- package/dist/src/lib/Components/AmountDisplay/types.js +1 -1
- package/dist/src/lib/Components/SegmentedControl/SegmentedControl.d.ts +10 -0
- package/dist/src/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -0
- package/dist/src/lib/Components/SegmentedControl/SegmentedControl.js +114 -0
- package/dist/src/lib/Components/SegmentedControl/SegmentedControl.stories.d.ts +58 -0
- package/dist/src/lib/Components/SegmentedControl/SegmentedControl.stories.d.ts.map +1 -0
- package/dist/src/lib/Components/SegmentedControl/SegmentedControl.stories.js +61 -0
- package/dist/src/lib/Components/SegmentedControl/SegmentedControlContext.d.ts +11 -0
- package/dist/src/lib/Components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -0
- package/dist/src/lib/Components/SegmentedControl/SegmentedControlContext.js +7 -0
- package/dist/src/lib/Components/SegmentedControl/index.d.ts +3 -0
- package/dist/src/lib/Components/SegmentedControl/index.d.ts.map +1 -0
- package/dist/src/lib/Components/SegmentedControl/index.js +1 -0
- package/dist/src/lib/Components/SegmentedControl/types.d.ts +45 -0
- package/dist/src/lib/Components/SegmentedControl/types.d.ts.map +1 -0
- package/dist/src/lib/Components/SegmentedControl/types.js +1 -0
- package/dist/src/lib/Components/TabBar/TabBar.js +1 -0
- package/dist/src/lib/Components/TabBar/types.d.ts +0 -1
- package/dist/src/lib/Components/TabBar/types.d.ts.map +1 -1
- package/dist/src/lib/Components/index.d.ts +1 -0
- package/dist/src/lib/Components/index.d.ts.map +1 -1
- package/dist/src/lib/Components/index.js +1 -0
- package/dist/src/styles/theme/resolvers/resolveFontWeights.js +1 -1
- package/package.json +3 -3
- package/src/i18n/locales/de.json +3 -0
- package/src/i18n/locales/en.json +3 -0
- package/src/i18n/locales/es.json +3 -0
- package/src/i18n/locales/fr.json +3 -0
- package/src/i18n/locales/ja.json +3 -0
- package/src/i18n/locales/ko.json +3 -0
- package/src/i18n/locales/pt.json +3 -0
- package/src/i18n/locales/ru.json +3 -0
- package/src/i18n/locales/th.json +3 -0
- package/src/i18n/locales/tr.json +3 -0
- package/src/i18n/locales/zh.json +3 -0
- package/src/lib/Animations/constants.ts +31 -0
- package/src/lib/Animations/index.ts +1 -0
- package/src/lib/Components/AmountDisplay/AmountDisplay.mdx +7 -1
- package/src/lib/Components/AmountDisplay/AmountDisplay.stories.tsx +29 -2
- package/src/lib/Components/AmountDisplay/AmountDisplay.test.tsx +101 -51
- package/src/lib/Components/AmountDisplay/AmountDisplay.tsx +175 -24
- package/src/lib/Components/AmountDisplay/types.ts +22 -25
- package/src/lib/Components/SegmentedControl/SegmentedControl.mdx +159 -0
- package/src/lib/Components/SegmentedControl/SegmentedControl.stories.tsx +102 -0
- package/src/lib/Components/SegmentedControl/SegmentedControl.test.tsx +57 -0
- package/src/lib/Components/SegmentedControl/SegmentedControl.tsx +202 -0
- package/src/lib/Components/SegmentedControl/SegmentedControlContext.tsx +17 -0
- package/src/lib/Components/SegmentedControl/index.ts +2 -0
- package/src/lib/Components/SegmentedControl/types.ts +46 -0
- package/src/lib/Components/TabBar/TabBar.tsx +1 -0
- package/src/lib/Components/TabBar/types.ts +0 -1
- package/src/lib/Components/index.ts +1 -0
- package/src/styles/theme/createStylesheetTheme.test.ts +1 -1
- package/src/styles/theme/resolvers/resolveFontWeights.test.ts +9 -6
- package/src/styles/theme/resolvers/resolveFontWeights.ts +1 -1
- package/dist/src/lib/Components/Banner/Banner.figma.d.ts +0 -2
- package/dist/src/lib/Components/Banner/Banner.figma.d.ts.map +0 -1
- package/dist/src/lib/Components/Banner/Banner.figma.js +0 -45
- package/dist/src/lib/Components/Checkbox/Checkbox.figma.d.ts +0 -2
- package/dist/src/lib/Components/Checkbox/Checkbox.figma.d.ts.map +0 -1
- package/dist/src/lib/Components/Checkbox/Checkbox.figma.js +0 -32
- package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.d.ts +0 -2
- package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.d.ts.map +0 -1
- package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.js +0 -26
- package/dist/src/lib/Components/Switch/Switch.figma.d.ts +0 -2
- package/dist/src/lib/Components/Switch/Switch.figma.d.ts.map +0 -1
- package/dist/src/lib/Components/Switch/Switch.figma.js +0 -32
- package/dist/src/lib/Components/Tile/Tile.figma.d.ts +0 -2
- package/dist/src/lib/Components/Tile/Tile.figma.d.ts.map +0 -1
- package/dist/src/lib/Components/Tile/Tile.figma.js +0 -28
- package/src/lib/Components/Banner/Banner.figma.tsx +0 -59
- package/src/lib/Components/Checkbox/Checkbox.figma.tsx +0 -49
- package/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.tsx +0 -42
- package/src/lib/Components/Switch/Switch.figma.tsx +0 -47
- package/src/lib/Components/Tile/Tile.figma.tsx +0 -53
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import figma from '@figma/code-connect';
|
|
3
|
-
import { Button } from '../Button';
|
|
4
|
-
import { Banner } from './Banner';
|
|
5
|
-
figma.connect(Banner, 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=129%3A201', {
|
|
6
|
-
imports: ["import { Banner } from '@ledgerhq/lumen-ui-react'"],
|
|
7
|
-
props: {
|
|
8
|
-
// These props were automatically mapped based on your linked code:
|
|
9
|
-
appearance: figma.enum('appearance', {
|
|
10
|
-
info: 'info',
|
|
11
|
-
success: 'success',
|
|
12
|
-
warning: 'warning',
|
|
13
|
-
error: 'error',
|
|
14
|
-
}),
|
|
15
|
-
title: figma.string('title'),
|
|
16
|
-
description: figma.boolean('show-description', {
|
|
17
|
-
true: figma.string('description'),
|
|
18
|
-
false: undefined,
|
|
19
|
-
}),
|
|
20
|
-
primaryAction: figma.boolean('show-actions', {
|
|
21
|
-
true: _jsx(Button, { children: "Primary Action" }),
|
|
22
|
-
false: undefined,
|
|
23
|
-
}),
|
|
24
|
-
secondaryAction: figma.boolean('show-actions', {
|
|
25
|
-
true: figma.boolean('show-secondary-action', {
|
|
26
|
-
true: _jsx(Button, { children: "Secondary Action" }),
|
|
27
|
-
false: undefined,
|
|
28
|
-
}),
|
|
29
|
-
false: undefined,
|
|
30
|
-
}),
|
|
31
|
-
onClose: figma.boolean('show-close', {
|
|
32
|
-
true: () => {
|
|
33
|
-
console.log('Close clicked');
|
|
34
|
-
},
|
|
35
|
-
false: undefined,
|
|
36
|
-
}),
|
|
37
|
-
},
|
|
38
|
-
links: [
|
|
39
|
-
{
|
|
40
|
-
name: '*',
|
|
41
|
-
url: 'https://ldls.vercel.app/?path=/docs/communication-banner-overview--docs',
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
example: (props) => (_jsx(Banner, { appearance: props.appearance, title: props.title, description: props.description, primaryAction: props.primaryAction, secondaryAction: props.secondaryAction, onClose: props.onClose })),
|
|
45
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.figma.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Checkbox/Checkbox.figma.tsx"],"names":[],"mappings":""}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import figma from '@figma/code-connect';
|
|
3
|
-
import { Checkbox } from './Checkbox';
|
|
4
|
-
/**
|
|
5
|
-
* -- This file was auto-generated by Code Connect --
|
|
6
|
-
* None of your props could be automatically mapped to Figma properties.
|
|
7
|
-
* You should update the `props` object to include a mapping from your
|
|
8
|
-
* code props to Figma properties, and update the `example` function to
|
|
9
|
-
* return the code example you'd like to see in Figma
|
|
10
|
-
*/
|
|
11
|
-
figma.connect(Checkbox, 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=6688%3A3600', {
|
|
12
|
-
imports: ["import { Checkbox } from '@ledgerhq/lumen-ui-rnative'"],
|
|
13
|
-
props: {
|
|
14
|
-
checkbox: figma.nestedProps('.checkbox', {
|
|
15
|
-
checked: figma.boolean('checked'),
|
|
16
|
-
disabled: figma.enum('state', {
|
|
17
|
-
disabled: true,
|
|
18
|
-
}),
|
|
19
|
-
}),
|
|
20
|
-
label: figma.boolean('show-label', {
|
|
21
|
-
true: figma.string('label'),
|
|
22
|
-
false: undefined,
|
|
23
|
-
}),
|
|
24
|
-
},
|
|
25
|
-
links: [
|
|
26
|
-
{
|
|
27
|
-
name: '*',
|
|
28
|
-
url: 'https://ldls.vercel.app/?path=/docs/react-native_selection-checkbox--docs',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
example: (props) => (_jsx(Checkbox, { checked: props.checkbox.checked, disabled: props.checkbox.disabled, label: props.label })),
|
|
32
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InteractiveIcon.figma.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/InteractiveIcon/InteractiveIcon.figma.tsx"],"names":[],"mappings":""}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import figma from '@figma/code-connect';
|
|
3
|
-
import { InteractiveIcon } from './InteractiveIcon';
|
|
4
|
-
figma.connect(InteractiveIcon, 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=6975%3A2571', {
|
|
5
|
-
imports: [
|
|
6
|
-
"import { InteractiveIcon } from '@ledgerhq/lumen-ui-rnative'",
|
|
7
|
-
"// import { YourIconName } from '@ledgerhq/lumen-ui-rnative/symbols'",
|
|
8
|
-
],
|
|
9
|
-
props: {
|
|
10
|
-
iconType: figma.enum('appearance', {
|
|
11
|
-
filled: 'filled',
|
|
12
|
-
stroked: 'stroked',
|
|
13
|
-
}),
|
|
14
|
-
disabled: figma.enum('state', {
|
|
15
|
-
disabled: true,
|
|
16
|
-
}),
|
|
17
|
-
children: figma.instance('icon-filled'),
|
|
18
|
-
},
|
|
19
|
-
links: [
|
|
20
|
-
{
|
|
21
|
-
name: '*',
|
|
22
|
-
url: 'https://ldls.vercel.app/?path=/docs/components-interactiveicon-overview--docs',
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
example: (props) => (_jsx(InteractiveIcon, { iconType: props.iconType, disabled: props.disabled, accessibilityLabel: 'Interactive icon', children: props.children })),
|
|
26
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.figma.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Switch/Switch.figma.tsx"],"names":[],"mappings":""}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import figma from '@figma/code-connect';
|
|
3
|
-
import { Switch } from './Switch';
|
|
4
|
-
/**
|
|
5
|
-
* -- This file was auto-generated by Code Connect --
|
|
6
|
-
* `props` includes a mapping from your code props to Figma properties.
|
|
7
|
-
* You should check this is correct, and update the `example` function
|
|
8
|
-
* to return the code example you'd like to see in Figma
|
|
9
|
-
*/
|
|
10
|
-
figma.connect(Switch, 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=802%3A186', {
|
|
11
|
-
imports: ["import { Switch } from '@ledgerhq/lumen-ui-rnative'"],
|
|
12
|
-
links: [
|
|
13
|
-
{
|
|
14
|
-
name: '*',
|
|
15
|
-
url: 'https://ldls.vercel.app/?path=/docs/react-native_selection-switch--docs',
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
props: {
|
|
19
|
-
checked: figma.boolean('selected', {
|
|
20
|
-
true: true,
|
|
21
|
-
false: false,
|
|
22
|
-
}),
|
|
23
|
-
disabled: figma.enum('state', {
|
|
24
|
-
disabled: true,
|
|
25
|
-
}),
|
|
26
|
-
size: figma.enum('size', {
|
|
27
|
-
sm: 'sm',
|
|
28
|
-
md: 'md',
|
|
29
|
-
}),
|
|
30
|
-
},
|
|
31
|
-
example: (props) => (_jsx(Switch, { checked: props.checked, disabled: props.disabled, size: props.size })),
|
|
32
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.figma.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Tile/Tile.figma.tsx"],"names":[],"mappings":""}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import figma from '@figma/code-connect';
|
|
3
|
-
import { Settings } from '../../Symbols';
|
|
4
|
-
import { Tile, TileSpot, TileContent, TileTitle, TileDescription, } from './Tile';
|
|
5
|
-
figma.connect(Tile, 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=5783-1328', {
|
|
6
|
-
imports: [
|
|
7
|
-
"import { Tile, TileSpot, TileContent, TileTitle, TileDescription } from '@ledgerhq/lumen-ui-rnative'",
|
|
8
|
-
],
|
|
9
|
-
props: {
|
|
10
|
-
title: figma.string('title'),
|
|
11
|
-
description: figma.boolean('show-description', {
|
|
12
|
-
true: figma.string('description'),
|
|
13
|
-
false: undefined,
|
|
14
|
-
}),
|
|
15
|
-
showTag: figma.boolean('show-tag'),
|
|
16
|
-
tag: figma.instance('tag'),
|
|
17
|
-
disabled: figma.enum('state', {
|
|
18
|
-
disabled: true,
|
|
19
|
-
}),
|
|
20
|
-
},
|
|
21
|
-
links: [
|
|
22
|
-
{
|
|
23
|
-
name: '*',
|
|
24
|
-
url: 'https://ldls.vercel.app/?path=/docs/components-Tile-overview--docs',
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
example: (props) => (_jsxs(Tile, { disabled: props.disabled, onPress: () => console.log('Tile pressed'), onLongPress: () => console.log('Long press - secondary action'), children: [_jsx(TileSpot, { appearance: 'icon', icon: Settings }), _jsxs(TileContent, { children: [_jsx(TileTitle, { children: props.title }), props.description && (_jsx(TileDescription, { children: props.description }))] }), props.showTag && props.tag] })),
|
|
28
|
-
});
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import figma from '@figma/code-connect';
|
|
2
|
-
import { Button } from '../Button';
|
|
3
|
-
import { Banner } from './Banner';
|
|
4
|
-
import { BannerProps } from './types';
|
|
5
|
-
|
|
6
|
-
figma.connect(
|
|
7
|
-
Banner,
|
|
8
|
-
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=129%3A201',
|
|
9
|
-
{
|
|
10
|
-
imports: ["import { Banner } from '@ledgerhq/lumen-ui-react'"],
|
|
11
|
-
props: {
|
|
12
|
-
// These props were automatically mapped based on your linked code:
|
|
13
|
-
appearance: figma.enum('appearance', {
|
|
14
|
-
info: 'info',
|
|
15
|
-
success: 'success',
|
|
16
|
-
warning: 'warning',
|
|
17
|
-
error: 'error',
|
|
18
|
-
}),
|
|
19
|
-
title: figma.string('title'),
|
|
20
|
-
description: figma.boolean('show-description', {
|
|
21
|
-
true: figma.string('description'),
|
|
22
|
-
false: undefined,
|
|
23
|
-
}),
|
|
24
|
-
primaryAction: figma.boolean('show-actions', {
|
|
25
|
-
true: <Button>Primary Action</Button>,
|
|
26
|
-
false: undefined,
|
|
27
|
-
}),
|
|
28
|
-
secondaryAction: figma.boolean('show-actions', {
|
|
29
|
-
true: figma.boolean('show-secondary-action', {
|
|
30
|
-
true: <Button>Secondary Action</Button>,
|
|
31
|
-
false: undefined,
|
|
32
|
-
}),
|
|
33
|
-
false: undefined,
|
|
34
|
-
}),
|
|
35
|
-
onClose: figma.boolean('show-close', {
|
|
36
|
-
true: () => {
|
|
37
|
-
console.log('Close clicked');
|
|
38
|
-
},
|
|
39
|
-
false: undefined,
|
|
40
|
-
}),
|
|
41
|
-
},
|
|
42
|
-
links: [
|
|
43
|
-
{
|
|
44
|
-
name: '*',
|
|
45
|
-
url: 'https://ldls.vercel.app/?path=/docs/communication-banner-overview--docs',
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
example: (props: BannerProps) => (
|
|
49
|
-
<Banner
|
|
50
|
-
appearance={props.appearance}
|
|
51
|
-
title={props.title}
|
|
52
|
-
description={props.description}
|
|
53
|
-
primaryAction={props.primaryAction}
|
|
54
|
-
secondaryAction={props.secondaryAction}
|
|
55
|
-
onClose={props.onClose}
|
|
56
|
-
/>
|
|
57
|
-
),
|
|
58
|
-
},
|
|
59
|
-
);
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import figma from '@figma/code-connect';
|
|
2
|
-
import { Checkbox } from './Checkbox';
|
|
3
|
-
import { CheckboxProps } from './types';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* -- This file was auto-generated by Code Connect --
|
|
7
|
-
* None of your props could be automatically mapped to Figma properties.
|
|
8
|
-
* You should update the `props` object to include a mapping from your
|
|
9
|
-
* code props to Figma properties, and update the `example` function to
|
|
10
|
-
* return the code example you'd like to see in Figma
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
figma.connect(
|
|
14
|
-
Checkbox,
|
|
15
|
-
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=6688%3A3600',
|
|
16
|
-
{
|
|
17
|
-
imports: ["import { Checkbox } from '@ledgerhq/lumen-ui-rnative'"],
|
|
18
|
-
props: {
|
|
19
|
-
checkbox: figma.nestedProps('.checkbox', {
|
|
20
|
-
checked: figma.boolean('checked'),
|
|
21
|
-
disabled: figma.enum('state', {
|
|
22
|
-
disabled: true,
|
|
23
|
-
}),
|
|
24
|
-
}),
|
|
25
|
-
label: figma.boolean('show-label', {
|
|
26
|
-
true: figma.string('label'),
|
|
27
|
-
false: undefined,
|
|
28
|
-
}),
|
|
29
|
-
},
|
|
30
|
-
links: [
|
|
31
|
-
{
|
|
32
|
-
name: '*',
|
|
33
|
-
url: 'https://ldls.vercel.app/?path=/docs/react-native_selection-checkbox--docs',
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
example: (
|
|
37
|
-
props: CheckboxProps & {
|
|
38
|
-
checkbox: { checked: boolean; disabled: boolean };
|
|
39
|
-
label?: string;
|
|
40
|
-
},
|
|
41
|
-
) => (
|
|
42
|
-
<Checkbox
|
|
43
|
-
checked={props.checkbox.checked}
|
|
44
|
-
disabled={props.checkbox.disabled}
|
|
45
|
-
label={props.label}
|
|
46
|
-
/>
|
|
47
|
-
),
|
|
48
|
-
},
|
|
49
|
-
);
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import figma from '@figma/code-connect';
|
|
2
|
-
import { InteractiveIcon } from './InteractiveIcon';
|
|
3
|
-
|
|
4
|
-
figma.connect(
|
|
5
|
-
InteractiveIcon,
|
|
6
|
-
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=6975%3A2571',
|
|
7
|
-
{
|
|
8
|
-
imports: [
|
|
9
|
-
"import { InteractiveIcon } from '@ledgerhq/lumen-ui-rnative'",
|
|
10
|
-
"// import { YourIconName } from '@ledgerhq/lumen-ui-rnative/symbols'",
|
|
11
|
-
],
|
|
12
|
-
props: {
|
|
13
|
-
iconType: figma.enum('appearance', {
|
|
14
|
-
filled: 'filled',
|
|
15
|
-
stroked: 'stroked',
|
|
16
|
-
}),
|
|
17
|
-
disabled: figma.enum('state', {
|
|
18
|
-
disabled: true,
|
|
19
|
-
}),
|
|
20
|
-
children: figma.instance('icon-filled'),
|
|
21
|
-
},
|
|
22
|
-
links: [
|
|
23
|
-
{
|
|
24
|
-
name: '*',
|
|
25
|
-
url: 'https://ldls.vercel.app/?path=/docs/components-interactiveicon-overview--docs',
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
example: (props: {
|
|
29
|
-
iconType: 'filled' | 'stroked';
|
|
30
|
-
disabled: boolean;
|
|
31
|
-
children: React.ReactNode;
|
|
32
|
-
}) => (
|
|
33
|
-
<InteractiveIcon
|
|
34
|
-
iconType={props.iconType}
|
|
35
|
-
disabled={props.disabled}
|
|
36
|
-
accessibilityLabel='Interactive icon'
|
|
37
|
-
>
|
|
38
|
-
{props.children}
|
|
39
|
-
</InteractiveIcon>
|
|
40
|
-
),
|
|
41
|
-
},
|
|
42
|
-
);
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import figma from '@figma/code-connect';
|
|
2
|
-
import { Switch } from './Switch';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* -- This file was auto-generated by Code Connect --
|
|
6
|
-
* `props` includes a mapping from your code props to Figma properties.
|
|
7
|
-
* You should check this is correct, and update the `example` function
|
|
8
|
-
* to return the code example you'd like to see in Figma
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
figma.connect(
|
|
12
|
-
Switch,
|
|
13
|
-
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=802%3A186',
|
|
14
|
-
{
|
|
15
|
-
imports: ["import { Switch } from '@ledgerhq/lumen-ui-rnative'"],
|
|
16
|
-
links: [
|
|
17
|
-
{
|
|
18
|
-
name: '*',
|
|
19
|
-
url: 'https://ldls.vercel.app/?path=/docs/react-native_selection-switch--docs',
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
props: {
|
|
23
|
-
checked: figma.boolean('selected', {
|
|
24
|
-
true: true,
|
|
25
|
-
false: false,
|
|
26
|
-
}),
|
|
27
|
-
disabled: figma.enum('state', {
|
|
28
|
-
disabled: true,
|
|
29
|
-
}),
|
|
30
|
-
size: figma.enum('size', {
|
|
31
|
-
sm: 'sm',
|
|
32
|
-
md: 'md',
|
|
33
|
-
}),
|
|
34
|
-
},
|
|
35
|
-
example: (props: {
|
|
36
|
-
checked: boolean;
|
|
37
|
-
disabled: boolean;
|
|
38
|
-
size: 'sm' | 'md';
|
|
39
|
-
}) => (
|
|
40
|
-
<Switch
|
|
41
|
-
checked={props.checked}
|
|
42
|
-
disabled={props.disabled}
|
|
43
|
-
size={props.size}
|
|
44
|
-
/>
|
|
45
|
-
),
|
|
46
|
-
},
|
|
47
|
-
);
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import figma from '@figma/code-connect';
|
|
2
|
-
import { Settings } from '../../Symbols';
|
|
3
|
-
import {
|
|
4
|
-
Tile,
|
|
5
|
-
TileSpot,
|
|
6
|
-
TileContent,
|
|
7
|
-
TileTitle,
|
|
8
|
-
TileDescription,
|
|
9
|
-
} from './Tile';
|
|
10
|
-
|
|
11
|
-
figma.connect(
|
|
12
|
-
Tile,
|
|
13
|
-
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=5783-1328',
|
|
14
|
-
{
|
|
15
|
-
imports: [
|
|
16
|
-
"import { Tile, TileSpot, TileContent, TileTitle, TileDescription } from '@ledgerhq/lumen-ui-rnative'",
|
|
17
|
-
],
|
|
18
|
-
props: {
|
|
19
|
-
title: figma.string('title'),
|
|
20
|
-
description: figma.boolean('show-description', {
|
|
21
|
-
true: figma.string('description'),
|
|
22
|
-
false: undefined,
|
|
23
|
-
}),
|
|
24
|
-
showTag: figma.boolean('show-tag'),
|
|
25
|
-
tag: figma.instance('tag'),
|
|
26
|
-
disabled: figma.enum('state', {
|
|
27
|
-
disabled: true,
|
|
28
|
-
}),
|
|
29
|
-
},
|
|
30
|
-
links: [
|
|
31
|
-
{
|
|
32
|
-
name: '*',
|
|
33
|
-
url: 'https://ldls.vercel.app/?path=/docs/components-Tile-overview--docs',
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
example: (props) => (
|
|
37
|
-
<Tile
|
|
38
|
-
disabled={props.disabled}
|
|
39
|
-
onPress={() => console.log('Tile pressed')}
|
|
40
|
-
onLongPress={() => console.log('Long press - secondary action')}
|
|
41
|
-
>
|
|
42
|
-
<TileSpot appearance='icon' icon={Settings} />
|
|
43
|
-
<TileContent>
|
|
44
|
-
<TileTitle>{props.title}</TileTitle>
|
|
45
|
-
{props.description && (
|
|
46
|
-
<TileDescription>{props.description}</TileDescription>
|
|
47
|
-
)}
|
|
48
|
-
</TileContent>
|
|
49
|
-
{props.showTag && props.tag}
|
|
50
|
-
</Tile>
|
|
51
|
-
),
|
|
52
|
-
},
|
|
53
|
-
);
|