@galaxy-io/dls 1.4.12 → 1.4.13

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.
@@ -9,8 +9,7 @@ import type { ChartInteraction } from "./useChartInteraction";
9
9
  *
10
10
  * Every category is hoverable, including one with nothing to show: the cursor
11
11
  * still marks where the pointer is over an empty stretch of axis, and the
12
- * frame's rowless guard is what keeps a heading-only tooltip from opening
13
- * there.
12
+ * tooltip opens with a "No data" body so the hover always gets an answer.
14
13
  */
15
14
  interface ChartCategoryTargetsProps {
16
15
  targets: ChartCategoryTarget[];
@@ -70,9 +70,9 @@ export interface ChartFrameProps {
70
70
  /**
71
71
  * Builds one category's tooltip, in plot coordinates.
72
72
  *
73
- * A rowless model means "no data here": the category stays hoverable — the
74
- * cursor should still mark the pointer over an empty stretch of axis — but
75
- * no tooltip opens.
73
+ * A rowless model means "no data here": the category stays hoverable and
74
+ * the built-in tooltip renders it with a "No data" body. A custom
75
+ * {@link tooltipRenderer} never receives a rowless model.
76
76
  *
77
77
  * Must be stable; memoize it at the call site.
78
78
  */
@@ -26,12 +26,15 @@ var ChartFrame = ({ containerRef, dimensions, fillWidth, fillHeight, interaction
26
26
  const tooltipModel = useMemo(() => {
27
27
  if (noTooltip || !interaction.showTooltip || interaction.activeIndex === null) return null;
28
28
  const model = buildCategoryTooltip(interaction.activeIndex);
29
- return model === null || model.rows.length === 0 ? null : model;
29
+ if (model === null) return null;
30
+ if (model.rows.length === 0 && tooltipRenderer !== void 0) return null;
31
+ return model;
30
32
  }, [
31
33
  noTooltip,
32
34
  buildCategoryTooltip,
33
35
  interaction.activeIndex,
34
- interaction.showTooltip
36
+ interaction.showTooltip,
37
+ tooltipRenderer
35
38
  ]);
36
39
  /**
37
40
  * Plot space → container space, applied once, here.
@@ -36,7 +36,11 @@ var ChartTooltip = ({ model, containerWidth, containerHeight, anchorHalfWidth, p
36
36
  variant: TextVariant.TERTIARY,
37
37
  isEllipsis: true,
38
38
  children: displayed.label
39
- }), /* @__PURE__ */ jsx(ChartTooltipGrid, { children: displayed.rows.map((row) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(ChartTooltipLabelCell, { children: [/* @__PURE__ */ jsx(FlexItem, {
39
+ }), displayed.rows.length === 0 ? /* @__PURE__ */ jsx(Text, {
40
+ size: TextSize.BODY_SM,
41
+ variant: TextVariant.SECONDARY,
42
+ children: "No data"
43
+ }) : /* @__PURE__ */ jsx(ChartTooltipGrid, { children: displayed.rows.map((row) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(ChartTooltipLabelCell, { children: [/* @__PURE__ */ jsx(FlexItem, {
40
44
  shrink: 0,
41
45
  children: /* @__PURE__ */ jsx(Circle, {
42
46
  size: 8,
@@ -322,7 +322,14 @@ export interface ChartPlotTooltipModel {
322
322
  anchorX: number;
323
323
  anchorY: number;
324
324
  }
325
- /** Render prop for replacing the tooltip body. Positioning stays with the chart. */
325
+ /**
326
+ * Render prop for replacing the tooltip body. Positioning stays with the chart.
327
+ *
328
+ * Never called with empty `rows` — with a custom renderer installed, a
329
+ * hovered category with no data opens no tooltip at all (the built-in body
330
+ * is the one that knows how to say "No data") — so `rows[0]`-style
331
+ * assumptions are safe here.
332
+ */
326
333
  export type ChartTooltipRenderer = (model: ChartTooltipModel) => ReactNode;
327
334
  /** Which shape a category's hit target is drawn as. */
328
335
  export declare enum ChartTargetShape {
package/dist/styles.css CHANGED
@@ -142,7 +142,7 @@
142
142
  .c1yt5ynl{width:6px;height:6px;border-radius:50%;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;background-color:var(--c1yt5ynl-0);-webkit-animation:var(--c1yt5ynl-1);animation:var(--c1yt5ynl-1);}@-webkit-keyframes enrichPulse-c1yt5ynl{0%,100%{opacity:1;}50%{opacity:0.3;}}@keyframes enrichPulse-c1yt5ynl{0%,100%{opacity:1;}50%{opacity:0.3;}}@media (prefers-reduced-motion: reduce){.c1yt5ynl{-webkit-animation:none;animation:none;}}
143
143
  .c1kvxq2r{position:absolute;inset:0;z-index:10;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;background-color:var(--c1kvxq2r-0);border:1.5px solid var(--c1kvxq2r-1);border-radius:4px;}
144
144
  .cz6gl36{width:100%;height:12px;border-radius:4px;background-color:var(--cz6gl36-0);-webkit-animation:spreadsheetSkeletonPulse-cz6gl36 1.4s ease-in-out infinite;animation:spreadsheetSkeletonPulse-cz6gl36 1.4s ease-in-out infinite;}@-webkit-keyframes spreadsheetSkeletonPulse-cz6gl36{0%,100%{opacity:1;}50%{opacity:0.4;}}@keyframes spreadsheetSkeletonPulse-cz6gl36{0%,100%{opacity:1;}50%{opacity:0.4;}}@media (prefers-reduced-motion: reduce){.cz6gl36{-webkit-animation:none;animation:none;}}
145
- .tldpbjd{width:var(--tldpbjd-0);height:var(--tldpbjd-1);position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;border-radius:5px;overflow:hidden;}
145
+ .tldpbjd{width:var(--tldpbjd-0);height:var(--tldpbjd-1);min-height:var(--tldpbjd-2);max-height:var(--tldpbjd-3);position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;border-radius:5px;overflow:hidden;}
146
146
  .t1ltwowk{-webkit-flex:1;-ms-flex:1;flex:1;overflow:auto;position:relative;min-height:0;overflow-anchor:none;overscroll-behavior-x:none;-webkit-overflow-scrolling:touch;padding-bottom:var(--t1ltwowk-0);}
147
147
  .sfoers7{width:100%;min-width:var(--sfoers7-0);border-collapse:separate;border-spacing:0;table-layout:fixed;}
148
148
  .tmoy46{display:table-header-group;position:-webkit-sticky;position:sticky;top:0px;z-index:20;}
@@ -27,7 +27,7 @@ import { flexRender, getCoreRowModel, getExpandedRowModel, getSortedRowModel, us
27
27
  * `VirtualizedInfiniteTable`, which shares the same column and row API.
28
28
  */
29
29
  function InfiniteTable(props) {
30
- const { columns, data, getRowId, height, width, fillWidth, fillHeight, density = TableDensity.MEDIUM, variant = TableVariant.PRIMARY, hasNextPage, isFetchingNextPage, fetchNextPage, enableRowSelection, enableMultiRowSelection = true, rowSelection, defaultRowSelection, onRowSelectionChange, onSelectedRowsChange, showSelectionColumn = false, selectionColumnPin = ColumnPin.LEFT, enableSelectAll, enableSelectionRange = true, selectAllAriaLabel = "Select all rows", getRowSelectAriaLabel, enableSorting = false, enableMultiSort = false, sorting, onSortingChange, manualSorting = false, isLoading = false, isError = false, error, loadingRowCount = 5, contentWhenEmpty, contentWhenError, noHeader = false, noLastRowBorder = false, noLastRowPadding = false, onRowClick, onRowDoubleClick, onRowActivate, onRowExpand, expandedRowIds, defaultExpandedRowIds, onExpandedChange, getRowCanExpand, enableMultiRowExpansion = true, showExpandColumn = true, expandColumnPin = ColumnPin.LEFT, enableColumnResizing = false, columnSizing, defaultColumnSizing, onColumnSizingChange, columnResizeMode = ColumnResizeMode.ON_CHANGE, ariaLabel, ariaLabelledBy, getRowAriaLabel, enableRowFocus, onTableReady } = props;
30
+ const { columns, data, getRowId, height, minHeight, maxHeight, width, fillWidth, fillHeight, density = TableDensity.MEDIUM, variant = TableVariant.PRIMARY, hasNextPage, isFetchingNextPage, fetchNextPage, enableRowSelection, enableMultiRowSelection = true, rowSelection, defaultRowSelection, onRowSelectionChange, onSelectedRowsChange, showSelectionColumn = false, selectionColumnPin = ColumnPin.LEFT, enableSelectAll, enableSelectionRange = true, selectAllAriaLabel = "Select all rows", getRowSelectAriaLabel, enableSorting = false, enableMultiSort = false, sorting, onSortingChange, manualSorting = false, isLoading = false, isError = false, error, loadingRowCount = 5, contentWhenEmpty, contentWhenError, noHeader = false, noLastRowBorder = false, noLastRowPadding = false, onRowClick, onRowDoubleClick, onRowActivate, onRowExpand, expandedRowIds, defaultExpandedRowIds, onExpandedChange, getRowCanExpand, enableMultiRowExpansion = true, showExpandColumn = true, expandColumnPin = ColumnPin.LEFT, enableColumnResizing = false, columnSizing, defaultColumnSizing, onColumnSizingChange, columnResizeMode = ColumnResizeMode.ON_CHANGE, ariaLabel, ariaLabelledBy, getRowAriaLabel, enableRowFocus, onTableReady } = props;
31
31
  const instanceId = useId();
32
32
  const scrollContainerRef = useRef(null);
33
33
  const headerRef = useRef(null);
@@ -292,6 +292,8 @@ function InfiniteTable(props) {
292
292
  return /* @__PURE__ */ jsx(TableOuterContainer, {
293
293
  $width: width,
294
294
  $height: height,
295
+ $minHeight: minHeight,
296
+ $maxHeight: maxHeight,
295
297
  $fillWidth: fillWidth,
296
298
  $fillHeight: fillHeight,
297
299
  children: /* @__PURE__ */ jsxs(TableScrollContainer, {
@@ -12,17 +12,21 @@ import { ColumnAlign, ColumnPin, TableDensity, TableVariant } from "./types";
12
12
  export declare const TableOuterContainer: import("react").ComponentType<Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
13
13
  $width?: number | string;
14
14
  $height?: number | string;
15
+ $minHeight?: number | string;
16
+ $maxHeight?: number | string;
15
17
  $fillWidth?: boolean;
16
18
  $fillHeight?: boolean;
17
19
  } & {
18
20
  theme: import("../theme").Theme;
19
21
  } & {
20
22
  as?: React.ElementType;
21
- }, "$width" | "$height" | "$fillWidth" | "$fillHeight" | "as" | keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
23
+ }, "$width" | "$height" | "$fillWidth" | "$fillHeight" | "$minHeight" | "$maxHeight" | "as" | keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
22
24
  theme?: import("@callstack/react-theme-provider").$DeepPartial<import("../theme").Theme> | undefined;
23
25
  }> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<import("react").ComponentType<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
24
26
  $width?: number | string;
25
27
  $height?: number | string;
28
+ $minHeight?: number | string;
29
+ $maxHeight?: number | string;
26
30
  $fillWidth?: boolean;
27
31
  $fillHeight?: boolean;
28
32
  } & {
@@ -34,6 +38,8 @@ export declare const TableOuterContainer: import("react").ComponentType<Pick<imp
34
38
  } & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
35
39
  $width?: number | string;
36
40
  $height?: number | string;
41
+ $minHeight?: number | string;
42
+ $maxHeight?: number | string;
37
43
  $fillWidth?: boolean;
38
44
  $fillHeight?: boolean;
39
45
  } & {
@@ -26,66 +26,70 @@ var _exp2 = () => ({ $height, $fillHeight }) => {
26
26
  if ($height) return getCssSizeValue($height);
27
27
  return "auto";
28
28
  };
29
+ var _exp3 = () => ({ $minHeight }) => $minHeight !== void 0 ? getCssSizeValue($minHeight) : "auto";
30
+ var _exp4 = () => ({ $maxHeight }) => $maxHeight !== void 0 ? getCssSizeValue($maxHeight) : "none";
29
31
  var TableOuterContainer = withTheme(/*#__PURE__*/ styled("div")({
30
32
  name: "TableOuterContainer",
31
33
  class: "tldpbjd",
32
34
  propsAsIs: false,
33
35
  vars: {
34
36
  "tldpbjd-0": [_exp()],
35
- "tldpbjd-1": [_exp2()]
37
+ "tldpbjd-1": [_exp2()],
38
+ "tldpbjd-2": [_exp3()],
39
+ "tldpbjd-3": [_exp4()]
36
40
  }
37
41
  }));
38
42
  /**
39
43
  * Deliberately not wrapped in `withTheme` — it receives a ref, and the
40
44
  * `withTheme` HOC does not forward one.
41
45
  */
42
- var _exp3 = () => ({ $noLastRowPadding }) => $noLastRowPadding ? "0" : "8px";
46
+ var _exp5 = () => ({ $noLastRowPadding }) => $noLastRowPadding ? "0" : "8px";
43
47
  var TableScrollContainer = /*#__PURE__*/ styled("div")({
44
48
  name: "TableScrollContainer",
45
49
  class: "t1ltwowk",
46
50
  propsAsIs: false,
47
- vars: { "t1ltwowk-0": [_exp3()] }
51
+ vars: { "t1ltwowk-0": [_exp5()] }
48
52
  });
49
53
  /**
50
54
  * `min-width` is the sum of the resolved column widths, so a table whose fixed
51
55
  * columns overflow scrolls horizontally instead of squashing — while a table of
52
56
  * flexible columns still fills its container.
53
57
  */
54
- var _exp4 = () => ({ $rowMinWidth }) => `${$rowMinWidth}px`;
58
+ var _exp6 = () => ({ $rowMinWidth }) => `${$rowMinWidth}px`;
55
59
  var StyledTable = /*#__PURE__*/ styled("table")({
56
60
  name: "StyledTable",
57
61
  class: "sfoers7",
58
62
  propsAsIs: false,
59
- vars: { "sfoers7-0": [_exp4()] }
63
+ vars: { "sfoers7-0": [_exp6()] }
60
64
  });
61
65
  var TableHead = /*#__PURE__*/ styled("thead")({
62
66
  name: "TableHead",
63
67
  class: "tmoy46",
64
68
  propsAsIs: false
65
69
  });
66
- var _exp5 = () => ({ $virtualHeight }) => $virtualHeight !== void 0 ? `${$virtualHeight}px` : "auto";
70
+ var _exp7 = () => ({ $virtualHeight }) => $virtualHeight !== void 0 ? `${$virtualHeight}px` : "auto";
67
71
  var TableBody = /*#__PURE__*/ styled("tbody")({
68
72
  name: "TableBody",
69
73
  class: "tyata5l",
70
74
  propsAsIs: false,
71
- vars: { "tyata5l-0": [_exp5()] }
75
+ vars: { "tyata5l-0": [_exp7()] }
72
76
  });
73
77
  var TableHeaderRow = /*#__PURE__*/ styled("tr")({
74
78
  name: "TableHeaderRow",
75
79
  class: "tr9kpwl",
76
80
  propsAsIs: false
77
81
  });
78
- var _exp6 = () => ({ $isClickable }) => $isClickable ? "pointer" : "default";
79
- var _exp7 = () => ({ $density, $rowHeight }) => $rowHeight !== void 0 ? `${$rowHeight}px` : getDensityRowHeight($density);
80
- var _exp8 = () => ({ $translateY }) => $translateY !== void 0 ? "absolute" : "static";
81
- var _exp9 = () => ({ $translateY }) => $translateY !== void 0 ? `translateY(${$translateY}px)` : "none";
82
- var _exp0 = () => ({ theme }) => theme.color.border.selected;
83
- var _exp1 = () => ({ $isSelected, $variant, theme }) => $isSelected ? getVariantSelectedBackgroundColor(theme, $variant) : getVariantBackgroundColor(theme, $variant);
84
- var _exp10 = () => ({ $isExpanded, $isLastRow, theme }) => {
82
+ var _exp8 = () => ({ $isClickable }) => $isClickable ? "pointer" : "default";
83
+ var _exp9 = () => ({ $density, $rowHeight }) => $rowHeight !== void 0 ? `${$rowHeight}px` : getDensityRowHeight($density);
84
+ var _exp0 = () => ({ $translateY }) => $translateY !== void 0 ? "absolute" : "static";
85
+ var _exp1 = () => ({ $translateY }) => $translateY !== void 0 ? `translateY(${$translateY}px)` : "none";
86
+ var _exp10 = () => ({ theme }) => theme.color.border.selected;
87
+ var _exp11 = () => ({ $isSelected, $variant, theme }) => $isSelected ? getVariantSelectedBackgroundColor(theme, $variant) : getVariantBackgroundColor(theme, $variant);
88
+ var _exp12 = () => ({ $isExpanded, $isLastRow, theme }) => {
85
89
  if ($isExpanded || $isLastRow) return "none";
86
90
  return `0.5px solid ${theme.color.border.primary}`;
87
91
  };
88
- var _exp11 = () => ({ $isClickable, $isSelected, $variant, theme }) => {
92
+ var _exp13 = () => ({ $isClickable, $isSelected, $variant, theme }) => {
89
93
  if ($isSelected) return getVariantSelectedBackgroundColor(theme, $variant);
90
94
  if ($isClickable) return getVariantHoverBackgroundColor(theme, $variant);
91
95
  return getVariantBackgroundColor(theme, $variant);
@@ -95,68 +99,68 @@ var TableRow = withTheme(/*#__PURE__*/ styled("tr")({
95
99
  class: "t1ae7muk",
96
100
  propsAsIs: false,
97
101
  vars: {
98
- "t1ae7muk-0": [_exp6()],
99
- "t1ae7muk-1": [_exp7()],
100
- "t1ae7muk-2": [_exp8()],
101
- "t1ae7muk-3": [_exp9()],
102
- "t1ae7muk-4": [_exp0()],
103
- "t1ae7muk-5": [_exp1()],
104
- "t1ae7muk-6": [_exp10()],
105
- "t1ae7muk-7": [_exp11()]
102
+ "t1ae7muk-0": [_exp8()],
103
+ "t1ae7muk-1": [_exp9()],
104
+ "t1ae7muk-2": [_exp0()],
105
+ "t1ae7muk-3": [_exp1()],
106
+ "t1ae7muk-4": [_exp10()],
107
+ "t1ae7muk-5": [_exp11()],
108
+ "t1ae7muk-6": [_exp12()],
109
+ "t1ae7muk-7": [_exp13()]
106
110
  }
107
111
  }));
108
- var _exp12 = () => ({ $density }) => getDensityRowHeight($density);
109
- var _exp13 = () => ({ theme }) => theme.color.border.primary;
110
- var _exp14 = () => ({ $variant, theme }) => getVariantBackgroundColor(theme, $variant);
112
+ var _exp14 = () => ({ $density }) => getDensityRowHeight($density);
113
+ var _exp15 = () => ({ theme }) => theme.color.border.primary;
114
+ var _exp16 = () => ({ $variant, theme }) => getVariantBackgroundColor(theme, $variant);
111
115
  var TableLoadingRow = withTheme(/*#__PURE__*/ styled("tr")({
112
116
  name: "TableLoadingRow",
113
117
  class: "t5udbsy",
114
118
  propsAsIs: false,
115
119
  vars: {
116
- "t5udbsy-0": [_exp12()],
117
- "t5udbsy-1": [_exp13()],
118
- "t5udbsy-2": [_exp14()]
120
+ "t5udbsy-0": [_exp14()],
121
+ "t5udbsy-1": [_exp15()],
122
+ "t5udbsy-2": [_exp16()]
119
123
  }
120
124
  }));
121
- var _exp15 = () => ({ $density, $isCompact }) => $isCompact ? "4px 6px" : getDensityCellPadding($density);
122
- var _exp16 = () => ({ $width }) => {
125
+ var _exp17 = () => ({ $density, $isCompact }) => $isCompact ? "4px 6px" : getDensityCellPadding($density);
126
+ var _exp18 = () => ({ $width }) => {
123
127
  if ($width) return `0 0 ${$width}px`;
124
128
  return "1 1 0";
125
129
  };
126
- var _exp17 = () => ({ $minWidth }) => {
130
+ var _exp19 = () => ({ $minWidth }) => {
127
131
  if ($minWidth) return `${$minWidth}px`;
128
132
  return "0";
129
133
  };
130
- var _exp18 = () => ({ $maxWidth }) => {
134
+ var _exp20 = () => ({ $maxWidth }) => {
131
135
  if ($maxWidth) return `${$maxWidth}px`;
132
136
  return "none";
133
137
  };
134
- var _exp19 = () => ({ $align }) => match($align).with(ColumnAlign.LEFT, () => "left").with(ColumnAlign.CENTER, () => "center").with(ColumnAlign.RIGHT, () => "right").with(void 0, () => "left").exhaustive();
135
- var _exp20 = () => ({ theme }) => theme.color.border.primary;
136
- var _exp21 = () => ({ $variant, theme }) => getVariantBackgroundColor(theme, $variant);
137
- var _exp22 = () => ({ $align }) => match($align).with(ColumnAlign.LEFT, () => "flex-start").with(ColumnAlign.CENTER, () => "center").with(ColumnAlign.RIGHT, () => "flex-end").with(void 0, () => "flex-start").exhaustive();
138
- var _exp23 = () => ({ $isSortable }) => {
138
+ var _exp21 = () => ({ $align }) => match($align).with(ColumnAlign.LEFT, () => "left").with(ColumnAlign.CENTER, () => "center").with(ColumnAlign.RIGHT, () => "right").with(void 0, () => "left").exhaustive();
139
+ var _exp22 = () => ({ theme }) => theme.color.border.primary;
140
+ var _exp23 = () => ({ $variant, theme }) => getVariantBackgroundColor(theme, $variant);
141
+ var _exp24 = () => ({ $align }) => match($align).with(ColumnAlign.LEFT, () => "flex-start").with(ColumnAlign.CENTER, () => "center").with(ColumnAlign.RIGHT, () => "flex-end").with(void 0, () => "flex-start").exhaustive();
142
+ var _exp25 = () => ({ $isSortable }) => {
139
143
  if ($isSortable) return "pointer";
140
144
  return "default";
141
145
  };
142
- var _exp24 = () => ({ theme }) => theme.color.border.selected;
143
- var _exp25 = () => ({ $pin }) => {
146
+ var _exp26 = () => ({ theme }) => theme.color.border.selected;
147
+ var _exp27 = () => ({ $pin }) => {
144
148
  if ($pin) return 25;
145
149
  return 20;
146
150
  };
147
- var _exp26 = () => ({ $pin, $pinnedOffset }) => {
151
+ var _exp28 = () => ({ $pin, $pinnedOffset }) => {
148
152
  if ($pin === ColumnPin.LEFT && $pinnedOffset !== void 0) return `${$pinnedOffset}px`;
149
153
  return "auto";
150
154
  };
151
- var _exp27 = () => ({ $pin, $pinnedOffset }) => {
155
+ var _exp29 = () => ({ $pin, $pinnedOffset }) => {
152
156
  if ($pin === ColumnPin.RIGHT && $pinnedOffset !== void 0) return `${$pinnedOffset}px`;
153
157
  return "auto";
154
158
  };
155
- var _exp28 = () => ({ $pin, theme }) => {
159
+ var _exp30 = () => ({ $pin, theme }) => {
156
160
  if ($pin === ColumnPin.LEFT) return `0.5px solid ${theme.color.border.primary}`;
157
161
  return "none";
158
162
  };
159
- var _exp29 = () => ({ $pin, theme }) => {
163
+ var _exp31 = () => ({ $pin, theme }) => {
160
164
  if ($pin === ColumnPin.RIGHT) return `0.5px solid ${theme.color.border.primary}`;
161
165
  return "none";
162
166
  };
@@ -165,67 +169,67 @@ var TableHeaderCell = withTheme(/*#__PURE__*/ styled("th")({
165
169
  class: "t9zg7bh",
166
170
  propsAsIs: false,
167
171
  vars: {
168
- "t9zg7bh-0": [_exp15()],
169
- "t9zg7bh-1": [_exp16()],
170
- "t9zg7bh-2": [_exp17()],
171
- "t9zg7bh-3": [_exp18()],
172
- "t9zg7bh-4": [_exp19()],
173
- "t9zg7bh-5": [_exp20()],
174
- "t9zg7bh-6": [_exp21()],
175
- "t9zg7bh-7": [_exp22()],
176
- "t9zg7bh-8": [_exp23()],
177
- "t9zg7bh-9": [_exp24()],
178
- "t9zg7bh-10": [_exp25()],
179
- "t9zg7bh-11": [_exp26()],
180
- "t9zg7bh-12": [_exp27()],
181
- "t9zg7bh-13": [_exp28()],
182
- "t9zg7bh-14": [_exp29()]
172
+ "t9zg7bh-0": [_exp17()],
173
+ "t9zg7bh-1": [_exp18()],
174
+ "t9zg7bh-2": [_exp19()],
175
+ "t9zg7bh-3": [_exp20()],
176
+ "t9zg7bh-4": [_exp21()],
177
+ "t9zg7bh-5": [_exp22()],
178
+ "t9zg7bh-6": [_exp23()],
179
+ "t9zg7bh-7": [_exp24()],
180
+ "t9zg7bh-8": [_exp25()],
181
+ "t9zg7bh-9": [_exp26()],
182
+ "t9zg7bh-10": [_exp27()],
183
+ "t9zg7bh-11": [_exp28()],
184
+ "t9zg7bh-12": [_exp29()],
185
+ "t9zg7bh-13": [_exp30()],
186
+ "t9zg7bh-14": [_exp31()]
183
187
  }
184
188
  }));
185
- var _exp30 = () => ({ $density, $isCompact }) => $isCompact ? "4px 6px" : getDensityCellPadding($density);
186
- var _exp31 = () => ({ theme }) => theme.color.text.primary;
187
- var _exp32 = () => ({ $width }) => {
189
+ var _exp32 = () => ({ $density, $isCompact }) => $isCompact ? "4px 6px" : getDensityCellPadding($density);
190
+ var _exp33 = () => ({ theme }) => theme.color.text.primary;
191
+ var _exp34 = () => ({ $width }) => {
188
192
  if ($width) return `0 0 ${$width}px`;
189
193
  return "1 1 0";
190
194
  };
191
- var _exp33 = () => ({ $minWidth }) => {
195
+ var _exp35 = () => ({ $minWidth }) => {
192
196
  if ($minWidth) return `${$minWidth}px`;
193
197
  return "0";
194
198
  };
195
- var _exp34 = () => ({ $maxWidth }) => {
199
+ var _exp36 = () => ({ $maxWidth }) => {
196
200
  if ($maxWidth) return `${$maxWidth}px`;
197
201
  return "none";
198
202
  };
199
- var _exp35 = () => ({ $align }) => match($align).with(ColumnAlign.LEFT, () => "left").with(ColumnAlign.CENTER, () => "center").with(ColumnAlign.RIGHT, () => "right").with(void 0, () => "left").exhaustive();
200
- var _exp36 = () => ({ $align }) => match($align).with(ColumnAlign.LEFT, () => "flex-start").with(ColumnAlign.CENTER, () => "center").with(ColumnAlign.RIGHT, () => "flex-end").with(void 0, () => "flex-start").exhaustive();
201
- var _exp37 = () => ({ $pin, $variant, theme }) => {
203
+ var _exp37 = () => ({ $align }) => match($align).with(ColumnAlign.LEFT, () => "left").with(ColumnAlign.CENTER, () => "center").with(ColumnAlign.RIGHT, () => "right").with(void 0, () => "left").exhaustive();
204
+ var _exp38 = () => ({ $align }) => match($align).with(ColumnAlign.LEFT, () => "flex-start").with(ColumnAlign.CENTER, () => "center").with(ColumnAlign.RIGHT, () => "flex-end").with(void 0, () => "flex-start").exhaustive();
205
+ var _exp39 = () => ({ $pin, $variant, theme }) => {
202
206
  if ($pin) return getVariantBackgroundColor(theme, $variant);
203
207
  return "transparent";
204
208
  };
205
- var _exp38 = () => ({ $isEditable }) => $isEditable ? "text" : "inherit";
206
- var _exp39 = () => ({ $variant, theme }) => getVariantHoverBackgroundColor(theme, $variant);
207
- var _exp40 = () => ({ $pin, $isPositioned }) => {
209
+ var _exp40 = () => ({ $isEditable }) => $isEditable ? "text" : "inherit";
210
+ var _exp41 = () => ({ $variant, theme }) => getVariantHoverBackgroundColor(theme, $variant);
211
+ var _exp42 = () => ({ $pin, $isPositioned }) => {
208
212
  if ($pin) return "sticky";
209
213
  if ($isPositioned) return "relative";
210
214
  return "static";
211
215
  };
212
- var _exp41 = () => ({ $pin }) => {
216
+ var _exp43 = () => ({ $pin }) => {
213
217
  if ($pin) return 5;
214
218
  return "auto";
215
219
  };
216
- var _exp42 = () => ({ $pin, $pinnedOffset }) => {
220
+ var _exp44 = () => ({ $pin, $pinnedOffset }) => {
217
221
  if ($pin === ColumnPin.LEFT && $pinnedOffset !== void 0) return `${$pinnedOffset}px`;
218
222
  return "auto";
219
223
  };
220
- var _exp43 = () => ({ $pin, $pinnedOffset }) => {
224
+ var _exp45 = () => ({ $pin, $pinnedOffset }) => {
221
225
  if ($pin === ColumnPin.RIGHT && $pinnedOffset !== void 0) return `${$pinnedOffset}px`;
222
226
  return "auto";
223
227
  };
224
- var _exp44 = () => ({ $pin, theme }) => {
228
+ var _exp46 = () => ({ $pin, theme }) => {
225
229
  if ($pin === ColumnPin.LEFT) return `0.5px solid ${theme.color.border.primary}`;
226
230
  return "none";
227
231
  };
228
- var _exp45 = () => ({ $pin, theme }) => {
232
+ var _exp47 = () => ({ $pin, theme }) => {
229
233
  if ($pin === ColumnPin.RIGHT) return `0.5px solid ${theme.color.border.primary}`;
230
234
  return "none";
231
235
  };
@@ -234,30 +238,30 @@ var TableDataCell = withTheme(/*#__PURE__*/ styled("td")({
234
238
  class: "txnbn9h",
235
239
  propsAsIs: false,
236
240
  vars: {
237
- "txnbn9h-0": [_exp30()],
238
- "txnbn9h-1": [_exp31()],
239
- "txnbn9h-2": [_exp32()],
240
- "txnbn9h-3": [_exp33()],
241
- "txnbn9h-4": [_exp34()],
242
- "txnbn9h-5": [_exp35()],
243
- "txnbn9h-6": [_exp36()],
244
- "txnbn9h-7": [_exp37()],
245
- "txnbn9h-8": [_exp38()],
246
- "txnbn9h-9": [_exp39()],
247
- "txnbn9h-10": [_exp40()],
248
- "txnbn9h-11": [_exp41()],
249
- "txnbn9h-12": [_exp42()],
250
- "txnbn9h-13": [_exp43()],
251
- "txnbn9h-14": [_exp44()],
252
- "txnbn9h-15": [_exp45()]
241
+ "txnbn9h-0": [_exp32()],
242
+ "txnbn9h-1": [_exp33()],
243
+ "txnbn9h-2": [_exp34()],
244
+ "txnbn9h-3": [_exp35()],
245
+ "txnbn9h-4": [_exp36()],
246
+ "txnbn9h-5": [_exp37()],
247
+ "txnbn9h-6": [_exp38()],
248
+ "txnbn9h-7": [_exp39()],
249
+ "txnbn9h-8": [_exp40()],
250
+ "txnbn9h-9": [_exp41()],
251
+ "txnbn9h-10": [_exp42()],
252
+ "txnbn9h-11": [_exp43()],
253
+ "txnbn9h-12": [_exp44()],
254
+ "txnbn9h-13": [_exp45()],
255
+ "txnbn9h-14": [_exp46()],
256
+ "txnbn9h-15": [_exp47()]
253
257
  }
254
258
  }));
255
- var _exp46 = () => ({ $grow }) => $grow ? "1 1 auto" : "0 1 auto";
259
+ var _exp48 = () => ({ $grow }) => $grow ? "1 1 auto" : "0 1 auto";
256
260
  var HeaderContentWrapper = /*#__PURE__*/ styled("div")({
257
261
  name: "HeaderContentWrapper",
258
262
  class: "hsbbcc2",
259
263
  propsAsIs: false,
260
- vars: { "hsbbcc2-0": [_exp46()] }
264
+ vars: { "hsbbcc2-0": [_exp48()] }
261
265
  });
262
266
  /** Holds a trailing affordance — a menu trigger, say — at the cell's far edge. */
263
267
  var HeaderTrailingWrapper = /*#__PURE__*/ styled("div")({
@@ -277,15 +281,15 @@ var SortIconWrapper = /*#__PURE__*/ styled("div")({
277
281
  * against the trailing edge — centring it inside the grab area would leave it
278
282
  * floating a few pixels short of the column border it represents.
279
283
  */
280
- var _exp47 = () => ({ $isResizing, theme }) => $isResizing ? theme.color.border.selected : "transparent";
281
- var _exp49 = () => ({ theme }) => theme.color.border.selected;
284
+ var _exp49 = () => ({ $isResizing, theme }) => $isResizing ? theme.color.border.selected : "transparent";
285
+ var _exp51 = () => ({ theme }) => theme.color.border.selected;
282
286
  var ColumnResizeHandle = withTheme(/*#__PURE__*/ styled("div")({
283
287
  name: "ColumnResizeHandle",
284
288
  class: "c17fany5",
285
289
  propsAsIs: false,
286
290
  vars: {
287
- "c17fany5-0": [_exp47()],
288
- "c17fany5-1": [_exp49()]
291
+ "c17fany5-0": [_exp49()],
292
+ "c17fany5-1": [_exp51()]
289
293
  }
290
294
  }));
291
295
  /** Sentinel that drives infinite scroll; carries no visual weight. */
@@ -50,7 +50,7 @@ var VirtualizedRow = React.memo(VirtualizedRowInner);
50
50
  * `InfiniteTable` until row count actually becomes the problem.
51
51
  */
52
52
  function VirtualizedInfiniteTable(props) {
53
- const { columns, totalRowCount, getRowData, getRowId, height, width, fillWidth, fillHeight, density = TableDensity.MEDIUM, variant = TableVariant.PRIMARY, estimateRowHeight, overscan = 25, hasNextPage, isFetchingNextPage, fetchNextPage, isLoading = false, isError = false, error, loadingRowCount = 5, contentWhenEmpty, contentWhenError, noHeader = false, noLastRowBorder = false, noLastRowPadding = false, enableColumnResizing = false, columnSizing, defaultColumnSizing, onColumnSizingChange, columnResizeMode = ColumnResizeMode.ON_CHANGE, ariaLabel, ariaLabelledBy, onRowClick } = props;
53
+ const { columns, totalRowCount, getRowData, getRowId, height, minHeight, maxHeight, width, fillWidth, fillHeight, density = TableDensity.MEDIUM, variant = TableVariant.PRIMARY, estimateRowHeight, overscan = 25, hasNextPage, isFetchingNextPage, fetchNextPage, isLoading = false, isError = false, error, loadingRowCount = 5, contentWhenEmpty, contentWhenError, noHeader = false, noLastRowBorder = false, noLastRowPadding = false, enableColumnResizing = false, columnSizing, defaultColumnSizing, onColumnSizingChange, columnResizeMode = ColumnResizeMode.ON_CHANGE, ariaLabel, ariaLabelledBy, onRowClick } = props;
54
54
  const scrollContainerRef = useRef(null);
55
55
  const headerRef = useRef(null);
56
56
  const { width: viewportWidth, height: viewportHeight } = useElementClientSize(scrollContainerRef);
@@ -131,6 +131,8 @@ function VirtualizedInfiniteTable(props) {
131
131
  return /* @__PURE__ */ jsx(TableOuterContainer, {
132
132
  $width: width,
133
133
  $height: height,
134
+ $minHeight: minHeight,
135
+ $maxHeight: maxHeight,
134
136
  $fillWidth: fillWidth,
135
137
  $fillHeight: fillHeight,
136
138
  children: /* @__PURE__ */ jsxs(TableScrollContainer, {
@@ -64,6 +64,8 @@ export interface BaseTableProps<TData> {
64
64
  columns: ColumnDef<TData, unknown>[];
65
65
  getRowId?: (row: TData, index: number) => string;
66
66
  height?: number | string;
67
+ minHeight?: number | string;
68
+ maxHeight?: number | string;
67
69
  width?: number | string;
68
70
  fillWidth?: boolean;
69
71
  fillHeight?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galaxy-io/dls",
3
- "version": "1.4.12",
3
+ "version": "1.4.13",
4
4
  "description": "Galaxy Design Language System",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",