@czi-sds/data-viz 0.14.1 → 0.14.3

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.
@@ -246,11 +246,11 @@ interface StackedBarChartProps extends HTMLAttributes<HTMLDivElement> {
246
246
  selectionBehavior?: "dim" | "hide";
247
247
  /**
248
248
  * Chart mode - controls how segments are calculated
249
- * - "porportional": Segments fill entire bar (100%), proportional to their values
249
+ * - "proportional": Segments fill entire bar (100%), proportional to their values
250
250
  * - "cumulative": Segments sized based on actual values relative to maxAmount
251
- * @default "porportional"
251
+ * @default "proportional"
252
252
  */
253
- mode?: "porportional" | "cumulative";
253
+ mode?: "proportional" | "cumulative";
254
254
  /**
255
255
  * Maximum amount for the bar (used only in "cumulative" mode)
256
256
  * If not provided, defaults to sum of all values (no remaining segment)
package/dist/index.cjs.js CHANGED
@@ -24967,7 +24967,7 @@ var renderBarSegment = function (item, index, options) {
24967
24967
  // Mark hidden segments with data-hide attribute when in hide mode
24968
24968
  var isHidden = selectionBehavior === "hide" && item.percentage === 0;
24969
24969
  var barSegment = (jsxRuntime.jsx(BarSegment, { color: item.color, percentage: item.percentage, height: barHeight, opacity: getSegmentOpacity(item.originalIndex, hoveredIndex, selectedIndicesSet, selectionBehavior), isLast: isLast, "data-hide": isHidden, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onClick: onClick }));
24970
- return item.tooltip !== undefined ? (jsxRuntime.jsx(Tooltip, { title: null, componentSlot: jsxRuntime.jsx(TooltipTableContent, __assign$1({}, item.tooltip)), placement: "top", hasInvertedStyle: false, open: hoveredIndex === item.originalIndex, disableInteractive: true, PopperProps: {
24970
+ return item.tooltip !== undefined ? (jsxRuntime.jsx(Tooltip, { title: null, componentSlot: jsxRuntime.jsx(TooltipTableContent, __assign$1({}, item.tooltip)), placement: "top", hasInvertedStyle: false, open: hoveredIndex === item.originalIndex && !isHidden, disableInteractive: true, PopperProps: {
24971
24971
  disablePortal: false,
24972
24972
  modifiers: [
24973
24973
  {
@@ -24981,7 +24981,7 @@ var renderBarSegment = function (item, index, options) {
24981
24981
  };
24982
24982
  var StackedBarChart = function (props) {
24983
24983
  var _a, _b, _c;
24984
- var title = props.title, badge = props.badge, _d = props.hideBadge, hideBadge = _d === void 0 ? false : _d, data = props.data, _e = props.width, width = _e === void 0 ? "100%" : _e, _f = props.barHeight, barHeightProp = _f === void 0 ? 16 : _f, _g = props.showLegend, showLegend = _g === void 0 ? true : _g, _h = props.showLegendValues, showLegendValues = _h === void 0 ? true : _h, _j = props.legendValueFormat, legendValueFormat = _j === void 0 ? "percentage" : _j, _k = props.selectedIndices, selectedIndices = _k === void 0 ? [] : _k, onSelectionChange = props.onSelectionChange, _l = props.selectionBehavior, selectionBehavior = _l === void 0 ? "dim" : _l, _m = props.mode, mode = _m === void 0 ? "porportional" : _m, maxAmount = props.maxAmount, _o = props.remainingLabel, remainingLabel = _o === void 0 ? "Remaining" : _o, remainingUnit = props.remainingUnit, unit = props.unit, colorGeneratorOptions = props.colorGeneratorOptions, rest = __rest(props, ["title", "badge", "hideBadge", "data", "width", "barHeight", "showLegend", "showLegendValues", "legendValueFormat", "selectedIndices", "onSelectionChange", "selectionBehavior", "mode", "maxAmount", "remainingLabel", "remainingUnit", "unit", "colorGeneratorOptions"]);
24984
+ var title = props.title, badge = props.badge, _d = props.hideBadge, hideBadge = _d === void 0 ? false : _d, data = props.data, _e = props.width, width = _e === void 0 ? "100%" : _e, _f = props.barHeight, barHeightProp = _f === void 0 ? 16 : _f, _g = props.showLegend, showLegend = _g === void 0 ? true : _g, _h = props.showLegendValues, showLegendValues = _h === void 0 ? true : _h, _j = props.legendValueFormat, legendValueFormat = _j === void 0 ? "percentage" : _j, _k = props.selectedIndices, selectedIndices = _k === void 0 ? [] : _k, onSelectionChange = props.onSelectionChange, _l = props.selectionBehavior, selectionBehavior = _l === void 0 ? "dim" : _l, _m = props.mode, mode = _m === void 0 ? "proportional" : _m, maxAmount = props.maxAmount, _o = props.remainingLabel, remainingLabel = _o === void 0 ? "Remaining" : _o, remainingUnit = props.remainingUnit, unit = props.unit, colorGeneratorOptions = props.colorGeneratorOptions, rest = __rest(props, ["title", "badge", "hideBadge", "data", "width", "barHeight", "showLegend", "showLegendValues", "legendValueFormat", "selectedIndices", "onSelectionChange", "selectionBehavior", "mode", "maxAmount", "remainingLabel", "remainingUnit", "unit", "colorGeneratorOptions"]);
24985
24985
  // Ensure barHeight is at least 1px
24986
24986
  var barHeight = Math.max(1, barHeightProp);
24987
24987
  var theme = material.useTheme();
@@ -246,11 +246,11 @@ interface StackedBarChartProps extends HTMLAttributes<HTMLDivElement> {
246
246
  selectionBehavior?: "dim" | "hide";
247
247
  /**
248
248
  * Chart mode - controls how segments are calculated
249
- * - "porportional": Segments fill entire bar (100%), proportional to their values
249
+ * - "proportional": Segments fill entire bar (100%), proportional to their values
250
250
  * - "cumulative": Segments sized based on actual values relative to maxAmount
251
- * @default "porportional"
251
+ * @default "proportional"
252
252
  */
253
- mode?: "porportional" | "cumulative";
253
+ mode?: "proportional" | "cumulative";
254
254
  /**
255
255
  * Maximum amount for the bar (used only in "cumulative" mode)
256
256
  * If not provided, defaults to sum of all values (no remaining segment)
package/dist/index.esm.js CHANGED
@@ -24943,7 +24943,7 @@ var renderBarSegment = function (item, index, options) {
24943
24943
  // Mark hidden segments with data-hide attribute when in hide mode
24944
24944
  var isHidden = selectionBehavior === "hide" && item.percentage === 0;
24945
24945
  var barSegment = (jsx(BarSegment, { color: item.color, percentage: item.percentage, height: barHeight, opacity: getSegmentOpacity(item.originalIndex, hoveredIndex, selectedIndicesSet, selectionBehavior), isLast: isLast, "data-hide": isHidden, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onClick: onClick }));
24946
- return item.tooltip !== undefined ? (jsx(Tooltip, { title: null, componentSlot: jsx(TooltipTableContent, __assign$1({}, item.tooltip)), placement: "top", hasInvertedStyle: false, open: hoveredIndex === item.originalIndex, disableInteractive: true, PopperProps: {
24946
+ return item.tooltip !== undefined ? (jsx(Tooltip, { title: null, componentSlot: jsx(TooltipTableContent, __assign$1({}, item.tooltip)), placement: "top", hasInvertedStyle: false, open: hoveredIndex === item.originalIndex && !isHidden, disableInteractive: true, PopperProps: {
24947
24947
  disablePortal: false,
24948
24948
  modifiers: [
24949
24949
  {
@@ -24957,7 +24957,7 @@ var renderBarSegment = function (item, index, options) {
24957
24957
  };
24958
24958
  var StackedBarChart = function (props) {
24959
24959
  var _a, _b, _c;
24960
- var title = props.title, badge = props.badge, _d = props.hideBadge, hideBadge = _d === void 0 ? false : _d, data = props.data, _e = props.width, width = _e === void 0 ? "100%" : _e, _f = props.barHeight, barHeightProp = _f === void 0 ? 16 : _f, _g = props.showLegend, showLegend = _g === void 0 ? true : _g, _h = props.showLegendValues, showLegendValues = _h === void 0 ? true : _h, _j = props.legendValueFormat, legendValueFormat = _j === void 0 ? "percentage" : _j, _k = props.selectedIndices, selectedIndices = _k === void 0 ? [] : _k, onSelectionChange = props.onSelectionChange, _l = props.selectionBehavior, selectionBehavior = _l === void 0 ? "dim" : _l, _m = props.mode, mode = _m === void 0 ? "porportional" : _m, maxAmount = props.maxAmount, _o = props.remainingLabel, remainingLabel = _o === void 0 ? "Remaining" : _o, remainingUnit = props.remainingUnit, unit = props.unit, colorGeneratorOptions = props.colorGeneratorOptions, rest = __rest(props, ["title", "badge", "hideBadge", "data", "width", "barHeight", "showLegend", "showLegendValues", "legendValueFormat", "selectedIndices", "onSelectionChange", "selectionBehavior", "mode", "maxAmount", "remainingLabel", "remainingUnit", "unit", "colorGeneratorOptions"]);
24960
+ var title = props.title, badge = props.badge, _d = props.hideBadge, hideBadge = _d === void 0 ? false : _d, data = props.data, _e = props.width, width = _e === void 0 ? "100%" : _e, _f = props.barHeight, barHeightProp = _f === void 0 ? 16 : _f, _g = props.showLegend, showLegend = _g === void 0 ? true : _g, _h = props.showLegendValues, showLegendValues = _h === void 0 ? true : _h, _j = props.legendValueFormat, legendValueFormat = _j === void 0 ? "percentage" : _j, _k = props.selectedIndices, selectedIndices = _k === void 0 ? [] : _k, onSelectionChange = props.onSelectionChange, _l = props.selectionBehavior, selectionBehavior = _l === void 0 ? "dim" : _l, _m = props.mode, mode = _m === void 0 ? "proportional" : _m, maxAmount = props.maxAmount, _o = props.remainingLabel, remainingLabel = _o === void 0 ? "Remaining" : _o, remainingUnit = props.remainingUnit, unit = props.unit, colorGeneratorOptions = props.colorGeneratorOptions, rest = __rest(props, ["title", "badge", "hideBadge", "data", "width", "barHeight", "showLegend", "showLegendValues", "legendValueFormat", "selectedIndices", "onSelectionChange", "selectionBehavior", "mode", "maxAmount", "remainingLabel", "remainingUnit", "unit", "colorGeneratorOptions"]);
24961
24961
  // Ensure barHeight is at least 1px
24962
24962
  var barHeight = Math.max(1, barHeightProp);
24963
24963
  var theme = useTheme$4();