@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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-native';
|
|
2
|
-
import { Text, View } from 'react-native';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
3
2
|
import { Information } from '../../Symbols';
|
|
4
3
|
import { InteractiveIcon } from '../InteractiveIcon';
|
|
5
4
|
import { Tag } from '../Tag';
|
|
6
5
|
import { Tooltip, TooltipContent, TooltipTrigger } from '../Tooltip';
|
|
6
|
+
import { Box, Text } from '../Utility';
|
|
7
7
|
import {
|
|
8
8
|
DescriptionItem,
|
|
9
9
|
DescriptionItemLabel,
|
|
@@ -12,12 +12,6 @@ import {
|
|
|
12
12
|
DescriptionItemValue,
|
|
13
13
|
} from './DescriptionItem';
|
|
14
14
|
|
|
15
|
-
const Container = ({ children }: { children: React.ReactNode }) => (
|
|
16
|
-
<View style={{ padding: 8, backgroundColor: '#ffffff', width: 320 }}>
|
|
17
|
-
{children}
|
|
18
|
-
</View>
|
|
19
|
-
);
|
|
20
|
-
|
|
21
15
|
const meta: Meta<typeof DescriptionItem> = {
|
|
22
16
|
component: DescriptionItem,
|
|
23
17
|
id: 'rnative-descriptionitem',
|
|
@@ -30,6 +24,7 @@ const meta: Meta<typeof DescriptionItem> = {
|
|
|
30
24
|
},
|
|
31
25
|
parameters: {
|
|
32
26
|
layout: 'centered',
|
|
27
|
+
backgrounds: { default: 'light' },
|
|
33
28
|
docs: {
|
|
34
29
|
source: {
|
|
35
30
|
language: 'tsx',
|
|
@@ -40,9 +35,9 @@ const meta: Meta<typeof DescriptionItem> = {
|
|
|
40
35
|
},
|
|
41
36
|
decorators: [
|
|
42
37
|
(Story) => (
|
|
43
|
-
<
|
|
38
|
+
<Box lx={{ padding: 's8', width: 's320' }}>
|
|
44
39
|
<Story />
|
|
45
|
-
</
|
|
40
|
+
</Box>
|
|
46
41
|
),
|
|
47
42
|
],
|
|
48
43
|
};
|
|
@@ -71,7 +66,7 @@ export const SizeShowcase: Story = {
|
|
|
71
66
|
size: 'md',
|
|
72
67
|
},
|
|
73
68
|
render: () => (
|
|
74
|
-
<
|
|
69
|
+
<Box lx={{ gap: 's16' }}>
|
|
75
70
|
<DescriptionItem size='md'>
|
|
76
71
|
<DescriptionItemLeading>
|
|
77
72
|
<DescriptionItemLabel>Network</DescriptionItemLabel>
|
|
@@ -89,7 +84,7 @@ export const SizeShowcase: Story = {
|
|
|
89
84
|
<Tag size='md' label='Ethereum' appearance='base' />
|
|
90
85
|
</DescriptionItemTrailing>
|
|
91
86
|
</DescriptionItem>
|
|
92
|
-
|
|
87
|
+
|
|
93
88
|
<DescriptionItem size='sm'>
|
|
94
89
|
<DescriptionItemLeading>
|
|
95
90
|
<DescriptionItemLabel>Network</DescriptionItemLabel>
|
|
@@ -107,13 +102,13 @@ export const SizeShowcase: Story = {
|
|
|
107
102
|
<Tag size='sm' label='Ethereum' appearance='base' />
|
|
108
103
|
</DescriptionItemTrailing>
|
|
109
104
|
</DescriptionItem>
|
|
110
|
-
</
|
|
105
|
+
</Box>
|
|
111
106
|
),
|
|
112
107
|
};
|
|
113
108
|
|
|
114
109
|
export const TrailingVariants: Story = {
|
|
115
110
|
render: () => (
|
|
116
|
-
<
|
|
111
|
+
<Box lx={{ gap: 's16' }}>
|
|
117
112
|
<DescriptionItem>
|
|
118
113
|
<DescriptionItemLeading>
|
|
119
114
|
<DescriptionItemLabel>Plain value</DescriptionItemLabel>
|
|
@@ -141,13 +136,13 @@ export const TrailingVariants: Story = {
|
|
|
141
136
|
<Tag size='md' label='New' appearance='accent' />
|
|
142
137
|
</DescriptionItemTrailing>
|
|
143
138
|
</DescriptionItem>
|
|
144
|
-
</
|
|
139
|
+
</Box>
|
|
145
140
|
),
|
|
146
141
|
};
|
|
147
142
|
|
|
148
143
|
export const WithInfoIcon: Story = {
|
|
149
144
|
render: () => (
|
|
150
|
-
<
|
|
145
|
+
<Box lx={{ gap: 's16' }}>
|
|
151
146
|
<DescriptionItem>
|
|
152
147
|
<DescriptionItemLeading>
|
|
153
148
|
<DescriptionItemLabel>Fees</DescriptionItemLabel>
|
|
@@ -189,47 +184,32 @@ export const WithInfoIcon: Story = {
|
|
|
189
184
|
<DescriptionItemValue>~30 min</DescriptionItemValue>
|
|
190
185
|
</DescriptionItemTrailing>
|
|
191
186
|
</DescriptionItem>
|
|
192
|
-
</
|
|
187
|
+
</Box>
|
|
193
188
|
),
|
|
194
189
|
};
|
|
195
190
|
|
|
196
|
-
export const
|
|
191
|
+
export const PriorityShowcase: Story = {
|
|
197
192
|
render: () => (
|
|
198
|
-
<
|
|
199
|
-
<DescriptionItem>
|
|
200
|
-
<DescriptionItemLeading>
|
|
201
|
-
<DescriptionItemLabel>
|
|
202
|
-
This is a very long label that should go to a second line.
|
|
203
|
-
</DescriptionItemLabel>
|
|
204
|
-
</DescriptionItemLeading>
|
|
205
|
-
<DescriptionItemTrailing>
|
|
206
|
-
<DescriptionItemValue>0.001 BTC</DescriptionItemValue>
|
|
207
|
-
</DescriptionItemTrailing>
|
|
208
|
-
</DescriptionItem>
|
|
209
|
-
|
|
210
|
-
<DescriptionItem>
|
|
193
|
+
<Box lx={{ gap: 's16' }}>
|
|
194
|
+
<DescriptionItem priority='end'>
|
|
211
195
|
<DescriptionItemLeading>
|
|
212
|
-
<DescriptionItemLabel>
|
|
196
|
+
<DescriptionItemLabel>priority="end" (default)</DescriptionItemLabel>
|
|
213
197
|
</DescriptionItemLeading>
|
|
214
198
|
<DescriptionItemTrailing>
|
|
215
|
-
<DescriptionItemValue>
|
|
216
|
-
0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
|
|
217
|
-
</DescriptionItemValue>
|
|
199
|
+
<DescriptionItemValue>0xd8dA6BF26964aF9D7eEd9e</DescriptionItemValue>
|
|
218
200
|
</DescriptionItemTrailing>
|
|
219
201
|
</DescriptionItem>
|
|
220
202
|
|
|
221
|
-
<DescriptionItem>
|
|
203
|
+
<DescriptionItem priority='start'>
|
|
222
204
|
<DescriptionItemLeading>
|
|
223
205
|
<DescriptionItemLabel>
|
|
224
|
-
|
|
206
|
+
priority="start" long label which will not truncate
|
|
225
207
|
</DescriptionItemLabel>
|
|
226
208
|
</DescriptionItemLeading>
|
|
227
209
|
<DescriptionItemTrailing>
|
|
228
|
-
<DescriptionItemValue>
|
|
229
|
-
0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
|
|
230
|
-
</DescriptionItemValue>
|
|
210
|
+
<DescriptionItemValue>0xd8dA6BF26964aF9D7eEd9e</DescriptionItemValue>
|
|
231
211
|
</DescriptionItemTrailing>
|
|
232
212
|
</DescriptionItem>
|
|
233
|
-
</
|
|
213
|
+
</Box>
|
|
234
214
|
),
|
|
235
215
|
};
|
|
@@ -83,6 +83,30 @@ describe('DescriptionItem', () => {
|
|
|
83
83
|
});
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
+
describe('priority', () => {
|
|
87
|
+
it('in "end" priority, leading shrinks, trailing shows', () => {
|
|
88
|
+
renderDescriptionItem();
|
|
89
|
+
|
|
90
|
+
expect(screen.getByTestId('leading').props.style).toEqual(
|
|
91
|
+
expect.objectContaining({ flexShrink: 1 }),
|
|
92
|
+
);
|
|
93
|
+
expect(screen.getByTestId('trailing').props.style).toEqual(
|
|
94
|
+
expect.objectContaining({ flexShrink: 0 }),
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
it('in "start" priority: trailing shrinks, leading shows', () => {
|
|
99
|
+
renderDescriptionItem({ priority: 'start' });
|
|
100
|
+
|
|
101
|
+
expect(screen.getByTestId('leading').props.style).toEqual(
|
|
102
|
+
expect.objectContaining({ flexShrink: 0 }),
|
|
103
|
+
);
|
|
104
|
+
expect(screen.getByTestId('trailing').props.style).toEqual(
|
|
105
|
+
expect.objectContaining({ flexShrink: 1 }),
|
|
106
|
+
);
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
|
|
86
110
|
describe('DescriptionItemValue', () => {
|
|
87
111
|
it.each([
|
|
88
112
|
['md', typographies.body2SemiBold],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSafeContext } from '@ledgerhq/lumen-utils-shared';
|
|
1
|
+
import { createSafeContext, type Priority } from '@ledgerhq/lumen-utils-shared';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
3
|
import { useStyleSheet } from '../../../styles';
|
|
4
4
|
import { Box, Text } from '../Utility';
|
|
@@ -20,6 +20,11 @@ const [DescriptionItemSizeProvider, useDescriptionItemSizeContext] =
|
|
|
20
20
|
size: 'md',
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
+
const [DescriptionItemPriorityProvider, useDescriptionItemPriorityContext] =
|
|
24
|
+
createSafeContext<{ priority?: Priority }>('DescriptionItemPriority', {
|
|
25
|
+
priority: undefined,
|
|
26
|
+
});
|
|
27
|
+
|
|
23
28
|
/**
|
|
24
29
|
* A compound component for displaying a key-value description row.
|
|
25
30
|
* Composed with DescriptionItemLeading / DescriptionItemLabel (key side)
|
|
@@ -42,6 +47,7 @@ export const DescriptionItem = ({
|
|
|
42
47
|
lx = {},
|
|
43
48
|
style,
|
|
44
49
|
size = 'md',
|
|
50
|
+
priority = 'end',
|
|
45
51
|
...props
|
|
46
52
|
}: DescriptionItemProps) => {
|
|
47
53
|
const styles = useStyleSheet(
|
|
@@ -58,9 +64,15 @@ export const DescriptionItem = ({
|
|
|
58
64
|
|
|
59
65
|
return (
|
|
60
66
|
<DescriptionItemSizeProvider value={{ size }}>
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
<DescriptionItemPriorityProvider value={{ priority }}>
|
|
68
|
+
<Box
|
|
69
|
+
lx={lx}
|
|
70
|
+
style={StyleSheet.flatten([styles.root, style])}
|
|
71
|
+
{...props}
|
|
72
|
+
>
|
|
73
|
+
{children}
|
|
74
|
+
</Box>
|
|
75
|
+
</DescriptionItemPriorityProvider>
|
|
64
76
|
</DescriptionItemSizeProvider>
|
|
65
77
|
);
|
|
66
78
|
};
|
|
@@ -75,17 +87,23 @@ export const DescriptionItemLeading = ({
|
|
|
75
87
|
style,
|
|
76
88
|
...props
|
|
77
89
|
}: DescriptionItemLeadingProps) => {
|
|
90
|
+
const { priority } = useDescriptionItemPriorityContext({
|
|
91
|
+
consumerName: 'DescriptionItemLeading',
|
|
92
|
+
contextRequired: false,
|
|
93
|
+
});
|
|
94
|
+
|
|
78
95
|
const styles = useStyleSheet(
|
|
79
96
|
(t) => ({
|
|
80
97
|
leading: {
|
|
81
|
-
|
|
98
|
+
flexGrow: 1,
|
|
99
|
+
flexShrink: priority === 'end' ? 1 : 0,
|
|
82
100
|
minWidth: 0,
|
|
83
101
|
flexDirection: 'row',
|
|
84
102
|
alignItems: 'center',
|
|
85
103
|
gap: t.spacings.s4,
|
|
86
104
|
},
|
|
87
105
|
}),
|
|
88
|
-
[],
|
|
106
|
+
[priority],
|
|
89
107
|
);
|
|
90
108
|
|
|
91
109
|
return (
|
|
@@ -151,17 +169,22 @@ export const DescriptionItemTrailing = ({
|
|
|
151
169
|
style,
|
|
152
170
|
...props
|
|
153
171
|
}: DescriptionItemTrailingProps) => {
|
|
172
|
+
const { priority } = useDescriptionItemPriorityContext({
|
|
173
|
+
consumerName: 'DescriptionItemTrailing',
|
|
174
|
+
contextRequired: false,
|
|
175
|
+
});
|
|
176
|
+
|
|
154
177
|
const styles = useStyleSheet(
|
|
155
178
|
(t) => ({
|
|
156
179
|
trailing: {
|
|
157
|
-
flexShrink: 0,
|
|
180
|
+
flexShrink: priority === 'start' ? 1 : 0,
|
|
158
181
|
maxWidth: '80%',
|
|
159
182
|
flexDirection: 'row',
|
|
160
183
|
alignItems: 'center',
|
|
161
184
|
gap: t.spacings.s4,
|
|
162
185
|
},
|
|
163
186
|
}),
|
|
164
|
-
[],
|
|
187
|
+
[priority],
|
|
165
188
|
);
|
|
166
189
|
|
|
167
190
|
return (
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Priority } from '@ledgerhq/lumen-utils-shared';
|
|
1
2
|
import type { ReactNode } from 'react';
|
|
2
3
|
import type { StyledTextProps, StyledViewProps } from '../../../styles';
|
|
3
4
|
|
|
@@ -13,6 +14,11 @@ export type DescriptionItemProps = {
|
|
|
13
14
|
* @default 'md'
|
|
14
15
|
*/
|
|
15
16
|
size?: DescriptionItemSize;
|
|
17
|
+
/**
|
|
18
|
+
* The parts which are protected from shrinking and truncation when horizontal space is limited.
|
|
19
|
+
* @default 'end'
|
|
20
|
+
*/
|
|
21
|
+
priority?: Priority;
|
|
16
22
|
} & Omit<StyledViewProps, 'children'>;
|
|
17
23
|
|
|
18
24
|
export type DescriptionItemLeadingProps = {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import { Divider } from './Divider';
|
|
3
|
+
|
|
4
|
+
figma.connect(
|
|
5
|
+
Divider,
|
|
6
|
+
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=285-5974',
|
|
7
|
+
{
|
|
8
|
+
imports: ["import { Divider } from '@ledgerhq/lumen-ui-rnative'"],
|
|
9
|
+
example: () => <Divider />,
|
|
10
|
+
},
|
|
11
|
+
);
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
CustomTabs,
|
|
6
6
|
Tab,
|
|
7
7
|
} from '../../../../.storybook/components';
|
|
8
|
-
import CommonRulesDoAndDont from '../../../../.storybook/components/DoVsDont/CommonRulesDoAndDont.mdx';
|
|
9
8
|
|
|
10
9
|
<Meta title='Core/Divider' of={DividerStories} />
|
|
11
10
|
|
|
@@ -140,7 +139,6 @@ function MyList() {
|
|
|
140
139
|
}
|
|
141
140
|
```
|
|
142
141
|
|
|
143
|
-
<CommonRulesDoAndDont />
|
|
144
142
|
|
|
145
143
|
## Performance Considerations
|
|
146
144
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import { DotCount } from './DotCount';
|
|
3
|
+
|
|
4
|
+
figma.connect(
|
|
5
|
+
DotCount,
|
|
6
|
+
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7/2.-Components-Library?node-id=38-998',
|
|
7
|
+
{
|
|
8
|
+
imports: ["import { DotCount } from '@ledgerhq/lumen-ui-rnative'"],
|
|
9
|
+
props: {
|
|
10
|
+
value: figma.string('value'),
|
|
11
|
+
size: figma.enum('size', {
|
|
12
|
+
md: 'md',
|
|
13
|
+
lg: 'lg',
|
|
14
|
+
}),
|
|
15
|
+
appearance: figma.enum('appearance', {
|
|
16
|
+
base: 'base',
|
|
17
|
+
red: 'red',
|
|
18
|
+
}),
|
|
19
|
+
disabled: figma.enum('state', {
|
|
20
|
+
disabled: true,
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
example: (props) => (
|
|
24
|
+
<DotCount
|
|
25
|
+
value={Number(props.value)}
|
|
26
|
+
size={props.size}
|
|
27
|
+
appearance={props.appearance}
|
|
28
|
+
disabled={props.disabled}
|
|
29
|
+
/>
|
|
30
|
+
),
|
|
31
|
+
},
|
|
32
|
+
);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import { DotIndicator } from './DotIndicator';
|
|
3
|
+
|
|
4
|
+
figma.connect(
|
|
5
|
+
DotIndicator,
|
|
6
|
+
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7/2.-Components-Library?node-id=16470-25597',
|
|
7
|
+
{
|
|
8
|
+
imports: ["import { DotIndicator } from '@ledgerhq/lumen-ui-rnative'"],
|
|
9
|
+
props: {
|
|
10
|
+
size: figma.enum('size', {
|
|
11
|
+
sm: 'sm',
|
|
12
|
+
md: 'md',
|
|
13
|
+
lg: 'lg',
|
|
14
|
+
xl: 'xl',
|
|
15
|
+
}),
|
|
16
|
+
appearance: figma.enum('appearance', {
|
|
17
|
+
base: 'base',
|
|
18
|
+
red: 'red',
|
|
19
|
+
}),
|
|
20
|
+
disabled: figma.enum('state', {
|
|
21
|
+
disabled: true,
|
|
22
|
+
}),
|
|
23
|
+
},
|
|
24
|
+
example: (props) => (
|
|
25
|
+
<DotIndicator
|
|
26
|
+
size={props.size}
|
|
27
|
+
appearance={props.appearance}
|
|
28
|
+
disabled={props.disabled}
|
|
29
|
+
/>
|
|
30
|
+
),
|
|
31
|
+
},
|
|
32
|
+
);
|
|
@@ -2,6 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
|
2
2
|
import { Settings } from '../../Symbols';
|
|
3
3
|
import { Avatar } from '../Avatar/Avatar';
|
|
4
4
|
import { Button } from '../Button/Button';
|
|
5
|
+
import { getDotIndicatorProps } from '../DotIndicator';
|
|
5
6
|
import { IconButton } from '../IconButton/IconButton';
|
|
6
7
|
import { Box } from '../Utility/Box';
|
|
7
8
|
import { DotIndicator } from './DotIndicator';
|
|
@@ -67,7 +68,9 @@ export const WithChildren: Story = {
|
|
|
67
68
|
<DotIndicator appearance='red'>
|
|
68
69
|
<Button size='sm'>Submit</Button>
|
|
69
70
|
</DotIndicator>
|
|
70
|
-
<
|
|
71
|
+
<DotIndicator {...getDotIndicatorProps('avatar', 'md')}>
|
|
72
|
+
<Avatar size='md' />
|
|
73
|
+
</DotIndicator>
|
|
71
74
|
<DotIndicator appearance='red'>
|
|
72
75
|
<IconButton accessibilityLabel='Settings' icon={Settings} />
|
|
73
76
|
</DotIndicator>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { describe, it, expect } from '@jest/globals';
|
|
2
|
+
import { getDotIndicatorProps } from './getDotIndicatorProps';
|
|
3
|
+
|
|
4
|
+
describe('getDotIndicatorProps', () => {
|
|
5
|
+
it('resolves avatar dot indicator props', () => {
|
|
6
|
+
expect(getDotIndicatorProps('avatar', 'sm')).toEqual({
|
|
7
|
+
size: 'lg',
|
|
8
|
+
appearance: 'red',
|
|
9
|
+
});
|
|
10
|
+
expect(getDotIndicatorProps('avatar', 'md')).toEqual({
|
|
11
|
+
size: 'xl',
|
|
12
|
+
appearance: 'red',
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createPropsResolver } from '@ledgerhq/lumen-utils-shared';
|
|
2
|
+
import type { DotIndicatorProps } from './types';
|
|
3
|
+
|
|
4
|
+
export const getDotIndicatorProps = createPropsResolver({
|
|
5
|
+
// larger avatars (`lg`, `xl`) don't render a dot indicator
|
|
6
|
+
avatar: {
|
|
7
|
+
sm: { size: 'lg', appearance: 'red' },
|
|
8
|
+
md: { size: 'xl', appearance: 'red' },
|
|
9
|
+
} satisfies Record<'sm' | 'md', DotIndicatorProps>,
|
|
10
|
+
});
|