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
@@ -408,7 +408,7 @@ var Divider = ({
408
408
  var Divider_default = Divider;
409
409
 
410
410
  // src/components/Table/Table.tsx
411
- var import_react2 = require("react");
411
+ var import_react3 = require("react");
412
412
  var import_phosphor_react2 = require("phosphor-react");
413
413
 
414
414
  // src/components/NoSearchResult/NoSearchResult.tsx
@@ -440,123 +440,346 @@ var NoSearchResult = ({ image, title, description }) => {
440
440
  };
441
441
  var NoSearchResult_default = NoSearchResult;
442
442
 
443
- // src/components/Table/Table.tsx
443
+ // src/components/EmptyState/EmptyState.tsx
444
444
  var import_jsx_runtime6 = require("react/jsx-runtime");
445
- var Table = (0, import_react2.forwardRef)(
445
+ var EmptyState = ({
446
+ image,
447
+ title,
448
+ description,
449
+ buttonText,
450
+ buttonIcon,
451
+ onButtonClick,
452
+ buttonVariant = "solid",
453
+ buttonAction = "primary"
454
+ }) => {
455
+ const displayTitle = title || "Nenhum dado dispon\xEDvel";
456
+ const displayDescription = description || "N\xE3o h\xE1 dados para exibir no momento.";
457
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col justify-center items-center gap-6 w-full min-h-[705px] bg-background rounded-xl p-6", children: [
458
+ image && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src: image, alt: displayTitle, className: "w-[170px] h-[150px]" }),
459
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col items-center gap-4 w-full max-w-[600px] px-6", children: [
460
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
461
+ Text_default,
462
+ {
463
+ as: "h2",
464
+ className: "text-text-950 font-semibold text-3xl leading-[35px] text-center",
465
+ children: displayTitle
466
+ }
467
+ ),
468
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text_default, { className: "text-text-600 font-normal text-[18px] leading-[27px] text-center", children: displayDescription })
469
+ ] }),
470
+ buttonText && onButtonClick && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
471
+ Button_default,
472
+ {
473
+ variant: buttonVariant,
474
+ action: buttonAction,
475
+ size: "large",
476
+ onClick: onButtonClick,
477
+ iconLeft: buttonIcon,
478
+ className: "rounded-full px-5 py-2.5",
479
+ children: buttonText
480
+ }
481
+ )
482
+ ] });
483
+ };
484
+ var EmptyState_default = EmptyState;
485
+
486
+ // src/components/Skeleton/Skeleton.tsx
487
+ var import_react2 = require("react");
488
+ var import_jsx_runtime7 = require("react/jsx-runtime");
489
+ var SKELETON_ANIMATION_CLASSES = {
490
+ pulse: "animate-pulse",
491
+ none: ""
492
+ };
493
+ var SKELETON_VARIANT_CLASSES = {
494
+ text: "h-4 bg-background-200 rounded",
495
+ circular: "bg-background-200 rounded-full",
496
+ rectangular: "bg-background-200",
497
+ rounded: "bg-background-200 rounded-lg"
498
+ };
499
+ var SPACING_CLASSES = {
500
+ none: "",
501
+ small: "space-y-1",
502
+ medium: "space-y-2",
503
+ large: "space-y-3"
504
+ };
505
+ var Skeleton = (0, import_react2.forwardRef)(
446
506
  ({
447
- variant = "default",
448
- className,
507
+ variant = "text",
508
+ width,
509
+ height,
510
+ animation = "pulse",
511
+ lines = 1,
512
+ spacing = "none",
513
+ className = "",
449
514
  children,
450
- searchTerm,
451
- noSearchResultImage,
452
- noSearchResultTitle = "Nenhum resultado encontrado",
453
- noSearchResultDescription = "N\xE3o encontramos nenhum resultado com esse nome. Tente revisar a busca ou usar outra palavra-chave.",
454
- emptyStateMessage = "Nenhum dado dispon\xEDvel no momento.",
455
- emptyStateButtonText = "Adicionar item",
456
- onEmptyStateButtonClick,
457
515
  ...props
458
516
  }, ref) => {
459
- const isTableBodyEmpty = (0, import_react2.useMemo)(() => {
460
- let foundBody = false;
461
- let empty = true;
462
- import_react2.Children.forEach(children, (child) => {
463
- if ((0, import_react2.isValidElement)(child) && child.type === TableBody) {
464
- foundBody = true;
465
- const bodyProps = child.props;
466
- if (import_react2.Children.count(bodyProps?.children) > 0) {
467
- empty = false;
468
- }
469
- }
470
- });
471
- return foundBody ? empty : false;
472
- }, [children]);
473
- const columnCount = (0, import_react2.useMemo)(() => {
474
- let count = 0;
475
- import_react2.Children.forEach(children, (child) => {
476
- if ((0, import_react2.isValidElement)(child) && child.type === TableHeader) {
477
- const headerProps = child.props;
478
- import_react2.Children.forEach(headerProps.children, (row) => {
479
- if ((0, import_react2.isValidElement)(row) && row.type === TableRow) {
480
- const rowProps = row.props;
481
- count = import_react2.Children.count(rowProps.children);
482
- }
483
- });
484
- }
485
- });
486
- return count || 1;
487
- }, [children]);
488
- const hasSearchTerm = searchTerm && searchTerm.trim() !== "";
489
- const showNoSearchResult = hasSearchTerm && isTableBodyEmpty;
490
- const showEmptyState = !hasSearchTerm && isTableBodyEmpty;
491
- if (showNoSearchResult) {
492
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
517
+ const animationClass = SKELETON_ANIMATION_CLASSES[animation];
518
+ const variantClass = SKELETON_VARIANT_CLASSES[variant];
519
+ const spacingClass = SPACING_CLASSES[spacing];
520
+ const style = {
521
+ width: typeof width === "number" ? `${width}px` : width,
522
+ height: typeof height === "number" ? `${height}px` : height
523
+ };
524
+ if (variant === "text" && lines > 1) {
525
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
493
526
  "div",
494
527
  {
495
- className: cn(
496
- "relative w-full overflow-x-auto",
497
- variant === "default" && "border border-border-200 rounded-xl"
498
- ),
499
- children: [
500
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
501
- "table",
502
- {
503
- ref,
504
- className: cn(
505
- "analytica-table w-full caption-bottom text-sm border-separate border-spacing-0",
506
- className
507
- ),
508
- ...props,
509
- children: import_react2.Children.map(children, (child) => {
510
- if ((0, import_react2.isValidElement)(child) && (child.type === TableCaption || child.type === TableHeader)) {
511
- return child;
512
- }
513
- return null;
514
- })
515
- }
516
- ),
517
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "py-8 flex justify-center", children: noSearchResultImage ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
518
- NoSearchResult_default,
519
- {
520
- image: noSearchResultImage,
521
- title: noSearchResultTitle,
522
- description: noSearchResultDescription
523
- }
524
- ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "text-center", children: [
525
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-text-600 text-lg font-semibold mb-2", children: noSearchResultTitle }),
526
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-text-500 text-sm", children: noSearchResultDescription })
527
- ] }) })
528
- ]
528
+ ref,
529
+ className: cn("flex flex-col", spacingClass, className),
530
+ ...props,
531
+ children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
532
+ "div",
533
+ {
534
+ className: cn(variantClass, animationClass),
535
+ style: index === lines - 1 ? { width: "60%" } : void 0
536
+ },
537
+ index
538
+ ))
529
539
  }
530
540
  );
531
541
  }
532
- const modifiedChildren = import_react2.Children.map(children, (child) => {
533
- if ((0, import_react2.isValidElement)(child) && child.type === TableBody && showEmptyState) {
534
- return (0, import_react2.cloneElement)(child, {
535
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TableRow, { variant, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TableCell, { colSpan: columnCount, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 gap-4", children: [
536
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-text-600 text-base font-normal", children: emptyStateMessage }),
537
- onEmptyStateButtonClick && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
538
- Button_default,
539
- {
540
- variant: "solid",
541
- action: "primary",
542
- size: "medium",
543
- onClick: onEmptyStateButtonClick,
544
- children: emptyStateButtonText
545
- }
546
- )
547
- ] }) }) })
548
- });
542
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
543
+ "div",
544
+ {
545
+ ref,
546
+ className: cn(variantClass, animationClass, className),
547
+ style,
548
+ ...props,
549
+ children
550
+ }
551
+ );
552
+ }
553
+ );
554
+ var SkeletonText = (0, import_react2.forwardRef)(
555
+ (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Skeleton, { ref, variant: "text", ...props })
556
+ );
557
+ var SkeletonCircle = (0, import_react2.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Skeleton, { ref, variant: "circular", ...props }));
558
+ var SkeletonRectangle = (0, import_react2.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
559
+ var SkeletonRounded = (0, import_react2.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
560
+ var SkeletonCard = (0, import_react2.forwardRef)(
561
+ ({
562
+ showAvatar = true,
563
+ showTitle = true,
564
+ showDescription = true,
565
+ showActions = true,
566
+ lines = 2,
567
+ className = "",
568
+ ...props
569
+ }, ref) => {
570
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
571
+ "div",
572
+ {
573
+ ref,
574
+ className: cn(
575
+ "w-full p-4 bg-background border border-border-200 rounded-lg",
576
+ className
577
+ ),
578
+ ...props,
579
+ children: [
580
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-start space-x-3", children: [
581
+ showAvatar && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonCircle, { width: 40, height: 40 }),
582
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 space-y-2", children: [
583
+ showTitle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonText, { width: "60%", height: 20 }),
584
+ showDescription && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonText, { lines, spacing: "small" })
585
+ ] })
586
+ ] }),
587
+ showActions && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex justify-end space-x-2 mt-4", children: [
588
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonRectangle, { width: 80, height: 32 }),
589
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonRectangle, { width: 80, height: 32 })
590
+ ] })
591
+ ]
549
592
  }
593
+ );
594
+ }
595
+ );
596
+ var SkeletonList = (0, import_react2.forwardRef)(
597
+ ({
598
+ items = 3,
599
+ showAvatar = true,
600
+ showTitle = true,
601
+ showDescription = true,
602
+ lines = 1,
603
+ className = "",
604
+ ...props
605
+ }, ref) => {
606
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-start space-x-3 p-3", children: [
607
+ showAvatar && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonCircle, { width: 32, height: 32 }),
608
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 space-y-2", children: [
609
+ showTitle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonText, { width: "40%", height: 16 }),
610
+ showDescription && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonText, { lines, spacing: "small" })
611
+ ] })
612
+ ] }, index)) });
613
+ }
614
+ );
615
+ var SkeletonTable = (0, import_react2.forwardRef)(
616
+ ({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
617
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
618
+ showHeader && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
619
+ SkeletonText,
620
+ {
621
+ width: `${100 / columns}%`,
622
+ height: 20
623
+ },
624
+ index
625
+ )) }),
626
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
627
+ SkeletonText,
628
+ {
629
+ width: `${100 / columns}%`,
630
+ height: 16
631
+ },
632
+ colIndex
633
+ )) }, rowIndex)) })
634
+ ] });
635
+ }
636
+ );
637
+
638
+ // src/components/Table/Table.tsx
639
+ var import_jsx_runtime8 = require("react/jsx-runtime");
640
+ var renderHeaderElements = (children) => {
641
+ return import_react3.Children.map(children, (child) => {
642
+ if ((0, import_react3.isValidElement)(child) && (child.type === TableCaption || child.type === TableHeader)) {
550
643
  return child;
551
- });
552
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
644
+ }
645
+ return null;
646
+ });
647
+ };
648
+ var getNoSearchResultContent = (config, defaultTitle, defaultDescription) => {
649
+ if (config.component) {
650
+ return config.component;
651
+ }
652
+ if (config.image) {
653
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
654
+ NoSearchResult_default,
655
+ {
656
+ image: config.image,
657
+ title: config.title || defaultTitle,
658
+ description: config.description || defaultDescription
659
+ }
660
+ );
661
+ }
662
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "text-center", children: [
663
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-text-600 text-lg font-semibold mb-2", children: config.title || defaultTitle }),
664
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-text-500 text-sm", children: config.description || defaultDescription })
665
+ ] });
666
+ };
667
+ var getEmptyStateContent = (config, defaultTitle, defaultDescription) => {
668
+ if (config?.component) {
669
+ return config.component;
670
+ }
671
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
672
+ EmptyState_default,
673
+ {
674
+ image: config?.image,
675
+ title: config?.title || defaultTitle,
676
+ description: config?.description || defaultDescription,
677
+ buttonText: config?.buttonText,
678
+ buttonIcon: config?.buttonIcon,
679
+ onButtonClick: config?.onButtonClick,
680
+ buttonVariant: config?.buttonVariant,
681
+ buttonAction: config?.buttonAction
682
+ }
683
+ );
684
+ };
685
+ var renderTableWrapper = (variant, tableRef, className, children, stateContent, tableProps) => {
686
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
687
+ "div",
688
+ {
689
+ className: cn(
690
+ "relative w-full overflow-x-auto",
691
+ variant === "default" && "border border-border-200 rounded-xl"
692
+ ),
693
+ children: [
694
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
695
+ "table",
696
+ {
697
+ ref: tableRef,
698
+ className: cn(
699
+ "analytica-table w-full caption-bottom text-sm border-separate border-spacing-0",
700
+ className
701
+ ),
702
+ ...tableProps,
703
+ children: renderHeaderElements(children)
704
+ }
705
+ ),
706
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "py-8 flex justify-center", children: stateContent })
707
+ ]
708
+ }
709
+ );
710
+ };
711
+ var Table = (0, import_react3.forwardRef)(
712
+ ({
713
+ variant = "default",
714
+ className,
715
+ children,
716
+ showLoading = false,
717
+ loadingState,
718
+ showNoSearchResult = false,
719
+ noSearchResultState,
720
+ showEmpty = false,
721
+ emptyState,
722
+ ...props
723
+ }, ref) => {
724
+ const defaultNoSearchResultState = {
725
+ title: "Nenhum resultado encontrado",
726
+ description: "N\xE3o encontramos nenhum resultado com esse nome. Tente revisar a busca ou usar outra palavra-chave."
727
+ };
728
+ const defaultEmptyState = {
729
+ title: "Nenhum dado dispon\xEDvel",
730
+ description: "N\xE3o h\xE1 dados para exibir no momento."
731
+ };
732
+ const finalNoSearchResultState = noSearchResultState || defaultNoSearchResultState;
733
+ const finalEmptyState = emptyState || defaultEmptyState;
734
+ if (showLoading) {
735
+ const loadingContent = loadingState?.component || /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonTable, { rows: 5, columns: 4, showHeader: false });
736
+ return renderTableWrapper(
737
+ variant,
738
+ ref,
739
+ className,
740
+ children,
741
+ loadingContent,
742
+ props
743
+ );
744
+ }
745
+ if (showNoSearchResult) {
746
+ const noSearchContent = getNoSearchResultContent(
747
+ finalNoSearchResultState,
748
+ defaultNoSearchResultState.title || "",
749
+ defaultNoSearchResultState.description || ""
750
+ );
751
+ return renderTableWrapper(
752
+ variant,
753
+ ref,
754
+ className,
755
+ children,
756
+ noSearchContent,
757
+ props
758
+ );
759
+ }
760
+ if (showEmpty) {
761
+ const emptyContent = getEmptyStateContent(
762
+ finalEmptyState,
763
+ defaultEmptyState.title || "Nenhum dado dispon\xEDvel",
764
+ defaultEmptyState.description || "N\xE3o h\xE1 dados para exibir no momento."
765
+ );
766
+ return renderTableWrapper(
767
+ variant,
768
+ ref,
769
+ className,
770
+ children,
771
+ emptyContent,
772
+ props
773
+ );
774
+ }
775
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
553
776
  "div",
554
777
  {
555
778
  className: cn(
556
779
  "relative w-full overflow-x-auto",
557
780
  variant === "default" && "border border-border-200 rounded-xl"
558
781
  ),
559
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
782
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
560
783
  "table",
561
784
  {
562
785
  ref,
@@ -568,10 +791,10 @@ var Table = (0, import_react2.forwardRef)(
568
791
  ),
569
792
  ...props,
570
793
  children: [
571
- !import_react2.Children.toArray(children).some(
572
- (child) => (0, import_react2.isValidElement)(child) && child.type === TableCaption
573
- ) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("caption", { className: "sr-only", children: "My Table" }),
574
- modifiedChildren
794
+ !import_react3.Children.toArray(children).some(
795
+ (child) => (0, import_react3.isValidElement)(child) && child.type === TableCaption
796
+ ) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("caption", { className: "sr-only", children: "My Table" }),
797
+ children
575
798
  ]
576
799
  }
577
800
  )
@@ -580,7 +803,7 @@ var Table = (0, import_react2.forwardRef)(
580
803
  }
581
804
  );
582
805
  Table.displayName = "Table";
583
- var TableHeader = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
806
+ var TableHeader = (0, import_react3.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
584
807
  "thead",
585
808
  {
586
809
  ref,
@@ -589,8 +812,8 @@ var TableHeader = (0, import_react2.forwardRef)(({ className, ...props }, ref) =
589
812
  }
590
813
  ));
591
814
  TableHeader.displayName = "TableHeader";
592
- var TableBody = (0, import_react2.forwardRef)(
593
- ({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
815
+ var TableBody = (0, import_react3.forwardRef)(
816
+ ({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
594
817
  "tbody",
595
818
  {
596
819
  ref,
@@ -604,8 +827,8 @@ var TableBody = (0, import_react2.forwardRef)(
604
827
  )
605
828
  );
606
829
  TableBody.displayName = "TableBody";
607
- var TableFooter = (0, import_react2.forwardRef)(
608
- ({ variant = "default", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
830
+ var TableFooter = (0, import_react3.forwardRef)(
831
+ ({ variant = "default", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
609
832
  "tfoot",
610
833
  {
611
834
  ref,
@@ -641,7 +864,7 @@ var VARIANT_STATES_ROW = {
641
864
  borderless: "bg-background-50 opacity-50 cursor-not-allowed"
642
865
  }
643
866
  };
644
- var TableRow = (0, import_react2.forwardRef)(
867
+ var TableRow = (0, import_react3.forwardRef)(
645
868
  ({
646
869
  variant = "default",
647
870
  state = "default",
@@ -649,7 +872,7 @@ var TableRow = (0, import_react2.forwardRef)(
649
872
  className,
650
873
  ...props
651
874
  }, ref) => {
652
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
875
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
653
876
  "tr",
654
877
  {
655
878
  ref,
@@ -667,7 +890,7 @@ var TableRow = (0, import_react2.forwardRef)(
667
890
  }
668
891
  );
669
892
  TableRow.displayName = "TableRow";
670
- var TableHead = (0, import_react2.forwardRef)(
893
+ var TableHead = (0, import_react3.forwardRef)(
671
894
  ({
672
895
  className,
673
896
  sortable = true,
@@ -681,7 +904,7 @@ var TableHead = (0, import_react2.forwardRef)(
681
904
  onSort();
682
905
  }
683
906
  };
684
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
907
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
685
908
  "th",
686
909
  {
687
910
  ref,
@@ -692,11 +915,11 @@ var TableHead = (0, import_react2.forwardRef)(
692
915
  ),
693
916
  onClick: handleClick,
694
917
  ...props,
695
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2", children: [
918
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2", children: [
696
919
  children,
697
- sortable && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col", children: [
698
- sortDirection === "asc" && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_phosphor_react2.CaretUp, { size: 16, weight: "fill", className: "text-text-800" }),
699
- sortDirection === "desc" && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_phosphor_react2.CaretDown, { size: 16, weight: "fill", className: "text-text-800" })
920
+ sortable && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col", children: [
921
+ sortDirection === "asc" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react2.CaretUp, { size: 16, weight: "fill", className: "text-text-800" }),
922
+ sortDirection === "desc" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react2.CaretDown, { size: 16, weight: "fill", className: "text-text-800" })
700
923
  ] })
701
924
  ] })
702
925
  }
@@ -704,7 +927,7 @@ var TableHead = (0, import_react2.forwardRef)(
704
927
  }
705
928
  );
706
929
  TableHead.displayName = "TableHead";
707
- var TableCell = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
930
+ var TableCell = (0, import_react3.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
708
931
  "td",
709
932
  {
710
933
  ref,
@@ -716,7 +939,7 @@ var TableCell = (0, import_react2.forwardRef)(({ className, ...props }, ref) =>
716
939
  }
717
940
  ));
718
941
  TableCell.displayName = "TableCell";
719
- var TableCaption = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
942
+ var TableCaption = (0, import_react3.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
720
943
  "caption",
721
944
  {
722
945
  ref,
@@ -732,7 +955,7 @@ var Table_default = Table;
732
955
 
733
956
  // src/components/Badge/Badge.tsx
734
957
  var import_phosphor_react3 = require("phosphor-react");
735
- var import_jsx_runtime7 = require("react/jsx-runtime");
958
+ var import_jsx_runtime9 = require("react/jsx-runtime");
736
959
  var VARIANT_ACTION_CLASSES2 = {
737
960
  solid: {
738
961
  error: "bg-error-background text-error-700 focus-visible:outline-none",
@@ -794,14 +1017,14 @@ var Badge = ({
794
1017
  const baseClasses = "inline-flex items-center justify-center rounded-xs font-normal gap-1 relative";
795
1018
  const baseClassesIcon = "flex items-center";
796
1019
  if (variant === "notification") {
797
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1020
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
798
1021
  "div",
799
1022
  {
800
1023
  className: cn(baseClasses, variantClasses, sizeClasses, className),
801
1024
  ...props,
802
1025
  children: [
803
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_phosphor_react3.Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
804
- notificationActive && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1026
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_phosphor_react3.Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
1027
+ notificationActive && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
805
1028
  "span",
806
1029
  {
807
1030
  "data-testid": "notification-dot",
@@ -812,15 +1035,15 @@ var Badge = ({
812
1035
  }
813
1036
  );
814
1037
  }
815
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1038
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
816
1039
  "div",
817
1040
  {
818
1041
  className: cn(baseClasses, variantClasses, sizeClasses, className),
819
1042
  ...props,
820
1043
  children: [
821
- iconLeft && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
1044
+ iconLeft && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
822
1045
  children,
823
- iconRight && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
1046
+ iconRight && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
824
1047
  ]
825
1048
  }
826
1049
  );
@@ -829,7 +1052,7 @@ var Badge_default = Badge;
829
1052
 
830
1053
  // src/components/AlertManagerView/AlertsManagerView.tsx
831
1054
  var import_phosphor_react4 = require("phosphor-react");
832
- var import_jsx_runtime8 = require("react/jsx-runtime");
1055
+ var import_jsx_runtime10 = require("react/jsx-runtime");
833
1056
  var AlertsManagerView = ({
834
1057
  alertData,
835
1058
  isOpen = false,
@@ -858,7 +1081,7 @@ var AlertsManagerView = ({
858
1081
  year: "numeric"
859
1082
  });
860
1083
  };
861
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1084
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
862
1085
  Modal_default,
863
1086
  {
864
1087
  isOpen,
@@ -866,59 +1089,59 @@ var AlertsManagerView = ({
866
1089
  title: alertData.title,
867
1090
  size: "md",
868
1091
  contentClassName: "p-0",
869
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col h-[calc(100vh-8rem)] max-h-[700px]", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: [
870
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "bg-background-50 px-5 py-6 flex flex-col items-center gap-4 rounded-xl mb-4", children: [
871
- (imageLink || alertData.image || defaultImage) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1092
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col h-[calc(100vh-8rem)] max-h-[700px]", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: [
1093
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "bg-background-50 px-5 py-6 flex flex-col items-center gap-4 rounded-xl mb-4", children: [
1094
+ (imageLink || alertData.image || defaultImage) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
872
1095
  "img",
873
1096
  {
874
1097
  src: imageLink || alertData.image || defaultImage || void 0,
875
1098
  alt: alertData.title || "Imagem do alerta"
876
1099
  }
877
1100
  ),
878
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col items-center text-center gap-3", children: [
879
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { size: "lg", weight: "semibold", children: alertData.title || "Sem T\xEDtulo" }),
880
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { size: "sm", weight: "normal", className: "text-text-500", children: alertData.message || "Sem mensagem" })
1101
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col items-center text-center gap-3", children: [
1102
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { size: "lg", weight: "semibold", children: alertData.title || "Sem T\xEDtulo" }),
1103
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { size: "sm", weight: "normal", className: "text-text-500", children: alertData.message || "Sem mensagem" })
881
1104
  ] })
882
1105
  ] }),
883
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Divider_default, { className: "my-4" }),
884
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex justify-between items-center mb-4 px-2", children: [
885
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-700", children: "Enviado em" }),
886
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { size: "sm", weight: "medium", className: "text-text-900", children: formatDate(alertData.sentAt) })
1106
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Divider_default, { className: "my-4" }),
1107
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex justify-between items-center mb-4 px-2", children: [
1108
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-700", children: "Enviado em" }),
1109
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { size: "sm", weight: "medium", className: "text-text-900", children: formatDate(alertData.sentAt) })
887
1110
  ] }),
888
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Divider_default, { className: "my-4" }),
889
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Table_default, { variant: "borderless", className: "table-fixed", children: [
890
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(TableRow, { variant: "borderless", children: [
891
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableHead, { className: "py-2 px-3.5 text-start", children: "Destinat\xE1rio" }),
892
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableHead, { className: "py-2 px-3.5 w-[120px] text-start", children: "Status" })
1111
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Divider_default, { className: "my-4" }),
1112
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Table_default, { variant: "borderless", className: "table-fixed", children: [
1113
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(TableRow, { variant: "borderless", children: [
1114
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TableHead, { className: "py-2 px-3.5 text-start", children: "Destinat\xE1rio" }),
1115
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TableHead, { className: "py-2 px-3.5 w-[120px] text-start", children: "Status" })
893
1116
  ] }) }),
894
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableBody, { variant: "borderless", children: paginatedRecipients.map((recipient) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(TableRow, { children: [
895
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(TableCell, { className: "py-2 px-3.5 flex flex-row gap-2 text-start truncate", children: [
896
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rounded-full size-6 bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react4.User, { className: "text-primary-950", size: 18 }) }),
1117
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TableBody, { variant: "borderless", children: paginatedRecipients.map((recipient) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(TableRow, { children: [
1118
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(TableCell, { className: "py-2 px-3.5 flex flex-row gap-2 text-start truncate", children: [
1119
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "rounded-full size-6 bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_phosphor_react4.User, { className: "text-primary-950", size: 18 }) }),
897
1120
  recipient.name
898
1121
  ] }),
899
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableCell, { className: "py-2 px-3.5 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex justify-center items-center gap-1", children: recipient.status === "viewed" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Badge_default, { variant: "solid", action: "success", children: "Visualizado" }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Badge_default, { variant: "solid", action: "error", children: "Pendente" }) }) })
1122
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TableCell, { className: "py-2 px-3.5 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex justify-center items-center gap-1", children: recipient.status === "viewed" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Badge_default, { variant: "solid", action: "success", children: "Visualizado" }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Badge_default, { variant: "solid", action: "error", children: "Pendente" }) }) })
900
1123
  ] }, recipient.id)) })
901
1124
  ] }) }),
902
- totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("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: [
903
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Text_default, { size: "sm", className: "text-text-600", children: [
1125
+ totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("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: [
1126
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text_default, { size: "sm", className: "text-text-600", children: [
904
1127
  "P\xE1gina ",
905
1128
  effectiveCurrentPage,
906
1129
  " de ",
907
1130
  totalPages
908
1131
  ] }),
909
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex gap-2", children: onPageChange ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
910
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1132
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex gap-2", children: onPageChange ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
1133
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
911
1134
  Button_default,
912
1135
  {
913
1136
  variant: "link",
914
1137
  size: "extra-small",
915
1138
  onClick: () => onPageChange(Math.max(1, effectiveCurrentPage - 1)),
916
1139
  disabled: effectiveCurrentPage === 1,
917
- iconLeft: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react4.CaretLeft, {}),
1140
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_phosphor_react4.CaretLeft, {}),
918
1141
  children: "Anterior"
919
1142
  }
920
1143
  ),
921
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1144
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
922
1145
  Button_default,
923
1146
  {
924
1147
  variant: "link",
@@ -927,28 +1150,28 @@ var AlertsManagerView = ({
927
1150
  Math.min(totalPages, effectiveCurrentPage + 1)
928
1151
  ),
929
1152
  disabled: effectiveCurrentPage === totalPages,
930
- iconRight: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react4.CaretRight, {}),
1153
+ iconRight: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_phosphor_react4.CaretRight, {}),
931
1154
  children: "Pr\xF3ximo"
932
1155
  }
933
1156
  )
934
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
935
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1157
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
1158
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
936
1159
  Button_default,
937
1160
  {
938
1161
  variant: "link",
939
1162
  size: "extra-small",
940
1163
  disabled: effectiveCurrentPage === 1,
941
- iconLeft: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react4.CaretLeft, {}),
1164
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_phosphor_react4.CaretLeft, {}),
942
1165
  children: "Anterior"
943
1166
  }
944
1167
  ),
945
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1168
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
946
1169
  Button_default,
947
1170
  {
948
1171
  variant: "link",
949
1172
  size: "extra-small",
950
1173
  disabled: effectiveCurrentPage === totalPages,
951
- iconRight: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react4.CaretRight, {}),
1174
+ iconRight: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_phosphor_react4.CaretRight, {}),
952
1175
  children: "Pr\xF3ximo"
953
1176
  }
954
1177
  )