@ledgerhq/lumen-ui-rnative 0.1.69 → 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.stories.js +1 -1
- package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.mdx +6 -0
- package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.stories.js +96 -22
- package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.stories.js.map +1 -1
- 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 +1 -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/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/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 +1 -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/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 +8 -8
- 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/MediaImageGroup/MediaImageGroup.mdx +6 -0
- package/src/lib/Components/core/MediaImageGroup/MediaImageGroup.stories.tsx +47 -15
- 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 +1 -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/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
|
@@ -11,7 +11,7 @@ const meta = {
|
|
|
11
11
|
source: {
|
|
12
12
|
language: 'tsx',
|
|
13
13
|
format: true,
|
|
14
|
-
type: '
|
|
14
|
+
type: 'dynamic',
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
},
|
|
@@ -26,15 +26,4 @@ export const Base: Story = {
|
|
|
26
26
|
lx: { color: 'base' },
|
|
27
27
|
children: 'Hello World',
|
|
28
28
|
},
|
|
29
|
-
parameters: {
|
|
30
|
-
docs: {
|
|
31
|
-
source: {
|
|
32
|
-
code: `
|
|
33
|
-
<Text typography='body1' lx={{ color: 'base' }}>
|
|
34
|
-
Hello World
|
|
35
|
-
</Text>
|
|
36
|
-
`,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
29
|
};
|
|
@@ -7,6 +7,7 @@ import * as Icons from '../../symbols';
|
|
|
7
7
|
import type { IconSize } from './types';
|
|
8
8
|
|
|
9
9
|
const meta = {
|
|
10
|
+
parameters: { docs: { source: { type: 'code' } } },
|
|
10
11
|
id: 'rnative-icon',
|
|
11
12
|
title: 'Symbols/Interface Icons',
|
|
12
13
|
} satisfies Meta;
|
|
@@ -18,6 +19,17 @@ const sizes: IconSize[] = [12, 16, 20, 24, 32, 40, 48, 56];
|
|
|
18
19
|
type IconName = keyof typeof Icons;
|
|
19
20
|
const iconNames = Object.keys(Icons) as IconName[];
|
|
20
21
|
|
|
22
|
+
const sizeIconNames: IconName[] = [
|
|
23
|
+
'Home',
|
|
24
|
+
'Settings',
|
|
25
|
+
'Heart',
|
|
26
|
+
'Star',
|
|
27
|
+
'ArrowDown',
|
|
28
|
+
'ArrowLeft',
|
|
29
|
+
'ArrowRight',
|
|
30
|
+
'ArrowUp',
|
|
31
|
+
];
|
|
32
|
+
|
|
21
33
|
type IconStoryProps = {
|
|
22
34
|
size: IconSize;
|
|
23
35
|
name: IconName;
|
|
@@ -25,72 +37,6 @@ type IconStoryProps = {
|
|
|
25
37
|
disabled?: boolean;
|
|
26
38
|
};
|
|
27
39
|
|
|
28
|
-
type IconCardProps = {
|
|
29
|
-
name: string;
|
|
30
|
-
size?: IconSize;
|
|
31
|
-
color?: string;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const IconCard = ({ name, size = 24, color }: IconCardProps) => {
|
|
35
|
-
const { theme } = useTheme();
|
|
36
|
-
const [copied, setCopied] = useState(false);
|
|
37
|
-
const IconComponent = Icons[name as keyof typeof Icons];
|
|
38
|
-
const iconColor = color ?? theme.colors.text.base;
|
|
39
|
-
|
|
40
|
-
const handleClick = async () => {
|
|
41
|
-
try {
|
|
42
|
-
await navigator.clipboard.writeText(name);
|
|
43
|
-
setCopied(true);
|
|
44
|
-
setTimeout(() => setCopied(false), 1500);
|
|
45
|
-
} catch (err) {
|
|
46
|
-
console.error('Failed to copy:', err);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<Pressable
|
|
52
|
-
key={name}
|
|
53
|
-
onPress={handleClick}
|
|
54
|
-
lx={{
|
|
55
|
-
position: 'relative',
|
|
56
|
-
flexDirection: 'column',
|
|
57
|
-
alignItems: 'center',
|
|
58
|
-
gap: 's8',
|
|
59
|
-
borderRadius: 'sm',
|
|
60
|
-
padding: 's16',
|
|
61
|
-
width: 's96',
|
|
62
|
-
}}
|
|
63
|
-
style={({ pressed }) => ({
|
|
64
|
-
backgroundColor: pressed ? theme.colors.bg.mutedPressed : 'transparent',
|
|
65
|
-
})}
|
|
66
|
-
>
|
|
67
|
-
<IconComponent size={size} style={{ color: iconColor }} />
|
|
68
|
-
<Text typography='body4' lx={{ color: 'muted' }}>
|
|
69
|
-
{name}
|
|
70
|
-
</Text>
|
|
71
|
-
{copied && (
|
|
72
|
-
<Box
|
|
73
|
-
lx={{
|
|
74
|
-
position: 'absolute',
|
|
75
|
-
top: 's0',
|
|
76
|
-
left: 's0',
|
|
77
|
-
right: 's0',
|
|
78
|
-
bottom: 's0',
|
|
79
|
-
alignItems: 'center',
|
|
80
|
-
justifyContent: 'center',
|
|
81
|
-
borderRadius: 'sm',
|
|
82
|
-
backgroundColor: 'muted',
|
|
83
|
-
}}
|
|
84
|
-
>
|
|
85
|
-
<Text typography='body4' lx={{ color: 'onAccent' }}>
|
|
86
|
-
Copied!
|
|
87
|
-
</Text>
|
|
88
|
-
</Box>
|
|
89
|
-
)}
|
|
90
|
-
</Pressable>
|
|
91
|
-
);
|
|
92
|
-
};
|
|
93
|
-
|
|
94
40
|
export const Base: StoryObj<IconStoryProps> = {
|
|
95
41
|
args: {
|
|
96
42
|
size: 24,
|
|
@@ -129,20 +75,12 @@ export const Base: StoryObj<IconStoryProps> = {
|
|
|
129
75
|
</Box>
|
|
130
76
|
);
|
|
131
77
|
},
|
|
132
|
-
parameters: {
|
|
133
|
-
docs: {
|
|
134
|
-
source: {
|
|
135
|
-
code: `
|
|
136
|
-
<Information size={24} style={{ color: theme.colors.text.base }} />
|
|
137
|
-
`,
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
78
|
};
|
|
142
79
|
|
|
143
80
|
export const Sizes: StoryObj = {
|
|
144
81
|
render: () => {
|
|
145
82
|
const { theme } = useTheme();
|
|
83
|
+
const [copiedName, setCopiedName] = useState<string | null>(null);
|
|
146
84
|
|
|
147
85
|
return (
|
|
148
86
|
<Box lx={{ flexDirection: 'column', gap: 's16' }}>
|
|
@@ -164,18 +102,65 @@ export const Sizes: StoryObj = {
|
|
|
164
102
|
borderColor: theme.colors.border.mutedSubtle,
|
|
165
103
|
}}
|
|
166
104
|
>
|
|
167
|
-
{
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
105
|
+
{sizeIconNames.map((iconName) => {
|
|
106
|
+
const IconComponent = Icons[iconName];
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<Pressable
|
|
110
|
+
key={iconName}
|
|
111
|
+
onPress={async () => {
|
|
112
|
+
try {
|
|
113
|
+
await navigator.clipboard.writeText(iconName);
|
|
114
|
+
setCopiedName(iconName);
|
|
115
|
+
setTimeout(() => setCopiedName(null), 1500);
|
|
116
|
+
} catch (err) {
|
|
117
|
+
console.error('Failed to copy:', err);
|
|
118
|
+
}
|
|
119
|
+
}}
|
|
120
|
+
lx={{
|
|
121
|
+
position: 'relative',
|
|
122
|
+
flexDirection: 'column',
|
|
123
|
+
alignItems: 'center',
|
|
124
|
+
gap: 's8',
|
|
125
|
+
borderRadius: 'sm',
|
|
126
|
+
padding: 's16',
|
|
127
|
+
width: 's96',
|
|
128
|
+
}}
|
|
129
|
+
style={({ pressed }) => ({
|
|
130
|
+
backgroundColor: pressed
|
|
131
|
+
? theme.colors.bg.mutedPressed
|
|
132
|
+
: 'transparent',
|
|
133
|
+
})}
|
|
134
|
+
>
|
|
135
|
+
<IconComponent
|
|
136
|
+
size={size}
|
|
137
|
+
style={{ color: theme.colors.text.base }}
|
|
138
|
+
/>
|
|
139
|
+
<Text typography='body4' lx={{ color: 'muted' }}>
|
|
140
|
+
{iconName}
|
|
141
|
+
</Text>
|
|
142
|
+
{copiedName === iconName && (
|
|
143
|
+
<Box
|
|
144
|
+
lx={{
|
|
145
|
+
position: 'absolute',
|
|
146
|
+
top: 's0',
|
|
147
|
+
left: 's0',
|
|
148
|
+
right: 's0',
|
|
149
|
+
bottom: 's0',
|
|
150
|
+
alignItems: 'center',
|
|
151
|
+
justifyContent: 'center',
|
|
152
|
+
borderRadius: 'sm',
|
|
153
|
+
backgroundColor: 'muted',
|
|
154
|
+
}}
|
|
155
|
+
>
|
|
156
|
+
<Text typography='body4' lx={{ color: 'onAccent' }}>
|
|
157
|
+
Copied!
|
|
158
|
+
</Text>
|
|
159
|
+
</Box>
|
|
160
|
+
)}
|
|
161
|
+
</Pressable>
|
|
162
|
+
);
|
|
163
|
+
})}
|
|
179
164
|
</Box>
|
|
180
165
|
</Box>
|
|
181
166
|
))}
|
|
@@ -185,12 +170,11 @@ export const Sizes: StoryObj = {
|
|
|
185
170
|
};
|
|
186
171
|
|
|
187
172
|
export const Gallery: StoryObj = {
|
|
188
|
-
parameters: {
|
|
189
|
-
layout: 'fullscreen',
|
|
190
|
-
},
|
|
173
|
+
parameters: { layout: 'fullscreen' },
|
|
191
174
|
render: () => {
|
|
192
175
|
const { theme } = useTheme();
|
|
193
176
|
const [searchTerm, setSearchTerm] = useState('');
|
|
177
|
+
const [copiedName, setCopiedName] = useState<string | null>(null);
|
|
194
178
|
|
|
195
179
|
// Filter icons based on search term
|
|
196
180
|
const filteredIcons = Object.entries(Icons).filter(([name]) =>
|
|
@@ -225,11 +209,66 @@ export const Gallery: StoryObj = {
|
|
|
225
209
|
</Box>
|
|
226
210
|
</Box>
|
|
227
211
|
|
|
228
|
-
{/* Icon grid - using flexWrap for RN compatibility */}
|
|
229
212
|
<Box lx={{ flexDirection: 'row', flexWrap: 'wrap', gap: 's8' }}>
|
|
230
|
-
{filteredIcons.map(([name]) =>
|
|
231
|
-
|
|
232
|
-
|
|
213
|
+
{filteredIcons.map(([name]) => {
|
|
214
|
+
const IconComponent = Icons[name as IconName];
|
|
215
|
+
|
|
216
|
+
return (
|
|
217
|
+
<Pressable
|
|
218
|
+
key={name}
|
|
219
|
+
onPress={async () => {
|
|
220
|
+
try {
|
|
221
|
+
await navigator.clipboard.writeText(name);
|
|
222
|
+
setCopiedName(name);
|
|
223
|
+
setTimeout(() => setCopiedName(null), 1500);
|
|
224
|
+
} catch (err) {
|
|
225
|
+
console.error('Failed to copy:', err);
|
|
226
|
+
}
|
|
227
|
+
}}
|
|
228
|
+
lx={{
|
|
229
|
+
position: 'relative',
|
|
230
|
+
flexDirection: 'column',
|
|
231
|
+
alignItems: 'center',
|
|
232
|
+
gap: 's8',
|
|
233
|
+
borderRadius: 'sm',
|
|
234
|
+
padding: 's16',
|
|
235
|
+
width: 's96',
|
|
236
|
+
}}
|
|
237
|
+
style={({ pressed }) => ({
|
|
238
|
+
backgroundColor: pressed
|
|
239
|
+
? theme.colors.bg.mutedPressed
|
|
240
|
+
: 'transparent',
|
|
241
|
+
})}
|
|
242
|
+
>
|
|
243
|
+
<IconComponent
|
|
244
|
+
size={24}
|
|
245
|
+
style={{ color: theme.colors.text.base }}
|
|
246
|
+
/>
|
|
247
|
+
<Text typography='body4' lx={{ color: 'muted' }}>
|
|
248
|
+
{name}
|
|
249
|
+
</Text>
|
|
250
|
+
{copiedName === name && (
|
|
251
|
+
<Box
|
|
252
|
+
lx={{
|
|
253
|
+
position: 'absolute',
|
|
254
|
+
top: 's0',
|
|
255
|
+
left: 's0',
|
|
256
|
+
right: 's0',
|
|
257
|
+
bottom: 's0',
|
|
258
|
+
alignItems: 'center',
|
|
259
|
+
justifyContent: 'center',
|
|
260
|
+
borderRadius: 'sm',
|
|
261
|
+
backgroundColor: 'muted',
|
|
262
|
+
}}
|
|
263
|
+
>
|
|
264
|
+
<Text typography='body4' lx={{ color: 'onAccent' }}>
|
|
265
|
+
Copied!
|
|
266
|
+
</Text>
|
|
267
|
+
</Box>
|
|
268
|
+
)}
|
|
269
|
+
</Pressable>
|
|
270
|
+
);
|
|
271
|
+
})}
|
|
233
272
|
</Box>
|
|
234
273
|
|
|
235
274
|
{/* No results message */}
|
|
@@ -33,7 +33,7 @@ export type BaseAxisProps = {
|
|
|
33
33
|
/**
|
|
34
34
|
* Explicit tick positions along the axis.
|
|
35
35
|
* When omitted, ticks are computed automatically from the scale. An empty
|
|
36
|
-
* array is
|
|
36
|
+
* array is honored literally and renders no ticks — to keep ticks while
|
|
37
37
|
* hiding their marks or labels, use `showTickMark` / `showLabels` instead.
|
|
38
38
|
*/
|
|
39
39
|
ticks?: number[];
|
|
@@ -15,7 +15,7 @@ import type {
|
|
|
15
15
|
export type ScrubbingOptions = {
|
|
16
16
|
/**
|
|
17
17
|
* Enables scrubbing (pan gesture) interactions on the chart.
|
|
18
|
-
* When true, add a `<Scrubber>` as a child to
|
|
18
|
+
* When true, add a `<Scrubber>` as a child to visualize the interaction.
|
|
19
19
|
* @default false
|
|
20
20
|
*/
|
|
21
21
|
enableScrubbing?: boolean;
|
|
@@ -275,7 +275,7 @@ describe('DonutChart', () => {
|
|
|
275
275
|
expect(onActiveIdChange).not.toHaveBeenCalled();
|
|
276
276
|
});
|
|
277
277
|
|
|
278
|
-
it('ignores a rejected/
|
|
278
|
+
it('ignores a rejected/canceled tap even over a segment', () => {
|
|
279
279
|
const onActiveIdChange = jest.fn();
|
|
280
280
|
const { getByTestId } = renderDonut({ onActiveIdChange });
|
|
281
281
|
|
|
@@ -44,7 +44,7 @@ const getCurveFactory = (curve: CurveType = DEFAULT_CURVE): CurveFactory =>
|
|
|
44
44
|
* Project series data into scaled [x, y] pixel coordinates.
|
|
45
45
|
*
|
|
46
46
|
* When `xData` contains numeric values, those values are fed into the scale
|
|
47
|
-
* instead of the array index so the points
|
|
47
|
+
* instead of the array index so the points honor a numeric X domain.
|
|
48
48
|
*
|
|
49
49
|
* When `xData` is provided, iteration is capped at `xData.length` so a series
|
|
50
50
|
* with more points than the axis has labels does not overflow past the right
|
|
@@ -4,6 +4,9 @@ import { View } from 'react-native';
|
|
|
4
4
|
import { LineChart } from './LineChart';
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: { source: { language: 'tsx', format: true, type: 'code' } },
|
|
9
|
+
},
|
|
7
10
|
component: LineChart,
|
|
8
11
|
id: 'rnative-linechart',
|
|
9
12
|
title: 'Visualization/LineChart',
|
|
@@ -44,6 +47,7 @@ const multiSeries = [
|
|
|
44
47
|
|
|
45
48
|
export const Base: Story = {
|
|
46
49
|
parameters: {
|
|
50
|
+
docs: { source: { type: 'dynamic' } },
|
|
47
51
|
layout: 'centered',
|
|
48
52
|
backgrounds: { default: 'light' },
|
|
49
53
|
},
|
|
@@ -56,6 +60,7 @@ export const Base: Story = {
|
|
|
56
60
|
|
|
57
61
|
export const WithXAxis: Story = {
|
|
58
62
|
parameters: {
|
|
63
|
+
docs: { source: { type: 'dynamic' } },
|
|
59
64
|
layout: 'centered',
|
|
60
65
|
backgrounds: { default: 'light' },
|
|
61
66
|
},
|
|
@@ -73,6 +78,7 @@ export const WithXAxis: Story = {
|
|
|
73
78
|
|
|
74
79
|
export const XAxisExplicitNumericData: Story = {
|
|
75
80
|
parameters: {
|
|
81
|
+
docs: { source: { type: 'dynamic' } },
|
|
76
82
|
layout: 'centered',
|
|
77
83
|
backgrounds: { default: 'light' },
|
|
78
84
|
},
|
|
@@ -91,6 +97,7 @@ export const XAxisExplicitNumericData: Story = {
|
|
|
91
97
|
|
|
92
98
|
export const XAxisStringData: Story = {
|
|
93
99
|
parameters: {
|
|
100
|
+
docs: { source: { type: 'dynamic' } },
|
|
94
101
|
layout: 'centered',
|
|
95
102
|
backgrounds: { default: 'light' },
|
|
96
103
|
},
|
|
@@ -109,6 +116,7 @@ export const XAxisStringData: Story = {
|
|
|
109
116
|
|
|
110
117
|
export const WithStringLabels: Story = {
|
|
111
118
|
parameters: {
|
|
119
|
+
docs: { source: { type: 'dynamic' } },
|
|
112
120
|
layout: 'centered',
|
|
113
121
|
backgrounds: { default: 'light' },
|
|
114
122
|
},
|
|
@@ -142,6 +150,7 @@ export const WithStringLabels: Story = {
|
|
|
142
150
|
|
|
143
151
|
export const WithCustomTicks: Story = {
|
|
144
152
|
parameters: {
|
|
153
|
+
docs: { source: { type: 'dynamic' } },
|
|
145
154
|
layout: 'centered',
|
|
146
155
|
backgrounds: { default: 'light' },
|
|
147
156
|
},
|
|
@@ -193,6 +202,7 @@ export const WithTickFormatter: Story = {
|
|
|
193
202
|
|
|
194
203
|
export const XAxisTop: Story = {
|
|
195
204
|
parameters: {
|
|
205
|
+
docs: { source: { type: 'dynamic' } },
|
|
196
206
|
layout: 'centered',
|
|
197
207
|
backgrounds: { default: 'light' },
|
|
198
208
|
},
|
|
@@ -211,6 +221,7 @@ export const XAxisTop: Story = {
|
|
|
211
221
|
|
|
212
222
|
export const MultipleSeries: Story = {
|
|
213
223
|
parameters: {
|
|
224
|
+
docs: { source: { type: 'dynamic' } },
|
|
214
225
|
layout: 'centered',
|
|
215
226
|
backgrounds: { default: 'light' },
|
|
216
227
|
},
|
|
@@ -228,6 +239,7 @@ export const MultipleSeries: Story = {
|
|
|
228
239
|
|
|
229
240
|
export const CustomDomain: Story = {
|
|
230
241
|
parameters: {
|
|
242
|
+
docs: { source: { type: 'dynamic' } },
|
|
231
243
|
layout: 'centered',
|
|
232
244
|
backgrounds: { default: 'light' },
|
|
233
245
|
},
|
|
@@ -271,6 +283,7 @@ export const WithBothAxes: Story = {
|
|
|
271
283
|
|
|
272
284
|
export const WithBothAxesMultipleSeries: Story = {
|
|
273
285
|
parameters: {
|
|
286
|
+
docs: { source: { type: 'dynamic' } },
|
|
274
287
|
layout: 'centered',
|
|
275
288
|
backgrounds: { default: 'light' },
|
|
276
289
|
},
|
|
@@ -293,6 +306,7 @@ export const WithBothAxesMultipleSeries: Story = {
|
|
|
293
306
|
|
|
294
307
|
export const WithArea: Story = {
|
|
295
308
|
parameters: {
|
|
309
|
+
docs: { source: { type: 'dynamic' } },
|
|
296
310
|
layout: 'centered',
|
|
297
311
|
backgrounds: { default: 'light' },
|
|
298
312
|
},
|
|
@@ -310,6 +324,7 @@ export const WithArea: Story = {
|
|
|
310
324
|
|
|
311
325
|
export const WithAreaMultipleSeries: Story = {
|
|
312
326
|
parameters: {
|
|
327
|
+
docs: { source: { type: 'dynamic' } },
|
|
313
328
|
layout: 'centered',
|
|
314
329
|
backgrounds: { default: 'light' },
|
|
315
330
|
},
|
|
@@ -359,7 +359,7 @@ describe('LineChart', () => {
|
|
|
359
359
|
expect(countMoves(d)).toBe(1);
|
|
360
360
|
});
|
|
361
361
|
|
|
362
|
-
it('
|
|
362
|
+
it('honors connectNulls set per-series', () => {
|
|
363
363
|
const { getByTestId } = render(
|
|
364
364
|
<LineChartWrapper>
|
|
365
365
|
<LineChart
|
|
@@ -51,16 +51,16 @@ export type LineChartProps = LineRenderOptions &
|
|
|
51
51
|
/**
|
|
52
52
|
* Whether the chart is loading. When there is no data, renders an animated
|
|
53
53
|
* shimmer placeholder line (initial loading). When data is present (e.g. a
|
|
54
|
-
* time-range change), the current line is
|
|
54
|
+
* time-range change), the current line is recolored to a muted grey and
|
|
55
55
|
* shimmers until the new `series` is provided (transition loading).
|
|
56
56
|
*
|
|
57
|
-
* To get the transition
|
|
57
|
+
* To get the transition behavior, keep passing the previous `series` while
|
|
58
58
|
* refetching; clearing it falls back to the initial placeholder.
|
|
59
59
|
* @default false
|
|
60
60
|
*/
|
|
61
61
|
loading?: boolean;
|
|
62
62
|
/**
|
|
63
|
-
* Text shown in the
|
|
63
|
+
* Text shown in the center of the chart when there is no data and the chart
|
|
64
64
|
* is not loading.
|
|
65
65
|
* @default 'No data' (translated)
|
|
66
66
|
*/
|
|
@@ -15,6 +15,7 @@ const sampleSeries = [
|
|
|
15
15
|
];
|
|
16
16
|
|
|
17
17
|
const meta = {
|
|
18
|
+
parameters: { docs: { source: { type: 'code' } } },
|
|
18
19
|
component: Point,
|
|
19
20
|
id: 'rnative-point',
|
|
20
21
|
title: 'Visualization/Point',
|
|
@@ -118,6 +119,7 @@ export const NoPoint: Story = {
|
|
|
118
119
|
dataY: 98,
|
|
119
120
|
},
|
|
120
121
|
parameters: {
|
|
122
|
+
docs: { source: { type: 'dynamic' } },
|
|
121
123
|
layout: 'centered',
|
|
122
124
|
backgrounds: { default: 'light' },
|
|
123
125
|
},
|
|
@@ -209,7 +209,7 @@ describe('Point', () => {
|
|
|
209
209
|
);
|
|
210
210
|
});
|
|
211
211
|
|
|
212
|
-
it("
|
|
212
|
+
it("centers a long edge label when labelAlignment is 'center'", () => {
|
|
213
213
|
const labelSpy = jest.fn(({ x, y, children }: PointLabelProps) => (
|
|
214
214
|
<SvgText x={x} y={y}>
|
|
215
215
|
{children}
|
|
@@ -15,7 +15,7 @@ export type PointLabelComponent = ComponentType<PointLabelProps>;
|
|
|
15
15
|
*
|
|
16
16
|
* - `'auto'`: keep the label inside the drawing area, anchoring it to the
|
|
17
17
|
* nearest edge when it would overflow.
|
|
18
|
-
* - `'center'`: always
|
|
18
|
+
* - `'center'`: always center the label on the point.
|
|
19
19
|
*/
|
|
20
20
|
export type LabelAlignment = 'center' | 'auto';
|
|
21
21
|
|
|
@@ -77,7 +77,7 @@ export type PointProps = {
|
|
|
77
77
|
* Custom component rendered instead of the default `PointLabel`.
|
|
78
78
|
* Receives pixel coordinates (`x`, `y`) and the resolved label as
|
|
79
79
|
* `children`. Use `PointLabel` inside your component to retain
|
|
80
|
-
* theme styling while
|
|
80
|
+
* theme styling while customizing layout or appearance.
|
|
81
81
|
*/
|
|
82
82
|
LabelComponent?: PointLabelComponent;
|
|
83
83
|
/**
|
|
@@ -116,7 +116,7 @@ export type PointProps = {
|
|
|
116
116
|
* Horizontal alignment of the label relative to the chart's drawing area.
|
|
117
117
|
* With `'auto'`, a label that would overflow the left/right edge is anchored
|
|
118
118
|
* to that edge and grows inward instead of being clipped, while the arrow
|
|
119
|
-
* keeps pointing at the exact data point. Use `'center'` to always
|
|
119
|
+
* keeps pointing at the exact data point. Use `'center'` to always center the
|
|
120
120
|
* label on the point.
|
|
121
121
|
* @default 'auto'
|
|
122
122
|
*/
|
|
@@ -25,7 +25,7 @@ type PointGeometry = {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* Resolves a point's chart geometry and
|
|
28
|
+
* Resolves a point's chart geometry and behavior: projects its data
|
|
29
29
|
* coordinates to pixels, registers it as a magnetic snap target when enabled,
|
|
30
30
|
* exposes the reveal-animation props, and reports whether it falls inside the
|
|
31
31
|
* drawing area.
|
|
@@ -126,7 +126,7 @@ describe('computeLabelX', () => {
|
|
|
126
126
|
const area = { x: 100, y: 0, width: 200, height: 100 };
|
|
127
127
|
const halfArrow = ARROW_WIDTH / 2;
|
|
128
128
|
|
|
129
|
-
it('
|
|
129
|
+
it('centers the label on the point when clamping is disabled', () => {
|
|
130
130
|
expect(
|
|
131
131
|
computeLabelX(105, 'A very long label', area, 'center', true),
|
|
132
132
|
).toEqual({
|
|
@@ -135,7 +135,7 @@ describe('computeLabelX', () => {
|
|
|
135
135
|
});
|
|
136
136
|
});
|
|
137
137
|
|
|
138
|
-
it('
|
|
138
|
+
it('centers the label on the point when it fits inside the bounds', () => {
|
|
139
139
|
expect(computeLabelX(200, 'Peak', area, 'auto', true)).toEqual({
|
|
140
140
|
x: 200,
|
|
141
141
|
textAnchor: 'middle',
|
|
@@ -72,7 +72,7 @@ export const resolveDataXToIndex = (
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Computes the label's horizontal placement, keeping it inside the drawing area
|
|
75
|
-
* near the left/right edges.
|
|
75
|
+
* near the left/right edges. Centered on the point when it fits; otherwise
|
|
76
76
|
* anchored to the edge and aligned with the arrow's outer vertex (offset by half
|
|
77
77
|
* the arrow width from the point, when an arrow is rendered).
|
|
78
78
|
*/
|
|
@@ -15,6 +15,9 @@ const sampleSeries = [
|
|
|
15
15
|
];
|
|
16
16
|
|
|
17
17
|
const meta = {
|
|
18
|
+
parameters: {
|
|
19
|
+
docs: { source: { language: 'tsx', format: true, type: 'code' } },
|
|
20
|
+
},
|
|
18
21
|
component: ReferenceLine,
|
|
19
22
|
id: 'rnative-referenceline',
|
|
20
23
|
title: 'Visualization/ReferenceLine',
|
|
@@ -32,6 +35,7 @@ type Story = StoryObj<typeof ReferenceLine>;
|
|
|
32
35
|
|
|
33
36
|
export const HorizontalLine: Story = {
|
|
34
37
|
parameters: {
|
|
38
|
+
docs: { source: { language: 'tsx', format: true, type: 'dynamic' } },
|
|
35
39
|
layout: 'centered',
|
|
36
40
|
backgrounds: { default: 'light' },
|
|
37
41
|
},
|
|
@@ -50,6 +54,7 @@ export const HorizontalLine: Story = {
|
|
|
50
54
|
|
|
51
55
|
export const VerticalLine: Story = {
|
|
52
56
|
parameters: {
|
|
57
|
+
docs: { source: { language: 'tsx', format: true, type: 'dynamic' } },
|
|
53
58
|
layout: 'centered',
|
|
54
59
|
backgrounds: { default: 'light' },
|
|
55
60
|
},
|
|
@@ -199,7 +199,7 @@ export function useTooltipMeasurement(
|
|
|
199
199
|
useEffect(() => {
|
|
200
200
|
if (itemsRef.current.length === 0) return;
|
|
201
201
|
|
|
202
|
-
let
|
|
202
|
+
let canceled = false;
|
|
203
203
|
|
|
204
204
|
const { promise, cancel } = measureWidths(
|
|
205
205
|
itemsRef.current,
|
|
@@ -209,11 +209,11 @@ export function useTooltipMeasurement(
|
|
|
209
209
|
valueRefs,
|
|
210
210
|
);
|
|
211
211
|
void promise.then((result) => {
|
|
212
|
-
if (!
|
|
212
|
+
if (!canceled) setWidths(result);
|
|
213
213
|
});
|
|
214
214
|
|
|
215
215
|
return () => {
|
|
216
|
-
|
|
216
|
+
canceled = true;
|
|
217
217
|
cancel();
|
|
218
218
|
};
|
|
219
219
|
}, [shapeKey]);
|
|
@@ -6,6 +6,7 @@ import { Scrubber } from './Scrubber';
|
|
|
6
6
|
import type { ScrubberProps } from './types';
|
|
7
7
|
|
|
8
8
|
const meta = {
|
|
9
|
+
parameters: { docs: { source: { type: 'code' } } },
|
|
9
10
|
component: Scrubber,
|
|
10
11
|
id: 'rnative-scrubber',
|
|
11
12
|
title: 'Visualization/Scrubber',
|
|
@@ -38,6 +39,7 @@ const multiSeries = [
|
|
|
38
39
|
];
|
|
39
40
|
|
|
40
41
|
export const Base: Story = {
|
|
42
|
+
parameters: { docs: { source: { type: 'dynamic' } } },
|
|
41
43
|
render: (args: ScrubberProps) => (
|
|
42
44
|
<LineChart series={singleSeries} height={200} showArea enableScrubbing>
|
|
43
45
|
<Scrubber {...args} />
|
|
@@ -47,6 +49,7 @@ export const Base: Story = {
|
|
|
47
49
|
};
|
|
48
50
|
|
|
49
51
|
export const MultiSeries: Story = {
|
|
52
|
+
parameters: { docs: { source: { type: 'dynamic' } } },
|
|
50
53
|
render: (args: ScrubberProps) => (
|
|
51
54
|
<LineChart series={multiSeries} height={200} enableScrubbing>
|
|
52
55
|
<Scrubber {...args} showBeacons />
|
|
@@ -56,6 +59,7 @@ export const MultiSeries: Story = {
|
|
|
56
59
|
};
|
|
57
60
|
|
|
58
61
|
export const HiddenLine: Story = {
|
|
62
|
+
parameters: { docs: { source: { type: 'dynamic' } } },
|
|
59
63
|
render: (args: ScrubberProps) => (
|
|
60
64
|
<LineChart series={singleSeries} height={200} showArea enableScrubbing>
|
|
61
65
|
<Scrubber {...args} hideLine />
|
|
@@ -65,6 +69,7 @@ export const HiddenLine: Story = {
|
|
|
65
69
|
};
|
|
66
70
|
|
|
67
71
|
export const HiddenOverlay: Story = {
|
|
72
|
+
parameters: { docs: { source: { type: 'dynamic' } } },
|
|
68
73
|
render: (args: ScrubberProps) => (
|
|
69
74
|
<LineChart series={singleSeries} height={200} showArea enableScrubbing>
|
|
70
75
|
<Scrubber {...args} hideOverlay />
|
|
@@ -27,6 +27,13 @@
|
|
|
27
27
|
},
|
|
28
28
|
"stepper": {
|
|
29
29
|
"progressAriaLabel": "Schritt {{currentStep}} von {{totalSteps}}"
|
|
30
|
+
},
|
|
31
|
+
"pagination": {
|
|
32
|
+
"navigationAriaLabel": "Seitennavigation",
|
|
33
|
+
"previousPageAriaLabel": "Vorherige Seite",
|
|
34
|
+
"nextPageAriaLabel": "Nächste Seite",
|
|
35
|
+
"pageAriaLabel": "Seite {{page}}",
|
|
36
|
+
"pageOfTotal": "{{current}} von {{total}}"
|
|
30
37
|
}
|
|
31
38
|
}
|
|
32
39
|
}
|