@ffid-br/tailor-ui 0.18.0 → 0.20.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/dist/style.css CHANGED
@@ -671,3 +671,30 @@ a.tailor-btn { text-decoration: none; }
671
671
  .tailor-insight__feedback { display: inline-flex; align-items: center; gap: var(--tailor-space-sm); }
672
672
  .tailor-insight__link { padding: 0; border: 0; background: none; font: inherit; color: var(--tailor-brand-primary-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
673
673
  .tailor-insight__link[aria-pressed="true"] { font-weight: var(--tailor-weight-semibold); text-decoration-thickness: 2px; }
674
+
675
+ /* ---- Loadings do brand guide (12.5): spinner, dots, progress, blinds, overlay ---- */
676
+ .tailor-spinner { display: inline-block; flex-shrink: 0; border-style: solid; border-color: var(--tailor-brand-border); border-top-color: var(--tailor-brand-primary); border-radius: 50%; animation: tailor-spin .7s var(--tailor-ease-linear) infinite; }
677
+ @keyframes tailor-spin { to { transform: rotate(360deg); } }
678
+ .tailor-dots { display: inline-flex; align-items: center; gap: 8px; }
679
+ .tailor-dots > i { width: 8px; height: 8px; background: var(--tailor-brand-primary); animation: tailor-dotpulse 1.4s var(--tailor-ease-out) infinite; }
680
+ .tailor-dots > i:nth-child(2) { animation-delay: .2s; }
681
+ .tailor-dots > i:nth-child(3) { animation-delay: .4s; }
682
+ .tailor-dots > .tailor-overline { margin-left: 8px; }
683
+ @keyframes tailor-dotpulse { 0%, 80%, 100% { opacity: .25; transform: scale(.85); } 40% { opacity: 1; transform: scale(1); } }
684
+ .tailor-overline { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--tailor-muted); }
685
+ .tailor-progress { position: relative; width: 100%; overflow: hidden; background: var(--tailor-gray-100); }
686
+ .tailor-progress > span { display: block; height: 100%; background: var(--tailor-brand-primary); transition: width 300ms var(--tailor-ease-out); }
687
+ .tailor-progress--indeterminate > span { position: absolute; top: 0; bottom: 0; width: 30%; animation: tailor-prog 1.5s var(--tailor-ease-out) infinite; }
688
+ @keyframes tailor-prog { 0% { left: -30%; } 100% { left: 100%; } }
689
+ .tailor-blinds { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--tailor-black); color: var(--tailor-white); }
690
+ .tailor-blinds__curtains { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); }
691
+ .tailor-blinds__curtains > i { background: var(--tailor-brand-primary); transform-origin: top; animation: tailor-blinds 1.6s var(--tailor-ease-out) forwards; }
692
+ .tailor-blinds--loop .tailor-blinds__curtains > i { animation-duration: 3.2s; animation-iteration-count: infinite; }
693
+ @keyframes tailor-blinds { 0%, 60% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
694
+ .tailor-refresh-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(255,255,255,.75); backdrop-filter: blur(4px); animation: tailor-fadein .233s var(--tailor-ease-out); }
695
+ :where(.dark, [data-theme="dark"]) .tailor-refresh-overlay { background: rgba(0,0,0,.75); }
696
+ @keyframes tailor-fadein { from { opacity: 0; } }
697
+ @media (prefers-reduced-motion: reduce) {
698
+ .tailor-spinner, .tailor-dots > i, .tailor-progress--indeterminate > span, .tailor-refresh-overlay { animation: none; }
699
+ .tailor-blinds__curtains { display: none; }
700
+ }
@@ -1,4 +1,4 @@
1
- export type TailorAppId = 'accounts' | 'crm' | 'pilot' | 'bi' | 'genius' | 'nr1';
1
+ export type TailorAppId = 'accounts' | 'crm' | 'pilot' | 'bi' | 'genius' | 'nr1' | 'omnichannel';
2
2
  export type TailorApp = {
3
3
  id: TailorAppId;
4
4
  /** Nome curto na interface e na aba: "Accounts", "Studio". */
@@ -1,9 +1,11 @@
1
1
  import { default as React } from 'react';
2
2
  export type TailorAppLauncherProps = {
3
3
  /** Os apps da conta (`/clients/uses`): a chave do produto (`gpt`, `ffid.ai.studio`...) e a URL. Duas chaves do mesmo app viram um item só. */
4
+ /** `nome` vale só para app fora do registro do tailor-ui (ex.: "Tailor Sac"); app registrado usa o nome do registro. */
4
5
  apps: {
5
6
  chave: string;
6
7
  url: string;
8
+ nome?: string;
7
9
  }[];
8
10
  /** O app em que o usuário está (id ou chave de produto). Aparece marcado e não é link. */
9
11
  atual: string;
@@ -21,6 +21,13 @@ export type TailorHandoffProps = {
21
21
  sidebar?: 'expandida' | 'recolhida' | 'nenhuma';
22
22
  /** Breakpoint em que a barra vira a barra de 55px do celular (o mesmo da `TailorSidebar`). */
23
23
  breakpoint?: 'md' | 'lg';
24
+ /**
25
+ * White label: arte do cliente no lugar da marca Tailor.ia e do ícone do app
26
+ * (ex.: logo da LEN). Sem ela, vale a marca Tailor.
27
+ */
28
+ logo?: string;
29
+ /** Arte do cliente para o tema escuro. Sem ela, vale `logo`. */
30
+ logoDark?: string;
24
31
  className?: string;
25
32
  };
26
33
  /**
@@ -0,0 +1,61 @@
1
+ import { default as React } from 'react';
2
+ declare const SPINNER: {
3
+ readonly sm: "size-4 border-2";
4
+ readonly md: "size-6 border-2";
5
+ readonly lg: "size-9 border-[3px]";
6
+ readonly xl: "size-14 border-4";
7
+ };
8
+ export type TailorSpinnerProps = {
9
+ /** 16, 24, 36 ou 56 px. Padrão: `md` (24). */
10
+ size?: keyof typeof SPINNER;
11
+ /** Lido pelo leitor de tela. Padrão: o texto `loading` do idioma. */
12
+ label?: string;
13
+ className?: string;
14
+ };
15
+ /** Anel cinza com o quadrante verde: ação pontual e refresh. */
16
+ export declare function TailorSpinner({ size, label, className }: TailorSpinnerProps): React.JSX.Element;
17
+ export type TailorDotsProps = {
18
+ /** Rótulo em overline ao lado ("Digitando"). Sem ele, o leitor de tela ouve o `loading` do idioma. */
19
+ label?: string;
20
+ className?: string;
21
+ };
22
+ /** Três pontos quadrados verdes: espera conversacional, agente digitando. */
23
+ export declare function TailorDots({ label, className }: TailorDotsProps): React.JSX.Element;
24
+ declare const PROGRESSO: {
25
+ readonly sm: "h-1";
26
+ readonly md: "h-2";
27
+ readonly lg: "h-3";
28
+ };
29
+ export type TailorProgressProps = {
30
+ /** 0 a 100. Sem ele, a barra é indeterminada (duração desconhecida). */
31
+ value?: number;
32
+ /** Altura 4, 8 ou 12 px. Padrão: `md` (8). */
33
+ size?: keyof typeof PROGRESSO;
34
+ /** Nome da barra para o leitor de tela. Padrão: o texto `loading` do idioma. */
35
+ label?: string;
36
+ className?: string;
37
+ };
38
+ /** Barra de progresso: trilho cinza e fill verde; sem `value`, um segmento varre o trilho. */
39
+ export declare function TailorProgress({ value, size, label, className }: TailorProgressProps): React.JSX.Element;
40
+ export type TailorBlindsProps = {
41
+ /** O que aparece por trás das cortinas (em geral, o logotipo). */
42
+ children?: React.ReactNode;
43
+ /** Repete sem parar enquanto carrega. Sem ele, abre uma vez. */
44
+ loop?: boolean;
45
+ /** Lido pelo leitor de tela. Padrão: o texto `loading` do idioma. */
46
+ label?: string;
47
+ className?: string;
48
+ };
49
+ /** Oito cortinas verdes sobre o preto, abrindo de cima para baixo: carga inicial, momento de marca. */
50
+ export declare function TailorBlinds({ children, loop, label, className }: TailorBlindsProps): React.JSX.Element;
51
+ export type TailorRefreshOverlayProps = {
52
+ /** `true` enquanto o dado já exibido é atualizado. */
53
+ active: boolean;
54
+ /** Rótulo em overline abaixo do spinner. Padrão: o texto `loading` do idioma. */
55
+ label?: string;
56
+ children: React.ReactNode;
57
+ className?: string;
58
+ };
59
+ /** Refresh de dado já na tela: véu de 75% com blur sobre o conteúdo, spinner e rótulo. O conteúdo fica, só não recebe clique. */
60
+ export declare function TailorRefreshOverlay({ active, label, children, className }: TailorRefreshOverlayProps): React.JSX.Element;
61
+ export {};
@@ -61,3 +61,5 @@ export { TailorAppLauncher } from './components/TailorAppLauncher';
61
61
  export type { TailorAppLauncherProps } from './components/TailorAppLauncher';
62
62
  export { TailorHandoff, TailorHandoffSaida, handoffPendente } from './components/TailorHandoff';
63
63
  export type { TailorHandoffProps, TailorHandoffSaidaProps } from './components/TailorHandoff';
64
+ export { TailorSpinner, TailorDots, TailorProgress, TailorBlinds, TailorRefreshOverlay } from './components/TailorLoadings';
65
+ export type { TailorSpinnerProps, TailorDotsProps, TailorProgressProps, TailorBlindsProps, TailorRefreshOverlayProps } from './components/TailorLoadings';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ffid-br/tailor-ui",
3
3
  "private": false,
4
- "version": "0.18.0",
4
+ "version": "0.20.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",