panelui-native 0.62.0 → 0.63.0

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 (69) hide show
  1. package/lib/module/components/area-chart/index.js +14 -4
  2. package/lib/module/components/area-chart/index.js.map +1 -1
  3. package/lib/module/components/bar-chart/index.js +14 -4
  4. package/lib/module/components/bar-chart/index.js.map +1 -1
  5. package/lib/module/components/candlestick-chart/index.js +14 -4
  6. package/lib/module/components/candlestick-chart/index.js.map +1 -1
  7. package/lib/module/components/card/index.js +26 -1
  8. package/lib/module/components/card/index.js.map +1 -1
  9. package/lib/module/components/dialog/index.js +49 -3
  10. package/lib/module/components/dialog/index.js.map +1 -1
  11. package/lib/module/components/hex-chart/index.js +2 -2
  12. package/lib/module/components/hex-chart/index.js.map +1 -1
  13. package/lib/module/components/line-chart/index.js +14 -4
  14. package/lib/module/components/line-chart/index.js.map +1 -1
  15. package/lib/module/components/pie-chart/index.js +2 -2
  16. package/lib/module/components/pie-chart/index.js.map +1 -1
  17. package/lib/module/components/plot/index.js +1329 -0
  18. package/lib/module/components/plot/index.js.map +1 -0
  19. package/lib/module/components/polar-area-chart/index.js +2 -2
  20. package/lib/module/components/polar-area-chart/index.js.map +1 -1
  21. package/lib/module/components/radar-chart/index.js +14 -4
  22. package/lib/module/components/radar-chart/index.js.map +1 -1
  23. package/lib/module/components/ring-chart/index.js +2 -2
  24. package/lib/module/components/ring-chart/index.js.map +1 -1
  25. package/lib/module/components/section-rail/index.js +120 -15
  26. package/lib/module/components/section-rail/index.js.map +1 -1
  27. package/lib/module/components/selection-mode/index.js +129 -18
  28. package/lib/module/components/selection-mode/index.js.map +1 -1
  29. package/lib/module/components/sortable/index.js +15 -5
  30. package/lib/module/components/sortable/index.js.map +1 -1
  31. package/lib/module/index.js +7 -0
  32. package/lib/module/index.js.map +1 -1
  33. package/lib/typescript/src/components/area-chart/index.d.ts.map +1 -1
  34. package/lib/typescript/src/components/bar-chart/index.d.ts.map +1 -1
  35. package/lib/typescript/src/components/candlestick-chart/index.d.ts +6 -3
  36. package/lib/typescript/src/components/candlestick-chart/index.d.ts.map +1 -1
  37. package/lib/typescript/src/components/card/index.d.ts +48 -1
  38. package/lib/typescript/src/components/card/index.d.ts.map +1 -1
  39. package/lib/typescript/src/components/dialog/index.d.ts +47 -2
  40. package/lib/typescript/src/components/dialog/index.d.ts.map +1 -1
  41. package/lib/typescript/src/components/line-chart/index.d.ts.map +1 -1
  42. package/lib/typescript/src/components/plot/index.d.ts +471 -0
  43. package/lib/typescript/src/components/plot/index.d.ts.map +1 -0
  44. package/lib/typescript/src/components/radar-chart/index.d.ts.map +1 -1
  45. package/lib/typescript/src/components/section-rail/index.d.ts +8 -1
  46. package/lib/typescript/src/components/section-rail/index.d.ts.map +1 -1
  47. package/lib/typescript/src/components/selection-mode/index.d.ts +82 -6
  48. package/lib/typescript/src/components/selection-mode/index.d.ts.map +1 -1
  49. package/lib/typescript/src/components/sortable/index.d.ts.map +1 -1
  50. package/lib/typescript/src/index.d.ts +2 -0
  51. package/lib/typescript/src/index.d.ts.map +1 -1
  52. package/package.json +1 -1
  53. package/src/components/area-chart/index.tsx +14 -4
  54. package/src/components/bar-chart/index.tsx +14 -4
  55. package/src/components/candlestick-chart/index.tsx +20 -7
  56. package/src/components/card/index.tsx +32 -7
  57. package/src/components/dialog/index.tsx +55 -2
  58. package/src/components/hex-chart/index.tsx +2 -2
  59. package/src/components/line-chart/index.tsx +14 -4
  60. package/src/components/pie-chart/index.tsx +2 -2
  61. package/src/components/plot/index.tsx +1564 -0
  62. package/src/components/polar-area-chart/index.tsx +2 -2
  63. package/src/components/radar-chart/index.tsx +14 -4
  64. package/src/components/ring-chart/index.tsx +2 -2
  65. package/src/components/section-rail/index.tsx +133 -14
  66. package/src/components/selection-mode/index.tsx +163 -26
  67. package/src/components/sortable/index.tsx +15 -5
  68. package/src/index.ts +46 -0
  69. package/theme.css +24 -0
@@ -221,7 +221,7 @@ const LineChartRoot = forwardRef<LineChartHandle, LineChartProps>(function LineC
221
221
  xDataKey = 'date',
222
222
  status = 'ready',
223
223
  aspectRatio = 2,
224
- animationDuration = 1100,
224
+ animationDuration = 700,
225
225
  domainDuration = 500,
226
226
  yDomain,
227
227
  curve = 'monotone',
@@ -341,17 +341,27 @@ const LineChartRoot = forwardRef<LineChartHandle, LineChartProps>(function LineC
341
341
  reveal.value = 0;
342
342
  reveal.value = withTiming(1, {
343
343
  duration: animationDuration,
344
- easing: Easing.bezier(0.85, 0, 0.15, 1),
344
+ easing: Easing.out(Easing.cubic),
345
345
  });
346
346
  },
347
347
  [reducedMotion, animationDuration, reveal]
348
348
  );
349
349
 
350
350
  useEffect(() => {
351
- if (revealed.current || loading || plot.width <= 0 || !data.length) return;
351
+ /*
352
+ * Going back to `loading` arms the reveal again. Without this a chart that
353
+ * is refetched comes back fully drawn on the frame the data lands, which
354
+ * reads as the loading state having been for nothing.
355
+ */
356
+ if (loading) {
357
+ revealed.current = false;
358
+ reveal.value = 0;
359
+ return;
360
+ }
361
+ if (revealed.current || plot.width <= 0 || !data.length) return;
352
362
  revealed.current = true;
353
363
  playReveal();
354
- }, [loading, plot.width, data.length, playReveal]);
364
+ }, [loading, plot.width, data.length, playReveal, reveal]);
355
365
 
356
366
  // `replay()` re-runs the reveal — for a control the caller wires up.
357
367
  useImperativeHandle(ref, () => ({ replay: playReveal }), [playReveal]);
@@ -206,7 +206,7 @@ const PieChartRoot = forwardRef<PieChartHandle, PieChartProps>(function PieChart
206
206
  endAngle = 360,
207
207
  padAngle = 0,
208
208
  minAngle = 0,
209
- animationDuration = 900,
209
+ animationDuration = 620,
210
210
  status = 'ready',
211
211
  activeIndex: activeIndexProp,
212
212
  onActiveIndexChange,
@@ -290,7 +290,7 @@ const PieChartRoot = forwardRef<PieChartHandle, PieChartProps>(function PieChart
290
290
  reveal.value = 0;
291
291
  reveal.value = withTiming(1, {
292
292
  duration: animationDuration,
293
- easing: Easing.bezier(0.85, 0, 0.15, 1),
293
+ easing: Easing.out(Easing.cubic),
294
294
  });
295
295
  },
296
296
  [reducedMotion, animationDuration, reveal]