@coinbase/cds-mobile-visualization 3.4.0-beta.1 → 3.4.0-beta.11
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/CHANGELOG.md +60 -0
- package/dts/chart/CartesianChart.d.ts +57 -33
- package/dts/chart/CartesianChart.d.ts.map +1 -1
- package/dts/chart/ChartContextBridge.d.ts +28 -0
- package/dts/chart/ChartContextBridge.d.ts.map +1 -0
- package/dts/chart/Path.d.ts +77 -34
- package/dts/chart/Path.d.ts.map +1 -1
- package/dts/chart/PeriodSelector.d.ts +2 -2
- package/dts/chart/PeriodSelector.d.ts.map +1 -1
- package/dts/chart/area/Area.d.ts +42 -27
- package/dts/chart/area/Area.d.ts.map +1 -1
- package/dts/chart/area/AreaChart.d.ts +51 -10
- package/dts/chart/area/AreaChart.d.ts.map +1 -1
- package/dts/chart/area/DottedArea.d.ts +21 -2
- package/dts/chart/area/DottedArea.d.ts.map +1 -1
- package/dts/chart/area/GradientArea.d.ts +19 -13
- package/dts/chart/area/GradientArea.d.ts.map +1 -1
- package/dts/chart/area/SolidArea.d.ts +17 -2
- package/dts/chart/area/SolidArea.d.ts.map +1 -1
- package/dts/chart/axis/Axis.d.ts +86 -118
- package/dts/chart/axis/Axis.d.ts.map +1 -1
- package/dts/chart/axis/DefaultAxisTickLabel.d.ts +8 -0
- package/dts/chart/axis/DefaultAxisTickLabel.d.ts.map +1 -0
- package/dts/chart/axis/XAxis.d.ts +1 -1
- package/dts/chart/axis/XAxis.d.ts.map +1 -1
- package/dts/chart/axis/YAxis.d.ts +2 -2
- package/dts/chart/axis/YAxis.d.ts.map +1 -1
- package/dts/chart/axis/index.d.ts +1 -0
- package/dts/chart/axis/index.d.ts.map +1 -1
- package/dts/chart/bar/Bar.d.ts +16 -13
- package/dts/chart/bar/Bar.d.ts.map +1 -1
- package/dts/chart/bar/BarChart.d.ts +36 -20
- package/dts/chart/bar/BarChart.d.ts.map +1 -1
- package/dts/chart/bar/BarPlot.d.ts +2 -1
- package/dts/chart/bar/BarPlot.d.ts.map +1 -1
- package/dts/chart/bar/BarStack.d.ts +39 -48
- package/dts/chart/bar/BarStack.d.ts.map +1 -1
- package/dts/chart/bar/BarStackGroup.d.ts +1 -0
- package/dts/chart/bar/BarStackGroup.d.ts.map +1 -1
- package/dts/chart/bar/DefaultBar.d.ts +1 -1
- package/dts/chart/bar/DefaultBar.d.ts.map +1 -1
- package/dts/chart/bar/DefaultBarStack.d.ts.map +1 -1
- package/dts/chart/gradient/Gradient.d.ts +25 -0
- package/dts/chart/gradient/Gradient.d.ts.map +1 -0
- package/dts/chart/gradient/index.d.ts +2 -0
- package/dts/chart/gradient/index.d.ts.map +1 -0
- package/dts/chart/index.d.ts +3 -1
- package/dts/chart/index.d.ts.map +1 -1
- package/dts/chart/line/DefaultReferenceLineLabel.d.ts +9 -0
- package/dts/chart/line/DefaultReferenceLineLabel.d.ts.map +1 -0
- package/dts/chart/line/DottedLine.d.ts +13 -5
- package/dts/chart/line/DottedLine.d.ts.map +1 -1
- package/dts/chart/line/Line.d.ts +64 -25
- package/dts/chart/line/Line.d.ts.map +1 -1
- package/dts/chart/line/LineChart.d.ts +43 -9
- package/dts/chart/line/LineChart.d.ts.map +1 -1
- package/dts/chart/line/ReferenceLine.d.ts +68 -20
- package/dts/chart/line/ReferenceLine.d.ts.map +1 -1
- package/dts/chart/line/SolidLine.d.ts +8 -5
- package/dts/chart/line/SolidLine.d.ts.map +1 -1
- package/dts/chart/line/index.d.ts +1 -1
- package/dts/chart/line/index.d.ts.map +1 -1
- package/dts/chart/point/DefaultPointLabel.d.ts +10 -0
- package/dts/chart/point/DefaultPointLabel.d.ts.map +1 -0
- package/dts/chart/point/Point.d.ts +120 -0
- package/dts/chart/point/Point.d.ts.map +1 -0
- package/dts/chart/point/index.d.ts +3 -0
- package/dts/chart/point/index.d.ts.map +1 -0
- package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts +8 -0
- package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts.map +1 -0
- package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts +12 -0
- package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts.map +1 -0
- package/dts/chart/scrubber/DefaultScrubberLabel.d.ts +11 -0
- package/dts/chart/scrubber/DefaultScrubberLabel.d.ts.map +1 -0
- package/dts/chart/scrubber/Scrubber.d.ts +172 -43
- package/dts/chart/scrubber/Scrubber.d.ts.map +1 -1
- package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts +44 -0
- package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts.map +1 -0
- package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts +31 -0
- package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts.map +1 -0
- package/dts/chart/scrubber/ScrubberProvider.d.ts +6 -3
- package/dts/chart/scrubber/ScrubberProvider.d.ts.map +1 -1
- package/dts/chart/scrubber/index.d.ts +3 -0
- package/dts/chart/scrubber/index.d.ts.map +1 -1
- package/dts/chart/text/ChartText.d.ts +151 -77
- package/dts/chart/text/ChartText.d.ts.map +1 -1
- package/dts/chart/text/{SmartChartTextGroup.d.ts → ChartTextGroup.d.ts} +9 -3
- package/dts/chart/text/ChartTextGroup.d.ts.map +1 -0
- package/dts/chart/text/index.d.ts +1 -1
- package/dts/chart/text/index.d.ts.map +1 -1
- package/dts/chart/utils/axis.d.ts +25 -1
- package/dts/chart/utils/axis.d.ts.map +1 -1
- package/dts/chart/utils/chart.d.ts +34 -7
- package/dts/chart/utils/chart.d.ts.map +1 -1
- package/dts/chart/utils/context.d.ts +28 -7
- package/dts/chart/utils/context.d.ts.map +1 -1
- package/dts/chart/utils/gradient.d.ts +117 -0
- package/dts/chart/utils/gradient.d.ts.map +1 -0
- package/dts/chart/utils/index.d.ts +3 -0
- package/dts/chart/utils/index.d.ts.map +1 -1
- package/dts/chart/utils/path.d.ts +53 -0
- package/dts/chart/utils/path.d.ts.map +1 -1
- package/dts/chart/utils/point.d.ts +71 -7
- package/dts/chart/utils/point.d.ts.map +1 -1
- package/dts/chart/utils/scale.d.ts +102 -0
- package/dts/chart/utils/scale.d.ts.map +1 -1
- package/dts/chart/utils/scrubber.d.ts +39 -0
- package/dts/chart/utils/scrubber.d.ts.map +1 -0
- package/dts/chart/utils/transition.d.ts +140 -0
- package/dts/chart/utils/transition.d.ts.map +1 -0
- package/esm/chart/CartesianChart.js +164 -70
- package/esm/chart/ChartContextBridge.js +148 -0
- package/esm/chart/Path.js +198 -113
- package/esm/chart/PeriodSelector.js +2 -2
- package/esm/chart/__stories__/CartesianChart.stories.js +378 -131
- package/esm/chart/__stories__/Chart.stories.js +2 -4
- package/esm/chart/__stories__/PeriodSelector.stories.js +103 -75
- package/esm/chart/area/Area.js +25 -35
- package/esm/chart/area/AreaChart.js +17 -12
- package/esm/chart/area/DottedArea.js +61 -109
- package/esm/chart/area/GradientArea.js +35 -91
- package/esm/chart/area/SolidArea.js +22 -8
- package/esm/chart/area/__stories__/AreaChart.stories.js +1 -1
- package/esm/chart/axis/Axis.js +5 -39
- package/esm/chart/axis/DefaultAxisTickLabel.js +11 -0
- package/esm/chart/axis/XAxis.js +148 -66
- package/esm/chart/axis/YAxis.js +149 -65
- package/esm/chart/axis/__stories__/Axis.stories.js +259 -1
- package/esm/chart/axis/index.js +1 -0
- package/esm/chart/bar/Bar.js +3 -1
- package/esm/chart/bar/BarChart.js +15 -37
- package/esm/chart/bar/BarPlot.js +41 -35
- package/esm/chart/bar/BarStack.js +75 -38
- package/esm/chart/bar/BarStackGroup.js +6 -16
- package/esm/chart/bar/DefaultBar.js +26 -48
- package/esm/chart/bar/DefaultBarStack.js +23 -58
- package/esm/chart/bar/__stories__/BarChart.stories.js +502 -77
- package/esm/chart/gradient/Gradient.js +53 -0
- package/esm/chart/gradient/index.js +1 -0
- package/esm/chart/index.js +3 -1
- package/esm/chart/line/DefaultReferenceLineLabel.js +66 -0
- package/esm/chart/line/DottedLine.js +29 -14
- package/esm/chart/line/Line.js +106 -67
- package/esm/chart/line/LineChart.js +20 -14
- package/esm/chart/line/ReferenceLine.js +80 -63
- package/esm/chart/line/SolidLine.js +25 -10
- package/esm/chart/line/__stories__/LineChart.stories.js +2101 -1977
- package/esm/chart/line/__stories__/ReferenceLine.stories.js +83 -28
- package/esm/chart/line/index.js +1 -1
- package/esm/chart/point/DefaultPointLabel.js +39 -0
- package/esm/chart/point/Point.js +188 -0
- package/esm/chart/point/index.js +2 -0
- package/esm/chart/scrubber/DefaultScrubberBeacon.js +179 -0
- package/esm/chart/scrubber/DefaultScrubberBeaconLabel.js +43 -0
- package/esm/chart/scrubber/DefaultScrubberLabel.js +28 -0
- package/esm/chart/scrubber/Scrubber.js +126 -146
- package/esm/chart/scrubber/ScrubberBeaconGroup.js +161 -0
- package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +185 -0
- package/esm/chart/scrubber/ScrubberProvider.js +46 -54
- package/esm/chart/scrubber/index.js +3 -1
- package/esm/chart/text/ChartText.js +242 -174
- package/esm/chart/text/{SmartChartTextGroup.js → ChartTextGroup.js} +6 -5
- package/esm/chart/text/index.js +1 -1
- package/esm/chart/utils/axis.js +45 -29
- package/esm/chart/utils/chart.js +44 -3
- package/esm/chart/utils/gradient.js +305 -0
- package/esm/chart/utils/index.js +3 -0
- package/esm/chart/utils/path.js +76 -8
- package/esm/chart/utils/point.js +171 -17
- package/esm/chart/utils/scale.js +242 -2
- package/esm/chart/utils/scrubber.js +139 -0
- package/esm/chart/utils/transition.js +185 -0
- package/esm/sparkline/__stories__/Sparkline.stories.js +11 -7
- package/esm/sparkline/__stories__/SparklineGradient.stories.js +7 -4
- package/esm/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.js +51 -26
- package/esm/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.js +17 -9
- package/package.json +15 -9
- package/dts/chart/Point.d.ts +0 -103
- package/dts/chart/Point.d.ts.map +0 -1
- package/dts/chart/line/GradientLine.d.ts +0 -45
- package/dts/chart/line/GradientLine.d.ts.map +0 -1
- package/dts/chart/scrubber/ScrubberBeacon.d.ts +0 -75
- package/dts/chart/scrubber/ScrubberBeacon.d.ts.map +0 -1
- package/dts/chart/text/SmartChartTextGroup.d.ts.map +0 -1
- package/esm/chart/Point.js +0 -111
- package/esm/chart/line/GradientLine.js +0 -62
- package/esm/chart/scrubber/ScrubberBeacon.js +0 -199
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { useEffect, useMemo, useRef } from 'react';
|
|
2
|
+
import { useAnimatedReaction, useSharedValue, withSpring, withTiming } from 'react-native-reanimated';
|
|
3
|
+
import { notifyChange, Skia } from '@shopify/react-native-skia';
|
|
4
|
+
import { interpolatePath } from 'd3-interpolate-path';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Transition for animations.
|
|
8
|
+
* Supports timing and spring animation types.
|
|
9
|
+
* Used for paths, positions, opacity, and any other animated properties.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // Spring animation
|
|
13
|
+
* { type: 'spring', damping: 10, stiffness: 100 }
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // Timing animation
|
|
17
|
+
* { type: 'timing', duration: 500, easing: Easing.inOut(Easing.ease) }
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Default transition configuration used across all chart components.
|
|
22
|
+
*/
|
|
23
|
+
export const defaultTransition = {
|
|
24
|
+
type: 'spring',
|
|
25
|
+
stiffness: 900,
|
|
26
|
+
damping: 120
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Duration in milliseconds for accessory elements to fade in.
|
|
31
|
+
*/
|
|
32
|
+
export const accessoryFadeTransitionDuration = 150;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Delay in milliseconds before accessory elements fade in.
|
|
36
|
+
*/
|
|
37
|
+
export const accessoryFadeTransitionDelay = 350;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Custom hook that uses d3-interpolate-path for more robust path interpolation.
|
|
41
|
+
* then use Skia's native interpolation in the worklet.
|
|
42
|
+
*
|
|
43
|
+
* @param progress - Shared value between 0 and 1
|
|
44
|
+
* @param fromPath - Starting path as SVG string
|
|
45
|
+
* @param toPath - Ending path as SVG string
|
|
46
|
+
* @returns Interpolated SkPath as a shared value
|
|
47
|
+
*/
|
|
48
|
+
export const useD3PathInterpolation = (progress, fromPath, toPath) => {
|
|
49
|
+
// Pre-compute intermediate paths on JS thread using d3-interpolate-path
|
|
50
|
+
const {
|
|
51
|
+
fromSkiaPath,
|
|
52
|
+
i0,
|
|
53
|
+
i1,
|
|
54
|
+
toSkiaPath
|
|
55
|
+
} = useMemo(() => {
|
|
56
|
+
var _Skia$Path$MakeFromSV, _Skia$Path$MakeFromSV2, _Skia$Path$MakeFromSV3, _Skia$Path$MakeFromSV4;
|
|
57
|
+
const pathInterpolator = interpolatePath(fromPath, toPath);
|
|
58
|
+
const d = 1e-3;
|
|
59
|
+
return {
|
|
60
|
+
fromSkiaPath: (_Skia$Path$MakeFromSV = Skia.Path.MakeFromSVGString(fromPath)) != null ? _Skia$Path$MakeFromSV : Skia.Path.Make(),
|
|
61
|
+
i0: (_Skia$Path$MakeFromSV2 = Skia.Path.MakeFromSVGString(pathInterpolator(d))) != null ? _Skia$Path$MakeFromSV2 : Skia.Path.Make(),
|
|
62
|
+
i1: (_Skia$Path$MakeFromSV3 = Skia.Path.MakeFromSVGString(pathInterpolator(1 - d))) != null ? _Skia$Path$MakeFromSV3 : Skia.Path.Make(),
|
|
63
|
+
toSkiaPath: (_Skia$Path$MakeFromSV4 = Skia.Path.MakeFromSVGString(toPath)) != null ? _Skia$Path$MakeFromSV4 : Skia.Path.Make()
|
|
64
|
+
};
|
|
65
|
+
}, [fromPath, toPath]);
|
|
66
|
+
const result = useSharedValue(fromSkiaPath);
|
|
67
|
+
useAnimatedReaction(() => progress.value, t => {
|
|
68
|
+
'worklet';
|
|
69
|
+
|
|
70
|
+
var _i1$interpolate;
|
|
71
|
+
result.value = (_i1$interpolate = i1.interpolate(i0, t)) != null ? _i1$interpolate : toSkiaPath;
|
|
72
|
+
notifyChange(result);
|
|
73
|
+
}, [fromSkiaPath, i0, i1, toSkiaPath]);
|
|
74
|
+
return result;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
// Interpolator and useInterpolator are brought over from non exported code in @shopify/react-native-skia
|
|
78
|
+
/**
|
|
79
|
+
* @worklet
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
export const useInterpolator = (factory, value, interpolator, input, output, options) => {
|
|
83
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
84
|
+
const init = useMemo(() => factory(), []);
|
|
85
|
+
const result = useSharedValue(init);
|
|
86
|
+
useAnimatedReaction(() => value.value, val => {
|
|
87
|
+
result.value = interpolator(val, input, output, options, result.value);
|
|
88
|
+
notifyChange(result);
|
|
89
|
+
}, [input, output, options]);
|
|
90
|
+
return result;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Builds a react-native-reanimated animation based on the configuration.
|
|
95
|
+
*
|
|
96
|
+
* @param targetValue - The target value to animate to
|
|
97
|
+
* @param config - The transition configuration
|
|
98
|
+
* @returns The animation value to assign to a shared value
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* // Use directly for animation
|
|
102
|
+
* progress.value = 0;
|
|
103
|
+
* progress.value = buildTransition(1, { type: 'spring', damping: 10, stiffness: 100 });
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* // Coordinate animations
|
|
107
|
+
* animatedX.value = buildTransition(100, { type: 'spring', damping: 10, stiffness: 100 });
|
|
108
|
+
* animatedY.value = buildTransition(200, { type: 'spring', damping: 10, stiffness: 100 });
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* // Timing animation
|
|
112
|
+
* progress.value = buildTransition(1, { type: 'timing', duration: 500 });
|
|
113
|
+
*/
|
|
114
|
+
export const buildTransition = (targetValue, transition) => {
|
|
115
|
+
'worklet';
|
|
116
|
+
|
|
117
|
+
switch (transition.type) {
|
|
118
|
+
case 'timing':
|
|
119
|
+
{
|
|
120
|
+
return withTiming(targetValue, transition);
|
|
121
|
+
}
|
|
122
|
+
case 'spring':
|
|
123
|
+
{
|
|
124
|
+
return withSpring(targetValue, transition);
|
|
125
|
+
}
|
|
126
|
+
default:
|
|
127
|
+
{
|
|
128
|
+
// Fallback to default transition config
|
|
129
|
+
return withSpring(targetValue, defaultTransition);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Hook for path animation state and transitions.
|
|
136
|
+
*
|
|
137
|
+
* @param currentPath - Current target path to animate to
|
|
138
|
+
* @param initialPath - Initial path for enter animation. When provided, the first animation will go from initialPath to currentPath.
|
|
139
|
+
* @param transition - Transition configuration
|
|
140
|
+
* @returns Animated SkPath as a shared value
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* // Simple path transition
|
|
144
|
+
* const path = usePathTransition({
|
|
145
|
+
* currentPath: d ?? '',
|
|
146
|
+
* animate: shouldAnimate,
|
|
147
|
+
* transition: { type: 'timing', duration: 3000 }
|
|
148
|
+
* });
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* // Enter animation with different initial config (like DefaultBar)
|
|
152
|
+
* const path = usePathTransition({
|
|
153
|
+
* currentPath: targetPath,
|
|
154
|
+
* initialPath: baselinePath,
|
|
155
|
+
* animate: true,
|
|
156
|
+
* transition: { type: 'timing', duration: 300 }
|
|
157
|
+
* });
|
|
158
|
+
*/
|
|
159
|
+
export const usePathTransition = _ref => {
|
|
160
|
+
let {
|
|
161
|
+
currentPath,
|
|
162
|
+
initialPath,
|
|
163
|
+
transition = defaultTransition
|
|
164
|
+
} = _ref;
|
|
165
|
+
// Track the previous path - updated in useEffect AFTER render,
|
|
166
|
+
// so during render it naturally holds the "from" path value
|
|
167
|
+
const previousPathRef = useRef(initialPath != null ? initialPath : currentPath);
|
|
168
|
+
const progress = useSharedValue(0);
|
|
169
|
+
|
|
170
|
+
// During render: previousPathRef still has old value, currentPath is new
|
|
171
|
+
const fromPath = previousPathRef.current;
|
|
172
|
+
const toPath = currentPath;
|
|
173
|
+
useEffect(() => {
|
|
174
|
+
const shouldAnimate = previousPathRef.current !== currentPath;
|
|
175
|
+
if (shouldAnimate) {
|
|
176
|
+
// Update ref for next path change (happens after this render)
|
|
177
|
+
previousPathRef.current = currentPath;
|
|
178
|
+
|
|
179
|
+
// Animate from old path to new path
|
|
180
|
+
progress.value = 0;
|
|
181
|
+
progress.value = buildTransition(1, transition);
|
|
182
|
+
}
|
|
183
|
+
}, [currentPath, transition, progress]);
|
|
184
|
+
return useD3PathInterpolation(progress, fromPath, toPath);
|
|
185
|
+
};
|
|
@@ -12,8 +12,7 @@ import { Example, ExampleScreen } from '@coinbase/cds-mobile/examples/ExampleScr
|
|
|
12
12
|
import { useTheme } from '@coinbase/cds-mobile/hooks/useTheme';
|
|
13
13
|
import { HStack } from '@coinbase/cds-mobile/layout/HStack';
|
|
14
14
|
import { VStack } from '@coinbase/cds-mobile/layout/VStack';
|
|
15
|
-
import {
|
|
16
|
-
import { TextHeadline } from '@coinbase/cds-mobile/typography/TextHeadline';
|
|
15
|
+
import { Text } from '@coinbase/cds-mobile/typography';
|
|
17
16
|
import { Sparkline } from '../Sparkline';
|
|
18
17
|
import { SparklineArea } from '../SparklineArea';
|
|
19
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -42,13 +41,15 @@ const SparklineExample = _ref => {
|
|
|
42
41
|
alignItems: "flex-end",
|
|
43
42
|
justifyContent: "center",
|
|
44
43
|
paddingStart: 2,
|
|
45
|
-
children: [/*#__PURE__*/_jsx(
|
|
44
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
46
45
|
align: "end",
|
|
46
|
+
font: "body",
|
|
47
47
|
numberOfLines: 1,
|
|
48
48
|
children: "$2,874.49"
|
|
49
|
-
}), /*#__PURE__*/_jsx(
|
|
49
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
50
50
|
align: "end",
|
|
51
51
|
color: "fgMuted",
|
|
52
|
+
font: "body",
|
|
52
53
|
numberOfLines: 1,
|
|
53
54
|
children: "+36.08%"
|
|
54
55
|
})]
|
|
@@ -61,12 +62,14 @@ const SparklineExample = _ref => {
|
|
|
61
62
|
}),
|
|
62
63
|
children: /*#__PURE__*/_jsxs(VStack, {
|
|
63
64
|
justifyContent: "center",
|
|
64
|
-
children: [/*#__PURE__*/_jsx(
|
|
65
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
65
66
|
ellipsize: "tail",
|
|
67
|
+
font: "headline",
|
|
66
68
|
numberOfLines: 1,
|
|
67
69
|
children: name
|
|
68
|
-
}), /*#__PURE__*/_jsx(
|
|
70
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
69
71
|
ellipsize: "tail",
|
|
72
|
+
font: "body",
|
|
70
73
|
numberOfLines: 1,
|
|
71
74
|
children: symbol
|
|
72
75
|
})]
|
|
@@ -84,8 +87,9 @@ const SparklineScalingExample = props => {
|
|
|
84
87
|
const path = useSparklinePath(_extends({}, dimensions, props));
|
|
85
88
|
const area = useSparklineArea(_extends({}, dimensions, props));
|
|
86
89
|
return /*#__PURE__*/_jsxs(VStack, {
|
|
87
|
-
children: [/*#__PURE__*/_jsxs(
|
|
90
|
+
children: [/*#__PURE__*/_jsxs(Text, {
|
|
88
91
|
ellipsize: "tail",
|
|
92
|
+
font: "headline",
|
|
89
93
|
numberOfLines: 1,
|
|
90
94
|
children: ["Scale: ", props.yAxisScalingFactor]
|
|
91
95
|
}), /*#__PURE__*/_jsx(Sparkline, _extends({}, dimensions, {
|
|
@@ -11,7 +11,7 @@ import { CellMedia } from '@coinbase/cds-mobile/cells/CellMedia';
|
|
|
11
11
|
import { Example, ExampleScreen } from '@coinbase/cds-mobile/examples/ExampleScreen';
|
|
12
12
|
import { useTheme } from '@coinbase/cds-mobile/hooks/useTheme';
|
|
13
13
|
import { VStack } from '@coinbase/cds-mobile/layout';
|
|
14
|
-
import {
|
|
14
|
+
import { Text } from '@coinbase/cds-mobile/typography';
|
|
15
15
|
import { SparklineArea } from '../SparklineArea';
|
|
16
16
|
import { SparklineGradient } from '../SparklineGradient';
|
|
17
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -45,12 +45,14 @@ const SparklineGradientExample = _ref => {
|
|
|
45
45
|
}),
|
|
46
46
|
children: /*#__PURE__*/_jsxs(VStack, {
|
|
47
47
|
justifyContent: "center",
|
|
48
|
-
children: [/*#__PURE__*/_jsx(
|
|
48
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
49
49
|
ellipsize: "tail",
|
|
50
|
+
font: "headline",
|
|
50
51
|
numberOfLines: 1,
|
|
51
52
|
children: name
|
|
52
|
-
}), /*#__PURE__*/_jsx(
|
|
53
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
53
54
|
ellipsize: "tail",
|
|
55
|
+
font: "body",
|
|
54
56
|
numberOfLines: 1,
|
|
55
57
|
children: symbol
|
|
56
58
|
})]
|
|
@@ -75,8 +77,9 @@ const SparklineScalingExample = props => {
|
|
|
75
77
|
const path = useSparklinePath(_extends({}, dimensions, props));
|
|
76
78
|
const area = useSparklineArea(_extends({}, dimensions, props));
|
|
77
79
|
return /*#__PURE__*/_jsxs(VStack, {
|
|
78
|
-
children: [/*#__PURE__*/_jsxs(
|
|
80
|
+
children: [/*#__PURE__*/_jsxs(Text, {
|
|
79
81
|
ellipsize: "tail",
|
|
82
|
+
font: "headline",
|
|
80
83
|
numberOfLines: 1,
|
|
81
84
|
children: ["Scale: ", props.yAxisScalingFactor]
|
|
82
85
|
}), /*#__PURE__*/_jsx(SparklineGradient, _extends({}, dimensions, {
|
|
@@ -3,7 +3,7 @@ import React, { memo, useCallback, useMemo, useRef, useState } from 'react';
|
|
|
3
3
|
import { sparklineInteractiveData, sparklineInteractiveHoverData, strokeColor } from '@coinbase/cds-common/internal/visualizations/SparklineInteractiveData';
|
|
4
4
|
import { Example, ExampleScreen } from '@coinbase/cds-mobile/examples/ExampleScreen';
|
|
5
5
|
import { Box } from '@coinbase/cds-mobile/layout';
|
|
6
|
-
import {
|
|
6
|
+
import { Text } from '@coinbase/cds-mobile/typography';
|
|
7
7
|
import { SparklineInteractiveHeader } from '../../sparkline-interactive-header/SparklineInteractiveHeader';
|
|
8
8
|
import { SparklineInteractive } from '../SparklineInteractive';
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -175,7 +175,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
175
175
|
children: [/*#__PURE__*/_jsx(Example, {
|
|
176
176
|
padding: 0,
|
|
177
177
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
178
|
-
children: [/*#__PURE__*/_jsx(
|
|
178
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
179
|
+
font: "title3",
|
|
179
180
|
paddingX: 3,
|
|
180
181
|
paddingY: 3,
|
|
181
182
|
children: "Default"
|
|
@@ -187,7 +188,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
187
188
|
}), /*#__PURE__*/_jsx(Example, {
|
|
188
189
|
padding: 0,
|
|
189
190
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
190
|
-
children: [/*#__PURE__*/_jsx(
|
|
191
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
192
|
+
font: "title3",
|
|
191
193
|
paddingX: 3,
|
|
192
194
|
paddingY: 3,
|
|
193
195
|
children: "Compact"
|
|
@@ -200,7 +202,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
200
202
|
}), /*#__PURE__*/_jsx(Example, {
|
|
201
203
|
padding: 0,
|
|
202
204
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
203
|
-
children: [/*#__PURE__*/_jsx(
|
|
205
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
206
|
+
font: "title3",
|
|
204
207
|
paddingX: 3,
|
|
205
208
|
paddingY: 3,
|
|
206
209
|
children: "Disable Scrubbing"
|
|
@@ -213,7 +216,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
213
216
|
}), /*#__PURE__*/_jsx(Example, {
|
|
214
217
|
padding: 0,
|
|
215
218
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
216
|
-
children: [/*#__PURE__*/_jsx(
|
|
219
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
220
|
+
font: "title3",
|
|
217
221
|
paddingX: 3,
|
|
218
222
|
paddingY: 3,
|
|
219
223
|
children: "Hide period selector"
|
|
@@ -226,7 +230,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
226
230
|
}), /*#__PURE__*/_jsx(Example, {
|
|
227
231
|
padding: 0,
|
|
228
232
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
229
|
-
children: [/*#__PURE__*/_jsx(
|
|
233
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
234
|
+
font: "title3",
|
|
230
235
|
paddingX: 3,
|
|
231
236
|
paddingY: 3,
|
|
232
237
|
children: "Hide min/max label"
|
|
@@ -239,7 +244,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
239
244
|
}), /*#__PURE__*/_jsx(Example, {
|
|
240
245
|
padding: 0,
|
|
241
246
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
242
|
-
children: [/*#__PURE__*/_jsx(
|
|
247
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
248
|
+
font: "title3",
|
|
243
249
|
paddingX: 3,
|
|
244
250
|
paddingY: 3,
|
|
245
251
|
children: "Default period All"
|
|
@@ -252,7 +258,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
252
258
|
}), /*#__PURE__*/_jsx(Example, {
|
|
253
259
|
padding: 0,
|
|
254
260
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
255
|
-
children: [/*#__PURE__*/_jsx(
|
|
261
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
262
|
+
font: "title3",
|
|
256
263
|
paddingX: 3,
|
|
257
264
|
paddingY: 3,
|
|
258
265
|
children: "Fill Disabled"
|
|
@@ -265,7 +272,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
265
272
|
}), /*#__PURE__*/_jsx(Example, {
|
|
266
273
|
padding: 0,
|
|
267
274
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
268
|
-
children: [/*#__PURE__*/_jsx(
|
|
275
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
276
|
+
font: "title3",
|
|
269
277
|
paddingX: 3,
|
|
270
278
|
paddingY: 3,
|
|
271
279
|
children: "Y axis scaling"
|
|
@@ -278,7 +286,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
278
286
|
}), /*#__PURE__*/_jsx(Example, {
|
|
279
287
|
padding: 0,
|
|
280
288
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
281
|
-
children: [/*#__PURE__*/_jsx(
|
|
289
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
290
|
+
font: "title3",
|
|
282
291
|
paddingX: 3,
|
|
283
292
|
paddingY: 3,
|
|
284
293
|
children: "Fallback"
|
|
@@ -289,7 +298,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
289
298
|
}), /*#__PURE__*/_jsx(Example, {
|
|
290
299
|
padding: 0,
|
|
291
300
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
292
|
-
children: [/*#__PURE__*/_jsx(
|
|
301
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
302
|
+
font: "title3",
|
|
293
303
|
paddingX: 3,
|
|
294
304
|
paddingY: 3,
|
|
295
305
|
children: "Fallback Negative"
|
|
@@ -301,7 +311,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
301
311
|
}), /*#__PURE__*/_jsx(Example, {
|
|
302
312
|
padding: 0,
|
|
303
313
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
304
|
-
children: [/*#__PURE__*/_jsx(
|
|
314
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
315
|
+
font: "title3",
|
|
305
316
|
paddingX: 3,
|
|
306
317
|
paddingY: 3,
|
|
307
318
|
children: "Fallback Compact"
|
|
@@ -313,7 +324,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
313
324
|
}), /*#__PURE__*/_jsx(Example, {
|
|
314
325
|
padding: 0,
|
|
315
326
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
316
|
-
children: [/*#__PURE__*/_jsx(
|
|
327
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
328
|
+
font: "title3",
|
|
317
329
|
paddingX: 3,
|
|
318
330
|
paddingY: 3,
|
|
319
331
|
children: "No Hover Date"
|
|
@@ -326,7 +338,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
326
338
|
}), /*#__PURE__*/_jsx(Example, {
|
|
327
339
|
padding: 0,
|
|
328
340
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
329
|
-
children: [/*#__PURE__*/_jsx(
|
|
341
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
342
|
+
font: "title3",
|
|
330
343
|
paddingX: 3,
|
|
331
344
|
paddingY: 3,
|
|
332
345
|
children: "With Header Node"
|
|
@@ -338,7 +351,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
338
351
|
}), /*#__PURE__*/_jsx(Example, {
|
|
339
352
|
padding: 0,
|
|
340
353
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
341
|
-
children: [/*#__PURE__*/_jsx(
|
|
354
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
355
|
+
font: "title3",
|
|
342
356
|
paddingX: 3,
|
|
343
357
|
paddingY: 3,
|
|
344
358
|
children: "No padding"
|
|
@@ -352,7 +366,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
352
366
|
}), /*#__PURE__*/_jsx(Example, {
|
|
353
367
|
padding: 4,
|
|
354
368
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
355
|
-
children: [/*#__PURE__*/_jsx(
|
|
369
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
370
|
+
font: "title3",
|
|
356
371
|
paddingY: 3,
|
|
357
372
|
children: "In Container With 4 padding"
|
|
358
373
|
}), /*#__PURE__*/_jsx(SparklineInteractiveWithHeaderBuild, {
|
|
@@ -365,7 +380,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
365
380
|
}), /*#__PURE__*/_jsx(Example, {
|
|
366
381
|
padding: 0,
|
|
367
382
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
368
|
-
children: [/*#__PURE__*/_jsx(
|
|
383
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
384
|
+
font: "title3",
|
|
369
385
|
paddingX: 3,
|
|
370
386
|
paddingY: 3,
|
|
371
387
|
children: "Custom screen padding 6"
|
|
@@ -378,7 +394,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
378
394
|
}), /*#__PURE__*/_jsx(Example, {
|
|
379
395
|
padding: 0,
|
|
380
396
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
381
|
-
children: [/*#__PURE__*/_jsx(
|
|
397
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
398
|
+
font: "title3",
|
|
382
399
|
paddingX: 3,
|
|
383
400
|
paddingY: 3,
|
|
384
401
|
children: "Hover data"
|
|
@@ -391,7 +408,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
391
408
|
}), /*#__PURE__*/_jsx(Example, {
|
|
392
409
|
padding: 0,
|
|
393
410
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
394
|
-
children: [/*#__PURE__*/_jsx(
|
|
411
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
412
|
+
font: "title3",
|
|
395
413
|
paddingX: 3,
|
|
396
414
|
paddingY: 3,
|
|
397
415
|
children: "Auto Stoke Color"
|
|
@@ -403,7 +421,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
403
421
|
}), /*#__PURE__*/_jsx(Example, {
|
|
404
422
|
padding: 0,
|
|
405
423
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
406
|
-
children: [/*#__PURE__*/_jsx(
|
|
424
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
425
|
+
font: "title3",
|
|
407
426
|
paddingX: 3,
|
|
408
427
|
paddingY: 3,
|
|
409
428
|
children: "Custom RGB Stoke Color"
|
|
@@ -415,7 +434,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
415
434
|
}), /*#__PURE__*/_jsx(Example, {
|
|
416
435
|
padding: 0,
|
|
417
436
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
418
|
-
children: [/*#__PURE__*/_jsx(
|
|
437
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
438
|
+
font: "title3",
|
|
419
439
|
paddingX: 3,
|
|
420
440
|
paddingY: 3,
|
|
421
441
|
children: "Custom RGBA Stoke Color"
|
|
@@ -427,7 +447,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
427
447
|
}), /*#__PURE__*/_jsx(Example, {
|
|
428
448
|
padding: 0,
|
|
429
449
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
430
|
-
children: [/*#__PURE__*/_jsx(
|
|
450
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
451
|
+
font: "title3",
|
|
431
452
|
paddingX: 3,
|
|
432
453
|
paddingY: 3,
|
|
433
454
|
children: "No Data In SelectedPeriod"
|
|
@@ -441,7 +462,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
441
462
|
}), /*#__PURE__*/_jsx(Example, {
|
|
442
463
|
padding: 0,
|
|
443
464
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
444
|
-
children: [/*#__PURE__*/_jsx(
|
|
465
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
466
|
+
font: "title3",
|
|
445
467
|
paddingX: 3,
|
|
446
468
|
paddingY: 3,
|
|
447
469
|
children: "Enable Interaction When Outside"
|
|
@@ -454,7 +476,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
454
476
|
}), /*#__PURE__*/_jsx(Example, {
|
|
455
477
|
padding: 0,
|
|
456
478
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
457
|
-
children: [/*#__PURE__*/_jsx(
|
|
479
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
480
|
+
font: "title3",
|
|
458
481
|
paddingX: 3,
|
|
459
482
|
paddingY: 3,
|
|
460
483
|
children: "Custom Node Header Styles"
|
|
@@ -471,7 +494,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
471
494
|
}), /*#__PURE__*/_jsx(Example, {
|
|
472
495
|
padding: 0,
|
|
473
496
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
474
|
-
children: [/*#__PURE__*/_jsx(
|
|
497
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
498
|
+
font: "title3",
|
|
475
499
|
paddingX: 3,
|
|
476
500
|
paddingY: 3,
|
|
477
501
|
children: "Dotted Fill Type"
|
|
@@ -484,7 +508,8 @@ const SparklineInteractiveScreen = () => {
|
|
|
484
508
|
}), /*#__PURE__*/_jsx(Example, {
|
|
485
509
|
padding: 0,
|
|
486
510
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
487
|
-
children: [/*#__PURE__*/_jsx(
|
|
511
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
512
|
+
font: "title3",
|
|
488
513
|
paddingX: 3,
|
|
489
514
|
paddingY: 3,
|
|
490
515
|
children: "Y Scale Custom"
|
package/esm/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.js
CHANGED
|
@@ -6,7 +6,7 @@ import { IconButton } from '@coinbase/cds-mobile/buttons';
|
|
|
6
6
|
import { Example, ExampleScreen } from '@coinbase/cds-mobile/examples/ExampleScreen';
|
|
7
7
|
import { Icon } from '@coinbase/cds-mobile/icons';
|
|
8
8
|
import { Box, HStack } from '@coinbase/cds-mobile/layout';
|
|
9
|
-
import {
|
|
9
|
+
import { Text } from '@coinbase/cds-mobile/typography';
|
|
10
10
|
import { SparklineInteractive } from '../../sparkline-interactive/SparklineInteractive';
|
|
11
11
|
import { SparklineInteractiveHeader } from '../SparklineInteractiveHeader';
|
|
12
12
|
import { useSparklineInteractiveHeaderStyles } from '../useSparklineInteractiveHeaderStyles';
|
|
@@ -155,7 +155,8 @@ const HeaderLabel = () => {
|
|
|
155
155
|
active: true,
|
|
156
156
|
name: "wallet",
|
|
157
157
|
size: "s"
|
|
158
|
-
}), /*#__PURE__*/_jsx(
|
|
158
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
159
|
+
font: "title3",
|
|
159
160
|
children: "CustomHeader"
|
|
160
161
|
})]
|
|
161
162
|
});
|
|
@@ -468,7 +469,8 @@ const SparklineInteractiveHeaderScreen = () => {
|
|
|
468
469
|
children: [/*#__PURE__*/_jsx(Example, {
|
|
469
470
|
padding: 0,
|
|
470
471
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
471
|
-
children: [/*#__PURE__*/_jsx(
|
|
472
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
473
|
+
font: "title3",
|
|
472
474
|
paddingX: 3,
|
|
473
475
|
paddingY: 3,
|
|
474
476
|
children: "SparklineInteractive Header Example"
|
|
@@ -480,7 +482,8 @@ const SparklineInteractiveHeaderScreen = () => {
|
|
|
480
482
|
}), /*#__PURE__*/_jsx(Example, {
|
|
481
483
|
padding: 0,
|
|
482
484
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
483
|
-
children: [/*#__PURE__*/_jsx(
|
|
485
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
486
|
+
font: "title3",
|
|
484
487
|
paddingX: 3,
|
|
485
488
|
paddingY: 3,
|
|
486
489
|
children: "SparklineInteractive Header Trailing"
|
|
@@ -493,7 +496,8 @@ const SparklineInteractiveHeaderScreen = () => {
|
|
|
493
496
|
}), /*#__PURE__*/_jsx(Example, {
|
|
494
497
|
padding: 0,
|
|
495
498
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
496
|
-
children: [/*#__PURE__*/_jsx(
|
|
499
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
500
|
+
font: "title3",
|
|
497
501
|
paddingX: 3,
|
|
498
502
|
paddingY: 3,
|
|
499
503
|
children: "SparklineInteractive Header Custom Label"
|
|
@@ -506,7 +510,8 @@ const SparklineInteractiveHeaderScreen = () => {
|
|
|
506
510
|
}), /*#__PURE__*/_jsx(Example, {
|
|
507
511
|
padding: 0,
|
|
508
512
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
509
|
-
children: [/*#__PURE__*/_jsx(
|
|
513
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
514
|
+
font: "title3",
|
|
510
515
|
paddingX: 3,
|
|
511
516
|
paddingY: 3,
|
|
512
517
|
children: "SparklineInteractive Header Example with AltHeader"
|
|
@@ -518,7 +523,8 @@ const SparklineInteractiveHeaderScreen = () => {
|
|
|
518
523
|
}), /*#__PURE__*/_jsx(Example, {
|
|
519
524
|
padding: 0,
|
|
520
525
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
521
|
-
children: [/*#__PURE__*/_jsx(
|
|
526
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
527
|
+
font: "title3",
|
|
522
528
|
paddingX: 3,
|
|
523
529
|
paddingY: 3,
|
|
524
530
|
children: "SparklineInteractive Header Example with Smaller Period Set"
|
|
@@ -530,7 +536,8 @@ const SparklineInteractiveHeaderScreen = () => {
|
|
|
530
536
|
}), /*#__PURE__*/_jsx(Example, {
|
|
531
537
|
padding: 0,
|
|
532
538
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
533
|
-
children: [/*#__PURE__*/_jsx(
|
|
539
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
540
|
+
font: "title3",
|
|
534
541
|
paddingX: 3,
|
|
535
542
|
paddingY: 3,
|
|
536
543
|
children: "SparklineInteractive Header Example with No Period Set"
|
|
@@ -543,7 +550,8 @@ const SparklineInteractiveHeaderScreen = () => {
|
|
|
543
550
|
}), /*#__PURE__*/_jsx(Example, {
|
|
544
551
|
padding: 0,
|
|
545
552
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
546
|
-
children: [/*#__PURE__*/_jsx(
|
|
553
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
554
|
+
font: "title3",
|
|
547
555
|
paddingX: 3,
|
|
548
556
|
paddingY: 3,
|
|
549
557
|
children: "SparklineInteractive Header Custom Title"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-mobile-visualization",
|
|
3
|
-
"version": "3.4.0-beta.
|
|
3
|
+
"version": "3.4.0-beta.11",
|
|
4
4
|
"description": "Coinbase Design System - Mobile Visualization Native",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
"types": "./dts/index.d.ts",
|
|
17
17
|
"default": "./esm/index.js"
|
|
18
18
|
},
|
|
19
|
+
"./chart": {
|
|
20
|
+
"types": "./dts/chart/index.d.ts",
|
|
21
|
+
"default": "./esm/chart/index.js"
|
|
22
|
+
},
|
|
19
23
|
"./sparkline": {
|
|
20
24
|
"types": "./dts/sparkline/index.d.ts",
|
|
21
25
|
"default": "./esm/sparkline/index.js"
|
|
@@ -32,10 +36,11 @@
|
|
|
32
36
|
"CHANGELOG"
|
|
33
37
|
],
|
|
34
38
|
"peerDependencies": {
|
|
35
|
-
"@coinbase/cds-common": "^8.
|
|
36
|
-
"@coinbase/cds-lottie-files": "^3.3.
|
|
37
|
-
"@coinbase/cds-mobile": "^8.
|
|
38
|
-
"@coinbase/cds-utils": "^2.3.
|
|
39
|
+
"@coinbase/cds-common": "^8.36.2",
|
|
40
|
+
"@coinbase/cds-lottie-files": "^3.3.4",
|
|
41
|
+
"@coinbase/cds-mobile": "^8.36.2",
|
|
42
|
+
"@coinbase/cds-utils": "^2.3.5",
|
|
43
|
+
"@shopify/react-native-skia": "^1.12.4 || ^2.0.0",
|
|
39
44
|
"react": "^18.3.1",
|
|
40
45
|
"react-native": "^0.74.5",
|
|
41
46
|
"react-native-gesture-handler": "^2.16.2",
|
|
@@ -52,11 +57,12 @@
|
|
|
52
57
|
"@babel/preset-env": "^7.28.0",
|
|
53
58
|
"@babel/preset-react": "^7.27.1",
|
|
54
59
|
"@babel/preset-typescript": "^7.27.1",
|
|
55
|
-
"@coinbase/cds-common": "^8.
|
|
56
|
-
"@coinbase/cds-lottie-files": "^3.3.
|
|
57
|
-
"@coinbase/cds-mobile": "^8.
|
|
58
|
-
"@coinbase/cds-utils": "^2.3.
|
|
60
|
+
"@coinbase/cds-common": "^8.36.2",
|
|
61
|
+
"@coinbase/cds-lottie-files": "^3.3.4",
|
|
62
|
+
"@coinbase/cds-mobile": "^8.36.2",
|
|
63
|
+
"@coinbase/cds-utils": "^2.3.5",
|
|
59
64
|
"@figma/code-connect": "^1.3.4",
|
|
65
|
+
"@shopify/react-native-skia": "1.12.4",
|
|
60
66
|
"@types/react": "^18.3.12",
|
|
61
67
|
"react-native-gesture-handler": "2.16.2",
|
|
62
68
|
"react-native-reanimated": "3.14.0",
|