@praxisui/tabs 10.0.0-rc.46 → 10.0.0-rc.47

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/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@praxisui/tabs",
3
- "version": "10.0.0-rc.46",
3
+ "version": "10.0.0-rc.47",
4
4
  "description": "Configurable tabs (group and nav) for Praxis UI with metadata-driven content and runtime editor.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
7
7
  "@angular/core": "^21.0.0",
8
8
  "@angular/material": "^21.0.0",
9
9
  "@angular/cdk": "^21.0.0",
10
- "@praxisui/core": "^10.0.0-rc.46",
11
- "@praxisui/dynamic-fields": "^10.0.0-rc.46",
12
- "@praxisui/settings-panel": "^10.0.0-rc.46",
10
+ "@praxisui/core": "^10.0.0-rc.47",
11
+ "@praxisui/dynamic-fields": "^10.0.0-rc.47",
12
+ "@praxisui/settings-panel": "^10.0.0-rc.47",
13
13
  "@angular/forms": "^21.0.0",
14
14
  "@angular/router": "^21.0.0",
15
- "@praxisui/ai": "^10.0.0-rc.46",
15
+ "@praxisui/ai": "^10.0.0-rc.47",
16
16
  "rxjs": "~7.8.0"
17
17
  },
18
18
  "dependencies": {
@@ -81,6 +81,7 @@ Este documento e a referencia canonica da API JSON de praxis-tabs-config-editor.
81
81
  | Path | Type | Required | Default | Status | Notes |
82
82
  | --- | --- | --- | --- | --- | --- |
83
83
  | `meta` | not-specified | not-specified | n/a | Partial | Preservado da documentação anterior. |
84
+ | `appearance.variant` | `'underline' \| 'pill' \| 'segmented'` | no | `'underline'` | Active | Seletor visual de variante na guia `Estilo` e preset `pill`. |
84
85
  | `appearance.density` | not-specified | not-specified | n/a | Active | Preservado da documentação anterior. |
85
86
  | `appearance.themeClass` | not-specified | not-specified | n/a | Active | Preservado da documentação anterior. |
86
87
  | `appearance.customCss` | not-specified | not-specified | n/a | Active | Preservado da documentação anterior. |
@@ -391,7 +392,7 @@ Fluxo padrao:
391
392
  | `Grupo` | `group.*` | runtime `mat-tab-group` | Partial |
392
393
  | `Navegacao` | `nav.*` | runtime `mat-tab-nav-bar` | Partial |
393
394
  | `JSON` | objeto completo | override total do `editedConfig` | Active |
394
- | `Estilo` | `appearance.themeClass/density/customCss/tokens` | classes + css runtime | Partial |
395
+ | `Estilo` | `appearance.variant/themeClass/density/customCss/tokens` | classes + css runtime + presets (`primary`, `neutral`, `high-contrast`, `pill`) | Partial |
395
396
  | `Abas` | `tabs[]` + widgets por aba | group mode | Active |
396
397
  | `Acessibilidade` | `accessibility.highContrast/reduceMotion` | classes no root | Partial |
397
398
  | `Links` | `nav.links[]` + widgets por link | nav mode | Active |
@@ -445,6 +446,7 @@ Risco conhecido:
445
446
  | JSON path | Status | Observacao |
446
447
  | --- | --- | --- |
447
448
  | `meta` | Stored-only | preservado no JSON, sem guia dedicada |
449
+ | `appearance.variant` | Active | seletor visual (`underline \| pill \| segmented`) + preset `pill` |
448
450
  | `appearance.density` | Active | seletor visual |
449
451
  | `appearance.themeClass` | Active | input de classe |
450
452
  | `appearance.customCss` | Active | textarea livre |
@@ -464,6 +466,7 @@ Risco conhecido:
464
466
 
465
467
  | Path | Status | Observacao |
466
468
  | --- | --- | --- |
469
+ | `appearance.variant` | Active | guia Estilo |
467
470
  | `appearance.density` | Active | guia Estilo |
468
471
  | `appearance.themeClass` | Active | guia Estilo |
469
472
  | `appearance.customCss` | Active | guia Estilo |
@@ -479,6 +482,11 @@ Risco conhecido:
479
482
  | `appearance.tokens.pagination-icon-color` | Active | token list |
480
483
  | `appearance.tokens.divider-color` | Active | token list |
481
484
  | `appearance.tokens.background-color` | Active | token list |
485
+ | `appearance.tokens.track-background-color` | Active | token list |
486
+ | `appearance.tokens.track-border-color` | Active | token list |
487
+ | `appearance.tokens.active-tab-background-color` | Active | token list |
488
+ | `appearance.tokens.active-tab-outline-color` | Active | token list |
489
+ | `appearance.tokens.pill-radius` | Active | token list |
482
490
  | `behavior.closeable` | Active | guia Comportamento |
483
491
  | `behavior.lazyLoad` | Active | guia Comportamento |
484
492
  | `behavior.reorderable` | Active | guia Comportamento |
@@ -513,6 +521,7 @@ Risco conhecido:
513
521
  | `tabs[].textLabel` | Active | guia Abas |
514
522
  | `tabs[].labelClass` | Active | guia Abas |
515
523
  | `tabs[].bodyClass` | Active | guia Abas |
524
+ | `tabs[].tone` | Active | guia Abas |
516
525
  | `tabs[].ariaLabel` | Active | guia Abas |
517
526
  | `tabs[].ariaLabelledby` | Active | guia Abas |
518
527
  | `tabs[].disabled` | Active | guia Abas |
@@ -522,6 +531,8 @@ Risco conhecido:
522
531
  | `nav.links[]` | Active | guia Links |
523
532
  | `nav.links[].id` | Active | guia Links |
524
533
  | `nav.links[].label` | Active | guia Links |
534
+ | `nav.links[].labelClass` | Active | guia Links |
535
+ | `nav.links[].tone` | Active | guia Links |
525
536
  | `nav.links[].active` | Stored-only | editor grava; runtime final deriva por indice |
526
537
  | `nav.links[].disabled` | Active | guia Links |
527
538
  | `nav.links[].disableRipple` | Active | guia Links |
@@ -636,11 +636,18 @@ interface TabsMetadata {
636
636
 
637
637
  Campos:
638
638
 
639
+ - `variant`
639
640
  - `density`
640
641
  - `themeClass`
641
642
  - `customCss`
642
643
  - `tokens`
643
644
 
645
+ ##### variant
646
+
647
+ | Campo | Opcoes | Status | Runtime |
648
+ | --- | --- | --- | --- |
649
+ | `appearance.variant` | `underline \| pill \| segmented` | Active | classes `variant-*` no root (`group` e `nav`) |
650
+
644
651
  ##### density
645
652
 
646
653
  | Campo | Opcoes | Status | Runtime |
@@ -671,7 +678,7 @@ Politica de bloqueio atual:
671
678
 
672
679
  ##### tokens (runtime CSS)
673
680
 
674
- Tokens mapeados no runtime:
681
+ Tokens mapeados no runtime (injetados via `<style data-praxis-tabs-runtime-style>`):
675
682
 
676
683
  - `active-indicator-color`
677
684
  - `active-focus-indicator-color`
@@ -685,6 +692,11 @@ Tokens mapeados no runtime:
685
692
  - `pagination-icon-color`
686
693
  - `divider-color`
687
694
  - `background-color`
695
+ - `track-background-color`
696
+ - `track-border-color`
697
+ - `active-tab-background-color`
698
+ - `active-tab-outline-color`
699
+ - `pill-radius`
688
700
 
689
701
  Token declarado sem efeito atual:
690
702
 
@@ -778,6 +790,7 @@ Atributos ARIA ativos via `group`/`nav`/`tabs`:
778
790
  | `tabs[].textLabel` | Active | label exibido |
779
791
  | `tabs[].labelClass` | Active | classe de label |
780
792
  | `tabs[].bodyClass` | Active | classe de body |
793
+ | `tabs[].tone` | Active | classe `praxis-tab-tone--*` (`default \| primary \| accent \| outlined`) |
781
794
  | `tabs[].disabled` | Active | desabilita tab |
782
795
  | `tabs[].content` | Active | `DynamicFieldLoaderDirective` (requer `form`) |
783
796
  | `tabs[].widgets` | Active | `DynamicWidgetLoaderDirective` |
@@ -815,6 +828,8 @@ Atributos ARIA ativos via `group`/`nav`/`tabs`:
815
828
  | --- | --- | --- |
816
829
  | `nav.links[].id` | Active | preservacao de selecao no reorder + contexto |
817
830
  | `nav.links[].label` | Active | label exibido |
831
+ | `nav.links[].labelClass` | Active | classes via `[ngClass]` no `<a mat-tab-link>` |
832
+ | `nav.links[].tone` | Active | classe `praxis-tab-tone--*` (`default \| primary \| accent \| outlined`) |
818
833
  | `nav.links[].active` | Derived | ativo real e derivado de `currentNavIndex` |
819
834
  | `nav.links[].disabled` | Active | desabilita link |
820
835
  | `nav.links[].disableRipple` | Active | override por link |
@@ -828,6 +843,7 @@ Atributos ARIA ativos via `group`/`nav`/`tabs`:
828
843
  | --- | --- | --- |
829
844
  | `meta` | Stored-only | bag livre sem binding direto |
830
845
  | `appearance` | Partial | bloco ativo com ressalvas em token |
846
+ | `appearance.variant` | Active | classes `variant-underline\|pill\|segmented` |
831
847
  | `appearance.density` | Active | classes `density-*` |
832
848
  | `appearance.themeClass` | Active | classe no root |
833
849
  | `appearance.customCss` | Active | filtrado por seguranca |
@@ -845,6 +861,11 @@ Atributos ARIA ativos via `group`/`nav`/`tabs`:
845
861
  | `appearance.tokens.pagination-icon-color` | Active | css runtime |
846
862
  | `appearance.tokens.divider-color` | Active | css runtime |
847
863
  | `appearance.tokens.background-color` | Active | css runtime |
864
+ | `appearance.tokens.track-background-color` | Active | css runtime (trilha pill/segmented) |
865
+ | `appearance.tokens.track-border-color` | Active | css runtime (borda da trilha) |
866
+ | `appearance.tokens.active-tab-background-color` | Active | css runtime (fundo da aba ativa pill/segmented) |
867
+ | `appearance.tokens.active-tab-outline-color` | Active | css runtime (contorno/foco da aba pill/segmented) |
868
+ | `appearance.tokens.pill-radius` | Active | css runtime (raio da borda pill/segmented) |
848
869
  | `behavior` | Active | bloco runtime |
849
870
  | `behavior.lazyLoad` | Active | lazy content |
850
871
  | `behavior.closeable` | Active | fechar aba |
@@ -880,6 +901,7 @@ Atributos ARIA ativos via `group`/`nav`/`tabs`:
880
901
  | `tabs[].textLabel` | Active | label |
881
902
  | `tabs[].labelClass` | Active | class |
882
903
  | `tabs[].bodyClass` | Active | class |
904
+ | `tabs[].tone` | Active | classe `praxis-tab-tone--*` |
883
905
  | `tabs[].disabled` | Active | disable |
884
906
  | `tabs[].content` | Active | dynamic fields |
885
907
  | `tabs[].widgets` | Active | dynamic widgets |
@@ -898,6 +920,8 @@ Atributos ARIA ativos via `group`/`nav`/`tabs`:
898
920
  | `nav.links` | Active | fonte do modo nav |
899
921
  | `nav.links[].id` | Active | merge/reorder context |
900
922
  | `nav.links[].label` | Active | label |
923
+ | `nav.links[].labelClass` | Active | class |
924
+ | `nav.links[].tone` | Active | classe `praxis-tab-tone--*` |
901
925
  | `nav.links[].active` | Derived | derivado por indice |
902
926
  | `nav.links[].disabled` | Active | disable |
903
927
  | `nav.links[].disableRipple` | Active | override |
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, Provider, AfterViewInit } from '@angular/core';
2
+ import { OnInit, OnChanges, DoCheck, OnDestroy, EventEmitter, SimpleChanges, Provider, AfterViewInit } from '@angular/core';
3
3
  import { MatTabChangeEvent } from '@angular/material/tabs';
4
4
  import { AiCapability, WidgetDefinition, WidgetEventEnvelope, WidgetEventPathSegment, PraxisI18nConfig, ComponentDocMeta, ComponentMetadataRegistry, SettingsValueProvider as SettingsValueProvider$1, AiCapabilityCategory, AiCapabilityCatalog, AiValueKind, ComponentAuthoringManifest } from '@praxisui/core';
5
5
  import { FormGroup } from '@angular/forms';
@@ -35,6 +35,7 @@ declare class TabsAiAdapter extends BaseAiAdapter<TabsMetadata> {
35
35
  private resolveTargetId;
36
36
  private resolveTextLabel;
37
37
  private resolveTabAddInput;
38
+ private resolveLayoutVariantInput;
38
39
  private resolveTabContentInput;
39
40
  private summarizeOperations;
40
41
  private t;
@@ -60,7 +61,10 @@ interface TabsConfigChangeEvent {
60
61
  };
61
62
  }
62
63
  type TabsConfigPersistenceStrategy = 'storage-first' | 'input-first';
64
+ type TabsAppearanceVariant = 'underline' | 'pill' | 'segmented';
65
+ type TabItemTone = 'default' | 'primary' | 'accent' | 'outlined';
63
66
  interface TabsAppearanceConfig {
67
+ variant?: TabsAppearanceVariant;
64
68
  density?: 'compact' | 'comfortable' | 'spacious';
65
69
  themeClass?: string;
66
70
  customCss?: string;
@@ -112,6 +116,7 @@ interface TabMetadata {
112
116
  icon?: string;
113
117
  labelClass?: string | string[];
114
118
  bodyClass?: string | string[];
119
+ tone?: TabItemTone;
115
120
  disabled?: boolean;
116
121
  visible?: boolean;
117
122
  content?: any[];
@@ -139,6 +144,8 @@ interface TabLinkMetadata {
139
144
  id?: string;
140
145
  label: string;
141
146
  icon?: string;
147
+ labelClass?: string | string[];
148
+ tone?: TabItemTone;
142
149
  active?: boolean;
143
150
  disabled?: boolean;
144
151
  visible?: boolean;
@@ -161,8 +168,13 @@ interface TabsStyleTokens {
161
168
  'pagination-icon-color': string;
162
169
  'divider-color': string;
163
170
  'background-color': string;
171
+ 'track-background-color': string;
172
+ 'track-border-color': string;
173
+ 'active-tab-background-color': string;
174
+ 'active-tab-outline-color': string;
175
+ 'pill-radius': string;
164
176
  }
165
- declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
177
+ declare class PraxisTabs implements OnInit, OnChanges, DoCheck, OnDestroy {
166
178
  private readonly i18n;
167
179
  private readonly settings;
168
180
  private readonly storage;
@@ -218,8 +230,11 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
218
230
  private readonly destroy$;
219
231
  private widgetDefinitionCache;
220
232
  private readonly generatedContentForm;
233
+ private runtimeStyleEl?;
234
+ private lastRuntimeCss;
221
235
  ngOnInit(): void;
222
236
  ngOnChanges(changes: SimpleChanges): void;
237
+ ngDoCheck(): void;
223
238
  ngOnDestroy(): void;
224
239
  isNavMode(): boolean;
225
240
  private observeHeaderResize;
@@ -326,6 +341,11 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
326
341
  private normalizeAssistantPrompt;
327
342
  protected tabEventPath(tabId: string | undefined, tabIndex: number): WidgetEventPathSegment[];
328
343
  protected linkEventPath(linkId: string | undefined, linkIndex: number): WidgetEventPathSegment[];
344
+ protected effectiveVariant(): TabsAppearanceVariant;
345
+ protected resolveTabLabelClass(tab: TabMetadata | undefined): string;
346
+ protected resolveLinkClass(link: TabLinkMetadata | undefined): string;
347
+ private buildTabClassList;
348
+ protected syncRuntimeStyleElement(): void;
329
349
  protected styleScopeId(): string;
330
350
  protected safeCustomCss(): string | null;
331
351
  private sanitizeCssValue;
@@ -459,6 +479,26 @@ declare class PraxisTabsConfigEditor implements SettingsValueProvider {
459
479
  readonly key: "background-color";
460
480
  readonly labelKey: "editor.tokens.headerBackground";
461
481
  readonly fallback: "Fundo do header";
482
+ }, {
483
+ readonly key: "track-background-color";
484
+ readonly labelKey: "editor.tokens.trackBackground";
485
+ readonly fallback: "Fundo da trilha (pill)";
486
+ }, {
487
+ readonly key: "track-border-color";
488
+ readonly labelKey: "editor.tokens.trackBorder";
489
+ readonly fallback: "Borda da trilha (pill)";
490
+ }, {
491
+ readonly key: "active-tab-background-color";
492
+ readonly labelKey: "editor.tokens.activeTabBackground";
493
+ readonly fallback: "Fundo da aba ativa (pill)";
494
+ }, {
495
+ readonly key: "active-tab-outline-color";
496
+ readonly labelKey: "editor.tokens.activeTabOutline";
497
+ readonly fallback: "Contorno/foco da aba (pill)";
498
+ }, {
499
+ readonly key: "pill-radius";
500
+ readonly labelKey: "editor.tokens.pillRadius";
501
+ readonly fallback: "Raio da borda (pill)";
462
502
  }];
463
503
  private presets;
464
504
  isDirty$: BehaviorSubject<boolean>;
@@ -481,7 +521,7 @@ declare class PraxisTabsConfigEditor implements SettingsValueProvider {
481
521
  onAppearanceChange(): void;
482
522
  onTokenChange(key: string, value: string): void;
483
523
  clearTokens(): void;
484
- applyPreset(id: 'primary' | 'neutral' | 'high-contrast'): void;
524
+ applyPreset(id: 'primary' | 'neutral' | 'high-contrast' | 'pill'): void;
485
525
  scssSnippet(): string;
486
526
  get group(): any;
487
527
  get nav(): any;
@@ -592,4 +632,4 @@ declare const TABS_AI_CAPABILITIES: CapabilityCatalog;
592
632
  declare const PRAXIS_TABS_AUTHORING_MANIFEST: ComponentAuthoringManifest;
593
633
 
594
634
  export { PRAXIS_TABS_AUTHORING_MANIFEST, PRAXIS_TABS_COMPONENT_METADATA, PRAXIS_TABS_I18N_CONFIG, PRAXIS_TABS_I18N_NAMESPACE, PraxisTabs, PraxisTabsConfigEditor, PraxisTabsWidgetConfigEditor, TABS_AI_CAPABILITIES, buildTabsApplyPlan, buildUniqueChildWidgetKey, createPraxisTabsI18nConfig, createTabsAuthoringDocument, normalizeTabsAuthoringDocument, providePraxisTabsI18n, providePraxisTabsMetadata, serializeTabsAuthoringDocument, toCanonicalTabsConfig, validateTabsAuthoringDocument };
595
- export type { Capability, CapabilityCatalog, CapabilityCategory, PraxisTabsWidgetEditorInputs, PraxisTabsWidgetEditorValue, TabGroupMetadata, TabLinkMetadata, TabMetadata, TabNavMetadata, TabsAccessibilityConfig, TabsAppearanceConfig, TabsApplyPlan, TabsAuthoringBindings, TabsAuthoringDocument, TabsBehaviorConfig, TabsBindingsDiff, TabsConfigChangeEvent, TabsConfigPersistenceStrategy, TabsEditorDiagnostic, TabsEditorDiagnosticLevel, TabsEditorDocumentKind, TabsEventConfig, TabsMetadata, TabsRuntimeContext, TabsRuntimePlan, TabsStyleTokens, ValueKind };
635
+ export type { Capability, CapabilityCatalog, CapabilityCategory, PraxisTabsWidgetEditorInputs, PraxisTabsWidgetEditorValue, TabGroupMetadata, TabItemTone, TabLinkMetadata, TabMetadata, TabNavMetadata, TabsAccessibilityConfig, TabsAppearanceConfig, TabsAppearanceVariant, TabsApplyPlan, TabsAuthoringBindings, TabsAuthoringDocument, TabsBehaviorConfig, TabsBindingsDiff, TabsConfigChangeEvent, TabsConfigPersistenceStrategy, TabsEditorDiagnostic, TabsEditorDiagnosticLevel, TabsEditorDocumentKind, TabsEventConfig, TabsMetadata, TabsRuntimeContext, TabsRuntimePlan, TabsStyleTokens, ValueKind };