@toski-labs/ds 0.6.1 → 0.8.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 +96 -0
- package/build/css/theme.css +0 -1
- package/build/css/tokens.css +0 -3
- package/build/json/app-tokens.json +228 -122
- package/build/json/app-tokens.koti.json +229 -123
- package/build/json/app-tokens.pawta.json +228 -138
- package/build/json/mobile.json +98 -65
- package/build/json/web.json +0 -2
- package/build/json/web.koti.json +0 -2
- package/build/json/web.pawta.json +0 -18
- package/build/swift/ToskiColors.swift +98 -92
- package/build/swift/ToskiPaletteNeve.swift +73 -0
- package/build/swift/ToskiThemeKoti.swift +0 -6
- package/build/swift/ToskiThemePawta.swift +0 -16
- package/dist/generated/tokens.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"critical-bg": "#F8E0D4",
|
|
23
23
|
"critical-line": "#EBC0AA",
|
|
24
24
|
"success": "#3F6E3B",
|
|
25
|
-
"success-bg": "#E4EEDC",
|
|
26
25
|
"segment": "#FFFFFF",
|
|
27
26
|
"tabbar": "#FFFDF9",
|
|
28
27
|
"tab-idle": "#7D6858",
|
|
@@ -49,7 +48,6 @@
|
|
|
49
48
|
"critical-bg": "#45261A",
|
|
50
49
|
"critical-line": "#6A3A26",
|
|
51
50
|
"success": "#9CC48F",
|
|
52
|
-
"success-bg": "#2C3A27",
|
|
53
51
|
"segment": "#4A3A2E",
|
|
54
52
|
"tabbar": "#1B1511",
|
|
55
53
|
"tab-idle": "#A08B78",
|
|
@@ -241,22 +239,6 @@
|
|
|
241
239
|
"lilas-claro": "#E3E6F5",
|
|
242
240
|
"circulo-icone": "#5C69A4"
|
|
243
241
|
},
|
|
244
|
-
"mascots": {
|
|
245
|
-
"dog": "#B88250",
|
|
246
|
-
"dogEar": "#6E4529",
|
|
247
|
-
"cat": "#7C8199",
|
|
248
|
-
"catEarInner": "#E8B4B0",
|
|
249
|
-
"catNose": "#D98C8C",
|
|
250
|
-
"outline": {
|
|
251
|
-
"light": "#231B17",
|
|
252
|
-
"dark": "#F4E4CC"
|
|
253
|
-
},
|
|
254
|
-
"eye": {
|
|
255
|
-
"light": "#231B17",
|
|
256
|
-
"dark": "#100C0A"
|
|
257
|
-
},
|
|
258
|
-
"description": "Contorno na cor oposta ao fundo; olhos e focinho escuros."
|
|
259
|
-
},
|
|
260
242
|
"assets": [
|
|
261
243
|
{
|
|
262
244
|
"name": "pawta-icon-light",
|
|
@@ -29,84 +29,60 @@ public enum ToskiColors {
|
|
|
29
29
|
// MARK: Semânticas — compartilhadas com a web
|
|
30
30
|
|
|
31
31
|
/// Fundo das telas
|
|
32
|
-
public static let background
|
|
32
|
+
public static let background = dynamic(light: 0xF7F1E8, dark: 0x231B17)
|
|
33
33
|
/// Cards, listas, campos
|
|
34
|
-
public static let surface
|
|
34
|
+
public static let surface = dynamic(light: 0xFFFFFF, dark: 0x2E241D)
|
|
35
35
|
/// Fundos suaves, caixas de ícone, chips
|
|
36
|
-
public static let tint
|
|
36
|
+
public static let tint = dynamic(light: 0xF3E4CF, dark: 0x3A2D23)
|
|
37
37
|
/// Círculo atrás da Paçoca
|
|
38
|
-
public static let heroBackground
|
|
38
|
+
public static let heroBackground = dynamic(light: 0xEFDCC2, dark: 0x33271F)
|
|
39
39
|
/// Texto principal
|
|
40
|
-
public static let textPrimary
|
|
40
|
+
public static let textPrimary = dynamic(light: 0x231B17, dark: 0xF7F1E8)
|
|
41
41
|
/// Texto de apoio, rótulos
|
|
42
|
-
public static let textSecondary
|
|
42
|
+
public static let textSecondary = dynamic(light: 0x6B5648, dark: 0xC2AE98)
|
|
43
43
|
/// Bordas e divisores
|
|
44
|
-
public static let border
|
|
44
|
+
public static let border = dynamic(light: 0xE6D8C4, dark: 0x43352B)
|
|
45
45
|
/// Botão principal, aba ativa, links
|
|
46
|
-
public static let accent
|
|
46
|
+
public static let accent = dynamic(light: 0xA9541F, dark: 0xDB9A5B)
|
|
47
47
|
/// Ferrugem escura (no escuro, caramelo claro): botão de texto da tela Erro, links ao passar o mouse
|
|
48
|
-
public static let accentDeep
|
|
48
|
+
public static let accentDeep = dynamic(light: 0x7E3C14, dark: 0xE8B27C)
|
|
49
49
|
/// Texto sobre o destaque
|
|
50
|
-
public static let onAccent
|
|
50
|
+
public static let onAccent = dynamic(light: 0xFFF8EE, dark: 0x231B17)
|
|
51
51
|
/// Atrasados, alertas, ações destrutivas
|
|
52
|
-
public static let critical
|
|
53
|
-
/// Fundo de alertas
|
|
54
|
-
public static let criticalBackground = dynamic(light: 0xF8E0D4, dark: 0x45261A)
|
|
55
|
-
/// Borda de cards atrasados
|
|
56
|
-
public static let criticalBorder = dynamic(light: 0xEBC0AA, dark: 0x6A3A26)
|
|
57
|
-
/// Em dia, concluído
|
|
58
|
-
public static let success = dynamic(light: 0x3F6E3B, dark: 0x9CC48F)
|
|
59
|
-
/// Fundo de status positivo
|
|
60
|
-
public static let successBackground = dynamic(light: 0xE4EEDC, dark: 0x2C3A27)
|
|
61
|
-
/// Opção selecionada do controle segmentado
|
|
62
|
-
public static let segmentSelected = dynamic(light: 0xFFFFFF, dark: 0x4A3A2E)
|
|
63
|
-
/// Barra de abas
|
|
64
|
-
public static let tabBar = dynamic(light: 0xFFFDF9, dark: 0x1B1511)
|
|
52
|
+
public static let critical = dynamic(light: 0xA3341A, dark: 0xF09A78)
|
|
65
53
|
/// Aba inativa
|
|
66
|
-
public static let tabIdle
|
|
54
|
+
public static let tabIdle = dynamic(light: 0x7D6858, dark: 0xA08B78)
|
|
67
55
|
|
|
68
56
|
// MARK: Semânticas — só do app
|
|
69
57
|
|
|
70
58
|
/// Texto sobre crítico
|
|
71
|
-
public static let onCritical
|
|
72
|
-
/// Interruptor desligado
|
|
73
|
-
public static let switchOff = dynamic(light: 0xDCCDB9, dark: 0x5A4A3D)
|
|
74
|
-
/// Fundo do toast (invertido)
|
|
75
|
-
public static let toastBackground = dynamic(light: 0x231B17, dark: 0xF7F1E8)
|
|
76
|
-
/// Texto do toast
|
|
77
|
-
public static let toastText = dynamic(light: 0xF7F1E8, dark: 0x231B17)
|
|
59
|
+
public static let onCritical = dynamic(light: 0xFFF8EE, dark: 0x231B17)
|
|
78
60
|
/// Ação do toast (Desfazer, Abrir)
|
|
79
|
-
public static let toastAction
|
|
61
|
+
public static let toastAction = dynamic(light: 0xE8B27C, dark: 0xA9541F)
|
|
80
62
|
/// Fundo atrás de painéis
|
|
81
|
-
public static let scrim
|
|
82
|
-
/// Texto e elementos apagados (dia fora do mês, texto miúdo do PDF)
|
|
83
|
-
public static let faint = dynamic(light: 0xB3A190, dark: 0x6E5D50)
|
|
63
|
+
public static let scrim = dynamic(light: 0x140E0A, lightAlpha: 0.45, dark: 0x140E0A, darkAlpha: 0.45)
|
|
84
64
|
/// Linhas finas internas (grade do gráfico, linhas do PDF)
|
|
85
|
-
public static let divider
|
|
86
|
-
///
|
|
87
|
-
public static let
|
|
88
|
-
///
|
|
89
|
-
public static let
|
|
90
|
-
///
|
|
91
|
-
public static let
|
|
92
|
-
///
|
|
93
|
-
public static let
|
|
94
|
-
///
|
|
95
|
-
public static let
|
|
96
|
-
/// Fundo do
|
|
97
|
-
public static let
|
|
98
|
-
///
|
|
99
|
-
public static let
|
|
100
|
-
/// Fundo do
|
|
101
|
-
public static let
|
|
102
|
-
///
|
|
103
|
-
public static let
|
|
104
|
-
///
|
|
105
|
-
public static let
|
|
106
|
-
/// Cartões das miniaturas de tema (Aparência)
|
|
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)
|
|
65
|
+
public static let divider = dynamic(light: 0xEDE3D6, dark: 0x43352B)
|
|
66
|
+
/// Preenchimento neutro da Nova XP: fundo dos botões secundários, chips e ícones em círculo
|
|
67
|
+
public static let neutralFill = dynamic(light: 0xF3E4CF, dark: 0x3A2D23)
|
|
68
|
+
/// Vidro: botões e cartões translúcidos sobre o fundo (Nova XP). Junto com glassBorder e a sombra glass
|
|
69
|
+
public static let glass = dynamic(light: 0xFFFDF9, lightAlpha: 0.62, dark: 0x2E241D, darkAlpha: 0.62)
|
|
70
|
+
/// Borda de 1 pt do vidro
|
|
71
|
+
public static let glassBorder = dynamic(light: 0x958373, dark: 0x806E5E)
|
|
72
|
+
/// Barra de abas em vidro (Nova XP)
|
|
73
|
+
public static let tabGlass = dynamic(light: 0xFFFDF9, lightAlpha: 0.78, dark: 0x1B1511, darkAlpha: 0.8)
|
|
74
|
+
/// Contorno do círculo de marcar como feito
|
|
75
|
+
public static let checkLine = dynamic(light: 0x7D6858, dark: 0xA08B78)
|
|
76
|
+
/// Fundo do selo (contador, aviso) sobre o fundo da tela
|
|
77
|
+
public static let badgeBg = dynamic(light: 0xFFFFFF, dark: 0x2E241D)
|
|
78
|
+
/// Fundo A do retrato do pet (igual nas duas paletas)
|
|
79
|
+
public static let petA = dynamic(light: 0xF3E4CF, dark: 0x3A2D23)
|
|
80
|
+
/// Fundo B do retrato do pet (igual nas duas paletas)
|
|
81
|
+
public static let petB = dynamic(light: 0xE4EEDC, dark: 0x2C3A27)
|
|
82
|
+
/// Linha do mascote
|
|
83
|
+
public static let mLine = dynamic(light: 0x231B17, dark: 0xF4E4CC)
|
|
84
|
+
/// Olho e focinho do mascote
|
|
85
|
+
public static let mInk = dynamic(light: 0x231B17, dark: 0x100C0A)
|
|
110
86
|
|
|
111
87
|
// MARK: Pets
|
|
112
88
|
|
|
@@ -167,37 +143,17 @@ public enum ToskiColors {
|
|
|
167
143
|
}
|
|
168
144
|
|
|
169
145
|
public enum ToskiRadius {
|
|
170
|
-
/// Caixa de ícone
|
|
171
|
-
public static let iconBox: CGFloat = 12
|
|
172
|
-
/// Botões
|
|
173
|
-
public static let button: CGFloat = 14
|
|
174
|
-
/// Cards
|
|
175
|
-
public static let card: CGFloat = 18
|
|
176
|
-
/// Painéis, faixas e painel inferior
|
|
177
|
-
public static let sheet: CGFloat = 28
|
|
178
|
-
/// Caixa de seleção
|
|
179
|
-
public static let checkbox: CGFloat = 7
|
|
180
|
-
/// Amostra de cor
|
|
181
|
-
public static let swatch: CGFloat = 3
|
|
182
146
|
/// Página do PDF
|
|
183
147
|
public static let pdfPage: CGFloat = 4
|
|
184
|
-
///
|
|
185
|
-
public static let
|
|
186
|
-
/// Botão de card
|
|
187
|
-
public static let buttonSmall: CGFloat = 12
|
|
188
|
-
/// Trilho do controle segmentado
|
|
189
|
-
public static let segmentTrack: CGFloat = 12
|
|
190
|
-
/// Campos
|
|
191
|
-
public static let input: CGFloat = 14
|
|
192
|
-
/// Tiles
|
|
193
|
-
public static let tile: CGFloat = 16
|
|
194
|
-
/// Aviso de notificação
|
|
195
|
-
public static let notification: CGFloat = 22
|
|
148
|
+
/// Alerta e miniaturas da Aparência
|
|
149
|
+
public static let inset: CGFloat = 14
|
|
196
150
|
/// Ícone do app: raio 22 num lado de referência 96 (escala com o lado)
|
|
197
151
|
public static let appIconRadius: CGFloat = 22
|
|
198
152
|
public static let appIconSide: CGFloat = 96
|
|
199
153
|
/// Raio do ícone para um lado qualquer (proporcional ao de referência).
|
|
200
154
|
public static func appIcon(side: CGFloat) -> CGFloat { side * appIconRadius / appIconSide }
|
|
155
|
+
/// Raio único da Nova XP: botões, selos, campos, toasts e folhas
|
|
156
|
+
public static let surface: CGFloat = 22
|
|
201
157
|
}
|
|
202
158
|
|
|
203
159
|
/// Valores do box-shadow do canvas (x = 0). Em SwiftUI o radius é blur / 2. Iguais no claro e no escuro.
|
|
@@ -215,16 +171,33 @@ public enum ToskiShadow {
|
|
|
215
171
|
public static let raised = Style(y: 1, blur: 3, color: ToskiColors.fixed(0x231B17), opacity: 0.15)
|
|
216
172
|
public static let floating = Style(y: 8, blur: 24, color: ToskiColors.fixed(0x231B17), opacity: 0.22)
|
|
217
173
|
public static let sheet = Style(y: -8, blur: 32, color: ToskiColors.fixed(0x231B17), opacity: 0.18)
|
|
174
|
+
|
|
175
|
+
/// Anel de contorno fino que acompanha uma sombra (SwiftUI: .overlay(shape.stroke(color.opacity(opacity), lineWidth: width))).
|
|
176
|
+
public struct Ring: Sendable {
|
|
177
|
+
public let width: CGFloat
|
|
178
|
+
public let color: Color
|
|
179
|
+
public let opacity: Double
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/// Sombra com o anel de contorno.
|
|
183
|
+
public struct Layered: Sendable {
|
|
184
|
+
public let shadow: Style
|
|
185
|
+
public let ring: Ring
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/// 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.
|
|
189
|
+
public struct ByMode: Sendable {
|
|
190
|
+
public let light: Layered
|
|
191
|
+
public let dark: Layered
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
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)))
|
|
195
|
+
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
196
|
}
|
|
219
197
|
|
|
220
198
|
public enum ToskiSpacing {
|
|
221
|
-
public static let
|
|
222
|
-
public static let
|
|
223
|
-
public static let m: CGFloat = 12
|
|
224
|
-
public static let l: CGFloat = 16
|
|
225
|
-
public static let xl: CGFloat = 20
|
|
226
|
-
public static let xxl: CGFloat = 24
|
|
227
|
-
public static let screenPadding: CGFloat = 20
|
|
199
|
+
public static let screenMargin: CGFloat = 24
|
|
200
|
+
public static let block: CGFloat = 14
|
|
228
201
|
}
|
|
229
202
|
|
|
230
203
|
public enum ToskiSize {
|
|
@@ -233,6 +206,18 @@ public enum ToskiSize {
|
|
|
233
206
|
public static let avatarSmall: CGFloat = 24
|
|
234
207
|
public static let avatar: CGFloat = 48
|
|
235
208
|
public static let avatarLarge: CGFloat = 76
|
|
209
|
+
public static let rowHome: CGFloat = 98
|
|
210
|
+
public static let rowList: CGFloat = 76
|
|
211
|
+
public static let rowForm: CGFloat = 52
|
|
212
|
+
public static let rowDetail: CGFloat = 44
|
|
213
|
+
public static let glassButton: CGFloat = 54
|
|
214
|
+
public static let roundButton: CGFloat = 44
|
|
215
|
+
public static let chip: CGFloat = 36
|
|
216
|
+
public static let checkCircle: CGFloat = 26
|
|
217
|
+
public static let iconCircleS: CGFloat = 32
|
|
218
|
+
public static let iconCircleM: CGFloat = 36
|
|
219
|
+
public static let iconCircleL: CGFloat = 44
|
|
220
|
+
public static let toast: CGFloat = 56
|
|
236
221
|
}
|
|
237
222
|
|
|
238
223
|
public enum ToskiFont {
|
|
@@ -244,19 +229,33 @@ public enum ToskiFont {
|
|
|
244
229
|
public let weight: Font.Weight
|
|
245
230
|
/// Espaçamento entre letras em em (multiplique pelo tamanho para pontos).
|
|
246
231
|
public let tracking: CGFloat
|
|
232
|
+
/// Altura de linha em múltiplos do tamanho (1.15 = 115%). 0 = a do sistema.
|
|
233
|
+
public let lineHeight: CGFloat
|
|
247
234
|
public let uppercase: Bool
|
|
235
|
+
public let alignment: TextAlignment
|
|
248
236
|
|
|
249
|
-
public init(
|
|
237
|
+
public init(
|
|
238
|
+
size: CGFloat,
|
|
239
|
+
weight: Font.Weight,
|
|
240
|
+
tracking: CGFloat = 0,
|
|
241
|
+
lineHeight: CGFloat = 0,
|
|
242
|
+
uppercase: Bool = false,
|
|
243
|
+
alignment: TextAlignment = .leading
|
|
244
|
+
) {
|
|
250
245
|
self.size = size
|
|
251
246
|
self.weight = weight
|
|
252
247
|
self.tracking = tracking
|
|
248
|
+
self.lineHeight = lineHeight
|
|
253
249
|
self.uppercase = uppercase
|
|
250
|
+
self.alignment = alignment
|
|
254
251
|
}
|
|
255
252
|
|
|
256
253
|
/// Fonte Outfit que acompanha o Tamanho do Texto do sistema.
|
|
257
254
|
public var font: Font { .custom(ToskiFont.family, size: size).weight(weight) }
|
|
258
255
|
/// Tracking em pontos, para .tracking(_:).
|
|
259
256
|
public var trackingPoints: CGFloat { tracking * size }
|
|
257
|
+
/// Altura de linha em pontos (0 = a do sistema).
|
|
258
|
+
public var lineHeightPoints: CGFloat { lineHeight * size }
|
|
260
259
|
}
|
|
261
260
|
|
|
262
261
|
public static let largeTitle = Style(size: 28, weight: .semibold, tracking: -0.01)
|
|
@@ -269,4 +268,11 @@ public enum ToskiFont {
|
|
|
269
268
|
public static let sectionLabel = Style(size: 13, weight: .semibold, tracking: 0.06, uppercase: true)
|
|
270
269
|
public static let caption = Style(size: 12, weight: .regular)
|
|
271
270
|
public static let tabLabel = Style(size: 11, weight: .medium)
|
|
271
|
+
public static let screenTitle = Style(size: 27, weight: .bold, tracking: -0.01, lineHeight: 1.15, alignment: .leading)
|
|
272
|
+
public static let sheetTitle = Style(size: 22, weight: .bold, lineHeight: 1.15)
|
|
273
|
+
public static let nameLarge = Style(size: 17, weight: .semibold)
|
|
274
|
+
public static let name = Style(size: 16, weight: .semibold)
|
|
275
|
+
public static let support = Style(size: 15, weight: .regular)
|
|
276
|
+
public static let supportSmall = Style(size: 14, weight: .regular)
|
|
277
|
+
public static let label = Style(size: 13, weight: .semibold, tracking: 0.06, uppercase: true)
|
|
272
278
|
}
|
|
@@ -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
|
+
}
|
|
@@ -34,12 +34,6 @@ public enum ToskiKotiTheme {
|
|
|
34
34
|
public static let onAccent = dynamic(light: 0xFFF8EE, dark: 0x231B17)
|
|
35
35
|
/// Ação do toast (Desfazer, Abrir)
|
|
36
36
|
public static let toastAction = dynamic(light: 0xE6BFDB, dark: 0x7A3F6E)
|
|
37
|
-
/// Cartão de destaque (plano de saúde, Fase 2)
|
|
38
|
-
public static let featureCard = dynamic(light: 0x7A3F6E, dark: 0x5E2F55)
|
|
39
|
-
/// Fundo do cadeado (recurso do Plus, pet congelado)
|
|
40
|
-
public static let lockBackground = dynamic(light: 0x8A5280, dark: 0x3A2436)
|
|
41
|
-
/// Cartões das miniaturas de tema (Aparência)
|
|
42
|
-
public static let themePreviewCard = dynamic(light: 0x7A3F6E, lightAlpha: 0.35, dark: 0x7A3F6E, darkAlpha: 0.35)
|
|
43
37
|
|
|
44
38
|
// MARK: Membros da casa
|
|
45
39
|
|
|
@@ -36,22 +36,6 @@ public enum ToskiPawtaTheme {
|
|
|
36
36
|
public static let onAccent = dynamic(light: 0xFFF8EE, dark: 0x231B17)
|
|
37
37
|
/// Ação do toast (Desfazer, Abrir)
|
|
38
38
|
public static let toastAction = dynamic(light: 0xB7C0EE, dark: 0x3E4C8A)
|
|
39
|
-
/// Cartão de destaque (plano de saúde, Fase 2)
|
|
40
|
-
public static let featureCard = dynamic(light: 0x3E4C8A, dark: 0x2C376A)
|
|
41
|
-
/// Fundo do cadeado (recurso do Plus, pet congelado)
|
|
42
|
-
public static let lockBackground = dynamic(light: 0x5C69A4, dark: 0x3A2D23)
|
|
43
|
-
/// Cartões das miniaturas de tema (Aparência)
|
|
44
|
-
public static let themePreviewCard = dynamic(light: 0x3E4C8A, lightAlpha: 0.35, dark: 0x3E4C8A, darkAlpha: 0.35)
|
|
45
|
-
|
|
46
|
-
// MARK: Mascotes
|
|
47
|
-
|
|
48
|
-
public static let dog = fixed(0xB88250)
|
|
49
|
-
public static let dogEar = fixed(0x6E4529)
|
|
50
|
-
public static let cat = fixed(0x7C8199)
|
|
51
|
-
public static let catEarInner = fixed(0xE8B4B0)
|
|
52
|
-
public static let catNose = fixed(0xD98C8C)
|
|
53
|
-
public static let outline = dynamic(light: 0x231B17, dark: 0xF4E4CC)
|
|
54
|
-
public static let eye = dynamic(light: 0x231B17, dark: 0x100C0A)
|
|
55
39
|
|
|
56
40
|
// MARK: Black Friday
|
|
57
41
|
|
|
@@ -21,7 +21,6 @@ export declare const tokens: {
|
|
|
21
21
|
readonly "critical-bg": "#F8E0D4";
|
|
22
22
|
readonly "critical-line": "#EBC0AA";
|
|
23
23
|
readonly success: "#3F6E3B";
|
|
24
|
-
readonly "success-bg": "#E4EEDC";
|
|
25
24
|
readonly segment: "#FFFFFF";
|
|
26
25
|
readonly tabbar: "#FFFDF9";
|
|
27
26
|
readonly "tab-idle": "#7D6858";
|
|
@@ -48,7 +47,6 @@ export declare const tokens: {
|
|
|
48
47
|
readonly "critical-bg": "#45261A";
|
|
49
48
|
readonly "critical-line": "#6A3A26";
|
|
50
49
|
readonly success: "#9CC48F";
|
|
51
|
-
readonly "success-bg": "#2C3A27";
|
|
52
50
|
readonly segment: "#4A3A2E";
|
|
53
51
|
readonly tabbar: "#1B1511";
|
|
54
52
|
readonly "tab-idle": "#A08B78";
|
package/dist/index.js
CHANGED
|
@@ -765,7 +765,6 @@ var x = {
|
|
|
765
765
|
"critical-bg": "#F8E0D4",
|
|
766
766
|
"critical-line": "#EBC0AA",
|
|
767
767
|
success: "#3F6E3B",
|
|
768
|
-
"success-bg": "#E4EEDC",
|
|
769
768
|
segment: "#FFFFFF",
|
|
770
769
|
tabbar: "#FFFDF9",
|
|
771
770
|
"tab-idle": "#7D6858",
|
|
@@ -792,7 +791,6 @@ var x = {
|
|
|
792
791
|
"critical-bg": "#45261A",
|
|
793
792
|
"critical-line": "#6A3A26",
|
|
794
793
|
success: "#9CC48F",
|
|
795
|
-
"success-bg": "#2C3A27",
|
|
796
794
|
segment: "#4A3A2E",
|
|
797
795
|
tabbar: "#1B1511",
|
|
798
796
|
"tab-idle": "#A08B78",
|