@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
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import CryptoIcon from '@ledgerhq/crypto-icons/native';
|
|
3
|
+
import { Placeholder, Settings } from '../../Symbols';
|
|
4
|
+
import { Spot } from '../Spot';
|
|
5
|
+
import { Tag } from '../Tag';
|
|
6
|
+
import { Trend } from '../Trend';
|
|
7
|
+
import {
|
|
8
|
+
Tile,
|
|
9
|
+
TileContent,
|
|
10
|
+
TileDescription,
|
|
11
|
+
TileTitle,
|
|
12
|
+
TileTrailingContent,
|
|
13
|
+
} from './Tile';
|
|
14
|
+
|
|
15
|
+
const sharedProps = {
|
|
16
|
+
title: figma.string('title'),
|
|
17
|
+
description: figma.boolean('show-description', {
|
|
18
|
+
true: figma.boolean('show-network', {
|
|
19
|
+
true: (
|
|
20
|
+
<TileDescription>
|
|
21
|
+
Description <CryptoIcon ledgerId='ethereum' ticker='ETH' size={20} />
|
|
22
|
+
</TileDescription>
|
|
23
|
+
),
|
|
24
|
+
false: <TileDescription>Description</TileDescription>,
|
|
25
|
+
}),
|
|
26
|
+
false: undefined,
|
|
27
|
+
}),
|
|
28
|
+
appearance: figma.enum('appearance', {
|
|
29
|
+
'no-background': 'no-background',
|
|
30
|
+
card: 'card',
|
|
31
|
+
}),
|
|
32
|
+
disabled: figma.enum('state', {
|
|
33
|
+
disabled: true,
|
|
34
|
+
}),
|
|
35
|
+
leadingContent: figma.enum('leading-icon', {
|
|
36
|
+
coin: <CryptoIcon ledgerId='bitcoin' ticker='BTC' size={48} />,
|
|
37
|
+
spot: <Spot appearance='icon' icon={Settings} />,
|
|
38
|
+
'interface-icon': <Placeholder size={24} />,
|
|
39
|
+
}),
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const sharedImports = [
|
|
43
|
+
"import { Tile, Spot, TileContent, TileTitle, TileDescription, TileTrailingContent } from '@ledgerhq/lumen-ui-rnative'",
|
|
44
|
+
"import { Tag } from '@ledgerhq/lumen-ui-rnative'",
|
|
45
|
+
"import { Text } from '@ledgerhq/lumen-ui-rnative'",
|
|
46
|
+
"import { Placeholder, Settings } from '@ledgerhq/lumen-ui-rnative/symbols'",
|
|
47
|
+
"import CryptoIcon from '@ledgerhq/crypto-icons/native'",
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
figma.connect(
|
|
51
|
+
Tile,
|
|
52
|
+
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=5783-1328',
|
|
53
|
+
{
|
|
54
|
+
imports: sharedImports,
|
|
55
|
+
variant: { 'show-additionnal-content': false },
|
|
56
|
+
props: sharedProps,
|
|
57
|
+
example: (props) => (
|
|
58
|
+
<Tile
|
|
59
|
+
appearance={props.appearance}
|
|
60
|
+
disabled={props.disabled}
|
|
61
|
+
onPress={() => {}}
|
|
62
|
+
>
|
|
63
|
+
{props.leadingContent}
|
|
64
|
+
<TileContent>
|
|
65
|
+
<TileTitle>{props.title}</TileTitle>
|
|
66
|
+
{props.description}
|
|
67
|
+
</TileContent>
|
|
68
|
+
</Tile>
|
|
69
|
+
),
|
|
70
|
+
},
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
figma.connect(
|
|
74
|
+
Tile,
|
|
75
|
+
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=5783-1328',
|
|
76
|
+
{
|
|
77
|
+
imports: sharedImports,
|
|
78
|
+
variant: { 'show-additionnal-content': true },
|
|
79
|
+
props: {
|
|
80
|
+
...sharedProps,
|
|
81
|
+
tag: figma.boolean('show-tag', {
|
|
82
|
+
true: <Tag label='Label' appearance='base' />,
|
|
83
|
+
false: undefined,
|
|
84
|
+
}),
|
|
85
|
+
subInfo: figma.boolean('show-sub-info', {
|
|
86
|
+
true: <Tag icon={Settings} label='Label' appearance='base' />,
|
|
87
|
+
false: undefined,
|
|
88
|
+
}),
|
|
89
|
+
trend: figma.boolean('show-trend', {
|
|
90
|
+
true: <Trend value={7.87} size='sm' />,
|
|
91
|
+
false: undefined,
|
|
92
|
+
}),
|
|
93
|
+
},
|
|
94
|
+
example: (props) => (
|
|
95
|
+
<Tile
|
|
96
|
+
appearance={props.appearance}
|
|
97
|
+
disabled={props.disabled}
|
|
98
|
+
onPress={() => {}}
|
|
99
|
+
>
|
|
100
|
+
{props.leadingContent}
|
|
101
|
+
<TileContent>
|
|
102
|
+
<TileTitle>{props.title}</TileTitle>
|
|
103
|
+
{props.description}
|
|
104
|
+
<TileTrailingContent>
|
|
105
|
+
{props.tag}
|
|
106
|
+
{props.subInfo}
|
|
107
|
+
{props.trend}
|
|
108
|
+
</TileTrailingContent>
|
|
109
|
+
</TileContent>
|
|
110
|
+
</Tile>
|
|
111
|
+
),
|
|
112
|
+
},
|
|
113
|
+
);
|
|
@@ -4,11 +4,7 @@ import { Tile } from './Tile';
|
|
|
4
4
|
import {
|
|
5
5
|
CustomTabs,
|
|
6
6
|
Tab,
|
|
7
|
-
DoVsDontRow,
|
|
8
|
-
DoBlockItem,
|
|
9
|
-
DontBlockItem,
|
|
10
7
|
} from '../../../../.storybook/components';
|
|
11
|
-
import CommonRulesDoAndDont from '../../../../.storybook/components/DoVsDont/CommonRulesDoAndDont.mdx';
|
|
12
8
|
import { Box } from '../Utility';
|
|
13
9
|
|
|
14
10
|
<Meta title='Core/Tile' of={TileStories} />
|
|
@@ -250,56 +246,7 @@ import { Tile, TileContent, TileTitle, TileDescription, Spot } from '@ledgerhq/l
|
|
|
250
246
|
</Tile>
|
|
251
247
|
```
|
|
252
248
|
|
|
253
|
-
## Do's and Don'ts
|
|
254
249
|
|
|
255
|
-
<Box lx={{ flexDirection: 'column', gap: 's24' }}>
|
|
256
|
-
|
|
257
|
-
### Trailing Content
|
|
258
|
-
|
|
259
|
-
<DoVsDontRow>
|
|
260
|
-
<DoBlockItem
|
|
261
|
-
title='Use TileTrailingContent for additional elements'
|
|
262
|
-
description='Wrap Tags, labels, or supplementary content inside TileTrailingContent within TileContent for proper spacing.'
|
|
263
|
-
>
|
|
264
|
-
|
|
265
|
-
```tsx
|
|
266
|
-
{/* prettier-ignore */}
|
|
267
|
-
<Tile>
|
|
268
|
-
<Spot appearance="icon" icon={Settings} />
|
|
269
|
-
<TileContent>
|
|
270
|
-
<TileTitle>Title</TileTitle>
|
|
271
|
-
<TileDescription>Description</TileDescription>
|
|
272
|
-
<TileTrailingContent>
|
|
273
|
-
<Tag label="Active" />
|
|
274
|
-
</TileTrailingContent>
|
|
275
|
-
</TileContent>
|
|
276
|
-
</Tile>
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
</DoBlockItem>
|
|
280
|
-
<DontBlockItem
|
|
281
|
-
title="Don't place trailing content directly in TileContent"
|
|
282
|
-
description='Placing Tags or other elements directly in TileContent without TileTrailingContent results in incorrect spacing.'
|
|
283
|
-
>
|
|
284
|
-
|
|
285
|
-
```tsx
|
|
286
|
-
{/* prettier-ignore */}
|
|
287
|
-
<Tile>
|
|
288
|
-
<Spot appearance="icon" icon={Settings} />
|
|
289
|
-
<TileContent>
|
|
290
|
-
<TileTitle>Title</TileTitle>
|
|
291
|
-
<TileDescription>Description</TileDescription>
|
|
292
|
-
<Tag label="Active" />
|
|
293
|
-
</TileContent>
|
|
294
|
-
</Tile>
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
</DontBlockItem>
|
|
298
|
-
</DoVsDontRow>
|
|
299
|
-
|
|
300
|
-
<CommonRulesDoAndDont />
|
|
301
|
-
|
|
302
|
-
</Box>
|
|
303
250
|
|
|
304
251
|
</Tab>
|
|
305
252
|
</CustomTabs>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import { Placeholder } from '../../Symbols';
|
|
3
|
+
import { TileButton } from './TileButton';
|
|
4
|
+
import type { TileButtonProps } from './types';
|
|
5
|
+
|
|
6
|
+
figma.connect(
|
|
7
|
+
TileButton,
|
|
8
|
+
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=11291-620',
|
|
9
|
+
{
|
|
10
|
+
imports: [
|
|
11
|
+
"import { TileButton } from '@ledgerhq/lumen-ui-rnative'",
|
|
12
|
+
"import { Placeholder } from '@ledgerhq/lumen-ui-rnative/symbols'",
|
|
13
|
+
],
|
|
14
|
+
props: {
|
|
15
|
+
disabled: figma.enum('state', {
|
|
16
|
+
disabled: true,
|
|
17
|
+
}),
|
|
18
|
+
appearance: figma.enum('appearance', {
|
|
19
|
+
gray: 'gray',
|
|
20
|
+
red: 'red',
|
|
21
|
+
}),
|
|
22
|
+
children: figma.string('label'),
|
|
23
|
+
icon: Placeholder,
|
|
24
|
+
},
|
|
25
|
+
example: (
|
|
26
|
+
props: Omit<TileButtonProps, 'icon'> & {
|
|
27
|
+
icon: any;
|
|
28
|
+
},
|
|
29
|
+
) => (
|
|
30
|
+
<TileButton
|
|
31
|
+
disabled={props.disabled}
|
|
32
|
+
appearance={props.appearance}
|
|
33
|
+
icon={props.icon}
|
|
34
|
+
onPress={() => {}}
|
|
35
|
+
>
|
|
36
|
+
{props.children}
|
|
37
|
+
</TileButton>
|
|
38
|
+
),
|
|
39
|
+
},
|
|
40
|
+
);
|
|
@@ -2,8 +2,6 @@ import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
|
2
2
|
import * as TileButtonStories from './TileButton.stories';
|
|
3
3
|
import { TileButton } from './TileButton';
|
|
4
4
|
import { CustomTabs, Tab } from '../../../../.storybook/components';
|
|
5
|
-
import { DoVsDontRow, DoBlockItem, DontBlockItem } from '../../../../.storybook/components/DoVsDont';
|
|
6
|
-
import CommonRulesDoAndDont from '../../../../.storybook/components/DoVsDont/CommonRulesDoAndDont.mdx';
|
|
7
5
|
|
|
8
6
|
<Meta title='Core/TileButton' of={TileButtonStories} />
|
|
9
7
|
|
|
@@ -32,9 +30,18 @@ TileButton is a compact interactive component that displays an icon above a labe
|
|
|
32
30
|
<Canvas of={TileButtonStories.Base} />
|
|
33
31
|
<Controls of={TileButtonStories.Base} />
|
|
34
32
|
|
|
33
|
+
### Appearance
|
|
34
|
+
|
|
35
|
+
TileButton comes in two appearances:
|
|
36
|
+
|
|
37
|
+
- **gray** (default): neutral surface background with base text and icon color
|
|
38
|
+
- **red**: same surface background but with red text and icon, for destructive or error actions
|
|
39
|
+
|
|
40
|
+
<Canvas of={TileButtonStories.AppearanceShowcase} />
|
|
41
|
+
|
|
35
42
|
### States
|
|
36
43
|
|
|
37
|
-
TileButton supports default, pressed, and disabled states:
|
|
44
|
+
TileButton supports default, pressed, and disabled states. The disabled state renders identically regardless of appearance:
|
|
38
45
|
|
|
39
46
|
<Canvas of={TileButtonStories.DisabledShowcase} />
|
|
40
47
|
|
|
@@ -154,44 +161,6 @@ Or use the `style` prop for escape-hatch styling:
|
|
|
154
161
|
</TileButton>
|
|
155
162
|
```
|
|
156
163
|
|
|
157
|
-
## Do's and Don'ts
|
|
158
|
-
|
|
159
|
-
<div className='flex flex-col gap-24'>
|
|
160
|
-
<DoVsDontRow>
|
|
161
|
-
<DoBlockItem
|
|
162
|
-
title='Use the icon prop'
|
|
163
|
-
description='Pass icon as a component reference'
|
|
164
|
-
>
|
|
165
|
-
|
|
166
|
-
{/* prettier-ignore */}
|
|
167
|
-
```tsx
|
|
168
|
-
import { Plus } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
169
|
-
|
|
170
|
-
<TileButton icon={Plus} onPress={() => {}}>
|
|
171
|
-
Add
|
|
172
|
-
</TileButton>
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
</DoBlockItem>
|
|
176
|
-
<DontBlockItem
|
|
177
|
-
title="Don't include icon in children"
|
|
178
|
-
description='The icon and children are separate'
|
|
179
|
-
>
|
|
180
|
-
|
|
181
|
-
{/* prettier-ignore */}
|
|
182
|
-
```tsx
|
|
183
|
-
import { Plus } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
184
|
-
|
|
185
|
-
<TileButton icon={Plus} onPress={() => {}}>
|
|
186
|
-
<Plus /> Add
|
|
187
|
-
</TileButton>
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
</DontBlockItem>
|
|
191
|
-
</DoVsDontRow>
|
|
192
|
-
|
|
193
|
-
<CommonRulesDoAndDont />
|
|
194
|
-
</div>
|
|
195
164
|
|
|
196
165
|
## Platform Considerations
|
|
197
166
|
|
|
@@ -23,6 +23,10 @@ const meta: Meta<typeof TileButton> = {
|
|
|
23
23
|
mapping: iconOptions,
|
|
24
24
|
control: { type: 'select' },
|
|
25
25
|
},
|
|
26
|
+
appearance: {
|
|
27
|
+
options: ['gray', 'red'],
|
|
28
|
+
control: { type: 'select' },
|
|
29
|
+
},
|
|
26
30
|
onPress: {
|
|
27
31
|
action: 'pressed',
|
|
28
32
|
},
|
|
@@ -47,14 +51,34 @@ export const Base: Story = {
|
|
|
47
51
|
},
|
|
48
52
|
};
|
|
49
53
|
|
|
54
|
+
export const AppearanceShowcase: Story = {
|
|
55
|
+
render: (args) => (
|
|
56
|
+
<View style={{ gap: 16 }}>
|
|
57
|
+
<View style={{ flexDirection: 'row', gap: 16 }}>
|
|
58
|
+
<TileButton icon={Settings} onPress={args.onPress}>
|
|
59
|
+
Gray
|
|
60
|
+
</TileButton>
|
|
61
|
+
<TileButton icon={Settings} appearance='red' onPress={args.onPress}>
|
|
62
|
+
Red
|
|
63
|
+
</TileButton>
|
|
64
|
+
</View>
|
|
65
|
+
</View>
|
|
66
|
+
),
|
|
67
|
+
};
|
|
68
|
+
|
|
50
69
|
export const DisabledShowcase: Story = {
|
|
51
70
|
render: (args) => (
|
|
52
71
|
<View style={{ flexDirection: 'row', gap: 16 }}>
|
|
53
|
-
<TileButton icon={Settings} onPress={args.onPress}>
|
|
54
|
-
Enabled
|
|
55
|
-
</TileButton>
|
|
56
72
|
<TileButton icon={Settings} onPress={args.onPress} disabled>
|
|
57
|
-
|
|
73
|
+
Gray disabled
|
|
74
|
+
</TileButton>
|
|
75
|
+
<TileButton
|
|
76
|
+
icon={Settings}
|
|
77
|
+
appearance='red'
|
|
78
|
+
onPress={args.onPress}
|
|
79
|
+
disabled
|
|
80
|
+
>
|
|
81
|
+
Red disabled
|
|
58
82
|
</TileButton>
|
|
59
83
|
</View>
|
|
60
84
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, it, expect, jest } from '@jest/globals';
|
|
2
2
|
import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
|
|
3
3
|
import { render, screen, fireEvent } from '@testing-library/react-native';
|
|
4
|
-
import type { ViewStyle } from 'react-native';
|
|
4
|
+
import type { TextStyle, ViewStyle } from 'react-native';
|
|
5
5
|
|
|
6
6
|
import { Settings } from '../../Symbols';
|
|
7
7
|
import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
|
|
@@ -100,4 +100,38 @@ describe('TileButton Component', () => {
|
|
|
100
100
|
expect(button.props.style).toBeDefined();
|
|
101
101
|
});
|
|
102
102
|
});
|
|
103
|
+
|
|
104
|
+
describe('Appearances', () => {
|
|
105
|
+
const { dark: darkTheme } = ledgerLiveThemes;
|
|
106
|
+
|
|
107
|
+
it.each([
|
|
108
|
+
['gray' as const, darkTheme.colors.text.base],
|
|
109
|
+
['red' as const, darkTheme.colors.text.error],
|
|
110
|
+
])(
|
|
111
|
+
'should apply correct text color for %s appearance',
|
|
112
|
+
(appearance, expectedColor) => {
|
|
113
|
+
renderWithProvider(
|
|
114
|
+
<TileButton icon={Settings} appearance={appearance}>
|
|
115
|
+
Label
|
|
116
|
+
</TileButton>,
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
const label = screen.getByText('Label');
|
|
120
|
+
const style = label.props.style as TextStyle;
|
|
121
|
+
expect(style.color).toBe(expectedColor);
|
|
122
|
+
},
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
it('should override red appearance with disabled color when disabled', () => {
|
|
126
|
+
renderWithProvider(
|
|
127
|
+
<TileButton icon={Settings} appearance='red' disabled>
|
|
128
|
+
Label
|
|
129
|
+
</TileButton>,
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
const label = screen.getByText('Label');
|
|
133
|
+
const style = label.props.style as TextStyle;
|
|
134
|
+
expect(style.color).toBe(darkTheme.colors.text.disabled);
|
|
135
|
+
});
|
|
136
|
+
});
|
|
103
137
|
});
|
|
@@ -26,40 +26,55 @@ const useStyles = ({
|
|
|
26
26
|
disabled,
|
|
27
27
|
pressed,
|
|
28
28
|
isFull,
|
|
29
|
+
appearance,
|
|
29
30
|
}: {
|
|
30
31
|
disabled: boolean;
|
|
31
32
|
pressed: boolean;
|
|
32
33
|
isFull: boolean;
|
|
34
|
+
appearance: 'gray' | 'red';
|
|
33
35
|
}) => {
|
|
34
36
|
return useStyleSheet(
|
|
35
|
-
(t) =>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
37
|
+
(t) => {
|
|
38
|
+
const foregroundColors: Record<'gray' | 'red', string> = {
|
|
39
|
+
gray: t.colors.text.base,
|
|
40
|
+
red: t.colors.text.error,
|
|
41
|
+
};
|
|
42
|
+
const foregroundColor = disabled
|
|
43
|
+
? t.colors.text.disabled
|
|
44
|
+
: foregroundColors[appearance];
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
container: StyleSheet.flatten([
|
|
48
|
+
{
|
|
49
|
+
flexDirection: 'column',
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
justifyContent: 'center',
|
|
52
|
+
gap: t.spacings.s8,
|
|
53
|
+
padding: t.spacings.s12,
|
|
54
|
+
borderRadius: t.borderRadius.md,
|
|
55
|
+
backgroundColor: t.colors.bg.surface,
|
|
56
|
+
},
|
|
57
|
+
isFull && { width: t.sizes.full },
|
|
58
|
+
pressed &&
|
|
59
|
+
!disabled && {
|
|
60
|
+
backgroundColor: t.colors.bg.surfacePressed,
|
|
61
|
+
},
|
|
62
|
+
disabled && { backgroundColor: t.colors.bg.disabled },
|
|
63
|
+
]),
|
|
64
|
+
label: StyleSheet.flatten([
|
|
65
|
+
t.typographies.body2SemiBold,
|
|
66
|
+
{
|
|
67
|
+
textAlign: 'center',
|
|
68
|
+
color: foregroundColor,
|
|
69
|
+
},
|
|
70
|
+
]),
|
|
71
|
+
icon: {
|
|
72
|
+
flexShrink: 0,
|
|
73
|
+
color: foregroundColor,
|
|
55
74
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
color: disabled ? t.colors.text.disabled : t.colors.text.base,
|
|
60
|
-
},
|
|
61
|
-
}),
|
|
62
|
-
[disabled, pressed, isFull],
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
[disabled, pressed, isFull, appearance],
|
|
63
78
|
);
|
|
64
79
|
};
|
|
65
80
|
|
|
@@ -84,6 +99,7 @@ export const TileButton = ({
|
|
|
84
99
|
children,
|
|
85
100
|
disabled: disabledProp = false,
|
|
86
101
|
isFull = false,
|
|
102
|
+
appearance = 'gray',
|
|
87
103
|
numberOfLines = 2,
|
|
88
104
|
...props
|
|
89
105
|
}: TileButtonProps) => {
|
|
@@ -107,6 +123,7 @@ export const TileButton = ({
|
|
|
107
123
|
disabled={disabled}
|
|
108
124
|
pressed={pressed}
|
|
109
125
|
isFull={isFull}
|
|
126
|
+
appearance={appearance}
|
|
110
127
|
IconProp={IconProp}
|
|
111
128
|
numberOfLines={numberOfLines}
|
|
112
129
|
>
|
|
@@ -121,6 +138,7 @@ type TileButtonContentProps = PropsWithChildren<{
|
|
|
121
138
|
disabled: boolean;
|
|
122
139
|
pressed: boolean;
|
|
123
140
|
isFull: boolean;
|
|
141
|
+
appearance: 'gray' | 'red';
|
|
124
142
|
IconProp: TileButtonProps['icon'];
|
|
125
143
|
numberOfLines?: number;
|
|
126
144
|
}>;
|
|
@@ -129,11 +147,12 @@ const TileButtonContent: FC<TileButtonContentProps> = ({
|
|
|
129
147
|
disabled,
|
|
130
148
|
pressed,
|
|
131
149
|
isFull,
|
|
150
|
+
appearance,
|
|
132
151
|
IconProp,
|
|
133
152
|
numberOfLines,
|
|
134
153
|
children,
|
|
135
154
|
}) => {
|
|
136
|
-
const styles = useStyles({ disabled, pressed, isFull });
|
|
155
|
+
const styles = useStyles({ disabled, pressed, isFull, appearance });
|
|
137
156
|
|
|
138
157
|
return (
|
|
139
158
|
<View style={styles.container} testID='tile-button-content'>
|
|
@@ -23,6 +23,11 @@ export type TileButtonProps = {
|
|
|
23
23
|
* @default false
|
|
24
24
|
*/
|
|
25
25
|
isFull?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The visual appearance of the button.
|
|
28
|
+
* @default 'gray'
|
|
29
|
+
*/
|
|
30
|
+
appearance?: 'gray' | 'red';
|
|
26
31
|
/**
|
|
27
32
|
* Maximum number of lines for the label text.
|
|
28
33
|
* Text will be truncated with ellipsis if it exceeds this limit.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import { Text } from '../Utility/Text';
|
|
3
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from './Tooltip';
|
|
4
|
+
|
|
5
|
+
figma.connect(
|
|
6
|
+
Tooltip,
|
|
7
|
+
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=6387%3A409',
|
|
8
|
+
{
|
|
9
|
+
imports: [
|
|
10
|
+
"import { Tooltip, TooltipTrigger, TooltipContent } from '@ledgerhq/lumen-ui-rnative'",
|
|
11
|
+
],
|
|
12
|
+
props: {
|
|
13
|
+
header: figma.nestedProps('.bottom-sheet-header', {
|
|
14
|
+
title: figma.string('title'),
|
|
15
|
+
description: figma.string('description'),
|
|
16
|
+
}),
|
|
17
|
+
},
|
|
18
|
+
example: (props) => (
|
|
19
|
+
<Tooltip>
|
|
20
|
+
<TooltipTrigger>
|
|
21
|
+
<></>
|
|
22
|
+
</TooltipTrigger>
|
|
23
|
+
<TooltipContent
|
|
24
|
+
title={props.header.title}
|
|
25
|
+
content={<Text>{props.header.description}</Text>}
|
|
26
|
+
/>
|
|
27
|
+
</Tooltip>
|
|
28
|
+
),
|
|
29
|
+
},
|
|
30
|
+
);
|