@ledgerhq/lumen-ui-rnative 0.1.48 → 0.1.50
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/BaseInput/BaseInput.js +84 -25
- package/dist/module/lib/Components/BaseInput/BaseInput.js.map +1 -1
- 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/Button/ButtonGroup.figma.js +19 -0
- package/dist/module/lib/Components/Button/ButtonGroup.figma.js.map +1 -0
- 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/DescriptionItem/DescriptionItem.js +31 -9
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.js.map +1 -1
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.mdx +10 -7
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.stories.js +29 -40
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.stories.js.map +1 -1
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.test.js +22 -0
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.test.js.map +1 -1
- 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 +427 -0
- package/dist/module/lib/Components/ListItem/ListItem.figma.js.map +1 -0
- package/dist/module/lib/Components/ListItem/ListItem.js +78 -20
- package/dist/module/lib/Components/ListItem/ListItem.js.map +1 -1
- package/dist/module/lib/Components/ListItem/ListItem.mdx +17 -129
- package/dist/module/lib/Components/ListItem/ListItem.stories.js +132 -0
- package/dist/module/lib/Components/ListItem/ListItem.stories.js.map +1 -1
- package/dist/module/lib/Components/ListItem/ListItem.test.js +80 -0
- package/dist/module/lib/Components/ListItem/ListItem.test.js.map +1 -1
- 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/SectionHeader/SectionHeader.figma.js +22 -0
- package/dist/module/lib/Components/SectionHeader/SectionHeader.figma.js.map +1 -0
- package/dist/module/lib/Components/SectionHeader/SectionHeader.js +99 -0
- package/dist/module/lib/Components/SectionHeader/SectionHeader.js.map +1 -0
- package/dist/module/lib/Components/SectionHeader/SectionHeader.mdx +79 -0
- package/dist/module/lib/Components/SectionHeader/SectionHeader.stories.js +104 -0
- package/dist/module/lib/Components/SectionHeader/SectionHeader.stories.js.map +1 -0
- package/dist/module/lib/Components/SectionHeader/SectionHeader.test.js +108 -0
- package/dist/module/lib/Components/SectionHeader/SectionHeader.test.js.map +1 -0
- package/dist/module/lib/Components/SectionHeader/index.js +5 -0
- package/dist/module/lib/Components/SectionHeader/index.js.map +1 -0
- package/dist/module/lib/Components/SectionHeader/types.js +4 -0
- package/dist/module/lib/Components/SectionHeader/types.js.map +1 -0
- 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 +42 -0
- package/dist/module/lib/Components/TextInput/TextInput.figma.js.map +1 -0
- package/dist/module/lib/Components/TextInput/TextInput.mdx +43 -251
- package/dist/module/lib/Components/TextInput/TextInput.stories.js +58 -1
- package/dist/module/lib/Components/TextInput/TextInput.stories.js.map +1 -1
- package/dist/module/lib/Components/TextInput/TextInput.test.js +45 -1
- package/dist/module/lib/Components/TextInput/TextInput.test.js.map +1 -1
- 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 +28 -0
- package/dist/module/lib/Components/TileButton/TileButton.figma.js.map +1 -0
- package/dist/module/lib/Components/TileButton/TileButton.js +39 -27
- package/dist/module/lib/Components/TileButton/TileButton.js.map +1 -1
- package/dist/module/lib/Components/TileButton/TileButton.mdx +10 -41
- package/dist/module/lib/Components/TileButton/TileButton.stories.js +33 -2
- package/dist/module/lib/Components/TileButton/TileButton.stories.js.map +1 -1
- package/dist/module/lib/Components/TileButton/TileButton.test.js +26 -0
- package/dist/module/lib/Components/TileButton/TileButton.test.js.map +1 -1
- 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/Components/index.js +1 -0
- package/dist/module/lib/Components/index.js.map +1 -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/Icons/Upload.js +50 -0
- package/dist/module/lib/Symbols/Icons/Upload.js.map +1 -0
- package/dist/module/lib/Symbols/index.js +2 -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/BaseInput/BaseInput.d.ts +1 -1
- package/dist/typescript/src/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BaseInput/types.d.ts +16 -0
- package/dist/typescript/src/lib/Components/BaseInput/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/DescriptionItem/DescriptionItem.d.ts +1 -1
- package/dist/typescript/src/lib/Components/DescriptionItem/DescriptionItem.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/DescriptionItem/types.d.ts +6 -0
- package/dist/typescript/src/lib/Components/DescriptionItem/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/Components/ListItem/ListItem.d.ts +1 -1
- package/dist/typescript/src/lib/Components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/ListItem/types.d.ts +11 -1
- package/dist/typescript/src/lib/Components/ListItem/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/SectionHeader/SectionHeader.d.ts +20 -0
- package/dist/typescript/src/lib/Components/SectionHeader/SectionHeader.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/SectionHeader/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/SectionHeader/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/SectionHeader/types.d.ts +27 -0
- package/dist/typescript/src/lib/Components/SectionHeader/types.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/TileButton/TileButton.d.ts +1 -1
- package/dist/typescript/src/lib/Components/TileButton/TileButton.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/TileButton/types.d.ts +5 -0
- package/dist/typescript/src/lib/Components/TileButton/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/index.d.ts +1 -0
- package/dist/typescript/src/lib/Components/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/Icons/Upload.d.ts +35 -0
- package/dist/typescript/src/lib/Symbols/Icons/Upload.d.ts.map +1 -0
- package/dist/typescript/src/lib/Symbols/index.d.ts +2 -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/BaseInput/BaseInput.tsx +93 -22
- package/src/lib/Components/BaseInput/types.ts +18 -0
- 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/Button/ButtonGroup.figma.tsx +15 -0
- 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/DescriptionItem/DescriptionItem.mdx +10 -7
- package/src/lib/Components/DescriptionItem/DescriptionItem.stories.tsx +21 -41
- package/src/lib/Components/DescriptionItem/DescriptionItem.test.tsx +24 -0
- package/src/lib/Components/DescriptionItem/DescriptionItem.tsx +31 -8
- package/src/lib/Components/DescriptionItem/types.ts +6 -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 +466 -0
- package/src/lib/Components/ListItem/ListItem.mdx +17 -129
- package/src/lib/Components/ListItem/ListItem.stories.tsx +92 -0
- package/src/lib/Components/ListItem/ListItem.test.tsx +78 -0
- package/src/lib/Components/ListItem/ListItem.tsx +64 -19
- package/src/lib/Components/ListItem/types.ts +11 -1
- 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/SectionHeader/SectionHeader.figma.tsx +24 -0
- package/src/lib/Components/SectionHeader/SectionHeader.mdx +79 -0
- package/src/lib/Components/SectionHeader/SectionHeader.stories.tsx +95 -0
- package/src/lib/Components/SectionHeader/SectionHeader.test.tsx +103 -0
- package/src/lib/Components/SectionHeader/SectionHeader.tsx +125 -0
- package/src/lib/Components/SectionHeader/index.ts +6 -0
- package/src/lib/Components/SectionHeader/types.ts +30 -0
- 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 +45 -0
- package/src/lib/Components/TextInput/TextInput.mdx +43 -251
- package/src/lib/Components/TextInput/TextInput.stories.tsx +57 -1
- package/src/lib/Components/TextInput/TextInput.test.tsx +60 -1
- 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 +40 -0
- package/src/lib/Components/TileButton/TileButton.mdx +10 -41
- package/src/lib/Components/TileButton/TileButton.stories.tsx +28 -4
- package/src/lib/Components/TileButton/TileButton.test.tsx +35 -1
- package/src/lib/Components/TileButton/TileButton.tsx +47 -28
- package/src/lib/Components/TileButton/types.ts +5 -0
- 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/Components/index.ts +1 -0
- 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/Icons/Upload.tsx +45 -0
- package/src/lib/Symbols/index.ts +2 -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
|
@@ -323,6 +323,50 @@ export const DisabledState: Story = {
|
|
|
323
323
|
},
|
|
324
324
|
};
|
|
325
325
|
|
|
326
|
+
export const ActiveState: Story = {
|
|
327
|
+
args: {
|
|
328
|
+
active: true,
|
|
329
|
+
},
|
|
330
|
+
render: (args) => (
|
|
331
|
+
<Box lx={{ flexDirection: 'column', width: 's320', gap: 's8' }}>
|
|
332
|
+
<ListItem {...args}>
|
|
333
|
+
<ListItemLeading>
|
|
334
|
+
<Spot size={48} appearance='icon' icon={Settings} />
|
|
335
|
+
<ListItemContent>
|
|
336
|
+
<ListItemTitle>Active Item</ListItemTitle>
|
|
337
|
+
<ListItemDescription>
|
|
338
|
+
Static with muted background
|
|
339
|
+
</ListItemDescription>
|
|
340
|
+
</ListItemContent>
|
|
341
|
+
</ListItemLeading>
|
|
342
|
+
</ListItem>
|
|
343
|
+
|
|
344
|
+
<ListItem {...args} onPress={() => {}}>
|
|
345
|
+
<ListItemLeading>
|
|
346
|
+
<Spot size={48} appearance='icon' icon={Settings} />
|
|
347
|
+
<ListItemContent>
|
|
348
|
+
<ListItemTitle>Active Interactive</ListItemTitle>
|
|
349
|
+
<ListItemDescription>Press for muted-pressed</ListItemDescription>
|
|
350
|
+
</ListItemContent>
|
|
351
|
+
</ListItemLeading>
|
|
352
|
+
<ListItemTrailing>
|
|
353
|
+
<ChevronRight size={24} />
|
|
354
|
+
</ListItemTrailing>
|
|
355
|
+
</ListItem>
|
|
356
|
+
|
|
357
|
+
<ListItem {...args} disabled>
|
|
358
|
+
<ListItemLeading>
|
|
359
|
+
<Spot size={48} appearance='icon' icon={Wallet} />
|
|
360
|
+
<ListItemContent>
|
|
361
|
+
<ListItemTitle>Active Disabled</ListItemTitle>
|
|
362
|
+
<ListItemDescription>Uses disabled background</ListItemDescription>
|
|
363
|
+
</ListItemContent>
|
|
364
|
+
</ListItemLeading>
|
|
365
|
+
</ListItem>
|
|
366
|
+
</Box>
|
|
367
|
+
),
|
|
368
|
+
};
|
|
369
|
+
|
|
326
370
|
export const ResponsiveLayout: Story = {
|
|
327
371
|
render: () => (
|
|
328
372
|
<Box lx={{ flexDirection: 'column', width: 's480', gap: 's32' }}>
|
|
@@ -402,6 +446,54 @@ export const ResponsiveLayout: Story = {
|
|
|
402
446
|
),
|
|
403
447
|
};
|
|
404
448
|
|
|
449
|
+
export const PriorityShowcase: Story = {
|
|
450
|
+
render: () => (
|
|
451
|
+
<Box lx={{ flexDirection: 'column', width: 's320', gap: 's8' }}>
|
|
452
|
+
<Text typography='body4SemiBold' lx={{ color: 'muted' }}>
|
|
453
|
+
priority="end" (default)
|
|
454
|
+
</Text>
|
|
455
|
+
<ListItem priority='end'>
|
|
456
|
+
<ListItemLeading>
|
|
457
|
+
<Spot size={48} appearance='icon' icon={Wallet} />
|
|
458
|
+
<ListItemContent>
|
|
459
|
+
<ListItemTitle>
|
|
460
|
+
Long title competing with trailing value content
|
|
461
|
+
</ListItemTitle>
|
|
462
|
+
<ListItemDescription>priority="end"</ListItemDescription>
|
|
463
|
+
</ListItemContent>
|
|
464
|
+
</ListItemLeading>
|
|
465
|
+
<ListItemTrailing>
|
|
466
|
+
<ListItemContent>
|
|
467
|
+
<ListItemTitle>1,234,567,891,234.56</ListItemTitle>
|
|
468
|
+
<ListItemDescription>USD</ListItemDescription>
|
|
469
|
+
</ListItemContent>
|
|
470
|
+
</ListItemTrailing>
|
|
471
|
+
</ListItem>
|
|
472
|
+
|
|
473
|
+
<Text typography='body4SemiBold' lx={{ color: 'muted' }}>
|
|
474
|
+
priority="start"
|
|
475
|
+
</Text>
|
|
476
|
+
<ListItem priority='start'>
|
|
477
|
+
<ListItemLeading>
|
|
478
|
+
<Spot size={48} appearance='icon' icon={Wallet} />
|
|
479
|
+
<ListItemContent>
|
|
480
|
+
<ListItemTitle>
|
|
481
|
+
Long title competing with trailing value content
|
|
482
|
+
</ListItemTitle>
|
|
483
|
+
<ListItemDescription>priority="start"</ListItemDescription>
|
|
484
|
+
</ListItemContent>
|
|
485
|
+
</ListItemLeading>
|
|
486
|
+
<ListItemTrailing>
|
|
487
|
+
<ListItemContent>
|
|
488
|
+
<ListItemTitle>1,234,567,891,234.56</ListItemTitle>
|
|
489
|
+
<ListItemDescription>USD</ListItemDescription>
|
|
490
|
+
</ListItemContent>
|
|
491
|
+
</ListItemTrailing>
|
|
492
|
+
</ListItem>
|
|
493
|
+
</Box>
|
|
494
|
+
),
|
|
495
|
+
};
|
|
496
|
+
|
|
405
497
|
export const CompositionShowcase: Story = {
|
|
406
498
|
render: () => (
|
|
407
499
|
<Box lx={{ flexDirection: 'column', maxWidth: 's320', gap: 's8' }}>
|
|
@@ -109,6 +109,38 @@ describe('ListItem', () => {
|
|
|
109
109
|
});
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
+
describe('active', () => {
|
|
113
|
+
it('applies muted background when active', () => {
|
|
114
|
+
renderListItem({ active: true });
|
|
115
|
+
const inner = screen.getByTestId('list-item-content');
|
|
116
|
+
expect(inner.props.style.backgroundColor).not.toBe('transparent');
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
it('applies disabled background when active and disabled', () => {
|
|
120
|
+
renderListItem({ active: true, disabled: true });
|
|
121
|
+
const inner = screen.getByTestId('list-item-content');
|
|
122
|
+
expect(inner.props.style.backgroundColor).not.toBe('transparent');
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it('uses transparent background when not active', () => {
|
|
126
|
+
renderListItem();
|
|
127
|
+
const inner = screen.getByTestId('list-item-content');
|
|
128
|
+
expect(inner.props.style.backgroundColor).toBe('transparent');
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it('sets selected accessibility state when active', () => {
|
|
132
|
+
renderListItem({ active: true });
|
|
133
|
+
const item = screen.getByTestId('list-item');
|
|
134
|
+
expect(item.props.accessibilityState?.selected).toBe(true);
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
it('does not set selected accessibility state when not active', () => {
|
|
138
|
+
renderListItem();
|
|
139
|
+
const item = screen.getByTestId('list-item');
|
|
140
|
+
expect(item.props.accessibilityState?.selected).toBeFalsy();
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
|
|
112
144
|
describe('disabled', () => {
|
|
113
145
|
it('sets disabled accessibility state', () => {
|
|
114
146
|
renderListItem({ disabled: true });
|
|
@@ -125,6 +157,52 @@ describe('ListItem', () => {
|
|
|
125
157
|
});
|
|
126
158
|
});
|
|
127
159
|
|
|
160
|
+
describe('priority', () => {
|
|
161
|
+
const renderWithPriority = (priority?: ListItemProps['priority']) =>
|
|
162
|
+
render(
|
|
163
|
+
<TestWrapper>
|
|
164
|
+
<ListItem priority={priority}>
|
|
165
|
+
<ListItemLeading testID='leading'>
|
|
166
|
+
<ListItemContent testID='content'>
|
|
167
|
+
<ListItemTitle>Title</ListItemTitle>
|
|
168
|
+
</ListItemContent>
|
|
169
|
+
</ListItemLeading>
|
|
170
|
+
<ListItemTrailing testID='trailing'>
|
|
171
|
+
<RNText>Trailing</RNText>
|
|
172
|
+
</ListItemTrailing>
|
|
173
|
+
</ListItem>
|
|
174
|
+
</TestWrapper>,
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
it('in "end" priority, leading shrinks, trailing shows', () => {
|
|
178
|
+
renderWithPriority();
|
|
179
|
+
|
|
180
|
+
expect(screen.getByTestId('leading').props.style).toEqual(
|
|
181
|
+
expect.objectContaining({ flexShrink: 1 }),
|
|
182
|
+
);
|
|
183
|
+
expect(screen.getByTestId('content').props.style).toEqual(
|
|
184
|
+
expect.objectContaining({ flex: 1 }),
|
|
185
|
+
);
|
|
186
|
+
expect(screen.getByTestId('trailing').props.style).not.toEqual(
|
|
187
|
+
expect.objectContaining({ flexShrink: 1 }),
|
|
188
|
+
);
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
it('in "start" priority, trailing shrinks, leading shows', () => {
|
|
192
|
+
renderWithPriority('start');
|
|
193
|
+
|
|
194
|
+
expect(screen.getByTestId('leading').props.style).not.toEqual(
|
|
195
|
+
expect.objectContaining({ flexShrink: 1 }),
|
|
196
|
+
);
|
|
197
|
+
expect(screen.getByTestId('content').props.style).toEqual(
|
|
198
|
+
expect.objectContaining({ flex: 0, flexShrink: 1 }),
|
|
199
|
+
);
|
|
200
|
+
expect(screen.getByTestId('trailing').props.style).toEqual(
|
|
201
|
+
expect.objectContaining({ flexShrink: 1 }),
|
|
202
|
+
);
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
|
|
128
206
|
describe('ListItemContentRow', () => {
|
|
129
207
|
it('renders title alongside additional content in a row', () => {
|
|
130
208
|
render(
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
createSafeContext,
|
|
3
3
|
type Density,
|
|
4
4
|
DisabledProvider,
|
|
5
|
+
type Priority,
|
|
5
6
|
useDisabledContext,
|
|
6
7
|
} from '@ledgerhq/lumen-utils-shared';
|
|
7
8
|
import type { ComponentRef, ReactNode, Ref } from 'react';
|
|
@@ -24,12 +25,21 @@ const [ListItemTrailingProvider, useListItemTrailingContext] =
|
|
|
24
25
|
isInTrailing: false,
|
|
25
26
|
});
|
|
26
27
|
|
|
28
|
+
const [ListItemPriorityProvider, useListItemPriorityContext] =
|
|
29
|
+
createSafeContext<{ priority?: Priority }>('ListItemPriority', {
|
|
30
|
+
priority: undefined,
|
|
31
|
+
});
|
|
32
|
+
|
|
27
33
|
const useRootStyles = ({
|
|
28
34
|
pressed,
|
|
29
35
|
density,
|
|
36
|
+
active,
|
|
37
|
+
disabled,
|
|
30
38
|
}: {
|
|
31
39
|
pressed: boolean;
|
|
32
40
|
density: Density;
|
|
41
|
+
active: boolean;
|
|
42
|
+
disabled: boolean;
|
|
33
43
|
}) => {
|
|
34
44
|
return useStyleSheet(
|
|
35
45
|
(t) => ({
|
|
@@ -43,13 +53,15 @@ const useRootStyles = ({
|
|
|
43
53
|
borderRadius: t.borderRadius.md,
|
|
44
54
|
backgroundColor: 'transparent',
|
|
45
55
|
paddingHorizontal: t.spacings.s8,
|
|
56
|
+
overflow: 'hidden',
|
|
46
57
|
},
|
|
47
|
-
pressed && {
|
|
48
|
-
|
|
49
|
-
},
|
|
58
|
+
pressed && { backgroundColor: t.colors.bg.baseTransparentPressed },
|
|
59
|
+
active && { backgroundColor: t.colors.bg.muted },
|
|
60
|
+
active && pressed && { backgroundColor: t.colors.bg.mutedPressed },
|
|
61
|
+
active && disabled && { backgroundColor: t.colors.bg.disabled },
|
|
50
62
|
]),
|
|
51
63
|
}),
|
|
52
|
-
[pressed, density],
|
|
64
|
+
[pressed, density, active, disabled],
|
|
53
65
|
);
|
|
54
66
|
};
|
|
55
67
|
|
|
@@ -93,6 +105,8 @@ export const ListItem = ({
|
|
|
93
105
|
style,
|
|
94
106
|
disabled: disabledProp = false,
|
|
95
107
|
density = 'expanded',
|
|
108
|
+
priority = 'end',
|
|
109
|
+
active = false,
|
|
96
110
|
onPress,
|
|
97
111
|
onLongPress,
|
|
98
112
|
ref,
|
|
@@ -116,13 +130,19 @@ export const ListItem = ({
|
|
|
116
130
|
onPress={onPress}
|
|
117
131
|
onLongPress={onLongPress}
|
|
118
132
|
accessibilityRole='button'
|
|
119
|
-
accessibilityState={{ disabled }}
|
|
133
|
+
accessibilityState={{ disabled, selected: active }}
|
|
120
134
|
{...props}
|
|
121
135
|
>
|
|
122
136
|
{({ pressed }) => (
|
|
123
|
-
<
|
|
124
|
-
|
|
125
|
-
|
|
137
|
+
<ListItemPriorityProvider value={{ priority }}>
|
|
138
|
+
<ListItemInner
|
|
139
|
+
pressed={pressed}
|
|
140
|
+
density={density}
|
|
141
|
+
active={active}
|
|
142
|
+
>
|
|
143
|
+
{children}
|
|
144
|
+
</ListItemInner>
|
|
145
|
+
</ListItemPriorityProvider>
|
|
126
146
|
)}
|
|
127
147
|
</Pressable>
|
|
128
148
|
</DisabledProvider>
|
|
@@ -135,12 +155,14 @@ export const ListItem = ({
|
|
|
135
155
|
ref={ref}
|
|
136
156
|
lx={lx}
|
|
137
157
|
style={style}
|
|
138
|
-
accessibilityState={{ disabled }}
|
|
158
|
+
accessibilityState={{ disabled, selected: active }}
|
|
139
159
|
{...props}
|
|
140
160
|
>
|
|
141
|
-
<
|
|
142
|
-
{
|
|
143
|
-
|
|
161
|
+
<ListItemPriorityProvider value={{ priority }}>
|
|
162
|
+
<ListItemInner pressed={false} density={density} active={active}>
|
|
163
|
+
{children}
|
|
164
|
+
</ListItemInner>
|
|
165
|
+
</ListItemPriorityProvider>
|
|
144
166
|
</Box>
|
|
145
167
|
</DisabledProvider>
|
|
146
168
|
);
|
|
@@ -152,13 +174,19 @@ export const ListItem = ({
|
|
|
152
174
|
const ListItemInner = ({
|
|
153
175
|
pressed,
|
|
154
176
|
density,
|
|
177
|
+
active,
|
|
155
178
|
children,
|
|
156
179
|
}: {
|
|
157
180
|
pressed: boolean;
|
|
158
181
|
density: Density;
|
|
182
|
+
active: boolean;
|
|
159
183
|
children: ReactNode;
|
|
160
184
|
}) => {
|
|
161
|
-
const
|
|
185
|
+
const disabled = useDisabledContext({
|
|
186
|
+
consumerName: 'ListItemInner',
|
|
187
|
+
contextRequired: false,
|
|
188
|
+
});
|
|
189
|
+
const styles = useRootStyles({ pressed, density, active, disabled });
|
|
162
190
|
return (
|
|
163
191
|
<View style={styles.container} testID='list-item-content'>
|
|
164
192
|
{children}
|
|
@@ -177,17 +205,23 @@ export const ListItemLeading = ({
|
|
|
177
205
|
ref,
|
|
178
206
|
...props
|
|
179
207
|
}: ListItemLeadingProps & { ref?: Ref<View> }) => {
|
|
208
|
+
const { priority } = useListItemPriorityContext({
|
|
209
|
+
consumerName: 'ListItemLeading',
|
|
210
|
+
contextRequired: false,
|
|
211
|
+
});
|
|
212
|
+
|
|
180
213
|
const styles = useStyleSheet(
|
|
181
214
|
(t) => ({
|
|
182
215
|
leading: {
|
|
183
|
-
|
|
216
|
+
flexGrow: 1,
|
|
217
|
+
flexShrink: priority === 'end' ? 1 : 0,
|
|
184
218
|
minWidth: 0,
|
|
185
219
|
flexDirection: 'row',
|
|
186
220
|
alignItems: 'center',
|
|
187
221
|
gap: t.spacings.s12,
|
|
188
222
|
},
|
|
189
223
|
}),
|
|
190
|
-
[],
|
|
224
|
+
[priority],
|
|
191
225
|
);
|
|
192
226
|
|
|
193
227
|
return (
|
|
@@ -217,16 +251,22 @@ export const ListItemContent = ({
|
|
|
217
251
|
contextRequired: false,
|
|
218
252
|
});
|
|
219
253
|
|
|
254
|
+
const { priority } = useListItemPriorityContext({
|
|
255
|
+
consumerName: 'ListItemContent',
|
|
256
|
+
contextRequired: false,
|
|
257
|
+
});
|
|
258
|
+
|
|
220
259
|
const styles = useStyleSheet(
|
|
221
260
|
(t) => ({
|
|
222
261
|
content: {
|
|
223
|
-
flex: isInTrailing ? 0 : 1,
|
|
262
|
+
flex: isInTrailing || priority === 'start' ? 0 : 1,
|
|
263
|
+
...(priority === 'start' && { flexShrink: 1, flexBasis: 'auto' }),
|
|
224
264
|
minWidth: 0,
|
|
225
265
|
gap: t.spacings.s4,
|
|
226
266
|
alignItems: isInTrailing ? 'flex-end' : 'stretch',
|
|
227
267
|
},
|
|
228
268
|
}),
|
|
229
|
-
[isInTrailing],
|
|
269
|
+
[priority, isInTrailing],
|
|
230
270
|
);
|
|
231
271
|
|
|
232
272
|
return (
|
|
@@ -386,14 +426,19 @@ export const ListItemTrailing = ({
|
|
|
386
426
|
ref,
|
|
387
427
|
...props
|
|
388
428
|
}: ListItemTrailingProps & { ref?: Ref<View> }) => {
|
|
429
|
+
const { priority } = useListItemPriorityContext({
|
|
430
|
+
consumerName: 'ListItemTrailing',
|
|
431
|
+
contextRequired: false,
|
|
432
|
+
});
|
|
433
|
+
|
|
389
434
|
const styles = useStyleSheet(
|
|
390
435
|
() => ({
|
|
391
436
|
trailing: {
|
|
392
|
-
flexShrink: 0,
|
|
437
|
+
flexShrink: priority === 'start' ? 1 : 0,
|
|
393
438
|
alignItems: 'center',
|
|
394
439
|
},
|
|
395
440
|
}),
|
|
396
|
-
[],
|
|
441
|
+
[priority],
|
|
397
442
|
);
|
|
398
443
|
|
|
399
444
|
return (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Density } from '@ledgerhq/lumen-utils-shared';
|
|
1
|
+
import type { Density, Priority } from '@ledgerhq/lumen-utils-shared';
|
|
2
2
|
import type {
|
|
3
3
|
StyledPressableProps,
|
|
4
4
|
StyledTextProps,
|
|
@@ -18,10 +18,20 @@ export type ListItemProps = {
|
|
|
18
18
|
* @default 'expanded'
|
|
19
19
|
*/
|
|
20
20
|
density?: Density;
|
|
21
|
+
/**
|
|
22
|
+
* The parts which are protected from shrinking and truncation when horizontal space is limited.
|
|
23
|
+
* @default 'end'
|
|
24
|
+
*/
|
|
25
|
+
priority?: Priority;
|
|
21
26
|
/**
|
|
22
27
|
* Whether the list item is disabled.
|
|
23
28
|
*/
|
|
24
29
|
disabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Whether the list item is in an active/selected state.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
active?: boolean;
|
|
25
35
|
/**
|
|
26
36
|
* Callback function when the list item is pressed.
|
|
27
37
|
*/
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import {
|
|
3
|
+
MediaBanner,
|
|
4
|
+
MediaBannerDescription,
|
|
5
|
+
MediaBannerTitle,
|
|
6
|
+
} from './MediaBanner';
|
|
7
|
+
|
|
8
|
+
figma.connect(
|
|
9
|
+
MediaBanner,
|
|
10
|
+
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7/2.-Components-Library?node-id=18788-44622',
|
|
11
|
+
{
|
|
12
|
+
imports: [
|
|
13
|
+
"import { MediaBanner, MediaBannerTitle, MediaBannerDescription } from '@ledgerhq/lumen-ui-rnative'",
|
|
14
|
+
],
|
|
15
|
+
props: {
|
|
16
|
+
onClose: figma.boolean('show-close', {
|
|
17
|
+
true: () => {},
|
|
18
|
+
false: undefined,
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
example: (props) => (
|
|
22
|
+
<MediaBanner
|
|
23
|
+
imageUrl='/image.jpg'
|
|
24
|
+
onClose={props.onClose}
|
|
25
|
+
closeAccessibilityLabel='Close banner'
|
|
26
|
+
>
|
|
27
|
+
<MediaBannerTitle>Title</MediaBannerTitle>
|
|
28
|
+
<MediaBannerDescription>Description</MediaBannerDescription>
|
|
29
|
+
</MediaBanner>
|
|
30
|
+
),
|
|
31
|
+
},
|
|
32
|
+
);
|
|
@@ -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,60 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import CryptoIcon from '@ledgerhq/crypto-icons/native';
|
|
3
|
+
import { Placeholder } from '../../Symbols';
|
|
4
|
+
import { MediaButton } from './MediaButton';
|
|
5
|
+
|
|
6
|
+
figma.connect(
|
|
7
|
+
MediaButton,
|
|
8
|
+
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=6389-45680',
|
|
9
|
+
{
|
|
10
|
+
imports: [
|
|
11
|
+
"import { MediaButton } from '@ledgerhq/lumen-ui-rnative'",
|
|
12
|
+
"import { Placeholder } from '@ledgerhq/lumen-ui-rnative/symbols'",
|
|
13
|
+
"import CryptoIcon from '@ledgerhq/crypto-icons/native'",
|
|
14
|
+
],
|
|
15
|
+
props: {
|
|
16
|
+
appearance: figma.enum('appearance', {
|
|
17
|
+
plain: 'gray',
|
|
18
|
+
transparent: 'transparent',
|
|
19
|
+
'no-background': 'no-background',
|
|
20
|
+
}),
|
|
21
|
+
size: figma.enum('size', {
|
|
22
|
+
sm: 'sm',
|
|
23
|
+
md: 'md',
|
|
24
|
+
}),
|
|
25
|
+
leadingContent: figma.enum('leading-content', {
|
|
26
|
+
'interface-icon': figma.enum('size', {
|
|
27
|
+
sm: <Placeholder size={24} />,
|
|
28
|
+
md: <Placeholder size={32} />,
|
|
29
|
+
}),
|
|
30
|
+
coin: figma.enum('size', {
|
|
31
|
+
sm: <CryptoIcon ledgerId='bitcoin' ticker='BTC' size={24} />,
|
|
32
|
+
md: <CryptoIcon ledgerId='bitcoin' ticker='BTC' size={32} />,
|
|
33
|
+
}),
|
|
34
|
+
stock: figma.enum('size', {
|
|
35
|
+
sm: <CryptoIcon size={24} ledgerId='walmart' ticker='WMT' />,
|
|
36
|
+
md: <CryptoIcon size={32} ledgerId='walmart' ticker='WMT' />,
|
|
37
|
+
}),
|
|
38
|
+
none: undefined,
|
|
39
|
+
}),
|
|
40
|
+
leadingContentShape: figma.enum('leading-content', {
|
|
41
|
+
'interface-icon': 'flat',
|
|
42
|
+
coin: 'rounded',
|
|
43
|
+
stock: 'rounded',
|
|
44
|
+
none: 'flat',
|
|
45
|
+
}),
|
|
46
|
+
children: figma.string('label'),
|
|
47
|
+
},
|
|
48
|
+
example: (props) => (
|
|
49
|
+
<MediaButton
|
|
50
|
+
appearance={props.appearance}
|
|
51
|
+
size={props.size}
|
|
52
|
+
leadingContent={props.leadingContent}
|
|
53
|
+
leadingContentShape={props.leadingContentShape}
|
|
54
|
+
onPress={() => {}}
|
|
55
|
+
>
|
|
56
|
+
{props.children}
|
|
57
|
+
</MediaButton>
|
|
58
|
+
),
|
|
59
|
+
},
|
|
60
|
+
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import { Tag } from '../Tag';
|
|
3
|
+
import { MediaCard, MediaCardTitle } from './MediaCard';
|
|
4
|
+
|
|
5
|
+
figma.connect(
|
|
6
|
+
MediaCard,
|
|
7
|
+
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=15160-2853',
|
|
8
|
+
{
|
|
9
|
+
imports: [
|
|
10
|
+
"import { MediaCard, MediaCardTitle } from '@ledgerhq/lumen-ui-rnative'",
|
|
11
|
+
"import { Tag } from '@ledgerhq/lumen-ui-rnative'",
|
|
12
|
+
],
|
|
13
|
+
props: {
|
|
14
|
+
title: figma.string('title'),
|
|
15
|
+
tag: figma.boolean('show-tag', {
|
|
16
|
+
true: <Tag label='Label' appearance='base' />,
|
|
17
|
+
false: undefined,
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
example: (props) => (
|
|
21
|
+
<MediaCard imageUrl='/image.jpg' onPress={() => {}} onClose={() => {}}>
|
|
22
|
+
{props.tag}
|
|
23
|
+
<MediaCardTitle>{props.title}</MediaCardTitle>
|
|
24
|
+
</MediaCard>
|
|
25
|
+
),
|
|
26
|
+
},
|
|
27
|
+
);
|
|
@@ -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} />
|