@vector-business-services/cristal-ds-web 0.20.0 → 0.22.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.js CHANGED
@@ -1,6 +1,6 @@
1
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 { CaretDown, WarningCircle, Info, Question, Check, CircleNotch, ArrowLeft, X, MagnifyingGlass, ArrowsInSimple, ArrowsOutSimple, CaretUp, Funnel, CalendarDot, List, DribbbleLogo, SealWarning, XCircle, CheckCircle, Warning, Note, ArrowsInLineHorizontal, SortAscending, SortDescending, DotsThreeVertical, CaretLeft, CaretRight, Trash, CaretDoubleRight, CaretDoubleLeft, GearSix } from '@phosphor-icons/react';
3
+ import { CaretDown, WarningCircle, Info, Question, Check, CircleNotch, CalendarDots, ArrowLeft, X, MagnifyingGlass, ArrowsInSimple, ArrowsOutSimple, CaretUp, Funnel, CalendarDot, List, DribbbleLogo, SealWarning, XCircle, CheckCircle, Warning, Note, ArrowsInLineHorizontal, SortAscending, SortDescending, DotsThreeVertical, CaretLeft, CaretRight, Trash, CaretDoubleRight, CaretDoubleLeft, GearSix } 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';
@@ -14,9 +14,11 @@ import { Checkbox as Checkbox$1 } from 'primereact/checkbox';
14
14
  import { Chip as Chip$1 } from 'primereact/chip';
15
15
  import { ContextMenu as ContextMenu$1 } from 'primereact/contextmenu';
16
16
  import { Menu as Menu$1 } from 'primereact/menu';
17
+ import { InputText } from 'primereact/inputtext';
18
+ import { RadioButton } from 'primereact/radiobutton';
19
+ import { OverlayPanel } from 'primereact/overlaypanel';
17
20
  import { Divider as Divider$1 } from 'primereact/divider';
18
21
  import { Sidebar } from 'primereact/sidebar';
19
- import { InputText } from 'primereact/inputtext';
20
22
  import { Menubar as Menubar$1 } from 'primereact/menubar';
21
23
  import { Tag as Tag$1 } from 'primereact/tag';
22
24
  import { Message as Message$1 } from 'primereact/message';
@@ -26,7 +28,6 @@ import { TabMenu } from 'primereact/tabmenu';
26
28
  import { Paginator as Paginator$1 } from 'primereact/paginator';
27
29
  import { Dropdown } from 'primereact/dropdown';
28
30
  import { Panel as Panel$1 } from 'primereact/panel';
29
- import { RadioButton } from 'primereact/radiobutton';
30
31
  import { ScrollPanel as ScrollPanel$1 } from 'primereact/scrollpanel';
31
32
  import { SelectButton } from 'primereact/selectbutton';
32
33
  import { Skeleton as Skeleton$1 } from 'primereact/skeleton';
@@ -311,16 +312,16 @@ addLocale(LOCALE, {
311
312
  nextDecade: "Pr\xF3xima d\xE9cada"
312
313
  });
313
314
  function seguirFocoDoDia(event) {
314
- const dia = event.target;
315
- if (!(dia instanceof HTMLElement) || !dia.classList.contains("cr-calendar__date")) return;
316
- const painel = dia.closest(".cr-calendar");
317
- const td = dia.closest("td");
318
- const mes = dia.closest(".cr-calendar__month");
315
+ const dia2 = event.target;
316
+ if (!(dia2 instanceof HTMLElement) || !dia2.classList.contains("cr-calendar__date")) return;
317
+ const painel = dia2.closest(".cr-calendar");
318
+ const td = dia2.closest("td");
319
+ const mes = dia2.closest(".cr-calendar__month");
319
320
  if (!painel || !td || !mes || event.relatedTarget) return;
320
321
  const indice = [...painel.querySelectorAll(".cr-calendar__month")].indexOf(mes);
321
322
  const { pDay, pMonth, pYear } = td.dataset;
322
323
  requestAnimationFrame(() => {
323
- if (dia.isConnected || document.activeElement !== document.body) return;
324
+ if (dia2.isConnected || document.activeElement !== document.body) return;
324
325
  const novo = painel.querySelectorAll(".cr-calendar__month")[indice]?.querySelector(
325
326
  `td[data-p-day="${pDay}"][data-p-month="${pMonth}"][data-p-year="${pYear}"] .cr-calendar__date`
326
327
  );
@@ -335,26 +336,26 @@ var setas = {
335
336
  prevIcon: /* @__PURE__ */ jsx("span", { className: "cr-icon-button__icon", children: /* @__PURE__ */ jsx(CaretLeft, {}) }),
336
337
  nextIcon: /* @__PURE__ */ jsx("span", { className: "cr-icon-button__icon", children: /* @__PURE__ */ jsx(CaretRight, {}) })
337
338
  };
338
- var mesmoDia = (data, dia) => data instanceof Date && data.getDate() === dia.day && data.getMonth() === dia.month && data.getFullYear() === dia.year;
339
- var chave = (dia) => dia.year * 1e4 + dia.month * 100 + dia.day;
339
+ var mesmoDia = (data, dia2) => data instanceof Date && data.getDate() === dia2.day && data.getMonth() === dia2.month && data.getFullYear() === dia2.year;
340
+ var chave = (dia2) => dia2.year * 1e4 + dia2.month * 100 + dia2.day;
340
341
  var chaveDe = (data) => chave({ day: data.getDate(), month: data.getMonth(), year: data.getFullYear() });
341
- function escolhido(props, dia) {
342
+ function escolhido(props, dia2) {
342
343
  const { value } = props;
343
- if (value instanceof Date) return mesmoDia(value, dia);
344
+ if (value instanceof Date) return mesmoDia(value, dia2);
344
345
  if (!Array.isArray(value)) return false;
345
346
  if (props.selectionMode === "range") {
346
347
  const [inicio, fim] = value;
347
348
  if (!inicio) return false;
348
- return chave(dia) >= chaveDe(inicio) && chave(dia) <= chaveDe(fim ?? inicio);
349
+ return chave(dia2) >= chaveDe(inicio) && chave(dia2) <= chaveDe(fim ?? inicio);
349
350
  }
350
- return value.some((data) => mesmoDia(data, dia));
351
+ return value.some((data) => mesmoDia(data, dia2));
351
352
  }
352
- function noPeriodo(props, dia) {
353
+ function noPeriodo(props, dia2) {
353
354
  if (props.selectionMode !== "range" || !Array.isArray(props.value)) return void 0;
354
355
  const [inicio, fim] = props.value;
355
- if (mesmoDia(inicio, dia) || mesmoDia(fim, dia)) return "cr-calendar__day--edge";
356
+ if (mesmoDia(inicio, dia2) || mesmoDia(fim, dia2)) return "cr-calendar__day--edge";
356
357
  if (inicio && fim) {
357
- const data = new Date(dia.year, dia.month, dia.day);
358
+ const data = new Date(dia2.year, dia2.month, dia2.day);
358
359
  if (data > inicio && data < fim) return "cr-calendar__day--middle";
359
360
  }
360
361
  return void 0;
@@ -377,20 +378,20 @@ function ptDoPainel(offDays = []) {
377
378
  table: { className: "cr-calendar__table" },
378
379
  tableHeaderCell: { className: "cr-calendar__weekday" },
379
380
  day: ({ props, context }) => {
380
- const dia = context.date;
381
+ const dia2 = context.date;
381
382
  const meses = localeOption("monthNames", props.locale ?? LOCALE);
382
383
  return {
383
384
  // O Prime põe o escolhido e o desabilitado no <span> do dia, que não tem papel: eles vão
384
385
  // para a célula da grade (gridcell). O nome da célula inclui o número que aparece nela.
385
- "aria-selected": escolhido(props, dia),
386
- "aria-disabled": dia.selectable ? void 0 : true,
387
- "aria-label": `${dia.day} de ${meses[dia.month]?.toLowerCase()} de ${dia.year}`,
386
+ "aria-selected": escolhido(props, dia2),
387
+ "aria-disabled": dia2.selectable ? void 0 : true,
388
+ "aria-label": `${dia2.day} de ${meses[dia2.month]?.toLowerCase()} de ${dia2.year}`,
388
389
  className: classes(
389
390
  "cr-calendar__day",
390
391
  context.today && "cr-calendar__day--today",
391
392
  context.otherMonth && "cr-calendar__day--other-month",
392
- offDays.some((data) => mesmoDia(data, dia)) && "cr-calendar__day--off",
393
- noPeriodo(props, dia)
393
+ offDays.some((data) => mesmoDia(data, dia2)) && "cr-calendar__day--off",
394
+ noPeriodo(props, dia2)
394
395
  )
395
396
  };
396
397
  },
@@ -1109,6 +1110,255 @@ var ContextMenu = forwardRef(function ContextMenu2({
1109
1110
  }
1110
1111
  );
1111
1112
  });
1113
+ var Input = forwardRef(function Input2({
1114
+ variant = "outline",
1115
+ size = "large",
1116
+ label,
1117
+ leadingIcon,
1118
+ trailingIcon,
1119
+ hint,
1120
+ error,
1121
+ id,
1122
+ required,
1123
+ disabled,
1124
+ className,
1125
+ ...props
1126
+ }, ref) {
1127
+ const autoId = useId();
1128
+ const inputId = id ?? autoId;
1129
+ const hintId = `${inputId}-hint`;
1130
+ const supportText = error ?? hint;
1131
+ const classes2 = [
1132
+ "cr-field",
1133
+ `cr-field--${variant}`,
1134
+ `cr-field--${size}`,
1135
+ error && "cr-field--error",
1136
+ disabled && "cr-field--disabled",
1137
+ className
1138
+ ].filter(Boolean).join(" ");
1139
+ return /* @__PURE__ */ jsxs("div", { className: classes2, children: [
1140
+ label && /* @__PURE__ */ jsxs("label", { className: "cr-field__label", htmlFor: inputId, children: [
1141
+ label,
1142
+ required && /* @__PURE__ */ jsx("span", { className: "cr-field__required", "aria-hidden": "true", children: "*" })
1143
+ ] }),
1144
+ /* @__PURE__ */ jsxs("div", { className: "cr-field__control", children: [
1145
+ leadingIcon && /* @__PURE__ */ jsx("span", { className: "cr-field__icon", "aria-hidden": "true", children: leadingIcon }),
1146
+ /* @__PURE__ */ jsx(
1147
+ InputText,
1148
+ {
1149
+ unstyled: true,
1150
+ ref,
1151
+ id: inputId,
1152
+ className: "cr-field__input",
1153
+ required,
1154
+ disabled,
1155
+ invalid: Boolean(error),
1156
+ "aria-invalid": error ? true : void 0,
1157
+ ...props,
1158
+ "aria-describedby": juntarIds(supportText && hintId, props["aria-describedby"])
1159
+ }
1160
+ ),
1161
+ trailingIcon && /* @__PURE__ */ jsx("span", { className: "cr-field__icon", children: trailingIcon })
1162
+ ] }),
1163
+ supportText && /* @__PURE__ */ jsxs("p", { id: hintId, className: `cr-field__hint${error ? " cr-field__hint--error" : ""}`, children: [
1164
+ /* @__PURE__ */ jsx("span", { className: "cr-field__hint-icon", "aria-hidden": "true", children: error ? /* @__PURE__ */ jsx(WarningCircle, {}) : /* @__PURE__ */ jsx(Info, {}) }),
1165
+ supportText
1166
+ ] })
1167
+ ] });
1168
+ });
1169
+ var Radio = forwardRef(function Radio2({
1170
+ label,
1171
+ showLabel = true,
1172
+ labelSize = "default",
1173
+ checked = false,
1174
+ value,
1175
+ name,
1176
+ onChange,
1177
+ disabled,
1178
+ required,
1179
+ id,
1180
+ className,
1181
+ style,
1182
+ ...props
1183
+ }, ref) {
1184
+ const autoId = useId();
1185
+ const inputId = id ?? autoId;
1186
+ const classes2 = [
1187
+ "cr-radio",
1188
+ `cr-radio--label-${labelSize}`,
1189
+ disabled && "cr-radio--disabled",
1190
+ className
1191
+ ].filter(Boolean).join(" ");
1192
+ return /* @__PURE__ */ jsxs("div", { className: classes2, style, children: [
1193
+ /* @__PURE__ */ jsx(
1194
+ RadioButton,
1195
+ {
1196
+ unstyled: true,
1197
+ inputRef: ref,
1198
+ inputId,
1199
+ checked,
1200
+ value,
1201
+ name,
1202
+ onChange,
1203
+ disabled,
1204
+ required,
1205
+ pt: {
1206
+ // Marcado pela prop do Cristal, não pelo atributo interno do Prime (data-p-checked).
1207
+ root: { className: `cr-radio__control${checked ? " cr-radio__control--checked" : ""}` },
1208
+ input: { ...props, className: "cr-radio__input" },
1209
+ box: { className: "cr-radio__box" },
1210
+ icon: { className: "cr-radio__icon" }
1211
+ }
1212
+ }
1213
+ ),
1214
+ /* @__PURE__ */ jsx(
1215
+ "label",
1216
+ {
1217
+ className: `cr-radio__label${showLabel ? "" : " cr-radio__label--hidden cr-so-leitor"}`,
1218
+ htmlFor: inputId,
1219
+ children: label
1220
+ }
1221
+ )
1222
+ ] });
1223
+ });
1224
+
1225
+ // src/components/Calendar/periodos.ts
1226
+ var dia = (ano, mes, numero) => new Date(ano, mes, numero);
1227
+ var semHora = (data) => dia(data.getFullYear(), data.getMonth(), data.getDate());
1228
+ var menos = (data, dias) => dia(data.getFullYear(), data.getMonth(), data.getDate() - dias);
1229
+ var DATE_PERIODS = {
1230
+ today: { label: "Hoje", range: (hoje) => [semHora(hoje), semHora(hoje)] },
1231
+ yesterday: { label: "Ontem", range: (hoje) => [menos(hoje, 1), menos(hoje, 1)] },
1232
+ last7Days: { label: "\xDAltimos 7 dias", range: (hoje) => [menos(hoje, 6), semHora(hoje)] },
1233
+ last14Days: { label: "\xDAltimos 14 dias", range: (hoje) => [menos(hoje, 13), semHora(hoje)] },
1234
+ last30Days: { label: "\xDAltimos 30 dias", range: (hoje) => [menos(hoje, 29), semHora(hoje)] },
1235
+ thisMonth: {
1236
+ label: "Este m\xEAs",
1237
+ range: (hoje) => [dia(hoje.getFullYear(), hoje.getMonth(), 1), semHora(hoje)]
1238
+ },
1239
+ // A semana começa no domingo, como no calendário.
1240
+ lastWeek: {
1241
+ label: "Semana passada",
1242
+ range: (hoje) => {
1243
+ const domingo = menos(hoje, hoje.getDay() + 7);
1244
+ return [domingo, menos(domingo, -6)];
1245
+ }
1246
+ },
1247
+ lastMonth: {
1248
+ label: "M\xEAs passado",
1249
+ range: (hoje) => [
1250
+ dia(hoje.getFullYear(), hoje.getMonth() - 1, 1),
1251
+ dia(hoje.getFullYear(), hoje.getMonth(), 0)
1252
+ ]
1253
+ },
1254
+ thisYear: {
1255
+ label: "Este ano",
1256
+ range: (hoje) => [dia(hoje.getFullYear(), 0, 1), semHora(hoje)]
1257
+ }
1258
+ };
1259
+ var PERIODOS_PADRAO = [
1260
+ DATE_PERIODS.today,
1261
+ DATE_PERIODS.yesterday,
1262
+ DATE_PERIODS.last7Days,
1263
+ DATE_PERIODS.last14Days,
1264
+ DATE_PERIODS.last30Days,
1265
+ DATE_PERIODS.thisMonth
1266
+ ];
1267
+ var MESES = ["jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"];
1268
+ var dataPorExtenso = (data) => `${data.getDate()} de ${MESES[data.getMonth()]} de ${data.getFullYear()}`;
1269
+ var periodoPorExtenso = ([inicio, fim]) => `${dataPorExtenso(inicio)} a ${dataPorExtenso(fim)}`;
1270
+ var mesmoDia2 = (a, b) => !!a && !!b && semHora(a).getTime() === semHora(b).getTime();
1271
+ var periodoDe = (periods, range, hoje) => range ? periods.find((period) => {
1272
+ const [inicio, fim] = period.range(hoje);
1273
+ return mesmoDia2(inicio, range[0]) && mesmoDia2(fim, range[1]);
1274
+ }) : void 0;
1275
+ var dataCurta = (data) => data ? `${String(data.getDate()).padStart(2, "0")}/${String(data.getMonth() + 1).padStart(2, "0")}/${data.getFullYear()}` : "";
1276
+ function lerData(texto) {
1277
+ const partes = /^(\d{2})\/(\d{2})\/(\d{4})$/.exec(texto.replace(/\s/g, ""));
1278
+ if (!partes) return null;
1279
+ const [d, m, a] = [Number(partes[1]), Number(partes[2]), Number(partes[3])];
1280
+ const data = dia(a, m - 1, d);
1281
+ return data.getMonth() === m - 1 && data.getDate() === d ? data : null;
1282
+ }
1283
+ function ListaDePeriodos({
1284
+ periods,
1285
+ periodo,
1286
+ onEscolher
1287
+ }) {
1288
+ const grupo = useId();
1289
+ return /* @__PURE__ */ jsx("div", { className: "cr-data-picker__periods", role: "radiogroup", "aria-label": "Per\xEDodos", children: periods.map((item) => /* @__PURE__ */ jsx(
1290
+ Radio,
1291
+ {
1292
+ className: "cr-data-picker__period",
1293
+ name: grupo,
1294
+ label: item.label,
1295
+ value: item.label,
1296
+ checked: periodo === item,
1297
+ onChange: () => onEscolher(item)
1298
+ },
1299
+ item.label
1300
+ )) });
1301
+ }
1302
+ var mesmoRascunho = (a, b) => (a[0] === b[0] || mesmoDia2(a[0], b[0])) && (a[1] === b[1] || mesmoDia2(a[1], b[1]));
1303
+ function CamposDoPeriodo({
1304
+ value,
1305
+ onChange
1306
+ }) {
1307
+ const [textos, setTextos] = useState([
1308
+ dataCurta(value[0]),
1309
+ dataCurta(value[1])
1310
+ ]);
1311
+ const [base, setBase] = useState(value);
1312
+ if (!mesmoRascunho(base, value)) {
1313
+ setBase(value);
1314
+ setTextos([dataCurta(value[0]), dataCurta(value[1])]);
1315
+ }
1316
+ const digitar = (indice, texto) => {
1317
+ const novosTextos = [...textos];
1318
+ novosTextos[indice] = texto;
1319
+ setTextos(novosTextos);
1320
+ const data = lerData(texto);
1321
+ if (!data) return;
1322
+ const novo = [...value];
1323
+ novo[indice] = data;
1324
+ if (novo[0] && novo[1] && novo[0] > novo[1]) novo[indice === 0 ? 1 : 0] = null;
1325
+ setBase(novo);
1326
+ onChange(novo);
1327
+ };
1328
+ return /* @__PURE__ */ jsxs("div", { className: "cr-data-picker__inputs", children: [
1329
+ /* @__PURE__ */ jsx(
1330
+ Input,
1331
+ {
1332
+ size: "medium",
1333
+ "aria-label": "Data inicial",
1334
+ placeholder: "dd / mm / aaaa",
1335
+ value: textos[0],
1336
+ onChange: (event) => digitar(0, event.target.value)
1337
+ }
1338
+ ),
1339
+ /* @__PURE__ */ jsx("span", { className: "cr-data-picker__dash", "aria-hidden": "true", children: "-" }),
1340
+ /* @__PURE__ */ jsx(
1341
+ Input,
1342
+ {
1343
+ size: "medium",
1344
+ "aria-label": "Data final",
1345
+ placeholder: "dd / mm / aaaa",
1346
+ value: textos[1],
1347
+ onChange: (event) => digitar(1, event.target.value)
1348
+ }
1349
+ )
1350
+ ] });
1351
+ }
1352
+ function RodapeDoPeriodo({
1353
+ podeSelecionar,
1354
+ onFechar,
1355
+ onSelecionar
1356
+ }) {
1357
+ return /* @__PURE__ */ jsxs("div", { className: "cr-data-picker__footer", children: [
1358
+ /* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "medium", onClick: onFechar, children: "Fechar" }),
1359
+ /* @__PURE__ */ jsx(Button, { size: "medium", disabled: !podeSelecionar, onClick: onSelecionar, children: "Selecionar" })
1360
+ ] });
1361
+ }
1112
1362
  function DatePickerBase({
1113
1363
  variant = "outline",
1114
1364
  size = "large",
@@ -1125,6 +1375,12 @@ function DatePickerBase({
1125
1375
  style,
1126
1376
  onShow,
1127
1377
  onHide,
1378
+ periods = [],
1379
+ footer = false,
1380
+ today,
1381
+ value,
1382
+ onChange,
1383
+ footerTemplate,
1128
1384
  ...props
1129
1385
  }, ref) {
1130
1386
  const autoId = useId();
@@ -1135,6 +1391,31 @@ function DatePickerBase({
1135
1391
  const peloTeclado = useRef(false);
1136
1392
  const calendario = useRef(null);
1137
1393
  useImperativeHandle(ref, () => calendario.current, []);
1394
+ const comPeriodos = props.selectionMode === "range" && periods.length > 0;
1395
+ const dataPicker = footer || comPeriodos;
1396
+ const [aberto, setAberto] = useState(false);
1397
+ const [rascunho, setRascunho] = useState(null);
1398
+ const [periodo, setPeriodo] = useState(null);
1399
+ const devolverFoco = useRef(false);
1400
+ const ignorarAbertura = useRef(false);
1401
+ const valorNaTela = footer && aberto ? rascunho : value;
1402
+ const emitir = (novo) => onChange?.({
1403
+ value: novo,
1404
+ stopPropagation: () => {
1405
+ },
1406
+ preventDefault: () => {
1407
+ },
1408
+ target: { name: props.name, id, value: novo }
1409
+ });
1410
+ const fechar = (pelosBotoes) => {
1411
+ devolverFoco.current = pelosBotoes;
1412
+ setAberto(false);
1413
+ };
1414
+ const mudar = (novo, novoPeriodo) => {
1415
+ setPeriodo(novoPeriodo);
1416
+ if (footer) setRascunho(novo);
1417
+ else emitir(novo);
1418
+ };
1138
1419
  const classes2 = [
1139
1420
  "cr-field",
1140
1421
  "cr-datepicker",
@@ -1156,6 +1437,59 @@ function DatePickerBase({
1156
1437
  locale,
1157
1438
  placeholder,
1158
1439
  ...props,
1440
+ value: valorNaTela,
1441
+ onChange: footer ? (event) => mudar(event.value, null) : comPeriodos ? (event) => {
1442
+ setPeriodo(null);
1443
+ onChange?.(event);
1444
+ } : onChange,
1445
+ ...dataPicker && {
1446
+ visible: aberto,
1447
+ onVisibleChange: (event) => {
1448
+ if (!event.callback) {
1449
+ if (ignorarAbertura.current || aberto) return;
1450
+ const hoje = today ?? /* @__PURE__ */ new Date();
1451
+ setRascunho(value);
1452
+ setPeriodo(periodoDe(periods, value ?? null, hoje) ?? null);
1453
+ setAberto(true);
1454
+ return;
1455
+ }
1456
+ if (footer && event.type === "dateselect") return;
1457
+ fechar(false);
1458
+ event.callback?.();
1459
+ },
1460
+ footerTemplate: () => /* @__PURE__ */ jsxs(Fragment, { children: [
1461
+ comPeriodos && /* @__PURE__ */ jsx(
1462
+ ListaDePeriodos,
1463
+ {
1464
+ periods,
1465
+ periodo,
1466
+ onEscolher: (item) => {
1467
+ mudar(item.range(today ?? /* @__PURE__ */ new Date()), item);
1468
+ if (!footer) fechar(true);
1469
+ }
1470
+ }
1471
+ ),
1472
+ props.selectionMode === "range" && /* @__PURE__ */ jsx(
1473
+ CamposDoPeriodo,
1474
+ {
1475
+ value: valorNaTela ?? [null, null],
1476
+ onChange: (novo) => mudar(novo, null)
1477
+ }
1478
+ ),
1479
+ footer && /* @__PURE__ */ jsx(
1480
+ RodapeDoPeriodo,
1481
+ {
1482
+ podeSelecionar: props.selectionMode === "range" ? Boolean(rascunho?.[0] && rascunho[1]) : rascunho != null,
1483
+ onFechar: () => fechar(true),
1484
+ onSelecionar: () => {
1485
+ emitir(rascunho);
1486
+ fechar(true);
1487
+ }
1488
+ }
1489
+ )
1490
+ ] })
1491
+ },
1492
+ ...!dataPicker && { footerTemplate },
1159
1493
  ref: calendario,
1160
1494
  unstyled: true,
1161
1495
  inputId: id,
@@ -1172,12 +1506,19 @@ function DatePickerBase({
1172
1506
  const atual = calendario.current;
1173
1507
  const ativo = document.activeElement;
1174
1508
  const semFoco = ativo === document.body || atual?.getOverlay()?.contains(ativo);
1175
- if (peloTeclado.current && semFoco && atual) {
1176
- atual.focus();
1177
- atual.hide();
1509
+ if ((peloTeclado.current || devolverFoco.current) && semFoco && atual) {
1510
+ if (dataPicker) {
1511
+ ignorarAbertura.current = true;
1512
+ atual.focus();
1513
+ ignorarAbertura.current = false;
1514
+ } else {
1515
+ atual.focus();
1516
+ atual.hide();
1517
+ }
1178
1518
  }
1179
1519
  peloTeclado.current = false;
1180
1520
  pelaSeta.current = false;
1521
+ devolverFoco.current = false;
1181
1522
  onHide?.();
1182
1523
  },
1183
1524
  pt: {
@@ -1191,15 +1532,27 @@ function DatePickerBase({
1191
1532
  if (event.code === "ArrowDown" && !calendario.current?.getOverlay()) {
1192
1533
  pelaSeta.current = true;
1193
1534
  }
1535
+ const painel = calendario.current?.getOverlay();
1536
+ if (dataPicker && event.code === "ArrowDown" && painel) {
1537
+ const dia2 = painel.querySelector(".cr-calendar__date--selected") ?? painel.querySelector(
1538
+ ".cr-calendar__date:not(.cr-calendar__date--disabled)"
1539
+ );
1540
+ if (dia2) {
1541
+ event.preventDefault();
1542
+ dia2.tabIndex = 0;
1543
+ dia2.focus();
1544
+ }
1545
+ }
1194
1546
  }
1195
1547
  }
1196
1548
  },
1197
1549
  dropdownButton: { root: { className: "cr-datepicker__button" } },
1198
1550
  panel: {
1199
- className: "cr-calendar cr-datepicker__panel",
1551
+ className: `cr-calendar cr-datepicker__panel${dataPicker ? " cr-datepicker__panel--data-picker" : ""}`,
1200
1552
  onKeyDown: (event) => {
1201
1553
  if (["Enter", "NumpadEnter", "Space"].includes(event.code))
1202
1554
  peloTeclado.current = true;
1555
+ if (dataPicker && event.code === "Escape" && aberto) fechar(true);
1203
1556
  }
1204
1557
  },
1205
1558
  // Animação de entrada e saída (a do Prime) e o lado do painel, medido logo depois de o
@@ -1208,7 +1561,11 @@ function DatePickerBase({
1208
1561
  const campo = document.getElementById(id);
1209
1562
  seguirLado(painelDoCampo(campo, ".cr-datepicker__panel"), campo);
1210
1563
  }),
1211
- ...ptDoPainel(offDays)
1564
+ ...ptDoPainel(offDays),
1565
+ // As partes do Data Picker entram no rodapé do Prime, que some no layout: cada uma ocupa o
1566
+ // seu lugar na grade do painel (DatePicker.css). O Prime aplica o pt do footer, mas não o
1567
+ // declara no tipo.
1568
+ ...{ footer: { className: "cr-datepicker__extras" } }
1212
1569
  }
1213
1570
  }
1214
1571
  ),
@@ -1219,6 +1576,213 @@ function DatePickerBase({
1219
1576
  ] });
1220
1577
  }
1221
1578
  var DatePicker = forwardRef(DatePickerBase);
1579
+ function mesDaTela(range, meses, hoje) {
1580
+ const base = (meses > 1 ? range[1] : range[0]) ?? range[0] ?? hoje;
1581
+ return new Date(base.getFullYear(), base.getMonth() - (meses > 1 ? 1 : 0), 1);
1582
+ }
1583
+ function PainelDePeriodo({
1584
+ value,
1585
+ periods,
1586
+ footer,
1587
+ today,
1588
+ numberOfMonths,
1589
+ minDate,
1590
+ maxDate,
1591
+ disabledDates,
1592
+ offDays,
1593
+ onSelect,
1594
+ onClose
1595
+ }) {
1596
+ const [rascunho, setRascunho] = useState(value ?? [null, null]);
1597
+ const [periodo, setPeriodo] = useState(() => periodoDe(periods, value, today) ?? null);
1598
+ const [mes, setMes] = useState(() => mesDaTela(rascunho, numberOfMonths, today));
1599
+ const mudar = (novo, novoPeriodo) => {
1600
+ setRascunho(novo);
1601
+ setPeriodo(novoPeriodo);
1602
+ if (!footer && novo[0] && novo[1]) onSelect([novo[0], novo[1]], novoPeriodo);
1603
+ };
1604
+ const [inicio, fim] = rascunho;
1605
+ return /* @__PURE__ */ jsxs("div", { className: "cr-date-range", children: [
1606
+ /* @__PURE__ */ jsxs("div", { className: "cr-date-range__body", children: [
1607
+ periods.length > 0 && /* @__PURE__ */ jsx(
1608
+ ListaDePeriodos,
1609
+ {
1610
+ periods,
1611
+ periodo,
1612
+ onEscolher: (item) => {
1613
+ const range = item.range(today);
1614
+ setMes(mesDaTela(range, numberOfMonths, today));
1615
+ mudar(range, item);
1616
+ }
1617
+ }
1618
+ ),
1619
+ /* @__PURE__ */ jsxs("div", { className: "cr-date-range__calendars", children: [
1620
+ /* @__PURE__ */ jsx(
1621
+ CamposDoPeriodo,
1622
+ {
1623
+ value: rascunho,
1624
+ onChange: (novo) => {
1625
+ setMes(mesDaTela(novo, numberOfMonths, today));
1626
+ mudar(novo, null);
1627
+ }
1628
+ }
1629
+ ),
1630
+ /* @__PURE__ */ jsx(
1631
+ Calendar,
1632
+ {
1633
+ selectionMode: "range",
1634
+ numberOfMonths,
1635
+ value: rascunho,
1636
+ viewDate: mes,
1637
+ onViewDateChange: (event) => setMes(event.value),
1638
+ onChange: (event) => {
1639
+ const [novoInicio = null, novoFim = null] = event.value ?? [];
1640
+ mudar([novoInicio, novoFim], null);
1641
+ },
1642
+ minDate,
1643
+ maxDate,
1644
+ disabledDates,
1645
+ offDays
1646
+ }
1647
+ )
1648
+ ] })
1649
+ ] }),
1650
+ footer && /* @__PURE__ */ jsx(
1651
+ RodapeDoPeriodo,
1652
+ {
1653
+ podeSelecionar: Boolean(inicio && fim),
1654
+ onFechar: onClose,
1655
+ onSelecionar: () => inicio && fim && onSelect([inicio, fim], periodo)
1656
+ }
1657
+ )
1658
+ ] });
1659
+ }
1660
+ var DateRangeButton = forwardRef(
1661
+ function DateRangeButton2({
1662
+ value = null,
1663
+ onChange,
1664
+ label,
1665
+ required,
1666
+ placeholder = "Selecione o per\xEDodo",
1667
+ periods = PERIODOS_PADRAO,
1668
+ footer = true,
1669
+ numberOfMonths = 2,
1670
+ minDate,
1671
+ maxDate,
1672
+ disabledDates,
1673
+ offDays,
1674
+ today,
1675
+ disabled,
1676
+ id,
1677
+ className,
1678
+ style
1679
+ }, ref) {
1680
+ const autoId = useId();
1681
+ const botaoId = id ?? autoId;
1682
+ const rotuloId = `${botaoId}-rotulo`;
1683
+ const textoId = `${botaoId}-texto`;
1684
+ const painelId = `${botaoId}-painel`;
1685
+ const painel = useRef(null);
1686
+ const botao = useRef(null);
1687
+ const [aberto, setAberto] = useState(false);
1688
+ const [hoje, setHoje] = useState(() => today ?? /* @__PURE__ */ new Date());
1689
+ const periodo = periodoDe(periods, value, today ?? hoje);
1690
+ const classes2 = ["cr-field", "cr-date-range-field", disabled && "cr-field--disabled", className].filter(Boolean).join(" ");
1691
+ const fechar = () => painel.current?.hide();
1692
+ return /* @__PURE__ */ jsxs("div", { className: classes2, style, children: [
1693
+ label && /* @__PURE__ */ jsxs("span", { id: rotuloId, className: "cr-field__label", children: [
1694
+ label,
1695
+ required && /* @__PURE__ */ jsx("span", { className: "cr-field__required", "aria-hidden": "true", children: "*" })
1696
+ ] }),
1697
+ /* @__PURE__ */ jsxs(
1698
+ Button$1,
1699
+ {
1700
+ unstyled: true,
1701
+ ref: (elemento) => {
1702
+ const el = elemento;
1703
+ botao.current = el;
1704
+ if (typeof ref === "function") ref(el);
1705
+ else if (ref) ref.current = el;
1706
+ },
1707
+ id: botaoId,
1708
+ type: "button",
1709
+ className: "cr-date-range-button",
1710
+ disabled,
1711
+ "aria-haspopup": "dialog",
1712
+ "aria-expanded": aberto,
1713
+ "aria-controls": aberto ? painelId : void 0,
1714
+ "aria-labelledby": label ? `${rotuloId} ${textoId}` : void 0,
1715
+ onClick: (event) => {
1716
+ setHoje(today ?? /* @__PURE__ */ new Date());
1717
+ painel.current?.toggle(event);
1718
+ },
1719
+ children: [
1720
+ /* @__PURE__ */ jsx("span", { className: "cr-date-range-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx(CalendarDots, {}) }),
1721
+ /* @__PURE__ */ jsx("span", { id: textoId, className: "cr-date-range-button__text", children: value ? /* @__PURE__ */ jsxs(Fragment, { children: [
1722
+ periodo && /* @__PURE__ */ jsxs("span", { className: "cr-date-range-button__period", children: [
1723
+ periodo.label,
1724
+ ":"
1725
+ ] }),
1726
+ /* @__PURE__ */ jsx("span", { children: periodoPorExtenso(value) })
1727
+ ] }) : /* @__PURE__ */ jsx("span", { className: "cr-date-range-button__placeholder", children: placeholder }) }),
1728
+ /* @__PURE__ */ jsx("span", { className: "cr-date-range-button__caret", "aria-hidden": "true", children: /* @__PURE__ */ jsx(CaretDown, {}) })
1729
+ ]
1730
+ }
1731
+ ),
1732
+ /* @__PURE__ */ jsx(
1733
+ OverlayPanel,
1734
+ {
1735
+ ref: painel,
1736
+ unstyled: true,
1737
+ id: painelId,
1738
+ onShow: () => {
1739
+ setAberto(true);
1740
+ const raiz = document.getElementById(painelId);
1741
+ const alvo = raiz?.querySelector('input[type="radio"]:checked') ?? raiz?.querySelector('input, button, [tabindex="0"]');
1742
+ alvo?.focus();
1743
+ },
1744
+ onHide: () => {
1745
+ setAberto(false);
1746
+ const ativo = document.activeElement;
1747
+ if (ativo === document.body || document.getElementById(painelId)?.contains(ativo)) {
1748
+ botao.current?.focus();
1749
+ }
1750
+ },
1751
+ pt: {
1752
+ root: {
1753
+ className: "cr-date-range__panel",
1754
+ role: "dialog",
1755
+ "aria-label": label ?? "Escolher per\xEDodo"
1756
+ },
1757
+ // Animação de entrada e saída (a do Prime) e o lado do painel em relação ao botão.
1758
+ transition: transicaoDoPopup(
1759
+ () => seguirLado(document.getElementById(painelId), botao.current)
1760
+ )
1761
+ },
1762
+ children: /* @__PURE__ */ jsx(
1763
+ PainelDePeriodo,
1764
+ {
1765
+ value,
1766
+ periods,
1767
+ footer,
1768
+ today: today ?? hoje,
1769
+ numberOfMonths,
1770
+ minDate,
1771
+ maxDate,
1772
+ disabledDates,
1773
+ offDays,
1774
+ onClose: fechar,
1775
+ onSelect: (range, item) => {
1776
+ onChange?.({ value: range, period: item });
1777
+ fechar();
1778
+ }
1779
+ }
1780
+ )
1781
+ }
1782
+ )
1783
+ ] });
1784
+ }
1785
+ );
1222
1786
  var Divider = forwardRef(function Divider2({ orientation = "horizontal", variant = "solid", className, style, ...props }, ref) {
1223
1787
  const primeRef = useRef(null);
1224
1788
  useImperativeHandle(ref, () => primeRef.current?.getElement());
@@ -1443,62 +2007,6 @@ var Drawer = forwardRef(function Drawer2({
1443
2007
  }
1444
2008
  );
1445
2009
  });
1446
- var Input = forwardRef(function Input2({
1447
- variant = "outline",
1448
- size = "large",
1449
- label,
1450
- leadingIcon,
1451
- trailingIcon,
1452
- hint,
1453
- error,
1454
- id,
1455
- required,
1456
- disabled,
1457
- className,
1458
- ...props
1459
- }, ref) {
1460
- const autoId = useId();
1461
- const inputId = id ?? autoId;
1462
- const hintId = `${inputId}-hint`;
1463
- const supportText = error ?? hint;
1464
- const classes2 = [
1465
- "cr-field",
1466
- `cr-field--${variant}`,
1467
- `cr-field--${size}`,
1468
- error && "cr-field--error",
1469
- disabled && "cr-field--disabled",
1470
- className
1471
- ].filter(Boolean).join(" ");
1472
- return /* @__PURE__ */ jsxs("div", { className: classes2, children: [
1473
- label && /* @__PURE__ */ jsxs("label", { className: "cr-field__label", htmlFor: inputId, children: [
1474
- label,
1475
- required && /* @__PURE__ */ jsx("span", { className: "cr-field__required", "aria-hidden": "true", children: "*" })
1476
- ] }),
1477
- /* @__PURE__ */ jsxs("div", { className: "cr-field__control", children: [
1478
- leadingIcon && /* @__PURE__ */ jsx("span", { className: "cr-field__icon", "aria-hidden": "true", children: leadingIcon }),
1479
- /* @__PURE__ */ jsx(
1480
- InputText,
1481
- {
1482
- unstyled: true,
1483
- ref,
1484
- id: inputId,
1485
- className: "cr-field__input",
1486
- required,
1487
- disabled,
1488
- invalid: Boolean(error),
1489
- "aria-invalid": error ? true : void 0,
1490
- ...props,
1491
- "aria-describedby": juntarIds(supportText && hintId, props["aria-describedby"])
1492
- }
1493
- ),
1494
- trailingIcon && /* @__PURE__ */ jsx("span", { className: "cr-field__icon", children: trailingIcon })
1495
- ] }),
1496
- supportText && /* @__PURE__ */ jsxs("p", { id: hintId, className: `cr-field__hint${error ? " cr-field__hint--error" : ""}`, children: [
1497
- /* @__PURE__ */ jsx("span", { className: "cr-field__hint-icon", "aria-hidden": "true", children: error ? /* @__PURE__ */ jsx(WarningCircle, {}) : /* @__PURE__ */ jsx(Info, {}) }),
1498
- supportText
1499
- ] })
1500
- ] });
1501
- });
1502
2010
 
1503
2011
  // src/components/Menubar/assets/vector-logo-simbolo.svg
1504
2012
  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';
@@ -2504,61 +3012,6 @@ var Panel = forwardRef(function Panel2({ className, style, children, ...props },
2504
3012
  }
2505
3013
  );
2506
3014
  });
2507
- var Radio = forwardRef(function Radio2({
2508
- label,
2509
- showLabel = true,
2510
- labelSize = "default",
2511
- checked = false,
2512
- value,
2513
- name,
2514
- onChange,
2515
- disabled,
2516
- required,
2517
- id,
2518
- className,
2519
- style,
2520
- ...props
2521
- }, ref) {
2522
- const autoId = useId();
2523
- const inputId = id ?? autoId;
2524
- const classes2 = [
2525
- "cr-radio",
2526
- `cr-radio--label-${labelSize}`,
2527
- disabled && "cr-radio--disabled",
2528
- className
2529
- ].filter(Boolean).join(" ");
2530
- return /* @__PURE__ */ jsxs("div", { className: classes2, style, children: [
2531
- /* @__PURE__ */ jsx(
2532
- RadioButton,
2533
- {
2534
- unstyled: true,
2535
- inputRef: ref,
2536
- inputId,
2537
- checked,
2538
- value,
2539
- name,
2540
- onChange,
2541
- disabled,
2542
- required,
2543
- pt: {
2544
- // Marcado pela prop do Cristal, não pelo atributo interno do Prime (data-p-checked).
2545
- root: { className: `cr-radio__control${checked ? " cr-radio__control--checked" : ""}` },
2546
- input: { ...props, className: "cr-radio__input" },
2547
- box: { className: "cr-radio__box" },
2548
- icon: { className: "cr-radio__icon" }
2549
- }
2550
- }
2551
- ),
2552
- /* @__PURE__ */ jsx(
2553
- "label",
2554
- {
2555
- className: `cr-radio__label${showLabel ? "" : " cr-radio__label--hidden cr-so-leitor"}`,
2556
- htmlFor: inputId,
2557
- children: label
2558
- }
2559
- )
2560
- ] });
2561
- });
2562
3015
  var porcentagem = (posicao, total, visivel) => total > visivel ? Math.round(posicao / (total - visivel) * 100) : 0;
2563
3016
  var ScrollPanel = forwardRef(function ScrollPanel2({
2564
3017
  children,
@@ -3457,6 +3910,6 @@ var Toast = forwardRef(function Toast2({ position = "top-right", closeLabel = "F
3457
3910
  );
3458
3911
  });
3459
3912
 
3460
- export { Accordion, AccordionTab, AutoComplete, Badge, Button, Calendar, Card, Chart, Checkbox, Chip, Column, ContextMenu, DatePicker, Divider, Drawer, IconButton, Input, Menu, MenuPrincipal, Menubar, Message, Modal, MultiSelect, PageHeader, Paginator, Panel, Radio, ScrollPanel, SegmentControl, Select, Skeleton, Switch, TabPanel, Table, TableRowActions, TableToolbar, Tabs, Tag, Toast, Tooltip };
3913
+ export { Accordion, AccordionTab, AutoComplete, Badge, Button, Calendar, Card, Chart, Checkbox, Chip, Column, ContextMenu, DATE_PERIODS, DatePicker, DateRangeButton, Divider, Drawer, IconButton, Input, Menu, MenuPrincipal, Menubar, Message, Modal, MultiSelect, PageHeader, Paginator, Panel, Radio, ScrollPanel, SegmentControl, Select, Skeleton, Switch, TabPanel, Table, TableRowActions, TableToolbar, Tabs, Tag, Toast, Tooltip };
3461
3914
  //# sourceMappingURL=index.js.map
3462
3915
  //# sourceMappingURL=index.js.map