@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
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals';
|
|
4
|
+
import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
|
|
5
|
+
import { getPaginationRange } from '@ledgerhq/lumen-utils-shared';
|
|
6
|
+
import { fireEvent, render, screen } from '@testing-library/react-native';
|
|
7
|
+
import { useState } from 'react';
|
|
8
|
+
import { ScrollView } from 'react-native';
|
|
9
|
+
import { ThemeProvider } from "../ThemeProvider/ThemeProvider.js";
|
|
10
|
+
import { Pagination } from "./Pagination.js";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
const TestWrapper = ({
|
|
13
|
+
children,
|
|
14
|
+
locale = 'en'
|
|
15
|
+
}) => /*#__PURE__*/_jsx(ThemeProvider, {
|
|
16
|
+
themes: ledgerLiveThemes,
|
|
17
|
+
colorScheme: "dark",
|
|
18
|
+
locale: locale,
|
|
19
|
+
children: children
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// Jest has no layout engine, so layouts are simulated: 1-digit pages and
|
|
23
|
+
// ellipses are 40 wide, 2-digit pages 48, separated by an 8 gap.
|
|
24
|
+
const ITEM_GAP = 8;
|
|
25
|
+
const getItemWidth = item => typeof item === 'number' ? 32 + String(item).length * 8 : 40;
|
|
26
|
+
const fireLayout = (element, x, width) => {
|
|
27
|
+
fireEvent(element, 'layout', {
|
|
28
|
+
nativeEvent: {
|
|
29
|
+
layout: {
|
|
30
|
+
x,
|
|
31
|
+
y: 0,
|
|
32
|
+
width,
|
|
33
|
+
height: 40
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
const layoutPages = (page, totalPages) => {
|
|
39
|
+
let x = 0;
|
|
40
|
+
for (const item of getPaginationRange(page, totalPages)) {
|
|
41
|
+
const width = getItemWidth(item);
|
|
42
|
+
if (typeof item === 'number') {
|
|
43
|
+
fireLayout(screen.getByLabelText(`Page ${item}`), x, width);
|
|
44
|
+
}
|
|
45
|
+
x += width + ITEM_GAP;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const layoutViewport = width => {
|
|
49
|
+
fireLayout(screen.UNSAFE_getByType(ScrollView), 0, width);
|
|
50
|
+
};
|
|
51
|
+
const ControlledPagination = ({
|
|
52
|
+
initialPage
|
|
53
|
+
}) => {
|
|
54
|
+
const [page, setPage] = useState(initialPage);
|
|
55
|
+
return /*#__PURE__*/_jsx(Pagination, {
|
|
56
|
+
page: page,
|
|
57
|
+
totalPages: 20,
|
|
58
|
+
onPageChange: setPage
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
describe('Pagination', () => {
|
|
62
|
+
it('should render page buttons with the active page selected', () => {
|
|
63
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
64
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
65
|
+
page: 2,
|
|
66
|
+
totalPages: 5,
|
|
67
|
+
onPageChange: jest.fn()
|
|
68
|
+
})
|
|
69
|
+
}));
|
|
70
|
+
expect(screen.getByLabelText('Pagination')).toBeTruthy();
|
|
71
|
+
expect(screen.getByLabelText('Page 2')).toBeSelected();
|
|
72
|
+
expect(screen.getByLabelText('Page 3')).not.toBeSelected();
|
|
73
|
+
});
|
|
74
|
+
it('should call onPageChange when a page is pressed', () => {
|
|
75
|
+
const onPageChange = jest.fn();
|
|
76
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
77
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
78
|
+
page: 1,
|
|
79
|
+
totalPages: 5,
|
|
80
|
+
onPageChange: onPageChange
|
|
81
|
+
})
|
|
82
|
+
}));
|
|
83
|
+
fireEvent.press(screen.getByLabelText('Page 3'));
|
|
84
|
+
expect(onPageChange).toHaveBeenCalledWith(3);
|
|
85
|
+
});
|
|
86
|
+
it('should call onPageChange with the adjacent pages from previous and next', () => {
|
|
87
|
+
const onPageChange = jest.fn();
|
|
88
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
89
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
90
|
+
page: 2,
|
|
91
|
+
totalPages: 5,
|
|
92
|
+
onPageChange: onPageChange
|
|
93
|
+
})
|
|
94
|
+
}));
|
|
95
|
+
fireEvent.press(screen.getByLabelText('Previous page'));
|
|
96
|
+
fireEvent.press(screen.getByLabelText('Next page'));
|
|
97
|
+
expect(onPageChange).toHaveBeenNthCalledWith(1, 1);
|
|
98
|
+
expect(onPageChange).toHaveBeenNthCalledWith(2, 3);
|
|
99
|
+
});
|
|
100
|
+
it('should disable previous on the first page and next on the last page', () => {
|
|
101
|
+
const onPageChange = jest.fn();
|
|
102
|
+
const {
|
|
103
|
+
rerender
|
|
104
|
+
} = render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
105
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
106
|
+
page: 1,
|
|
107
|
+
totalPages: 5,
|
|
108
|
+
onPageChange: onPageChange
|
|
109
|
+
})
|
|
110
|
+
}));
|
|
111
|
+
fireEvent.press(screen.getByLabelText('Previous page'));
|
|
112
|
+
rerender(/*#__PURE__*/_jsx(TestWrapper, {
|
|
113
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
114
|
+
page: 5,
|
|
115
|
+
totalPages: 5,
|
|
116
|
+
onPageChange: onPageChange
|
|
117
|
+
})
|
|
118
|
+
}));
|
|
119
|
+
fireEvent.press(screen.getByLabelText('Next page'));
|
|
120
|
+
expect(onPageChange).not.toHaveBeenCalled();
|
|
121
|
+
});
|
|
122
|
+
it('should clamp page above totalPages to totalPages', () => {
|
|
123
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
124
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
125
|
+
page: 99,
|
|
126
|
+
totalPages: 5,
|
|
127
|
+
onPageChange: jest.fn()
|
|
128
|
+
})
|
|
129
|
+
}));
|
|
130
|
+
expect(screen.getByLabelText('Page 5')).toBeSelected();
|
|
131
|
+
});
|
|
132
|
+
it('should collapse distant pages behind ellipsis markers hidden from assistive technology', () => {
|
|
133
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
134
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
135
|
+
page: 10,
|
|
136
|
+
totalPages: 20,
|
|
137
|
+
onPageChange: jest.fn()
|
|
138
|
+
})
|
|
139
|
+
}));
|
|
140
|
+
expect(screen.queryByText('…')).toBeNull();
|
|
141
|
+
expect(screen.getAllByText('…', {
|
|
142
|
+
includeHiddenElements: true
|
|
143
|
+
})).toHaveLength(2);
|
|
144
|
+
expect(screen.queryByLabelText('Page 5')).toBeNull();
|
|
145
|
+
});
|
|
146
|
+
it('should render the page buttons inside a horizontal scroll view', () => {
|
|
147
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
148
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
149
|
+
page: 10,
|
|
150
|
+
totalPages: 20,
|
|
151
|
+
onPageChange: jest.fn()
|
|
152
|
+
})
|
|
153
|
+
}));
|
|
154
|
+
expect(screen.UNSAFE_getByType(ScrollView).props.horizontal).toBe(true);
|
|
155
|
+
});
|
|
156
|
+
describe('active page visibility', () => {
|
|
157
|
+
let scrollTo;
|
|
158
|
+
beforeEach(() => {
|
|
159
|
+
scrollTo = jest.spyOn(ScrollView.prototype, 'scrollTo').mockImplementation(() => undefined);
|
|
160
|
+
});
|
|
161
|
+
afterEach(() => {
|
|
162
|
+
scrollTo.mockRestore();
|
|
163
|
+
});
|
|
164
|
+
it('should center the active page once the row is laid out', () => {
|
|
165
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
166
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
167
|
+
page: 10,
|
|
168
|
+
totalPages: 20,
|
|
169
|
+
onPageChange: jest.fn()
|
|
170
|
+
})
|
|
171
|
+
}));
|
|
172
|
+
layoutPages(10, 20);
|
|
173
|
+
expect(scrollTo).not.toHaveBeenCalled();
|
|
174
|
+
layoutViewport(240);
|
|
175
|
+
|
|
176
|
+
// Page 10 spans 144–192, so its center (168) minus half the viewport.
|
|
177
|
+
expect(scrollTo).toHaveBeenCalledTimes(1);
|
|
178
|
+
expect(scrollTo).toHaveBeenLastCalledWith({
|
|
179
|
+
x: 48,
|
|
180
|
+
animated: false
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
it('should follow the active page across an ellipsis boundary', () => {
|
|
184
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
185
|
+
children: /*#__PURE__*/_jsx(ControlledPagination, {
|
|
186
|
+
initialPage: 3
|
|
187
|
+
})
|
|
188
|
+
}));
|
|
189
|
+
layoutPages(3, 20);
|
|
190
|
+
layoutViewport(160);
|
|
191
|
+
// Page 3 spans 96–136 in [1 2 3 4 5 … 20].
|
|
192
|
+
expect(scrollTo).toHaveBeenLastCalledWith({
|
|
193
|
+
x: 36,
|
|
194
|
+
animated: false
|
|
195
|
+
});
|
|
196
|
+
fireEvent.press(screen.getByLabelText('Next page'));
|
|
197
|
+
expect(screen.getByLabelText('Page 4')).toBeSelected();
|
|
198
|
+
expect(screen.queryByLabelText('Page 2')).toBeNull();
|
|
199
|
+
layoutPages(4, 20);
|
|
200
|
+
// Page 4 spans 144–184 in [1 … 3 4 5 … 20].
|
|
201
|
+
expect(scrollTo).toHaveBeenLastCalledWith({
|
|
202
|
+
x: 84,
|
|
203
|
+
animated: false
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
it('should scroll to an already measured page when the row does not move', () => {
|
|
207
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
208
|
+
children: /*#__PURE__*/_jsx(ControlledPagination, {
|
|
209
|
+
initialPage: 1
|
|
210
|
+
})
|
|
211
|
+
}));
|
|
212
|
+
layoutPages(1, 20);
|
|
213
|
+
layoutViewport(80);
|
|
214
|
+
expect(scrollTo).toHaveBeenLastCalledWith({
|
|
215
|
+
x: 0,
|
|
216
|
+
animated: false
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
// [1 2 3 4 5 … 20] is unchanged, so no layout event follows the press.
|
|
220
|
+
fireEvent.press(screen.getByLabelText('Next page'));
|
|
221
|
+
|
|
222
|
+
// Page 2 spans 48–88.
|
|
223
|
+
expect(scrollTo).toHaveBeenLastCalledWith({
|
|
224
|
+
x: 28,
|
|
225
|
+
animated: false
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
it('should scroll once a newly shown page is measured', () => {
|
|
229
|
+
const {
|
|
230
|
+
rerender
|
|
231
|
+
} = render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
232
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
233
|
+
page: 10,
|
|
234
|
+
totalPages: 20,
|
|
235
|
+
onPageChange: jest.fn()
|
|
236
|
+
})
|
|
237
|
+
}));
|
|
238
|
+
layoutPages(10, 20);
|
|
239
|
+
layoutViewport(240);
|
|
240
|
+
scrollTo.mockClear();
|
|
241
|
+
rerender(/*#__PURE__*/_jsx(TestWrapper, {
|
|
242
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
243
|
+
page: 15,
|
|
244
|
+
totalPages: 20,
|
|
245
|
+
onPageChange: jest.fn()
|
|
246
|
+
})
|
|
247
|
+
}));
|
|
248
|
+
expect(scrollTo).not.toHaveBeenCalled();
|
|
249
|
+
layoutPages(15, 20);
|
|
250
|
+
// Page 15 spans 152–200 in [1 … 14 15 16 … 20].
|
|
251
|
+
expect(scrollTo).toHaveBeenLastCalledWith({
|
|
252
|
+
x: 56,
|
|
253
|
+
animated: false
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
it('should recenter when the viewport is resized', () => {
|
|
257
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
258
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
259
|
+
page: 10,
|
|
260
|
+
totalPages: 20,
|
|
261
|
+
onPageChange: jest.fn()
|
|
262
|
+
})
|
|
263
|
+
}));
|
|
264
|
+
layoutPages(10, 20);
|
|
265
|
+
layoutViewport(240);
|
|
266
|
+
expect(scrollTo).toHaveBeenLastCalledWith({
|
|
267
|
+
x: 48,
|
|
268
|
+
animated: false
|
|
269
|
+
});
|
|
270
|
+
layoutViewport(320);
|
|
271
|
+
expect(scrollTo).toHaveBeenLastCalledWith({
|
|
272
|
+
x: 8,
|
|
273
|
+
animated: false
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
// Wider than the content's left half: clamped to the start.
|
|
277
|
+
layoutViewport(400);
|
|
278
|
+
expect(scrollTo).toHaveBeenLastCalledWith({
|
|
279
|
+
x: 0,
|
|
280
|
+
animated: false
|
|
281
|
+
});
|
|
282
|
+
});
|
|
283
|
+
});
|
|
284
|
+
it('should return null when totalPages is 0', () => {
|
|
285
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
286
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
287
|
+
testID: "pagination",
|
|
288
|
+
page: 1,
|
|
289
|
+
totalPages: 0,
|
|
290
|
+
onPageChange: jest.fn()
|
|
291
|
+
})
|
|
292
|
+
}));
|
|
293
|
+
expect(screen.queryByTestId('pagination')).toBeNull();
|
|
294
|
+
});
|
|
295
|
+
describe('compact density', () => {
|
|
296
|
+
it('should render the current of total label instead of page buttons', () => {
|
|
297
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
298
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
299
|
+
page: 2,
|
|
300
|
+
totalPages: 8,
|
|
301
|
+
density: "compact",
|
|
302
|
+
onPageChange: jest.fn()
|
|
303
|
+
})
|
|
304
|
+
}));
|
|
305
|
+
expect(screen.getByText('2 of 8')).toBeTruthy();
|
|
306
|
+
expect(screen.queryByLabelText('Page 2')).toBeNull();
|
|
307
|
+
expect(screen.UNSAFE_queryByType(ScrollView)).toBeNull();
|
|
308
|
+
});
|
|
309
|
+
it('should localize the label', () => {
|
|
310
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
311
|
+
locale: "fr",
|
|
312
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
313
|
+
page: 2,
|
|
314
|
+
totalPages: 8,
|
|
315
|
+
density: "compact",
|
|
316
|
+
onPageChange: jest.fn()
|
|
317
|
+
})
|
|
318
|
+
}));
|
|
319
|
+
expect(screen.getByText('2 sur 8')).toBeTruthy();
|
|
320
|
+
});
|
|
321
|
+
it('should navigate with previous and next', () => {
|
|
322
|
+
const onPageChange = jest.fn();
|
|
323
|
+
render(/*#__PURE__*/_jsx(TestWrapper, {
|
|
324
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
325
|
+
page: 2,
|
|
326
|
+
totalPages: 8,
|
|
327
|
+
density: "compact",
|
|
328
|
+
onPageChange: onPageChange
|
|
329
|
+
})
|
|
330
|
+
}));
|
|
331
|
+
fireEvent.press(screen.getByLabelText('Previous page'));
|
|
332
|
+
fireEvent.press(screen.getByLabelText('Next page'));
|
|
333
|
+
expect(onPageChange).toHaveBeenNthCalledWith(1, 1);
|
|
334
|
+
expect(onPageChange).toHaveBeenNthCalledWith(2, 3);
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
});
|
|
338
|
+
//# sourceMappingURL=Pagination.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["afterEach","beforeEach","describe","expect","it","jest","ledgerLiveThemes","getPaginationRange","fireEvent","render","screen","useState","ScrollView","ThemeProvider","Pagination","jsx","_jsx","TestWrapper","children","locale","themes","colorScheme","ITEM_GAP","getItemWidth","item","String","length","fireLayout","element","x","width","nativeEvent","layout","y","height","layoutPages","page","totalPages","getByLabelText","layoutViewport","UNSAFE_getByType","ControlledPagination","initialPage","setPage","onPageChange","fn","toBeTruthy","toBeSelected","not","press","toHaveBeenCalledWith","toHaveBeenNthCalledWith","rerender","toHaveBeenCalled","queryByText","toBeNull","getAllByText","includeHiddenElements","toHaveLength","queryByLabelText","props","horizontal","toBe","scrollTo","spyOn","prototype","mockImplementation","undefined","mockRestore","toHaveBeenCalledTimes","toHaveBeenLastCalledWith","animated","mockClear","testID","queryByTestId","density","getByText","UNSAFE_queryByType"],"sourceRoot":"../../../../../../src","sources":["lib/Components/core/Pagination/Pagination.test.tsx"],"mappings":";;AAAA,SACEA,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,MAAM,EACNC,EAAE,EACFC,IAAI,QACC,eAAe;AACtB,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,kBAAkB,QAAQ,8BAA8B;AACjE,SAASC,SAAS,EAAEC,MAAM,EAAEC,MAAM,QAAQ,+BAA+B;AAEzE,SAASC,QAAQ,QAAQ,OAAO;AAChC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,aAAa,QAAQ,mCAAgC;AAC9D,SAASC,UAAU,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1C,MAAMC,WAAW,GAAGA,CAAC;EACnBC,QAAQ;EACRC,MAAM,GAAG;AAIX,CAAC,kBACCH,IAAA,CAACH,aAAa;EAACO,MAAM,EAAEd,gBAAiB;EAACe,WAAW,EAAC,MAAM;EAACF,MAAM,EAAEA,MAAO;EAAAD,QAAA,EACxEA;AAAQ,CACI,CAChB;;AAED;AACA;AACA,MAAMI,QAAQ,GAAG,CAAC;AAClB,MAAMC,YAAY,GAAIC,IAAqB,IACzC,OAAOA,IAAI,KAAK,QAAQ,GAAG,EAAE,GAAGC,MAAM,CAACD,IAAI,CAAC,CAACE,MAAM,GAAG,CAAC,GAAG,EAAE;AAE9D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1D,CAAC,CAAC;IAEFnD,EAAE,CAAC,2BAA2B,EAAE,MAAM;MACpCK,MAAM,cACJO,IAAA,CAACC,WAAW;QAACE,MAAM,EAAC,IAAI;QAAAD,QAAA,eACtBF,IAAA,CAACF,UAAU;UACTsB,IAAI,EAAE,CAAE;UACRC,UAAU,EAAE,CAAE;UACdsC,OAAO,EAAC,SAAS;UACjB/B,YAAY,EAAEvC,IAAI,CAACwC,EAAE,CAAC;QAAE,CACzB;MAAC,CACS,CACf,CAAC;MAED1C,MAAM,CAACO,MAAM,CAACkE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC9B,UAAU,CAAC,CAAC;IAClD,CAAC,CAAC;IAEF1C,EAAE,CAAC,wCAAwC,EAAE,MAAM;MACjD,MAAMwC,YAAY,GAAGvC,IAAI,CAACwC,EAAE,CAAC,CAAC;MAE9BpC,MAAM,cACJO,IAAA,CAACC,WAAW;QAAAC,QAAA,eACVF,IAAA,CAACF,UAAU;UACTsB,IAAI,EAAE,CAAE;UACRC,UAAU,EAAE,CAAE;UACdsC,OAAO,EAAC,SAAS;UACjB/B,YAAY,EAAEA;QAAa,CAC5B;MAAC,CACS,CACf,CAAC;MAEDpC,SAAS,CAACyC,KAAK,CAACvC,MAAM,CAAC4B,cAAc,CAAC,eAAe,CAAC,CAAC;MACvD9B,SAAS,CAACyC,KAAK,CAACvC,MAAM,CAAC4B,cAAc,CAAC,WAAW,CAAC,CAAC;MAEnDnC,MAAM,CAACyC,YAAY,CAAC,CAACO,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC;MAClDhD,MAAM,CAACyC,YAAY,CAAC,CAACO,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["lib/Components/core/Pagination/index.ts"],"mappings":";;AAAA,cAAc,iBAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["lib/Components/core/Pagination/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -11,20 +11,7 @@ const meta = {
|
|
|
11
11
|
args: {
|
|
12
12
|
appearance: 'plain'
|
|
13
13
|
},
|
|
14
|
-
|
|
15
|
-
docs: {
|
|
16
|
-
source: {
|
|
17
|
-
language: 'tsx',
|
|
18
|
-
format: true,
|
|
19
|
-
type: 'code'
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
export default meta;
|
|
25
|
-
const SearchInputStory = args => {
|
|
26
|
-
const [query, setQuery] = useState(args.initialValue ?? '');
|
|
27
|
-
return /*#__PURE__*/_jsx(View, {
|
|
14
|
+
decorators: [Story => /*#__PURE__*/_jsx(View, {
|
|
28
15
|
style: {
|
|
29
16
|
flex: 1,
|
|
30
17
|
minHeight: 96,
|
|
@@ -37,81 +24,102 @@ const SearchInputStory = args => {
|
|
|
37
24
|
width: '100%',
|
|
38
25
|
maxWidth: 400
|
|
39
26
|
},
|
|
40
|
-
children: /*#__PURE__*/_jsx(
|
|
41
|
-
...args,
|
|
42
|
-
value: query,
|
|
43
|
-
onChangeText: setQuery,
|
|
44
|
-
onClear: args.onClear
|
|
45
|
-
})
|
|
27
|
+
children: /*#__PURE__*/_jsx(Story, {})
|
|
46
28
|
})
|
|
47
|
-
})
|
|
29
|
+
})],
|
|
30
|
+
parameters: {
|
|
31
|
+
docs: {
|
|
32
|
+
source: {
|
|
33
|
+
language: 'tsx',
|
|
34
|
+
format: true,
|
|
35
|
+
type: 'code'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
48
39
|
};
|
|
40
|
+
export default meta;
|
|
49
41
|
export const Base = {
|
|
50
|
-
render: args => /*#__PURE__*/_jsx(SearchInputStory, {
|
|
51
|
-
...args
|
|
52
|
-
}),
|
|
53
42
|
args: {
|
|
43
|
+
appearance: 'plain',
|
|
54
44
|
placeholder: 'Search products',
|
|
55
45
|
editable: true,
|
|
56
46
|
hideClearButton: false
|
|
47
|
+
},
|
|
48
|
+
render: args => {
|
|
49
|
+
const [query, setQuery] = useState('');
|
|
50
|
+
return /*#__PURE__*/_jsx(SearchInput, {
|
|
51
|
+
...args,
|
|
52
|
+
value: query,
|
|
53
|
+
onChangeText: setQuery
|
|
54
|
+
});
|
|
57
55
|
}
|
|
58
56
|
};
|
|
59
57
|
export const WithContent = {
|
|
60
|
-
render:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
render: () => {
|
|
59
|
+
const [query, setQuery] = useState('Search text');
|
|
60
|
+
return /*#__PURE__*/_jsx(SearchInput, {
|
|
61
|
+
appearance: "plain",
|
|
62
|
+
placeholder: "Search products",
|
|
63
|
+
editable: true,
|
|
64
|
+
hideClearButton: false,
|
|
65
|
+
value: query,
|
|
66
|
+
onChangeText: setQuery
|
|
67
|
+
});
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
export const WithError = {
|
|
71
|
-
render:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
render: () => {
|
|
72
|
+
const [query, setQuery] = useState('Invalid search');
|
|
73
|
+
return /*#__PURE__*/_jsx(SearchInput, {
|
|
74
|
+
appearance: "plain",
|
|
75
|
+
placeholder: "Search products",
|
|
76
|
+
helperText: "Search term is invalid",
|
|
77
|
+
status: "error",
|
|
78
|
+
editable: true,
|
|
79
|
+
hideClearButton: false,
|
|
80
|
+
value: query,
|
|
81
|
+
onChangeText: setQuery
|
|
82
|
+
});
|
|
81
83
|
}
|
|
82
84
|
};
|
|
83
85
|
export const DisabledSearchInput = {
|
|
84
|
-
render:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
render: () => {
|
|
87
|
+
const [query, setQuery] = useState('Disabled search');
|
|
88
|
+
return /*#__PURE__*/_jsx(SearchInput, {
|
|
89
|
+
appearance: "plain",
|
|
90
|
+
placeholder: "Search products",
|
|
91
|
+
disabled: true,
|
|
92
|
+
hideClearButton: false,
|
|
93
|
+
value: query,
|
|
94
|
+
onChangeText: setQuery
|
|
95
|
+
});
|
|
92
96
|
}
|
|
93
97
|
};
|
|
94
98
|
export const WithHiddenClearButton = {
|
|
95
|
-
render:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
render: () => {
|
|
100
|
+
const [query, setQuery] = useState('Search text');
|
|
101
|
+
return /*#__PURE__*/_jsx(SearchInput, {
|
|
102
|
+
appearance: "plain",
|
|
103
|
+
placeholder: "Search products",
|
|
104
|
+
editable: true,
|
|
105
|
+
hideClearButton: true,
|
|
106
|
+
value: query,
|
|
107
|
+
onChangeText: setQuery
|
|
108
|
+
});
|
|
103
109
|
}
|
|
104
110
|
};
|
|
105
111
|
export const WithClearCallback = {
|
|
106
|
-
render:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
render: () => {
|
|
113
|
+
const [query, setQuery] = useState('Click clear to see callback');
|
|
114
|
+
return /*#__PURE__*/_jsx(SearchInput, {
|
|
115
|
+
appearance: "plain",
|
|
116
|
+
placeholder: "Search products",
|
|
117
|
+
editable: true,
|
|
118
|
+
hideClearButton: false,
|
|
119
|
+
value: query,
|
|
120
|
+
onChangeText: setQuery,
|
|
121
|
+
onClear: () => alert('Search cleared!')
|
|
122
|
+
});
|
|
115
123
|
}
|
|
116
124
|
};
|
|
117
125
|
//# sourceMappingURL=SearchInput.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useState","View","SearchInput","jsx","_jsx","meta","component","id","title","args","appearance","
|
|
1
|
+
{"version":3,"names":["useState","View","SearchInput","jsx","_jsx","meta","component","id","title","args","appearance","decorators","Story","style","flex","minHeight","alignItems","justifyContent","padding","children","width","maxWidth","parameters","docs","source","language","format","type","Base","placeholder","editable","hideClearButton","render","query","setQuery","value","onChangeText","WithContent","WithError","helperText","status","DisabledSearchInput","disabled","WithHiddenClearButton","WithClearCallback","onClear","alert"],"sourceRoot":"../../../../../../src","sources":["lib/Components/core/SearchInput/SearchInput.stories.tsx"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,WAAW,QAAQ,kBAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5C,MAAMC,IAAI,GAAG;EACXC,SAAS,EAAEJ,WAAW;EACtBK,EAAE,EAAE,qBAAqB;EACzBC,KAAK,EAAE,kBAAkB;EACzBC,IAAI,EAAE;IACJC,UAAU,EAAE;EACd,CAAC;EACDC,UAAU,EAAE,CACTC,KAAK,iBACJR,IAAA,CAACH,IAAI;IACHY,KAAK,EAAE;MACLC,IAAI,EAAE,CAAC;MACPC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE,QAAQ;MACxBC,OAAO,EAAE;IACX,CAAE;IAAAC,QAAA,eAEFf,IAAA,CAACH,IAAI;MAACY,KAAK,EAAE;QAAEO,KAAK,EAAE,MAAM;QAAEC,QAAQ,EAAE;MAAI,CAAE;MAAAF,QAAA,eAC5Cf,IAAA,CAACQ,KAAK,IAAE;IAAC,CACL;EAAC,CACH,CACP,CACF;EACDU,UAAU,EAAE;IACVC,IAAI,EAAE;MACJC,MAAM,EAAE;QACNC,QAAQ,EAAE,KAAK;QACfC,MAAM,EAAE,IAAI;QACZC,IAAI,EAAE;MACR;IACF;EACF;AACF,C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+
}
|
|
21
|
+
},
|
|
17
22
|
layout: 'centered',
|
|
18
23
|
backgrounds: {
|
|
19
24
|
default: 'light'
|
|
@@ -129,6 +134,13 @@ export const TabLayoutShowcase = {
|
|
|
129
134
|
}
|
|
130
135
|
};
|
|
131
136
|
export const Disabled = {
|
|
137
|
+
parameters: {
|
|
138
|
+
docs: {
|
|
139
|
+
source: {
|
|
140
|
+
type: 'dynamic'
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
132
144
|
args: {},
|
|
133
145
|
render: args => /*#__PURE__*/_jsxs(SegmentedControl, {
|
|
134
146
|
...args,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useState","Box","Coins","Nft","TransferHorizontal","DotCount","createSegmentedControl","SegmentedControl","SegmentedControlButton","jsx","_jsx","jsxs","_jsxs","meta","id","title","component","subcomponents","parameters","layout","backgrounds","default","decorators","Story","lx","width","flexDirection","justifyContent","children","args","appearance","tabLayout","Base","render","state","setState","selectedValue","onSelectedChange","accessibilityLabel","value","WithIcons","icon","TabLayoutShowcase","fitState","setFitState","fixedState","setFixedState","gap","style","Disabled","disabled","WithTrailingContent","trailingContent","TypedSegmentedControl","TypesafeFactory","view","setView"],"sourceRoot":"../../../../../../src","sources":["lib/Components/core/SegmentedControl/SegmentedControl.stories.tsx"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SAASC,GAAG,QAAQ,2BAAkB;AACtC,SAASC,KAAK,EAAEC,GAAG,EAAEC,kBAAkB,QAAQ,wBAAe;AAC9D,SAASC,QAAQ,QAAQ,sBAAa;AACtC,SACEC,sBAAsB,EACtBC,gBAAgB,EAChBC,sBAAsB,QACjB,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE5B,MAAMC,IAAI,GAAG;EACXC,EAAE,EAAE,0BAA0B;EAC9BC,KAAK,EAAE,uBAAuB;EAC9BC,SAAS,EAAET,gBAAgB;EAC3BU,aAAa,EAAE;IACbT;EACF,CAAC;EACDU,UAAU,EAAE;IACVC,MAAM,EAAE,UAAU;IAClBC,WAAW,EAAE;MAAEC,OAAO,EAAE;IAAQ;EAClC,CAAC;EACDC,UAAU,EAAE,CACTC,KAAK,
|
|
1
|
+
{"version":3,"names":["useState","Box","Coins","Nft","TransferHorizontal","DotCount","createSegmentedControl","SegmentedControl","SegmentedControlButton","jsx","_jsx","jsxs","_jsxs","meta","id","title","component","subcomponents","parameters","docs","source","type","layout","backgrounds","default","decorators","Story","lx","width","flexDirection","justifyContent","children","args","appearance","tabLayout","Base","render","state","setState","selectedValue","onSelectedChange","accessibilityLabel","value","WithIcons","icon","TabLayoutShowcase","fitState","setFitState","fixedState","setFixedState","gap","style","Disabled","disabled","WithTrailingContent","trailingContent","TypedSegmentedControl","TypesafeFactory","view","setView"],"sourceRoot":"../../../../../../src","sources":["lib/Components/core/SegmentedControl/SegmentedControl.stories.tsx"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SAASC,GAAG,QAAQ,2BAAkB;AACtC,SAASC,KAAK,EAAEC,GAAG,EAAEC,kBAAkB,QAAQ,wBAAe;AAC9D,SAASC,QAAQ,QAAQ,sBAAa;AACtC,SACEC,sBAAsB,EACtBC,gBAAgB,EAChBC,sBAAsB,QACjB,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE5B,MAAMC,IAAI,GAAG;EACXC,EAAE,EAAE,0BAA0B;EAC9BC,KAAK,EAAE,uBAAuB;EAC9BC,SAAS,EAAET,gBAAgB;EAC3BU,aAAa,EAAE;IACbT;EACF,CAAC;EACDU,UAAU,EAAE;IACVC,IAAI,EAAE;MAAEC,MAAM,EAAE;QAAEC,IAAI,EAAE;MAAO;IAAE,CAAC;IAClCC,MAAM,EAAE,UAAU;IAClBC,WAAW,EAAE;MAAEC,OAAO,EAAE;IAAQ;EAClC,CAAC;EACDC,UAAU,EAAE,CACTC,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A,gBAE9BrB,IAAA,CAAC8C,qBAAqB,CAAChD,sBAAsB;QAACkC,KAAK,EAAC,SAAS;QAAAX,QAAA,EAAC;MAE9D,CAA8C,CAAC,eAC/CrB,IAAA,CAAC8C,qBAAqB,CAAChD,sBAAsB;QAACkC,KAAK,EAAC,KAAK;QAAAX,QAAA,EAAC;MAE1D,CAA8C,CAAC,eAC/CrB,IAAA,CAAC8C,qBAAqB,CAAChD,sBAAsB;QAACkC,KAAK,EAAC,OAAO;QAAAX,QAAA,EAAC;MAE5D,CAA8C,CAAC;IAAA,CACT,CAAC;EAE7C;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Canvas } from '@storybook/addon-docs/blocks';
|
|
1
|
+
import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as SelectListStories from './SelectList.stories';
|
|
3
3
|
import {
|
|
4
4
|
CustomTabs,
|
|
@@ -37,6 +37,8 @@ It handles **selection state**, **automatic grouping** (via a `group` field on i
|
|
|
37
37
|
|
|
38
38
|
## Properties
|
|
39
39
|
|
|
40
|
+
<Controls of={SelectListStories.Base} />
|
|
41
|
+
|
|
40
42
|
### Grouped items
|
|
41
43
|
|
|
42
44
|
Items with a `group` field are automatically grouped with labels and separators:
|