@toski-labs/ds 0.6.1 → 0.7.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/CHANGELOG.md CHANGED
@@ -5,6 +5,62 @@ Escreva as mudanças em "Próxima versão" enquanto trabalha; `npm run release`
5
5
 
6
6
  ## Próxima versão
7
7
 
8
+ ## 0.7.0 — 2026-11-01
9
+
10
+ ### Adicionado
11
+
12
+ Tudo aditivo: nenhum valor nem nome existente muda, e o `app-tokens*.json` de antes continua válido linha a linha
13
+ (só entram chaves novas, no fim de cada grupo; `colorNeve` entra logo depois de `color`). A web (`tokens.css`, `web*.json`, `theme.css`, `tokens.ts`) não muda.
14
+
15
+ - **Paletas do app** (novo eixo, independente do tema de produto): `bege` (a atual, padrão e base) e `neve`, cada uma
16
+ com claro e escuro. Em `tokens.json` › `palettes`; a paleta só lista o que muda e o build falha se ela mexer em token
17
+ fora de `$allowed`. Ordem de aplicação: base → tema de produto → paleta. Pawta e Koti combinam com as duas.
18
+ - **Neve** troca `background` (`#F5F5F7` / `#121214`), `textPrimary` (`#1C1C1E` / `#F5F5F7`), `textSecondary`
19
+ (`#666669` / `#A1A1A6`), `tabIdle` (`#6E6E73` / `#A1A1A6`), `onAccent` (`#FFF8EE` / `#121214`) e os tokens novos
20
+ abaixo. **`textSecondary` claro é `#666669`, não o `#6E6E73` do canvas** (ver "Atenção"). `accent`, `critical`,
21
+ `heroBackground` e `toastAction` continuam vindo do tema de produto e do Bege. Os tokens antigos que a Nova XP
22
+ aposenta (`surface`, `border`, `divider`, `successBackground`…) não são definidos no Neve: o app usa os do Bege.
23
+ - No Pawta+Neve, `onAccent` escuro é `#121214` (a paleta vence o tema nesse token). O Bege escuro continua `#231B17`.
24
+ - **Cores novas** (mobile, claro/escuro; no `color` do `app-tokens` com os valores do Bege): `neutralFill`, `glass`,
25
+ `glassBorder`, `tabGlass`, `checkLine`, `badgeBg`, `petA`, `petB`, `mLine` (linha do mascote), `mInk` (olho e focinho).
26
+ Saem também em `mobile.json` e `ToskiColors.swift`. `ballLine` não virou token: a bola do pet já existe nos SVGs do
27
+ Pawta (`ball-indigo-*`, com `#F4E4CC` / `#2C376A`) e o canvas só a declara, sem usar. `heroBg` e `toastAction` já existiam
28
+ (`heroBackground`, `toastAction`) e não foram duplicados.
29
+ - **`app-tokens*.json`**: `colorNeve` (o vocabulário completo da Nova XP no Neve, com o tema de produto aplicado, em
30
+ ordem fixa: os tokens novos, `heroBackground`, `toastAction`, `background`, `textPrimary`, `textSecondary`, `tabIdle`,
31
+ `onAccent`) e `shadow.glass` / `shadow.glassNeve`. Quem lê `shadow` precisa saber que essas duas chaves são diferentes
32
+ das outras (as de sempre são iguais no claro e no escuro): trazem `{light, dark}`, cada um com a sombra
33
+ `{y, blur, color, opacity}` e um anel `ring: {width, color, opacity}`.
34
+ - **Sombra do vidro** (`shadowMode` em `tokens.json`, `ToskiShadow.glass` / `ToskiShadow.glassNeve` no Swift): Bege claro
35
+ `rgba(35,27,23,.15)` + anel `.06`; Bege escuro `rgba(0,0,0,.35)` + anel `rgba(247,241,232,.06)`; Neve claro
36
+ `rgba(0,0,0,.08)` + anel `.06`; Neve escuro `rgba(0,0,0,.40)` + anel `rgba(255,255,255,.06)`. Sombra `y 1, blur 3`, anel 0,5 pt.
37
+ - **Forma e espaço**: `radius.surface` 22 (os raios atuais ficam); `spacing.screenMargin` 24 e `spacing.block` 14
38
+ (`screenPadding` 20 continua); `size.rowHome` 98, `rowList` 76, `rowForm` 52, `rowDetail` 44, `glassButton` 54, `roundButton` 44,
39
+ `chip` 36, `checkCircle` 26, `iconCircleS` 32, `iconCircleM` 36, `iconCircleL` 44, `toast` 56.
40
+ - **Tipografia** (Outfit): `typography.styles.screenTitle` (27 · 700 · à esquerda), `sheetTitle` (22 · 700), `nameLarge` (17 · 600),
41
+ `name` (16 · 600), `support` (15 · 400), `supportSmall` (14 · 400) e `label` (13 · 600 · caixa alta · +0,06; igual ao
42
+ `sectionLabel`, que continua). Conferido nos quadros: `screenTitle` e `sheetTitle` têm altura de linha 1,15 e
43
+ `screenTitle` tem tracking −0,01 em (78 dos 79 usos); por isso entram `lineHeight` e `align` no JSON e no Swift
44
+ (`ToskiFont.Style.lineHeight`, `.alignment`). Os outros estilos não têm altura fixa nos quadros (varia de 1,4 a 1,5).
45
+ - **Swift**: `build/swift/ToskiPaletteNeve.swift` (`ToskiNevePalette`, exportado como `@toski-labs/ds/ToskiPaletteNeve.swift`).
46
+ - **Contraste**: os pares da Nova XP (texto, apoio e `onAccent` sobre `accent`, vidro composto sobre o fundo, bordas e
47
+ linhas a 3:1) passam a ser checados em cada paleta × (base, Pawta, Koti). Um fundo `a/b` é `a` translúcida sobre `b`.
48
+ - **Storybook**: seletor **Paleta** na barra, e em Tokens/Cores a seção "Paletas do app (Nova XP)" com o vocabulário
49
+ Bege × Neve, a sombra do vidro e os pares de contraste.
50
+
51
+ ### Atenção
52
+
53
+ - **Neve claro: `textSecondary` mudou de `#6E6E73` (canvas) para `#666669`.** Com o do canvas, o apoio sobre `neutralFill`
54
+ (`#E5E5EA`, usado em chips e selos) dava 4,04:1, abaixo de 4,5:1; agora dá 4,56:1 (5,26:1 sobre `background`). É a única
55
+ cor da paleta que difere do canvas, e o `tabIdle` do Neve continua `#6E6E73`. Falta o canvas acompanhar.
56
+ - **Ressalva que sobra:** `textSecondary` claro do Neve sobre `heroBackground` passa no Pawta (4,61:1), mas dá 4,27:1 com
57
+ a base e 4,02:1 com o Koti. Fica em `contrast.palettes.known`, aparece como ⚠ no `npm run contrast` e um teste impede
58
+ que a lista cresça; o canvas não escreve texto de apoio sobre o círculo do mascote.
59
+ - **`link` da Nova XP não é o do DS**: a Nova XP usa o próprio `accent` (`#3E4C8A` / `#A9B4E8`); o DS tem `link`
60
+ `#2C376A` / `#C9D0F2` (`accentDeep` no app). Nada mudou; só registro a diferença.
61
+ - O `ToskiColorTests` do app compara as chaves de `color` com o enum Swift do app: ao levar este `app-tokens` para o
62
+ app, o enum e os testes dele precisam dos tokens novos (e de `colorNeve`/`shadow.glass*`) no mesmo passo.
63
+
8
64
  ## 0.6.1 — 2026-10-28
9
65
 
10
66
  ### Adicionado
@@ -197,6 +197,143 @@
197
197
  "light": "#F6F7FC",
198
198
  "dark": "#33292A",
199
199
  "use": "Fundo de um aviso não lido na central de notificações"
200
+ },
201
+ "neutralFill": {
202
+ "light": "#F3E4CF",
203
+ "dark": "#3A2D23",
204
+ "use": "Preenchimento neutro da Nova XP: fundo dos botões secundários, chips e ícones em círculo"
205
+ },
206
+ "glass": {
207
+ "light": "rgba(255,253,249,0.62)",
208
+ "dark": "rgba(46,36,29,0.62)",
209
+ "use": "Vidro: botões e cartões translúcidos sobre o fundo (Nova XP). Junto com glassBorder e a sombra glass"
210
+ },
211
+ "glassBorder": {
212
+ "light": "#958373",
213
+ "dark": "#806E5E",
214
+ "use": "Borda de 1 pt do vidro"
215
+ },
216
+ "tabGlass": {
217
+ "light": "rgba(255,253,249,0.78)",
218
+ "dark": "rgba(27,21,17,0.80)",
219
+ "use": "Barra de abas em vidro (Nova XP)"
220
+ },
221
+ "checkLine": {
222
+ "light": "#7D6858",
223
+ "dark": "#A08B78",
224
+ "use": "Contorno do círculo de marcar como feito"
225
+ },
226
+ "badgeBg": {
227
+ "light": "#FFFFFF",
228
+ "dark": "#2E241D",
229
+ "use": "Fundo do selo (contador, aviso) sobre o fundo da tela"
230
+ },
231
+ "petA": {
232
+ "light": "#F3E4CF",
233
+ "dark": "#3A2D23",
234
+ "use": "Fundo A do retrato do pet (igual nas duas paletas)"
235
+ },
236
+ "petB": {
237
+ "light": "#E4EEDC",
238
+ "dark": "#2C3A27",
239
+ "use": "Fundo B do retrato do pet (igual nas duas paletas)"
240
+ },
241
+ "mLine": {
242
+ "light": "#231B17",
243
+ "dark": "#F4E4CC",
244
+ "use": "Linha do mascote"
245
+ },
246
+ "mInk": {
247
+ "light": "#231B17",
248
+ "dark": "#100C0A",
249
+ "use": "Olho e focinho do mascote"
250
+ }
251
+ },
252
+ "colorNeve": {
253
+ "neutralFill": {
254
+ "light": "#E5E5EA",
255
+ "dark": "#2C2C2E",
256
+ "use": "Preenchimento neutro da Nova XP: fundo dos botões secundários, chips e ícones em círculo"
257
+ },
258
+ "glass": {
259
+ "light": "rgba(255,255,255,0.62)",
260
+ "dark": "rgba(44,44,46,0.62)",
261
+ "use": "Vidro: botões e cartões translúcidos sobre o fundo (Nova XP). Junto com glassBorder e a sombra glass"
262
+ },
263
+ "glassBorder": {
264
+ "light": "#88888C",
265
+ "dark": "#68686D",
266
+ "use": "Borda de 1 pt do vidro"
267
+ },
268
+ "tabGlass": {
269
+ "light": "rgba(250,250,252,0.78)",
270
+ "dark": "rgba(28,28,30,0.80)",
271
+ "use": "Barra de abas em vidro (Nova XP)"
272
+ },
273
+ "checkLine": {
274
+ "light": "#8A8A8E",
275
+ "dark": "#8E8E93",
276
+ "use": "Contorno do círculo de marcar como feito"
277
+ },
278
+ "badgeBg": {
279
+ "light": "#FFFFFF",
280
+ "dark": "#2C2C2E",
281
+ "use": "Fundo do selo (contador, aviso) sobre o fundo da tela"
282
+ },
283
+ "petA": {
284
+ "light": "#F3E4CF",
285
+ "dark": "#3A2D23",
286
+ "use": "Fundo A do retrato do pet (igual nas duas paletas)"
287
+ },
288
+ "petB": {
289
+ "light": "#E4EEDC",
290
+ "dark": "#2C3A27",
291
+ "use": "Fundo B do retrato do pet (igual nas duas paletas)"
292
+ },
293
+ "mLine": {
294
+ "light": "#1C1C1E",
295
+ "dark": "#F4E4CC",
296
+ "use": "Linha do mascote"
297
+ },
298
+ "mInk": {
299
+ "light": "#1C1C1E",
300
+ "dark": "#100C0A",
301
+ "use": "Olho e focinho do mascote"
302
+ },
303
+ "heroBackground": {
304
+ "light": "#EFDCC2",
305
+ "dark": "#33271F",
306
+ "use": "Círculo atrás da Paçoca"
307
+ },
308
+ "toastAction": {
309
+ "light": "#E8B27C",
310
+ "dark": "#A9541F",
311
+ "use": "Ação do toast (Desfazer, Abrir)"
312
+ },
313
+ "background": {
314
+ "light": "#F5F5F7",
315
+ "dark": "#121214",
316
+ "use": "Fundo das telas"
317
+ },
318
+ "textPrimary": {
319
+ "light": "#1C1C1E",
320
+ "dark": "#F5F5F7",
321
+ "use": "Texto principal"
322
+ },
323
+ "textSecondary": {
324
+ "light": "#666669",
325
+ "dark": "#A1A1A6",
326
+ "use": "Texto de apoio, rótulos"
327
+ },
328
+ "tabIdle": {
329
+ "light": "#6E6E73",
330
+ "dark": "#A1A1A6",
331
+ "use": "Aba inativa"
332
+ },
333
+ "onAccent": {
334
+ "light": "#FFF8EE",
335
+ "dark": "#121214",
336
+ "use": "Texto sobre o destaque"
200
337
  }
201
338
  },
202
339
  "pet": {
@@ -287,6 +424,40 @@
287
424
  "tabLabel": {
288
425
  "size": 11,
289
426
  "weight": 500
427
+ },
428
+ "screenTitle": {
429
+ "size": 27,
430
+ "weight": 700,
431
+ "tracking": -0.01,
432
+ "lineHeight": 1.15,
433
+ "align": "leading"
434
+ },
435
+ "sheetTitle": {
436
+ "size": 22,
437
+ "weight": 700,
438
+ "lineHeight": 1.15
439
+ },
440
+ "nameLarge": {
441
+ "size": 17,
442
+ "weight": 600
443
+ },
444
+ "name": {
445
+ "size": 16,
446
+ "weight": 600
447
+ },
448
+ "support": {
449
+ "size": 15,
450
+ "weight": 400
451
+ },
452
+ "supportSmall": {
453
+ "size": 14,
454
+ "weight": 400
455
+ },
456
+ "label": {
457
+ "size": 13,
458
+ "weight": 600,
459
+ "tracking": 0.06,
460
+ "uppercase": true
290
461
  }
291
462
  }
292
463
  },
@@ -308,7 +479,8 @@
308
479
  "appIcon": {
309
480
  "radius": 22,
310
481
  "side": 96
311
- }
482
+ },
483
+ "surface": 22
312
484
  },
313
485
  "shadow": {
314
486
  "$description": "Valores do box-shadow do canvas (x = 0). Em SwiftUI o radius é blur / 2. Iguais no claro e no escuro.",
@@ -335,6 +507,54 @@
335
507
  "blur": 32,
336
508
  "color": "#231B17",
337
509
  "opacity": 0.18
510
+ },
511
+ "glass": {
512
+ "light": {
513
+ "y": 1,
514
+ "blur": 3,
515
+ "color": "#231B17",
516
+ "opacity": 0.15,
517
+ "ring": {
518
+ "width": 0.5,
519
+ "color": "#231B17",
520
+ "opacity": 0.06
521
+ }
522
+ },
523
+ "dark": {
524
+ "y": 1,
525
+ "blur": 3,
526
+ "color": "#000000",
527
+ "opacity": 0.35,
528
+ "ring": {
529
+ "width": 0.5,
530
+ "color": "#F7F1E8",
531
+ "opacity": 0.06
532
+ }
533
+ }
534
+ },
535
+ "glassNeve": {
536
+ "light": {
537
+ "y": 1,
538
+ "blur": 3,
539
+ "color": "#000000",
540
+ "opacity": 0.08,
541
+ "ring": {
542
+ "width": 0.5,
543
+ "color": "#000000",
544
+ "opacity": 0.06
545
+ }
546
+ },
547
+ "dark": {
548
+ "y": 1,
549
+ "blur": 3,
550
+ "color": "#000000",
551
+ "opacity": 0.4,
552
+ "ring": {
553
+ "width": 0.5,
554
+ "color": "#FFFFFF",
555
+ "opacity": 0.06
556
+ }
557
+ }
338
558
  }
339
559
  },
340
560
  "spacing": {
@@ -344,14 +564,28 @@
344
564
  "l": 16,
345
565
  "xl": 20,
346
566
  "xxl": 24,
347
- "screenPadding": 20
567
+ "screenPadding": 20,
568
+ "screenMargin": 24,
569
+ "block": 14
348
570
  },
349
571
  "size": {
350
572
  "minTouchTarget": 44,
351
573
  "primaryButtonHeight": 54,
352
574
  "avatarSmall": 24,
353
575
  "avatar": 48,
354
- "avatarLarge": 76
576
+ "avatarLarge": 76,
577
+ "rowHome": 98,
578
+ "rowList": 76,
579
+ "rowForm": 52,
580
+ "rowDetail": 44,
581
+ "glassButton": 54,
582
+ "roundButton": 44,
583
+ "chip": 36,
584
+ "checkCircle": 26,
585
+ "iconCircleS": 32,
586
+ "iconCircleM": 36,
587
+ "iconCircleL": 44,
588
+ "toast": 56
355
589
  },
356
590
  "pdf": {
357
591
  "rule": "O PDF usa sempre os valores claros dos tokens, nunca o tema do aparelho."
@@ -197,6 +197,143 @@
197
197
  "light": "#F6F7FC",
198
198
  "dark": "#33292A",
199
199
  "use": "Fundo de um aviso não lido na central de notificações"
200
+ },
201
+ "neutralFill": {
202
+ "light": "#F3E4CF",
203
+ "dark": "#3A2D23",
204
+ "use": "Preenchimento neutro da Nova XP: fundo dos botões secundários, chips e ícones em círculo"
205
+ },
206
+ "glass": {
207
+ "light": "rgba(255,253,249,0.62)",
208
+ "dark": "rgba(46,36,29,0.62)",
209
+ "use": "Vidro: botões e cartões translúcidos sobre o fundo (Nova XP). Junto com glassBorder e a sombra glass"
210
+ },
211
+ "glassBorder": {
212
+ "light": "#958373",
213
+ "dark": "#806E5E",
214
+ "use": "Borda de 1 pt do vidro"
215
+ },
216
+ "tabGlass": {
217
+ "light": "rgba(255,253,249,0.78)",
218
+ "dark": "rgba(27,21,17,0.80)",
219
+ "use": "Barra de abas em vidro (Nova XP)"
220
+ },
221
+ "checkLine": {
222
+ "light": "#7D6858",
223
+ "dark": "#A08B78",
224
+ "use": "Contorno do círculo de marcar como feito"
225
+ },
226
+ "badgeBg": {
227
+ "light": "#FFFFFF",
228
+ "dark": "#2E241D",
229
+ "use": "Fundo do selo (contador, aviso) sobre o fundo da tela"
230
+ },
231
+ "petA": {
232
+ "light": "#F3E4CF",
233
+ "dark": "#3A2D23",
234
+ "use": "Fundo A do retrato do pet (igual nas duas paletas)"
235
+ },
236
+ "petB": {
237
+ "light": "#E4EEDC",
238
+ "dark": "#2C3A27",
239
+ "use": "Fundo B do retrato do pet (igual nas duas paletas)"
240
+ },
241
+ "mLine": {
242
+ "light": "#231B17",
243
+ "dark": "#F4E4CC",
244
+ "use": "Linha do mascote"
245
+ },
246
+ "mInk": {
247
+ "light": "#231B17",
248
+ "dark": "#100C0A",
249
+ "use": "Olho e focinho do mascote"
250
+ }
251
+ },
252
+ "colorNeve": {
253
+ "neutralFill": {
254
+ "light": "#E5E5EA",
255
+ "dark": "#2C2C2E",
256
+ "use": "Preenchimento neutro da Nova XP: fundo dos botões secundários, chips e ícones em círculo"
257
+ },
258
+ "glass": {
259
+ "light": "rgba(255,255,255,0.62)",
260
+ "dark": "rgba(44,44,46,0.62)",
261
+ "use": "Vidro: botões e cartões translúcidos sobre o fundo (Nova XP). Junto com glassBorder e a sombra glass"
262
+ },
263
+ "glassBorder": {
264
+ "light": "#88888C",
265
+ "dark": "#68686D",
266
+ "use": "Borda de 1 pt do vidro"
267
+ },
268
+ "tabGlass": {
269
+ "light": "rgba(250,250,252,0.78)",
270
+ "dark": "rgba(28,28,30,0.80)",
271
+ "use": "Barra de abas em vidro (Nova XP)"
272
+ },
273
+ "checkLine": {
274
+ "light": "#8A8A8E",
275
+ "dark": "#8E8E93",
276
+ "use": "Contorno do círculo de marcar como feito"
277
+ },
278
+ "badgeBg": {
279
+ "light": "#FFFFFF",
280
+ "dark": "#2C2C2E",
281
+ "use": "Fundo do selo (contador, aviso) sobre o fundo da tela"
282
+ },
283
+ "petA": {
284
+ "light": "#F3E4CF",
285
+ "dark": "#3A2D23",
286
+ "use": "Fundo A do retrato do pet (igual nas duas paletas)"
287
+ },
288
+ "petB": {
289
+ "light": "#E4EEDC",
290
+ "dark": "#2C3A27",
291
+ "use": "Fundo B do retrato do pet (igual nas duas paletas)"
292
+ },
293
+ "mLine": {
294
+ "light": "#1C1C1E",
295
+ "dark": "#F4E4CC",
296
+ "use": "Linha do mascote"
297
+ },
298
+ "mInk": {
299
+ "light": "#1C1C1E",
300
+ "dark": "#100C0A",
301
+ "use": "Olho e focinho do mascote"
302
+ },
303
+ "heroBackground": {
304
+ "light": "#E8D2E1",
305
+ "dark": "#46293F",
306
+ "use": "Círculo atrás dos mascotes"
307
+ },
308
+ "toastAction": {
309
+ "light": "#E6BFDB",
310
+ "dark": "#7A3F6E",
311
+ "use": "Ação do toast (Desfazer, Abrir)"
312
+ },
313
+ "background": {
314
+ "light": "#F5F5F7",
315
+ "dark": "#121214",
316
+ "use": "Fundo das telas"
317
+ },
318
+ "textPrimary": {
319
+ "light": "#1C1C1E",
320
+ "dark": "#F5F5F7",
321
+ "use": "Texto principal"
322
+ },
323
+ "textSecondary": {
324
+ "light": "#666669",
325
+ "dark": "#A1A1A6",
326
+ "use": "Texto de apoio, rótulos"
327
+ },
328
+ "tabIdle": {
329
+ "light": "#6E6E73",
330
+ "dark": "#A1A1A6",
331
+ "use": "Aba inativa"
332
+ },
333
+ "onAccent": {
334
+ "light": "#FFF8EE",
335
+ "dark": "#121214",
336
+ "use": "Texto sobre o destaque"
200
337
  }
201
338
  },
202
339
  "pet": {
@@ -287,6 +424,40 @@
287
424
  "tabLabel": {
288
425
  "size": 11,
289
426
  "weight": 500
427
+ },
428
+ "screenTitle": {
429
+ "size": 27,
430
+ "weight": 700,
431
+ "tracking": -0.01,
432
+ "lineHeight": 1.15,
433
+ "align": "leading"
434
+ },
435
+ "sheetTitle": {
436
+ "size": 22,
437
+ "weight": 700,
438
+ "lineHeight": 1.15
439
+ },
440
+ "nameLarge": {
441
+ "size": 17,
442
+ "weight": 600
443
+ },
444
+ "name": {
445
+ "size": 16,
446
+ "weight": 600
447
+ },
448
+ "support": {
449
+ "size": 15,
450
+ "weight": 400
451
+ },
452
+ "supportSmall": {
453
+ "size": 14,
454
+ "weight": 400
455
+ },
456
+ "label": {
457
+ "size": 13,
458
+ "weight": 600,
459
+ "tracking": 0.06,
460
+ "uppercase": true
290
461
  }
291
462
  }
292
463
  },
@@ -308,7 +479,8 @@
308
479
  "appIcon": {
309
480
  "radius": 22,
310
481
  "side": 96
311
- }
482
+ },
483
+ "surface": 22
312
484
  },
313
485
  "shadow": {
314
486
  "$description": "Valores do box-shadow do canvas (x = 0). Em SwiftUI o radius é blur / 2. Iguais no claro e no escuro.",
@@ -335,6 +507,54 @@
335
507
  "blur": 32,
336
508
  "color": "#231B17",
337
509
  "opacity": 0.18
510
+ },
511
+ "glass": {
512
+ "light": {
513
+ "y": 1,
514
+ "blur": 3,
515
+ "color": "#231B17",
516
+ "opacity": 0.15,
517
+ "ring": {
518
+ "width": 0.5,
519
+ "color": "#231B17",
520
+ "opacity": 0.06
521
+ }
522
+ },
523
+ "dark": {
524
+ "y": 1,
525
+ "blur": 3,
526
+ "color": "#000000",
527
+ "opacity": 0.35,
528
+ "ring": {
529
+ "width": 0.5,
530
+ "color": "#F7F1E8",
531
+ "opacity": 0.06
532
+ }
533
+ }
534
+ },
535
+ "glassNeve": {
536
+ "light": {
537
+ "y": 1,
538
+ "blur": 3,
539
+ "color": "#000000",
540
+ "opacity": 0.08,
541
+ "ring": {
542
+ "width": 0.5,
543
+ "color": "#000000",
544
+ "opacity": 0.06
545
+ }
546
+ },
547
+ "dark": {
548
+ "y": 1,
549
+ "blur": 3,
550
+ "color": "#000000",
551
+ "opacity": 0.4,
552
+ "ring": {
553
+ "width": 0.5,
554
+ "color": "#FFFFFF",
555
+ "opacity": 0.06
556
+ }
557
+ }
338
558
  }
339
559
  },
340
560
  "spacing": {
@@ -344,14 +564,28 @@
344
564
  "l": 16,
345
565
  "xl": 20,
346
566
  "xxl": 24,
347
- "screenPadding": 20
567
+ "screenPadding": 20,
568
+ "screenMargin": 24,
569
+ "block": 14
348
570
  },
349
571
  "size": {
350
572
  "minTouchTarget": 44,
351
573
  "primaryButtonHeight": 54,
352
574
  "avatarSmall": 24,
353
575
  "avatar": 48,
354
- "avatarLarge": 76
576
+ "avatarLarge": 76,
577
+ "rowHome": 98,
578
+ "rowList": 76,
579
+ "rowForm": 52,
580
+ "rowDetail": 44,
581
+ "glassButton": 54,
582
+ "roundButton": 44,
583
+ "chip": 36,
584
+ "checkCircle": 26,
585
+ "iconCircleS": 32,
586
+ "iconCircleM": 36,
587
+ "iconCircleL": 44,
588
+ "toast": 56
355
589
  },
356
590
  "pdf": {
357
591
  "rule": "O PDF usa sempre os valores claros dos tokens, nunca o tema do aparelho."
@@ -197,6 +197,143 @@
197
197
  "light": "#F6F7FC",
198
198
  "dark": "#33292A",
199
199
  "use": "Fundo de um aviso não lido na central de notificações"
200
+ },
201
+ "neutralFill": {
202
+ "light": "#F3E4CF",
203
+ "dark": "#3A2D23",
204
+ "use": "Preenchimento neutro da Nova XP: fundo dos botões secundários, chips e ícones em círculo"
205
+ },
206
+ "glass": {
207
+ "light": "rgba(255,253,249,0.62)",
208
+ "dark": "rgba(46,36,29,0.62)",
209
+ "use": "Vidro: botões e cartões translúcidos sobre o fundo (Nova XP). Junto com glassBorder e a sombra glass"
210
+ },
211
+ "glassBorder": {
212
+ "light": "#958373",
213
+ "dark": "#806E5E",
214
+ "use": "Borda de 1 pt do vidro"
215
+ },
216
+ "tabGlass": {
217
+ "light": "rgba(255,253,249,0.78)",
218
+ "dark": "rgba(27,21,17,0.80)",
219
+ "use": "Barra de abas em vidro (Nova XP)"
220
+ },
221
+ "checkLine": {
222
+ "light": "#7D6858",
223
+ "dark": "#A08B78",
224
+ "use": "Contorno do círculo de marcar como feito"
225
+ },
226
+ "badgeBg": {
227
+ "light": "#FFFFFF",
228
+ "dark": "#2E241D",
229
+ "use": "Fundo do selo (contador, aviso) sobre o fundo da tela"
230
+ },
231
+ "petA": {
232
+ "light": "#F3E4CF",
233
+ "dark": "#3A2D23",
234
+ "use": "Fundo A do retrato do pet (igual nas duas paletas)"
235
+ },
236
+ "petB": {
237
+ "light": "#E4EEDC",
238
+ "dark": "#2C3A27",
239
+ "use": "Fundo B do retrato do pet (igual nas duas paletas)"
240
+ },
241
+ "mLine": {
242
+ "light": "#231B17",
243
+ "dark": "#F4E4CC",
244
+ "use": "Linha do mascote"
245
+ },
246
+ "mInk": {
247
+ "light": "#231B17",
248
+ "dark": "#100C0A",
249
+ "use": "Olho e focinho do mascote"
250
+ }
251
+ },
252
+ "colorNeve": {
253
+ "neutralFill": {
254
+ "light": "#E5E5EA",
255
+ "dark": "#2C2C2E",
256
+ "use": "Preenchimento neutro da Nova XP: fundo dos botões secundários, chips e ícones em círculo"
257
+ },
258
+ "glass": {
259
+ "light": "rgba(255,255,255,0.62)",
260
+ "dark": "rgba(44,44,46,0.62)",
261
+ "use": "Vidro: botões e cartões translúcidos sobre o fundo (Nova XP). Junto com glassBorder e a sombra glass"
262
+ },
263
+ "glassBorder": {
264
+ "light": "#88888C",
265
+ "dark": "#68686D",
266
+ "use": "Borda de 1 pt do vidro"
267
+ },
268
+ "tabGlass": {
269
+ "light": "rgba(250,250,252,0.78)",
270
+ "dark": "rgba(28,28,30,0.80)",
271
+ "use": "Barra de abas em vidro (Nova XP)"
272
+ },
273
+ "checkLine": {
274
+ "light": "#8A8A8E",
275
+ "dark": "#8E8E93",
276
+ "use": "Contorno do círculo de marcar como feito"
277
+ },
278
+ "badgeBg": {
279
+ "light": "#FFFFFF",
280
+ "dark": "#2C2C2E",
281
+ "use": "Fundo do selo (contador, aviso) sobre o fundo da tela"
282
+ },
283
+ "petA": {
284
+ "light": "#F3E4CF",
285
+ "dark": "#3A2D23",
286
+ "use": "Fundo A do retrato do pet (igual nas duas paletas)"
287
+ },
288
+ "petB": {
289
+ "light": "#E4EEDC",
290
+ "dark": "#2C3A27",
291
+ "use": "Fundo B do retrato do pet (igual nas duas paletas)"
292
+ },
293
+ "mLine": {
294
+ "light": "#1C1C1E",
295
+ "dark": "#F4E4CC",
296
+ "use": "Linha do mascote"
297
+ },
298
+ "mInk": {
299
+ "light": "#1C1C1E",
300
+ "dark": "#100C0A",
301
+ "use": "Olho e focinho do mascote"
302
+ },
303
+ "heroBackground": {
304
+ "light": "#E3E6F5",
305
+ "dark": "#2A2E45",
306
+ "use": "Círculo atrás dos mascotes"
307
+ },
308
+ "toastAction": {
309
+ "light": "#B7C0EE",
310
+ "dark": "#3E4C8A",
311
+ "use": "Ação do toast (Desfazer, Abrir)"
312
+ },
313
+ "background": {
314
+ "light": "#F5F5F7",
315
+ "dark": "#121214",
316
+ "use": "Fundo das telas"
317
+ },
318
+ "textPrimary": {
319
+ "light": "#1C1C1E",
320
+ "dark": "#F5F5F7",
321
+ "use": "Texto principal"
322
+ },
323
+ "textSecondary": {
324
+ "light": "#666669",
325
+ "dark": "#A1A1A6",
326
+ "use": "Texto de apoio, rótulos"
327
+ },
328
+ "tabIdle": {
329
+ "light": "#6E6E73",
330
+ "dark": "#A1A1A6",
331
+ "use": "Aba inativa"
332
+ },
333
+ "onAccent": {
334
+ "light": "#FFF8EE",
335
+ "dark": "#121214",
336
+ "use": "Texto sobre o destaque"
200
337
  }
201
338
  },
202
339
  "pet": {
@@ -287,6 +424,40 @@
287
424
  "tabLabel": {
288
425
  "size": 11,
289
426
  "weight": 500
427
+ },
428
+ "screenTitle": {
429
+ "size": 27,
430
+ "weight": 700,
431
+ "tracking": -0.01,
432
+ "lineHeight": 1.15,
433
+ "align": "leading"
434
+ },
435
+ "sheetTitle": {
436
+ "size": 22,
437
+ "weight": 700,
438
+ "lineHeight": 1.15
439
+ },
440
+ "nameLarge": {
441
+ "size": 17,
442
+ "weight": 600
443
+ },
444
+ "name": {
445
+ "size": 16,
446
+ "weight": 600
447
+ },
448
+ "support": {
449
+ "size": 15,
450
+ "weight": 400
451
+ },
452
+ "supportSmall": {
453
+ "size": 14,
454
+ "weight": 400
455
+ },
456
+ "label": {
457
+ "size": 13,
458
+ "weight": 600,
459
+ "tracking": 0.06,
460
+ "uppercase": true
290
461
  }
291
462
  }
292
463
  },
@@ -308,7 +479,8 @@
308
479
  "appIcon": {
309
480
  "radius": 22,
310
481
  "side": 96
311
- }
482
+ },
483
+ "surface": 22
312
484
  },
313
485
  "shadow": {
314
486
  "$description": "Valores do box-shadow do canvas (x = 0). Em SwiftUI o radius é blur / 2. Iguais no claro e no escuro.",
@@ -335,6 +507,54 @@
335
507
  "blur": 32,
336
508
  "color": "#231B17",
337
509
  "opacity": 0.18
510
+ },
511
+ "glass": {
512
+ "light": {
513
+ "y": 1,
514
+ "blur": 3,
515
+ "color": "#231B17",
516
+ "opacity": 0.15,
517
+ "ring": {
518
+ "width": 0.5,
519
+ "color": "#231B17",
520
+ "opacity": 0.06
521
+ }
522
+ },
523
+ "dark": {
524
+ "y": 1,
525
+ "blur": 3,
526
+ "color": "#000000",
527
+ "opacity": 0.35,
528
+ "ring": {
529
+ "width": 0.5,
530
+ "color": "#F7F1E8",
531
+ "opacity": 0.06
532
+ }
533
+ }
534
+ },
535
+ "glassNeve": {
536
+ "light": {
537
+ "y": 1,
538
+ "blur": 3,
539
+ "color": "#000000",
540
+ "opacity": 0.08,
541
+ "ring": {
542
+ "width": 0.5,
543
+ "color": "#000000",
544
+ "opacity": 0.06
545
+ }
546
+ },
547
+ "dark": {
548
+ "y": 1,
549
+ "blur": 3,
550
+ "color": "#000000",
551
+ "opacity": 0.4,
552
+ "ring": {
553
+ "width": 0.5,
554
+ "color": "#FFFFFF",
555
+ "opacity": 0.06
556
+ }
557
+ }
338
558
  }
339
559
  },
340
560
  "spacing": {
@@ -344,14 +564,28 @@
344
564
  "l": 16,
345
565
  "xl": 20,
346
566
  "xxl": 24,
347
- "screenPadding": 20
567
+ "screenPadding": 20,
568
+ "screenMargin": 24,
569
+ "block": 14
348
570
  },
349
571
  "size": {
350
572
  "minTouchTarget": 44,
351
573
  "primaryButtonHeight": 54,
352
574
  "avatarSmall": 24,
353
575
  "avatar": 48,
354
- "avatarLarge": 76
576
+ "avatarLarge": 76,
577
+ "rowHome": 98,
578
+ "rowList": 76,
579
+ "rowForm": 52,
580
+ "rowDetail": 44,
581
+ "glassButton": 54,
582
+ "roundButton": 44,
583
+ "chip": 36,
584
+ "checkCircle": 26,
585
+ "iconCircleS": 32,
586
+ "iconCircleM": 36,
587
+ "iconCircleL": 44,
588
+ "toast": 56
355
589
  },
356
590
  "pdf": {
357
591
  "rule": "O PDF usa sempre os valores claros dos tokens, nunca o tema do aparelho."
@@ -45,7 +45,17 @@
45
45
  "bannerBackground": "rgba(255,253,249,.92)",
46
46
  "previewBackdrop": "#EDE3D6",
47
47
  "themePreviewCard": "rgba(169,84,31,.35)",
48
- "unreadBackground": "#F6F7FC"
48
+ "unreadBackground": "#F6F7FC",
49
+ "neutralFill": "#F3E4CF",
50
+ "glass": "rgba(255,253,249,0.62)",
51
+ "glassBorder": "#958373",
52
+ "tabGlass": "rgba(255,253,249,0.78)",
53
+ "checkLine": "#7D6858",
54
+ "badgeBg": "#FFFFFF",
55
+ "petA": "#F3E4CF",
56
+ "petB": "#E4EEDC",
57
+ "mLine": "#231B17",
58
+ "mInk": "#231B17"
49
59
  },
50
60
  "dark": {
51
61
  "background": "#231B17",
@@ -85,7 +95,17 @@
85
95
  "bannerBackground": "rgba(46,36,29,.92)",
86
96
  "previewBackdrop": "#1B1511",
87
97
  "themePreviewCard": "rgba(169,84,31,.35)",
88
- "unreadBackground": "#33292A"
98
+ "unreadBackground": "#33292A",
99
+ "neutralFill": "#3A2D23",
100
+ "glass": "rgba(46,36,29,0.62)",
101
+ "glassBorder": "#806E5E",
102
+ "tabGlass": "rgba(27,21,17,0.80)",
103
+ "checkLine": "#A08B78",
104
+ "badgeBg": "#2E241D",
105
+ "petA": "#3A2D23",
106
+ "petB": "#2C3A27",
107
+ "mLine": "#F4E4CC",
108
+ "mInk": "#100C0A"
89
109
  },
90
110
  "pet": {
91
111
  "avatars": [
@@ -176,6 +196,40 @@
176
196
  "tabLabel": {
177
197
  "size": 11,
178
198
  "weight": 500
199
+ },
200
+ "screenTitle": {
201
+ "size": 27,
202
+ "weight": 700,
203
+ "tracking": -0.01,
204
+ "lineHeight": 1.15,
205
+ "align": "leading"
206
+ },
207
+ "sheetTitle": {
208
+ "size": 22,
209
+ "weight": 700,
210
+ "lineHeight": 1.15
211
+ },
212
+ "nameLarge": {
213
+ "size": 17,
214
+ "weight": 600
215
+ },
216
+ "name": {
217
+ "size": 16,
218
+ "weight": 600
219
+ },
220
+ "support": {
221
+ "size": 15,
222
+ "weight": 400
223
+ },
224
+ "supportSmall": {
225
+ "size": 14,
226
+ "weight": 400
227
+ },
228
+ "label": {
229
+ "size": 13,
230
+ "weight": 600,
231
+ "tracking": 0.06,
232
+ "uppercase": true
179
233
  }
180
234
  },
181
235
  "radius": {
@@ -195,7 +249,8 @@
195
249
  "appIcon": {
196
250
  "radius": 22,
197
251
  "side": 96
198
- }
252
+ },
253
+ "surface": 22
199
254
  },
200
255
  "shadow": {
201
256
  "knob": {
@@ -223,6 +278,32 @@
223
278
  "opacity": 0.18
224
279
  }
225
280
  },
281
+ "shadowMode": {
282
+ "glass": {
283
+ "light": {
284
+ "y": 1,
285
+ "blur": 3,
286
+ "color": "#231B17",
287
+ "opacity": 0.15,
288
+ "ring": {
289
+ "width": 0.5,
290
+ "color": "#231B17",
291
+ "opacity": 0.06
292
+ }
293
+ },
294
+ "dark": {
295
+ "y": 1,
296
+ "blur": 3,
297
+ "color": "#000000",
298
+ "opacity": 0.35,
299
+ "ring": {
300
+ "width": 0.5,
301
+ "color": "#F7F1E8",
302
+ "opacity": 0.06
303
+ }
304
+ }
305
+ }
306
+ },
226
307
  "spacing": {
227
308
  "xs": 4,
228
309
  "s": 8,
@@ -230,14 +311,28 @@
230
311
  "l": 16,
231
312
  "xl": 20,
232
313
  "xxl": 24,
233
- "screenPadding": 20
314
+ "screenPadding": 20,
315
+ "screenMargin": 24,
316
+ "block": 14
234
317
  },
235
318
  "size": {
236
319
  "minTouchTarget": 44,
237
320
  "primaryButtonHeight": 54,
238
321
  "avatarSmall": 24,
239
322
  "avatar": 48,
240
- "avatarLarge": 76
323
+ "avatarLarge": 76,
324
+ "rowHome": 98,
325
+ "rowList": 76,
326
+ "rowForm": 52,
327
+ "rowDetail": 44,
328
+ "glassButton": 54,
329
+ "roundButton": 44,
330
+ "chip": 36,
331
+ "checkCircle": 26,
332
+ "iconCircleS": 32,
333
+ "iconCircleM": 36,
334
+ "iconCircleL": 44,
335
+ "toast": 56
241
336
  },
242
337
  "component": {
243
338
  "button": {
@@ -107,6 +107,26 @@ public enum ToskiColors {
107
107
  public static let themePreviewCard = dynamic(light: 0xA9541F, lightAlpha: 0.35, dark: 0xA9541F, darkAlpha: 0.35)
108
108
  /// Fundo de um aviso não lido na central de notificações
109
109
  public static let unreadBackground = dynamic(light: 0xF6F7FC, dark: 0x33292A)
110
+ /// Preenchimento neutro da Nova XP: fundo dos botões secundários, chips e ícones em círculo
111
+ public static let neutralFill = dynamic(light: 0xF3E4CF, dark: 0x3A2D23)
112
+ /// Vidro: botões e cartões translúcidos sobre o fundo (Nova XP). Junto com glassBorder e a sombra glass
113
+ public static let glass = dynamic(light: 0xFFFDF9, lightAlpha: 0.62, dark: 0x2E241D, darkAlpha: 0.62)
114
+ /// Borda de 1 pt do vidro
115
+ public static let glassBorder = dynamic(light: 0x958373, dark: 0x806E5E)
116
+ /// Barra de abas em vidro (Nova XP)
117
+ public static let tabGlass = dynamic(light: 0xFFFDF9, lightAlpha: 0.78, dark: 0x1B1511, darkAlpha: 0.8)
118
+ /// Contorno do círculo de marcar como feito
119
+ public static let checkLine = dynamic(light: 0x7D6858, dark: 0xA08B78)
120
+ /// Fundo do selo (contador, aviso) sobre o fundo da tela
121
+ public static let badgeBg = dynamic(light: 0xFFFFFF, dark: 0x2E241D)
122
+ /// Fundo A do retrato do pet (igual nas duas paletas)
123
+ public static let petA = dynamic(light: 0xF3E4CF, dark: 0x3A2D23)
124
+ /// Fundo B do retrato do pet (igual nas duas paletas)
125
+ public static let petB = dynamic(light: 0xE4EEDC, dark: 0x2C3A27)
126
+ /// Linha do mascote
127
+ public static let mLine = dynamic(light: 0x231B17, dark: 0xF4E4CC)
128
+ /// Olho e focinho do mascote
129
+ public static let mInk = dynamic(light: 0x231B17, dark: 0x100C0A)
110
130
 
111
131
  // MARK: Pets
112
132
 
@@ -198,6 +218,8 @@ public enum ToskiRadius {
198
218
  public static let appIconSide: CGFloat = 96
199
219
  /// Raio do ícone para um lado qualquer (proporcional ao de referência).
200
220
  public static func appIcon(side: CGFloat) -> CGFloat { side * appIconRadius / appIconSide }
221
+ /// Raio único da Nova XP: botões, selos, campos, toasts e folhas
222
+ public static let surface: CGFloat = 22
201
223
  }
202
224
 
203
225
  /// Valores do box-shadow do canvas (x = 0). Em SwiftUI o radius é blur / 2. Iguais no claro e no escuro.
@@ -215,6 +237,28 @@ public enum ToskiShadow {
215
237
  public static let raised = Style(y: 1, blur: 3, color: ToskiColors.fixed(0x231B17), opacity: 0.15)
216
238
  public static let floating = Style(y: 8, blur: 24, color: ToskiColors.fixed(0x231B17), opacity: 0.22)
217
239
  public static let sheet = Style(y: -8, blur: 32, color: ToskiColors.fixed(0x231B17), opacity: 0.18)
240
+
241
+ /// Anel de contorno fino que acompanha uma sombra (SwiftUI: .overlay(shape.stroke(color.opacity(opacity), lineWidth: width))).
242
+ public struct Ring: Sendable {
243
+ public let width: CGFloat
244
+ public let color: Color
245
+ public let opacity: Double
246
+ }
247
+
248
+ /// Sombra com o anel de contorno.
249
+ public struct Layered: Sendable {
250
+ public let shadow: Style
251
+ public let ring: Ring
252
+ }
253
+
254
+ /// Sombra que muda entre o claro e o escuro. Sombras que mudam entre o claro e o escuro (as de shadow são iguais nos dois). Sombra {y, blur, color, opacity} mais um anel de ring.width pt. Em SwiftUI o radius é blur / 2. A paleta Neve tem a sua em palettes.neve.
255
+ public struct ByMode: Sendable {
256
+ public let light: Layered
257
+ public let dark: Layered
258
+ }
259
+
260
+ public static let glass = ByMode(light: Layered(shadow: Style(y: 1, blur: 3, color: ToskiColors.fixed(0x231B17), opacity: 0.15), ring: Ring(width: 0.5, color: ToskiColors.fixed(0x231B17), opacity: 0.06)), dark: Layered(shadow: Style(y: 1, blur: 3, color: ToskiColors.fixed(0x000000), opacity: 0.35), ring: Ring(width: 0.5, color: ToskiColors.fixed(0xF7F1E8), opacity: 0.06)))
261
+ public static let glassNeve = ByMode(light: Layered(shadow: Style(y: 1, blur: 3, color: ToskiColors.fixed(0x000000), opacity: 0.08), ring: Ring(width: 0.5, color: ToskiColors.fixed(0x000000), opacity: 0.06)), dark: Layered(shadow: Style(y: 1, blur: 3, color: ToskiColors.fixed(0x000000), opacity: 0.4), ring: Ring(width: 0.5, color: ToskiColors.fixed(0xFFFFFF), opacity: 0.06)))
218
262
  }
219
263
 
220
264
  public enum ToskiSpacing {
@@ -225,6 +269,8 @@ public enum ToskiSpacing {
225
269
  public static let xl: CGFloat = 20
226
270
  public static let xxl: CGFloat = 24
227
271
  public static let screenPadding: CGFloat = 20
272
+ public static let screenMargin: CGFloat = 24
273
+ public static let block: CGFloat = 14
228
274
  }
229
275
 
230
276
  public enum ToskiSize {
@@ -233,6 +279,18 @@ public enum ToskiSize {
233
279
  public static let avatarSmall: CGFloat = 24
234
280
  public static let avatar: CGFloat = 48
235
281
  public static let avatarLarge: CGFloat = 76
282
+ public static let rowHome: CGFloat = 98
283
+ public static let rowList: CGFloat = 76
284
+ public static let rowForm: CGFloat = 52
285
+ public static let rowDetail: CGFloat = 44
286
+ public static let glassButton: CGFloat = 54
287
+ public static let roundButton: CGFloat = 44
288
+ public static let chip: CGFloat = 36
289
+ public static let checkCircle: CGFloat = 26
290
+ public static let iconCircleS: CGFloat = 32
291
+ public static let iconCircleM: CGFloat = 36
292
+ public static let iconCircleL: CGFloat = 44
293
+ public static let toast: CGFloat = 56
236
294
  }
237
295
 
238
296
  public enum ToskiFont {
@@ -244,19 +302,33 @@ public enum ToskiFont {
244
302
  public let weight: Font.Weight
245
303
  /// Espaçamento entre letras em em (multiplique pelo tamanho para pontos).
246
304
  public let tracking: CGFloat
305
+ /// Altura de linha em múltiplos do tamanho (1.15 = 115%). 0 = a do sistema.
306
+ public let lineHeight: CGFloat
247
307
  public let uppercase: Bool
308
+ public let alignment: TextAlignment
248
309
 
249
- public init(size: CGFloat, weight: Font.Weight, tracking: CGFloat = 0, uppercase: Bool = false) {
310
+ public init(
311
+ size: CGFloat,
312
+ weight: Font.Weight,
313
+ tracking: CGFloat = 0,
314
+ lineHeight: CGFloat = 0,
315
+ uppercase: Bool = false,
316
+ alignment: TextAlignment = .leading
317
+ ) {
250
318
  self.size = size
251
319
  self.weight = weight
252
320
  self.tracking = tracking
321
+ self.lineHeight = lineHeight
253
322
  self.uppercase = uppercase
323
+ self.alignment = alignment
254
324
  }
255
325
 
256
326
  /// Fonte Outfit que acompanha o Tamanho do Texto do sistema.
257
327
  public var font: Font { .custom(ToskiFont.family, size: size).weight(weight) }
258
328
  /// Tracking em pontos, para .tracking(_:).
259
329
  public var trackingPoints: CGFloat { tracking * size }
330
+ /// Altura de linha em pontos (0 = a do sistema).
331
+ public var lineHeightPoints: CGFloat { lineHeight * size }
260
332
  }
261
333
 
262
334
  public static let largeTitle = Style(size: 28, weight: .semibold, tracking: -0.01)
@@ -269,4 +341,11 @@ public enum ToskiFont {
269
341
  public static let sectionLabel = Style(size: 13, weight: .semibold, tracking: 0.06, uppercase: true)
270
342
  public static let caption = Style(size: 12, weight: .regular)
271
343
  public static let tabLabel = Style(size: 11, weight: .medium)
344
+ public static let screenTitle = Style(size: 27, weight: .bold, tracking: -0.01, lineHeight: 1.15, alignment: .leading)
345
+ public static let sheetTitle = Style(size: 22, weight: .bold, lineHeight: 1.15)
346
+ public static let nameLarge = Style(size: 17, weight: .semibold)
347
+ public static let name = Style(size: 16, weight: .semibold)
348
+ public static let support = Style(size: 15, weight: .regular)
349
+ public static let supportSmall = Style(size: 14, weight: .regular)
350
+ public static let label = Style(size: 13, weight: .semibold, tracking: 0.06, uppercase: true)
272
351
  }
@@ -0,0 +1,73 @@
1
+ // ToskiPaletteNeve.swift
2
+ // Gerado por scripts/build-tokens.ts a partir de tokens/tokens.json. Não edite à mão.
3
+ // Paleta: Neve. Só o que muda em relação ao ToskiColors (fundo, texto, neutros, vidro e mascote).
4
+ //
5
+ // Uso: Text("Olá").foregroundStyle(ToskiNevePalette.textPrimary)
6
+ // O destaque, critical, heroBackground e toastAction vêm do tema de produto (ToskiPawtaTheme) e do ToskiColors.
7
+ // onAccent: a paleta vence o tema (no escuro, a cor do texto sobre o destaque depende do fundo).
8
+ // A sombra do vidro desta paleta é ToskiShadow.glassNeve.
9
+
10
+ import SwiftUI
11
+ #if canImport(UIKit)
12
+ import UIKit
13
+ #elseif canImport(AppKit)
14
+ import AppKit
15
+ #endif
16
+
17
+ public enum ToskiNevePalette {
18
+ /// Fundo das telas
19
+ public static let background = dynamic(light: 0xF5F5F7, dark: 0x121214)
20
+ /// Texto principal
21
+ public static let textPrimary = dynamic(light: 0x1C1C1E, dark: 0xF5F5F7)
22
+ /// Texto de apoio, rótulos
23
+ public static let textSecondary = dynamic(light: 0x666669, dark: 0xA1A1A6)
24
+ /// Aba inativa
25
+ public static let tabIdle = dynamic(light: 0x6E6E73, dark: 0xA1A1A6)
26
+ /// Texto sobre o destaque
27
+ public static let onAccent = dynamic(light: 0xFFF8EE, dark: 0x121214)
28
+ /// Preenchimento neutro da Nova XP: fundo dos botões secundários, chips e ícones em círculo
29
+ public static let neutralFill = dynamic(light: 0xE5E5EA, dark: 0x2C2C2E)
30
+ /// Vidro: botões e cartões translúcidos sobre o fundo (Nova XP). Junto com glassBorder e a sombra glass
31
+ public static let glass = dynamic(light: 0xFFFFFF, lightAlpha: 0.62, dark: 0x2C2C2E, darkAlpha: 0.62)
32
+ /// Borda de 1 pt do vidro
33
+ public static let glassBorder = dynamic(light: 0x88888C, dark: 0x68686D)
34
+ /// Barra de abas em vidro (Nova XP)
35
+ public static let tabGlass = dynamic(light: 0xFAFAFC, lightAlpha: 0.78, dark: 0x1C1C1E, darkAlpha: 0.8)
36
+ /// Contorno do círculo de marcar como feito
37
+ public static let checkLine = dynamic(light: 0x8A8A8E, dark: 0x8E8E93)
38
+ /// Fundo do selo (contador, aviso) sobre o fundo da tela
39
+ public static let badgeBg = dynamic(light: 0xFFFFFF, dark: 0x2C2C2E)
40
+ /// Linha do mascote
41
+ public static let mLine = dynamic(light: 0x1C1C1E, dark: 0xF4E4CC)
42
+ /// Olho e focinho do mascote
43
+ public static let mInk = dynamic(light: 0x1C1C1E, dark: 0x100C0A)
44
+
45
+ // MARK: Auxiliares
46
+
47
+ private static func components(_ hex: UInt32) -> (CGFloat, CGFloat, CGFloat) {
48
+ (CGFloat((hex >> 16) & 0xFF) / 255, CGFloat((hex >> 8) & 0xFF) / 255, CGFloat(hex & 0xFF) / 255)
49
+ }
50
+
51
+ private static func fixed(_ hex: UInt32, alpha: CGFloat = 1) -> Color {
52
+ let (r, g, b) = components(hex)
53
+ return Color(.sRGB, red: r, green: g, blue: b, opacity: alpha)
54
+ }
55
+
56
+ private static func dynamic(light: UInt32, lightAlpha: CGFloat = 1, dark: UInt32, darkAlpha: CGFloat = 1) -> Color {
57
+ #if canImport(UIKit)
58
+ return Color(UIColor { traits in
59
+ let isDark = traits.userInterfaceStyle == .dark
60
+ let (r, g, b) = components(isDark ? dark : light)
61
+ return UIColor(red: r, green: g, blue: b, alpha: isDark ? darkAlpha : lightAlpha)
62
+ })
63
+ #elseif canImport(AppKit)
64
+ return Color(NSColor(name: nil) { appearance in
65
+ let isDark = appearance.bestMatch(from: [.darkAqua, .aqua]) == .darkAqua
66
+ let (r, g, b) = components(isDark ? dark : light)
67
+ return NSColor(srgbRed: r, green: g, blue: b, alpha: isDark ? darkAlpha : lightAlpha)
68
+ })
69
+ #else
70
+ return fixed(light, alpha: lightAlpha)
71
+ #endif
72
+ }
73
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toski-labs/ds",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "Toski DS — design system da Toski Labs: tokens (web, Tailwind CSS 4, SwiftUI) e componentes React.",
5
5
  "keywords": [
6
6
  "design-system",
@@ -45,6 +45,7 @@
45
45
  "./themes/*.css": "./build/css/themes/*.css",
46
46
  "./ToskiThemePawta.swift": "./build/swift/ToskiThemePawta.swift",
47
47
  "./ToskiThemeKoti.swift": "./build/swift/ToskiThemeKoti.swift",
48
+ "./ToskiPaletteNeve.swift": "./build/swift/ToskiPaletteNeve.swift",
48
49
  "./products/*": "./products/*",
49
50
  "./ToskiColors.swift": "./build/swift/ToskiColors.swift",
50
51
  "./ToskiTokens.swift": "./build/swift/ToskiTokens.swift",