@ledgerhq/lumen-ui-rnative 0.1.48 → 0.1.49
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/i18n/locales/de.json +1 -3
- package/dist/module/i18n/locales/en.json +1 -3
- package/dist/module/i18n/locales/es.json +1 -3
- package/dist/module/i18n/locales/fr.json +1 -3
- package/dist/module/i18n/locales/ja.json +1 -3
- package/dist/module/i18n/locales/ko.json +1 -3
- package/dist/module/i18n/locales/pt.json +1 -3
- package/dist/module/i18n/locales/ru.json +1 -3
- package/dist/module/i18n/locales/th.json +1 -3
- package/dist/module/i18n/locales/tr.json +1 -3
- package/dist/module/i18n/locales/zh.json +1 -3
- package/dist/module/lib/Animations/Pulse/Pulse.js +3 -3
- package/dist/module/lib/Animations/Pulse/Pulse.js.map +1 -1
- package/dist/module/lib/Animations/Pulse/Pulse.mdx +0 -1
- package/dist/module/lib/Animations/Spin/Spin.js +3 -3
- package/dist/module/lib/Animations/Spin/Spin.js.map +1 -1
- package/dist/module/lib/Animations/Spin/Spin.mdx +0 -1
- package/dist/module/lib/Components/AddressInput/AddressInput.figma.js +36 -0
- package/dist/module/lib/Components/AddressInput/AddressInput.figma.js.map +1 -0
- package/dist/module/lib/Components/AddressInput/AddressInput.mdx +0 -183
- package/dist/module/lib/Components/AmountDisplay/AmountDisplay.figma.js +31 -0
- package/dist/module/lib/Components/AmountDisplay/AmountDisplay.figma.js.map +1 -0
- package/dist/module/lib/Components/AmountDisplay/AmountDisplay.mdx +0 -90
- package/dist/module/lib/Components/AmountInput/AmountInput.figma.js +70 -0
- package/dist/module/lib/Components/AmountInput/AmountInput.figma.js.map +1 -0
- package/dist/module/lib/Components/AmountInput/AmountInput.mdx +0 -190
- package/dist/module/lib/Components/Avatar/Avatar.figma.js +15 -12
- package/dist/module/lib/Components/Avatar/Avatar.figma.js.map +1 -1
- package/dist/module/lib/Components/Avatar/Avatar.js +4 -27
- package/dist/module/lib/Components/Avatar/Avatar.js.map +1 -1
- package/dist/module/lib/Components/Avatar/Avatar.mdx +53 -69
- package/dist/module/lib/Components/Avatar/Avatar.stories.js +27 -33
- package/dist/module/lib/Components/Avatar/Avatar.stories.js.map +1 -1
- package/dist/module/lib/Components/Avatar/Avatar.test.js +21 -39
- package/dist/module/lib/Components/Avatar/Avatar.test.js.map +1 -1
- package/dist/module/lib/Components/Banner/Banner.figma.js +107 -0
- package/dist/module/lib/Components/Banner/Banner.figma.js.map +1 -0
- package/dist/module/lib/Components/Banner/Banner.mdx +0 -86
- package/dist/module/lib/Components/BottomSheet/BottomSheet.figma.js +49 -0
- package/dist/module/lib/Components/BottomSheet/BottomSheet.figma.js.map +1 -0
- package/dist/module/lib/Components/BottomSheet/BottomSheet.mdx +0 -119
- package/dist/module/lib/Components/Button/Button.figma.js +45 -0
- package/dist/module/lib/Components/Button/Button.figma.js.map +1 -0
- package/dist/module/lib/Components/Button/Button.mdx +25 -224
- package/dist/module/lib/Components/Button/Button.stories.js +4 -36
- package/dist/module/lib/Components/Button/Button.stories.js.map +1 -1
- package/dist/module/lib/Components/Card/Card.figma.js +143 -0
- package/dist/module/lib/Components/Card/Card.figma.js.map +1 -0
- package/dist/module/lib/Components/Card/Card.mdx +0 -160
- package/dist/module/lib/Components/CardButton/CardButton.figma.js +38 -0
- package/dist/module/lib/Components/CardButton/CardButton.figma.js.map +1 -0
- package/dist/module/lib/Components/CardButton/CardButton.mdx +0 -48
- package/dist/module/lib/Components/Checkbox/Checkbox.figma.js +48 -0
- package/dist/module/lib/Components/Checkbox/Checkbox.figma.js.map +1 -0
- package/dist/module/lib/Components/Checkbox/Checkbox.mdx +0 -73
- package/dist/module/lib/Components/ContentBanner/ContentBanner.figma.js +91 -0
- package/dist/module/lib/Components/ContentBanner/ContentBanner.figma.js.map +1 -0
- package/dist/module/lib/Components/ContentBanner/ContentBanner.mdx +0 -2
- package/dist/module/lib/Components/CryptoIcon/CryptoIcon.figma.js +17 -0
- package/dist/module/lib/Components/CryptoIcon/CryptoIcon.figma.js.map +1 -0
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.figma.js +29 -0
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.figma.js.map +1 -0
- package/dist/module/lib/Components/Divider/Divider.figma.js +10 -0
- package/dist/module/lib/Components/Divider/Divider.figma.js.map +1 -0
- package/dist/module/lib/Components/Divider/Divider.mdx +0 -2
- package/dist/module/lib/Components/DotCount/DotCount.figma.js +29 -0
- package/dist/module/lib/Components/DotCount/DotCount.figma.js.map +1 -0
- package/dist/module/lib/Components/DotIndicator/DotIndicator.figma.js +29 -0
- package/dist/module/lib/Components/DotIndicator/DotIndicator.figma.js.map +1 -0
- package/dist/module/lib/Components/DotIndicator/DotIndicator.stories.js +6 -3
- package/dist/module/lib/Components/DotIndicator/DotIndicator.stories.js.map +1 -1
- package/dist/module/lib/Components/DotIndicator/getDotIndicatorProps.js +17 -0
- package/dist/module/lib/Components/DotIndicator/getDotIndicatorProps.js.map +1 -0
- package/dist/module/lib/Components/DotIndicator/getDotIndicatorProps.test.js +17 -0
- package/dist/module/lib/Components/DotIndicator/getDotIndicatorProps.test.js.map +1 -0
- package/dist/module/lib/Components/DotIndicator/index.js +1 -0
- package/dist/module/lib/Components/DotIndicator/index.js.map +1 -1
- package/dist/module/lib/Components/Icon/Icon.figma.js +1840 -0
- package/dist/module/lib/Components/Icon/Icon.figma.js.map +1 -0
- package/dist/module/lib/Components/Icon/Icon.mdx +0 -62
- package/dist/module/lib/Components/IconButton/IconButton.figma.js +42 -0
- package/dist/module/lib/Components/IconButton/IconButton.figma.js.map +1 -0
- package/dist/module/lib/Components/IconButton/IconButton.mdx +0 -68
- package/dist/module/lib/Components/InteractiveIcon/InteractiveIcon.figma.js +51 -0
- package/dist/module/lib/Components/InteractiveIcon/InteractiveIcon.figma.js.map +1 -0
- package/dist/module/lib/Components/InteractiveIcon/InteractiveIcon.mdx +0 -107
- package/dist/module/lib/Components/Link/Link.figma.js +41 -0
- package/dist/module/lib/Components/Link/Link.figma.js.map +1 -0
- package/dist/module/lib/Components/Link/Link.mdx +0 -102
- package/dist/module/lib/Components/ListItem/ListItem.figma.js +416 -0
- package/dist/module/lib/Components/ListItem/ListItem.figma.js.map +1 -0
- package/dist/module/lib/Components/ListItem/ListItem.mdx +0 -129
- package/dist/module/lib/Components/MediaBanner/MediaBanner.figma.js +25 -0
- package/dist/module/lib/Components/MediaBanner/MediaBanner.figma.js.map +1 -0
- package/dist/module/lib/Components/MediaBanner/MediaBanner.mdx +0 -3
- package/dist/module/lib/Components/MediaButton/MediaButton.figma.js +72 -0
- package/dist/module/lib/Components/MediaButton/MediaButton.figma.js.map +1 -0
- package/dist/module/lib/Components/MediaCard/MediaCard.figma.js +28 -0
- package/dist/module/lib/Components/MediaCard/MediaCard.figma.js.map +1 -0
- package/dist/module/lib/Components/MediaCard/MediaCard.mdx +0 -2
- package/dist/module/lib/Components/MediaImage/MediaImage.mdx +0 -1
- package/dist/module/lib/Components/MediaTag/MediaTag.figma.js +100 -0
- package/dist/module/lib/Components/MediaTag/MediaTag.figma.js.map +1 -0
- package/dist/module/lib/Components/MediaTag/MediaTag.mdx +0 -2
- package/dist/module/lib/Components/NavBar/NavBar.figma.js +79 -0
- package/dist/module/lib/Components/NavBar/NavBar.figma.js.map +1 -0
- package/dist/module/lib/Components/NavBar/NavBar.mdx +0 -2
- package/dist/module/lib/Components/OptionList/OptionList.mdx +0 -90
- package/dist/module/lib/Components/PageIndicator/PageIndicator.figma.js +13 -0
- package/dist/module/lib/Components/PageIndicator/PageIndicator.figma.js.map +1 -0
- package/dist/module/lib/Components/PageIndicator/PageIndicator.mdx +0 -2
- package/dist/module/lib/Components/SearchInput/SearchInput.figma.js +31 -0
- package/dist/module/lib/Components/SearchInput/SearchInput.figma.js.map +1 -0
- package/dist/module/lib/Components/SearchInput/SearchInput.mdx +0 -199
- package/dist/module/lib/Components/SegmentedControl/SegmentedControl.figma.js +35 -0
- package/dist/module/lib/Components/SegmentedControl/SegmentedControl.figma.js.map +1 -0
- package/dist/module/lib/Components/SegmentedControl/SegmentedControl.mdx +0 -1
- package/dist/module/lib/Components/Skeleton/Skeleton.figma.js +18 -0
- package/dist/module/lib/Components/Skeleton/Skeleton.figma.js.map +1 -0
- package/dist/module/lib/Components/Skeleton/Skeleton.mdx +0 -71
- package/dist/module/lib/Components/Spinner/Spinner.figma.js +13 -0
- package/dist/module/lib/Components/Spinner/Spinner.figma.js.map +1 -0
- package/dist/module/lib/Components/Spinner/Spinner.mdx +0 -100
- package/dist/module/lib/Components/Spot/Spot.figma.js +37 -0
- package/dist/module/lib/Components/Spot/Spot.figma.js.map +1 -0
- package/dist/module/lib/Components/Spot/Spot.mdx +0 -94
- package/dist/module/lib/Components/Stepper/Stepper.figma.js +13 -0
- package/dist/module/lib/Components/Stepper/Stepper.figma.js.map +1 -0
- package/dist/module/lib/Components/Stepper/Stepper.mdx +0 -67
- package/dist/module/lib/Components/Subheader/Subheader.figma.js +67 -0
- package/dist/module/lib/Components/Subheader/Subheader.figma.js.map +1 -0
- package/dist/module/lib/Components/Subheader/Subheader.mdx +0 -116
- package/dist/module/lib/Components/Switch/Switch.figma.js +58 -0
- package/dist/module/lib/Components/Switch/Switch.figma.js.map +1 -0
- package/dist/module/lib/Components/Switch/Switch.mdx +0 -39
- package/dist/module/lib/Components/TabBar/TabBar.figma.js +98 -0
- package/dist/module/lib/Components/TabBar/TabBar.figma.js.map +1 -0
- package/dist/module/lib/Components/TabBar/TabBar.mdx +0 -5
- package/dist/module/lib/Components/Tag/Tag.figma.js +41 -0
- package/dist/module/lib/Components/Tag/Tag.figma.js.map +1 -0
- package/dist/module/lib/Components/Tag/Tag.mdx +0 -2
- package/dist/module/lib/Components/TextInput/TextInput.figma.js +37 -0
- package/dist/module/lib/Components/TextInput/TextInput.figma.js.map +1 -0
- package/dist/module/lib/Components/TextInput/TextInput.mdx +0 -178
- package/dist/module/lib/Components/Tile/Tile.figma.js +111 -0
- package/dist/module/lib/Components/Tile/Tile.figma.js.map +1 -0
- package/dist/module/lib/Components/Tile/Tile.mdx +0 -53
- package/dist/module/lib/Components/TileButton/TileButton.figma.js +23 -0
- package/dist/module/lib/Components/TileButton/TileButton.figma.js.map +1 -0
- package/dist/module/lib/Components/TileButton/TileButton.mdx +0 -40
- package/dist/module/lib/Components/Tooltip/Tooltip.figma.js +26 -0
- package/dist/module/lib/Components/Tooltip/Tooltip.figma.js.map +1 -0
- package/dist/module/lib/Components/Tooltip/Tooltip.mdx +0 -183
- package/dist/module/lib/Components/Trend/Trend.figma.js +29 -0
- package/dist/module/lib/Components/Trend/Trend.figma.js.map +1 -0
- package/dist/module/lib/Components/Trend/Trend.mdx +0 -2
- package/dist/module/lib/Components/Utility/Text/Text.mdx +0 -1
- package/dist/module/lib/Symbols/Icons/ChevronAscending.js +1 -1
- package/dist/module/lib/Symbols/Icons/ChevronDescending.js +1 -1
- package/dist/module/lib/Symbols/Icons/Contact.js +50 -0
- package/dist/module/lib/Symbols/Icons/Contact.js.map +1 -0
- package/dist/module/lib/Symbols/index.js +1 -0
- package/dist/module/lib/Symbols/index.js.map +1 -1
- package/dist/typescript/src/lib/Animations/Pulse/Pulse.d.ts.map +1 -1
- package/dist/typescript/src/lib/Animations/Spin/Spin.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Avatar/Avatar.d.ts +1 -4
- package/dist/typescript/src/lib/Components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Avatar/types.d.ts +0 -6
- package/dist/typescript/src/lib/Components/Avatar/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/DotIndicator/getDotIndicatorProps.d.ts +24 -0
- package/dist/typescript/src/lib/Components/DotIndicator/getDotIndicatorProps.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/DotIndicator/index.d.ts +1 -0
- package/dist/typescript/src/lib/Components/DotIndicator/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/Symbols/Icons/Contact.d.ts +35 -0
- package/dist/typescript/src/lib/Symbols/Icons/Contact.d.ts.map +1 -0
- package/dist/typescript/src/lib/Symbols/index.d.ts +1 -0
- package/dist/typescript/src/lib/Symbols/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/i18n/locales/de.json +1 -3
- package/src/i18n/locales/en.json +1 -3
- package/src/i18n/locales/es.json +1 -3
- package/src/i18n/locales/fr.json +1 -3
- package/src/i18n/locales/ja.json +1 -3
- package/src/i18n/locales/ko.json +1 -3
- package/src/i18n/locales/pt.json +1 -3
- package/src/i18n/locales/ru.json +1 -3
- package/src/i18n/locales/th.json +1 -3
- package/src/i18n/locales/tr.json +1 -3
- package/src/i18n/locales/zh.json +1 -3
- package/src/lib/Animations/Pulse/Pulse.mdx +0 -1
- package/src/lib/Animations/Pulse/Pulse.tsx +8 -1
- package/src/lib/Animations/Spin/Spin.mdx +0 -1
- package/src/lib/Animations/Spin/Spin.tsx +8 -1
- package/src/lib/Components/AddressInput/AddressInput.figma.tsx +39 -0
- package/src/lib/Components/AddressInput/AddressInput.mdx +0 -183
- package/src/lib/Components/AmountDisplay/AmountDisplay.figma.tsx +37 -0
- package/src/lib/Components/AmountDisplay/AmountDisplay.mdx +0 -90
- package/src/lib/Components/AmountInput/AmountInput.figma.tsx +78 -0
- package/src/lib/Components/AmountInput/AmountInput.mdx +0 -190
- package/src/lib/Components/Avatar/Avatar.figma.tsx +24 -14
- package/src/lib/Components/Avatar/Avatar.mdx +53 -69
- package/src/lib/Components/Avatar/Avatar.stories.tsx +16 -50
- package/src/lib/Components/Avatar/Avatar.test.tsx +12 -32
- package/src/lib/Components/Avatar/Avatar.tsx +4 -34
- package/src/lib/Components/Avatar/types.ts +0 -6
- package/src/lib/Components/Banner/Banner.figma.tsx +115 -0
- package/src/lib/Components/Banner/Banner.mdx +0 -86
- package/src/lib/Components/BottomSheet/BottomSheet.figma.tsx +52 -0
- package/src/lib/Components/BottomSheet/BottomSheet.mdx +0 -119
- package/src/lib/Components/Button/Button.figma.tsx +57 -0
- package/src/lib/Components/Button/Button.mdx +25 -224
- package/src/lib/Components/Button/Button.stories.tsx +3 -35
- package/src/lib/Components/Card/Card.figma.tsx +149 -0
- package/src/lib/Components/Card/Card.mdx +0 -160
- package/src/lib/Components/CardButton/CardButton.figma.tsx +49 -0
- package/src/lib/Components/CardButton/CardButton.mdx +0 -48
- package/src/lib/Components/Checkbox/Checkbox.figma.tsx +54 -0
- package/src/lib/Components/Checkbox/Checkbox.mdx +0 -73
- package/src/lib/Components/ContentBanner/ContentBanner.figma.tsx +108 -0
- package/src/lib/Components/ContentBanner/ContentBanner.mdx +0 -2
- package/src/lib/Components/CryptoIcon/CryptoIcon.figma.tsx +20 -0
- package/src/lib/Components/DescriptionItem/DescriptionItem.figma.tsx +36 -0
- package/src/lib/Components/Divider/Divider.figma.tsx +11 -0
- package/src/lib/Components/Divider/Divider.mdx +0 -2
- package/src/lib/Components/DotCount/DotCount.figma.tsx +32 -0
- package/src/lib/Components/DotIndicator/DotIndicator.figma.tsx +32 -0
- package/src/lib/Components/DotIndicator/DotIndicator.stories.tsx +4 -1
- package/src/lib/Components/DotIndicator/getDotIndicatorProps.test.ts +15 -0
- package/src/lib/Components/DotIndicator/getDotIndicatorProps.ts +10 -0
- package/src/lib/Components/DotIndicator/index.ts +1 -0
- package/src/lib/Components/Icon/Icon.figma.tsx +3085 -0
- package/src/lib/Components/Icon/Icon.mdx +0 -62
- package/src/lib/Components/IconButton/IconButton.figma.tsx +53 -0
- package/src/lib/Components/IconButton/IconButton.mdx +0 -68
- package/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.tsx +52 -0
- package/src/lib/Components/InteractiveIcon/InteractiveIcon.mdx +0 -107
- package/src/lib/Components/Link/Link.figma.tsx +53 -0
- package/src/lib/Components/Link/Link.mdx +0 -102
- package/src/lib/Components/ListItem/ListItem.figma.tsx +431 -0
- package/src/lib/Components/ListItem/ListItem.mdx +0 -129
- package/src/lib/Components/MediaBanner/MediaBanner.figma.tsx +32 -0
- package/src/lib/Components/MediaBanner/MediaBanner.mdx +0 -3
- package/src/lib/Components/MediaButton/MediaButton.figma.tsx +60 -0
- package/src/lib/Components/MediaCard/MediaCard.figma.tsx +27 -0
- package/src/lib/Components/MediaCard/MediaCard.mdx +0 -2
- package/src/lib/Components/MediaImage/MediaImage.mdx +0 -1
- package/src/lib/Components/MediaTag/MediaTag.figma.tsx +116 -0
- package/src/lib/Components/MediaTag/MediaTag.mdx +0 -2
- package/src/lib/Components/NavBar/NavBar.figma.tsx +84 -0
- package/src/lib/Components/NavBar/NavBar.mdx +0 -2
- package/src/lib/Components/OptionList/OptionList.mdx +0 -90
- package/src/lib/Components/PageIndicator/PageIndicator.figma.tsx +11 -0
- package/src/lib/Components/PageIndicator/PageIndicator.mdx +0 -2
- package/src/lib/Components/SearchInput/SearchInput.figma.tsx +34 -0
- package/src/lib/Components/SearchInput/SearchInput.mdx +0 -199
- package/src/lib/Components/SegmentedControl/SegmentedControl.figma.tsx +34 -0
- package/src/lib/Components/SegmentedControl/SegmentedControl.mdx +0 -1
- package/src/lib/Components/Skeleton/Skeleton.figma.tsx +17 -0
- package/src/lib/Components/Skeleton/Skeleton.mdx +0 -71
- package/src/lib/Components/Spinner/Spinner.figma.tsx +12 -0
- package/src/lib/Components/Spinner/Spinner.mdx +0 -100
- package/src/lib/Components/Spot/Spot.figma.tsx +50 -0
- package/src/lib/Components/Spot/Spot.mdx +0 -94
- package/src/lib/Components/Stepper/Stepper.figma.tsx +11 -0
- package/src/lib/Components/Stepper/Stepper.mdx +0 -67
- package/src/lib/Components/Subheader/Subheader.figma.tsx +72 -0
- package/src/lib/Components/Subheader/Subheader.mdx +0 -116
- package/src/lib/Components/Switch/Switch.figma.tsx +66 -0
- package/src/lib/Components/Switch/Switch.mdx +0 -39
- package/src/lib/Components/TabBar/TabBar.figma.tsx +70 -0
- package/src/lib/Components/TabBar/TabBar.mdx +0 -5
- package/src/lib/Components/Tag/Tag.figma.tsx +52 -0
- package/src/lib/Components/Tag/Tag.mdx +0 -2
- package/src/lib/Components/TextInput/TextInput.figma.tsx +40 -0
- package/src/lib/Components/TextInput/TextInput.mdx +0 -178
- package/src/lib/Components/Tile/Tile.figma.tsx +113 -0
- package/src/lib/Components/Tile/Tile.mdx +0 -53
- package/src/lib/Components/TileButton/TileButton.figma.tsx +35 -0
- package/src/lib/Components/TileButton/TileButton.mdx +0 -40
- package/src/lib/Components/Tooltip/Tooltip.figma.tsx +30 -0
- package/src/lib/Components/Tooltip/Tooltip.mdx +0 -183
- package/src/lib/Components/Trend/Trend.figma.tsx +28 -0
- package/src/lib/Components/Trend/Trend.mdx +0 -2
- package/src/lib/Components/Utility/Text/Text.mdx +0 -1
- package/src/lib/Symbols/Icons/ChevronAscending.tsx +1 -1
- package/src/lib/Symbols/Icons/ChevronDescending.tsx +1 -1
- package/src/lib/Symbols/Icons/Contact.tsx +45 -0
- package/src/lib/Symbols/index.ts +1 -0
- package/dist/typescript/src/lib/Components/Avatar/Avatar.figma.d.ts +0 -2
- package/dist/typescript/src/lib/Components/Avatar/Avatar.figma.d.ts.map +0 -1
- package/dist/typescript/src/lib/Components/OptionList/OptionList.figma.d.ts +0 -2
- package/dist/typescript/src/lib/Components/OptionList/OptionList.figma.d.ts.map +0 -1
|
@@ -13,11 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
CustomTabs,
|
|
15
15
|
Tab,
|
|
16
|
-
DoVsDontRow,
|
|
17
|
-
DoBlockItem,
|
|
18
|
-
DontBlockItem,
|
|
19
16
|
} from '../../../../.storybook/components';
|
|
20
|
-
import CommonRulesDoAndDont from '../../../../.storybook/components/DoVsDont/CommonRulesDoAndDont.mdx';
|
|
21
17
|
|
|
22
18
|
<Meta title='Core/ListItem' of={ListItemStories} />
|
|
23
19
|
|
|
@@ -443,131 +439,6 @@ import { ChevronRight } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
|
443
439
|
</ListItem>
|
|
444
440
|
```
|
|
445
441
|
|
|
446
|
-
## Do's and Don'ts
|
|
447
|
-
|
|
448
|
-
The following guidelines ensure consistent usage of the ListItem component and maintain design system principles.
|
|
449
|
-
|
|
450
|
-
<Box lx={{ flexDirection: 'column', gap: 's24' }}>
|
|
451
|
-
<DoVsDontRow>
|
|
452
|
-
<DoBlockItem
|
|
453
|
-
title='Use the composite pattern correctly'
|
|
454
|
-
description='ListItemContent should be nested inside ListItemLeading to group visual and text content together'
|
|
455
|
-
>
|
|
456
|
-
|
|
457
|
-
{/* prettier-ignore */}
|
|
458
|
-
```tsx
|
|
459
|
-
<ListItem>
|
|
460
|
-
<ListItemLeading>
|
|
461
|
-
<Spot appearance='icon' icon={Settings} />
|
|
462
|
-
<ListItemContent>
|
|
463
|
-
<ListItemTitle>Settings</ListItemTitle>
|
|
464
|
-
<ListItemDescription>Manage preferences</ListItemDescription>
|
|
465
|
-
</ListItemContent>
|
|
466
|
-
</ListItemLeading>
|
|
467
|
-
<ListItemTrailing>
|
|
468
|
-
<ChevronRight size={24} />
|
|
469
|
-
</ListItemTrailing>
|
|
470
|
-
</ListItem>
|
|
471
|
-
```
|
|
472
|
-
|
|
473
|
-
</DoBlockItem>
|
|
474
|
-
<DontBlockItem
|
|
475
|
-
title="Don't place ListItemContent outside ListItemLeading"
|
|
476
|
-
description='ListItemContent must be inside ListItemLeading for proper layout'
|
|
477
|
-
>
|
|
478
|
-
|
|
479
|
-
{/* prettier-ignore */}
|
|
480
|
-
```tsx
|
|
481
|
-
// DON'T - ListItemContent outside ListItemLeading
|
|
482
|
-
<ListItem>
|
|
483
|
-
<ListItemLeading>
|
|
484
|
-
<Spot appearance='icon' icon={Settings} />
|
|
485
|
-
</ListItemLeading>
|
|
486
|
-
<ListItemContent>
|
|
487
|
-
<ListItemTitle>Settings</ListItemTitle>
|
|
488
|
-
</ListItemContent>
|
|
489
|
-
</ListItem>
|
|
490
|
-
```
|
|
491
|
-
|
|
492
|
-
</DontBlockItem>
|
|
493
|
-
|
|
494
|
-
</DoVsDontRow>
|
|
495
|
-
|
|
496
|
-
<DoVsDontRow>
|
|
497
|
-
<DoBlockItem
|
|
498
|
-
title='Use ListItemContentRow for inline Tags'
|
|
499
|
-
description='Wrap title or description with a Tag inside ListItemContentRow for proper layout'
|
|
500
|
-
>
|
|
501
|
-
|
|
502
|
-
{/* prettier-ignore */}
|
|
503
|
-
```tsx
|
|
504
|
-
<ListItemContent>
|
|
505
|
-
<ListItemContentRow>
|
|
506
|
-
<ListItemTitle>New Item</ListItemTitle>
|
|
507
|
-
<Tag label='New' appearance='base' size='sm' />
|
|
508
|
-
</ListItemContentRow>
|
|
509
|
-
<ListItemDescription>Recently added</ListItemDescription>
|
|
510
|
-
</ListItemContent>
|
|
511
|
-
```
|
|
512
|
-
|
|
513
|
-
</DoBlockItem>
|
|
514
|
-
<DontBlockItem
|
|
515
|
-
title="Don't place Tags outside ListItemContentRow"
|
|
516
|
-
description='Tags placed directly inside ListItemContent break the layout'
|
|
517
|
-
>
|
|
518
|
-
|
|
519
|
-
{/* prettier-ignore */}
|
|
520
|
-
```tsx
|
|
521
|
-
// DON'T - Tag outside ListItemContentRow
|
|
522
|
-
<ListItemContent>
|
|
523
|
-
<ListItemTitle>New Item</ListItemTitle>
|
|
524
|
-
<ListItemDescription>Recently added</ListItemDescription>
|
|
525
|
-
<Tag label='New' appearance='base' size='sm' />
|
|
526
|
-
</ListItemContent>
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
</DontBlockItem>
|
|
530
|
-
|
|
531
|
-
</DoVsDontRow>
|
|
532
|
-
|
|
533
|
-
<DoVsDontRow>
|
|
534
|
-
<DoBlockItem
|
|
535
|
-
title='Use concise text for title and description'
|
|
536
|
-
description='Keep title and description short since they truncate to one line'
|
|
537
|
-
>
|
|
538
|
-
|
|
539
|
-
{/* prettier-ignore */}
|
|
540
|
-
```tsx
|
|
541
|
-
<ListItemContent>
|
|
542
|
-
<ListItemTitle>Account Settings</ListItemTitle>
|
|
543
|
-
<ListItemDescription>Manage preferences</ListItemDescription>
|
|
544
|
-
</ListItemContent>
|
|
545
|
-
```
|
|
546
|
-
|
|
547
|
-
</DoBlockItem>
|
|
548
|
-
<DontBlockItem
|
|
549
|
-
title="Don't use long text"
|
|
550
|
-
description='Title and description truncate to one line'
|
|
551
|
-
>
|
|
552
|
-
|
|
553
|
-
{/* prettier-ignore */}
|
|
554
|
-
```tsx
|
|
555
|
-
<ListItemContent>
|
|
556
|
-
<ListItemTitle>
|
|
557
|
-
This is a very long title that will be truncated
|
|
558
|
-
</ListItemTitle>
|
|
559
|
-
<ListItemDescription>
|
|
560
|
-
This is also a very long description that will be truncated
|
|
561
|
-
</ListItemDescription>
|
|
562
|
-
</ListItemContent>
|
|
563
|
-
```
|
|
564
|
-
|
|
565
|
-
</DontBlockItem>
|
|
566
|
-
|
|
567
|
-
</DoVsDontRow>
|
|
568
|
-
|
|
569
|
-
<CommonRulesDoAndDont />
|
|
570
|
-
</Box>
|
|
571
442
|
|
|
572
443
|
</Tab>
|
|
573
444
|
</CustomTabs>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import figma from '@figma/code-connect';
|
|
4
|
+
import { MediaBanner, MediaBannerDescription, MediaBannerTitle } from "./MediaBanner.js";
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
figma.connect(MediaBanner, 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7/2.-Components-Library?node-id=18788-44622', {
|
|
7
|
+
imports: ["import { MediaBanner, MediaBannerTitle, MediaBannerDescription } from '@ledgerhq/lumen-ui-rnative'"],
|
|
8
|
+
props: {
|
|
9
|
+
onClose: figma.boolean('show-close', {
|
|
10
|
+
true: () => {},
|
|
11
|
+
false: undefined
|
|
12
|
+
})
|
|
13
|
+
},
|
|
14
|
+
example: props => /*#__PURE__*/_jsxs(MediaBanner, {
|
|
15
|
+
imageUrl: "/image.jpg",
|
|
16
|
+
onClose: props.onClose,
|
|
17
|
+
closeAccessibilityLabel: "Close banner",
|
|
18
|
+
children: [/*#__PURE__*/_jsx(MediaBannerTitle, {
|
|
19
|
+
children: "Title"
|
|
20
|
+
}), /*#__PURE__*/_jsx(MediaBannerDescription, {
|
|
21
|
+
children: "Description"
|
|
22
|
+
})]
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=MediaBanner.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","MediaBanner","MediaBannerDescription","MediaBannerTitle","jsx","_jsx","jsxs","_jsxs","connect","imports","props","onClose","boolean","true","false","undefined","example","imageUrl","closeAccessibilityLabel","children"],"sourceRoot":"../../../../../src","sources":["lib/Components/MediaBanner/MediaBanner.figma.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,qBAAqB;AACvC,SACEC,WAAW,EACXC,sBAAsB,EACtBC,gBAAgB,QACX,kBAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEvBP,KAAK,CAACQ,OAAO,CACXP,WAAW,EACX,+FAA+F,EAC/F;EACEQ,OAAO,EAAE,CACP,oGAAoG,CACrG;EACDC,KAAK,EAAE;IACLC,OAAO,EAAEX,KAAK,CAACY,OAAO,CAAC,YAAY,EAAE;MACnCC,IAAI,EAAEA,CAAA,KAAM,CAAC,CAAC;MACdC,KAAK,EAAEC;IACT,CAAC;EACH,CAAC;EACDC,OAAO,EAAGN,KAAK,iBACbH,KAAA,CAACN,WAAW;IACVgB,QAAQ,EAAC,YAAY;IACrBN,OAAO,EAAED,KAAK,CAACC,OAAQ;IACvBO,uBAAuB,EAAC,cAAc;IAAAC,QAAA,gBAEtCd,IAAA,CAACF,gBAAgB;MAAAgB,QAAA,EAAC;IAAK,CAAkB,CAAC,eAC1Cd,IAAA,CAACH,sBAAsB;MAAAiB,QAAA,EAAC;IAAW,CAAwB,CAAC;EAAA,CACjD;AAEjB,CACF,CAAC","ignoreList":[]}
|
|
@@ -7,8 +7,6 @@ import {
|
|
|
7
7
|
} from './MediaBanner';
|
|
8
8
|
import { Box } from '../Utility';
|
|
9
9
|
import { CustomTabs, Tab } from '../../../../.storybook/components';
|
|
10
|
-
import { DoVsDontRow, DoBlockItem, DontBlockItem } from '../../../../.storybook/components/DoVsDont';
|
|
11
|
-
import CommonRulesDoAndDont from '../../../../.storybook/components/DoVsDont/CommonRulesDoAndDont.mdx';
|
|
12
10
|
|
|
13
11
|
<Meta title='Core/MediaBanner' of={MediaBannerStories} />
|
|
14
12
|
|
|
@@ -144,7 +142,6 @@ Use the `lx` prop for layout adjustments like margins or positioning:
|
|
|
144
142
|
</MediaBanner>
|
|
145
143
|
```
|
|
146
144
|
|
|
147
|
-
<CommonRulesDoAndDont />
|
|
148
145
|
|
|
149
146
|
</Tab>
|
|
150
147
|
</CustomTabs>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import figma from '@figma/code-connect';
|
|
4
|
+
import CryptoIcon from '@ledgerhq/crypto-icons/native';
|
|
5
|
+
import { Placeholder } from "../../Symbols/index.js";
|
|
6
|
+
import { MediaButton } from "./MediaButton.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
figma.connect(MediaButton, 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=6389-45680', {
|
|
9
|
+
imports: ["import { MediaButton } from '@ledgerhq/lumen-ui-rnative'", "import { Placeholder } from '@ledgerhq/lumen-ui-rnative/symbols'", "import CryptoIcon from '@ledgerhq/crypto-icons/native'"],
|
|
10
|
+
props: {
|
|
11
|
+
appearance: figma.enum('appearance', {
|
|
12
|
+
plain: 'gray',
|
|
13
|
+
transparent: 'transparent',
|
|
14
|
+
'no-background': 'no-background'
|
|
15
|
+
}),
|
|
16
|
+
size: figma.enum('size', {
|
|
17
|
+
sm: 'sm',
|
|
18
|
+
md: 'md'
|
|
19
|
+
}),
|
|
20
|
+
leadingContent: figma.enum('leading-content', {
|
|
21
|
+
'interface-icon': figma.enum('size', {
|
|
22
|
+
sm: /*#__PURE__*/_jsx(Placeholder, {
|
|
23
|
+
size: 24
|
|
24
|
+
}),
|
|
25
|
+
md: /*#__PURE__*/_jsx(Placeholder, {
|
|
26
|
+
size: 32
|
|
27
|
+
})
|
|
28
|
+
}),
|
|
29
|
+
coin: figma.enum('size', {
|
|
30
|
+
sm: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
31
|
+
ledgerId: "bitcoin",
|
|
32
|
+
ticker: "BTC",
|
|
33
|
+
size: 24
|
|
34
|
+
}),
|
|
35
|
+
md: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
36
|
+
ledgerId: "bitcoin",
|
|
37
|
+
ticker: "BTC",
|
|
38
|
+
size: 32
|
|
39
|
+
})
|
|
40
|
+
}),
|
|
41
|
+
stock: figma.enum('size', {
|
|
42
|
+
sm: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
43
|
+
size: 24,
|
|
44
|
+
ledgerId: "walmart",
|
|
45
|
+
ticker: "WMT"
|
|
46
|
+
}),
|
|
47
|
+
md: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
48
|
+
size: 32,
|
|
49
|
+
ledgerId: "walmart",
|
|
50
|
+
ticker: "WMT"
|
|
51
|
+
})
|
|
52
|
+
}),
|
|
53
|
+
none: undefined
|
|
54
|
+
}),
|
|
55
|
+
leadingContentShape: figma.enum('leading-content', {
|
|
56
|
+
'interface-icon': 'flat',
|
|
57
|
+
coin: 'rounded',
|
|
58
|
+
stock: 'rounded',
|
|
59
|
+
none: 'flat'
|
|
60
|
+
}),
|
|
61
|
+
children: figma.string('label')
|
|
62
|
+
},
|
|
63
|
+
example: props => /*#__PURE__*/_jsx(MediaButton, {
|
|
64
|
+
appearance: props.appearance,
|
|
65
|
+
size: props.size,
|
|
66
|
+
leadingContent: props.leadingContent,
|
|
67
|
+
leadingContentShape: props.leadingContentShape,
|
|
68
|
+
onPress: () => {},
|
|
69
|
+
children: props.children
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=MediaButton.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","CryptoIcon","Placeholder","MediaButton","jsx","_jsx","connect","imports","props","appearance","enum","plain","transparent","size","sm","md","leadingContent","coin","ledgerId","ticker","stock","none","undefined","leadingContentShape","children","string","example","onPress"],"sourceRoot":"../../../../../src","sources":["lib/Components/MediaButton/MediaButton.figma.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,qBAAqB;AACvC,OAAOC,UAAU,MAAM,+BAA+B;AACtD,SAASC,WAAW,QAAQ,wBAAe;AAC3C,SAASC,WAAW,QAAQ,kBAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5CL,KAAK,CAACM,OAAO,CACXH,WAAW,EACX,wEAAwE,EACxE;EACEI,OAAO,EAAE,CACP,0DAA0D,EAC1D,kEAAkE,EAClE,wDAAwD,CACzD;EACDC,KAAK,EAAE;IACLC,UAAU,EAAET,KAAK,CAACU,IAAI,CAAC,YAAY,EAAE;MACnCC,KAAK,EAAE,MAAM;MACbC,WAAW,EAAE,aAAa;MAC1B,eAAe,EAAE;IACnB,CAAC,CAAC;IACFC,IAAI,EAAEb,KAAK,CAACU,IAAI,CAAC,MAAM,EAAE;MACvBI,EAAE,EAAE,IAAI;MACRC,EAAE,EAAE;IACN,CAAC,CAAC;IACFC,cAAc,EAAEhB,KAAK,CAACU,IAAI,CAAC,iBAAiB,EAAE;MAC5C,gBAAgB,EAAEV,KAAK,CAACU,IAAI,CAAC,MAAM,EAAE;QACnCI,EAAE,eAAET,IAAA,CAACH,WAAW;UAACW,IAAI,EAAE;QAAG,CAAE,CAAC;QAC7BE,EAAE,eAAEV,IAAA,CAACH,WAAW;UAACW,IAAI,EAAE;QAAG,CAAE;MAC9B,CAAC,CAAC;MACFI,IAAI,EAAEjB,KAAK,CAACU,IAAI,CAAC,MAAM,EAAE;QACvBI,EAAE,eAAET,IAAA,CAAC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
+
import figma from '@figma/code-connect';
|
|
4
|
+
import { Tag } from "../Tag/index.js";
|
|
5
|
+
import { MediaCard, MediaCardTitle } from "./MediaCard.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
figma.connect(MediaCard, 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=15160-2853', {
|
|
8
|
+
imports: ["import { MediaCard, MediaCardTitle } from '@ledgerhq/lumen-ui-rnative'", "import { Tag } from '@ledgerhq/lumen-ui-rnative'"],
|
|
9
|
+
props: {
|
|
10
|
+
title: figma.string('title'),
|
|
11
|
+
tag: figma.boolean('show-tag', {
|
|
12
|
+
true: /*#__PURE__*/_jsx(Tag, {
|
|
13
|
+
label: "Label",
|
|
14
|
+
appearance: "base"
|
|
15
|
+
}),
|
|
16
|
+
false: undefined
|
|
17
|
+
})
|
|
18
|
+
},
|
|
19
|
+
example: props => /*#__PURE__*/_jsxs(MediaCard, {
|
|
20
|
+
imageUrl: "/image.jpg",
|
|
21
|
+
onPress: () => {},
|
|
22
|
+
onClose: () => {},
|
|
23
|
+
children: [props.tag, /*#__PURE__*/_jsx(MediaCardTitle, {
|
|
24
|
+
children: props.title
|
|
25
|
+
})]
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=MediaCard.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","Tag","MediaCard","MediaCardTitle","jsx","_jsx","jsxs","_jsxs","connect","imports","props","title","string","tag","boolean","true","label","appearance","false","undefined","example","imageUrl","onPress","onClose","children"],"sourceRoot":"../../../../../src","sources":["lib/Components/MediaCard/MediaCard.figma.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,qBAAqB;AACvC,SAASC,GAAG,QAAQ,iBAAQ;AAC5B,SAASC,SAAS,EAAEC,cAAc,QAAQ,gBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExDP,KAAK,CAACQ,OAAO,CACXN,SAAS,EACT,wEAAwE,EACxE;EACEO,OAAO,EAAE,CACP,wEAAwE,EACxE,kDAAkD,CACnD;EACDC,KAAK,EAAE;IACLC,KAAK,EAAEX,KAAK,CAACY,MAAM,CAAC,OAAO,CAAC;IAC5BC,GAAG,EAAEb,KAAK,CAACc,OAAO,CAAC,UAAU,EAAE;MAC7BC,IAAI,eAAEV,IAAA,CAACJ,GAAG;QAACe,KAAK,EAAC,OAAO;QAACC,UAAU,EAAC;MAAM,CAAE,CAAC;MAC7CC,KAAK,EAAEC;IACT,CAAC;EACH,CAAC;EACDC,OAAO,EAAGV,KAAK,iBACbH,KAAA,CAACL,SAAS;IAACmB,QAAQ,EAAC,YAAY;IAACC,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAE;IAACC,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAE;IAAAC,QAAA,GACnEd,KAAK,CAACG,GAAG,eACVR,IAAA,CAACF,cAAc;MAAAqB,QAAA,EAAEd,KAAK,CAACC;IAAK,CAAiB,CAAC;EAAA,CACrC;AAEf,CACF,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as MediaCardStories from './MediaCard.stories';
|
|
3
3
|
import { CustomTabs, Tab } from '../../../../.storybook/components';
|
|
4
|
-
import CommonRulesDoAndDont from '../../../../.storybook/components/DoVsDont/CommonRulesDoAndDont.mdx';
|
|
5
4
|
|
|
6
5
|
<Meta title='Core/MediaCard' of={MediaCardStories} />
|
|
7
6
|
|
|
@@ -105,7 +104,6 @@ Use the `lx` prop for layout adjustments like margins or positioning:
|
|
|
105
104
|
</MediaCard>
|
|
106
105
|
```
|
|
107
106
|
|
|
108
|
-
<CommonRulesDoAndDont />
|
|
109
107
|
|
|
110
108
|
</Tab>
|
|
111
109
|
</CustomTabs>
|
|
@@ -2,7 +2,6 @@ import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
|
2
2
|
import * as MediaImageStories from './MediaImage.stories';
|
|
3
3
|
import { MediaImage } from './MediaImage';
|
|
4
4
|
import { CustomTabs, Tab } from '../../../../.storybook/components';
|
|
5
|
-
import CommonRulesDoAndDont from '../../../../.storybook/components/DoVsDont/CommonRulesDoAndDont.mdx';
|
|
6
5
|
|
|
7
6
|
|
|
8
7
|
<Meta title='Core/MediaImage' of={MediaImageStories} />
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import figma from '@figma/code-connect';
|
|
4
|
+
import CryptoIcon from '@ledgerhq/crypto-icons/native';
|
|
5
|
+
import { MediaTag } from "./MediaTag.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
figma.connect(MediaTag, 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=16793-36383', {
|
|
8
|
+
imports: ["import { MediaTag } from '@ledgerhq/lumen-ui-rnative'", "import CryptoIcon from '@ledgerhq/crypto-icons/native'"],
|
|
9
|
+
variant: {
|
|
10
|
+
'leading-icon': 'coin'
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
label: figma.string('label'),
|
|
14
|
+
appearance: figma.enum('appearance', {
|
|
15
|
+
base: 'base',
|
|
16
|
+
gray: 'gray',
|
|
17
|
+
accent: 'accent',
|
|
18
|
+
'accent-subtle': 'accent-subtle',
|
|
19
|
+
success: 'success',
|
|
20
|
+
error: 'error',
|
|
21
|
+
warning: 'warning',
|
|
22
|
+
white: 'white'
|
|
23
|
+
}),
|
|
24
|
+
size: figma.enum('size', {
|
|
25
|
+
md: 'md',
|
|
26
|
+
sm: 'sm'
|
|
27
|
+
}),
|
|
28
|
+
tagSize: figma.enum('size', {
|
|
29
|
+
md: 16,
|
|
30
|
+
sm: 12
|
|
31
|
+
}),
|
|
32
|
+
disabled: figma.enum('appearance', {
|
|
33
|
+
disabled: true
|
|
34
|
+
}),
|
|
35
|
+
coin: figma.nestedProps('coin', {
|
|
36
|
+
asset: figma.enum('asset', {
|
|
37
|
+
btc: 'btc',
|
|
38
|
+
eth: 'eth'
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
},
|
|
42
|
+
example: props => /*#__PURE__*/_jsx(MediaTag, {
|
|
43
|
+
disabled: props.disabled,
|
|
44
|
+
label: props.label,
|
|
45
|
+
appearance: props.appearance,
|
|
46
|
+
size: props.size,
|
|
47
|
+
leadingContent: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
48
|
+
ticker: props.coin.asset,
|
|
49
|
+
ledgerId: props.coin.asset,
|
|
50
|
+
size: props.tagSize
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
figma.connect(MediaTag, 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=16793-36383', {
|
|
55
|
+
imports: ["import { MediaTag } from '@ledgerhq/lumen-ui-rnative'", "import CryptoIcon from '@ledgerhq/crypto-icons/native'"],
|
|
56
|
+
variant: {
|
|
57
|
+
'leading-icon': 'network'
|
|
58
|
+
},
|
|
59
|
+
props: {
|
|
60
|
+
label: figma.string('label'),
|
|
61
|
+
appearance: figma.enum('appearance', {
|
|
62
|
+
base: 'base',
|
|
63
|
+
gray: 'gray',
|
|
64
|
+
accent: 'accent',
|
|
65
|
+
'accent-subtle': 'accent-subtle',
|
|
66
|
+
success: 'success',
|
|
67
|
+
error: 'error',
|
|
68
|
+
warning: 'warning',
|
|
69
|
+
white: 'white'
|
|
70
|
+
}),
|
|
71
|
+
size: figma.enum('size', {
|
|
72
|
+
md: 'md',
|
|
73
|
+
sm: 'sm'
|
|
74
|
+
}),
|
|
75
|
+
tagSize: figma.enum('size', {
|
|
76
|
+
md: 16,
|
|
77
|
+
sm: 12
|
|
78
|
+
}),
|
|
79
|
+
disabled: figma.enum('appearance', {
|
|
80
|
+
disabled: true
|
|
81
|
+
}),
|
|
82
|
+
network: figma.nestedProps('network', {
|
|
83
|
+
ticker: figma.enum('network', {
|
|
84
|
+
eth: 'eth'
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
},
|
|
88
|
+
example: props => /*#__PURE__*/_jsx(MediaTag, {
|
|
89
|
+
disabled: props.disabled,
|
|
90
|
+
label: props.label,
|
|
91
|
+
appearance: props.appearance,
|
|
92
|
+
size: props.size,
|
|
93
|
+
leadingContent: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
94
|
+
ticker: props.network.ticker,
|
|
95
|
+
ledgerId: props.network.ticker,
|
|
96
|
+
size: props.tagSize
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
//# sourceMappingURL=MediaTag.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","CryptoIcon","MediaTag","jsx","_jsx","connect","imports","variant","props","label","string","appearance","enum","base","gray","accent","success","error","warning","white","size","md","sm","tagSize","disabled","coin","nestedProps","asset","btc","eth","example","leadingContent","ticker","ledgerId","network"],"sourceRoot":"../../../../../src","sources":["lib/Components/MediaTag/MediaTag.figma.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,qBAAqB;AACvC,OAAOC,UAAU,MAAM,+BAA+B;AACtD,SAASC,QAAQ,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEtCJ,KAAK,CAACK,OAAO,CACXH,QAAQ,EACR,yEAAyE,EACzE;EACEI,OAAO,EAAE,CACP,uDAAuD,EACvD,wDAAwD,CACzD;EACDC,OAAO,EAAE;IAAE,cAAc,EAAE;EAAO,CAAC;EACnCC,KAAK,EAAE;IACLC,KAAK,EAAET,KAAK,CAACU,MAAM,CAAC,OAAO,CAAC;IAC5BC,UAAU,EAAEX,KAAK,CAACY,IAAI,CAAC,YAAY,EAAE;MACnCC,IAAI,EAAE,MAAM;MACZC,IAAI,EAAE,MAAM;MACZC,MAAM,EAAE,QAAQ;MAChB,eAAe,EA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AAK,CAACe;IAAQ,CACrB;EACF,CACF;AAEL,CACF,CAAC","ignoreList":[]}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as MediaTagStories from './MediaTag.stories';
|
|
3
3
|
import { CustomTabs, Tab } from '../../../../.storybook/components';
|
|
4
|
-
import { DoVsDontRow, DoBlockItem, DontBlockItem } from '../../../../.storybook/components/DoVsDont';
|
|
5
|
-
import CommonRulesDoAndDont from '../../../../.storybook/components/DoVsDont/CommonRulesDoAndDont.mdx';
|
|
6
4
|
import { Box } from '../Utility/Box';
|
|
7
5
|
|
|
8
6
|
<Meta title='Core/MediaTag' of={MediaTagStories} />
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import figma from '@figma/code-connect';
|
|
4
|
+
import CryptoIcon from '@ledgerhq/crypto-icons/native';
|
|
5
|
+
import { IconButton, NavBarCoinCapsule, NavBarTrailing, TileDescription } from '@ledgerhq/lumen-ui-rnative';
|
|
6
|
+
import { Settings } from "../../Symbols/index.js";
|
|
7
|
+
import { NavBar, NavBarBackButton, NavBarContent, NavBarTitle } from "./NavBar.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
figma.connect(NavBar, 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=1426-4697', {
|
|
10
|
+
imports: ["import { NavBar, NavBarBackButton, NavBarContent, NavBarTitle } from '@ledgerhq/lumen-ui-rnative'"],
|
|
11
|
+
props: {
|
|
12
|
+
density: figma.enum('density', {
|
|
13
|
+
compact: 'compact',
|
|
14
|
+
expanded: 'expanded'
|
|
15
|
+
}),
|
|
16
|
+
backButton: figma.boolean('show-back', {
|
|
17
|
+
true: /*#__PURE__*/_jsx(NavBarBackButton, {
|
|
18
|
+
onPress: () => {}
|
|
19
|
+
}),
|
|
20
|
+
false: undefined
|
|
21
|
+
}),
|
|
22
|
+
title: figma.boolean('show-title', {
|
|
23
|
+
true: /*#__PURE__*/_jsx(NavBarTitle, {
|
|
24
|
+
children: "Title"
|
|
25
|
+
}),
|
|
26
|
+
false: undefined
|
|
27
|
+
}),
|
|
28
|
+
description: figma.boolean('show-description', {
|
|
29
|
+
true: figma.boolean('show-network', {
|
|
30
|
+
true: /*#__PURE__*/_jsxs(TileDescription, {
|
|
31
|
+
children: ["Description", ' ', /*#__PURE__*/_jsx(CryptoIcon, {
|
|
32
|
+
ledgerId: "ethereum",
|
|
33
|
+
ticker: "ETH",
|
|
34
|
+
size: 20
|
|
35
|
+
})]
|
|
36
|
+
}),
|
|
37
|
+
false: /*#__PURE__*/_jsx(TileDescription, {
|
|
38
|
+
children: "Description"
|
|
39
|
+
})
|
|
40
|
+
}),
|
|
41
|
+
false: undefined
|
|
42
|
+
}),
|
|
43
|
+
coinCapsule: figma.enum('content', {
|
|
44
|
+
asset: /*#__PURE__*/_jsx(NavBarCoinCapsule, {
|
|
45
|
+
ticker: "Bitcoin",
|
|
46
|
+
leadingContent: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
47
|
+
ledgerId: "bitcoin",
|
|
48
|
+
ticker: "BTC",
|
|
49
|
+
size: 24
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
}),
|
|
53
|
+
trailing: figma.boolean('show-trailing-icon', {
|
|
54
|
+
true: /*#__PURE__*/_jsx(NavBarTrailing, {
|
|
55
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
|
56
|
+
icon: Settings,
|
|
57
|
+
accessibilityLabel: "Settings"
|
|
58
|
+
})
|
|
59
|
+
}),
|
|
60
|
+
false: undefined
|
|
61
|
+
}),
|
|
62
|
+
secondaryTrailing: figma.boolean('show-second-trailing-icon', {
|
|
63
|
+
true: /*#__PURE__*/_jsx(NavBarTrailing, {
|
|
64
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
|
65
|
+
icon: Settings,
|
|
66
|
+
accessibilityLabel: "Settings"
|
|
67
|
+
})
|
|
68
|
+
}),
|
|
69
|
+
false: undefined
|
|
70
|
+
})
|
|
71
|
+
},
|
|
72
|
+
example: props => /*#__PURE__*/_jsxs(NavBar, {
|
|
73
|
+
density: props.density,
|
|
74
|
+
children: [props.backButton, /*#__PURE__*/_jsxs(NavBarContent, {
|
|
75
|
+
children: [props.title, props.description]
|
|
76
|
+
}), props.coinCapsule, props.trailing, props.secondaryTrailing]
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=NavBar.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","CryptoIcon","IconButton","NavBarCoinCapsule","NavBarTrailing","TileDescription","Settings","NavBar","NavBarBackButton","NavBarContent","NavBarTitle","jsx","_jsx","jsxs","_jsxs","connect","imports","props","density","enum","compact","expanded","backButton","boolean","true","onPress","false","undefined","title","children","description","ledgerId","ticker","size","coinCapsule","asset","leadingContent","trailing","icon","accessibilityLabel","secondaryTrailing","example"],"sourceRoot":"../../../../../src","sources":["lib/Components/NavBar/NavBar.figma.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,qBAAqB;AACvC,OAAOC,UAAU,MAAM,+BAA+B;AACtD,SACEC,UAAU,EACVC,iBAAiB,EACjBC,cAAc,EACdC,eAAe,QACV,4BAA4B;AACnC,SAASC,QAAQ,QAAQ,wBAAe;AACxC,SAASC,MAAM,EAAEC,gBAAgB,EAAEC,aAAa,EAAEC,WAAW,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhFd,KAAK,CAACe,OAAO,CACXR,MAAM,EACN,uEAAuE,EACvE;EACES,OAAO,EAAE,CACP,mGAAmG,CACpG;EACDC,KAAK,EAAE;IACLC,OAAO,EAAElB,KAAK,CAACmB,IAAI,CAAC,SAAS,EAAE;MAC7BC,OAAO,EAAE,SAAS;MAClBC,QAAQ,EAAE;IACZ,CAA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CAACV,UAAU;UAACoC,IAAI,EAAEhC,QAAS;UAACiC,kBAAkB,EAAC;QAAU,CAAE;MAAC,CAC9C,CACjB;MACDb,KAAK,EAAEC;IACT,CAAC,CAAC;IACFa,iBAAiB,EAAExC,KAAK,CAACuB,OAAO,CAAC,2BAA2B,EAAE;MAC5DC,IAAI,eACFZ,IAAA,CAACR,cAAc;QAAAyB,QAAA,eACbjB,IAAA,CAACV,UAAU;UAACoC,IAAI,EAAEhC,QAAS;UAACiC,kBAAkB,EAAC;QAAU,CAAE;MAAC,CAC9C,CACjB;MACDb,KAAK,EAAEC;IACT,CAAC;EACH,CAAC;EACDc,OAAO,EAAGxB,KAAK,iBACbH,KAAA,CAACP,MAAM;IAACW,OAAO,EAAED,KAAK,CAACC,OAAQ;IAAAW,QAAA,GAC5BZ,KAAK,CAACK,UAAU,eACjBR,KAAA,CAACL,aAAa;MAAAoB,QAAA,GACXZ,KAAK,CAACW,KAAK,EACXX,KAAK,CAACa,WAAW;IAAA,CACL,CAAC,EACfb,KAAK,CAACiB,WAAW,EACjBjB,KAAK,CAACoB,QAAQ,EACdpB,KAAK,CAACuB,iBAAiB;EAAA,CAClB;AAEZ,CACF,CAAC","ignoreList":[]}
|
|
@@ -3,7 +3,6 @@ import { Box } from '../Utility';
|
|
|
3
3
|
import * as NavBarStories from './NavBar.stories';
|
|
4
4
|
import { NavBar, NavBarBackButton, NavBarContent } from './NavBar';
|
|
5
5
|
import { CustomTabs, Tab } from '../../../../.storybook/components';
|
|
6
|
-
import CommonRulesDoAndDont from '../../../../.storybook/components/DoVsDont/CommonRulesDoAndDont.mdx';
|
|
7
6
|
|
|
8
7
|
<Meta title='Core/NavBar' of={NavBarStories} />
|
|
9
8
|
|
|
@@ -253,7 +252,6 @@ export default function DetailsScreen() {
|
|
|
253
252
|
}
|
|
254
253
|
```
|
|
255
254
|
|
|
256
|
-
<CommonRulesDoAndDont />
|
|
257
255
|
|
|
258
256
|
</Tab>
|
|
259
257
|
</CustomTabs>
|
|
@@ -3,9 +3,6 @@ import * as OptionListStories from './OptionList.stories';
|
|
|
3
3
|
import {
|
|
4
4
|
CustomTabs,
|
|
5
5
|
Tab,
|
|
6
|
-
DoVsDontRow,
|
|
7
|
-
DoBlockItem,
|
|
8
|
-
DontBlockItem,
|
|
9
6
|
} from '../../../../.storybook/components';
|
|
10
7
|
|
|
11
8
|
<Meta title='Core/OptionList' of={OptionListStories} />
|
|
@@ -276,93 +273,6 @@ const items = [
|
|
|
276
273
|
/>
|
|
277
274
|
```
|
|
278
275
|
|
|
279
|
-
## Do's and Don'ts
|
|
280
|
-
|
|
281
|
-
<div className='flex flex-col gap-24'>
|
|
282
|
-
|
|
283
|
-
<DoVsDontRow>
|
|
284
|
-
<DoBlockItem
|
|
285
|
-
title='Pass items as a flat array'
|
|
286
|
-
description='Use the group field for grouping — the component handles labels and separators automatically.'
|
|
287
|
-
>
|
|
288
|
-
|
|
289
|
-
{/* prettier-ignore */}
|
|
290
|
-
```tsx
|
|
291
|
-
<OptionList
|
|
292
|
-
items={[
|
|
293
|
-
{ value: 'a', label: 'A', group: 'Group 1' },
|
|
294
|
-
{ value: 'b', label: 'B', group: 'Group 2' },
|
|
295
|
-
]}
|
|
296
|
-
value={value}
|
|
297
|
-
onValueChange={setValue}
|
|
298
|
-
>
|
|
299
|
-
<OptionListContent renderItem={...} />
|
|
300
|
-
</OptionList>
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
</DoBlockItem>
|
|
304
|
-
<DontBlockItem
|
|
305
|
-
title="Don't manually render group labels or separators"
|
|
306
|
-
description='OptionListContent handles group rendering internally based on item data.'
|
|
307
|
-
>
|
|
308
|
-
|
|
309
|
-
{/* prettier-ignore */}
|
|
310
|
-
```tsx
|
|
311
|
-
<OptionList
|
|
312
|
-
items={items}
|
|
313
|
-
value={value}
|
|
314
|
-
onValueChange={setValue}
|
|
315
|
-
>
|
|
316
|
-
<Text>Group 1</Text>
|
|
317
|
-
<OptionListContent renderItem={...} />
|
|
318
|
-
<Divider />
|
|
319
|
-
<Text>Group 2</Text>
|
|
320
|
-
<OptionListContent renderItem={...} />
|
|
321
|
-
</OptionList>
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
</DontBlockItem>
|
|
325
|
-
</DoVsDontRow>
|
|
326
|
-
|
|
327
|
-
<DoVsDontRow>
|
|
328
|
-
<DoBlockItem
|
|
329
|
-
title='Compose OptionList inside your own container'
|
|
330
|
-
description='OptionList is display-only — wrap it in a BottomSheet, screen, or any layout.'
|
|
331
|
-
>
|
|
332
|
-
|
|
333
|
-
{/* prettier-ignore */}
|
|
334
|
-
```tsx
|
|
335
|
-
<BottomSheet ref={ref}>
|
|
336
|
-
<BottomSheetView>
|
|
337
|
-
<OptionList items={items} value={value} onValueChange={setValue}>
|
|
338
|
-
<OptionListContent renderItem={...} />
|
|
339
|
-
</OptionList>
|
|
340
|
-
</BottomSheetView>
|
|
341
|
-
</BottomSheet>
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
</DoBlockItem>
|
|
345
|
-
<DontBlockItem
|
|
346
|
-
title="Don't expect OptionList to manage the BottomSheet"
|
|
347
|
-
description='Use OptionListTrigger to open the sheet yourself — OptionList only handles selection state, not the container.'
|
|
348
|
-
>
|
|
349
|
-
|
|
350
|
-
{/* prettier-ignore */}
|
|
351
|
-
```tsx
|
|
352
|
-
<OptionList
|
|
353
|
-
items={items}
|
|
354
|
-
value={value}
|
|
355
|
-
onValueChange={setValue}
|
|
356
|
-
trigger={<Button>Open</Button>}
|
|
357
|
-
>
|
|
358
|
-
<OptionListContent renderItem={...} />
|
|
359
|
-
</OptionList>
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
</DontBlockItem>
|
|
363
|
-
</DoVsDontRow>
|
|
364
|
-
|
|
365
|
-
</div>
|
|
366
276
|
|
|
367
277
|
</Tab>
|
|
368
278
|
</CustomTabs>
|