analytica-frontend-lib 1.2.21 → 1.2.23

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 (41) hide show
  1. package/dist/AlertManager/index.css +20 -3
  2. package/dist/AlertManager/index.css.map +1 -1
  3. package/dist/AlertManagerView/index.js +382 -159
  4. package/dist/AlertManagerView/index.js.map +1 -1
  5. package/dist/AlertManagerView/index.mjs +381 -159
  6. package/dist/AlertManagerView/index.mjs.map +1 -1
  7. package/dist/EmptyState/index.d.mts +65 -0
  8. package/dist/EmptyState/index.d.ts +65 -0
  9. package/dist/EmptyState/index.js +185 -0
  10. package/dist/EmptyState/index.js.map +1 -0
  11. package/dist/EmptyState/index.mjs +162 -0
  12. package/dist/EmptyState/index.mjs.map +1 -0
  13. package/dist/Radio/index.d.mts +1 -1
  14. package/dist/Radio/index.d.ts +1 -1
  15. package/dist/Table/index.d.mts +23 -24
  16. package/dist/Table/index.d.ts +23 -24
  17. package/dist/Table/index.js +363 -140
  18. package/dist/Table/index.js.map +1 -1
  19. package/dist/Table/index.mjs +358 -136
  20. package/dist/Table/index.mjs.map +1 -1
  21. package/dist/TableProvider/index.css +20 -3
  22. package/dist/TableProvider/index.css.map +1 -1
  23. package/dist/TableProvider/index.d.mts +1 -1
  24. package/dist/TableProvider/index.d.ts +1 -1
  25. package/dist/TableProvider/index.js +861 -629
  26. package/dist/TableProvider/index.js.map +1 -1
  27. package/dist/TableProvider/index.mjs +772 -541
  28. package/dist/TableProvider/index.mjs.map +1 -1
  29. package/dist/{TableProvider-CDcL1tDj.d.mts → TableProvider-BnAnv3OV.d.mts} +51 -4
  30. package/dist/{TableProvider-D4Ak7ofz.d.ts → TableProvider-GfPlLqzg.d.ts} +51 -4
  31. package/dist/index.css +20 -3
  32. package/dist/index.css.map +1 -1
  33. package/dist/index.d.mts +4 -3
  34. package/dist/index.d.ts +4 -3
  35. package/dist/index.js +1361 -1279
  36. package/dist/index.js.map +1 -1
  37. package/dist/index.mjs +1318 -1238
  38. package/dist/index.mjs.map +1 -1
  39. package/dist/styles.css +20 -3
  40. package/dist/styles.css.map +1 -1
  41. package/package.json +2 -1
@@ -383,13 +383,12 @@ var Divider_default = Divider;
383
383
 
384
384
  // src/components/Table/Table.tsx
385
385
  import {
386
- forwardRef,
386
+ forwardRef as forwardRef2,
387
387
  useState,
388
388
  useMemo,
389
389
  useEffect as useEffect2,
390
390
  Children,
391
- isValidElement,
392
- cloneElement
391
+ isValidElement
393
392
  } from "react";
394
393
  import { CaretUp, CaretDown } from "phosphor-react";
395
394
 
@@ -422,123 +421,346 @@ var NoSearchResult = ({ image, title, description }) => {
422
421
  };
423
422
  var NoSearchResult_default = NoSearchResult;
424
423
 
425
- // src/components/Table/Table.tsx
424
+ // src/components/EmptyState/EmptyState.tsx
426
425
  import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
427
- var Table = forwardRef(
426
+ var EmptyState = ({
427
+ image,
428
+ title,
429
+ description,
430
+ buttonText,
431
+ buttonIcon,
432
+ onButtonClick,
433
+ buttonVariant = "solid",
434
+ buttonAction = "primary"
435
+ }) => {
436
+ const displayTitle = title || "Nenhum dado dispon\xEDvel";
437
+ const displayDescription = description || "N\xE3o h\xE1 dados para exibir no momento.";
438
+ return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col justify-center items-center gap-6 w-full min-h-[705px] bg-background rounded-xl p-6", children: [
439
+ image && /* @__PURE__ */ jsx6("img", { src: image, alt: displayTitle, className: "w-[170px] h-[150px]" }),
440
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-col items-center gap-4 w-full max-w-[600px] px-6", children: [
441
+ /* @__PURE__ */ jsx6(
442
+ Text_default,
443
+ {
444
+ as: "h2",
445
+ className: "text-text-950 font-semibold text-3xl leading-[35px] text-center",
446
+ children: displayTitle
447
+ }
448
+ ),
449
+ /* @__PURE__ */ jsx6(Text_default, { className: "text-text-600 font-normal text-[18px] leading-[27px] text-center", children: displayDescription })
450
+ ] }),
451
+ buttonText && onButtonClick && /* @__PURE__ */ jsx6(
452
+ Button_default,
453
+ {
454
+ variant: buttonVariant,
455
+ action: buttonAction,
456
+ size: "large",
457
+ onClick: onButtonClick,
458
+ iconLeft: buttonIcon,
459
+ className: "rounded-full px-5 py-2.5",
460
+ children: buttonText
461
+ }
462
+ )
463
+ ] });
464
+ };
465
+ var EmptyState_default = EmptyState;
466
+
467
+ // src/components/Skeleton/Skeleton.tsx
468
+ import { forwardRef } from "react";
469
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
470
+ var SKELETON_ANIMATION_CLASSES = {
471
+ pulse: "animate-pulse",
472
+ none: ""
473
+ };
474
+ var SKELETON_VARIANT_CLASSES = {
475
+ text: "h-4 bg-background-200 rounded",
476
+ circular: "bg-background-200 rounded-full",
477
+ rectangular: "bg-background-200",
478
+ rounded: "bg-background-200 rounded-lg"
479
+ };
480
+ var SPACING_CLASSES = {
481
+ none: "",
482
+ small: "space-y-1",
483
+ medium: "space-y-2",
484
+ large: "space-y-3"
485
+ };
486
+ var Skeleton = forwardRef(
428
487
  ({
429
- variant = "default",
430
- className,
488
+ variant = "text",
489
+ width,
490
+ height,
491
+ animation = "pulse",
492
+ lines = 1,
493
+ spacing = "none",
494
+ className = "",
431
495
  children,
432
- searchTerm,
433
- noSearchResultImage,
434
- noSearchResultTitle = "Nenhum resultado encontrado",
435
- noSearchResultDescription = "N\xE3o encontramos nenhum resultado com esse nome. Tente revisar a busca ou usar outra palavra-chave.",
436
- emptyStateMessage = "Nenhum dado dispon\xEDvel no momento.",
437
- emptyStateButtonText = "Adicionar item",
438
- onEmptyStateButtonClick,
439
496
  ...props
440
497
  }, ref) => {
441
- const isTableBodyEmpty = useMemo(() => {
442
- let foundBody = false;
443
- let empty = true;
444
- Children.forEach(children, (child) => {
445
- if (isValidElement(child) && child.type === TableBody) {
446
- foundBody = true;
447
- const bodyProps = child.props;
448
- if (Children.count(bodyProps?.children) > 0) {
449
- empty = false;
450
- }
451
- }
452
- });
453
- return foundBody ? empty : false;
454
- }, [children]);
455
- const columnCount = useMemo(() => {
456
- let count = 0;
457
- Children.forEach(children, (child) => {
458
- if (isValidElement(child) && child.type === TableHeader) {
459
- const headerProps = child.props;
460
- Children.forEach(headerProps.children, (row) => {
461
- if (isValidElement(row) && row.type === TableRow) {
462
- const rowProps = row.props;
463
- count = Children.count(rowProps.children);
464
- }
465
- });
466
- }
467
- });
468
- return count || 1;
469
- }, [children]);
470
- const hasSearchTerm = searchTerm && searchTerm.trim() !== "";
471
- const showNoSearchResult = hasSearchTerm && isTableBodyEmpty;
472
- const showEmptyState = !hasSearchTerm && isTableBodyEmpty;
473
- if (showNoSearchResult) {
474
- return /* @__PURE__ */ jsxs4(
498
+ const animationClass = SKELETON_ANIMATION_CLASSES[animation];
499
+ const variantClass = SKELETON_VARIANT_CLASSES[variant];
500
+ const spacingClass = SPACING_CLASSES[spacing];
501
+ const style = {
502
+ width: typeof width === "number" ? `${width}px` : width,
503
+ height: typeof height === "number" ? `${height}px` : height
504
+ };
505
+ if (variant === "text" && lines > 1) {
506
+ return /* @__PURE__ */ jsx7(
475
507
  "div",
476
508
  {
477
- className: cn(
478
- "relative w-full overflow-x-auto",
479
- variant === "default" && "border border-border-200 rounded-xl"
480
- ),
481
- children: [
482
- /* @__PURE__ */ jsx6(
483
- "table",
484
- {
485
- ref,
486
- className: cn(
487
- "analytica-table w-full caption-bottom text-sm border-separate border-spacing-0",
488
- className
489
- ),
490
- ...props,
491
- children: Children.map(children, (child) => {
492
- if (isValidElement(child) && (child.type === TableCaption || child.type === TableHeader)) {
493
- return child;
494
- }
495
- return null;
496
- })
497
- }
498
- ),
499
- /* @__PURE__ */ jsx6("div", { className: "py-8 flex justify-center", children: noSearchResultImage ? /* @__PURE__ */ jsx6(
500
- NoSearchResult_default,
501
- {
502
- image: noSearchResultImage,
503
- title: noSearchResultTitle,
504
- description: noSearchResultDescription
505
- }
506
- ) : /* @__PURE__ */ jsxs4("div", { className: "text-center", children: [
507
- /* @__PURE__ */ jsx6("p", { className: "text-text-600 text-lg font-semibold mb-2", children: noSearchResultTitle }),
508
- /* @__PURE__ */ jsx6("p", { className: "text-text-500 text-sm", children: noSearchResultDescription })
509
- ] }) })
510
- ]
509
+ ref,
510
+ className: cn("flex flex-col", spacingClass, className),
511
+ ...props,
512
+ children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ jsx7(
513
+ "div",
514
+ {
515
+ className: cn(variantClass, animationClass),
516
+ style: index === lines - 1 ? { width: "60%" } : void 0
517
+ },
518
+ index
519
+ ))
511
520
  }
512
521
  );
513
522
  }
514
- const modifiedChildren = Children.map(children, (child) => {
515
- if (isValidElement(child) && child.type === TableBody && showEmptyState) {
516
- return cloneElement(child, {
517
- children: /* @__PURE__ */ jsx6(TableRow, { variant, children: /* @__PURE__ */ jsx6(TableCell, { colSpan: columnCount, children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col items-center justify-center py-12 gap-4", children: [
518
- /* @__PURE__ */ jsx6("p", { className: "text-text-600 text-base font-normal", children: emptyStateMessage }),
519
- onEmptyStateButtonClick && /* @__PURE__ */ jsx6(
520
- Button_default,
521
- {
522
- variant: "solid",
523
- action: "primary",
524
- size: "medium",
525
- onClick: onEmptyStateButtonClick,
526
- children: emptyStateButtonText
527
- }
528
- )
529
- ] }) }) })
530
- });
523
+ return /* @__PURE__ */ jsx7(
524
+ "div",
525
+ {
526
+ ref,
527
+ className: cn(variantClass, animationClass, className),
528
+ style,
529
+ ...props,
530
+ children
531
531
  }
532
+ );
533
+ }
534
+ );
535
+ var SkeletonText = forwardRef(
536
+ (props, ref) => /* @__PURE__ */ jsx7(Skeleton, { ref, variant: "text", ...props })
537
+ );
538
+ var SkeletonCircle = forwardRef((props, ref) => /* @__PURE__ */ jsx7(Skeleton, { ref, variant: "circular", ...props }));
539
+ var SkeletonRectangle = forwardRef((props, ref) => /* @__PURE__ */ jsx7(Skeleton, { ref, variant: "rectangular", ...props }));
540
+ var SkeletonRounded = forwardRef((props, ref) => /* @__PURE__ */ jsx7(Skeleton, { ref, variant: "rounded", ...props }));
541
+ var SkeletonCard = forwardRef(
542
+ ({
543
+ showAvatar = true,
544
+ showTitle = true,
545
+ showDescription = true,
546
+ showActions = true,
547
+ lines = 2,
548
+ className = "",
549
+ ...props
550
+ }, ref) => {
551
+ return /* @__PURE__ */ jsxs5(
552
+ "div",
553
+ {
554
+ ref,
555
+ className: cn(
556
+ "w-full p-4 bg-background border border-border-200 rounded-lg",
557
+ className
558
+ ),
559
+ ...props,
560
+ children: [
561
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-start space-x-3", children: [
562
+ showAvatar && /* @__PURE__ */ jsx7(SkeletonCircle, { width: 40, height: 40 }),
563
+ /* @__PURE__ */ jsxs5("div", { className: "flex-1 space-y-2", children: [
564
+ showTitle && /* @__PURE__ */ jsx7(SkeletonText, { width: "60%", height: 20 }),
565
+ showDescription && /* @__PURE__ */ jsx7(SkeletonText, { lines, spacing: "small" })
566
+ ] })
567
+ ] }),
568
+ showActions && /* @__PURE__ */ jsxs5("div", { className: "flex justify-end space-x-2 mt-4", children: [
569
+ /* @__PURE__ */ jsx7(SkeletonRectangle, { width: 80, height: 32 }),
570
+ /* @__PURE__ */ jsx7(SkeletonRectangle, { width: 80, height: 32 })
571
+ ] })
572
+ ]
573
+ }
574
+ );
575
+ }
576
+ );
577
+ var SkeletonList = forwardRef(
578
+ ({
579
+ items = 3,
580
+ showAvatar = true,
581
+ showTitle = true,
582
+ showDescription = true,
583
+ lines = 1,
584
+ className = "",
585
+ ...props
586
+ }, ref) => {
587
+ return /* @__PURE__ */ jsx7("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ jsxs5("div", { className: "flex items-start space-x-3 p-3", children: [
588
+ showAvatar && /* @__PURE__ */ jsx7(SkeletonCircle, { width: 32, height: 32 }),
589
+ /* @__PURE__ */ jsxs5("div", { className: "flex-1 space-y-2", children: [
590
+ showTitle && /* @__PURE__ */ jsx7(SkeletonText, { width: "40%", height: 16 }),
591
+ showDescription && /* @__PURE__ */ jsx7(SkeletonText, { lines, spacing: "small" })
592
+ ] })
593
+ ] }, index)) });
594
+ }
595
+ );
596
+ var SkeletonTable = forwardRef(
597
+ ({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
598
+ return /* @__PURE__ */ jsxs5("div", { ref, className: cn("w-full", className), ...props, children: [
599
+ showHeader && /* @__PURE__ */ jsx7("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ jsx7(
600
+ SkeletonText,
601
+ {
602
+ width: `${100 / columns}%`,
603
+ height: 20
604
+ },
605
+ index
606
+ )) }),
607
+ /* @__PURE__ */ jsx7("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ jsx7("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ jsx7(
608
+ SkeletonText,
609
+ {
610
+ width: `${100 / columns}%`,
611
+ height: 16
612
+ },
613
+ colIndex
614
+ )) }, rowIndex)) })
615
+ ] });
616
+ }
617
+ );
618
+
619
+ // src/components/Table/Table.tsx
620
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
621
+ var renderHeaderElements = (children) => {
622
+ return Children.map(children, (child) => {
623
+ if (isValidElement(child) && (child.type === TableCaption || child.type === TableHeader)) {
532
624
  return child;
533
- });
534
- return /* @__PURE__ */ jsx6(
625
+ }
626
+ return null;
627
+ });
628
+ };
629
+ var getNoSearchResultContent = (config, defaultTitle, defaultDescription) => {
630
+ if (config.component) {
631
+ return config.component;
632
+ }
633
+ if (config.image) {
634
+ return /* @__PURE__ */ jsx8(
635
+ NoSearchResult_default,
636
+ {
637
+ image: config.image,
638
+ title: config.title || defaultTitle,
639
+ description: config.description || defaultDescription
640
+ }
641
+ );
642
+ }
643
+ return /* @__PURE__ */ jsxs6("div", { className: "text-center", children: [
644
+ /* @__PURE__ */ jsx8("p", { className: "text-text-600 text-lg font-semibold mb-2", children: config.title || defaultTitle }),
645
+ /* @__PURE__ */ jsx8("p", { className: "text-text-500 text-sm", children: config.description || defaultDescription })
646
+ ] });
647
+ };
648
+ var getEmptyStateContent = (config, defaultTitle, defaultDescription) => {
649
+ if (config?.component) {
650
+ return config.component;
651
+ }
652
+ return /* @__PURE__ */ jsx8(
653
+ EmptyState_default,
654
+ {
655
+ image: config?.image,
656
+ title: config?.title || defaultTitle,
657
+ description: config?.description || defaultDescription,
658
+ buttonText: config?.buttonText,
659
+ buttonIcon: config?.buttonIcon,
660
+ onButtonClick: config?.onButtonClick,
661
+ buttonVariant: config?.buttonVariant,
662
+ buttonAction: config?.buttonAction
663
+ }
664
+ );
665
+ };
666
+ var renderTableWrapper = (variant, tableRef, className, children, stateContent, tableProps) => {
667
+ return /* @__PURE__ */ jsxs6(
668
+ "div",
669
+ {
670
+ className: cn(
671
+ "relative w-full overflow-x-auto",
672
+ variant === "default" && "border border-border-200 rounded-xl"
673
+ ),
674
+ children: [
675
+ /* @__PURE__ */ jsx8(
676
+ "table",
677
+ {
678
+ ref: tableRef,
679
+ className: cn(
680
+ "analytica-table w-full caption-bottom text-sm border-separate border-spacing-0",
681
+ className
682
+ ),
683
+ ...tableProps,
684
+ children: renderHeaderElements(children)
685
+ }
686
+ ),
687
+ /* @__PURE__ */ jsx8("div", { className: "py-8 flex justify-center", children: stateContent })
688
+ ]
689
+ }
690
+ );
691
+ };
692
+ var Table = forwardRef2(
693
+ ({
694
+ variant = "default",
695
+ className,
696
+ children,
697
+ showLoading = false,
698
+ loadingState,
699
+ showNoSearchResult = false,
700
+ noSearchResultState,
701
+ showEmpty = false,
702
+ emptyState,
703
+ ...props
704
+ }, ref) => {
705
+ const defaultNoSearchResultState = {
706
+ title: "Nenhum resultado encontrado",
707
+ description: "N\xE3o encontramos nenhum resultado com esse nome. Tente revisar a busca ou usar outra palavra-chave."
708
+ };
709
+ const defaultEmptyState = {
710
+ title: "Nenhum dado dispon\xEDvel",
711
+ description: "N\xE3o h\xE1 dados para exibir no momento."
712
+ };
713
+ const finalNoSearchResultState = noSearchResultState || defaultNoSearchResultState;
714
+ const finalEmptyState = emptyState || defaultEmptyState;
715
+ if (showLoading) {
716
+ const loadingContent = loadingState?.component || /* @__PURE__ */ jsx8(SkeletonTable, { rows: 5, columns: 4, showHeader: false });
717
+ return renderTableWrapper(
718
+ variant,
719
+ ref,
720
+ className,
721
+ children,
722
+ loadingContent,
723
+ props
724
+ );
725
+ }
726
+ if (showNoSearchResult) {
727
+ const noSearchContent = getNoSearchResultContent(
728
+ finalNoSearchResultState,
729
+ defaultNoSearchResultState.title || "",
730
+ defaultNoSearchResultState.description || ""
731
+ );
732
+ return renderTableWrapper(
733
+ variant,
734
+ ref,
735
+ className,
736
+ children,
737
+ noSearchContent,
738
+ props
739
+ );
740
+ }
741
+ if (showEmpty) {
742
+ const emptyContent = getEmptyStateContent(
743
+ finalEmptyState,
744
+ defaultEmptyState.title || "Nenhum dado dispon\xEDvel",
745
+ defaultEmptyState.description || "N\xE3o h\xE1 dados para exibir no momento."
746
+ );
747
+ return renderTableWrapper(
748
+ variant,
749
+ ref,
750
+ className,
751
+ children,
752
+ emptyContent,
753
+ props
754
+ );
755
+ }
756
+ return /* @__PURE__ */ jsx8(
535
757
  "div",
536
758
  {
537
759
  className: cn(
538
760
  "relative w-full overflow-x-auto",
539
761
  variant === "default" && "border border-border-200 rounded-xl"
540
762
  ),
541
- children: /* @__PURE__ */ jsxs4(
763
+ children: /* @__PURE__ */ jsxs6(
542
764
  "table",
543
765
  {
544
766
  ref,
@@ -552,8 +774,8 @@ var Table = forwardRef(
552
774
  children: [
553
775
  !Children.toArray(children).some(
554
776
  (child) => isValidElement(child) && child.type === TableCaption
555
- ) && /* @__PURE__ */ jsx6("caption", { className: "sr-only", children: "My Table" }),
556
- modifiedChildren
777
+ ) && /* @__PURE__ */ jsx8("caption", { className: "sr-only", children: "My Table" }),
778
+ children
557
779
  ]
558
780
  }
559
781
  )
@@ -562,7 +784,7 @@ var Table = forwardRef(
562
784
  }
563
785
  );
564
786
  Table.displayName = "Table";
565
- var TableHeader = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
787
+ var TableHeader = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
566
788
  "thead",
567
789
  {
568
790
  ref,
@@ -571,8 +793,8 @@ var TableHeader = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
571
793
  }
572
794
  ));
573
795
  TableHeader.displayName = "TableHeader";
574
- var TableBody = forwardRef(
575
- ({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx6(
796
+ var TableBody = forwardRef2(
797
+ ({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx8(
576
798
  "tbody",
577
799
  {
578
800
  ref,
@@ -586,8 +808,8 @@ var TableBody = forwardRef(
586
808
  )
587
809
  );
588
810
  TableBody.displayName = "TableBody";
589
- var TableFooter = forwardRef(
590
- ({ variant = "default", className, ...props }, ref) => /* @__PURE__ */ jsx6(
811
+ var TableFooter = forwardRef2(
812
+ ({ variant = "default", className, ...props }, ref) => /* @__PURE__ */ jsx8(
591
813
  "tfoot",
592
814
  {
593
815
  ref,
@@ -623,7 +845,7 @@ var VARIANT_STATES_ROW = {
623
845
  borderless: "bg-background-50 opacity-50 cursor-not-allowed"
624
846
  }
625
847
  };
626
- var TableRow = forwardRef(
848
+ var TableRow = forwardRef2(
627
849
  ({
628
850
  variant = "default",
629
851
  state = "default",
@@ -631,7 +853,7 @@ var TableRow = forwardRef(
631
853
  className,
632
854
  ...props
633
855
  }, ref) => {
634
- return /* @__PURE__ */ jsx6(
856
+ return /* @__PURE__ */ jsx8(
635
857
  "tr",
636
858
  {
637
859
  ref,
@@ -649,7 +871,7 @@ var TableRow = forwardRef(
649
871
  }
650
872
  );
651
873
  TableRow.displayName = "TableRow";
652
- var TableHead = forwardRef(
874
+ var TableHead = forwardRef2(
653
875
  ({
654
876
  className,
655
877
  sortable = true,
@@ -663,7 +885,7 @@ var TableHead = forwardRef(
663
885
  onSort();
664
886
  }
665
887
  };
666
- return /* @__PURE__ */ jsx6(
888
+ return /* @__PURE__ */ jsx8(
667
889
  "th",
668
890
  {
669
891
  ref,
@@ -674,11 +896,11 @@ var TableHead = forwardRef(
674
896
  ),
675
897
  onClick: handleClick,
676
898
  ...props,
677
- children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
899
+ children: /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2", children: [
678
900
  children,
679
- sortable && /* @__PURE__ */ jsxs4("div", { className: "flex flex-col", children: [
680
- sortDirection === "asc" && /* @__PURE__ */ jsx6(CaretUp, { size: 16, weight: "fill", className: "text-text-800" }),
681
- sortDirection === "desc" && /* @__PURE__ */ jsx6(CaretDown, { size: 16, weight: "fill", className: "text-text-800" })
901
+ sortable && /* @__PURE__ */ jsxs6("div", { className: "flex flex-col", children: [
902
+ sortDirection === "asc" && /* @__PURE__ */ jsx8(CaretUp, { size: 16, weight: "fill", className: "text-text-800" }),
903
+ sortDirection === "desc" && /* @__PURE__ */ jsx8(CaretDown, { size: 16, weight: "fill", className: "text-text-800" })
682
904
  ] })
683
905
  ] })
684
906
  }
@@ -686,7 +908,7 @@ var TableHead = forwardRef(
686
908
  }
687
909
  );
688
910
  TableHead.displayName = "TableHead";
689
- var TableCell = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
911
+ var TableCell = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
690
912
  "td",
691
913
  {
692
914
  ref,
@@ -698,7 +920,7 @@ var TableCell = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx
698
920
  }
699
921
  ));
700
922
  TableCell.displayName = "TableCell";
701
- var TableCaption = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
923
+ var TableCaption = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
702
924
  "caption",
703
925
  {
704
926
  ref,
@@ -714,7 +936,7 @@ var Table_default = Table;
714
936
 
715
937
  // src/components/Badge/Badge.tsx
716
938
  import { Bell } from "phosphor-react";
717
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
939
+ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
718
940
  var VARIANT_ACTION_CLASSES2 = {
719
941
  solid: {
720
942
  error: "bg-error-background text-error-700 focus-visible:outline-none",
@@ -776,14 +998,14 @@ var Badge = ({
776
998
  const baseClasses = "inline-flex items-center justify-center rounded-xs font-normal gap-1 relative";
777
999
  const baseClassesIcon = "flex items-center";
778
1000
  if (variant === "notification") {
779
- return /* @__PURE__ */ jsxs5(
1001
+ return /* @__PURE__ */ jsxs7(
780
1002
  "div",
781
1003
  {
782
1004
  className: cn(baseClasses, variantClasses, sizeClasses, className),
783
1005
  ...props,
784
1006
  children: [
785
- /* @__PURE__ */ jsx7(Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
786
- notificationActive && /* @__PURE__ */ jsx7(
1007
+ /* @__PURE__ */ jsx9(Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
1008
+ notificationActive && /* @__PURE__ */ jsx9(
787
1009
  "span",
788
1010
  {
789
1011
  "data-testid": "notification-dot",
@@ -794,15 +1016,15 @@ var Badge = ({
794
1016
  }
795
1017
  );
796
1018
  }
797
- return /* @__PURE__ */ jsxs5(
1019
+ return /* @__PURE__ */ jsxs7(
798
1020
  "div",
799
1021
  {
800
1022
  className: cn(baseClasses, variantClasses, sizeClasses, className),
801
1023
  ...props,
802
1024
  children: [
803
- iconLeft && /* @__PURE__ */ jsx7("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
1025
+ iconLeft && /* @__PURE__ */ jsx9("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
804
1026
  children,
805
- iconRight && /* @__PURE__ */ jsx7("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
1027
+ iconRight && /* @__PURE__ */ jsx9("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
806
1028
  ]
807
1029
  }
808
1030
  );
@@ -811,7 +1033,7 @@ var Badge_default = Badge;
811
1033
 
812
1034
  // src/components/AlertManagerView/AlertsManagerView.tsx
813
1035
  import { CaretLeft, CaretRight, User } from "phosphor-react";
814
- import { Fragment, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1036
+ import { Fragment, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
815
1037
  var AlertsManagerView = ({
816
1038
  alertData,
817
1039
  isOpen = false,
@@ -840,7 +1062,7 @@ var AlertsManagerView = ({
840
1062
  year: "numeric"
841
1063
  });
842
1064
  };
843
- return /* @__PURE__ */ jsx8(
1065
+ return /* @__PURE__ */ jsx10(
844
1066
  Modal_default,
845
1067
  {
846
1068
  isOpen,
@@ -848,59 +1070,59 @@ var AlertsManagerView = ({
848
1070
  title: alertData.title,
849
1071
  size: "md",
850
1072
  contentClassName: "p-0",
851
- children: /* @__PURE__ */ jsx8("div", { className: "flex flex-col h-[calc(100vh-8rem)] max-h-[700px]", children: /* @__PURE__ */ jsxs6("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: [
852
- /* @__PURE__ */ jsxs6("div", { className: "bg-background-50 px-5 py-6 flex flex-col items-center gap-4 rounded-xl mb-4", children: [
853
- (imageLink || alertData.image || defaultImage) && /* @__PURE__ */ jsx8(
1073
+ children: /* @__PURE__ */ jsx10("div", { className: "flex flex-col h-[calc(100vh-8rem)] max-h-[700px]", children: /* @__PURE__ */ jsxs8("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: [
1074
+ /* @__PURE__ */ jsxs8("div", { className: "bg-background-50 px-5 py-6 flex flex-col items-center gap-4 rounded-xl mb-4", children: [
1075
+ (imageLink || alertData.image || defaultImage) && /* @__PURE__ */ jsx10(
854
1076
  "img",
855
1077
  {
856
1078
  src: imageLink || alertData.image || defaultImage || void 0,
857
1079
  alt: alertData.title || "Imagem do alerta"
858
1080
  }
859
1081
  ),
860
- /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center text-center gap-3", children: [
861
- /* @__PURE__ */ jsx8(Text_default, { size: "lg", weight: "semibold", children: alertData.title || "Sem T\xEDtulo" }),
862
- /* @__PURE__ */ jsx8(Text_default, { size: "sm", weight: "normal", className: "text-text-500", children: alertData.message || "Sem mensagem" })
1082
+ /* @__PURE__ */ jsxs8("div", { className: "flex flex-col items-center text-center gap-3", children: [
1083
+ /* @__PURE__ */ jsx10(Text_default, { size: "lg", weight: "semibold", children: alertData.title || "Sem T\xEDtulo" }),
1084
+ /* @__PURE__ */ jsx10(Text_default, { size: "sm", weight: "normal", className: "text-text-500", children: alertData.message || "Sem mensagem" })
863
1085
  ] })
864
1086
  ] }),
865
- /* @__PURE__ */ jsx8(Divider_default, { className: "my-4" }),
866
- /* @__PURE__ */ jsxs6("div", { className: "flex justify-between items-center mb-4 px-2", children: [
867
- /* @__PURE__ */ jsx8(Text_default, { size: "sm", weight: "bold", className: "text-text-700", children: "Enviado em" }),
868
- /* @__PURE__ */ jsx8(Text_default, { size: "sm", weight: "medium", className: "text-text-900", children: formatDate(alertData.sentAt) })
1087
+ /* @__PURE__ */ jsx10(Divider_default, { className: "my-4" }),
1088
+ /* @__PURE__ */ jsxs8("div", { className: "flex justify-between items-center mb-4 px-2", children: [
1089
+ /* @__PURE__ */ jsx10(Text_default, { size: "sm", weight: "bold", className: "text-text-700", children: "Enviado em" }),
1090
+ /* @__PURE__ */ jsx10(Text_default, { size: "sm", weight: "medium", className: "text-text-900", children: formatDate(alertData.sentAt) })
869
1091
  ] }),
870
- /* @__PURE__ */ jsx8(Divider_default, { className: "my-4" }),
871
- /* @__PURE__ */ jsx8("div", { className: "mb-4", children: /* @__PURE__ */ jsxs6(Table_default, { variant: "borderless", className: "table-fixed", children: [
872
- /* @__PURE__ */ jsx8(TableHeader, { children: /* @__PURE__ */ jsxs6(TableRow, { variant: "borderless", children: [
873
- /* @__PURE__ */ jsx8(TableHead, { className: "py-2 px-3.5 text-start", children: "Destinat\xE1rio" }),
874
- /* @__PURE__ */ jsx8(TableHead, { className: "py-2 px-3.5 w-[120px] text-start", children: "Status" })
1092
+ /* @__PURE__ */ jsx10(Divider_default, { className: "my-4" }),
1093
+ /* @__PURE__ */ jsx10("div", { className: "mb-4", children: /* @__PURE__ */ jsxs8(Table_default, { variant: "borderless", className: "table-fixed", children: [
1094
+ /* @__PURE__ */ jsx10(TableHeader, { children: /* @__PURE__ */ jsxs8(TableRow, { variant: "borderless", children: [
1095
+ /* @__PURE__ */ jsx10(TableHead, { className: "py-2 px-3.5 text-start", children: "Destinat\xE1rio" }),
1096
+ /* @__PURE__ */ jsx10(TableHead, { className: "py-2 px-3.5 w-[120px] text-start", children: "Status" })
875
1097
  ] }) }),
876
- /* @__PURE__ */ jsx8(TableBody, { variant: "borderless", children: paginatedRecipients.map((recipient) => /* @__PURE__ */ jsxs6(TableRow, { children: [
877
- /* @__PURE__ */ jsxs6(TableCell, { className: "py-2 px-3.5 flex flex-row gap-2 text-start truncate", children: [
878
- /* @__PURE__ */ jsx8("div", { className: "rounded-full size-6 bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ jsx8(User, { className: "text-primary-950", size: 18 }) }),
1098
+ /* @__PURE__ */ jsx10(TableBody, { variant: "borderless", children: paginatedRecipients.map((recipient) => /* @__PURE__ */ jsxs8(TableRow, { children: [
1099
+ /* @__PURE__ */ jsxs8(TableCell, { className: "py-2 px-3.5 flex flex-row gap-2 text-start truncate", children: [
1100
+ /* @__PURE__ */ jsx10("div", { className: "rounded-full size-6 bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ jsx10(User, { className: "text-primary-950", size: 18 }) }),
879
1101
  recipient.name
880
1102
  ] }),
881
- /* @__PURE__ */ jsx8(TableCell, { className: "py-2 px-3.5 text-center", children: /* @__PURE__ */ jsx8("div", { className: "flex justify-center items-center gap-1", children: recipient.status === "viewed" ? /* @__PURE__ */ jsx8(Badge_default, { variant: "solid", action: "success", children: "Visualizado" }) : /* @__PURE__ */ jsx8(Badge_default, { variant: "solid", action: "error", children: "Pendente" }) }) })
1103
+ /* @__PURE__ */ jsx10(TableCell, { className: "py-2 px-3.5 text-center", children: /* @__PURE__ */ jsx10("div", { className: "flex justify-center items-center gap-1", children: recipient.status === "viewed" ? /* @__PURE__ */ jsx10(Badge_default, { variant: "solid", action: "success", children: "Visualizado" }) : /* @__PURE__ */ jsx10(Badge_default, { variant: "solid", action: "error", children: "Pendente" }) }) })
882
1104
  ] }, recipient.id)) })
883
1105
  ] }) }),
884
- totalPages > 1 && /* @__PURE__ */ jsxs6("div", { className: "flex justify-end items-center gap-2 bg-background-50 border border-border-200 py-3.5 px-2 rounded-b-2xl", children: [
885
- /* @__PURE__ */ jsxs6(Text_default, { size: "sm", className: "text-text-600", children: [
1106
+ totalPages > 1 && /* @__PURE__ */ jsxs8("div", { className: "flex justify-end items-center gap-2 bg-background-50 border border-border-200 py-3.5 px-2 rounded-b-2xl", children: [
1107
+ /* @__PURE__ */ jsxs8(Text_default, { size: "sm", className: "text-text-600", children: [
886
1108
  "P\xE1gina ",
887
1109
  effectiveCurrentPage,
888
1110
  " de ",
889
1111
  totalPages
890
1112
  ] }),
891
- /* @__PURE__ */ jsx8("div", { className: "flex gap-2", children: onPageChange ? /* @__PURE__ */ jsxs6(Fragment, { children: [
892
- /* @__PURE__ */ jsx8(
1113
+ /* @__PURE__ */ jsx10("div", { className: "flex gap-2", children: onPageChange ? /* @__PURE__ */ jsxs8(Fragment, { children: [
1114
+ /* @__PURE__ */ jsx10(
893
1115
  Button_default,
894
1116
  {
895
1117
  variant: "link",
896
1118
  size: "extra-small",
897
1119
  onClick: () => onPageChange(Math.max(1, effectiveCurrentPage - 1)),
898
1120
  disabled: effectiveCurrentPage === 1,
899
- iconLeft: /* @__PURE__ */ jsx8(CaretLeft, {}),
1121
+ iconLeft: /* @__PURE__ */ jsx10(CaretLeft, {}),
900
1122
  children: "Anterior"
901
1123
  }
902
1124
  ),
903
- /* @__PURE__ */ jsx8(
1125
+ /* @__PURE__ */ jsx10(
904
1126
  Button_default,
905
1127
  {
906
1128
  variant: "link",
@@ -909,28 +1131,28 @@ var AlertsManagerView = ({
909
1131
  Math.min(totalPages, effectiveCurrentPage + 1)
910
1132
  ),
911
1133
  disabled: effectiveCurrentPage === totalPages,
912
- iconRight: /* @__PURE__ */ jsx8(CaretRight, {}),
1134
+ iconRight: /* @__PURE__ */ jsx10(CaretRight, {}),
913
1135
  children: "Pr\xF3ximo"
914
1136
  }
915
1137
  )
916
- ] }) : /* @__PURE__ */ jsxs6(Fragment, { children: [
917
- /* @__PURE__ */ jsx8(
1138
+ ] }) : /* @__PURE__ */ jsxs8(Fragment, { children: [
1139
+ /* @__PURE__ */ jsx10(
918
1140
  Button_default,
919
1141
  {
920
1142
  variant: "link",
921
1143
  size: "extra-small",
922
1144
  disabled: effectiveCurrentPage === 1,
923
- iconLeft: /* @__PURE__ */ jsx8(CaretLeft, {}),
1145
+ iconLeft: /* @__PURE__ */ jsx10(CaretLeft, {}),
924
1146
  children: "Anterior"
925
1147
  }
926
1148
  ),
927
- /* @__PURE__ */ jsx8(
1149
+ /* @__PURE__ */ jsx10(
928
1150
  Button_default,
929
1151
  {
930
1152
  variant: "link",
931
1153
  size: "extra-small",
932
1154
  disabled: effectiveCurrentPage === totalPages,
933
- iconRight: /* @__PURE__ */ jsx8(CaretRight, {}),
1155
+ iconRight: /* @__PURE__ */ jsx10(CaretRight, {}),
934
1156
  children: "Pr\xF3ximo"
935
1157
  }
936
1158
  )