jfs-components 0.0.84 → 0.0.85

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/lib/commonjs/components/AppBar/AppBar.js +36 -22
  3. package/lib/commonjs/components/AreaLineChart/AreaLineChart.js +866 -0
  4. package/lib/commonjs/components/AreaLineChart/chartMath.js +252 -0
  5. package/lib/commonjs/components/Attached/Attached.js +34 -4
  6. package/lib/commonjs/components/BubbleChart/BubbleChart.js +191 -0
  7. package/lib/commonjs/components/BubbleChart/bubblePacking.js +378 -0
  8. package/lib/commonjs/components/ClusterBubble/ClusterBubble.js +272 -0
  9. package/lib/commonjs/components/MetricLegendItem/MetricLegendItem.js +7 -1
  10. package/lib/commonjs/components/index.js +27 -0
  11. package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
  12. package/lib/commonjs/icons/registry.js +1 -1
  13. package/lib/module/components/AppBar/AppBar.js +36 -22
  14. package/lib/module/components/AreaLineChart/AreaLineChart.js +859 -0
  15. package/lib/module/components/AreaLineChart/chartMath.js +242 -0
  16. package/lib/module/components/Attached/Attached.js +34 -4
  17. package/lib/module/components/BubbleChart/BubbleChart.js +185 -0
  18. package/lib/module/components/BubbleChart/bubblePacking.js +370 -0
  19. package/lib/module/components/ClusterBubble/ClusterBubble.js +267 -0
  20. package/lib/module/components/MetricLegendItem/MetricLegendItem.js +7 -1
  21. package/lib/module/components/index.js +3 -0
  22. package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
  23. package/lib/module/icons/registry.js +1 -1
  24. package/lib/typescript/src/components/AreaLineChart/AreaLineChart.d.ts +212 -0
  25. package/lib/typescript/src/components/AreaLineChart/chartMath.d.ts +90 -0
  26. package/lib/typescript/src/components/BubbleChart/BubbleChart.d.ts +81 -0
  27. package/lib/typescript/src/components/BubbleChart/bubblePacking.d.ts +83 -0
  28. package/lib/typescript/src/components/ClusterBubble/ClusterBubble.d.ts +76 -0
  29. package/lib/typescript/src/components/MetricLegendItem/MetricLegendItem.d.ts +7 -1
  30. package/lib/typescript/src/components/index.d.ts +3 -0
  31. package/lib/typescript/src/icons/registry.d.ts +1 -1
  32. package/package.json +1 -1
  33. package/src/components/AppBar/AppBar.tsx +37 -24
  34. package/src/components/AreaLineChart/AreaLineChart.tsx +1161 -0
  35. package/src/components/AreaLineChart/chartMath.ts +265 -0
  36. package/src/components/Attached/Attached.tsx +36 -5
  37. package/src/components/BubbleChart/BubbleChart.tsx +319 -0
  38. package/src/components/BubbleChart/bubblePacking.ts +397 -0
  39. package/src/components/ClusterBubble/ClusterBubble.tsx +359 -0
  40. package/src/components/MetricLegendItem/MetricLegendItem.tsx +20 -6
  41. package/src/components/index.ts +3 -0
  42. package/src/design-tokens/Coin Variables-variables-full.json +1 -1
  43. package/src/icons/registry.ts +1 -1
@@ -194,20 +194,31 @@ export default function AppBar({
194
194
  justifyContent: hasInFlowMiddle ? 'flex-start' : 'space-between',
195
195
  }
196
196
 
197
- // Absolutely-centered middle box for SubPage, mirroring the Figma geometry.
198
- // `left/top: 50%` + a negative translate keeps it centered regardless of the
199
- // bar width, while the fixed width clips overly-wide content (overflow:
200
- // hidden) instead of letting it bleed under the leading/actions slots.
201
- const subPageMiddleStyle: ViewStyle = {
197
+ // Absolutely-positioned overlay for the SubPage middle slot. Instead of
198
+ // centering a fixed-height box with `top/left: 50%` + transform (which on
199
+ // Android resolves the percentage against an intermediate, content-driven
200
+ // parent height and lands a few px too high), the overlay STRETCHES to fill
201
+ // the whole bar (`top/bottom/left/right: 0`) and centers its content with
202
+ // flexbox. This uses the exact same full-height vertical reference as the
203
+ // leading/actions row (`alignItems: 'center'`), so the middle content always
204
+ // sits on the same line as the back arrow and end slot on every platform.
205
+ const subPageMiddleOverlayStyle: ViewStyle = {
202
206
  position: 'absolute',
203
- top: '50%',
204
- left: '50%',
207
+ top: 0,
208
+ left: 0,
209
+ right: 0,
210
+ bottom: 0,
211
+ flexDirection: 'row',
212
+ alignItems: 'center',
213
+ justifyContent: 'center',
214
+ }
215
+
216
+ // Fixed-width clipping box (mirrors the Figma "slot wrap" geometry): keeps the
217
+ // middle content from bleeding under the leading/actions slots while staying
218
+ // centered within the overlay above.
219
+ const subPageMiddleBoxStyle: ViewStyle = {
205
220
  width: middleSlotWidth,
206
221
  height: SUBPAGE_MIDDLE_HEIGHT,
207
- transform: [
208
- { translateX: -middleSlotWidth / 2 },
209
- { translateY: -SUBPAGE_MIDDLE_HEIGHT / 2 },
210
- ],
211
222
  flexDirection: 'row',
212
223
  alignItems: 'center',
213
224
  justifyContent: 'center',
@@ -260,19 +271,21 @@ export default function AppBar({
260
271
  * so its content fills / shrinks within the fixed-width box.
261
272
  */}
262
273
  {isSub && processedMiddle && (
263
- <View style={subPageMiddleStyle} pointerEvents="box-none">
264
- <View
265
- style={{
266
- flex: 1,
267
- minWidth: 1,
268
- height: '100%',
269
- flexDirection: 'row',
270
- alignItems: 'center',
271
- justifyContent: 'center',
272
- }}
273
- pointerEvents="box-none"
274
- >
275
- {processedMiddle}
274
+ <View style={subPageMiddleOverlayStyle} pointerEvents="box-none">
275
+ <View style={subPageMiddleBoxStyle} pointerEvents="box-none">
276
+ <View
277
+ style={{
278
+ flex: 1,
279
+ minWidth: 1,
280
+ height: '100%',
281
+ flexDirection: 'row',
282
+ alignItems: 'center',
283
+ justifyContent: 'center',
284
+ }}
285
+ pointerEvents="box-none"
286
+ >
287
+ {processedMiddle}
288
+ </View>
276
289
  </View>
277
290
  </View>
278
291
  )}