@ffid-br/tailor-ui 0.13.0 → 0.16.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.
Files changed (38) hide show
  1. package/README.md +147 -5
  2. package/dist/icons/apps/accounts-apple-touch.png +0 -0
  3. package/dist/icons/apps/accounts.svg +5 -0
  4. package/dist/icons/apps/bi-apple-touch.png +0 -0
  5. package/dist/icons/apps/bi.svg +5 -0
  6. package/dist/icons/apps/crm-apple-touch.png +0 -0
  7. package/dist/icons/apps/crm.svg +5 -0
  8. package/dist/icons/apps/genius-apple-touch.png +0 -0
  9. package/dist/icons/apps/genius.svg +5 -0
  10. package/dist/icons/apps/nr1-apple-touch.png +0 -0
  11. package/dist/icons/apps/nr1.svg +5 -0
  12. package/dist/icons/apps/pilot-apple-touch.png +0 -0
  13. package/dist/icons/apps/pilot.svg +5 -0
  14. package/dist/index.es.js +1444 -939
  15. package/dist/index.umd.js +2 -1
  16. package/dist/style.css +249 -111
  17. package/dist/theme.css +122 -4
  18. package/dist/tokens.css +232 -0
  19. package/dist/types/apps.d.ts +28 -0
  20. package/dist/types/components/TailorAction.d.ts +11 -0
  21. package/dist/types/components/TailorAppIcon.d.ts +10 -0
  22. package/dist/types/components/TailorBrandMark.d.ts +1 -1
  23. package/dist/types/components/TailorEmpty.d.ts +15 -0
  24. package/dist/types/components/TailorExplain.d.ts +22 -0
  25. package/dist/types/components/TailorGlossary.d.ts +14 -0
  26. package/dist/types/components/TailorHandoff.d.ts +41 -0
  27. package/dist/types/components/TailorInsight.d.ts +26 -0
  28. package/dist/types/components/TailorMonogram.d.ts +17 -0
  29. package/dist/types/components/TailorNovidades.d.ts +1 -1
  30. package/dist/types/components/TailorResult.d.ts +7 -1
  31. package/dist/types/components/TailorStat.d.ts +52 -0
  32. package/dist/types/components/TailorTable.d.ts +1 -1
  33. package/dist/types/components/TailorTour.d.ts +26 -0
  34. package/dist/types/i18n.d.ts +5 -0
  35. package/dist/types/index.d.ts +21 -0
  36. package/dist/types/reducedMotion.d.ts +4 -0
  37. package/dist/types/storage.d.ts +3 -0
  38. package/package.json +7 -3
@@ -49,7 +49,7 @@ export type TailorTableProps<T> = {
49
49
  stickyHeader?: boolean;
50
50
  className?: string;
51
51
  };
52
- /** Formata pelo tipo da coluna; vazio vira traço. */
52
+ /** Formata pelo tipo da coluna; vazio vira hífen simples (sem travessão, regra da marca). */
53
53
  export declare function formatValue(v: unknown, type?: TailorColumnType, locale?: string, currency?: string): React.ReactNode;
54
54
  /**
55
55
  * Tabela de relatório: cabeçalho em overline, números tabulares à direita, IDs
@@ -0,0 +1,26 @@
1
+ import { default as React } from 'react';
2
+ export type TailorTourStep = {
3
+ /** Valor do atributo `data-tour` do elemento, ou um seletor CSS (começando por `#`, `.` ou `[`). */
4
+ target: string;
5
+ title: string;
6
+ text: React.ReactNode;
7
+ };
8
+ export type TailorTourProps = {
9
+ steps: TailorTourStep[];
10
+ /** Padrão: true. Com `storageKey`, só abre se a pessoa ainda não concluiu nem pulou. */
11
+ open?: boolean;
12
+ /** Lembra no navegador que o tour acabou (`tailor-tour:<storageKey>`), seja concluindo ou pulando. */
13
+ storageKey?: string;
14
+ /** "Entendi" no último passo. */
15
+ onClose?: () => void;
16
+ /** Pular, X e Esc. Sem ele, valem como `onClose`. */
17
+ onSkip?: () => void;
18
+ };
19
+ /** Esquece que o tour foi visto, para a pessoa poder refazê-lo (ex.: botão "Ver o tour de novo"). */
20
+ export declare const resetTour: (storageKey: string) => void;
21
+ /**
22
+ * Tour guiado: escurece a tela, recorta o elemento da vez e explica numa frase. Passo cujo
23
+ * elemento não está na tela é pulado. Esc pula; as setas andam. É um diálogo modal: prende o
24
+ * Tab no balão e devolve o foco a quem o tinha. Com "menos movimento", rola e recorta sem animar.
25
+ */
26
+ export declare function TailorTour({ steps, open, storageKey, onClose, onSkip }: TailorTourProps): React.ReactPortal | null;
@@ -19,6 +19,11 @@ export type TailorMessages = {
19
19
  seePrevious: string;
20
20
  close: string;
21
21
  unseen: (count: string) => string;
22
+ howToRead: string;
23
+ gotIt: string;
24
+ nextStep: string;
25
+ step: (step: number, total: number) => string;
26
+ skipTour: string;
22
27
  };
23
28
  export declare const TAILOR_MESSAGES: Record<string, TailorMessages>;
24
29
  export type TailorLocale = {
@@ -38,3 +38,24 @@ export { TailorButton } from './components/TailorButton';
38
38
  export type { TailorButtonProps } from './components/TailorButton';
39
39
  export { TailorNovidades, TailorNovidadesDialog, useNovidades } from './components/TailorNovidades';
40
40
  export type { TailorNovidade, TailorNovidadesProps, TailorNovidadesDialogProps } from './components/TailorNovidades';
41
+ export { TailorStat, TailorStatGroup, statDelta } from './components/TailorStat';
42
+ export type { TailorStatProps, TailorStatGroupProps, TailorStatFormat, TailorStatDelta, TailorStatDirection } from './components/TailorStat';
43
+ export { TailorEmpty } from './components/TailorEmpty';
44
+ export type { TailorEmptyProps } from './components/TailorEmpty';
45
+ export type { TailorActionSpec } from './components/TailorAction';
46
+ export { TailorMonogram, monogramInitials, monogramTone, MONOGRAM_TONES } from './components/TailorMonogram';
47
+ export type { TailorMonogramProps } from './components/TailorMonogram';
48
+ export { TailorInsight } from './components/TailorInsight';
49
+ export type { TailorInsightProps } from './components/TailorInsight';
50
+ export { TailorExplain } from './components/TailorExplain';
51
+ export type { TailorExplainProps } from './components/TailorExplain';
52
+ export { TailorGlossary } from './components/TailorGlossary';
53
+ export type { TailorGlossaryProps } from './components/TailorGlossary';
54
+ export { TailorTour, resetTour } from './components/TailorTour';
55
+ export type { TailorTourProps, TailorTourStep } from './components/TailorTour';
56
+ export { TAILOR_APPS, appPorChave, tailorTitle, appIconSvg } from './apps';
57
+ export type { TailorApp, TailorAppId } from './apps';
58
+ export { TailorAppIcon } from './components/TailorAppIcon';
59
+ export type { TailorAppIconProps } from './components/TailorAppIcon';
60
+ export { TailorHandoff, TailorHandoffSaida, handoffPendente } from './components/TailorHandoff';
61
+ export type { TailorHandoffProps, TailorHandoffSaidaProps } from './components/TailorHandoff';
@@ -0,0 +1,4 @@
1
+ /** Lê a preferência "menos movimento" na hora (para decidir, por exemplo, o tipo de rolagem). */
2
+ export declare const prefersReducedMotion: () => boolean;
3
+ /** A preferência "menos movimento" do sistema, acompanhando mudanças. */
4
+ export declare function useReducedMotion(): boolean;
@@ -0,0 +1,3 @@
1
+ /** localStorage que não quebra em modo privado ou com storage bloqueado: só não lembra. */
2
+ export declare const lerStorage: (k: string) => string | null;
3
+ export declare const gravarStorage: (k: string, v: string | null) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ffid-br/tailor-ui",
3
3
  "private": false,
4
- "version": "0.13.0",
4
+ "version": "0.16.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",
@@ -25,10 +25,14 @@
25
25
  "./dist/style.css": "./dist/style.css",
26
26
  "./dist/theme.css": "./dist/theme.css",
27
27
  "./tailor-logo.png": "./dist/tailor-logo.png",
28
- "./tailor-logo-branco.png": "./dist/tailor-logo-branco.png"
28
+ "./tailor-logo-branco.png": "./dist/tailor-logo-branco.png",
29
+ "./tokens.css": "./dist/tokens.css",
30
+ "./dist/tokens.css": "./dist/tokens.css",
31
+ "./icons/apps/*": "./dist/icons/apps/*"
29
32
  },
30
33
  "scripts": {
31
- "build": "vite build && cp src/styles/style.css src/styles/theme.css src/assets/*.png dist/",
34
+ "build": "vite build && cp src/styles/style.css src/styles/tokens.css src/styles/theme.css src/assets/*.png dist/ && mkdir -p dist/icons/apps && cp src/assets/apps/* dist/icons/apps/",
35
+ "icones": "node scripts/gerar-icones-apps.ts",
32
36
  "typecheck": "tsc --noEmit",
33
37
  "test": "vitest run",
34
38
  "test:watch": "vitest",