@ledgerhq/lumen-ui-rnative 0.1.68 → 0.1.70
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/lib/Components/animations/Pulse/Pulse.stories.js +7 -0
- package/dist/module/lib/Components/animations/Pulse/Pulse.stories.js.map +1 -1
- package/dist/module/lib/Components/animations/Spin/Spin.stories.js +7 -0
- package/dist/module/lib/Components/animations/Spin/Spin.stories.js.map +1 -1
- package/dist/module/lib/Components/core/AddressInput/AddressInput.stories.js +129 -136
- package/dist/module/lib/Components/core/AddressInput/AddressInput.stories.js.map +1 -1
- package/dist/module/lib/Components/core/AmountDisplay/AmountDisplay.stories.js +12 -6
- package/dist/module/lib/Components/core/AmountDisplay/AmountDisplay.stories.js.map +1 -1
- package/dist/module/lib/Components/core/AmountInput/AmountInput.stories.js +154 -176
- package/dist/module/lib/Components/core/AmountInput/AmountInput.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Avatar/Avatar.stories.js +54 -47
- package/dist/module/lib/Components/core/Avatar/Avatar.stories.js.map +1 -1
- package/dist/module/lib/Components/core/AvatarButton/AvatarButton.stories.js +2 -9
- package/dist/module/lib/Components/core/AvatarButton/AvatarButton.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Banner/Banner.stories.js +48 -87
- package/dist/module/lib/Components/core/Banner/Banner.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Button/Button.figma.js +2 -1
- package/dist/module/lib/Components/core/Button/Button.figma.js.map +1 -1
- package/dist/module/lib/Components/core/Button/Button.mdx +2 -1
- package/dist/module/lib/Components/core/Button/Button.stories.js +34 -10
- package/dist/module/lib/Components/core/Button/Button.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Card/Card.mdx +6 -0
- package/dist/module/lib/Components/core/Card/Card.stories.js +63 -24
- package/dist/module/lib/Components/core/Card/Card.stories.js.map +1 -1
- package/dist/module/lib/Components/core/CardButton/CardButton.stories.js +27 -85
- package/dist/module/lib/Components/core/CardButton/CardButton.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Checkbox/Checkbox.stories.js +1 -1
- package/dist/module/lib/Components/core/ContentBanner/ContentBanner.stories.js +8 -18
- package/dist/module/lib/Components/core/ContentBanner/ContentBanner.stories.js.map +1 -1
- package/dist/module/lib/Components/core/DescriptionItem/DescriptionItem.stories.js +28 -0
- package/dist/module/lib/Components/core/DescriptionItem/DescriptionItem.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Divider/Divider.stories.js +7 -0
- package/dist/module/lib/Components/core/Divider/Divider.stories.js.map +1 -1
- package/dist/module/lib/Components/core/DotCount/DotCount.stories.js +28 -0
- package/dist/module/lib/Components/core/DotCount/DotCount.stories.js.map +1 -1
- package/dist/module/lib/Components/core/DotIcon/DotIcon.stories.js +12 -0
- package/dist/module/lib/Components/core/DotIcon/DotIcon.stories.js.map +1 -1
- package/dist/module/lib/Components/core/DotIndicator/DotIndicator.stories.js +21 -0
- package/dist/module/lib/Components/core/DotIndicator/DotIndicator.stories.js.map +1 -1
- package/dist/module/lib/Components/core/DotSymbol/DotSymbol.stories.js +21 -0
- package/dist/module/lib/Components/core/DotSymbol/DotSymbol.stories.js.map +1 -1
- package/dist/module/lib/Components/core/IconButton/IconButton.stories.js +17 -0
- package/dist/module/lib/Components/core/IconButton/IconButton.stories.js.map +1 -1
- package/dist/module/lib/Components/core/InteractiveIcon/InteractiveIcon.stories.js +15 -21
- package/dist/module/lib/Components/core/InteractiveIcon/InteractiveIcon.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Link/Link.js +1 -1
- package/dist/module/lib/Components/core/Link/Link.mdx +32 -5
- package/dist/module/lib/Components/core/Link/Link.stories.js +35 -139
- package/dist/module/lib/Components/core/Link/Link.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Link/Link.test.js +1 -1
- package/dist/module/lib/Components/core/ListItem/ListItem.stories.js +2 -41
- package/dist/module/lib/Components/core/ListItem/ListItem.stories.js.map +1 -1
- package/dist/module/lib/Components/core/MediaBanner/MediaBanner.stories.js +19 -12
- package/dist/module/lib/Components/core/MediaBanner/MediaBanner.stories.js.map +1 -1
- package/dist/module/lib/Components/core/MediaButton/MediaButton.stories.js +2 -13
- package/dist/module/lib/Components/core/MediaButton/MediaButton.stories.js.map +1 -1
- package/dist/module/lib/Components/core/MediaCard/MediaCard.stories.js +24 -50
- package/dist/module/lib/Components/core/MediaCard/MediaCard.stories.js.map +1 -1
- package/dist/module/lib/Components/core/MediaImage/MediaImage.js +1 -1
- package/dist/module/lib/Components/core/MediaImage/MediaImage.js.map +1 -1
- package/dist/module/lib/Components/core/MediaImage/MediaImage.stories.js +1 -1
- package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.figma.js +215 -0
- package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.figma.js.map +1 -0
- package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.js +221 -0
- package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.js.map +1 -0
- package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.mdx +96 -0
- package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.stories.js +258 -0
- package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.stories.js.map +1 -0
- package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.test.js +246 -0
- package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.test.js.map +1 -0
- package/dist/module/lib/Components/core/MediaImageGroup/index.js +5 -0
- package/dist/module/lib/Components/core/MediaImageGroup/index.js.map +1 -0
- package/dist/module/lib/Components/core/MediaImageGroup/types.js +4 -0
- package/dist/module/lib/Components/core/MediaImageGroup/types.js.map +1 -0
- package/dist/module/lib/Components/core/MediaTag/MediaTag.stories.js +9 -0
- package/dist/module/lib/Components/core/MediaTag/MediaTag.stories.js.map +1 -1
- package/dist/module/lib/Components/core/MenuList/MenuList.mdx +2 -2
- package/dist/module/lib/Components/core/MenuList/MenuList.stories.js +17 -1
- package/dist/module/lib/Components/core/MenuList/MenuList.stories.js.map +1 -1
- package/dist/module/lib/Components/core/PageIndicator/PageIndicator.figma.js +1 -1
- package/dist/module/lib/Components/core/PageIndicator/PageIndicator.figma.js.map +1 -1
- package/dist/module/lib/Components/core/PageIndicator/PageIndicator.stories.js +56 -50
- package/dist/module/lib/Components/core/PageIndicator/PageIndicator.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Pagination/Pagination.figma.js +22 -0
- package/dist/module/lib/Components/core/Pagination/Pagination.figma.js.map +1 -0
- package/dist/module/lib/Components/core/Pagination/Pagination.js +182 -0
- package/dist/module/lib/Components/core/Pagination/Pagination.js.map +1 -0
- package/dist/module/lib/Components/core/Pagination/Pagination.mdx +108 -0
- package/dist/module/lib/Components/core/Pagination/Pagination.stories.js +121 -0
- package/dist/module/lib/Components/core/Pagination/Pagination.stories.js.map +1 -0
- package/dist/module/lib/Components/core/Pagination/Pagination.test.js +338 -0
- package/dist/module/lib/Components/core/Pagination/Pagination.test.js.map +1 -0
- package/dist/module/lib/Components/core/Pagination/index.js +4 -0
- package/dist/module/lib/Components/core/Pagination/index.js.map +1 -0
- package/dist/module/lib/Components/core/Pagination/types.js +4 -0
- package/dist/module/lib/Components/core/Pagination/types.js.map +1 -0
- package/dist/module/lib/Components/core/SearchInput/SearchInput.stories.js +75 -67
- package/dist/module/lib/Components/core/SearchInput/SearchInput.stories.js.map +1 -1
- package/dist/module/lib/Components/core/SegmentedControl/SegmentedControl.stories.js +12 -0
- package/dist/module/lib/Components/core/SegmentedControl/SegmentedControl.stories.js.map +1 -1
- package/dist/module/lib/Components/core/SelectList/SelectList.mdx +3 -1
- package/dist/module/lib/Components/core/SelectList/SelectList.stories.js +3 -3
- package/dist/module/lib/Components/core/SelectList/SelectList.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Skeleton/Skeleton.stories.js +7 -0
- package/dist/module/lib/Components/core/Skeleton/Skeleton.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Spinner/Spinner.stories.js +7 -0
- package/dist/module/lib/Components/core/Spinner/Spinner.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Spot/Spot.stories.js +20 -1
- package/dist/module/lib/Components/core/Spot/Spot.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Stepper/Stepper.stories.js +7 -0
- package/dist/module/lib/Components/core/Stepper/Stepper.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Subheader/Subheader.stories.js +11 -1
- package/dist/module/lib/Components/core/Subheader/Subheader.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Switch/Switch.stories.js +21 -1
- package/dist/module/lib/Components/core/Switch/Switch.stories.js.map +1 -1
- package/dist/module/lib/Components/core/TabBar/TabBar.stories.js +17 -5
- package/dist/module/lib/Components/core/TabBar/TabBar.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Tag/Tag.stories.js +28 -0
- package/dist/module/lib/Components/core/Tag/Tag.stories.js.map +1 -1
- package/dist/module/lib/Components/core/TextInput/TextInput.stories.js +159 -196
- package/dist/module/lib/Components/core/TextInput/TextInput.stories.js.map +1 -1
- package/dist/module/lib/Components/core/TextInput/TextInput.test.js +2 -2
- package/dist/module/lib/Components/core/TextInput/TextInput.test.js.map +1 -1
- package/dist/module/lib/Components/core/Tile/Tile.stories.js +2 -35
- package/dist/module/lib/Components/core/Tile/Tile.stories.js.map +1 -1
- package/dist/module/lib/Components/core/TileButton/TileButton.stories.js +18 -8
- package/dist/module/lib/Components/core/TileButton/TileButton.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Timeline/Timeline.js +81 -67
- package/dist/module/lib/Components/core/Timeline/Timeline.js.map +1 -1
- package/dist/module/lib/Components/core/Timeline/Timeline.stories.js +46 -16
- package/dist/module/lib/Components/core/Timeline/Timeline.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Timeline/Timeline.test.js +8 -5
- package/dist/module/lib/Components/core/Timeline/Timeline.test.js.map +1 -1
- package/dist/module/lib/Components/core/Toast/Toast.mdx +1 -1
- package/dist/module/lib/Components/core/Toast/Toast.stories.js +61 -58
- package/dist/module/lib/Components/core/Toast/Toast.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Toast/Toaster.test.js +1 -1
- package/dist/module/lib/Components/core/Toast/Toaster.test.js.map +1 -1
- package/dist/module/lib/Components/core/Tooltip/Tooltip.stories.js +31 -2
- package/dist/module/lib/Components/core/Tooltip/Tooltip.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Trend/Trend.stories.js +9 -0
- package/dist/module/lib/Components/core/Trend/Trend.stories.js.map +1 -1
- package/dist/module/lib/Components/core/index.js +2 -0
- package/dist/module/lib/Components/core/index.js.map +1 -1
- package/dist/module/lib/Components/internal/BaseButton/BaseButton.js +5 -2
- package/dist/module/lib/Components/internal/BaseButton/BaseButton.js.map +1 -1
- package/dist/module/lib/Components/internal/BaseButton/BaseButton.test.js +1 -1
- package/dist/module/lib/Components/internal/BaseButton/BaseButton.test.js.map +1 -1
- package/dist/module/lib/Components/primitives/Box/Box.stories.js +1 -18
- package/dist/module/lib/Components/primitives/Box/Box.stories.js.map +1 -1
- package/dist/module/lib/Components/primitives/Gradient/LinearGradient/LinearGradient.stories.js +36 -0
- package/dist/module/lib/Components/primitives/Gradient/LinearGradient/LinearGradient.stories.js.map +1 -1
- package/dist/module/lib/Components/primitives/Gradient/RadialGradient/RadialGradient.stories.js +1 -1
- package/dist/module/lib/Components/primitives/Pressable/Pressable.stories.js +1 -19
- package/dist/module/lib/Components/primitives/Pressable/Pressable.stories.js.map +1 -1
- package/dist/module/lib/Components/primitives/Text/Text.stories.js +1 -12
- package/dist/module/lib/Components/primitives/Text/Text.stories.js.map +1 -1
- package/dist/module/lib/Components/symbols/Icon/Icon.stories.js +128 -85
- package/dist/module/lib/Components/symbols/Icon/Icon.stories.js.map +1 -1
- package/dist/module/lib/Components/symbols/icons/Ar.js +2 -2
- package/dist/module/lib/Components/symbols/icons/Ar.js.map +1 -1
- package/dist/module/lib/Components/symbols/icons/Range.js +1 -1
- package/dist/module/lib/Components/symbols/icons/Share.js +1 -1
- package/dist/module/lib/Components/symbols/icons/{Charon.js → ShoppingInvoiceList.js} +8 -8
- package/dist/module/lib/Components/symbols/icons/ShoppingInvoiceList.js.map +1 -0
- package/dist/module/lib/Components/symbols/icons/WalletInput.js +1 -1
- package/dist/module/lib/Components/symbols/icons/WalletInput.js.map +1 -1
- package/dist/module/lib/Components/symbols/index.js +1 -4
- package/dist/module/lib/Components/symbols/index.js.map +1 -1
- package/dist/module/lib/Components/visualization/DonutChart/DonutChart.test.js +1 -1
- package/dist/module/lib/Components/visualization/DonutChart/DonutChart.test.js.map +1 -1
- package/dist/module/lib/Components/visualization/Line/utils.js +1 -1
- package/dist/module/lib/Components/visualization/LineChart/LineChart.stories.js +69 -0
- package/dist/module/lib/Components/visualization/LineChart/LineChart.stories.js.map +1 -1
- package/dist/module/lib/Components/visualization/LineChart/LineChart.test.js +1 -1
- package/dist/module/lib/Components/visualization/LineChart/LineChart.test.js.map +1 -1
- package/dist/module/lib/Components/visualization/Point/Point.stories.js +12 -0
- package/dist/module/lib/Components/visualization/Point/Point.stories.js.map +1 -1
- package/dist/module/lib/Components/visualization/Point/Point.test.js +1 -1
- package/dist/module/lib/Components/visualization/Point/usePointGeometry.js +1 -1
- package/dist/module/lib/Components/visualization/Point/utils.js +1 -1
- package/dist/module/lib/Components/visualization/Point/utils.test.js +2 -2
- package/dist/module/lib/Components/visualization/ReferenceLine/ReferenceLine.stories.js +23 -0
- package/dist/module/lib/Components/visualization/ReferenceLine/ReferenceLine.stories.js.map +1 -1
- package/dist/module/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/utils.js +3 -3
- package/dist/module/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/utils.js.map +1 -1
- package/dist/module/lib/Components/visualization/Scrubber/Scrubber.stories.js +35 -0
- package/dist/module/lib/Components/visualization/Scrubber/Scrubber.stories.js.map +1 -1
- package/dist/module/translations/locales/de.json +7 -0
- package/dist/module/translations/locales/en.json +7 -0
- package/dist/module/translations/locales/es.json +7 -0
- package/dist/module/translations/locales/fr.json +7 -0
- package/dist/module/translations/locales/ja.json +7 -0
- package/dist/module/translations/locales/ko.json +7 -0
- package/dist/module/translations/locales/pt.json +7 -0
- package/dist/module/translations/locales/ru.json +7 -0
- package/dist/module/translations/locales/th.json +7 -0
- package/dist/module/translations/locales/tr.json +7 -0
- package/dist/module/translations/locales/zh.json +7 -0
- package/dist/typescript/src/lib/Components/core/MediaImage/MediaImage.d.ts +4 -0
- package/dist/typescript/src/lib/Components/core/MediaImage/MediaImage.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/MediaImageGroup/MediaImageGroup.d.ts +33 -0
- package/dist/typescript/src/lib/Components/core/MediaImageGroup/MediaImageGroup.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/MediaImageGroup/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/core/MediaImageGroup/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/MediaImageGroup/types.d.ts +66 -0
- package/dist/typescript/src/lib/Components/core/MediaImageGroup/types.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Pagination/Pagination.d.ts +15 -0
- package/dist/typescript/src/lib/Components/core/Pagination/Pagination.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Pagination/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/core/Pagination/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Pagination/types.d.ts +29 -0
- package/dist/typescript/src/lib/Components/core/Pagination/types.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Timeline/Timeline.d.ts +2 -2
- package/dist/typescript/src/lib/Components/core/Timeline/Timeline.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/index.d.ts +2 -0
- package/dist/typescript/src/lib/Components/core/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/internal/BaseButton/BaseButton.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/internal/BaseButton/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/internal/BaseButton/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/internal/BaseInput/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/symbols/icons/{Charon.d.ts → ShoppingInvoiceList.d.ts} +7 -7
- package/dist/typescript/src/lib/Components/symbols/icons/ShoppingInvoiceList.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/symbols/index.d.ts +1 -4
- package/dist/typescript/src/lib/Components/symbols/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/visualization/Axis/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/visualization/CartesianChart/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/visualization/Line/utils.d.ts +1 -1
- package/dist/typescript/src/lib/Components/visualization/LineChart/types.d.ts +3 -3
- package/dist/typescript/src/lib/Components/visualization/Point/types.d.ts +3 -3
- package/dist/typescript/src/lib/Components/visualization/Point/usePointGeometry.d.ts +1 -1
- package/dist/typescript/src/lib/Components/visualization/Point/utils.d.ts +1 -1
- package/dist/typescript/src/translations/translations.d.ts +84 -0
- package/dist/typescript/src/translations/translations.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/lib/Components/animations/Pulse/Pulse.stories.tsx +1 -0
- package/src/lib/Components/animations/Spin/Spin.stories.tsx +1 -0
- package/src/lib/Components/core/AddressInput/AddressInput.stories.tsx +168 -123
- package/src/lib/Components/core/AmountDisplay/AmountDisplay.stories.tsx +7 -7
- package/src/lib/Components/core/AmountInput/AmountInput.stories.tsx +162 -158
- package/src/lib/Components/core/Avatar/Avatar.stories.tsx +37 -46
- package/src/lib/Components/core/AvatarButton/AvatarButton.stories.tsx +1 -8
- package/src/lib/Components/core/Banner/Banner.stories.tsx +8 -95
- package/src/lib/Components/core/Button/Button.figma.tsx +1 -0
- package/src/lib/Components/core/Button/Button.mdx +2 -1
- package/src/lib/Components/core/Button/Button.stories.tsx +13 -14
- package/src/lib/Components/core/Card/Card.mdx +6 -0
- package/src/lib/Components/core/Card/Card.stories.tsx +31 -27
- package/src/lib/Components/core/CardButton/CardButton.stories.tsx +14 -90
- package/src/lib/Components/core/Checkbox/Checkbox.stories.tsx +1 -1
- package/src/lib/Components/core/ContentBanner/ContentBanner.stories.tsx +1 -17
- package/src/lib/Components/core/DescriptionItem/DescriptionItem.stories.tsx +4 -0
- package/src/lib/Components/core/Divider/Divider.stories.tsx +1 -0
- package/src/lib/Components/core/DotCount/DotCount.stories.tsx +4 -0
- package/src/lib/Components/core/DotIcon/DotIcon.stories.tsx +8 -0
- package/src/lib/Components/core/DotIndicator/DotIndicator.stories.tsx +3 -0
- package/src/lib/Components/core/DotSymbol/DotSymbol.stories.tsx +3 -0
- package/src/lib/Components/core/IconButton/IconButton.stories.tsx +9 -0
- package/src/lib/Components/core/InteractiveIcon/InteractiveIcon.stories.tsx +16 -23
- package/src/lib/Components/core/Link/Link.mdx +32 -5
- package/src/lib/Components/core/Link/Link.stories.tsx +20 -146
- package/src/lib/Components/core/Link/Link.test.tsx +1 -1
- package/src/lib/Components/core/Link/Link.tsx +1 -1
- package/src/lib/Components/core/ListItem/ListItem.stories.tsx +0 -39
- package/src/lib/Components/core/MediaBanner/MediaBanner.stories.tsx +3 -14
- package/src/lib/Components/core/MediaButton/MediaButton.stories.tsx +1 -12
- package/src/lib/Components/core/MediaCard/MediaCard.stories.tsx +10 -53
- package/src/lib/Components/core/MediaImage/MediaImage.stories.tsx +1 -1
- package/src/lib/Components/core/MediaImage/MediaImage.tsx +1 -1
- package/src/lib/Components/core/MediaImageGroup/MediaImageGroup.figma.tsx +119 -0
- package/src/lib/Components/core/MediaImageGroup/MediaImageGroup.mdx +96 -0
- package/src/lib/Components/core/MediaImageGroup/MediaImageGroup.stories.tsx +154 -0
- package/src/lib/Components/core/MediaImageGroup/MediaImageGroup.test.tsx +213 -0
- package/src/lib/Components/core/MediaImageGroup/MediaImageGroup.tsx +264 -0
- package/src/lib/Components/core/MediaImageGroup/index.ts +2 -0
- package/src/lib/Components/core/MediaImageGroup/types.ts +77 -0
- package/src/lib/Components/core/MediaTag/MediaTag.stories.tsx +3 -0
- package/src/lib/Components/core/MenuList/MenuList.mdx +2 -2
- package/src/lib/Components/core/MenuList/MenuList.stories.tsx +13 -1
- package/src/lib/Components/core/PageIndicator/PageIndicator.figma.tsx +1 -1
- package/src/lib/Components/core/PageIndicator/PageIndicator.stories.tsx +45 -42
- package/src/lib/Components/core/Pagination/Pagination.figma.tsx +25 -0
- package/src/lib/Components/core/Pagination/Pagination.mdx +108 -0
- package/src/lib/Components/core/Pagination/Pagination.stories.tsx +90 -0
- package/src/lib/Components/core/Pagination/Pagination.test.tsx +346 -0
- package/src/lib/Components/core/Pagination/Pagination.tsx +200 -0
- package/src/lib/Components/core/Pagination/index.ts +2 -0
- package/src/lib/Components/core/Pagination/types.ts +29 -0
- package/src/lib/Components/core/SearchInput/SearchInput.stories.tsx +91 -66
- package/src/lib/Components/core/SegmentedControl/SegmentedControl.stories.tsx +2 -0
- package/src/lib/Components/core/SelectList/SelectList.mdx +3 -1
- package/src/lib/Components/core/SelectList/SelectList.stories.tsx +3 -3
- package/src/lib/Components/core/Skeleton/Skeleton.stories.tsx +1 -0
- package/src/lib/Components/core/Spinner/Spinner.stories.tsx +1 -0
- package/src/lib/Components/core/Spot/Spot.stories.tsx +10 -1
- package/src/lib/Components/core/Stepper/Stepper.stories.tsx +1 -0
- package/src/lib/Components/core/Subheader/Subheader.stories.tsx +5 -2
- package/src/lib/Components/core/Switch/Switch.stories.tsx +17 -1
- package/src/lib/Components/core/TabBar/TabBar.stories.tsx +15 -5
- package/src/lib/Components/core/Tag/Tag.stories.tsx +4 -0
- package/src/lib/Components/core/TextInput/TextInput.stories.tsx +186 -174
- package/src/lib/Components/core/TextInput/TextInput.test.tsx +2 -2
- package/src/lib/Components/core/Tile/Tile.stories.tsx +0 -33
- package/src/lib/Components/core/TileButton/TileButton.stories.tsx +9 -7
- package/src/lib/Components/core/Timeline/Timeline.stories.tsx +20 -1
- package/src/lib/Components/core/Timeline/Timeline.test.tsx +12 -8
- package/src/lib/Components/core/Timeline/Timeline.tsx +79 -75
- package/src/lib/Components/core/Toast/Toast.mdx +1 -1
- package/src/lib/Components/core/Toast/Toast.stories.tsx +55 -66
- package/src/lib/Components/core/Toast/Toaster.test.tsx +1 -1
- package/src/lib/Components/core/Tooltip/Tooltip.stories.tsx +7 -3
- package/src/lib/Components/core/Trend/Trend.stories.tsx +3 -0
- package/src/lib/Components/core/index.ts +2 -0
- package/src/lib/Components/internal/BaseButton/BaseButton.test.tsx +1 -0
- package/src/lib/Components/internal/BaseButton/BaseButton.tsx +3 -0
- package/src/lib/Components/internal/BaseButton/types.ts +2 -1
- package/src/lib/Components/internal/BaseInput/types.ts +1 -1
- package/src/lib/Components/primitives/Box/Box.stories.tsx +1 -18
- package/src/lib/Components/primitives/Gradient/LinearGradient/LinearGradient.stories.tsx +12 -0
- package/src/lib/Components/primitives/Gradient/RadialGradient/RadialGradient.stories.tsx +1 -1
- package/src/lib/Components/primitives/Pressable/Pressable.stories.tsx +0 -18
- package/src/lib/Components/primitives/Text/Text.stories.tsx +1 -12
- package/src/lib/Components/symbols/Icon/Icon.stories.tsx +133 -94
- package/src/lib/Components/symbols/icons/Ar.tsx +2 -2
- package/src/lib/Components/symbols/icons/Range.tsx +1 -1
- package/src/lib/Components/symbols/icons/Share.tsx +1 -1
- package/src/lib/Components/symbols/icons/{Charon.tsx → ShoppingInvoiceList.tsx} +8 -8
- package/src/lib/Components/symbols/icons/WalletInput.tsx +1 -1
- package/src/lib/Components/symbols/index.ts +1 -4
- package/src/lib/Components/visualization/Axis/types.ts +1 -1
- package/src/lib/Components/visualization/CartesianChart/types.ts +1 -1
- package/src/lib/Components/visualization/DonutChart/DonutChart.test.tsx +1 -1
- package/src/lib/Components/visualization/Line/utils.ts +1 -1
- package/src/lib/Components/visualization/LineChart/LineChart.stories.tsx +15 -0
- package/src/lib/Components/visualization/LineChart/LineChart.test.tsx +1 -1
- package/src/lib/Components/visualization/LineChart/types.ts +3 -3
- package/src/lib/Components/visualization/Point/Point.stories.tsx +2 -0
- package/src/lib/Components/visualization/Point/Point.test.tsx +1 -1
- package/src/lib/Components/visualization/Point/types.ts +3 -3
- package/src/lib/Components/visualization/Point/usePointGeometry.ts +1 -1
- package/src/lib/Components/visualization/Point/utils.test.ts +2 -2
- package/src/lib/Components/visualization/Point/utils.ts +1 -1
- package/src/lib/Components/visualization/ReferenceLine/ReferenceLine.stories.tsx +5 -0
- package/src/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/utils.ts +3 -3
- package/src/lib/Components/visualization/Scrubber/Scrubber.stories.tsx +5 -0
- package/src/translations/locales/de.json +7 -0
- package/src/translations/locales/en.json +7 -0
- package/src/translations/locales/es.json +7 -0
- package/src/translations/locales/fr.json +7 -0
- package/src/translations/locales/ja.json +7 -0
- package/src/translations/locales/ko.json +7 -0
- package/src/translations/locales/pt.json +7 -0
- package/src/translations/locales/ru.json +7 -0
- package/src/translations/locales/th.json +7 -0
- package/src/translations/locales/tr.json +7 -0
- package/src/translations/locales/zh.json +7 -0
- package/dist/module/lib/Components/symbols/icons/Apex.js +0 -49
- package/dist/module/lib/Components/symbols/icons/Apex.js.map +0 -1
- package/dist/module/lib/Components/symbols/icons/BellNotification.js +0 -91
- package/dist/module/lib/Components/symbols/icons/BellNotification.js.map +0 -1
- package/dist/module/lib/Components/symbols/icons/Charon.js.map +0 -1
- package/dist/module/lib/Components/symbols/icons/ShieldCheckNotification.js +0 -82
- package/dist/module/lib/Components/symbols/icons/ShieldCheckNotification.js.map +0 -1
- package/dist/typescript/src/lib/Components/symbols/icons/Apex.d.ts +0 -35
- package/dist/typescript/src/lib/Components/symbols/icons/Apex.d.ts.map +0 -1
- package/dist/typescript/src/lib/Components/symbols/icons/BellNotification.d.ts +0 -35
- package/dist/typescript/src/lib/Components/symbols/icons/BellNotification.d.ts.map +0 -1
- package/dist/typescript/src/lib/Components/symbols/icons/Charon.d.ts.map +0 -1
- package/dist/typescript/src/lib/Components/symbols/icons/ShieldCheckNotification.d.ts +0 -35
- package/dist/typescript/src/lib/Components/symbols/icons/ShieldCheckNotification.d.ts.map +0 -1
- package/src/lib/Components/symbols/icons/Apex.tsx +0 -44
- package/src/lib/Components/symbols/icons/BellNotification.tsx +0 -75
- package/src/lib/Components/symbols/icons/ShieldCheckNotification.tsx +0 -67
|
@@ -2,11 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
import { AmountInput } from './AmountInput';
|
|
5
|
-
import {
|
|
6
|
-
type AmountInputAlign,
|
|
7
|
-
type AmountInputProps,
|
|
8
|
-
type AmountInputSize,
|
|
9
|
-
} from './types';
|
|
5
|
+
import { type AmountInputAlign, type AmountInputSize } from './types';
|
|
10
6
|
|
|
11
7
|
const ALIGNMENTS: AmountInputAlign[] = ['start', 'center', 'end'];
|
|
12
8
|
|
|
@@ -19,6 +15,23 @@ const meta = {
|
|
|
19
15
|
component: AmountInput,
|
|
20
16
|
id: 'rnative-amountinput',
|
|
21
17
|
title: 'Core/AmountInput',
|
|
18
|
+
decorators: [
|
|
19
|
+
(Story) => (
|
|
20
|
+
<View
|
|
21
|
+
style={{
|
|
22
|
+
flex: 1,
|
|
23
|
+
minHeight: 96,
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
padding: 24,
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
29
|
+
<View style={{ width: '100%', maxWidth: 320 }}>
|
|
30
|
+
<Story />
|
|
31
|
+
</View>
|
|
32
|
+
</View>
|
|
33
|
+
),
|
|
34
|
+
],
|
|
22
35
|
parameters: {
|
|
23
36
|
docs: {
|
|
24
37
|
source: {
|
|
@@ -42,71 +55,43 @@ const meta = {
|
|
|
42
55
|
export default meta;
|
|
43
56
|
type Story = StoryObj<typeof AmountInput>;
|
|
44
57
|
|
|
45
|
-
const AmountInputStory = (args: AmountInputProps) => {
|
|
46
|
-
const [value, setValue] = useState(args.value?.toString() ?? '');
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<View
|
|
50
|
-
style={{
|
|
51
|
-
flex: 1,
|
|
52
|
-
minHeight: 96,
|
|
53
|
-
alignItems: 'center',
|
|
54
|
-
justifyContent: 'center',
|
|
55
|
-
padding: 24,
|
|
56
|
-
}}
|
|
57
|
-
>
|
|
58
|
-
<View style={{ width: '100%', maxWidth: 320 }}>
|
|
59
|
-
<AmountInput {...args} value={value} onChangeText={setValue} />
|
|
60
|
-
</View>
|
|
61
|
-
</View>
|
|
62
|
-
);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
58
|
export const Base: Story = {
|
|
66
59
|
args: {
|
|
67
|
-
value: '',
|
|
68
|
-
onChangeText: () => {},
|
|
69
60
|
currencyText: 'USD',
|
|
70
61
|
currencyPosition: 'left',
|
|
71
62
|
allowDecimals: true,
|
|
72
63
|
thousandsSeparator: true,
|
|
73
64
|
maxIntegerLength: 9,
|
|
74
65
|
maxDecimalLength: 9,
|
|
75
|
-
isInvalid: false,
|
|
76
|
-
editable: true,
|
|
77
66
|
},
|
|
78
|
-
render: (args) =>
|
|
67
|
+
render: (args) => {
|
|
68
|
+
const [value, setValue] = useState('');
|
|
69
|
+
|
|
70
|
+
return <AmountInput {...args} value={value} onChangeText={setValue} />;
|
|
71
|
+
},
|
|
79
72
|
};
|
|
80
73
|
|
|
81
74
|
export const WithValue: Story = {
|
|
82
|
-
|
|
83
|
-
value
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
75
|
+
render: () => {
|
|
76
|
+
const [value, setValue] = useState('1234.56');
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<AmountInput
|
|
80
|
+
currencyText='USD'
|
|
81
|
+
currencyPosition='left'
|
|
82
|
+
allowDecimals
|
|
83
|
+
thousandsSeparator
|
|
84
|
+
value={value}
|
|
85
|
+
onChangeText={setValue}
|
|
86
|
+
/>
|
|
87
|
+
);
|
|
91
88
|
},
|
|
92
|
-
render: (args) => <AmountInputStory {...args} />,
|
|
93
89
|
};
|
|
94
90
|
|
|
95
91
|
export const Size: Story = {
|
|
96
|
-
|
|
97
|
-
value: '1234.56',
|
|
98
|
-
onChangeText: () => {},
|
|
99
|
-
},
|
|
92
|
+
parameters: { docs: { source: { type: 'dynamic' } } },
|
|
100
93
|
render: () => (
|
|
101
|
-
<View
|
|
102
|
-
style={{
|
|
103
|
-
width: '100%',
|
|
104
|
-
maxWidth: 320,
|
|
105
|
-
alignItems: 'center',
|
|
106
|
-
gap: 24,
|
|
107
|
-
padding: 24,
|
|
108
|
-
}}
|
|
109
|
-
>
|
|
94
|
+
<View style={{ width: '100%', alignItems: 'center', gap: 24 }}>
|
|
110
95
|
{SIZES.map(({ size, value }) => (
|
|
111
96
|
<AmountInput
|
|
112
97
|
key={size}
|
|
@@ -121,19 +106,9 @@ export const Size: Story = {
|
|
|
121
106
|
};
|
|
122
107
|
|
|
123
108
|
export const Alignment: Story = {
|
|
124
|
-
|
|
125
|
-
value: '1234.56',
|
|
126
|
-
onChangeText: () => {},
|
|
127
|
-
},
|
|
109
|
+
parameters: { docs: { source: { type: 'dynamic' } } },
|
|
128
110
|
render: () => (
|
|
129
|
-
<View
|
|
130
|
-
style={{
|
|
131
|
-
width: '100%',
|
|
132
|
-
maxWidth: 320,
|
|
133
|
-
gap: 24,
|
|
134
|
-
padding: 24,
|
|
135
|
-
}}
|
|
136
|
-
>
|
|
111
|
+
<View style={{ width: '100%', gap: 24 }}>
|
|
137
112
|
{ALIGNMENTS.map((align) => (
|
|
138
113
|
<AmountInput
|
|
139
114
|
key={align}
|
|
@@ -148,130 +123,159 @@ export const Alignment: Story = {
|
|
|
148
123
|
};
|
|
149
124
|
|
|
150
125
|
export const CurrencyPositionLeft: Story = {
|
|
151
|
-
|
|
152
|
-
value
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
126
|
+
render: () => {
|
|
127
|
+
const [value, setValue] = useState('1000');
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<AmountInput
|
|
131
|
+
currencyText='$'
|
|
132
|
+
currencyPosition='left'
|
|
133
|
+
allowDecimals
|
|
134
|
+
thousandsSeparator
|
|
135
|
+
value={value}
|
|
136
|
+
onChangeText={setValue}
|
|
137
|
+
/>
|
|
138
|
+
);
|
|
160
139
|
},
|
|
161
|
-
render: (args) => <AmountInputStory {...args} />,
|
|
162
140
|
};
|
|
163
141
|
|
|
164
142
|
export const CurrencyPositionRight: Story = {
|
|
165
|
-
|
|
166
|
-
value
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
143
|
+
render: () => {
|
|
144
|
+
const [value, setValue] = useState('1000');
|
|
145
|
+
|
|
146
|
+
return (
|
|
147
|
+
<AmountInput
|
|
148
|
+
currencyText='ETH'
|
|
149
|
+
currencyPosition='right'
|
|
150
|
+
allowDecimals
|
|
151
|
+
thousandsSeparator
|
|
152
|
+
value={value}
|
|
153
|
+
onChangeText={setValue}
|
|
154
|
+
/>
|
|
155
|
+
);
|
|
174
156
|
},
|
|
175
|
-
render: (args) => <AmountInputStory {...args} />,
|
|
176
157
|
};
|
|
177
158
|
|
|
178
159
|
export const IntegerOnly: Story = {
|
|
179
|
-
|
|
180
|
-
value
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
160
|
+
render: () => {
|
|
161
|
+
const [value, setValue] = useState('1234');
|
|
162
|
+
|
|
163
|
+
return (
|
|
164
|
+
<AmountInput
|
|
165
|
+
currencyText='items'
|
|
166
|
+
currencyPosition='right'
|
|
167
|
+
allowDecimals={false}
|
|
168
|
+
thousandsSeparator
|
|
169
|
+
value={value}
|
|
170
|
+
onChangeText={setValue}
|
|
171
|
+
/>
|
|
172
|
+
);
|
|
188
173
|
},
|
|
189
|
-
render: (args) => <AmountInputStory {...args} />,
|
|
190
174
|
};
|
|
191
175
|
|
|
192
176
|
export const WithThousandsSeparator: Story = {
|
|
193
|
-
|
|
194
|
-
value
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
177
|
+
render: () => {
|
|
178
|
+
const [value, setValue] = useState('1000000');
|
|
179
|
+
|
|
180
|
+
return (
|
|
181
|
+
<AmountInput
|
|
182
|
+
currencyText='USD'
|
|
183
|
+
currencyPosition='left'
|
|
184
|
+
allowDecimals
|
|
185
|
+
thousandsSeparator
|
|
186
|
+
value={value}
|
|
187
|
+
onChangeText={setValue}
|
|
188
|
+
/>
|
|
189
|
+
);
|
|
202
190
|
},
|
|
203
|
-
render: (args) => <AmountInputStory {...args} />,
|
|
204
191
|
};
|
|
205
192
|
|
|
206
193
|
export const WithoutThousandsSeparator: Story = {
|
|
207
|
-
|
|
208
|
-
value
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
194
|
+
render: () => {
|
|
195
|
+
const [value, setValue] = useState('1000000');
|
|
196
|
+
|
|
197
|
+
return (
|
|
198
|
+
<AmountInput
|
|
199
|
+
currencyText='USD'
|
|
200
|
+
currencyPosition='left'
|
|
201
|
+
allowDecimals
|
|
202
|
+
thousandsSeparator={false}
|
|
203
|
+
value={value}
|
|
204
|
+
onChangeText={setValue}
|
|
205
|
+
/>
|
|
206
|
+
);
|
|
216
207
|
},
|
|
217
|
-
render: (args) => <AmountInputStory {...args} />,
|
|
218
208
|
};
|
|
219
209
|
|
|
220
210
|
export const DecimalSeparatorComma: Story = {
|
|
221
|
-
|
|
222
|
-
value
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
211
|
+
render: () => {
|
|
212
|
+
const [value, setValue] = useState('1234.5');
|
|
213
|
+
|
|
214
|
+
return (
|
|
215
|
+
<AmountInput
|
|
216
|
+
currencyText='€'
|
|
217
|
+
currencyPosition='right'
|
|
218
|
+
allowDecimals
|
|
219
|
+
thousandsSeparator
|
|
220
|
+
decimalSeparator=','
|
|
221
|
+
value={value}
|
|
222
|
+
onChangeText={setValue}
|
|
223
|
+
/>
|
|
224
|
+
);
|
|
231
225
|
},
|
|
232
|
-
render: (args) => <AmountInputStory {...args} />,
|
|
233
226
|
};
|
|
234
227
|
|
|
235
228
|
export const ErrorState: Story = {
|
|
236
|
-
|
|
237
|
-
value
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
229
|
+
render: () => {
|
|
230
|
+
const [value, setValue] = useState('1234.56');
|
|
231
|
+
|
|
232
|
+
return (
|
|
233
|
+
<AmountInput
|
|
234
|
+
currencyText='USD'
|
|
235
|
+
currencyPosition='left'
|
|
236
|
+
allowDecimals
|
|
237
|
+
thousandsSeparator
|
|
238
|
+
isInvalid
|
|
239
|
+
value={value}
|
|
240
|
+
onChangeText={setValue}
|
|
241
|
+
/>
|
|
242
|
+
);
|
|
245
243
|
},
|
|
246
|
-
render: (args) => <AmountInputStory {...args} />,
|
|
247
244
|
};
|
|
248
245
|
|
|
249
246
|
export const DisabledAmountInput: Story = {
|
|
250
|
-
|
|
251
|
-
value
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
247
|
+
render: () => {
|
|
248
|
+
const [value, setValue] = useState('1234.56');
|
|
249
|
+
|
|
250
|
+
return (
|
|
251
|
+
<AmountInput
|
|
252
|
+
currencyText='USD'
|
|
253
|
+
currencyPosition='left'
|
|
254
|
+
allowDecimals
|
|
255
|
+
thousandsSeparator
|
|
256
|
+
disabled
|
|
257
|
+
value={value}
|
|
258
|
+
onChangeText={setValue}
|
|
259
|
+
/>
|
|
260
|
+
);
|
|
259
261
|
},
|
|
260
|
-
render: (args) => <AmountInputStory {...args} />,
|
|
261
262
|
};
|
|
262
263
|
|
|
263
264
|
export const CustomLengthLimits: Story = {
|
|
264
|
-
|
|
265
|
-
value
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
265
|
+
render: () => {
|
|
266
|
+
const [value, setValue] = useState('123');
|
|
267
|
+
|
|
268
|
+
return (
|
|
269
|
+
<AmountInput
|
|
270
|
+
currencyText='$'
|
|
271
|
+
currencyPosition='left'
|
|
272
|
+
allowDecimals
|
|
273
|
+
thousandsSeparator
|
|
274
|
+
maxIntegerLength={6}
|
|
275
|
+
maxDecimalLength={2}
|
|
276
|
+
value={value}
|
|
277
|
+
onChangeText={setValue}
|
|
278
|
+
/>
|
|
279
|
+
);
|
|
275
280
|
},
|
|
276
|
-
render: (args) => <AmountInputStory {...args} />,
|
|
277
281
|
};
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
import { AVATAR_COLOR_KEYS } from '@ledgerhq/lumen-utils-shared';
|
|
2
1
|
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
3
|
-
import type { ComponentProps } from 'react';
|
|
4
2
|
|
|
5
3
|
import { Box } from '../../primitives';
|
|
6
4
|
import { DotIndicator, getDotIndicatorProps } from '../DotIndicator';
|
|
7
5
|
import { Avatar } from './Avatar';
|
|
8
6
|
import { useResolveAvatarColor } from '.';
|
|
9
7
|
|
|
10
|
-
const FallbackAvatar = ({
|
|
11
|
-
identifier,
|
|
12
|
-
...props
|
|
13
|
-
}: { identifier: string } & Omit<
|
|
14
|
-
ComponentProps<typeof Avatar>,
|
|
15
|
-
'fallbackColor'
|
|
16
|
-
>) => <Avatar {...props} fallbackColor={useResolveAvatarColor(identifier)} />;
|
|
17
|
-
|
|
18
8
|
const meta = {
|
|
19
9
|
component: Avatar,
|
|
20
10
|
id: 'rnative-avatar',
|
|
@@ -43,22 +33,17 @@ const getInitials = (index: number) => {
|
|
|
43
33
|
};
|
|
44
34
|
|
|
45
35
|
export const Base: Story = {
|
|
36
|
+
parameters: { docs: { source: { type: 'dynamic' } } },
|
|
46
37
|
args: {
|
|
47
38
|
src: exampleSrc,
|
|
48
39
|
alt: 'avatar',
|
|
49
40
|
size: 'md',
|
|
50
41
|
},
|
|
51
42
|
render: (args) => <Avatar {...args} />,
|
|
52
|
-
parameters: {
|
|
53
|
-
docs: {
|
|
54
|
-
source: {
|
|
55
|
-
code: `<Avatar src="https://example.com" size="md" alt="avatar" />`,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
43
|
};
|
|
60
44
|
|
|
61
45
|
export const SizeShowcase: Story = {
|
|
46
|
+
parameters: { docs: { source: { type: 'dynamic' } } },
|
|
62
47
|
render: () => (
|
|
63
48
|
<Box lx={{ gap: 's8' }}>
|
|
64
49
|
<Box lx={{ alignItems: 'flex-end', flexDirection: 'row', gap: 's16' }}>
|
|
@@ -81,39 +66,44 @@ export const SizeShowcase: Story = {
|
|
|
81
66
|
};
|
|
82
67
|
|
|
83
68
|
export const FallbackShowcase: Story = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
69
|
+
render: () => {
|
|
70
|
+
const fallbackColors = [
|
|
71
|
+
useResolveAvatarColor('user-0'),
|
|
72
|
+
useResolveAvatarColor('user-1'),
|
|
73
|
+
useResolveAvatarColor('user-2'),
|
|
74
|
+
useResolveAvatarColor('user-3'),
|
|
75
|
+
useResolveAvatarColor('user-4'),
|
|
76
|
+
useResolveAvatarColor('user-5'),
|
|
77
|
+
useResolveAvatarColor('user-6'),
|
|
78
|
+
useResolveAvatarColor('user-7'),
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<Box lx={{ gap: 's16' }}>
|
|
83
|
+
<Box lx={{ flexDirection: 'row', flexWrap: 'wrap', gap: 's16' }}>
|
|
84
|
+
{fallbackColors.map((fallbackColor, i) => (
|
|
85
|
+
<Avatar
|
|
86
|
+
key={i}
|
|
87
|
+
fallbackColor={fallbackColor}
|
|
88
|
+
fallbackText={getInitials(i)}
|
|
89
|
+
alt={getInitials(i)}
|
|
90
|
+
/>
|
|
91
|
+
))}
|
|
92
|
+
<Avatar fallbackText={getInitials(fallbackColors.length)} />
|
|
93
|
+
</Box>
|
|
94
|
+
<Box lx={{ flexDirection: 'row', flexWrap: 'wrap', gap: 's16' }}>
|
|
95
|
+
{fallbackColors.map((fallbackColor, i) => (
|
|
96
|
+
<Avatar key={i} fallbackColor={fallbackColor} alt={`User ${i}`} />
|
|
97
|
+
))}
|
|
98
|
+
<Avatar />
|
|
99
|
+
</Box>
|
|
111
100
|
</Box>
|
|
112
|
-
|
|
113
|
-
|
|
101
|
+
);
|
|
102
|
+
},
|
|
114
103
|
};
|
|
115
104
|
|
|
116
105
|
export const AppearanceShowcase: Story = {
|
|
106
|
+
parameters: { docs: { source: { type: 'dynamic' } } },
|
|
117
107
|
render: () => (
|
|
118
108
|
<Box lx={{ flexDirection: 'row', alignItems: 'center', gap: 's16' }}>
|
|
119
109
|
<Avatar size='md' alt='No ring' />
|
|
@@ -124,6 +114,7 @@ export const AppearanceShowcase: Story = {
|
|
|
124
114
|
};
|
|
125
115
|
|
|
126
116
|
export const NotificationShowcase: Story = {
|
|
117
|
+
parameters: { docs: { source: { type: 'dynamic' } } },
|
|
127
118
|
render: () => (
|
|
128
119
|
<Box lx={{ flexDirection: 'row', gap: 's16' }}>
|
|
129
120
|
<Avatar src={exampleSrc} alt='avatar' size='md' />
|
|
@@ -10,7 +10,7 @@ const meta = {
|
|
|
10
10
|
source: {
|
|
11
11
|
language: 'tsx',
|
|
12
12
|
format: true,
|
|
13
|
-
type: '
|
|
13
|
+
type: 'dynamic',
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
},
|
|
@@ -30,13 +30,6 @@ export const Base: Story = {
|
|
|
30
30
|
onPress: () => ({}),
|
|
31
31
|
},
|
|
32
32
|
render: (args) => <AvatarButton {...args} />,
|
|
33
|
-
parameters: {
|
|
34
|
-
docs: {
|
|
35
|
-
source: {
|
|
36
|
-
code: `<AvatarButton src="https://example.com" alt="Open user menu" onPress={openMenu} />`,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
33
|
};
|
|
41
34
|
|
|
42
35
|
export const Fallback: Story = {
|