@ngx-smz/ui-kit 21.10.0-next.25 → 21.10.0-next.26
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/bin/smz-theme.mjs +134 -0
- package/fesm2022/ngx-smz-ui-kit.mjs +766 -25
- package/fesm2022/ngx-smz-ui-kit.mjs.map +1 -1
- package/package.json +5 -1
- package/tailwind.preset.js +13 -56
- package/themes/default.css +47 -19
- package/tokens/tailwind-tokens.cjs +66 -0
- package/tokens/theme-engine.cjs +534 -0
- package/tokens/theme.schema.json +1293 -0
- package/tokens/tokens.json +1264 -0
- package/types/ngx-smz-ui-kit.d.ts +672 -7
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef, InjectionToken, OnDestroy, EnvironmentProviders, AfterContentChecked, Type, ViewContainerRef, ElementRef } from '@angular/core';
|
|
2
|
+
import { TemplateRef, InjectionToken, OnDestroy, EnvironmentProviders, AfterContentChecked, Type, ViewContainerRef, ElementRef, Signal } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
import { Observable, Subject } from 'rxjs';
|
|
5
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
5
|
+
import { Overlay, OverlayRef } from '@angular/cdk/overlay';
|
|
6
6
|
import * as _ngx_smz_ui_kit from '@ngx-smz/ui-kit';
|
|
7
7
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
8
8
|
|
|
@@ -2454,25 +2454,690 @@ declare class SmzTreeSelectComponent extends SmzValueAccessor<any> implements On
|
|
|
2454
2454
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SmzTreeSelectComponent, "ui-tree-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "containerStyleClass": { "alias": "containerStyleClass"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "display": { "alias": "display"; "required": false; "isSignal": true; }; "filterInputAutoFocus": { "alias": "filterInputAutoFocus"; "required": false; "isSignal": true; }; }, {}, ["templates"], never, true, never>;
|
|
2455
2455
|
}
|
|
2456
2456
|
|
|
2457
|
+
/**
|
|
2458
|
+
* Modelo do catálogo de tokens do Design System SMZ.
|
|
2459
|
+
*
|
|
2460
|
+
* Este diretório é dado puro, sem dependência de Angular nem de DOM: é lido pelo motor de tema em runtime e,
|
|
2461
|
+
* em Node, pelo gerador (`scripts/build-design-tokens.mjs`) que produz o CSS padrão, as entradas do preset
|
|
2462
|
+
* Tailwind, o catálogo JSON, o JSON Schema e os tipos do arquivo de tema.
|
|
2463
|
+
*/
|
|
2464
|
+
type SmzTokenLayer = 'primitive' | 'semantic' | 'component';
|
|
2465
|
+
type SmzTokenType = 'color' | 'dimension' | 'fontFamily' | 'fontWeight' | 'number' | 'shadow' | 'duration' | 'string';
|
|
2466
|
+
type SmzThemeMode = 'light' | 'dark';
|
|
2467
|
+
type SmzDensity = 'compact' | 'normal' | 'comfortable';
|
|
2468
|
+
/** Valor por modo. Um token sem variação por modo usa uma string só. */
|
|
2469
|
+
interface SmzModeValue {
|
|
2470
|
+
light: string;
|
|
2471
|
+
dark: string;
|
|
2472
|
+
}
|
|
2473
|
+
/** Chave do `theme.extend` do Tailwind em que o utilitário do token é registrado. */
|
|
2474
|
+
type SmzTailwindThemeKey = 'colors' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'lineHeight' | 'height' | 'minHeight' | 'width' | 'minWidth' | 'padding' | 'gap' | 'borderRadius' | 'borderWidth' | 'boxShadow' | 'opacity' | 'transitionDuration' | 'zIndex';
|
|
2475
|
+
interface SmzTokenUtility {
|
|
2476
|
+
key: SmzTailwindThemeKey;
|
|
2477
|
+
/** Nome no Tailwind: `{ key: 'colors', name: 'ui-primary' }` gera `bg-ui-primary`, `text-ui-primary`… */
|
|
2478
|
+
name: string;
|
|
2479
|
+
}
|
|
2480
|
+
/**
|
|
2481
|
+
* Definição de um token (folha do catálogo). Os campos seguem a convenção `$` do formato W3C Design Tokens.
|
|
2482
|
+
*
|
|
2483
|
+
* `$value` é um valor CSS literal ou contém referências `{caminho.do.token}` a tokens da mesma camada ou da
|
|
2484
|
+
* anterior. Referência a primitivo é resolvida na geração; referência a semântico ou a componente vira `var(--…)`.
|
|
2485
|
+
*/
|
|
2486
|
+
interface SmzTokenDefinition {
|
|
2487
|
+
$type: SmzTokenType;
|
|
2488
|
+
$value: string | SmzModeValue;
|
|
2489
|
+
$description: string;
|
|
2490
|
+
/** Nome da variável CSS quando difere do derivado do caminho (preserva os `--smz-*` anteriores ao contrato). */
|
|
2491
|
+
$cssVar?: string;
|
|
2492
|
+
/**
|
|
2493
|
+
* Só para cor: variável legada em canais RGB (`37 99 235`) mantida em sincronia com o token.
|
|
2494
|
+
* No preset padrão o token é definido a partir dela, para que temas antigos (`theme.css`) continuem valendo.
|
|
2495
|
+
*/
|
|
2496
|
+
$legacyChannels?: string;
|
|
2497
|
+
/** Valores por densidade; `normal` é o próprio `$value`. */
|
|
2498
|
+
$density?: Partial<Record<Exclude<SmzDensity, 'normal'>, string>>;
|
|
2499
|
+
/** Utilitários Tailwind que expõem o token. */
|
|
2500
|
+
$utilities?: SmzTokenUtility[];
|
|
2501
|
+
/** Caminho do token de fundo com o qual esta cor de texto precisa ter contraste WCAG AA. */
|
|
2502
|
+
$contrast?: string;
|
|
2503
|
+
/** Componentes que o token afeta (para o catálogo, a busca do editor e as receitas). */
|
|
2504
|
+
$components?: string[];
|
|
2505
|
+
/** Token mantido por compatibilidade: mensagem com o substituto. */
|
|
2506
|
+
$deprecated?: string;
|
|
2507
|
+
}
|
|
2508
|
+
/** Árvore do catálogo: grupos aninhados até as definições. */
|
|
2509
|
+
interface SmzTokenGroup {
|
|
2510
|
+
[key: string]: SmzTokenGroup | SmzTokenDefinition;
|
|
2511
|
+
}
|
|
2512
|
+
/** Token já achatado, com caminho, camada e nome de variável resolvidos. */
|
|
2513
|
+
interface SmzCatalogToken extends SmzTokenDefinition {
|
|
2514
|
+
path: string;
|
|
2515
|
+
layer: SmzTokenLayer;
|
|
2516
|
+
cssVar: string;
|
|
2517
|
+
}
|
|
2518
|
+
declare function smzIsTokenDefinition(node: SmzTokenGroup | SmzTokenDefinition): node is SmzTokenDefinition;
|
|
2519
|
+
type TokenExtras = Omit<SmzTokenDefinition, '$type' | '$value' | '$description'>;
|
|
2520
|
+
/** Atalho para declarar um token: `token('color', '{blue.600}', 'Cor primária')`. */
|
|
2521
|
+
declare function token($type: SmzTokenType, $value: string | SmzModeValue, $description: string, extras?: TokenExtras): SmzTokenDefinition;
|
|
2522
|
+
|
|
2523
|
+
/** Camada primitiva do arquivo de tema: paletas e escalas brutas. */
|
|
2524
|
+
interface SmzPrimitiveTheme {
|
|
2525
|
+
/** Branco Padrão: `#ffffff`. */
|
|
2526
|
+
white?: string;
|
|
2527
|
+
/** Preto Padrão: `#000000`. */
|
|
2528
|
+
black?: string;
|
|
2529
|
+
slate?: {
|
|
2530
|
+
/** Slate 50 Padrão: `#f8fafc`. */
|
|
2531
|
+
'50'?: string;
|
|
2532
|
+
/** Slate 100 Padrão: `#f1f5f9`. */
|
|
2533
|
+
'100'?: string;
|
|
2534
|
+
/** Slate 200 Padrão: `#e2e8f0`. */
|
|
2535
|
+
'200'?: string;
|
|
2536
|
+
/** Slate 300 Padrão: `#cbd5e1`. */
|
|
2537
|
+
'300'?: string;
|
|
2538
|
+
/** Slate 400 Padrão: `#94a3b8`. */
|
|
2539
|
+
'400'?: string;
|
|
2540
|
+
/** Slate 500 Padrão: `#64748b`. */
|
|
2541
|
+
'500'?: string;
|
|
2542
|
+
/** Slate 600 Padrão: `#475569`. */
|
|
2543
|
+
'600'?: string;
|
|
2544
|
+
/** Slate 700 Padrão: `#334155`. */
|
|
2545
|
+
'700'?: string;
|
|
2546
|
+
/** Slate 800 Padrão: `#1e293b`. */
|
|
2547
|
+
'800'?: string;
|
|
2548
|
+
/** Slate 900 Padrão: `#0f172a`. */
|
|
2549
|
+
'900'?: string;
|
|
2550
|
+
/** Slate 950 Padrão: `#020617`. */
|
|
2551
|
+
'950'?: string;
|
|
2552
|
+
};
|
|
2553
|
+
gray?: {
|
|
2554
|
+
/** Gray 50 Padrão: `#f9fafb`. */
|
|
2555
|
+
'50'?: string;
|
|
2556
|
+
/** Gray 100 Padrão: `#f3f4f6`. */
|
|
2557
|
+
'100'?: string;
|
|
2558
|
+
/** Gray 200 Padrão: `#e5e7eb`. */
|
|
2559
|
+
'200'?: string;
|
|
2560
|
+
/** Gray 300 Padrão: `#d1d5db`. */
|
|
2561
|
+
'300'?: string;
|
|
2562
|
+
/** Gray 400 Padrão: `#9ca3af`. */
|
|
2563
|
+
'400'?: string;
|
|
2564
|
+
/** Gray 500 Padrão: `#6b7280`. */
|
|
2565
|
+
'500'?: string;
|
|
2566
|
+
/** Gray 600 Padrão: `#4b5563`. */
|
|
2567
|
+
'600'?: string;
|
|
2568
|
+
/** Gray 700 Padrão: `#374151`. */
|
|
2569
|
+
'700'?: string;
|
|
2570
|
+
/** Gray 800 Padrão: `#1f2937`. */
|
|
2571
|
+
'800'?: string;
|
|
2572
|
+
/** Gray 900 Padrão: `#111827`. */
|
|
2573
|
+
'900'?: string;
|
|
2574
|
+
/** Gray 950 Padrão: `#030712`. */
|
|
2575
|
+
'950'?: string;
|
|
2576
|
+
};
|
|
2577
|
+
blue?: {
|
|
2578
|
+
/** Blue 50 Padrão: `#eff6ff`. */
|
|
2579
|
+
'50'?: string;
|
|
2580
|
+
/** Blue 100 Padrão: `#dbeafe`. */
|
|
2581
|
+
'100'?: string;
|
|
2582
|
+
/** Blue 200 Padrão: `#bfdbfe`. */
|
|
2583
|
+
'200'?: string;
|
|
2584
|
+
/** Blue 300 Padrão: `#93c5fd`. */
|
|
2585
|
+
'300'?: string;
|
|
2586
|
+
/** Blue 400 Padrão: `#60a5fa`. */
|
|
2587
|
+
'400'?: string;
|
|
2588
|
+
/** Blue 500 Padrão: `#3b82f6`. */
|
|
2589
|
+
'500'?: string;
|
|
2590
|
+
/** Blue 600 Padrão: `#2563eb`. */
|
|
2591
|
+
'600'?: string;
|
|
2592
|
+
/** Blue 700 Padrão: `#1d4ed8`. */
|
|
2593
|
+
'700'?: string;
|
|
2594
|
+
/** Blue 800 Padrão: `#1e40af`. */
|
|
2595
|
+
'800'?: string;
|
|
2596
|
+
/** Blue 900 Padrão: `#1e3a8a`. */
|
|
2597
|
+
'900'?: string;
|
|
2598
|
+
/** Blue 950 Padrão: `#172554`. */
|
|
2599
|
+
'950'?: string;
|
|
2600
|
+
};
|
|
2601
|
+
red?: {
|
|
2602
|
+
/** Red 50 Padrão: `#fef2f2`. */
|
|
2603
|
+
'50'?: string;
|
|
2604
|
+
/** Red 100 Padrão: `#fee2e2`. */
|
|
2605
|
+
'100'?: string;
|
|
2606
|
+
/** Red 200 Padrão: `#fecaca`. */
|
|
2607
|
+
'200'?: string;
|
|
2608
|
+
/** Red 300 Padrão: `#fca5a5`. */
|
|
2609
|
+
'300'?: string;
|
|
2610
|
+
/** Red 400 Padrão: `#f87171`. */
|
|
2611
|
+
'400'?: string;
|
|
2612
|
+
/** Red 500 Padrão: `#ef4444`. */
|
|
2613
|
+
'500'?: string;
|
|
2614
|
+
/** Red 600 Padrão: `#dc2626`. */
|
|
2615
|
+
'600'?: string;
|
|
2616
|
+
/** Red 700 Padrão: `#b91c1c`. */
|
|
2617
|
+
'700'?: string;
|
|
2618
|
+
/** Red 800 Padrão: `#991b1b`. */
|
|
2619
|
+
'800'?: string;
|
|
2620
|
+
/** Red 900 Padrão: `#7f1d1d`. */
|
|
2621
|
+
'900'?: string;
|
|
2622
|
+
/** Red 950 Padrão: `#450a0a`. */
|
|
2623
|
+
'950'?: string;
|
|
2624
|
+
};
|
|
2625
|
+
green?: {
|
|
2626
|
+
/** Green 50 Padrão: `#f0fdf4`. */
|
|
2627
|
+
'50'?: string;
|
|
2628
|
+
/** Green 100 Padrão: `#dcfce7`. */
|
|
2629
|
+
'100'?: string;
|
|
2630
|
+
/** Green 200 Padrão: `#bbf7d0`. */
|
|
2631
|
+
'200'?: string;
|
|
2632
|
+
/** Green 300 Padrão: `#86efac`. */
|
|
2633
|
+
'300'?: string;
|
|
2634
|
+
/** Green 400 Padrão: `#4ade80`. */
|
|
2635
|
+
'400'?: string;
|
|
2636
|
+
/** Green 500 Padrão: `#22c55e`. */
|
|
2637
|
+
'500'?: string;
|
|
2638
|
+
/** Green 600 Padrão: `#16a34a`. */
|
|
2639
|
+
'600'?: string;
|
|
2640
|
+
/** Green 700 Padrão: `#15803d`. */
|
|
2641
|
+
'700'?: string;
|
|
2642
|
+
/** Green 800 Padrão: `#166534`. */
|
|
2643
|
+
'800'?: string;
|
|
2644
|
+
/** Green 900 Padrão: `#14532d`. */
|
|
2645
|
+
'900'?: string;
|
|
2646
|
+
/** Green 950 Padrão: `#052e16`. */
|
|
2647
|
+
'950'?: string;
|
|
2648
|
+
};
|
|
2649
|
+
amber?: {
|
|
2650
|
+
/** Amber 50 Padrão: `#fffbeb`. */
|
|
2651
|
+
'50'?: string;
|
|
2652
|
+
/** Amber 100 Padrão: `#fef3c7`. */
|
|
2653
|
+
'100'?: string;
|
|
2654
|
+
/** Amber 200 Padrão: `#fde68a`. */
|
|
2655
|
+
'200'?: string;
|
|
2656
|
+
/** Amber 300 Padrão: `#fcd34d`. */
|
|
2657
|
+
'300'?: string;
|
|
2658
|
+
/** Amber 400 Padrão: `#fbbf24`. */
|
|
2659
|
+
'400'?: string;
|
|
2660
|
+
/** Amber 500 Padrão: `#f59e0b`. */
|
|
2661
|
+
'500'?: string;
|
|
2662
|
+
/** Amber 600 Padrão: `#d97706`. */
|
|
2663
|
+
'600'?: string;
|
|
2664
|
+
/** Amber 700 Padrão: `#b45309`. */
|
|
2665
|
+
'700'?: string;
|
|
2666
|
+
/** Amber 800 Padrão: `#92400e`. */
|
|
2667
|
+
'800'?: string;
|
|
2668
|
+
/** Amber 900 Padrão: `#78350f`. */
|
|
2669
|
+
'900'?: string;
|
|
2670
|
+
/** Amber 950 Padrão: `#451a03`. */
|
|
2671
|
+
'950'?: string;
|
|
2672
|
+
};
|
|
2673
|
+
}
|
|
2674
|
+
/** Camada semântica do arquivo de tema: papéis. */
|
|
2675
|
+
interface SmzSemanticTheme {
|
|
2676
|
+
color?: {
|
|
2677
|
+
primary?: {
|
|
2678
|
+
/** Cor primária: fundo de botão sólido, texto e borda de destaque. Padrão: `claro {blue.600}, escuro {blue.400}`. Variável CSS: `--smz-primary`. */
|
|
2679
|
+
default?: string;
|
|
2680
|
+
/** Cor primária sob o ponteiro. Padrão: `claro {blue.700}, escuro {blue.300}`. Variável CSS: `--smz-primary-hover`. */
|
|
2681
|
+
hover?: string;
|
|
2682
|
+
/** Cor primária pressionada. Padrão: `claro {blue.800}, escuro {blue.200}`. Variável CSS: `--smz-primary-active`. */
|
|
2683
|
+
active?: string;
|
|
2684
|
+
/** Texto e ícone sobre a cor primária. Padrão: `claro {white}, escuro {slate.900}`. Variável CSS: `--smz-on-primary`. */
|
|
2685
|
+
contrast?: string;
|
|
2686
|
+
};
|
|
2687
|
+
danger?: {
|
|
2688
|
+
/** Cor de perigo: fundo de botão sólido, texto e borda de destaque. Padrão: `claro {red.600}, escuro {red.600}`. Variável CSS: `--smz-danger`. */
|
|
2689
|
+
default?: string;
|
|
2690
|
+
/** Cor de perigo sob o ponteiro. Padrão: `claro {red.700}, escuro {red.700}`. Variável CSS: `--smz-danger-hover`. */
|
|
2691
|
+
hover?: string;
|
|
2692
|
+
/** Cor de perigo pressionada. Padrão: `claro {red.800}, escuro {red.800}`. Variável CSS: `--smz-danger-active`. */
|
|
2693
|
+
active?: string;
|
|
2694
|
+
/** Texto e ícone sobre a cor de perigo. Padrão: `claro {white}, escuro {white}`. Variável CSS: `--smz-on-danger`. */
|
|
2695
|
+
contrast?: string;
|
|
2696
|
+
};
|
|
2697
|
+
success?: {
|
|
2698
|
+
/** Cor de sucesso: fundo de botão sólido, texto e borda de destaque. Padrão: `claro {green.600}, escuro {green.600}`. Variável CSS: `--smz-success`. */
|
|
2699
|
+
default?: string;
|
|
2700
|
+
/** Cor de sucesso sob o ponteiro. Padrão: `claro {green.700}, escuro {green.700}`. Variável CSS: `--smz-success-hover`. */
|
|
2701
|
+
hover?: string;
|
|
2702
|
+
/** Cor de sucesso pressionada. Padrão: `claro {green.800}, escuro {green.800}`. Variável CSS: `--smz-success-active`. */
|
|
2703
|
+
active?: string;
|
|
2704
|
+
/** Texto e ícone sobre a cor de sucesso. Padrão: `claro {white}, escuro {white}`. Variável CSS: `--smz-on-success`. */
|
|
2705
|
+
contrast?: string;
|
|
2706
|
+
};
|
|
2707
|
+
warning?: {
|
|
2708
|
+
/** Cor de alerta: fundo de botão sólido, texto e borda de destaque. Padrão: `claro {amber.500}, escuro {amber.500}`. Variável CSS: `--smz-warning`. */
|
|
2709
|
+
default?: string;
|
|
2710
|
+
/** Cor de alerta sob o ponteiro. Padrão: `claro {amber.600}, escuro {amber.600}`. Variável CSS: `--smz-warning-hover`. */
|
|
2711
|
+
hover?: string;
|
|
2712
|
+
/** Cor de alerta pressionada. Padrão: `claro {amber.700}, escuro {amber.700}`. Variável CSS: `--smz-warning-active`. */
|
|
2713
|
+
active?: string;
|
|
2714
|
+
/** Texto e ícone sobre a cor de alerta. Padrão: `claro {gray.800}, escuro {gray.800}`. Variável CSS: `--smz-on-warning`. */
|
|
2715
|
+
contrast?: string;
|
|
2716
|
+
};
|
|
2717
|
+
surface?: {
|
|
2718
|
+
/** Fundo da página. Padrão: `claro {slate.50}, escuro {slate.950}`. Variável CSS: `--smz-surface-0`. */
|
|
2719
|
+
'0'?: string;
|
|
2720
|
+
/** Fundo de cartões e de campos de formulário. Padrão: `claro {white}, escuro {slate.900}`. Variável CSS: `--smz-surface-1`. */
|
|
2721
|
+
'1'?: string;
|
|
2722
|
+
/** Fundo de overlays: painéis, menus, diálogos. Padrão: `claro {white}, escuro {slate.800}`. Variável CSS: `--smz-surface-2`. */
|
|
2723
|
+
'2'?: string;
|
|
2724
|
+
/** Fundo de item sob o ponteiro e de áreas rebaixadas. Padrão: `claro {slate.100}, escuro {slate.700}`. Variável CSS: `--smz-surface-3`. */
|
|
2725
|
+
'3'?: string;
|
|
2726
|
+
};
|
|
2727
|
+
fg?: {
|
|
2728
|
+
/** Texto principal. Padrão: `claro {slate.900}, escuro {slate.100}`. Variável CSS: `--smz-fg`. */
|
|
2729
|
+
default?: string;
|
|
2730
|
+
/** Texto secundário. Padrão: `claro {slate.600}, escuro {slate.300}`. Variável CSS: `--smz-fg-muted`. */
|
|
2731
|
+
muted?: string;
|
|
2732
|
+
/** Texto de apoio e placeholder. Padrão: `claro {slate.400}, escuro {slate.400}`. Variável CSS: `--smz-fg-subtle`. */
|
|
2733
|
+
subtle?: string;
|
|
2734
|
+
};
|
|
2735
|
+
line?: {
|
|
2736
|
+
/** Borda e divisor. Padrão: `claro {slate.200}, escuro {slate.700}`. Variável CSS: `--smz-line`. */
|
|
2737
|
+
default?: string;
|
|
2738
|
+
/** Borda de campo de formulário. Padrão: `claro {slate.300}, escuro {slate.600}`. Variável CSS: `--smz-line-strong`. */
|
|
2739
|
+
strong?: string;
|
|
2740
|
+
};
|
|
2741
|
+
/** Anel de foco. Padrão: `claro {blue.600}, escuro {blue.400}`. Variável CSS: `--smz-focus`. */
|
|
2742
|
+
focus?: string;
|
|
2743
|
+
};
|
|
2744
|
+
font?: {
|
|
2745
|
+
/** Família de fonte da interface. Padrão: `system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif`. Variável CSS: `--smz-font-sans`. */
|
|
2746
|
+
sans?: string;
|
|
2747
|
+
/** Família de fonte monoespaçada. Padrão: `ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`. Variável CSS: `--smz-font-mono`. */
|
|
2748
|
+
mono?: string;
|
|
2749
|
+
};
|
|
2750
|
+
text?: {
|
|
2751
|
+
/** Tamanho de fonte extra pequeno. Padrão: `0.75rem`. Variável CSS: `--smz-text-xs`. */
|
|
2752
|
+
xs?: string;
|
|
2753
|
+
/** Tamanho de fonte pequeno. Padrão: `0.8125rem`. Variável CSS: `--smz-text-sm`. */
|
|
2754
|
+
sm?: string;
|
|
2755
|
+
/** Tamanho de fonte padrão. Padrão: `0.875rem`. Variável CSS: `--smz-text-md`. */
|
|
2756
|
+
md?: string;
|
|
2757
|
+
/** Tamanho de fonte grande. Padrão: `1rem`. Variável CSS: `--smz-text-lg`. */
|
|
2758
|
+
lg?: string;
|
|
2759
|
+
/** Tamanho de fonte extra grande. Padrão: `1.125rem`. Variável CSS: `--smz-text-xl`. */
|
|
2760
|
+
xl?: string;
|
|
2761
|
+
/** Altura de linha. Padrão: `1.5`. Variável CSS: `--smz-leading`. */
|
|
2762
|
+
leading?: string;
|
|
2763
|
+
};
|
|
2764
|
+
control?: {
|
|
2765
|
+
height?: {
|
|
2766
|
+
/** Altura de controle pequeno (botão, campo). Padrão: `2rem`. Variável CSS: `--smz-control-h-sm`. */
|
|
2767
|
+
sm?: string;
|
|
2768
|
+
/** Altura de controle padrão. Padrão: `2.5rem`. Variável CSS: `--smz-control-h`. */
|
|
2769
|
+
md?: string;
|
|
2770
|
+
/** Altura de controle grande. Padrão: `3rem`. Variável CSS: `--smz-control-h-lg`. */
|
|
2771
|
+
lg?: string;
|
|
2772
|
+
};
|
|
2773
|
+
paddingX?: {
|
|
2774
|
+
/** Padding horizontal de controle pequeno. Padrão: `0.75rem`. Variável CSS: `--smz-control-px-sm`. */
|
|
2775
|
+
sm?: string;
|
|
2776
|
+
/** Padding horizontal de controle padrão. Padrão: `1rem`. Variável CSS: `--smz-control-px`. */
|
|
2777
|
+
md?: string;
|
|
2778
|
+
/** Padding horizontal de controle grande. Padrão: `1.5rem`. Variável CSS: `--smz-control-px-lg`. */
|
|
2779
|
+
lg?: string;
|
|
2780
|
+
};
|
|
2781
|
+
};
|
|
2782
|
+
input?: {
|
|
2783
|
+
paddingX?: {
|
|
2784
|
+
/** Padding horizontal de campo de formulário pequeno. Padrão: `{control.paddingX.sm}`. Variável CSS: `--smz-input-px-sm`. */
|
|
2785
|
+
sm?: string;
|
|
2786
|
+
/** Padding horizontal de campo de formulário. Padrão: `{control.paddingX.md}`. Variável CSS: `--smz-input-px`. */
|
|
2787
|
+
md?: string;
|
|
2788
|
+
};
|
|
2789
|
+
};
|
|
2790
|
+
radius?: {
|
|
2791
|
+
/** Raio de controles: botão, campo, item de lista. Padrão: `0.5rem`. Variável CSS: `--smz-radius-control`. */
|
|
2792
|
+
control?: string;
|
|
2793
|
+
/** Raio de cartões e painéis. Padrão: `0.75rem`. Variável CSS: `--smz-radius-card`. */
|
|
2794
|
+
card?: string;
|
|
2795
|
+
/** Raio de overlays: painel de select, menu, diálogo. Padrão: `0.75rem`. Variável CSS: `--smz-radius-overlay`. */
|
|
2796
|
+
overlay?: string;
|
|
2797
|
+
};
|
|
2798
|
+
shadow?: {
|
|
2799
|
+
/** Sombra de cartão. Padrão: `0 1px 2px rgb(0 0 0 / 0.06), 0 1px 3px rgb(0 0 0 / 0.1)`. Variável CSS: `--smz-shadow-card`. */
|
|
2800
|
+
card?: string;
|
|
2801
|
+
/** Sombra de overlay. Padrão: `0 8px 24px rgb(0 0 0 / 0.12), 0 2px 6px rgb(0 0 0 / 0.08)`. Variável CSS: `--smz-shadow-overlay`. */
|
|
2802
|
+
overlay?: string;
|
|
2803
|
+
};
|
|
2804
|
+
duration?: {
|
|
2805
|
+
/** Duração das transições de estado. Padrão: `150ms`. Variável CSS: `--smz-duration`. */
|
|
2806
|
+
default?: string;
|
|
2807
|
+
};
|
|
2808
|
+
}
|
|
2809
|
+
/** Camada de componente do arquivo de tema: partes e estados de cada componente. */
|
|
2810
|
+
interface SmzComponentsTheme {
|
|
2811
|
+
}
|
|
2812
|
+
|
|
2813
|
+
/** Valores de uma camada, com sobrescritas opcionais por modo (`light`, `dark`). O que fica fora deles vale nos dois. */
|
|
2814
|
+
type SmzThemeLayer<T> = T & {
|
|
2815
|
+
light?: T;
|
|
2816
|
+
dark?: T;
|
|
2817
|
+
};
|
|
2818
|
+
/** Props padrão por componente, por exemplo `{ dialog: { closeButtonVariant: 'outlined' } }`. */
|
|
2819
|
+
type SmzComponentDefaults = Record<string, Record<string, unknown>>;
|
|
2820
|
+
interface SmzThemeBase {
|
|
2821
|
+
/**
|
|
2822
|
+
* Tamanho de fonte da raiz do app, em px (padrão 16). Os tokens do kit são desenhados em `rem` para raiz de 16px;
|
|
2823
|
+
* um app com outra raiz declara o valor aqui e o motor converte os tokens, em vez de o app recalcular cada um.
|
|
2824
|
+
*/
|
|
2825
|
+
rootFontSize?: number;
|
|
2826
|
+
/** Fator de escala aplicado às dimensões (1 = sem escala). */
|
|
2827
|
+
scale?: number;
|
|
2828
|
+
}
|
|
2829
|
+
/** O arquivo de tema de um app: o contrato de aparência das bibliotecas `@ngx-smz/*`. */
|
|
2830
|
+
interface SmzThemeDefinition {
|
|
2831
|
+
name?: string;
|
|
2832
|
+
/** Tema de que este parte. Sem `extends`, parte do preset padrão. */
|
|
2833
|
+
extends?: SmzTheme;
|
|
2834
|
+
/** Paletas e escalas brutas. */
|
|
2835
|
+
primitive?: SmzPrimitiveTheme;
|
|
2836
|
+
/** Papéis: superfícies, texto, bordas, primária e severidades, controles, raios, sombras. */
|
|
2837
|
+
semantic?: SmzThemeLayer<SmzSemanticTheme>;
|
|
2838
|
+
/** Partes e estados de cada componente. */
|
|
2839
|
+
components?: SmzThemeLayer<SmzComponentsTheme>;
|
|
2840
|
+
base?: SmzThemeBase;
|
|
2841
|
+
density?: SmzDensity;
|
|
2842
|
+
defaults?: SmzComponentDefaults;
|
|
2843
|
+
}
|
|
2844
|
+
/** Valor bruto (com referências `{…}`) que um tema define para um token, por modo. */
|
|
2845
|
+
type SmzTokenOverride = Partial<Record<SmzThemeMode, string>>;
|
|
2846
|
+
/** Tema validado e achatado, pronto para gerar CSS. Criado por `defineSmzTheme`. */
|
|
2847
|
+
interface SmzTheme {
|
|
2848
|
+
readonly name: string;
|
|
2849
|
+
/** Sobrescritas em relação ao catálogo, por caminho de token, já somadas às do tema estendido. */
|
|
2850
|
+
readonly overrides: Readonly<Record<string, SmzTokenOverride>>;
|
|
2851
|
+
readonly base: Readonly<Required<SmzThemeBase>>;
|
|
2852
|
+
readonly density: SmzDensity;
|
|
2853
|
+
readonly defaults: Readonly<SmzComponentDefaults>;
|
|
2854
|
+
}
|
|
2855
|
+
declare const SMZ_THEME_MODES: SmzThemeMode[];
|
|
2856
|
+
|
|
2457
2857
|
/** Paleta no formato Tailwind (`500`, `600`...) em hexadecimal. */
|
|
2458
2858
|
type SmzPalette = Partial<Record<0 | 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950, string>>;
|
|
2859
|
+
/** Id da folha de estilo que o serviço mantém no `<head>` com as variáveis do tema do app. */
|
|
2860
|
+
declare const SMZ_THEME_STYLE_ID = "smz-theme";
|
|
2459
2861
|
/**
|
|
2460
|
-
*
|
|
2461
|
-
*
|
|
2862
|
+
* Tema em runtime: aplica o arquivo de tema (`setTheme`), troca modo, densidade e escala, e mantém os atalhos
|
|
2863
|
+
* anteriores ao contrato (`setColors`, `setPrimaryPalette`).
|
|
2864
|
+
*
|
|
2865
|
+
* O tema do app vira uma folha de estilo no `<head>` (só as variáveis que diferem do preset padrão). Os atalhos
|
|
2866
|
+
* escrevem variáveis no `style` do `<html>`, que têm precedência sobre a folha.
|
|
2462
2867
|
*/
|
|
2463
2868
|
declare class SmzThemeService {
|
|
2869
|
+
private readonly document;
|
|
2464
2870
|
private readonly root;
|
|
2871
|
+
private readonly current;
|
|
2872
|
+
private readonly currentMode;
|
|
2873
|
+
/** Variáveis que este serviço escreveu no `<html>`; `reset()` remove só estas. */
|
|
2874
|
+
private readonly inline;
|
|
2875
|
+
/** Tema aplicado. */
|
|
2876
|
+
readonly theme: Signal<SmzTheme>;
|
|
2877
|
+
/** Modo aplicado por `setMode` (ou o encontrado no `<html>` ao iniciar). */
|
|
2878
|
+
readonly mode: Signal<SmzThemeMode>;
|
|
2879
|
+
/** Aplica um tema: substitui a folha de estilo do tema e a densidade. Aceita o tema pronto ou a definição. */
|
|
2880
|
+
setTheme(theme: SmzTheme | SmzThemeDefinition): void;
|
|
2881
|
+
/** Aplica uma alteração sobre o tema atual (o que o editor de tema faz a cada mudança). */
|
|
2882
|
+
patch(definition: Omit<SmzThemeDefinition, 'extends'>): void;
|
|
2883
|
+
/** Modo claro ou escuro. Marca `data-smz-mode` e, por compatibilidade, a classe `app-dark` no `<html>`. */
|
|
2884
|
+
setMode(mode: SmzThemeMode): void;
|
|
2885
|
+
setDensity(density: SmzDensity): void;
|
|
2886
|
+
/** Fator de escala das dimensões do tema (1 = sem escala). */
|
|
2887
|
+
setScale(scale: number): void;
|
|
2465
2888
|
/** Sobrescreve cores: `{ primary: '#6366f1' }` -> `--smz-color-primary`. Aceita hexadecimal ou canais ("99 102 241"). */
|
|
2466
2889
|
setColors(colors: Record<string, string>): void;
|
|
2467
2890
|
/** Define a cor primaria a partir de uma paleta; escolhe os tons por modo claro/escuro. */
|
|
2468
2891
|
setPrimaryPalette(palette: SmzPalette, dark?: boolean): void;
|
|
2469
|
-
/**
|
|
2892
|
+
/** Escreve uma variável CSS do tema direto no `<html>` (tem precedência sobre o tema aplicado). */
|
|
2893
|
+
setVariable(name: string, value: string): void;
|
|
2894
|
+
/** Remove as sobrescritas feitas por `setColors`, `setPrimaryPalette` e `setVariable`. O tema aplicado por `setTheme` fica. */
|
|
2470
2895
|
reset(): void;
|
|
2471
2896
|
isDark(): boolean;
|
|
2897
|
+
private setInline;
|
|
2898
|
+
private applyDensity;
|
|
2899
|
+
private styleElement;
|
|
2472
2900
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SmzThemeService, never>;
|
|
2473
2901
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SmzThemeService>;
|
|
2474
2902
|
}
|
|
2475
2903
|
|
|
2904
|
+
/**
|
|
2905
|
+
* Aplica um tema, ou uma sobrescrita parcial, a um contêiner e a tudo dentro dele, inclusive aos overlays
|
|
2906
|
+
* (select, menu, diálogo, tooltip) abertos a partir dele.
|
|
2907
|
+
*
|
|
2908
|
+
* ```html
|
|
2909
|
+
* <section [smzTheme]="{ semantic: { radius: { control: '0' } } }" smzThemeMode="dark">…</section>
|
|
2910
|
+
* ```
|
|
2911
|
+
*/
|
|
2912
|
+
declare class SmzThemeDirective implements OnDestroy {
|
|
2913
|
+
/** Tema pronto (`defineSmzTheme`) ou definição parcial, aplicada sobre o preset padrão. */
|
|
2914
|
+
readonly smzTheme: _angular_core.InputSignal<SmzThemeDefinition | SmzTheme>;
|
|
2915
|
+
/** Força o modo dentro do escopo, independentemente do modo do app. */
|
|
2916
|
+
readonly smzThemeMode: _angular_core.InputSignal<SmzThemeMode>;
|
|
2917
|
+
readonly smzThemeDensity: _angular_core.InputSignal<SmzDensity>;
|
|
2918
|
+
protected readonly scopeId: string;
|
|
2919
|
+
private readonly document;
|
|
2920
|
+
private readonly host;
|
|
2921
|
+
private style;
|
|
2922
|
+
private resolved;
|
|
2923
|
+
constructor();
|
|
2924
|
+
ngOnDestroy(): void;
|
|
2925
|
+
protected density(): string | null;
|
|
2926
|
+
private styleElement;
|
|
2927
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SmzThemeDirective, never>;
|
|
2928
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SmzThemeDirective, "[smzTheme]", never, { "smzTheme": { "alias": "smzTheme"; "required": true; "isSignal": true; }; "smzThemeMode": { "alias": "smzThemeMode"; "required": false; "isSignal": true; }; "smzThemeDensity": { "alias": "smzThemeDensity"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2929
|
+
}
|
|
2930
|
+
|
|
2931
|
+
/** Atributo que marca um contêiner com tema próprio (diretiva `[smzTheme]`) e os overlays abertos a partir dele. */
|
|
2932
|
+
declare const SMZ_THEME_SCOPE_ATTRIBUTE = "data-smz-theme-scope";
|
|
2933
|
+
/**
|
|
2934
|
+
* Faz o painel de um overlay herdar o tema do escopo de onde ele foi aberto.
|
|
2935
|
+
*
|
|
2936
|
+
* O contêiner de overlays do CDK é filho do `<body>`, fora do contêiner com `[smzTheme]`, então as variáveis do
|
|
2937
|
+
* escopo não chegam ao painel pela árvore. Todo overlay do kit chama esta função logo depois de criado.
|
|
2938
|
+
*/
|
|
2939
|
+
declare function smzInheritThemeScope(overlayRef: OverlayRef, origin: Element | null | undefined): void;
|
|
2940
|
+
|
|
2941
|
+
/** Tema do app, como fornecido por `provideSmzTheme`. */
|
|
2942
|
+
declare const SMZ_THEME: InjectionToken<SmzTheme>;
|
|
2943
|
+
/**
|
|
2944
|
+
* Aplica o arquivo de tema do app na inicialização e disponibiliza as props padrão de componente do tema.
|
|
2945
|
+
*
|
|
2946
|
+
* ```ts
|
|
2947
|
+
* bootstrapApplication(App, { providers: [provideSmzTheme(appTheme)] });
|
|
2948
|
+
* ```
|
|
2949
|
+
*
|
|
2950
|
+
* O CSS do tema entra em runtime, depois do primeiro paint. Para evitar a troca visível em apps com tema muito
|
|
2951
|
+
* diferente do padrão, gere o CSS em build (`smz-theme build`) e inclua-o nos estilos do app.
|
|
2952
|
+
*/
|
|
2953
|
+
declare function provideSmzTheme(theme: SmzTheme | SmzThemeDefinition): EnvironmentProviders;
|
|
2954
|
+
|
|
2955
|
+
/**
|
|
2956
|
+
* Props padrão por componente vindas do tema (`defaults` do arquivo de tema), fornecidas por `provideSmzTheme`.
|
|
2957
|
+
* Um app também pode fornecer o token direto para um trecho da árvore.
|
|
2958
|
+
*/
|
|
2959
|
+
declare const SMZ_COMPONENT_DEFAULTS: InjectionToken<SmzComponentDefaults>;
|
|
2960
|
+
/**
|
|
2961
|
+
* Define props padrão de componentes fora da injeção de dependência (usado pelos builders do `@ngx-smz/core`,
|
|
2962
|
+
* que configuram a lib antes de existir injetor). O que vier de `SMZ_COMPONENT_DEFAULTS` tem precedência.
|
|
2963
|
+
*/
|
|
2964
|
+
declare function smzSetComponentDefaults(defaults: SmzComponentDefaults | null | undefined): void;
|
|
2965
|
+
/**
|
|
2966
|
+
* Props padrão de um componente, na ordem de precedência: constantes do componente, `smzSetComponentDefaults`,
|
|
2967
|
+
* `SMZ_COMPONENT_DEFAULTS`. Chamar em contexto de injeção (inicializador de campo ou construtor).
|
|
2968
|
+
*
|
|
2969
|
+
* O input explícito do componente continua vencendo: o padrão só vale quando o input não foi informado.
|
|
2970
|
+
*/
|
|
2971
|
+
declare function smzComponentDefaults<T extends object>(component: string, builtIn: T): T;
|
|
2972
|
+
|
|
2973
|
+
/** Catálogo de tokens do Design System SMZ: fonte única do tema, do preset Tailwind, da documentação e do editor. */
|
|
2974
|
+
declare const SMZ_TOKEN_CATALOG: {
|
|
2975
|
+
primitive: {
|
|
2976
|
+
white: SmzTokenDefinition;
|
|
2977
|
+
black: SmzTokenDefinition;
|
|
2978
|
+
slate: Record<string, SmzTokenDefinition>;
|
|
2979
|
+
gray: Record<string, SmzTokenDefinition>;
|
|
2980
|
+
blue: Record<string, SmzTokenDefinition>;
|
|
2981
|
+
red: Record<string, SmzTokenDefinition>;
|
|
2982
|
+
green: Record<string, SmzTokenDefinition>;
|
|
2983
|
+
amber: Record<string, SmzTokenDefinition>;
|
|
2984
|
+
};
|
|
2985
|
+
semantic: {
|
|
2986
|
+
color: {
|
|
2987
|
+
primary: SmzTokenGroup;
|
|
2988
|
+
danger: SmzTokenGroup;
|
|
2989
|
+
success: SmzTokenGroup;
|
|
2990
|
+
warning: SmzTokenGroup;
|
|
2991
|
+
surface: {
|
|
2992
|
+
0: SmzTokenDefinition;
|
|
2993
|
+
1: SmzTokenDefinition;
|
|
2994
|
+
2: SmzTokenDefinition;
|
|
2995
|
+
3: SmzTokenDefinition;
|
|
2996
|
+
};
|
|
2997
|
+
fg: {
|
|
2998
|
+
default: SmzTokenDefinition;
|
|
2999
|
+
muted: SmzTokenDefinition;
|
|
3000
|
+
subtle: SmzTokenDefinition;
|
|
3001
|
+
};
|
|
3002
|
+
line: {
|
|
3003
|
+
default: SmzTokenDefinition;
|
|
3004
|
+
strong: SmzTokenDefinition;
|
|
3005
|
+
};
|
|
3006
|
+
focus: SmzTokenDefinition;
|
|
3007
|
+
};
|
|
3008
|
+
font: {
|
|
3009
|
+
sans: SmzTokenDefinition;
|
|
3010
|
+
mono: SmzTokenDefinition;
|
|
3011
|
+
};
|
|
3012
|
+
text: {
|
|
3013
|
+
xs: SmzTokenDefinition;
|
|
3014
|
+
sm: SmzTokenDefinition;
|
|
3015
|
+
md: SmzTokenDefinition;
|
|
3016
|
+
lg: SmzTokenDefinition;
|
|
3017
|
+
xl: SmzTokenDefinition;
|
|
3018
|
+
leading: SmzTokenDefinition;
|
|
3019
|
+
};
|
|
3020
|
+
control: {
|
|
3021
|
+
height: {
|
|
3022
|
+
sm: SmzTokenDefinition;
|
|
3023
|
+
md: SmzTokenDefinition;
|
|
3024
|
+
lg: SmzTokenDefinition;
|
|
3025
|
+
};
|
|
3026
|
+
paddingX: {
|
|
3027
|
+
sm: SmzTokenDefinition;
|
|
3028
|
+
md: SmzTokenDefinition;
|
|
3029
|
+
lg: SmzTokenDefinition;
|
|
3030
|
+
};
|
|
3031
|
+
};
|
|
3032
|
+
input: {
|
|
3033
|
+
paddingX: {
|
|
3034
|
+
sm: SmzTokenDefinition;
|
|
3035
|
+
md: SmzTokenDefinition;
|
|
3036
|
+
};
|
|
3037
|
+
};
|
|
3038
|
+
radius: {
|
|
3039
|
+
control: SmzTokenDefinition;
|
|
3040
|
+
card: SmzTokenDefinition;
|
|
3041
|
+
overlay: SmzTokenDefinition;
|
|
3042
|
+
};
|
|
3043
|
+
shadow: {
|
|
3044
|
+
card: SmzTokenDefinition;
|
|
3045
|
+
overlay: SmzTokenDefinition;
|
|
3046
|
+
};
|
|
3047
|
+
duration: {
|
|
3048
|
+
default: SmzTokenDefinition;
|
|
3049
|
+
};
|
|
3050
|
+
};
|
|
3051
|
+
components: {};
|
|
3052
|
+
};
|
|
3053
|
+
/** `select.option.selected.background` -> `--smz-select-option-selected-background` (o segmento `default` some). */
|
|
3054
|
+
declare function smzTokenCssVar(path: string): string;
|
|
3055
|
+
/** Todos os tokens, achatados, na ordem primitivo, semântico, componente. */
|
|
3056
|
+
declare const SMZ_TOKENS: SmzCatalogToken[];
|
|
3057
|
+
declare function smzFindToken(path: string): SmzCatalogToken | undefined;
|
|
3058
|
+
|
|
3059
|
+
/** Caminhos referenciados por um valor: `'color-mix(in srgb, {color.primary.default} 10%, transparent)'`. */
|
|
3060
|
+
declare function smzTokenReferences(value: string): string[];
|
|
3061
|
+
/** Tema sem nenhuma sobrescrita: o próprio catálogo, que é o preset padrão. */
|
|
3062
|
+
declare const SMZ_DEFAULT_THEME: SmzTheme;
|
|
3063
|
+
/**
|
|
3064
|
+
* Declara o tema de um app. Valida os caminhos e as referências contra o catálogo e devolve o tema achatado.
|
|
3065
|
+
*
|
|
3066
|
+
* ```ts
|
|
3067
|
+
* export const appTheme = defineSmzTheme({
|
|
3068
|
+
* semantic: { radius: { control: '0.25rem' }, dark: { color: { surface: { 0: '#17212f' } } } },
|
|
3069
|
+
* });
|
|
3070
|
+
* ```
|
|
3071
|
+
*
|
|
3072
|
+
* @throws se algum caminho ou referência não existir no catálogo.
|
|
3073
|
+
*/
|
|
3074
|
+
declare function defineSmzTheme(definition: SmzThemeDefinition): SmzTheme;
|
|
3075
|
+
/** Quantidade de tokens do catálogo, por camada (diagnóstico e documentação). */
|
|
3076
|
+
declare function smzCatalogSummary(): Record<SmzTokenLayer, number>;
|
|
3077
|
+
|
|
3078
|
+
/** Valor bruto de um token em um tema e modo: a sobrescrita do tema, ou o padrão do catálogo. */
|
|
3079
|
+
declare function smzRawTokenValue(theme: SmzTheme, item: SmzCatalogToken, mode: SmzThemeMode): string;
|
|
3080
|
+
/**
|
|
3081
|
+
* Valor literal de um token, com todas as referências resolvidas estaticamente (inclusive as de semânticos).
|
|
3082
|
+
* Serve para o que precisa do valor final fora do navegador: canais legados e contraste.
|
|
3083
|
+
*/
|
|
3084
|
+
declare function smzLiteralTokenValue(theme: SmzTheme, path: string, mode: SmzThemeMode, depth?: number): string;
|
|
3085
|
+
/** Fator aplicado às dimensões em `rem`: raiz diferente de 16px e escala do tema. */
|
|
3086
|
+
declare function smzDimensionFactor(theme: SmzTheme): number;
|
|
3087
|
+
type Declarations = Record<string, string>;
|
|
3088
|
+
interface SmzThemeCssBlocks {
|
|
3089
|
+
/** Declarações do bloco base (`:root`). */
|
|
3090
|
+
light: Declarations;
|
|
3091
|
+
/** Declarações do bloco do modo escuro. */
|
|
3092
|
+
dark: Declarations;
|
|
3093
|
+
/** Declarações por densidade (só no CSS completo do preset). */
|
|
3094
|
+
density: Partial<Record<SmzDensity, Declarations>>;
|
|
3095
|
+
warnings: string[];
|
|
3096
|
+
}
|
|
3097
|
+
/**
|
|
3098
|
+
* Blocos de CSS de um tema.
|
|
3099
|
+
*
|
|
3100
|
+
* Com `full`, todas as variáveis (é como o CSS do preset padrão é gerado). Sem `full`, só o que difere do preset
|
|
3101
|
+
* padrão, considerando a cascata: o bloco escuro do preset tem especificidade maior que o bloco base do tema,
|
|
3102
|
+
* então um valor que o tema define para os dois modos precisa ser repetido no bloco escuro.
|
|
3103
|
+
*/
|
|
3104
|
+
declare function smzThemeCssBlocks(theme: SmzTheme, options?: {
|
|
3105
|
+
full?: boolean;
|
|
3106
|
+
}): SmzThemeCssBlocks;
|
|
3107
|
+
/** Seletores do modo escuro: o atributo canônico e as classes aceitas por compatibilidade. */
|
|
3108
|
+
declare const SMZ_DARK_ROOT_SELECTORS: string[];
|
|
3109
|
+
interface SmzThemeCssOptions {
|
|
3110
|
+
/** Emite todas as variáveis, e não só as que diferem do preset padrão. */
|
|
3111
|
+
full?: boolean;
|
|
3112
|
+
/** Seletor de escopo: aplica o tema a um contêiner em vez de `:root`. */
|
|
3113
|
+
scope?: string;
|
|
3114
|
+
}
|
|
3115
|
+
/** CSS (variáveis `--smz-*`) de um tema. */
|
|
3116
|
+
declare function smzThemeToCss(theme: SmzTheme, options?: SmzThemeCssOptions): string;
|
|
3117
|
+
|
|
3118
|
+
/** Cor sRGB com alfa, canais de 0 a 255. */
|
|
3119
|
+
interface SmzRgba {
|
|
3120
|
+
r: number;
|
|
3121
|
+
g: number;
|
|
3122
|
+
b: number;
|
|
3123
|
+
a: number;
|
|
3124
|
+
}
|
|
3125
|
+
/**
|
|
3126
|
+
* Lê uma cor literal sRGB: hexadecimal (3, 4, 6 ou 8 dígitos), `rgb()`/`rgba()` (vírgula ou espaço) e canais soltos
|
|
3127
|
+
* (`37 99 235`). Devolve `null` para o que só o navegador resolve (`var()`, `color-mix()`, `oklch()`, nomes).
|
|
3128
|
+
*/
|
|
3129
|
+
declare function smzParseColor(input: string): SmzRgba | null;
|
|
3130
|
+
/** Canais RGB separados por espaço (`37 99 235`), o formato das variáveis legadas `--smz-color-*`. */
|
|
3131
|
+
declare function smzToChannels(color: SmzRgba): string;
|
|
3132
|
+
/** Luminância relativa (WCAG 2.x). */
|
|
3133
|
+
declare function smzLuminance(color: SmzRgba): number;
|
|
3134
|
+
/** Compõe uma cor com alfa sobre um fundo opaco. */
|
|
3135
|
+
declare function smzComposite(foreground: SmzRgba, background: SmzRgba): SmzRgba;
|
|
3136
|
+
/** Razão de contraste WCAG entre texto e fundo (de 1 a 21). O texto com alfa é composto sobre o fundo. */
|
|
3137
|
+
declare function smzContrastRatio(foreground: SmzRgba, background: SmzRgba): number;
|
|
3138
|
+
/** Mínimo WCAG AA para texto normal. */
|
|
3139
|
+
declare const SMZ_CONTRAST_AA = 4.5;
|
|
3140
|
+
|
|
2476
3141
|
/**
|
|
2477
3142
|
* Card. Substitui o `p-card` do PrimeNG.
|
|
2478
3143
|
* O conteudo padrao vai no corpo; `header`, `title`, `subtitle` e `footer` podem ser strings ou templates.
|
|
@@ -2849,5 +3514,5 @@ declare class SmzFileUploadComponent {
|
|
|
2849
3514
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SmzFileUploadComponent, "ui-file-upload", never, { "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; "chooseLabel": { "alias": "chooseLabel"; "required": false; "isSignal": true; }; "dropLabel": { "alias": "dropLabel"; "required": false; "isSignal": true; }; }, { "selected": "selected"; "removed": "removed"; "rejected": "rejected"; }, never, never, true, never>;
|
|
2850
3515
|
}
|
|
2851
3516
|
|
|
2852
|
-
export { SMZ_DIALOG_CONTENT, SMZ_SOFT_TONE, SMZ_SOLID_TONE, SMZ_TOAST_DEFAULTS, SMZ_TOAST_DEFAULT_OPTIONS, SMZ_TOOLTIP_DEFAULTS, SMZ_TOOLTIP_DEFAULT_OPTIONS, SMZ_TREE_TABLE, SmzAccordionComponent, SmzAccordionContentComponent, SmzAccordionHeaderComponent, SmzAccordionPanelComponent, SmzAnchoredPanel, SmzAutoCompleteComponent, SmzAutoFocusDirective, SmzBadgeComponent, SmzBadgeDirective, SmzBlockUiComponent, SmzButtonComponent, SmzCardComponent, SmzCheckboxComponent, SmzColorPickerComponent, SmzConfirmContentComponent, SmzConfirmationService, SmzConnectedOverlayScrollHandler, SmzDataViewComponent, SmzDatePickerComponent, SmzDialogComponent, SmzDialogConfig, SmzDialogFrameComponent, SmzDialogRef, SmzDialogService, SmzDividerComponent, SmzDomHandler, SmzDrawerComponent, SmzFileUploadComponent, SmzFilterMatchMode, SmzFilterOperator, SmzFilterService, SmzFloatLabelComponent, SmzIconComponent, SmzIconFieldComponent, SmzInputGroupAddonComponent, SmzInputGroupComponent, SmzInputIconComponent, SmzInputMaskComponent, SmzInputNumberComponent, SmzInputTextDirective, SmzListboxComponent, SmzLocaleService, SmzMenuListComponent, SmzMessageComponent, SmzMessageService, SmzMultiSelectComponent, SmzObjectUtils, SmzPaginatorComponent, SmzPanelComponent, SmzPasswordComponent, SmzPickListComponent, SmzPopoverComponent, SmzProgressBarComponent, SmzProgressSpinnerComponent, SmzRadioButtonComponent, SmzRippleDirective, SmzSelectButtonComponent, SmzSelectComponent, SmzSkeletonComponent, SmzSplitterComponent, SmzSplitterPanelComponent, SmzStyleClassDirective, SmzTabComponent, SmzTabListComponent, SmzTabPanelComponent, SmzTabPanelsComponent, SmzTabsComponent, SmzTagComponent, SmzTemplateDirective, SmzTextareaDirective, SmzThemeService, SmzToastContainerComponent, SmzToastEnterDirective, SmzToastLifeDirective, SmzToggleSwitchComponent, SmzToolbarComponent, SmzTooltipComponent, SmzTooltipDirective, SmzTranslationKeys, SmzTreeSelectComponent, SmzTreeTableCheckboxComponent, SmzTreeTableComponent, SmzTreeTableHeaderCheckboxComponent, SmzTreeTableRowDirective, SmzTreeTableSortIconComponent, SmzTreeTableSortableColumnDirective, SmzTreeTableTogglerComponent, SmzUiTimelineComponent, SmzUiTreeComponent, SmzValueAccessor, SmzZIndex, filterOptions, optionDisabled, optionLabel, optionValue, provideSmzToastDefaults, provideSmzTooltipDefaults, sameValue, smzCalendarStart, smzCx, smzFindTemplate, smzFormatDate, smzMergeClasses, smzNormalizeSeverity, smzNormalizeStyleClass, smzParseButtonStyleClass, smzParseDate, smzResolveToastDefaults, smzSameDay, smzSetToastDefaults, smzSetTooltipDefaults, smzStartOfDay, smzStaticHostClass, smzTwoDigits, smzUniqueId, smzVariants };
|
|
2853
|
-
export type { SmzAccordionValue, SmzAnchoredPanelOptions, SmzAutoCompleteCompleteEvent, SmzAutoCompleteSelectEvent, SmzBlockTarget, SmzBlockableUi, SmzButtonIconPosition, SmzButtonLegacySeverity, SmzButtonSeverity, SmzButtonSize, SmzButtonVariant, SmzClassValue, SmzConfirmation, SmzDataViewLayout, SmzDatePickerValue, SmzDateSelectionMode, SmzDialogPosition, SmzDividerLayout, SmzDrawerPosition, SmzFileErrorEvent, SmzFileSelectEvent, SmzFilterFunction, SmzFilterMatchModeValue, SmzFilterMetadata, SmzFilterMode, SmzFilterOperatorValue, SmzFloatLabelVariant, SmzInputNumberInputEvent, SmzInputSize, SmzLegacySeverity, SmzListboxChangeEvent, SmzListboxClickEvent, SmzMessageSeverity, SmzMultiSelectChangeEvent, SmzOptionConfig, SmzPageEvent, SmzPalette, SmzPickListMoveEvent, SmzPopoverTarget, SmzProgressBarMode, SmzSelectButtonChangeEvent, SmzSelectChangeEvent, SmzSelectItem, SmzSeverity, SmzSkeletonShape, SmzSortMeta, SmzStyleClass, SmzTabValue, SmzTimelineAlign, SmzToastAction, SmzToastDefaults, SmzToastHandle, SmzToastMessage, SmzToastPosition, SmzTooltipContent, SmzTooltipDefaults, SmzTooltipEvent, SmzTooltipOptions, SmzTooltipPosition, SmzTooltipSide, SmzTooltipVariant, SmzTranslation, SmzTreeDropEvent, SmzTreeNodeEvent, SmzTreeSelectionMode, SmzTreeTableNodeEvent, SmzTreeTableRowNode, SmzTreeTableSelectionMode, SmzUiMenuItem, SmzUiMenuItemCommandEvent, SmzUiTreeNode, SmzVariantProps, SmzVariantsConfig };
|
|
3517
|
+
export { SMZ_COMPONENT_DEFAULTS, SMZ_CONTRAST_AA, SMZ_DARK_ROOT_SELECTORS, SMZ_DEFAULT_THEME, SMZ_DIALOG_CONTENT, SMZ_SOFT_TONE, SMZ_SOLID_TONE, SMZ_THEME, SMZ_THEME_MODES, SMZ_THEME_SCOPE_ATTRIBUTE, SMZ_THEME_STYLE_ID, SMZ_TOAST_DEFAULTS, SMZ_TOAST_DEFAULT_OPTIONS, SMZ_TOKENS, SMZ_TOKEN_CATALOG, SMZ_TOOLTIP_DEFAULTS, SMZ_TOOLTIP_DEFAULT_OPTIONS, SMZ_TREE_TABLE, SmzAccordionComponent, SmzAccordionContentComponent, SmzAccordionHeaderComponent, SmzAccordionPanelComponent, SmzAnchoredPanel, SmzAutoCompleteComponent, SmzAutoFocusDirective, SmzBadgeComponent, SmzBadgeDirective, SmzBlockUiComponent, SmzButtonComponent, SmzCardComponent, SmzCheckboxComponent, SmzColorPickerComponent, SmzConfirmContentComponent, SmzConfirmationService, SmzConnectedOverlayScrollHandler, SmzDataViewComponent, SmzDatePickerComponent, SmzDialogComponent, SmzDialogConfig, SmzDialogFrameComponent, SmzDialogRef, SmzDialogService, SmzDividerComponent, SmzDomHandler, SmzDrawerComponent, SmzFileUploadComponent, SmzFilterMatchMode, SmzFilterOperator, SmzFilterService, SmzFloatLabelComponent, SmzIconComponent, SmzIconFieldComponent, SmzInputGroupAddonComponent, SmzInputGroupComponent, SmzInputIconComponent, SmzInputMaskComponent, SmzInputNumberComponent, SmzInputTextDirective, SmzListboxComponent, SmzLocaleService, SmzMenuListComponent, SmzMessageComponent, SmzMessageService, SmzMultiSelectComponent, SmzObjectUtils, SmzPaginatorComponent, SmzPanelComponent, SmzPasswordComponent, SmzPickListComponent, SmzPopoverComponent, SmzProgressBarComponent, SmzProgressSpinnerComponent, SmzRadioButtonComponent, SmzRippleDirective, SmzSelectButtonComponent, SmzSelectComponent, SmzSkeletonComponent, SmzSplitterComponent, SmzSplitterPanelComponent, SmzStyleClassDirective, SmzTabComponent, SmzTabListComponent, SmzTabPanelComponent, SmzTabPanelsComponent, SmzTabsComponent, SmzTagComponent, SmzTemplateDirective, SmzTextareaDirective, SmzThemeDirective, SmzThemeService, SmzToastContainerComponent, SmzToastEnterDirective, SmzToastLifeDirective, SmzToggleSwitchComponent, SmzToolbarComponent, SmzTooltipComponent, SmzTooltipDirective, SmzTranslationKeys, SmzTreeSelectComponent, SmzTreeTableCheckboxComponent, SmzTreeTableComponent, SmzTreeTableHeaderCheckboxComponent, SmzTreeTableRowDirective, SmzTreeTableSortIconComponent, SmzTreeTableSortableColumnDirective, SmzTreeTableTogglerComponent, SmzUiTimelineComponent, SmzUiTreeComponent, SmzValueAccessor, SmzZIndex, defineSmzTheme, filterOptions, optionDisabled, optionLabel, optionValue, provideSmzTheme, provideSmzToastDefaults, provideSmzTooltipDefaults, sameValue, smzCalendarStart, smzCatalogSummary, smzComponentDefaults, smzComposite, smzContrastRatio, smzCx, smzDimensionFactor, smzFindTemplate, smzFindToken, smzFormatDate, smzInheritThemeScope, smzIsTokenDefinition, smzLiteralTokenValue, smzLuminance, smzMergeClasses, smzNormalizeSeverity, smzNormalizeStyleClass, smzParseButtonStyleClass, smzParseColor, smzParseDate, smzRawTokenValue, smzResolveToastDefaults, smzSameDay, smzSetComponentDefaults, smzSetToastDefaults, smzSetTooltipDefaults, smzStartOfDay, smzStaticHostClass, smzThemeCssBlocks, smzThemeToCss, smzToChannels, smzTokenCssVar, smzTokenReferences, smzTwoDigits, smzUniqueId, smzVariants, token };
|
|
3518
|
+
export type { SmzAccordionValue, SmzAnchoredPanelOptions, SmzAutoCompleteCompleteEvent, SmzAutoCompleteSelectEvent, SmzBlockTarget, SmzBlockableUi, SmzButtonIconPosition, SmzButtonLegacySeverity, SmzButtonSeverity, SmzButtonSize, SmzButtonVariant, SmzCatalogToken, SmzClassValue, SmzComponentDefaults, SmzComponentsTheme, SmzConfirmation, SmzDataViewLayout, SmzDatePickerValue, SmzDateSelectionMode, SmzDensity, SmzDialogPosition, SmzDividerLayout, SmzDrawerPosition, SmzFileErrorEvent, SmzFileSelectEvent, SmzFilterFunction, SmzFilterMatchModeValue, SmzFilterMetadata, SmzFilterMode, SmzFilterOperatorValue, SmzFloatLabelVariant, SmzInputNumberInputEvent, SmzInputSize, SmzLegacySeverity, SmzListboxChangeEvent, SmzListboxClickEvent, SmzMessageSeverity, SmzModeValue, SmzMultiSelectChangeEvent, SmzOptionConfig, SmzPageEvent, SmzPalette, SmzPickListMoveEvent, SmzPopoverTarget, SmzPrimitiveTheme, SmzProgressBarMode, SmzRgba, SmzSelectButtonChangeEvent, SmzSelectChangeEvent, SmzSelectItem, SmzSemanticTheme, SmzSeverity, SmzSkeletonShape, SmzSortMeta, SmzStyleClass, SmzTabValue, SmzTailwindThemeKey, SmzTheme, SmzThemeBase, SmzThemeCssBlocks, SmzThemeCssOptions, SmzThemeDefinition, SmzThemeLayer, SmzThemeMode, SmzTimelineAlign, SmzToastAction, SmzToastDefaults, SmzToastHandle, SmzToastMessage, SmzToastPosition, SmzTokenDefinition, SmzTokenGroup, SmzTokenLayer, SmzTokenOverride, SmzTokenType, SmzTokenUtility, SmzTooltipContent, SmzTooltipDefaults, SmzTooltipEvent, SmzTooltipOptions, SmzTooltipPosition, SmzTooltipSide, SmzTooltipVariant, SmzTranslation, SmzTreeDropEvent, SmzTreeNodeEvent, SmzTreeSelectionMode, SmzTreeTableNodeEvent, SmzTreeTableRowNode, SmzTreeTableSelectionMode, SmzUiMenuItem, SmzUiMenuItemCommandEvent, SmzUiTreeNode, SmzVariantProps, SmzVariantsConfig };
|