@marcoschwartz/lite-ui 0.26.0 → 0.26.1

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/index.d.mts CHANGED
@@ -713,6 +713,8 @@ interface LineChartProps {
713
713
  responsive?: boolean;
714
714
  /** Aspect ratio for responsive mode (default: 2 = width is 2x height) */
715
715
  aspectRatio?: number;
716
+ /** Maximum height constraint for responsive mode */
717
+ maxHeight?: number | string;
716
718
  /** @internal - Set by ResponsiveContainer to indicate resize (skip animation) */
717
719
  _isResizing?: boolean;
718
720
  /** Padding inside the chart */
@@ -797,6 +799,8 @@ interface BarChartProps {
797
799
  responsive?: boolean;
798
800
  /** Aspect ratio for responsive mode (default: 2 = width is 2x height) */
799
801
  aspectRatio?: number;
802
+ /** Maximum height constraint for responsive mode */
803
+ maxHeight?: number | string;
800
804
  /** @internal - Set by ResponsiveContainer to indicate resize (skip animation) */
801
805
  _isResizing?: boolean;
802
806
  /** Padding inside the chart */
@@ -884,6 +888,8 @@ interface AreaChartProps {
884
888
  responsive?: boolean;
885
889
  /** Aspect ratio for responsive mode (default: 2 = width is 2x height) */
886
890
  aspectRatio?: number;
891
+ /** Maximum height constraint for responsive mode */
892
+ maxHeight?: number | string;
887
893
  /** @internal - Set by ResponsiveContainer to indicate resize (skip animation) */
888
894
  _isResizing?: boolean;
889
895
  /** Padding inside the chart */
@@ -961,6 +967,8 @@ interface PieChartProps {
961
967
  responsive?: boolean;
962
968
  /** Aspect ratio for responsive mode (default: 1 for square pie charts) */
963
969
  aspectRatio?: number;
970
+ /** Maximum height constraint for responsive mode */
971
+ maxHeight?: number | string;
964
972
  /** @internal - Set by ResponsiveContainer to indicate resize (skip animation) */
965
973
  _isResizing?: boolean;
966
974
  /** Inner radius for donut chart (0 for pie) */
@@ -1037,6 +1045,8 @@ interface ScatterChartProps {
1037
1045
  responsive?: boolean;
1038
1046
  /** Aspect ratio for responsive mode (default: 2 = width is 2x height) */
1039
1047
  aspectRatio?: number;
1048
+ /** Maximum height constraint for responsive mode */
1049
+ maxHeight?: number | string;
1040
1050
  /** @internal - Set by ResponsiveContainer to indicate resize (skip animation) */
1041
1051
  _isResizing?: boolean;
1042
1052
  /** Padding inside the chart */
package/dist/index.d.ts CHANGED
@@ -713,6 +713,8 @@ interface LineChartProps {
713
713
  responsive?: boolean;
714
714
  /** Aspect ratio for responsive mode (default: 2 = width is 2x height) */
715
715
  aspectRatio?: number;
716
+ /** Maximum height constraint for responsive mode */
717
+ maxHeight?: number | string;
716
718
  /** @internal - Set by ResponsiveContainer to indicate resize (skip animation) */
717
719
  _isResizing?: boolean;
718
720
  /** Padding inside the chart */
@@ -797,6 +799,8 @@ interface BarChartProps {
797
799
  responsive?: boolean;
798
800
  /** Aspect ratio for responsive mode (default: 2 = width is 2x height) */
799
801
  aspectRatio?: number;
802
+ /** Maximum height constraint for responsive mode */
803
+ maxHeight?: number | string;
800
804
  /** @internal - Set by ResponsiveContainer to indicate resize (skip animation) */
801
805
  _isResizing?: boolean;
802
806
  /** Padding inside the chart */
@@ -884,6 +888,8 @@ interface AreaChartProps {
884
888
  responsive?: boolean;
885
889
  /** Aspect ratio for responsive mode (default: 2 = width is 2x height) */
886
890
  aspectRatio?: number;
891
+ /** Maximum height constraint for responsive mode */
892
+ maxHeight?: number | string;
887
893
  /** @internal - Set by ResponsiveContainer to indicate resize (skip animation) */
888
894
  _isResizing?: boolean;
889
895
  /** Padding inside the chart */
@@ -961,6 +967,8 @@ interface PieChartProps {
961
967
  responsive?: boolean;
962
968
  /** Aspect ratio for responsive mode (default: 1 for square pie charts) */
963
969
  aspectRatio?: number;
970
+ /** Maximum height constraint for responsive mode */
971
+ maxHeight?: number | string;
964
972
  /** @internal - Set by ResponsiveContainer to indicate resize (skip animation) */
965
973
  _isResizing?: boolean;
966
974
  /** Inner radius for donut chart (0 for pie) */
@@ -1037,6 +1045,8 @@ interface ScatterChartProps {
1037
1045
  responsive?: boolean;
1038
1046
  /** Aspect ratio for responsive mode (default: 2 = width is 2x height) */
1039
1047
  aspectRatio?: number;
1048
+ /** Maximum height constraint for responsive mode */
1049
+ maxHeight?: number | string;
1040
1050
  /** @internal - Set by ResponsiveContainer to indicate resize (skip animation) */
1041
1051
  _isResizing?: boolean;
1042
1052
  /** Padding inside the chart */
package/dist/index.js CHANGED
@@ -6125,6 +6125,7 @@ function useBreakpoint() {
6125
6125
  function useResponsiveChart({
6126
6126
  responsive = false,
6127
6127
  aspectRatio,
6128
+ maxHeight,
6128
6129
  providedWidth,
6129
6130
  providedHeight,
6130
6131
  defaultWidth = 800,
@@ -6143,7 +6144,11 @@ function useResponsiveChart({
6143
6144
  height = providedHeight || defaultHeight;
6144
6145
  effectiveAspectRatio = width / height;
6145
6146
  }
6146
- const containerStyle = responsive ? { width: "100%", aspectRatio: `${effectiveAspectRatio}` } : { width, height: "auto" };
6147
+ const containerStyle = responsive ? {
6148
+ width: "100%",
6149
+ aspectRatio: `${effectiveAspectRatio}`,
6150
+ ...maxHeight !== void 0 && { maxHeight, overflow: "hidden" }
6151
+ } : { width, height: "auto" };
6147
6152
  const svgStyle = responsive ? { width: "100%", height: "100%", display: "block" } : {};
6148
6153
  const svgWidth = responsive ? "100%" : width;
6149
6154
  const svgHeight = responsive ? "100%" : height;
@@ -7024,6 +7029,7 @@ var LineChart = ({
7024
7029
  height: providedHeight,
7025
7030
  responsive = false,
7026
7031
  aspectRatio = 2,
7032
+ maxHeight,
7027
7033
  _isResizing = false,
7028
7034
  padding: customPadding,
7029
7035
  showGrid = true,
@@ -7068,6 +7074,7 @@ var LineChart = ({
7068
7074
  } = useResponsiveChart({
7069
7075
  responsive,
7070
7076
  aspectRatio,
7077
+ maxHeight,
7071
7078
  providedWidth,
7072
7079
  providedHeight
7073
7080
  });
@@ -7517,6 +7524,7 @@ var BarChart = ({
7517
7524
  height: providedHeight,
7518
7525
  responsive = false,
7519
7526
  aspectRatio = 2,
7527
+ maxHeight,
7520
7528
  _isResizing = false,
7521
7529
  padding: customPadding,
7522
7530
  showGrid = true,
@@ -7559,6 +7567,7 @@ var BarChart = ({
7559
7567
  } = useResponsiveChart({
7560
7568
  responsive,
7561
7569
  aspectRatio,
7570
+ maxHeight,
7562
7571
  providedWidth,
7563
7572
  providedHeight
7564
7573
  });
@@ -7941,6 +7950,7 @@ var AreaChart = ({
7941
7950
  height: providedHeight,
7942
7951
  responsive = false,
7943
7952
  aspectRatio = 2,
7953
+ maxHeight,
7944
7954
  _isResizing = false,
7945
7955
  padding: customPadding,
7946
7956
  showGrid = true,
@@ -7982,6 +7992,7 @@ var AreaChart = ({
7982
7992
  } = useResponsiveChart({
7983
7993
  responsive,
7984
7994
  aspectRatio,
7995
+ maxHeight,
7985
7996
  providedWidth,
7986
7997
  providedHeight
7987
7998
  });
@@ -8412,6 +8423,7 @@ var PieChart = ({
8412
8423
  height: providedHeight,
8413
8424
  responsive = false,
8414
8425
  aspectRatio = 1,
8426
+ maxHeight,
8415
8427
  _isResizing = false,
8416
8428
  innerRadius: providedInnerRadius,
8417
8429
  outerRadius: providedOuterRadius,
@@ -8452,6 +8464,7 @@ var PieChart = ({
8452
8464
  } = useResponsiveChart({
8453
8465
  responsive,
8454
8466
  aspectRatio,
8467
+ maxHeight,
8455
8468
  providedWidth,
8456
8469
  providedHeight,
8457
8470
  defaultWidth: 400,
@@ -8802,6 +8815,7 @@ var ScatterChart = ({
8802
8815
  height: providedHeight,
8803
8816
  responsive = false,
8804
8817
  aspectRatio = 2,
8818
+ maxHeight,
8805
8819
  _isResizing = false,
8806
8820
  padding: customPadding,
8807
8821
  showGrid = true,
@@ -8846,6 +8860,7 @@ var ScatterChart = ({
8846
8860
  } = useResponsiveChart({
8847
8861
  responsive,
8848
8862
  aspectRatio,
8863
+ maxHeight,
8849
8864
  providedWidth,
8850
8865
  providedHeight
8851
8866
  });