structra-ui 0.1.96 → 0.1.98
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/fesm2022/structra-ui.mjs +93 -21
- package/fesm2022/structra-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/structra-ui.d.ts +33 -7
package/package.json
CHANGED
package/types/structra-ui.d.ts
CHANGED
|
@@ -209,6 +209,8 @@ declare abstract class BaseFieldDirective<T> implements ControlValueAccessor {
|
|
|
209
209
|
private onChange;
|
|
210
210
|
private onTouched;
|
|
211
211
|
get controlId(): string;
|
|
212
|
+
/** Útil para inspeção no DOM sem colidir com `id` do input interno. */
|
|
213
|
+
get hostDataControlId(): string;
|
|
212
214
|
protected get autoIdPrefix(): string;
|
|
213
215
|
/** Valor do atributo HTML `autocomplete` derivado de {@link autocomplete}. */
|
|
214
216
|
get autocompleteAttr(): 'on' | 'off';
|
|
@@ -466,6 +468,9 @@ declare class TextFieldComponent extends NgControlFieldDirective<string | null>
|
|
|
466
468
|
}
|
|
467
469
|
|
|
468
470
|
declare class PasswordFieldComponent extends NgControlFieldDirective<string | null> implements OnInit {
|
|
471
|
+
/** Password já nasce com ícone de chave no prefixo; pode ser sobrescrito via `prefixIcon`. */
|
|
472
|
+
showPrefixIcon: boolean;
|
|
473
|
+
prefixIcon: string;
|
|
469
474
|
get hostInvalidClass(): boolean;
|
|
470
475
|
/** Por defeito `false`: o botão de limpar compete com o toggle de visibilidade. */
|
|
471
476
|
clearable: boolean;
|
|
@@ -491,7 +496,8 @@ declare class PasswordFieldComponent extends NgControlFieldDirective<string | nu
|
|
|
491
496
|
onClear(): void;
|
|
492
497
|
togglePasswordVisible(ev: Event): void;
|
|
493
498
|
static ɵfac: i0.ɵɵFactoryDeclaration<PasswordFieldComponent, never>;
|
|
494
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PasswordFieldComponent, "app-password-field", never, { "clearable": { "alias": "clearable"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "autoComplete": { "alias": "autoComplete"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
499
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PasswordFieldComponent, "app-password-field", never, { "showPrefixIcon": { "alias": "showPrefixIcon"; "required": false; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "autoComplete": { "alias": "autoComplete"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
500
|
+
static ngAcceptInputType_showPrefixIcon: unknown;
|
|
495
501
|
static ngAcceptInputType_clearable: unknown;
|
|
496
502
|
static ngAcceptInputType_maxLength: unknown;
|
|
497
503
|
}
|
|
@@ -922,7 +928,7 @@ declare abstract class BooleanFieldDirective extends BaseFieldDirective<boolean
|
|
|
922
928
|
}
|
|
923
929
|
|
|
924
930
|
declare class CheckboxFieldComponent extends BooleanFieldDirective {
|
|
925
|
-
/** `
|
|
931
|
+
/** `false` (padrão): host usa largura intrínseca. Com `true`, ocupa 100%. */
|
|
926
932
|
fullWidth: boolean;
|
|
927
933
|
get fullWidthClass(): boolean;
|
|
928
934
|
onCheckboxClick(ev: MouseEvent): void;
|
|
@@ -1323,6 +1329,7 @@ declare class FileUploadFieldComponent implements OnChanges, OnDestroy {
|
|
|
1323
1329
|
private fileInputRef?;
|
|
1324
1330
|
private readonly autoId;
|
|
1325
1331
|
get fieldId(): string;
|
|
1332
|
+
get hostDataControlId(): string;
|
|
1326
1333
|
isDragging: boolean;
|
|
1327
1334
|
hasHover: boolean;
|
|
1328
1335
|
private internalError;
|
|
@@ -2639,6 +2646,9 @@ declare class ConfirmDialogService {
|
|
|
2639
2646
|
static ɵprov: i0.ɵɵInjectableDeclaration<ConfirmDialogService>;
|
|
2640
2647
|
}
|
|
2641
2648
|
|
|
2649
|
+
declare const STRUCTRA_THEME_IDS: readonly ["blue", "green", "purple", "orange", "white", "gray", "sepia", "black"];
|
|
2650
|
+
type StructraTheme = (typeof STRUCTRA_THEME_IDS)[number];
|
|
2651
|
+
|
|
2642
2652
|
/** Identificadores de paleta suportados pela library (uso em `AppThemeService.setTheme`). */
|
|
2643
2653
|
declare enum AppTheme {
|
|
2644
2654
|
Blue = "blue",
|
|
@@ -2650,8 +2660,8 @@ declare enum AppTheme {
|
|
|
2650
2660
|
Sepia = "sepia",
|
|
2651
2661
|
Black = "black"
|
|
2652
2662
|
}
|
|
2653
|
-
declare const APP_THEME_IDS: readonly [
|
|
2654
|
-
type AppThemeId =
|
|
2663
|
+
declare const APP_THEME_IDS: readonly ["blue", "green", "purple", "orange", "white", "gray", "sepia", "black"];
|
|
2664
|
+
type AppThemeId = StructraTheme;
|
|
2655
2665
|
/** Opção de tema para UI (selector, documentação). */
|
|
2656
2666
|
interface AppThemeOption {
|
|
2657
2667
|
readonly id: AppThemeId;
|
|
@@ -2664,7 +2674,7 @@ interface AppThemeOption {
|
|
|
2664
2674
|
declare class AppThemeService {
|
|
2665
2675
|
private readonly activeId;
|
|
2666
2676
|
/** Identificador do tema activo (`blue`, `green`, …). */
|
|
2667
|
-
readonly activeThemeId: i0.Signal<
|
|
2677
|
+
readonly activeThemeId: i0.Signal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black">;
|
|
2668
2678
|
/**
|
|
2669
2679
|
* Classes separadas (ex.: CDK `panelClass` — uma string com espaço quebra `classList.add`).
|
|
2670
2680
|
*/
|
|
@@ -2686,6 +2696,22 @@ declare class AppThemeService {
|
|
|
2686
2696
|
static ɵprov: i0.ɵɵInjectableDeclaration<AppThemeService>;
|
|
2687
2697
|
}
|
|
2688
2698
|
|
|
2699
|
+
declare class ThemeDirective implements OnChanges {
|
|
2700
|
+
theme: StructraTheme | AppTheme;
|
|
2701
|
+
private readonly elementRef;
|
|
2702
|
+
private readonly renderer;
|
|
2703
|
+
private readonly themeTokenClasses;
|
|
2704
|
+
ngOnChanges(): void;
|
|
2705
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeDirective, never>;
|
|
2706
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ThemeDirective, "[appTheme]", never, { "theme": { "alias": "appTheme"; "required": false; }; }, {}, never, never, true, never>;
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
declare const APP_THEME_BASE_CLASS = "app-library-theme";
|
|
2710
|
+
declare function normalizeStructraTheme(theme: StructraTheme | string): StructraTheme;
|
|
2711
|
+
declare function getThemeTokenClass(theme: StructraTheme | string): string;
|
|
2712
|
+
declare function getThemeClassList(theme: StructraTheme | string): readonly [string, string];
|
|
2713
|
+
declare function getThemeClass(theme: StructraTheme | string): string;
|
|
2714
|
+
|
|
2689
2715
|
/** Classes aplicadas ao painel CDK Dialog + tema da app. */
|
|
2690
2716
|
declare function libDialogPanelClasses(theme: AppThemeService, extra?: string | string[]): string[];
|
|
2691
2717
|
|
|
@@ -3388,5 +3414,5 @@ declare class AppBreadcrumbComponent {
|
|
|
3388
3414
|
static ɵcmp: i0.ɵɵComponentDeclaration<AppBreadcrumbComponent, "app-breadcrumb", never, { "items": { "alias": "items"; "required": true; }; }, {}, never, never, true, never>;
|
|
3389
3415
|
}
|
|
3390
3416
|
|
|
3391
|
-
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_IDS, ActionMenuComponent, AdaptiveDataViewComponent, 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, FormSectionComponent, 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_UI, SelectFieldComponent, SkeletonBlockComponent, SkeletonCardComponent, SkeletonFieldShellComponent, SkeletonListComponent, SkeletonTableComponent, SkeletonTextComponent, StatCardComponent, StatusBadgeComponent, SwitchFieldComponent, TableEmptyStateComponent, TableToolbarComponent, TextFieldComponent, TextareaFieldComponent, 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, libDialogPanelClasses, mapEstadosToOptions, maskDigitCount, normalizeFormDateValue, parseDecimalBr, parseIntegerString, parseUiFieldDateValue, phoneBrMaskCompleteValidator, resolveControlAtPath, sanitizeDecimalBrInput, sanitizeIntegerDigits, sectionHasVisibleInvalid, semanticCaretAt, semanticIntegerDigitCountLeft, stripToDigits, subscribeMarkForCheckOnInvalidUiRefresh, subtreeHasVisibleInvalid };
|
|
3392
|
-
export type { AdaptiveDataViewMode, 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, ToastInstance, ToastShowOptions, ToastType, ToastVerticalPosition, UiSelectOption, ValidationSummaryItem, ValidationSummaryVariant };
|
|
3417
|
+
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, 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, FormSectionComponent, 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 };
|
|
3418
|
+
export type { AdaptiveDataViewMode, 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 };
|