@flowtomic/ui 0.1.1 → 0.1.4
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/blocks/developer-panel/page.d.ts +86 -0
- package/dist/blocks/developer-panel/page.d.ts.map +1 -0
- package/dist/blocks/developer-panel/page.js +35 -0
- package/dist/components/atoms/actions/badge/badge.d.ts +1 -1
- package/dist/components/atoms/actions/button/button.d.ts +2 -2
- package/dist/components/atoms/actions/button/button.d.ts.map +1 -1
- package/dist/components/atoms/actions/button/button.js +1 -2
- package/dist/components/atoms/animation/backdrop-blur/backdrop-blur.d.ts.map +1 -1
- package/dist/components/atoms/animation/backdrop-blur/backdrop-blur.js +9 -8
- package/dist/components/atoms/animation/encrypted-text/encrypted-text.d.ts +57 -0
- package/dist/components/atoms/animation/encrypted-text/encrypted-text.d.ts.map +1 -0
- package/dist/components/atoms/animation/encrypted-text/encrypted-text.js +104 -0
- package/dist/components/atoms/animation/encrypted-text/index.d.ts +3 -0
- package/dist/components/atoms/animation/encrypted-text/index.d.ts.map +1 -0
- package/dist/components/atoms/animation/encrypted-text/index.js +1 -0
- package/dist/components/atoms/animation/index.d.ts +2 -0
- package/dist/components/atoms/animation/index.d.ts.map +1 -1
- package/dist/components/atoms/animation/index.js +1 -0
- package/dist/components/atoms/animation/sliding-number/sliding-number.d.ts.map +1 -1
- package/dist/components/atoms/animation/sliding-number/sliding-number.js +6 -1
- package/dist/components/atoms/data-display/carousel/carousel.d.ts.map +1 -1
- package/dist/components/atoms/data-display/carousel/carousel.js +3 -1
- package/dist/components/atoms/data-display/chart/chart.d.ts.map +1 -1
- package/dist/components/atoms/data-display/chart/chart.js +3 -1
- package/dist/components/atoms/feedback/alert/alert.d.ts +1 -1
- package/dist/components/atoms/feedback/alert-dialog/alert-dialog.d.ts +2 -2
- package/dist/components/atoms/feedback/tooltip/index.d.ts +1 -1
- package/dist/components/atoms/feedback/tooltip/index.d.ts.map +1 -1
- package/dist/components/atoms/feedback/tooltip/index.js +1 -1
- package/dist/components/atoms/feedback/tooltip/tooltip.d.ts +42 -5
- package/dist/components/atoms/feedback/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/atoms/feedback/tooltip/tooltip.js +188 -5
- package/dist/components/atoms/forms/autocomplete/autocomplete-context.d.ts +29 -0
- package/dist/components/atoms/forms/autocomplete/autocomplete-context.d.ts.map +1 -0
- package/dist/components/atoms/forms/autocomplete/autocomplete-context.js +10 -0
- package/dist/components/atoms/forms/autocomplete/autocomplete-item.d.ts +16 -0
- package/dist/components/atoms/forms/autocomplete/autocomplete-item.d.ts.map +1 -0
- package/dist/components/atoms/forms/autocomplete/autocomplete-item.js +48 -0
- package/dist/components/atoms/forms/autocomplete/autocomplete-section.d.ts +14 -0
- package/dist/components/atoms/forms/autocomplete/autocomplete-section.d.ts.map +1 -0
- package/dist/components/atoms/forms/autocomplete/autocomplete-section.js +13 -0
- package/dist/components/atoms/forms/autocomplete/autocomplete.d.ts +13 -9
- package/dist/components/atoms/forms/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/atoms/forms/autocomplete/autocomplete.js +295 -87
- package/dist/components/atoms/forms/autocomplete/index.d.ts +6 -0
- package/dist/components/atoms/forms/autocomplete/index.d.ts.map +1 -1
- package/dist/components/atoms/forms/autocomplete/index.js +3 -0
- package/dist/components/atoms/forms/field/field.d.ts.map +1 -1
- package/dist/components/atoms/forms/field/field.js +4 -2
- package/dist/components/atoms/forms/index.d.ts +0 -2
- package/dist/components/atoms/forms/index.d.ts.map +1 -1
- package/dist/components/atoms/forms/index.js +0 -1
- package/dist/components/atoms/forms/input/input.d.ts +2 -2
- package/dist/components/atoms/forms/input-otp/input-otp.d.ts.map +1 -1
- package/dist/components/atoms/forms/input-otp/input-otp.js +3 -1
- package/dist/components/atoms/forms/slider/slider.d.ts.map +1 -1
- package/dist/components/atoms/forms/slider/slider.js +2 -1
- package/dist/components/atoms/forms/toggle/toggle.d.ts +2 -2
- package/dist/components/atoms/layout/sidebar/sidebar.d.ts +2 -2
- package/dist/components/atoms/layout/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/atoms/navigation/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/atoms/navigation/breadcrumb/breadcrumb.js +3 -1
- package/dist/components/atoms/navigation/command/command.d.ts +7 -7
- package/dist/components/atoms/navigation/tabs/tabs.js +2 -2
- package/dist/components/molecules/auth/auth-navigation-link/auth-navigation-link.d.ts +1 -11
- package/dist/components/molecules/auth/auth-navigation-link/auth-navigation-link.d.ts.map +1 -1
- package/dist/components/molecules/auth/auth-navigation-link/auth-navigation-link.js +2 -3
- package/dist/components/molecules/data-display/bar-chart/bar-chart.d.ts.map +1 -1
- package/dist/components/molecules/data-display/bar-chart/bar-chart.js +14 -9
- package/dist/components/molecules/data-display/circular-progress-chart/circular-progress-chart.d.ts.map +1 -1
- package/dist/components/molecules/data-display/circular-progress-chart/circular-progress-chart.js +6 -1
- package/dist/components/molecules/data-display/message/message.d.ts.map +1 -1
- package/dist/components/molecules/data-display/message/message.js +1 -1
- package/dist/components/molecules/data-display/project-list/project-list.d.ts.map +1 -1
- package/dist/components/molecules/data-display/project-list/project-list.js +14 -1
- package/dist/components/molecules/data-display/reminder-card/reminder-card.d.ts.map +1 -1
- package/dist/components/molecules/data-display/reminder-card/reminder-card.js +1 -1
- package/dist/components/molecules/data-display/stat-card/stat-card.d.ts.map +1 -1
- package/dist/components/molecules/data-display/team-member-list/team-member-list.d.ts.map +1 -1
- package/dist/components/molecules/data-display/team-member-list/team-member-list.js +14 -1
- package/dist/components/molecules/data-display/time-tracker/time-tracker.d.ts.map +1 -1
- package/dist/components/molecules/data-display/tool/tool.d.ts.map +1 -1
- package/dist/components/molecules/feedback/confirmation/confirmation.d.ts.map +1 -1
- package/dist/components/molecules/forms/autocomplete/autocomplete-context.d.ts +16 -0
- package/dist/components/molecules/forms/autocomplete/autocomplete-context.d.ts.map +1 -0
- package/dist/components/molecules/forms/autocomplete/autocomplete-context.js +14 -0
- package/dist/components/molecules/forms/autocomplete/autocomplete-item.d.ts +23 -0
- package/dist/components/molecules/forms/autocomplete/autocomplete-item.d.ts.map +1 -0
- package/dist/components/molecules/forms/autocomplete/autocomplete-item.js +29 -0
- package/dist/components/molecules/forms/autocomplete/autocomplete-section.d.ts +19 -0
- package/dist/components/molecules/forms/autocomplete/autocomplete-section.d.ts.map +1 -0
- package/dist/components/molecules/forms/autocomplete/autocomplete-section.js +13 -0
- package/dist/components/molecules/forms/autocomplete/autocomplete.d.ts +33 -0
- package/dist/components/molecules/forms/autocomplete/autocomplete.d.ts.map +1 -0
- package/dist/components/molecules/forms/autocomplete/autocomplete.js +101 -0
- package/dist/components/molecules/forms/autocomplete/index.d.ts +9 -0
- package/dist/components/molecules/forms/autocomplete/index.d.ts.map +1 -0
- package/dist/components/molecules/forms/autocomplete/index.js +4 -0
- package/dist/components/molecules/forms/input-group/input-group.d.ts.map +1 -1
- package/dist/components/molecules/forms/item/item.d.ts +4 -4
- package/dist/components/molecules/forms/item/item.d.ts.map +1 -1
- package/dist/components/molecules/forms/item/item.js +1 -1
- package/dist/components/molecules/index.d.ts +2 -2
- package/dist/components/molecules/index.d.ts.map +1 -1
- package/dist/components/molecules/index.js +1 -1
- package/dist/components/molecules/layout/dashboard-header/dashboard-header.d.ts.map +1 -1
- package/dist/components/molecules/navigation/menu-dock/menu-dock.d.ts +5 -0
- package/dist/components/molecules/navigation/menu-dock/menu-dock.d.ts.map +1 -1
- package/dist/components/molecules/navigation/menu-dock/menu-dock.js +103 -10
- package/dist/components/molecules/typography/index.d.ts +0 -2
- package/dist/components/molecules/typography/index.d.ts.map +1 -1
- package/dist/components/molecules/typography/index.js +1 -1
- package/dist/components/organisms/context/context.d.ts +4 -4
- package/dist/components/organisms/conversation/conversation.d.ts.map +1 -1
- package/dist/components/organisms/conversation/conversation.js +2 -2
- package/dist/components/organisms/genealogy-canvas/genealogy-canvas.d.ts.map +1 -1
- package/dist/components/organisms/genealogy-canvas/genealogy-canvas.js +1 -1
- package/dist/components/organisms/index.d.ts +2 -0
- package/dist/components/organisms/index.d.ts.map +1 -1
- package/dist/components/organisms/index.js +1 -0
- package/dist/components/organisms/model-selector/model-selector.d.ts +1 -1
- package/dist/components/organisms/prompt-input/prompt-input.js +2 -2
- package/dist/components/organisms/script-editor/index.d.ts +3 -0
- package/dist/components/organisms/script-editor/index.d.ts.map +1 -0
- package/dist/components/organisms/script-editor/index.js +1 -0
- package/dist/components/organisms/script-editor/script-editor.d.ts +52 -0
- package/dist/components/organisms/script-editor/script-editor.d.ts.map +1 -0
- package/dist/components/organisms/script-editor/script-editor.js +86 -0
- package/dist/components/organisms/stats-grid/stats-grid.d.ts.map +1 -1
- package/dist/index.js +477 -498
- package/package.json +28 -17
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Developer Panel Block
|
|
3
|
+
*
|
|
4
|
+
* Painel de desenvolvedor com informações do sistema, ambiente e ferramentas de desenvolvimento.
|
|
5
|
+
* Inclui editor de scripts integrado.
|
|
6
|
+
*/
|
|
7
|
+
import type { ExecuteScriptResponse, TerminalLine } from "@flowtomic/logic";
|
|
8
|
+
export interface SystemHealth {
|
|
9
|
+
status: string;
|
|
10
|
+
timestamp: string;
|
|
11
|
+
service: string;
|
|
12
|
+
}
|
|
13
|
+
export interface SystemInfo {
|
|
14
|
+
name: string;
|
|
15
|
+
version: string;
|
|
16
|
+
description: string;
|
|
17
|
+
}
|
|
18
|
+
export interface EnvironmentInfo {
|
|
19
|
+
apiBaseUrl: string;
|
|
20
|
+
nodeEnv: string;
|
|
21
|
+
timestamp: string;
|
|
22
|
+
userAgent: string;
|
|
23
|
+
screenResolution: string;
|
|
24
|
+
timezone: string;
|
|
25
|
+
}
|
|
26
|
+
export interface UserInfo {
|
|
27
|
+
username?: string;
|
|
28
|
+
email?: string;
|
|
29
|
+
role?: string;
|
|
30
|
+
isAdmin?: boolean;
|
|
31
|
+
token?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface DeveloperPanelProps {
|
|
34
|
+
/**
|
|
35
|
+
* Informações do usuário atual
|
|
36
|
+
*/
|
|
37
|
+
user?: UserInfo;
|
|
38
|
+
/**
|
|
39
|
+
* Status de health check do sistema
|
|
40
|
+
*/
|
|
41
|
+
health?: SystemHealth | null;
|
|
42
|
+
/**
|
|
43
|
+
* Informações do sistema/aplicação
|
|
44
|
+
*/
|
|
45
|
+
systemInfo?: SystemInfo | null;
|
|
46
|
+
/**
|
|
47
|
+
* Informações do ambiente frontend
|
|
48
|
+
*/
|
|
49
|
+
environmentInfo?: EnvironmentInfo | null;
|
|
50
|
+
/**
|
|
51
|
+
* Estado de carregamento
|
|
52
|
+
*/
|
|
53
|
+
loading?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Mensagem de erro
|
|
56
|
+
*/
|
|
57
|
+
error?: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* URL base da API para links de ferramentas
|
|
60
|
+
*/
|
|
61
|
+
apiBaseUrl?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Callback para abrir Swagger UI
|
|
64
|
+
*/
|
|
65
|
+
onOpenSwagger?: () => void;
|
|
66
|
+
/**
|
|
67
|
+
* Callback para abrir API Docs
|
|
68
|
+
*/
|
|
69
|
+
onOpenApiDocs?: () => void;
|
|
70
|
+
/**
|
|
71
|
+
* Callback para abrir Health Check
|
|
72
|
+
*/
|
|
73
|
+
onOpenHealthCheck?: () => void;
|
|
74
|
+
/**
|
|
75
|
+
* Configurações do ScriptEditor
|
|
76
|
+
*/
|
|
77
|
+
scriptEditorProps?: {
|
|
78
|
+
defaultScript?: string;
|
|
79
|
+
wsUrl?: string;
|
|
80
|
+
executeScript?: (script: string) => Promise<ExecuteScriptResponse>;
|
|
81
|
+
onOutput?: (line: TerminalLine) => void;
|
|
82
|
+
onError?: (error: Error) => void;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export default function DeveloperPanel({ user, health, systemInfo, environmentInfo, loading, error, apiBaseUrl, onOpenSwagger, onOpenApiDocs, onOpenHealthCheck, scriptEditorProps, }: DeveloperPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
//# sourceMappingURL=page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../src/blocks/developer-panel/page.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAkB5E,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAEzC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAE3B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAE3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE/B;;OAEG;IACH,iBAAiB,CAAC,EAAE;QAClB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;QACnE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;QACxC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;KAClC,CAAC;CACH;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,IAAI,EACJ,MAAM,EACN,UAAU,EACV,eAAe,EACf,OAAe,EACf,KAAY,EACZ,UAAe,EACf,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,iBAAiB,GAClB,EAAE,mBAAmB,2CAySrB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Developer Panel Block
|
|
3
|
+
*
|
|
4
|
+
* Painel de desenvolvedor com informações do sistema, ambiente e ferramentas de desenvolvimento.
|
|
5
|
+
* Inclui editor de scripts integrado.
|
|
6
|
+
*/
|
|
7
|
+
"use client";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
|
+
import { Code, Info } from "lucide-react";
|
|
10
|
+
import { useState } from "react";
|
|
11
|
+
import { Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Tabs, TabsContent, TabsList, TabsTrigger, } from "@/components/atoms";
|
|
12
|
+
import { ScriptEditor } from "@/components/organisms";
|
|
13
|
+
export default function DeveloperPanel({ user, health, systemInfo, environmentInfo, loading = false, error = null, apiBaseUrl = "", onOpenSwagger, onOpenApiDocs, onOpenHealthCheck, scriptEditorProps, }) {
|
|
14
|
+
const [copiedText, setCopiedText] = useState(null);
|
|
15
|
+
const copyToClipboard = (text, label) => {
|
|
16
|
+
navigator.clipboard.writeText(text);
|
|
17
|
+
setCopiedText(label);
|
|
18
|
+
setTimeout(() => setCopiedText(null), 2000);
|
|
19
|
+
};
|
|
20
|
+
const defaultOpenSwagger = () => {
|
|
21
|
+
const swaggerUrl = `${apiBaseUrl.replace("/api", "")}/swagger-ui.html`;
|
|
22
|
+
window.open(swaggerUrl, "_blank");
|
|
23
|
+
};
|
|
24
|
+
const defaultOpenApiDocs = () => {
|
|
25
|
+
const apiDocsUrl = `${apiBaseUrl.replace("/api", "")}/v3/api-docs`;
|
|
26
|
+
window.open(apiDocsUrl, "_blank");
|
|
27
|
+
};
|
|
28
|
+
const defaultOpenHealthCheck = () => {
|
|
29
|
+
window.open(`${apiBaseUrl}/health`, "_blank");
|
|
30
|
+
};
|
|
31
|
+
if (loading) {
|
|
32
|
+
return (_jsx("div", { className: "container mx-auto p-6", children: _jsx("div", { className: "flex items-center justify-center h-64", children: _jsx("p", { className: "text-muted-foreground", children: "Carregando informa\u00E7\u00F5es do sistema..." }) }) }));
|
|
33
|
+
}
|
|
34
|
+
return (_jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-3xl font-bold", children: "Painel de Desenvolvedor" }), _jsx("p", { className: "text-muted-foreground mt-2", children: "Informa\u00E7\u00F5es t\u00E9cnicas e ferramentas de desenvolvimento" })] }), _jsx(Badge, { variant: "outline", className: "text-lg px-4 py-2", children: user?.isAdmin ? "ADMIN" : "USER" })] }), error && (_jsxs(Card, { className: "border-destructive", children: [_jsx(CardHeader, { children: _jsx(CardTitle, { className: "text-destructive", children: "Erro" }) }), _jsx(CardContent, { children: _jsx("p", { children: error }) })] })), _jsxs(Tabs, { defaultValue: "info", className: "w-full", children: [_jsxs(TabsList, { className: "grid w-full grid-cols-2 mb-6", children: [_jsxs(TabsTrigger, { value: "info", className: "flex items-center gap-2", children: [_jsx(Info, { className: "h-4 w-4" }), "Informa\u00E7\u00F5es do Sistema"] }), _jsxs(TabsTrigger, { value: "editor", className: "flex items-center gap-2", children: [_jsx(Code, { className: "h-4 w-4" }), "Editor de Scripts"] })] }), _jsx(TabsContent, { value: "info", className: "space-y-6", children: _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Usu\u00E1rio Atual" }), _jsx(CardDescription, { children: "Informa\u00E7\u00F5es da sess\u00E3o atual" })] }), _jsxs(CardContent, { className: "space-y-2", children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Nome" }), _jsx("p", { className: "font-medium", children: user?.username || "N/A" })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Email" }), _jsx("p", { className: "font-medium", children: user?.email || "N/A" })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Role" }), _jsx(Badge, { variant: user?.isAdmin ? "default" : "secondary", children: user?.role || "N/A" })] }), user?.token && (_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Token" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("code", { className: "text-xs bg-muted px-2 py-1 rounded flex-1 truncate", children: [user.token.substring(0, 20), "..."] }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => copyToClipboard(user.token, "token"), children: copiedText === "token" ? "Copiado!" : "Copiar" })] })] }))] })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Status do Sistema" }), _jsx(CardDescription, { children: "Health check da API" })] }), _jsx(CardContent, { className: "space-y-2", children: health ? (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Status" }), _jsx(Badge, { variant: health.status === "UP" ? "default" : "destructive", children: health.status })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Servi\u00E7o" }), _jsx("p", { className: "font-medium", children: health.service })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Timestamp" }), _jsx("p", { className: "font-medium text-xs", children: new Date(health.timestamp).toLocaleString("pt-BR") })] })] })) : (_jsx("p", { className: "text-muted-foreground", children: "N\u00E3o dispon\u00EDvel" })) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Informa\u00E7\u00F5es da Aplica\u00E7\u00E3o" }), _jsx(CardDescription, { children: "Vers\u00E3o e detalhes do sistema" })] }), _jsx(CardContent, { className: "space-y-2", children: systemInfo ? (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Nome" }), _jsx("p", { className: "font-medium", children: systemInfo.name })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Vers\u00E3o" }), _jsx(Badge, { variant: "outline", children: systemInfo.version })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Descri\u00E7\u00E3o" }), _jsx("p", { className: "font-medium text-sm", children: systemInfo.description })] })] })) : (_jsx("p", { className: "text-muted-foreground", children: "N\u00E3o dispon\u00EDvel" })) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Ambiente Frontend" }), _jsx(CardDescription, { children: "Configura\u00E7\u00F5es do cliente" })] }), _jsx(CardContent, { className: "space-y-2", children: environmentInfo ? (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "API Base URL" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("code", { className: "text-xs bg-muted px-2 py-1 rounded flex-1 truncate", children: environmentInfo.apiBaseUrl }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => copyToClipboard(environmentInfo.apiBaseUrl, "apiUrl"), children: copiedText === "apiUrl" ? "Copiado!" : "Copiar" })] })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Modo" }), _jsx(Badge, { variant: "outline", children: environmentInfo.nodeEnv })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Timezone" }), _jsx("p", { className: "font-medium text-xs", children: environmentInfo.timezone })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Resolu\u00E7\u00E3o" }), _jsx("p", { className: "font-medium text-xs", children: environmentInfo.screenResolution })] })] })) : (_jsx("p", { className: "text-muted-foreground", children: "N\u00E3o dispon\u00EDvel" })) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Ferramentas" }), _jsx(CardDescription, { children: "Acesso r\u00E1pido a ferramentas de desenvolvimento" })] }), _jsxs(CardContent, { className: "space-y-2", children: [_jsx(Button, { variant: "outline", className: "w-full justify-start", onClick: onOpenSwagger || defaultOpenSwagger, children: "\uD83D\uDCDA Abrir Swagger UI" }), _jsx(Button, { variant: "outline", className: "w-full justify-start", onClick: onOpenApiDocs || defaultOpenApiDocs, children: "\uD83D\uDCD6 Abrir API Docs (JSON)" }), _jsx(Button, { variant: "outline", className: "w-full justify-start", onClick: onOpenHealthCheck || defaultOpenHealthCheck, children: "\u2764\uFE0F Health Check" })] })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Navegador" }), _jsx(CardDescription, { children: "Informa\u00E7\u00F5es do cliente web" })] }), _jsx(CardContent, { className: "space-y-2", children: environmentInfo ? (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "User Agent" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("code", { className: "text-xs bg-muted px-2 py-1 rounded flex-1 truncate", children: [environmentInfo.userAgent.substring(0, 50), "..."] }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => copyToClipboard(environmentInfo.userAgent, "userAgent"), children: copiedText === "userAgent" ? "Copiado!" : "Copiar" })] })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Timestamp" }), _jsx("p", { className: "font-medium text-xs", children: new Date(environmentInfo.timestamp).toLocaleString("pt-BR") })] })] })) : (_jsx("p", { className: "text-muted-foreground", children: "N\u00E3o dispon\u00EDvel" })) })] })] }) }), _jsx(TabsContent, { value: "editor", className: "space-y-6", children: _jsx(ScriptEditor, { ...scriptEditorProps }) })] })] }));
|
|
35
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import React from "react";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "outline" | "default" | "success" | "secondary" | "destructive" | "warning" | "info" | null | undefined;
|
|
5
5
|
size?: "sm" | "lg" | "md" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
@@ -2,8 +2,8 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import { type Transition } from "motion/react";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
declare const buttonVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
6
|
-
size?: "
|
|
5
|
+
variant?: "link" | "outline" | "default" | "success" | "secondary" | "destructive" | "info" | "ghost" | "natural" | null | undefined;
|
|
6
|
+
size?: "sm" | "default" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "transition">, VariantProps<typeof buttonVariants> {
|
|
9
9
|
asChild?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/actions/button/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAgC,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,cAAc;;;8EA+BnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,EACvE,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/actions/button/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAgC,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,cAAc;;;8EA+BnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,EACvE,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,QAAA,MAAM,MAAM,uFA6BX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -32,10 +32,9 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
|
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
34
|
const Button = React.forwardRef(({ className, variant, size, asChild = false, animated = false, transition, ...props }, ref) => {
|
|
35
|
-
const Comp = asChild ? Slot : animated ? motion.button : "button";
|
|
36
35
|
const baseClassName = cn(buttonVariants({ variant, size, className }));
|
|
37
36
|
if (animated && !asChild) {
|
|
38
|
-
const { onDrag, ...motionProps } = props;
|
|
37
|
+
const { onDrag: _onDrag, ...motionProps } = props;
|
|
39
38
|
return (_jsx(motion.button, { ref: ref, className: baseClassName, whileHover: { scale: 1.02 }, whileTap: { scale: 0.98 }, transition: transition || {
|
|
40
39
|
type: "spring",
|
|
41
40
|
stiffness: 400,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backdrop-blur.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/animation/backdrop-blur/backdrop-blur.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"backdrop-blur.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/animation/backdrop-blur/backdrop-blur.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,QAAA,MAAM,YAAY,0FAmGjB,CAAC;AAGF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -12,16 +12,9 @@ import { cn } from "@/lib/utils";
|
|
|
12
12
|
* BackdropBlur - Componente de backdrop com blur animado
|
|
13
13
|
*/
|
|
14
14
|
const BackdropBlur = React.forwardRef(({ isOpen, className, blurIntensity = 10, opacity = 0.5, backgroundColor = "black", disabled = false, duration = 0.2, }, ref) => {
|
|
15
|
-
if (disabled) {
|
|
16
|
-
return (_jsx("div", { ref: ref, className: cn("fixed inset-0 z-40", className), style: {
|
|
17
|
-
backgroundColor: `${backgroundColor}${Math.round(opacity * 255)
|
|
18
|
-
.toString(16)
|
|
19
|
-
.padStart(2, "0")}`,
|
|
20
|
-
backdropFilter: isOpen ? `blur(${blurIntensity}px)` : "blur(0px)",
|
|
21
|
-
} }));
|
|
22
|
-
}
|
|
23
15
|
// Converte backgroundColor para rgba incluindo a opacidade
|
|
24
16
|
// Usa useMemo para evitar recálculos desnecessários
|
|
17
|
+
// IMPORTANTE: Hook deve ser chamado antes de qualquer early return
|
|
25
18
|
const backgroundColorWithOpacity = React.useMemo(() => {
|
|
26
19
|
const convertToRgba = (color, opacityValue) => {
|
|
27
20
|
// Se já é rgba, extrai os valores RGB e aplica nova opacidade
|
|
@@ -68,6 +61,14 @@ const BackdropBlur = React.forwardRef(({ isOpen, className, blurIntensity = 10,
|
|
|
68
61
|
closed: convertToRgba(backgroundColor, 0),
|
|
69
62
|
};
|
|
70
63
|
}, [backgroundColor, opacity]);
|
|
64
|
+
if (disabled) {
|
|
65
|
+
return (_jsx("div", { ref: ref, className: cn("fixed inset-0 z-40", className), style: {
|
|
66
|
+
backgroundColor: `${backgroundColor}${Math.round(opacity * 255)
|
|
67
|
+
.toString(16)
|
|
68
|
+
.padStart(2, "0")}`,
|
|
69
|
+
backdropFilter: isOpen ? `blur(${blurIntensity}px)` : "blur(0px)",
|
|
70
|
+
} }));
|
|
71
|
+
}
|
|
71
72
|
return (_jsx(motion.div, { ref: ref, initial: false, animate: isOpen
|
|
72
73
|
? {
|
|
73
74
|
backdropFilter: `blur(${blurIntensity}px)`,
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EncryptedText Component - Flowtomic UI
|
|
3
|
+
*
|
|
4
|
+
* Componente de texto que revela o texto gradualmente com efeito de texto criptografado/gibberish.
|
|
5
|
+
* Baseado em Aceternity UI - https://ui.aceternity.com/components/encrypted-text
|
|
6
|
+
* Usa motion/react para detecção de viewport e animações suaves
|
|
7
|
+
*/
|
|
8
|
+
import type React from "react";
|
|
9
|
+
export interface EncryptedTextProps {
|
|
10
|
+
/**
|
|
11
|
+
* O texto a ser criptografado e revelado
|
|
12
|
+
*/
|
|
13
|
+
text: string;
|
|
14
|
+
/**
|
|
15
|
+
* Classe CSS adicional
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Tempo em milissegundos entre revelar cada caractere real subsequente.
|
|
20
|
+
* Menor é mais rápido. Padrão: 50ms por caractere.
|
|
21
|
+
* @default 50
|
|
22
|
+
*/
|
|
23
|
+
revealDelayMs?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Conjunto de caracteres customizado para usar no efeito gibberish.
|
|
26
|
+
* @default "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-={}[];:,.<>/?"
|
|
27
|
+
*/
|
|
28
|
+
charset?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Tempo em milissegundos entre flips de gibberish para caracteres não revelados.
|
|
31
|
+
* Menor é mais jittery. Padrão: 50ms.
|
|
32
|
+
* @default 50
|
|
33
|
+
*/
|
|
34
|
+
flipDelayMs?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Classe CSS para estilizar caracteres criptografados/scrambled
|
|
37
|
+
*/
|
|
38
|
+
encryptedClassName?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Classe CSS para estilizar caracteres revelados
|
|
41
|
+
*/
|
|
42
|
+
revealedClassName?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* EncryptedText - Componente de texto com efeito de revelação gradual
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <EncryptedText
|
|
50
|
+
* text="Texto secreto"
|
|
51
|
+
* revealDelayMs={30}
|
|
52
|
+
* flipDelayMs={50}
|
|
53
|
+
* />
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare const EncryptedText: React.FC<EncryptedTextProps>;
|
|
57
|
+
//# sourceMappingURL=encrypted-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encrypted-text.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/animation/encrypted-text/encrypted-text.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAoBD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgGtD,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EncryptedText Component - Flowtomic UI
|
|
3
|
+
*
|
|
4
|
+
* Componente de texto que revela o texto gradualmente com efeito de texto criptografado/gibberish.
|
|
5
|
+
* Baseado em Aceternity UI - https://ui.aceternity.com/components/encrypted-text
|
|
6
|
+
* Usa motion/react para detecção de viewport e animações suaves
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
import { motion, useInView } from "motion/react";
|
|
11
|
+
import { useEffect, useRef, useState } from "react";
|
|
12
|
+
import { cn } from "@/lib/utils";
|
|
13
|
+
const DEFAULT_CHARSET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-={}[];:,.<>/?";
|
|
14
|
+
function generateRandomCharacter(charset) {
|
|
15
|
+
const index = Math.floor(Math.random() * charset.length);
|
|
16
|
+
return charset.charAt(index);
|
|
17
|
+
}
|
|
18
|
+
function generateGibberishPreservingSpaces(original, charset) {
|
|
19
|
+
if (!original)
|
|
20
|
+
return "";
|
|
21
|
+
let result = "";
|
|
22
|
+
for (let i = 0; i < original.length; i += 1) {
|
|
23
|
+
const ch = original[i];
|
|
24
|
+
result += ch === " " ? " " : generateRandomCharacter(charset);
|
|
25
|
+
}
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* EncryptedText - Componente de texto com efeito de revelação gradual
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <EncryptedText
|
|
34
|
+
* text="Texto secreto"
|
|
35
|
+
* revealDelayMs={30}
|
|
36
|
+
* flipDelayMs={50}
|
|
37
|
+
* />
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export const EncryptedText = ({ text, className, revealDelayMs = 50, charset = DEFAULT_CHARSET, flipDelayMs = 50, encryptedClassName, revealedClassName, }) => {
|
|
41
|
+
const ref = useRef(null);
|
|
42
|
+
const isInView = useInView(ref, { once: true });
|
|
43
|
+
const [revealCount, setRevealCount] = useState(0);
|
|
44
|
+
const animationFrameRef = useRef(null);
|
|
45
|
+
const startTimeRef = useRef(0);
|
|
46
|
+
const lastFlipTimeRef = useRef(0);
|
|
47
|
+
const scrambleCharsRef = useRef(text ? generateGibberishPreservingSpaces(text, charset).split("") : []);
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (!isInView)
|
|
50
|
+
return;
|
|
51
|
+
// Reset state for a fresh animation whenever dependencies change
|
|
52
|
+
const initial = text ? generateGibberishPreservingSpaces(text, charset) : "";
|
|
53
|
+
scrambleCharsRef.current = initial.split("");
|
|
54
|
+
startTimeRef.current = performance.now();
|
|
55
|
+
lastFlipTimeRef.current = startTimeRef.current;
|
|
56
|
+
setRevealCount(0);
|
|
57
|
+
let isCancelled = false;
|
|
58
|
+
const update = (now) => {
|
|
59
|
+
if (isCancelled)
|
|
60
|
+
return;
|
|
61
|
+
const elapsedMs = now - startTimeRef.current;
|
|
62
|
+
const totalLength = text.length;
|
|
63
|
+
const currentRevealCount = Math.min(totalLength, Math.floor(elapsedMs / Math.max(1, revealDelayMs)));
|
|
64
|
+
setRevealCount(currentRevealCount);
|
|
65
|
+
if (currentRevealCount >= totalLength) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
// Re-randomize unrevealed scramble characters on an interval
|
|
69
|
+
const timeSinceLastFlip = now - lastFlipTimeRef.current;
|
|
70
|
+
if (timeSinceLastFlip >= Math.max(0, flipDelayMs)) {
|
|
71
|
+
for (let index = 0; index < totalLength; index += 1) {
|
|
72
|
+
if (index >= currentRevealCount) {
|
|
73
|
+
if (text[index] !== " ") {
|
|
74
|
+
scrambleCharsRef.current[index] = generateRandomCharacter(charset);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
scrambleCharsRef.current[index] = " ";
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
lastFlipTimeRef.current = now;
|
|
82
|
+
}
|
|
83
|
+
animationFrameRef.current = requestAnimationFrame(update);
|
|
84
|
+
};
|
|
85
|
+
animationFrameRef.current = requestAnimationFrame(update);
|
|
86
|
+
return () => {
|
|
87
|
+
isCancelled = true;
|
|
88
|
+
if (animationFrameRef.current !== null) {
|
|
89
|
+
cancelAnimationFrame(animationFrameRef.current);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}, [isInView, text, revealDelayMs, charset, flipDelayMs]);
|
|
93
|
+
if (!text)
|
|
94
|
+
return null;
|
|
95
|
+
return (_jsx(motion.span, { ref: ref, className: cn(className), "aria-label": text, role: "text", children: text.split("").map((char, index) => {
|
|
96
|
+
const isRevealed = index < revealCount;
|
|
97
|
+
const displayChar = isRevealed
|
|
98
|
+
? char
|
|
99
|
+
: char === " "
|
|
100
|
+
? " "
|
|
101
|
+
: (scrambleCharsRef.current[index] ?? generateRandomCharacter(charset));
|
|
102
|
+
return (_jsx("span", { className: cn(isRevealed ? revealedClassName : encryptedClassName), children: displayChar }, index));
|
|
103
|
+
}) }));
|
|
104
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/animation/encrypted-text/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EncryptedText } from "./encrypted-text";
|
|
@@ -6,6 +6,8 @@ export type { Animated3DProps } from "./animated-3d";
|
|
|
6
6
|
export { Animated3D } from "./animated-3d";
|
|
7
7
|
export type { BackdropBlurProps } from "./backdrop-blur";
|
|
8
8
|
export { BackdropBlur } from "./backdrop-blur";
|
|
9
|
+
export type { EncryptedTextProps } from "./encrypted-text";
|
|
10
|
+
export { EncryptedText } from "./encrypted-text";
|
|
9
11
|
export type { LoaderProps } from "./loader";
|
|
10
12
|
export { Loader } from "./loader";
|
|
11
13
|
export type { ProgressProps } from "./progress";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/animation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/animation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { Animated3D } from "./animated-3d";
|
|
6
6
|
export { BackdropBlur } from "./backdrop-blur";
|
|
7
|
+
export { EncryptedText } from "./encrypted-text";
|
|
7
8
|
export { Loader } from "./loader";
|
|
8
9
|
export { Progress } from "./progress";
|
|
9
10
|
export { Shimmer } from "./shimmer";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sliding-number.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/animation/sliding-number/sliding-number.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAItB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqF/B,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;IACtE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B;AAED,iBAAS,aAAa,CAAC,EACrB,GAAG,EACH,MAAM,EACN,SAAS,EACT,MAAc,EACd,YAAoB,EACpB,UAAiB,EACjB,QAAgB,EAChB,gBAAsB,EACtB,aAAiB,EACjB,UAIC,EACD,GAAG,KAAK,EACT,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"sliding-number.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/animation/sliding-number/sliding-number.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAItB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqF/B,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;IACtE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B;AAED,iBAAS,aAAa,CAAC,EACrB,GAAG,EACH,MAAM,EACN,SAAS,EACT,MAAc,EACd,YAAoB,EACpB,UAAiB,EACjB,QAAgB,EAChB,gBAAsB,EACtB,aAAiB,EACjB,UAIC,EACD,GAAG,KAAK,EACT,EAAE,kBAAkB,2CA+GpB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -45,7 +45,12 @@ function SlidingNumber({ ref, number, className, inView = false, inViewMargin =
|
|
|
45
45
|
mass: 0.4,
|
|
46
46
|
}, ...props }) {
|
|
47
47
|
const localRef = React.useRef(null);
|
|
48
|
-
React.useImperativeHandle(ref, () =>
|
|
48
|
+
React.useImperativeHandle(ref, () => {
|
|
49
|
+
if (!localRef.current) {
|
|
50
|
+
throw new Error("SlidingNumber ref is not available");
|
|
51
|
+
}
|
|
52
|
+
return localRef.current;
|
|
53
|
+
});
|
|
49
54
|
const inViewResult = useInView(localRef, {
|
|
50
55
|
once: inViewOnce,
|
|
51
56
|
margin: inViewMargin,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/data-display/carousel/carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,EAAE,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAClD,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACjE,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AACvD,MAAM,MAAM,cAAc,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAEtD,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAChE,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;CACrC;AAED,KAAK,oBAAoB,GAAG;IAC1B,WAAW,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,GAAG,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;CACxB,GAAG,aAAa,CAAC;AAIlB,wBAAgB,WAAW,yBAQ1B;AAED,iBAAS,QAAQ,CAAC,EAChB,WAA0B,EAC1B,IAAI,EACJ,MAAM,EACN,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/data-display/carousel/carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,EAAE,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC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AAE,oBAAoB,2CAWrE;kBAXQ,eAAe;;;AAexB,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;CAAG;AAEzE,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAiB/D;kBAjBQ,YAAY;;;AAqBrB,MAAM,WAAW,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC;CAAG;AAErF,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,OAAmB,EACnB,IAAa,EACb,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAuBvB;kBA5BQ,gBAAgB;;;AAgCzB,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC;CAAG;AAEjF,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,OAAmB,EACnB,IAAa,EACb,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAuBnB;kBA5BQ,YAAY;;;AAgCrB,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -75,7 +75,9 @@ function CarouselContent({ className, ...props }) {
|
|
|
75
75
|
CarouselContent.displayName = "CarouselContent";
|
|
76
76
|
function CarouselItem({ className, ...props }) {
|
|
77
77
|
const { orientation } = useCarousel();
|
|
78
|
-
return (
|
|
78
|
+
return (
|
|
79
|
+
// biome-ignore lint/a11y/useSemanticElements: Usar div para manter flexibilidade de estilização
|
|
80
|
+
_jsx("div", { role: "group", "aria-roledescription": "slide", "data-slot": "carousel-item", className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className), ...props }));
|
|
79
81
|
}
|
|
80
82
|
CarouselItem.displayName = "CarouselItem";
|
|
81
83
|
function CarouselPrevious({ className, variant = "outline", size = "icon", ...props }) {
|
|
@@ -1 +1 @@
|
|
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Ac,EACd,SAAS,EACT,KAAK,EACL,OAAO,EACP,QAAQ,GACT,EAAE,wBAAwB,kDA+H1B;kBA7IQ,mBAAmB;;;AAiJ5B,QAAA,MAAM,WAAW,iCAA2B,CAAC;AAE7C,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;IACH,aAAa,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,QAAgB,EAChB,OAAO,EACP,aAAwB,EACxB,OAAO,GACR,EAAE,uBAAuB,kDA4CzB;kBAlDQ,kBAAkB;;;AAgF3B,OAAO,EACL,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,mBAAmB,GACpB,CAAC"}
|
|
@@ -23,7 +23,9 @@ const ChartStyle = ({ id, config }) => {
|
|
|
23
23
|
if (!colorConfig.length) {
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
|
-
return (_jsx("style", {
|
|
26
|
+
return (_jsx("style", {
|
|
27
|
+
// biome-ignore lint/security/noDangerouslySetInnerHtml: Necessário para injetar estilos CSS dinâmicos de temas
|
|
28
|
+
dangerouslySetInnerHTML: {
|
|
27
29
|
__html: Object.entries(THEMES)
|
|
28
30
|
.map(([theme, prefix]) => `
|
|
29
31
|
${prefix} [data-chart=${id}] {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import { type VariantProps } from "class-variance-authority";
|
|
15
15
|
import * as React from "react";
|
|
16
16
|
declare const alertVariants: (props?: ({
|
|
17
|
-
variant?: "default" | "
|
|
17
|
+
variant?: "default" | "success" | "destructive" | "warning" | "info" | null | undefined;
|
|
18
18
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
19
19
|
export interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
|
|
20
20
|
}
|
|
@@ -19,7 +19,7 @@ export type AlertDialogTriggerProps = React.ComponentPropsWithoutRef<typeof Aler
|
|
|
19
19
|
* Variantes de animação para AlertDialogContent
|
|
20
20
|
*/
|
|
21
21
|
declare const alertDialogContentVariants: (props?: ({
|
|
22
|
-
animation?: "
|
|
22
|
+
animation?: "center" | "bottom" | "left" | "right" | "top" | "depth" | "3d" | null | undefined;
|
|
23
23
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
24
24
|
export type AlertDialogContentProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> & VariantProps<typeof alertDialogContentVariants> & {
|
|
25
25
|
/**
|
|
@@ -61,7 +61,7 @@ declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDial
|
|
|
61
61
|
* Suporta animações 3D quando animation="3d"
|
|
62
62
|
*/
|
|
63
63
|
declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & VariantProps<(props?: ({
|
|
64
|
-
animation?: "
|
|
64
|
+
animation?: "center" | "bottom" | "left" | "right" | "top" | "depth" | "3d" | null | undefined;
|
|
65
65
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
66
66
|
/**
|
|
67
67
|
* Habilita backdrop blur (apenas para animation="3d")
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type { TooltipContentProps, TooltipProps, TooltipTriggerProps, } from "./tooltip";
|
|
2
|
-
export { Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, } from "./tooltip";
|
|
2
|
+
export { Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, TooltipWithMouseFollow, } from "./tooltip";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/feedback/tooltip/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,OAAO,EACP,cAAc,EACd,aAAa,EACb,eAAe,EACf,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/feedback/tooltip/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,OAAO,EACP,cAAc,EACd,aAAa,EACb,eAAe,EACf,cAAc,EACd,sBAAsB,GACvB,MAAM,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, } from "./tooltip";
|
|
1
|
+
export { Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, TooltipWithMouseFollow, } from "./tooltip";
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tooltip Component - Flowtomic UI
|
|
3
3
|
*
|
|
4
|
-
* Componente Tooltip baseado em Radix UI
|
|
4
|
+
* Componente Tooltip baseado em Radix UI (padrão) ou React Aria (followMouse)
|
|
5
|
+
* com seguimento do mouse e posicionamento inteligente
|
|
6
|
+
* Baseado no Aceternity UI Tooltip Card para animações
|
|
5
7
|
*/
|
|
6
8
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
7
9
|
import * as React from "react";
|
|
8
10
|
export type TooltipProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>;
|
|
9
11
|
export type TooltipTriggerProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>;
|
|
10
|
-
export type TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content
|
|
12
|
+
export type TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {
|
|
13
|
+
/**
|
|
14
|
+
* Se o tooltip deve seguir o mouse
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
followMouse?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Largura mínima do tooltip quando seguir o mouse
|
|
20
|
+
* @default 240 (15rem)
|
|
21
|
+
*/
|
|
22
|
+
minWidth?: number;
|
|
23
|
+
};
|
|
11
24
|
/**
|
|
12
25
|
* TooltipProvider - Provider do tooltip
|
|
13
26
|
*/
|
|
@@ -19,14 +32,38 @@ declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
|
19
32
|
/**
|
|
20
33
|
* TooltipTrigger - Trigger do tooltip
|
|
21
34
|
*/
|
|
22
|
-
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement
|
|
35
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
36
|
+
"data-follow-mouse"?: boolean;
|
|
37
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
23
38
|
/**
|
|
24
39
|
* TooltipPortal - Portal do tooltip
|
|
25
40
|
*/
|
|
26
41
|
declare const TooltipPortal: React.FC<TooltipPrimitive.TooltipPortalProps>;
|
|
27
42
|
/**
|
|
28
|
-
* TooltipContent - Conteúdo do tooltip
|
|
43
|
+
* TooltipContent - Conteúdo do tooltip com suporte a seguimento do mouse
|
|
29
44
|
*/
|
|
30
|
-
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> &
|
|
45
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
46
|
+
/**
|
|
47
|
+
* Se o tooltip deve seguir o mouse
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
followMouse?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Largura mínima do tooltip quando seguir o mouse
|
|
53
|
+
* @default 240 (15rem)
|
|
54
|
+
*/
|
|
55
|
+
minWidth?: number;
|
|
56
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
+
/**
|
|
58
|
+
* TooltipWithMouseFollow - Wrapper completo para tooltip com seguimento do mouse
|
|
59
|
+
* Implementação baseada no Aceternity UI, sem Radix
|
|
60
|
+
*/
|
|
61
|
+
export declare function TooltipWithMouseFollow({ content, children, containerClassName, className, minWidth, }: {
|
|
62
|
+
content: string | React.ReactNode;
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
containerClassName?: string;
|
|
65
|
+
className?: string;
|
|
66
|
+
minWidth?: number;
|
|
67
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
31
68
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, TooltipPortal };
|
|
32
69
|
//# sourceMappingURL=tooltip.d.ts.map
|