structra-ui 0.2.15 → 0.2.17

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,6 +1,6 @@
1
1
  {
2
2
  "name": "structra-ui",
3
- "version": "0.2.15",
3
+ "version": "0.2.17",
4
4
  "description": "Biblioteca de componentes Angular da StructraLab (UI reutilizável).",
5
5
  "homepage": "https://structralab.com/",
6
6
  "license": "MIT",
@@ -18,6 +18,8 @@ type AlertType = 'error' | 'success' | 'warning' | 'info';
18
18
  * Feedback visual inline (erro, sucesso, aviso, informação). Reutiliza tokens semânticos da lib.
19
19
  */
20
20
  declare class AlertComponent {
21
+ /** Remove o host do fluxo ao fechar (evita faixa em branco com `display: block` vazio). */
22
+ protected get hostHidden(): boolean;
21
23
  type: AlertType;
22
24
  message: string;
23
25
  closable: boolean;
@@ -2818,6 +2820,12 @@ declare function getThemeTokenClass(theme: StructraTheme | string): string;
2818
2820
  declare function getThemeClassList(theme: StructraTheme | string): readonly [string, string];
2819
2821
  declare function getThemeClass(theme: StructraTheme | string): string;
2820
2822
 
2823
+ /**
2824
+ * Tema efectivo para hosts/overlays: valor de `[appTheme]` quando definido; caso contrário
2825
+ * {@link AppThemeService.activeThemeId} (mesmo comportamento que antes sem input).
2826
+ */
2827
+ declare function injectEffectiveThemeId(appTheme: Signal<StructraTheme | AppTheme | undefined | null>): Signal<AppThemeId>;
2828
+
2821
2829
  /** Classes aplicadas ao painel CDK Dialog + tema da app. */
2822
2830
  declare function libDialogPanelClasses(theme: AppThemeService, extra?: string | string[]): string[];
2823
2831
 
@@ -2960,8 +2968,10 @@ declare class DropdownMenuComponent<T = string> {
2960
2968
  declare class ContextMenuComponent<T = string> implements OnDestroy {
2961
2969
  private readonly overlay;
2962
2970
  private readonly vcr;
2963
- private readonly appTheme;
2964
2971
  private readonly cdr;
2972
+ /** Igual a `[appTheme]` na lib; omitir = tema global. */
2973
+ readonly appTheme: i0.InputSignal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black" | AppTheme | undefined>;
2974
+ readonly effectiveThemeId: i0.Signal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black">;
2965
2975
  items: readonly MenuNodeItem<T>[];
2966
2976
  disabled: boolean;
2967
2977
  menuId: string;
@@ -2982,7 +2992,7 @@ declare class ContextMenuComponent<T = string> implements OnDestroy {
2982
2992
  onItemSelect(id: T): void;
2983
2993
  onCloseRequest(): void;
2984
2994
  static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuComponent<any>, never>;
2985
- static ɵcmp: i0.ɵɵComponentDeclaration<ContextMenuComponent<any>, "app-context-menu", never, { "items": { "alias": "items"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; "menuId": { "alias": "menuId"; "required": false; }; }, { "itemSelect": "itemSelect"; }, never, ["*"], true, never>;
2995
+ static ɵcmp: i0.ɵɵComponentDeclaration<ContextMenuComponent<any>, "app-context-menu", never, { "appTheme": { "alias": "appTheme"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; "menuId": { "alias": "menuId"; "required": false; }; }, { "itemSelect": "itemSelect"; }, never, ["*"], true, never>;
2986
2996
  static ngAcceptInputType_disabled: unknown;
2987
2997
  }
2988
2998
 
@@ -3057,8 +3067,10 @@ type MenuRow<T = string> = MenuRowAction<T> | MenuRowDivider | MenuRowGroup | Me
3057
3067
 
3058
3068
  declare class MenuListComponent<T = string> implements OnChanges {
3059
3069
  private readonly cdr;
3060
- private readonly appTheme;
3061
3070
  readonly hostRef: ElementRef<any>;
3071
+ /** Igual a `[appTheme]` na lib; omitir = tema global (ex.: propagado por `app-sidebar`). */
3072
+ readonly appTheme: i0.InputSignal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black" | AppTheme | undefined>;
3073
+ readonly effectiveThemeId: i0.Signal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black">;
3062
3074
  items: readonly MenuNodeItem<T>[];
3063
3075
  /** Prefixo dos `id` das opções focáveis (`${menuId}-opt-${focusIndex}`). */
3064
3076
  menuId: string;
@@ -3122,7 +3134,7 @@ declare class MenuListComponent<T = string> implements OnChanges {
3122
3134
  private focusActiveDom;
3123
3135
  onKeydown(ev: KeyboardEvent): void;
3124
3136
  static ɵfac: i0.ɵɵFactoryDeclaration<MenuListComponent<any>, never>;
3125
- static ɵcmp: i0.ɵɵComponentDeclaration<MenuListComponent<any>, "app-menu-list", never, { "items": { "alias": "items"; "required": true; }; "menuId": { "alias": "menuId"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; "nested": { "alias": "nested"; "required": false; }; "selectedItemId": { "alias": "selectedItemId"; "required": false; }; "compressText": { "alias": "compressText"; "required": false; }; }, { "itemSelect": "itemSelect"; "closeRequest": "closeRequest"; "submenuBack": "submenuBack"; }, never, never, true, never>;
3137
+ static ɵcmp: i0.ɵɵComponentDeclaration<MenuListComponent<any>, "app-menu-list", never, { "appTheme": { "alias": "appTheme"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": true; }; "menuId": { "alias": "menuId"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; "nested": { "alias": "nested"; "required": false; }; "selectedItemId": { "alias": "selectedItemId"; "required": false; }; "compressText": { "alias": "compressText"; "required": false; }; }, { "itemSelect": "itemSelect"; "closeRequest": "closeRequest"; "submenuBack": "submenuBack"; }, never, never, true, never>;
3126
3138
  static ngAcceptInputType_dense: unknown;
3127
3139
  static ngAcceptInputType_nested: unknown;
3128
3140
  static ngAcceptInputType_compressText: unknown;
@@ -3348,13 +3360,16 @@ declare const APP_SIDEBAR_NAV_REVEAL_TOTAL_MS: number;
3348
3360
  * Estrutura principal: barra lateral, topo e conteúdo. Em mobile a lateral projecta-se no `app-drawer`.
3349
3361
  *
3350
3362
  * Use `exportAs: 'appShell'` e `toggleMobileNav` / `toggleSidebarCollapsed` a partir da topbar.
3363
+ *
3364
+ * Tema no host: `[appTheme]="'purple'"` como no resto da lib; omitir = {@link AppThemeService}.
3351
3365
  */
3352
3366
  declare class AppShellComponent implements OnInit {
3353
3367
  private readonly bp;
3354
3368
  private readonly cdr;
3355
3369
  private readonly destroyRef;
3356
- private readonly theme;
3357
- protected get hostThemeClasses(): string;
3370
+ readonly appTheme: i0.InputSignal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black" | AppTheme | undefined>;
3371
+ readonly effectiveThemeId: i0.Signal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black">;
3372
+ protected readonly hostThemeClass: i0.Signal<string>;
3358
3373
  private readonly sidebarSlot?;
3359
3374
  /** Conteúdo lateral (obrigatório): `<ng-template appShellSidebar>...</ng-template>`. */
3360
3375
  get sidebarTemplate(): TemplateRef<unknown> | null;
@@ -3377,7 +3392,7 @@ declare class AppShellComponent implements OnInit {
3377
3392
  toggleSidebarCollapsed(): void;
3378
3393
  closeMobileNav(): void;
3379
3394
  static ɵfac: i0.ɵɵFactoryDeclaration<AppShellComponent, never>;
3380
- static ɵcmp: i0.ɵɵComponentDeclaration<AppShellComponent, "app-shell", ["appShell"], { "sidebarCollapsed": { "alias": "sidebarCollapsed"; "required": false; }; "mobileNavOpen": { "alias": "mobileNavOpen"; "required": false; }; "mobileLayoutQuery": { "alias": "mobileLayoutQuery"; "required": false; }; }, { "sidebarCollapsedChange": "sidebarCollapsedChange"; "mobileNavOpenChange": "mobileNavOpenChange"; }, ["sidebarSlot"], ["[appShellTopbar]", "*"], true, never>;
3395
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppShellComponent, "app-shell", ["appShell"], { "appTheme": { "alias": "appTheme"; "required": false; "isSignal": true; }; "sidebarCollapsed": { "alias": "sidebarCollapsed"; "required": false; }; "mobileNavOpen": { "alias": "mobileNavOpen"; "required": false; }; "mobileLayoutQuery": { "alias": "mobileLayoutQuery"; "required": false; }; }, { "sidebarCollapsedChange": "sidebarCollapsedChange"; "mobileNavOpenChange": "mobileNavOpenChange"; }, ["sidebarSlot"], ["[appShellTopbar]", "*"], true, never>;
3381
3396
  static ngAcceptInputType_sidebarCollapsed: unknown;
3382
3397
  static ngAcceptInputType_mobileNavOpen: unknown;
3383
3398
  }
@@ -3404,16 +3419,17 @@ declare class AppShellSidebarTemplateDirective {
3404
3419
  * Navegação lateral com o mesmo modelo `MenuNodeItem` dos menus da lib (grupos, submenus, teclado).
3405
3420
  * Com `collapsed`, `app-menu-list` usa `compressText`: rótulos de grupo (ex. «Principal») ficam ocultos;
3406
3421
  * itens mostram só ícones com `title` / `aria-label` para acessibilidade.
3422
+ *
3423
+ * Tema: use `[appTheme]="'purple'"` (ou outro id) no host — igual ao `[appTheme]` da lib; sem input,
3424
+ * segue {@link AppThemeService}.
3407
3425
  */
3408
3426
  declare class AppSidebarComponent<T extends string = string> implements OnChanges {
3409
- private readonly theme;
3410
3427
  private readonly cdr;
3411
3428
  private readonly destroyRef;
3412
- /**
3413
- * Garante `.app-library-theme` + `theme-*` no host para tokens `--app-color-nav-*` e lista
3414
- * herdarem a paleta activa (útil fora da demo ou sem antepassado tematizado).
3415
- */
3416
- protected get hostThemeClasses(): string;
3429
+ /** Igual a `[appTheme]` / {@link ThemeDirective}: paleta explícita; omitir = tema global. */
3430
+ readonly appTheme: i0.InputSignal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black" | AppTheme | undefined>;
3431
+ readonly effectiveThemeId: i0.Signal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black">;
3432
+ protected readonly hostThemeClass: i0.Signal<string>;
3417
3433
  items: readonly MenuNodeItem<T>[];
3418
3434
  menuId: string;
3419
3435
  /** Sincronizar com o item de navegação activo (realce persistente). */
@@ -3431,7 +3447,7 @@ declare class AppSidebarComponent<T extends string = string> implements OnChange
3431
3447
  ngOnChanges(changes: SimpleChanges): void;
3432
3448
  private clearListRevealTimeout;
3433
3449
  static ɵfac: i0.ɵɵFactoryDeclaration<AppSidebarComponent<any>, never>;
3434
- static ɵcmp: i0.ɵɵComponentDeclaration<AppSidebarComponent<any>, "app-sidebar", never, { "items": { "alias": "items"; "required": true; }; "menuId": { "alias": "menuId"; "required": false; }; "selectedItemId": { "alias": "selectedItemId"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; }, { "itemSelect": "itemSelect"; }, never, ["[appSidebarToolbar]"], true, never>;
3450
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppSidebarComponent<any>, "app-sidebar", never, { "appTheme": { "alias": "appTheme"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": true; }; "menuId": { "alias": "menuId"; "required": false; }; "selectedItemId": { "alias": "selectedItemId"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; }, { "itemSelect": "itemSelect"; }, never, ["[appSidebarToolbar]"], true, never>;
3435
3451
  static ngAcceptInputType_collapsed: unknown;
3436
3452
  }
3437
3453
 
@@ -3520,5 +3536,5 @@ declare class AppBreadcrumbComponent {
3520
3536
  static ɵcmp: i0.ɵɵComponentDeclaration<AppBreadcrumbComponent, "app-breadcrumb", never, { "items": { "alias": "items"; "required": true; }; }, {}, never, never, true, never>;
3521
3537
  }
3522
3538
 
3523
- export { ADAPTIVE_DATA_VIEW_MOBILE_QUERY, APP_SIDEBAR_LABEL_REVEAL_LAG_MS, APP_SIDEBAR_LAYOUT_DURATION_MS, APP_SIDEBAR_NAV_REVEAL_TOTAL_MS, APP_THEME_BASE_CLASS, APP_THEME_IDS, ActionMenuComponent, AdaptiveDataViewComponent, AlertComponent, AnchoredOverlayComponent, AppBreadcrumbComponent, AppDialogComponent, AppLibLightBlockScrollStrategy, AppShellComponent, AppShellSidebarTemplateDirective, AppShellSidebarToggleComponent, AppSidebarComponent, AppSidebarToolbarDirective, AppTheme, AppThemeService, AppTopbarComponent, AppUserMenuComponent, BR_ESTADOS_NOME_SIGLA, BaseFieldComponent, BaseFieldDirective, BooleanFieldDirective, ButtonComponent, ButtonRadius, ButtonSize, ButtonType, ButtonVariant, CardListComponent, CepFieldComponent, CheckboxFieldComponent, ConfirmDialogComponent, ConfirmDialogService, ContextMenuComponent, CpfCnpjFieldComponent, DashboardSectionComponent, DataCardComponent, DataGridComponent, DataListComponent, DataToolbarComponent, DateFieldComponent, DecimalFieldComponent, DetailsFieldComponent, DetailsViewComponent, DialogFooterDirective, DividerComponent, DrawerComponent, DrawerSide, DrawerSize, DropdownBaseComponent, DropdownMenuComponent, DropdownMultiOptionFieldBase, DropdownOptionFieldBase, DropdownSearchFieldComponent, EmptyStateComponent, FILE_PREVIEW_UNAVAILABLE_MESSAGE, FileUploadFieldComponent, FormActionsAlign, FormActionsComponent, FormColComponent, FormGroupComponent, FormGroupVariant, FormLayoutGap, FormRowAlign, FormRowComponent, FormRowJustify, FormSectionAlign, FormSectionComponent, FormSectionRadius, FormSectionVariant, FormTabComponent, FormTabsComponent, ImagePreviewPanelComponent, InputMaskFieldComponent, IntegerFieldComponent, LAYOUT_STACK_SIDE_BY_SIDE, LAYOUT_STACK_STACKED, LayoutStackAlign, LayoutStackComponent, LayoutStackDirection, LayoutStackItemAlign, LibDialogSize, ListItemComponent, LoadingDialogComponent, LoadingDialogService, MaskedTextFieldBase, MenuDividerComponent, MenuDropdownPlacement, MenuGroupComponent, MenuListComponent, MultiselectFieldComponent, NgControlFieldDirective, OverlayPlacement, PDF_IFRAME_VIEWER_HASH, PasswordFieldComponent, PhoneFieldComponent, PopoverBodyTemplateDirective, PopoverComponent, PopoverFooterTemplateDirective, PopoverTriggerDirective, STRUCTRA_THEME_IDS, STRUCTRA_UI, SelectFieldComponent, SkeletonBlockComponent, SkeletonCardComponent, SkeletonFieldShellComponent, SkeletonListComponent, SkeletonTableComponent, SkeletonTextComponent, StatCardComponent, StatusBadgeComponent, SwitchFieldComponent, TableEmptyStateComponent, TableToolbarComponent, TextFieldComponent, TextareaFieldComponent, ThemeDirective, ToastHostComponent, ToastService, TooltipComponent, TooltipPanelTemplateDirective, ValidationSummaryComponent, anchoredOverlayPositions, appendPdfIframeViewerParams, applyPickedCalendarDate, buildDecimalBrDisplay, buildDecimalBrParseString, buildEmptyStateOverlayHtml, caretIndexFromIntegerDigitCount, caretIndexFromSemantic, cepMaskCompleteValidator, cpfCnpjMaskCompleteValidator, escapeHtml, extractDecimalBrParts, fileIsLikelyImage, fileMatchesAccept, fixedDigitsMaskCompleteValidator, formatAcceptForDisplay, formatDateTimePtBr, formatDecimalBr, formatFileSizeBytes, formatIntegerThousandsBr, formatMaskDigits, formatUiFieldDateValue, getFilePreviewKind, getThemeClass, getThemeClassList, getThemeTokenClass, libDialogPanelClasses, mapEstadosToOptions, maskDigitCount, normalizeFormDateValue, normalizeStructraTheme, parseDecimalBr, parseIntegerString, parseUiFieldDateValue, phoneBrMaskCompleteValidator, resolveControlAtPath, sanitizeDecimalBrInput, sanitizeIntegerDigits, sectionHasVisibleInvalid, semanticCaretAt, semanticIntegerDigitCountLeft, stripToDigits, subscribeMarkForCheckOnInvalidUiRefresh, subtreeHasVisibleInvalid };
3539
+ export { ADAPTIVE_DATA_VIEW_MOBILE_QUERY, APP_SIDEBAR_LABEL_REVEAL_LAG_MS, APP_SIDEBAR_LAYOUT_DURATION_MS, APP_SIDEBAR_NAV_REVEAL_TOTAL_MS, APP_THEME_BASE_CLASS, APP_THEME_IDS, ActionMenuComponent, AdaptiveDataViewComponent, AlertComponent, AnchoredOverlayComponent, AppBreadcrumbComponent, AppDialogComponent, AppLibLightBlockScrollStrategy, AppShellComponent, AppShellSidebarTemplateDirective, AppShellSidebarToggleComponent, AppSidebarComponent, AppSidebarToolbarDirective, AppTheme, AppThemeService, AppTopbarComponent, AppUserMenuComponent, BR_ESTADOS_NOME_SIGLA, BaseFieldComponent, BaseFieldDirective, BooleanFieldDirective, ButtonComponent, ButtonRadius, ButtonSize, ButtonType, ButtonVariant, CardListComponent, CepFieldComponent, CheckboxFieldComponent, ConfirmDialogComponent, ConfirmDialogService, ContextMenuComponent, CpfCnpjFieldComponent, DashboardSectionComponent, DataCardComponent, DataGridComponent, DataListComponent, DataToolbarComponent, DateFieldComponent, DecimalFieldComponent, DetailsFieldComponent, DetailsViewComponent, DialogFooterDirective, DividerComponent, DrawerComponent, DrawerSide, DrawerSize, DropdownBaseComponent, DropdownMenuComponent, DropdownMultiOptionFieldBase, DropdownOptionFieldBase, DropdownSearchFieldComponent, EmptyStateComponent, FILE_PREVIEW_UNAVAILABLE_MESSAGE, FileUploadFieldComponent, FormActionsAlign, FormActionsComponent, FormColComponent, FormGroupComponent, FormGroupVariant, FormLayoutGap, FormRowAlign, FormRowComponent, FormRowJustify, FormSectionAlign, FormSectionComponent, FormSectionRadius, FormSectionVariant, FormTabComponent, FormTabsComponent, ImagePreviewPanelComponent, InputMaskFieldComponent, IntegerFieldComponent, LAYOUT_STACK_SIDE_BY_SIDE, LAYOUT_STACK_STACKED, LayoutStackAlign, LayoutStackComponent, LayoutStackDirection, LayoutStackItemAlign, LibDialogSize, ListItemComponent, LoadingDialogComponent, LoadingDialogService, MaskedTextFieldBase, MenuDividerComponent, MenuDropdownPlacement, MenuGroupComponent, MenuListComponent, MultiselectFieldComponent, NgControlFieldDirective, OverlayPlacement, PDF_IFRAME_VIEWER_HASH, PasswordFieldComponent, PhoneFieldComponent, PopoverBodyTemplateDirective, PopoverComponent, PopoverFooterTemplateDirective, PopoverTriggerDirective, STRUCTRA_THEME_IDS, STRUCTRA_UI, SelectFieldComponent, SkeletonBlockComponent, SkeletonCardComponent, SkeletonFieldShellComponent, SkeletonListComponent, SkeletonTableComponent, SkeletonTextComponent, StatCardComponent, StatusBadgeComponent, SwitchFieldComponent, TableEmptyStateComponent, TableToolbarComponent, TextFieldComponent, TextareaFieldComponent, ThemeDirective, ToastHostComponent, ToastService, TooltipComponent, TooltipPanelTemplateDirective, ValidationSummaryComponent, anchoredOverlayPositions, appendPdfIframeViewerParams, applyPickedCalendarDate, buildDecimalBrDisplay, buildDecimalBrParseString, buildEmptyStateOverlayHtml, caretIndexFromIntegerDigitCount, caretIndexFromSemantic, cepMaskCompleteValidator, cpfCnpjMaskCompleteValidator, escapeHtml, extractDecimalBrParts, fileIsLikelyImage, fileMatchesAccept, fixedDigitsMaskCompleteValidator, formatAcceptForDisplay, formatDateTimePtBr, formatDecimalBr, formatFileSizeBytes, formatIntegerThousandsBr, formatMaskDigits, formatUiFieldDateValue, getFilePreviewKind, getThemeClass, getThemeClassList, getThemeTokenClass, injectEffectiveThemeId, libDialogPanelClasses, mapEstadosToOptions, maskDigitCount, normalizeFormDateValue, normalizeStructraTheme, parseDecimalBr, parseIntegerString, parseUiFieldDateValue, phoneBrMaskCompleteValidator, resolveControlAtPath, sanitizeDecimalBrInput, sanitizeIntegerDigits, sectionHasVisibleInvalid, semanticCaretAt, semanticIntegerDigitCountLeft, stripToDigits, subscribeMarkForCheckOnInvalidUiRefresh, subtreeHasVisibleInvalid };
3524
3540
  export type { AdaptiveDataViewMode, AlertType, AppThemeId, AppThemeOption, BreadcrumbItem, CardItemView, CardListDataMode, CardListMapFn, ConfirmDialogData, ConfirmDialogVariant, DataGridColumn, DataGridPaginationChangeEvent, DetailsViewItem, DropdownListBindings, DropdownSearchPageRequested, FieldCommonInputs, FilePreviewKind, FormTabsVariant, LoadingDialogData, MenuItemAction, MenuItemDivider, MenuItemGroup, MenuItemKind, MenuItemSubmenu, MenuLeafItem, MenuNodeItem, SelectPageRequested, SkeletonFieldShellVariant, StatCardDeltaTone, StatusBadgeSize, StatusBadgeVariant, StructraTheme, ToastInstance, ToastShowOptions, ToastType, ToastVerticalPosition, UiSelectOption, ValidationSummaryItem, ValidationSummaryVariant };