analytica-frontend-lib 1.0.60 → 1.0.62

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.
@@ -10,7 +10,7 @@ interface CardBaseProps extends HTMLAttributes<HTMLDivElement> {
10
10
  cursor?: 'default' | 'pointer';
11
11
  }
12
12
  declare const CardBase: react.ForwardRefExoticComponent<CardBaseProps & react.RefAttributes<HTMLDivElement>>;
13
- interface CardActivesResultsProps extends HTMLAttributes<HTMLDivElement> {
13
+ interface CardActivitiesResultsProps extends HTMLAttributes<HTMLDivElement> {
14
14
  icon: ReactNode;
15
15
  title: string;
16
16
  subTitle: string;
@@ -19,7 +19,7 @@ interface CardActivesResultsProps extends HTMLAttributes<HTMLDivElement> {
19
19
  extended?: boolean;
20
20
  action?: 'warning' | 'success' | 'error' | 'info';
21
21
  }
22
- declare const CardActivesResults: react.ForwardRefExoticComponent<CardActivesResultsProps & react.RefAttributes<HTMLDivElement>>;
22
+ declare const CardActivitiesResults: react.ForwardRefExoticComponent<CardActivitiesResultsProps & react.RefAttributes<HTMLDivElement>>;
23
23
  interface CardQuestionProps extends HTMLAttributes<HTMLDivElement> {
24
24
  header: string;
25
25
  state?: 'done' | 'undone';
@@ -36,6 +36,8 @@ interface CardProgressProps extends HTMLAttributes<HTMLDivElement> {
36
36
  direction?: 'horizontal' | 'vertical';
37
37
  icon: ReactNode;
38
38
  color?: string;
39
+ progressVariant?: 'blue' | 'green';
40
+ showDates?: boolean;
39
41
  }
40
42
  declare const CardProgress: react.ForwardRefExoticComponent<CardProgressProps & react.RefAttributes<HTMLDivElement>>;
41
43
  interface CardTopicProps extends HTMLAttributes<HTMLDivElement> {
@@ -43,12 +45,15 @@ interface CardTopicProps extends HTMLAttributes<HTMLDivElement> {
43
45
  subHead?: string[];
44
46
  progress: number;
45
47
  showPercentage?: boolean;
48
+ progressVariant?: 'blue' | 'green';
46
49
  }
47
50
  declare const CardTopic: react.ForwardRefExoticComponent<CardTopicProps & react.RefAttributes<HTMLDivElement>>;
48
51
  interface CardPerformanceProps extends HTMLAttributes<HTMLDivElement> {
49
52
  header: string;
50
53
  description?: string;
51
54
  progress?: number;
55
+ actionVariant?: 'button' | 'caret';
56
+ progressVariant?: 'blue' | 'green';
52
57
  onClickButton?: (valueButton?: unknown) => void;
53
58
  valueButton?: unknown;
54
59
  }
@@ -109,4 +114,4 @@ interface CardAudioProps extends HTMLAttributes<HTMLDivElement> {
109
114
  }
110
115
  declare const CardAudio: react.ForwardRefExoticComponent<CardAudioProps & react.RefAttributes<HTMLDivElement>>;
111
116
 
112
- export { CardActivesResults, CardAudio, CardBase, CardForum, CardPerformance, CardProgress, CardQuestions, CardResults, CardSettings, CardStatus, CardSupport, CardTopic };
117
+ export { CardActivitiesResults, CardAudio, CardBase, CardForum, CardPerformance, CardProgress, CardQuestions, CardResults, CardSettings, CardStatus, CardSupport, CardTopic };
@@ -10,7 +10,7 @@ interface CardBaseProps extends HTMLAttributes<HTMLDivElement> {
10
10
  cursor?: 'default' | 'pointer';
11
11
  }
12
12
  declare const CardBase: react.ForwardRefExoticComponent<CardBaseProps & react.RefAttributes<HTMLDivElement>>;
13
- interface CardActivesResultsProps extends HTMLAttributes<HTMLDivElement> {
13
+ interface CardActivitiesResultsProps extends HTMLAttributes<HTMLDivElement> {
14
14
  icon: ReactNode;
15
15
  title: string;
16
16
  subTitle: string;
@@ -19,7 +19,7 @@ interface CardActivesResultsProps extends HTMLAttributes<HTMLDivElement> {
19
19
  extended?: boolean;
20
20
  action?: 'warning' | 'success' | 'error' | 'info';
21
21
  }
22
- declare const CardActivesResults: react.ForwardRefExoticComponent<CardActivesResultsProps & react.RefAttributes<HTMLDivElement>>;
22
+ declare const CardActivitiesResults: react.ForwardRefExoticComponent<CardActivitiesResultsProps & react.RefAttributes<HTMLDivElement>>;
23
23
  interface CardQuestionProps extends HTMLAttributes<HTMLDivElement> {
24
24
  header: string;
25
25
  state?: 'done' | 'undone';
@@ -36,6 +36,8 @@ interface CardProgressProps extends HTMLAttributes<HTMLDivElement> {
36
36
  direction?: 'horizontal' | 'vertical';
37
37
  icon: ReactNode;
38
38
  color?: string;
39
+ progressVariant?: 'blue' | 'green';
40
+ showDates?: boolean;
39
41
  }
40
42
  declare const CardProgress: react.ForwardRefExoticComponent<CardProgressProps & react.RefAttributes<HTMLDivElement>>;
41
43
  interface CardTopicProps extends HTMLAttributes<HTMLDivElement> {
@@ -43,12 +45,15 @@ interface CardTopicProps extends HTMLAttributes<HTMLDivElement> {
43
45
  subHead?: string[];
44
46
  progress: number;
45
47
  showPercentage?: boolean;
48
+ progressVariant?: 'blue' | 'green';
46
49
  }
47
50
  declare const CardTopic: react.ForwardRefExoticComponent<CardTopicProps & react.RefAttributes<HTMLDivElement>>;
48
51
  interface CardPerformanceProps extends HTMLAttributes<HTMLDivElement> {
49
52
  header: string;
50
53
  description?: string;
51
54
  progress?: number;
55
+ actionVariant?: 'button' | 'caret';
56
+ progressVariant?: 'blue' | 'green';
52
57
  onClickButton?: (valueButton?: unknown) => void;
53
58
  valueButton?: unknown;
54
59
  }
@@ -109,4 +114,4 @@ interface CardAudioProps extends HTMLAttributes<HTMLDivElement> {
109
114
  }
110
115
  declare const CardAudio: react.ForwardRefExoticComponent<CardAudioProps & react.RefAttributes<HTMLDivElement>>;
111
116
 
112
- export { CardActivesResults, CardAudio, CardBase, CardForum, CardPerformance, CardProgress, CardQuestions, CardResults, CardSettings, CardStatus, CardSupport, CardTopic };
117
+ export { CardActivitiesResults, CardAudio, CardBase, CardForum, CardPerformance, CardProgress, CardQuestions, CardResults, CardSettings, CardStatus, CardSupport, CardTopic };
@@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/components/Card/Card.tsx
21
21
  var Card_exports = {};
22
22
  __export(Card_exports, {
23
- CardActivesResults: () => CardActivesResults,
23
+ CardActivitiesResults: () => CardActivitiesResults,
24
24
  CardAudio: () => CardAudio,
25
25
  CardBase: () => CardBase,
26
26
  CardForum: () => CardForum,
@@ -750,7 +750,7 @@ var ACTION_HEADER_CLASSES = {
750
750
  error: "text-error-300",
751
751
  info: "text-info-300"
752
752
  };
753
- var CardActivesResults = (0, import_react.forwardRef)(
753
+ var CardActivitiesResults = (0, import_react.forwardRef)(
754
754
  ({
755
755
  icon,
756
756
  title,
@@ -801,7 +801,7 @@ var CardActivesResults = (0, import_react.forwardRef)(
801
801
  children: header
802
802
  }
803
803
  ),
804
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm text-info-800 text-center", children: description })
804
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Badge_default, { size: "large", action: "info", children: description })
805
805
  ] })
806
806
  ]
807
807
  }
@@ -871,13 +871,15 @@ var CardProgress = (0, import_react.forwardRef)(
871
871
  direction = "horizontal",
872
872
  icon,
873
873
  color = "#B7DFFF",
874
+ progressVariant = "blue",
875
+ showDates = true,
874
876
  className,
875
877
  ...props
876
878
  }, ref) => {
877
879
  const isHorizontal = direction === "horizontal";
878
880
  const contentComponent = {
879
881
  horizontal: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
880
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
882
+ showDates && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
881
883
  initialDate && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
882
884
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
883
885
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-text-600", children: initialDate })
@@ -893,6 +895,7 @@ var CardProgress = (0, import_react.forwardRef)(
893
895
  {
894
896
  size: "small",
895
897
  value: progress,
898
+ variant: progressVariant,
896
899
  "data-testid": "progress-bar"
897
900
  }
898
901
  ),
@@ -960,6 +963,7 @@ var CardTopic = (0, import_react.forwardRef)(
960
963
  subHead,
961
964
  progress,
962
965
  showPercentage = false,
966
+ progressVariant = "blue",
963
967
  className = "",
964
968
  ...props
965
969
  }, ref) => {
@@ -985,6 +989,7 @@ var CardTopic = (0, import_react.forwardRef)(
985
989
  {
986
990
  size: "small",
987
991
  value: progress,
992
+ variant: progressVariant,
988
993
  "data-testid": "progress-bar"
989
994
  }
990
995
  ),
@@ -1011,6 +1016,8 @@ var CardPerformance = (0, import_react.forwardRef)(
1011
1016
  header,
1012
1017
  progress,
1013
1018
  description = "Sem dados ainda! Voc\xEA ainda n\xE3o fez um question\xE1rio neste assunto.",
1019
+ actionVariant = "button",
1020
+ progressVariant = "blue",
1014
1021
  className = "",
1015
1022
  onClickButton,
1016
1023
  valueButton,
@@ -1030,7 +1037,7 @@ var CardPerformance = (0, import_react.forwardRef)(
1030
1037
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "w-full flex flex-col justify-between gap-2", children: [
1031
1038
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-row justify-between items-center", children: [
1032
1039
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-lg font-bold text-text-950", children: header }),
1033
- hasProgress && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1040
+ actionVariant === "button" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1034
1041
  Button_default,
1035
1042
  {
1036
1043
  variant: "outline",
@@ -1040,9 +1047,16 @@ var CardPerformance = (0, import_react.forwardRef)(
1040
1047
  }
1041
1048
  )
1042
1049
  ] }),
1043
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ProgressBar_default, { value: progress, label: `${progress}% corretas` }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs text-text-600", children: description }) })
1050
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1051
+ ProgressBar_default,
1052
+ {
1053
+ value: progress,
1054
+ label: `${progress}% corretas`,
1055
+ variant: progressVariant
1056
+ }
1057
+ ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs text-text-600", children: description }) })
1044
1058
  ] }),
1045
- !hasProgress && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1059
+ actionVariant == "caret" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1046
1060
  import_phosphor_react2.CaretRight,
1047
1061
  {
1048
1062
  className: "size-4.5 text-text-800 cursor-pointer",
@@ -1536,7 +1550,7 @@ var CardAudio = (0, import_react.forwardRef)(
1536
1550
  );
1537
1551
  // Annotate the CommonJS export names for ESM import in node:
1538
1552
  0 && (module.exports = {
1539
- CardActivesResults,
1553
+ CardActivitiesResults,
1540
1554
  CardAudio,
1541
1555
  CardBase,
1542
1556
  CardForum,