@beweco/aurora-ui 0.6.64 → 0.6.66

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.cjs.js CHANGED
@@ -6437,14 +6437,25 @@ function ViolinFallback(_a) {
6437
6437
  var MARGIN = { top: 24, right: 16, bottom: 40, left: 44 };
6438
6438
  var VIEW_WIDTH = 640;
6439
6439
  var VIOLIN_HALF_WIDTH = 46;
6440
+ /** Espacio extra que reserva cada título de eje cuando se pinta. */
6441
+ var AXIS_TITLE_SPACE = 18;
6442
+ /** Aire sobre el dato para que el bigote p95 no quede pegado a la línea de arriba. */
6443
+ var HEADROOM = 0.05;
6440
6444
  var COLOR_BODY = "#c7d2fe";
6441
6445
  var COLOR_STROKE = "#4338ca";
6442
6446
  var COLOR_MEDIAN = "#1e3a8a";
6443
6447
  var COLOR_AXIS = "#6b7280";
6448
+ /** Desplazamiento vertical del rótulo del grupo bajo el eje X. */
6449
+ var GROUP_LABEL_DY = 16;
6450
+ /** Desplazamiento vertical de la línea `n=` (bajo el rótulo del grupo). */
6451
+ var SAMPLE_SIZE_DY = 30;
6452
+ /** Aire por debajo de la línea `n=` que la superficie de hover también cubre. */
6453
+ var HOVER_PADDING = 4;
6444
6454
  var defaultTranslations$1 = {
6445
6455
  emptyState: "Sin datos de distribución",
6446
6456
  sampleSizeLabel: "n",
6447
6457
  outliersLabel: "outliers",
6458
+ pointsLabel: "puntos",
6448
6459
  };
6449
6460
  function formatTick(value, factor, unit) {
6450
6461
  var scaled = value * factor;
@@ -6462,26 +6473,52 @@ function formatTick(value, factor, unit) {
6462
6473
  * server-side directo en tests.
6463
6474
  */
6464
6475
  function ViolinPlot(_a) {
6465
- var groups = _a.groups, valueLabel = _a.valueLabel, _b = _a.baseUnit, baseUnit = _b === void 0 ? "none" : _b, formatValue = _a.formatValue, _c = _a.height, height = _c === void 0 ? 320 : _c, _d = _a.minSampleForViolin, minSampleForViolin = _d === void 0 ? 20 : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e;
6476
+ var groups = _a.groups, valueLabel = _a.valueLabel, groupLabel = _a.groupLabel, _b = _a.baseUnit, baseUnit = _b === void 0 ? "none" : _b, formatValue = _a.formatValue, _c = _a.height, height = _c === void 0 ? 320 : _c, _d = _a.minSampleForViolin, minSampleForViolin = _d === void 0 ? 20 : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e;
6466
6477
  var t = __assign(__assign({}, defaultTranslations$1), translations);
6467
6478
  if (groups.length === 0) {
6468
6479
  return (jsxRuntime.jsx("svg", { viewBox: "0 0 ".concat(VIEW_WIDTH, " ").concat(height), width: "100%", role: "img", "aria-label": valueLabel, children: jsxRuntime.jsx("text", { x: VIEW_WIDTH / 2, y: height / 2, textAnchor: "middle", fill: COLOR_AXIS, children: t.emptyState }) }));
6469
6480
  }
6481
+ var marginLeft = MARGIN.left + (valueLabel ? AXIS_TITLE_SPACE : 0);
6482
+ var marginBottom = MARGIN.bottom + (groupLabel ? AXIS_TITLE_SPACE : 0);
6470
6483
  var plotTop = MARGIN.top;
6471
- var plotBottom = height - MARGIN.bottom;
6484
+ var plotBottom = height - marginBottom;
6472
6485
  var plotHeight = plotBottom - plotTop;
6473
- // Escala Y común a todos los grupos (de 0 al p95 máximo, con margen).
6474
- var maxValue = Math.max.apply(Math, __spreadArray(__spreadArray([], groups.map(function (g) { return g.p95; }), false), [1], false));
6486
+ // Escala Y común a todos los grupos: de 0 al p95 máximo, con aire.
6487
+ //
6488
+ // El suelo NO puede ser un literal en unidad base. Antes era `Math.max(..., 1)`,
6489
+ // que con `baseUnit="d"` fija el techo en 1 día = 86400 s: una distribución de
6490
+ // onboardings de ~5 min (el caso real) se dibujaba entera aplastada contra el 0
6491
+ // y el eje rotulaba "86400s". El único caso que de verdad hay que blindar es la
6492
+ // división por cero, así que el fallback se aplica SOLO si no hay dato ninguno.
6493
+ var dataMax = Math.max.apply(Math, groups.map(function (g) { return g.p95; }));
6494
+ var maxValue = dataMax > 0 ? dataMax * (1 + HEADROOM) : 1;
6475
6495
  var valueToY = function (v) {
6476
6496
  return plotBottom - (v / maxValue) * plotHeight;
6477
6497
  };
6478
- var refMedian = groups.map(function (g) { return g.p50; }).sort(function (a, b) { return a - b; })[Math.floor(groups.length / 2)];
6479
- var _f = pickDisplayUnit(refMedian, baseUnit), unit = _f.unit, factor = _f.factor;
6498
+ // La unidad se elige sobre el MÁXIMO, no sobre la mediana: los tres ticks que se
6499
+ // pintan son 0, max/2 y max, así que es el máximo el que decide qué unidad hace
6500
+ // legibles esos números. Con la mediana, un p50 que redondea a 0 devolvía "s" y
6501
+ // el techo del eje se imprimía como 86400 en vez de 1d.
6502
+ var _f = pickDisplayUnit(maxValue, baseUnit), unit = _f.unit, factor = _f.factor;
6480
6503
  var fmt = formatValue !== null && formatValue !== void 0 ? formatValue : (function (v) { return formatTick(v, factor, unit); });
6481
- var columnWidth = (VIEW_WIDTH - MARGIN.left - MARGIN.right) / groups.length;
6482
- return (jsxRuntime.jsxs("svg", { viewBox: "0 0 ".concat(VIEW_WIDTH, " ").concat(height), width: "100%", role: "img", "aria-label": valueLabel, children: [[0, maxValue / 2, maxValue].map(function (v) { return (jsxRuntime.jsxs("g", { children: [jsxRuntime.jsx("line", { x1: MARGIN.left, x2: VIEW_WIDTH - MARGIN.right, y1: valueToY(v), y2: valueToY(v), stroke: "#e5e7eb", strokeDasharray: "3 3" }), jsxRuntime.jsx("text", { x: MARGIN.left - 6, y: valueToY(v) + 4, textAnchor: "end", fontSize: 11, fill: COLOR_AXIS, children: fmt(v) })] }, v)); }), groups.map(function (group, i) {
6483
- var centerX = MARGIN.left + columnWidth * (i + 0.5);
6484
- return (jsxRuntime.jsxs("g", { children: [shouldFallback(group, minSampleForViolin) ? (jsxRuntime.jsx(ViolinFallback, { group: group, centerX: centerX, valueToY: valueToY })) : (jsxRuntime.jsx(ViolinBody, { group: group, centerX: centerX, valueToY: valueToY })), jsxRuntime.jsx("text", { x: centerX, y: plotBottom + 16, textAnchor: "middle", fontSize: 12, fill: COLOR_AXIS, children: group.label }), jsxRuntime.jsxs("text", { x: centerX, y: plotBottom + 30, textAnchor: "middle", fontSize: 10, fill: COLOR_AXIS, children: [t.sampleSizeLabel, "=", group.n, group.nExcluded > 0
6504
+ var columnWidth = (VIEW_WIDTH - marginLeft - MARGIN.right) / groups.length;
6505
+ var axisTitle = unit ? "".concat(valueLabel, " (").concat(unit, ")") : valueLabel;
6506
+ /**
6507
+ * Texto del tooltip de columna (TECH-1768): de qué grupo es y cuántos puntos tiene.
6508
+ *
6509
+ * El `nExcluded` va en el MISMO tooltip cuando lo hay: sin él, `n` se leería como "puntos
6510
+ * dibujados" y no lo son — los outliers recortados están contados en `n` pero fuera del lienzo,
6511
+ * y la diferencia importa justo en los grupos con cola larga.
6512
+ */
6513
+ var tooltipFor = function (group) {
6514
+ var base = "".concat(group.label, " \u00B7 ").concat(group.n, " ").concat(t.pointsLabel);
6515
+ return group.nExcluded > 0
6516
+ ? "".concat(base, " \u00B7 \u2212").concat(group.nExcluded, " ").concat(t.outliersLabel)
6517
+ : base;
6518
+ };
6519
+ return (jsxRuntime.jsxs("svg", { viewBox: "0 0 ".concat(VIEW_WIDTH, " ").concat(height), width: "100%", role: "img", "aria-label": valueLabel, children: [[0, maxValue / 2, maxValue].map(function (v) { return (jsxRuntime.jsxs("g", { children: [jsxRuntime.jsx("line", { x1: marginLeft, x2: VIEW_WIDTH - MARGIN.right, y1: valueToY(v), y2: valueToY(v), stroke: "#e5e7eb", strokeDasharray: "3 3" }), jsxRuntime.jsx("text", { x: marginLeft - 6, y: valueToY(v) + 4, textAnchor: "end", fontSize: 11, fill: COLOR_AXIS, children: fmt(v) })] }, v)); }), jsxRuntime.jsx("text", { transform: "translate(12 ".concat(plotTop + plotHeight / 2, ") rotate(-90)"), textAnchor: "middle", fontSize: 12, fill: COLOR_AXIS, children: axisTitle }), groupLabel ? (jsxRuntime.jsx("text", { x: marginLeft + (VIEW_WIDTH - marginLeft - MARGIN.right) / 2, y: height - 6, textAnchor: "middle", fontSize: 12, fill: COLOR_AXIS, children: groupLabel })) : null, groups.map(function (group, i) {
6520
+ var centerX = marginLeft + columnWidth * (i + 0.5);
6521
+ return (jsxRuntime.jsxs("g", { children: [jsxRuntime.jsx("title", { children: tooltipFor(group) }), jsxRuntime.jsx("rect", { x: centerX - columnWidth / 2, y: plotTop, width: columnWidth, height: plotBottom - plotTop + SAMPLE_SIZE_DY + HOVER_PADDING, fill: "transparent", pointerEvents: "all" }), shouldFallback(group, minSampleForViolin) ? (jsxRuntime.jsx(ViolinFallback, { group: group, centerX: centerX, valueToY: valueToY })) : (jsxRuntime.jsx(ViolinBody, { group: group, centerX: centerX, valueToY: valueToY })), jsxRuntime.jsx("text", { x: centerX, y: plotBottom + GROUP_LABEL_DY, textAnchor: "middle", fontSize: 12, fill: COLOR_AXIS, children: group.label }), jsxRuntime.jsxs("text", { x: centerX, y: plotBottom + SAMPLE_SIZE_DY, textAnchor: "middle", fontSize: 10, fill: COLOR_AXIS, children: [t.sampleSizeLabel, "=", group.n, group.nExcluded > 0
6485
6522
  ? " \u00B7 \u2212".concat(group.nExcluded, " ").concat(t.outliersLabel)
6486
6523
  : ""] })] }, group.label));
6487
6524
  })] }));
package/dist/index.esm.js CHANGED
@@ -6438,14 +6438,25 @@ function ViolinFallback(_a) {
6438
6438
  var MARGIN = { top: 24, right: 16, bottom: 40, left: 44 };
6439
6439
  var VIEW_WIDTH = 640;
6440
6440
  var VIOLIN_HALF_WIDTH = 46;
6441
+ /** Espacio extra que reserva cada título de eje cuando se pinta. */
6442
+ var AXIS_TITLE_SPACE = 18;
6443
+ /** Aire sobre el dato para que el bigote p95 no quede pegado a la línea de arriba. */
6444
+ var HEADROOM = 0.05;
6441
6445
  var COLOR_BODY = "#c7d2fe";
6442
6446
  var COLOR_STROKE = "#4338ca";
6443
6447
  var COLOR_MEDIAN = "#1e3a8a";
6444
6448
  var COLOR_AXIS = "#6b7280";
6449
+ /** Desplazamiento vertical del rótulo del grupo bajo el eje X. */
6450
+ var GROUP_LABEL_DY = 16;
6451
+ /** Desplazamiento vertical de la línea `n=` (bajo el rótulo del grupo). */
6452
+ var SAMPLE_SIZE_DY = 30;
6453
+ /** Aire por debajo de la línea `n=` que la superficie de hover también cubre. */
6454
+ var HOVER_PADDING = 4;
6445
6455
  var defaultTranslations$1 = {
6446
6456
  emptyState: "Sin datos de distribución",
6447
6457
  sampleSizeLabel: "n",
6448
6458
  outliersLabel: "outliers",
6459
+ pointsLabel: "puntos",
6449
6460
  };
6450
6461
  function formatTick(value, factor, unit) {
6451
6462
  var scaled = value * factor;
@@ -6463,26 +6474,52 @@ function formatTick(value, factor, unit) {
6463
6474
  * server-side directo en tests.
6464
6475
  */
6465
6476
  function ViolinPlot(_a) {
6466
- var groups = _a.groups, valueLabel = _a.valueLabel, _b = _a.baseUnit, baseUnit = _b === void 0 ? "none" : _b, formatValue = _a.formatValue, _c = _a.height, height = _c === void 0 ? 320 : _c, _d = _a.minSampleForViolin, minSampleForViolin = _d === void 0 ? 20 : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e;
6477
+ var groups = _a.groups, valueLabel = _a.valueLabel, groupLabel = _a.groupLabel, _b = _a.baseUnit, baseUnit = _b === void 0 ? "none" : _b, formatValue = _a.formatValue, _c = _a.height, height = _c === void 0 ? 320 : _c, _d = _a.minSampleForViolin, minSampleForViolin = _d === void 0 ? 20 : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e;
6467
6478
  var t = __assign(__assign({}, defaultTranslations$1), translations);
6468
6479
  if (groups.length === 0) {
6469
6480
  return (jsx("svg", { viewBox: "0 0 ".concat(VIEW_WIDTH, " ").concat(height), width: "100%", role: "img", "aria-label": valueLabel, children: jsx("text", { x: VIEW_WIDTH / 2, y: height / 2, textAnchor: "middle", fill: COLOR_AXIS, children: t.emptyState }) }));
6470
6481
  }
6482
+ var marginLeft = MARGIN.left + (valueLabel ? AXIS_TITLE_SPACE : 0);
6483
+ var marginBottom = MARGIN.bottom + (groupLabel ? AXIS_TITLE_SPACE : 0);
6471
6484
  var plotTop = MARGIN.top;
6472
- var plotBottom = height - MARGIN.bottom;
6485
+ var plotBottom = height - marginBottom;
6473
6486
  var plotHeight = plotBottom - plotTop;
6474
- // Escala Y común a todos los grupos (de 0 al p95 máximo, con margen).
6475
- var maxValue = Math.max.apply(Math, __spreadArray(__spreadArray([], groups.map(function (g) { return g.p95; }), false), [1], false));
6487
+ // Escala Y común a todos los grupos: de 0 al p95 máximo, con aire.
6488
+ //
6489
+ // El suelo NO puede ser un literal en unidad base. Antes era `Math.max(..., 1)`,
6490
+ // que con `baseUnit="d"` fija el techo en 1 día = 86400 s: una distribución de
6491
+ // onboardings de ~5 min (el caso real) se dibujaba entera aplastada contra el 0
6492
+ // y el eje rotulaba "86400s". El único caso que de verdad hay que blindar es la
6493
+ // división por cero, así que el fallback se aplica SOLO si no hay dato ninguno.
6494
+ var dataMax = Math.max.apply(Math, groups.map(function (g) { return g.p95; }));
6495
+ var maxValue = dataMax > 0 ? dataMax * (1 + HEADROOM) : 1;
6476
6496
  var valueToY = function (v) {
6477
6497
  return plotBottom - (v / maxValue) * plotHeight;
6478
6498
  };
6479
- var refMedian = groups.map(function (g) { return g.p50; }).sort(function (a, b) { return a - b; })[Math.floor(groups.length / 2)];
6480
- var _f = pickDisplayUnit(refMedian, baseUnit), unit = _f.unit, factor = _f.factor;
6499
+ // La unidad se elige sobre el MÁXIMO, no sobre la mediana: los tres ticks que se
6500
+ // pintan son 0, max/2 y max, así que es el máximo el que decide qué unidad hace
6501
+ // legibles esos números. Con la mediana, un p50 que redondea a 0 devolvía "s" y
6502
+ // el techo del eje se imprimía como 86400 en vez de 1d.
6503
+ var _f = pickDisplayUnit(maxValue, baseUnit), unit = _f.unit, factor = _f.factor;
6481
6504
  var fmt = formatValue !== null && formatValue !== void 0 ? formatValue : (function (v) { return formatTick(v, factor, unit); });
6482
- var columnWidth = (VIEW_WIDTH - MARGIN.left - MARGIN.right) / groups.length;
6483
- return (jsxs("svg", { viewBox: "0 0 ".concat(VIEW_WIDTH, " ").concat(height), width: "100%", role: "img", "aria-label": valueLabel, children: [[0, maxValue / 2, maxValue].map(function (v) { return (jsxs("g", { children: [jsx("line", { x1: MARGIN.left, x2: VIEW_WIDTH - MARGIN.right, y1: valueToY(v), y2: valueToY(v), stroke: "#e5e7eb", strokeDasharray: "3 3" }), jsx("text", { x: MARGIN.left - 6, y: valueToY(v) + 4, textAnchor: "end", fontSize: 11, fill: COLOR_AXIS, children: fmt(v) })] }, v)); }), groups.map(function (group, i) {
6484
- var centerX = MARGIN.left + columnWidth * (i + 0.5);
6485
- return (jsxs("g", { children: [shouldFallback(group, minSampleForViolin) ? (jsx(ViolinFallback, { group: group, centerX: centerX, valueToY: valueToY })) : (jsx(ViolinBody, { group: group, centerX: centerX, valueToY: valueToY })), jsx("text", { x: centerX, y: plotBottom + 16, textAnchor: "middle", fontSize: 12, fill: COLOR_AXIS, children: group.label }), jsxs("text", { x: centerX, y: plotBottom + 30, textAnchor: "middle", fontSize: 10, fill: COLOR_AXIS, children: [t.sampleSizeLabel, "=", group.n, group.nExcluded > 0
6505
+ var columnWidth = (VIEW_WIDTH - marginLeft - MARGIN.right) / groups.length;
6506
+ var axisTitle = unit ? "".concat(valueLabel, " (").concat(unit, ")") : valueLabel;
6507
+ /**
6508
+ * Texto del tooltip de columna (TECH-1768): de qué grupo es y cuántos puntos tiene.
6509
+ *
6510
+ * El `nExcluded` va en el MISMO tooltip cuando lo hay: sin él, `n` se leería como "puntos
6511
+ * dibujados" y no lo son — los outliers recortados están contados en `n` pero fuera del lienzo,
6512
+ * y la diferencia importa justo en los grupos con cola larga.
6513
+ */
6514
+ var tooltipFor = function (group) {
6515
+ var base = "".concat(group.label, " \u00B7 ").concat(group.n, " ").concat(t.pointsLabel);
6516
+ return group.nExcluded > 0
6517
+ ? "".concat(base, " \u00B7 \u2212").concat(group.nExcluded, " ").concat(t.outliersLabel)
6518
+ : base;
6519
+ };
6520
+ return (jsxs("svg", { viewBox: "0 0 ".concat(VIEW_WIDTH, " ").concat(height), width: "100%", role: "img", "aria-label": valueLabel, children: [[0, maxValue / 2, maxValue].map(function (v) { return (jsxs("g", { children: [jsx("line", { x1: marginLeft, x2: VIEW_WIDTH - MARGIN.right, y1: valueToY(v), y2: valueToY(v), stroke: "#e5e7eb", strokeDasharray: "3 3" }), jsx("text", { x: marginLeft - 6, y: valueToY(v) + 4, textAnchor: "end", fontSize: 11, fill: COLOR_AXIS, children: fmt(v) })] }, v)); }), jsx("text", { transform: "translate(12 ".concat(plotTop + plotHeight / 2, ") rotate(-90)"), textAnchor: "middle", fontSize: 12, fill: COLOR_AXIS, children: axisTitle }), groupLabel ? (jsx("text", { x: marginLeft + (VIEW_WIDTH - marginLeft - MARGIN.right) / 2, y: height - 6, textAnchor: "middle", fontSize: 12, fill: COLOR_AXIS, children: groupLabel })) : null, groups.map(function (group, i) {
6521
+ var centerX = marginLeft + columnWidth * (i + 0.5);
6522
+ return (jsxs("g", { children: [jsx("title", { children: tooltipFor(group) }), jsx("rect", { x: centerX - columnWidth / 2, y: plotTop, width: columnWidth, height: plotBottom - plotTop + SAMPLE_SIZE_DY + HOVER_PADDING, fill: "transparent", pointerEvents: "all" }), shouldFallback(group, minSampleForViolin) ? (jsx(ViolinFallback, { group: group, centerX: centerX, valueToY: valueToY })) : (jsx(ViolinBody, { group: group, centerX: centerX, valueToY: valueToY })), jsx("text", { x: centerX, y: plotBottom + GROUP_LABEL_DY, textAnchor: "middle", fontSize: 12, fill: COLOR_AXIS, children: group.label }), jsxs("text", { x: centerX, y: plotBottom + SAMPLE_SIZE_DY, textAnchor: "middle", fontSize: 10, fill: COLOR_AXIS, children: [t.sampleSizeLabel, "=", group.n, group.nExcluded > 0
6486
6523
  ? " \u00B7 \u2212".concat(group.nExcluded, " ").concat(t.outliersLabel)
6487
6524
  : ""] })] }, group.label));
6488
6525
  })] }));
@@ -9,6 +9,6 @@ import type { ViolinPlotProps } from "./ViolinPlot.types";
9
9
  * `<svg viewBox>` + `width="100%"`. Autocontenido, sin HeroUI, para render
10
10
  * server-side directo en tests.
11
11
  */
12
- export declare function ViolinPlot({ groups, valueLabel, baseUnit, formatValue, height, minSampleForViolin, translations, }: ViolinPlotProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function ViolinPlot({ groups, valueLabel, groupLabel, baseUnit, formatValue, height, minSampleForViolin, translations, }: ViolinPlotProps): import("react/jsx-runtime").JSX.Element;
13
13
  export default ViolinPlot;
14
14
  //# sourceMappingURL=ViolinPlot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViolinPlot.d.ts","sourceRoot":"","sources":["../../../../src/components/violin-plot/ViolinPlot.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEX,eAAe,EAEf,MAAM,oBAAoB,CAAC;AA2B5B;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,EAC1B,MAAM,EACN,UAAU,EACV,QAAiB,EACjB,WAAW,EACX,MAAY,EACZ,kBAAuB,EACvB,YAAiB,GACjB,EAAE,eAAe,2CA4GjB;AA2DD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ViolinPlot.d.ts","sourceRoot":"","sources":["../../../../src/components/violin-plot/ViolinPlot.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEX,eAAe,EAEf,MAAM,oBAAoB,CAAC;AAsC5B;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,EAC1B,MAAM,EACN,UAAU,EACV,UAAU,EACV,QAAiB,EACjB,WAAW,EACX,MAAY,EACZ,kBAAuB,EACvB,YAAiB,GACjB,EAAE,eAAe,2CA2LjB;AA2DD,eAAe,UAAU,CAAC"}
@@ -34,10 +34,20 @@ export interface ViolinPlotTranslations {
34
34
  sampleSizeLabel?: string;
35
35
  /** Sufijo del conteo de outliers excluidos (`· −12 outliers`). */
36
36
  outliersLabel?: string;
37
+ /** Sustantivo del tooltip de columna (`Onboarding · 248 puntos`). */
38
+ pointsLabel?: string;
37
39
  }
38
40
  export interface ViolinPlotProps {
39
41
  groups: ViolinGroup[];
42
+ /**
43
+ * Nombre de la magnitud medida, SIN unidad — se pinta como título del eje Y y
44
+ * el componente le añade la unidad que haya resuelto (`Tiempo de setup (min)`).
45
+ * Escribir la unidad aquí ("Días hasta completar") acaba contradiciendo al eje
46
+ * en cuanto `pickDisplayUnit` elige otra escala.
47
+ */
40
48
  valueLabel: string;
49
+ /** Dimensión por la que se agrupan las columnas (título del eje X, p.ej. "Carril"). */
50
+ groupLabel?: string;
41
51
  baseUnit?: BaseUnit;
42
52
  formatValue?: (value: number) => string;
43
53
  height?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"ViolinPlot.types.d.ts","sourceRoot":"","sources":["../../../../src/components/violin-plot/ViolinPlot.types.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,MAAM,WAAW,SAAS;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACd;AAED,wEAAwE;AACxE,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACtC,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC/B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,sBAAsB,CAAC;CACtC"}
1
+ {"version":3,"file":"ViolinPlot.types.d.ts","sourceRoot":"","sources":["../../../../src/components/violin-plot/ViolinPlot.types.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,MAAM,WAAW,SAAS;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACd;AAED,wEAAwE;AACxE,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACtC,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC/B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,sBAAsB,CAAC;CACtC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beweco/aurora-ui",
3
- "version": "0.6.64",
3
+ "version": "0.6.66",
4
4
  "description": "Bewe Aurora UI Component Library",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",