@vector-business-services/cristal-ds-web 0.13.1 → 0.15.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 +201 -106
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +92 -287
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +51 -23
- package/dist/index.d.ts +51 -23
- package/dist/index.js +203 -108
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { forwardRef, useRef, useImperativeHandle, useState, Children, isValidElement, useId, useCallback, useEffect, useContext, cloneElement
|
|
1
|
+
import { forwardRef, useRef, useImperativeHandle, useState, Children, isValidElement, useId, useLayoutEffect, useMemo, useCallback, useEffect, useContext, cloneElement } from 'react';
|
|
2
2
|
import { Accordion as Accordion$1, AccordionTab as AccordionTab$1 } from 'primereact/accordion';
|
|
3
|
-
import { WarningCircle, Info, Check, CircleNotch, CaretDown, MagnifyingGlass,
|
|
3
|
+
import { WarningCircle, Info, Question, Check, ArrowLeft, X, CircleNotch, CaretDown, MagnifyingGlass, ArrowsInSimple, ArrowsOutSimple, CaretUp, List, DribbbleLogo, SealWarning, XCircle, CheckCircle, Warning, CaretDoubleRight, CaretRight, CaretLeft, CaretDoubleLeft } from '@phosphor-icons/react';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { AutoComplete as AutoComplete$1 } from 'primereact/autocomplete';
|
|
6
6
|
import { Badge as Badge$1 } from 'primereact/badge';
|
|
@@ -16,7 +16,6 @@ import { InputText } from 'primereact/inputtext';
|
|
|
16
16
|
import { PrimeReactContext, PrimeReactProvider } from 'primereact/api';
|
|
17
17
|
import { Menu as Menu$1 } from 'primereact/menu';
|
|
18
18
|
import { Menubar as Menubar$1 } from 'primereact/menubar';
|
|
19
|
-
import { Avatar } from 'primereact/avatar';
|
|
20
19
|
import { Tag as Tag$1 } from 'primereact/tag';
|
|
21
20
|
import { Message as Message$1 } from 'primereact/message';
|
|
22
21
|
import { Dialog } from 'primereact/dialog';
|
|
@@ -37,7 +36,7 @@ function AccordionTab(_props) {
|
|
|
37
36
|
return null;
|
|
38
37
|
}
|
|
39
38
|
var seta = (icon) => /* @__PURE__ */ jsx("span", { className: "cr-accordion__toggle", "aria-hidden": "true", children: icon });
|
|
40
|
-
var Accordion = forwardRef(function Accordion2({ multiple = false, activeIndex, onTabChange, children, id, className }, ref) {
|
|
39
|
+
var Accordion = forwardRef(function Accordion2({ multiple = false, activeIndex, onTabChange, children, id, className, ...props }, ref) {
|
|
41
40
|
const primeRef = useRef(null);
|
|
42
41
|
useImperativeHandle(ref, () => primeRef.current?.getElement());
|
|
43
42
|
const [interno, setInterno] = useState(multiple ? [0] : 0);
|
|
@@ -48,6 +47,7 @@ var Accordion = forwardRef(function Accordion2({ multiple = false, activeIndex,
|
|
|
48
47
|
return /* @__PURE__ */ jsx(
|
|
49
48
|
Accordion$1,
|
|
50
49
|
{
|
|
50
|
+
...props,
|
|
51
51
|
...{ unstyled: true },
|
|
52
52
|
ref: primeRef,
|
|
53
53
|
id,
|
|
@@ -87,6 +87,9 @@ var Accordion = forwardRef(function Accordion2({ multiple = false, activeIndex,
|
|
|
87
87
|
);
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
+
// src/components/aria.ts
|
|
91
|
+
var juntarIds = (...ids) => ids.filter(Boolean).join(" ") || void 0;
|
|
92
|
+
|
|
90
93
|
// src/components/popup.ts
|
|
91
94
|
function seguirLado(painel, alvo) {
|
|
92
95
|
if (!(painel instanceof HTMLElement) || !alvo) return;
|
|
@@ -148,20 +151,24 @@ var AutoComplete = forwardRef(function AutoComplete2({
|
|
|
148
151
|
input: {
|
|
149
152
|
root: {
|
|
150
153
|
className: "cr-field__control cr-autocomplete__input",
|
|
151
|
-
"aria-describedby": supportText
|
|
154
|
+
"aria-describedby": juntarIds(supportText && hintId, props["aria-describedby"]),
|
|
152
155
|
"aria-invalid": error ? true : void 0
|
|
153
156
|
}
|
|
154
157
|
},
|
|
155
158
|
// O Prime mostra um spinner próprio enquanto busca; o Figma não define esse estado.
|
|
156
159
|
loadingIcon: { className: "cr-autocomplete__loader" },
|
|
157
|
-
panel: { className: "cr-autocomplete__panel" },
|
|
160
|
+
panel: { className: "cr-lista cr-autocomplete__panel" },
|
|
158
161
|
// Lado da lista (acima ou abaixo do campo), medido logo depois de o Prime posicionar.
|
|
159
162
|
transition: aoPosicionar(() => {
|
|
160
163
|
const campo = document.getElementById(id);
|
|
161
164
|
seguirLado(painelDoCampo(campo, ".cr-autocomplete__panel"), campo);
|
|
162
165
|
}),
|
|
163
|
-
|
|
164
|
-
|
|
166
|
+
// A área que rola (o Prime aceita listWrapper no pt, mas o d.ts não declara).
|
|
167
|
+
...{ listWrapper: { className: "cr-lista__rolagem" } },
|
|
168
|
+
list: { className: "cr-lista__itens" },
|
|
169
|
+
item: ({ context }) => ({
|
|
170
|
+
className: `cr-lista__item cr-autocomplete__item${context.selected ? " cr-lista__item--selecionado" : ""}`
|
|
171
|
+
})
|
|
165
172
|
},
|
|
166
173
|
...props
|
|
167
174
|
}
|
|
@@ -321,9 +328,17 @@ var lerTema = (el) => {
|
|
|
321
328
|
}
|
|
322
329
|
};
|
|
323
330
|
};
|
|
324
|
-
var comAlfa = (
|
|
325
|
-
const
|
|
326
|
-
|
|
331
|
+
var comAlfa = (cor, alfa) => {
|
|
332
|
+
const ctx = document.createElement("canvas").getContext("2d");
|
|
333
|
+
if (!ctx) return cor;
|
|
334
|
+
ctx.fillStyle = cor;
|
|
335
|
+
const normal = String(ctx.fillStyle);
|
|
336
|
+
if (normal.startsWith("#")) {
|
|
337
|
+
const n = parseInt(normal.slice(1, 7), 16);
|
|
338
|
+
return `rgba(${n >> 16 & 255}, ${n >> 8 & 255}, ${n & 255}, ${alfa})`;
|
|
339
|
+
}
|
|
340
|
+
const [r = 0, g = 0, b = 0] = normal.match(/[\d.]+/g)?.map(Number) ?? [];
|
|
341
|
+
return `rgba(${r}, ${g}, ${b}, ${alfa})`;
|
|
327
342
|
};
|
|
328
343
|
var cruz = (cor) => ({
|
|
329
344
|
id: "crCruz",
|
|
@@ -341,27 +356,61 @@ var cruz = (cor) => ({
|
|
|
341
356
|
ctx.restore();
|
|
342
357
|
}
|
|
343
358
|
});
|
|
359
|
+
var tracar = (ctx, pontos) => {
|
|
360
|
+
pontos.forEach((ponto, i) => {
|
|
361
|
+
const antes = pontos[i - 1];
|
|
362
|
+
if (!antes) return ctx.moveTo(ponto.x, ponto.y);
|
|
363
|
+
const meio = (antes.x + ponto.x) / 2;
|
|
364
|
+
ctx.bezierCurveTo(meio, antes.y, meio, ponto.y, ponto.x, ponto.y);
|
|
365
|
+
});
|
|
366
|
+
};
|
|
367
|
+
var trechos = (pontos) => pontos.reduce(
|
|
368
|
+
(lista, ponto) => {
|
|
369
|
+
if (ponto.skip) lista.push([]);
|
|
370
|
+
else lista[lista.length - 1].push(ponto);
|
|
371
|
+
return lista;
|
|
372
|
+
},
|
|
373
|
+
[[]]
|
|
374
|
+
).filter((trecho) => trecho.length > 0);
|
|
344
375
|
var curvaDoFigma = {
|
|
345
376
|
id: "crCurva",
|
|
346
377
|
beforeDatasetsDraw(chart) {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
378
|
+
const { ctx, chartArea } = chart;
|
|
379
|
+
const series = chart.data.datasets.map((dataset, indice) => ({ dataset, meta: chart.getDatasetMeta(indice), indice })).filter(({ indice }) => chart.isDatasetVisible(indice)).reverse();
|
|
380
|
+
ctx.save();
|
|
381
|
+
ctx.beginPath();
|
|
382
|
+
ctx.rect(chartArea.left, chartArea.top, chartArea.width, chartArea.height);
|
|
383
|
+
ctx.clip();
|
|
384
|
+
series.forEach(({ dataset, meta }) => {
|
|
385
|
+
const cor = String(dataset.borderColor);
|
|
386
|
+
const base = Math.min(meta.yScale?.getPixelForValue(0) ?? chartArea.bottom, chartArea.bottom);
|
|
387
|
+
const degrade = ctx.createLinearGradient(0, chartArea.top, 0, chartArea.bottom);
|
|
388
|
+
degrade.addColorStop(0, comAlfa(cor, 0.1));
|
|
389
|
+
degrade.addColorStop(1, comAlfa(cor, 0.02));
|
|
390
|
+
trechos(meta.data).forEach((trecho) => {
|
|
391
|
+
ctx.beginPath();
|
|
392
|
+
tracar(ctx, trecho);
|
|
393
|
+
ctx.lineTo(trecho[trecho.length - 1].x, base);
|
|
394
|
+
ctx.lineTo(trecho[0].x, base);
|
|
395
|
+
ctx.closePath();
|
|
396
|
+
ctx.fillStyle = degrade;
|
|
397
|
+
ctx.fill();
|
|
357
398
|
});
|
|
358
|
-
if (meta.dataset)
|
|
359
|
-
meta.dataset._pointsUpdated = true;
|
|
360
399
|
});
|
|
400
|
+
series.forEach(({ dataset, meta }) => {
|
|
401
|
+
ctx.strokeStyle = String(dataset.borderColor);
|
|
402
|
+
ctx.lineWidth = 2;
|
|
403
|
+
trechos(meta.data).forEach((trecho) => {
|
|
404
|
+
ctx.beginPath();
|
|
405
|
+
tracar(ctx, trecho);
|
|
406
|
+
ctx.stroke();
|
|
407
|
+
});
|
|
408
|
+
});
|
|
409
|
+
ctx.restore();
|
|
361
410
|
}
|
|
362
411
|
};
|
|
363
412
|
var formatar = (eixo, valor) => eixo?.format ? eixo.format(valor) : String(valor);
|
|
364
|
-
|
|
413
|
+
var Chart = forwardRef(function Chart2({
|
|
365
414
|
type = "line",
|
|
366
415
|
stacked = false,
|
|
367
416
|
labels,
|
|
@@ -374,9 +423,11 @@ function Chart({
|
|
|
374
423
|
actions,
|
|
375
424
|
height = 266,
|
|
376
425
|
id,
|
|
377
|
-
className
|
|
378
|
-
|
|
426
|
+
className,
|
|
427
|
+
...props
|
|
428
|
+
}, ref) {
|
|
379
429
|
const raiz = useRef(null);
|
|
430
|
+
useImperativeHandle(ref, () => raiz.current);
|
|
380
431
|
const ajuda = useRef(null);
|
|
381
432
|
const [tema, setTema] = useState();
|
|
382
433
|
useLayoutEffect(() => {
|
|
@@ -409,22 +460,13 @@ function Chart({
|
|
|
409
460
|
data: s.data,
|
|
410
461
|
yAxisID: s.axis === "right" ? "y2" : "y",
|
|
411
462
|
borderColor: cor,
|
|
412
|
-
|
|
413
|
-
|
|
463
|
+
// A linha e a área são desenhadas pelo plugin curvaDoFigma.
|
|
464
|
+
showLine: false,
|
|
414
465
|
pointRadius: 0,
|
|
415
466
|
pointHoverRadius: 4,
|
|
416
467
|
pointHoverBorderWidth: 2,
|
|
417
468
|
pointHoverBorderColor: tema.superficie,
|
|
418
|
-
pointHoverBackgroundColor: cor
|
|
419
|
-
fill: "origin",
|
|
420
|
-
backgroundColor: (ctx) => {
|
|
421
|
-
const area = ctx.chart.chartArea;
|
|
422
|
-
if (!area) return comAlfa(cor, 0.1);
|
|
423
|
-
const degrade = ctx.chart.ctx.createLinearGradient(0, area.top, 0, area.bottom);
|
|
424
|
-
degrade.addColorStop(0, comAlfa(cor, 0.1));
|
|
425
|
-
degrade.addColorStop(1, comAlfa(cor, 0.02));
|
|
426
|
-
return degrade;
|
|
427
|
-
}
|
|
469
|
+
pointHoverBackgroundColor: cor
|
|
428
470
|
};
|
|
429
471
|
})
|
|
430
472
|
};
|
|
@@ -492,7 +534,7 @@ function Chart({
|
|
|
492
534
|
}, [tema, yAxis, y2Axis, temDireita, series, type, stacked]);
|
|
493
535
|
const card = Boolean(title || actions);
|
|
494
536
|
const classes = ["cr-chart", card && "cr-chart--card", className].filter(Boolean).join(" ");
|
|
495
|
-
return /* @__PURE__ */ jsxs("div", { ref: raiz, id, className: classes, children: [
|
|
537
|
+
return /* @__PURE__ */ jsxs("div", { ...props, ref: raiz, id, className: classes, children: [
|
|
496
538
|
card && /* @__PURE__ */ jsxs("div", { className: "cr-chart__header", children: [
|
|
497
539
|
/* @__PURE__ */ jsxs("div", { className: "cr-chart__title-row", children: [
|
|
498
540
|
title && /* @__PURE__ */ jsx("span", { className: "cr-chart__title", children: title }),
|
|
@@ -535,25 +577,25 @@ function Chart({
|
|
|
535
577
|
}
|
|
536
578
|
),
|
|
537
579
|
s.label
|
|
538
|
-
] }, s.label)) })
|
|
580
|
+
] }, `${i}-${s.label}`)) })
|
|
539
581
|
] }),
|
|
540
|
-
/* @__PURE__ */ jsxs("table", { className: "cr-chart__table", children: [
|
|
582
|
+
/* @__PURE__ */ jsxs("table", { className: "cr-so-leitor cr-chart__table", children: [
|
|
541
583
|
title && /* @__PURE__ */ jsx("caption", { children: title }),
|
|
542
584
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
543
585
|
/* @__PURE__ */ jsx("td", {}),
|
|
544
|
-
series.map((s) => /* @__PURE__ */ jsx("th", { scope: "col", children: s.label }, s.label))
|
|
586
|
+
series.map((s, i) => /* @__PURE__ */ jsx("th", { scope: "col", children: s.label }, `${i}-${s.label}`))
|
|
545
587
|
] }) }),
|
|
546
588
|
/* @__PURE__ */ jsx("tbody", { children: labels.map((rotulo, linha) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
547
589
|
/* @__PURE__ */ jsx("th", { scope: "row", children: rotulo }),
|
|
548
|
-
series.map((s) => {
|
|
590
|
+
series.map((s, i) => {
|
|
549
591
|
const valor = s.data[linha];
|
|
550
592
|
const eixo = s.axis === "right" ? y2Axis : yAxis;
|
|
551
|
-
return /* @__PURE__ */ jsx("td", { children: valor == null ? "" : formatar(eixo, valor) }, s.label);
|
|
593
|
+
return /* @__PURE__ */ jsx("td", { children: valor == null ? "" : formatar(eixo, valor) }, `${i}-${s.label}`);
|
|
552
594
|
})
|
|
553
|
-
] }, rotulo)) })
|
|
595
|
+
] }, `${linha}-${rotulo}`)) })
|
|
554
596
|
] })
|
|
555
597
|
] });
|
|
556
|
-
}
|
|
598
|
+
});
|
|
557
599
|
var Checkbox = forwardRef(function Checkbox2({
|
|
558
600
|
label,
|
|
559
601
|
showLabel = true,
|
|
@@ -568,7 +610,8 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
568
610
|
value,
|
|
569
611
|
id,
|
|
570
612
|
className,
|
|
571
|
-
style
|
|
613
|
+
style,
|
|
614
|
+
...props
|
|
572
615
|
}, ref) {
|
|
573
616
|
const autoId = useId();
|
|
574
617
|
const inputId = id ?? autoId;
|
|
@@ -611,7 +654,7 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
611
654
|
root: {
|
|
612
655
|
className: `cr-checkbox__control${checked ? " cr-checkbox__control--checked" : ""}`
|
|
613
656
|
},
|
|
614
|
-
input: { className: "cr-checkbox__input" },
|
|
657
|
+
input: { ...props, className: "cr-checkbox__input" },
|
|
615
658
|
box: { className: "cr-checkbox__box" },
|
|
616
659
|
icon: { className: "cr-checkbox__icon", "aria-hidden": true }
|
|
617
660
|
}
|
|
@@ -620,7 +663,7 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
620
663
|
/* @__PURE__ */ jsx(
|
|
621
664
|
"label",
|
|
622
665
|
{
|
|
623
|
-
className: `cr-checkbox__label${showLabel ? "" : " cr-checkbox__label--hidden"}`,
|
|
666
|
+
className: `cr-checkbox__label${showLabel ? "" : " cr-checkbox__label--hidden cr-so-leitor"}`,
|
|
624
667
|
htmlFor: inputId,
|
|
625
668
|
children: label
|
|
626
669
|
}
|
|
@@ -749,7 +792,7 @@ var IconButton = forwardRef(function IconButton2({
|
|
|
749
792
|
] });
|
|
750
793
|
});
|
|
751
794
|
var FOCAVEIS = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
752
|
-
|
|
795
|
+
var Drawer = forwardRef(function Drawer2({
|
|
753
796
|
visible,
|
|
754
797
|
onHide,
|
|
755
798
|
title,
|
|
@@ -764,8 +807,13 @@ function Drawer({
|
|
|
764
807
|
footer,
|
|
765
808
|
children,
|
|
766
809
|
id,
|
|
767
|
-
className
|
|
768
|
-
|
|
810
|
+
className,
|
|
811
|
+
...props
|
|
812
|
+
}, ref) {
|
|
813
|
+
const primeRef = useRef(null);
|
|
814
|
+
useImperativeHandle(ref, () => ({
|
|
815
|
+
getElement: () => primeRef.current?.getElement() ?? null
|
|
816
|
+
}));
|
|
769
817
|
const autoId = useId();
|
|
770
818
|
const titleId = `${autoId}-title`;
|
|
771
819
|
const subtitleId = `${autoId}-subtitle`;
|
|
@@ -814,6 +862,8 @@ function Drawer({
|
|
|
814
862
|
return /* @__PURE__ */ jsx(
|
|
815
863
|
Sidebar,
|
|
816
864
|
{
|
|
865
|
+
...props,
|
|
866
|
+
ref: primeRef,
|
|
817
867
|
unstyled: true,
|
|
818
868
|
id,
|
|
819
869
|
visible,
|
|
@@ -851,7 +901,7 @@ function Drawer({
|
|
|
851
901
|
panelRef.current = element;
|
|
852
902
|
if (behavior === "full") setRolagem(element);
|
|
853
903
|
},
|
|
854
|
-
className: "cr-drawer__panel",
|
|
904
|
+
className: "cr-rolagem-fina cr-drawer__panel",
|
|
855
905
|
tabIndex: behavior === "full" && rolavel ? 0 : void 0,
|
|
856
906
|
children: [
|
|
857
907
|
/* @__PURE__ */ jsxs("div", { className: "cr-drawer__header", children: [
|
|
@@ -874,7 +924,7 @@ function Drawer({
|
|
|
874
924
|
"div",
|
|
875
925
|
{
|
|
876
926
|
ref: behavior === "fixed" ? setRolagem : void 0,
|
|
877
|
-
className: "cr-drawer__body",
|
|
927
|
+
className: "cr-rolagem-fina cr-drawer__body",
|
|
878
928
|
tabIndex: behavior === "fixed" && rolavel ? 0 : void 0,
|
|
879
929
|
children
|
|
880
930
|
}
|
|
@@ -897,7 +947,7 @@ function Drawer({
|
|
|
897
947
|
)
|
|
898
948
|
}
|
|
899
949
|
);
|
|
900
|
-
}
|
|
950
|
+
});
|
|
901
951
|
var Input = forwardRef(function Input2({
|
|
902
952
|
variant = "outline",
|
|
903
953
|
size = "large",
|
|
@@ -942,8 +992,8 @@ var Input = forwardRef(function Input2({
|
|
|
942
992
|
disabled,
|
|
943
993
|
invalid: Boolean(error),
|
|
944
994
|
"aria-invalid": error ? true : void 0,
|
|
945
|
-
|
|
946
|
-
|
|
995
|
+
...props,
|
|
996
|
+
"aria-describedby": juntarIds(supportText && hintId, props["aria-describedby"])
|
|
947
997
|
}
|
|
948
998
|
),
|
|
949
999
|
trailingIcon && /* @__PURE__ */ jsx("span", { className: "cr-field__icon", children: trailingIcon })
|
|
@@ -966,7 +1016,8 @@ var Menu = forwardRef(function Menu2({
|
|
|
966
1016
|
onShow,
|
|
967
1017
|
onHide,
|
|
968
1018
|
id,
|
|
969
|
-
className
|
|
1019
|
+
className,
|
|
1020
|
+
...props
|
|
970
1021
|
}, ref) {
|
|
971
1022
|
const primeRef = useRef(null);
|
|
972
1023
|
const alvo = useRef(null);
|
|
@@ -1000,7 +1051,7 @@ var Menu = forwardRef(function Menu2({
|
|
|
1000
1051
|
className: [item.selected && "cr-menu__item--selected", item.className].filter(Boolean).join(" "),
|
|
1001
1052
|
data: { selected: item.selected }
|
|
1002
1053
|
}));
|
|
1003
|
-
const classes = ["cr-menu", `cr-menu--${density}`, popup && "cr-menu--popup", className].filter(Boolean).join(" ");
|
|
1054
|
+
const classes = ["cr-lista cr-menu", `cr-menu--${density}`, popup && "cr-menu--popup", className].filter(Boolean).join(" ");
|
|
1004
1055
|
const pt = {
|
|
1005
1056
|
// O nome acessível vai na lista (role=menu); o Prime lê `ariaLabel`, mas não o declara no tipo.
|
|
1006
1057
|
menu: {
|
|
@@ -1023,12 +1074,13 @@ var Menu = forwardRef(function Menu2({
|
|
|
1023
1074
|
transition: aoPosicionar(
|
|
1024
1075
|
() => queueMicrotask(() => seguirLado(primeRef.current?.getElement(), alvo.current))
|
|
1025
1076
|
),
|
|
1026
|
-
action: { className: "cr-menu__action" },
|
|
1077
|
+
action: { className: "cr-lista__item cr-menu__action" },
|
|
1027
1078
|
label: { className: "cr-menu__label" }
|
|
1028
1079
|
};
|
|
1029
1080
|
const menu = /* @__PURE__ */ jsx(
|
|
1030
1081
|
Menu$1,
|
|
1031
1082
|
{
|
|
1083
|
+
...props,
|
|
1032
1084
|
unstyled: true,
|
|
1033
1085
|
ref: primeRef,
|
|
1034
1086
|
id,
|
|
@@ -1117,16 +1169,11 @@ function Profile({ user, menu }) {
|
|
|
1117
1169
|
user.role && /* @__PURE__ */ jsx("span", { className: "cr-menubar__profile-role", children: user.role })
|
|
1118
1170
|
] }),
|
|
1119
1171
|
/* @__PURE__ */ jsx(
|
|
1120
|
-
|
|
1172
|
+
"span",
|
|
1121
1173
|
{
|
|
1122
|
-
unstyled: true,
|
|
1123
1174
|
"aria-hidden": "true",
|
|
1124
1175
|
className: `cr-menubar__avatar${user.avatar ? "" : " cr-menubar__avatar--initial"}`,
|
|
1125
|
-
image: user.avatar,
|
|
1126
|
-
imageAlt: "",
|
|
1127
|
-
label: user.avatar ? void 0 : user.name.trim().charAt(0).toUpperCase(),
|
|
1128
|
-
shape: "circle",
|
|
1129
|
-
pt: { image: { className: "cr-menubar__avatar-image" } }
|
|
1176
|
+
children: user.avatar ? /* @__PURE__ */ jsx("img", { className: "cr-menubar__avatar-image", src: user.avatar, alt: "" }) : user.name.trim().charAt(0).toUpperCase()
|
|
1130
1177
|
}
|
|
1131
1178
|
)
|
|
1132
1179
|
] });
|
|
@@ -1175,7 +1222,8 @@ var Menubar = forwardRef(function Menubar2({
|
|
|
1175
1222
|
user,
|
|
1176
1223
|
userMenu,
|
|
1177
1224
|
id,
|
|
1178
|
-
className
|
|
1225
|
+
className,
|
|
1226
|
+
...props
|
|
1179
1227
|
}, ref) {
|
|
1180
1228
|
const [innerSearch, setInnerSearch] = useState("");
|
|
1181
1229
|
const search = searchValue ?? innerSearch;
|
|
@@ -1241,6 +1289,7 @@ var Menubar = forwardRef(function Menubar2({
|
|
|
1241
1289
|
return /* @__PURE__ */ jsx("div", { ref, id, className: classes, children: /* @__PURE__ */ jsx(
|
|
1242
1290
|
Menubar$1,
|
|
1243
1291
|
{
|
|
1292
|
+
...props,
|
|
1244
1293
|
unstyled: true,
|
|
1245
1294
|
className: "cr-menubar__bar",
|
|
1246
1295
|
model: [],
|
|
@@ -1272,10 +1321,12 @@ var MenuPrincipal = forwardRef(
|
|
|
1272
1321
|
model,
|
|
1273
1322
|
popup = false,
|
|
1274
1323
|
"aria-label": ariaLabel = "Menu principal",
|
|
1324
|
+
"aria-labelledby": ariaLabelledBy,
|
|
1275
1325
|
onShow,
|
|
1276
1326
|
onHide,
|
|
1277
1327
|
id,
|
|
1278
|
-
className
|
|
1328
|
+
className,
|
|
1329
|
+
...props
|
|
1279
1330
|
}, ref) {
|
|
1280
1331
|
const primeRef = useRef(null);
|
|
1281
1332
|
const context = useContext(PrimeReactContext);
|
|
@@ -1325,7 +1376,15 @@ var MenuPrincipal = forwardRef(
|
|
|
1325
1376
|
item.description && /* @__PURE__ */ jsx("span", { className: "cr-menu-principal__description", children: item.description })
|
|
1326
1377
|
] }),
|
|
1327
1378
|
" ",
|
|
1328
|
-
item.tag && /* @__PURE__ */ jsx(
|
|
1379
|
+
item.tag && /* @__PURE__ */ jsx(
|
|
1380
|
+
Tag,
|
|
1381
|
+
{
|
|
1382
|
+
className: "cr-menu-principal__tag",
|
|
1383
|
+
variant: "warning",
|
|
1384
|
+
icon: item.tagIcon ?? /* @__PURE__ */ jsx(DribbbleLogo, {}),
|
|
1385
|
+
children: item.tag
|
|
1386
|
+
}
|
|
1387
|
+
)
|
|
1329
1388
|
]
|
|
1330
1389
|
}
|
|
1331
1390
|
)
|
|
@@ -1341,9 +1400,17 @@ var MenuPrincipal = forwardRef(
|
|
|
1341
1400
|
});
|
|
1342
1401
|
const classes = ["cr-menu-principal", popup && "cr-menu-principal--popup", className].filter(Boolean).join(" ");
|
|
1343
1402
|
const pt = {
|
|
1344
|
-
|
|
1403
|
+
// O nome acessível vai na lista (role=menu), como no Menu.
|
|
1404
|
+
menu: {
|
|
1405
|
+
className: "cr-menu-principal__list",
|
|
1406
|
+
"aria-label": ariaLabelledBy ? void 0 : ariaLabel,
|
|
1407
|
+
"aria-labelledby": ariaLabelledBy
|
|
1408
|
+
},
|
|
1345
1409
|
submenuHeader: { className: "cr-menu-principal__group" },
|
|
1346
|
-
|
|
1410
|
+
// O divisor tracejado é o Divider do Cristal (dashed).
|
|
1411
|
+
separator: {
|
|
1412
|
+
className: "cr-divider cr-divider--horizontal cr-divider--dashed cr-menu-principal__separator"
|
|
1413
|
+
},
|
|
1347
1414
|
menuitem: { className: "cr-menu-principal__item" },
|
|
1348
1415
|
// Lado do popup, medido logo depois de o Prime posicionar.
|
|
1349
1416
|
// Numa microtarefa: no onEnter o Prime ainda está religando a ref (como no Menu).
|
|
@@ -1354,6 +1421,7 @@ var MenuPrincipal = forwardRef(
|
|
|
1354
1421
|
const menu = /* @__PURE__ */ jsx(
|
|
1355
1422
|
Menu$1,
|
|
1356
1423
|
{
|
|
1424
|
+
...props,
|
|
1357
1425
|
unstyled: true,
|
|
1358
1426
|
ref: primeRef,
|
|
1359
1427
|
id,
|
|
@@ -1385,12 +1453,13 @@ var ICON = {
|
|
|
1385
1453
|
highlight: /* @__PURE__ */ jsx(SealWarning, {}),
|
|
1386
1454
|
neutral: /* @__PURE__ */ jsx(WarningCircle, {})
|
|
1387
1455
|
};
|
|
1388
|
-
var Message = forwardRef(function Message2({ type = "info", children, showIcon = true, id, className }, ref) {
|
|
1456
|
+
var Message = forwardRef(function Message2({ type = "info", children, showIcon = true, id, className, ...props }, ref) {
|
|
1389
1457
|
const primeRef = useRef(null);
|
|
1390
1458
|
useImperativeHandle(ref, () => primeRef.current?.getElement());
|
|
1391
1459
|
return /* @__PURE__ */ jsx(
|
|
1392
1460
|
Message$1,
|
|
1393
1461
|
{
|
|
1462
|
+
...props,
|
|
1394
1463
|
unstyled: true,
|
|
1395
1464
|
ref: primeRef,
|
|
1396
1465
|
id,
|
|
@@ -1406,9 +1475,10 @@ var Message = forwardRef(function Message2({ type = "info", children, showIcon =
|
|
|
1406
1475
|
}
|
|
1407
1476
|
);
|
|
1408
1477
|
});
|
|
1409
|
-
|
|
1478
|
+
var Modal = forwardRef(function Modal2({
|
|
1410
1479
|
visible,
|
|
1411
1480
|
onHide,
|
|
1481
|
+
dismissableMask = true,
|
|
1412
1482
|
title,
|
|
1413
1483
|
size = "large",
|
|
1414
1484
|
onHelp,
|
|
@@ -1418,8 +1488,13 @@ function Modal({
|
|
|
1418
1488
|
footerStart,
|
|
1419
1489
|
children,
|
|
1420
1490
|
id,
|
|
1421
|
-
className
|
|
1422
|
-
|
|
1491
|
+
className,
|
|
1492
|
+
...props
|
|
1493
|
+
}, ref) {
|
|
1494
|
+
const primeRef = useRef(null);
|
|
1495
|
+
useImperativeHandle(ref, () => ({
|
|
1496
|
+
getElement: () => primeRef.current?.getElement() ?? null
|
|
1497
|
+
}));
|
|
1423
1498
|
const autoId = useId();
|
|
1424
1499
|
const titleId = `${autoId}-title`;
|
|
1425
1500
|
const [body, setBody] = useState(null);
|
|
@@ -1437,10 +1512,13 @@ function Modal({
|
|
|
1437
1512
|
return /* @__PURE__ */ jsx(
|
|
1438
1513
|
Dialog,
|
|
1439
1514
|
{
|
|
1515
|
+
...props,
|
|
1516
|
+
ref: primeRef,
|
|
1440
1517
|
unstyled: true,
|
|
1441
1518
|
id,
|
|
1442
1519
|
visible,
|
|
1443
1520
|
onHide,
|
|
1521
|
+
dismissableMask,
|
|
1444
1522
|
draggable: false,
|
|
1445
1523
|
resizable: false,
|
|
1446
1524
|
blockScroll: true,
|
|
@@ -1483,7 +1561,7 @@ function Modal({
|
|
|
1483
1561
|
"div",
|
|
1484
1562
|
{
|
|
1485
1563
|
ref: setBody,
|
|
1486
|
-
className: "cr-modal__body",
|
|
1564
|
+
className: "cr-rolagem-fina cr-modal__body",
|
|
1487
1565
|
tabIndex: rolavel ? 0 : void 0,
|
|
1488
1566
|
children
|
|
1489
1567
|
}
|
|
@@ -1495,7 +1573,7 @@ function Modal({
|
|
|
1495
1573
|
] })
|
|
1496
1574
|
}
|
|
1497
1575
|
);
|
|
1498
|
-
}
|
|
1576
|
+
});
|
|
1499
1577
|
var MultiSelect = forwardRef(function MultiSelect2({
|
|
1500
1578
|
variant = "outline",
|
|
1501
1579
|
size = "large",
|
|
@@ -1580,9 +1658,9 @@ var MultiSelect = forwardRef(function MultiSelect2({
|
|
|
1580
1658
|
);
|
|
1581
1659
|
};
|
|
1582
1660
|
const checkbox = {
|
|
1583
|
-
root: { className: "cr-multiselect__checkbox" },
|
|
1584
|
-
box: { className: "cr-multiselect__checkbox-box" },
|
|
1585
|
-
input: { className: "cr-multiselect__checkbox-input" }
|
|
1661
|
+
root: { className: "cr-checkbox__control cr-multiselect__checkbox" },
|
|
1662
|
+
box: { className: "cr-checkbox__box cr-multiselect__checkbox-box" },
|
|
1663
|
+
input: { className: "cr-checkbox__input cr-multiselect__checkbox-input" }
|
|
1586
1664
|
};
|
|
1587
1665
|
const pt = {
|
|
1588
1666
|
// Com a lista aberta o foco vai para a busca (no body), fora da caixa: o estado Focused do
|
|
@@ -1593,16 +1671,16 @@ var MultiSelect = forwardRef(function MultiSelect2({
|
|
|
1593
1671
|
className: `cr-field__control cr-multiselect__control${open ? " cr-multiselect__control--open" : ""}`
|
|
1594
1672
|
};
|
|
1595
1673
|
},
|
|
1596
|
-
hiddenInputWrapper: { className: "cr-multiselect__hidden" },
|
|
1674
|
+
hiddenInputWrapper: { className: "cr-so-leitor cr-multiselect__hidden" },
|
|
1597
1675
|
input: {
|
|
1598
|
-
"aria-describedby": supportText
|
|
1676
|
+
"aria-describedby": juntarIds(supportText && hintId, props["aria-describedby"]),
|
|
1599
1677
|
"aria-invalid": error ? true : void 0,
|
|
1600
1678
|
"aria-required": required || void 0
|
|
1601
1679
|
},
|
|
1602
1680
|
labelContainer: { className: "cr-multiselect__value" },
|
|
1603
1681
|
label: { className: "cr-multiselect__chips" },
|
|
1604
1682
|
trigger: { className: "cr-field__icon cr-multiselect__trigger" },
|
|
1605
|
-
panel: { className: `cr-multiselect__panel cr-multiselect__panel--${density}` },
|
|
1683
|
+
panel: { className: `cr-lista cr-multiselect__panel cr-multiselect__panel--${density}` },
|
|
1606
1684
|
header: { className: "cr-multiselect__header" },
|
|
1607
1685
|
headerCheckboxContainer: { className: "cr-multiselect__select-all" },
|
|
1608
1686
|
// O Prime repete role=checkbox na <div> em volta do <input>: o leitor de tela veria dois.
|
|
@@ -1617,13 +1695,13 @@ var MultiSelect = forwardRef(function MultiSelect2({
|
|
|
1617
1695
|
root: { className: "cr-multiselect__search-input", "aria-label": filterPlaceholder }
|
|
1618
1696
|
},
|
|
1619
1697
|
closeButton: { className: "cr-multiselect__close" },
|
|
1620
|
-
wrapper: { className: "cr-
|
|
1621
|
-
list: { className: "cr-
|
|
1698
|
+
wrapper: { className: "cr-lista__rolagem" },
|
|
1699
|
+
list: { className: "cr-lista__itens" },
|
|
1622
1700
|
item: (options2) => {
|
|
1623
1701
|
const context = options2?.context;
|
|
1624
1702
|
const focused = context !== void 0 && context.focusedIndex === context.index;
|
|
1625
1703
|
return {
|
|
1626
|
-
className: `cr-multiselect__item${focused ? " cr-multiselect__item--focused" : ""}`
|
|
1704
|
+
className: `cr-lista__item cr-multiselect__item${focused ? " cr-multiselect__item--focused" : ""}`
|
|
1627
1705
|
};
|
|
1628
1706
|
},
|
|
1629
1707
|
checkboxContainer: { className: "cr-multiselect__item-checkbox" },
|
|
@@ -1798,7 +1876,8 @@ var Select = forwardRef(function Select2({
|
|
|
1798
1876
|
disabled,
|
|
1799
1877
|
id,
|
|
1800
1878
|
name,
|
|
1801
|
-
className
|
|
1879
|
+
className,
|
|
1880
|
+
...props
|
|
1802
1881
|
}, ref) {
|
|
1803
1882
|
const autoId = useId();
|
|
1804
1883
|
const inputId = id ?? autoId;
|
|
@@ -1831,11 +1910,11 @@ var Select = forwardRef(function Select2({
|
|
|
1831
1910
|
},
|
|
1832
1911
|
// O <select> escondido do Prime só existe para formulários: fora da árvore de acessibilidade.
|
|
1833
1912
|
select: { "aria-hidden": true },
|
|
1834
|
-
hiddenSelectedMessage: { className: "cr-select__hidden" },
|
|
1913
|
+
hiddenSelectedMessage: { className: "cr-so-leitor cr-select__hidden" },
|
|
1835
1914
|
// O Prime usa a mesma chave no texto do campo e no combobox escondido.
|
|
1836
1915
|
input: { className: "cr-select__value" },
|
|
1837
1916
|
trigger: { className: "cr-field__icon cr-select__trigger", "aria-hidden": true },
|
|
1838
|
-
panel: { className: "cr-select__panel" },
|
|
1917
|
+
panel: { className: "cr-lista cr-select__panel" },
|
|
1839
1918
|
// Lado da lista (acima ou abaixo do campo), medido logo depois de o Prime posicionar.
|
|
1840
1919
|
transition: aoPosicionar(
|
|
1841
1920
|
() => seguirLado(
|
|
@@ -1843,17 +1922,17 @@ var Select = forwardRef(function Select2({
|
|
|
1843
1922
|
document.getElementById(inputId)?.closest(".cr-select__control")
|
|
1844
1923
|
)
|
|
1845
1924
|
),
|
|
1846
|
-
wrapper: { className: "cr-select__wrapper" },
|
|
1847
|
-
list: { className: "cr-select__list", id: listId },
|
|
1925
|
+
wrapper: { className: "cr-lista__rolagem cr-select__wrapper" },
|
|
1926
|
+
list: { className: "cr-lista__itens cr-select__list", id: listId },
|
|
1848
1927
|
// Selecionado e em foco (teclado) pelo contexto do pt, a API pública do Prime (não data-p-*).
|
|
1849
1928
|
item: ({ context }) => ({
|
|
1850
1929
|
className: [
|
|
1851
|
-
"cr-select__item",
|
|
1852
|
-
context.selected && "cr-
|
|
1853
|
-
context.focused && "cr-
|
|
1930
|
+
"cr-lista__item cr-select__item",
|
|
1931
|
+
context.selected && "cr-lista__item--selecionado",
|
|
1932
|
+
context.focused && "cr-lista__item--focado"
|
|
1854
1933
|
].filter(Boolean).join(" ")
|
|
1855
1934
|
}),
|
|
1856
|
-
emptyMessage: { className: "cr-select__item cr-select__empty" }
|
|
1935
|
+
emptyMessage: { className: "cr-lista__item cr-select__item cr-select__empty" }
|
|
1857
1936
|
};
|
|
1858
1937
|
return /* @__PURE__ */ jsxs("div", { className: classes, children: [
|
|
1859
1938
|
label && /* @__PURE__ */ jsxs("label", { className: "cr-field__label", htmlFor: inputId, children: [
|
|
@@ -1863,6 +1942,7 @@ var Select = forwardRef(function Select2({
|
|
|
1863
1942
|
/* @__PURE__ */ jsx(
|
|
1864
1943
|
Dropdown,
|
|
1865
1944
|
{
|
|
1945
|
+
...props,
|
|
1866
1946
|
unstyled: true,
|
|
1867
1947
|
inputId,
|
|
1868
1948
|
focusInputRef: setInputRef,
|
|
@@ -1885,7 +1965,7 @@ var Select = forwardRef(function Select2({
|
|
|
1885
1965
|
"aria-label": label ? void 0 : ariaLabel,
|
|
1886
1966
|
"aria-expanded": open,
|
|
1887
1967
|
"aria-controls": open ? listId : void 0,
|
|
1888
|
-
"aria-describedby": supportText
|
|
1968
|
+
"aria-describedby": juntarIds(supportText && hintId, props["aria-describedby"]),
|
|
1889
1969
|
"aria-invalid": error ? true : void 0,
|
|
1890
1970
|
"aria-required": required || void 0,
|
|
1891
1971
|
pt
|
|
@@ -1917,7 +1997,8 @@ var Paginator = forwardRef(function Paginator2({
|
|
|
1917
1997
|
onPageChange,
|
|
1918
1998
|
rowsPerPageLabel = "Itens por p\xE1gina",
|
|
1919
1999
|
id,
|
|
1920
|
-
className
|
|
2000
|
+
className,
|
|
2001
|
+
...props
|
|
1921
2002
|
}, ref) {
|
|
1922
2003
|
const primeRef = useRef(null);
|
|
1923
2004
|
useImperativeHandle(ref, () => primeRef.current?.getElement());
|
|
@@ -1929,6 +2010,7 @@ var Paginator = forwardRef(function Paginator2({
|
|
|
1929
2010
|
return /* @__PURE__ */ jsx(
|
|
1930
2011
|
Paginator$1,
|
|
1931
2012
|
{
|
|
2013
|
+
...props,
|
|
1932
2014
|
unstyled: true,
|
|
1933
2015
|
ref: primeRef,
|
|
1934
2016
|
id,
|
|
@@ -2016,7 +2098,8 @@ var Radio = forwardRef(function Radio2({
|
|
|
2016
2098
|
required,
|
|
2017
2099
|
id,
|
|
2018
2100
|
className,
|
|
2019
|
-
style
|
|
2101
|
+
style,
|
|
2102
|
+
...props
|
|
2020
2103
|
}, ref) {
|
|
2021
2104
|
const autoId = useId();
|
|
2022
2105
|
const inputId = id ?? autoId;
|
|
@@ -2042,7 +2125,7 @@ var Radio = forwardRef(function Radio2({
|
|
|
2042
2125
|
pt: {
|
|
2043
2126
|
// Marcado pela prop do Cristal, não pelo atributo interno do Prime (data-p-checked).
|
|
2044
2127
|
root: { className: `cr-radio__control${checked ? " cr-radio__control--checked" : ""}` },
|
|
2045
|
-
input: { className: "cr-radio__input" },
|
|
2128
|
+
input: { ...props, className: "cr-radio__input" },
|
|
2046
2129
|
box: { className: "cr-radio__box" },
|
|
2047
2130
|
icon: { className: "cr-radio__icon" }
|
|
2048
2131
|
}
|
|
@@ -2051,7 +2134,7 @@ var Radio = forwardRef(function Radio2({
|
|
|
2051
2134
|
/* @__PURE__ */ jsx(
|
|
2052
2135
|
"label",
|
|
2053
2136
|
{
|
|
2054
|
-
className: `cr-radio__label${showLabel ? "" : " cr-radio__label--hidden"}`,
|
|
2137
|
+
className: `cr-radio__label${showLabel ? "" : " cr-radio__label--hidden cr-so-leitor"}`,
|
|
2055
2138
|
htmlFor: inputId,
|
|
2056
2139
|
children: label
|
|
2057
2140
|
}
|
|
@@ -2059,7 +2142,15 @@ var Radio = forwardRef(function Radio2({
|
|
|
2059
2142
|
] });
|
|
2060
2143
|
});
|
|
2061
2144
|
var porcentagem = (posicao, total, visivel) => total > visivel ? Math.round(posicao / (total - visivel) * 100) : 0;
|
|
2062
|
-
var ScrollPanel = forwardRef(function ScrollPanel2({
|
|
2145
|
+
var ScrollPanel = forwardRef(function ScrollPanel2({
|
|
2146
|
+
children,
|
|
2147
|
+
"aria-label": ariaLabel,
|
|
2148
|
+
"aria-labelledby": ariaLabelledBy,
|
|
2149
|
+
style,
|
|
2150
|
+
id,
|
|
2151
|
+
className,
|
|
2152
|
+
...props
|
|
2153
|
+
}, ref) {
|
|
2063
2154
|
const primeRef = useRef(null);
|
|
2064
2155
|
useImperativeHandle(ref, () => primeRef.current?.getElement());
|
|
2065
2156
|
const contentId = `${useId()}-content`;
|
|
@@ -2094,7 +2185,7 @@ var ScrollPanel = forwardRef(function ScrollPanel2({ children, "aria-label": ari
|
|
|
2094
2185
|
barx: barra("horizontal", posicao.x),
|
|
2095
2186
|
bary: barra("vertical", posicao.y)
|
|
2096
2187
|
};
|
|
2097
|
-
return /* @__PURE__ */ jsx(ScrollPanel$1, { unstyled: true, ref: primeRef, id, pt, children });
|
|
2188
|
+
return /* @__PURE__ */ jsx(ScrollPanel$1, { ...props, unstyled: true, ref: primeRef, id, pt, children });
|
|
2098
2189
|
});
|
|
2099
2190
|
var SegmentControl = forwardRef(
|
|
2100
2191
|
function SegmentControl2({
|
|
@@ -2106,7 +2197,8 @@ var SegmentControl = forwardRef(
|
|
|
2106
2197
|
"aria-labelledby": ariaLabelledBy,
|
|
2107
2198
|
disabled,
|
|
2108
2199
|
id,
|
|
2109
|
-
className
|
|
2200
|
+
className,
|
|
2201
|
+
...props
|
|
2110
2202
|
}, ref) {
|
|
2111
2203
|
const primeRef = useRef(null);
|
|
2112
2204
|
useImperativeHandle(ref, () => primeRef.current?.getElement());
|
|
@@ -2114,6 +2206,7 @@ var SegmentControl = forwardRef(
|
|
|
2114
2206
|
return /* @__PURE__ */ jsx(
|
|
2115
2207
|
SelectButton,
|
|
2116
2208
|
{
|
|
2209
|
+
...props,
|
|
2117
2210
|
unstyled: true,
|
|
2118
2211
|
ref: primeRef,
|
|
2119
2212
|
id,
|
|
@@ -2158,7 +2251,8 @@ var Switch = forwardRef(function Switch2({
|
|
|
2158
2251
|
name,
|
|
2159
2252
|
id,
|
|
2160
2253
|
className,
|
|
2161
|
-
style
|
|
2254
|
+
style,
|
|
2255
|
+
...props
|
|
2162
2256
|
}, ref) {
|
|
2163
2257
|
const autoId = useId();
|
|
2164
2258
|
const inputId = id ?? autoId;
|
|
@@ -2187,7 +2281,7 @@ var Switch = forwardRef(function Switch2({
|
|
|
2187
2281
|
role: void 0,
|
|
2188
2282
|
"aria-checked": void 0
|
|
2189
2283
|
},
|
|
2190
|
-
input: { className: "cr-switch__input" },
|
|
2284
|
+
input: { ...props, className: "cr-switch__input" },
|
|
2191
2285
|
slider: { className: "cr-switch__track" }
|
|
2192
2286
|
}
|
|
2193
2287
|
}
|
|
@@ -2195,7 +2289,7 @@ var Switch = forwardRef(function Switch2({
|
|
|
2195
2289
|
/* @__PURE__ */ jsx(
|
|
2196
2290
|
"label",
|
|
2197
2291
|
{
|
|
2198
|
-
className: `cr-switch__label${showLabel ? "" : " cr-switch__label--hidden"}`,
|
|
2292
|
+
className: `cr-switch__label${showLabel ? "" : " cr-switch__label--hidden cr-so-leitor"}`,
|
|
2199
2293
|
htmlFor: inputId,
|
|
2200
2294
|
children: label
|
|
2201
2295
|
}
|
|
@@ -2205,7 +2299,7 @@ var Switch = forwardRef(function Switch2({
|
|
|
2205
2299
|
function TabPanel(_props) {
|
|
2206
2300
|
return null;
|
|
2207
2301
|
}
|
|
2208
|
-
var Tabs = forwardRef(function Tabs2({ activeIndex, onTabChange, children, id, className }, ref) {
|
|
2302
|
+
var Tabs = forwardRef(function Tabs2({ activeIndex, onTabChange, children, id, className, ...props }, ref) {
|
|
2209
2303
|
const primeRef = useRef(null);
|
|
2210
2304
|
useImperativeHandle(ref, () => primeRef.current?.getElement());
|
|
2211
2305
|
const [interno, setInterno] = useState(0);
|
|
@@ -2248,6 +2342,7 @@ var Tabs = forwardRef(function Tabs2({ activeIndex, onTabChange, children, id, c
|
|
|
2248
2342
|
return /* @__PURE__ */ jsx(
|
|
2249
2343
|
TabView,
|
|
2250
2344
|
{
|
|
2345
|
+
...props,
|
|
2251
2346
|
unstyled: true,
|
|
2252
2347
|
ref: primeRef,
|
|
2253
2348
|
id,
|