@vector-business-services/cristal-ds-web 0.23.0 → 0.25.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.
package/dist/index.cjs CHANGED
@@ -39,7 +39,7 @@ var datatable = require('primereact/datatable');
39
39
  var column = require('primereact/column');
40
40
  var toast = require('primereact/toast');
41
41
 
42
- // src/components/Accordion/Accordion.tsx
42
+ // src/components/core/Accordion/Accordion.tsx
43
43
  function AccordionTab(_props) {
44
44
  return null;
45
45
  }
@@ -605,6 +605,26 @@ var comAlfa = (cor, alfa) => {
605
605
  const [r = 0, g = 0, b = 0] = normal.match(/[\d.]+/g)?.map(Number) ?? [];
606
606
  return `rgba(${r}, ${g}, ${b}, ${alfa})`;
607
607
  };
608
+ var senoide = {
609
+ id: "crSenoide",
610
+ beforeDatasetsDraw(chart) {
611
+ chart.data.datasets.forEach((_, indice) => {
612
+ const meta = chart.getDatasetMeta(indice);
613
+ if (meta.type !== "line" || !meta.dataset || !chart.isDatasetVisible(indice)) return;
614
+ const linha = meta.dataset;
615
+ linha.updateControlPoints(chart.chartArea, meta.iScale?.axis);
616
+ const pontos = linha.points;
617
+ pontos.forEach((ponto, i) => {
618
+ const antes = pontos[i - 1];
619
+ const depois = pontos[i + 1];
620
+ ponto.cp1x = antes && !antes.skip ? (antes.x + ponto.x) / 2 : ponto.x;
621
+ ponto.cp1y = ponto.y;
622
+ ponto.cp2x = depois && !depois.skip ? (ponto.x + depois.x) / 2 : ponto.x;
623
+ ponto.cp2y = ponto.y;
624
+ });
625
+ });
626
+ }
627
+ };
608
628
  var cruz = (cor) => ({
609
629
  id: "crCruz",
610
630
  afterDatasetsDraw(chart) {
@@ -621,59 +641,7 @@ var cruz = (cor) => ({
621
641
  ctx.restore();
622
642
  }
623
643
  });
624
- var tracar = (ctx, pontos) => {
625
- pontos.forEach((ponto, i) => {
626
- const antes = pontos[i - 1];
627
- if (!antes) return ctx.moveTo(ponto.x, ponto.y);
628
- const meio = (antes.x + ponto.x) / 2;
629
- ctx.bezierCurveTo(meio, antes.y, meio, ponto.y, ponto.x, ponto.y);
630
- });
631
- };
632
- var trechos = (pontos) => pontos.reduce(
633
- (lista, ponto) => {
634
- if (ponto.skip) lista.push([]);
635
- else lista[lista.length - 1].push(ponto);
636
- return lista;
637
- },
638
- [[]]
639
- ).filter((trecho) => trecho.length > 0);
640
- var curvaDoFigma = {
641
- id: "crCurva",
642
- beforeDatasetsDraw(chart) {
643
- const { ctx, chartArea } = chart;
644
- const series = chart.data.datasets.map((dataset, indice) => ({ dataset, meta: chart.getDatasetMeta(indice), indice })).filter(({ indice }) => chart.isDatasetVisible(indice)).reverse();
645
- ctx.save();
646
- ctx.beginPath();
647
- ctx.rect(chartArea.left, chartArea.top, chartArea.width, chartArea.height);
648
- ctx.clip();
649
- series.forEach(({ dataset, meta }) => {
650
- const cor = String(dataset.borderColor);
651
- const base = Math.min(meta.yScale?.getPixelForValue(0) ?? chartArea.bottom, chartArea.bottom);
652
- const degrade = ctx.createLinearGradient(0, chartArea.top, 0, chartArea.bottom);
653
- degrade.addColorStop(0, comAlfa(cor, 0.1));
654
- degrade.addColorStop(1, comAlfa(cor, 0.02));
655
- trechos(meta.data).forEach((trecho) => {
656
- ctx.beginPath();
657
- tracar(ctx, trecho);
658
- ctx.lineTo(trecho[trecho.length - 1].x, base);
659
- ctx.lineTo(trecho[0].x, base);
660
- ctx.closePath();
661
- ctx.fillStyle = degrade;
662
- ctx.fill();
663
- });
664
- });
665
- series.forEach(({ dataset, meta }) => {
666
- ctx.strokeStyle = String(dataset.borderColor);
667
- ctx.lineWidth = 2;
668
- trechos(meta.data).forEach((trecho) => {
669
- ctx.beginPath();
670
- tracar(ctx, trecho);
671
- ctx.stroke();
672
- });
673
- });
674
- ctx.restore();
675
- }
676
- };
644
+ var semMovimento = () => typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
677
645
  var formatar = (eixo, valor) => eixo?.format ? eixo.format(valor) : String(valor);
678
646
  var Chart = react.forwardRef(function Chart2({
679
647
  type = "line",
@@ -687,6 +655,7 @@ var Chart = react.forwardRef(function Chart2({
687
655
  helpLabel = "Ajuda",
688
656
  actions,
689
657
  height = 266,
658
+ legend,
690
659
  id,
691
660
  className,
692
661
  ...props
@@ -725,8 +694,19 @@ var Chart = react.forwardRef(function Chart2({
725
694
  data: s.data,
726
695
  yAxisID: s.axis === "right" ? "y2" : "y",
727
696
  borderColor: cor,
728
- // A linha e a área são desenhadas pelo plugin curvaDoFigma.
729
- showLine: false,
697
+ borderWidth: 2,
698
+ // Liga a curva (Béziers) do Chart.js; os controles viram os da senoide (plugin senoide).
699
+ cubicInterpolationMode: "monotone",
700
+ // Área até o zero, em degradê da cor da série: 10% em cima e 2% embaixo.
701
+ fill: "origin",
702
+ backgroundColor: ({ chart }) => {
703
+ const area = chart.chartArea;
704
+ if (!area) return comAlfa(cor, 0.1);
705
+ const degrade = chart.ctx.createLinearGradient(0, area.top, 0, area.bottom);
706
+ degrade.addColorStop(0, comAlfa(cor, 0.1));
707
+ degrade.addColorStop(1, comAlfa(cor, 0.02));
708
+ return degrade;
709
+ },
730
710
  pointRadius: 0,
731
711
  pointHoverRadius: 4,
732
712
  pointHoverBorderWidth: 2,
@@ -736,6 +716,18 @@ var Chart = react.forwardRef(function Chart2({
736
716
  })
737
717
  };
738
718
  }, [tema, labels, series, type, stacked]);
719
+ const ultimoQuadro = react.useRef(0);
720
+ const marcarAnimando = react.useCallback(() => {
721
+ ultimoQuadro.current = performance.now();
722
+ raiz.current?.setAttribute("data-cr-animando", "");
723
+ }, []);
724
+ const desmarcarAnimando = react.useCallback(() => {
725
+ const tentar = () => {
726
+ if (performance.now() - ultimoQuadro.current < 100) setTimeout(tentar, 50);
727
+ else raiz.current?.removeAttribute("data-cr-animando");
728
+ };
729
+ setTimeout(tentar, 50);
730
+ }, []);
739
731
  const options = react.useMemo(() => {
740
732
  if (!tema) return void 0;
741
733
  const fonte = { ...tema.fonte, weight: tema.fonte.weight };
@@ -758,7 +750,9 @@ var Chart = react.forwardRef(function Chart2({
758
750
  return {
759
751
  responsive: true,
760
752
  maintainAspectRatio: false,
761
- animation: false,
753
+ // A animação do Chart.js (a do p-chart), sem ela com prefers-reduced-motion. Enquanto anima, a
754
+ // raiz leva data-cr-animando (os testes de imagem esperam o fim).
755
+ animation: semMovimento() ? false : { onProgress: marcarAnimando, onComplete: desmarcarAnimando },
762
756
  interaction: { mode: "index", intersect: false },
763
757
  layout: { padding: { top: 8 } },
764
758
  scales: {
@@ -796,9 +790,14 @@ var Chart = react.forwardRef(function Chart2({
796
790
  }
797
791
  }
798
792
  };
799
- }, [tema, yAxis, y2Axis, temDireita, series, type, stacked]);
793
+ }, [tema, yAxis, y2Axis, temDireita, series, type, stacked, marcarAnimando, desmarcarAnimando]);
794
+ react.useLayoutEffect(() => {
795
+ if (data && options && !semMovimento()) raiz.current?.setAttribute("data-cr-animando", "");
796
+ }, [data, options]);
800
797
  const card = Boolean(title || actions);
801
- const classes2 = ["cr-chart", card && "cr-chart--card", className].filter(Boolean).join(" ");
798
+ const preencher = height === "100%";
799
+ const comLegenda = legend ?? series.length > 1;
800
+ const classes2 = ["cr-chart", card && "cr-chart--card", preencher && "cr-chart--fill", className].filter(Boolean).join(" ");
802
801
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props, ref: raiz, id, className: classes2, children: [
803
802
  card && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cr-chart__header", children: [
804
803
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cr-chart__title-row", children: [
@@ -811,13 +810,13 @@ var Chart = react.forwardRef(function Chart2({
811
810
  actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cr-chart__actions", children: actions })
812
811
  ] }),
813
812
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cr-chart__body", children: [
814
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cr-chart__plot", style: { height }, children: data && options && /* @__PURE__ */ jsxRuntime.jsx(
813
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cr-chart__plot", style: preencher ? void 0 : { height }, children: data && options && /* @__PURE__ */ jsxRuntime.jsx(
815
814
  chart.Chart,
816
815
  {
817
816
  type,
818
817
  data,
819
818
  options,
820
- plugins: type === "line" ? [curvaDoFigma, cruz(tema.cruz)] : [],
819
+ plugins: type === "line" ? [senoide, cruz(tema.cruz)] : [],
821
820
  width: "100%",
822
821
  height: "100%",
823
822
  pt: {
@@ -830,7 +829,7 @@ var Chart = react.forwardRef(function Chart2({
830
829
  },
831
830
  type
832
831
  ) }),
833
- series.length > 1 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "cr-chart__legend", children: series.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "cr-chart__legend-item", children: [
832
+ comLegenda && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "cr-chart__legend", children: series.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "cr-chart__legend-item", children: [
834
833
  /* @__PURE__ */ jsxRuntime.jsx(
835
834
  "span",
836
835
  {
@@ -1135,7 +1134,7 @@ var ContextMenu = react.forwardRef(function ContextMenu2({
1135
1134
  }
1136
1135
  );
1137
1136
  });
1138
- var Input = react.forwardRef(function Input2({
1137
+ var InputText = react.forwardRef(function InputText2({
1139
1138
  variant = "outline",
1140
1139
  size = "large",
1141
1140
  label,
@@ -1191,7 +1190,8 @@ var Input = react.forwardRef(function Input2({
1191
1190
  ] })
1192
1191
  ] });
1193
1192
  });
1194
- var Radio = react.forwardRef(function Radio2({
1193
+ var Input = InputText;
1194
+ var RadioButton = react.forwardRef(function RadioButton2({
1195
1195
  label,
1196
1196
  showLabel = true,
1197
1197
  labelSize = "default",
@@ -1246,8 +1246,9 @@ var Radio = react.forwardRef(function Radio2({
1246
1246
  )
1247
1247
  ] });
1248
1248
  });
1249
+ var Radio = RadioButton;
1249
1250
 
1250
- // src/components/Calendar/periodos.ts
1251
+ // src/components/core/Calendar/periodos.ts
1251
1252
  var dia = (ano, mes, numero) => new Date(ano, mes, numero);
1252
1253
  var semHora = (data) => dia(data.getFullYear(), data.getMonth(), data.getDate());
1253
1254
  var menos = (data, dias) => dia(data.getFullYear(), data.getMonth(), data.getDate() - dias);
@@ -1318,7 +1319,7 @@ function ListaDePeriodos({
1318
1319
  role: "radiogroup",
1319
1320
  "aria-label": "Per\xEDodos",
1320
1321
  children: periods.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
1321
- Radio,
1322
+ RadioButton,
1322
1323
  {
1323
1324
  className: "cr-data-picker__period",
1324
1325
  name: grupo,
@@ -1360,7 +1361,7 @@ function CamposDoPeriodo({
1360
1361
  };
1361
1362
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cr-data-picker__inputs", children: [
1362
1363
  /* @__PURE__ */ jsxRuntime.jsx(
1363
- Input,
1364
+ InputText,
1364
1365
  {
1365
1366
  size: "medium",
1366
1367
  "aria-label": "Data inicial",
@@ -1371,7 +1372,7 @@ function CamposDoPeriodo({
1371
1372
  ),
1372
1373
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cr-data-picker__dash", "aria-hidden": "true", children: "-" }),
1373
1374
  /* @__PURE__ */ jsxRuntime.jsx(
1374
- Input,
1375
+ InputText,
1375
1376
  {
1376
1377
  size: "medium",
1377
1378
  "aria-label": "Data final",
@@ -2041,10 +2042,10 @@ var Drawer = react.forwardRef(function Drawer2({
2041
2042
  );
2042
2043
  });
2043
2044
 
2044
- // src/components/Menubar/assets/vector-logo-simbolo.svg
2045
+ // src/components/core/Menubar/assets/vector-logo-simbolo.svg
2045
2046
  var vector_logo_simbolo_default = 'data:image/svg+xml,<svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="42.7061" height="20" viewBox="0 0 42.7061 20" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Grupo 2380">%0A<path id="Caminho 1049" d="M26.8782 10.21C26.8393 10.1525 26.7869 10.1055 26.7255 10.0731C26.6642 10.0408 26.5958 10.024 26.5264 10.0244H4.21626C4.14666 10.024 4.07803 10.0408 4.0165 10.0733C3.95497 10.1059 3.90244 10.1531 3.8636 10.2109C3.82535 10.2676 3.80224 10.3333 3.79648 10.4015C3.79072 10.4697 3.80251 10.5383 3.8307 10.6007L7.35895 19.7545C7.39283 19.8281 7.44722 19.8905 7.51559 19.934C7.58397 19.9776 7.66345 20.0005 7.74451 20C7.82641 19.9998 7.90647 19.9758 7.97493 19.9308C8.0434 19.8859 8.09731 19.822 8.13007 19.7469L11.5604 13.47H25.3511C25.4325 13.4705 25.5123 13.4474 25.5809 13.4035C25.6494 13.3596 25.7038 13.2969 25.7375 13.2228L26.9086 10.5964C26.9365 10.5347 26.9484 10.4669 26.9431 10.3993C26.9378 10.3318 26.9154 10.2666 26.8782 10.21V10.21Z" fill="%23C1BFBF"/>%0A<g id="Grupo 2378">%0A<path id="Caminho 1050" d="M26.3926 6.06543L24.0666 19.1424C24.0588 19.2502 24.0736 19.3585 24.1103 19.4602C24.1469 19.5619 24.2045 19.6549 24.2792 19.7329C24.3554 19.813 24.447 19.8767 24.5485 19.9202C24.65 19.9637 24.7593 19.9861 24.8698 19.986H30.4229L29.2578 13.5446L26.3926 6.06543Z" fill="%231545DE"/>%0A<g id="Grupo 2377">%0A<path id="Caminho 1051" d="M42.2783 16.0921H42.0598C42.0303 11.9033 41.8911 10.7668 41.2541 10.086C40.167 9.29536 38.9793 8.65329 37.7225 8.17676C37.1378 7.91016 36.4755 7.60812 36.3684 7.52881C36.1102 7.27149 34.8768 5.05179 34.2145 3.85884C33.9378 3.36107 33.6956 2.92488 33.5311 2.63887C33.166 1.80107 32.5487 1.09795 31.7653 0.627372C30.9818 0.15679 30.0712 -0.0578392 29.16 0.0133599H21.1072C21.036 0.0134652 20.966 0.0313585 20.9036 0.0653944C20.8411 0.0994303 20.7881 0.148532 20.7494 0.208251C20.7106 0.268417 20.6872 0.337237 20.6813 0.408613C20.6754 0.479989 20.6872 0.551716 20.7157 0.617433L28.9955 19.7283C29.0285 19.8051 29.0832 19.8705 29.1529 19.9166C29.2226 19.9626 29.3043 19.9872 29.3878 19.9873H30.9849C31.0972 19.9869 31.2048 19.9425 31.2848 19.8637C31.3648 19.7848 31.4107 19.6778 31.4126 19.5655C31.4126 18.581 31.8037 17.6368 32.4999 16.9406C33.1961 16.2444 34.1403 15.8533 35.1248 15.8533C36.1093 15.8533 37.0535 16.2444 37.7497 16.9406C38.4459 17.6368 38.837 18.581 38.837 19.5655C38.839 19.6778 38.8848 19.7848 38.9648 19.8637C39.0447 19.9425 39.1524 19.9869 39.2647 19.9873H41.6396C41.6961 19.9871 41.752 19.9758 41.8041 19.9539C41.8561 19.9321 41.9034 19.9002 41.9431 19.8601C41.9828 19.82 42.0143 19.7724 42.0356 19.7201C42.0569 19.6678 42.0677 19.6119 42.0674 19.5554C42.0674 19.2179 42.0674 18.9015 42.0674 18.5911H42.2783C42.3923 18.5904 42.5013 18.5445 42.5815 18.4636C42.6617 18.3826 42.7065 18.2731 42.7061 18.1591V16.5241C42.7065 16.4101 42.6617 16.3006 42.5815 16.2196C42.5013 16.1386 42.3923 16.0928 42.2783 16.0921V16.0921ZM31.6058 8.33621H27.9359C27.7958 8.33732 27.6591 8.29246 27.547 8.20849C27.4348 8.12452 27.3533 8.00609 27.3149 7.87135L26.0545 3.91029C26.0293 3.8176 26.0262 3.72028 26.0455 3.62619C26.0649 3.5321 26.1061 3.44388 26.1658 3.36866C26.2264 3.29247 26.3034 3.23091 26.391 3.18856C26.4786 3.1462 26.5747 3.12414 26.672 3.124H28.9305C29.2861 3.13975 29.6349 3.22716 29.9558 3.38098C30.2768 3.53479 30.5634 3.75184 30.7984 4.01912C31.7475 5.02307 32.2662 6.35841 32.2437 7.73973C32.2339 7.90191 32.1624 8.05419 32.0437 8.16517C31.925 8.27615 31.7683 8.33736 31.6058 8.33621V8.33621Z" fill="%231545DE"/>%0A</g>%0A</g>%0A<path id="Caminho 1052" d="M18.318 0.208784C18.2779 0.150057 18.224 0.102045 18.1611 0.0689531C18.0981 0.0358617 18.028 0.0186933 17.9569 0.0189526H0.432107C0.361515 0.0187583 0.291932 0.0356991 0.229331 0.0683223C0.166729 0.100945 0.112985 0.148276 0.0727059 0.206248C0.0332923 0.263519 0.00898875 0.329827 0.00205642 0.399002C-0.00487591 0.468178 0.00578389 0.537987 0.0330492 0.601939L1.0404 3.29747C1.07434 3.3749 1.13023 3.44069 1.20115 3.48672C1.27206 3.53275 1.35491 3.55701 1.43945 3.55648H16.5134C16.5968 3.55702 16.6787 3.53341 16.749 3.4885C16.8194 3.44359 16.8753 3.37931 16.9099 3.30338L18.3526 0.607835C18.3813 0.543894 18.3933 0.473655 18.3872 0.403804C18.3812 0.333954 18.3573 0.266823 18.318 0.208784V0.208784Z" fill="%23C1BFBF"/>%0A<path id="Caminho 1053" d="M20.2107 5.18251C20.1706 5.12378 20.1167 5.07577 20.0538 5.04268C19.9908 5.00959 19.9207 4.99242 19.8496 4.99268H2.32482C2.25423 4.99248 2.18465 5.00943 2.12205 5.04205C2.05945 5.07467 2.0057 5.122 1.96542 5.17997C1.92601 5.23725 1.9017 5.30355 1.89477 5.37273C1.88784 5.4419 1.8985 5.51171 1.92577 5.57567L2.93311 8.2712C2.96706 8.34863 3.02294 8.41442 3.09386 8.46045C3.16478 8.50648 3.24763 8.53073 3.33217 8.53021H18.4061C18.4896 8.53075 18.5714 8.50714 18.6417 8.46224C18.7121 8.41733 18.768 8.35304 18.8026 8.27711L20.2453 5.58157C20.274 5.51761 20.2859 5.44738 20.2798 5.37754C20.2738 5.30771 20.25 5.24058 20.2107 5.18251V5.18251Z" fill="%23C1BFBF"/>%0A</g>%0A</svg>%0A';
2046
2047
 
2047
- // src/components/Menubar/assets/vector-logo-texto.svg
2048
+ // src/components/core/Menubar/assets/vector-logo-texto.svg
2048
2049
  var vector_logo_texto_default = 'data:image/svg+xml,<svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="67.2933" height="11.6178" viewBox="0 0 67.2933 11.6178" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Grupo 2379">%0A<path id="Caminho 1054" d="M11.6087 0.134307H9.60498C9.52028 0.133804 9.43705 0.156496 9.36433 0.199923C9.2916 0.243349 9.23216 0.305859 9.19242 0.380666L5.48026 7.51223L2.91718 0.434657C2.884 0.345943 2.82437 0.269565 2.74636 0.215847C2.66835 0.162129 2.57571 0.133662 2.481 0.134307H0.46293C0.388867 0.134127 0.315824 0.151553 0.249817 0.185144C0.183809 0.218735 0.126728 0.267531 0.0832793 0.327511C0.0406943 0.386523 0.0133941 0.455166 0.00382441 0.527307C-0.00574529 0.599448 0.00271177 0.672843 0.0284384 0.740916L3.97515 11.189C4.00915 11.2764 4.06889 11.3514 4.14648 11.4042C4.22406 11.4569 4.31583 11.4848 4.40964 11.4843H5.99153C6.07528 11.4848 6.15762 11.4626 6.22981 11.4201C6.302 11.3777 6.36135 11.3164 6.40155 11.243L12.0196 0.794907C12.0565 0.726527 12.0746 0.649585 12.0721 0.571926C12.0695 0.494268 12.0465 0.418666 12.0052 0.35282C11.9632 0.285622 11.9048 0.230275 11.8354 0.192031C11.766 0.153787 11.6879 0.133914 11.6087 0.134307V0.134307Z" fill="%231545DE"/>%0A<path id="Caminho 1055" d="M21.0679 0.134327H13.8967C13.7816 0.13299 13.6702 0.175047 13.5847 0.252119C13.4992 0.32919 13.4458 0.435623 13.4352 0.550255L12.6067 10.9983C12.6025 11.06 12.6112 11.1219 12.6322 11.18C12.6533 11.2381 12.6863 11.2912 12.7291 11.3358C12.7727 11.3813 12.8251 11.4176 12.8831 11.4424C12.941 11.4671 13.0035 11.48 13.0665 11.4801H20.2217C20.3367 11.4814 20.448 11.4395 20.5335 11.3626C20.619 11.2857 20.6724 11.1794 20.6832 11.065L20.8039 9.56744C20.8082 9.50584 20.7996 9.44401 20.7787 9.3859C20.7578 9.32779 20.725 9.27468 20.6824 9.22998C20.6388 9.18429 20.5864 9.14789 20.5285 9.12295C20.4705 9.09801 20.408 9.08506 20.3449 9.08487H15.5874L15.7562 6.91999H20.2833C20.3975 6.92123 20.508 6.8798 20.5932 6.8038C20.6784 6.7278 20.7322 6.6227 20.744 6.50913L20.8798 5.01246C20.8853 4.94987 20.8775 4.88681 20.8569 4.82747C20.8362 4.76813 20.8032 4.71385 20.76 4.66822C20.7165 4.62238 20.6642 4.58584 20.6062 4.56076C20.5482 4.53567 20.4857 4.52256 20.4225 4.52226H15.951L16.1198 2.53289H20.965C21.081 2.53391 21.1931 2.49097 21.2787 2.41271C21.3643 2.33445 21.4171 2.22667 21.4265 2.11106L21.532 0.614377C21.5361 0.552648 21.5273 0.490734 21.506 0.432617C21.4848 0.374501 21.4517 0.32147 21.4088 0.276913C21.3646 0.231312 21.3116 0.195152 21.253 0.170643C21.1944 0.146134 21.1314 0.133782 21.0679 0.134327V0.134327Z" fill="%231545DE"/>%0A<path id="Caminho 1056" d="M31 0.340251C30.278 0.110001 29.5238 -0.00391997 28.766 0.00277361C27.6815 -0.0198344 26.6104 0.244753 25.6613 0.769683C24.7715 1.28042 24.0508 2.04067 23.5883 2.95648C23.093 3.96093 22.8461 5.0697 22.8687 6.18944C22.8465 7.17972 23.0685 8.16023 23.5149 9.04443C23.9372 9.85411 24.5914 10.5194 25.3938 10.9553C26.2625 11.4092 27.2318 11.6359 28.2117 11.6143C28.9603 11.618 29.7044 11.4977 30.4137 11.2582C31.0655 11.0477 31.6659 10.7028 32.1761 10.2458C32.2418 10.1853 32.2878 10.1065 32.308 10.0195C32.3281 9.93247 32.3216 9.84141 32.2892 9.75819L31.7467 8.37877C31.7206 8.31332 31.6798 8.25475 31.6274 8.20764C31.575 8.16052 31.5125 8.12613 31.4446 8.10712C31.3762 8.08742 31.3043 8.08348 31.2341 8.09561C31.164 8.10774 31.0975 8.1356 31.0397 8.17712C30.2655 8.78769 29.3176 9.13686 28.3323 9.17435C27.9824 9.20028 27.631 9.1482 27.3036 9.02185C26.9762 8.89551 26.6809 8.69805 26.4391 8.44373C25.9488 7.80521 25.7087 7.00947 25.7642 6.2063C25.7036 5.20322 25.9951 4.21047 26.5885 3.39941C26.8615 3.07737 27.206 2.82346 27.5944 2.65782C27.9828 2.49218 28.4044 2.41938 28.8259 2.44521C29.2949 2.4376 29.7616 2.51419 30.2036 2.67132C30.6571 2.8522 31.0778 3.10644 31.4489 3.42386C31.5019 3.46741 31.5638 3.49883 31.6303 3.51588C31.6967 3.53294 31.7661 3.53521 31.8336 3.52258C31.9005 3.51062 31.964 3.484 32.0194 3.44462C32.0748 3.40523 32.1209 3.35407 32.1542 3.2948L32.9219 1.91538C32.9714 1.82622 32.9886 1.72272 32.9706 1.62236C32.9526 1.52199 32.9006 1.4309 32.8232 1.36446C32.29 0.904688 31.6701 0.556434 31 0.340251V0.340251Z" fill="%231545DE"/>%0A<path id="Caminho 1057" d="M43.496 0.134326H34.5337C34.4184 0.133007 34.3069 0.17518 34.2214 0.252427C34.1359 0.329674 34.0826 0.436321 34.0722 0.551104L33.9524 2.10683C33.948 2.16844 33.9566 2.23028 33.9775 2.28839C33.9984 2.3465 34.0313 2.39961 34.0739 2.44431C34.1176 2.48977 34.17 2.52596 34.2279 2.55075C34.2859 2.57553 34.3483 2.58839 34.4113 2.58857H37.4199L36.7365 10.995C36.7322 11.0566 36.7408 11.1184 36.7617 11.1765C36.7826 11.2346 36.8154 11.2877 36.858 11.3324C36.9016 11.3781 36.9539 11.4145 37.0119 11.4394C37.0699 11.4644 37.1323 11.4773 37.1955 11.4775H39.1536C39.2686 11.4789 39.3799 11.4369 39.4654 11.36C39.5509 11.2831 39.6043 11.1769 39.6151 11.0624L40.3044 2.58436H43.3712C43.4864 2.58568 43.5979 2.54351 43.6834 2.46626C43.769 2.38901 43.8223 2.28237 43.8326 2.16758L43.9533 0.61269C43.9577 0.551003 43.9492 0.489075 43.9281 0.43093C43.907 0.372785 43.8739 0.319733 43.831 0.275226C43.7874 0.23057 43.7353 0.195098 43.6777 0.170899C43.6202 0.146701 43.5584 0.13426 43.496 0.134326V0.134326Z" fill="%231545DE"/>%0A<path id="Caminho 1058" d="M52.8011 0.658757C51.9071 0.20483 50.9147 -0.020953 49.9123 0.00152876C48.8644 -0.0192159 47.8313 0.250615 46.9274 0.781093C46.0658 1.3059 45.3753 2.06972 44.9397 2.9797C44.4672 3.98275 44.2325 5.08131 44.2538 6.18988C44.2299 7.18681 44.4586 8.17357 44.9186 9.05837C45.3575 9.86926 46.0281 10.531 46.8447 10.9592C47.7334 11.4119 48.7203 11.6377 49.7174 11.6164C50.7653 11.6371 51.7984 11.3673 52.7023 10.8368C53.5641 10.3119 54.2548 9.54815 54.6909 8.63823C55.1632 7.63481 55.3979 6.53603 55.3768 5.42721C55.4011 4.43132 55.1757 3.44519 54.7213 2.55871C54.2858 1.74748 53.6169 1.08562 52.8011 0.658757V0.658757ZM51.7279 8.25772C51.4878 8.53578 51.1939 8.76241 50.864 8.92397C50.5341 9.08553 50.1748 9.17871 49.808 9.19786C49.4411 9.21702 49.0741 9.16176 48.7292 9.03543C48.3842 8.9091 48.0683 8.71429 47.8006 8.46274C47.3076 7.81711 47.0676 7.0136 47.1257 6.20337C47.0653 5.19659 47.3397 4.19813 47.9061 3.36357C48.1444 3.0841 48.4371 2.85605 48.7663 2.69329C49.0955 2.53052 49.4545 2.43646 49.8212 2.41681C50.188 2.39715 50.5549 2.45232 50.8997 2.57897C51.2444 2.70562 51.5598 2.9011 51.8266 3.1535C52.3262 3.80101 52.5701 4.60974 52.5117 5.42551C52.5718 6.43039 52.2961 7.42673 51.7279 8.25772V8.25772Z" fill="%231545DE"/>%0A<path id="Caminho 1059" d="M65.9858 7.71183C65.8704 7.3155 65.6767 6.94631 65.4163 6.62603V6.62603L65.3876 6.59313C65.8509 6.39138 66.2587 6.08085 66.5764 5.68787C67.0671 5.04049 67.3194 4.24369 67.291 3.43187C67.3091 2.97247 67.2219 2.51501 67.0359 2.09457C66.8498 1.67412 66.57 1.30185 66.2178 1.00631C65.3949 0.385614 64.3785 0.0768237 63.3493 0.134803H58.5893C58.4742 0.133467 58.3628 0.175511 58.2773 0.252582C58.1918 0.329654 58.1384 0.4361 58.1278 0.550731L57.296 10.998C57.2917 11.0596 57.3004 11.1215 57.3215 11.1796C57.3426 11.2377 57.3755 11.2908 57.4183 11.3354C57.4619 11.381 57.5143 11.4172 57.5723 11.442C57.6303 11.4668 57.6927 11.4796 57.7558 11.4797H59.6836C59.7987 11.4812 59.9102 11.4392 59.9958 11.3621C60.0813 11.285 60.1346 11.1785 60.1451 11.0638L60.4581 7.13644H61.8974C62.1696 7.12269 62.4415 7.17027 62.6929 7.27565C62.7678 7.31937 62.8329 7.37804 62.8842 7.448C62.9354 7.51796 62.9717 7.59771 62.9908 7.6823L64.0757 11.1599C64.1059 11.2534 64.1651 11.3349 64.2448 11.3924C64.3245 11.4499 64.4204 11.4805 64.5187 11.4797H66.5764C66.6484 11.4799 66.7195 11.4635 66.7841 11.4316C66.8486 11.3996 66.9049 11.3532 66.9484 11.2958C66.9915 11.2395 67.0203 11.1737 67.0324 11.1039C67.0444 11.0341 67.0394 10.9624 67.0176 10.895L65.9858 7.71183ZM62.8786 4.77079H60.6378L60.8208 2.50215H63.1342C64.3584 2.50215 64.5237 3.02353 64.5237 3.53311C64.5288 4.14562 64.333 4.77079 62.8828 4.77079H62.8786Z" fill="%231545DE"/>%0A</g>%0A</svg>%0A';
2049
2050
  function VectorLogo() {
2050
2051
  return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "cr-menubar__logo", role: "img", "aria-label": "Vector", children: [
@@ -2420,7 +2421,7 @@ var Message = react.forwardRef(function Message2({ type = "info", children, show
2420
2421
  }
2421
2422
  );
2422
2423
  });
2423
- var Modal = react.forwardRef(function Modal2({
2424
+ var Dialog = react.forwardRef(function Dialog2({
2424
2425
  visible,
2425
2426
  onHide,
2426
2427
  dismissableMask = true,
@@ -2474,7 +2475,7 @@ var Modal = react.forwardRef(function Modal2({
2474
2475
  "aria-labelledby": titleId,
2475
2476
  "aria-describedby": void 0
2476
2477
  },
2477
- // Entrada e saída do tema do Prime (p-dialog, Modal.css). No unstyled o Prime não põe
2478
+ // Entrada e saída do tema do Prime (p-dialog, Dialog.css). No unstyled o Prime não põe
2478
2479
  // classes na transição; o tipo exige o addEndListener do react-transition-group.
2479
2480
  transition: {
2480
2481
  classNames: {
@@ -2529,6 +2530,7 @@ var Modal = react.forwardRef(function Modal2({
2529
2530
  }
2530
2531
  );
2531
2532
  });
2533
+ var Modal = Dialog;
2532
2534
  var MultiSelect = react.forwardRef(function MultiSelect2({
2533
2535
  variant = "outline",
2534
2536
  size = "large",
@@ -3091,59 +3093,58 @@ var ScrollPanel = react.forwardRef(function ScrollPanel2({
3091
3093
  };
3092
3094
  return /* @__PURE__ */ jsxRuntime.jsx(scrollpanel.ScrollPanel, { ...props, unstyled: true, ref: primeRef, id, pt, children });
3093
3095
  });
3094
- var SegmentControl = react.forwardRef(
3095
- function SegmentControl2({
3096
- options,
3097
- value,
3098
- onChange,
3099
- variant = "primary",
3100
- "aria-label": ariaLabel,
3101
- "aria-labelledby": ariaLabelledBy,
3102
- disabled,
3103
- id,
3104
- className,
3105
- ...props
3106
- }, ref) {
3107
- const primeRef = react.useRef(null);
3108
- react.useImperativeHandle(ref, () => primeRef.current?.getElement());
3109
- const classes2 = ["cr-segment", `cr-segment--${variant}`, className].filter(Boolean).join(" ");
3110
- return /* @__PURE__ */ jsxRuntime.jsx(
3111
- selectbutton.SelectButton,
3112
- {
3113
- ...props,
3114
- unstyled: true,
3115
- ref: primeRef,
3116
- id,
3117
- options,
3118
- optionLabel: "label",
3119
- optionValue: "value",
3120
- optionDisabled: "disabled",
3121
- value,
3122
- onChange: (event) => {
3123
- if (event.value != null) onChange?.(event.value);
3124
- },
3125
- allowEmpty: false,
3126
- disabled,
3127
- "aria-label": ariaLabel,
3128
- "aria-labelledby": ariaLabelledBy,
3129
- itemTemplate: (option) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3130
- option.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cr-segment__icon", "aria-hidden": "true", children: option.icon }),
3131
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cr-segment__label", children: option.label })
3132
- ] }),
3133
- pt: {
3134
- root: { className: classes2 },
3135
- button: {
3136
- className: "cr-segment__item",
3137
- // O Prime só ativa com a barra de espaço; um role=button responde também ao Enter.
3138
- onKeyDown: (event) => {
3139
- if (event.key === "Enter") event.currentTarget.click();
3140
- }
3096
+ var SelectButton = react.forwardRef(function SelectButton2({
3097
+ options,
3098
+ value,
3099
+ onChange,
3100
+ variant = "primary",
3101
+ "aria-label": ariaLabel,
3102
+ "aria-labelledby": ariaLabelledBy,
3103
+ disabled,
3104
+ id,
3105
+ className,
3106
+ ...props
3107
+ }, ref) {
3108
+ const primeRef = react.useRef(null);
3109
+ react.useImperativeHandle(ref, () => primeRef.current?.getElement());
3110
+ const classes2 = ["cr-segment", `cr-segment--${variant}`, className].filter(Boolean).join(" ");
3111
+ return /* @__PURE__ */ jsxRuntime.jsx(
3112
+ selectbutton.SelectButton,
3113
+ {
3114
+ ...props,
3115
+ unstyled: true,
3116
+ ref: primeRef,
3117
+ id,
3118
+ options,
3119
+ optionLabel: "label",
3120
+ optionValue: "value",
3121
+ optionDisabled: "disabled",
3122
+ value,
3123
+ onChange: (event) => {
3124
+ if (event.value != null) onChange?.(event.value);
3125
+ },
3126
+ allowEmpty: false,
3127
+ disabled,
3128
+ "aria-label": ariaLabel,
3129
+ "aria-labelledby": ariaLabelledBy,
3130
+ itemTemplate: (option) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3131
+ option.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cr-segment__icon", "aria-hidden": "true", children: option.icon }),
3132
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cr-segment__label", children: option.label })
3133
+ ] }),
3134
+ pt: {
3135
+ root: { className: classes2 },
3136
+ button: {
3137
+ className: "cr-segment__item",
3138
+ // O Prime só ativa com a barra de espaço; um role=button responde também ao Enter.
3139
+ onKeyDown: (event) => {
3140
+ if (event.key === "Enter") event.currentTarget.click();
3141
3141
  }
3142
3142
  }
3143
3143
  }
3144
- );
3145
- }
3146
- );
3144
+ }
3145
+ );
3146
+ });
3147
+ var SegmentControl = SelectButton;
3147
3148
  var Skeleton = react.forwardRef(function Skeleton2({
3148
3149
  shape = "rectangle",
3149
3150
  width = "100%",
@@ -3175,7 +3176,7 @@ var Skeleton = react.forwardRef(function Skeleton2({
3175
3176
  }
3176
3177
  );
3177
3178
  });
3178
- var Switch = react.forwardRef(function Switch2({
3179
+ var ToggleSwitch = react.forwardRef(function ToggleSwitch2({
3179
3180
  label,
3180
3181
  showLabel = true,
3181
3182
  labelPosition = "right",
@@ -3231,6 +3232,7 @@ var Switch = react.forwardRef(function Switch2({
3231
3232
  )
3232
3233
  ] });
3233
3234
  });
3235
+ var Switch = ToggleSwitch;
3234
3236
  function TabPanel(_props) {
3235
3237
  return null;
3236
3238
  }
@@ -3779,7 +3781,7 @@ var TableToolbar = react.forwardRef(function TableToolbar2({
3779
3781
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cr-table-toolbar__main", children: [
3780
3782
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cr-table-toolbar__start", children: [
3781
3783
  busca && /* @__PURE__ */ jsxRuntime.jsx(
3782
- Input,
3784
+ InputText,
3783
3785
  {
3784
3786
  className: "cr-table-toolbar__search",
3785
3787
  size: "medium",
@@ -3958,10 +3960,12 @@ exports.ContextMenu = ContextMenu;
3958
3960
  exports.DATE_PERIODS = DATE_PERIODS;
3959
3961
  exports.DatePicker = DatePicker;
3960
3962
  exports.DateRangeButton = DateRangeButton;
3963
+ exports.Dialog = Dialog;
3961
3964
  exports.Divider = Divider;
3962
3965
  exports.Drawer = Drawer;
3963
3966
  exports.IconButton = IconButton;
3964
3967
  exports.Input = Input;
3968
+ exports.InputText = InputText;
3965
3969
  exports.Menu = Menu;
3966
3970
  exports.MenuPrincipal = MenuPrincipal;
3967
3971
  exports.Menubar = Menubar;
@@ -3972,9 +3976,11 @@ exports.PageHeader = PageHeader;
3972
3976
  exports.Paginator = Paginator;
3973
3977
  exports.Panel = Panel;
3974
3978
  exports.Radio = Radio;
3979
+ exports.RadioButton = RadioButton;
3975
3980
  exports.ScrollPanel = ScrollPanel;
3976
3981
  exports.SegmentControl = SegmentControl;
3977
3982
  exports.Select = Select;
3983
+ exports.SelectButton = SelectButton;
3978
3984
  exports.Skeleton = Skeleton;
3979
3985
  exports.Switch = Switch;
3980
3986
  exports.TabPanel = TabPanel;
@@ -3984,6 +3990,7 @@ exports.TableToolbar = TableToolbar;
3984
3990
  exports.Tabs = Tabs;
3985
3991
  exports.Tag = Tag;
3986
3992
  exports.Toast = Toast;
3993
+ exports.ToggleSwitch = ToggleSwitch;
3987
3994
  exports.Tooltip = Tooltip;
3988
3995
  //# sourceMappingURL=index.cjs.map
3989
3996
  //# sourceMappingURL=index.cjs.map