analytica-frontend-lib 1.1.71 → 1.1.73
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.
- package/dist/Accordation/index.js.map +1 -1
- package/dist/Accordation/index.mjs.map +1 -1
- package/dist/Alert/index.js.map +1 -1
- package/dist/Alert/index.mjs.map +1 -1
- package/dist/AlertDialog/index.js.map +1 -1
- package/dist/AlertDialog/index.mjs.map +1 -1
- package/dist/Alternative/index.js.map +1 -1
- package/dist/Alternative/index.mjs.map +1 -1
- package/dist/Badge/index.js.map +1 -1
- package/dist/Badge/index.mjs.map +1 -1
- package/dist/Button/index.js.map +1 -1
- package/dist/Button/index.mjs.map +1 -1
- package/dist/Calendar/index.js.map +1 -1
- package/dist/Calendar/index.mjs.map +1 -1
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs.map +1 -1
- package/dist/CheckBox/index.js.map +1 -1
- package/dist/CheckBox/index.mjs.map +1 -1
- package/dist/Chips/index.js.map +1 -1
- package/dist/Chips/index.mjs.map +1 -1
- package/dist/Divider/index.js.map +1 -1
- package/dist/Divider/index.mjs.map +1 -1
- package/dist/DropdownMenu/index.js +24 -29
- package/dist/DropdownMenu/index.js.map +1 -1
- package/dist/DropdownMenu/index.mjs +24 -29
- package/dist/DropdownMenu/index.mjs.map +1 -1
- package/dist/IconButton/index.js.map +1 -1
- package/dist/IconButton/index.mjs.map +1 -1
- package/dist/IconRoundedButton/index.js.map +1 -1
- package/dist/IconRoundedButton/index.mjs.map +1 -1
- package/dist/Menu/index.js.map +1 -1
- package/dist/Menu/index.mjs.map +1 -1
- package/dist/Modal/index.js.map +1 -1
- package/dist/Modal/index.mjs.map +1 -1
- package/dist/MultipleChoice/index.js.map +1 -1
- package/dist/MultipleChoice/index.mjs.map +1 -1
- package/dist/NavButton/index.js.map +1 -1
- package/dist/NavButton/index.mjs.map +1 -1
- package/dist/NotFound/index.js.map +1 -1
- package/dist/NotFound/index.mjs.map +1 -1
- package/dist/NotificationCard/index.d.mts +1 -1
- package/dist/NotificationCard/index.d.ts +1 -1
- package/dist/NotificationCard/index.js +26 -38
- package/dist/NotificationCard/index.js.map +1 -1
- package/dist/NotificationCard/index.mjs +25 -36
- package/dist/NotificationCard/index.mjs.map +1 -1
- package/dist/{NotificationCard-DMdkuVEr.d.mts → NotificationCard-4GgB0Nsf.d.mts} +2 -7
- package/dist/{NotificationCard-DMdkuVEr.d.ts → NotificationCard-4GgB0Nsf.d.ts} +2 -7
- package/dist/ProgressBar/index.js.map +1 -1
- package/dist/ProgressBar/index.mjs.map +1 -1
- package/dist/ProgressCircle/index.js.map +1 -1
- package/dist/ProgressCircle/index.mjs.map +1 -1
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Radio/index.js.map +1 -1
- package/dist/Radio/index.mjs.map +1 -1
- package/dist/Search/index.js +97 -56
- package/dist/Search/index.js.map +1 -1
- package/dist/Search/index.mjs +98 -57
- package/dist/Search/index.mjs.map +1 -1
- package/dist/Select/index.js.map +1 -1
- package/dist/Select/index.mjs.map +1 -1
- package/dist/SelectionButton/index.js.map +1 -1
- package/dist/SelectionButton/index.mjs.map +1 -1
- package/dist/Skeleton/index.js.map +1 -1
- package/dist/Skeleton/index.mjs.map +1 -1
- package/dist/Stepper/index.js.map +1 -1
- package/dist/Stepper/index.mjs.map +1 -1
- package/dist/Table/index.js.map +1 -1
- package/dist/Table/index.mjs.map +1 -1
- package/dist/Text/index.js.map +1 -1
- package/dist/Text/index.mjs.map +1 -1
- package/dist/TextArea/index.js.map +1 -1
- package/dist/TextArea/index.mjs.map +1 -1
- package/dist/ThemeToggle/index.js.map +1 -1
- package/dist/ThemeToggle/index.mjs.map +1 -1
- package/dist/Toast/Toaster/index.js.map +1 -1
- package/dist/Toast/Toaster/index.mjs.map +1 -1
- package/dist/Toast/index.js.map +1 -1
- package/dist/Toast/index.mjs.map +1 -1
- package/dist/VideoPlayer/index.js.map +1 -1
- package/dist/VideoPlayer/index.mjs.map +1 -1
- package/dist/Whiteboard/index.js.map +1 -1
- package/dist/Whiteboard/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +108 -63
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +113 -68
- package/dist/index.mjs.map +1 -1
- package/dist/utils/index.d.mts +14 -1
- package/dist/utils/index.d.ts +14 -1
- package/dist/utils/index.js +13 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +11 -1
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Synchronizes dropdown state when it closes externally
|
|
6
|
+
* This ensures the toggle button state matches the dropdown state
|
|
7
|
+
*
|
|
8
|
+
* @param open - Current dropdown open state
|
|
9
|
+
* @param isActive - Current active state of the toggle button
|
|
10
|
+
* @param setActiveStates - Function to update active states
|
|
11
|
+
* @param key - Key identifier for the specific dropdown
|
|
12
|
+
*/
|
|
13
|
+
declare const syncDropdownState: (open: boolean, isActive: boolean, setActiveStates: Dispatch<SetStateAction<Record<string, boolean>>>, key: string) => void;
|
|
2
14
|
|
|
3
15
|
declare function cn(...inputs: ClassValue[]): string;
|
|
16
|
+
|
|
4
17
|
/**
|
|
5
18
|
* Retorna a cor hexadecimal com opacidade 0.7 (b3) se não estiver em dark mode.
|
|
6
19
|
* Se estiver em dark mode, retorna a cor original.
|
|
@@ -11,4 +24,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
11
24
|
*/
|
|
12
25
|
declare function getSubjectColorWithOpacity(hexColor: string | undefined, isDark: boolean): string | undefined;
|
|
13
26
|
|
|
14
|
-
export { cn, getSubjectColorWithOpacity };
|
|
27
|
+
export { cn, getSubjectColorWithOpacity, syncDropdownState };
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Synchronizes dropdown state when it closes externally
|
|
6
|
+
* This ensures the toggle button state matches the dropdown state
|
|
7
|
+
*
|
|
8
|
+
* @param open - Current dropdown open state
|
|
9
|
+
* @param isActive - Current active state of the toggle button
|
|
10
|
+
* @param setActiveStates - Function to update active states
|
|
11
|
+
* @param key - Key identifier for the specific dropdown
|
|
12
|
+
*/
|
|
13
|
+
declare const syncDropdownState: (open: boolean, isActive: boolean, setActiveStates: Dispatch<SetStateAction<Record<string, boolean>>>, key: string) => void;
|
|
2
14
|
|
|
3
15
|
declare function cn(...inputs: ClassValue[]): string;
|
|
16
|
+
|
|
4
17
|
/**
|
|
5
18
|
* Retorna a cor hexadecimal com opacidade 0.7 (b3) se não estiver em dark mode.
|
|
6
19
|
* Se estiver em dark mode, retorna a cor original.
|
|
@@ -11,4 +24,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
11
24
|
*/
|
|
12
25
|
declare function getSubjectColorWithOpacity(hexColor: string | undefined, isDark: boolean): string | undefined;
|
|
13
26
|
|
|
14
|
-
export { cn, getSubjectColorWithOpacity };
|
|
27
|
+
export { cn, getSubjectColorWithOpacity, syncDropdownState };
|
package/dist/utils/index.js
CHANGED
|
@@ -21,11 +21,21 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var utils_exports = {};
|
|
22
22
|
__export(utils_exports, {
|
|
23
23
|
cn: () => cn,
|
|
24
|
-
getSubjectColorWithOpacity: () => getSubjectColorWithOpacity
|
|
24
|
+
getSubjectColorWithOpacity: () => getSubjectColorWithOpacity,
|
|
25
|
+
syncDropdownState: () => syncDropdownState
|
|
25
26
|
});
|
|
26
27
|
module.exports = __toCommonJS(utils_exports);
|
|
27
28
|
var import_clsx = require("clsx");
|
|
28
29
|
var import_tailwind_merge = require("tailwind-merge");
|
|
30
|
+
|
|
31
|
+
// src/utils/dropdown.ts
|
|
32
|
+
var syncDropdownState = (open, isActive, setActiveStates, key) => {
|
|
33
|
+
if (!open && isActive) {
|
|
34
|
+
setActiveStates((prev) => ({ ...prev, [key]: false }));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// src/utils/utils.ts
|
|
29
39
|
function cn(...inputs) {
|
|
30
40
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
31
41
|
}
|
|
@@ -52,6 +62,7 @@ function getSubjectColorWithOpacity(hexColor, isDark) {
|
|
|
52
62
|
// Annotate the CommonJS export names for ESM import in node:
|
|
53
63
|
0 && (module.exports = {
|
|
54
64
|
cn,
|
|
55
|
-
getSubjectColorWithOpacity
|
|
65
|
+
getSubjectColorWithOpacity,
|
|
66
|
+
syncDropdownState
|
|
56
67
|
});
|
|
57
68
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * Retorna a cor hexadecimal com opacidade 0.7 (b3) se não estiver em dark mode.\n * Se estiver em dark mode, retorna a cor original.\n *\n * @param hexColor - Cor hexadecimal (ex: \"#0066b8\" ou \"0066b8\")\n * @param isDark - booleano indicando se está em dark mode\n * @returns string - cor hexadecimal com opacidade se necessário\n */\nexport function getSubjectColorWithOpacity(\n hexColor: string | undefined,\n isDark: boolean\n): string | undefined {\n if (!hexColor) return undefined;\n // Remove o '#' se existir\n let color = hexColor.replace(/^#/, '').toLowerCase();\n\n if (isDark) {\n // Se está em dark mode, sempre remove opacidade se existir\n if (color.length === 8) {\n color = color.slice(0, 6);\n }\n return `#${color}`;\n } else {\n // Se não está em dark mode (light mode)\n let resultColor: string;\n if (color.length === 6) {\n // Adiciona opacidade 0.7 (b3) para cores de 6 dígitos\n resultColor = `#${color}b3`;\n } else if (color.length === 8) {\n // Já tem opacidade, retorna como está\n resultColor = `#${color}`;\n } else {\n // Para outros tamanhos (3, 4, 5 dígitos), retorna como está\n resultColor = `#${color}`;\n }\n return resultColor;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAsC;AACtC,4BAAwB;
|
|
1
|
+
{"version":3,"sources":["../../src/utils/utils.ts","../../src/utils/dropdown.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport { syncDropdownState } from './dropdown';\n\n/**\n * Retorna a cor hexadecimal com opacidade 0.7 (b3) se não estiver em dark mode.\n * Se estiver em dark mode, retorna a cor original.\n *\n * @param hexColor - Cor hexadecimal (ex: \"#0066b8\" ou \"0066b8\")\n * @param isDark - booleano indicando se está em dark mode\n * @returns string - cor hexadecimal com opacidade se necessário\n */\nexport function getSubjectColorWithOpacity(\n hexColor: string | undefined,\n isDark: boolean\n): string | undefined {\n if (!hexColor) return undefined;\n // Remove o '#' se existir\n let color = hexColor.replace(/^#/, '').toLowerCase();\n\n if (isDark) {\n // Se está em dark mode, sempre remove opacidade se existir\n if (color.length === 8) {\n color = color.slice(0, 6);\n }\n return `#${color}`;\n } else {\n // Se não está em dark mode (light mode)\n let resultColor: string;\n if (color.length === 6) {\n // Adiciona opacidade 0.7 (b3) para cores de 6 dígitos\n resultColor = `#${color}b3`;\n } else if (color.length === 8) {\n // Já tem opacidade, retorna como está\n resultColor = `#${color}`;\n } else {\n // Para outros tamanhos (3, 4, 5 dígitos), retorna como está\n resultColor = `#${color}`;\n }\n return resultColor;\n }\n}\n","import type { Dispatch, SetStateAction } from 'react';\n\n/**\n * Synchronizes dropdown state when it closes externally\n * This ensures the toggle button state matches the dropdown state\n *\n * @param open - Current dropdown open state\n * @param isActive - Current active state of the toggle button\n * @param setActiveStates - Function to update active states\n * @param key - Key identifier for the specific dropdown\n */\nexport const syncDropdownState = (\n open: boolean,\n isActive: boolean,\n setActiveStates: Dispatch<SetStateAction<Record<string, boolean>>>,\n key: string\n) => {\n if (!open && isActive) {\n setActiveStates((prev) => ({ ...prev, [key]: false }));\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAsC;AACtC,4BAAwB;;;ACUjB,IAAM,oBAAoB,CAC/B,MACA,UACA,iBACA,QACG;AACH,MAAI,CAAC,QAAQ,UAAU;AACrB,oBAAgB,CAAC,UAAU,EAAE,GAAG,MAAM,CAAC,GAAG,GAAG,MAAM,EAAE;AAAA,EACvD;AACF;;;ADjBO,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;AAYO,SAAS,2BACd,UACA,QACoB;AACpB,MAAI,CAAC,SAAU,QAAO;AAEtB,MAAI,QAAQ,SAAS,QAAQ,MAAM,EAAE,EAAE,YAAY;AAEnD,MAAI,QAAQ;AAEV,QAAI,MAAM,WAAW,GAAG;AACtB,cAAQ,MAAM,MAAM,GAAG,CAAC;AAAA,IAC1B;AACA,WAAO,IAAI,KAAK;AAAA,EAClB,OAAO;AAEL,QAAI;AACJ,QAAI,MAAM,WAAW,GAAG;AAEtB,oBAAc,IAAI,KAAK;AAAA,IACzB,WAAW,MAAM,WAAW,GAAG;AAE7B,oBAAc,IAAI,KAAK;AAAA,IACzB,OAAO;AAEL,oBAAc,IAAI,KAAK;AAAA,IACzB;AACA,WAAO;AAAA,EACT;AACF;","names":[]}
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
// src/utils/utils.ts
|
|
2
2
|
import { clsx } from "clsx";
|
|
3
3
|
import { twMerge } from "tailwind-merge";
|
|
4
|
+
|
|
5
|
+
// src/utils/dropdown.ts
|
|
6
|
+
var syncDropdownState = (open, isActive, setActiveStates, key) => {
|
|
7
|
+
if (!open && isActive) {
|
|
8
|
+
setActiveStates((prev) => ({ ...prev, [key]: false }));
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// src/utils/utils.ts
|
|
4
13
|
function cn(...inputs) {
|
|
5
14
|
return twMerge(clsx(inputs));
|
|
6
15
|
}
|
|
@@ -26,6 +35,7 @@ function getSubjectColorWithOpacity(hexColor, isDark) {
|
|
|
26
35
|
}
|
|
27
36
|
export {
|
|
28
37
|
cn,
|
|
29
|
-
getSubjectColorWithOpacity
|
|
38
|
+
getSubjectColorWithOpacity,
|
|
39
|
+
syncDropdownState
|
|
30
40
|
};
|
|
31
41
|
//# sourceMappingURL=index.mjs.map
|
package/dist/utils/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * Retorna a cor hexadecimal com opacidade 0.7 (b3) se não estiver em dark mode.\n * Se estiver em dark mode, retorna a cor original.\n *\n * @param hexColor - Cor hexadecimal (ex: \"#0066b8\" ou \"0066b8\")\n * @param isDark - booleano indicando se está em dark mode\n * @returns string - cor hexadecimal com opacidade se necessário\n */\nexport function getSubjectColorWithOpacity(\n hexColor: string | undefined,\n isDark: boolean\n): string | undefined {\n if (!hexColor) return undefined;\n // Remove o '#' se existir\n let color = hexColor.replace(/^#/, '').toLowerCase();\n\n if (isDark) {\n // Se está em dark mode, sempre remove opacidade se existir\n if (color.length === 8) {\n color = color.slice(0, 6);\n }\n return `#${color}`;\n } else {\n // Se não está em dark mode (light mode)\n let resultColor: string;\n if (color.length === 6) {\n // Adiciona opacidade 0.7 (b3) para cores de 6 dígitos\n resultColor = `#${color}b3`;\n } else if (color.length === 8) {\n // Já tem opacidade, retorna como está\n resultColor = `#${color}`;\n } else {\n // Para outros tamanhos (3, 4, 5 dígitos), retorna como está\n resultColor = `#${color}`;\n }\n return resultColor;\n }\n}\n"],"mappings":";AAAA,SAAS,YAA6B;AACtC,SAAS,eAAe;
|
|
1
|
+
{"version":3,"sources":["../../src/utils/utils.ts","../../src/utils/dropdown.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport { syncDropdownState } from './dropdown';\n\n/**\n * Retorna a cor hexadecimal com opacidade 0.7 (b3) se não estiver em dark mode.\n * Se estiver em dark mode, retorna a cor original.\n *\n * @param hexColor - Cor hexadecimal (ex: \"#0066b8\" ou \"0066b8\")\n * @param isDark - booleano indicando se está em dark mode\n * @returns string - cor hexadecimal com opacidade se necessário\n */\nexport function getSubjectColorWithOpacity(\n hexColor: string | undefined,\n isDark: boolean\n): string | undefined {\n if (!hexColor) return undefined;\n // Remove o '#' se existir\n let color = hexColor.replace(/^#/, '').toLowerCase();\n\n if (isDark) {\n // Se está em dark mode, sempre remove opacidade se existir\n if (color.length === 8) {\n color = color.slice(0, 6);\n }\n return `#${color}`;\n } else {\n // Se não está em dark mode (light mode)\n let resultColor: string;\n if (color.length === 6) {\n // Adiciona opacidade 0.7 (b3) para cores de 6 dígitos\n resultColor = `#${color}b3`;\n } else if (color.length === 8) {\n // Já tem opacidade, retorna como está\n resultColor = `#${color}`;\n } else {\n // Para outros tamanhos (3, 4, 5 dígitos), retorna como está\n resultColor = `#${color}`;\n }\n return resultColor;\n }\n}\n","import type { Dispatch, SetStateAction } from 'react';\n\n/**\n * Synchronizes dropdown state when it closes externally\n * This ensures the toggle button state matches the dropdown state\n *\n * @param open - Current dropdown open state\n * @param isActive - Current active state of the toggle button\n * @param setActiveStates - Function to update active states\n * @param key - Key identifier for the specific dropdown\n */\nexport const syncDropdownState = (\n open: boolean,\n isActive: boolean,\n setActiveStates: Dispatch<SetStateAction<Record<string, boolean>>>,\n key: string\n) => {\n if (!open && isActive) {\n setActiveStates((prev) => ({ ...prev, [key]: false }));\n }\n};\n"],"mappings":";AAAA,SAAS,YAA6B;AACtC,SAAS,eAAe;;;ACUjB,IAAM,oBAAoB,CAC/B,MACA,UACA,iBACA,QACG;AACH,MAAI,CAAC,QAAQ,UAAU;AACrB,oBAAgB,CAAC,UAAU,EAAE,GAAG,MAAM,CAAC,GAAG,GAAG,MAAM,EAAE;AAAA,EACvD;AACF;;;ADjBO,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;AAYO,SAAS,2BACd,UACA,QACoB;AACpB,MAAI,CAAC,SAAU,QAAO;AAEtB,MAAI,QAAQ,SAAS,QAAQ,MAAM,EAAE,EAAE,YAAY;AAEnD,MAAI,QAAQ;AAEV,QAAI,MAAM,WAAW,GAAG;AACtB,cAAQ,MAAM,MAAM,GAAG,CAAC;AAAA,IAC1B;AACA,WAAO,IAAI,KAAK;AAAA,EAClB,OAAO;AAEL,QAAI;AACJ,QAAI,MAAM,WAAW,GAAG;AAEtB,oBAAc,IAAI,KAAK;AAAA,IACzB,WAAW,MAAM,WAAW,GAAG;AAE7B,oBAAc,IAAI,KAAK;AAAA,IACzB,OAAO;AAEL,oBAAc,IAAI,KAAK;AAAA,IACzB;AACA,WAAO;AAAA,EACT;AACF;","names":[]}
|
package/package.json
CHANGED