@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.cjs
CHANGED
|
@@ -18,7 +18,6 @@ var inputtext = require('primereact/inputtext');
|
|
|
18
18
|
var api = require('primereact/api');
|
|
19
19
|
var menu = require('primereact/menu');
|
|
20
20
|
var menubar = require('primereact/menubar');
|
|
21
|
-
var avatar = require('primereact/avatar');
|
|
22
21
|
var tag = require('primereact/tag');
|
|
23
22
|
var message = require('primereact/message');
|
|
24
23
|
var dialog = require('primereact/dialog');
|
|
@@ -39,7 +38,7 @@ function AccordionTab(_props) {
|
|
|
39
38
|
return null;
|
|
40
39
|
}
|
|
41
40
|
var seta = (icon) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cr-accordion__toggle", "aria-hidden": "true", children: icon });
|
|
42
|
-
var Accordion = react.forwardRef(function Accordion2({ multiple = false, activeIndex, onTabChange, children, id, className }, ref) {
|
|
41
|
+
var Accordion = react.forwardRef(function Accordion2({ multiple = false, activeIndex, onTabChange, children, id, className, ...props }, ref) {
|
|
43
42
|
const primeRef = react.useRef(null);
|
|
44
43
|
react.useImperativeHandle(ref, () => primeRef.current?.getElement());
|
|
45
44
|
const [interno, setInterno] = react.useState(multiple ? [0] : 0);
|
|
@@ -50,6 +49,7 @@ var Accordion = react.forwardRef(function Accordion2({ multiple = false, activeI
|
|
|
50
49
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
51
50
|
accordion.Accordion,
|
|
52
51
|
{
|
|
52
|
+
...props,
|
|
53
53
|
...{ unstyled: true },
|
|
54
54
|
ref: primeRef,
|
|
55
55
|
id,
|
|
@@ -89,6 +89,9 @@ var Accordion = react.forwardRef(function Accordion2({ multiple = false, activeI
|
|
|
89
89
|
);
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
+
// src/components/aria.ts
|
|
93
|
+
var juntarIds = (...ids) => ids.filter(Boolean).join(" ") || void 0;
|
|
94
|
+
|
|
92
95
|
// src/components/popup.ts
|
|
93
96
|
function seguirLado(painel, alvo) {
|
|
94
97
|
if (!(painel instanceof HTMLElement) || !alvo) return;
|
|
@@ -150,20 +153,24 @@ var AutoComplete = react.forwardRef(function AutoComplete2({
|
|
|
150
153
|
input: {
|
|
151
154
|
root: {
|
|
152
155
|
className: "cr-field__control cr-autocomplete__input",
|
|
153
|
-
"aria-describedby": supportText
|
|
156
|
+
"aria-describedby": juntarIds(supportText && hintId, props["aria-describedby"]),
|
|
154
157
|
"aria-invalid": error ? true : void 0
|
|
155
158
|
}
|
|
156
159
|
},
|
|
157
160
|
// O Prime mostra um spinner próprio enquanto busca; o Figma não define esse estado.
|
|
158
161
|
loadingIcon: { className: "cr-autocomplete__loader" },
|
|
159
|
-
panel: { className: "cr-autocomplete__panel" },
|
|
162
|
+
panel: { className: "cr-lista cr-autocomplete__panel" },
|
|
160
163
|
// Lado da lista (acima ou abaixo do campo), medido logo depois de o Prime posicionar.
|
|
161
164
|
transition: aoPosicionar(() => {
|
|
162
165
|
const campo = document.getElementById(id);
|
|
163
166
|
seguirLado(painelDoCampo(campo, ".cr-autocomplete__panel"), campo);
|
|
164
167
|
}),
|
|
165
|
-
|
|
166
|
-
|
|
168
|
+
// A área que rola (o Prime aceita listWrapper no pt, mas o d.ts não declara).
|
|
169
|
+
...{ listWrapper: { className: "cr-lista__rolagem" } },
|
|
170
|
+
list: { className: "cr-lista__itens" },
|
|
171
|
+
item: ({ context }) => ({
|
|
172
|
+
className: `cr-lista__item cr-autocomplete__item${context.selected ? " cr-lista__item--selecionado" : ""}`
|
|
173
|
+
})
|
|
167
174
|
},
|
|
168
175
|
...props
|
|
169
176
|
}
|
|
@@ -323,9 +330,17 @@ var lerTema = (el) => {
|
|
|
323
330
|
}
|
|
324
331
|
};
|
|
325
332
|
};
|
|
326
|
-
var comAlfa = (
|
|
327
|
-
const
|
|
328
|
-
|
|
333
|
+
var comAlfa = (cor, alfa) => {
|
|
334
|
+
const ctx = document.createElement("canvas").getContext("2d");
|
|
335
|
+
if (!ctx) return cor;
|
|
336
|
+
ctx.fillStyle = cor;
|
|
337
|
+
const normal = String(ctx.fillStyle);
|
|
338
|
+
if (normal.startsWith("#")) {
|
|
339
|
+
const n = parseInt(normal.slice(1, 7), 16);
|
|
340
|
+
return `rgba(${n >> 16 & 255}, ${n >> 8 & 255}, ${n & 255}, ${alfa})`;
|
|
341
|
+
}
|
|
342
|
+
const [r = 0, g = 0, b = 0] = normal.match(/[\d.]+/g)?.map(Number) ?? [];
|
|
343
|
+
return `rgba(${r}, ${g}, ${b}, ${alfa})`;
|
|
329
344
|
};
|
|
330
345
|
var cruz = (cor) => ({
|
|
331
346
|
id: "crCruz",
|
|
@@ -343,27 +358,61 @@ var cruz = (cor) => ({
|
|
|
343
358
|
ctx.restore();
|
|
344
359
|
}
|
|
345
360
|
});
|
|
361
|
+
var tracar = (ctx, pontos) => {
|
|
362
|
+
pontos.forEach((ponto, i) => {
|
|
363
|
+
const antes = pontos[i - 1];
|
|
364
|
+
if (!antes) return ctx.moveTo(ponto.x, ponto.y);
|
|
365
|
+
const meio = (antes.x + ponto.x) / 2;
|
|
366
|
+
ctx.bezierCurveTo(meio, antes.y, meio, ponto.y, ponto.x, ponto.y);
|
|
367
|
+
});
|
|
368
|
+
};
|
|
369
|
+
var trechos = (pontos) => pontos.reduce(
|
|
370
|
+
(lista, ponto) => {
|
|
371
|
+
if (ponto.skip) lista.push([]);
|
|
372
|
+
else lista[lista.length - 1].push(ponto);
|
|
373
|
+
return lista;
|
|
374
|
+
},
|
|
375
|
+
[[]]
|
|
376
|
+
).filter((trecho) => trecho.length > 0);
|
|
346
377
|
var curvaDoFigma = {
|
|
347
378
|
id: "crCurva",
|
|
348
379
|
beforeDatasetsDraw(chart) {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
380
|
+
const { ctx, chartArea } = chart;
|
|
381
|
+
const series = chart.data.datasets.map((dataset, indice) => ({ dataset, meta: chart.getDatasetMeta(indice), indice })).filter(({ indice }) => chart.isDatasetVisible(indice)).reverse();
|
|
382
|
+
ctx.save();
|
|
383
|
+
ctx.beginPath();
|
|
384
|
+
ctx.rect(chartArea.left, chartArea.top, chartArea.width, chartArea.height);
|
|
385
|
+
ctx.clip();
|
|
386
|
+
series.forEach(({ dataset, meta }) => {
|
|
387
|
+
const cor = String(dataset.borderColor);
|
|
388
|
+
const base = Math.min(meta.yScale?.getPixelForValue(0) ?? chartArea.bottom, chartArea.bottom);
|
|
389
|
+
const degrade = ctx.createLinearGradient(0, chartArea.top, 0, chartArea.bottom);
|
|
390
|
+
degrade.addColorStop(0, comAlfa(cor, 0.1));
|
|
391
|
+
degrade.addColorStop(1, comAlfa(cor, 0.02));
|
|
392
|
+
trechos(meta.data).forEach((trecho) => {
|
|
393
|
+
ctx.beginPath();
|
|
394
|
+
tracar(ctx, trecho);
|
|
395
|
+
ctx.lineTo(trecho[trecho.length - 1].x, base);
|
|
396
|
+
ctx.lineTo(trecho[0].x, base);
|
|
397
|
+
ctx.closePath();
|
|
398
|
+
ctx.fillStyle = degrade;
|
|
399
|
+
ctx.fill();
|
|
359
400
|
});
|
|
360
|
-
if (meta.dataset)
|
|
361
|
-
meta.dataset._pointsUpdated = true;
|
|
362
401
|
});
|
|
402
|
+
series.forEach(({ dataset, meta }) => {
|
|
403
|
+
ctx.strokeStyle = String(dataset.borderColor);
|
|
404
|
+
ctx.lineWidth = 2;
|
|
405
|
+
trechos(meta.data).forEach((trecho) => {
|
|
406
|
+
ctx.beginPath();
|
|
407
|
+
tracar(ctx, trecho);
|
|
408
|
+
ctx.stroke();
|
|
409
|
+
});
|
|
410
|
+
});
|
|
411
|
+
ctx.restore();
|
|
363
412
|
}
|
|
364
413
|
};
|
|
365
414
|
var formatar = (eixo, valor) => eixo?.format ? eixo.format(valor) : String(valor);
|
|
366
|
-
|
|
415
|
+
var Chart = react.forwardRef(function Chart2({
|
|
367
416
|
type = "line",
|
|
368
417
|
stacked = false,
|
|
369
418
|
labels,
|
|
@@ -376,9 +425,11 @@ function Chart({
|
|
|
376
425
|
actions,
|
|
377
426
|
height = 266,
|
|
378
427
|
id,
|
|
379
|
-
className
|
|
380
|
-
|
|
428
|
+
className,
|
|
429
|
+
...props
|
|
430
|
+
}, ref) {
|
|
381
431
|
const raiz = react.useRef(null);
|
|
432
|
+
react.useImperativeHandle(ref, () => raiz.current);
|
|
382
433
|
const ajuda = react.useRef(null);
|
|
383
434
|
const [tema, setTema] = react.useState();
|
|
384
435
|
react.useLayoutEffect(() => {
|
|
@@ -411,22 +462,13 @@ function Chart({
|
|
|
411
462
|
data: s.data,
|
|
412
463
|
yAxisID: s.axis === "right" ? "y2" : "y",
|
|
413
464
|
borderColor: cor,
|
|
414
|
-
|
|
415
|
-
|
|
465
|
+
// A linha e a área são desenhadas pelo plugin curvaDoFigma.
|
|
466
|
+
showLine: false,
|
|
416
467
|
pointRadius: 0,
|
|
417
468
|
pointHoverRadius: 4,
|
|
418
469
|
pointHoverBorderWidth: 2,
|
|
419
470
|
pointHoverBorderColor: tema.superficie,
|
|
420
|
-
pointHoverBackgroundColor: cor
|
|
421
|
-
fill: "origin",
|
|
422
|
-
backgroundColor: (ctx) => {
|
|
423
|
-
const area = ctx.chart.chartArea;
|
|
424
|
-
if (!area) return comAlfa(cor, 0.1);
|
|
425
|
-
const degrade = ctx.chart.ctx.createLinearGradient(0, area.top, 0, area.bottom);
|
|
426
|
-
degrade.addColorStop(0, comAlfa(cor, 0.1));
|
|
427
|
-
degrade.addColorStop(1, comAlfa(cor, 0.02));
|
|
428
|
-
return degrade;
|
|
429
|
-
}
|
|
471
|
+
pointHoverBackgroundColor: cor
|
|
430
472
|
};
|
|
431
473
|
})
|
|
432
474
|
};
|
|
@@ -494,7 +536,7 @@ function Chart({
|
|
|
494
536
|
}, [tema, yAxis, y2Axis, temDireita, series, type, stacked]);
|
|
495
537
|
const card = Boolean(title || actions);
|
|
496
538
|
const classes = ["cr-chart", card && "cr-chart--card", className].filter(Boolean).join(" ");
|
|
497
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: raiz, id, className: classes, children: [
|
|
539
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props, ref: raiz, id, className: classes, children: [
|
|
498
540
|
card && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cr-chart__header", children: [
|
|
499
541
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cr-chart__title-row", children: [
|
|
500
542
|
title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cr-chart__title", children: title }),
|
|
@@ -537,25 +579,25 @@ function Chart({
|
|
|
537
579
|
}
|
|
538
580
|
),
|
|
539
581
|
s.label
|
|
540
|
-
] }, s.label)) })
|
|
582
|
+
] }, `${i}-${s.label}`)) })
|
|
541
583
|
] }),
|
|
542
|
-
/* @__PURE__ */ jsxRuntime.jsxs("table", { className: "cr-chart__table", children: [
|
|
584
|
+
/* @__PURE__ */ jsxRuntime.jsxs("table", { className: "cr-so-leitor cr-chart__table", children: [
|
|
543
585
|
title && /* @__PURE__ */ jsxRuntime.jsx("caption", { children: title }),
|
|
544
586
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
545
587
|
/* @__PURE__ */ jsxRuntime.jsx("td", {}),
|
|
546
|
-
series.map((s) => /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", children: s.label }, s.label))
|
|
588
|
+
series.map((s, i) => /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", children: s.label }, `${i}-${s.label}`))
|
|
547
589
|
] }) }),
|
|
548
590
|
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: labels.map((rotulo, linha) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
549
591
|
/* @__PURE__ */ jsxRuntime.jsx("th", { scope: "row", children: rotulo }),
|
|
550
|
-
series.map((s) => {
|
|
592
|
+
series.map((s, i) => {
|
|
551
593
|
const valor = s.data[linha];
|
|
552
594
|
const eixo = s.axis === "right" ? y2Axis : yAxis;
|
|
553
|
-
return /* @__PURE__ */ jsxRuntime.jsx("td", { children: valor == null ? "" : formatar(eixo, valor) }, s.label);
|
|
595
|
+
return /* @__PURE__ */ jsxRuntime.jsx("td", { children: valor == null ? "" : formatar(eixo, valor) }, `${i}-${s.label}`);
|
|
554
596
|
})
|
|
555
|
-
] }, rotulo)) })
|
|
597
|
+
] }, `${linha}-${rotulo}`)) })
|
|
556
598
|
] })
|
|
557
599
|
] });
|
|
558
|
-
}
|
|
600
|
+
});
|
|
559
601
|
var Checkbox = react.forwardRef(function Checkbox2({
|
|
560
602
|
label,
|
|
561
603
|
showLabel = true,
|
|
@@ -570,7 +612,8 @@ var Checkbox = react.forwardRef(function Checkbox2({
|
|
|
570
612
|
value,
|
|
571
613
|
id,
|
|
572
614
|
className,
|
|
573
|
-
style
|
|
615
|
+
style,
|
|
616
|
+
...props
|
|
574
617
|
}, ref) {
|
|
575
618
|
const autoId = react.useId();
|
|
576
619
|
const inputId = id ?? autoId;
|
|
@@ -613,7 +656,7 @@ var Checkbox = react.forwardRef(function Checkbox2({
|
|
|
613
656
|
root: {
|
|
614
657
|
className: `cr-checkbox__control${checked ? " cr-checkbox__control--checked" : ""}`
|
|
615
658
|
},
|
|
616
|
-
input: { className: "cr-checkbox__input" },
|
|
659
|
+
input: { ...props, className: "cr-checkbox__input" },
|
|
617
660
|
box: { className: "cr-checkbox__box" },
|
|
618
661
|
icon: { className: "cr-checkbox__icon", "aria-hidden": true }
|
|
619
662
|
}
|
|
@@ -622,7 +665,7 @@ var Checkbox = react.forwardRef(function Checkbox2({
|
|
|
622
665
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
623
666
|
"label",
|
|
624
667
|
{
|
|
625
|
-
className: `cr-checkbox__label${showLabel ? "" : " cr-checkbox__label--hidden"}`,
|
|
668
|
+
className: `cr-checkbox__label${showLabel ? "" : " cr-checkbox__label--hidden cr-so-leitor"}`,
|
|
626
669
|
htmlFor: inputId,
|
|
627
670
|
children: label
|
|
628
671
|
}
|
|
@@ -751,7 +794,7 @@ var IconButton = react.forwardRef(function IconButton2({
|
|
|
751
794
|
] });
|
|
752
795
|
});
|
|
753
796
|
var FOCAVEIS = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
754
|
-
|
|
797
|
+
var Drawer = react.forwardRef(function Drawer2({
|
|
755
798
|
visible,
|
|
756
799
|
onHide,
|
|
757
800
|
title,
|
|
@@ -766,8 +809,13 @@ function Drawer({
|
|
|
766
809
|
footer,
|
|
767
810
|
children,
|
|
768
811
|
id,
|
|
769
|
-
className
|
|
770
|
-
|
|
812
|
+
className,
|
|
813
|
+
...props
|
|
814
|
+
}, ref) {
|
|
815
|
+
const primeRef = react.useRef(null);
|
|
816
|
+
react.useImperativeHandle(ref, () => ({
|
|
817
|
+
getElement: () => primeRef.current?.getElement() ?? null
|
|
818
|
+
}));
|
|
771
819
|
const autoId = react.useId();
|
|
772
820
|
const titleId = `${autoId}-title`;
|
|
773
821
|
const subtitleId = `${autoId}-subtitle`;
|
|
@@ -816,6 +864,8 @@ function Drawer({
|
|
|
816
864
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
817
865
|
sidebar.Sidebar,
|
|
818
866
|
{
|
|
867
|
+
...props,
|
|
868
|
+
ref: primeRef,
|
|
819
869
|
unstyled: true,
|
|
820
870
|
id,
|
|
821
871
|
visible,
|
|
@@ -853,7 +903,7 @@ function Drawer({
|
|
|
853
903
|
panelRef.current = element;
|
|
854
904
|
if (behavior === "full") setRolagem(element);
|
|
855
905
|
},
|
|
856
|
-
className: "cr-drawer__panel",
|
|
906
|
+
className: "cr-rolagem-fina cr-drawer__panel",
|
|
857
907
|
tabIndex: behavior === "full" && rolavel ? 0 : void 0,
|
|
858
908
|
children: [
|
|
859
909
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cr-drawer__header", children: [
|
|
@@ -876,7 +926,7 @@ function Drawer({
|
|
|
876
926
|
"div",
|
|
877
927
|
{
|
|
878
928
|
ref: behavior === "fixed" ? setRolagem : void 0,
|
|
879
|
-
className: "cr-drawer__body",
|
|
929
|
+
className: "cr-rolagem-fina cr-drawer__body",
|
|
880
930
|
tabIndex: behavior === "fixed" && rolavel ? 0 : void 0,
|
|
881
931
|
children
|
|
882
932
|
}
|
|
@@ -899,7 +949,7 @@ function Drawer({
|
|
|
899
949
|
)
|
|
900
950
|
}
|
|
901
951
|
);
|
|
902
|
-
}
|
|
952
|
+
});
|
|
903
953
|
var Input = react.forwardRef(function Input2({
|
|
904
954
|
variant = "outline",
|
|
905
955
|
size = "large",
|
|
@@ -944,8 +994,8 @@ var Input = react.forwardRef(function Input2({
|
|
|
944
994
|
disabled,
|
|
945
995
|
invalid: Boolean(error),
|
|
946
996
|
"aria-invalid": error ? true : void 0,
|
|
947
|
-
|
|
948
|
-
|
|
997
|
+
...props,
|
|
998
|
+
"aria-describedby": juntarIds(supportText && hintId, props["aria-describedby"])
|
|
949
999
|
}
|
|
950
1000
|
),
|
|
951
1001
|
trailingIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cr-field__icon", children: trailingIcon })
|
|
@@ -968,7 +1018,8 @@ var Menu = react.forwardRef(function Menu2({
|
|
|
968
1018
|
onShow,
|
|
969
1019
|
onHide,
|
|
970
1020
|
id,
|
|
971
|
-
className
|
|
1021
|
+
className,
|
|
1022
|
+
...props
|
|
972
1023
|
}, ref) {
|
|
973
1024
|
const primeRef = react.useRef(null);
|
|
974
1025
|
const alvo = react.useRef(null);
|
|
@@ -1002,7 +1053,7 @@ var Menu = react.forwardRef(function Menu2({
|
|
|
1002
1053
|
className: [item.selected && "cr-menu__item--selected", item.className].filter(Boolean).join(" "),
|
|
1003
1054
|
data: { selected: item.selected }
|
|
1004
1055
|
}));
|
|
1005
|
-
const classes = ["cr-menu", `cr-menu--${density}`, popup && "cr-menu--popup", className].filter(Boolean).join(" ");
|
|
1056
|
+
const classes = ["cr-lista cr-menu", `cr-menu--${density}`, popup && "cr-menu--popup", className].filter(Boolean).join(" ");
|
|
1006
1057
|
const pt = {
|
|
1007
1058
|
// O nome acessível vai na lista (role=menu); o Prime lê `ariaLabel`, mas não o declara no tipo.
|
|
1008
1059
|
menu: {
|
|
@@ -1025,12 +1076,13 @@ var Menu = react.forwardRef(function Menu2({
|
|
|
1025
1076
|
transition: aoPosicionar(
|
|
1026
1077
|
() => queueMicrotask(() => seguirLado(primeRef.current?.getElement(), alvo.current))
|
|
1027
1078
|
),
|
|
1028
|
-
action: { className: "cr-menu__action" },
|
|
1079
|
+
action: { className: "cr-lista__item cr-menu__action" },
|
|
1029
1080
|
label: { className: "cr-menu__label" }
|
|
1030
1081
|
};
|
|
1031
1082
|
const menu$1 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1032
1083
|
menu.Menu,
|
|
1033
1084
|
{
|
|
1085
|
+
...props,
|
|
1034
1086
|
unstyled: true,
|
|
1035
1087
|
ref: primeRef,
|
|
1036
1088
|
id,
|
|
@@ -1119,16 +1171,11 @@ function Profile({ user, menu }) {
|
|
|
1119
1171
|
user.role && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cr-menubar__profile-role", children: user.role })
|
|
1120
1172
|
] }),
|
|
1121
1173
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1122
|
-
|
|
1174
|
+
"span",
|
|
1123
1175
|
{
|
|
1124
|
-
unstyled: true,
|
|
1125
1176
|
"aria-hidden": "true",
|
|
1126
1177
|
className: `cr-menubar__avatar${user.avatar ? "" : " cr-menubar__avatar--initial"}`,
|
|
1127
|
-
image: user.avatar,
|
|
1128
|
-
imageAlt: "",
|
|
1129
|
-
label: user.avatar ? void 0 : user.name.trim().charAt(0).toUpperCase(),
|
|
1130
|
-
shape: "circle",
|
|
1131
|
-
pt: { image: { className: "cr-menubar__avatar-image" } }
|
|
1178
|
+
children: user.avatar ? /* @__PURE__ */ jsxRuntime.jsx("img", { className: "cr-menubar__avatar-image", src: user.avatar, alt: "" }) : user.name.trim().charAt(0).toUpperCase()
|
|
1132
1179
|
}
|
|
1133
1180
|
)
|
|
1134
1181
|
] });
|
|
@@ -1177,7 +1224,8 @@ var Menubar = react.forwardRef(function Menubar2({
|
|
|
1177
1224
|
user,
|
|
1178
1225
|
userMenu,
|
|
1179
1226
|
id,
|
|
1180
|
-
className
|
|
1227
|
+
className,
|
|
1228
|
+
...props
|
|
1181
1229
|
}, ref) {
|
|
1182
1230
|
const [innerSearch, setInnerSearch] = react.useState("");
|
|
1183
1231
|
const search = searchValue ?? innerSearch;
|
|
@@ -1243,6 +1291,7 @@ var Menubar = react.forwardRef(function Menubar2({
|
|
|
1243
1291
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, id, className: classes, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1244
1292
|
menubar.Menubar,
|
|
1245
1293
|
{
|
|
1294
|
+
...props,
|
|
1246
1295
|
unstyled: true,
|
|
1247
1296
|
className: "cr-menubar__bar",
|
|
1248
1297
|
model: [],
|
|
@@ -1274,10 +1323,12 @@ var MenuPrincipal = react.forwardRef(
|
|
|
1274
1323
|
model,
|
|
1275
1324
|
popup = false,
|
|
1276
1325
|
"aria-label": ariaLabel = "Menu principal",
|
|
1326
|
+
"aria-labelledby": ariaLabelledBy,
|
|
1277
1327
|
onShow,
|
|
1278
1328
|
onHide,
|
|
1279
1329
|
id,
|
|
1280
|
-
className
|
|
1330
|
+
className,
|
|
1331
|
+
...props
|
|
1281
1332
|
}, ref) {
|
|
1282
1333
|
const primeRef = react.useRef(null);
|
|
1283
1334
|
const context = react.useContext(api.PrimeReactContext);
|
|
@@ -1327,7 +1378,15 @@ var MenuPrincipal = react.forwardRef(
|
|
|
1327
1378
|
item.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cr-menu-principal__description", children: item.description })
|
|
1328
1379
|
] }),
|
|
1329
1380
|
" ",
|
|
1330
|
-
item.tag && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1381
|
+
item.tag && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1382
|
+
Tag,
|
|
1383
|
+
{
|
|
1384
|
+
className: "cr-menu-principal__tag",
|
|
1385
|
+
variant: "warning",
|
|
1386
|
+
icon: item.tagIcon ?? /* @__PURE__ */ jsxRuntime.jsx(react$1.DribbbleLogo, {}),
|
|
1387
|
+
children: item.tag
|
|
1388
|
+
}
|
|
1389
|
+
)
|
|
1331
1390
|
]
|
|
1332
1391
|
}
|
|
1333
1392
|
)
|
|
@@ -1343,9 +1402,17 @@ var MenuPrincipal = react.forwardRef(
|
|
|
1343
1402
|
});
|
|
1344
1403
|
const classes = ["cr-menu-principal", popup && "cr-menu-principal--popup", className].filter(Boolean).join(" ");
|
|
1345
1404
|
const pt = {
|
|
1346
|
-
|
|
1405
|
+
// O nome acessível vai na lista (role=menu), como no Menu.
|
|
1406
|
+
menu: {
|
|
1407
|
+
className: "cr-menu-principal__list",
|
|
1408
|
+
"aria-label": ariaLabelledBy ? void 0 : ariaLabel,
|
|
1409
|
+
"aria-labelledby": ariaLabelledBy
|
|
1410
|
+
},
|
|
1347
1411
|
submenuHeader: { className: "cr-menu-principal__group" },
|
|
1348
|
-
|
|
1412
|
+
// O divisor tracejado é o Divider do Cristal (dashed).
|
|
1413
|
+
separator: {
|
|
1414
|
+
className: "cr-divider cr-divider--horizontal cr-divider--dashed cr-menu-principal__separator"
|
|
1415
|
+
},
|
|
1349
1416
|
menuitem: { className: "cr-menu-principal__item" },
|
|
1350
1417
|
// Lado do popup, medido logo depois de o Prime posicionar.
|
|
1351
1418
|
// Numa microtarefa: no onEnter o Prime ainda está religando a ref (como no Menu).
|
|
@@ -1356,6 +1423,7 @@ var MenuPrincipal = react.forwardRef(
|
|
|
1356
1423
|
const menu$1 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1357
1424
|
menu.Menu,
|
|
1358
1425
|
{
|
|
1426
|
+
...props,
|
|
1359
1427
|
unstyled: true,
|
|
1360
1428
|
ref: primeRef,
|
|
1361
1429
|
id,
|
|
@@ -1387,12 +1455,13 @@ var ICON = {
|
|
|
1387
1455
|
highlight: /* @__PURE__ */ jsxRuntime.jsx(react$1.SealWarning, {}),
|
|
1388
1456
|
neutral: /* @__PURE__ */ jsxRuntime.jsx(react$1.WarningCircle, {})
|
|
1389
1457
|
};
|
|
1390
|
-
var Message = react.forwardRef(function Message2({ type = "info", children, showIcon = true, id, className }, ref) {
|
|
1458
|
+
var Message = react.forwardRef(function Message2({ type = "info", children, showIcon = true, id, className, ...props }, ref) {
|
|
1391
1459
|
const primeRef = react.useRef(null);
|
|
1392
1460
|
react.useImperativeHandle(ref, () => primeRef.current?.getElement());
|
|
1393
1461
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1394
1462
|
message.Message,
|
|
1395
1463
|
{
|
|
1464
|
+
...props,
|
|
1396
1465
|
unstyled: true,
|
|
1397
1466
|
ref: primeRef,
|
|
1398
1467
|
id,
|
|
@@ -1408,9 +1477,10 @@ var Message = react.forwardRef(function Message2({ type = "info", children, show
|
|
|
1408
1477
|
}
|
|
1409
1478
|
);
|
|
1410
1479
|
});
|
|
1411
|
-
|
|
1480
|
+
var Modal = react.forwardRef(function Modal2({
|
|
1412
1481
|
visible,
|
|
1413
1482
|
onHide,
|
|
1483
|
+
dismissableMask = true,
|
|
1414
1484
|
title,
|
|
1415
1485
|
size = "large",
|
|
1416
1486
|
onHelp,
|
|
@@ -1420,8 +1490,13 @@ function Modal({
|
|
|
1420
1490
|
footerStart,
|
|
1421
1491
|
children,
|
|
1422
1492
|
id,
|
|
1423
|
-
className
|
|
1424
|
-
|
|
1493
|
+
className,
|
|
1494
|
+
...props
|
|
1495
|
+
}, ref) {
|
|
1496
|
+
const primeRef = react.useRef(null);
|
|
1497
|
+
react.useImperativeHandle(ref, () => ({
|
|
1498
|
+
getElement: () => primeRef.current?.getElement() ?? null
|
|
1499
|
+
}));
|
|
1425
1500
|
const autoId = react.useId();
|
|
1426
1501
|
const titleId = `${autoId}-title`;
|
|
1427
1502
|
const [body, setBody] = react.useState(null);
|
|
@@ -1439,10 +1514,13 @@ function Modal({
|
|
|
1439
1514
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1440
1515
|
dialog.Dialog,
|
|
1441
1516
|
{
|
|
1517
|
+
...props,
|
|
1518
|
+
ref: primeRef,
|
|
1442
1519
|
unstyled: true,
|
|
1443
1520
|
id,
|
|
1444
1521
|
visible,
|
|
1445
1522
|
onHide,
|
|
1523
|
+
dismissableMask,
|
|
1446
1524
|
draggable: false,
|
|
1447
1525
|
resizable: false,
|
|
1448
1526
|
blockScroll: true,
|
|
@@ -1485,7 +1563,7 @@ function Modal({
|
|
|
1485
1563
|
"div",
|
|
1486
1564
|
{
|
|
1487
1565
|
ref: setBody,
|
|
1488
|
-
className: "cr-modal__body",
|
|
1566
|
+
className: "cr-rolagem-fina cr-modal__body",
|
|
1489
1567
|
tabIndex: rolavel ? 0 : void 0,
|
|
1490
1568
|
children
|
|
1491
1569
|
}
|
|
@@ -1497,7 +1575,7 @@ function Modal({
|
|
|
1497
1575
|
] })
|
|
1498
1576
|
}
|
|
1499
1577
|
);
|
|
1500
|
-
}
|
|
1578
|
+
});
|
|
1501
1579
|
var MultiSelect = react.forwardRef(function MultiSelect2({
|
|
1502
1580
|
variant = "outline",
|
|
1503
1581
|
size = "large",
|
|
@@ -1582,9 +1660,9 @@ var MultiSelect = react.forwardRef(function MultiSelect2({
|
|
|
1582
1660
|
);
|
|
1583
1661
|
};
|
|
1584
1662
|
const checkbox = {
|
|
1585
|
-
root: { className: "cr-multiselect__checkbox" },
|
|
1586
|
-
box: { className: "cr-multiselect__checkbox-box" },
|
|
1587
|
-
input: { className: "cr-multiselect__checkbox-input" }
|
|
1663
|
+
root: { className: "cr-checkbox__control cr-multiselect__checkbox" },
|
|
1664
|
+
box: { className: "cr-checkbox__box cr-multiselect__checkbox-box" },
|
|
1665
|
+
input: { className: "cr-checkbox__input cr-multiselect__checkbox-input" }
|
|
1588
1666
|
};
|
|
1589
1667
|
const pt = {
|
|
1590
1668
|
// Com a lista aberta o foco vai para a busca (no body), fora da caixa: o estado Focused do
|
|
@@ -1595,16 +1673,16 @@ var MultiSelect = react.forwardRef(function MultiSelect2({
|
|
|
1595
1673
|
className: `cr-field__control cr-multiselect__control${open ? " cr-multiselect__control--open" : ""}`
|
|
1596
1674
|
};
|
|
1597
1675
|
},
|
|
1598
|
-
hiddenInputWrapper: { className: "cr-multiselect__hidden" },
|
|
1676
|
+
hiddenInputWrapper: { className: "cr-so-leitor cr-multiselect__hidden" },
|
|
1599
1677
|
input: {
|
|
1600
|
-
"aria-describedby": supportText
|
|
1678
|
+
"aria-describedby": juntarIds(supportText && hintId, props["aria-describedby"]),
|
|
1601
1679
|
"aria-invalid": error ? true : void 0,
|
|
1602
1680
|
"aria-required": required || void 0
|
|
1603
1681
|
},
|
|
1604
1682
|
labelContainer: { className: "cr-multiselect__value" },
|
|
1605
1683
|
label: { className: "cr-multiselect__chips" },
|
|
1606
1684
|
trigger: { className: "cr-field__icon cr-multiselect__trigger" },
|
|
1607
|
-
panel: { className: `cr-multiselect__panel cr-multiselect__panel--${density}` },
|
|
1685
|
+
panel: { className: `cr-lista cr-multiselect__panel cr-multiselect__panel--${density}` },
|
|
1608
1686
|
header: { className: "cr-multiselect__header" },
|
|
1609
1687
|
headerCheckboxContainer: { className: "cr-multiselect__select-all" },
|
|
1610
1688
|
// O Prime repete role=checkbox na <div> em volta do <input>: o leitor de tela veria dois.
|
|
@@ -1619,13 +1697,13 @@ var MultiSelect = react.forwardRef(function MultiSelect2({
|
|
|
1619
1697
|
root: { className: "cr-multiselect__search-input", "aria-label": filterPlaceholder }
|
|
1620
1698
|
},
|
|
1621
1699
|
closeButton: { className: "cr-multiselect__close" },
|
|
1622
|
-
wrapper: { className: "cr-
|
|
1623
|
-
list: { className: "cr-
|
|
1700
|
+
wrapper: { className: "cr-lista__rolagem" },
|
|
1701
|
+
list: { className: "cr-lista__itens" },
|
|
1624
1702
|
item: (options2) => {
|
|
1625
1703
|
const context = options2?.context;
|
|
1626
1704
|
const focused = context !== void 0 && context.focusedIndex === context.index;
|
|
1627
1705
|
return {
|
|
1628
|
-
className: `cr-multiselect__item${focused ? " cr-multiselect__item--focused" : ""}`
|
|
1706
|
+
className: `cr-lista__item cr-multiselect__item${focused ? " cr-multiselect__item--focused" : ""}`
|
|
1629
1707
|
};
|
|
1630
1708
|
},
|
|
1631
1709
|
checkboxContainer: { className: "cr-multiselect__item-checkbox" },
|
|
@@ -1800,7 +1878,8 @@ var Select = react.forwardRef(function Select2({
|
|
|
1800
1878
|
disabled,
|
|
1801
1879
|
id,
|
|
1802
1880
|
name,
|
|
1803
|
-
className
|
|
1881
|
+
className,
|
|
1882
|
+
...props
|
|
1804
1883
|
}, ref) {
|
|
1805
1884
|
const autoId = react.useId();
|
|
1806
1885
|
const inputId = id ?? autoId;
|
|
@@ -1833,11 +1912,11 @@ var Select = react.forwardRef(function Select2({
|
|
|
1833
1912
|
},
|
|
1834
1913
|
// O <select> escondido do Prime só existe para formulários: fora da árvore de acessibilidade.
|
|
1835
1914
|
select: { "aria-hidden": true },
|
|
1836
|
-
hiddenSelectedMessage: { className: "cr-select__hidden" },
|
|
1915
|
+
hiddenSelectedMessage: { className: "cr-so-leitor cr-select__hidden" },
|
|
1837
1916
|
// O Prime usa a mesma chave no texto do campo e no combobox escondido.
|
|
1838
1917
|
input: { className: "cr-select__value" },
|
|
1839
1918
|
trigger: { className: "cr-field__icon cr-select__trigger", "aria-hidden": true },
|
|
1840
|
-
panel: { className: "cr-select__panel" },
|
|
1919
|
+
panel: { className: "cr-lista cr-select__panel" },
|
|
1841
1920
|
// Lado da lista (acima ou abaixo do campo), medido logo depois de o Prime posicionar.
|
|
1842
1921
|
transition: aoPosicionar(
|
|
1843
1922
|
() => seguirLado(
|
|
@@ -1845,17 +1924,17 @@ var Select = react.forwardRef(function Select2({
|
|
|
1845
1924
|
document.getElementById(inputId)?.closest(".cr-select__control")
|
|
1846
1925
|
)
|
|
1847
1926
|
),
|
|
1848
|
-
wrapper: { className: "cr-select__wrapper" },
|
|
1849
|
-
list: { className: "cr-select__list", id: listId },
|
|
1927
|
+
wrapper: { className: "cr-lista__rolagem cr-select__wrapper" },
|
|
1928
|
+
list: { className: "cr-lista__itens cr-select__list", id: listId },
|
|
1850
1929
|
// Selecionado e em foco (teclado) pelo contexto do pt, a API pública do Prime (não data-p-*).
|
|
1851
1930
|
item: ({ context }) => ({
|
|
1852
1931
|
className: [
|
|
1853
|
-
"cr-select__item",
|
|
1854
|
-
context.selected && "cr-
|
|
1855
|
-
context.focused && "cr-
|
|
1932
|
+
"cr-lista__item cr-select__item",
|
|
1933
|
+
context.selected && "cr-lista__item--selecionado",
|
|
1934
|
+
context.focused && "cr-lista__item--focado"
|
|
1856
1935
|
].filter(Boolean).join(" ")
|
|
1857
1936
|
}),
|
|
1858
|
-
emptyMessage: { className: "cr-select__item cr-select__empty" }
|
|
1937
|
+
emptyMessage: { className: "cr-lista__item cr-select__item cr-select__empty" }
|
|
1859
1938
|
};
|
|
1860
1939
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes, children: [
|
|
1861
1940
|
label && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "cr-field__label", htmlFor: inputId, children: [
|
|
@@ -1865,6 +1944,7 @@ var Select = react.forwardRef(function Select2({
|
|
|
1865
1944
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1866
1945
|
dropdown.Dropdown,
|
|
1867
1946
|
{
|
|
1947
|
+
...props,
|
|
1868
1948
|
unstyled: true,
|
|
1869
1949
|
inputId,
|
|
1870
1950
|
focusInputRef: setInputRef,
|
|
@@ -1887,7 +1967,7 @@ var Select = react.forwardRef(function Select2({
|
|
|
1887
1967
|
"aria-label": label ? void 0 : ariaLabel,
|
|
1888
1968
|
"aria-expanded": open,
|
|
1889
1969
|
"aria-controls": open ? listId : void 0,
|
|
1890
|
-
"aria-describedby": supportText
|
|
1970
|
+
"aria-describedby": juntarIds(supportText && hintId, props["aria-describedby"]),
|
|
1891
1971
|
"aria-invalid": error ? true : void 0,
|
|
1892
1972
|
"aria-required": required || void 0,
|
|
1893
1973
|
pt
|
|
@@ -1919,7 +1999,8 @@ var Paginator = react.forwardRef(function Paginator2({
|
|
|
1919
1999
|
onPageChange,
|
|
1920
2000
|
rowsPerPageLabel = "Itens por p\xE1gina",
|
|
1921
2001
|
id,
|
|
1922
|
-
className
|
|
2002
|
+
className,
|
|
2003
|
+
...props
|
|
1923
2004
|
}, ref) {
|
|
1924
2005
|
const primeRef = react.useRef(null);
|
|
1925
2006
|
react.useImperativeHandle(ref, () => primeRef.current?.getElement());
|
|
@@ -1931,6 +2012,7 @@ var Paginator = react.forwardRef(function Paginator2({
|
|
|
1931
2012
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1932
2013
|
paginator.Paginator,
|
|
1933
2014
|
{
|
|
2015
|
+
...props,
|
|
1934
2016
|
unstyled: true,
|
|
1935
2017
|
ref: primeRef,
|
|
1936
2018
|
id,
|
|
@@ -2018,7 +2100,8 @@ var Radio = react.forwardRef(function Radio2({
|
|
|
2018
2100
|
required,
|
|
2019
2101
|
id,
|
|
2020
2102
|
className,
|
|
2021
|
-
style
|
|
2103
|
+
style,
|
|
2104
|
+
...props
|
|
2022
2105
|
}, ref) {
|
|
2023
2106
|
const autoId = react.useId();
|
|
2024
2107
|
const inputId = id ?? autoId;
|
|
@@ -2044,7 +2127,7 @@ var Radio = react.forwardRef(function Radio2({
|
|
|
2044
2127
|
pt: {
|
|
2045
2128
|
// Marcado pela prop do Cristal, não pelo atributo interno do Prime (data-p-checked).
|
|
2046
2129
|
root: { className: `cr-radio__control${checked ? " cr-radio__control--checked" : ""}` },
|
|
2047
|
-
input: { className: "cr-radio__input" },
|
|
2130
|
+
input: { ...props, className: "cr-radio__input" },
|
|
2048
2131
|
box: { className: "cr-radio__box" },
|
|
2049
2132
|
icon: { className: "cr-radio__icon" }
|
|
2050
2133
|
}
|
|
@@ -2053,7 +2136,7 @@ var Radio = react.forwardRef(function Radio2({
|
|
|
2053
2136
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2054
2137
|
"label",
|
|
2055
2138
|
{
|
|
2056
|
-
className: `cr-radio__label${showLabel ? "" : " cr-radio__label--hidden"}`,
|
|
2139
|
+
className: `cr-radio__label${showLabel ? "" : " cr-radio__label--hidden cr-so-leitor"}`,
|
|
2057
2140
|
htmlFor: inputId,
|
|
2058
2141
|
children: label
|
|
2059
2142
|
}
|
|
@@ -2061,7 +2144,15 @@ var Radio = react.forwardRef(function Radio2({
|
|
|
2061
2144
|
] });
|
|
2062
2145
|
});
|
|
2063
2146
|
var porcentagem = (posicao, total, visivel) => total > visivel ? Math.round(posicao / (total - visivel) * 100) : 0;
|
|
2064
|
-
var ScrollPanel = react.forwardRef(function ScrollPanel2({
|
|
2147
|
+
var ScrollPanel = react.forwardRef(function ScrollPanel2({
|
|
2148
|
+
children,
|
|
2149
|
+
"aria-label": ariaLabel,
|
|
2150
|
+
"aria-labelledby": ariaLabelledBy,
|
|
2151
|
+
style,
|
|
2152
|
+
id,
|
|
2153
|
+
className,
|
|
2154
|
+
...props
|
|
2155
|
+
}, ref) {
|
|
2065
2156
|
const primeRef = react.useRef(null);
|
|
2066
2157
|
react.useImperativeHandle(ref, () => primeRef.current?.getElement());
|
|
2067
2158
|
const contentId = `${react.useId()}-content`;
|
|
@@ -2096,7 +2187,7 @@ var ScrollPanel = react.forwardRef(function ScrollPanel2({ children, "aria-label
|
|
|
2096
2187
|
barx: barra("horizontal", posicao.x),
|
|
2097
2188
|
bary: barra("vertical", posicao.y)
|
|
2098
2189
|
};
|
|
2099
|
-
return /* @__PURE__ */ jsxRuntime.jsx(scrollpanel.ScrollPanel, { unstyled: true, ref: primeRef, id, pt, children });
|
|
2190
|
+
return /* @__PURE__ */ jsxRuntime.jsx(scrollpanel.ScrollPanel, { ...props, unstyled: true, ref: primeRef, id, pt, children });
|
|
2100
2191
|
});
|
|
2101
2192
|
var SegmentControl = react.forwardRef(
|
|
2102
2193
|
function SegmentControl2({
|
|
@@ -2108,7 +2199,8 @@ var SegmentControl = react.forwardRef(
|
|
|
2108
2199
|
"aria-labelledby": ariaLabelledBy,
|
|
2109
2200
|
disabled,
|
|
2110
2201
|
id,
|
|
2111
|
-
className
|
|
2202
|
+
className,
|
|
2203
|
+
...props
|
|
2112
2204
|
}, ref) {
|
|
2113
2205
|
const primeRef = react.useRef(null);
|
|
2114
2206
|
react.useImperativeHandle(ref, () => primeRef.current?.getElement());
|
|
@@ -2116,6 +2208,7 @@ var SegmentControl = react.forwardRef(
|
|
|
2116
2208
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2117
2209
|
selectbutton.SelectButton,
|
|
2118
2210
|
{
|
|
2211
|
+
...props,
|
|
2119
2212
|
unstyled: true,
|
|
2120
2213
|
ref: primeRef,
|
|
2121
2214
|
id,
|
|
@@ -2160,7 +2253,8 @@ var Switch = react.forwardRef(function Switch2({
|
|
|
2160
2253
|
name,
|
|
2161
2254
|
id,
|
|
2162
2255
|
className,
|
|
2163
|
-
style
|
|
2256
|
+
style,
|
|
2257
|
+
...props
|
|
2164
2258
|
}, ref) {
|
|
2165
2259
|
const autoId = react.useId();
|
|
2166
2260
|
const inputId = id ?? autoId;
|
|
@@ -2189,7 +2283,7 @@ var Switch = react.forwardRef(function Switch2({
|
|
|
2189
2283
|
role: void 0,
|
|
2190
2284
|
"aria-checked": void 0
|
|
2191
2285
|
},
|
|
2192
|
-
input: { className: "cr-switch__input" },
|
|
2286
|
+
input: { ...props, className: "cr-switch__input" },
|
|
2193
2287
|
slider: { className: "cr-switch__track" }
|
|
2194
2288
|
}
|
|
2195
2289
|
}
|
|
@@ -2197,7 +2291,7 @@ var Switch = react.forwardRef(function Switch2({
|
|
|
2197
2291
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2198
2292
|
"label",
|
|
2199
2293
|
{
|
|
2200
|
-
className: `cr-switch__label${showLabel ? "" : " cr-switch__label--hidden"}`,
|
|
2294
|
+
className: `cr-switch__label${showLabel ? "" : " cr-switch__label--hidden cr-so-leitor"}`,
|
|
2201
2295
|
htmlFor: inputId,
|
|
2202
2296
|
children: label
|
|
2203
2297
|
}
|
|
@@ -2207,7 +2301,7 @@ var Switch = react.forwardRef(function Switch2({
|
|
|
2207
2301
|
function TabPanel(_props) {
|
|
2208
2302
|
return null;
|
|
2209
2303
|
}
|
|
2210
|
-
var Tabs = react.forwardRef(function Tabs2({ activeIndex, onTabChange, children, id, className }, ref) {
|
|
2304
|
+
var Tabs = react.forwardRef(function Tabs2({ activeIndex, onTabChange, children, id, className, ...props }, ref) {
|
|
2211
2305
|
const primeRef = react.useRef(null);
|
|
2212
2306
|
react.useImperativeHandle(ref, () => primeRef.current?.getElement());
|
|
2213
2307
|
const [interno, setInterno] = react.useState(0);
|
|
@@ -2250,6 +2344,7 @@ var Tabs = react.forwardRef(function Tabs2({ activeIndex, onTabChange, children,
|
|
|
2250
2344
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2251
2345
|
tabview.TabView,
|
|
2252
2346
|
{
|
|
2347
|
+
...props,
|
|
2253
2348
|
unstyled: true,
|
|
2254
2349
|
ref: primeRef,
|
|
2255
2350
|
id,
|