@ffid-br/tailor-ui 0.20.1 → 0.22.0
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/README.md +1 -1
- package/dist/index.es.js +1059 -947
- package/dist/index.umd.js +2 -2
- package/dist/style.css +24 -0
- package/dist/types/components/MascoteVetor.d.ts +22 -0
- package/dist/types/components/TailorCreditStatement.d.ts +58 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -702,3 +702,27 @@ a.tailor-btn { text-decoration: none; }
|
|
|
702
702
|
.tailor-spinner, .tailor-dots > i, .tailor-progress--indeterminate > span, .tailor-refresh-overlay { animation: none; }
|
|
703
703
|
.tailor-blinds__curtains { display: none; }
|
|
704
704
|
}
|
|
705
|
+
|
|
706
|
+
/* TailorCreditStatement: extrato de créditos. Reto, sem sombra; verde só na barra. */
|
|
707
|
+
.tailor-credit { display: grid; gap: var(--tailor-space-md); font-family: var(--tailor-brand-body-font); color: var(--tailor-brand-text); }
|
|
708
|
+
.tailor-credit__month { display: inline-flex; align-items: center; gap: var(--tailor-space-xs); justify-self: end; font-size: 13px; color: var(--tailor-brand-text-muted); }
|
|
709
|
+
.tailor-credit__month select { min-height: 34px; padding: 0 var(--tailor-space-xs); border: 1px solid var(--tailor-brand-border); border-radius: var(--tailor-brand-radius); background: transparent; color: inherit; font: inherit; }
|
|
710
|
+
.tailor-credit__balance { display: grid; gap: var(--tailor-space-xs); }
|
|
711
|
+
.tailor-credit__big { margin: 0; font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
|
|
712
|
+
.tailor-credit__tag { justify-self: start; font-size: 10px; letter-spacing: var(--tailor-tracking-label); text-transform: uppercase; color: var(--tailor-brand-text-muted); }
|
|
713
|
+
.tailor-credit__meter { position: relative; height: 13px; background: var(--tailor-gray-100); }
|
|
714
|
+
.tailor-credit__meter > span { display: block; height: 100%; background: var(--tailor-brand-primary); }
|
|
715
|
+
.tailor-credit__mark { position: absolute; top: -4px; bottom: -4px; left: 80%; width: 1px; background: var(--tailor-brand-text); }
|
|
716
|
+
.tailor-credit__sub { margin: 0; font-size: 13px; color: var(--tailor-brand-text-muted); font-variant-numeric: tabular-nums; }
|
|
717
|
+
.tailor-credit__warn { margin: 0; padding: var(--tailor-space-xs) var(--tailor-space-sm); border-left: 3px solid var(--tailor-brand-text); background: var(--tailor-green-tint); font-size: 14px; }
|
|
718
|
+
.tailor-credit__tabs { display: flex; flex-wrap: wrap; gap: var(--tailor-space-xs); border-bottom: 1px solid var(--tailor-brand-border); }
|
|
719
|
+
.tailor-credit__tab { padding: var(--tailor-space-xs) var(--tailor-space-sm); border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-size: 14px; color: var(--tailor-brand-text-muted); cursor: pointer; }
|
|
720
|
+
.tailor-credit__tab[aria-selected="true"] { color: var(--tailor-brand-text); border-bottom-color: var(--tailor-brand-primary); }
|
|
721
|
+
.tailor-credit__bars { display: grid; gap: var(--tailor-space-xs); margin: 0; padding: 0; list-style: none; }
|
|
722
|
+
.tailor-credit__bar-row { display: grid; grid-template-columns: minmax(80px, 200px) 1fr auto; align-items: center; gap: var(--tailor-space-sm); font-size: 14px; }
|
|
723
|
+
.tailor-credit__bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
724
|
+
.tailor-credit__bar-track { height: 13px; background: var(--tailor-gray-100); }
|
|
725
|
+
.tailor-credit__bar-track > span { display: block; height: 100%; background: var(--tailor-brand-text); }
|
|
726
|
+
.tailor-credit__bar-value { font-variant-numeric: tabular-nums; text-align: right; min-width: 56px; }
|
|
727
|
+
.tailor-credit__empty, .tailor-credit__error { margin: 0; padding: var(--tailor-space-lg) 0; text-align: center; color: var(--tailor-brand-text-muted); }
|
|
728
|
+
.tailor-credit__error { display: grid; justify-items: center; gap: var(--tailor-space-sm); }
|
|
@@ -133,6 +133,28 @@ declare const AGENTES: {
|
|
|
133
133
|
corpo: React.JSX.Element;
|
|
134
134
|
verde: React.JSX.Element;
|
|
135
135
|
};
|
|
136
|
+
vigia: {
|
|
137
|
+
topo: number;
|
|
138
|
+
apoio: [number, number];
|
|
139
|
+
olhos: {
|
|
140
|
+
l: number;
|
|
141
|
+
r: number;
|
|
142
|
+
y: number;
|
|
143
|
+
};
|
|
144
|
+
corpo: React.JSX.Element;
|
|
145
|
+
verde: React.JSX.Element;
|
|
146
|
+
};
|
|
147
|
+
agenda: {
|
|
148
|
+
topo: number;
|
|
149
|
+
apoio: [number, number];
|
|
150
|
+
olhos: {
|
|
151
|
+
l: number;
|
|
152
|
+
r: number;
|
|
153
|
+
y: number;
|
|
154
|
+
};
|
|
155
|
+
corpo: React.JSX.Element;
|
|
156
|
+
verde: React.JSX.Element;
|
|
157
|
+
};
|
|
136
158
|
};
|
|
137
159
|
export type ChaveDoAgenteVetor = keyof typeof AGENTES;
|
|
138
160
|
/** Expressão só nos olhos: formato, pálpebra e pupila, por lado. */
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type CreditBalance = {
|
|
3
|
+
month: string;
|
|
4
|
+
quota: number;
|
|
5
|
+
used: number;
|
|
6
|
+
remaining: number;
|
|
7
|
+
overage_credits: number;
|
|
8
|
+
overage_brl: number;
|
|
9
|
+
overage_price: number;
|
|
10
|
+
percent_used: number;
|
|
11
|
+
source: 'padrao' | 'contrato';
|
|
12
|
+
legacy: string[];
|
|
13
|
+
resets_on: string;
|
|
14
|
+
};
|
|
15
|
+
export type CreditItem = {
|
|
16
|
+
created_at: string;
|
|
17
|
+
type: string;
|
|
18
|
+
service: string;
|
|
19
|
+
credits: number;
|
|
20
|
+
client_id: string;
|
|
21
|
+
chat_id?: string | null;
|
|
22
|
+
};
|
|
23
|
+
export type CreditStatementData = {
|
|
24
|
+
balance: CreditBalance;
|
|
25
|
+
by_service: {
|
|
26
|
+
service: string;
|
|
27
|
+
credits: number;
|
|
28
|
+
}[];
|
|
29
|
+
by_day: {
|
|
30
|
+
day: string;
|
|
31
|
+
credits: number;
|
|
32
|
+
}[];
|
|
33
|
+
by_account: {
|
|
34
|
+
client_id: string;
|
|
35
|
+
credits: number;
|
|
36
|
+
}[];
|
|
37
|
+
by_person: {
|
|
38
|
+
user_id: string;
|
|
39
|
+
credits: number;
|
|
40
|
+
}[];
|
|
41
|
+
items: CreditItem[];
|
|
42
|
+
};
|
|
43
|
+
export interface TailorCreditStatementProps {
|
|
44
|
+
data: CreditStatementData | null;
|
|
45
|
+
loading?: boolean;
|
|
46
|
+
error?: string | null;
|
|
47
|
+
onRetry?: () => void;
|
|
48
|
+
/** Mês do extrato, `AAAA-MM`. Com `onMonthChange`, aparece o seletor (atual + 5 anteriores). */
|
|
49
|
+
month?: string;
|
|
50
|
+
onMonthChange?: (month: string) => void;
|
|
51
|
+
personLabel?: (userId: string) => string;
|
|
52
|
+
accountLabel?: (clientId: string) => string;
|
|
53
|
+
/** Visão FFID (custo, margem), abaixo do saldo. */
|
|
54
|
+
adminExtras?: React.ReactNode;
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|
|
57
|
+
/** Extrato de créditos de IA do mês: saldo, uso por serviço, dia, conta e pessoa, e o detalhe. Só apresentação. */
|
|
58
|
+
export declare function TailorCreditStatement({ data, loading, error, onRetry, month, onMonthChange, personLabel, accountLabel, adminExtras, className, }: TailorCreditStatementProps): React.JSX.Element;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export { TailorBrand, themeToVars, themeFromWhitelabel, contrast } from './compo
|
|
|
22
22
|
export type { TailorBrandProps, TailorTheme, TailorWhitelabel } from './components/TailorBrand';
|
|
23
23
|
export { TailorTable, formatValue, sumBy } from './components/TailorTable';
|
|
24
24
|
export type { TailorTableProps, TailorTableColumn, TailorTableSort, TailorColumnType } from './components/TailorTable';
|
|
25
|
+
export { TailorCreditStatement } from './components/TailorCreditStatement';
|
|
26
|
+
export type { TailorCreditStatementProps, CreditStatementData, CreditBalance, CreditItem } from './components/TailorCreditStatement';
|
|
25
27
|
export { TailorSkeleton } from './components/TailorSkeleton';
|
|
26
28
|
export type { TailorSkeletonProps } from './components/TailorSkeleton';
|
|
27
29
|
export { TailorToaster, toast } from './components/TailorToaster';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ffid-br/tailor-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.22.0",
|
|
5
5
|
"description": "Primitivos de marca Tailor.ia em React: loader, intro, transição de login, lockup e barra lateral.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.umd.js",
|