@toski-labs/ds 0.6.0 → 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.
@@ -192,6 +192,148 @@
192
192
  "light": "rgba(62,76,138,.35)",
193
193
  "dark": "rgba(62,76,138,.35)",
194
194
  "use": "Cartões das miniaturas de tema (Aparência)"
195
+ },
196
+ "unreadBackground": {
197
+ "light": "#F6F7FC",
198
+ "dark": "#33292A",
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"
195
337
  }
196
338
  },
197
339
  "pet": {
@@ -282,6 +424,40 @@
282
424
  "tabLabel": {
283
425
  "size": 11,
284
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
285
461
  }
286
462
  }
287
463
  },
@@ -303,7 +479,8 @@
303
479
  "appIcon": {
304
480
  "radius": 22,
305
481
  "side": 96
306
- }
482
+ },
483
+ "surface": 22
307
484
  },
308
485
  "shadow": {
309
486
  "$description": "Valores do box-shadow do canvas (x = 0). Em SwiftUI o radius é blur / 2. Iguais no claro e no escuro.",
@@ -330,6 +507,54 @@
330
507
  "blur": 32,
331
508
  "color": "#231B17",
332
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
+ }
333
558
  }
334
559
  },
335
560
  "spacing": {
@@ -339,14 +564,28 @@
339
564
  "l": 16,
340
565
  "xl": 20,
341
566
  "xxl": 24,
342
- "screenPadding": 20
567
+ "screenPadding": 20,
568
+ "screenMargin": 24,
569
+ "block": 14
343
570
  },
344
571
  "size": {
345
572
  "minTouchTarget": 44,
346
573
  "primaryButtonHeight": 54,
347
574
  "avatarSmall": 24,
348
575
  "avatar": 48,
349
- "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
350
589
  },
351
590
  "pdf": {
352
591
  "rule": "O PDF usa sempre os valores claros dos tokens, nunca o tema do aparelho."
@@ -44,7 +44,18 @@
44
44
  "alertBackground": "#F7F1E8",
45
45
  "bannerBackground": "rgba(255,253,249,.92)",
46
46
  "previewBackdrop": "#EDE3D6",
47
- "themePreviewCard": "rgba(169,84,31,.35)"
47
+ "themePreviewCard": "rgba(169,84,31,.35)",
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"
48
59
  },
49
60
  "dark": {
50
61
  "background": "#231B17",
@@ -83,7 +94,18 @@
83
94
  "alertBackground": "#3A2D23",
84
95
  "bannerBackground": "rgba(46,36,29,.92)",
85
96
  "previewBackdrop": "#1B1511",
86
- "themePreviewCard": "rgba(169,84,31,.35)"
97
+ "themePreviewCard": "rgba(169,84,31,.35)",
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"
87
109
  },
88
110
  "pet": {
89
111
  "avatars": [
@@ -174,6 +196,40 @@
174
196
  "tabLabel": {
175
197
  "size": 11,
176
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
177
233
  }
178
234
  },
179
235
  "radius": {
@@ -193,7 +249,8 @@
193
249
  "appIcon": {
194
250
  "radius": 22,
195
251
  "side": 96
196
- }
252
+ },
253
+ "surface": 22
197
254
  },
198
255
  "shadow": {
199
256
  "knob": {
@@ -221,6 +278,32 @@
221
278
  "opacity": 0.18
222
279
  }
223
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
+ },
224
307
  "spacing": {
225
308
  "xs": 4,
226
309
  "s": 8,
@@ -228,14 +311,28 @@
228
311
  "l": 16,
229
312
  "xl": 20,
230
313
  "xxl": 24,
231
- "screenPadding": 20
314
+ "screenPadding": 20,
315
+ "screenMargin": 24,
316
+ "block": 14
232
317
  },
233
318
  "size": {
234
319
  "minTouchTarget": 44,
235
320
  "primaryButtonHeight": 54,
236
321
  "avatarSmall": 24,
237
322
  "avatar": 48,
238
- "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
239
336
  },
240
337
  "component": {
241
338
  "button": {
@@ -489,6 +586,7 @@
489
586
  "relogio": "clock",
490
587
  "remedio": "medicine",
491
588
  "repetir": "repeat",
589
+ "resumo": "summary",
492
590
  "spinner": "spinner",
493
591
  "tema": "theme",
494
592
  "tosa": "grooming",
@@ -213,6 +213,7 @@
213
213
  "clock",
214
214
  "medicine",
215
215
  "repeat",
216
+ "summary",
216
217
  "spinner",
217
218
  "theme",
218
219
  "grooming",
@@ -213,6 +213,7 @@
213
213
  "clock",
214
214
  "medicine",
215
215
  "repeat",
216
+ "summary",
216
217
  "spinner",
217
218
  "theme",
218
219
  "grooming",
@@ -213,6 +213,7 @@
213
213
  "clock",
214
214
  "medicine",
215
215
  "repeat",
216
+ "summary",
216
217
  "spinner",
217
218
  "theme",
218
219
  "grooming",
@@ -105,6 +105,28 @@ public enum ToskiColors {
105
105
  public static let previewBackdrop = dynamic(light: 0xEDE3D6, dark: 0x1B1511)
106
106
  /// Cartões das miniaturas de tema (Aparência)
107
107
  public static let themePreviewCard = dynamic(light: 0xA9541F, lightAlpha: 0.35, dark: 0xA9541F, darkAlpha: 0.35)
108
+ /// Fundo de um aviso não lido na central de notificações
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)
108
130
 
109
131
  // MARK: Pets
110
132
 
@@ -196,6 +218,8 @@ public enum ToskiRadius {
196
218
  public static let appIconSide: CGFloat = 96
197
219
  /// Raio do ícone para um lado qualquer (proporcional ao de referência).
198
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
199
223
  }
200
224
 
201
225
  /// Valores do box-shadow do canvas (x = 0). Em SwiftUI o radius é blur / 2. Iguais no claro e no escuro.
@@ -213,6 +237,28 @@ public enum ToskiShadow {
213
237
  public static let raised = Style(y: 1, blur: 3, color: ToskiColors.fixed(0x231B17), opacity: 0.15)
214
238
  public static let floating = Style(y: 8, blur: 24, color: ToskiColors.fixed(0x231B17), opacity: 0.22)
215
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)))
216
262
  }
217
263
 
218
264
  public enum ToskiSpacing {
@@ -223,6 +269,8 @@ public enum ToskiSpacing {
223
269
  public static let xl: CGFloat = 20
224
270
  public static let xxl: CGFloat = 24
225
271
  public static let screenPadding: CGFloat = 20
272
+ public static let screenMargin: CGFloat = 24
273
+ public static let block: CGFloat = 14
226
274
  }
227
275
 
228
276
  public enum ToskiSize {
@@ -231,6 +279,18 @@ public enum ToskiSize {
231
279
  public static let avatarSmall: CGFloat = 24
232
280
  public static let avatar: CGFloat = 48
233
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
234
294
  }
235
295
 
236
296
  public enum ToskiFont {
@@ -242,19 +302,33 @@ public enum ToskiFont {
242
302
  public let weight: Font.Weight
243
303
  /// Espaçamento entre letras em em (multiplique pelo tamanho para pontos).
244
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
245
307
  public let uppercase: Bool
308
+ public let alignment: TextAlignment
246
309
 
247
- 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
+ ) {
248
318
  self.size = size
249
319
  self.weight = weight
250
320
  self.tracking = tracking
321
+ self.lineHeight = lineHeight
251
322
  self.uppercase = uppercase
323
+ self.alignment = alignment
252
324
  }
253
325
 
254
326
  /// Fonte Outfit que acompanha o Tamanho do Texto do sistema.
255
327
  public var font: Font { .custom(ToskiFont.family, size: size).weight(weight) }
256
328
  /// Tracking em pontos, para .tracking(_:).
257
329
  public var trackingPoints: CGFloat { tracking * size }
330
+ /// Altura de linha em pontos (0 = a do sistema).
331
+ public var lineHeightPoints: CGFloat { lineHeight * size }
258
332
  }
259
333
 
260
334
  public static let largeTitle = Style(size: 28, weight: .semibold, tracking: -0.01)
@@ -267,4 +341,11 @@ public enum ToskiFont {
267
341
  public static let sectionLabel = Style(size: 13, weight: .semibold, tracking: 0.06, uppercase: true)
268
342
  public static let caption = Style(size: 12, weight: .regular)
269
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)
270
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
+ }