analytica-frontend-lib 1.1.70 → 1.1.72

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 (103) hide show
  1. package/dist/Accordation/index.js.map +1 -1
  2. package/dist/Accordation/index.mjs.map +1 -1
  3. package/dist/Alert/index.js.map +1 -1
  4. package/dist/Alert/index.mjs.map +1 -1
  5. package/dist/AlertDialog/index.js.map +1 -1
  6. package/dist/AlertDialog/index.mjs.map +1 -1
  7. package/dist/Alternative/index.js.map +1 -1
  8. package/dist/Alternative/index.mjs.map +1 -1
  9. package/dist/Badge/index.js.map +1 -1
  10. package/dist/Badge/index.mjs.map +1 -1
  11. package/dist/Button/index.js.map +1 -1
  12. package/dist/Button/index.mjs.map +1 -1
  13. package/dist/Calendar/index.js.map +1 -1
  14. package/dist/Calendar/index.mjs.map +1 -1
  15. package/dist/Card/index.js.map +1 -1
  16. package/dist/Card/index.mjs.map +1 -1
  17. package/dist/CheckBox/index.js.map +1 -1
  18. package/dist/CheckBox/index.mjs.map +1 -1
  19. package/dist/Chips/index.js.map +1 -1
  20. package/dist/Chips/index.mjs.map +1 -1
  21. package/dist/Divider/index.js.map +1 -1
  22. package/dist/Divider/index.mjs.map +1 -1
  23. package/dist/DropdownMenu/index.js +24 -29
  24. package/dist/DropdownMenu/index.js.map +1 -1
  25. package/dist/DropdownMenu/index.mjs +24 -29
  26. package/dist/DropdownMenu/index.mjs.map +1 -1
  27. package/dist/IconButton/index.js.map +1 -1
  28. package/dist/IconButton/index.mjs.map +1 -1
  29. package/dist/IconRoundedButton/index.js.map +1 -1
  30. package/dist/IconRoundedButton/index.mjs.map +1 -1
  31. package/dist/Menu/index.js.map +1 -1
  32. package/dist/Menu/index.mjs.map +1 -1
  33. package/dist/Modal/index.js.map +1 -1
  34. package/dist/Modal/index.mjs.map +1 -1
  35. package/dist/MultipleChoice/index.js.map +1 -1
  36. package/dist/MultipleChoice/index.mjs.map +1 -1
  37. package/dist/NavButton/index.js.map +1 -1
  38. package/dist/NavButton/index.mjs.map +1 -1
  39. package/dist/NotFound/index.js.map +1 -1
  40. package/dist/NotFound/index.mjs.map +1 -1
  41. package/dist/NotificationCard/index.d.mts +1 -1
  42. package/dist/NotificationCard/index.d.ts +1 -1
  43. package/dist/NotificationCard/index.js +26 -38
  44. package/dist/NotificationCard/index.js.map +1 -1
  45. package/dist/NotificationCard/index.mjs +25 -36
  46. package/dist/NotificationCard/index.mjs.map +1 -1
  47. package/dist/{NotificationCard-DMdkuVEr.d.mts → NotificationCard-4GgB0Nsf.d.mts} +2 -7
  48. package/dist/{NotificationCard-DMdkuVEr.d.ts → NotificationCard-4GgB0Nsf.d.ts} +2 -7
  49. package/dist/ProgressBar/index.js.map +1 -1
  50. package/dist/ProgressBar/index.mjs.map +1 -1
  51. package/dist/ProgressCircle/index.js.map +1 -1
  52. package/dist/ProgressCircle/index.mjs.map +1 -1
  53. package/dist/Quiz/index.js.map +1 -1
  54. package/dist/Quiz/index.mjs.map +1 -1
  55. package/dist/Radio/index.js.map +1 -1
  56. package/dist/Radio/index.mjs.map +1 -1
  57. package/dist/Search/index.js +24 -29
  58. package/dist/Search/index.js.map +1 -1
  59. package/dist/Search/index.mjs +24 -29
  60. package/dist/Search/index.mjs.map +1 -1
  61. package/dist/Select/index.js.map +1 -1
  62. package/dist/Select/index.mjs.map +1 -1
  63. package/dist/SelectionButton/index.js.map +1 -1
  64. package/dist/SelectionButton/index.mjs.map +1 -1
  65. package/dist/Skeleton/index.js.map +1 -1
  66. package/dist/Skeleton/index.mjs.map +1 -1
  67. package/dist/Stepper/index.js.map +1 -1
  68. package/dist/Stepper/index.mjs.map +1 -1
  69. package/dist/Table/index.js.map +1 -1
  70. package/dist/Table/index.mjs.map +1 -1
  71. package/dist/Text/index.js.map +1 -1
  72. package/dist/Text/index.mjs.map +1 -1
  73. package/dist/TextArea/index.js.map +1 -1
  74. package/dist/TextArea/index.mjs.map +1 -1
  75. package/dist/ThemeToggle/index.js.map +1 -1
  76. package/dist/ThemeToggle/index.mjs.map +1 -1
  77. package/dist/Toast/Toaster/index.js.map +1 -1
  78. package/dist/Toast/Toaster/index.mjs.map +1 -1
  79. package/dist/Toast/index.js.map +1 -1
  80. package/dist/Toast/index.mjs.map +1 -1
  81. package/dist/VideoPlayer/index.js +2 -2
  82. package/dist/VideoPlayer/index.js.map +1 -1
  83. package/dist/VideoPlayer/index.mjs +2 -2
  84. package/dist/VideoPlayer/index.mjs.map +1 -1
  85. package/dist/Whiteboard/index.js.map +1 -1
  86. package/dist/Whiteboard/index.mjs.map +1 -1
  87. package/dist/index.css +0 -16
  88. package/dist/index.css.map +1 -1
  89. package/dist/index.d.mts +3 -3
  90. package/dist/index.d.ts +3 -3
  91. package/dist/index.js +59 -38
  92. package/dist/index.js.map +1 -1
  93. package/dist/index.mjs +57 -37
  94. package/dist/index.mjs.map +1 -1
  95. package/dist/styles.css +0 -16
  96. package/dist/styles.css.map +1 -1
  97. package/dist/utils/index.d.mts +14 -1
  98. package/dist/utils/index.d.ts +14 -1
  99. package/dist/utils/index.js +13 -2
  100. package/dist/utils/index.js.map +1 -1
  101. package/dist/utils/index.mjs +11 -1
  102. package/dist/utils/index.mjs.map +1 -1
  103. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -34,7 +34,7 @@ export { default as IconRender } from './IconRender/index.mjs';
34
34
  export { d as SubjectData, e as SubjectEnum, I as SubjectIconProps, S as SubjectInfo, b as getSubjectColorClass, a as getSubjectIcon, g as getSubjectInfo, c as getSubjectName } from './SubjectInfo-Dvt0OodP.mjs';
35
35
  export { DeviceType, getDeviceType, useMobile } from './hooks/useMobile/index.mjs';
36
36
  export { useTheme } from './hooks/useTheme/index.mjs';
37
- export { cn } from './utils/index.mjs';
37
+ export { cn, getSubjectColorWithOpacity, syncDropdownState } from './utils/index.mjs';
38
38
  export { default as DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, MenuLabel, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger, ProfileToggleTheme } from './DropdownMenu/index.mjs';
39
39
  export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.mjs';
40
40
  export { default as Menu, MenuContent, MenuItem, MenuOverflow } from './Menu/index.mjs';
@@ -52,8 +52,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
52
52
  import { Question } from './Quiz/useQuizStore/index.mjs';
53
53
  export { ANSWER_STATUS, QUESTION_DIFFICULTY, QUESTION_STATUS, QUESTION_TYPE, QUIZ_TYPE, QuestionResult, QuizInterface, QuizState, SUBTYPE_ENUM, UserAnswerItem, useQuizStore } from './Quiz/useQuizStore/index.mjs';
54
54
  export { default as LoadingModal } from './LoadingModal/index.mjs';
55
- import { N as NotificationApiClient, a as Notification, F as FetchNotificationsParams, b as NotificationGroup, c as NotificationEntityType, d as NotificationType } from './NotificationCard-DMdkuVEr.mjs';
56
- export { B as BackendNotification, g as BackendNotificationsResponse, e as NotificationCard, f as NotificationItem, h as NotificationsResponse, s as syncNotificationState } from './NotificationCard-DMdkuVEr.mjs';
55
+ import { N as NotificationApiClient, a as Notification, F as FetchNotificationsParams, b as NotificationGroup, c as NotificationEntityType, d as NotificationType } from './NotificationCard-4GgB0Nsf.mjs';
56
+ export { B as BackendNotification, g as BackendNotificationsResponse, e as NotificationCard, f as NotificationItem, h as NotificationsResponse } from './NotificationCard-4GgB0Nsf.mjs';
57
57
  export { ThemeToggle } from './ThemeToggle/index.mjs';
58
58
  export { c as ThemeActions, T as ThemeMode, b as ThemeState, a as ThemeStore, u as useThemeStore } from './themeStore-P2X64zC-.mjs';
59
59
  import 'zustand/middleware';
package/dist/index.d.ts CHANGED
@@ -34,7 +34,7 @@ export { default as IconRender } from './IconRender/index.js';
34
34
  export { d as SubjectData, e as SubjectEnum, I as SubjectIconProps, S as SubjectInfo, b as getSubjectColorClass, a as getSubjectIcon, g as getSubjectInfo, c as getSubjectName } from './SubjectInfo-Dvt0OodP.js';
35
35
  export { DeviceType, getDeviceType, useMobile } from './hooks/useMobile/index.js';
36
36
  export { useTheme } from './hooks/useTheme/index.js';
37
- export { cn } from './utils/index.js';
37
+ export { cn, getSubjectColorWithOpacity, syncDropdownState } from './utils/index.js';
38
38
  export { default as DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, MenuLabel, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger, ProfileToggleTheme } from './DropdownMenu/index.js';
39
39
  export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.js';
40
40
  export { default as Menu, MenuContent, MenuItem, MenuOverflow } from './Menu/index.js';
@@ -52,8 +52,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
52
52
  import { Question } from './Quiz/useQuizStore/index.js';
53
53
  export { ANSWER_STATUS, QUESTION_DIFFICULTY, QUESTION_STATUS, QUESTION_TYPE, QUIZ_TYPE, QuestionResult, QuizInterface, QuizState, SUBTYPE_ENUM, UserAnswerItem, useQuizStore } from './Quiz/useQuizStore/index.js';
54
54
  export { default as LoadingModal } from './LoadingModal/index.js';
55
- import { N as NotificationApiClient, a as Notification, F as FetchNotificationsParams, b as NotificationGroup, c as NotificationEntityType, d as NotificationType } from './NotificationCard-DMdkuVEr.js';
56
- export { B as BackendNotification, g as BackendNotificationsResponse, e as NotificationCard, f as NotificationItem, h as NotificationsResponse, s as syncNotificationState } from './NotificationCard-DMdkuVEr.js';
55
+ import { N as NotificationApiClient, a as Notification, F as FetchNotificationsParams, b as NotificationGroup, c as NotificationEntityType, d as NotificationType } from './NotificationCard-4GgB0Nsf.js';
56
+ export { B as BackendNotification, g as BackendNotificationsResponse, e as NotificationCard, f as NotificationItem, h as NotificationsResponse } from './NotificationCard-4GgB0Nsf.js';
57
57
  export { ThemeToggle } from './ThemeToggle/index.js';
58
58
  export { c as ThemeActions, T as ThemeMode, b as ThemeState, a as ThemeStore, u as useThemeStore } from './themeStore-P2X64zC-.js';
59
59
  import 'zustand/middleware';
package/dist/index.js CHANGED
@@ -148,10 +148,11 @@ __export(src_exports, {
148
148
  getRootDomain: () => getRootDomain,
149
149
  getStatusBadge: () => getStatusBadge,
150
150
  getSubjectColorClass: () => getSubjectColorClass,
151
+ getSubjectColorWithOpacity: () => getSubjectColorWithOpacity,
151
152
  getSubjectIcon: () => getSubjectIcon,
152
153
  getSubjectInfo: () => getSubjectInfo,
153
154
  getSubjectName: () => getSubjectName,
154
- syncNotificationState: () => syncNotificationState,
155
+ syncDropdownState: () => syncDropdownState,
155
156
  useApiConfig: () => useApiConfig,
156
157
  useAuth: () => useAuth,
157
158
  useAuthGuard: () => useAuthGuard,
@@ -169,9 +170,38 @@ module.exports = __toCommonJS(src_exports);
169
170
  // src/utils/utils.ts
170
171
  var import_clsx = require("clsx");
171
172
  var import_tailwind_merge = require("tailwind-merge");
173
+
174
+ // src/utils/dropdown.ts
175
+ var syncDropdownState = (open, isActive, setActiveStates, key) => {
176
+ if (!open && isActive) {
177
+ setActiveStates((prev) => ({ ...prev, [key]: false }));
178
+ }
179
+ };
180
+
181
+ // src/utils/utils.ts
172
182
  function cn(...inputs) {
173
183
  return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
174
184
  }
185
+ function getSubjectColorWithOpacity(hexColor, isDark) {
186
+ if (!hexColor) return void 0;
187
+ let color = hexColor.replace(/^#/, "").toLowerCase();
188
+ if (isDark) {
189
+ if (color.length === 8) {
190
+ color = color.slice(0, 6);
191
+ }
192
+ return `#${color}`;
193
+ } else {
194
+ let resultColor;
195
+ if (color.length === 6) {
196
+ resultColor = `#${color}b3`;
197
+ } else if (color.length === 8) {
198
+ resultColor = `#${color}`;
199
+ } else {
200
+ resultColor = `#${color}`;
201
+ }
202
+ return resultColor;
203
+ }
204
+ }
175
205
 
176
206
  // src/components/Text/Text.tsx
177
207
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -2686,12 +2716,28 @@ var ProfileToggleTheme = ({ ...props }) => {
2686
2716
  setModalThemeToggle(false);
2687
2717
  };
2688
2718
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
2689
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2690
- "div",
2719
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2720
+ DropdownMenuItem,
2691
2721
  {
2692
- role: "menuitem",
2693
- "data-variant": "profile",
2694
- className: "relative flex flex-row justify-between select-none items-center gap-2 rounded-sm p-4 text-sm outline-none transition-colors [&>svg]:size-6 [&>svg]:shrink-0 cursor-pointer hover:bg-background-50 text-text-700 focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground",
2722
+ variant: "profile",
2723
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2724
+ "svg",
2725
+ {
2726
+ width: "24",
2727
+ height: "24",
2728
+ viewBox: "0 0 25 25",
2729
+ fill: "none",
2730
+ xmlns: "http://www.w3.org/2000/svg",
2731
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2732
+ "path",
2733
+ {
2734
+ d: "M12.5 2.75C15.085 2.75276 17.5637 3.78054 19.3916 5.6084C21.2195 7.43628 22.2473 9.915 22.25 12.5C22.25 14.4284 21.6778 16.3136 20.6064 17.917C19.5352 19.5201 18.0128 20.7699 16.2314 21.5078C14.4499 22.2458 12.489 22.4387 10.5977 22.0625C8.70642 21.6863 6.96899 20.758 5.60547 19.3945C4.24197 18.031 3.31374 16.2936 2.9375 14.4023C2.56129 12.511 2.75423 10.5501 3.49219 8.76855C4.23012 6.98718 5.47982 5.46483 7.08301 4.39355C8.68639 3.32221 10.5716 2.75 12.5 2.75ZM11.75 4.28516C9.70145 4.47452 7.7973 5.42115 6.41016 6.94043C5.02299 8.4599 4.25247 10.4426 4.25 12.5C4.25247 14.5574 5.02299 16.5401 6.41016 18.0596C7.7973 19.5789 9.70145 20.5255 11.75 20.7148V4.28516Z",
2735
+ fill: "currentColor"
2736
+ }
2737
+ )
2738
+ }
2739
+ ),
2740
+ iconRight: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_phosphor_react9.CaretRight, {}),
2695
2741
  onClick: handleClick,
2696
2742
  onKeyDown: (e) => {
2697
2743
  if (e.key === "Enter" || e.key === " ") {
@@ -2700,29 +2746,8 @@ var ProfileToggleTheme = ({ ...props }) => {
2700
2746
  setModalThemeToggle(true);
2701
2747
  }
2702
2748
  },
2703
- tabIndex: 0,
2704
2749
  ...props,
2705
- children: [
2706
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2707
- "svg",
2708
- {
2709
- width: "25",
2710
- height: "25",
2711
- viewBox: "0 0 25 25",
2712
- fill: "none",
2713
- xmlns: "http://www.w3.org/2000/svg",
2714
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2715
- "path",
2716
- {
2717
- d: "M12.5 2.75C15.085 2.75276 17.5637 3.78054 19.3916 5.6084C21.2195 7.43628 22.2473 9.915 22.25 12.5C22.25 14.4284 21.6778 16.3136 20.6064 17.917C19.5352 19.5201 18.0128 20.7699 16.2314 21.5078C14.4499 22.2458 12.489 22.4387 10.5977 22.0625C8.70642 21.6863 6.96899 20.758 5.60547 19.3945C4.24197 18.031 3.31374 16.2936 2.9375 14.4023C2.56129 12.511 2.75423 10.5501 3.49219 8.76855C4.23012 6.98718 5.47982 5.46483 7.08301 4.39355C8.68639 3.32221 10.5716 2.75 12.5 2.75ZM11.75 4.28516C9.70145 4.47452 7.7973 5.42115 6.41016 6.94043C5.02299 8.4599 4.25247 10.4426 4.25 12.5C4.25247 14.5574 5.02299 16.5401 6.41016 18.0596C7.7973 19.5789 9.70145 20.5255 11.75 20.7148V4.28516Z",
2718
- fill: "#525252"
2719
- }
2720
- )
2721
- }
2722
- ),
2723
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text_default, { className: "w-full", size: "md", children: "Apar\xEAncia" }),
2724
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_phosphor_react9.CaretRight, {})
2725
- ]
2750
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text_default, { size: "md", color: "text-text-700", children: "Apar\xEAncia" })
2726
2751
  }
2727
2752
  ),
2728
2753
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
@@ -2777,8 +2802,8 @@ var ProfileMenuFooter = ({
2777
2802
  },
2778
2803
  ...props,
2779
2804
  children: [
2780
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_phosphor_react9.SignOut, {}) }),
2781
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text_default, { children: "Sair" })
2805
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_phosphor_react9.SignOut, { className: "text-inherit" }) }),
2806
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text_default, { color: "inherit", children: "Sair" })
2782
2807
  ]
2783
2808
  }
2784
2809
  );
@@ -7757,7 +7782,7 @@ var SpeedMenu = ({
7757
7782
  ref: speedMenuRef,
7758
7783
  role: "menu",
7759
7784
  "aria-label": "Playback speed",
7760
- className: isFullscreen ? "absolute bottom-12 right-0 bg-black/90 rounded-lg p-2 min-w-20 z-[9999]" : "fixed bg-black/90 rounded-lg p-2 min-w-20 z-[9999]",
7785
+ className: isFullscreen ? "absolute bottom-12 right-0 bg-background border border-border-100 rounded-lg shadow-lg p-2 min-w-24 z-[9999]" : "fixed bg-background border border-border-100 rounded-lg shadow-lg p-2 min-w-24 z-[9999]",
7761
7786
  style: !isFullscreen ? {
7762
7787
  top: `${position.top}px`,
7763
7788
  left: `${position.left}px`
@@ -7768,7 +7793,7 @@ var SpeedMenu = ({
7768
7793
  role: "menuitemradio",
7769
7794
  "aria-checked": playbackRate === speed,
7770
7795
  onClick: () => onSpeedChange(speed),
7771
- className: `block w-full text-left px-3 py-1 text-sm rounded hover:bg-white/20 transition-colors ${playbackRate === speed ? "text-primary-400" : "text-white"}`,
7796
+ className: `block w-full text-left px-3 py-1 text-sm rounded hover:bg-border-50 transition-colors ${playbackRate === speed ? "bg-primary-950 text-secondary-100 font-medium" : "text-text-950"}`,
7772
7797
  children: [
7773
7798
  speed,
7774
7799
  "x"
@@ -11393,11 +11418,6 @@ var mock_content_default = "./mock-content-K2CDVG6P.png";
11393
11418
 
11394
11419
  // src/components/NotificationCard/NotificationCard.tsx
11395
11420
  var import_jsx_runtime51 = require("react/jsx-runtime");
11396
- var syncNotificationState = (open, isNotificationActive, setActiveStates, key = "notifications") => {
11397
- if (!open && isNotificationActive) {
11398
- setActiveStates((prev) => ({ ...prev, [key]: false }));
11399
- }
11400
- };
11401
11421
  var NotificationEmpty = ({
11402
11422
  emptyStateImage,
11403
11423
  emptyStateTitle = "Nenhuma notifica\xE7\xE3o no momento",
@@ -12123,10 +12143,11 @@ var createNotificationsHook = (apiClient) => {
12123
12143
  getRootDomain,
12124
12144
  getStatusBadge,
12125
12145
  getSubjectColorClass,
12146
+ getSubjectColorWithOpacity,
12126
12147
  getSubjectIcon,
12127
12148
  getSubjectInfo,
12128
12149
  getSubjectName,
12129
- syncNotificationState,
12150
+ syncDropdownState,
12130
12151
  useApiConfig,
12131
12152
  useAuth,
12132
12153
  useAuthGuard,