@aspprev/versi-ds 0.4.0 → 0.4.1

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.
Files changed (79) hide show
  1. package/README.md +7 -0
  2. package/dist/charts.js +1 -2
  3. package/dist/{chunk-ATWH3MA6.js → chunk-2XXVEFFY.js} +18 -35
  4. package/dist/{chunk-ATWH3MA6.js.map → chunk-2XXVEFFY.js.map} +1 -1
  5. package/dist/{chunk-V66QL3TD.js → chunk-5MRS4PDD.js} +200 -211
  6. package/dist/{chunk-V66QL3TD.js.map → chunk-5MRS4PDD.js.map} +1 -1
  7. package/dist/{chunk-LPLXAKPJ.js → chunk-6NVJWI5B.js} +551 -603
  8. package/dist/chunk-6NVJWI5B.js.map +1 -0
  9. package/dist/chunk-7IY43S3Y.js +2833 -0
  10. package/dist/chunk-7IY43S3Y.js.map +1 -0
  11. package/dist/{chunk-LTW323JQ.js → chunk-JGCZAVYV.js} +420 -594
  12. package/dist/{chunk-LTW323JQ.js.map → chunk-JGCZAVYV.js.map} +1 -1
  13. package/dist/{chunk-FTRF27XF.js → chunk-MMTKCHRP.js} +7 -17
  14. package/dist/{chunk-FTRF27XF.js.map → chunk-MMTKCHRP.js.map} +1 -1
  15. package/dist/{chunk-7JI5637G.js → chunk-YIUITJ4V.js} +45 -77
  16. package/dist/{chunk-7JI5637G.js.map → chunk-YIUITJ4V.js.map} +1 -1
  17. package/dist/{chunk-WOD44OEH.js → chunk-ZPY72ILO.js} +41 -58
  18. package/dist/{chunk-WOD44OEH.js.map → chunk-ZPY72ILO.js.map} +1 -1
  19. package/dist/core.js +3 -4
  20. package/dist/countries-browser.d.ts +11 -0
  21. package/dist/countries-browser.js +44 -0
  22. package/dist/countries-browser.js.map +1 -0
  23. package/dist/countries.d.ts +6 -46
  24. package/dist/countries.js +280 -7
  25. package/dist/countries.js.map +1 -1
  26. package/dist/country-metadata-DOgzawAc.d.ts +27 -0
  27. package/dist/documents.js +2 -3
  28. package/dist/flags-00-MPU4ISEM.js +85 -0
  29. package/dist/flags-00-MPU4ISEM.js.map +1 -0
  30. package/dist/flags-01-PWC64NSQ.js +13 -0
  31. package/dist/flags-01-PWC64NSQ.js.map +1 -0
  32. package/dist/flags-02-GNF7X6MP.js +10 -0
  33. package/dist/flags-02-GNF7X6MP.js.map +1 -0
  34. package/dist/flags-03-STVDA6UG.js +82 -0
  35. package/dist/flags-03-STVDA6UG.js.map +1 -0
  36. package/dist/flags-04-Z6AHZIWG.js +31 -0
  37. package/dist/flags-04-Z6AHZIWG.js.map +1 -0
  38. package/dist/flags-05-QBADBC6C.js +13 -0
  39. package/dist/flags-05-QBADBC6C.js.map +1 -0
  40. package/dist/flags-06-O55E67OI.js +28 -0
  41. package/dist/flags-06-O55E67OI.js.map +1 -0
  42. package/dist/flags-07-RSWJQIRW.js +64 -0
  43. package/dist/flags-07-RSWJQIRW.js.map +1 -0
  44. package/dist/flags-08-HHXIPTKX.js +31 -0
  45. package/dist/flags-08-HHXIPTKX.js.map +1 -0
  46. package/dist/flags-09-OEZBQ62G.js +64 -0
  47. package/dist/flags-09-OEZBQ62G.js.map +1 -0
  48. package/dist/flags-10-XJY5UMQR.js +73 -0
  49. package/dist/flags-10-XJY5UMQR.js.map +1 -0
  50. package/dist/flags-11-7M75OPUJ.js +34 -0
  51. package/dist/flags-11-7M75OPUJ.js.map +1 -0
  52. package/dist/flags-12-JY22PFQH.js +31 -0
  53. package/dist/flags-12-JY22PFQH.js.map +1 -0
  54. package/dist/flags-13-BERDGZCT.js +52 -0
  55. package/dist/flags-13-BERDGZCT.js.map +1 -0
  56. package/dist/flags-14-XVPM2GQ2.js +31 -0
  57. package/dist/flags-14-XVPM2GQ2.js.map +1 -0
  58. package/dist/flags-15-WESIXIDR.js +64 -0
  59. package/dist/flags-15-WESIXIDR.js.map +1 -0
  60. package/dist/flags-16-PTNHBPYG.js +40 -0
  61. package/dist/flags-16-PTNHBPYG.js.map +1 -0
  62. package/dist/flags-17-UYXBV5BH.js +10 -0
  63. package/dist/flags-17-UYXBV5BH.js.map +1 -0
  64. package/dist/flags-18-VMKDO7W4.js +91 -0
  65. package/dist/flags-18-VMKDO7W4.js.map +1 -0
  66. package/dist/flags-19-635PQOEQ.js +43 -0
  67. package/dist/flags-19-635PQOEQ.js.map +1 -0
  68. package/dist/forms.d.ts +2 -2
  69. package/dist/forms.js +3 -4
  70. package/dist/index.d.ts +1 -1
  71. package/dist/index.js +8 -9
  72. package/dist/manifest.json +32 -10
  73. package/dist/overlays.js +1 -2
  74. package/package.json +4 -2
  75. package/dist/chunk-2NMEKWO5.js +0 -38
  76. package/dist/chunk-2NMEKWO5.js.map +0 -1
  77. package/dist/chunk-LPLXAKPJ.js.map +0 -1
  78. package/dist/chunk-YCW3REQK.js +0 -3102
  79. package/dist/chunk-YCW3REQK.js.map +0 -1
@@ -1,11 +1,6 @@
1
1
  import {
2
2
  useBreakpoint
3
- } from "./chunk-FTRF27XF.js";
4
- import {
5
- __objRest,
6
- __spreadProps,
7
- __spreadValues
8
- } from "./chunk-2NMEKWO5.js";
3
+ } from "./chunk-MMTKCHRP.js";
9
4
 
10
5
  // src/components/loadingDots/LoadingDotsView.tsx
11
6
  import { cva } from "class-variance-authority";
@@ -28,27 +23,20 @@ var colorVariant = cva(`w-[14px] h-[14px] rounded-full`, {
28
23
  }
29
24
  }
30
25
  });
31
- var LoadingDots = (_a) => {
32
- var _b = _a, {
33
- color = "white",
34
- fullContainer = false,
35
- announce = true,
36
- ariaLabel,
37
- className,
38
- "aria-label": ariaLabelAttribute
39
- } = _b, rest = __objRest(_b, [
40
- "color",
41
- "fullContainer",
42
- "announce",
43
- "ariaLabel",
44
- "className",
45
- "aria-label"
46
- ]);
47
- var _a2;
48
- const accessibleLabel = (_a2 = ariaLabel != null ? ariaLabel : ariaLabelAttribute) != null ? _a2 : "Carregando";
26
+ var LoadingDots = ({
27
+ color = "white",
28
+ fullContainer = false,
29
+ announce = true,
30
+ ariaLabel,
31
+ className,
32
+ "aria-label": ariaLabelAttribute,
33
+ ...rest
34
+ }) => {
35
+ const accessibleLabel = ariaLabel ?? ariaLabelAttribute ?? "Carregando";
49
36
  return /* @__PURE__ */ jsxs(
50
37
  "div",
51
- __spreadProps(__spreadValues({}, rest), {
38
+ {
39
+ ...rest,
52
40
  className: `flex items-center justify-center gap-[10px]${fullContainer ? " w-full h-full min-h-[400px]" : ""}${className ? ` ${className}` : ""}`,
53
41
  role: announce ? "status" : void 0,
54
42
  "aria-live": announce ? "polite" : void 0,
@@ -81,7 +69,7 @@ var LoadingDots = (_a) => {
81
69
  }
82
70
  )
83
71
  ]
84
- })
72
+ }
85
73
  );
86
74
  };
87
75
  var LoadingDotsView_default = LoadingDots;
@@ -151,39 +139,26 @@ var WIDTH_STYLES = {
151
139
  auto: "w-auto",
152
140
  full: "w-full"
153
141
  };
154
- var Button = (_a) => {
155
- var _b = _a, {
156
- variant = "flat",
157
- children,
158
- className,
159
- disabled = false,
160
- size = "medium",
161
- width = "auto",
162
- color = "primary",
163
- leadIcon: LeadIcon,
164
- endIcon: EndIcon,
165
- loading = false,
166
- loadingLabel
167
- } = _b, rest = __objRest(_b, [
168
- "variant",
169
- "children",
170
- "className",
171
- "disabled",
172
- "size",
173
- "width",
174
- "color",
175
- "leadIcon",
176
- "endIcon",
177
- "loading",
178
- "loadingLabel"
179
- ]);
180
- var _a2;
181
- const actionName = (_a2 = rest["aria-label"]) != null ? _a2 : getTextContent(children).replace(/\s+/g, " ").trim();
182
- const loadingAnnouncement = loadingLabel != null ? loadingLabel : actionName ? `Carregando: ${actionName}` : "Carregando a\xE7\xE3o solicitada";
142
+ var Button = ({
143
+ variant = "flat",
144
+ children,
145
+ className,
146
+ disabled = false,
147
+ size = "medium",
148
+ width = "auto",
149
+ color = "primary",
150
+ leadIcon: LeadIcon,
151
+ endIcon: EndIcon,
152
+ loading = false,
153
+ loadingLabel,
154
+ ...rest
155
+ }) => {
156
+ const actionName = rest["aria-label"] ?? getTextContent(children).replace(/\s+/g, " ").trim();
157
+ const loadingAnnouncement = loadingLabel ?? (actionName ? `Carregando: ${actionName}` : "Carregando a\xE7\xE3o solicitada");
183
158
  return /* @__PURE__ */ jsxs2(Fragment, { children: [
184
159
  /* @__PURE__ */ jsxs2(
185
160
  "button",
186
- __spreadProps(__spreadValues({
161
+ {
187
162
  className: `
188
163
  flex items-center justify-center rounded-sm px-xs border-[1px] gap-4xs leading-none
189
164
  focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring
@@ -193,8 +168,8 @@ var Button = (_a) => {
193
168
  ${WIDTH_STYLES[width]}
194
169
  `,
195
170
  disabled: disabled || loading,
196
- "aria-busy": loading || void 0
197
- }, rest), {
171
+ "aria-busy": loading || void 0,
172
+ ...rest,
198
173
  children: [
199
174
  LeadIcon && !loading && /* @__PURE__ */ jsx2(LeadIcon, { "aria-hidden": "true", focusable: "false", className: "h-3 w-3" }),
200
175
  loading && /* @__PURE__ */ jsx2("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx2(
@@ -208,7 +183,7 @@ var Button = (_a) => {
208
183
  !loading && children,
209
184
  EndIcon && !loading && /* @__PURE__ */ jsx2(EndIcon, { "aria-hidden": "true", focusable: "false", className: "h-3 w-3" })
210
185
  ]
211
- })
186
+ }
212
187
  ),
213
188
  /* @__PURE__ */ jsx2(
214
189
  "span",
@@ -273,38 +248,30 @@ var semanticRoleDefaults = {
273
248
  caption: { size: "sm", weight: "normal", variant: "secondary" },
274
249
  helper: { size: "sm", weight: "normal", variant: "tertiary" }
275
250
  };
276
- function Typography(_a) {
277
- var _b = _a, {
278
- children,
279
- element = "p",
280
- semanticRole,
281
- className,
282
- variant,
283
- size,
284
- weight
285
- } = _b, rest = __objRest(_b, [
286
- "children",
287
- "element",
288
- "semanticRole",
289
- "className",
290
- "variant",
291
- "size",
292
- "weight"
293
- ]);
251
+ function Typography({
252
+ children,
253
+ element = "p",
254
+ semanticRole,
255
+ className,
256
+ variant,
257
+ size,
258
+ weight,
259
+ ...rest
260
+ }) {
294
261
  const Component = element;
295
262
  const semanticDefaults = semanticRole ? semanticRoleDefaults[semanticRole] : void 0;
296
263
  return /* @__PURE__ */ jsx3(
297
264
  Component,
298
- __spreadProps(__spreadValues({
265
+ {
299
266
  className: textVariants({
300
- variant: variant != null ? variant : semanticDefaults == null ? void 0 : semanticDefaults.variant,
301
- size: size != null ? size : semanticDefaults == null ? void 0 : semanticDefaults.size,
302
- weight: weight != null ? weight : semanticDefaults == null ? void 0 : semanticDefaults.weight,
267
+ variant: variant ?? semanticDefaults?.variant,
268
+ size: size ?? semanticDefaults?.size,
269
+ weight: weight ?? semanticDefaults?.weight,
303
270
  className
304
- })
305
- }, rest), {
271
+ }),
272
+ ...rest,
306
273
  children
307
- })
274
+ }
308
275
  );
309
276
  }
310
277
  var typography_default = Typography;
@@ -317,18 +284,13 @@ var colorClassMap = {
317
284
  dark: "bg-border-strong",
318
285
  black: "bg-content-primary"
319
286
  };
320
- var Divider = (_a) => {
321
- var _b = _a, {
322
- width,
323
- height = "h-[1px]",
324
- children,
325
- bgColor = "black"
326
- } = _b, rest = __objRest(_b, [
327
- "width",
328
- "height",
329
- "children",
330
- "bgColor"
331
- ]);
287
+ var Divider = ({
288
+ width,
289
+ height = "h-[1px]",
290
+ children,
291
+ bgColor = "black",
292
+ ...rest
293
+ }) => {
332
294
  const colorClass = colorClassMap[bgColor];
333
295
  const barClass = classNames(children ? "w-1/3" : "w-1/2", height, colorClass);
334
296
  return /* @__PURE__ */ jsxs3("div", { className: classNames(width, "flex items-center justify-center"), children: [
@@ -371,25 +333,18 @@ var TONE_STYLES = {
371
333
  danger: "bg-feedback-danger-soft text-feedback-danger-content",
372
334
  transparent: "bg-transparent"
373
335
  };
374
- function Surface(_a) {
375
- var _b = _a, {
376
- children,
377
- className,
378
- elevation = "sm",
379
- padding = "default",
380
- radius = "md",
381
- tone = "card"
382
- } = _b, rest = __objRest(_b, [
383
- "children",
384
- "className",
385
- "elevation",
386
- "padding",
387
- "radius",
388
- "tone"
389
- ]);
336
+ function Surface({
337
+ children,
338
+ className,
339
+ elevation = "sm",
340
+ padding = "default",
341
+ radius = "md",
342
+ tone = "card",
343
+ ...rest
344
+ }) {
390
345
  return /* @__PURE__ */ jsx5(
391
346
  "div",
392
- __spreadProps(__spreadValues({
347
+ {
393
348
  className: classNames2(
394
349
  "w-full",
395
350
  ELEVATION_STYLES[elevation],
@@ -397,24 +352,24 @@ function Surface(_a) {
397
352
  RADIUS_STYLES[radius],
398
353
  TONE_STYLES[tone],
399
354
  className
400
- )
401
- }, rest), {
355
+ ),
356
+ ...rest,
402
357
  children
403
- })
358
+ }
404
359
  );
405
360
  }
406
361
 
407
362
  // src/components/modalCard/ModalCardView.tsx
408
363
  import { jsx as jsx6 } from "react/jsx-runtime";
409
364
  function ModalCardView(props) {
410
- const _a = props, { children, className } = _a, rest = __objRest(_a, ["children", "className"]);
365
+ const { children, className, ...rest } = props;
411
366
  return /* @__PURE__ */ jsx6(
412
367
  Surface,
413
- __spreadProps(__spreadValues({
414
- className: `gap-2 ${className != null ? className : ""}`
415
- }, rest), {
368
+ {
369
+ className: `gap-2 ${className ?? ""}`,
370
+ ...rest,
416
371
  children
417
- })
372
+ }
418
373
  );
419
374
  }
420
375
  var ModalCardView_default = ModalCardView;
@@ -453,30 +408,21 @@ var defaultTextClassMap = {
453
408
  warning: "text-content-primary",
454
409
  danger: "text-content-primary"
455
410
  };
456
- var NoticeView = (_a) => {
457
- var _b = _a, {
458
- rounded = false,
459
- type = "info",
460
- children,
461
- className,
462
- onDismiss,
463
- onTriggerHelp,
464
- icon: Icon,
465
- textColor = "default"
466
- } = _b, rest = __objRest(_b, [
467
- "rounded",
468
- "type",
469
- "children",
470
- "className",
471
- "onDismiss",
472
- "onTriggerHelp",
473
- "icon",
474
- "textColor"
475
- ]);
411
+ var NoticeView = ({
412
+ rounded = false,
413
+ type = "info",
414
+ children,
415
+ className,
416
+ onDismiss,
417
+ onTriggerHelp,
418
+ icon: Icon,
419
+ textColor = "default",
420
+ ...rest
421
+ }) => {
476
422
  const classes = classNames3(boxClassMap[type], {
477
423
  "rounded-md": rounded
478
424
  });
479
- return /* @__PURE__ */ jsx7("div", __spreadProps(__spreadValues({ className: classes }, rest), { children: /* @__PURE__ */ jsxs4("div", { className: `flex p-3 gap-3 ${className}`, children: [
425
+ return /* @__PURE__ */ jsx7("div", { className: classes, ...rest, children: /* @__PURE__ */ jsxs4("div", { className: `flex p-3 gap-3 ${className}`, children: [
480
426
  Icon && /* @__PURE__ */ jsx7("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx7(
481
427
  Icon,
482
428
  {
@@ -528,7 +474,7 @@ var NoticeView = (_a) => {
528
474
  }
529
475
  )
530
476
  ] })
531
- ] }) }));
477
+ ] }) });
532
478
  };
533
479
  var NoticeView_default = NoticeView;
534
480
 
@@ -568,9 +514,8 @@ function PageState({
568
514
  const Icon = icons[variant];
569
515
  const TitleTag = headingLevel === 2 ? "h2" : "h1";
570
516
  useEffect(() => {
571
- var _a;
572
517
  if (focusOnMount) {
573
- (_a = stateRef.current) == null ? void 0 : _a.focus();
518
+ stateRef.current?.focus();
574
519
  }
575
520
  }, [focusOnMount]);
576
521
  return /* @__PURE__ */ jsxs5(
@@ -690,20 +635,14 @@ function Inicials(name) {
690
635
  }
691
636
  }
692
637
  }
693
- var Avatar = (_a) => {
694
- var _b = _a, {
695
- name = "",
696
- size = "xs",
697
- className,
698
- image,
699
- description = ""
700
- } = _b, rest = __objRest(_b, [
701
- "name",
702
- "size",
703
- "className",
704
- "image",
705
- "description"
706
- ]);
638
+ var Avatar = ({
639
+ name = "",
640
+ size = "xs",
641
+ className,
642
+ image,
643
+ description = "",
644
+ ...rest
645
+ }) => {
707
646
  const avatarSizeClass = avatarSizeMap[size];
708
647
  const avatarComponent = image ? /* @__PURE__ */ jsx11(AvatarImage_default, { src: image, altDescription: description }) : !!name ? /* @__PURE__ */ jsx11(
709
648
  "span",
@@ -717,15 +656,15 @@ var Avatar = (_a) => {
717
656
  ) : /* @__PURE__ */ jsx11(AvatarIcon_default, {});
718
657
  return /* @__PURE__ */ jsx11(
719
658
  "div",
720
- __spreadProps(__spreadValues({
659
+ {
721
660
  className: classNames5(
722
661
  `relative rounded-full bg-surface-muted flex items-center justify-center text-content-muted`,
723
662
  avatarSizeClass,
724
663
  className
725
- )
726
- }, rest), {
664
+ ),
665
+ ...rest,
727
666
  children: avatarComponent
728
- })
667
+ }
729
668
  );
730
669
  };
731
670
  var Avatar_default = Avatar;
@@ -751,27 +690,22 @@ function resolvePath(source, basePath = DEFAULT_LOGOS_BASE_PATH) {
751
690
  function isSvgSource(source) {
752
691
  return source.split(/[?#]/, 1)[0].toLowerCase().endsWith(".svg");
753
692
  }
754
- function ThemedImage(_a) {
755
- var _b = _a, {
756
- source,
757
- basePath,
758
- svgClassName,
759
- className,
760
- alt
761
- } = _b, props = __objRest(_b, [
762
- "source",
763
- "basePath",
764
- "svgClassName",
765
- "className",
766
- "alt"
767
- ]);
693
+ function ThemedImage({
694
+ source,
695
+ basePath,
696
+ svgClassName,
697
+ className,
698
+ alt,
699
+ ...props
700
+ }) {
768
701
  const sources = normalizeThemedImageSource(source);
769
702
  const lightSource = resolvePath(sources.light, basePath);
770
703
  const darkSource = sources.dark ? resolvePath(sources.dark, basePath) : void 0;
771
704
  return /* @__PURE__ */ jsxs6(Fragment2, { children: [
772
705
  /* @__PURE__ */ jsx12(
773
706
  "img",
774
- __spreadProps(__spreadValues({}, props), {
707
+ {
708
+ ...props,
775
709
  src: lightSource,
776
710
  alt,
777
711
  "data-color-scheme-logo": "light",
@@ -783,11 +717,12 @@ function ThemedImage(_a) {
783
717
  "themed-image-has-dark": Boolean(darkSource)
784
718
  }
785
719
  )
786
- })
720
+ }
787
721
  ),
788
722
  darkSource && /* @__PURE__ */ jsx12(
789
723
  "img",
790
- __spreadProps(__spreadValues({}, props), {
724
+ {
725
+ ...props,
791
726
  src: darkSource,
792
727
  alt,
793
728
  "data-color-scheme-logo": "dark",
@@ -796,7 +731,7 @@ function ThemedImage(_a) {
796
731
  isSvgSource(darkSource) && svgClassName,
797
732
  "themed-image-dark"
798
733
  )
799
- })
734
+ }
800
735
  )
801
736
  ] });
802
737
  }
@@ -822,42 +757,32 @@ var colorMap = {
822
757
  warning: "rgb(var(--feedback-warning-strong))",
823
758
  success: "rgb(var(--feedback-success-strong))"
824
759
  };
825
- function CircularLoading(_a) {
826
- var _b = _a, {
827
- size = 48,
828
- thickness = 6,
829
- trackColor = "rgb(var(--loading-circular-track))",
830
- indicatorColor,
831
- withTrack = true,
832
- color = "primary",
833
- message,
834
- className,
835
- ariaLabel = "Carregando"
836
- } = _b, rest = __objRest(_b, [
837
- "size",
838
- "thickness",
839
- "trackColor",
840
- "indicatorColor",
841
- "withTrack",
842
- "color",
843
- "message",
844
- "className",
845
- "ariaLabel"
846
- ]);
760
+ function CircularLoading({
761
+ size = 48,
762
+ thickness = 6,
763
+ trackColor = "rgb(var(--loading-circular-track))",
764
+ indicatorColor,
765
+ withTrack = true,
766
+ color = "primary",
767
+ message,
768
+ className,
769
+ ariaLabel = "Carregando",
770
+ ...rest
771
+ }) {
847
772
  const breakpoint = useBreakpoint();
848
773
  const finalSize = breakpoint === "mobile" ? Math.min(size, 100) : size;
849
774
  const finalThickness = breakpoint === "mobile" ? Math.min(thickness, 16) : thickness;
850
775
  const radius = (finalSize - finalThickness) / 2;
851
776
  const circumference = 2 * Math.PI * radius;
852
777
  const center = finalSize / 2;
853
- const finalIndicatorColor = indicatorColor != null ? indicatorColor : colorMap[color];
778
+ const finalIndicatorColor = indicatorColor ?? colorMap[color];
854
779
  return /* @__PURE__ */ jsxs7(
855
780
  "div",
856
- __spreadProps(__spreadValues({
781
+ {
857
782
  role: "status",
858
783
  "aria-label": ariaLabel,
859
- className: `inline-flex flex-col items-center justify-center gap-4 leading-none ${className != null ? className : ""}`.trim()
860
- }, rest), {
784
+ className: `inline-flex flex-col items-center justify-center gap-4 leading-none ${className ?? ""}`.trim(),
785
+ ...rest,
861
786
  children: [
862
787
  /* @__PURE__ */ jsxs7(
863
788
  "svg",
@@ -912,26 +837,22 @@ function CircularLoading(_a) {
912
837
  ),
913
838
  message && /* @__PURE__ */ jsx14("p", { className: "text-center text-sm font-medium text-content-secondary", children: message })
914
839
  ]
915
- })
840
+ }
916
841
  );
917
842
  }
918
843
 
919
844
  // src/components/text-group/TextGroup.tsx
920
845
  import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
921
- function TextGroup(_a) {
922
- var _b = _a, {
923
- title,
924
- text = "-",
925
- className
926
- } = _b, rest = __objRest(_b, [
927
- "title",
928
- "text",
929
- "className"
930
- ]);
931
- return /* @__PURE__ */ jsxs8("div", __spreadProps(__spreadValues({ className }, rest), { children: [
846
+ function TextGroup({
847
+ title,
848
+ text = "-",
849
+ className,
850
+ ...rest
851
+ }) {
852
+ return /* @__PURE__ */ jsxs8("div", { className, ...rest, children: [
932
853
  /* @__PURE__ */ jsx15(typography_default, { size: "sm", className: "text-content-primary", children: title }),
933
854
  /* @__PURE__ */ jsx15(typography_default, { size: "md", className: "break-words font-semibold text-content-primary", children: text || "-" })
934
- ] }));
855
+ ] });
935
856
  }
936
857
 
937
858
  // src/components/pagination/PaginationView.tsx
@@ -1083,18 +1004,13 @@ var PaginationView_default = PaginationView;
1083
1004
 
1084
1005
  // src/components/checkbox/checkbox.tsx
1085
1006
  import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
1086
- function Checkbox(_a) {
1087
- var _b = _a, {
1088
- options,
1089
- value,
1090
- onChange,
1091
- layout = "row"
1092
- } = _b, props = __objRest(_b, [
1093
- "options",
1094
- "value",
1095
- "onChange",
1096
- "layout"
1097
- ]);
1007
+ function Checkbox({
1008
+ options,
1009
+ value,
1010
+ onChange,
1011
+ layout = "row",
1012
+ ...props
1013
+ }) {
1098
1014
  let containerClass = "";
1099
1015
  if (layout === "col") {
1100
1016
  containerClass = "flex flex-col gap-y-3 mt-3";
@@ -1110,13 +1026,14 @@ function Checkbox(_a) {
1110
1026
  children: [
1111
1027
  /* @__PURE__ */ jsx18(
1112
1028
  "input",
1113
- __spreadValues({
1029
+ {
1114
1030
  type: "checkbox",
1115
1031
  className: "checkbox-control",
1116
1032
  value: option.value,
1117
1033
  checked: value === option.value,
1118
- onChange
1119
- }, props)
1034
+ onChange,
1035
+ ...props
1036
+ }
1120
1037
  ),
1121
1038
  /* @__PURE__ */ jsx18("span", { className: "text-content-secondary", children: option.label })
1122
1039
  ]
@@ -1247,7 +1164,6 @@ var Slider = ({
1247
1164
  document.addEventListener("touchend", handleTouchEnd);
1248
1165
  };
1249
1166
  const updateThumbPosition = useCallback(() => {
1250
- var _a, _b;
1251
1167
  if (thumbRef.current && sliderRef.current && progressRef.current) {
1252
1168
  const sliderRect = sliderRef.current.getBoundingClientRect();
1253
1169
  if (max <= min || sliderRect.width <= 0) {
@@ -1258,7 +1174,7 @@ var Slider = ({
1258
1174
  }
1259
1175
  const clampedValue = Math.max(min, Math.min(max, currentValue));
1260
1176
  const left = (clampedValue - min) / (max - min) * sliderRect.width;
1261
- const tooltipWidth = (_b = (_a = tooltipRef.current) == null ? void 0 : _a.getBoundingClientRect().width) != null ? _b : 48;
1177
+ const tooltipWidth = tooltipRef.current?.getBoundingClientRect().width ?? 48;
1262
1178
  const tooltipHalfWidth = tooltipWidth / 2;
1263
1179
  const thumbHalfWidth = thumbRef.current.getBoundingClientRect().width / 2;
1264
1180
  const clampedTooltipCenter = Math.min(
@@ -1417,42 +1333,25 @@ var Slider_default = Slider;
1417
1333
  // src/components/inputSlider/InputSliderView.tsx
1418
1334
  import { useCallback as useCallback2, useState as useState2, useEffect as useEffect3 } from "react";
1419
1335
  import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
1420
- var InputSlider = (_a) => {
1421
- var _b = _a, {
1422
- name,
1423
- start,
1424
- step = 1,
1425
- end,
1426
- functionChange,
1427
- initialValue,
1428
- prefix,
1429
- sufix,
1430
- marks,
1431
- valueLabelDisplay = "auto",
1432
- showLabel = false,
1433
- disabled = false,
1434
- inputDisabled = false,
1435
- valueFormmated,
1436
- showInput = false,
1437
- ariaLabel
1438
- } = _b, rest = __objRest(_b, [
1439
- "name",
1440
- "start",
1441
- "step",
1442
- "end",
1443
- "functionChange",
1444
- "initialValue",
1445
- "prefix",
1446
- "sufix",
1447
- "marks",
1448
- "valueLabelDisplay",
1449
- "showLabel",
1450
- "disabled",
1451
- "inputDisabled",
1452
- "valueFormmated",
1453
- "showInput",
1454
- "ariaLabel"
1455
- ]);
1336
+ var InputSlider = ({
1337
+ name,
1338
+ start,
1339
+ step = 1,
1340
+ end,
1341
+ functionChange,
1342
+ initialValue,
1343
+ prefix,
1344
+ sufix,
1345
+ marks,
1346
+ valueLabelDisplay = "auto",
1347
+ showLabel = false,
1348
+ disabled = false,
1349
+ inputDisabled = false,
1350
+ valueFormmated,
1351
+ showInput = false,
1352
+ ariaLabel,
1353
+ ...rest
1354
+ }) => {
1456
1355
  const [value, setValue] = useState2(initialValue);
1457
1356
  const controlLabel = ariaLabel || name;
1458
1357
  const valueInputId = `${name}-value`;
@@ -1494,7 +1393,7 @@ var InputSlider = (_a) => {
1494
1393
  id: name,
1495
1394
  min: start,
1496
1395
  max: end,
1497
- step: step != null ? step : 1,
1396
+ step: step ?? 1,
1498
1397
  disabled,
1499
1398
  value,
1500
1399
  "aria-label": controlLabel,
@@ -1510,7 +1409,7 @@ var InputSlider = (_a) => {
1510
1409
  onChange: handleInputChange,
1511
1410
  onBlur: handleBlur,
1512
1411
  type: "number",
1513
- step: step != null ? step : 1,
1412
+ step: step ?? 1,
1514
1413
  min: start,
1515
1414
  max: end,
1516
1415
  "aria-label": `${controlLabel} valor`,
@@ -1530,26 +1429,23 @@ var ALIGN_STYLES = {
1530
1429
  end: "tablet:justify-end",
1531
1430
  between: "tablet:justify-between"
1532
1431
  };
1533
- function FormActions(_a) {
1534
- var _b = _a, {
1535
- align = "end",
1536
- fullWidthOnMobile = true,
1537
- className
1538
- } = _b, rest = __objRest(_b, [
1539
- "align",
1540
- "fullWidthOnMobile",
1541
- "className"
1542
- ]);
1432
+ function FormActions({
1433
+ align = "end",
1434
+ fullWidthOnMobile = true,
1435
+ className,
1436
+ ...rest
1437
+ }) {
1543
1438
  return /* @__PURE__ */ jsx21(
1544
1439
  "div",
1545
- __spreadValues({
1440
+ {
1546
1441
  className: classNames7(
1547
1442
  "flex w-full flex-col gap-3 tablet:flex-row tablet:items-end",
1548
1443
  ALIGN_STYLES[align],
1549
1444
  fullWidthOnMobile && "[&>*]:w-full tablet:[&>*]:w-auto",
1550
1445
  className
1551
- )
1552
- }, rest)
1446
+ ),
1447
+ ...rest
1448
+ }
1553
1449
  );
1554
1450
  }
1555
1451
 
@@ -1568,17 +1464,17 @@ var COLUMN_STYLES = {
1568
1464
  10: "grid-cols-1 tablet:grid-cols-10",
1569
1465
  12: "grid-cols-1 tablet:grid-cols-12"
1570
1466
  };
1571
- function FormGrid(_a) {
1572
- var _b = _a, { columns = 2, className } = _b, rest = __objRest(_b, ["columns", "className"]);
1467
+ function FormGrid({ columns = 2, className, ...rest }) {
1573
1468
  return /* @__PURE__ */ jsx22(
1574
1469
  "div",
1575
- __spreadValues({
1470
+ {
1576
1471
  className: classNames8(
1577
1472
  "field-alignment-grid grid w-full gap-x-4 gap-y-5",
1578
1473
  COLUMN_STYLES[columns],
1579
1474
  className
1580
- )
1581
- }, rest)
1475
+ ),
1476
+ ...rest
1477
+ }
1582
1478
  );
1583
1479
  }
1584
1480
 
@@ -1606,7 +1502,7 @@ function PageHeading({
1606
1502
  contentClassName,
1607
1503
  spacing = "default"
1608
1504
  }) {
1609
- const backHref = getBackHref(back == null ? void 0 : back.href);
1505
+ const backHref = getBackHref(back?.href);
1610
1506
  const backClassName = "mb-2 inline-flex w-fit items-center gap-1 text-sm font-semibold text-content-link hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring";
1611
1507
  return /* @__PURE__ */ jsxs13(
1612
1508
  "header",
@@ -1705,10 +1601,9 @@ var hasOptionalValue = (value) => {
1705
1601
  return normalized !== "" && normalized !== "N/A";
1706
1602
  };
1707
1603
  function resolveOptionalValue(value, options = {}) {
1708
- var _a;
1709
1604
  if (hasOptionalValue(value)) return value;
1710
1605
  if (options.policy === "hide") return null;
1711
- return (_a = options.placeholder) != null ? _a : "-";
1606
+ return options.placeholder ?? "-";
1712
1607
  }
1713
1608
 
1714
1609
  // src/components/info-grid/InfoGrid.tsx
@@ -1720,44 +1615,34 @@ var COLUMN_STYLES2 = {
1720
1615
  4: "grid-cols-1 mobile:grid-cols-2 desktop:grid-cols-4",
1721
1616
  6: "grid-cols-1 mobile:grid-cols-2 tablet:grid-cols-3 desktop:grid-cols-6"
1722
1617
  };
1723
- function InfoGrid(_a) {
1724
- var _b = _a, { columns = 3, className } = _b, rest = __objRest(_b, ["columns", "className"]);
1618
+ function InfoGrid({ columns = 3, className, ...rest }) {
1725
1619
  return /* @__PURE__ */ jsx25(
1726
1620
  "dl",
1727
- __spreadValues({
1621
+ {
1728
1622
  className: classNames10(
1729
1623
  "grid gap-x-8 gap-y-5",
1730
1624
  COLUMN_STYLES2[columns],
1731
1625
  className
1732
- )
1733
- }, rest)
1626
+ ),
1627
+ ...rest
1628
+ }
1734
1629
  );
1735
1630
  }
1736
- function InfoItem(_a) {
1737
- var _b = _a, {
1738
- label,
1739
- value,
1740
- optional = "placeholder",
1741
- placeholder = "-",
1742
- numeric = false,
1743
- variant = "default",
1744
- className,
1745
- valueClassName,
1746
- children
1747
- } = _b, rest = __objRest(_b, [
1748
- "label",
1749
- "value",
1750
- "optional",
1751
- "placeholder",
1752
- "numeric",
1753
- "variant",
1754
- "className",
1755
- "valueClassName",
1756
- "children"
1757
- ]);
1631
+ function InfoItem({
1632
+ label,
1633
+ value,
1634
+ optional = "placeholder",
1635
+ placeholder = "-",
1636
+ numeric = false,
1637
+ variant = "default",
1638
+ className,
1639
+ valueClassName,
1640
+ children,
1641
+ ...rest
1642
+ }) {
1758
1643
  const resolved = resolveOptionalValue(value, { policy: optional, placeholder });
1759
1644
  if (resolved === null) return null;
1760
- return /* @__PURE__ */ jsxs15("div", __spreadProps(__spreadValues({ className: classNames10("min-w-0", className) }, rest), { children: [
1645
+ return /* @__PURE__ */ jsxs15("div", { className: classNames10("min-w-0", className), ...rest, children: [
1761
1646
  /* @__PURE__ */ jsx25("dt", { className: "break-words text-sm text-content-secondary", children: label }),
1762
1647
  /* @__PURE__ */ jsx25(
1763
1648
  "dd",
@@ -1768,42 +1653,36 @@ function InfoItem(_a) {
1768
1653
  numeric && "tabular-nums",
1769
1654
  valueClassName
1770
1655
  ),
1771
- children: children != null ? children : resolved
1656
+ children: children ?? resolved
1772
1657
  }
1773
1658
  )
1774
- ] }));
1659
+ ] });
1775
1660
  }
1776
1661
 
1777
1662
  // src/components/filter-bar/FilterBar.tsx
1778
1663
  import classNames11 from "classnames";
1779
1664
  import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
1780
- function FilterBar(_a) {
1781
- var _b = _a, {
1782
- filters,
1783
- actions,
1784
- columns = 3,
1785
- className,
1786
- actionClassName
1787
- } = _b, rest = __objRest(_b, [
1788
- "filters",
1789
- "actions",
1790
- "columns",
1791
- "className",
1792
- "actionClassName"
1793
- ]);
1665
+ function FilterBar({
1666
+ filters,
1667
+ actions,
1668
+ columns = 3,
1669
+ className,
1670
+ actionClassName,
1671
+ ...rest
1672
+ }) {
1794
1673
  return /* @__PURE__ */ jsxs16(
1795
1674
  "div",
1796
- __spreadProps(__spreadValues({
1675
+ {
1797
1676
  className: classNames11(
1798
1677
  "flex w-full flex-col gap-5 desktop:flex-row desktop:items-end",
1799
1678
  className
1800
- )
1801
- }, rest), {
1679
+ ),
1680
+ ...rest,
1802
1681
  children: [
1803
1682
  /* @__PURE__ */ jsx26(FormGrid, { columns, className: "min-w-0 flex-1", children: filters }),
1804
1683
  actions ? /* @__PURE__ */ jsx26(FormActions, { className: classNames11("desktop:w-auto", actionClassName), children: actions }) : null
1805
1684
  ]
1806
- })
1685
+ }
1807
1686
  );
1808
1687
  }
1809
1688
 
@@ -1840,7 +1719,7 @@ var NORMALIZED_STATUS = {
1840
1719
  "INATIVO"
1841
1720
  ])
1842
1721
  };
1843
- var normalizeStatus = (status) => String(status != null ? status : "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/\s+/g, " ").trim().toUpperCase();
1722
+ var normalizeStatus = (status) => String(status ?? "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/\s+/g, " ").trim().toUpperCase();
1844
1723
  var resolveGenericStatus = (status) => {
1845
1724
  if (NORMALIZED_STATUS.infoOutline.has(status)) {
1846
1725
  return { tone: "info", appearance: "outline" };
@@ -1863,14 +1742,13 @@ var resolveGenericStatus = (status) => {
1863
1742
  return { tone: "neutral", appearance: "outline" };
1864
1743
  };
1865
1744
  var resolveStatusAppearance = (status, domain = "generic", options) => {
1866
- var _a, _b, _c;
1867
1745
  const normalized = normalizeStatus(status);
1868
1746
  if (!normalized) {
1869
- return (_a = options == null ? void 0 : options.fallback) != null ? _a : { tone: "neutral", appearance: "outline" };
1747
+ return options?.fallback ?? { tone: "neutral", appearance: "outline" };
1870
1748
  }
1871
- const mappedAppearance = (options == null ? void 0 : options.map) ? (_b = Object.entries(options.map).find(
1749
+ const mappedAppearance = options?.map ? Object.entries(options.map).find(
1872
1750
  ([key]) => normalizeStatus(key) === normalized
1873
- )) == null ? void 0 : _b[1] : void 0;
1751
+ )?.[1] : void 0;
1874
1752
  if (mappedAppearance) return mappedAppearance;
1875
1753
  if (domain === "beneficiary") {
1876
1754
  if (normalized === "VIGENTE") return { tone: "success", appearance: "solid" };
@@ -1922,7 +1800,7 @@ var resolveStatusAppearance = (status, domain = "generic", options) => {
1922
1800
  return { tone: "danger", appearance: "solid" };
1923
1801
  }
1924
1802
  }
1925
- return (_c = options == null ? void 0 : options.fallback) != null ? _c : resolveGenericStatus(normalized);
1803
+ return options?.fallback ?? resolveGenericStatus(normalized);
1926
1804
  };
1927
1805
 
1928
1806
  // src/components/status-badge/StatusBadge.tsx
@@ -1959,29 +1837,20 @@ var SIZE_STYLES = {
1959
1837
  sm: "min-h-5 px-1 py-0.5 text-xs",
1960
1838
  md: "min-h-6 px-2 py-0.5 text-sm"
1961
1839
  };
1962
- function StatusBadge(_a) {
1963
- var _b = _a, {
1964
- children,
1965
- tone = "neutral",
1966
- appearance = "outline",
1967
- size = "md",
1968
- overflow = "wrap",
1969
- statusLabel,
1970
- className,
1971
- title
1972
- } = _b, rest = __objRest(_b, [
1973
- "children",
1974
- "tone",
1975
- "appearance",
1976
- "size",
1977
- "overflow",
1978
- "statusLabel",
1979
- "className",
1980
- "title"
1981
- ]);
1840
+ function StatusBadge({
1841
+ children,
1842
+ tone = "neutral",
1843
+ appearance = "outline",
1844
+ size = "md",
1845
+ overflow = "wrap",
1846
+ statusLabel,
1847
+ className,
1848
+ title,
1849
+ ...rest
1850
+ }) {
1982
1851
  return /* @__PURE__ */ jsx27(
1983
1852
  "span",
1984
- __spreadProps(__spreadValues({
1853
+ {
1985
1854
  className: classNames12(
1986
1855
  "inline-flex w-fit max-w-full items-center justify-center rounded-sm border-2 text-center font-bold uppercase tracking-wide",
1987
1856
  SIZE_STYLES[size],
@@ -1989,42 +1858,36 @@ function StatusBadge(_a) {
1989
1858
  overflow === "truncate" ? "overflow-hidden text-ellipsis whitespace-nowrap" : "whitespace-normal break-words",
1990
1859
  className
1991
1860
  ),
1992
- title: title != null ? title : typeof children === "string" ? children : void 0,
1993
- "aria-label": statusLabel
1994
- }, rest), {
1861
+ title: title ?? (typeof children === "string" ? children : void 0),
1862
+ "aria-label": statusLabel,
1863
+ ...rest,
1995
1864
  children
1996
- })
1865
+ }
1997
1866
  );
1998
1867
  }
1999
1868
  var getStatusBadgeClassName = (tone, appearance) => TONE_STYLES2[tone][appearance];
2000
1869
 
2001
1870
  // src/components/status-badge/DomainStatusBadge.tsx
2002
1871
  import { jsx as jsx28 } from "react/jsx-runtime";
2003
- function DomainStatusBadge(_a) {
2004
- var _b = _a, {
2005
- status,
2006
- domain = "generic",
2007
- empty = "hide",
2008
- placeholder = "-",
2009
- statusMap
2010
- } = _b, rest = __objRest(_b, [
2011
- "status",
2012
- "domain",
2013
- "empty",
2014
- "placeholder",
2015
- "statusMap"
2016
- ]);
2017
- const label = status == null ? void 0 : status.trim();
1872
+ function DomainStatusBadge({
1873
+ status,
1874
+ domain = "generic",
1875
+ empty = "hide",
1876
+ placeholder = "-",
1877
+ statusMap,
1878
+ ...rest
1879
+ }) {
1880
+ const label = status?.trim();
2018
1881
  if (!label && empty === "hide") return null;
2019
1882
  const resolved = resolveStatusAppearance(label, domain, { map: statusMap });
2020
1883
  return /* @__PURE__ */ jsx28(
2021
1884
  StatusBadge,
2022
- __spreadProps(__spreadValues({
1885
+ {
2023
1886
  tone: resolved.tone,
2024
- appearance: resolved.appearance
2025
- }, rest), {
1887
+ appearance: resolved.appearance,
1888
+ ...rest,
2026
1889
  children: label || placeholder
2027
- })
1890
+ }
2028
1891
  );
2029
1892
  }
2030
1893
 
@@ -2076,8 +1939,7 @@ function FocusNavigationMode() {
2076
1939
  // src/components/form-error-navigation/FormErrorNavigation.tsx
2077
1940
  import { useEffect as useEffect5 } from "react";
2078
1941
  function shouldReduceMotion() {
2079
- var _a, _b;
2080
- return (_b = (_a = window.matchMedia) == null ? void 0 : _a.call(window, "(prefers-reduced-motion: reduce)").matches) != null ? _b : false;
1942
+ return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;
2081
1943
  }
2082
1944
  var INVALID_FIELD_SELECTOR = [
2083
1945
  '[aria-invalid="true"]',
@@ -2114,7 +1976,7 @@ function findFirstInvalidField(form) {
2114
1976
  function navigateToInvalidField(field) {
2115
1977
  const focusTarget = getFocusTarget(field);
2116
1978
  const behavior = shouldReduceMotion() ? "auto" : "smooth";
2117
- focusTarget == null ? void 0 : focusTarget.focus({ preventScroll: true });
1979
+ focusTarget?.focus({ preventScroll: true });
2118
1980
  field.scrollIntoView({ behavior, block: "center", inline: "nearest" });
2119
1981
  }
2120
1982
  function FormErrorNavigation() {
@@ -2122,13 +1984,13 @@ function FormErrorNavigation() {
2122
1984
  let cleanupPendingNavigation;
2123
1985
  const handleSubmit = (event) => {
2124
1986
  if (!(event.target instanceof HTMLFormElement)) return;
2125
- cleanupPendingNavigation == null ? void 0 : cleanupPendingNavigation();
1987
+ cleanupPendingNavigation?.();
2126
1988
  const form = event.target;
2127
1989
  let handled = false;
2128
1990
  let observer;
2129
1991
  const timers = [];
2130
1992
  const cleanup = () => {
2131
- observer == null ? void 0 : observer.disconnect();
1993
+ observer?.disconnect();
2132
1994
  timers.forEach(window.clearTimeout);
2133
1995
  };
2134
1996
  const tryNavigate = () => {
@@ -2152,7 +2014,7 @@ function FormErrorNavigation() {
2152
2014
  };
2153
2015
  document.addEventListener("submit", handleSubmit, true);
2154
2016
  return () => {
2155
- cleanupPendingNavigation == null ? void 0 : cleanupPendingNavigation();
2017
+ cleanupPendingNavigation?.();
2156
2018
  document.removeEventListener("submit", handleSubmit, true);
2157
2019
  };
2158
2020
  }, []);
@@ -2199,84 +2061,81 @@ function FilterView({
2199
2061
  }
2200
2062
  };
2201
2063
  const handleControlChange = (control, event) => {
2202
- onControlChange == null ? void 0 : onControlChange(control, event.target.value);
2064
+ onControlChange?.(control, event.target.value);
2203
2065
  };
2204
2066
  const containerRef = useRef3(null);
2205
2067
  useEffect6(() => {
2206
2068
  if (!containerRef.current) return;
2207
2069
  containerRef.current.style.maxHeight = maxHeight ? `${maxHeight}px` : "";
2208
2070
  }, [maxHeight]);
2209
- if (controls == null ? void 0 : controls.length) {
2071
+ if (controls?.length) {
2210
2072
  return /* @__PURE__ */ jsx30(
2211
2073
  "div",
2212
2074
  {
2213
2075
  ref: containerRef,
2214
2076
  id,
2215
2077
  role: "dialog",
2216
- "aria-label": accessibleName != null ? accessibleName : "Filtros da tabela",
2078
+ "aria-label": accessibleName ?? "Filtros da tabela",
2217
2079
  className: "bg-surface-card rounded shadow-sm p-3 font-normal w-[calc(100vw-16px)] max-w-[320px] overflow-y-auto text-sm",
2218
- children: /* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-3", children: controls.map((control) => {
2219
- var _a, _b, _c, _d, _e;
2220
- return /* @__PURE__ */ jsxs17(
2221
- "div",
2222
- {
2223
- className: "flex flex-col gap-2 border-b border-border-default pb-3 last:border-b-0 last:pb-0",
2224
- children: [
2225
- control.label && /* @__PURE__ */ jsx30(
2226
- "span",
2227
- {
2228
- id: `${control.id}-label`,
2229
- className: "text-xs font-bold uppercase tracking-wide text-content-muted",
2230
- children: control.label
2231
- }
2232
- ),
2233
- control.type === "search" ? /* @__PURE__ */ jsx30(
2234
- "input",
2235
- {
2236
- type: "text",
2237
- "aria-label": (_b = (_a = control.label) != null ? _a : control.placeholder) != null ? _b : "Buscar",
2238
- "aria-describedby": control.label ? `${control.id}-label` : void 0,
2239
- value: (_c = control.value) != null ? _c : "",
2240
- placeholder: (_d = control.placeholder) != null ? _d : "Buscar",
2241
- onChange: (event) => handleControlChange(control, event),
2242
- className: "field-keyboard-focus-ring h-10 rounded border border-field-border-default bg-field-surface px-3 text-sm text-field-content outline-none placeholder:text-field-placeholder focus:border-field-border-active focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring"
2243
- }
2244
- ) : /* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-1", children: (_e = control.optionList) == null ? void 0 : _e.map((option, index) => /* @__PURE__ */ jsxs17(
2245
- "label",
2246
- {
2247
- className: cs3(
2248
- "min-h-6 flex items-start gap-2 px-3 py-0.5 cursor-pointer rounded",
2249
- control.value === option.value ? "bg-primary-5 text-primary-1" : "text-content-primary"
2080
+ children: /* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-3", children: controls.map((control) => /* @__PURE__ */ jsxs17(
2081
+ "div",
2082
+ {
2083
+ className: "flex flex-col gap-2 border-b border-border-default pb-3 last:border-b-0 last:pb-0",
2084
+ children: [
2085
+ control.label && /* @__PURE__ */ jsx30(
2086
+ "span",
2087
+ {
2088
+ id: `${control.id}-label`,
2089
+ className: "text-xs font-bold uppercase tracking-wide text-content-muted",
2090
+ children: control.label
2091
+ }
2092
+ ),
2093
+ control.type === "search" ? /* @__PURE__ */ jsx30(
2094
+ "input",
2095
+ {
2096
+ type: "text",
2097
+ "aria-label": control.label ?? control.placeholder ?? "Buscar",
2098
+ "aria-describedby": control.label ? `${control.id}-label` : void 0,
2099
+ value: control.value ?? "",
2100
+ placeholder: control.placeholder ?? "Buscar",
2101
+ onChange: (event) => handleControlChange(control, event),
2102
+ className: "field-keyboard-focus-ring h-10 rounded border border-field-border-default bg-field-surface px-3 text-sm text-field-content outline-none placeholder:text-field-placeholder focus:border-field-border-active focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring"
2103
+ }
2104
+ ) : /* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-1", children: control.optionList?.map((option, index) => /* @__PURE__ */ jsxs17(
2105
+ "label",
2106
+ {
2107
+ className: cs3(
2108
+ "min-h-6 flex items-start gap-2 px-3 py-0.5 cursor-pointer rounded",
2109
+ control.value === option.value ? "bg-primary-5 text-primary-1" : "text-content-primary"
2110
+ ),
2111
+ children: [
2112
+ /* @__PURE__ */ jsx30(
2113
+ "input",
2114
+ {
2115
+ type: "radio",
2116
+ className: "peer sr-only",
2117
+ value: option.value,
2118
+ checked: control.value === option.value,
2119
+ name: `table-filter-${groupName ?? "default"}-${control.id}`,
2120
+ onChange: (event) => handleControlChange(control, event)
2121
+ }
2250
2122
  ),
2251
- children: [
2252
- /* @__PURE__ */ jsx30(
2253
- "input",
2254
- {
2255
- type: "radio",
2256
- className: "peer sr-only",
2257
- value: option.value,
2258
- checked: control.value === option.value,
2259
- name: `table-filter-${groupName != null ? groupName : "default"}-${control.id}`,
2260
- onChange: (event) => handleControlChange(control, event)
2261
- }
2262
- ),
2263
- /* @__PURE__ */ jsx30(
2264
- "span",
2265
- {
2266
- "aria-hidden": "true",
2267
- className: "radio-control-proxy mt-1 peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus-ring"
2268
- }
2269
- ),
2270
- /* @__PURE__ */ jsx30("span", { className: "min-w-0 flex-1 mt-[4px]", children: option.label })
2271
- ]
2272
- },
2273
- `${control.id}-${index}`
2274
- )) })
2275
- ]
2276
- },
2277
- control.id
2278
- );
2279
- }) })
2123
+ /* @__PURE__ */ jsx30(
2124
+ "span",
2125
+ {
2126
+ "aria-hidden": "true",
2127
+ className: "radio-control-proxy mt-1 peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus-ring"
2128
+ }
2129
+ ),
2130
+ /* @__PURE__ */ jsx30("span", { className: "min-w-0 flex-1 mt-[4px]", children: option.label })
2131
+ ]
2132
+ },
2133
+ `${control.id}-${index}`
2134
+ )) })
2135
+ ]
2136
+ },
2137
+ control.id
2138
+ )) })
2280
2139
  }
2281
2140
  );
2282
2141
  }
@@ -2286,7 +2145,7 @@ function FilterView({
2286
2145
  ref: containerRef,
2287
2146
  id,
2288
2147
  role: "dialog",
2289
- "aria-label": accessibleName != null ? accessibleName : "Filtros da tabela",
2148
+ "aria-label": accessibleName ?? "Filtros da tabela",
2290
2149
  className: "bg-surface-card rounded shadow-sm p-2 font-normal w-[calc(100vw-16px)] max-w-[320px] overflow-y-auto",
2291
2150
  children: optionList && optionList.map((option, index) => /* @__PURE__ */ jsxs17(
2292
2151
  "label",
@@ -2303,7 +2162,7 @@ function FilterView({
2303
2162
  className: "peer sr-only",
2304
2163
  value: option.value,
2305
2164
  checked: optionChecked === option.value,
2306
- name: `table-filter-${groupName != null ? groupName : "default"}`,
2165
+ name: `table-filter-${groupName ?? "default"}`,
2307
2166
  onChange: handleChangeCheckbox
2308
2167
  }
2309
2168
  ),
@@ -2389,7 +2248,6 @@ function TableView({
2389
2248
  headerVariant = "default",
2390
2249
  density = "comfortable"
2391
2250
  }) {
2392
- var _a, _b;
2393
2251
  const tableId = useId2();
2394
2252
  const [openFilter, setOpenFilter] = useState3(null);
2395
2253
  const [filterMaxHeight, setFilterMaxHeight] = useState3();
@@ -2422,8 +2280,7 @@ function TableView({
2422
2280
  setOpenFilter(null);
2423
2281
  setFilterCoords(null);
2424
2282
  window.requestAnimationFrame(() => {
2425
- var _a2;
2426
- (_a2 = filterTriggerRefs.current[openFilter]) == null ? void 0 : _a2.focus();
2283
+ filterTriggerRefs.current[openFilter]?.focus();
2427
2284
  });
2428
2285
  };
2429
2286
  document.addEventListener("keydown", handleKeyDown);
@@ -2431,8 +2288,7 @@ function TableView({
2431
2288
  }, [openFilter]);
2432
2289
  useEffect7(() => {
2433
2290
  const updateFilterMaxHeight = () => {
2434
- var _a2;
2435
- const nextHeight = (_a2 = scrollContainerRef.current) == null ? void 0 : _a2.clientHeight;
2291
+ const nextHeight = scrollContainerRef.current?.clientHeight;
2436
2292
  if (!nextHeight) return;
2437
2293
  setFilterMaxHeight(Math.max(nextHeight - 24, 160));
2438
2294
  };
@@ -2462,20 +2318,18 @@ function TableView({
2462
2318
  useEffect7(() => {
2463
2319
  if (openFilter === null) return;
2464
2320
  const frame = window.requestAnimationFrame(() => {
2465
- var _a2, _b2;
2466
- (_b2 = (_a2 = filterRef.current) == null ? void 0 : _a2.querySelector(
2321
+ filterRef.current?.querySelector(
2467
2322
  "input, button, [tabindex]:not([tabindex='-1'])"
2468
- )) == null ? void 0 : _b2.focus();
2323
+ )?.focus();
2469
2324
  });
2470
2325
  return () => window.cancelAnimationFrame(frame);
2471
2326
  }, [openFilter]);
2472
2327
  const handleOpenFilter = (index) => {
2473
- var _a2, _b2;
2474
2328
  const next = openFilter === index ? null : index;
2475
2329
  setOpenFilter(next);
2476
2330
  if (next !== null) {
2477
- const wrapperRect = (_a2 = tableWrapperRef.current) == null ? void 0 : _a2.getBoundingClientRect();
2478
- const cellRect = (_b2 = headerCellRefs.current[next]) == null ? void 0 : _b2.getBoundingClientRect();
2331
+ const wrapperRect = tableWrapperRef.current?.getBoundingClientRect();
2332
+ const cellRect = headerCellRefs.current[next]?.getBoundingClientRect();
2479
2333
  if (wrapperRect && cellRect) {
2480
2334
  const top = cellRect.bottom - wrapperRect.top + 8;
2481
2335
  const dropdownWidth = Math.min(
@@ -2501,25 +2355,19 @@ function TableView({
2501
2355
  setFilterCoords(null);
2502
2356
  if (activeFilter !== null) {
2503
2357
  window.requestAnimationFrame(() => {
2504
- var _a2;
2505
- (_a2 = filterTriggerRefs.current[activeFilter]) == null ? void 0 : _a2.focus();
2358
+ filterTriggerRefs.current[activeFilter]?.focus();
2506
2359
  });
2507
2360
  }
2508
2361
  };
2509
- const hasFilterEnabled = (item) => {
2510
- var _a2, _b2, _c, _d;
2511
- return Boolean(((_b2 = (_a2 = item.filters) == null ? void 0 : _a2.optionList) == null ? void 0 : _b2.length) || ((_d = (_c = item.filters) == null ? void 0 : _c.controls) == null ? void 0 : _d.length));
2512
- };
2362
+ const hasFilterEnabled = (item) => Boolean(item.filters?.optionList?.length || item.filters?.controls?.length);
2513
2363
  const getHeaderIcon = (item) => {
2514
- var _a2, _b2, _c;
2515
2364
  if (!hasFilterEnabled(item)) {
2516
2365
  return null;
2517
2366
  }
2518
- const controls = (_b2 = (_a2 = item.filters) == null ? void 0 : _a2.controls) != null ? _b2 : [];
2367
+ const controls = item.filters?.controls ?? [];
2519
2368
  const hasActiveSearchOrOptionFilter = controls.some((control) => {
2520
- var _a3;
2521
2369
  if (control.type === "search") {
2522
- return Boolean((_a3 = control.value) == null ? void 0 : _a3.trim());
2370
+ return Boolean(control.value?.trim());
2523
2371
  }
2524
2372
  if (control.type === "options") {
2525
2373
  return Boolean(control.value && control.value !== "__all__");
@@ -2532,21 +2380,20 @@ function TableView({
2532
2380
  const activeSort = controls.find(
2533
2381
  (control) => control.type === "sort" && control.value && control.value !== "__all__" && control.value !== "default"
2534
2382
  );
2535
- if ((activeSort == null ? void 0 : activeSort.value) === "asc") {
2383
+ if (activeSort?.value === "asc") {
2536
2384
  return /* @__PURE__ */ jsx33(MdArrowUpward, { className: "h-3.5 w-3.5" });
2537
2385
  }
2538
- if ((activeSort == null ? void 0 : activeSort.value) === "desc") {
2386
+ if (activeSort?.value === "desc") {
2539
2387
  return /* @__PURE__ */ jsx33(MdArrowDownward, { className: "h-3.5 w-3.5" });
2540
2388
  }
2541
- const legacyOptionActive = ((_c = item.filters) == null ? void 0 : _c.optionChecked) && item.filters.optionChecked !== "__all__" && item.filters.optionChecked !== "default";
2389
+ const legacyOptionActive = item.filters?.optionChecked && item.filters.optionChecked !== "__all__" && item.filters.optionChecked !== "default";
2542
2390
  if (legacyOptionActive) {
2543
2391
  return /* @__PURE__ */ jsx33(MdFilterList, { className: "h-3.5 w-3.5" });
2544
2392
  }
2545
2393
  return /* @__PURE__ */ jsx33(MdOutlineFilterAlt, { className: "h-3.5 w-3.5" });
2546
2394
  };
2547
2395
  const getSortDirection = (item) => {
2548
- var _a2, _b2;
2549
- const sortControl = (_b2 = (_a2 = item.filters) == null ? void 0 : _a2.controls) == null ? void 0 : _b2.find(
2396
+ const sortControl = item.filters?.controls?.find(
2550
2397
  (control) => control.type === "sort"
2551
2398
  );
2552
2399
  if (!sortControl) return void 0;
@@ -2561,23 +2408,19 @@ function TableView({
2561
2408
  }
2562
2409
  };
2563
2410
  const handleFilterChange = (item, value, control) => {
2564
- var _a2, _b2, _c, _d;
2565
- if ((control == null ? void 0 : control.type) !== "search") {
2411
+ if (control?.type !== "search") {
2566
2412
  setOpenFilter(null);
2567
2413
  }
2568
2414
  if (control) {
2569
- (_b2 = (_a2 = item.filters) == null ? void 0 : _a2.onControlChange) == null ? void 0 : _b2.call(_a2, control, value);
2415
+ item.filters?.onControlChange?.(control, value);
2570
2416
  } else {
2571
- (_d = (_c = item.filters) == null ? void 0 : _c.onChange) == null ? void 0 : _d.call(_c, value);
2417
+ item.filters?.onChange?.(value);
2572
2418
  }
2573
2419
  if (onFilterChange) {
2574
2420
  onFilterChange(value);
2575
2421
  }
2576
2422
  };
2577
- const resolvedTotalWidthUnits = totalWidthUnits != null ? totalWidthUnits : header.reduce((sum, item) => {
2578
- var _a2;
2579
- return sum + ((_a2 = item.widthUnits) != null ? _a2 : 0);
2580
- }, 0) || void 0;
2423
+ const resolvedTotalWidthUnits = totalWidthUnits ?? (header.reduce((sum, item) => sum + (item.widthUnits ?? 0), 0) || void 0);
2581
2424
  const getColumnWidth = (widthUnits) => {
2582
2425
  if (!resolvedTotalWidthUnits || !widthUnits) {
2583
2426
  return void 0;
@@ -2585,10 +2428,10 @@ function TableView({
2585
2428
  return `${widthUnits / resolvedTotalWidthUnits * 100}%`;
2586
2429
  };
2587
2430
  const isNarrowContainer = tableWidth !== void 0 && tableWidth < 640;
2588
- const paginationVariant = isNarrowContainer ? "arrows" : (_a = pagination == null ? void 0 : pagination.variant) != null ? _a : "default";
2431
+ const paginationVariant = isNarrowContainer ? "arrows" : pagination?.variant ?? "default";
2589
2432
  const isAdaptiveCompact = overflowMode === "adaptive" && tableWidth !== void 0 && tableWidth < adaptiveBreakpoint;
2590
2433
  const overflowClass = overflowMode === "scroll" ? "overflow-x-auto" : "overflow-x-hidden";
2591
- const resolvedScrollAreaMaxHeight = stickyHeader ? scrollAreaMaxHeight != null ? scrollAreaMaxHeight : "calc(100dvh - 240px)" : scrollAreaMaxHeight;
2434
+ const resolvedScrollAreaMaxHeight = stickyHeader ? scrollAreaMaxHeight ?? "calc(100dvh - 240px)" : scrollAreaMaxHeight;
2592
2435
  const headerFocusClass = headerVariant === "brand" || headerVariant === "dark" ? "focus-visible:outline-current" : "focus-visible:outline-focus-ring";
2593
2436
  return /* @__PURE__ */ jsxs18(
2594
2437
  "div",
@@ -2610,13 +2453,12 @@ function TableView({
2610
2453
  children: /* @__PURE__ */ jsxs18(
2611
2454
  "table",
2612
2455
  {
2613
- "aria-label": caption ? void 0 : accessibleName != null ? accessibleName : `Tabela: ${header.map((item) => item.title).join(", ")}`,
2614
- className: `w-full max-w-full ${resolvedTotalWidthUnits && !isAdaptiveCompact ? "table-fixed" : ""} ${className != null ? className : ""}`,
2456
+ "aria-label": caption ? void 0 : accessibleName ?? `Tabela: ${header.map((item) => item.title).join(", ")}`,
2457
+ className: `w-full max-w-full ${resolvedTotalWidthUnits && !isAdaptiveCompact ? "table-fixed" : ""} ${className ?? ""}`,
2615
2458
  children: [
2616
2459
  caption && /* @__PURE__ */ jsx33("caption", { className: "sr-only", children: caption }),
2617
2460
  resolvedTotalWidthUnits && !isAdaptiveCompact && /* @__PURE__ */ jsx33("colgroup", { children: header.map((item, index) => /* @__PURE__ */ jsx33("col", { width: getColumnWidth(item.widthUnits) }, index)) }),
2618
2461
  /* @__PURE__ */ jsx33("thead", { className: "border-b border-border-default", children: /* @__PURE__ */ jsx33("tr", { className: HEADER_DENSITY_CLASSES[density].row, children: header.map((item, index) => {
2619
- var _a2, _b2, _c;
2620
2462
  const canOpenFilter = hasFilterEnabled(item);
2621
2463
  const headerIcon = getHeaderIcon(item);
2622
2464
  return /* @__PURE__ */ jsx33(
@@ -2627,7 +2469,7 @@ function TableView({
2627
2469
  ref: (element) => {
2628
2470
  headerCellRefs.current[index] = element;
2629
2471
  },
2630
- className: `${stickyHeader ? "sticky top-0 z-[1]" : "relative"} ${HEADER_VARIANT_CLASSES[headerVariant]} ${HEADER_DENSITY_CLASSES[density].cell} text-left text-md font-bold ${(_a2 = item.className) != null ? _a2 : ""}`,
2472
+ className: `${stickyHeader ? "sticky top-0 z-[1]" : "relative"} ${HEADER_VARIANT_CLASSES[headerVariant]} ${HEADER_DENSITY_CLASSES[density].cell} text-left text-md font-bold ${item.className ?? ""}`,
2631
2473
  "data-has-filter": canOpenFilter,
2632
2474
  children: canOpenFilter ? /* @__PURE__ */ jsxs18(
2633
2475
  "button",
@@ -2639,7 +2481,7 @@ function TableView({
2639
2481
  filterTriggerRefs.current[index] = element;
2640
2482
  },
2641
2483
  "aria-label": `Filtrar ou ordenar por ${item.title}`,
2642
- className: `flex min-h-11 w-full items-center gap-1.5 rounded-sm text-left focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 ${headerFocusClass} ${((_b2 = item.className) == null ? void 0 : _b2.includes("text-right")) ? "justify-end" : ""}`,
2484
+ className: `flex min-h-11 w-full items-center gap-1.5 rounded-sm text-left focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 ${headerFocusClass} ${item.className?.includes("text-right") ? "justify-end" : ""}`,
2643
2485
  onClick: () => handleHeaderAction(item, index),
2644
2486
  children: [
2645
2487
  /* @__PURE__ */ jsx33("span", { className: "min-w-0 truncate", children: item.title }),
@@ -2649,7 +2491,7 @@ function TableView({
2649
2491
  ) : /* @__PURE__ */ jsx33(
2650
2492
  "span",
2651
2493
  {
2652
- className: `flex items-center gap-1.5 ${((_c = item.className) == null ? void 0 : _c.includes("text-right")) ? "justify-end" : ""}`,
2494
+ className: `flex items-center gap-1.5 ${item.className?.includes("text-right") ? "justify-end" : ""}`,
2653
2495
  children: /* @__PURE__ */ jsx33("span", { className: "min-w-0 truncate", children: item.title })
2654
2496
  }
2655
2497
  )
@@ -2663,7 +2505,7 @@ function TableView({
2663
2505
  )
2664
2506
  }
2665
2507
  ),
2666
- openFilter !== null && filterCoords && ((_b = header[openFilter]) == null ? void 0 : _b.filters) && /* @__PURE__ */ jsx33("div", { ref: filterRef, className: "absolute z-popover", children: /* @__PURE__ */ jsx33(
2508
+ openFilter !== null && filterCoords && header[openFilter]?.filters && /* @__PURE__ */ jsx33("div", { ref: filterRef, className: "absolute z-popover", children: /* @__PURE__ */ jsx33(
2667
2509
  Filter_default,
2668
2510
  {
2669
2511
  id: `${tableId}-filter-${openFilter}`,
@@ -2752,7 +2594,6 @@ var TableView_default = TableView;
2752
2594
  // src/components/table/Table.tsx
2753
2595
  import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
2754
2596
  function Table(props) {
2755
- var _a;
2756
2597
  const {
2757
2598
  children,
2758
2599
  header,
@@ -2780,21 +2621,22 @@ function Table(props) {
2780
2621
  density = "comfortable"
2781
2622
  } = props;
2782
2623
  const tableId = useId3();
2783
- const resolvedOverflowMode = overflowMode != null ? overflowMode : data ? "adaptive" : "scroll";
2784
- const resolvedAdaptiveBreakpoint = adaptiveBreakpoint != null ? adaptiveBreakpoint : Math.min(920, 320 + Math.max(header.length - 2, 0) * 120);
2624
+ const resolvedOverflowMode = overflowMode ?? (data ? "adaptive" : "scroll");
2625
+ const resolvedAdaptiveBreakpoint = adaptiveBreakpoint ?? Math.min(920, 320 + Math.max(header.length - 2, 0) * 120);
2785
2626
  const [currentPage, setCurrentPage] = useState4(1);
2786
2627
  const [filterValues, setFilterValues] = useState4({});
2787
2628
  const [visibleExpandedRowId, setVisibleExpandedRowId] = useState4(
2788
- () => (expandable == null ? void 0 : expandable.expandedRowId) !== null && (expandable == null ? void 0 : expandable.expandedRowId) !== void 0 ? String(expandable.expandedRowId) : null
2629
+ () => expandable?.expandedRowId !== null && expandable?.expandedRowId !== void 0 ? String(expandable.expandedRowId) : null
2789
2630
  );
2790
2631
  const [closingExpandedRowId, setClosingExpandedRowId] = useState4(null);
2791
2632
  const safeItemsPerPage = Number.isFinite(itemsPerPage) ? Math.max(1, Math.floor(itemsPerPage)) : 10;
2792
2633
  const normalizedHeader = useMemo2(() => {
2793
2634
  return header.map((item) => {
2794
2635
  const typedItem = item;
2795
- return __spreadProps(__spreadValues({}, typedItem), {
2636
+ return {
2637
+ ...typedItem,
2796
2638
  title: typedItem.title
2797
- });
2639
+ };
2798
2640
  });
2799
2641
  }, [header]);
2800
2642
  const controlledHeader = useMemo2(() => {
@@ -2802,18 +2644,16 @@ function Table(props) {
2802
2644
  return normalizedHeader;
2803
2645
  }
2804
2646
  return normalizedHeader.map((item) => {
2805
- var _a2, _b;
2806
- const controls = (_b = (_a2 = item.filters) == null ? void 0 : _a2.controls) == null ? void 0 : _b.map((control) => {
2807
- var _a3, _b2;
2808
- return __spreadProps(__spreadValues({}, control), {
2809
- value: (_b2 = (_a3 = filterValues[`${item.key}-${control.id}`]) != null ? _a3 : control.value) != null ? _b2 : control.type === "search" ? "" : "__all__"
2810
- });
2811
- });
2812
- return __spreadProps(__spreadValues({}, item), {
2813
- filters: (controls == null ? void 0 : controls.length) ? {
2647
+ const controls = item.filters?.controls?.map((control) => ({
2648
+ ...control,
2649
+ value: filterValues[`${item.key}-${control.id}`] ?? control.value ?? (control.type === "search" ? "" : "__all__")
2650
+ }));
2651
+ return {
2652
+ ...item,
2653
+ filters: controls?.length ? {
2814
2654
  controls
2815
2655
  } : void 0
2816
- });
2656
+ };
2817
2657
  });
2818
2658
  }, [data, filterValues, normalizedHeader]);
2819
2659
  const filteredAndSortedData = useMemo2(() => {
@@ -2821,35 +2661,31 @@ function Table(props) {
2821
2661
  let result = [...data];
2822
2662
  const sorters = [];
2823
2663
  normalizedHeader.forEach((column) => {
2824
- var _a2, _b;
2825
- const controls = (_b = (_a2 = column.filters) == null ? void 0 : _a2.controls) != null ? _b : [];
2664
+ const controls = column.filters?.controls ?? [];
2826
2665
  controls.forEach((control) => {
2827
- var _a3, _b2;
2828
2666
  const stateKey = `${column.key}-${control.id}`;
2829
- const value = (_b2 = (_a3 = filterValues[stateKey]) != null ? _a3 : control.value) != null ? _b2 : control.type === "search" ? "" : "__all__";
2667
+ const value = filterValues[stateKey] ?? control.value ?? (control.type === "search" ? "" : "__all__");
2830
2668
  if (!value || value === "__all__") {
2831
2669
  return;
2832
2670
  }
2833
2671
  if (control.type === "options") {
2834
2672
  result = result.filter((item) => {
2835
- var _a4, _b3, _c, _d;
2836
- if ((_a4 = column.filters) == null ? void 0 : _a4.matchOption) {
2673
+ if (column.filters?.matchOption) {
2837
2674
  return column.filters.matchOption(item, value, control);
2838
2675
  }
2839
- const resolvedValue = (_d = (_b3 = column.filterAccessor) == null ? void 0 : _b3.call(column, item)) != null ? _d : (_c = column.accessor) == null ? void 0 : _c.call(column, item);
2840
- return String(resolvedValue != null ? resolvedValue : "") === value;
2676
+ const resolvedValue = column.filterAccessor?.(item) ?? column.accessor?.(item);
2677
+ return String(resolvedValue ?? "") === value;
2841
2678
  });
2842
2679
  return;
2843
2680
  }
2844
2681
  if (control.type === "search") {
2845
2682
  const normalizedSearch = value.toLowerCase().trim();
2846
2683
  result = result.filter((item) => {
2847
- var _a4, _b3, _c, _d, _e, _f, _g;
2848
- if ((_a4 = column.filters) == null ? void 0 : _a4.matchSearch) {
2684
+ if (column.filters?.matchSearch) {
2849
2685
  return column.filters.matchSearch(item, value, control);
2850
2686
  }
2851
- const searchableValue = (_g = (_b3 = column.searchAccessor) == null ? void 0 : _b3.call(column, item)) != null ? _g : String(
2852
- (_f = (_e = (_c = column.filterAccessor) == null ? void 0 : _c.call(column, item)) != null ? _e : (_d = column.accessor) == null ? void 0 : _d.call(column, item)) != null ? _f : ""
2687
+ const searchableValue = column.searchAccessor?.(item) ?? String(
2688
+ column.filterAccessor?.(item) ?? column.accessor?.(item) ?? ""
2853
2689
  );
2854
2690
  return searchableValue.toLowerCase().includes(normalizedSearch);
2855
2691
  });
@@ -2857,17 +2693,16 @@ function Table(props) {
2857
2693
  }
2858
2694
  if (control.type === "sort") {
2859
2695
  sorters.push((a, b) => {
2860
- var _a4, _b3, _c, _d, _e, _f, _g;
2861
- if ((_a4 = column.filters) == null ? void 0 : _a4.compare) {
2696
+ if (column.filters?.compare) {
2862
2697
  return column.filters.compare(a, b, value, control);
2863
2698
  }
2864
- const valueA = (_d = (_b3 = column.sortAccessor) == null ? void 0 : _b3.call(column, a)) != null ? _d : (_c = column.accessor) == null ? void 0 : _c.call(column, a);
2865
- const valueB = (_g = (_e = column.sortAccessor) == null ? void 0 : _e.call(column, b)) != null ? _g : (_f = column.accessor) == null ? void 0 : _f.call(column, b);
2699
+ const valueA = column.sortAccessor?.(a) ?? column.accessor?.(a);
2700
+ const valueB = column.sortAccessor?.(b) ?? column.accessor?.(b);
2866
2701
  if (typeof valueA === "number" && typeof valueB === "number") {
2867
2702
  return value === "desc" ? valueB - valueA : valueA - valueB;
2868
2703
  }
2869
- const stringA = String(valueA != null ? valueA : "");
2870
- const stringB = String(valueB != null ? valueB : "");
2704
+ const stringA = String(valueA ?? "");
2705
+ const stringB = String(valueB ?? "");
2871
2706
  return value === "desc" ? stringB.localeCompare(stringA) : stringA.localeCompare(stringB);
2872
2707
  });
2873
2708
  }
@@ -2937,10 +2772,9 @@ function Table(props) {
2937
2772
  return /* @__PURE__ */ jsxs19("tbody", { "data-managed-rows": "true", children: [
2938
2773
  internalPagination.pageData.map(
2939
2774
  (item, index) => (() => {
2940
- var _a2, _b, _c;
2941
- const rowId = expandable == null ? void 0 : expandable.getRowId(item, index);
2775
+ const rowId = expandable?.getRowId(item, index);
2942
2776
  const normalizedRowId = rowId !== void 0 ? String(rowId) : void 0;
2943
- const isExpanded = normalizedRowId !== void 0 && (expandable == null ? void 0 : expandable.expandedRowId) !== null && (expandable == null ? void 0 : expandable.expandedRowId) !== void 0 && String(expandable.expandedRowId) === normalizedRowId;
2777
+ const isExpanded = normalizedRowId !== void 0 && expandable?.expandedRowId !== null && expandable?.expandedRowId !== void 0 && String(expandable.expandedRowId) === normalizedRowId;
2944
2778
  const isVisibleExpandedRow = normalizedRowId !== void 0 && visibleExpandedRowId === normalizedRowId;
2945
2779
  const isClosingExpandedRow = normalizedRowId !== void 0 && closingExpandedRowId === normalizedRowId;
2946
2780
  const rowNumber = internalPagination.startItem + index;
@@ -2963,28 +2797,25 @@ function Table(props) {
2963
2797
  "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-focus-ring",
2964
2798
  showRowDivider ? "border-b border-border-default" : "",
2965
2799
  enableRowHover ? "hover:bg-primary-5" : "",
2966
- (_b = (_a2 = expandable == null ? void 0 : expandable.rowClassName) == null ? void 0 : _a2.call(expandable, item, Boolean(isExpanded))) != null ? _b : ""
2800
+ expandable?.rowClassName?.(item, Boolean(isExpanded)) ?? ""
2967
2801
  ].filter(Boolean).join(" "),
2968
- children: normalizedHeader.map((column, columnIndex) => {
2969
- var _a3, _b2, _c2;
2970
- return /* @__PURE__ */ jsx34(
2971
- "td",
2972
- {
2973
- id: rowContentIds[columnIndex],
2974
- "data-label": column.title,
2975
- className: (_a3 = column.cellClassName) != null ? _a3 : managedCellClassName,
2976
- children: column.renderCell ? column.renderCell(item, index) : String((_c2 = (_b2 = column.accessor) == null ? void 0 : _b2.call(column, item)) != null ? _c2 : "-")
2977
- },
2978
- column.key
2979
- );
2980
- })
2802
+ children: normalizedHeader.map((column, columnIndex) => /* @__PURE__ */ jsx34(
2803
+ "td",
2804
+ {
2805
+ id: rowContentIds[columnIndex],
2806
+ "data-label": column.title,
2807
+ className: column.cellClassName ?? managedCellClassName,
2808
+ children: column.renderCell ? column.renderCell(item, index) : String(column.accessor?.(item) ?? "-")
2809
+ },
2810
+ column.key
2811
+ ))
2981
2812
  }
2982
2813
  ),
2983
- isVisibleExpandedRow && expandable && /* @__PURE__ */ jsx34("tr", { className: expandable == null ? void 0 : expandable.expandedRowClassName, children: /* @__PURE__ */ jsx34(
2814
+ isVisibleExpandedRow && expandable && /* @__PURE__ */ jsx34("tr", { className: expandable?.expandedRowClassName, children: /* @__PURE__ */ jsx34(
2984
2815
  "td",
2985
2816
  {
2986
2817
  colSpan: normalizedHeader.length,
2987
- className: (_c = expandable == null ? void 0 : expandable.expandedContentClassName) != null ? _c : expandedContentClassName,
2818
+ className: expandable?.expandedContentClassName ?? expandedContentClassName,
2988
2819
  children: /* @__PURE__ */ jsx34(
2989
2820
  "div",
2990
2821
  {
@@ -3001,7 +2832,7 @@ function Table(props) {
3001
2832
  ) })
3002
2833
  ]
3003
2834
  },
3004
- `row-group-${normalizedRowId != null ? normalizedRowId : `${index}-${JSON.stringify(item)}`}`
2835
+ `row-group-${normalizedRowId ?? `${index}-${JSON.stringify(item)}`}`
3005
2836
  );
3006
2837
  })()
3007
2838
  ),
@@ -3043,33 +2874,30 @@ function Table(props) {
3043
2874
  onNext: () => setCurrentPage(
3044
2875
  (prev) => Math.min(prev + 1, internalPagination.totalPages)
3045
2876
  )
3046
- } : pagination ? __spreadProps(__spreadValues({}, pagination), {
3047
- variant: (_a = pagination.variant) != null ? _a : "default"
3048
- }) : pagination;
2877
+ } : pagination ? {
2878
+ ...pagination,
2879
+ variant: pagination.variant ?? "default"
2880
+ } : pagination;
3049
2881
  const resolvedShowPagination = data ? Boolean(
3050
2882
  internalPagination && internalPagination.totalItems > safeItemsPerPage
3051
2883
  ) : showPagination;
3052
2884
  const handleInternalFilterChange = (columnKey, controlId, value) => {
3053
- setFilterValues((prev) => __spreadProps(__spreadValues({}, prev), {
2885
+ setFilterValues((prev) => ({
2886
+ ...prev,
3054
2887
  [`${columnKey}-${controlId}`]: value
3055
2888
  }));
3056
2889
  };
3057
- const resolvedHeader = data ? controlledHeader.map((item) => {
3058
- var _a2, _b;
3059
- return __spreadProps(__spreadValues({}, item), {
3060
- filters: ((_b = (_a2 = item.filters) == null ? void 0 : _a2.controls) == null ? void 0 : _b.length) ? {
3061
- controls: item.filters.controls,
3062
- onControlChange: (control, value) => {
3063
- var _a3;
3064
- return handleInternalFilterChange(
3065
- (_a3 = item.key) != null ? _a3 : item.title,
3066
- control.id,
3067
- value
3068
- );
3069
- }
3070
- } : void 0
3071
- });
3072
- }) : controlledHeader;
2890
+ const resolvedHeader = data ? controlledHeader.map((item) => ({
2891
+ ...item,
2892
+ filters: item.filters?.controls?.length ? {
2893
+ controls: item.filters.controls,
2894
+ onControlChange: (control, value) => handleInternalFilterChange(
2895
+ item.key ?? item.title,
2896
+ control.id,
2897
+ value
2898
+ )
2899
+ } : void 0
2900
+ })) : controlledHeader;
3073
2901
  return /* @__PURE__ */ jsx34(
3074
2902
  TableView_default,
3075
2903
  {
@@ -3079,7 +2907,7 @@ function Table(props) {
3079
2907
  onFilterChange,
3080
2908
  className,
3081
2909
  showPagination: resolvedShowPagination,
3082
- pagination: resolvedPagination != null ? resolvedPagination : void 0,
2910
+ pagination: resolvedPagination ?? void 0,
3083
2911
  totalWidthUnits,
3084
2912
  overflowMode: resolvedOverflowMode,
3085
2913
  adaptiveBreakpoint: resolvedAdaptiveBreakpoint,
@@ -3115,7 +2943,7 @@ function MobileCardTable({
3115
2943
  const listId = useId4();
3116
2944
  const [currentPage, setCurrentPage] = useState5(1);
3117
2945
  const [visibleExpandedRowId, setVisibleExpandedRowId] = useState5(
3118
- () => (expandable == null ? void 0 : expandable.expandedRowId) !== null && (expandable == null ? void 0 : expandable.expandedRowId) !== void 0 ? String(expandable.expandedRowId) : null
2946
+ () => expandable?.expandedRowId !== null && expandable?.expandedRowId !== void 0 ? String(expandable.expandedRowId) : null
3119
2947
  );
3120
2948
  const [closingExpandedRowId, setClosingExpandedRowId] = useState5(
3121
2949
  null
@@ -3170,7 +2998,7 @@ function MobileCardTable({
3170
2998
  "div",
3171
2999
  {
3172
3000
  role: "region",
3173
- "aria-label": accessibleName != null ? accessibleName : `Lista: ${headers.map((header) => header.label).join(", ")}`,
3001
+ "aria-label": accessibleName ?? `Lista: ${headers.map((header) => header.label).join(", ")}`,
3174
3002
  className: `overflow-hidden rounded-sm border border-border-default bg-surface-card ${wrapperClassName}`.trim(),
3175
3003
  children: [
3176
3004
  /* @__PURE__ */ jsx35(
@@ -3181,10 +3009,9 @@ function MobileCardTable({
3181
3009
  }
3182
3010
  ),
3183
3011
  pagination.totalItems > 0 ? /* @__PURE__ */ jsx35("div", { role: "list", "aria-label": "Itens da lista", children: pagination.pageData.map((item, index) => (() => {
3184
- var _a, _b;
3185
- const rowId = expandable == null ? void 0 : expandable.getRowId(item, index);
3012
+ const rowId = expandable?.getRowId(item, index);
3186
3013
  const normalizedRowId = rowId !== void 0 ? String(rowId) : void 0;
3187
- const isExpanded = normalizedRowId !== void 0 && (expandable == null ? void 0 : expandable.expandedRowId) !== null && (expandable == null ? void 0 : expandable.expandedRowId) !== void 0 && String(expandable.expandedRowId) === normalizedRowId;
3014
+ const isExpanded = normalizedRowId !== void 0 && expandable?.expandedRowId !== null && expandable?.expandedRowId !== void 0 && String(expandable.expandedRowId) === normalizedRowId;
3188
3015
  const isVisibleExpandedRow = normalizedRowId !== void 0 && visibleExpandedRowId === normalizedRowId;
3189
3016
  const isClosingExpandedRow = normalizedRowId !== void 0 && closingExpandedRowId === normalizedRowId;
3190
3017
  const itemNumber = pagination.startItem + index;
@@ -3203,14 +3030,14 @@ function MobileCardTable({
3203
3030
  "div",
3204
3031
  {
3205
3032
  id: cardContentId,
3206
- className: (_a = expandable == null ? void 0 : expandable.rowClassName) == null ? void 0 : _a.call(expandable, item, Boolean(isExpanded)),
3033
+ className: expandable?.rowClassName?.(item, Boolean(isExpanded)),
3207
3034
  children: renderCard(item, index)
3208
3035
  }
3209
3036
  ),
3210
3037
  expandable && isVisibleExpandedRow && /* @__PURE__ */ jsx35(
3211
3038
  "div",
3212
3039
  {
3213
- className: (_b = expandable.expandedContentClassName) != null ? _b : "border-b border-border-default bg-surface-card px-3 py-4",
3040
+ className: expandable.expandedContentClassName ?? "border-b border-border-default bg-surface-card px-3 py-4",
3214
3041
  children: /* @__PURE__ */ jsx35(
3215
3042
  "div",
3216
3043
  {
@@ -3327,8 +3154,7 @@ function getBreakpointMapKey(breakpoints) {
3327
3154
  return Object.entries(breakpoints).sort(([first], [second]) => first.localeCompare(second)).map(([name, threshold]) => `${name}:${threshold}`).join("|");
3328
3155
  }
3329
3156
  function useContainerBreakpoint(ref, options = {}) {
3330
- var _a;
3331
- const thresholds = (_a = options.breakpoints) != null ? _a : defaultContainerBreakpoints;
3157
+ const thresholds = options.breakpoints ?? defaultContainerBreakpoints;
3332
3158
  const thresholdsKey = getBreakpointMapKey(thresholds);
3333
3159
  const sortedThresholds = useMemo4(
3334
3160
  () => Object.entries(thresholds).sort(
@@ -3398,4 +3224,4 @@ export {
3398
3224
  resolveContainerBreakpoint,
3399
3225
  useContainerBreakpoint
3400
3226
  };
3401
- //# sourceMappingURL=chunk-LTW323JQ.js.map
3227
+ //# sourceMappingURL=chunk-JGCZAVYV.js.map