@gyramais/gyra-design 0.2.34 → 0.2.35
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/components/SyncChip/SyncChip.d.ts +9 -1
- package/dist/emails/balance-sheet-finalized/components/SyncChip/SyncChip.d.ts +9 -1
- package/dist/emails/balance-sheet-finalized/email-layout.d.ts +46 -0
- package/dist/emails/balance-sheet-finalized/email-layout.js +180 -0
- package/dist/emails/email/components/SyncChip/SyncChip.d.ts +9 -1
- package/dist/index.css +52 -0
- package/package.json +2 -2
- package/dist/components/Chart/index.js +0 -29
- package/dist/components/Chart/index.js.map +0 -1
- package/dist/components/ChatWidget/index.js +0 -45
- package/dist/components/ChatWidget/index.js.map +0 -1
- package/dist/components/Checkbox/index.js +0 -45
- package/dist/components/Checkbox/index.js.map +0 -1
- package/dist/components/Col/index.js +0 -7
- package/dist/components/Col/index.js.map +0 -1
- package/dist/components/Collapse/index.js +0 -45
- package/dist/components/Collapse/index.js.map +0 -1
- package/dist/components/ContextMenu/index.js +0 -7
- package/dist/components/ContextMenu/index.js.map +0 -1
- package/dist/components/DistributionBar/index.js +0 -7
- package/dist/components/DistributionBar/index.js.map +0 -1
- package/dist/components/Divider/index.js +0 -7
- package/dist/components/Divider/index.js.map +0 -1
- package/dist/components/Drawer/index.js +0 -45
- package/dist/components/Drawer/index.js.map +0 -1
- package/dist/components/DropdownMenu/index.js +0 -7
- package/dist/components/DropdownMenu/index.js.map +0 -1
- package/dist/components/Email/index.js +0 -2
- package/dist/components/Email/index.js.map +0 -1
- package/dist/components/Empty/index.js +0 -45
- package/dist/components/Empty/index.js.map +0 -1
- package/dist/components/Filter/index.js +0 -50
- package/dist/components/Filter/index.js.map +0 -1
- package/dist/components/FloatingCard/index.js +0 -45
- package/dist/components/FloatingCard/index.js.map +0 -1
- package/dist/components/Form/index.js +0 -2
- package/dist/components/Form/index.js.map +0 -1
- package/dist/components/Gauge/index.js +0 -7
- package/dist/components/Gauge/index.js.map +0 -1
- package/dist/components/HoverCard/index.js +0 -7
- package/dist/components/HoverCard/index.js.map +0 -1
- package/dist/components/Icon/index.js +0 -7
- package/dist/components/Icon/index.js.map +0 -1
- package/dist/components/IconDisplay/index.js +0 -7
- package/dist/components/IconDisplay/index.js.map +0 -1
- package/dist/components/Information/index.js +0 -7
- package/dist/components/Information/index.js.map +0 -1
- package/dist/components/Input/index.js +0 -25
- package/dist/components/Input/index.js.map +0 -1
- package/dist/components/Label/index.js +0 -2
- package/dist/components/Label/index.js.map +0 -1
- package/dist/components/Layout/index.js +0 -7
- package/dist/components/Layout/index.js.map +0 -1
- package/dist/components/List/index.js +0 -45
- package/dist/components/List/index.js.map +0 -1
- package/dist/components/ListingPage/ListingPage.d.ts +0 -21
- package/dist/components/ListingPage/index.d.ts +0 -1
- package/dist/components/ListingPage/index.js +0 -7
- package/dist/components/ListingPage/index.js.map +0 -1
- package/dist/components/Loading/index.js +0 -7
- package/dist/components/Loading/index.js.map +0 -1
- package/dist/components/Logo/index.js +0 -7
- package/dist/components/Logo/index.js.map +0 -1
- package/dist/components/Menubar/index.js +0 -7
- package/dist/components/Menubar/index.js.map +0 -1
- package/dist/components/Modal/index.js +0 -63
- package/dist/components/Modal/index.js.map +0 -1
- package/dist/components/MultiSelectPicker/index.js +0 -45
- package/dist/components/MultiSelectPicker/index.js.map +0 -1
- package/dist/components/OperatorPicker/index.js +0 -45
- package/dist/components/OperatorPicker/index.js.map +0 -1
- package/dist/components/PickerPopover/index.js +0 -45
- package/dist/components/PickerPopover/index.js.map +0 -1
- package/dist/components/Popover/index.js +0 -7
- package/dist/components/Popover/index.js.map +0 -1
- package/dist/components/ProcessingChip/index.js +0 -7
- package/dist/components/ProcessingChip/index.js.map +0 -1
- package/dist/components/Progress/index.js +0 -7
- package/dist/components/Progress/index.js.map +0 -1
- package/dist/components/RadioGroup/index.js +0 -7
- package/dist/components/RadioGroup/index.js.map +0 -1
- package/dist/components/RichInput/index.js +0 -12
- package/dist/components/RichInput/index.js.map +0 -1
- package/dist/components/Row/index.js +0 -7
- package/dist/components/Row/index.js.map +0 -1
- package/dist/components/RuleSearchPicker/index.js +0 -45
- package/dist/components/RuleSearchPicker/index.js.map +0 -1
- package/dist/components/ScoreBar/index.js +0 -7
- package/dist/components/ScoreBar/index.js.map +0 -1
- package/dist/components/SegmentedPicker/index.js +0 -45
- package/dist/components/SegmentedPicker/index.js.map +0 -1
- package/dist/components/SegmentedToggle/index.js +0 -7
- package/dist/components/SegmentedToggle/index.js.map +0 -1
- package/dist/components/Select/index.js +0 -45
- package/dist/components/Select/index.js.map +0 -1
- package/dist/components/SelectTree/index.js +0 -50
- package/dist/components/SelectTree/index.js.map +0 -1
- package/dist/components/Selector/index.js +0 -7
- package/dist/components/Selector/index.js.map +0 -1
- package/dist/components/StatusTag/index.js +0 -7
- package/dist/components/StatusTag/index.js.map +0 -1
- package/dist/components/Stepper/index.js +0 -7
- package/dist/components/Stepper/index.js.map +0 -1
- package/dist/components/Switch/index.js +0 -7
- package/dist/components/Switch/index.js.map +0 -1
- package/dist/components/SyncChip/index.js +0 -45
- package/dist/components/SyncChip/index.js.map +0 -1
- package/dist/components/Table/index.js +0 -45
- package/dist/components/Table/index.js.map +0 -1
- package/dist/components/Tabs/index.js +0 -7
- package/dist/components/Tabs/index.js.map +0 -1
- package/dist/components/Tag/index.js +0 -7
- package/dist/components/Tag/index.js.map +0 -1
- package/dist/components/Toast/index.js +0 -2
- package/dist/components/Toast/index.js.map +0 -1
- package/dist/components/Tooltip/index.js +0 -7
- package/dist/components/Tooltip/index.js.map +0 -1
- package/dist/components/TourGuide/index.js +0 -7
- package/dist/components/TourGuide/index.js.map +0 -1
- package/dist/components/Waypoint/index.js +0 -24
- package/dist/components/Waypoint/index.js.map +0 -1
- package/dist/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
- package/dist/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
- package/dist/fonts/IBMPlexMono-500-latin.woff2 +0 -0
- package/dist/fonts/Inter-Variable-latin-ext.woff2 +0 -0
- package/dist/fonts/Inter-Variable-latin.woff2 +0 -0
- package/dist/fonts/Lexend-Variable-latin-ext.woff2 +0 -0
- package/dist/fonts/Lexend-Variable-latin.woff2 +0 -0
|
@@ -11,7 +11,15 @@ type SyncChipProps = {
|
|
|
11
11
|
errorTooltip?: string;
|
|
12
12
|
/** Optional override for the tooltip when verified is false. */
|
|
13
13
|
notVerifiedTooltip?: string;
|
|
14
|
+
/** When in error state and provided, renders a compact retry action to
|
|
15
|
+
the LEFT of the chip. Keeps the retry paired with its sync-status,
|
|
16
|
+
consistently across every usage. */
|
|
17
|
+
onRetry?: () => void;
|
|
18
|
+
/** Label for the retry action. */
|
|
19
|
+
retryLabel?: string;
|
|
20
|
+
/** Disables the retry action (e.g. while a retry is already in flight). */
|
|
21
|
+
retryDisabled?: boolean;
|
|
14
22
|
};
|
|
15
|
-
declare const SyncChip: ({ id, className, loading, date, error, verified, errorTooltip, notVerifiedTooltip, }: SyncChipProps) => React.JSX.Element;
|
|
23
|
+
declare const SyncChip: ({ id, className, loading, date, error, verified, errorTooltip, notVerifiedTooltip, onRetry, retryLabel, retryDisabled, }: SyncChipProps) => React.JSX.Element;
|
|
16
24
|
export { SyncChip };
|
|
17
25
|
export type { SyncChipProps };
|
|
@@ -11,7 +11,15 @@ type SyncChipProps = {
|
|
|
11
11
|
errorTooltip?: string;
|
|
12
12
|
/** Optional override for the tooltip when verified is false. */
|
|
13
13
|
notVerifiedTooltip?: string;
|
|
14
|
+
/** When in error state and provided, renders a compact retry action to
|
|
15
|
+
the LEFT of the chip. Keeps the retry paired with its sync-status,
|
|
16
|
+
consistently across every usage. */
|
|
17
|
+
onRetry?: () => void;
|
|
18
|
+
/** Label for the retry action. */
|
|
19
|
+
retryLabel?: string;
|
|
20
|
+
/** Disables the retry action (e.g. while a retry is already in flight). */
|
|
21
|
+
retryDisabled?: boolean;
|
|
14
22
|
};
|
|
15
|
-
declare const SyncChip: ({ id, className, loading, date, error, verified, errorTooltip, notVerifiedTooltip, }: SyncChipProps) => React.JSX.Element;
|
|
23
|
+
declare const SyncChip: ({ id, className, loading, date, error, verified, errorTooltip, notVerifiedTooltip, onRetry, retryLabel, retryDisabled, }: SyncChipProps) => React.JSX.Element;
|
|
16
24
|
export { SyncChip };
|
|
17
25
|
export type { SyncChipProps };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout base de email no padrao do design system Gyra+ Toolbox
|
|
3
|
+
* (claude design — gyra-toolbox-design-system). Tokens: azul #1256FF
|
|
4
|
+
* (acao/primary), teal #1FB58A (accent), roxo #7C4EFF (IA/parecer),
|
|
5
|
+
* neutrals Apple-gray, fonte Inter.
|
|
6
|
+
*
|
|
7
|
+
* Reutilizavel: cada email passa titulo, paragrafos, destaques (chips),
|
|
8
|
+
* um bloco opcional "Parecer de IA" (faixa roxa) e botoes — o HTML
|
|
9
|
+
* completo (logo, card, tipografia, footer) e' montado aqui.
|
|
10
|
+
*
|
|
11
|
+
* Email-safe: tabelas + inline-style (clients ignoram <style> externo,
|
|
12
|
+
* flexbox e Material Symbols). Gradientes tem fallback solido.
|
|
13
|
+
*/
|
|
14
|
+
export type EmailButton = {
|
|
15
|
+
label: string;
|
|
16
|
+
url: string;
|
|
17
|
+
variant?: 'primary' | 'secondary';
|
|
18
|
+
};
|
|
19
|
+
export type EmailHighlight = {
|
|
20
|
+
label: string;
|
|
21
|
+
value: string;
|
|
22
|
+
/** cor do valor (ex: risco). Default: tinta padrao. */
|
|
23
|
+
color?: string;
|
|
24
|
+
};
|
|
25
|
+
export type AiParecerTone = 'ok' | 'warn' | 'danger' | 'info';
|
|
26
|
+
export type EmailAiParecer = {
|
|
27
|
+
/** chip de veredito (ex: "Médio", "Consistente"). */
|
|
28
|
+
verdict?: string;
|
|
29
|
+
verdictTone?: AiParecerTone;
|
|
30
|
+
/** corpo do parecer. */
|
|
31
|
+
text: string;
|
|
32
|
+
/** rodape (ex: "GYRA+IA · Confiança 96%"). */
|
|
33
|
+
footer?: string;
|
|
34
|
+
};
|
|
35
|
+
export type EmailLayoutInput = {
|
|
36
|
+
preheader?: string;
|
|
37
|
+
greeting?: string;
|
|
38
|
+
title: string;
|
|
39
|
+
paragraphs?: string[];
|
|
40
|
+
highlights?: EmailHighlight[];
|
|
41
|
+
/** Faixa "Parecer de IA" (gradiente roxo→azul). */
|
|
42
|
+
aiParecer?: EmailAiParecer;
|
|
43
|
+
buttons?: EmailButton[];
|
|
44
|
+
footerNote?: string;
|
|
45
|
+
};
|
|
46
|
+
export declare function buildEmail(input: EmailLayoutInput): string;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Layout base de email no padrao do design system Gyra+ Toolbox
|
|
4
|
+
* (claude design — gyra-toolbox-design-system). Tokens: azul #1256FF
|
|
5
|
+
* (acao/primary), teal #1FB58A (accent), roxo #7C4EFF (IA/parecer),
|
|
6
|
+
* neutrals Apple-gray, fonte Inter.
|
|
7
|
+
*
|
|
8
|
+
* Reutilizavel: cada email passa titulo, paragrafos, destaques (chips),
|
|
9
|
+
* um bloco opcional "Parecer de IA" (faixa roxa) e botoes — o HTML
|
|
10
|
+
* completo (logo, card, tipografia, footer) e' montado aqui.
|
|
11
|
+
*
|
|
12
|
+
* Email-safe: tabelas + inline-style (clients ignoram <style> externo,
|
|
13
|
+
* flexbox e Material Symbols). Gradientes tem fallback solido.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.buildEmail = buildEmail;
|
|
17
|
+
const C = {
|
|
18
|
+
blue: '#1256FF',
|
|
19
|
+
teal: '#1FB58A',
|
|
20
|
+
aiPurple: '#7C4EFF',
|
|
21
|
+
aiPurpleText: '#6635E0',
|
|
22
|
+
bg: '#F5F5F7',
|
|
23
|
+
card: '#FFFFFF',
|
|
24
|
+
fg1: '#1D1D1F',
|
|
25
|
+
fg2: '#636366',
|
|
26
|
+
fg3: '#8E8E93',
|
|
27
|
+
border: '#D2D2D7',
|
|
28
|
+
borderSubtle: '#E8E8ED',
|
|
29
|
+
aiCardBg: '#F6F4FF', // flatten do gradiente roxo (fallback Outlook)
|
|
30
|
+
aiBorder: 'rgba(124,78,255,0.22)',
|
|
31
|
+
};
|
|
32
|
+
const VERDICT = {
|
|
33
|
+
ok: { bg: '#E8F9ED', color: '#1A7D37' },
|
|
34
|
+
warn: { bg: '#FFF4E0', color: '#946200' },
|
|
35
|
+
danger: { bg: '#FFEDEC', color: '#C93430' },
|
|
36
|
+
info: { bg: '#EBF4FF', color: '#0055D4' },
|
|
37
|
+
};
|
|
38
|
+
const FONT = "'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif";
|
|
39
|
+
const LOGO_URL = 'https://gyra-file-prod.s3.us-west-2.amazonaws.com/assets/gyra-logo-color.png';
|
|
40
|
+
const esc = (s) => String(s ?? '')
|
|
41
|
+
.replace(/&/g, '&')
|
|
42
|
+
.replace(/</g, '<')
|
|
43
|
+
.replace(/>/g, '>')
|
|
44
|
+
.replace(/"/g, '"')
|
|
45
|
+
.replace(/'/g, ''');
|
|
46
|
+
/**
|
|
47
|
+
* So' permite http(s). Bloqueia schemes perigosos (javascript:, data:)
|
|
48
|
+
* que poderiam virar href executavel. URL invalida vira '#'.
|
|
49
|
+
*/
|
|
50
|
+
function safeUrl(url) {
|
|
51
|
+
try {
|
|
52
|
+
const u = new URL(String(url));
|
|
53
|
+
return u.protocol === 'http:' || u.protocol === 'https:' ? u.href : '#';
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
return '#';
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function renderButton(btn) {
|
|
60
|
+
const isPrimary = (btn.variant ?? 'primary') === 'primary';
|
|
61
|
+
const bg = isPrimary ? C.blue : C.card;
|
|
62
|
+
const color = isPrimary ? '#FFFFFF' : C.blue;
|
|
63
|
+
const border = isPrimary ? C.blue : C.border;
|
|
64
|
+
return `
|
|
65
|
+
<table role="presentation" cellpadding="0" cellspacing="0" style="margin:8px 8px 0 0;display:inline-block;">
|
|
66
|
+
<tr>
|
|
67
|
+
<td style="border-radius:10px;background:${bg};border:1px solid ${border};">
|
|
68
|
+
<a href="${esc(safeUrl(btn.url))}" target="_blank"
|
|
69
|
+
style="display:inline-block;padding:12px 22px;font-family:${FONT};font-size:14px;font-weight:600;color:${color};text-decoration:none;border-radius:10px;">
|
|
70
|
+
${esc(btn.label)}
|
|
71
|
+
</a>
|
|
72
|
+
</td>
|
|
73
|
+
</tr>
|
|
74
|
+
</table>`;
|
|
75
|
+
}
|
|
76
|
+
function renderHighlight(h, widthPct) {
|
|
77
|
+
return `
|
|
78
|
+
<td width="${widthPct}%" style="padding:6px;" valign="top">
|
|
79
|
+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0"
|
|
80
|
+
style="background:#FAFAFA;border:1px solid ${C.borderSubtle};border-radius:12px;">
|
|
81
|
+
<tr><td style="padding:14px 16px;font-family:${FONT};">
|
|
82
|
+
<div style="font-size:12px;color:${C.fg2};margin-bottom:4px;">${esc(h.label)}</div>
|
|
83
|
+
<div style="font-size:22px;font-weight:700;color:${h.color || C.fg1};font-family:'Lexend',${FONT};">${esc(h.value)}</div>
|
|
84
|
+
</td></tr>
|
|
85
|
+
</table>
|
|
86
|
+
</td>`;
|
|
87
|
+
}
|
|
88
|
+
function renderAiParecer(p) {
|
|
89
|
+
const v = p.verdict
|
|
90
|
+
? (() => {
|
|
91
|
+
const t = VERDICT[p.verdictTone || 'info'];
|
|
92
|
+
// table/td (Outlook ignora padding/border-radius em <span>).
|
|
93
|
+
return `<table role="presentation" cellpadding="0" cellspacing="0" style="display:inline-block;"><tr>
|
|
94
|
+
<td style="background:${t.bg};border-radius:999px;padding:4px 10px;font-family:${FONT};font-size:11px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:${t.color};white-space:nowrap;">${esc(p.verdict)}</td></tr></table>`;
|
|
95
|
+
})()
|
|
96
|
+
: '';
|
|
97
|
+
return `
|
|
98
|
+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0"
|
|
99
|
+
style="margin:18px 0 4px;background:${C.aiCardBg};border:1px solid ${C.aiBorder};border-radius:12px;">
|
|
100
|
+
<tr><td style="padding:16px 18px;font-family:${FONT};">
|
|
101
|
+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0"><tr>
|
|
102
|
+
<td valign="middle" width="28">
|
|
103
|
+
<div style="width:22px;height:22px;border-radius:50%;background:${C.aiPurple};color:#fff;text-align:center;line-height:22px;font-size:13px;">✦</div>
|
|
104
|
+
</td>
|
|
105
|
+
<td valign="middle" style="padding-left:8px;">
|
|
106
|
+
<span style="font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:${C.aiPurpleText};">Parecer GYRA+IA</span>
|
|
107
|
+
</td>
|
|
108
|
+
<td valign="middle" align="right">${v}</td>
|
|
109
|
+
</tr></table>
|
|
110
|
+
<p style="margin:10px 0 0;font-size:14px;line-height:1.55;color:${C.fg2};">${esc(p.text)}</p>
|
|
111
|
+
${p.footer
|
|
112
|
+
? `<div style="margin-top:10px;padding-top:10px;border-top:1px dashed ${C.aiBorder};font-size:11px;color:${C.fg3};">${esc(p.footer)}</div>`
|
|
113
|
+
: ''}
|
|
114
|
+
</td></tr>
|
|
115
|
+
</table>`;
|
|
116
|
+
}
|
|
117
|
+
function buildEmail(input) {
|
|
118
|
+
const { preheader, greeting, title, paragraphs = [], highlights = [], aiParecer, buttons = [], footerNote, } = input;
|
|
119
|
+
const highlightWidth = highlights.length
|
|
120
|
+
? Math.floor(100 / highlights.length)
|
|
121
|
+
: 100;
|
|
122
|
+
const highlightsRow = highlights.length
|
|
123
|
+
? `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:8px 0 4px;"><tr>${highlights
|
|
124
|
+
.map((h) => renderHighlight(h, highlightWidth))
|
|
125
|
+
.join('')}</tr></table>`
|
|
126
|
+
: '';
|
|
127
|
+
const paragraphsHtml = paragraphs
|
|
128
|
+
.map((p) => `<p style="margin:0 0 14px;font-family:${FONT};font-size:15px;line-height:1.6;color:${C.fg2};">${esc(p)}</p>`)
|
|
129
|
+
.join('');
|
|
130
|
+
const buttonsHtml = buttons.length
|
|
131
|
+
? `<div style="margin-top:18px;">${buttons.map(renderButton).join('')}</div>`
|
|
132
|
+
: '';
|
|
133
|
+
return `<!DOCTYPE html>
|
|
134
|
+
<html lang="pt-BR">
|
|
135
|
+
<head>
|
|
136
|
+
<meta charset="utf-8" />
|
|
137
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
138
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
139
|
+
<title>${esc(title)}</title>
|
|
140
|
+
</head>
|
|
141
|
+
<body style="margin:0;padding:0;background:${C.bg};">
|
|
142
|
+
${preheader
|
|
143
|
+
? `<div style="display:none;max-height:0;overflow:hidden;opacity:0;">${esc(preheader)}</div>`
|
|
144
|
+
: ''}
|
|
145
|
+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background:${C.bg};padding:24px 0;">
|
|
146
|
+
<tr>
|
|
147
|
+
<td align="center">
|
|
148
|
+
<table role="presentation" width="600" cellpadding="0" cellspacing="0" style="width:600px;max-width:92%;">
|
|
149
|
+
<tr>
|
|
150
|
+
<td style="padding:8px 4px 20px;">
|
|
151
|
+
<img src="${LOGO_URL}" alt="GYRA+" height="30" style="height:30px;display:block;" />
|
|
152
|
+
</td>
|
|
153
|
+
</tr>
|
|
154
|
+
<tr>
|
|
155
|
+
<td style="background:${C.card};border:1px solid ${C.borderSubtle};border-radius:16px;padding:32px;">
|
|
156
|
+
${greeting
|
|
157
|
+
? `<p style="margin:0 0 6px;font-family:${FONT};font-size:14px;color:${C.fg2};">${esc(greeting)}</p>`
|
|
158
|
+
: ''}
|
|
159
|
+
<h1 style="margin:0 0 18px;font-family:'Lexend',${FONT};font-size:23px;line-height:1.3;color:${C.fg1};">${esc(title)}</h1>
|
|
160
|
+
${paragraphsHtml}
|
|
161
|
+
${highlightsRow}
|
|
162
|
+
${aiParecer ? renderAiParecer(aiParecer) : ''}
|
|
163
|
+
${buttonsHtml}
|
|
164
|
+
</td>
|
|
165
|
+
</tr>
|
|
166
|
+
<tr>
|
|
167
|
+
<td style="padding:20px 8px;font-family:${FONT};font-size:12px;line-height:1.5;color:${C.fg3};">
|
|
168
|
+
${footerNote
|
|
169
|
+
? `<p style="margin:0 0 8px;">${esc(footerNote)}</p>`
|
|
170
|
+
: ''}
|
|
171
|
+
<p style="margin:0;">GYRA+ • Esta é uma mensagem automática, não responda este email.</p>
|
|
172
|
+
</td>
|
|
173
|
+
</tr>
|
|
174
|
+
</table>
|
|
175
|
+
</td>
|
|
176
|
+
</tr>
|
|
177
|
+
</table>
|
|
178
|
+
</body>
|
|
179
|
+
</html>`;
|
|
180
|
+
}
|
|
@@ -11,7 +11,15 @@ type SyncChipProps = {
|
|
|
11
11
|
errorTooltip?: string;
|
|
12
12
|
/** Optional override for the tooltip when verified is false. */
|
|
13
13
|
notVerifiedTooltip?: string;
|
|
14
|
+
/** When in error state and provided, renders a compact retry action to
|
|
15
|
+
the LEFT of the chip. Keeps the retry paired with its sync-status,
|
|
16
|
+
consistently across every usage. */
|
|
17
|
+
onRetry?: () => void;
|
|
18
|
+
/** Label for the retry action. */
|
|
19
|
+
retryLabel?: string;
|
|
20
|
+
/** Disables the retry action (e.g. while a retry is already in flight). */
|
|
21
|
+
retryDisabled?: boolean;
|
|
14
22
|
};
|
|
15
|
-
declare const SyncChip: ({ id, className, loading, date, error, verified, errorTooltip, notVerifiedTooltip, }: SyncChipProps) => React.JSX.Element;
|
|
23
|
+
declare const SyncChip: ({ id, className, loading, date, error, verified, errorTooltip, notVerifiedTooltip, onRetry, retryLabel, retryDisabled, }: SyncChipProps) => React.JSX.Element;
|
|
16
24
|
export { SyncChip };
|
|
17
25
|
export type { SyncChipProps };
|
package/dist/index.css
CHANGED
|
@@ -10046,6 +10046,58 @@ h6 {
|
|
|
10046
10046
|
}
|
|
10047
10047
|
}
|
|
10048
10048
|
|
|
10049
|
+
/* Retry action paired with the chip — sits to the LEFT of the pill,
|
|
10050
|
+
styled as a matching pill-button, so the retry stays visually tied to
|
|
10051
|
+
the sync-status it refers to. */
|
|
10052
|
+
.gyramais-sync-chip-wrap {
|
|
10053
|
+
display: inline-flex;
|
|
10054
|
+
width: -moz-fit-content;
|
|
10055
|
+
width: fit-content;
|
|
10056
|
+
align-items: center;
|
|
10057
|
+
gap: 8px;
|
|
10058
|
+
}
|
|
10059
|
+
.gyramais-sync-chip-retry {
|
|
10060
|
+
display: inline-flex;
|
|
10061
|
+
height: 28px;
|
|
10062
|
+
width: 28px;
|
|
10063
|
+
flex-shrink: 0;
|
|
10064
|
+
cursor: pointer;
|
|
10065
|
+
align-items: center;
|
|
10066
|
+
justify-content: center;
|
|
10067
|
+
border-radius: 9999px;
|
|
10068
|
+
border-width: 1px;
|
|
10069
|
+
border-color: var(--color-border-secondary);
|
|
10070
|
+
background-color: var(--color-surface-secondary);
|
|
10071
|
+
padding: 0px;
|
|
10072
|
+
color: var(--color-text-secondary);
|
|
10073
|
+
transition: background 150ms ease, color 150ms ease,
|
|
10074
|
+
border-color 150ms ease;
|
|
10075
|
+
}
|
|
10076
|
+
.gyramais-sync-chip-retry:hover {
|
|
10077
|
+
border-color: rgba(255,59,48,0.18);
|
|
10078
|
+
background-color: rgba(255,59,48,0.08);
|
|
10079
|
+
color: var(--status-danger-text);
|
|
10080
|
+
}
|
|
10081
|
+
.gyramais-sync-chip-retry:disabled {
|
|
10082
|
+
cursor: default;
|
|
10083
|
+
border-color: rgba(255,59,48,0.18);
|
|
10084
|
+
color: var(--status-danger-text);
|
|
10085
|
+
}
|
|
10086
|
+
.gyramais-sync-chip-retry .gyramais-sync-chip-retry-icon {
|
|
10087
|
+
height: 16px;
|
|
10088
|
+
width: 16px;
|
|
10089
|
+
font-size: 16px;
|
|
10090
|
+
}
|
|
10091
|
+
.gyramais-sync-chip-retry
|
|
10092
|
+
.gyramais-sync-chip-retry-icon.gyramais-sync-chip-retry-icon--spinning {
|
|
10093
|
+
animation: gyramais-sync-chip-spin 0.9s linear infinite;
|
|
10094
|
+
}
|
|
10095
|
+
@keyframes gyramais-sync-chip-spin {
|
|
10096
|
+
to {
|
|
10097
|
+
transform: rotate(360deg);
|
|
10098
|
+
}
|
|
10099
|
+
}
|
|
10100
|
+
|
|
10049
10101
|
.gyramais-table-container {
|
|
10050
10102
|
width: 100%;
|
|
10051
10103
|
overflow-y: auto;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gyramais/gyra-design",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.35",
|
|
4
4
|
"description": "Gyramais Design System",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -107,4 +107,4 @@
|
|
|
107
107
|
"storybook": "8.1.11",
|
|
108
108
|
"tailwindcss": "^3.3.5"
|
|
109
109
|
}
|
|
110
|
-
}
|
|
110
|
+
}
|